@geotrekce/geotrek-rando-widget 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14254,10 +14254,12 @@ const GrwMap = class {
14254
14254
  }
14255
14255
  store.onChange('currentTreks', () => {
14256
14256
  if (store.state.currentTrek) {
14257
+ this.removeTreks();
14257
14258
  this.addTrek();
14258
14259
  }
14259
14260
  else if (store.state.currentTreks) {
14260
14261
  this.addTreks();
14262
+ this.removeTrek();
14261
14263
  }
14262
14264
  });
14263
14265
  store.onChange('currentTrek', () => {
@@ -34,10 +34,12 @@ export class GrwMap {
34
34
  }
35
35
  onChange('currentTreks', () => {
36
36
  if (state.currentTrek) {
37
+ this.removeTreks();
37
38
  this.addTrek();
38
39
  }
39
40
  else if (state.currentTreks) {
40
41
  this.addTreks();
42
+ this.removeTrek();
41
43
  }
42
44
  });
43
45
  onChange('currentTrek', () => {
@@ -14179,10 +14179,12 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
14179
14179
  }
14180
14180
  onChange('currentTreks', () => {
14181
14181
  if (state.currentTrek) {
14182
+ this.removeTreks();
14182
14183
  this.addTrek();
14183
14184
  }
14184
14185
  else if (state.currentTreks) {
14185
14186
  this.addTreks();
14187
+ this.removeTrek();
14186
14188
  }
14187
14189
  });
14188
14190
  onChange('currentTrek', () => {
@@ -14250,10 +14250,12 @@ const GrwMap = class {
14250
14250
  }
14251
14251
  onChange('currentTreks', () => {
14252
14252
  if (state.currentTrek) {
14253
+ this.removeTreks();
14253
14254
  this.addTrek();
14254
14255
  }
14255
14256
  else if (state.currentTreks) {
14256
14257
  this.addTreks();
14258
+ this.removeTrek();
14257
14259
  }
14258
14260
  });
14259
14261
  onChange('currentTrek', () => {
@@ -1 +1 @@
1
- import{p as r,b as o}from"./p-b62909db.js";(()=>{const o=import.meta.url,e={};return""!==o&&(e.resourcesUrl=new URL(".",o).href),r(e)})().then((r=>o([["p-500436f1",[[1,"grw-trek-card",{trek:[16],colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],isLargeView:[4,"is-large-view"],currentTrek:[32],difficulty:[32],route:[32],practice:[32],themes:[32]}]]],["p-0510e16b",[[1,"grw-information-desk-detail",{informationDesk:[16]}],[1,"grw-poi-detail",{poi:[16]}],[1,"grw-sensitive-area-detail",{sensitiveArea:[16]}]]],["p-9a25f817",[[1,"grw-trek-detail",{trek:[16],colorPrimary:[1,"color-primary"],colorPrimaryShade:[1,"color-primary-shade"],colorPrimaryTint:[1,"color-primary-tint"],difficulty:[32],route:[32],practice:[32],themes:[32],labels:[32],sources:[32],accessibilities:[32],accessibilityLevel:[32],currentTrek:[32]}],[1,"grw-treks-list",{colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],isLargeView:[4,"is-large-view"],treksToDisplay:[32]}],[1,"grw-filter",{filterType:[1,"filter-type"],filterName:[1,"filter-name"],filterNameProperty:[1,"filter-name-property"]}],[0,"grw-map",{urlLayer:[1,"url-layer"],attribution:[1],center:[1],zoom:[2],colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],colorTrekLine:[1,"color-trek-line"],colorDepartureIcon:[1,"color-departure-icon"],colorArrivalIcon:[1,"color-arrival-icon"],colorSensitiveArea:[1,"color-sensitive-area"],colorPoiIcon:[1,"color-poi-icon"],mapIsReady:[32]}],[1,"grw-trek-provider",{language:[1],api:[1],trekId:[1,"trek-id"]}],[1,"grw-treks-provider",{language:[1],api:[1],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1],routes:[1],practices:[1]}]]],["p-94f0db4d",[[1,"grw-app",{api:[1],language:[1],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1],routes:[1],practices:[1],urlLayer:[1,"url-layer"],center:[1],zoom:[2],attribution:[1],colorPrimary:[1,"color-primary"],colorPrimaryShade:[1,"color-primary-shade"],colorPrimaryTint:[1,"color-primary-tint"],colorTrekLine:[1,"color-trek-line"],colorDepartureIcon:[1,"color-departure-icon"],colorArrivalIcon:[1,"color-arrival-icon"],colorSensitiveArea:[1,"color-sensitive-area"],colorPoiIcon:[1,"color-poi-icon"],showTrek:[32],showTreksMap:[32],showTrekMap:[32],showFilters:[32],isLargeView:[32],currentTrekId:[32]},[[0,"trekCardPress","onTrekCardPress"],[9,"resize","onWindowResize"]]]]]],r)));
1
+ import{p as r,b as o}from"./p-b62909db.js";(()=>{const o=import.meta.url,e={};return""!==o&&(e.resourcesUrl=new URL(".",o).href),r(e)})().then((r=>o([["p-500436f1",[[1,"grw-trek-card",{trek:[16],colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],isLargeView:[4,"is-large-view"],currentTrek:[32],difficulty:[32],route:[32],practice:[32],themes:[32]}]]],["p-0510e16b",[[1,"grw-information-desk-detail",{informationDesk:[16]}],[1,"grw-poi-detail",{poi:[16]}],[1,"grw-sensitive-area-detail",{sensitiveArea:[16]}]]],["p-28db12ba",[[1,"grw-trek-detail",{trek:[16],colorPrimary:[1,"color-primary"],colorPrimaryShade:[1,"color-primary-shade"],colorPrimaryTint:[1,"color-primary-tint"],difficulty:[32],route:[32],practice:[32],themes:[32],labels:[32],sources:[32],accessibilities:[32],accessibilityLevel:[32],currentTrek:[32]}],[1,"grw-treks-list",{colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],isLargeView:[4,"is-large-view"],treksToDisplay:[32]}],[1,"grw-filter",{filterType:[1,"filter-type"],filterName:[1,"filter-name"],filterNameProperty:[1,"filter-name-property"]}],[0,"grw-map",{urlLayer:[1,"url-layer"],attribution:[1],center:[1],zoom:[2],colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],colorTrekLine:[1,"color-trek-line"],colorDepartureIcon:[1,"color-departure-icon"],colorArrivalIcon:[1,"color-arrival-icon"],colorSensitiveArea:[1,"color-sensitive-area"],colorPoiIcon:[1,"color-poi-icon"],mapIsReady:[32]}],[1,"grw-trek-provider",{language:[1],api:[1],trekId:[1,"trek-id"]}],[1,"grw-treks-provider",{language:[1],api:[1],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1],routes:[1],practices:[1]}]]],["p-94f0db4d",[[1,"grw-app",{api:[1],language:[1],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1],routes:[1],practices:[1],urlLayer:[1,"url-layer"],center:[1],zoom:[2],attribution:[1],colorPrimary:[1,"color-primary"],colorPrimaryShade:[1,"color-primary-shade"],colorPrimaryTint:[1,"color-primary-tint"],colorTrekLine:[1,"color-trek-line"],colorDepartureIcon:[1,"color-departure-icon"],colorArrivalIcon:[1,"color-arrival-icon"],colorSensitiveArea:[1,"color-sensitive-area"],colorPoiIcon:[1,"color-poi-icon"],showTrek:[32],showTreksMap:[32],showTrekMap:[32],showFilters:[32],isLargeView:[32],currentTrekId:[32]},[[0,"trekCardPress","onTrekCardPress"],[9,"resize","onWindowResize"]]]]]],r)));
@@ -1 +1 @@
1
- import{r as t,h as i,H as e,c as n,g as s}from"./p-b62909db.js";import{s as o,o as r}from"./p-22562f4d.js";import{d as h,f as a,l as c,a as l,b as u,c as f}from"./p-f3f7d6be.js";const d=class{constructor(i){t(this,i),this.filters=[{property:"practices",trekProperty:"practice",type:"include"},{property:"difficulties",trekProperty:"difficulty",type:"include"},{property:"durations",trekProperty:"duration",type:"interval"}]}handleFilter(t,i){const e=[...o[this.filterType]];e.find((t=>t.id===i.id)).selected=!e.find((t=>t.id===i.id)).selected,o[this.filterType]=e;let n=!1,s=[];for(const t of this.filters){const i=o[t.property].filter((t=>t.selected)).map((t=>t.id));if(i.length>0)if(s.length>0)"include"===t.type?s=[...s.filter((e=>i.includes(e[t.trekProperty])))]:"interval"===t.type&&(s=[...s.filter((e=>{for(const n of i){const i=o[t.property].find((t=>t.id===n));if(e[t.trekProperty]>=i.minValue&&e[t.trekProperty]<=i.maxValue)return!0}return!1}))]);else if(n||(n=!0),"include"===t.type)s=[...o.treks.filter((e=>i.includes(e[t.trekProperty])))];else if("interval"===t.type){let e,n;for(const s of i){const i=o[t.property].find((t=>t.id===s));(isNaN(e)||i.minValue<e)&&(e=i.minValue),(isNaN(n)||i.maxValue>n)&&(n=i.maxValue)}s=[...o.treks.filter((i=>i[t.trekProperty]>=e&&i[t.trekProperty]<=n))]}}o.currentTreks=n?s:o.treks}render(){return i(e,null,i("div",{class:"filter-name"},this.filterName),i("div",{class:"filter-button-container"},o[this.filterType].map((t=>i("div",{onClick:i=>this.handleFilter(i,t),class:t.selected?"selected-filter-button":"filter-button"},t[this.filterNameProperty])))))}};d.style=".filter-name{margin-left:8px;color:var(--color-primary);font-size:24px;font-weight:bold}.filter-button-container{display:flex;flex-direction:row;flex-wrap:wrap}.filter-button-container .filter-button,.filter-button-container .selected-filter-button{user-select:none;cursor:pointer;border:1px var(--color-primary) solid;border-radius:8px;margin:8px 0px 0px 8px;padding:8px}.filter-button-container .filter-button{color:var(--color-primary);background-color:#ffffff}.filter-button-container .selected-filter-button{color:#ffffff;background-color:var(--color-primary)}","undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var p,v=(function(t){function i(t){var i,e,n,s;for(e=1,n=arguments.length;e<n;e++)for(i in s=arguments[e])t[i]=s[i];return t}var e=Object.create||function(){function t(){}return function(i){return t.prototype=i,new t}}();function n(t,i){var e=Array.prototype.slice;if(t.bind)return t.bind.apply(t,e.call(arguments,1));var n=e.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(e.call(arguments)):arguments)}}var s=0;function o(t){return"_leaflet_id"in t||(t._leaflet_id=++s),t._leaflet_id}function r(t,i,e){var n,s,o,r;return r=function(){n=!1,s&&(o.apply(e,s),s=!1)},o=function(){n?s=arguments:(t.apply(e,arguments),setTimeout(r,i),n=!0)}}function h(t,i,e){var n=i[1],s=i[0],o=n-s;return t===n&&e?t:((t-s)%o+o)%o+s}function a(){return!1}function c(t,i){if(!1===i)return t;var e=Math.pow(10,void 0===i?6:i);return Math.round(t*e)/e}function l(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function u(t){return l(t).split(/\s+/)}function f(t,i){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?e(t.options):{}),i)t.options[n]=i[n];return t.options}function d(t,i,e){var n=[];for(var s in t)n.push(encodeURIComponent(e?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")}var p=/\{ *([\w_ -]+) *\}/g;function v(t,i){return t.replace(p,(function(t,e){var n=i[e];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(i)),n}))}var m=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function g(t,i){for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1}var b="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function w(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var y=0;function x(t){var i=+new Date,e=Math.max(0,16-(i-y));return y=i+e,window.setTimeout(t,e)}var _=window.requestAnimationFrame||w("RequestAnimationFrame")||x,k=window.cancelAnimationFrame||w("CancelAnimationFrame")||w("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function M(t,i,e){if(!e||_!==x)return _.call(window,n(t,i));t.call(i)}function z(t){t&&k.call(window,t)}var T={__proto__:null,extend:i,create:e,bind:n,get lastId(){return s},stamp:o,throttle:r,wrapNum:h,falseFn:a,formatNum:c,trim:l,splitWords:u,setOptions:f,getParamString:d,template:v,isArray:m,indexOf:g,emptyImageUrl:b,requestFn:_,cancelFn:k,requestAnimFrame:M,cancelAnimFrame:z};function P(){}P.extend=function(t){var n=function(){f(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=n.__super__=this.prototype,o=e(s);for(var r in o.constructor=n,n.prototype=o,this)Object.prototype.hasOwnProperty.call(this,r)&&"prototype"!==r&&"__super__"!==r&&(n[r]=this[r]);return t.statics&&i(n,t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=m(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),i.apply(null,[o].concat(t.includes))),i(o,t),delete o.statics,delete o.includes,o.options&&(o.options=s.options?e(s.options):{},i(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=o._initHooks.length;t<i;t++)o._initHooks[t].call(this)}},n},P.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},P.mergeOptions=function(t){return i(this.prototype.options,t),this},P.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),e="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(e),this};var C={on:function(t,i,e){if("object"==typeof t)for(var n in t)this._on(n,t[n],i);else for(var s=0,o=(t=u(t)).length;s<o;s++)this._on(t[s],i,e);return this},off:function(t,i,e){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],i);else{t=u(t);for(var s=1===arguments.length,o=0,r=t.length;o<r;o++)s?this._off(t[o]):this._off(t[o],i,e)}else delete this._events;return this},_on:function(t,i,e){if("function"==typeof i){this._events=this._events||{};var n=this._events[t];n||(this._events[t]=n=[]),e===this&&(e=void 0);for(var s={fn:i,ctx:e},o=n,r=0,h=o.length;r<h;r++)if(o[r].fn===i&&o[r].ctx===e)return;o.push(s)}else console.warn("wrong listener type: "+typeof i)},_off:function(t,i,e){var n,s,o;if(this._events&&(n=this._events[t]))if(1!==arguments.length)if(e===this&&(e=void 0),"function"==typeof i){for(s=0,o=n.length;s<o;s++){var r=n[s];if(r.ctx===e&&r.fn===i)return this._firingCount&&(r.fn=a,this._events[t]=n=n.slice()),void n.splice(s,1)}console.warn("listener not found")}else console.warn("wrong listener type: "+typeof i);else{if(this._firingCount)for(s=0,o=n.length;s<o;s++)n[s].fn=a;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var s=i({},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 r=0,h=o.length;r<h;r++){var a=o[r];a.fn.call(a.ctx||this,s)}this._firingCount--}}return n&&this._propagateEvent(s),this},listens:function(t,i){"string"!=typeof t&&console.warn('"string" type argument expected');var e=this._events&&this._events[t];if(e&&e.length)return!0;if(i)for(var n in this._eventParents)if(this._eventParents[n].listens(t,i))return!0;return!1},once:function(t,i,e){if("object"==typeof t){for(var s in t)this.once(s,t[s],i);return this}var o=n((function(){this.off(t,i,e).off(t,o,e)}),this);return this.on(t,i,e).on(t,o,e)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[o(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[o(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};C.addEventListener=C.on,C.removeEventListener=C.clearAllEventListeners=C.off,C.addOneTimeEventListener=C.once,C.fireEvent=C.fire,C.hasEventListeners=C.listens;var A=P.extend(C);function S(t,i,e){this.x=e?Math.round(t):t,this.y=e?Math.round(i):i}var E=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function O(t,i,e){return t instanceof S?t:m(t)?new S(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new S(t.x,t.y):new S(t,i,e)}function I(t,i){if(t)for(var e=i?[t,i]:t,n=0,s=e.length;n<s;n++)this.extend(e[n])}function B(t,i){return!t||t instanceof I?t:new I(t,i)}function F(t,i){if(t)for(var e=i?[t,i]:t,n=0,s=e.length;n<s;n++)this.extend(e[n])}function j(t,i){return t instanceof F?t:new F(t,i)}function N(t,i,e){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==e&&(this.alt=+e)}function R(t,i,e){return t instanceof N?t:m(t)&&"object"!=typeof t[0]?3===t.length?new N(t[0],t[1],t[2]):2===t.length?new N(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new N(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new N(t,i,e)}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(t){return this.clone()._add(O(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(O(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new S(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new S(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=E(this.x),this.y=E(this.y),this},distanceTo:function(t){var i=(t=O(t)).x-this.x,e=t.y-this.y;return Math.sqrt(i*i+e*e)},equals:function(t){return(t=O(t)).x===this.x&&t.y===this.y},contains:function(t){return t=O(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},I.prototype={extend:function(t){return t=O(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new S((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new S(this.min.x,this.max.y)},getTopRight:function(){return new S(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 i,e;return(t="number"==typeof t[0]||t instanceof S?O(t):B(t))instanceof I?(i=t.min,e=t.max):i=e=t,i.x>=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=B(t);var i=this.min,e=this.max,n=t.min,s=t.max;return s.x>=i.x&&n.x<=e.x&&s.y>=i.y&&n.y<=e.y},overlaps:function(t){t=B(t);var i=this.min,e=this.max,n=t.min,s=t.max;return s.x>i.x&&n.x<e.x&&s.y>i.y&&n.y<e.y},isValid:function(){return!(!this.min||!this.max)}},F.prototype={extend:function(t){var i,e,n=this._southWest,s=this._northEast;if(t instanceof N)i=t,e=t;else{if(!(t instanceof F))return t?this.extend(R(t)||j(t)):this;if(e=t._northEast,!(i=t._southWest)||!e)return this}return n||s?(n.lat=Math.min(i.lat,n.lat),n.lng=Math.min(i.lng,n.lng),s.lat=Math.max(e.lat,s.lat),s.lng=Math.max(e.lng,s.lng)):(this._southWest=new N(i.lat,i.lng),this._northEast=new N(e.lat,e.lng)),this},pad:function(t){var i=this._southWest,e=this._northEast,n=Math.abs(i.lat-e.lat)*t,s=Math.abs(i.lng-e.lng)*t;return new F(new N(i.lat-n,i.lng-s),new N(e.lat+n,e.lng+s))},getCenter:function(){return new N((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 N(this.getNorth(),this.getWest())},getSouthEast:function(){return new N(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof N||"lat"in t?R(t):j(t);var i,e,n=this._southWest,s=this._northEast;return t instanceof F?(i=t.getSouthWest(),e=t.getNorthEast()):i=e=t,i.lat>=n.lat&&e.lat<=s.lat&&i.lng>=n.lng&&e.lng<=s.lng},intersects:function(t){t=j(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),s=t.getNorthEast();return s.lat>=i.lat&&n.lat<=e.lat&&s.lng>=i.lng&&n.lng<=e.lng},overlaps:function(t){t=j(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),s=t.getNorthEast();return s.lat>i.lat&&n.lat<e.lat&&s.lng>i.lng&&n.lng<e.lng},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=j(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}},N.prototype={equals:function(t,i){return!!t&&(t=R(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===i?1e-9:i))},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return H.distance(this,R(t))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,e=i/Math.cos(Math.PI/180*this.lat);return j([this.lat-i,this.lng-e],[this.lat+i,this.lng+e])},clone:function(){return new N(this.lat,this.lng,this.alt)}};var Z,D={latLngToPoint:function(t,i){var e=this.projection.project(t),n=this.scale(i);return this.transformation._transform(e,n)},pointToLatLng:function(t,i){var e=this.scale(i),n=this.transformation.untransform(t,e);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 i=this.projection.bounds,e=this.scale(t);return new I(this.transformation.transform(i.min,e),this.transformation.transform(i.max,e))},infinite:!1,wrapLatLng:function(t){var i=this.wrapLng?h(t.lng,this.wrapLng,!0):t.lng;return new N(this.wrapLat?h(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),e=this.wrapLatLng(i),n=i.lat-e.lat,s=i.lng-e.lng;if(0===n&&0===s)return t;var o=t.getSouthWest(),r=t.getNorthEast();return new F(new N(o.lat-n,o.lng-s),new N(r.lat-n,r.lng-s))}},H=i({},D,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var e=Math.PI/180,n=t.lat*e,s=i.lat*e,o=Math.sin((i.lat-t.lat)*e/2),r=Math.sin((i.lng-t.lng)*e/2),h=o*o+Math.cos(n)*Math.cos(s)*r*r,a=2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h));return this.R*a}}),$=6378137,U={R:$,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,e=this.MAX_LATITUDE,n=Math.max(Math.min(e,t.lat),-e),s=Math.sin(n*i);return new S(this.R*t.lng*i,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var i=180/Math.PI;return new N((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:(Z=$*Math.PI,new I([-Z,-Z],[Z,Z]))};function W(t,i,e,n){if(m(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=i,this._c=e,this._d=n}function V(t,i,e,n){return new W(t,i,e,n)}W.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){return t.x=(i=i||1)*(this._a*t.x+this._b),t.y=i*(this._c*t.y+this._d),t},untransform:function(t,i){return new S((t.x/(i=i||1)-this._b)/this._a,(t.y/i-this._d)/this._c)}};var G=i({},H,{code:"EPSG:3857",projection:U,transformation:function(){var t=.5/(Math.PI*U.R);return V(t,.5,-t,.5)}()}),q=i({},G,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function J(t,i){var e,n,s,o,r,h,a="";for(e=0,s=t.length;e<s;e++){for(n=0,o=(r=t[e]).length;n<o;n++)a+=(n?"L":"M")+(h=r[n]).x+" "+h.y;a+=i?Ot.svg?"z":"x":""}return a||"M0 0"}var K,Q=document.documentElement.style,Y="ActiveXObject"in window,tt=Y&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),et=Et("webkit"),nt=Et("android"),st=Et("android 2")||Et("android 3"),ot=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),rt=nt&&Et("Google")&&ot<537&&!("AudioNode"in window),ht=!!window.opera,at=!it&&Et("chrome"),ct=Et("gecko")&&!et&&!ht&&!Y,lt=!at&&Et("safari"),ut=Et("phantom"),ft="OTransition"in Q,dt=0===navigator.platform.indexOf("Win"),pt=Y&&"transition"in Q,vt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!st,mt="MozPerspective"in Q,gt=!window.L_DISABLE_3D&&(pt||vt||mt)&&!ft&&!ut,bt="undefined"!=typeof orientation||Et("mobile"),wt=bt&&et,yt=bt&&vt,xt=!window.PointerEvent&&window.MSPointerEvent,_t=!(!window.PointerEvent&&!xt),kt="ontouchstart"in window||!!window.TouchEvent,Mt=!window.L_NO_TOUCH&&(kt||_t),zt=bt&&ht,Tt=bt&&ct,Pt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Lt=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",a,i),window.removeEventListener("testPassiveEventSupport",a,i)}catch(t){}return t}(),Ct=!!document.createElement("canvas").getContext,At=!(!document.createElementNS||!X("svg").createSVGRect),St=!!At&&((K=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(K.firstChild&&K.firstChild.namespaceURI));function Et(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Ot={ie:Y,ielt9:tt,edge:it,webkit:et,android:nt,android23:st,androidStock:rt,opera:ht,chrome:at,gecko:ct,safari:lt,phantom:ut,opera12:ft,win:dt,ie3d:pt,webkit3d:vt,gecko3d:mt,any3d:gt,mobile:bt,mobileWebkit:wt,mobileWebkit3d:yt,msPointer:xt,pointer:_t,touch:Mt,touchNative:kt,mobileOpera:zt,mobileGecko:Tt,retina:Pt,passiveEvents:Lt,canvas:Ct,svg:At,vml:!At&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}(),inlineSvg:St},It=Ot.msPointer?"MSPointerDown":"pointerdown",Bt=Ot.msPointer?"MSPointerMove":"pointermove",Ft=Ot.msPointer?"MSPointerUp":"pointerup",jt=Ot.msPointer?"MSPointerCancel":"pointercancel",Nt={touchstart:It,touchmove:Bt,touchend:Ft,touchcancel:jt},Rt={touchstart:function(t,i){i.MSPOINTER_TYPE_TOUCH&&i.pointerType===i.MSPOINTER_TYPE_TOUCH&&Fi(i),Vt(t,i)},touchmove:Vt,touchend:Vt,touchcancel:Vt},Zt={},Dt=!1;function Ht(t,i,e){return"touchstart"===i&&(Dt||(document.addEventListener(It,$t,!0),document.addEventListener(Bt,Ut,!0),document.addEventListener(Ft,Wt,!0),document.addEventListener(jt,Wt,!0),Dt=!0)),Rt[i]?(e=Rt[i].bind(this,e),t.addEventListener(Nt[i],e,!1),e):(console.warn("wrong event specified:",i),L.Util.falseFn)}function $t(t){Zt[t.pointerId]=t}function Ut(t){Zt[t.pointerId]&&(Zt[t.pointerId]=t)}function Wt(t){delete Zt[t.pointerId]}function Vt(t,i){if(i.pointerType!==(i.MSPOINTER_TYPE_MOUSE||"mouse")){for(var e in i.touches=[],Zt)i.touches.push(Zt[e]);i.changedTouches=[i],t(i)}}var Gt,qt,Xt,Jt,Kt,Qt=pi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Yt=pi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ti="webkitTransition"===Yt||"OTransition"===Yt?Yt+"End":"transitionend";function ii(t){return"string"==typeof t?document.getElementById(t):t}function ei(t,i){var e=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!e||"auto"===e)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);e=n?n[i]:null}return"auto"===e?null:e}function ni(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function si(t){var i=t.parentNode;i&&i.removeChild(t)}function oi(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ri(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function hi(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function ai(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=fi(t);return e.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function ci(t,i){if(void 0!==t.classList)for(var e=u(i),n=0,s=e.length;n<s;n++)t.classList.add(e[n]);else if(!ai(t,i)){var o=fi(t);ui(t,(o?o+" ":"")+i)}}function li(t,i){void 0!==t.classList?t.classList.remove(i):ui(t,l((" "+fi(t)+" ").replace(" "+i+" "," ")))}function ui(t,i){void 0===t.className.baseVal?t.className=i:t.className.baseVal=i}function fi(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function di(t,i){"opacity"in t.style?t.style.opacity=i:"filter"in t.style&&function(t,i){var e=!1,n="DXImageTransform.Microsoft.Alpha";try{e=t.filters.item(n)}catch(t){if(1===i)return}i=Math.round(100*i),e?(e.Enabled=100!==i,e.Opacity=i):t.style.filter+=" progid:"+n+"(opacity="+i+")"}(t,i)}function pi(t){for(var i=document.documentElement.style,e=0;e<t.length;e++)if(t[e]in i)return t[e];return!1}function vi(t,i,e){var n=i||new S(0,0);t.style[Qt]=(Ot.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")}function mi(t,i){t._leaflet_pos=i,Ot.any3d?vi(t,i):(t.style.left=i.x+"px",t.style.top=i.y+"px")}function gi(t){return t._leaflet_pos||new S(0,0)}if("onselectstart"in document)Gt=function(){Ti(window,"selectstart",Fi)},qt=function(){Li(window,"selectstart",Fi)};else{var bi=pi(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Gt=function(){if(bi){var t=document.documentElement.style;Xt=t[bi],t[bi]="none"}},qt=function(){bi&&(document.documentElement.style[bi]=Xt,Xt=void 0)}}function wi(){Ti(window,"dragstart",Fi)}function yi(){Li(window,"dragstart",Fi)}function xi(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(_i(),Jt=t,Kt=t.style.outline,t.style.outline="none",Ti(window,"keydown",_i))}function _i(){Jt&&(Jt.style.outline=Kt,Jt=void 0,Kt=void 0,Li(window,"keydown",_i))}function ki(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Mi(t){var i=t.getBoundingClientRect();return{x:i.width/t.offsetWidth||1,y:i.height/t.offsetHeight||1,boundingClientRect:i}}var zi={__proto__:null,TRANSFORM:Qt,TRANSITION:Yt,TRANSITION_END:ti,get:ii,getStyle:ei,create:ni,remove:si,empty:oi,toFront:ri,toBack:hi,hasClass:ai,addClass:ci,removeClass:li,setClass:ui,getClass:fi,setOpacity:di,testProp:pi,setTransform:vi,setPosition:mi,getPosition:gi,get disableTextSelection(){return Gt},get enableTextSelection(){return qt},disableImageDrag:wi,enableImageDrag:yi,preventOutline:xi,restoreOutline:_i,getSizedParentNode:ki,getScale:Mi};function Ti(t,i,e,n){if(i&&"object"==typeof i)for(var s in i)Si(t,s,i[s],e);else for(var o=0,r=(i=u(i)).length;o<r;o++)Si(t,i[o],e,n);return this}var Pi="_leaflet_events";function Li(t,i,e,n){if(1===arguments.length)Ci(t),delete t[Pi];else if(i&&"object"==typeof i)for(var s in i)Ei(t,s,i[s],e);else if(i=u(i),2===arguments.length)Ci(t,(function(t){return-1!==g(i,t)}));else for(var o=0,r=i.length;o<r;o++)Ei(t,i[o],e,n);return this}function Ci(t,i){for(var e in t[Pi]){var n=e.split(/\d/)[0];i&&!i(n)||Ei(t,n,null,null,e)}}var Ai={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Si(t,i,e,n){var s=i+o(e)+(n?"_"+o(n):"");if(t[Pi]&&t[Pi][s])return this;var r=function(i){return e.call(n||t,i||window.event)},h=r;!Ot.touchNative&&Ot.pointer&&0===i.indexOf("touch")?r=Ht(t,i,r):Ot.touch&&"dblclick"===i?r=function(t,i){t.addEventListener("dblclick",i);var e,n=0;function s(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var s=Date.now();s-n<=200?2==++e&&i(function(t){var i,e,n={};for(e in t)n[e]=(i=t[e])&&i.bind?i.bind(t):i;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):e=1,n=s}}else e=t.detail}return t.addEventListener("click",s),{dblclick:i,simDblclick:s}}(t,r):"addEventListener"in t?"touchstart"===i||"touchmove"===i||"wheel"===i||"mousewheel"===i?t.addEventListener(Ai[i]||i,r,!!Ot.passiveEvents&&{passive:!1}):"mouseenter"===i||"mouseleave"===i?t.addEventListener(Ai[i],r=function(i){i=i||window.event,Di(t,i)&&h(i)},!1):t.addEventListener(i,h,!1):t.attachEvent("on"+i,r),t[Pi]=t[Pi]||{},t[Pi][s]=r}function Ei(t,i,e,n,s){s=s||i+o(e)+(n?"_"+o(n):"");var r=t[Pi]&&t[Pi][s];if(!r)return this;!Ot.touchNative&&Ot.pointer&&0===i.indexOf("touch")?function(t,i,e){Nt[i]?t.removeEventListener(Nt[i],e,!1):console.warn("wrong event specified:",i)}(t,i,r):Ot.touch&&"dblclick"===i?function(t,i){t.removeEventListener("dblclick",i.dblclick),t.removeEventListener("click",i.simDblclick)}(t,r):"removeEventListener"in t?t.removeEventListener(Ai[i]||i,r,!1):t.detachEvent("on"+i,r),t[Pi][s]=null}function Oi(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ii(t){return Si(t,"wheel",Oi),this}function Bi(t){return Ti(t,"mousedown touchstart dblclick contextmenu",Oi),t._leaflet_disable_click=!0,this}function Fi(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function ji(t){return Fi(t),Oi(t),this}function Ni(t,i){if(!i)return new S(t.clientX,t.clientY);var e=Mi(i),n=e.boundingClientRect;return new S((t.clientX-n.left)/e.x-i.clientLeft,(t.clientY-n.top)/e.y-i.clientTop)}var Ri=Ot.win&&Ot.chrome?2*window.devicePixelRatio:Ot.gecko?window.devicePixelRatio:1;function Zi(t){return Ot.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ri:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function Di(t,i){var e=i.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(t){return!1}return e!==t}var Hi={__proto__:null,on:Ti,off:Li,stopPropagation:Oi,disableScrollPropagation:Ii,disableClickPropagation:Bi,preventDefault:Fi,stop:ji,getMousePosition:Ni,getWheelDelta:Zi,isExternalTarget:Di,addListener:Ti,removeListener:Li},$i=A.extend({run:function(t,i,e,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=gi(t),this._offset=i.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=M(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,e=1e3*this._duration;i<e?this._runFrame(this._easeOut(i/e),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){var e=this._startPos.add(this._offset.multiplyBy(t));i&&e._round(),mi(this._el,e),this.fire("step")},_complete:function(){z(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ui=A.extend({options:{crs:G,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,i){i=f(this,i),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=n(this._onResize,this),this._initEvents(),i.maxBounds&&this.setMaxBounds(i.maxBounds),void 0!==i.zoom&&(this._zoom=this._limitZoom(i.zoom)),i.center&&void 0!==i.zoom&&this.setView(R(i.center),i.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Yt&&Ot.any3d&&!Ot.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ti(this._proxy,ti,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(R(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),this)},setZoom:function(t,i){return this._loaded?this.setView(this.getCenter(),t,{zoom:i}):(this._zoom=t,this)},zoomIn:function(t,i){return this.setZoom(this._zoom+(t=t||(Ot.any3d?this.options.zoomDelta:1)),i)},zoomOut:function(t,i){return this.setZoom(this._zoom-(t=t||(Ot.any3d?this.options.zoomDelta:1)),i)},setZoomAround:function(t,i,e){var n=this.getZoomScale(i),s=this.getSize().divideBy(2),o=(t instanceof S?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/n),r=this.containerPointToLatLng(s.add(o));return this.setView(r,i,{zoom:e})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():j(t);var e=O(i.paddingTopLeft||i.padding||[0,0]),n=O(i.paddingBottomRight||i.padding||[0,0]),s=this.getBoundsZoom(t,!1,e.add(n));if((s="number"==typeof i.maxZoom?Math.min(i.maxZoom,s):s)===1/0)return{center:t.getCenter(),zoom:s};var o=n.subtract(e).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s);return{center:this.unproject(r.add(h).divideBy(2).add(o),s),zoom:s}},fitBounds:function(t,i){if(!(t=j(t)).isValid())throw new Error("Bounds are not valid.");var e=this._getBoundsCenterZoom(t,i);return this.setView(e.center,e.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){if(i=i||{},!(t=O(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==i.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new $i,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate){ci(this._mapPane,"leaflet-pan-anim");var e=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,e,i.duration||.25,i.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,i,e){if(!1===(e=e||{}).animate||!Ot.any3d)return this.setView(t,i,e);this._stop();var n=this.project(this.getCenter()),s=this.project(t),o=this.getSize(),r=this._zoom;t=R(t),i=void 0===i?r:i;var h=Math.max(o.x,o.y),a=h*this.getZoomScale(r,i),c=s.distanceTo(n)||1,l=1.42,u=2.0164;function f(t){var i=(a*a-h*h+(t?-1:1)*u*u*c*c)/(2*(t?a:h)*u*c),e=Math.sqrt(i*i+1)-i;return e<1e-9?-18:Math.log(e)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var v=f(0);function m(t){return h*(p(v)*(d(i=v+l*t)/p(i))-d(v))/u;var i}var g=Date.now(),b=(f(1)-v)/l,w=e.duration?1e3*e.duration:1e3*b*.8;return this._moveStart(!0,e.noMoveStart),function e(){var o=(Date.now()-g)/w,a=function(t){return 1-Math.pow(1-t,1.5)}(o)*b;o<=1?(this._flyToFrame=M(e,this),this._move(this.unproject(n.add(s.subtract(n).multiplyBy(m(a)/c)),r),this.getScaleZoom(h/function(t){return h*(p(v)/p(v+l*t))}(a),r),{flyTo:!0})):this._move(t,i)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,i){var e=this._getBoundsCenterZoom(t,i);return this.flyTo(e.center,e.zoom,i)},setMaxBounds:function(t){return(t=j(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var i=this.options.minZoom;return this.options.minZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var i=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,j(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e=O((i=i||{}).paddingTopLeft||i.padding||[0,0]),n=O(i.paddingBottomRight||i.padding||[0,0]),s=this.project(this.getCenter()),o=this.project(t),r=this.getPixelBounds(),h=B([r.min.add(e),r.max.subtract(n)]),a=h.getSize();if(!h.contains(o)){this._enforcingBounds=!0;var c=o.subtract(h.getCenter()),l=h.extend(o).getSize().subtract(a);s.x+=c.x<0?-l.x:l.x,s.y+=c.y<0?-l.y:l.y,this.panTo(this.unproject(s),i),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),o=e.divideBy(2).round(),r=s.divideBy(2).round(),h=o.subtract(r);return h.x||h.y?(t.animate&&t.pan?this.panBy(h):(t.pan&&this._rawPanBy(h),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(n(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:s})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=n(this._handleGeolocationResponse,this),s=n(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,s,t):navigator.geolocation.getCurrentPosition(e,s,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 i=t.code,e=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+e+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var i=new N(t.coords.latitude,t.coords.longitude),e=i.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var s=this.getBoundsZoom(e);this.setView(i,n.maxZoom?Math.min(s,n.maxZoom):s)}var o={latlng:i,bounds:e,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(o[r]=t.coords[r]);this.fire("locationfound",o)}},addHandler:function(t,i){if(!i)return this;var e=this[t]=new i(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),si(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)si(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var e=ni("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new F(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,e){t=j(t),e=O(e||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),o=this.getMaxZoom(),r=t.getNorthWest(),h=t.getSouthEast(),a=this.getSize().subtract(e),c=B(this.project(h,n),this.project(r,n)).getSize(),l=Ot.any3d?this.options.zoomSnap:1,u=a.x/c.x,f=a.y/c.y,d=i?Math.max(u,f):Math.min(u,f);return n=this.getScaleZoom(d,n),l&&(n=Math.round(n/(l/100))*(l/100),n=i?Math.ceil(n/l)*l:Math.floor(n/l)*l),Math.max(s,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new S(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var e=this._getTopLeftPoint(t,i);return new I(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs,n=e.zoom(t*e.scale(i=void 0===i?this._zoom:i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(R(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(O(t),i)},layerPointToLatLng:function(t){var i=O(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(R(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(R(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(j(t))},distance:function(t,i){return this.options.crs.distance(R(t),R(i))},containerPointToLayerPoint:function(t){return O(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return O(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(O(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(R(t)))},mouseEventToContainerPoint:function(t){return Ni(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 i=this._container=ii(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");Ti(i,"scroll",this._onScroll,this),this._containerId=o(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ot.any3d,ci(t,"leaflet-container"+(Ot.touch?" leaflet-touch":"")+(Ot.retina?" leaflet-retina":"")+(Ot.ielt9?" leaflet-oldie":"")+(Ot.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=ei(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&(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),mi(this._mapPane,new S(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ci(t.markerPane,"leaflet-zoom-hide"),ci(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i){mi(this._mapPane,new S(0,0));var e=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var n=this._zoom!==i;this._moveStart(n,!1)._move(t,i)._moveEnd(n),this.fire("viewreset"),e&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,e,n){void 0===i&&(i=this._zoom);var s=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?e&&e.pinch&&this.fire("zoom",e):((s||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){mi(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[o(this._container)]=this;var i=t?Li:Ti;i(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),Ot.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=M((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,i){for(var e,n=[],s="mouseout"===i||"mouseover"===i,r=t.target||t.srcElement,h=!1;r;){if((e=this._targets[o(r)])&&("click"===i||"preclick"===i)&&this._draggableMoved(e)){h=!0;break}if(e&&e.listens(i,!0)){if(s&&!Di(r,t))break;if(n.push(e),s)break}if(r===this._container)break;r=r.parentNode}return n.length||h||s||!this.listens(i,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var i=t.target||t.srcElement;if(!(!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i))){var e=t.type;"mousedown"===e&&xi(i),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var s=i({},t);s.type="preclick",this._fireDOMEvent(s,s.type,n)}var o=this._findEventTargets(t,e);if(n){for(var r=[],h=0;h<n.length;h++)n[h].listens(e,!0)&&r.push(n[h]);o=r.concat(o)}if(o.length){"contextmenu"===e&&Fi(t);var a=o[0],c={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var l=a.getLatLng&&(!a._radius||a._radius<=10);c.containerPoint=l?this.latLngToContainerPoint(a.getLatLng()):this.mouseEventToContainerPoint(t),c.layerPoint=this.containerPointToLayerPoint(c.containerPoint),c.latlng=l?a.getLatLng():this.layerPointToLatLng(c.layerPoint)}for(h=0;h<o.length;h++)if(o[h].fire(e,c,!0),c.originalEvent._stopped||!1===o[h].options.bubblingMouseEvents&&-1!==g(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,i=this._handlers.length;t<i;t++)this._handlers[t].disable()},whenReady:function(t,i){return this._loaded?t.call(i||this,{target:this}):this.on("load",t,i),this},_getMapPanePos:function(){return gi(this._mapPane)||new S(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,i){return(t&&void 0!==i?this._getNewPixelOrigin(t,i):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,i){var e=this.getSize()._divideBy(2);return this.project(t,i)._subtract(e)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return this.project(t,i)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return B([this.project(t.getSouthWest(),i)._subtract(n),this.project(t.getNorthWest(),i)._subtract(n),this.project(t.getSouthEast(),i)._subtract(n),this.project(t.getNorthEast(),i)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,e){if(!e)return t;var n=this.project(t,i),s=this.getSize().divideBy(2),o=new I(n.subtract(s),n.add(s)),r=this._getBoundsOffset(o,e,i);return r.round().equals([0,0])?t:this.unproject(n.add(r),i)},_limitOffset:function(t,i){if(!i)return t;var e=this.getPixelBounds(),n=new I(e.min.add(t),e.max.add(t));return t.add(this._getBoundsOffset(n,i))},_getBoundsOffset:function(t,i,e){var n=B(this.project(i.getNorthEast(),e),this.project(i.getSouthWest(),e)),s=n.min.subtract(t.min),o=n.max.subtract(t.max);return new S(this._rebound(s.x,-o.x),this._rebound(s.y,-o.y))},_rebound:function(t,i){return t+i>0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),n=Ot.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){li(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var e=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(e)||(this.panBy(e,i),0))},_createAnimProxy:function(){var t=this._proxy=ni("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var i=Qt,e=this._proxy.style[i];vi(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){si(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),i=this.getZoom();vi(this._proxy,this.project(t,i),this.getZoomScale(i,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,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(s)||(M((function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)}),this),0))},_animateZoom:function(t,i,e,s){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,ci(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:s}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(n(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&li(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}}),Wi=P.extend({options:{position:"topright"},initialize:function(t){f(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return ci(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(si(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Vi=function(t){return new Wi(t)};Ui.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},i="leaflet-",e=this._controlContainer=ni("div",i+"control-container",this._container);function n(n,s){t[n+s]=ni("div",i+n+" "+i+s,e)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)si(this._controlCorners[t]);si(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Gi=Wi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,n){return e<n?-1:n<e?1:0}},initialize:function(t,i,e){for(var n in f(this,e),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in i)this._addLayer(i[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Wi.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,i){return this._addLayer(t,i),this._map?this._update():this},addOverlay:function(t,i){return this._addLayer(t,i,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var i=this._getLayer(o(t));return i&&this._layers.splice(this._layers.indexOf(i),1),this._map?this._update():this},expand:function(){ci(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(ci(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):li(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return li(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",i=this._container=ni("div",t),e=this.options.collapsed;i.setAttribute("aria-haspopup",!0),Bi(i),Ii(i);var n=this._section=ni("section",t+"-list");e&&(this._map.on("click",this.collapse,this),Ti(i,{mouseenter:function(){Ti(n,"click",Fi),this.expand(),setTimeout((function(){Li(n,"click",Fi)}))},mouseleave:this.collapse},this));var s=this._layersLink=ni("a",t+"-toggle",i);s.href="#",s.title="Layers",s.setAttribute("role","button"),Ti(s,"click",Fi),Ti(s,"focus",this.expand,this),e||this.expand(),this._baseLayersList=ni("div",t+"-base",n),this._separator=ni("div",t+"-separator",n),this._overlaysList=ni("div",t+"-overlays",n),i.appendChild(n)},_getLayer:function(t){for(var i=0;i<this._layers.length;i++)if(this._layers[i]&&o(this._layers[i].layer)===t)return this._layers[i]},_addLayer:function(t,i,e){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:e}),this.options.sortLayers&&this._layers.sort(n((function(t,i){return this.options.sortFunction(t.layer,i.layer,t.name,i.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;oi(this._baseLayersList),oi(this._overlaysList),this._layerControlInputs=[];var t,i,e,n,s=0;for(e=0;e<this._layers.length;e++)this._addItem(n=this._layers[e]),i=i||n.overlay,t=t||!n.overlay,s+=n.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&s>1)?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(o(t.target)),e=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;e&&this._map.fire(e,i)},_createRadioElement:function(t,i){var e='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+o(this),n),this._layerControlInputs.push(i),i.layerId=o(t.layer),Ti(i,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var r=document.createElement("span");return e.appendChild(r),r.appendChild(i),r.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],s=[];this._handlingClick=!0;for(var o=e.length-1;o>=0;o--)i=this._getLayer((t=e[o]).layerId).layer,t.checked?n.push(i):t.checked||s.push(i);for(o=0;o<s.length;o++)this._map.hasLayer(s[o])&&this._map.removeLayer(s[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,i,e=this._layerControlInputs,n=this._map.getZoom(),s=e.length-1;s>=0;s--)i=this._getLayer((t=e[s]).layerId).layer,t.disabled=void 0!==i.options.minZoom&&n<i.options.minZoom||void 0!==i.options.maxZoom&&n>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}}),qi=Wi.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=ni("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,s){var o=ni("a",e,n);return o.innerHTML=t,o.href="#",o.title=i,o.setAttribute("role","button"),o.setAttribute("aria-label",i),Bi(o),Ti(o,"click",ji),Ti(o,"click",s,this),Ti(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";li(this._zoomInButton,i),li(this._zoomOutButton,i),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(ci(this._zoomOutButton,i),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(ci(this._zoomInButton,i),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ui.mergeOptions({zoomControl:!0}),Ui.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new qi,this.addControl(this.zoomControl))}));var Xi=Wi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=ni("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=ni("div",i,e)),t.imperial&&(this._iScale=ni("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t);this._updateScale(this._mScale,i<1e3?i+" m":i/1e3+" km",i/t)},_updateImperial:function(t){var i,e,n,s=3.2808399*t;s>5280?(e=this._getRoundNum(i=s/5280),this._updateScale(this._iScale,e+" mi",e/i)):(n=this._getRoundNum(s),this._updateScale(this._iScale,n+" ft",n/s))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),e=t/i;return i*(e>=10?10:e>=5?5:e>=3?3:e>=2?2:1)}}),Ji=Wi.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ot.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var i in t.attributionControl=this,this._container=ni("div","leaflet-control-attribution"),Bi(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' <span aria-hidden="true">|</span> ')}}});Ui.mergeOptions({attributionControl:!0}),Ui.addInitHook((function(){this.options.attributionControl&&(new Ji).addTo(this)})),Wi.Layers=Gi,Wi.Zoom=qi,Wi.Scale=Xi,Wi.Attribution=Ji,Vi.layers=function(t,i,e){return new Gi(t,i,e)},Vi.zoom=function(t){return new qi(t)},Vi.scale=function(t){return new Xi(t)},Vi.attribution=function(t){return new Ji(t)};var Ki=P.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ki.addTo=function(t,i){return t.addHandler(i,this),this};var Qi,Yi={Events:C},te=Ot.touch?"touchstart mousedown":"mousedown",ie=A.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){f(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(Ti(this._dragStartTarget,te,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ie._dragging===this&&this.finishDrag(!0),Li(this._dragStartTarget,te,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ai(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)ie._dragging===this&&this.finishDrag();else if(!(ie._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(ie._dragging=this,this._preventOutline&&xi(this._element),wi(),Gt(),this._moving))){this.fire("down");var i=t.touches?t.touches[0]:t,e=ki(this._element);this._startPoint=new S(i.clientX,i.clientY),this._startPos=gi(this._element),this._parentScale=Mi(e);var n="mousedown"===t.type;Ti(document,n?"mousemove":"touchmove",this._onMove,this),Ti(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var i=t.touches&&1===t.touches.length?t.touches[0]:t,e=new S(i.clientX,i.clientY)._subtract(this._startPoint);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,Fi(t),this._moved||(this.fire("dragstart"),this._moved=!0,ci(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ci(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),mi(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){li(document.body,"leaflet-dragging"),this._lastTarget&&(li(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Li(document,"mousemove touchmove",this._onMove,this),Li(document,"mouseup touchend touchcancel",this._onUp,this),yi(),qt(),this._moved&&this._moving&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)}),this._moving=!1,ie._dragging=!1}});function ee(t,i){if(!i||!t.length)return t.slice();var e=i*i;return function(t,i){var e=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(e);n[0]=n[e-1]=1,se(t,n,i,0,e-1);var s,o=[];for(s=0;s<e;s++)n[s]&&o.push(t[s]);return o}(t=function(t,i){for(var e=[t[0]],n=1,s=0,o=t.length;n<o;n++)ae(t[n],t[s])>i&&(e.push(t[n]),s=n);return s<o-1&&e.push(t[o-1]),e}(t,e),e)}function ne(t,i,e){return Math.sqrt(ce(t,i,e,!0))}function se(t,i,e,n,s){var o,r,h,a=0;for(r=n+1;r<=s-1;r++)(h=ce(t[r],t[n],t[s],!0))>a&&(o=r,a=h);a>e&&(i[o]=1,se(t,i,e,n,o),se(t,i,e,o,s))}function oe(t,i,e,n,s){var o,r,h,a=n?Qi:he(t,e),c=he(i,e);for(Qi=c;;){if(!(a|c))return[t,i];if(a&c)return!1;h=he(r=re(t,i,o=a||c,e,s),e),o===a?(t=r,a=h):(i=r,c=h)}}function re(t,i,e,n,s){var o,r,h=i.x-t.x,a=i.y-t.y,c=n.min,l=n.max;return 8&e?(o=t.x+h*(l.y-t.y)/a,r=l.y):4&e?(o=t.x+h*(c.y-t.y)/a,r=c.y):2&e?(o=l.x,r=t.y+a*(l.x-t.x)/h):1&e&&(o=c.x,r=t.y+a*(c.x-t.x)/h),new S(o,r,s)}function he(t,i){var e=0;return t.x<i.min.x?e|=1:t.x>i.max.x&&(e|=2),t.y<i.min.y?e|=4:t.y>i.max.y&&(e|=8),e}function ae(t,i){var e=i.x-t.x,n=i.y-t.y;return e*e+n*n}function ce(t,i,e,n){var s,o=i.x,r=i.y,h=e.x-o,a=e.y-r,c=h*h+a*a;return c>0&&((s=((t.x-o)*h+(t.y-r)*a)/c)>1?(o=e.x,r=e.y):s>0&&(o+=h*s,r+=a*s)),h=t.x-o,a=t.y-r,n?h*h+a*a:new S(o,r)}function le(t){return!m(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function ue(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),le(t)}var fe={__proto__:null,simplify:ee,pointToSegmentDistance:ne,closestPointOnSegment:function(t,i,e){return ce(t,i,e)},clipSegment:oe,_getEdgeIntersection:re,_getBitCode:he,_sqClosestPointOnSegment:ce,isFlat:le,_flat:ue};function de(t,i,e){var n,s,o,r,h,a,c,l,u,f=[1,4,2,8];for(s=0,c=t.length;s<c;s++)t[s]._code=he(t[s],i);for(r=0;r<4;r++){for(l=f[r],n=[],s=0,o=(c=t.length)-1;s<c;o=s++)a=t[o],(h=t[s])._code&l?a._code&l||((u=re(a,h,l,i,e))._code=he(u,i),n.push(u)):(a._code&l&&((u=re(a,h,l,i,e))._code=he(u,i),n.push(u)),n.push(h));t=n}return t}var pe={__proto__:null,clipPolygon:de},ve={project:function(t){return new S(t.lng,t.lat)},unproject:function(t){return new N(t.y,t.x)},bounds:new I([-180,-90],[180,90])},me={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,e=this.R,n=t.lat*i,s=this.R_MINOR/e,o=Math.sqrt(1-s*s),r=o*Math.sin(n),h=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),o/2);return n=-e*Math.log(Math.max(h,1e-10)),new S(t.lng*i*e,n)},unproject:function(t){for(var i,e=180/Math.PI,n=this.R,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),r=Math.exp(-t.y/n),h=Math.PI/2-2*Math.atan(r),a=0,c=.1;a<15&&Math.abs(c)>1e-7;a++)i=o*Math.sin(h),i=Math.pow((1-i)/(1+i),o/2),h+=c=Math.PI/2-2*Math.atan(r*i)-h;return new N(h*e,t.x*e/n)}},ge={__proto__:null,LonLat:ve,Mercator:me,SphericalMercator:U},be=i({},H,{code:"EPSG:3395",projection:me,transformation:function(){var t=.5/(Math.PI*me.R);return V(t,.5,-t,.5)}()}),we=i({},H,{code:"EPSG:4326",projection:ve,transformation:V(1/180,1,-1/180,.5)}),ye=i({},D,{projection:ve,transformation:V(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(e*e+n*n)},infinite:!0});D.Earth=H,D.EPSG3395=be,D.EPSG3857=G,D.EPSG900913=q,D.EPSG4326=we,D.Simple=ye;var xe=A.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[o(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[o(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i=t.target;if(i.hasLayer(this)){if(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents){var e=this.getEvents();i.on(e,this),this.once("remove",(function(){i.off(e,this)}),this)}this.onAdd(i),this.fire("add"),i.fire("layeradd",{layer:this})}}});Ui.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=o(t);return this._layers[i]||(this._layers[i]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var i=o(t);return this._layers[i]?(this._loaded&&t.onRemove(this),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return o(t)in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){for(var i=0,e=(t=t?m(t)?t:[t]:[]).length;i<e;i++)this.addLayer(t[i])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[o(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var i=o(t);this._zoomBoundLayers[i]&&(delete this._zoomBoundLayers[i],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,i=-1/0,e=this._getZoomSpan();for(var n in this._zoomBoundLayers){var s=this._zoomBoundLayers[n].options;t=void 0===s.minZoom?t:Math.min(t,s.minZoom),i=void 0===s.maxZoom?i:Math.max(i,s.maxZoom)}this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=t===1/0?void 0:t,e!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var _e=xe.extend({initialize:function(t,i){var e,n;if(f(this,i),this._layers={},t)for(e=0,n=t.length;e<n;e++)this.addLayer(t[e])},addLayer:function(t){var i=this.getLayerId(t);return this._layers[i]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var i=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[i]&&this._map.removeLayer(this._layers[i]),delete this._layers[i],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var i,e,n=Array.prototype.slice.call(arguments,1);for(i in this._layers)(e=this._layers[i])[t]&&e[t].apply(e,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o(t)}}),ke=_e.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),_e.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),_e.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new F;for(var i in this._layers){var e=this._layers[i];t.extend(e.getBounds?e.getBounds():e.getLatLng())}return t}}),Me=P.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){f(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,i){var e=this._getIconUrl(t);if(!e){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(e,i&&"IMG"===i.tagName?i:null);return this._setIconStyles(n,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n},_setIconStyles:function(t,i){var e=this.options,n=e[i+"Size"];"number"==typeof n&&(n=[n,n]);var s=O(n),o=O("shadow"===i&&e.shadowAnchor||e.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+i+" "+(e.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return(i=i||document.createElement("img")).src=t,i},_getIconUrl:function(t){return Ot.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),ze=Me.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof ze.imagePath&&(ze.imagePath=this._detectIconPath()),(this.options.imagePath||ze.imagePath)+Me.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var i=function(t,i,e){var n=i.exec(t);return n&&n[e]};return(t=i(t,/^url\((['"])?(.+)\1\)$/,2))&&i(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=ni("div","leaflet-default-icon-path",document.body),i=ei(t,"background-image")||ei(t,"backgroundImage");if(document.body.removeChild(t),i=this._stripUrl(i))return i;var e=document.querySelector('link[href$="leaflet.css"]');return e?e.href.substring(0,e.href.length-"leaflet.css".length-1):""}}),Te=Ki.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ie(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ci(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&li(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var i=this._marker,e=i._map,n=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,o=gi(i._icon),r=e.getPixelBounds(),h=e.getPixelOrigin(),a=B(r.min._subtract(h).add(s),r.max._subtract(h).subtract(s));if(!a.contains(o)){var c=O((Math.max(a.max.x,o.x)-a.max.x)/(r.max.x-a.max.x)-(Math.min(a.min.x,o.x)-a.min.x)/(r.min.x-a.min.x),(Math.max(a.max.y,o.y)-a.max.y)/(r.max.y-a.max.y)-(Math.min(a.min.y,o.y)-a.min.y)/(r.min.y-a.min.y)).multiplyBy(n);e.panBy(c,{animate:!1}),this._draggable._newPos._add(c),this._draggable._startPos._add(c),mi(i._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=M(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(z(this._panRequest),this._panRequest=M(this._adjustPan.bind(this,t)))},_onDrag:function(t){var i=this._marker,e=i._shadow,n=gi(i._icon),s=i._map.layerPointToLatLng(n);e&&mi(e,n),i._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,i.fire("move",t).fire("drag",t)},_onDragEnd:function(t){z(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Pe=xe.extend({options:{icon:new ze,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,i){f(this,i),this._latlng=R(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var i=this._latlng;return this._latlng=R(t),this.update(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),e=t.icon.createIcon(this._icon),n=!1;e!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(e.title=t.title),"IMG"===e.tagName&&(e.alt=t.alt||"")),ci(e,i),t.keyboard&&(e.tabIndex="0",e.setAttribute("role","button")),this._icon=e,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ti(e,"focus",this._panOnFocus,this);var s=t.icon.createShadow(this._shadow),o=!1;s!==this._shadow&&(this._removeShadow(),o=!0),s&&(ci(s,i),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Li(this._icon,"focus",this._panOnFocus,this),si(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&si(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&mi(this._icon,t),this._shadow&&mi(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(i)},_initInteraction:function(){if(this.options.interactive&&(ci(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Te)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Te(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&di(this._icon,t),this._shadow&&di(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var i=this.options.icon.options,e=i.iconSize?O(i.iconSize):O(0,0),n=i.iconAnchor?O(i.iconAnchor):O(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:e.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Le=xe.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return f(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Ce=Le.extend({options:{fill:!0,radius:10},initialize:function(t,i){f(this,i),this._latlng=R(t),this._radius=this.options.radius},setLatLng:function(t){var i=this._latlng;return this._latlng=R(t),this.redraw(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var i=t&&t.radius||this._radius;return Le.prototype.setStyle.call(this,t),this.setRadius(i),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,i=this._radiusY||t,e=this._clickTolerance(),n=[t+e,i+e];this._pxBounds=new I(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Ae=Ce.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),f(this,e),this._latlng=R(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new F(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Le.prototype.setStyle,_project:function(){var t=this._latlng.lng,i=this._latlng.lat,e=this._map,n=e.options.crs;if(n.distance===H.distance){var s=Math.PI/180,o=this._mRadius/H.R/s,r=e.project([i+o,t]),h=e.project([i-o,t]),a=r.add(h).divideBy(2),c=e.unproject(a).lat,l=Math.acos((Math.cos(o*s)-Math.sin(i*s)*Math.sin(c*s))/(Math.cos(i*s)*Math.cos(c*s)))/s;(isNaN(l)||0===l)&&(l=o/Math.cos(Math.PI/180*i)),this._point=a.subtract(e.getPixelOrigin()),this._radius=isNaN(l)?0:a.x-e.project([c,t-l]).x,this._radiusY=a.y-r.y}else{var u=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=e.latLngToLayerPoint(this._latlng),this._radius=this._point.x-e.latLngToLayerPoint(u).x}this._updateBounds()}}),Se=Le.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,i){f(this,i),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var i,e,n=1/0,s=null,o=ce,r=0,h=this._parts.length;r<h;r++)for(var a=this._parts[r],c=1,l=a.length;c<l;c++){var u=o(t,i=a[c-1],e=a[c],!0);u<n&&(n=u,s=o(t,i,e))}return s&&(s.distance=Math.sqrt(n)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,s,o,r,h=this._rings[0],a=h.length;if(!a)return null;for(t=0,i=0;t<a-1;t++)i+=h[t].distanceTo(h[t+1])/2;if(0===i)return this._map.layerPointToLatLng(h[0]);for(t=0,n=0;t<a-1;t++)if((n+=e=(s=h[t]).distanceTo(o=h[t+1]))>i)return this._map.layerPointToLatLng([o.x-(r=(n-i)/e)*(o.x-s.x),o.y-r*(o.y-s.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=R(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new F,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return le(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],e=le(t),n=0,s=t.length;n<s;n++)e?(i[n]=R(t[n]),this._bounds.extend(i[n])):i[n]=this._convertLatLngs(t[n]);return i},_project:function(){var t=new I;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),i=new S(t,t);this._rawPxBounds&&(this._pxBounds=new I([this._rawPxBounds.min.subtract(i),this._rawPxBounds.max.add(i)]))},_projectLatlngs:function(t,i,e){var n,s,o=t.length;if(t[0]instanceof N){for(s=[],n=0;n<o;n++)s[n]=this._map.latLngToLayerPoint(t[n]),e.extend(s[n]);i.push(s)}else for(n=0;n<o;n++)this._projectLatlngs(t[n],i,e)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var i,e,n,s,o,r,h,a=this._parts;for(i=0,n=0,s=this._rings.length;i<s;i++)for(e=0,o=(h=this._rings[i]).length;e<o-1;e++)(r=oe(h[e],h[e+1],t,e,!0))&&(a[n]=a[n]||[],a[n].push(r[0]),r[1]===h[e+1]&&e!==o-2||(a[n].push(r[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,e=0,n=t.length;e<n;e++)t[e]=ee(t[e],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var e,n,s,o,r,h,a=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(e=0,o=this._parts.length;e<o;e++)for(n=0,s=(r=(h=this._parts[e]).length)-1;n<r;s=n++)if((i||0!==n)&&ne(t,h[s],h[n])<=a)return!0;return!1}});Se._flat=ue;var Ee=Se.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,s,o,r,h,a=this._rings[0],c=a.length;if(!c)return null;for(o=r=h=0,t=0,i=c-1;t<c;i=t++)r+=((e=a[t]).x+(n=a[i]).x)*(s=e.y*n.x-n.y*e.x),h+=(e.y+n.y)*s,o+=3*s;return this._map.layerPointToLatLng(0===o?a[0]:[r/o,h/o])},_convertLatLngs:function(t){var i=Se.prototype._convertLatLngs.call(this,t),e=i.length;return e>=2&&i[0]instanceof N&&i[0].equals(i[e-1])&&i.pop(),i},_setLatLngs:function(t){Se.prototype._setLatLngs.call(this,t),le(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return le(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,e=new S(i,i);if(t=new I(t.min.subtract(e),t.max.add(e)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,s=0,o=this._rings.length;s<o;s++)(n=de(this._rings[s],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,e,n,s,o,r,h,a,c=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,h=this._parts.length;s<h;s++)for(o=0,r=(a=(i=this._parts[s]).length)-1;o<a;r=o++)(e=i[o]).y>t.y!=(n=i[r]).y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(c=!c);return c||Se.prototype._containsPoint.call(this,t,!0)}}),Oe=ke.extend({initialize:function(t,i){f(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,s=m(t)?t:t.features;if(s){for(i=0,e=s.length;i<e;i++)((n=s[i]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var r=Ie(t,o);return r?(r.feature=De(t),r.defaultOptions=r.options,this.resetStyle(r),o.onEachFeature&&o.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(i){this._setLayerStyle(i,t)}),this)},_setLayerStyle:function(t,i){t.setStyle&&("function"==typeof i&&(i=i(t.feature)),t.setStyle(i))}});function Ie(t,i){var e,n,s,o,r="Feature"===t.type?t.geometry:t,h=r?r.coordinates:null,a=[],c=i&&i.pointToLayer,l=i&&i.coordsToLatLng||Fe;if(!h&&!r)return null;switch(r.type){case"Point":return Be(c,t,e=l(h),i);case"MultiPoint":for(s=0,o=h.length;s<o;s++)e=l(h[s]),a.push(Be(c,t,e,i));return new ke(a);case"LineString":case"MultiLineString":return n=je(h,"LineString"===r.type?0:1,l),new Se(n,i);case"Polygon":case"MultiPolygon":return n=je(h,"Polygon"===r.type?1:2,l),new Ee(n,i);case"GeometryCollection":for(s=0,o=r.geometries.length;s<o;s++){var u=Ie({geometry:r.geometries[s],type:"Feature",properties:t.properties},i);u&&a.push(u)}return new ke(a);default:throw new Error("Invalid GeoJSON object.")}}function Be(t,i,e,n){return t?t(i,e):new Pe(e,n&&n.markersInheritOptions&&n)}function Fe(t){return new N(t[1],t[0],t[2])}function je(t,i,e){for(var n,s=[],o=0,r=t.length;o<r;o++)n=i?je(t[o],i-1,e):(e||Fe)(t[o]),s.push(n);return s}function Ne(t,i){return void 0!==(t=R(t)).alt?[c(t.lng,i),c(t.lat,i),c(t.alt,i)]:[c(t.lng,i),c(t.lat,i)]}function Re(t,i,e,n){for(var s=[],o=0,r=t.length;o<r;o++)s.push(i?Re(t[o],i-1,e,n):Ne(t[o],n));return!i&&e&&s.push(s[0]),s}function Ze(t,e){return t.feature?i({},t.feature,{geometry:e}):De(e)}function De(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var He={toGeoJSON:function(t){return Ze(this,{type:"Point",coordinates:Ne(this.getLatLng(),t)})}};function $e(t,i){return new Oe(t,i)}Pe.include(He),Ae.include(He),Ce.include(He),Se.include({toGeoJSON:function(t){var i=!le(this._latlngs);return Ze(this,{type:(i?"Multi":"")+"LineString",coordinates:Re(this._latlngs,i?1:0,!1,t)})}}),Ee.include({toGeoJSON:function(t){var i=!le(this._latlngs),e=i&&!le(this._latlngs[0]),n=Re(this._latlngs,e?2:i?1:0,!0,t);return i||(n=[n]),Ze(this,{type:(e?"Multi":"")+"Polygon",coordinates:n})}}),_e.include({toMultiPoint:function(t){var i=[];return this.eachLayer((function(e){i.push(e.toGeoJSON(t).geometry.coordinates)})),Ze(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(t){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===i)return this.toMultiPoint(t);var e="GeometryCollection"===i,n=[];return this.eachLayer((function(i){if(i.toGeoJSON){var s=i.toGeoJSON(t);if(e)n.push(s.geometry);else{var o=De(s);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}})),e?Ze(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Ue=$e,We=xe.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,e){this._url=t,this._bounds=j(i),f(this,e)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ci(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){si(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ri(this._image),this},bringToBack:function(){return this._map&&hi(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=j(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,i=this._image=t?this._url:ni("img");ci(i,"leaflet-image-layer"),this._zoomAnimated&&ci(i,"leaflet-zoom-animated"),this.options.className&&ci(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onload=n(this.fire,this,"load"),i.onerror=n(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=i.src:(i.src=this._url,i.alt=this.options.alt)},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;vi(this._image,e,i)},_reset:function(){var t=this._image,i=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=i.getSize();mi(t,i.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){di(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&null!=this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Ve=We.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:ni("video");if(ci(i,"leaflet-image-layer"),this._zoomAnimated&&ci(i,"leaflet-zoom-animated"),this.options.className&&ci(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onloadeddata=n(this.fire,this,"load"),t){for(var e=i.getElementsByTagName("source"),s=[],o=0;o<e.length;o++)s.push(e[o].src);this._url=e.length>0?s:[i.src]}else{m(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(i.style,"objectFit")&&(i.style.objectFit="fill"),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop,i.muted=!!this.options.muted,i.playsInline=!!this.options.playsInline;for(var r=0;r<this._url.length;r++){var h=ni("source");h.src=this._url[r],i.appendChild(h)}}}}),Ge=We.extend({_initImage:function(){var t=this._image=this._url;ci(t,"leaflet-image-layer"),this._zoomAnimated&&ci(t,"leaflet-zoom-animated"),this.options.className&&ci(t,this.options.className),t.onselectstart=a,t.onmousemove=a}}),qe=xe.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0},initialize:function(t,i){f(this,t),this._source=i},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&di(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&di(this._container,1),this.bringToFront(),this.options.interactive&&(ci(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(di(this._container,0),this._removeTimeout=setTimeout(n(si,void 0,this._container),200)):si(this._container),this.options.interactive&&(li(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=R(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ri(this._container),this},bringToBack:function(){return this._map&&hi(this._container),this},_prepareOpen:function(t){var i=this._source;if(!i._map)return!1;if(i instanceof ke){i=null;var e=this._source._layers;for(var n in e)if(e[n]._map){i=e[n];break}if(!i)return!1;this._source=i}if(!t)if(i.getCenter)t=i.getCenter();else if(i.getLatLng)t=i.getLatLng();else{if(!i.getBounds)throw new Error("Unable to get source layer LatLng.");t=i.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,i="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof i)t.innerHTML=i;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(i)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),i=O(this.options.offset),e=this._getAnchor();this._zoomAnimated?mi(this._container,t.add(e)):i=i.add(t).add(e);var n=this._containerBottom=-i.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}});Ui.include({_initOverlay:function(t,i,e,n){var s=i;return s instanceof t||(s=new t(n).setContent(i)),e&&s.setLatLng(e),s}}),xe.include({_initOverlay:function(t,i,e,n){var s=e;return s instanceof t?(f(s,n),s._source=this):(s=i&&!n?i:new t(n,this)).setContent(e),s}});var Xe=qe.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,qe.prototype.openOn.call(this,t)},onAdd:function(t){qe.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Le||this._source.on("preclick",Oi))},onRemove:function(t){qe.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Le||this._source.off("preclick",Oi))},getEvents:function(){var t=qe.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",i=this._container=ni("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),e=this._wrapper=ni("div",t+"-content-wrapper",i);if(this._contentNode=ni("div",t+"-content",e),Bi(i),Ii(this._contentNode),Ti(i,"contextmenu",Oi),this._tipContainer=ni("div",t+"-tip-container",i),this._tip=ni("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=ni("a",t+"-close-button",i);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">&#215;</span>',Ti(n,"click",this.close,this)}},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var e=t.offsetWidth;e=Math.min(e,this.options.maxWidth),e=Math.max(e,this.options.minWidth),i.width=e+1+"px",i.whiteSpace="",i.height="";var n=this.options.maxHeight,s="leaflet-popup-scrolled";n&&t.offsetHeight>n?(i.height=n+"px",ci(t,s)):li(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();mi(this._container,i.add(e))},_adjustPan:function(t){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var i=this._map,e=parseInt(ei(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,s=this._containerWidth,o=new S(this._containerLeft,-n-this._containerBottom);o._add(gi(this._container));var r=i.layerPointToContainerPoint(o),h=O(this.options.autoPanPadding),a=O(this.options.autoPanPaddingTopLeft||h),c=O(this.options.autoPanPaddingBottomRight||h),l=i.getSize(),u=0,f=0;r.x+s+c.x>l.x&&(u=r.x+s-l.x+c.x),r.x-u-a.x<0&&(u=r.x-a.x),r.y+n+c.y>l.y&&(f=r.y+n-l.y+c.y),r.y-f-a.y<0&&(f=r.y-a.y),(u||f)&&i.fire("autopanstart").panBy([u,f],{animate:t&&"moveend"===t.type})}},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ui.mergeOptions({closePopupOnClick:!0}),Ui.include({openPopup:function(t,i,e){return this._initOverlay(Xe,t,i,e).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),xe.include({bindPopup:function(t,i){return this._popup=this._initOverlay(Xe,this._popup,t,i),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&this._popup._prepareOpen(t)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){ji(t);var i=t.layer||t.target;this._popup._source!==i||i instanceof Le?(this._popup._source=i,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Je=qe.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){qe.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){qe.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=qe.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){this._contentNode=this._container=ni("div","leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e,n=this._map,s=this._container,o=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),h=this.options.direction,a=s.offsetWidth,c=s.offsetHeight,l=O(this.options.offset),u=this._getAnchor();"top"===h?(i=a/2,e=c):"bottom"===h?(i=a/2,e=0):"center"===h?(i=a/2,e=c/2):"right"===h?(i=0,e=c/2):"left"===h?(i=a,e=c/2):r.x<o.x?(h="right",i=0,e=c/2):(h="left",i=a+2*(l.x+u.x),e=c/2),t=t.subtract(O(i,e,!0)).add(l).add(u),li(s,"leaflet-tooltip-right"),li(s,"leaflet-tooltip-left"),li(s,"leaflet-tooltip-top"),li(s,"leaflet-tooltip-bottom"),ci(s,"leaflet-tooltip-"+h),mi(s,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&di(this._container,t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(i)},_getAnchor:function(){return O(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ui.include({openTooltip:function(t,i,e){return this._initOverlay(Je,t,i,e).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),xe.include({bindTooltip:function(t,i){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Je,this._tooltip,t,i),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var i=t?"off":"on",e={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?e.add=this._openTooltip:(e.mouseover=this._openTooltip,e.mouseout=this.closeTooltip,e.click=this._openTooltip),this._tooltip.options.sticky&&(e.mousemove=this._moveTooltip),this[i](e),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&this._tooltip._prepareOpen(t)&&this._tooltip.openOn(this._map),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){!this._tooltip||!this._map||this._map.dragging&&this._map.dragging.moving()||(this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0))},_moveTooltip:function(t){var i,e,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),e=this._map.containerPointToLayerPoint(i),n=this._map.layerPointToLatLng(e)),this._tooltip.setLatLng(n)}});var Ke=Me.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:document.createElement("div"),e=this.options;if(e.html instanceof Element?(oi(i),i.appendChild(e.html)):i.innerHTML=!1!==e.html?e.html:"",e.bgPos){var n=O(e.bgPos);i.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}});Me.Default=ze;var Qe=xe.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ot.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){f(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),si(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ri(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(hi(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=r(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof S?t:new S(t,t)},_updateZIndex:function(){this._container&&null!=this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var i,e=this.getPane().children,n=-t(-1/0,1/0),s=0,o=e.length;s<o;s++)i=e[s].style.zIndex,e[s]!==this._container&&i&&(n=t(n,+i));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ot.ielt9){di(this._container,this.options.opacity);var t=+new Date,i=!1,e=!1;for(var n in this._tiles){var s=this._tiles[n];if(s.current&&s.loaded){var o=Math.min(1,(t-s.loaded)/200);di(s.el,o),o<1?i=!0:(s.active?e=!0:this._onOpaqueTile(s),s.active=!0)}}e&&!this._noPrune&&this._pruneTiles(),i&&(z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=ni("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,i=this.options.maxZoom;if(void 0!==t){for(var e in this._levels)e=Number(e),this._levels[e].el.children.length||e===t?(this._levels[e].el.style.zIndex=i-Math.abs(t-e),this._onUpdateLevel(e)):(si(this._levels[e].el),this._removeTilesAtZoom(e),this._onRemoveLevel(e),delete this._levels[e]);var n=this._levels[t],s=this._map;return n||((n=this._levels[t]={}).el=ni("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=i,n.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,s.getCenter(),s.getZoom()),this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,i,e=this._map.getZoom();if(e>this.options.maxZoom||e<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(i=this._tiles[t]).retain=i.current;for(t in this._tiles)if((i=this._tiles[t]).current&&!i.active){var 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(t){for(var i in this._tiles)this._tiles[i].coords.z===t&&this._removeTile(i)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)si(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,i,e,n){var s=Math.floor(t/2),o=Math.floor(i/2),r=e-1,h=new S(+s,+o);h.z=+r;var a=this._tileCoordsToKey(h),c=this._tiles[a];return c&&c.active?(c.retain=!0,!0):(c&&c.loaded&&(c.retain=!0),r>n&&this._retainParent(s,o,r,n))},_retainChildren:function(t,i,e,n){for(var s=2*t;s<2*t+2;s++)for(var o=2*i;o<2*i+2;o++){var r=new S(s,o);r.z=e+1;var h=this._tileCoordsToKey(r),a=this._tiles[h];a&&a.active?a.retain=!0:(a&&a.loaded&&(a.retain=!0),e+1<n&&this._retainChildren(s,o,e+1,n))}},_resetView:function(t){var i=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var i=this.options;return void 0!==i.minNativeZoom&&t<i.minNativeZoom?i.minNativeZoom:void 0!==i.maxNativeZoom&&i.maxNativeZoom<t?i.maxNativeZoom:t},_setView:function(t,i,e,n){var s=Math.round(i);s=void 0!==this.options.maxZoom&&s>this.options.maxZoom||void 0!==this.options.minZoom&&s<this.options.minZoom?void 0:this._clampZoom(s),n&&!(this.options.updateWhenZooming&&s!==this._tileZoom)||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&this._update(t),e||this._pruneTiles(),this._noPrune=!!e),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var e in this._levels)this._setZoomTransform(this._levels[e],t,i)},_setZoomTransform:function(t,i,e){var n=this._map.getZoomScale(e,t.zoom),s=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(i,e)).round();Ot.any3d?vi(t.el,s,n):mi(t.el,s)},_resetGrid:function(){var t=this._map,i=t.options.crs,e=this._tileSize=this.getTileSize(),n=this._tileZoom,s=this._map.getPixelWorldBounds(this._tileZoom);s&&(this._globalTileRange=this._pxBoundsToTileRange(s)),this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,i.wrapLng[0]],n).x/e.x),Math.ceil(t.project([0,i.wrapLng[1]],n).x/e.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],n).y/e.x),Math.ceil(t.project([i.wrapLat[1],0],n).y/e.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,e=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),n=i.getZoomScale(e,this._tileZoom),s=i.project(t,this._tileZoom).floor(),o=i.getSize().divideBy(2*n);return new I(s.subtract(o),s.add(o))},_update:function(t){var i=this._map;if(i){var e=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(n),o=s.getCenter(),r=[],h=this.options.keepBuffer,a=new I(s.getBottomLeft().subtract([h,-h]),s.getTopRight().add([h,-h]));if(!(isFinite(s.min.x)&&isFinite(s.min.y)&&isFinite(s.max.x)&&isFinite(s.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var c in this._tiles){var l=this._tiles[c].coords;l.z===this._tileZoom&&a.contains(new S(l.x,l.y))||(this._tiles[c].current=!1)}if(Math.abs(e-this._tileZoom)>1)this._setView(t,e);else{for(var u=s.min.y;u<=s.max.y;u++)for(var f=s.min.x;f<=s.max.x;f++){var d=new S(f,u);if(d.z=this._tileZoom,this._isValidTile(d)){var p=this._tiles[this._tileCoordsToKey(d)];p?p.current=!0:r.push(d)}}if(r.sort((function(t,i){return t.distanceTo(o)-i.distanceTo(o)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var v=document.createDocumentFragment();for(f=0;f<r.length;f++)this._addTile(r[f],v);this._level.el.appendChild(v)}}}}},_isValidTile:function(t){var i=this._map.options.crs;if(!i.infinite){var e=this._globalTileRange;if(!i.wrapLng&&(t.x<e.min.x||t.x>e.max.x)||!i.wrapLat&&(t.y<e.min.y||t.y>e.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return j(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),s=n.add(e);return[i.unproject(n,t.z),i.unproject(s,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new F(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new S(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(si(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ci(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=a,t.onmousemove=a,Ot.ielt9&&this.options.opacity<1&&di(t,this.options.opacity)},_addTile:function(t,i){var e=this._getTilePos(t),s=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),n(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(n(this._tileReady,this,t,null,o)),mi(o,e),this._tiles[s]={el:o,coords:t,current:!0},i.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var s=this._tileCoordsToKey(t);(e=this._tiles[s])&&(e.loaded=+new Date,this._map._fadeAnimated?(di(e.el,0),z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(ci(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ot.ielt9||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(n(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new S(this._wrapX?h(t.x,this._wrapX):t.x,this._wrapY?h(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new I(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Ye=Qe.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,i){this._url=t,(i=f(this,i)).detectRetina&&Ot.retina&&i.maxZoom>0&&(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom++):(i.zoomOffset++,i.maxZoom--),i.minZoom=Math.max(0,i.minZoom)),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url===t&&void 0===i&&(i=!0),this._url=t,i||this.redraw(),this},createTile:function(t,i){var e=document.createElement("img");return Ti(e,"load",n(this._tileOnLoad,this,i,e)),Ti(e,"error",n(this._tileOnError,this,i,e)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(e.referrerPolicy=this.options.referrerPolicy),e.alt="",e.setAttribute("role","presentation"),e.src=this.getTileUrl(t),e},getTileUrl:function(t){var e={r:Ot.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return v(this._url,i(e,this.options))},_tileOnLoad:function(t,i){Ot.ielt9?setTimeout(n(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var n=this.options.errorTileUrl;n&&i.getAttribute("src")!==n&&(i.src=n),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom;return this.options.zoomReverse&&(t=this.options.maxZoom-t),t+this.options.zoomOffset},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=a,i.onerror=a,!i.complete)){i.src=b;var e=this._tiles[t].coords;si(i),delete this._tiles[t],this.fire("tileabort",{tile:i,coords:e})}},_removeTile:function(t){var i=this._tiles[t];if(i)return i.el.setAttribute("src",b),Qe.prototype._removeTile.call(this,t)},_tileReady:function(t,i,e){if(this._map&&(!e||e.getAttribute("src")!==b))return Qe.prototype._tileReady.call(this,t,i,e)}});function tn(t,i){return new Ye(t,i)}var en=Ye.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var s in e)s in this.options||(n[s]=e[s]);var o=(e=f(this,e)).detectRetina&&Ot.retina?2:1,r=this.getTileSize();n.width=r.x*o,n.height=r.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version),this.wmsParams[this._wmsVersion>=1.3?"crs":"srs"]=this._crs.code,Ye.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),e=this._crs,n=B(e.project(i[0]),e.project(i[1])),s=n.min,o=n.max,r=(this._wmsVersion>=1.3&&this._crs===we?[s.y,s.x,o.y,o.x]:[s.x,s.y,o.x,o.y]).join(","),h=Ye.prototype.getTileUrl.call(this,t);return h+d(this.wmsParams,h,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});Ye.WMS=en,tn.wms=function(t,i){return new en(t,i)};var nn=xe.extend({options:{padding:.1},initialize:function(t){f(this,t),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ci(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var e=this._map.getZoomScale(i,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,i),o=n.multiplyBy(-e).add(s).subtract(this._map._getNewPixelOrigin(t,i));Ot.any3d?vi(this._container,o,e):mi(this._container,o)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new I(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sn=nn.extend({options:{tolerance:0},getEvents:function(){var t=nn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){nn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ti(t,"mousemove",this._onMouseMove,this),Ti(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ti(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,si(this._container),Li(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){nn.prototype._update.call(this);var t=this._bounds,i=this._container,e=t.getSize(),n=Ot.retina?2:1;mi(i,t.min),i.width=n*e.x,i.height=n*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",Ot.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){nn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[o(t)]=t;var i=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,n=i.prev;e?e.prev=n:this._drawLast=n,n?n.next=e:this._drawFirst=e,delete t._order,delete this._layers[o(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var i,e,n=t.options.dashArray.split(/[, ]+/),s=[];for(e=0;e<n.length;e++){if(i=Number(n[e]),isNaN(i))return;s.push(i)}t.options._dashArray=s}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||M(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var i=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new I,this._redrawBounds.extend(t._pxBounds.min.subtract([i,i])),this._redrawBounds.extend(t._pxBounds.max.add([i,i]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var i=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,i.x,i.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,i=this._redrawBounds;if(this._ctx.save(),i){var e=i.getSize();this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,e.x,e.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,i){if(this._drawing){var e,n,s,o,r=t._parts,h=r.length,a=this._ctx;if(h){for(a.beginPath(),e=0;e<h;e++){for(n=0,s=r[e].length;n<s;n++)a[n?"lineTo":"moveTo"]((o=r[e][n]).x,o.y);i&&a.closePath()}this._fillStroke(a,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var i=t._point,e=this._ctx,n=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==s&&(e.save(),e.scale(1,s)),e.beginPath(),e.arc(i.x,i.y/s,n,0,2*Math.PI,!1),1!==s&&e.restore(),this._fillStroke(e,t)}},_fillStroke:function(t,i){var e=i.options;e.fill&&(t.globalAlpha=e.fillOpacity,t.fillStyle=e.fillColor||e.color,t.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=e.opacity,t.lineWidth=e.weight,t.strokeStyle=e.color,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.stroke())},_onClick:function(t){for(var i,e,n=this._map.mouseEventToLayerPoint(t),s=this._drawFirst;s;s=s.next)(i=s.layer).options.interactive&&i._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(i))&&(e=i);this._fireEvent(!!e&&[e],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var i=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,i)}},_handleMouseOut:function(t){var i=this._hoveredLayer;i&&(li(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,i){if(!this._mouseHoverThrottled){for(var e,s,o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&(s=e);s!==this._hoveredLayer&&(this._handleMouseOut(t),s&&(ci(this._container,"leaflet-interactive"),this._fireEvent([s],t,"mouseover"),this._hoveredLayer=s)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(n((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,i,e){this._map._fireDOMEvent(i,e||i.type,t)},_bringToFront:function(t){var i=t._order;if(i){var e=i.next,n=i.prev;e&&(e.prev=n,n?n.next=e:e&&(this._drawFirst=e),i.prev=this._drawLast,this._drawLast.next=i,i.next=null,this._drawLast=i,this._requestRedraw(t))}},_bringToBack:function(t){var i=t._order;if(i){var e=i.next,n=i.prev;n&&(n.next=e,e?e.prev=n:n&&(this._drawLast=n),i.prev=null,i.next=this._drawFirst,this._drawFirst.prev=i,this._drawFirst=i,this._requestRedraw(t))}}});function on(t){return Ot.canvas?new sn(t):null}var rn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),hn={_initContainer:function(){this._container=ni("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(nn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=rn("shape");ci(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=rn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;si(i),t.removeInteractiveTarget(i),delete this._layers[o(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(i||(i=t._stroke=rn("stroke")),s.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,i.dashStyle=n.dashArray?m(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):"",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(s.removeChild(i),t._stroke=null),n.fill?(e||(e=t._fill=rn("fill")),s.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(s.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){ri(t._container)},_bringToBack:function(t){hi(t._container)}},an=Ot.vml?rn:X,cn=nn.extend({_initContainer:function(){this._container=an("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=an("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){si(this._container),Li(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){nn.prototype._update.call(this);var t=this._bounds,i=t.getSize(),e=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),mi(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=an("path");t.options.className&&ci(i,t.options.className),t.options.interactive&&ci(i,"leaflet-interactive"),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){si(t._path),t.removeInteractiveTarget(t._path),delete this._layers[o(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,J(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,s)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){ri(t._path)},_bringToBack:function(t){hi(t._path)}});function ln(t){return Ot.svg||Ot.vml?new cn(t):null}Ot.vml&&cn.include(hn),Ui.include({getRenderer:function(t){var i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return i||(i=this._renderer=this._createRenderer()),this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&on(t)||ln(t)}});var un=Ee.extend({initialize:function(t,i){Ee.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=j(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});cn.create=an,cn.pointsToPath=J,Oe.geometryToLayer=Ie,Oe.coordsToLatLng=Fe,Oe.coordsToLatLngs=je,Oe.latLngToCoords=Ne,Oe.latLngsToCoords=Re,Oe.getFeature=Ze,Oe.asFeature=De,Ui.mergeOptions({boxZoom:!0});var fn=Ki.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Ti(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Li(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){si(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Gt(),wi(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ti(document,{contextmenu:ji,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ni("div","leaflet-zoom-box",this._container),ci(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new I(this._point,this._startPoint),e=i.getSize();mi(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(si(this._box),li(this._container,"leaflet-crosshair")),qt(),yi(),Li(document,{contextmenu:ji,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(n(this._resetState,this),0);var i=new F(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ui.addInitHook("addHandler","boxZoom",fn),Ui.mergeOptions({doubleClickZoom:!0});var dn=Ki.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,s=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(s):i.setZoomAround(t.containerPoint,s)}});Ui.addInitHook("addHandler","doubleClickZoom",dn),Ui.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var pn=Ki.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ie(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ci(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){li(this._map._container,"leaflet-grab"),li(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var i=j(this._map.options.maxBounds);this._offsetLimit=B(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(i),this._prunePositions(i)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit;t.x<i.min.x&&(t.x=this._viscousLimit(t.x,i.min.x)),t.y<i.min.y&&(t.y=this._viscousLimit(t.y,i.min.y)),t.x>i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,s=(n-i+e)%t+i-e,o=(n+i+e)%t-i-e,r=Math.abs(s+e)<Math.abs(o+e)?s:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var i=this._map,e=i.options,n=!e.inertia||t.noInertia||this._times.length<2;if(i.fire("dragend",t),n)i.fire("moveend");else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),o=e.easeLinearity,r=s.multiplyBy(o/((this._lastTime-this._times[0])/1e3)),h=r.distanceTo([0,0]),a=Math.min(e.inertiaMaxSpeed,h),c=r.multiplyBy(a/h),l=a/(e.inertiaDeceleration*o),u=c.multiplyBy(-l/2).round();u.x||u.y?(u=i._limitOffset(u,i.options.maxBounds),M((function(){i.panBy(u,{duration:l,easeLinearity:o,noMoveStart:!0,animate:!0})}))):i.fire("moveend")}}});Ui.addInitHook("addHandler","dragging",pn),Ui.mergeOptions({keyboard:!0,keyboardPanDelta:80});var vn=Ki.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Ti(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Li(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 t=document.body,i=document.documentElement,e=t.scrollTop||i.scrollTop,n=t.scrollLeft||i.scrollLeft;this._map._container.focus(),window.scrollTo(n,e)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var i,e,n=this._panKeys={},s=this.keyCodes;for(i=0,e=s.left.length;i<e;i++)n[s.left[i]]=[-1*t,0];for(i=0,e=s.right.length;i<e;i++)n[s.right[i]]=[t,0];for(i=0,e=s.down.length;i<e;i++)n[s.down[i]]=[0,t];for(i=0,e=s.up.length;i<e;i++)n[s.up[i]]=[0,-1*t]},_setZoomDelta:function(t){var i,e,n=this._zoomKeys={},s=this.keyCodes;for(i=0,e=s.zoomIn.length;i<e;i++)n[s.zoomIn[i]]=t;for(i=0,e=s.zoomOut.length;i<e;i++)n[s.zoomOut[i]]=-t},_addHooks:function(){Ti(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Li(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var i,e=t.keyCode,n=this._map;if(e in this._panKeys)n._panAnim&&n._panAnim._inProgress||(i=this._panKeys[e],t.shiftKey&&(i=O(i).multiplyBy(3)),n.panBy(i),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(e in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if(27!==e||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}ji(t)}}});Ui.addInitHook("addHandler","keyboard",vn),Ui.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var mn=Ki.extend({addHooks:function(){Ti(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Li(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var i=Zi(t),e=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var s=Math.max(e-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(n(this._performZoom,this),s),ji(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),e=this._map.options.zoomSnap||0;t._stop();var n=4*Math.log(2/(1+Math.exp(-Math.abs(this._delta/(4*this._map.options.wheelPxPerZoomLevel)))))/Math.LN2,s=e?Math.ceil(n/e)*e:n,o=t._limitZoom(i+(this._delta>0?s:-s))-i;this._delta=0,this._startTime=null,o&&("center"===t.options.scrollWheelZoom?t.setZoom(i+o):t.setZoomAround(this._lastMousePos,i+o))}});Ui.addInitHook("addHandler","scrollWheelZoom",mn),Ui.mergeOptions({tapHold:Ot.touchNative&&Ot.safari&&Ot.mobile,tapTolerance:15});var gn=Ki.extend({addHooks:function(){Ti(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Li(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var i=t.touches[0];this._startPos=this._newPos=new S(i.clientX,i.clientY),this._holdTimeout=setTimeout(n((function(){this._cancel(),this._isTapValid()&&(Ti(document,"touchend",Fi),Ti(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",i))}),this),600),Ti(document,"touchend touchcancel contextmenu",this._cancel,this),Ti(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Li(document,"touchend",Fi),Li(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Li(document,"touchend touchcancel contextmenu",this._cancel,this),Li(document,"touchmove",this._onMove,this)},_onMove:function(t){var i=t.touches[0];this._newPos=new S(i.clientX,i.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,i){var e=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY});e._simulated=!0,i.target.dispatchEvent(e)}});Ui.addInitHook("addHandler","tapHold",gn),Ui.mergeOptions({touchZoom:Ot.touch,bounceAtZoomLimits:!0});var bn=Ki.extend({addHooks:function(){ci(this._map._container,"leaflet-touch-zoom"),Ti(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){li(this._map._container,"leaflet-touch-zoom"),Li(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(e.add(n)._divideBy(2))),this._startDist=e.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),Ti(document,"touchmove",this._onTouchMove,this),Ti(document,"touchend touchcancel",this._onTouchEnd,this),Fi(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,e=i.mouseEventToContainerPoint(t.touches[0]),s=i.mouseEventToContainerPoint(t.touches[1]),o=e.distanceTo(s)/this._startDist;if(this._zoom=i.getScaleZoom(o,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&o<1||this._zoom>i.getMaxZoom()&&o>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var r=e._add(s)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===r.x&&0===r.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var h=n(i._move,i,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=M(h,this,!0),Fi(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,z(this._animRequest),Li(document,"touchmove",this._onTouchMove,this),Li(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ui.addInitHook("addHandler","touchZoom",bn),Ui.BoxZoom=fn,Ui.DoubleClickZoom=dn,Ui.Drag=pn,Ui.Keyboard=vn,Ui.ScrollWheelZoom=mn,Ui.TapHold=gn,Ui.TouchZoom=bn,t.Bounds=I,t.Browser=Ot,t.CRS=D,t.Canvas=sn,t.Circle=Ae,t.CircleMarker=Ce,t.Class=P,t.Control=Wi,t.DivIcon=Ke,t.DivOverlay=qe,t.DomEvent=Hi,t.DomUtil=zi,t.Draggable=ie,t.Evented=A,t.FeatureGroup=ke,t.GeoJSON=Oe,t.GridLayer=Qe,t.Handler=Ki,t.Icon=Me,t.ImageOverlay=We,t.LatLng=N,t.LatLngBounds=F,t.Layer=xe,t.LayerGroup=_e,t.LineUtil=fe,t.Map=Ui,t.Marker=Pe,t.Mixin=Yi,t.Path=Le,t.Point=S,t.PolyUtil=pe,t.Polygon=Ee,t.Polyline=Se,t.Popup=Xe,t.PosAnimation=$i,t.Projection=ge,t.Rectangle=un,t.Renderer=nn,t.SVG=cn,t.SVGOverlay=Ge,t.TileLayer=Ye,t.Tooltip=Je,t.Transformation=W,t.Util=T,t.VideoOverlay=Ve,t.bind=n,t.bounds=B,t.canvas=on,t.circle=function(t,i,e){return new Ae(t,i,e)},t.circleMarker=function(t,i){return new Ce(t,i)},t.control=Vi,t.divIcon=function(t){return new Ke(t)},t.extend=i,t.featureGroup=function(t,i){return new ke(t,i)},t.geoJSON=$e,t.geoJson=Ue,t.gridLayer=function(t){return new Qe(t)},t.icon=function(t){return new Me(t)},t.imageOverlay=function(t,i,e){return new We(t,i,e)},t.latLng=R,t.latLngBounds=j,t.layerGroup=function(t,i){return new _e(t,i)},t.map=function(t,i){return new Ui(t,i)},t.marker=function(t,i){return new Pe(t,i)},t.point=O,t.polygon=function(t,i){return new Ee(t,i)},t.polyline=function(t,i){return new Se(t,i)},t.popup=function(t,i){return new Xe(t,i)},t.rectangle=function(t,i){return new un(t,i)},t.setOptions=f,t.stamp=o,t.svg=ln,t.svgOverlay=function(t,i,e){return new Ge(t,i,e)},t.tileLayer=tn,t.tooltip=function(t,i){return new Je(t,i)},t.transformation=V,t.version="1.8.0",t.videoOverlay=function(t,i,e){return new Ve(t,i,e)};var wn=window.L;t.noConflict=function(){return window.L=wn,this},window.L=t}((p={path:void 0,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}).exports),p.exports);const m=class{constructor(i){t(this,i),this.trekCardPress=n(this,"trekCardPress",7),this.mapIsReady=!1,this.center="1, 1",this.zoom=10,this.colorPrimary="#6b0030",this.colorPrimaryTint="#974c6e",this.colorTrekLine="#6b0030",this.colorDepartureIcon="#006b3b",this.colorArrivalIcon="#85003b",this.colorSensitiveArea="\t#4974a5",this.colorPoiIcon="#974c6e",this.handleTreksWithinBoundsBind=this.handleTreksWithinBounds.bind(this)}connectedCallback(){this.map=v.map(this.element,{center:this.center.split(",").map(Number),zoom:this.zoom}),v.control.scale().addTo(this.map),v.tileLayer(this.urlLayer,{maxZoom:19,attribution:this.attribution}).addTo(this.map),o.currentTrek?this.addTrek():o.currentTreks&&this.addTreks(),r("currentTreks",(()=>{o.currentTrek?this.addTrek():o.currentTreks&&this.addTreks()})),r("currentTrek",(()=>{o.currentTrek?(this.removeTreks(),this.addTrek()):(this.addTreks(),this.removeTrek())}))}addTreks(){var t;const i=[],e={type:"FeatureCollection",features:[]};if(o.currentTreks)for(const n of o.currentTreks)i.push(n.departure_geom),e.features.push({type:"Feature",geometry:{type:"Point",coordinates:n.departure_geom},properties:{id:n.id,name:n.name,practice:null===(t=o.practices.find((t=>t.id===n.practice)))||void 0===t?void 0:t.pictogram,imgSrc:n.attachments&&n.attachments.length>0&&n.attachments[0].thumbnail}});if(this.treksLayer){if(i.length>0){const t=v.latLngBounds(i.map((t=>[t[1],t[0]])));this.map.fitBounds(t)}else this.map.fire("moveend");this.treksLayer.clearLayers(),this.treksLayer.addData(e)}else{if(i.length>0&&!o.currentMapTreksBounds){const t=v.latLngBounds(i.map((t=>[t[1],t[0]])));this.map.fitBounds(t)}else o.currentMapTreksBounds&&this.map.fitBounds(o.currentMapTreksBounds);this.treksLayer=v.geoJSON(e,{pointToLayer:(t,i)=>v.marker(i,{icon:v.divIcon({html:t.properties.practice?`<img src=${t.properties.practice} />`:"<img />",className:"trek-marker",iconSize:48}),autoPanOnFocus:!1}),onEachFeature:(t,i)=>{i.once("click",(()=>{const e=v.DomUtil.create("div");e.className="trek-departure-popup",e.onclick=()=>this.trekCardPress.emit(t.properties.id);const n=v.DomUtil.create("div");if(n.innerHTML=t.properties.name,n.className="trek-name",t.properties.imgSrc){n.className+=" trek-name-margin-top";const i=v.DomUtil.create("img");i.src=t.properties.imgSrc,e.appendChild(i)}e.appendChild(n),i.bindPopup(e,{interactive:!0,autoPan:!1,closeButton:!1}).openPopup()}))}}).addTo(this.map)}!this.mapIsReady&&(this.mapIsReady=!this.mapIsReady),this.map.on("moveend",this.handleTreksWithinBoundsBind)}removeTreks(){this.treksLayer&&(o.currentMapTreksBounds=this.map.getBounds(),this.map.removeLayer(this.treksLayer),this.treksLayer=null,this.map.off("moveend",this.handleTreksWithinBoundsBind))}handleTreksWithinBounds(){o.treksWithinBounds=o.currentTreks.filter((t=>this.map.getBounds().contains(v.latLng(t.departure_geom[1],t.departure_geom[0]))))}addTrek(){this.currentTrekLayer=v.geoJSON({type:"Feature",geometry:o.currentTrek.geometry,properties:{}},{style:()=>({color:this.colorTrekLine}),interactive:!1}).addTo(this.map);const t=v.latLngBounds(o.currentTrek.geometry.coordinates.map((t=>[t[1],t[0]])));this.map.fitBounds(t);const i=[o.currentTrek.geometry.coordinates.at(0)[0],o.currentTrek.geometry.coordinates.at(0)[1]],e=[o.currentTrek.geometry.coordinates.at(-1)[0],o.currentTrek.geometry.coordinates.at(-1)[1]],n={type:"FeatureCollection",features:[{type:"Feature",properties:{type:"departure"},geometry:{type:"Point",coordinates:i}}]};if(i[0]===e[0]&&i[1]===e[1]||n.features.push({type:"Feature",properties:{type:"arrival"},geometry:{type:"Point",coordinates:e}}),this.currentDepartureArrivalLayer=v.geoJSON(n,{pointToLayer:(t,i)=>v.marker(i,{icon:v.divIcon({html:'<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><path d="M80,464V68.14a8,8,0,0,1,4-6.9C91.81,56.66,112.92,48,160,48c64,0,145,48,192,48a199.53,199.53,0,0,0,77.23-15.77A2,2,0,0,1,432,82.08V301.44a4,4,0,0,1-2.39,3.65C421.37,308.7,392.33,320,352,320c-48,0-128-32-192-32s-80,16-80,16" style=";fill:#ffffff;stroke:currentColor;stroke-linecap:round;stroke-miterlimit:10;stroke-width:32px"/></svg>',className:"departure"===t.properties.type?"departure-icon":"arrival-icon",iconSize:48,iconAnchor:[0,48]}),autoPanOnFocus:!1,interactive:!1})}).addTo(this.map),o.currentTrek.parking_location&&(this.currentParkingLayer=v.geoJSON({type:"Feature",properties:{},geometry:{type:"Point",coordinates:o.currentTrek.parking_location}},{pointToLayer:(t,i)=>v.marker(i,{icon:v.divIcon({html:"<div>P</div>",className:"parking-icon",iconSize:48,iconAnchor:[0,48]}),autoPanOnFocus:!1,interactive:!1})}).addTo(this.map)),o.currentSensitiveAreas&&o.currentSensitiveAreas.length>0){const t={type:"FeatureCollection",features:[]};for(const i of o.currentSensitiveAreas)t.features.push({type:"Feature",properties:{name:i.name},geometry:i.geometry});this.currentSensitiveAreasLayer=v.geoJSON(t,{onEachFeature:(t,i)=>{i.once("mouseover",(()=>{const e=v.DomUtil.create("div");e.className="sensitive-area-tooltip";const n=v.DomUtil.create("div");n.innerHTML=t.properties.name,n.className="sensitive-area-name",e.appendChild(n),i.bindTooltip(e).openTooltip()}))},style:()=>({color:this.colorSensitiveArea})}).addTo(this.map),v.Control.SensitiveAreasCheckboxContainer=v.Control.extend({onAdd:()=>{const i=v.DomUtil.create("div");i.className="sensitiveAreasCheckboxContainer";const e=v.DomUtil.create("input");e.setAttribute("id","sensitiveAreasCheckbox"),e.setAttribute("type","checkbox"),e.setAttribute("checked","true"),e.onclick=t=>t.composedPath()[0].checked?this.map.addLayer(this.currentSensitiveAreasLayer):this.map.removeLayer(this.currentSensitiveAreasLayer);const n=v.DomUtil.create("label");return n.setAttribute("for","sensitiveAreasCheckbox"),n.innerHTML=t.features.length>1||"MultiPolygon"===t.features[0].geometry.type?"Afficher les zones sensibles":"Afficher la zone sensible",i.appendChild(e),i.appendChild(n),i}}),v.control.sensitiveAreasCheckboxContainer=()=>new v.Control.SensitiveAreasCheckboxContainer,this.sensitiveAreasControl=v.control.sensitiveAreasCheckboxContainer({position:"topright"}).addTo(this.map)}if(o.currentPois&&o.currentPois.length>0){const t={type:"FeatureCollection",features:[]};for(const i of o.currentPois)t.features.push({type:"Feature",properties:{name:i.name,type_pictogram:i.type_pictogram},geometry:i.geometry});this.currentPoisLayer=v.geoJSON(t,{pointToLayer:(t,i)=>v.marker(i,{icon:v.divIcon({html:t.properties.type_pictogram&&`<img src=${t.properties.type_pictogram} />`,className:"poi-icon",iconSize:48}),autoPanOnFocus:!1}),onEachFeature:(t,i)=>{i.once("mouseover",(()=>{const e=v.DomUtil.create("div");e.className="poi-tooltip";const n=v.DomUtil.create("div");n.innerHTML=t.properties.name,n.className="poi-name",e.appendChild(n),i.bindTooltip(e).openTooltip()}))}}).addTo(this.map)}if(o.currentInformationDesks&&o.currentInformationDesks.length>0){const t={type:"FeatureCollection",features:[]};for(const i of o.currentInformationDesks)t.features.push({type:"Feature",properties:{name:i.name,type_pictogram:i.type.pictogram},geometry:{type:"Point",coordinates:[Number(i.longitude),Number(i.latitude)]}});this.currentInformationDesksLayer=v.geoJSON(t,{pointToLayer:(t,i)=>v.marker(i,{icon:v.divIcon({html:t.properties.type_pictogram&&`<img src=${t.properties.type_pictogram} />`,className:"information-desks-icon",iconSize:48}),autoPanOnFocus:!1}),onEachFeature:(t,i)=>{i.once("mouseover",(()=>{const e=v.DomUtil.create("div");e.className="information-desks-tooltip";const n=v.DomUtil.create("div");n.innerHTML=t.properties.name,n.className="information-desks-name",e.appendChild(n),i.bindTooltip(e).openTooltip()}))}}).addTo(this.map)}if(o.currentTrek.points_reference){const t={type:"FeatureCollection",features:[]};t.features.push({type:"Feature",properties:{},geometry:o.currentTrek.points_reference});let i=0;this.currentPointsReferenceLayer=v.geoJSON(t,{pointToLayer:(t,e)=>(i+=1,v.marker(e,{icon:v.divIcon({html:i,className:"point-reference-icon",iconSize:24}),autoPanOnFocus:!1,interactive:!1}))}).addTo(this.map)}!this.mapIsReady&&(this.mapIsReady=!this.mapIsReady)}removeTrek(){this.currentTrekLayer&&(this.map.removeLayer(this.currentTrekLayer),this.currentTrekLayer=null),this.currentDepartureArrivalLayer&&(this.map.removeLayer(this.currentDepartureArrivalLayer),this.currentDepartureArrivalLayer=null),this.currentParkingLayer&&(this.map.removeLayer(this.currentParkingLayer),this.currentParkingLayer=null),this.currentSensitiveAreasLayer&&(this.map.removeLayer(this.currentSensitiveAreasLayer),this.currentSensitiveAreasLayer=null,this.map.removeControl(this.sensitiveAreasControl),this.sensitiveAreasControl=null),this.currentPoisLayer&&(this.map.removeLayer(this.currentPoisLayer),this.currentPoisLayer=null),this.currentInformationDesksLayer&&(this.map.removeLayer(this.currentInformationDesksLayer),this.currentInformationDesksLayer=null),this.currentPointsReferenceLayer&&(this.map.removeLayer(this.currentPointsReferenceLayer),this.currentPointsReferenceLayer=null)}render(){return i(e,{style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint,"--color-departure-icon":this.colorDepartureIcon,"--color-arrival-icon":this.colorArrivalIcon,"--color-poi-icon":this.colorPoiIcon}},!this.mapIsReady&&i("div",{class:"map-loader-container"},i("span",{class:"loader"})))}get element(){return s(this)}};m.style='.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none !important;max-height:none !important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none !important;max-height:none !important;width:auto;padding:0}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51, 181, 229, 0.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078A8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,0.5)}.leaflet-container{font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,0.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:black}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px \'Lucida Console\', Monaco, monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,0.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255, 255, 255, 0.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-control-attribution svg{display:inline !important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;background:rgba(255, 255, 255, 0.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,0.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:17px 0;margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;box-shadow:0 3px 14px rgba(0,0,0,0.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma, Verdana, sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,0.4)}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;color-adjust:exact}}grw-map{font-family:"Roboto";display:block;height:100%;max-height:100vh}.departure-icon svg,.arrival-icon svg{width:48px;height:48px}.departure-icon svg path,.arrival-icon svg path{fill:currentColor;stroke:currentColor}.departure-icon{color:var(--color-departure-icon)}.arrival-icon{color:var(--color-arrival-icon)}.trek-marker{background-color:var(--color-primary);border-radius:50%;display:flex;justify-content:center;align-items:center}.trek-marker img{width:36px !important}.map-loader-container{position:absolute;z-index:500;width:100%;height:100%;background:rgba(255, 255, 255, 0.5);display:flex;justify-content:center;align-items:center}.map-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.leaflet-popup-content{width:144px;margin:0}.trek-departure-popup{position:relative;display:flex;flex-direction:column;width:100px;height:auto;padding:24px}.trek-departure-popup img{border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-departure-popup .trek-name{color:var(--color-primary);font-weight:bold;font-size:12px}.trek-departure-popup .trek-name-margin-top{margin-top:12px}.poi-tooltip .poi-name,.poi-tooltip .information-desks-name,.poi-tooltip .sensitive-area-name,.information-desks-tooltip .poi-name,.information-desks-tooltip .information-desks-name,.information-desks-tooltip .sensitive-area-name,.sensitive-area-tooltip .poi-name,.sensitive-area-tooltip .information-desks-name,.sensitive-area-tooltip .sensitive-area-name{color:var(--color-primary);font-weight:bold;font-size:12px}.sensitiveAreasCheckboxContainer{display:flex;justify-content:center;align-items:center;background-color:#ffffff;padding:8px;border-radius:8px;user-select:none}.sensitiveAreasCheckboxContainer input,.sensitiveAreasCheckboxContainer label{cursor:pointer}.sensitiveAreasCheckboxContainer input{margin:0}.sensitiveAreasCheckboxContainer label{padding-left:8px}.poi-icon,.information-desks-icon{background-color:var(--color-poi-icon);border-radius:50%;display:flex;justify-content:center;align-items:center}.poi-icon img,.information-desks-icon img{width:36px !important}.parking-icon{background-color:#0000ff;border-radius:50%;display:flex;justify-content:center;align-items:center;width:48px;height:48px;font-size:24px;color:#ffffff}.point-reference-icon{background-color:#ff0000;border:1px solid #ffffff;border-radius:50%;display:flex;justify-content:center;align-items:center;width:24px;height:24px;font-size:18px;color:#ffffff}';const g=class{constructor(i){t(this,i),this.colorPrimary="#6b0030",this.colorPrimaryShade="#4a0021",this.colorPrimaryTint="#974c6e"}connectedCallback(){this.currentTrek=this.trek?this.trek:o.currentTrek,this.currentTrek&&(this.difficulty=o.difficulties.find((t=>t.id===this.currentTrek.difficulty)),this.route=o.routes.find((t=>t.id===this.currentTrek.route)),this.practice=o.practices.find((t=>t.id===this.currentTrek.practice)),this.themes=o.themes.filter((t=>this.currentTrek.themes.includes(t.id))),this.labels=o.labels.filter((t=>this.currentTrek.labels.includes(t.id))),this.sources=o.sources.filter((t=>this.currentTrek.source.includes(t.id))),this.accessibilities=o.accessibilities.filter((t=>this.currentTrek.accessibilities.includes(t.id))),o.accessibilitiesLevel&&(this.accessibilityLevel=o.accessibilitiesLevel.find((t=>this.currentTrek.accessibility_level===t.id)))),r("currentTrek",(()=>{this.currentTrek=this.trek?this.trek:o.currentTrek,this.currentTrek&&(this.difficulty=o.difficulties.find((t=>t.id===this.currentTrek.difficulty)),this.route=o.routes.find((t=>t.id===this.currentTrek.route)),this.practice=o.practices.find((t=>t.id===this.currentTrek.practice)),this.themes=o.themes.filter((t=>this.currentTrek.themes.includes(t.id))),this.labels=o.labels.filter((t=>this.currentTrek.labels.includes(t.id))),this.sources=o.sources.filter((t=>this.currentTrek.source.includes(t.id))),this.accessibilities=o.accessibilities.filter((t=>this.currentTrek.accessibilities.includes(t.id))),o.accessibilitiesLevel&&(this.accessibilityLevel=o.accessibilitiesLevel.find((t=>this.currentTrek.accessibility_level===t.id))))}))}render(){var t,n,s,r,d,p,v;return i(e,{style:{"--color-primary":this.colorPrimary,"--color-primary-shade":this.colorPrimaryShade,"--color-primary-tint":this.colorPrimaryTint}},this.currentTrek&&i("div",{class:"trek-detail-container"},i("div",{class:"name"},this.currentTrek.name),this.currentTrek.attachments&&this.currentTrek.attachments[0]&&this.currentTrek.attachments[0].thumbnail&&i("img",{class:"image",src:this.currentTrek.attachments[0].thumbnail,loading:"lazy"}),i("div",{class:"sub-container"},i("div",{class:"icons-labels-container"},i("div",{class:"row"},i("div",{class:"icon-label difficulty"},(null===(t=this.difficulty)||void 0===t?void 0:t.pictogram)&&i("img",{src:this.difficulty.pictogram}),null===(n=this.difficulty)||void 0===n?void 0:n.label),i("div",{class:"icon-label duration"},i("div",{class:"svg-icon",innerHTML:h}),a(null===(s=this.currentTrek)||void 0===s?void 0:s.duration)),i("div",{class:"icon-label route"},(null===(r=this.route)||void 0===r?void 0:r.pictogram)&&i("img",{src:this.route.pictogram}),null===(d=this.route)||void 0===d?void 0:d.route)),i("div",{class:"row"},i("div",{class:"icon-label length"},i("div",{class:"svg-icon",innerHTML:c}),l(this.currentTrek.length_2d)),i("div",{class:"icon-label ascent"},i("div",{class:"svg-icon",innerHTML:u}),f(this.currentTrek.ascent)),i("div",{class:"icon-label practice"},(null===(p=this.practice)||void 0===p?void 0:p.pictogram)&&i("img",{src:this.practice.pictogram}),null===(v=this.practice)||void 0===v?void 0:v.name)))),i("div",{class:"downloads-container"},i("div",{class:"download-title"},"Téléchargements"),i("div",{class:"links-container"},i("a",{href:`${this.currentTrek.gpx}`},"GPX"),i("a",{href:`${this.currentTrek.kml}`},"KML"),i("a",{href:`${this.currentTrek.pdf}`},"PDF"))),this.themes.length>0&&i("div",{class:"themes-container"},this.themes.map((t=>i("div",{class:"theme"},t.label)))),this.currentTrek.description_teaser&&i("div",{class:"description-teaser",innerHTML:this.currentTrek.description_teaser}),this.currentTrek.ambiance&&i("div",{class:"ambiance",innerHTML:this.currentTrek.ambiance}),this.currentTrek.description&&i("div",{class:"description-container"},i("div",{class:"description-title"},"Description"),i("div",{class:"description",innerHTML:this.currentTrek.description})),this.currentTrek.departure&&i("div",{class:"departure-container"},i("div",{class:"departure-title"},"Départ : "),i("div",{innerHTML:this.currentTrek.departure})),this.currentTrek.arrival&&i("div",{class:"arrival-container"},i("div",{class:"arrival-title"},"Arrivée : "),i("div",{innerHTML:this.currentTrek.arrival})),this.currentTrek.altimetric_profile&&i("div",{class:"altimetric-profile-container"},i("div",{class:"altimetric-profile-title"},"Profil altimétrique"),i("img",{src:this.currentTrek.altimetric_profile.endsWith(".json")?this.currentTrek.altimetric_profile.replace(".json",".svg"):`${this.currentTrek.altimetric_profile}?format=svg`})),this.currentTrek.access&&i("div",{class:"access-container"},i("div",{class:"access-title"},"Accès routier"),i("div",{class:"access",innerHTML:this.currentTrek.access})),this.currentTrek.public_transport&&i("div",{class:"public-transport-container"},i("div",{class:"public-transport-title"},"Transport"),i("div",{class:"public-transport",innerHTML:this.currentTrek.public_transport})),(this.currentTrek.advice||this.labels.length>0)&&i("div",{class:"advice-container"},i("div",{class:"advice-title"},"Recommandations"),this.currentTrek.advice&&i("div",{class:"advice",innerHTML:this.currentTrek.advice}),this.labels.map((t=>i("div",{class:"label-container"},i("div",{class:"label-sub-container"},t.pictogram&&i("img",{src:t.pictogram}),i("div",{class:"label-name",innerHTML:t.name})),i("div",{class:"label-advice",innerHTML:t.advice}))))),this.currentTrek.advised_parking&&i("div",{class:"advised-parking-container"},i("div",{class:"advised-parking-title"},"Parking conseillé"),i("div",{class:"advised_parking",innerHTML:this.currentTrek.advised_parking})),this.currentTrek.gear&&i("div",{class:"gear-container"},i("div",{class:"gear-title"},"Équipements"),i("div",{class:"gear",innerHTML:this.currentTrek.gear})),o.currentSensitiveAreas&&o.currentSensitiveAreas.length>0&&i("div",{class:"sensitive-areas-container"},i("div",{class:"sensitive-areas-title"},"Zones de sensibilité environnementale"),o.currentSensitiveAreas.map((t=>i("grw-sensitive-area-detail",{sensitiveArea:t})))),o.currentInformationDesks&&o.currentInformationDesks.length>0&&i("div",{class:"information-desks-container"},i("div",{class:"information-desks-title"},"Lieux de renseignement"),o.currentInformationDesks.map((t=>i("grw-information-desk-detail",{informationDesk:t})))),(this.currentTrek.disabled_infrastructure||this.accessibilities&&this.accessibilities.length>0||this.currentTrek.accessibility_level||this.currentTrek.accessibility_slope||this.currentTrek.accessibility_width||this.currentTrek.accessibility_signage||this.currentTrek.accessibility_covering||this.currentTrek.accessibility_exposure||this.currentTrek.accessibility_advice)&&i("div",{class:"accessibilities-container"},i("div",{class:"accessibilities-title"},"Accessibilité"),this.currentTrek.disabled_infrastructure&&i("div",{innerHTML:this.currentTrek.disabled_infrastructure}),i("div",{class:"accessibilities-content-container"},this.accessibilities.map((t=>i("div",{class:"accessibility-content-container"},i("img",{src:t.pictogram}),i("div",{innerHTML:t.name}))))),this.currentTrek.accessibility_level&&i("div",{class:"accessibility-level-container"},i("div",{class:"accessibility-level-title"},"Niveau d'accessibilité"),i("div",{innerHTML:this.accessibilityLevel.name})),this.currentTrek.accessibility_slope&&i("div",{class:"accessibility-slope-container"},i("div",{class:"accessibility-slope-title"},"Pente"),i("div",{innerHTML:this.currentTrek.accessibility_slope})),this.currentTrek.accessibility_width&&i("div",{class:"accessibility-width-container"},i("div",{class:"accessibility-width-title"},"Largeur"),i("div",{innerHTML:this.currentTrek.accessibility_width})),this.currentTrek.accessibility_signage&&i("div",{class:"accessibility-signage-container"},i("div",{class:"accessibility-signage-title"},"Pente"),i("div",{innerHTML:this.currentTrek.accessibility_signage})),this.currentTrek.accessibility_covering&&i("div",{class:"accessibility-covering-container"},i("div",{class:"accessibility-covering-title"},"Revêtement"),i("div",{innerHTML:this.currentTrek.accessibility_covering})),this.currentTrek.accessibility_exposure&&i("div",{class:"accessibility-exposure-container"},i("div",{class:"accessibility-exposure-title"},"Exposition"),i("div",{innerHTML:this.currentTrek.accessibility_exposure})),this.currentTrek.accessibility_advice&&i("div",{class:"accessibility-advice-container"},i("div",{class:"accessibility-advice-title"},"Conseils"),i("div",{innerHTML:this.currentTrek.accessibility_advice}))),o.currentPois&&o.currentPois.length>0&&i("div",{class:"pois-container"},i("div",{class:"pois-title"},"Points d'intérêts"),o.currentPois.map((t=>i("grw-poi-detail",{poi:t})))),this.currentTrek.source&&this.currentTrek.source.length>0&&i("div",{class:"source-container"},i("div",{class:"source-title"},"Sources"),this.sources.map((t=>i("div",{class:"source-sub-container"},t.pictogram&&i("img",{src:t.pictogram}),i("div",null,i("div",{class:"source-name",innerHTML:t.name}),i("a",{class:"source-advice",innerHTML:t.website}))))))))}};g.style='grw-sensitive-area-detail,grw-information-desk-detail,grw-poi-detail{margin-top:12px}.trek-detail-container{font-family:"Roboto";display:flex;flex-direction:column;height:100%;overflow-y:auto}.trek-detail-container .name{color:var(--color-primary);font-size:48px;font-weight:bold;padding:24px}.trek-detail-container .image{border-radius:8px;align-self:center;width:100%;max-width:700px;height:auto;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-detail-container .sub-container{padding:24px}.trek-detail-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-detail-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-detail-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:24px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label{display:flex;justify-content:center;align-items:center;width:33.3333333333%}.trek-detail-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 8px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label img,.trek-detail-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:24px}.trek-detail-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}.trek-detail-container .downloads-container{padding:0px 24px 24px 24px;display:flex;flex-direction:column;justify-content:center;align-items:center}.trek-detail-container .downloads-container .download-title{color:var(--color-primary);font-size:18px;margin-bottom:12px}.trek-detail-container .downloads-container .links-container{display:flex}.trek-detail-container .downloads-container .links-container a{background-color:var(--color-primary);padding:8px;color:#ffffff;text-decoration:none;border-radius:8px}.trek-detail-container .downloads-container .links-container a:nth-child(2){margin:0px 12px}.trek-detail-container .downloads-container .links-container a:hover{background-color:var(--color-primary-shade)}.trek-detail-container .themes-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap;padding:0px 24px 24px 24px}.trek-detail-container .themes-container .theme{background-color:var(--color-primary-tint);color:#ffffff;border-radius:8px;padding:8px;margin:0px 8px 8px 0px}.trek-detail-container .ambiance,.trek-detail-container .description-teaser,.trek-detail-container .description-container,.trek-detail-container .altimetric-profile-container,.trek-detail-container .access-container,.trek-detail-container .public-transport-container,.trek-detail-container .advice-container,.trek-detail-container .advised-parking-container,.trek-detail-container .gear-container,.trek-detail-container .pois-container,.trek-detail-container .sensitive-areas-container,.trek-detail-container .information-desks-container,.trek-detail-container .source-container,.trek-detail-container .accessibilities-container{padding:0px 24px 24px 24px}.trek-detail-container .ambiance a,.trek-detail-container .description-teaser a,.trek-detail-container .description-container a,.trek-detail-container .altimetric-profile-container a,.trek-detail-container .access-container a,.trek-detail-container .public-transport-container a,.trek-detail-container .advice-container a,.trek-detail-container .advised-parking-container a,.trek-detail-container .gear-container a,.trek-detail-container .pois-container a,.trek-detail-container .sensitive-areas-container a,.trek-detail-container .information-desks-container a,.trek-detail-container .source-container a,.trek-detail-container .accessibilities-container a{color:var(--color-primary)}.trek-detail-container .description-title,.trek-detail-container .altimetric-profile-title,.trek-detail-container .access-title,.trek-detail-container .public-transport-title,.trek-detail-container .advice-title,.trek-detail-container .advised-parking-title,.trek-detail-container .gear-title,.trek-detail-container .pois-title,.trek-detail-container .sensitive-areas-title,.trek-detail-container .information-desks-title,.trek-detail-container .source-title,.trek-detail-container .accessibilities-title{color:var(--color-primary);font-size:36px;font-weight:bold;margin:12px 0px}.label-container .label-sub-container{display:flex;align-items:center}.label-container .label-sub-container img{width:26px;margin-right:16px}.label-container .label-sub-container .label-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:12px 0px}.source-container .source-sub-container{display:flex;align-items:center}.source-container .source-sub-container img{width:26px;margin-right:16px}.source-container .source-sub-container .source-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:12px 0px}.departure-container,.arrival-container{display:flex;align-items:center;padding:0px 24px 24px 24px}.departure-container .departure-title,.departure-container .arrival-title,.arrival-container .departure-title,.arrival-container .arrival-title{color:var(--color-primary);font-weight:bold}.accessibilities-container .accessibilities-content-container{padding:12px 0px 0px 0px;display:flex}.accessibilities-container .accessibilities-content-container .accessibility-content-container{display:flex;align-items:center;margin:0px 8px 8px 0px}.accessibilities-container .accessibilities-content-container .accessibility-content-container img{margin-right:16px;width:26px}.accessibilities-container .accessibility-level-title,.accessibilities-container .accessibility-slope-title,.accessibilities-container .accessibility-width-title,.accessibilities-container .accessibility-signage-title,.accessibilities-container .accessibility-covering-title,.accessibilities-container .accessibility-exposure-title,.accessibilities-container .accessibility-advice-title{color:var(--color-primary);font-size:24px;padding:12px 0px}';const b=class{constructor(i){t(this,i),this.language="fr",this.trekNetworkError=!1,this.controller=new AbortController,this.signal=this.controller.signal}connectedCallback(){o.api=this.api;const t=[];t.push(o.difficulties?new Response("null"):fetch(`${this.api}trek_difficulty/?language=${this.language}&fields=id,label,pictogram`,{signal:this.signal})),t.push(o.routes?new Response("null"):fetch(`${this.api}trek_route/?language=${this.language}&fields=id,route,pictogram`,{signal:this.signal})),t.push(o.practices?new Response("null"):fetch(`${this.api}trek_practice/?language=${this.language}&fields=id,name,pictogram`,{signal:this.signal})),t.push(o.themes?new Response("null"):fetch(`${this.api}theme/?language=${this.language}&fields=id,label,pictogram`,{signal:this.signal})),Promise.all([...t,fetch(`${this.api}sensitivearea/?language=${this.language}&published=true&trek=${this.trekId}&fields=id,geometry,name,description,contact,info_url,period,practices`,{signal:this.signal}).catch((()=>new Response("null"))),fetch(`${this.api}label/?language=${this.language}&fields=id,name,advice,pictogram`,{signal:this.signal}),fetch(`${this.api}source/?language=${this.language}&fields=id,name,website,pictogram`,{signal:this.signal}),fetch(`${this.api}trek_accessibility/?language=${this.language}&fields=id,name,pictogram`,{signal:this.signal}),fetch(`${this.api}trek_accessibility_level/?language=${this.language}&fields=id,name`,{signal:this.signal}).catch((()=>new Response("null"))),fetch(`${this.api}poi/?language=${this.language}&trek=${this.trekId}&published=true&fields=id,name,description,attachments,type,type_label,type_pictogram,url,published,geometry&page_size=999`,{signal:this.signal}),fetch(`${this.api}informationdesk/?language=${this.language}&near_trek=${this.trekId}&fields=id,name,description,type,phone,email,website,municipality,postal_code,street,photo_url,latitude,longitude&page_size=999`,{signal:this.signal}),fetch(`${this.api}trek/${this.trekId}/?language=${this.language}&published=true&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,geometry,gpx,kml,pdf,parking_location,departure,arrival,altimetric_profile,ambiance,access,public_transport,advice,advised_parking,gear,labels,source,points_reference,disabled_infrastructure,accessibility_level,accessibility_slope,accessibility_width,accessibility_signage,accessibility_covering,accessibility_exposure,accessibility_advice,accessibilities`,{signal:this.signal})]).then((t=>Promise.all(t.map((t=>t.json()))))).then((([t,i,e,n,s,r,h,a,c,l,u,f])=>{o.trekNetworkError=!1,t&&(o.difficulties=t.results),i&&(o.routes=i.results),e&&(o.practices=e.results.map((t=>Object.assign(Object.assign({},t),{selected:!1})))),n&&(o.themes=n.results),s&&(o.currentSensitiveAreas=s.results),o.labels=r.results,o.sources=h.results,o.accessibilities=a.results,c&&(o.accessibilitiesLevel=c.results),o.currentPois=l.results,o.currentInformationDesks=u.results,o.currentTrek=f})).catch((()=>{o.trekNetworkError=!0}))}disconnectedCallback(){this.controller.abort(),o.currentTrek=null,o.trekNetworkError=!1}render(){return i(e,null)}},w=class{constructor(i){t(this,i),this.treksToDisplay=[],this.colorPrimary="#6b0030",this.colorPrimaryTint="#974c6e",this.isLargeView=!1,this.step=10,this.handleInfiniteScrollBind=this.handleInfiniteScroll.bind(this)}connectedCallback(){this.element.addEventListener("scroll",this.handleInfiniteScrollBind),o.currentTreks&&(this.treksToDisplay=[...o.currentTreks.slice(0,this.step)]),r("currentTreks",(()=>{this.element.scroll({top:0}),o.currentTreks&&(this.treksToDisplay=[...o.currentTreks.slice(0,this.step)])})),r("treksWithinBounds",(()=>{this.element.scroll({top:0}),o.treksWithinBounds&&(this.treksToDisplay=[...o.treksWithinBounds.slice(0,this.step)])}))}handleInfiniteScroll(t){t.composedPath()[0].scrollTop+t.composedPath()[0].scrollHeight/2>=t.composedPath()[0].scrollHeight&&(this.treksToDisplay.length<o.treksWithinBounds.length?this.treksToDisplay=o.treksWithinBounds.slice(0,this.treksToDisplay.length+this.step>=o.treksWithinBounds.length?o.treksWithinBounds.length:this.treksToDisplay.length+this.step):this.element.removeEventListener("scroll",this.handleInfiniteScrollBind))}disconnectedCallback(){this.element.removeEventListener("scroll",this.handleInfiniteScrollBind)}render(){return i(e,{style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint}},this.treksToDisplay.map((t=>i("grw-trek-card",{key:`trek-${t.id}`,trek:t,"is-large-view":this.isLargeView,"color-primary":this.colorPrimary,"color-primary-tint":this.colorPrimaryTint}))))}get element(){return s(this)}};w.style=':host{font-family:"Roboto";width:100%;height:100%;max-height:100vh;overflow-y:auto;display:flex;flex-wrap:wrap;justify-content:space-around}grw-trek-card{margin:6px}';const y=class{constructor(i){t(this,i),this.language="fr",this.controller=new AbortController,this.signal=this.controller.signal}connectedCallback(){o.api=this.api;let t=`${this.api}trek/?language=${this.language}&published=true`;this.inBbox&&(t+=`&in_bbox=${this.inBbox}`),this.cities&&(t+=`&cities=${this.cities}`),this.districts&&(t+=`&districts=${this.districts}`),this.structures&&(t+=`&structures=${this.structures}`),this.themes&&(t+=`&themes=${this.themes}`),this.portals&&(t+=`&portals=${this.portals}`),this.routes&&(t+=`&routes=${this.routes}`),this.practices&&(t+=`&practices=${this.practices}`),t+="&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,departure,departure_geom&page_size=999",Promise.all([fetch(`${this.api}trek_difficulty/?language=${this.language}&fields=id,label,pictogram`,{signal:this.signal}),fetch(`${this.api}trek_route/?language=${this.language}&fields=id,route,pictogram`,{signal:this.signal}),fetch(`${this.api}trek_practice/?language=${this.language}&fields=id,name,pictogram`,{signal:this.signal}),fetch(`${this.api}theme/?language=${this.language}&fields=id,label,pictogram`,{signal:this.signal}),fetch(t,{signal:this.signal})]).then((t=>Promise.all(t.map((t=>t.json()))))).then((([t,i,e,n,s])=>{o.treksNetworkError=!1,o.difficulties=t.results,o.routes=i.results,o.practices=e.results.map((t=>Object.assign(Object.assign({},t),{selected:!1}))),o.themes=n.results,o.durations=[{id:1,name:"0 - 1h",minValue:0,maxValue:1,selected:!1},{id:2,name:"1 - 2h",minValue:1,maxValue:2,selected:!1},{id:3,name:"2 - 5h",minValue:2,maxValue:5,selected:!1},{id:4,name:"5 - 10h",minValue:5,maxValue:10,selected:!1}],o.treks=s.results,o.currentTreks=s.results,o.treksWithinBounds=s.results})).catch((()=>o.treksNetworkError=!0))}disconnectedCallback(){this.controller.abort(),o.treksNetworkError=!1}render(){return i(e,null)}};export{d as grw_filter,m as grw_map,g as grw_trek_detail,b as grw_trek_provider,w as grw_treks_list,y as grw_treks_provider}
1
+ import{r as t,h as i,H as e,c as n,g as s}from"./p-b62909db.js";import{s as o,o as r}from"./p-22562f4d.js";import{d as h,f as a,l as c,a as l,b as u,c as f}from"./p-f3f7d6be.js";const d=class{constructor(i){t(this,i),this.filters=[{property:"practices",trekProperty:"practice",type:"include"},{property:"difficulties",trekProperty:"difficulty",type:"include"},{property:"durations",trekProperty:"duration",type:"interval"}]}handleFilter(t,i){const e=[...o[this.filterType]];e.find((t=>t.id===i.id)).selected=!e.find((t=>t.id===i.id)).selected,o[this.filterType]=e;let n=!1,s=[];for(const t of this.filters){const i=o[t.property].filter((t=>t.selected)).map((t=>t.id));if(i.length>0)if(s.length>0)"include"===t.type?s=[...s.filter((e=>i.includes(e[t.trekProperty])))]:"interval"===t.type&&(s=[...s.filter((e=>{for(const n of i){const i=o[t.property].find((t=>t.id===n));if(e[t.trekProperty]>=i.minValue&&e[t.trekProperty]<=i.maxValue)return!0}return!1}))]);else if(n||(n=!0),"include"===t.type)s=[...o.treks.filter((e=>i.includes(e[t.trekProperty])))];else if("interval"===t.type){let e,n;for(const s of i){const i=o[t.property].find((t=>t.id===s));(isNaN(e)||i.minValue<e)&&(e=i.minValue),(isNaN(n)||i.maxValue>n)&&(n=i.maxValue)}s=[...o.treks.filter((i=>i[t.trekProperty]>=e&&i[t.trekProperty]<=n))]}}o.currentTreks=n?s:o.treks}render(){return i(e,null,i("div",{class:"filter-name"},this.filterName),i("div",{class:"filter-button-container"},o[this.filterType].map((t=>i("div",{onClick:i=>this.handleFilter(i,t),class:t.selected?"selected-filter-button":"filter-button"},t[this.filterNameProperty])))))}};d.style=".filter-name{margin-left:8px;color:var(--color-primary);font-size:24px;font-weight:bold}.filter-button-container{display:flex;flex-direction:row;flex-wrap:wrap}.filter-button-container .filter-button,.filter-button-container .selected-filter-button{user-select:none;cursor:pointer;border:1px var(--color-primary) solid;border-radius:8px;margin:8px 0px 0px 8px;padding:8px}.filter-button-container .filter-button{color:var(--color-primary);background-color:#ffffff}.filter-button-container .selected-filter-button{color:#ffffff;background-color:var(--color-primary)}","undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var p,v=(function(t){function i(t){var i,e,n,s;for(e=1,n=arguments.length;e<n;e++)for(i in s=arguments[e])t[i]=s[i];return t}var e=Object.create||function(){function t(){}return function(i){return t.prototype=i,new t}}();function n(t,i){var e=Array.prototype.slice;if(t.bind)return t.bind.apply(t,e.call(arguments,1));var n=e.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(e.call(arguments)):arguments)}}var s=0;function o(t){return"_leaflet_id"in t||(t._leaflet_id=++s),t._leaflet_id}function r(t,i,e){var n,s,o,r;return r=function(){n=!1,s&&(o.apply(e,s),s=!1)},o=function(){n?s=arguments:(t.apply(e,arguments),setTimeout(r,i),n=!0)}}function h(t,i,e){var n=i[1],s=i[0],o=n-s;return t===n&&e?t:((t-s)%o+o)%o+s}function a(){return!1}function c(t,i){if(!1===i)return t;var e=Math.pow(10,void 0===i?6:i);return Math.round(t*e)/e}function l(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function u(t){return l(t).split(/\s+/)}function f(t,i){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?e(t.options):{}),i)t.options[n]=i[n];return t.options}function d(t,i,e){var n=[];for(var s in t)n.push(encodeURIComponent(e?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")}var p=/\{ *([\w_ -]+) *\}/g;function v(t,i){return t.replace(p,(function(t,e){var n=i[e];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(i)),n}))}var m=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function g(t,i){for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1}var b="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function w(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var y=0;function x(t){var i=+new Date,e=Math.max(0,16-(i-y));return y=i+e,window.setTimeout(t,e)}var _=window.requestAnimationFrame||w("RequestAnimationFrame")||x,k=window.cancelAnimationFrame||w("CancelAnimationFrame")||w("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function M(t,i,e){if(!e||_!==x)return _.call(window,n(t,i));t.call(i)}function z(t){t&&k.call(window,t)}var T={__proto__:null,extend:i,create:e,bind:n,get lastId(){return s},stamp:o,throttle:r,wrapNum:h,falseFn:a,formatNum:c,trim:l,splitWords:u,setOptions:f,getParamString:d,template:v,isArray:m,indexOf:g,emptyImageUrl:b,requestFn:_,cancelFn:k,requestAnimFrame:M,cancelAnimFrame:z};function P(){}P.extend=function(t){var n=function(){f(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=n.__super__=this.prototype,o=e(s);for(var r in o.constructor=n,n.prototype=o,this)Object.prototype.hasOwnProperty.call(this,r)&&"prototype"!==r&&"__super__"!==r&&(n[r]=this[r]);return t.statics&&i(n,t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=m(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),i.apply(null,[o].concat(t.includes))),i(o,t),delete o.statics,delete o.includes,o.options&&(o.options=s.options?e(s.options):{},i(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=o._initHooks.length;t<i;t++)o._initHooks[t].call(this)}},n},P.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},P.mergeOptions=function(t){return i(this.prototype.options,t),this},P.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),e="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(e),this};var C={on:function(t,i,e){if("object"==typeof t)for(var n in t)this._on(n,t[n],i);else for(var s=0,o=(t=u(t)).length;s<o;s++)this._on(t[s],i,e);return this},off:function(t,i,e){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],i);else{t=u(t);for(var s=1===arguments.length,o=0,r=t.length;o<r;o++)s?this._off(t[o]):this._off(t[o],i,e)}else delete this._events;return this},_on:function(t,i,e){if("function"==typeof i){this._events=this._events||{};var n=this._events[t];n||(this._events[t]=n=[]),e===this&&(e=void 0);for(var s={fn:i,ctx:e},o=n,r=0,h=o.length;r<h;r++)if(o[r].fn===i&&o[r].ctx===e)return;o.push(s)}else console.warn("wrong listener type: "+typeof i)},_off:function(t,i,e){var n,s,o;if(this._events&&(n=this._events[t]))if(1!==arguments.length)if(e===this&&(e=void 0),"function"==typeof i){for(s=0,o=n.length;s<o;s++){var r=n[s];if(r.ctx===e&&r.fn===i)return this._firingCount&&(r.fn=a,this._events[t]=n=n.slice()),void n.splice(s,1)}console.warn("listener not found")}else console.warn("wrong listener type: "+typeof i);else{if(this._firingCount)for(s=0,o=n.length;s<o;s++)n[s].fn=a;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var s=i({},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 r=0,h=o.length;r<h;r++){var a=o[r];a.fn.call(a.ctx||this,s)}this._firingCount--}}return n&&this._propagateEvent(s),this},listens:function(t,i){"string"!=typeof t&&console.warn('"string" type argument expected');var e=this._events&&this._events[t];if(e&&e.length)return!0;if(i)for(var n in this._eventParents)if(this._eventParents[n].listens(t,i))return!0;return!1},once:function(t,i,e){if("object"==typeof t){for(var s in t)this.once(s,t[s],i);return this}var o=n((function(){this.off(t,i,e).off(t,o,e)}),this);return this.on(t,i,e).on(t,o,e)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[o(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[o(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};C.addEventListener=C.on,C.removeEventListener=C.clearAllEventListeners=C.off,C.addOneTimeEventListener=C.once,C.fireEvent=C.fire,C.hasEventListeners=C.listens;var A=P.extend(C);function S(t,i,e){this.x=e?Math.round(t):t,this.y=e?Math.round(i):i}var E=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function O(t,i,e){return t instanceof S?t:m(t)?new S(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new S(t.x,t.y):new S(t,i,e)}function I(t,i){if(t)for(var e=i?[t,i]:t,n=0,s=e.length;n<s;n++)this.extend(e[n])}function B(t,i){return!t||t instanceof I?t:new I(t,i)}function F(t,i){if(t)for(var e=i?[t,i]:t,n=0,s=e.length;n<s;n++)this.extend(e[n])}function j(t,i){return t instanceof F?t:new F(t,i)}function N(t,i,e){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==e&&(this.alt=+e)}function R(t,i,e){return t instanceof N?t:m(t)&&"object"!=typeof t[0]?3===t.length?new N(t[0],t[1],t[2]):2===t.length?new N(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new N(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new N(t,i,e)}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(t){return this.clone()._add(O(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(O(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new S(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new S(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=E(this.x),this.y=E(this.y),this},distanceTo:function(t){var i=(t=O(t)).x-this.x,e=t.y-this.y;return Math.sqrt(i*i+e*e)},equals:function(t){return(t=O(t)).x===this.x&&t.y===this.y},contains:function(t){return t=O(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},I.prototype={extend:function(t){return t=O(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new S((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new S(this.min.x,this.max.y)},getTopRight:function(){return new S(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 i,e;return(t="number"==typeof t[0]||t instanceof S?O(t):B(t))instanceof I?(i=t.min,e=t.max):i=e=t,i.x>=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=B(t);var i=this.min,e=this.max,n=t.min,s=t.max;return s.x>=i.x&&n.x<=e.x&&s.y>=i.y&&n.y<=e.y},overlaps:function(t){t=B(t);var i=this.min,e=this.max,n=t.min,s=t.max;return s.x>i.x&&n.x<e.x&&s.y>i.y&&n.y<e.y},isValid:function(){return!(!this.min||!this.max)}},F.prototype={extend:function(t){var i,e,n=this._southWest,s=this._northEast;if(t instanceof N)i=t,e=t;else{if(!(t instanceof F))return t?this.extend(R(t)||j(t)):this;if(e=t._northEast,!(i=t._southWest)||!e)return this}return n||s?(n.lat=Math.min(i.lat,n.lat),n.lng=Math.min(i.lng,n.lng),s.lat=Math.max(e.lat,s.lat),s.lng=Math.max(e.lng,s.lng)):(this._southWest=new N(i.lat,i.lng),this._northEast=new N(e.lat,e.lng)),this},pad:function(t){var i=this._southWest,e=this._northEast,n=Math.abs(i.lat-e.lat)*t,s=Math.abs(i.lng-e.lng)*t;return new F(new N(i.lat-n,i.lng-s),new N(e.lat+n,e.lng+s))},getCenter:function(){return new N((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 N(this.getNorth(),this.getWest())},getSouthEast:function(){return new N(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof N||"lat"in t?R(t):j(t);var i,e,n=this._southWest,s=this._northEast;return t instanceof F?(i=t.getSouthWest(),e=t.getNorthEast()):i=e=t,i.lat>=n.lat&&e.lat<=s.lat&&i.lng>=n.lng&&e.lng<=s.lng},intersects:function(t){t=j(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),s=t.getNorthEast();return s.lat>=i.lat&&n.lat<=e.lat&&s.lng>=i.lng&&n.lng<=e.lng},overlaps:function(t){t=j(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),s=t.getNorthEast();return s.lat>i.lat&&n.lat<e.lat&&s.lng>i.lng&&n.lng<e.lng},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=j(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}},N.prototype={equals:function(t,i){return!!t&&(t=R(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===i?1e-9:i))},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return H.distance(this,R(t))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,e=i/Math.cos(Math.PI/180*this.lat);return j([this.lat-i,this.lng-e],[this.lat+i,this.lng+e])},clone:function(){return new N(this.lat,this.lng,this.alt)}};var Z,D={latLngToPoint:function(t,i){var e=this.projection.project(t),n=this.scale(i);return this.transformation._transform(e,n)},pointToLatLng:function(t,i){var e=this.scale(i),n=this.transformation.untransform(t,e);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 i=this.projection.bounds,e=this.scale(t);return new I(this.transformation.transform(i.min,e),this.transformation.transform(i.max,e))},infinite:!1,wrapLatLng:function(t){var i=this.wrapLng?h(t.lng,this.wrapLng,!0):t.lng;return new N(this.wrapLat?h(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),e=this.wrapLatLng(i),n=i.lat-e.lat,s=i.lng-e.lng;if(0===n&&0===s)return t;var o=t.getSouthWest(),r=t.getNorthEast();return new F(new N(o.lat-n,o.lng-s),new N(r.lat-n,r.lng-s))}},H=i({},D,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var e=Math.PI/180,n=t.lat*e,s=i.lat*e,o=Math.sin((i.lat-t.lat)*e/2),r=Math.sin((i.lng-t.lng)*e/2),h=o*o+Math.cos(n)*Math.cos(s)*r*r,a=2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h));return this.R*a}}),$=6378137,U={R:$,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,e=this.MAX_LATITUDE,n=Math.max(Math.min(e,t.lat),-e),s=Math.sin(n*i);return new S(this.R*t.lng*i,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var i=180/Math.PI;return new N((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:(Z=$*Math.PI,new I([-Z,-Z],[Z,Z]))};function W(t,i,e,n){if(m(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=i,this._c=e,this._d=n}function V(t,i,e,n){return new W(t,i,e,n)}W.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){return t.x=(i=i||1)*(this._a*t.x+this._b),t.y=i*(this._c*t.y+this._d),t},untransform:function(t,i){return new S((t.x/(i=i||1)-this._b)/this._a,(t.y/i-this._d)/this._c)}};var G=i({},H,{code:"EPSG:3857",projection:U,transformation:function(){var t=.5/(Math.PI*U.R);return V(t,.5,-t,.5)}()}),q=i({},G,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function J(t,i){var e,n,s,o,r,h,a="";for(e=0,s=t.length;e<s;e++){for(n=0,o=(r=t[e]).length;n<o;n++)a+=(n?"L":"M")+(h=r[n]).x+" "+h.y;a+=i?Ot.svg?"z":"x":""}return a||"M0 0"}var K,Q=document.documentElement.style,Y="ActiveXObject"in window,tt=Y&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),et=Et("webkit"),nt=Et("android"),st=Et("android 2")||Et("android 3"),ot=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),rt=nt&&Et("Google")&&ot<537&&!("AudioNode"in window),ht=!!window.opera,at=!it&&Et("chrome"),ct=Et("gecko")&&!et&&!ht&&!Y,lt=!at&&Et("safari"),ut=Et("phantom"),ft="OTransition"in Q,dt=0===navigator.platform.indexOf("Win"),pt=Y&&"transition"in Q,vt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!st,mt="MozPerspective"in Q,gt=!window.L_DISABLE_3D&&(pt||vt||mt)&&!ft&&!ut,bt="undefined"!=typeof orientation||Et("mobile"),wt=bt&&et,yt=bt&&vt,xt=!window.PointerEvent&&window.MSPointerEvent,_t=!(!window.PointerEvent&&!xt),kt="ontouchstart"in window||!!window.TouchEvent,Mt=!window.L_NO_TOUCH&&(kt||_t),zt=bt&&ht,Tt=bt&&ct,Pt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Lt=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",a,i),window.removeEventListener("testPassiveEventSupport",a,i)}catch(t){}return t}(),Ct=!!document.createElement("canvas").getContext,At=!(!document.createElementNS||!X("svg").createSVGRect),St=!!At&&((K=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(K.firstChild&&K.firstChild.namespaceURI));function Et(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Ot={ie:Y,ielt9:tt,edge:it,webkit:et,android:nt,android23:st,androidStock:rt,opera:ht,chrome:at,gecko:ct,safari:lt,phantom:ut,opera12:ft,win:dt,ie3d:pt,webkit3d:vt,gecko3d:mt,any3d:gt,mobile:bt,mobileWebkit:wt,mobileWebkit3d:yt,msPointer:xt,pointer:_t,touch:Mt,touchNative:kt,mobileOpera:zt,mobileGecko:Tt,retina:Pt,passiveEvents:Lt,canvas:Ct,svg:At,vml:!At&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}(),inlineSvg:St},It=Ot.msPointer?"MSPointerDown":"pointerdown",Bt=Ot.msPointer?"MSPointerMove":"pointermove",Ft=Ot.msPointer?"MSPointerUp":"pointerup",jt=Ot.msPointer?"MSPointerCancel":"pointercancel",Nt={touchstart:It,touchmove:Bt,touchend:Ft,touchcancel:jt},Rt={touchstart:function(t,i){i.MSPOINTER_TYPE_TOUCH&&i.pointerType===i.MSPOINTER_TYPE_TOUCH&&Fi(i),Vt(t,i)},touchmove:Vt,touchend:Vt,touchcancel:Vt},Zt={},Dt=!1;function Ht(t,i,e){return"touchstart"===i&&(Dt||(document.addEventListener(It,$t,!0),document.addEventListener(Bt,Ut,!0),document.addEventListener(Ft,Wt,!0),document.addEventListener(jt,Wt,!0),Dt=!0)),Rt[i]?(e=Rt[i].bind(this,e),t.addEventListener(Nt[i],e,!1),e):(console.warn("wrong event specified:",i),L.Util.falseFn)}function $t(t){Zt[t.pointerId]=t}function Ut(t){Zt[t.pointerId]&&(Zt[t.pointerId]=t)}function Wt(t){delete Zt[t.pointerId]}function Vt(t,i){if(i.pointerType!==(i.MSPOINTER_TYPE_MOUSE||"mouse")){for(var e in i.touches=[],Zt)i.touches.push(Zt[e]);i.changedTouches=[i],t(i)}}var Gt,qt,Xt,Jt,Kt,Qt=pi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Yt=pi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ti="webkitTransition"===Yt||"OTransition"===Yt?Yt+"End":"transitionend";function ii(t){return"string"==typeof t?document.getElementById(t):t}function ei(t,i){var e=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!e||"auto"===e)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);e=n?n[i]:null}return"auto"===e?null:e}function ni(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function si(t){var i=t.parentNode;i&&i.removeChild(t)}function oi(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ri(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function hi(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function ai(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=fi(t);return e.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function ci(t,i){if(void 0!==t.classList)for(var e=u(i),n=0,s=e.length;n<s;n++)t.classList.add(e[n]);else if(!ai(t,i)){var o=fi(t);ui(t,(o?o+" ":"")+i)}}function li(t,i){void 0!==t.classList?t.classList.remove(i):ui(t,l((" "+fi(t)+" ").replace(" "+i+" "," ")))}function ui(t,i){void 0===t.className.baseVal?t.className=i:t.className.baseVal=i}function fi(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function di(t,i){"opacity"in t.style?t.style.opacity=i:"filter"in t.style&&function(t,i){var e=!1,n="DXImageTransform.Microsoft.Alpha";try{e=t.filters.item(n)}catch(t){if(1===i)return}i=Math.round(100*i),e?(e.Enabled=100!==i,e.Opacity=i):t.style.filter+=" progid:"+n+"(opacity="+i+")"}(t,i)}function pi(t){for(var i=document.documentElement.style,e=0;e<t.length;e++)if(t[e]in i)return t[e];return!1}function vi(t,i,e){var n=i||new S(0,0);t.style[Qt]=(Ot.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")}function mi(t,i){t._leaflet_pos=i,Ot.any3d?vi(t,i):(t.style.left=i.x+"px",t.style.top=i.y+"px")}function gi(t){return t._leaflet_pos||new S(0,0)}if("onselectstart"in document)Gt=function(){Ti(window,"selectstart",Fi)},qt=function(){Li(window,"selectstart",Fi)};else{var bi=pi(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Gt=function(){if(bi){var t=document.documentElement.style;Xt=t[bi],t[bi]="none"}},qt=function(){bi&&(document.documentElement.style[bi]=Xt,Xt=void 0)}}function wi(){Ti(window,"dragstart",Fi)}function yi(){Li(window,"dragstart",Fi)}function xi(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(_i(),Jt=t,Kt=t.style.outline,t.style.outline="none",Ti(window,"keydown",_i))}function _i(){Jt&&(Jt.style.outline=Kt,Jt=void 0,Kt=void 0,Li(window,"keydown",_i))}function ki(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Mi(t){var i=t.getBoundingClientRect();return{x:i.width/t.offsetWidth||1,y:i.height/t.offsetHeight||1,boundingClientRect:i}}var zi={__proto__:null,TRANSFORM:Qt,TRANSITION:Yt,TRANSITION_END:ti,get:ii,getStyle:ei,create:ni,remove:si,empty:oi,toFront:ri,toBack:hi,hasClass:ai,addClass:ci,removeClass:li,setClass:ui,getClass:fi,setOpacity:di,testProp:pi,setTransform:vi,setPosition:mi,getPosition:gi,get disableTextSelection(){return Gt},get enableTextSelection(){return qt},disableImageDrag:wi,enableImageDrag:yi,preventOutline:xi,restoreOutline:_i,getSizedParentNode:ki,getScale:Mi};function Ti(t,i,e,n){if(i&&"object"==typeof i)for(var s in i)Si(t,s,i[s],e);else for(var o=0,r=(i=u(i)).length;o<r;o++)Si(t,i[o],e,n);return this}var Pi="_leaflet_events";function Li(t,i,e,n){if(1===arguments.length)Ci(t),delete t[Pi];else if(i&&"object"==typeof i)for(var s in i)Ei(t,s,i[s],e);else if(i=u(i),2===arguments.length)Ci(t,(function(t){return-1!==g(i,t)}));else for(var o=0,r=i.length;o<r;o++)Ei(t,i[o],e,n);return this}function Ci(t,i){for(var e in t[Pi]){var n=e.split(/\d/)[0];i&&!i(n)||Ei(t,n,null,null,e)}}var Ai={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Si(t,i,e,n){var s=i+o(e)+(n?"_"+o(n):"");if(t[Pi]&&t[Pi][s])return this;var r=function(i){return e.call(n||t,i||window.event)},h=r;!Ot.touchNative&&Ot.pointer&&0===i.indexOf("touch")?r=Ht(t,i,r):Ot.touch&&"dblclick"===i?r=function(t,i){t.addEventListener("dblclick",i);var e,n=0;function s(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var s=Date.now();s-n<=200?2==++e&&i(function(t){var i,e,n={};for(e in t)n[e]=(i=t[e])&&i.bind?i.bind(t):i;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):e=1,n=s}}else e=t.detail}return t.addEventListener("click",s),{dblclick:i,simDblclick:s}}(t,r):"addEventListener"in t?"touchstart"===i||"touchmove"===i||"wheel"===i||"mousewheel"===i?t.addEventListener(Ai[i]||i,r,!!Ot.passiveEvents&&{passive:!1}):"mouseenter"===i||"mouseleave"===i?t.addEventListener(Ai[i],r=function(i){i=i||window.event,Di(t,i)&&h(i)},!1):t.addEventListener(i,h,!1):t.attachEvent("on"+i,r),t[Pi]=t[Pi]||{},t[Pi][s]=r}function Ei(t,i,e,n,s){s=s||i+o(e)+(n?"_"+o(n):"");var r=t[Pi]&&t[Pi][s];if(!r)return this;!Ot.touchNative&&Ot.pointer&&0===i.indexOf("touch")?function(t,i,e){Nt[i]?t.removeEventListener(Nt[i],e,!1):console.warn("wrong event specified:",i)}(t,i,r):Ot.touch&&"dblclick"===i?function(t,i){t.removeEventListener("dblclick",i.dblclick),t.removeEventListener("click",i.simDblclick)}(t,r):"removeEventListener"in t?t.removeEventListener(Ai[i]||i,r,!1):t.detachEvent("on"+i,r),t[Pi][s]=null}function Oi(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ii(t){return Si(t,"wheel",Oi),this}function Bi(t){return Ti(t,"mousedown touchstart dblclick contextmenu",Oi),t._leaflet_disable_click=!0,this}function Fi(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function ji(t){return Fi(t),Oi(t),this}function Ni(t,i){if(!i)return new S(t.clientX,t.clientY);var e=Mi(i),n=e.boundingClientRect;return new S((t.clientX-n.left)/e.x-i.clientLeft,(t.clientY-n.top)/e.y-i.clientTop)}var Ri=Ot.win&&Ot.chrome?2*window.devicePixelRatio:Ot.gecko?window.devicePixelRatio:1;function Zi(t){return Ot.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ri:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function Di(t,i){var e=i.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(t){return!1}return e!==t}var Hi={__proto__:null,on:Ti,off:Li,stopPropagation:Oi,disableScrollPropagation:Ii,disableClickPropagation:Bi,preventDefault:Fi,stop:ji,getMousePosition:Ni,getWheelDelta:Zi,isExternalTarget:Di,addListener:Ti,removeListener:Li},$i=A.extend({run:function(t,i,e,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=gi(t),this._offset=i.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=M(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,e=1e3*this._duration;i<e?this._runFrame(this._easeOut(i/e),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){var e=this._startPos.add(this._offset.multiplyBy(t));i&&e._round(),mi(this._el,e),this.fire("step")},_complete:function(){z(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ui=A.extend({options:{crs:G,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,i){i=f(this,i),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=n(this._onResize,this),this._initEvents(),i.maxBounds&&this.setMaxBounds(i.maxBounds),void 0!==i.zoom&&(this._zoom=this._limitZoom(i.zoom)),i.center&&void 0!==i.zoom&&this.setView(R(i.center),i.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Yt&&Ot.any3d&&!Ot.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ti(this._proxy,ti,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(R(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),this)},setZoom:function(t,i){return this._loaded?this.setView(this.getCenter(),t,{zoom:i}):(this._zoom=t,this)},zoomIn:function(t,i){return this.setZoom(this._zoom+(t=t||(Ot.any3d?this.options.zoomDelta:1)),i)},zoomOut:function(t,i){return this.setZoom(this._zoom-(t=t||(Ot.any3d?this.options.zoomDelta:1)),i)},setZoomAround:function(t,i,e){var n=this.getZoomScale(i),s=this.getSize().divideBy(2),o=(t instanceof S?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/n),r=this.containerPointToLatLng(s.add(o));return this.setView(r,i,{zoom:e})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():j(t);var e=O(i.paddingTopLeft||i.padding||[0,0]),n=O(i.paddingBottomRight||i.padding||[0,0]),s=this.getBoundsZoom(t,!1,e.add(n));if((s="number"==typeof i.maxZoom?Math.min(i.maxZoom,s):s)===1/0)return{center:t.getCenter(),zoom:s};var o=n.subtract(e).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s);return{center:this.unproject(r.add(h).divideBy(2).add(o),s),zoom:s}},fitBounds:function(t,i){if(!(t=j(t)).isValid())throw new Error("Bounds are not valid.");var e=this._getBoundsCenterZoom(t,i);return this.setView(e.center,e.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){if(i=i||{},!(t=O(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==i.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new $i,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate){ci(this._mapPane,"leaflet-pan-anim");var e=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,e,i.duration||.25,i.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,i,e){if(!1===(e=e||{}).animate||!Ot.any3d)return this.setView(t,i,e);this._stop();var n=this.project(this.getCenter()),s=this.project(t),o=this.getSize(),r=this._zoom;t=R(t),i=void 0===i?r:i;var h=Math.max(o.x,o.y),a=h*this.getZoomScale(r,i),c=s.distanceTo(n)||1,l=1.42,u=2.0164;function f(t){var i=(a*a-h*h+(t?-1:1)*u*u*c*c)/(2*(t?a:h)*u*c),e=Math.sqrt(i*i+1)-i;return e<1e-9?-18:Math.log(e)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var v=f(0);function m(t){return h*(p(v)*(d(i=v+l*t)/p(i))-d(v))/u;var i}var g=Date.now(),b=(f(1)-v)/l,w=e.duration?1e3*e.duration:1e3*b*.8;return this._moveStart(!0,e.noMoveStart),function e(){var o=(Date.now()-g)/w,a=function(t){return 1-Math.pow(1-t,1.5)}(o)*b;o<=1?(this._flyToFrame=M(e,this),this._move(this.unproject(n.add(s.subtract(n).multiplyBy(m(a)/c)),r),this.getScaleZoom(h/function(t){return h*(p(v)/p(v+l*t))}(a),r),{flyTo:!0})):this._move(t,i)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,i){var e=this._getBoundsCenterZoom(t,i);return this.flyTo(e.center,e.zoom,i)},setMaxBounds:function(t){return(t=j(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var i=this.options.minZoom;return this.options.minZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var i=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,j(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e=O((i=i||{}).paddingTopLeft||i.padding||[0,0]),n=O(i.paddingBottomRight||i.padding||[0,0]),s=this.project(this.getCenter()),o=this.project(t),r=this.getPixelBounds(),h=B([r.min.add(e),r.max.subtract(n)]),a=h.getSize();if(!h.contains(o)){this._enforcingBounds=!0;var c=o.subtract(h.getCenter()),l=h.extend(o).getSize().subtract(a);s.x+=c.x<0?-l.x:l.x,s.y+=c.y<0?-l.y:l.y,this.panTo(this.unproject(s),i),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),o=e.divideBy(2).round(),r=s.divideBy(2).round(),h=o.subtract(r);return h.x||h.y?(t.animate&&t.pan?this.panBy(h):(t.pan&&this._rawPanBy(h),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(n(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:s})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=n(this._handleGeolocationResponse,this),s=n(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,s,t):navigator.geolocation.getCurrentPosition(e,s,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 i=t.code,e=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+e+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var i=new N(t.coords.latitude,t.coords.longitude),e=i.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var s=this.getBoundsZoom(e);this.setView(i,n.maxZoom?Math.min(s,n.maxZoom):s)}var o={latlng:i,bounds:e,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(o[r]=t.coords[r]);this.fire("locationfound",o)}},addHandler:function(t,i){if(!i)return this;var e=this[t]=new i(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),si(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)si(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var e=ni("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new F(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,e){t=j(t),e=O(e||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),o=this.getMaxZoom(),r=t.getNorthWest(),h=t.getSouthEast(),a=this.getSize().subtract(e),c=B(this.project(h,n),this.project(r,n)).getSize(),l=Ot.any3d?this.options.zoomSnap:1,u=a.x/c.x,f=a.y/c.y,d=i?Math.max(u,f):Math.min(u,f);return n=this.getScaleZoom(d,n),l&&(n=Math.round(n/(l/100))*(l/100),n=i?Math.ceil(n/l)*l:Math.floor(n/l)*l),Math.max(s,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new S(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var e=this._getTopLeftPoint(t,i);return new I(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs,n=e.zoom(t*e.scale(i=void 0===i?this._zoom:i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(R(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(O(t),i)},layerPointToLatLng:function(t){var i=O(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(R(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(R(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(j(t))},distance:function(t,i){return this.options.crs.distance(R(t),R(i))},containerPointToLayerPoint:function(t){return O(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return O(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(O(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(R(t)))},mouseEventToContainerPoint:function(t){return Ni(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 i=this._container=ii(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");Ti(i,"scroll",this._onScroll,this),this._containerId=o(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ot.any3d,ci(t,"leaflet-container"+(Ot.touch?" leaflet-touch":"")+(Ot.retina?" leaflet-retina":"")+(Ot.ielt9?" leaflet-oldie":"")+(Ot.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=ei(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&(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),mi(this._mapPane,new S(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ci(t.markerPane,"leaflet-zoom-hide"),ci(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i){mi(this._mapPane,new S(0,0));var e=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var n=this._zoom!==i;this._moveStart(n,!1)._move(t,i)._moveEnd(n),this.fire("viewreset"),e&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,e,n){void 0===i&&(i=this._zoom);var s=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?e&&e.pinch&&this.fire("zoom",e):((s||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){mi(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[o(this._container)]=this;var i=t?Li:Ti;i(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),Ot.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=M((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,i){for(var e,n=[],s="mouseout"===i||"mouseover"===i,r=t.target||t.srcElement,h=!1;r;){if((e=this._targets[o(r)])&&("click"===i||"preclick"===i)&&this._draggableMoved(e)){h=!0;break}if(e&&e.listens(i,!0)){if(s&&!Di(r,t))break;if(n.push(e),s)break}if(r===this._container)break;r=r.parentNode}return n.length||h||s||!this.listens(i,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var i=t.target||t.srcElement;if(!(!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i))){var e=t.type;"mousedown"===e&&xi(i),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var s=i({},t);s.type="preclick",this._fireDOMEvent(s,s.type,n)}var o=this._findEventTargets(t,e);if(n){for(var r=[],h=0;h<n.length;h++)n[h].listens(e,!0)&&r.push(n[h]);o=r.concat(o)}if(o.length){"contextmenu"===e&&Fi(t);var a=o[0],c={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var l=a.getLatLng&&(!a._radius||a._radius<=10);c.containerPoint=l?this.latLngToContainerPoint(a.getLatLng()):this.mouseEventToContainerPoint(t),c.layerPoint=this.containerPointToLayerPoint(c.containerPoint),c.latlng=l?a.getLatLng():this.layerPointToLatLng(c.layerPoint)}for(h=0;h<o.length;h++)if(o[h].fire(e,c,!0),c.originalEvent._stopped||!1===o[h].options.bubblingMouseEvents&&-1!==g(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,i=this._handlers.length;t<i;t++)this._handlers[t].disable()},whenReady:function(t,i){return this._loaded?t.call(i||this,{target:this}):this.on("load",t,i),this},_getMapPanePos:function(){return gi(this._mapPane)||new S(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,i){return(t&&void 0!==i?this._getNewPixelOrigin(t,i):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,i){var e=this.getSize()._divideBy(2);return this.project(t,i)._subtract(e)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return this.project(t,i)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return B([this.project(t.getSouthWest(),i)._subtract(n),this.project(t.getNorthWest(),i)._subtract(n),this.project(t.getSouthEast(),i)._subtract(n),this.project(t.getNorthEast(),i)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,e){if(!e)return t;var n=this.project(t,i),s=this.getSize().divideBy(2),o=new I(n.subtract(s),n.add(s)),r=this._getBoundsOffset(o,e,i);return r.round().equals([0,0])?t:this.unproject(n.add(r),i)},_limitOffset:function(t,i){if(!i)return t;var e=this.getPixelBounds(),n=new I(e.min.add(t),e.max.add(t));return t.add(this._getBoundsOffset(n,i))},_getBoundsOffset:function(t,i,e){var n=B(this.project(i.getNorthEast(),e),this.project(i.getSouthWest(),e)),s=n.min.subtract(t.min),o=n.max.subtract(t.max);return new S(this._rebound(s.x,-o.x),this._rebound(s.y,-o.y))},_rebound:function(t,i){return t+i>0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),n=Ot.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){li(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var e=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(e)||(this.panBy(e,i),0))},_createAnimProxy:function(){var t=this._proxy=ni("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var i=Qt,e=this._proxy.style[i];vi(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){si(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),i=this.getZoom();vi(this._proxy,this.project(t,i),this.getZoomScale(i,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,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(s)||(M((function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)}),this),0))},_animateZoom:function(t,i,e,s){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,ci(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:s}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(n(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&li(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}}),Wi=P.extend({options:{position:"topright"},initialize:function(t){f(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return ci(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(si(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Vi=function(t){return new Wi(t)};Ui.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},i="leaflet-",e=this._controlContainer=ni("div",i+"control-container",this._container);function n(n,s){t[n+s]=ni("div",i+n+" "+i+s,e)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)si(this._controlCorners[t]);si(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Gi=Wi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,n){return e<n?-1:n<e?1:0}},initialize:function(t,i,e){for(var n in f(this,e),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in i)this._addLayer(i[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Wi.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,i){return this._addLayer(t,i),this._map?this._update():this},addOverlay:function(t,i){return this._addLayer(t,i,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var i=this._getLayer(o(t));return i&&this._layers.splice(this._layers.indexOf(i),1),this._map?this._update():this},expand:function(){ci(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(ci(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):li(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return li(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",i=this._container=ni("div",t),e=this.options.collapsed;i.setAttribute("aria-haspopup",!0),Bi(i),Ii(i);var n=this._section=ni("section",t+"-list");e&&(this._map.on("click",this.collapse,this),Ti(i,{mouseenter:function(){Ti(n,"click",Fi),this.expand(),setTimeout((function(){Li(n,"click",Fi)}))},mouseleave:this.collapse},this));var s=this._layersLink=ni("a",t+"-toggle",i);s.href="#",s.title="Layers",s.setAttribute("role","button"),Ti(s,"click",Fi),Ti(s,"focus",this.expand,this),e||this.expand(),this._baseLayersList=ni("div",t+"-base",n),this._separator=ni("div",t+"-separator",n),this._overlaysList=ni("div",t+"-overlays",n),i.appendChild(n)},_getLayer:function(t){for(var i=0;i<this._layers.length;i++)if(this._layers[i]&&o(this._layers[i].layer)===t)return this._layers[i]},_addLayer:function(t,i,e){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:e}),this.options.sortLayers&&this._layers.sort(n((function(t,i){return this.options.sortFunction(t.layer,i.layer,t.name,i.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;oi(this._baseLayersList),oi(this._overlaysList),this._layerControlInputs=[];var t,i,e,n,s=0;for(e=0;e<this._layers.length;e++)this._addItem(n=this._layers[e]),i=i||n.overlay,t=t||!n.overlay,s+=n.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&s>1)?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(o(t.target)),e=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;e&&this._map.fire(e,i)},_createRadioElement:function(t,i){var e='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+o(this),n),this._layerControlInputs.push(i),i.layerId=o(t.layer),Ti(i,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var r=document.createElement("span");return e.appendChild(r),r.appendChild(i),r.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],s=[];this._handlingClick=!0;for(var o=e.length-1;o>=0;o--)i=this._getLayer((t=e[o]).layerId).layer,t.checked?n.push(i):t.checked||s.push(i);for(o=0;o<s.length;o++)this._map.hasLayer(s[o])&&this._map.removeLayer(s[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,i,e=this._layerControlInputs,n=this._map.getZoom(),s=e.length-1;s>=0;s--)i=this._getLayer((t=e[s]).layerId).layer,t.disabled=void 0!==i.options.minZoom&&n<i.options.minZoom||void 0!==i.options.maxZoom&&n>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}}),qi=Wi.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=ni("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,s){var o=ni("a",e,n);return o.innerHTML=t,o.href="#",o.title=i,o.setAttribute("role","button"),o.setAttribute("aria-label",i),Bi(o),Ti(o,"click",ji),Ti(o,"click",s,this),Ti(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";li(this._zoomInButton,i),li(this._zoomOutButton,i),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(ci(this._zoomOutButton,i),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(ci(this._zoomInButton,i),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ui.mergeOptions({zoomControl:!0}),Ui.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new qi,this.addControl(this.zoomControl))}));var Xi=Wi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=ni("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=ni("div",i,e)),t.imperial&&(this._iScale=ni("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t);this._updateScale(this._mScale,i<1e3?i+" m":i/1e3+" km",i/t)},_updateImperial:function(t){var i,e,n,s=3.2808399*t;s>5280?(e=this._getRoundNum(i=s/5280),this._updateScale(this._iScale,e+" mi",e/i)):(n=this._getRoundNum(s),this._updateScale(this._iScale,n+" ft",n/s))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),e=t/i;return i*(e>=10?10:e>=5?5:e>=3?3:e>=2?2:1)}}),Ji=Wi.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ot.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var i in t.attributionControl=this,this._container=ni("div","leaflet-control-attribution"),Bi(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' <span aria-hidden="true">|</span> ')}}});Ui.mergeOptions({attributionControl:!0}),Ui.addInitHook((function(){this.options.attributionControl&&(new Ji).addTo(this)})),Wi.Layers=Gi,Wi.Zoom=qi,Wi.Scale=Xi,Wi.Attribution=Ji,Vi.layers=function(t,i,e){return new Gi(t,i,e)},Vi.zoom=function(t){return new qi(t)},Vi.scale=function(t){return new Xi(t)},Vi.attribution=function(t){return new Ji(t)};var Ki=P.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ki.addTo=function(t,i){return t.addHandler(i,this),this};var Qi,Yi={Events:C},te=Ot.touch?"touchstart mousedown":"mousedown",ie=A.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){f(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(Ti(this._dragStartTarget,te,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ie._dragging===this&&this.finishDrag(!0),Li(this._dragStartTarget,te,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ai(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)ie._dragging===this&&this.finishDrag();else if(!(ie._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(ie._dragging=this,this._preventOutline&&xi(this._element),wi(),Gt(),this._moving))){this.fire("down");var i=t.touches?t.touches[0]:t,e=ki(this._element);this._startPoint=new S(i.clientX,i.clientY),this._startPos=gi(this._element),this._parentScale=Mi(e);var n="mousedown"===t.type;Ti(document,n?"mousemove":"touchmove",this._onMove,this),Ti(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var i=t.touches&&1===t.touches.length?t.touches[0]:t,e=new S(i.clientX,i.clientY)._subtract(this._startPoint);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,Fi(t),this._moved||(this.fire("dragstart"),this._moved=!0,ci(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ci(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),mi(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){li(document.body,"leaflet-dragging"),this._lastTarget&&(li(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Li(document,"mousemove touchmove",this._onMove,this),Li(document,"mouseup touchend touchcancel",this._onUp,this),yi(),qt(),this._moved&&this._moving&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)}),this._moving=!1,ie._dragging=!1}});function ee(t,i){if(!i||!t.length)return t.slice();var e=i*i;return function(t,i){var e=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(e);n[0]=n[e-1]=1,se(t,n,i,0,e-1);var s,o=[];for(s=0;s<e;s++)n[s]&&o.push(t[s]);return o}(t=function(t,i){for(var e=[t[0]],n=1,s=0,o=t.length;n<o;n++)ae(t[n],t[s])>i&&(e.push(t[n]),s=n);return s<o-1&&e.push(t[o-1]),e}(t,e),e)}function ne(t,i,e){return Math.sqrt(ce(t,i,e,!0))}function se(t,i,e,n,s){var o,r,h,a=0;for(r=n+1;r<=s-1;r++)(h=ce(t[r],t[n],t[s],!0))>a&&(o=r,a=h);a>e&&(i[o]=1,se(t,i,e,n,o),se(t,i,e,o,s))}function oe(t,i,e,n,s){var o,r,h,a=n?Qi:he(t,e),c=he(i,e);for(Qi=c;;){if(!(a|c))return[t,i];if(a&c)return!1;h=he(r=re(t,i,o=a||c,e,s),e),o===a?(t=r,a=h):(i=r,c=h)}}function re(t,i,e,n,s){var o,r,h=i.x-t.x,a=i.y-t.y,c=n.min,l=n.max;return 8&e?(o=t.x+h*(l.y-t.y)/a,r=l.y):4&e?(o=t.x+h*(c.y-t.y)/a,r=c.y):2&e?(o=l.x,r=t.y+a*(l.x-t.x)/h):1&e&&(o=c.x,r=t.y+a*(c.x-t.x)/h),new S(o,r,s)}function he(t,i){var e=0;return t.x<i.min.x?e|=1:t.x>i.max.x&&(e|=2),t.y<i.min.y?e|=4:t.y>i.max.y&&(e|=8),e}function ae(t,i){var e=i.x-t.x,n=i.y-t.y;return e*e+n*n}function ce(t,i,e,n){var s,o=i.x,r=i.y,h=e.x-o,a=e.y-r,c=h*h+a*a;return c>0&&((s=((t.x-o)*h+(t.y-r)*a)/c)>1?(o=e.x,r=e.y):s>0&&(o+=h*s,r+=a*s)),h=t.x-o,a=t.y-r,n?h*h+a*a:new S(o,r)}function le(t){return!m(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function ue(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),le(t)}var fe={__proto__:null,simplify:ee,pointToSegmentDistance:ne,closestPointOnSegment:function(t,i,e){return ce(t,i,e)},clipSegment:oe,_getEdgeIntersection:re,_getBitCode:he,_sqClosestPointOnSegment:ce,isFlat:le,_flat:ue};function de(t,i,e){var n,s,o,r,h,a,c,l,u,f=[1,4,2,8];for(s=0,c=t.length;s<c;s++)t[s]._code=he(t[s],i);for(r=0;r<4;r++){for(l=f[r],n=[],s=0,o=(c=t.length)-1;s<c;o=s++)a=t[o],(h=t[s])._code&l?a._code&l||((u=re(a,h,l,i,e))._code=he(u,i),n.push(u)):(a._code&l&&((u=re(a,h,l,i,e))._code=he(u,i),n.push(u)),n.push(h));t=n}return t}var pe={__proto__:null,clipPolygon:de},ve={project:function(t){return new S(t.lng,t.lat)},unproject:function(t){return new N(t.y,t.x)},bounds:new I([-180,-90],[180,90])},me={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,e=this.R,n=t.lat*i,s=this.R_MINOR/e,o=Math.sqrt(1-s*s),r=o*Math.sin(n),h=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),o/2);return n=-e*Math.log(Math.max(h,1e-10)),new S(t.lng*i*e,n)},unproject:function(t){for(var i,e=180/Math.PI,n=this.R,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),r=Math.exp(-t.y/n),h=Math.PI/2-2*Math.atan(r),a=0,c=.1;a<15&&Math.abs(c)>1e-7;a++)i=o*Math.sin(h),i=Math.pow((1-i)/(1+i),o/2),h+=c=Math.PI/2-2*Math.atan(r*i)-h;return new N(h*e,t.x*e/n)}},ge={__proto__:null,LonLat:ve,Mercator:me,SphericalMercator:U},be=i({},H,{code:"EPSG:3395",projection:me,transformation:function(){var t=.5/(Math.PI*me.R);return V(t,.5,-t,.5)}()}),we=i({},H,{code:"EPSG:4326",projection:ve,transformation:V(1/180,1,-1/180,.5)}),ye=i({},D,{projection:ve,transformation:V(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(e*e+n*n)},infinite:!0});D.Earth=H,D.EPSG3395=be,D.EPSG3857=G,D.EPSG900913=q,D.EPSG4326=we,D.Simple=ye;var xe=A.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[o(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[o(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i=t.target;if(i.hasLayer(this)){if(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents){var e=this.getEvents();i.on(e,this),this.once("remove",(function(){i.off(e,this)}),this)}this.onAdd(i),this.fire("add"),i.fire("layeradd",{layer:this})}}});Ui.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=o(t);return this._layers[i]||(this._layers[i]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var i=o(t);return this._layers[i]?(this._loaded&&t.onRemove(this),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return o(t)in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){for(var i=0,e=(t=t?m(t)?t:[t]:[]).length;i<e;i++)this.addLayer(t[i])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[o(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var i=o(t);this._zoomBoundLayers[i]&&(delete this._zoomBoundLayers[i],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,i=-1/0,e=this._getZoomSpan();for(var n in this._zoomBoundLayers){var s=this._zoomBoundLayers[n].options;t=void 0===s.minZoom?t:Math.min(t,s.minZoom),i=void 0===s.maxZoom?i:Math.max(i,s.maxZoom)}this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=t===1/0?void 0:t,e!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var _e=xe.extend({initialize:function(t,i){var e,n;if(f(this,i),this._layers={},t)for(e=0,n=t.length;e<n;e++)this.addLayer(t[e])},addLayer:function(t){var i=this.getLayerId(t);return this._layers[i]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var i=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[i]&&this._map.removeLayer(this._layers[i]),delete this._layers[i],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var i,e,n=Array.prototype.slice.call(arguments,1);for(i in this._layers)(e=this._layers[i])[t]&&e[t].apply(e,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o(t)}}),ke=_e.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),_e.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),_e.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new F;for(var i in this._layers){var e=this._layers[i];t.extend(e.getBounds?e.getBounds():e.getLatLng())}return t}}),Me=P.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){f(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,i){var e=this._getIconUrl(t);if(!e){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(e,i&&"IMG"===i.tagName?i:null);return this._setIconStyles(n,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n},_setIconStyles:function(t,i){var e=this.options,n=e[i+"Size"];"number"==typeof n&&(n=[n,n]);var s=O(n),o=O("shadow"===i&&e.shadowAnchor||e.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+i+" "+(e.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return(i=i||document.createElement("img")).src=t,i},_getIconUrl:function(t){return Ot.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),ze=Me.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof ze.imagePath&&(ze.imagePath=this._detectIconPath()),(this.options.imagePath||ze.imagePath)+Me.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var i=function(t,i,e){var n=i.exec(t);return n&&n[e]};return(t=i(t,/^url\((['"])?(.+)\1\)$/,2))&&i(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=ni("div","leaflet-default-icon-path",document.body),i=ei(t,"background-image")||ei(t,"backgroundImage");if(document.body.removeChild(t),i=this._stripUrl(i))return i;var e=document.querySelector('link[href$="leaflet.css"]');return e?e.href.substring(0,e.href.length-"leaflet.css".length-1):""}}),Te=Ki.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ie(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ci(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&li(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var i=this._marker,e=i._map,n=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,o=gi(i._icon),r=e.getPixelBounds(),h=e.getPixelOrigin(),a=B(r.min._subtract(h).add(s),r.max._subtract(h).subtract(s));if(!a.contains(o)){var c=O((Math.max(a.max.x,o.x)-a.max.x)/(r.max.x-a.max.x)-(Math.min(a.min.x,o.x)-a.min.x)/(r.min.x-a.min.x),(Math.max(a.max.y,o.y)-a.max.y)/(r.max.y-a.max.y)-(Math.min(a.min.y,o.y)-a.min.y)/(r.min.y-a.min.y)).multiplyBy(n);e.panBy(c,{animate:!1}),this._draggable._newPos._add(c),this._draggable._startPos._add(c),mi(i._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=M(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(z(this._panRequest),this._panRequest=M(this._adjustPan.bind(this,t)))},_onDrag:function(t){var i=this._marker,e=i._shadow,n=gi(i._icon),s=i._map.layerPointToLatLng(n);e&&mi(e,n),i._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,i.fire("move",t).fire("drag",t)},_onDragEnd:function(t){z(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Pe=xe.extend({options:{icon:new ze,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,i){f(this,i),this._latlng=R(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var i=this._latlng;return this._latlng=R(t),this.update(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),e=t.icon.createIcon(this._icon),n=!1;e!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(e.title=t.title),"IMG"===e.tagName&&(e.alt=t.alt||"")),ci(e,i),t.keyboard&&(e.tabIndex="0",e.setAttribute("role","button")),this._icon=e,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ti(e,"focus",this._panOnFocus,this);var s=t.icon.createShadow(this._shadow),o=!1;s!==this._shadow&&(this._removeShadow(),o=!0),s&&(ci(s,i),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Li(this._icon,"focus",this._panOnFocus,this),si(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&si(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&mi(this._icon,t),this._shadow&&mi(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(i)},_initInteraction:function(){if(this.options.interactive&&(ci(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Te)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Te(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&di(this._icon,t),this._shadow&&di(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var i=this.options.icon.options,e=i.iconSize?O(i.iconSize):O(0,0),n=i.iconAnchor?O(i.iconAnchor):O(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:e.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Le=xe.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return f(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Ce=Le.extend({options:{fill:!0,radius:10},initialize:function(t,i){f(this,i),this._latlng=R(t),this._radius=this.options.radius},setLatLng:function(t){var i=this._latlng;return this._latlng=R(t),this.redraw(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var i=t&&t.radius||this._radius;return Le.prototype.setStyle.call(this,t),this.setRadius(i),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,i=this._radiusY||t,e=this._clickTolerance(),n=[t+e,i+e];this._pxBounds=new I(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Ae=Ce.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),f(this,e),this._latlng=R(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new F(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Le.prototype.setStyle,_project:function(){var t=this._latlng.lng,i=this._latlng.lat,e=this._map,n=e.options.crs;if(n.distance===H.distance){var s=Math.PI/180,o=this._mRadius/H.R/s,r=e.project([i+o,t]),h=e.project([i-o,t]),a=r.add(h).divideBy(2),c=e.unproject(a).lat,l=Math.acos((Math.cos(o*s)-Math.sin(i*s)*Math.sin(c*s))/(Math.cos(i*s)*Math.cos(c*s)))/s;(isNaN(l)||0===l)&&(l=o/Math.cos(Math.PI/180*i)),this._point=a.subtract(e.getPixelOrigin()),this._radius=isNaN(l)?0:a.x-e.project([c,t-l]).x,this._radiusY=a.y-r.y}else{var u=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=e.latLngToLayerPoint(this._latlng),this._radius=this._point.x-e.latLngToLayerPoint(u).x}this._updateBounds()}}),Se=Le.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,i){f(this,i),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var i,e,n=1/0,s=null,o=ce,r=0,h=this._parts.length;r<h;r++)for(var a=this._parts[r],c=1,l=a.length;c<l;c++){var u=o(t,i=a[c-1],e=a[c],!0);u<n&&(n=u,s=o(t,i,e))}return s&&(s.distance=Math.sqrt(n)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,s,o,r,h=this._rings[0],a=h.length;if(!a)return null;for(t=0,i=0;t<a-1;t++)i+=h[t].distanceTo(h[t+1])/2;if(0===i)return this._map.layerPointToLatLng(h[0]);for(t=0,n=0;t<a-1;t++)if((n+=e=(s=h[t]).distanceTo(o=h[t+1]))>i)return this._map.layerPointToLatLng([o.x-(r=(n-i)/e)*(o.x-s.x),o.y-r*(o.y-s.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=R(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new F,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return le(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],e=le(t),n=0,s=t.length;n<s;n++)e?(i[n]=R(t[n]),this._bounds.extend(i[n])):i[n]=this._convertLatLngs(t[n]);return i},_project:function(){var t=new I;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),i=new S(t,t);this._rawPxBounds&&(this._pxBounds=new I([this._rawPxBounds.min.subtract(i),this._rawPxBounds.max.add(i)]))},_projectLatlngs:function(t,i,e){var n,s,o=t.length;if(t[0]instanceof N){for(s=[],n=0;n<o;n++)s[n]=this._map.latLngToLayerPoint(t[n]),e.extend(s[n]);i.push(s)}else for(n=0;n<o;n++)this._projectLatlngs(t[n],i,e)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var i,e,n,s,o,r,h,a=this._parts;for(i=0,n=0,s=this._rings.length;i<s;i++)for(e=0,o=(h=this._rings[i]).length;e<o-1;e++)(r=oe(h[e],h[e+1],t,e,!0))&&(a[n]=a[n]||[],a[n].push(r[0]),r[1]===h[e+1]&&e!==o-2||(a[n].push(r[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,e=0,n=t.length;e<n;e++)t[e]=ee(t[e],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var e,n,s,o,r,h,a=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(e=0,o=this._parts.length;e<o;e++)for(n=0,s=(r=(h=this._parts[e]).length)-1;n<r;s=n++)if((i||0!==n)&&ne(t,h[s],h[n])<=a)return!0;return!1}});Se._flat=ue;var Ee=Se.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,s,o,r,h,a=this._rings[0],c=a.length;if(!c)return null;for(o=r=h=0,t=0,i=c-1;t<c;i=t++)r+=((e=a[t]).x+(n=a[i]).x)*(s=e.y*n.x-n.y*e.x),h+=(e.y+n.y)*s,o+=3*s;return this._map.layerPointToLatLng(0===o?a[0]:[r/o,h/o])},_convertLatLngs:function(t){var i=Se.prototype._convertLatLngs.call(this,t),e=i.length;return e>=2&&i[0]instanceof N&&i[0].equals(i[e-1])&&i.pop(),i},_setLatLngs:function(t){Se.prototype._setLatLngs.call(this,t),le(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return le(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,e=new S(i,i);if(t=new I(t.min.subtract(e),t.max.add(e)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,s=0,o=this._rings.length;s<o;s++)(n=de(this._rings[s],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,e,n,s,o,r,h,a,c=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,h=this._parts.length;s<h;s++)for(o=0,r=(a=(i=this._parts[s]).length)-1;o<a;r=o++)(e=i[o]).y>t.y!=(n=i[r]).y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(c=!c);return c||Se.prototype._containsPoint.call(this,t,!0)}}),Oe=ke.extend({initialize:function(t,i){f(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,s=m(t)?t:t.features;if(s){for(i=0,e=s.length;i<e;i++)((n=s[i]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var r=Ie(t,o);return r?(r.feature=De(t),r.defaultOptions=r.options,this.resetStyle(r),o.onEachFeature&&o.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(i){this._setLayerStyle(i,t)}),this)},_setLayerStyle:function(t,i){t.setStyle&&("function"==typeof i&&(i=i(t.feature)),t.setStyle(i))}});function Ie(t,i){var e,n,s,o,r="Feature"===t.type?t.geometry:t,h=r?r.coordinates:null,a=[],c=i&&i.pointToLayer,l=i&&i.coordsToLatLng||Fe;if(!h&&!r)return null;switch(r.type){case"Point":return Be(c,t,e=l(h),i);case"MultiPoint":for(s=0,o=h.length;s<o;s++)e=l(h[s]),a.push(Be(c,t,e,i));return new ke(a);case"LineString":case"MultiLineString":return n=je(h,"LineString"===r.type?0:1,l),new Se(n,i);case"Polygon":case"MultiPolygon":return n=je(h,"Polygon"===r.type?1:2,l),new Ee(n,i);case"GeometryCollection":for(s=0,o=r.geometries.length;s<o;s++){var u=Ie({geometry:r.geometries[s],type:"Feature",properties:t.properties},i);u&&a.push(u)}return new ke(a);default:throw new Error("Invalid GeoJSON object.")}}function Be(t,i,e,n){return t?t(i,e):new Pe(e,n&&n.markersInheritOptions&&n)}function Fe(t){return new N(t[1],t[0],t[2])}function je(t,i,e){for(var n,s=[],o=0,r=t.length;o<r;o++)n=i?je(t[o],i-1,e):(e||Fe)(t[o]),s.push(n);return s}function Ne(t,i){return void 0!==(t=R(t)).alt?[c(t.lng,i),c(t.lat,i),c(t.alt,i)]:[c(t.lng,i),c(t.lat,i)]}function Re(t,i,e,n){for(var s=[],o=0,r=t.length;o<r;o++)s.push(i?Re(t[o],i-1,e,n):Ne(t[o],n));return!i&&e&&s.push(s[0]),s}function Ze(t,e){return t.feature?i({},t.feature,{geometry:e}):De(e)}function De(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var He={toGeoJSON:function(t){return Ze(this,{type:"Point",coordinates:Ne(this.getLatLng(),t)})}};function $e(t,i){return new Oe(t,i)}Pe.include(He),Ae.include(He),Ce.include(He),Se.include({toGeoJSON:function(t){var i=!le(this._latlngs);return Ze(this,{type:(i?"Multi":"")+"LineString",coordinates:Re(this._latlngs,i?1:0,!1,t)})}}),Ee.include({toGeoJSON:function(t){var i=!le(this._latlngs),e=i&&!le(this._latlngs[0]),n=Re(this._latlngs,e?2:i?1:0,!0,t);return i||(n=[n]),Ze(this,{type:(e?"Multi":"")+"Polygon",coordinates:n})}}),_e.include({toMultiPoint:function(t){var i=[];return this.eachLayer((function(e){i.push(e.toGeoJSON(t).geometry.coordinates)})),Ze(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(t){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===i)return this.toMultiPoint(t);var e="GeometryCollection"===i,n=[];return this.eachLayer((function(i){if(i.toGeoJSON){var s=i.toGeoJSON(t);if(e)n.push(s.geometry);else{var o=De(s);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}})),e?Ze(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Ue=$e,We=xe.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,e){this._url=t,this._bounds=j(i),f(this,e)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ci(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){si(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ri(this._image),this},bringToBack:function(){return this._map&&hi(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=j(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,i=this._image=t?this._url:ni("img");ci(i,"leaflet-image-layer"),this._zoomAnimated&&ci(i,"leaflet-zoom-animated"),this.options.className&&ci(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onload=n(this.fire,this,"load"),i.onerror=n(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=i.src:(i.src=this._url,i.alt=this.options.alt)},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;vi(this._image,e,i)},_reset:function(){var t=this._image,i=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=i.getSize();mi(t,i.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){di(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&null!=this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Ve=We.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:ni("video");if(ci(i,"leaflet-image-layer"),this._zoomAnimated&&ci(i,"leaflet-zoom-animated"),this.options.className&&ci(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onloadeddata=n(this.fire,this,"load"),t){for(var e=i.getElementsByTagName("source"),s=[],o=0;o<e.length;o++)s.push(e[o].src);this._url=e.length>0?s:[i.src]}else{m(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(i.style,"objectFit")&&(i.style.objectFit="fill"),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop,i.muted=!!this.options.muted,i.playsInline=!!this.options.playsInline;for(var r=0;r<this._url.length;r++){var h=ni("source");h.src=this._url[r],i.appendChild(h)}}}}),Ge=We.extend({_initImage:function(){var t=this._image=this._url;ci(t,"leaflet-image-layer"),this._zoomAnimated&&ci(t,"leaflet-zoom-animated"),this.options.className&&ci(t,this.options.className),t.onselectstart=a,t.onmousemove=a}}),qe=xe.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0},initialize:function(t,i){f(this,t),this._source=i},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&di(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&di(this._container,1),this.bringToFront(),this.options.interactive&&(ci(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(di(this._container,0),this._removeTimeout=setTimeout(n(si,void 0,this._container),200)):si(this._container),this.options.interactive&&(li(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=R(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ri(this._container),this},bringToBack:function(){return this._map&&hi(this._container),this},_prepareOpen:function(t){var i=this._source;if(!i._map)return!1;if(i instanceof ke){i=null;var e=this._source._layers;for(var n in e)if(e[n]._map){i=e[n];break}if(!i)return!1;this._source=i}if(!t)if(i.getCenter)t=i.getCenter();else if(i.getLatLng)t=i.getLatLng();else{if(!i.getBounds)throw new Error("Unable to get source layer LatLng.");t=i.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,i="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof i)t.innerHTML=i;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(i)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),i=O(this.options.offset),e=this._getAnchor();this._zoomAnimated?mi(this._container,t.add(e)):i=i.add(t).add(e);var n=this._containerBottom=-i.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}});Ui.include({_initOverlay:function(t,i,e,n){var s=i;return s instanceof t||(s=new t(n).setContent(i)),e&&s.setLatLng(e),s}}),xe.include({_initOverlay:function(t,i,e,n){var s=e;return s instanceof t?(f(s,n),s._source=this):(s=i&&!n?i:new t(n,this)).setContent(e),s}});var Xe=qe.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,qe.prototype.openOn.call(this,t)},onAdd:function(t){qe.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Le||this._source.on("preclick",Oi))},onRemove:function(t){qe.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Le||this._source.off("preclick",Oi))},getEvents:function(){var t=qe.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",i=this._container=ni("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),e=this._wrapper=ni("div",t+"-content-wrapper",i);if(this._contentNode=ni("div",t+"-content",e),Bi(i),Ii(this._contentNode),Ti(i,"contextmenu",Oi),this._tipContainer=ni("div",t+"-tip-container",i),this._tip=ni("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=ni("a",t+"-close-button",i);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">&#215;</span>',Ti(n,"click",this.close,this)}},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var e=t.offsetWidth;e=Math.min(e,this.options.maxWidth),e=Math.max(e,this.options.minWidth),i.width=e+1+"px",i.whiteSpace="",i.height="";var n=this.options.maxHeight,s="leaflet-popup-scrolled";n&&t.offsetHeight>n?(i.height=n+"px",ci(t,s)):li(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();mi(this._container,i.add(e))},_adjustPan:function(t){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var i=this._map,e=parseInt(ei(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,s=this._containerWidth,o=new S(this._containerLeft,-n-this._containerBottom);o._add(gi(this._container));var r=i.layerPointToContainerPoint(o),h=O(this.options.autoPanPadding),a=O(this.options.autoPanPaddingTopLeft||h),c=O(this.options.autoPanPaddingBottomRight||h),l=i.getSize(),u=0,f=0;r.x+s+c.x>l.x&&(u=r.x+s-l.x+c.x),r.x-u-a.x<0&&(u=r.x-a.x),r.y+n+c.y>l.y&&(f=r.y+n-l.y+c.y),r.y-f-a.y<0&&(f=r.y-a.y),(u||f)&&i.fire("autopanstart").panBy([u,f],{animate:t&&"moveend"===t.type})}},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ui.mergeOptions({closePopupOnClick:!0}),Ui.include({openPopup:function(t,i,e){return this._initOverlay(Xe,t,i,e).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),xe.include({bindPopup:function(t,i){return this._popup=this._initOverlay(Xe,this._popup,t,i),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&this._popup._prepareOpen(t)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){ji(t);var i=t.layer||t.target;this._popup._source!==i||i instanceof Le?(this._popup._source=i,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Je=qe.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){qe.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){qe.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=qe.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){this._contentNode=this._container=ni("div","leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e,n=this._map,s=this._container,o=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),h=this.options.direction,a=s.offsetWidth,c=s.offsetHeight,l=O(this.options.offset),u=this._getAnchor();"top"===h?(i=a/2,e=c):"bottom"===h?(i=a/2,e=0):"center"===h?(i=a/2,e=c/2):"right"===h?(i=0,e=c/2):"left"===h?(i=a,e=c/2):r.x<o.x?(h="right",i=0,e=c/2):(h="left",i=a+2*(l.x+u.x),e=c/2),t=t.subtract(O(i,e,!0)).add(l).add(u),li(s,"leaflet-tooltip-right"),li(s,"leaflet-tooltip-left"),li(s,"leaflet-tooltip-top"),li(s,"leaflet-tooltip-bottom"),ci(s,"leaflet-tooltip-"+h),mi(s,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&di(this._container,t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(i)},_getAnchor:function(){return O(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ui.include({openTooltip:function(t,i,e){return this._initOverlay(Je,t,i,e).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),xe.include({bindTooltip:function(t,i){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Je,this._tooltip,t,i),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var i=t?"off":"on",e={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?e.add=this._openTooltip:(e.mouseover=this._openTooltip,e.mouseout=this.closeTooltip,e.click=this._openTooltip),this._tooltip.options.sticky&&(e.mousemove=this._moveTooltip),this[i](e),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&this._tooltip._prepareOpen(t)&&this._tooltip.openOn(this._map),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){!this._tooltip||!this._map||this._map.dragging&&this._map.dragging.moving()||(this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0))},_moveTooltip:function(t){var i,e,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),e=this._map.containerPointToLayerPoint(i),n=this._map.layerPointToLatLng(e)),this._tooltip.setLatLng(n)}});var Ke=Me.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:document.createElement("div"),e=this.options;if(e.html instanceof Element?(oi(i),i.appendChild(e.html)):i.innerHTML=!1!==e.html?e.html:"",e.bgPos){var n=O(e.bgPos);i.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}});Me.Default=ze;var Qe=xe.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ot.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){f(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),si(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ri(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(hi(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=r(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof S?t:new S(t,t)},_updateZIndex:function(){this._container&&null!=this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var i,e=this.getPane().children,n=-t(-1/0,1/0),s=0,o=e.length;s<o;s++)i=e[s].style.zIndex,e[s]!==this._container&&i&&(n=t(n,+i));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ot.ielt9){di(this._container,this.options.opacity);var t=+new Date,i=!1,e=!1;for(var n in this._tiles){var s=this._tiles[n];if(s.current&&s.loaded){var o=Math.min(1,(t-s.loaded)/200);di(s.el,o),o<1?i=!0:(s.active?e=!0:this._onOpaqueTile(s),s.active=!0)}}e&&!this._noPrune&&this._pruneTiles(),i&&(z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=ni("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,i=this.options.maxZoom;if(void 0!==t){for(var e in this._levels)e=Number(e),this._levels[e].el.children.length||e===t?(this._levels[e].el.style.zIndex=i-Math.abs(t-e),this._onUpdateLevel(e)):(si(this._levels[e].el),this._removeTilesAtZoom(e),this._onRemoveLevel(e),delete this._levels[e]);var n=this._levels[t],s=this._map;return n||((n=this._levels[t]={}).el=ni("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=i,n.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,s.getCenter(),s.getZoom()),this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,i,e=this._map.getZoom();if(e>this.options.maxZoom||e<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(i=this._tiles[t]).retain=i.current;for(t in this._tiles)if((i=this._tiles[t]).current&&!i.active){var 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(t){for(var i in this._tiles)this._tiles[i].coords.z===t&&this._removeTile(i)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)si(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,i,e,n){var s=Math.floor(t/2),o=Math.floor(i/2),r=e-1,h=new S(+s,+o);h.z=+r;var a=this._tileCoordsToKey(h),c=this._tiles[a];return c&&c.active?(c.retain=!0,!0):(c&&c.loaded&&(c.retain=!0),r>n&&this._retainParent(s,o,r,n))},_retainChildren:function(t,i,e,n){for(var s=2*t;s<2*t+2;s++)for(var o=2*i;o<2*i+2;o++){var r=new S(s,o);r.z=e+1;var h=this._tileCoordsToKey(r),a=this._tiles[h];a&&a.active?a.retain=!0:(a&&a.loaded&&(a.retain=!0),e+1<n&&this._retainChildren(s,o,e+1,n))}},_resetView:function(t){var i=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var i=this.options;return void 0!==i.minNativeZoom&&t<i.minNativeZoom?i.minNativeZoom:void 0!==i.maxNativeZoom&&i.maxNativeZoom<t?i.maxNativeZoom:t},_setView:function(t,i,e,n){var s=Math.round(i);s=void 0!==this.options.maxZoom&&s>this.options.maxZoom||void 0!==this.options.minZoom&&s<this.options.minZoom?void 0:this._clampZoom(s),n&&!(this.options.updateWhenZooming&&s!==this._tileZoom)||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&this._update(t),e||this._pruneTiles(),this._noPrune=!!e),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var e in this._levels)this._setZoomTransform(this._levels[e],t,i)},_setZoomTransform:function(t,i,e){var n=this._map.getZoomScale(e,t.zoom),s=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(i,e)).round();Ot.any3d?vi(t.el,s,n):mi(t.el,s)},_resetGrid:function(){var t=this._map,i=t.options.crs,e=this._tileSize=this.getTileSize(),n=this._tileZoom,s=this._map.getPixelWorldBounds(this._tileZoom);s&&(this._globalTileRange=this._pxBoundsToTileRange(s)),this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,i.wrapLng[0]],n).x/e.x),Math.ceil(t.project([0,i.wrapLng[1]],n).x/e.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],n).y/e.x),Math.ceil(t.project([i.wrapLat[1],0],n).y/e.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,e=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),n=i.getZoomScale(e,this._tileZoom),s=i.project(t,this._tileZoom).floor(),o=i.getSize().divideBy(2*n);return new I(s.subtract(o),s.add(o))},_update:function(t){var i=this._map;if(i){var e=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(n),o=s.getCenter(),r=[],h=this.options.keepBuffer,a=new I(s.getBottomLeft().subtract([h,-h]),s.getTopRight().add([h,-h]));if(!(isFinite(s.min.x)&&isFinite(s.min.y)&&isFinite(s.max.x)&&isFinite(s.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var c in this._tiles){var l=this._tiles[c].coords;l.z===this._tileZoom&&a.contains(new S(l.x,l.y))||(this._tiles[c].current=!1)}if(Math.abs(e-this._tileZoom)>1)this._setView(t,e);else{for(var u=s.min.y;u<=s.max.y;u++)for(var f=s.min.x;f<=s.max.x;f++){var d=new S(f,u);if(d.z=this._tileZoom,this._isValidTile(d)){var p=this._tiles[this._tileCoordsToKey(d)];p?p.current=!0:r.push(d)}}if(r.sort((function(t,i){return t.distanceTo(o)-i.distanceTo(o)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var v=document.createDocumentFragment();for(f=0;f<r.length;f++)this._addTile(r[f],v);this._level.el.appendChild(v)}}}}},_isValidTile:function(t){var i=this._map.options.crs;if(!i.infinite){var e=this._globalTileRange;if(!i.wrapLng&&(t.x<e.min.x||t.x>e.max.x)||!i.wrapLat&&(t.y<e.min.y||t.y>e.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return j(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),s=n.add(e);return[i.unproject(n,t.z),i.unproject(s,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new F(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new S(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(si(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ci(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=a,t.onmousemove=a,Ot.ielt9&&this.options.opacity<1&&di(t,this.options.opacity)},_addTile:function(t,i){var e=this._getTilePos(t),s=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),n(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(n(this._tileReady,this,t,null,o)),mi(o,e),this._tiles[s]={el:o,coords:t,current:!0},i.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var s=this._tileCoordsToKey(t);(e=this._tiles[s])&&(e.loaded=+new Date,this._map._fadeAnimated?(di(e.el,0),z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(ci(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ot.ielt9||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(n(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new S(this._wrapX?h(t.x,this._wrapX):t.x,this._wrapY?h(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new I(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Ye=Qe.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,i){this._url=t,(i=f(this,i)).detectRetina&&Ot.retina&&i.maxZoom>0&&(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom++):(i.zoomOffset++,i.maxZoom--),i.minZoom=Math.max(0,i.minZoom)),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url===t&&void 0===i&&(i=!0),this._url=t,i||this.redraw(),this},createTile:function(t,i){var e=document.createElement("img");return Ti(e,"load",n(this._tileOnLoad,this,i,e)),Ti(e,"error",n(this._tileOnError,this,i,e)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(e.referrerPolicy=this.options.referrerPolicy),e.alt="",e.setAttribute("role","presentation"),e.src=this.getTileUrl(t),e},getTileUrl:function(t){var e={r:Ot.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return v(this._url,i(e,this.options))},_tileOnLoad:function(t,i){Ot.ielt9?setTimeout(n(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var n=this.options.errorTileUrl;n&&i.getAttribute("src")!==n&&(i.src=n),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom;return this.options.zoomReverse&&(t=this.options.maxZoom-t),t+this.options.zoomOffset},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=a,i.onerror=a,!i.complete)){i.src=b;var e=this._tiles[t].coords;si(i),delete this._tiles[t],this.fire("tileabort",{tile:i,coords:e})}},_removeTile:function(t){var i=this._tiles[t];if(i)return i.el.setAttribute("src",b),Qe.prototype._removeTile.call(this,t)},_tileReady:function(t,i,e){if(this._map&&(!e||e.getAttribute("src")!==b))return Qe.prototype._tileReady.call(this,t,i,e)}});function tn(t,i){return new Ye(t,i)}var en=Ye.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var s in e)s in this.options||(n[s]=e[s]);var o=(e=f(this,e)).detectRetina&&Ot.retina?2:1,r=this.getTileSize();n.width=r.x*o,n.height=r.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version),this.wmsParams[this._wmsVersion>=1.3?"crs":"srs"]=this._crs.code,Ye.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),e=this._crs,n=B(e.project(i[0]),e.project(i[1])),s=n.min,o=n.max,r=(this._wmsVersion>=1.3&&this._crs===we?[s.y,s.x,o.y,o.x]:[s.x,s.y,o.x,o.y]).join(","),h=Ye.prototype.getTileUrl.call(this,t);return h+d(this.wmsParams,h,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});Ye.WMS=en,tn.wms=function(t,i){return new en(t,i)};var nn=xe.extend({options:{padding:.1},initialize:function(t){f(this,t),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ci(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var e=this._map.getZoomScale(i,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,i),o=n.multiplyBy(-e).add(s).subtract(this._map._getNewPixelOrigin(t,i));Ot.any3d?vi(this._container,o,e):mi(this._container,o)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new I(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sn=nn.extend({options:{tolerance:0},getEvents:function(){var t=nn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){nn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ti(t,"mousemove",this._onMouseMove,this),Ti(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ti(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,si(this._container),Li(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){nn.prototype._update.call(this);var t=this._bounds,i=this._container,e=t.getSize(),n=Ot.retina?2:1;mi(i,t.min),i.width=n*e.x,i.height=n*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",Ot.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){nn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[o(t)]=t;var i=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,n=i.prev;e?e.prev=n:this._drawLast=n,n?n.next=e:this._drawFirst=e,delete t._order,delete this._layers[o(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var i,e,n=t.options.dashArray.split(/[, ]+/),s=[];for(e=0;e<n.length;e++){if(i=Number(n[e]),isNaN(i))return;s.push(i)}t.options._dashArray=s}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||M(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var i=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new I,this._redrawBounds.extend(t._pxBounds.min.subtract([i,i])),this._redrawBounds.extend(t._pxBounds.max.add([i,i]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var i=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,i.x,i.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,i=this._redrawBounds;if(this._ctx.save(),i){var e=i.getSize();this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,e.x,e.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,i){if(this._drawing){var e,n,s,o,r=t._parts,h=r.length,a=this._ctx;if(h){for(a.beginPath(),e=0;e<h;e++){for(n=0,s=r[e].length;n<s;n++)a[n?"lineTo":"moveTo"]((o=r[e][n]).x,o.y);i&&a.closePath()}this._fillStroke(a,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var i=t._point,e=this._ctx,n=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==s&&(e.save(),e.scale(1,s)),e.beginPath(),e.arc(i.x,i.y/s,n,0,2*Math.PI,!1),1!==s&&e.restore(),this._fillStroke(e,t)}},_fillStroke:function(t,i){var e=i.options;e.fill&&(t.globalAlpha=e.fillOpacity,t.fillStyle=e.fillColor||e.color,t.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=e.opacity,t.lineWidth=e.weight,t.strokeStyle=e.color,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.stroke())},_onClick:function(t){for(var i,e,n=this._map.mouseEventToLayerPoint(t),s=this._drawFirst;s;s=s.next)(i=s.layer).options.interactive&&i._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(i))&&(e=i);this._fireEvent(!!e&&[e],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var i=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,i)}},_handleMouseOut:function(t){var i=this._hoveredLayer;i&&(li(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,i){if(!this._mouseHoverThrottled){for(var e,s,o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&(s=e);s!==this._hoveredLayer&&(this._handleMouseOut(t),s&&(ci(this._container,"leaflet-interactive"),this._fireEvent([s],t,"mouseover"),this._hoveredLayer=s)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(n((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,i,e){this._map._fireDOMEvent(i,e||i.type,t)},_bringToFront:function(t){var i=t._order;if(i){var e=i.next,n=i.prev;e&&(e.prev=n,n?n.next=e:e&&(this._drawFirst=e),i.prev=this._drawLast,this._drawLast.next=i,i.next=null,this._drawLast=i,this._requestRedraw(t))}},_bringToBack:function(t){var i=t._order;if(i){var e=i.next,n=i.prev;n&&(n.next=e,e?e.prev=n:n&&(this._drawLast=n),i.prev=null,i.next=this._drawFirst,this._drawFirst.prev=i,this._drawFirst=i,this._requestRedraw(t))}}});function on(t){return Ot.canvas?new sn(t):null}var rn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),hn={_initContainer:function(){this._container=ni("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(nn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=rn("shape");ci(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=rn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;si(i),t.removeInteractiveTarget(i),delete this._layers[o(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(i||(i=t._stroke=rn("stroke")),s.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,i.dashStyle=n.dashArray?m(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):"",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(s.removeChild(i),t._stroke=null),n.fill?(e||(e=t._fill=rn("fill")),s.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(s.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){ri(t._container)},_bringToBack:function(t){hi(t._container)}},an=Ot.vml?rn:X,cn=nn.extend({_initContainer:function(){this._container=an("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=an("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){si(this._container),Li(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){nn.prototype._update.call(this);var t=this._bounds,i=t.getSize(),e=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),mi(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=an("path");t.options.className&&ci(i,t.options.className),t.options.interactive&&ci(i,"leaflet-interactive"),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){si(t._path),t.removeInteractiveTarget(t._path),delete this._layers[o(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,J(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,s)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){ri(t._path)},_bringToBack:function(t){hi(t._path)}});function ln(t){return Ot.svg||Ot.vml?new cn(t):null}Ot.vml&&cn.include(hn),Ui.include({getRenderer:function(t){var i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return i||(i=this._renderer=this._createRenderer()),this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&on(t)||ln(t)}});var un=Ee.extend({initialize:function(t,i){Ee.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=j(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});cn.create=an,cn.pointsToPath=J,Oe.geometryToLayer=Ie,Oe.coordsToLatLng=Fe,Oe.coordsToLatLngs=je,Oe.latLngToCoords=Ne,Oe.latLngsToCoords=Re,Oe.getFeature=Ze,Oe.asFeature=De,Ui.mergeOptions({boxZoom:!0});var fn=Ki.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Ti(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Li(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){si(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Gt(),wi(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ti(document,{contextmenu:ji,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ni("div","leaflet-zoom-box",this._container),ci(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new I(this._point,this._startPoint),e=i.getSize();mi(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(si(this._box),li(this._container,"leaflet-crosshair")),qt(),yi(),Li(document,{contextmenu:ji,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(n(this._resetState,this),0);var i=new F(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ui.addInitHook("addHandler","boxZoom",fn),Ui.mergeOptions({doubleClickZoom:!0});var dn=Ki.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,s=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(s):i.setZoomAround(t.containerPoint,s)}});Ui.addInitHook("addHandler","doubleClickZoom",dn),Ui.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var pn=Ki.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ie(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ci(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){li(this._map._container,"leaflet-grab"),li(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var i=j(this._map.options.maxBounds);this._offsetLimit=B(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(i),this._prunePositions(i)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit;t.x<i.min.x&&(t.x=this._viscousLimit(t.x,i.min.x)),t.y<i.min.y&&(t.y=this._viscousLimit(t.y,i.min.y)),t.x>i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,s=(n-i+e)%t+i-e,o=(n+i+e)%t-i-e,r=Math.abs(s+e)<Math.abs(o+e)?s:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var i=this._map,e=i.options,n=!e.inertia||t.noInertia||this._times.length<2;if(i.fire("dragend",t),n)i.fire("moveend");else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),o=e.easeLinearity,r=s.multiplyBy(o/((this._lastTime-this._times[0])/1e3)),h=r.distanceTo([0,0]),a=Math.min(e.inertiaMaxSpeed,h),c=r.multiplyBy(a/h),l=a/(e.inertiaDeceleration*o),u=c.multiplyBy(-l/2).round();u.x||u.y?(u=i._limitOffset(u,i.options.maxBounds),M((function(){i.panBy(u,{duration:l,easeLinearity:o,noMoveStart:!0,animate:!0})}))):i.fire("moveend")}}});Ui.addInitHook("addHandler","dragging",pn),Ui.mergeOptions({keyboard:!0,keyboardPanDelta:80});var vn=Ki.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Ti(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Li(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 t=document.body,i=document.documentElement,e=t.scrollTop||i.scrollTop,n=t.scrollLeft||i.scrollLeft;this._map._container.focus(),window.scrollTo(n,e)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var i,e,n=this._panKeys={},s=this.keyCodes;for(i=0,e=s.left.length;i<e;i++)n[s.left[i]]=[-1*t,0];for(i=0,e=s.right.length;i<e;i++)n[s.right[i]]=[t,0];for(i=0,e=s.down.length;i<e;i++)n[s.down[i]]=[0,t];for(i=0,e=s.up.length;i<e;i++)n[s.up[i]]=[0,-1*t]},_setZoomDelta:function(t){var i,e,n=this._zoomKeys={},s=this.keyCodes;for(i=0,e=s.zoomIn.length;i<e;i++)n[s.zoomIn[i]]=t;for(i=0,e=s.zoomOut.length;i<e;i++)n[s.zoomOut[i]]=-t},_addHooks:function(){Ti(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Li(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var i,e=t.keyCode,n=this._map;if(e in this._panKeys)n._panAnim&&n._panAnim._inProgress||(i=this._panKeys[e],t.shiftKey&&(i=O(i).multiplyBy(3)),n.panBy(i),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(e in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if(27!==e||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}ji(t)}}});Ui.addInitHook("addHandler","keyboard",vn),Ui.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var mn=Ki.extend({addHooks:function(){Ti(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Li(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var i=Zi(t),e=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var s=Math.max(e-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(n(this._performZoom,this),s),ji(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),e=this._map.options.zoomSnap||0;t._stop();var n=4*Math.log(2/(1+Math.exp(-Math.abs(this._delta/(4*this._map.options.wheelPxPerZoomLevel)))))/Math.LN2,s=e?Math.ceil(n/e)*e:n,o=t._limitZoom(i+(this._delta>0?s:-s))-i;this._delta=0,this._startTime=null,o&&("center"===t.options.scrollWheelZoom?t.setZoom(i+o):t.setZoomAround(this._lastMousePos,i+o))}});Ui.addInitHook("addHandler","scrollWheelZoom",mn),Ui.mergeOptions({tapHold:Ot.touchNative&&Ot.safari&&Ot.mobile,tapTolerance:15});var gn=Ki.extend({addHooks:function(){Ti(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Li(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var i=t.touches[0];this._startPos=this._newPos=new S(i.clientX,i.clientY),this._holdTimeout=setTimeout(n((function(){this._cancel(),this._isTapValid()&&(Ti(document,"touchend",Fi),Ti(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",i))}),this),600),Ti(document,"touchend touchcancel contextmenu",this._cancel,this),Ti(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Li(document,"touchend",Fi),Li(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Li(document,"touchend touchcancel contextmenu",this._cancel,this),Li(document,"touchmove",this._onMove,this)},_onMove:function(t){var i=t.touches[0];this._newPos=new S(i.clientX,i.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,i){var e=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY});e._simulated=!0,i.target.dispatchEvent(e)}});Ui.addInitHook("addHandler","tapHold",gn),Ui.mergeOptions({touchZoom:Ot.touch,bounceAtZoomLimits:!0});var bn=Ki.extend({addHooks:function(){ci(this._map._container,"leaflet-touch-zoom"),Ti(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){li(this._map._container,"leaflet-touch-zoom"),Li(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(e.add(n)._divideBy(2))),this._startDist=e.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),Ti(document,"touchmove",this._onTouchMove,this),Ti(document,"touchend touchcancel",this._onTouchEnd,this),Fi(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,e=i.mouseEventToContainerPoint(t.touches[0]),s=i.mouseEventToContainerPoint(t.touches[1]),o=e.distanceTo(s)/this._startDist;if(this._zoom=i.getScaleZoom(o,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&o<1||this._zoom>i.getMaxZoom()&&o>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var r=e._add(s)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===r.x&&0===r.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var h=n(i._move,i,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=M(h,this,!0),Fi(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,z(this._animRequest),Li(document,"touchmove",this._onTouchMove,this),Li(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ui.addInitHook("addHandler","touchZoom",bn),Ui.BoxZoom=fn,Ui.DoubleClickZoom=dn,Ui.Drag=pn,Ui.Keyboard=vn,Ui.ScrollWheelZoom=mn,Ui.TapHold=gn,Ui.TouchZoom=bn,t.Bounds=I,t.Browser=Ot,t.CRS=D,t.Canvas=sn,t.Circle=Ae,t.CircleMarker=Ce,t.Class=P,t.Control=Wi,t.DivIcon=Ke,t.DivOverlay=qe,t.DomEvent=Hi,t.DomUtil=zi,t.Draggable=ie,t.Evented=A,t.FeatureGroup=ke,t.GeoJSON=Oe,t.GridLayer=Qe,t.Handler=Ki,t.Icon=Me,t.ImageOverlay=We,t.LatLng=N,t.LatLngBounds=F,t.Layer=xe,t.LayerGroup=_e,t.LineUtil=fe,t.Map=Ui,t.Marker=Pe,t.Mixin=Yi,t.Path=Le,t.Point=S,t.PolyUtil=pe,t.Polygon=Ee,t.Polyline=Se,t.Popup=Xe,t.PosAnimation=$i,t.Projection=ge,t.Rectangle=un,t.Renderer=nn,t.SVG=cn,t.SVGOverlay=Ge,t.TileLayer=Ye,t.Tooltip=Je,t.Transformation=W,t.Util=T,t.VideoOverlay=Ve,t.bind=n,t.bounds=B,t.canvas=on,t.circle=function(t,i,e){return new Ae(t,i,e)},t.circleMarker=function(t,i){return new Ce(t,i)},t.control=Vi,t.divIcon=function(t){return new Ke(t)},t.extend=i,t.featureGroup=function(t,i){return new ke(t,i)},t.geoJSON=$e,t.geoJson=Ue,t.gridLayer=function(t){return new Qe(t)},t.icon=function(t){return new Me(t)},t.imageOverlay=function(t,i,e){return new We(t,i,e)},t.latLng=R,t.latLngBounds=j,t.layerGroup=function(t,i){return new _e(t,i)},t.map=function(t,i){return new Ui(t,i)},t.marker=function(t,i){return new Pe(t,i)},t.point=O,t.polygon=function(t,i){return new Ee(t,i)},t.polyline=function(t,i){return new Se(t,i)},t.popup=function(t,i){return new Xe(t,i)},t.rectangle=function(t,i){return new un(t,i)},t.setOptions=f,t.stamp=o,t.svg=ln,t.svgOverlay=function(t,i,e){return new Ge(t,i,e)},t.tileLayer=tn,t.tooltip=function(t,i){return new Je(t,i)},t.transformation=V,t.version="1.8.0",t.videoOverlay=function(t,i,e){return new Ve(t,i,e)};var wn=window.L;t.noConflict=function(){return window.L=wn,this},window.L=t}((p={path:void 0,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}).exports),p.exports);const m=class{constructor(i){t(this,i),this.trekCardPress=n(this,"trekCardPress",7),this.mapIsReady=!1,this.center="1, 1",this.zoom=10,this.colorPrimary="#6b0030",this.colorPrimaryTint="#974c6e",this.colorTrekLine="#6b0030",this.colorDepartureIcon="#006b3b",this.colorArrivalIcon="#85003b",this.colorSensitiveArea="\t#4974a5",this.colorPoiIcon="#974c6e",this.handleTreksWithinBoundsBind=this.handleTreksWithinBounds.bind(this)}connectedCallback(){this.map=v.map(this.element,{center:this.center.split(",").map(Number),zoom:this.zoom}),v.control.scale().addTo(this.map),v.tileLayer(this.urlLayer,{maxZoom:19,attribution:this.attribution}).addTo(this.map),o.currentTrek?this.addTrek():o.currentTreks&&this.addTreks(),r("currentTreks",(()=>{o.currentTrek?(this.removeTreks(),this.addTrek()):o.currentTreks&&(this.addTreks(),this.removeTrek())})),r("currentTrek",(()=>{o.currentTrek?(this.removeTreks(),this.addTrek()):(this.addTreks(),this.removeTrek())}))}addTreks(){var t;const i=[],e={type:"FeatureCollection",features:[]};if(o.currentTreks)for(const n of o.currentTreks)i.push(n.departure_geom),e.features.push({type:"Feature",geometry:{type:"Point",coordinates:n.departure_geom},properties:{id:n.id,name:n.name,practice:null===(t=o.practices.find((t=>t.id===n.practice)))||void 0===t?void 0:t.pictogram,imgSrc:n.attachments&&n.attachments.length>0&&n.attachments[0].thumbnail}});if(this.treksLayer){if(i.length>0){const t=v.latLngBounds(i.map((t=>[t[1],t[0]])));this.map.fitBounds(t)}else this.map.fire("moveend");this.treksLayer.clearLayers(),this.treksLayer.addData(e)}else{if(i.length>0&&!o.currentMapTreksBounds){const t=v.latLngBounds(i.map((t=>[t[1],t[0]])));this.map.fitBounds(t)}else o.currentMapTreksBounds&&this.map.fitBounds(o.currentMapTreksBounds);this.treksLayer=v.geoJSON(e,{pointToLayer:(t,i)=>v.marker(i,{icon:v.divIcon({html:t.properties.practice?`<img src=${t.properties.practice} />`:"<img />",className:"trek-marker",iconSize:48}),autoPanOnFocus:!1}),onEachFeature:(t,i)=>{i.once("click",(()=>{const e=v.DomUtil.create("div");e.className="trek-departure-popup",e.onclick=()=>this.trekCardPress.emit(t.properties.id);const n=v.DomUtil.create("div");if(n.innerHTML=t.properties.name,n.className="trek-name",t.properties.imgSrc){n.className+=" trek-name-margin-top";const i=v.DomUtil.create("img");i.src=t.properties.imgSrc,e.appendChild(i)}e.appendChild(n),i.bindPopup(e,{interactive:!0,autoPan:!1,closeButton:!1}).openPopup()}))}}).addTo(this.map)}!this.mapIsReady&&(this.mapIsReady=!this.mapIsReady),this.map.on("moveend",this.handleTreksWithinBoundsBind)}removeTreks(){this.treksLayer&&(o.currentMapTreksBounds=this.map.getBounds(),this.map.removeLayer(this.treksLayer),this.treksLayer=null,this.map.off("moveend",this.handleTreksWithinBoundsBind))}handleTreksWithinBounds(){o.treksWithinBounds=o.currentTreks.filter((t=>this.map.getBounds().contains(v.latLng(t.departure_geom[1],t.departure_geom[0]))))}addTrek(){this.currentTrekLayer=v.geoJSON({type:"Feature",geometry:o.currentTrek.geometry,properties:{}},{style:()=>({color:this.colorTrekLine}),interactive:!1}).addTo(this.map);const t=v.latLngBounds(o.currentTrek.geometry.coordinates.map((t=>[t[1],t[0]])));this.map.fitBounds(t);const i=[o.currentTrek.geometry.coordinates.at(0)[0],o.currentTrek.geometry.coordinates.at(0)[1]],e=[o.currentTrek.geometry.coordinates.at(-1)[0],o.currentTrek.geometry.coordinates.at(-1)[1]],n={type:"FeatureCollection",features:[{type:"Feature",properties:{type:"departure"},geometry:{type:"Point",coordinates:i}}]};if(i[0]===e[0]&&i[1]===e[1]||n.features.push({type:"Feature",properties:{type:"arrival"},geometry:{type:"Point",coordinates:e}}),this.currentDepartureArrivalLayer=v.geoJSON(n,{pointToLayer:(t,i)=>v.marker(i,{icon:v.divIcon({html:'<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><path d="M80,464V68.14a8,8,0,0,1,4-6.9C91.81,56.66,112.92,48,160,48c64,0,145,48,192,48a199.53,199.53,0,0,0,77.23-15.77A2,2,0,0,1,432,82.08V301.44a4,4,0,0,1-2.39,3.65C421.37,308.7,392.33,320,352,320c-48,0-128-32-192-32s-80,16-80,16" style=";fill:#ffffff;stroke:currentColor;stroke-linecap:round;stroke-miterlimit:10;stroke-width:32px"/></svg>',className:"departure"===t.properties.type?"departure-icon":"arrival-icon",iconSize:48,iconAnchor:[0,48]}),autoPanOnFocus:!1,interactive:!1})}).addTo(this.map),o.currentTrek.parking_location&&(this.currentParkingLayer=v.geoJSON({type:"Feature",properties:{},geometry:{type:"Point",coordinates:o.currentTrek.parking_location}},{pointToLayer:(t,i)=>v.marker(i,{icon:v.divIcon({html:"<div>P</div>",className:"parking-icon",iconSize:48,iconAnchor:[0,48]}),autoPanOnFocus:!1,interactive:!1})}).addTo(this.map)),o.currentSensitiveAreas&&o.currentSensitiveAreas.length>0){const t={type:"FeatureCollection",features:[]};for(const i of o.currentSensitiveAreas)t.features.push({type:"Feature",properties:{name:i.name},geometry:i.geometry});this.currentSensitiveAreasLayer=v.geoJSON(t,{onEachFeature:(t,i)=>{i.once("mouseover",(()=>{const e=v.DomUtil.create("div");e.className="sensitive-area-tooltip";const n=v.DomUtil.create("div");n.innerHTML=t.properties.name,n.className="sensitive-area-name",e.appendChild(n),i.bindTooltip(e).openTooltip()}))},style:()=>({color:this.colorSensitiveArea})}).addTo(this.map),v.Control.SensitiveAreasCheckboxContainer=v.Control.extend({onAdd:()=>{const i=v.DomUtil.create("div");i.className="sensitiveAreasCheckboxContainer";const e=v.DomUtil.create("input");e.setAttribute("id","sensitiveAreasCheckbox"),e.setAttribute("type","checkbox"),e.setAttribute("checked","true"),e.onclick=t=>t.composedPath()[0].checked?this.map.addLayer(this.currentSensitiveAreasLayer):this.map.removeLayer(this.currentSensitiveAreasLayer);const n=v.DomUtil.create("label");return n.setAttribute("for","sensitiveAreasCheckbox"),n.innerHTML=t.features.length>1||"MultiPolygon"===t.features[0].geometry.type?"Afficher les zones sensibles":"Afficher la zone sensible",i.appendChild(e),i.appendChild(n),i}}),v.control.sensitiveAreasCheckboxContainer=()=>new v.Control.SensitiveAreasCheckboxContainer,this.sensitiveAreasControl=v.control.sensitiveAreasCheckboxContainer({position:"topright"}).addTo(this.map)}if(o.currentPois&&o.currentPois.length>0){const t={type:"FeatureCollection",features:[]};for(const i of o.currentPois)t.features.push({type:"Feature",properties:{name:i.name,type_pictogram:i.type_pictogram},geometry:i.geometry});this.currentPoisLayer=v.geoJSON(t,{pointToLayer:(t,i)=>v.marker(i,{icon:v.divIcon({html:t.properties.type_pictogram&&`<img src=${t.properties.type_pictogram} />`,className:"poi-icon",iconSize:48}),autoPanOnFocus:!1}),onEachFeature:(t,i)=>{i.once("mouseover",(()=>{const e=v.DomUtil.create("div");e.className="poi-tooltip";const n=v.DomUtil.create("div");n.innerHTML=t.properties.name,n.className="poi-name",e.appendChild(n),i.bindTooltip(e).openTooltip()}))}}).addTo(this.map)}if(o.currentInformationDesks&&o.currentInformationDesks.length>0){const t={type:"FeatureCollection",features:[]};for(const i of o.currentInformationDesks)t.features.push({type:"Feature",properties:{name:i.name,type_pictogram:i.type.pictogram},geometry:{type:"Point",coordinates:[Number(i.longitude),Number(i.latitude)]}});this.currentInformationDesksLayer=v.geoJSON(t,{pointToLayer:(t,i)=>v.marker(i,{icon:v.divIcon({html:t.properties.type_pictogram&&`<img src=${t.properties.type_pictogram} />`,className:"information-desks-icon",iconSize:48}),autoPanOnFocus:!1}),onEachFeature:(t,i)=>{i.once("mouseover",(()=>{const e=v.DomUtil.create("div");e.className="information-desks-tooltip";const n=v.DomUtil.create("div");n.innerHTML=t.properties.name,n.className="information-desks-name",e.appendChild(n),i.bindTooltip(e).openTooltip()}))}}).addTo(this.map)}if(o.currentTrek.points_reference){const t={type:"FeatureCollection",features:[]};t.features.push({type:"Feature",properties:{},geometry:o.currentTrek.points_reference});let i=0;this.currentPointsReferenceLayer=v.geoJSON(t,{pointToLayer:(t,e)=>(i+=1,v.marker(e,{icon:v.divIcon({html:i,className:"point-reference-icon",iconSize:24}),autoPanOnFocus:!1,interactive:!1}))}).addTo(this.map)}!this.mapIsReady&&(this.mapIsReady=!this.mapIsReady)}removeTrek(){this.currentTrekLayer&&(this.map.removeLayer(this.currentTrekLayer),this.currentTrekLayer=null),this.currentDepartureArrivalLayer&&(this.map.removeLayer(this.currentDepartureArrivalLayer),this.currentDepartureArrivalLayer=null),this.currentParkingLayer&&(this.map.removeLayer(this.currentParkingLayer),this.currentParkingLayer=null),this.currentSensitiveAreasLayer&&(this.map.removeLayer(this.currentSensitiveAreasLayer),this.currentSensitiveAreasLayer=null,this.map.removeControl(this.sensitiveAreasControl),this.sensitiveAreasControl=null),this.currentPoisLayer&&(this.map.removeLayer(this.currentPoisLayer),this.currentPoisLayer=null),this.currentInformationDesksLayer&&(this.map.removeLayer(this.currentInformationDesksLayer),this.currentInformationDesksLayer=null),this.currentPointsReferenceLayer&&(this.map.removeLayer(this.currentPointsReferenceLayer),this.currentPointsReferenceLayer=null)}render(){return i(e,{style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint,"--color-departure-icon":this.colorDepartureIcon,"--color-arrival-icon":this.colorArrivalIcon,"--color-poi-icon":this.colorPoiIcon}},!this.mapIsReady&&i("div",{class:"map-loader-container"},i("span",{class:"loader"})))}get element(){return s(this)}};m.style='.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none !important;max-height:none !important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none !important;max-height:none !important;width:auto;padding:0}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51, 181, 229, 0.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078A8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,0.5)}.leaflet-container{font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,0.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:black}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px \'Lucida Console\', Monaco, monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,0.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255, 255, 255, 0.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-control-attribution svg{display:inline !important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;background:rgba(255, 255, 255, 0.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,0.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:17px 0;margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;box-shadow:0 3px 14px rgba(0,0,0,0.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma, Verdana, sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,0.4)}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;color-adjust:exact}}grw-map{font-family:"Roboto";display:block;height:100%;max-height:100vh}.departure-icon svg,.arrival-icon svg{width:48px;height:48px}.departure-icon svg path,.arrival-icon svg path{fill:currentColor;stroke:currentColor}.departure-icon{color:var(--color-departure-icon)}.arrival-icon{color:var(--color-arrival-icon)}.trek-marker{background-color:var(--color-primary);border-radius:50%;display:flex;justify-content:center;align-items:center}.trek-marker img{width:36px !important}.map-loader-container{position:absolute;z-index:500;width:100%;height:100%;background:rgba(255, 255, 255, 0.5);display:flex;justify-content:center;align-items:center}.map-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.leaflet-popup-content{width:144px;margin:0}.trek-departure-popup{position:relative;display:flex;flex-direction:column;width:100px;height:auto;padding:24px}.trek-departure-popup img{border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-departure-popup .trek-name{color:var(--color-primary);font-weight:bold;font-size:12px}.trek-departure-popup .trek-name-margin-top{margin-top:12px}.poi-tooltip .poi-name,.poi-tooltip .information-desks-name,.poi-tooltip .sensitive-area-name,.information-desks-tooltip .poi-name,.information-desks-tooltip .information-desks-name,.information-desks-tooltip .sensitive-area-name,.sensitive-area-tooltip .poi-name,.sensitive-area-tooltip .information-desks-name,.sensitive-area-tooltip .sensitive-area-name{color:var(--color-primary);font-weight:bold;font-size:12px}.sensitiveAreasCheckboxContainer{display:flex;justify-content:center;align-items:center;background-color:#ffffff;padding:8px;border-radius:8px;user-select:none}.sensitiveAreasCheckboxContainer input,.sensitiveAreasCheckboxContainer label{cursor:pointer}.sensitiveAreasCheckboxContainer input{margin:0}.sensitiveAreasCheckboxContainer label{padding-left:8px}.poi-icon,.information-desks-icon{background-color:var(--color-poi-icon);border-radius:50%;display:flex;justify-content:center;align-items:center}.poi-icon img,.information-desks-icon img{width:36px !important}.parking-icon{background-color:#0000ff;border-radius:50%;display:flex;justify-content:center;align-items:center;width:48px;height:48px;font-size:24px;color:#ffffff}.point-reference-icon{background-color:#ff0000;border:1px solid #ffffff;border-radius:50%;display:flex;justify-content:center;align-items:center;width:24px;height:24px;font-size:18px;color:#ffffff}';const g=class{constructor(i){t(this,i),this.colorPrimary="#6b0030",this.colorPrimaryShade="#4a0021",this.colorPrimaryTint="#974c6e"}connectedCallback(){this.currentTrek=this.trek?this.trek:o.currentTrek,this.currentTrek&&(this.difficulty=o.difficulties.find((t=>t.id===this.currentTrek.difficulty)),this.route=o.routes.find((t=>t.id===this.currentTrek.route)),this.practice=o.practices.find((t=>t.id===this.currentTrek.practice)),this.themes=o.themes.filter((t=>this.currentTrek.themes.includes(t.id))),this.labels=o.labels.filter((t=>this.currentTrek.labels.includes(t.id))),this.sources=o.sources.filter((t=>this.currentTrek.source.includes(t.id))),this.accessibilities=o.accessibilities.filter((t=>this.currentTrek.accessibilities.includes(t.id))),o.accessibilitiesLevel&&(this.accessibilityLevel=o.accessibilitiesLevel.find((t=>this.currentTrek.accessibility_level===t.id)))),r("currentTrek",(()=>{this.currentTrek=this.trek?this.trek:o.currentTrek,this.currentTrek&&(this.difficulty=o.difficulties.find((t=>t.id===this.currentTrek.difficulty)),this.route=o.routes.find((t=>t.id===this.currentTrek.route)),this.practice=o.practices.find((t=>t.id===this.currentTrek.practice)),this.themes=o.themes.filter((t=>this.currentTrek.themes.includes(t.id))),this.labels=o.labels.filter((t=>this.currentTrek.labels.includes(t.id))),this.sources=o.sources.filter((t=>this.currentTrek.source.includes(t.id))),this.accessibilities=o.accessibilities.filter((t=>this.currentTrek.accessibilities.includes(t.id))),o.accessibilitiesLevel&&(this.accessibilityLevel=o.accessibilitiesLevel.find((t=>this.currentTrek.accessibility_level===t.id))))}))}render(){var t,n,s,r,d,p,v;return i(e,{style:{"--color-primary":this.colorPrimary,"--color-primary-shade":this.colorPrimaryShade,"--color-primary-tint":this.colorPrimaryTint}},this.currentTrek&&i("div",{class:"trek-detail-container"},i("div",{class:"name"},this.currentTrek.name),this.currentTrek.attachments&&this.currentTrek.attachments[0]&&this.currentTrek.attachments[0].thumbnail&&i("img",{class:"image",src:this.currentTrek.attachments[0].thumbnail,loading:"lazy"}),i("div",{class:"sub-container"},i("div",{class:"icons-labels-container"},i("div",{class:"row"},i("div",{class:"icon-label difficulty"},(null===(t=this.difficulty)||void 0===t?void 0:t.pictogram)&&i("img",{src:this.difficulty.pictogram}),null===(n=this.difficulty)||void 0===n?void 0:n.label),i("div",{class:"icon-label duration"},i("div",{class:"svg-icon",innerHTML:h}),a(null===(s=this.currentTrek)||void 0===s?void 0:s.duration)),i("div",{class:"icon-label route"},(null===(r=this.route)||void 0===r?void 0:r.pictogram)&&i("img",{src:this.route.pictogram}),null===(d=this.route)||void 0===d?void 0:d.route)),i("div",{class:"row"},i("div",{class:"icon-label length"},i("div",{class:"svg-icon",innerHTML:c}),l(this.currentTrek.length_2d)),i("div",{class:"icon-label ascent"},i("div",{class:"svg-icon",innerHTML:u}),f(this.currentTrek.ascent)),i("div",{class:"icon-label practice"},(null===(p=this.practice)||void 0===p?void 0:p.pictogram)&&i("img",{src:this.practice.pictogram}),null===(v=this.practice)||void 0===v?void 0:v.name)))),i("div",{class:"downloads-container"},i("div",{class:"download-title"},"Téléchargements"),i("div",{class:"links-container"},i("a",{href:`${this.currentTrek.gpx}`},"GPX"),i("a",{href:`${this.currentTrek.kml}`},"KML"),i("a",{href:`${this.currentTrek.pdf}`},"PDF"))),this.themes.length>0&&i("div",{class:"themes-container"},this.themes.map((t=>i("div",{class:"theme"},t.label)))),this.currentTrek.description_teaser&&i("div",{class:"description-teaser",innerHTML:this.currentTrek.description_teaser}),this.currentTrek.ambiance&&i("div",{class:"ambiance",innerHTML:this.currentTrek.ambiance}),this.currentTrek.description&&i("div",{class:"description-container"},i("div",{class:"description-title"},"Description"),i("div",{class:"description",innerHTML:this.currentTrek.description})),this.currentTrek.departure&&i("div",{class:"departure-container"},i("div",{class:"departure-title"},"Départ : "),i("div",{innerHTML:this.currentTrek.departure})),this.currentTrek.arrival&&i("div",{class:"arrival-container"},i("div",{class:"arrival-title"},"Arrivée : "),i("div",{innerHTML:this.currentTrek.arrival})),this.currentTrek.altimetric_profile&&i("div",{class:"altimetric-profile-container"},i("div",{class:"altimetric-profile-title"},"Profil altimétrique"),i("img",{src:this.currentTrek.altimetric_profile.endsWith(".json")?this.currentTrek.altimetric_profile.replace(".json",".svg"):`${this.currentTrek.altimetric_profile}?format=svg`})),this.currentTrek.access&&i("div",{class:"access-container"},i("div",{class:"access-title"},"Accès routier"),i("div",{class:"access",innerHTML:this.currentTrek.access})),this.currentTrek.public_transport&&i("div",{class:"public-transport-container"},i("div",{class:"public-transport-title"},"Transport"),i("div",{class:"public-transport",innerHTML:this.currentTrek.public_transport})),(this.currentTrek.advice||this.labels.length>0)&&i("div",{class:"advice-container"},i("div",{class:"advice-title"},"Recommandations"),this.currentTrek.advice&&i("div",{class:"advice",innerHTML:this.currentTrek.advice}),this.labels.map((t=>i("div",{class:"label-container"},i("div",{class:"label-sub-container"},t.pictogram&&i("img",{src:t.pictogram}),i("div",{class:"label-name",innerHTML:t.name})),i("div",{class:"label-advice",innerHTML:t.advice}))))),this.currentTrek.advised_parking&&i("div",{class:"advised-parking-container"},i("div",{class:"advised-parking-title"},"Parking conseillé"),i("div",{class:"advised_parking",innerHTML:this.currentTrek.advised_parking})),this.currentTrek.gear&&i("div",{class:"gear-container"},i("div",{class:"gear-title"},"Équipements"),i("div",{class:"gear",innerHTML:this.currentTrek.gear})),o.currentSensitiveAreas&&o.currentSensitiveAreas.length>0&&i("div",{class:"sensitive-areas-container"},i("div",{class:"sensitive-areas-title"},"Zones de sensibilité environnementale"),o.currentSensitiveAreas.map((t=>i("grw-sensitive-area-detail",{sensitiveArea:t})))),o.currentInformationDesks&&o.currentInformationDesks.length>0&&i("div",{class:"information-desks-container"},i("div",{class:"information-desks-title"},"Lieux de renseignement"),o.currentInformationDesks.map((t=>i("grw-information-desk-detail",{informationDesk:t})))),(this.currentTrek.disabled_infrastructure||this.accessibilities&&this.accessibilities.length>0||this.currentTrek.accessibility_level||this.currentTrek.accessibility_slope||this.currentTrek.accessibility_width||this.currentTrek.accessibility_signage||this.currentTrek.accessibility_covering||this.currentTrek.accessibility_exposure||this.currentTrek.accessibility_advice)&&i("div",{class:"accessibilities-container"},i("div",{class:"accessibilities-title"},"Accessibilité"),this.currentTrek.disabled_infrastructure&&i("div",{innerHTML:this.currentTrek.disabled_infrastructure}),i("div",{class:"accessibilities-content-container"},this.accessibilities.map((t=>i("div",{class:"accessibility-content-container"},i("img",{src:t.pictogram}),i("div",{innerHTML:t.name}))))),this.currentTrek.accessibility_level&&i("div",{class:"accessibility-level-container"},i("div",{class:"accessibility-level-title"},"Niveau d'accessibilité"),i("div",{innerHTML:this.accessibilityLevel.name})),this.currentTrek.accessibility_slope&&i("div",{class:"accessibility-slope-container"},i("div",{class:"accessibility-slope-title"},"Pente"),i("div",{innerHTML:this.currentTrek.accessibility_slope})),this.currentTrek.accessibility_width&&i("div",{class:"accessibility-width-container"},i("div",{class:"accessibility-width-title"},"Largeur"),i("div",{innerHTML:this.currentTrek.accessibility_width})),this.currentTrek.accessibility_signage&&i("div",{class:"accessibility-signage-container"},i("div",{class:"accessibility-signage-title"},"Pente"),i("div",{innerHTML:this.currentTrek.accessibility_signage})),this.currentTrek.accessibility_covering&&i("div",{class:"accessibility-covering-container"},i("div",{class:"accessibility-covering-title"},"Revêtement"),i("div",{innerHTML:this.currentTrek.accessibility_covering})),this.currentTrek.accessibility_exposure&&i("div",{class:"accessibility-exposure-container"},i("div",{class:"accessibility-exposure-title"},"Exposition"),i("div",{innerHTML:this.currentTrek.accessibility_exposure})),this.currentTrek.accessibility_advice&&i("div",{class:"accessibility-advice-container"},i("div",{class:"accessibility-advice-title"},"Conseils"),i("div",{innerHTML:this.currentTrek.accessibility_advice}))),o.currentPois&&o.currentPois.length>0&&i("div",{class:"pois-container"},i("div",{class:"pois-title"},"Points d'intérêts"),o.currentPois.map((t=>i("grw-poi-detail",{poi:t})))),this.currentTrek.source&&this.currentTrek.source.length>0&&i("div",{class:"source-container"},i("div",{class:"source-title"},"Sources"),this.sources.map((t=>i("div",{class:"source-sub-container"},t.pictogram&&i("img",{src:t.pictogram}),i("div",null,i("div",{class:"source-name",innerHTML:t.name}),i("a",{class:"source-advice",innerHTML:t.website}))))))))}};g.style='grw-sensitive-area-detail,grw-information-desk-detail,grw-poi-detail{margin-top:12px}.trek-detail-container{font-family:"Roboto";display:flex;flex-direction:column;height:100%;overflow-y:auto}.trek-detail-container .name{color:var(--color-primary);font-size:48px;font-weight:bold;padding:24px}.trek-detail-container .image{border-radius:8px;align-self:center;width:100%;max-width:700px;height:auto;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-detail-container .sub-container{padding:24px}.trek-detail-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-detail-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-detail-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:24px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label{display:flex;justify-content:center;align-items:center;width:33.3333333333%}.trek-detail-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 8px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label img,.trek-detail-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:24px}.trek-detail-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}.trek-detail-container .downloads-container{padding:0px 24px 24px 24px;display:flex;flex-direction:column;justify-content:center;align-items:center}.trek-detail-container .downloads-container .download-title{color:var(--color-primary);font-size:18px;margin-bottom:12px}.trek-detail-container .downloads-container .links-container{display:flex}.trek-detail-container .downloads-container .links-container a{background-color:var(--color-primary);padding:8px;color:#ffffff;text-decoration:none;border-radius:8px}.trek-detail-container .downloads-container .links-container a:nth-child(2){margin:0px 12px}.trek-detail-container .downloads-container .links-container a:hover{background-color:var(--color-primary-shade)}.trek-detail-container .themes-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap;padding:0px 24px 24px 24px}.trek-detail-container .themes-container .theme{background-color:var(--color-primary-tint);color:#ffffff;border-radius:8px;padding:8px;margin:0px 8px 8px 0px}.trek-detail-container .ambiance,.trek-detail-container .description-teaser,.trek-detail-container .description-container,.trek-detail-container .altimetric-profile-container,.trek-detail-container .access-container,.trek-detail-container .public-transport-container,.trek-detail-container .advice-container,.trek-detail-container .advised-parking-container,.trek-detail-container .gear-container,.trek-detail-container .pois-container,.trek-detail-container .sensitive-areas-container,.trek-detail-container .information-desks-container,.trek-detail-container .source-container,.trek-detail-container .accessibilities-container{padding:0px 24px 24px 24px}.trek-detail-container .ambiance a,.trek-detail-container .description-teaser a,.trek-detail-container .description-container a,.trek-detail-container .altimetric-profile-container a,.trek-detail-container .access-container a,.trek-detail-container .public-transport-container a,.trek-detail-container .advice-container a,.trek-detail-container .advised-parking-container a,.trek-detail-container .gear-container a,.trek-detail-container .pois-container a,.trek-detail-container .sensitive-areas-container a,.trek-detail-container .information-desks-container a,.trek-detail-container .source-container a,.trek-detail-container .accessibilities-container a{color:var(--color-primary)}.trek-detail-container .description-title,.trek-detail-container .altimetric-profile-title,.trek-detail-container .access-title,.trek-detail-container .public-transport-title,.trek-detail-container .advice-title,.trek-detail-container .advised-parking-title,.trek-detail-container .gear-title,.trek-detail-container .pois-title,.trek-detail-container .sensitive-areas-title,.trek-detail-container .information-desks-title,.trek-detail-container .source-title,.trek-detail-container .accessibilities-title{color:var(--color-primary);font-size:36px;font-weight:bold;margin:12px 0px}.label-container .label-sub-container{display:flex;align-items:center}.label-container .label-sub-container img{width:26px;margin-right:16px}.label-container .label-sub-container .label-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:12px 0px}.source-container .source-sub-container{display:flex;align-items:center}.source-container .source-sub-container img{width:26px;margin-right:16px}.source-container .source-sub-container .source-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:12px 0px}.departure-container,.arrival-container{display:flex;align-items:center;padding:0px 24px 24px 24px}.departure-container .departure-title,.departure-container .arrival-title,.arrival-container .departure-title,.arrival-container .arrival-title{color:var(--color-primary);font-weight:bold}.accessibilities-container .accessibilities-content-container{padding:12px 0px 0px 0px;display:flex}.accessibilities-container .accessibilities-content-container .accessibility-content-container{display:flex;align-items:center;margin:0px 8px 8px 0px}.accessibilities-container .accessibilities-content-container .accessibility-content-container img{margin-right:16px;width:26px}.accessibilities-container .accessibility-level-title,.accessibilities-container .accessibility-slope-title,.accessibilities-container .accessibility-width-title,.accessibilities-container .accessibility-signage-title,.accessibilities-container .accessibility-covering-title,.accessibilities-container .accessibility-exposure-title,.accessibilities-container .accessibility-advice-title{color:var(--color-primary);font-size:24px;padding:12px 0px}';const b=class{constructor(i){t(this,i),this.language="fr",this.trekNetworkError=!1,this.controller=new AbortController,this.signal=this.controller.signal}connectedCallback(){o.api=this.api;const t=[];t.push(o.difficulties?new Response("null"):fetch(`${this.api}trek_difficulty/?language=${this.language}&fields=id,label,pictogram`,{signal:this.signal})),t.push(o.routes?new Response("null"):fetch(`${this.api}trek_route/?language=${this.language}&fields=id,route,pictogram`,{signal:this.signal})),t.push(o.practices?new Response("null"):fetch(`${this.api}trek_practice/?language=${this.language}&fields=id,name,pictogram`,{signal:this.signal})),t.push(o.themes?new Response("null"):fetch(`${this.api}theme/?language=${this.language}&fields=id,label,pictogram`,{signal:this.signal})),Promise.all([...t,fetch(`${this.api}sensitivearea/?language=${this.language}&published=true&trek=${this.trekId}&fields=id,geometry,name,description,contact,info_url,period,practices`,{signal:this.signal}).catch((()=>new Response("null"))),fetch(`${this.api}label/?language=${this.language}&fields=id,name,advice,pictogram`,{signal:this.signal}),fetch(`${this.api}source/?language=${this.language}&fields=id,name,website,pictogram`,{signal:this.signal}),fetch(`${this.api}trek_accessibility/?language=${this.language}&fields=id,name,pictogram`,{signal:this.signal}),fetch(`${this.api}trek_accessibility_level/?language=${this.language}&fields=id,name`,{signal:this.signal}).catch((()=>new Response("null"))),fetch(`${this.api}poi/?language=${this.language}&trek=${this.trekId}&published=true&fields=id,name,description,attachments,type,type_label,type_pictogram,url,published,geometry&page_size=999`,{signal:this.signal}),fetch(`${this.api}informationdesk/?language=${this.language}&near_trek=${this.trekId}&fields=id,name,description,type,phone,email,website,municipality,postal_code,street,photo_url,latitude,longitude&page_size=999`,{signal:this.signal}),fetch(`${this.api}trek/${this.trekId}/?language=${this.language}&published=true&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,geometry,gpx,kml,pdf,parking_location,departure,arrival,altimetric_profile,ambiance,access,public_transport,advice,advised_parking,gear,labels,source,points_reference,disabled_infrastructure,accessibility_level,accessibility_slope,accessibility_width,accessibility_signage,accessibility_covering,accessibility_exposure,accessibility_advice,accessibilities`,{signal:this.signal})]).then((t=>Promise.all(t.map((t=>t.json()))))).then((([t,i,e,n,s,r,h,a,c,l,u,f])=>{o.trekNetworkError=!1,t&&(o.difficulties=t.results),i&&(o.routes=i.results),e&&(o.practices=e.results.map((t=>Object.assign(Object.assign({},t),{selected:!1})))),n&&(o.themes=n.results),s&&(o.currentSensitiveAreas=s.results),o.labels=r.results,o.sources=h.results,o.accessibilities=a.results,c&&(o.accessibilitiesLevel=c.results),o.currentPois=l.results,o.currentInformationDesks=u.results,o.currentTrek=f})).catch((()=>{o.trekNetworkError=!0}))}disconnectedCallback(){this.controller.abort(),o.currentTrek=null,o.trekNetworkError=!1}render(){return i(e,null)}},w=class{constructor(i){t(this,i),this.treksToDisplay=[],this.colorPrimary="#6b0030",this.colorPrimaryTint="#974c6e",this.isLargeView=!1,this.step=10,this.handleInfiniteScrollBind=this.handleInfiniteScroll.bind(this)}connectedCallback(){this.element.addEventListener("scroll",this.handleInfiniteScrollBind),o.currentTreks&&(this.treksToDisplay=[...o.currentTreks.slice(0,this.step)]),r("currentTreks",(()=>{this.element.scroll({top:0}),o.currentTreks&&(this.treksToDisplay=[...o.currentTreks.slice(0,this.step)])})),r("treksWithinBounds",(()=>{this.element.scroll({top:0}),o.treksWithinBounds&&(this.treksToDisplay=[...o.treksWithinBounds.slice(0,this.step)])}))}handleInfiniteScroll(t){t.composedPath()[0].scrollTop+t.composedPath()[0].scrollHeight/2>=t.composedPath()[0].scrollHeight&&(this.treksToDisplay.length<o.treksWithinBounds.length?this.treksToDisplay=o.treksWithinBounds.slice(0,this.treksToDisplay.length+this.step>=o.treksWithinBounds.length?o.treksWithinBounds.length:this.treksToDisplay.length+this.step):this.element.removeEventListener("scroll",this.handleInfiniteScrollBind))}disconnectedCallback(){this.element.removeEventListener("scroll",this.handleInfiniteScrollBind)}render(){return i(e,{style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint}},this.treksToDisplay.map((t=>i("grw-trek-card",{key:`trek-${t.id}`,trek:t,"is-large-view":this.isLargeView,"color-primary":this.colorPrimary,"color-primary-tint":this.colorPrimaryTint}))))}get element(){return s(this)}};w.style=':host{font-family:"Roboto";width:100%;height:100%;max-height:100vh;overflow-y:auto;display:flex;flex-wrap:wrap;justify-content:space-around}grw-trek-card{margin:6px}';const y=class{constructor(i){t(this,i),this.language="fr",this.controller=new AbortController,this.signal=this.controller.signal}connectedCallback(){o.api=this.api;let t=`${this.api}trek/?language=${this.language}&published=true`;this.inBbox&&(t+=`&in_bbox=${this.inBbox}`),this.cities&&(t+=`&cities=${this.cities}`),this.districts&&(t+=`&districts=${this.districts}`),this.structures&&(t+=`&structures=${this.structures}`),this.themes&&(t+=`&themes=${this.themes}`),this.portals&&(t+=`&portals=${this.portals}`),this.routes&&(t+=`&routes=${this.routes}`),this.practices&&(t+=`&practices=${this.practices}`),t+="&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,departure,departure_geom&page_size=999",Promise.all([fetch(`${this.api}trek_difficulty/?language=${this.language}&fields=id,label,pictogram`,{signal:this.signal}),fetch(`${this.api}trek_route/?language=${this.language}&fields=id,route,pictogram`,{signal:this.signal}),fetch(`${this.api}trek_practice/?language=${this.language}&fields=id,name,pictogram`,{signal:this.signal}),fetch(`${this.api}theme/?language=${this.language}&fields=id,label,pictogram`,{signal:this.signal}),fetch(t,{signal:this.signal})]).then((t=>Promise.all(t.map((t=>t.json()))))).then((([t,i,e,n,s])=>{o.treksNetworkError=!1,o.difficulties=t.results,o.routes=i.results,o.practices=e.results.map((t=>Object.assign(Object.assign({},t),{selected:!1}))),o.themes=n.results,o.durations=[{id:1,name:"0 - 1h",minValue:0,maxValue:1,selected:!1},{id:2,name:"1 - 2h",minValue:1,maxValue:2,selected:!1},{id:3,name:"2 - 5h",minValue:2,maxValue:5,selected:!1},{id:4,name:"5 - 10h",minValue:5,maxValue:10,selected:!1}],o.treks=s.results,o.currentTreks=s.results,o.treksWithinBounds=s.results})).catch((()=>o.treksNetworkError=!0))}disconnectedCallback(){this.controller.abort(),o.treksNetworkError=!1}render(){return i(e,null)}};export{d as grw_filter,m as grw_map,g as grw_trek_detail,b as grw_trek_provider,w as grw_treks_list,y as grw_treks_provider}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geotrekce/geotrek-rando-widget",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Geotrek Rando Widget",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",