@geotrekce/geotrek-rando-widget 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/cjs/geotrek-rando-widget.cjs.js +19 -0
- package/dist/cjs/grw-app_7.cjs.entry.js +14662 -0
- package/dist/cjs/index-31255e29.js +1262 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/collection/assets/arrow-back.svg +1 -0
- package/dist/collection/assets/ascent.svg +1 -0
- package/dist/collection/assets/departure-arrival.svg +1 -0
- package/dist/collection/assets/duration.svg +1 -0
- package/dist/collection/assets/length.svg +1 -0
- package/dist/collection/collection-manifest.json +18 -0
- package/dist/collection/components/grw-app/grw-app.css +112 -0
- package/dist/collection/components/grw-app/grw-app.js +156 -0
- package/dist/collection/components/grw-map/grw-map.css +686 -0
- package/dist/collection/components/grw-map/grw-map.js +187 -0
- package/dist/collection/components/grw-trek-card/grw-trek-card.css +66 -0
- package/dist/collection/components/grw-trek-card/grw-trek-card.js +90 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css +58 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +74 -0
- package/dist/collection/components/grw-treks-list/grw-treks-list.css +21 -0
- package/dist/collection/components/grw-treks-list/grw-treks-list.js +38 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/store/grw-trek-provider.js +63 -0
- package/dist/collection/store/grw-treks-provider.js +65 -0
- package/dist/collection/store/store.js +11 -0
- package/dist/collection/stories/App.js +9 -0
- package/dist/collection/stories/App.stories.js +21 -0
- package/dist/collection/stories/TrekCard.js +7 -0
- package/dist/collection/stories/TrekCard.stories.js +18 -0
- package/dist/collection/stories/TrekDetail.js +7 -0
- package/dist/collection/stories/TrekDetail.stories.js +18 -0
- package/dist/collection/stories/TrekMap.js +11 -0
- package/dist/collection/stories/TrekMap.stories.js +21 -0
- package/dist/collection/stories/TreksList.js +6 -0
- package/dist/collection/stories/TreksList.stories.js +17 -0
- package/dist/collection/stories/TreksMap.js +7 -0
- package/dist/collection/stories/TreksMap.stories.js +17 -0
- package/dist/collection/types/types.js +1 -0
- package/dist/collection/utils/utils.js +19 -0
- package/dist/components/grw-app.d.ts +11 -0
- package/dist/components/grw-app.js +98 -0
- package/dist/components/grw-map.d.ts +11 -0
- package/dist/components/grw-map.js +6 -0
- package/dist/components/grw-map2.js +14288 -0
- package/dist/components/grw-trek-card.d.ts +11 -0
- package/dist/components/grw-trek-card.js +6 -0
- package/dist/components/grw-trek-card2.js +45 -0
- package/dist/components/grw-trek-detail.d.ts +11 -0
- package/dist/components/grw-trek-detail.js +6 -0
- package/dist/components/grw-trek-detail2.js +44 -0
- package/dist/components/grw-trek-provider.d.ts +11 -0
- package/dist/components/grw-trek-provider.js +6 -0
- package/dist/components/grw-trek-provider2.js +49 -0
- package/dist/components/grw-treks-list.d.ts +11 -0
- package/dist/components/grw-treks-list.js +6 -0
- package/dist/components/grw-treks-list2.js +57 -0
- package/dist/components/grw-treks-provider.d.ts +11 -0
- package/dist/components/grw-treks-provider.js +6 -0
- package/dist/components/grw-treks-provider2.js +51 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +1 -0
- package/dist/components/length.js +27 -0
- package/dist/components/store.js +196 -0
- package/dist/esm/geotrek-rando-widget.js +17 -0
- package/dist/esm/grw-app_7.entry.js +14652 -0
- package/dist/esm/index-b36f38f5.js +1232 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.css +1 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -0
- package/dist/geotrek-rando-widget/index.esm.js +0 -0
- package/dist/geotrek-rando-widget/p-f721481d.js +2 -0
- package/dist/geotrek-rando-widget/p-fe788eaa.entry.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/grw-app/grw-app.d.ts +15 -0
- package/dist/types/components/grw-map/grw-map.d.ts +17 -0
- package/dist/types/components/grw-trek-card/grw-trek-card.d.ts +12 -0
- package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +10 -0
- package/dist/types/components/grw-treks-list/grw-treks-list.d.ts +10 -0
- package/dist/types/components.d.ts +149 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/store/grw-trek-provider.d.ts +7 -0
- package/dist/types/store/grw-treks-provider.d.ts +6 -0
- package/dist/types/store/store.d.ts +18 -0
- package/dist/types/types/types.d.ts +48 -0
- package/dist/types/utils/utils.d.ts +3 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +57 -0
- package/readme.md +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t,f as i,r as n,h as e,H as s,a as o,c as r}from"./p-f721481d.js";const h=t=>!("isConnected"in t)||t.isConnected,a=(()=>{let t;return(...i)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let i of t.keys())t.set(i,t.get(i).filter(h))})(...i)}),2e3)}})(),{state:u,onChange:l}=(()=>{const n=((t,i=((t,i)=>t!==i))=>{let n=new Map(Object.entries(null!=t?t:{}));const e={dispose:[],get:[],set:[],reset:[]},s=()=>{n=new Map(Object.entries(null!=t?t:{})),e.reset.forEach((t=>t()))},o=t=>(e.get.forEach((i=>i(t))),n.get(t)),r=(t,s)=>{const o=n.get(t);i(s,o,t)&&(n.set(t,s),e.set.forEach((i=>i(t,s,o))))},h="undefined"==typeof Proxy?{}:new Proxy(t,{get:(t,i)=>o(i),ownKeys:()=>Array.from(n.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,i)=>n.has(i),set:(t,i,n)=>(r(i,n),!0)}),a=(t,i)=>(e[t].push(i),()=>{((t,i)=>{const n=t.indexOf(i);n>=0&&(t[n]=t[t.length-1],t.length--)})(e[t],i)});return{state:h,get:o,set:r,on:a,onChange:(i,n)=>{const e=a("set",((t,e)=>{t===i&&n(e)})),s=a("reset",(()=>n(t[i])));return()=>{e(),s()}},use:(...t)=>{const i=t.reduce(((t,i)=>(i.set&&t.push(a("set",i.set)),i.get&&t.push(a("get",i.get)),i.reset&&t.push(a("reset",i.reset)),i.dispose&&t.push(a("dispose",i.dispose)),t)),[]);return()=>i.forEach((t=>t()))},dispose:()=>{e.dispose.forEach((t=>t())),s()},reset:s,forceUpdate:t=>{const i=n.get(t);e.set.forEach((n=>n(t,i,i)))}}})({api:"",treks:[],difficulties:[],routes:[],practices:[],currentTrek:null},void 0);return n.use((()=>{if("function"!=typeof t)return{};const n=new Map;return{dispose:()=>n.clear(),get:i=>{const e=t();e&&((t,i,n)=>{const e=t.get(i);e?e.includes(n)||e.push(n):t.set(i,[n])})(n,i,e)},set:t=>{const e=n.get(t);e&&n.set(t,e.filter(i)),a(n)},reset:()=>{n.forEach((t=>t.forEach(i))),a(n)}}})()),n})(),c=class{constructor(t){n(this,t),this.appName="Geotrek Rando Widget",this.colorPrimary="#6b0030",this.colorPrimaryTint="#d2b2c0"}onTrekCardPress(t){this.currentTrekId=t.detail,this.showTrek=!this.showTrek}onWindowResize(t){this.showMap=!(t.composedPath()[0].innerWidth<664)}onTrekDetailsClose(){this.currentTrekId=null,this.showTrek=!this.showTrek}componentWillLoad(){this.showMap=!(window.innerWidth<664)}render(){return e(s,{style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint}},e("grw-treks-provider",{api:this.api,portals:this.portals},e("div",{class:"header-container"},this.showTrek?e("div",{onClick:()=>this.onTrekDetailsClose(),class:"arrow-back-icon",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><polyline points="244 400 100 256 244 112" style="fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:48px"/><line x1="120" y1="256" x2="412" y2="256" style="fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:48px"/></svg>'}):e("div",{class:"title"},this.appName)),e("div",{class:"content-container"},e("div",{class:"app-treks-list-container",style:{visibility:this.showTrek?"hidden":"visible",position:this.showTrek?"absolute":"relative"}},e("grw-treks-list",null)),this.showTrek&&!u.currentTrek&&e("div",{class:"loader-container"},e("span",{class:"loader"})),this.showTrek&&this.currentTrekId&&e("grw-trek-provider",{api:u.api,"trek-id":this.currentTrekId},u.currentTrek&&e("div",{class:"app-trek-detail-container"},e("grw-trek-detail",null))),e("div",{class:"app-map-container",style:{visibility:this.showMap?"visible":"hidden"}},e("grw-map",null))),e("div",{class:"map-visibility-button"},e("div",{onClick:()=>this.showMap=!this.showMap},this.showMap?this.showTrek?"Voir la fiche":"Voir la liste":"Voir la carte"))))}};c.style=".header-container{display:flex;align-items:center;background-color:var(--color-primary);height:64px}.header-container .title{color:#ffffff;font-size:24px;margin-left:24px}.header-container .arrow-back-icon{width:48px;height:auto;margin-left:24px}.header-container .arrow-back-icon svg{cursor:pointer;width:48px;height:auto}.loader-container{position:absolute;display:flex;justify-content:center;align-items:center;width:100vw;height:100%}.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)}}.content-container{display:flex;height:calc(100vh - 64px)}.app-treks-list-container,.app-trek-detail-container{width:100vw;height:100%}.app-map-container{position:absolute;width:100vw;height:calc(100vh - 64px)}.map-visibility-button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:absolute;bottom:24px;width:100%;z-index:400;user-select:none}.map-visibility-button div{background-color:var(--color-primary);color:#ffffff;padding:12px;border-radius:24px;width:120px;text-align:center}@media (min-width: 664px){.map-visibility-button{display:none}.header-container .title{font-size:32px}.loader-container{position:relative;width:50vw}.app-treks-list-container,.app-trek-detail-container{width:50vw;height:100%}.app-map-container{position:relative;width:50vw;height:100%}}","undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var f,d=(function(t){function i(t){var i,n,e,s;for(n=1,e=arguments.length;n<e;n++)for(i in s=arguments[n])t[i]=s[i];return t}var n=Object.create||function(){function t(){}return function(i){return t.prototype=i,new t}}();function e(t,i){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var e=n.call(arguments,2);return function(){return t.apply(i,e.length?e.concat(n.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,n){var e,s,o,r;return r=function(){e=!1,s&&(o.apply(n,s),s=!1)},o=function(){e?s=arguments:(t.apply(n,arguments),setTimeout(r,i),e=!0)}}function h(t,i,n){var e=i[1],s=i[0],o=e-s;return t===e&&n?t:((t-s)%o+o)%o+s}function a(){return!1}function u(t,i){if(!1===i)return t;var n=Math.pow(10,void 0===i?6:i);return Math.round(t*n)/n}function l(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function c(t){return l(t).split(/\s+/)}function f(t,i){for(var e in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?n(t.options):{}),i)t.options[e]=i[e];return t.options}function d(t,i,n){var e=[];for(var s in t)e.push(encodeURIComponent(n?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(i&&-1!==i.indexOf("?")?"&":"?")+e.join("&")}var p=/\{ *([\w_ -]+) *\}/g;function v(t,i){return t.replace(p,(function(t,n){var e=i[n];if(void 0===e)throw new Error("No value provided for variable "+t);return"function"==typeof e&&(e=e(i)),e}))}var m=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function g(t,i){for(var n=0;n<t.length;n++)if(t[n]===i)return n;return-1}var w="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var y=0;function x(t){var i=+new Date,n=Math.max(0,16-(i-y));return y=i+n,window.setTimeout(t,n)}var _=window.requestAnimationFrame||b("RequestAnimationFrame")||x,k=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function M(t,i,n){if(!n||_!==x)return _.call(window,e(t,i));t.call(i)}function z(t){t&&k.call(window,t)}var P={__proto__:null,extend:i,create:n,bind:e,get lastId(){return s},stamp:o,throttle:r,wrapNum:h,falseFn:a,formatNum:u,trim:l,splitWords:c,setOptions:f,getParamString:d,template:v,isArray:m,indexOf:g,emptyImageUrl:w,requestFn:_,cancelFn:k,requestAnimFrame:M,cancelAnimFrame:z};function T(){}T.extend=function(t){var e=function(){f(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=e.__super__=this.prototype,o=n(s);for(var r in o.constructor=e,e.prototype=o,this)Object.prototype.hasOwnProperty.call(this,r)&&"prototype"!==r&&"__super__"!==r&&(e[r]=this[r]);return t.statics&&i(e,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?n(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)}},e},T.include=function(t){var n=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=n,this.mergeOptions(t.options)),this},T.mergeOptions=function(t){return i(this.prototype.options,t),this},T.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var C={on:function(t,i,n){if("object"==typeof t)for(var e in t)this._on(e,t[e],i);else for(var s=0,o=(t=c(t)).length;s<o;s++)this._on(t[s],i,n);return this},off:function(t,i,n){if(arguments.length)if("object"==typeof t)for(var e in t)this._off(e,t[e],i);else{t=c(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,n)}else delete this._events;return this},_on:function(t,i,n){if("function"==typeof i){this._events=this._events||{};var e=this._events[t];e||(this._events[t]=e=[]),n===this&&(n=void 0);for(var s={fn:i,ctx:n},o=e,r=0,h=o.length;r<h;r++)if(o[r].fn===i&&o[r].ctx===n)return;o.push(s)}else console.warn("wrong listener type: "+typeof i)},_off:function(t,i,n){var e,s,o;if(this._events&&(e=this._events[t]))if(1!==arguments.length)if(n===this&&(n=void 0),"function"==typeof i){for(s=0,o=e.length;s<o;s++){var r=e[s];if(r.ctx===n&&r.fn===i)return this._firingCount&&(r.fn=a,this._events[t]=e=e.slice()),void e.splice(s,1)}console.warn("listener not found")}else console.warn("wrong listener type: "+typeof i);else{if(this._firingCount)for(s=0,o=e.length;s<o;s++)e[s].fn=a;delete this._events[t]}},fire:function(t,n,e){if(!this.listens(t,e))return this;var s=i({},n,{type:t,target:this,sourceTarget:n&&n.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 e&&this._propagateEvent(s),this},listens:function(t,i){"string"!=typeof t&&console.warn('"string" type argument expected');var n=this._events&&this._events[t];if(n&&n.length)return!0;if(i)for(var e in this._eventParents)if(this._eventParents[e].listens(t,i))return!0;return!1},once:function(t,i,n){if("object"==typeof t){for(var s in t)this.once(s,t[s],i);return this}var o=e((function(){this.off(t,i,n).off(t,o,n)}),this);return this.on(t,i,n).on(t,o,n)},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 n in this._eventParents)this._eventParents[n].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 S=T.extend(C);function A(t,i,n){this.x=n?Math.round(t):t,this.y=n?Math.round(i):i}var E=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function O(t,i,n){return t instanceof A?t:m(t)?new A(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new A(t.x,t.y):new A(t,i,n)}function I(t,i){if(t)for(var n=i?[t,i]:t,e=0,s=n.length;e<s;e++)this.extend(n[e])}function B(t,i){return!t||t instanceof I?t:new I(t,i)}function j(t,i){if(t)for(var n=i?[t,i]:t,e=0,s=n.length;e<s;e++)this.extend(n[e])}function Z(t,i){return t instanceof j?t:new j(t,i)}function D(t,i,n){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==n&&(this.alt=+n)}function R(t,i,n){return t instanceof D?t:m(t)&&"object"!=typeof t[0]?3===t.length?new D(t[0],t[1],t[2]):2===t.length?new D(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new D(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new D(t,i,n)}A.prototype={clone:function(){return new A(this.x,this.y)},add:function(t){return this.clone()._add(O(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(O(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new A(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new A(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=E(this.x),this.y=E(this.y),this},distanceTo:function(t){var i=(t=O(t)).x-this.x,n=t.y-this.y;return Math.sqrt(i*i+n*n)},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("+u(this.x)+", "+u(this.y)+")"}},I.prototype={extend:function(t){return t=O(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new A((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new A(this.min.x,this.max.y)},getTopRight:function(){return new A(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var i,n;return(t="number"==typeof t[0]||t instanceof A?O(t):B(t))instanceof I?(i=t.min,n=t.max):i=n=t,i.x>=this.min.x&&n.x<=this.max.x&&i.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=B(t);var i=this.min,n=this.max,e=t.min,s=t.max;return s.x>=i.x&&e.x<=n.x&&s.y>=i.y&&e.y<=n.y},overlaps:function(t){t=B(t);var i=this.min,n=this.max,e=t.min,s=t.max;return s.x>i.x&&e.x<n.x&&s.y>i.y&&e.y<n.y},isValid:function(){return!(!this.min||!this.max)}},j.prototype={extend:function(t){var i,n,e=this._southWest,s=this._northEast;if(t instanceof D)i=t,n=t;else{if(!(t instanceof j))return t?this.extend(R(t)||Z(t)):this;if(n=t._northEast,!(i=t._southWest)||!n)return this}return e||s?(e.lat=Math.min(i.lat,e.lat),e.lng=Math.min(i.lng,e.lng),s.lat=Math.max(n.lat,s.lat),s.lng=Math.max(n.lng,s.lng)):(this._southWest=new D(i.lat,i.lng),this._northEast=new D(n.lat,n.lng)),this},pad:function(t){var i=this._southWest,n=this._northEast,e=Math.abs(i.lat-n.lat)*t,s=Math.abs(i.lng-n.lng)*t;return new j(new D(i.lat-e,i.lng-s),new D(n.lat+e,n.lng+s))},getCenter:function(){return new D((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 D(this.getNorth(),this.getWest())},getSouthEast:function(){return new D(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 D||"lat"in t?R(t):Z(t);var i,n,e=this._southWest,s=this._northEast;return t instanceof j?(i=t.getSouthWest(),n=t.getNorthEast()):i=n=t,i.lat>=e.lat&&n.lat<=s.lat&&i.lng>=e.lng&&n.lng<=s.lng},intersects:function(t){t=Z(t);var i=this._southWest,n=this._northEast,e=t.getSouthWest(),s=t.getNorthEast();return s.lat>=i.lat&&e.lat<=n.lat&&s.lng>=i.lng&&e.lng<=n.lng},overlaps:function(t){t=Z(t);var i=this._southWest,n=this._northEast,e=t.getSouthWest(),s=t.getNorthEast();return s.lat>i.lat&&e.lat<n.lat&&s.lng>i.lng&&e.lng<n.lng},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=Z(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}},D.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("+u(this.lat,t)+", "+u(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,n=i/Math.cos(Math.PI/180*this.lat);return Z([this.lat-i,this.lng-n],[this.lat+i,this.lng+n])},clone:function(){return new D(this.lat,this.lng,this.alt)}};var N,F={latLngToPoint:function(t,i){var n=this.projection.project(t),e=this.scale(i);return this.transformation._transform(n,e)},pointToLatLng:function(t,i){var n=this.scale(i),e=this.transformation.untransform(t,n);return this.projection.unproject(e)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var i=this.projection.bounds,n=this.scale(t);return new I(this.transformation.transform(i.min,n),this.transformation.transform(i.max,n))},infinite:!1,wrapLatLng:function(t){var i=this.wrapLng?h(t.lng,this.wrapLng,!0):t.lng;return new D(this.wrapLat?h(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),n=this.wrapLatLng(i),e=i.lat-n.lat,s=i.lng-n.lng;if(0===e&&0===s)return t;var o=t.getSouthWest(),r=t.getNorthEast();return new j(new D(o.lat-e,o.lng-s),new D(r.lat-e,r.lng-s))}},H=i({},F,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var n=Math.PI/180,e=t.lat*n,s=i.lat*n,o=Math.sin((i.lat-t.lat)*n/2),r=Math.sin((i.lng-t.lng)*n/2),h=o*o+Math.cos(e)*Math.cos(s)*r*r,a=2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h));return this.R*a}}),U=6378137,W={R:U,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,n=this.MAX_LATITUDE,e=Math.max(Math.min(n,t.lat),-n),s=Math.sin(e*i);return new A(this.R*t.lng*i,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var i=180/Math.PI;return new D((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:(N=U*Math.PI,new I([-N,-N],[N,N]))};function G(t,i,n,e){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=n,this._d=e}function V(t,i,n,e){return new G(t,i,n,e)}G.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 A((t.x/(i=i||1)-this._b)/this._a,(t.y/i-this._d)/this._c)}};var $=i({},H,{code:"EPSG:3857",projection:W,transformation:function(){var t=.5/(Math.PI*W.R);return V(t,.5,-t,.5)}()}),q=i({},$,{code:"EPSG:900913"});function J(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function K(t,i){var n,e,s,o,r,h,a="";for(n=0,s=t.length;n<s;n++){for(e=0,o=(r=t[n]).length;e<o;e++)a+=(e?"L":"M")+(h=r[e]).x+" "+h.y;a+=i?Ot.svg?"z":"x":""}return a||"M0 0"}var X,Q=document.documentElement.style,Y="ActiveXObject"in window,tt=Y&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),nt=Et("webkit"),et=Et("android"),st=Et("android 2")||Et("android 3"),ot=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),rt=et&&Et("Google")&&ot<537&&!("AudioNode"in window),ht=!!window.opera,at=!it&&Et("chrome"),ut=Et("gecko")&&!nt&&!ht&&!Y,lt=!at&&Et("safari"),ct=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&&!ct,wt="undefined"!=typeof orientation||Et("mobile"),bt=wt&&nt,yt=wt&&vt,xt=!window.PointerEvent&&window.MSPointerEvent,_t=!(!window.PointerEvent&&!xt),kt="ontouchstart"in window||!!window.TouchEvent,Mt=!window.L_NO_TOUCH&&(kt||_t),zt=wt&&ht,Pt=wt&&ut,Tt=(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,St=!(!document.createElementNS||!J("svg").createSVGRect),At=!!St&&((X=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(X.firstChild&&X.firstChild.namespaceURI));function Et(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Ot={ie:Y,ielt9:tt,edge:it,webkit:nt,android:et,android23:st,androidStock:rt,opera:ht,chrome:at,gecko:ut,safari:lt,phantom:ct,opera12:ft,win:dt,ie3d:pt,webkit3d:vt,gecko3d:mt,any3d:gt,mobile:wt,mobileWebkit:bt,mobileWebkit3d:yt,msPointer:xt,pointer:_t,touch:Mt,touchNative:kt,mobileOpera:zt,mobileGecko:Pt,retina:Tt,passiveEvents:Lt,canvas:Ct,svg:St,vml:!St&&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:At},It=Ot.msPointer?"MSPointerDown":"pointerdown",Bt=Ot.msPointer?"MSPointerMove":"pointermove",jt=Ot.msPointer?"MSPointerUp":"pointerup",Zt=Ot.msPointer?"MSPointerCancel":"pointercancel",Dt={touchstart:It,touchmove:Bt,touchend:jt,touchcancel:Zt},Rt={touchstart:function(t,i){i.MSPOINTER_TYPE_TOUCH&&i.pointerType===i.MSPOINTER_TYPE_TOUCH&&ji(i),Vt(t,i)},touchmove:Vt,touchend:Vt,touchcancel:Vt},Nt={},Ft=!1;function Ht(t,i,n){return"touchstart"===i&&(Ft||(document.addEventListener(It,Ut,!0),document.addEventListener(Bt,Wt,!0),document.addEventListener(jt,Gt,!0),document.addEventListener(Zt,Gt,!0),Ft=!0)),Rt[i]?(n=Rt[i].bind(this,n),t.addEventListener(Dt[i],n,!1),n):(console.warn("wrong event specified:",i),L.Util.falseFn)}function Ut(t){Nt[t.pointerId]=t}function Wt(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function Gt(t){delete Nt[t.pointerId]}function Vt(t,i){if(i.pointerType!==(i.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in i.touches=[],Nt)i.touches.push(Nt[n]);i.changedTouches=[i],t(i)}}var $t,qt,Jt,Kt,Xt,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 ni(t,i){var n=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!n||"auto"===n)&&document.defaultView){var e=document.defaultView.getComputedStyle(t,null);n=e?e[i]:null}return"auto"===n?null:n}function ei(t,i,n){var e=document.createElement(t);return e.className=i||"",n&&n.appendChild(e),e}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 n=fi(t);return n.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(n)}function ui(t,i){if(void 0!==t.classList)for(var n=c(i),e=0,s=n.length;e<s;e++)t.classList.add(n[e]);else if(!ai(t,i)){var o=fi(t);ci(t,(o?o+" ":"")+i)}}function li(t,i){void 0!==t.classList?t.classList.remove(i):ci(t,l((" "+fi(t)+" ").replace(" "+i+" "," ")))}function ci(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 n=!1,e="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(e)}catch(t){if(1===i)return}i=Math.round(100*i),n?(n.Enabled=100!==i,n.Opacity=i):t.style.filter+=" progid:"+e+"(opacity="+i+")"}(t,i)}function pi(t){for(var i=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in i)return t[n];return!1}function vi(t,i,n){var e=i||new A(0,0);t.style[Qt]=(Ot.ie3d?"translate("+e.x+"px,"+e.y+"px)":"translate3d("+e.x+"px,"+e.y+"px,0)")+(n?" scale("+n+")":"")}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 A(0,0)}if("onselectstart"in document)$t=function(){Pi(window,"selectstart",ji)},qt=function(){Li(window,"selectstart",ji)};else{var wi=pi(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);$t=function(){if(wi){var t=document.documentElement.style;Jt=t[wi],t[wi]="none"}},qt=function(){wi&&(document.documentElement.style[wi]=Jt,Jt=void 0)}}function bi(){Pi(window,"dragstart",ji)}function yi(){Li(window,"dragstart",ji)}function xi(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(_i(),Kt=t,Xt=t.style.outline,t.style.outline="none",Pi(window,"keydown",_i))}function _i(){Kt&&(Kt.style.outline=Xt,Kt=void 0,Xt=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:ni,create:ei,remove:si,empty:oi,toFront:ri,toBack:hi,hasClass:ai,addClass:ui,removeClass:li,setClass:ci,getClass:fi,setOpacity:di,testProp:pi,setTransform:vi,setPosition:mi,getPosition:gi,get disableTextSelection(){return $t},get enableTextSelection(){return qt},disableImageDrag:bi,enableImageDrag:yi,preventOutline:xi,restoreOutline:_i,getSizedParentNode:ki,getScale:Mi};function Pi(t,i,n,e){if(i&&"object"==typeof i)for(var s in i)Ai(t,s,i[s],n);else for(var o=0,r=(i=c(i)).length;o<r;o++)Ai(t,i[o],n,e);return this}var Ti="_leaflet_events";function Li(t,i,n,e){if(1===arguments.length)Ci(t),delete t[Ti];else if(i&&"object"==typeof i)for(var s in i)Ei(t,s,i[s],n);else if(i=c(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],n,e);return this}function Ci(t,i){for(var n in t[Ti]){var e=n.split(/\d/)[0];i&&!i(e)||Ei(t,e,null,null,n)}}var Si={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ai(t,i,n,e){var s=i+o(n)+(e?"_"+o(e):"");if(t[Ti]&&t[Ti][s])return this;var r=function(i){return n.call(e||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 n,e=0;function s(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var s=Date.now();s-e<=200?2==++n&&i(function(t){var i,n,e={};for(n in t)e[n]=(i=t[n])&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}(t)):n=1,e=s}}else n=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(Si[i]||i,r,!!Ot.passiveEvents&&{passive:!1}):"mouseenter"===i||"mouseleave"===i?t.addEventListener(Si[i],r=function(i){i=i||window.event,Fi(t,i)&&h(i)},!1):t.addEventListener(i,h,!1):t.attachEvent("on"+i,r),t[Ti]=t[Ti]||{},t[Ti][s]=r}function Ei(t,i,n,e,s){s=s||i+o(n)+(e?"_"+o(e):"");var r=t[Ti]&&t[Ti][s];if(!r)return this;!Ot.touchNative&&Ot.pointer&&0===i.indexOf("touch")?function(t,i,n){Dt[i]?t.removeEventListener(Dt[i],n,!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(Si[i]||i,r,!1):t.detachEvent("on"+i,r),t[Ti][s]=null}function Oi(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ii(t){return Ai(t,"wheel",Oi),this}function Bi(t){return Pi(t,"mousedown touchstart dblclick contextmenu",Oi),t._leaflet_disable_click=!0,this}function ji(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Zi(t){return ji(t),Oi(t),this}function Di(t,i){if(!i)return new A(t.clientX,t.clientY);var n=Mi(i),e=n.boundingClientRect;return new A((t.clientX-e.left)/n.x-i.clientLeft,(t.clientY-e.top)/n.y-i.clientTop)}var Ri=Ot.win&&Ot.chrome?2*window.devicePixelRatio:Ot.gecko?window.devicePixelRatio:1;function Ni(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 Fi(t,i){var n=i.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var Hi={__proto__:null,on:Pi,off:Li,stopPropagation:Oi,disableScrollPropagation:Ii,disableClickPropagation:Bi,preventDefault:ji,stop:Zi,getMousePosition:Di,getWheelDelta:Ni,isExternalTarget:Fi,addListener:Pi,removeListener:Li},Ui=S.extend({run:function(t,i,n,e){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(e||.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,n=1e3*this._duration;i<n?this._runFrame(this._easeOut(i/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){var n=this._startPos.add(this._offset.multiplyBy(t));i&&n._round(),mi(this._el,n),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)}}),Wi=S.extend({options:{crs:$,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=e(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(),Pi(this._proxy,ti,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,n,e){return n=void 0===n?this._zoom:this._limitZoom(n),t=this._limitCenter(R(t),n,this.options.maxBounds),e=e||{},this._stop(),this._loaded&&!e.reset&&!0!==e&&(void 0!==e.animate&&(e.zoom=i({animate:e.animate},e.zoom),e.pan=i({animate:e.animate,duration:e.duration},e.pan)),this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,n,e.zoom):this._tryAnimatedPan(t,e.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,n),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,n){var e=this.getZoomScale(i),s=this.getSize().divideBy(2),o=(t instanceof A?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/e),r=this.containerPointToLatLng(s.add(o));return this.setView(r,i,{zoom:n})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():Z(t);var n=O(i.paddingTopLeft||i.padding||[0,0]),e=O(i.paddingBottomRight||i.padding||[0,0]),s=this.getBoundsZoom(t,!1,n.add(e));if((s="number"==typeof i.maxZoom?Math.min(i.maxZoom,s):s)===1/0)return{center:t.getCenter(),zoom:s};var o=e.subtract(n).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=Z(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,i);return this.setView(n.center,n.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 Ui,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate){ui(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,i.duration||.25,i.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,i,n){if(!1===(n=n||{}).animate||!Ot.any3d)return this.setView(t,i,n);this._stop();var e=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),u=s.distanceTo(e)||1,l=1.42,c=2.0164;function f(t){var i=(a*a-h*h+(t?-1:1)*c*c*u*u)/(2*(t?a:h)*c*u),n=Math.sqrt(i*i+1)-i;return n<1e-9?-18:Math.log(n)}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))/c;var i}var g=Date.now(),w=(f(1)-v)/l,b=n.duration?1e3*n.duration:1e3*w*.8;return this._moveStart(!0,n.noMoveStart),function n(){var o=(Date.now()-g)/b,a=function(t){return 1-Math.pow(1-t,1.5)}(o)*w;o<=1?(this._flyToFrame=M(n,this),this._move(this.unproject(e.add(s.subtract(e).multiplyBy(m(a)/u)),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 n=this._getBoundsCenterZoom(t,i);return this.flyTo(n.center,n.zoom,i)},setMaxBounds:function(t){return(t=Z(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 n=this.getCenter(),e=this._limitCenter(n,this._zoom,Z(t));return n.equals(e)||this.panTo(e,i),this._enforcingBounds=!1,this},panInside:function(t,i){var n=O((i=i||{}).paddingTopLeft||i.padding||[0,0]),e=O(i.paddingBottomRight||i.padding||[0,0]),s=this.project(this.getCenter()),o=this.project(t),r=this.getPixelBounds(),h=B([r.min.add(n),r.max.subtract(e)]),a=h.getSize();if(!h.contains(o)){this._enforcingBounds=!0;var u=o.subtract(h.getCenter()),l=h.extend(o).getSize().subtract(a);s.x+=u.x<0?-l.x:l.x,s.y+=u.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 n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),o=n.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(e(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,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 n=e(this._handleGeolocationResponse,this),s=e(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,s,t):navigator.geolocation.getCurrentPosition(n,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,n=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: "+n+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var i=new D(t.coords.latitude,t.coords.longitude),n=i.toBounds(2*t.coords.accuracy),e=this._locateOptions;if(e.setView){var s=this.getBoundsZoom(n);this.setView(i,e.maxZoom?Math.min(s,e.maxZoom):s)}var o={latlng:i,bounds:n,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 n=this[t]=new i(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),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 n=ei("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=n),n},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 j(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,n){t=Z(t),n=O(n||[0,0]);var e=this.getZoom()||0,s=this.getMinZoom(),o=this.getMaxZoom(),r=t.getNorthWest(),h=t.getSouthEast(),a=this.getSize().subtract(n),u=B(this.project(h,e),this.project(r,e)).getSize(),l=Ot.any3d?this.options.zoomSnap:1,c=a.x/u.x,f=a.y/u.y,d=i?Math.max(c,f):Math.min(c,f);return e=this.getScaleZoom(d,e),l&&(e=Math.round(e/(l/100))*(l/100),e=i?Math.ceil(e/l)*l:Math.floor(e/l)*l),Math.max(s,Math.min(o,e))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new A(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var n=this._getTopLeftPoint(t,i);return new I(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var n=this.options.crs;return i=void 0===i?this._zoom:i,n.scale(t)/n.scale(i)},getScaleZoom:function(t,i){var n=this.options.crs,e=n.zoom(t*n.scale(i=void 0===i?this._zoom:i));return isNaN(e)?1/0:e},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(Z(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 Di(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.");Pi(i,"scroll",this._onScroll,this),this._containerId=o(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ot.any3d,ui(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=ni(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 A(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ui(t.markerPane,"leaflet-zoom-hide"),ui(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i){mi(this._mapPane,new A(0,0));var n=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var e=this._zoom!==i;this._moveStart(e,!1)._move(t,i)._moveEnd(e),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,n,e){void 0===i&&(i=this._zoom);var s=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),e?n&&n.pinch&&this.fire("zoom",n):((s||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return 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:Pi;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 n,e=[],s="mouseout"===i||"mouseover"===i,r=t.target||t.srcElement,h=!1;r;){if((n=this._targets[o(r)])&&("click"===i||"preclick"===i)&&this._draggableMoved(n)){h=!0;break}if(n&&n.listens(i,!0)){if(s&&!Fi(r,t))break;if(e.push(n),s)break}if(r===this._container)break;r=r.parentNode}return e.length||h||s||!this.listens(i,!0)||(e=[this]),e},_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 n=t.type;"mousedown"===n&&xi(i),this._fireDOMEvent(t,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,e){if("click"===t.type){var s=i({},t);s.type="preclick",this._fireDOMEvent(s,s.type,e)}var o=this._findEventTargets(t,n);if(e){for(var r=[],h=0;h<e.length;h++)e[h].listens(n,!0)&&r.push(e[h]);o=r.concat(o)}if(o.length){"contextmenu"===n&&ji(t);var a=o[0],u={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var l=a.getLatLng&&(!a._radius||a._radius<=10);u.containerPoint=l?this.latLngToContainerPoint(a.getLatLng()):this.mouseEventToContainerPoint(t),u.layerPoint=this.containerPointToLayerPoint(u.containerPoint),u.latlng=l?a.getLatLng():this.layerPointToLatLng(u.layerPoint)}for(h=0;h<o.length;h++)if(o[h].fire(n,u,!0),u.originalEvent._stopped||!1===o[h].options.bubblingMouseEvents&&-1!==g(this._mouseEvents,n))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 A(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 n=this.getSize()._divideBy(2);return this.project(t,i)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,n){var e=this._getNewPixelOrigin(n,i);return this.project(t,i)._subtract(e)},_latLngBoundsToNewLayerBounds:function(t,i,n){var e=this._getNewPixelOrigin(n,i);return B([this.project(t.getSouthWest(),i)._subtract(e),this.project(t.getNorthWest(),i)._subtract(e),this.project(t.getSouthEast(),i)._subtract(e),this.project(t.getNorthEast(),i)._subtract(e)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,n){if(!n)return t;var e=this.project(t,i),s=this.getSize().divideBy(2),o=new I(e.subtract(s),e.add(s)),r=this._getBoundsOffset(o,n,i);return r.round().equals([0,0])?t:this.unproject(e.add(r),i)},_limitOffset:function(t,i){if(!i)return t;var n=this.getPixelBounds(),e=new I(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(e,i))},_getBoundsOffset:function(t,i,n){var e=B(this.project(i.getNorthEast(),n),this.project(i.getSouthWest(),n)),s=e.min.subtract(t.min),o=e.max.subtract(t.max);return new A(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(),n=this.getMaxZoom(),e=Ot.any3d?this.options.zoomSnap:1;return e&&(t=Math.round(t/e)*e),Math.max(i,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){li(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var n=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(n)||(this.panBy(n,i),0))},_createAnimProxy:function(){var t=this._proxy=ei("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var i=Qt,n=this._proxy.style[i];vi(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){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,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var e=this.getZoomScale(i),s=this._getCenterOffset(t)._divideBy(1-1/e);return!(!0!==n.animate&&!this.getSize().contains(s)||(M((function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)}),this),0))},_animateZoom:function(t,i,n,s){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,ui(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(e(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))}}),Gi=T.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),n=this.getPosition(),e=t._controlCorners[n];return ui(i,"leaflet-control"),-1!==n.indexOf("bottom")?e.insertBefore(i,e.firstChild):e.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 Gi(t)};Wi.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},i="leaflet-",n=this._controlContainer=ei("div",i+"control-container",this._container);function e(e,s){t[e+s]=ei("div",i+e+" "+i+s,n)}e("top","left"),e("top","right"),e("bottom","left"),e("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)si(this._controlCorners[t]);si(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var $i=Gi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,n,e){return n<e?-1:e<n?1:0}},initialize:function(t,i,n){for(var e in f(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[e],e);for(e in i)this._addLayer(i[e],e,!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 Gi.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(){ui(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?(ui(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=ei("div",t),n=this.options.collapsed;i.setAttribute("aria-haspopup",!0),Bi(i),Ii(i);var e=this._section=ei("section",t+"-list");n&&(this._map.on("click",this.collapse,this),Pi(i,{mouseenter:function(){Pi(e,"click",ji),this.expand(),setTimeout((function(){Li(e,"click",ji)}))},mouseleave:this.collapse},this));var s=this._layersLink=ei("a",t+"-toggle",i);s.href="#",s.title="Layers",s.setAttribute("role","button"),Pi(s,"click",ji),Pi(s,"focus",this.expand,this),n||this.expand(),this._baseLayersList=ei("div",t+"-base",e),this._separator=ei("div",t+"-separator",e),this._overlaysList=ei("div",t+"-overlays",e),i.appendChild(e)},_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,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:n}),this.options.sortLayers&&this._layers.sort(e((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,n,e,s=0;for(n=0;n<this._layers.length;n++)this._addItem(e=this._layers[n]),i=i||e.overlay,t=t||!e.overlay,s+=e.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)),n=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,i)},_createRadioElement:function(t,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",e=document.createElement("div");return e.innerHTML=n,e.firstChild},_addItem:function(t){var i,n=document.createElement("label"),e=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=e):i=this._createRadioElement("leaflet-base-layers_"+o(this),e),this._layerControlInputs.push(i),i.layerId=o(t.layer),Pi(i,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var r=document.createElement("span");return n.appendChild(r),r.appendChild(i),r.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,i,n=this._layerControlInputs,e=[],s=[];this._handlingClick=!0;for(var o=n.length-1;o>=0;o--)i=this._getLayer((t=n[o]).layerId).layer,t.checked?e.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<e.length;o++)this._map.hasLayer(e[o])||this._map.addLayer(e[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,i,n=this._layerControlInputs,e=this._map.getZoom(),s=n.length-1;s>=0;s--)i=this._getLayer((t=n[s]).layerId).layer,t.disabled=void 0!==i.options.minZoom&&e<i.options.minZoom||void 0!==i.options.maxZoom&&e>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}}),qi=Gi.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",n=ei("div",i+" leaflet-bar"),e=this.options;return this._zoomInButton=this._createButton(e.zoomInText,e.zoomInTitle,i+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(e.zoomOutText,e.zoomOutTitle,i+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._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,n,e,s){var o=ei("a",n,e);return o.innerHTML=t,o.href="#",o.title=i,o.setAttribute("role","button"),o.setAttribute("aria-label",i),Bi(o),Pi(o,"click",Zi),Pi(o,"click",s,this),Pi(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())&&(ui(this._zoomOutButton,i),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(ui(this._zoomInButton,i),this._zoomInButton.setAttribute("aria-disabled","true"))}});Wi.mergeOptions({zoomControl:!0}),Wi.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new qi,this.addControl(this.zoomControl))}));var Ji=Gi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",n=ei("div",i),e=this.options;return this._addScales(e,i+"-line",n),t.on(e.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,n){t.metric&&(this._mScale=ei("div",i,n)),t.imperial&&(this._iScale=ei("div",i,n))},_update:function(){var t=this._map,i=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(n)},_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,n,e,s=3.2808399*t;s>5280?(n=this._getRoundNum(i=s/5280),this._updateScale(this._iScale,n+" mi",n/i)):(e=this._getRoundNum(s),this._updateScale(this._iScale,e+" ft",e/s))},_updateScale:function(t,i,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),n=t/i;return i*(n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),Ki=Gi.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=ei("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 n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});Wi.mergeOptions({attributionControl:!0}),Wi.addInitHook((function(){this.options.attributionControl&&(new Ki).addTo(this)})),Gi.Layers=$i,Gi.Zoom=qi,Gi.Scale=Ji,Gi.Attribution=Ki,Vi.layers=function(t,i,n){return new $i(t,i,n)},Vi.zoom=function(t){return new qi(t)},Vi.scale=function(t){return new Ji(t)},Vi.attribution=function(t){return new Ki(t)};var Xi=T.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}});Xi.addTo=function(t,i){return t.addHandler(i,this),this};var Qi,Yi={Events:C},tn=Ot.touch?"touchstart mousedown":"mousedown",nn=S.extend({options:{clickTolerance:3},initialize:function(t,i,n,e){f(this,e),this._element=t,this._dragStartTarget=i||t,this._preventOutline=n},enable:function(){this._enabled||(Pi(this._dragStartTarget,tn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(nn._dragging===this&&this.finishDrag(!0),Li(this._dragStartTarget,tn,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)nn._dragging===this&&this.finishDrag();else if(!(nn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(nn._dragging=this,this._preventOutline&&xi(this._element),bi(),$t(),this._moving))){this.fire("down");var i=t.touches?t.touches[0]:t,n=ki(this._element);this._startPoint=new A(i.clientX,i.clientY),this._startPos=gi(this._element),this._parentScale=Mi(n);var e="mousedown"===t.type;Pi(document,e?"mousemove":"touchmove",this._onMove,this),Pi(document,e?"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,n=new A(i.clientX,i.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,ji(t),this._moved||(this.fire("dragstart"),this._moved=!0,ui(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ui(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),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,nn._dragging=!1}});function en(t,i){if(!i||!t.length)return t.slice();var n=i*i;return function(t,i){var n=t.length,e=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);e[0]=e[n-1]=1,on(t,e,i,0,n-1);var s,o=[];for(s=0;s<n;s++)e[s]&&o.push(t[s]);return o}(t=function(t,i){for(var n=[t[0]],e=1,s=0,o=t.length;e<o;e++)un(t[e],t[s])>i&&(n.push(t[e]),s=e);return s<o-1&&n.push(t[o-1]),n}(t,n),n)}function sn(t,i,n){return Math.sqrt(ln(t,i,n,!0))}function on(t,i,n,e,s){var o,r,h,a=0;for(r=e+1;r<=s-1;r++)(h=ln(t[r],t[e],t[s],!0))>a&&(o=r,a=h);a>n&&(i[o]=1,on(t,i,n,e,o),on(t,i,n,o,s))}function rn(t,i,n,e,s){var o,r,h,a=e?Qi:an(t,n),u=an(i,n);for(Qi=u;;){if(!(a|u))return[t,i];if(a&u)return!1;h=an(r=hn(t,i,o=a||u,n,s),n),o===a?(t=r,a=h):(i=r,u=h)}}function hn(t,i,n,e,s){var o,r,h=i.x-t.x,a=i.y-t.y,u=e.min,l=e.max;return 8&n?(o=t.x+h*(l.y-t.y)/a,r=l.y):4&n?(o=t.x+h*(u.y-t.y)/a,r=u.y):2&n?(o=l.x,r=t.y+a*(l.x-t.x)/h):1&n&&(o=u.x,r=t.y+a*(u.x-t.x)/h),new A(o,r,s)}function an(t,i){var n=0;return t.x<i.min.x?n|=1:t.x>i.max.x&&(n|=2),t.y<i.min.y?n|=4:t.y>i.max.y&&(n|=8),n}function un(t,i){var n=i.x-t.x,e=i.y-t.y;return n*n+e*e}function ln(t,i,n,e){var s,o=i.x,r=i.y,h=n.x-o,a=n.y-r,u=h*h+a*a;return u>0&&((s=((t.x-o)*h+(t.y-r)*a)/u)>1?(o=n.x,r=n.y):s>0&&(o+=h*s,r+=a*s)),h=t.x-o,a=t.y-r,e?h*h+a*a:new A(o,r)}function cn(t){return!m(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function fn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),cn(t)}var dn={__proto__:null,simplify:en,pointToSegmentDistance:sn,closestPointOnSegment:function(t,i,n){return ln(t,i,n)},clipSegment:rn,_getEdgeIntersection:hn,_getBitCode:an,_sqClosestPointOnSegment:ln,isFlat:cn,_flat:fn};function pn(t,i,n){var e,s,o,r,h,a,u,l,c,f=[1,4,2,8];for(s=0,u=t.length;s<u;s++)t[s]._code=an(t[s],i);for(r=0;r<4;r++){for(l=f[r],e=[],s=0,o=(u=t.length)-1;s<u;o=s++)a=t[o],(h=t[s])._code&l?a._code&l||((c=hn(a,h,l,i,n))._code=an(c,i),e.push(c)):(a._code&l&&((c=hn(a,h,l,i,n))._code=an(c,i),e.push(c)),e.push(h));t=e}return t}var vn={__proto__:null,clipPolygon:pn},mn={project:function(t){return new A(t.lng,t.lat)},unproject:function(t){return new D(t.y,t.x)},bounds:new I([-180,-90],[180,90])},gn={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,n=this.R,e=t.lat*i,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),r=o*Math.sin(e),h=Math.tan(Math.PI/4-e/2)/Math.pow((1-r)/(1+r),o/2);return e=-n*Math.log(Math.max(h,1e-10)),new A(t.lng*i*n,e)},unproject:function(t){for(var i,n=180/Math.PI,e=this.R,s=this.R_MINOR/e,o=Math.sqrt(1-s*s),r=Math.exp(-t.y/e),h=Math.PI/2-2*Math.atan(r),a=0,u=.1;a<15&&Math.abs(u)>1e-7;a++)i=o*Math.sin(h),i=Math.pow((1-i)/(1+i),o/2),h+=u=Math.PI/2-2*Math.atan(r*i)-h;return new D(h*n,t.x*n/e)}},wn={__proto__:null,LonLat:mn,Mercator:gn,SphericalMercator:W},bn=i({},H,{code:"EPSG:3395",projection:gn,transformation:function(){var t=.5/(Math.PI*gn.R);return V(t,.5,-t,.5)}()}),yn=i({},H,{code:"EPSG:4326",projection:mn,transformation:V(1/180,1,-1/180,.5)}),xn=i({},F,{projection:mn,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 n=i.lng-t.lng,e=i.lat-t.lat;return Math.sqrt(n*n+e*e)},infinite:!0});F.Earth=H,F.EPSG3395=bn,F.EPSG3857=$,F.EPSG900913=q,F.EPSG4326=yn,F.Simple=xn;var _n=S.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 n=this.getEvents();i.on(n,this),this.once("remove",(function(){i.off(n,this)}),this)}this.onAdd(i),this.fire("add"),i.fire("layeradd",{layer:this})}}});Wi.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 n in this._layers)t.call(i,this._layers[n]);return this},_addLayers:function(t){for(var i=0,n=(t=t?m(t)?t:[t]:[]).length;i<n;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,n=this._getZoomSpan();for(var e in this._zoomBoundLayers){var s=this._zoomBoundLayers[e].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,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var kn=_n.extend({initialize:function(t,i){var n,e;if(f(this,i),this._layers={},t)for(n=0,e=t.length;n<e;n++)this.addLayer(t[n])},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,n,e=Array.prototype.slice.call(arguments,1);for(i in this._layers)(n=this._layers[i])[t]&&n[t].apply(n,e);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,i){for(var n in this._layers)t.call(i,this._layers[n]);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)}}),Mn=kn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),kn.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),kn.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 j;for(var i in this._layers){var n=this._layers[i];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),zn=T.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 n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var e=this._createImg(n,i&&"IMG"===i.tagName?i:null);return this._setIconStyles(e,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),e},_setIconStyles:function(t,i){var n=this.options,e=n[i+"Size"];"number"==typeof e&&(e=[e,e]);var s=O(e),o=O("shadow"===i&&n.shadowAnchor||n.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+i+" "+(n.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"]}}),Pn=zn.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 Pn.imagePath&&(Pn.imagePath=this._detectIconPath()),(this.options.imagePath||Pn.imagePath)+zn.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var i=function(t,i,n){var e=i.exec(t);return e&&e[n]};return(t=i(t,/^url\((['"])?(.+)\1\)$/,2))&&i(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=ei("div","leaflet-default-icon-path",document.body),i=ni(t,"background-image")||ni(t,"backgroundImage");if(document.body.removeChild(t),i=this._stripUrl(i))return i;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-"leaflet.css".length-1):""}}),Tn=Xi.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new nn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ui(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,n=i._map,e=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,o=gi(i._icon),r=n.getPixelBounds(),h=n.getPixelOrigin(),a=B(r.min._subtract(h).add(s),r.max._subtract(h).subtract(s));if(!a.contains(o)){var u=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(e);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),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,n=i._shadow,e=gi(i._icon),s=i._map.layerPointToLatLng(e);n&&mi(n,e),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)}}),Ln=_n.extend({options:{icon:new Pn,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"),n=t.icon.createIcon(this._icon),e=!1;n!==this._icon&&(this._icon&&this._removeIcon(),e=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),ui(n,i),t.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Pi(n,"focus",this._panOnFocus,this);var s=t.icon.createShadow(this._shadow),o=!1;s!==this._shadow&&(this._removeShadow(),o=!0),s&&(ui(s,i),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),e&&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&&(ui(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Tn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Tn(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,n=i.iconSize?O(i.iconSize):O(0,0),e=i.iconAnchor?O(i.iconAnchor):O(0,0);t.panInside(this._latlng,{paddingTopLeft:e,paddingBottomRight:n.subtract(e)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Cn=_n.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)}}),Sn=Cn.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 Cn.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,n=this._clickTolerance(),e=[t+n,i+n];this._pxBounds=new I(this._point.subtract(e),this._point.add(e))},_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()}}),An=Sn.extend({initialize:function(t,n,e){if("number"==typeof n&&(n=i({},e,{radius:n})),f(this,n),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 j(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Cn.prototype.setStyle,_project:function(){var t=this._latlng.lng,i=this._latlng.lat,n=this._map,e=n.options.crs;if(e.distance===H.distance){var s=Math.PI/180,o=this._mRadius/H.R/s,r=n.project([i+o,t]),h=n.project([i-o,t]),a=r.add(h).divideBy(2),u=n.unproject(a).lat,l=Math.acos((Math.cos(o*s)-Math.sin(i*s)*Math.sin(u*s))/(Math.cos(i*s)*Math.cos(u*s)))/s;(isNaN(l)||0===l)&&(l=o/Math.cos(Math.PI/180*i)),this._point=a.subtract(n.getPixelOrigin()),this._radius=isNaN(l)?0:a.x-n.project([u,t-l]).x,this._radiusY=a.y-r.y}else{var c=e.unproject(e.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(c).x}this._updateBounds()}}),En=Cn.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,n,e=1/0,s=null,o=ln,r=0,h=this._parts.length;r<h;r++)for(var a=this._parts[r],u=1,l=a.length;u<l;u++){var c=o(t,i=a[u-1],n=a[u],!0);c<e&&(e=c,s=o(t,i,n))}return s&&(s.distance=Math.sqrt(e)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,n,e,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,e=0;t<a-1;t++)if((e+=n=(s=h[t]).distanceTo(o=h[t+1]))>i)return this._map.layerPointToLatLng([o.x-(r=(e-i)/n)*(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 j,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return cn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],n=cn(t),e=0,s=t.length;e<s;e++)n?(i[e]=R(t[e]),this._bounds.extend(i[e])):i[e]=this._convertLatLngs(t[e]);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 A(t,t);this._rawPxBounds&&(this._pxBounds=new I([this._rawPxBounds.min.subtract(i),this._rawPxBounds.max.add(i)]))},_projectLatlngs:function(t,i,n){var e,s,o=t.length;if(t[0]instanceof D){for(s=[],e=0;e<o;e++)s[e]=this._map.latLngToLayerPoint(t[e]),n.extend(s[e]);i.push(s)}else for(e=0;e<o;e++)this._projectLatlngs(t[e],i,n)},_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,n,e,s,o,r,h,a=this._parts;for(i=0,e=0,s=this._rings.length;i<s;i++)for(n=0,o=(h=this._rings[i]).length;n<o-1;n++)(r=rn(h[n],h[n+1],t,n,!0))&&(a[e]=a[e]||[],a[e].push(r[0]),r[1]===h[n+1]&&n!==o-2||(a[e].push(r[1]),e++))}},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,n=0,e=t.length;n<e;n++)t[n]=en(t[n],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var n,e,s,o,r,h,a=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,o=this._parts.length;n<o;n++)for(e=0,s=(r=(h=this._parts[n]).length)-1;e<r;s=e++)if((i||0!==e)&&sn(t,h[s],h[e])<=a)return!0;return!1}});En._flat=fn;var On=En.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,n,e,s,o,r,h,a=this._rings[0],u=a.length;if(!u)return null;for(o=r=h=0,t=0,i=u-1;t<u;i=t++)r+=((n=a[t]).x+(e=a[i]).x)*(s=n.y*e.x-e.y*n.x),h+=(n.y+e.y)*s,o+=3*s;return this._map.layerPointToLatLng(0===o?a[0]:[r/o,h/o])},_convertLatLngs:function(t){var i=En.prototype._convertLatLngs.call(this,t),n=i.length;return n>=2&&i[0]instanceof D&&i[0].equals(i[n-1])&&i.pop(),i},_setLatLngs:function(t){En.prototype._setLatLngs.call(this,t),cn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return cn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,n=new A(i,i);if(t=new I(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var e,s=0,o=this._rings.length;s<o;s++)(e=pn(this._rings[s],t,!0)).length&&this._parts.push(e)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,n,e,s,o,r,h,a,u=!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++)(n=i[o]).y>t.y!=(e=i[r]).y>t.y&&t.x<(e.x-n.x)*(t.y-n.y)/(e.y-n.y)+n.x&&(u=!u);return u||En.prototype._containsPoint.call(this,t,!0)}}),In=Mn.extend({initialize:function(t,i){f(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,n,e,s=m(t)?t:t.features;if(s){for(i=0,n=s.length;i<n;i++)((e=s[i]).geometries||e.geometry||e.features||e.coordinates)&&this.addData(e);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var r=Bn(t,o);return r?(r.feature=Hn(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 Bn(t,i){var n,e,s,o,r="Feature"===t.type?t.geometry:t,h=r?r.coordinates:null,a=[],u=i&&i.pointToLayer,l=i&&i.coordsToLatLng||Zn;if(!h&&!r)return null;switch(r.type){case"Point":return jn(u,t,n=l(h),i);case"MultiPoint":for(s=0,o=h.length;s<o;s++)n=l(h[s]),a.push(jn(u,t,n,i));return new Mn(a);case"LineString":case"MultiLineString":return e=Dn(h,"LineString"===r.type?0:1,l),new En(e,i);case"Polygon":case"MultiPolygon":return e=Dn(h,"Polygon"===r.type?1:2,l),new On(e,i);case"GeometryCollection":for(s=0,o=r.geometries.length;s<o;s++){var c=Bn({geometry:r.geometries[s],type:"Feature",properties:t.properties},i);c&&a.push(c)}return new Mn(a);default:throw new Error("Invalid GeoJSON object.")}}function jn(t,i,n,e){return t?t(i,n):new Ln(n,e&&e.markersInheritOptions&&e)}function Zn(t){return new D(t[1],t[0],t[2])}function Dn(t,i,n){for(var e,s=[],o=0,r=t.length;o<r;o++)e=i?Dn(t[o],i-1,n):(n||Zn)(t[o]),s.push(e);return s}function Rn(t,i){return void 0!==(t=R(t)).alt?[u(t.lng,i),u(t.lat,i),u(t.alt,i)]:[u(t.lng,i),u(t.lat,i)]}function Nn(t,i,n,e){for(var s=[],o=0,r=t.length;o<r;o++)s.push(i?Nn(t[o],i-1,n,e):Rn(t[o],e));return!i&&n&&s.push(s[0]),s}function Fn(t,n){return t.feature?i({},t.feature,{geometry:n}):Hn(n)}function Hn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Un={toGeoJSON:function(t){return Fn(this,{type:"Point",coordinates:Rn(this.getLatLng(),t)})}};function Wn(t,i){return new In(t,i)}Ln.include(Un),An.include(Un),Sn.include(Un),En.include({toGeoJSON:function(t){var i=!cn(this._latlngs);return Fn(this,{type:(i?"Multi":"")+"LineString",coordinates:Nn(this._latlngs,i?1:0,!1,t)})}}),On.include({toGeoJSON:function(t){var i=!cn(this._latlngs),n=i&&!cn(this._latlngs[0]),e=Nn(this._latlngs,n?2:i?1:0,!0,t);return i||(e=[e]),Fn(this,{type:(n?"Multi":"")+"Polygon",coordinates:e})}}),kn.include({toMultiPoint:function(t){var i=[];return this.eachLayer((function(n){i.push(n.toGeoJSON(t).geometry.coordinates)})),Fn(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 n="GeometryCollection"===i,e=[];return this.eachLayer((function(i){if(i.toGeoJSON){var s=i.toGeoJSON(t);if(n)e.push(s.geometry);else{var o=Hn(s);"FeatureCollection"===o.type?e.push.apply(e,o.features):e.push(o)}}})),n?Fn(this,{geometries:e,type:"GeometryCollection"}):{type:"FeatureCollection",features:e}}});var Gn=Wn,Vn=_n.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,n){this._url=t,this._bounds=Z(i),f(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ui(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=Z(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:ei("img");ui(i,"leaflet-image-layer"),this._zoomAnimated&&ui(i,"leaflet-zoom-animated"),this.options.className&&ui(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onload=e(this.fire,this,"load"),i.onerror=e(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),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;vi(this._image,n,i)},_reset:function(){var t=this._image,i=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=i.getSize();mi(t,i.min),t.style.width=n.x+"px",t.style.height=n.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()}}),$n=Vn.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:ei("video");if(ui(i,"leaflet-image-layer"),this._zoomAnimated&&ui(i,"leaflet-zoom-animated"),this.options.className&&ui(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onloadeddata=e(this.fire,this,"load"),t){for(var n=i.getElementsByTagName("source"),s=[],o=0;o<n.length;o++)s.push(n[o].src);this._url=n.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=ei("source");h.src=this._url[r],i.appendChild(h)}}}}),qn=Vn.extend({_initImage:function(){var t=this._image=this._url;ui(t,"leaflet-image-layer"),this._zoomAnimated&&ui(t,"leaflet-zoom-animated"),this.options.className&&ui(t,this.options.className),t.onselectstart=a,t.onmousemove=a}}),Jn=_n.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&&(ui(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(di(this._container,0),this._removeTimeout=setTimeout(e(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 Mn){i=null;var n=this._source._layers;for(var e in n)if(n[e]._map){i=n[e];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),n=this._getAnchor();this._zoomAnimated?mi(this._container,t.add(n)):i=i.add(t).add(n);var e=this._containerBottom=-i.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=e+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}});Wi.include({_initOverlay:function(t,i,n,e){var s=i;return s instanceof t||(s=new t(e).setContent(i)),n&&s.setLatLng(n),s}}),_n.include({_initOverlay:function(t,i,n,e){var s=n;return s instanceof t?(f(s,e),s._source=this):(s=i&&!e?i:new t(e,this)).setContent(n),s}});var Kn=Jn.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,Jn.prototype.openOn.call(this,t)},onAdd:function(t){Jn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Cn||this._source.on("preclick",Oi))},onRemove:function(t){Jn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Cn||this._source.off("preclick",Oi))},getEvents:function(){var t=Jn.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=ei("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=ei("div",t+"-content-wrapper",i);if(this._contentNode=ei("div",t+"-content",n),Bi(i),Ii(this._contentNode),Pi(i,"contextmenu",Oi),this._tipContainer=ei("div",t+"-tip-container",i),this._tip=ei("div",t+"-tip",this._tipContainer),this.options.closeButton){var e=this._closeButton=ei("a",t+"-close-button",i);e.setAttribute("role","button"),e.setAttribute("aria-label","Close popup"),e.href="#close",e.innerHTML='<span aria-hidden="true">×</span>',Pi(e,"click",this.close,this)}},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),i.width=n+1+"px",i.whiteSpace="",i.height="";var e=this.options.maxHeight,s="leaflet-popup-scrolled";e&&t.offsetHeight>e?(i.height=e+"px",ui(t,s)):li(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();mi(this._container,i.add(n))},_adjustPan:function(t){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var i=this._map,n=parseInt(ni(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+n,s=this._containerWidth,o=new A(this._containerLeft,-e-this._containerBottom);o._add(gi(this._container));var r=i.layerPointToContainerPoint(o),h=O(this.options.autoPanPadding),a=O(this.options.autoPanPaddingTopLeft||h),u=O(this.options.autoPanPaddingBottomRight||h),l=i.getSize(),c=0,f=0;r.x+s+u.x>l.x&&(c=r.x+s-l.x+u.x),r.x-c-a.x<0&&(c=r.x-a.x),r.y+e+u.y>l.y&&(f=r.y+e-l.y+u.y),r.y-f-a.y<0&&(f=r.y-a.y),(c||f)&&i.fire("autopanstart").panBy([c,f],{animate:t&&"moveend"===t.type})}},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Wi.mergeOptions({closePopupOnClick:!0}),Wi.include({openPopup:function(t,i,n){return this._initOverlay(Kn,t,i,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),_n.include({bindPopup:function(t,i){return this._popup=this._initOverlay(Kn,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){Zi(t);var i=t.layer||t.target;this._popup._source!==i||i instanceof Cn?(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 Xn=Jn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Jn.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){Jn.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=Jn.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){this._contentNode=this._container=ei("div","leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,n,e=this._map,s=this._container,o=e.latLngToContainerPoint(e.getCenter()),r=e.layerPointToContainerPoint(t),h=this.options.direction,a=s.offsetWidth,u=s.offsetHeight,l=O(this.options.offset),c=this._getAnchor();"top"===h?(i=a/2,n=u):"bottom"===h?(i=a/2,n=0):"center"===h?(i=a/2,n=u/2):"right"===h?(i=0,n=u/2):"left"===h?(i=a,n=u/2):r.x<o.x?(h="right",i=0,n=u/2):(h="left",i=a+2*(l.x+c.x),n=u/2),t=t.subtract(O(i,n,!0)).add(l).add(c),li(s,"leaflet-tooltip-right"),li(s,"leaflet-tooltip-left"),li(s,"leaflet-tooltip-top"),li(s,"leaflet-tooltip-bottom"),ui(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])}});Wi.include({openTooltip:function(t,i,n){return this._initOverlay(Xn,t,i,n).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),_n.include({bindTooltip:function(t,i){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Xn,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",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[i](n),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,n,e=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(i),e=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(e)}});var Qn=zn.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"),n=this.options;if(n.html instanceof Element?(oi(i),i.appendChild(n.html)):i.innerHTML=!1!==n.html?n.html:"",n.bgPos){var e=O(n.bgPos);i.style.backgroundPosition=-e.x+"px "+-e.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}});zn.Default=Pn;var Yn=_n.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 A?t:new A(t,t)},_updateZIndex:function(){this._container&&null!=this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var i,n=this.getPane().children,e=-t(-1/0,1/0),s=0,o=n.length;s<o;s++)i=n[s].style.zIndex,n[s]!==this._container&&i&&(e=t(e,+i));isFinite(e)&&(this.options.zIndex=e+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ot.ielt9){di(this._container,this.options.opacity);var t=+new Date,i=!1,n=!1;for(var e in this._tiles){var s=this._tiles[e];if(s.current&&s.loaded){var o=Math.min(1,(t-s.loaded)/200);di(s.el,o),o<1?i=!0:(s.active?n=!0:this._onOpaqueTile(s),s.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),i&&(z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=ei("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 n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=i-Math.abs(t-n),this._onUpdateLevel(n)):(si(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var e=this._levels[t],s=this._map;return e||((e=this._levels[t]={}).el=ei("div","leaflet-tile-container leaflet-zoom-animated",this._container),e.el.style.zIndex=i,e.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),e.zoom=t,this._setZoomTransform(e,s.getCenter(),s.getZoom()),this._onCreateLevel(e)),this._level=e,e}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,i,n=this._map.getZoom();if(n>this.options.maxZoom||n<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 e=i.coords;this._retainParent(e.x,e.y,e.z,e.z-5)||this._retainChildren(e.x,e.y,e.z,e.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,n,e){var s=Math.floor(t/2),o=Math.floor(i/2),r=n-1,h=new A(+s,+o);h.z=+r;var a=this._tileCoordsToKey(h),u=this._tiles[a];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),r>e&&this._retainParent(s,o,r,e))},_retainChildren:function(t,i,n,e){for(var s=2*t;s<2*t+2;s++)for(var o=2*i;o<2*i+2;o++){var r=new A(s,o);r.z=n+1;var h=this._tileCoordsToKey(r),a=this._tiles[h];a&&a.active?a.retain=!0:(a&&a.loaded&&(a.retain=!0),n+1<e&&this._retainChildren(s,o,n+1,e))}},_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,n,e){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),e&&!(this.options.updateWhenZooming&&s!==this._tileZoom)||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,i)},_setZoomTransform:function(t,i,n){var e=this._map.getZoomScale(n,t.zoom),s=t.origin.multiplyBy(e).subtract(this._map._getNewPixelOrigin(i,n)).round();Ot.any3d?vi(t.el,s,e):mi(t.el,s)},_resetGrid:function(){var t=this._map,i=t.options.crs,n=this._tileSize=this.getTileSize(),e=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]],e).x/n.x),Math.ceil(t.project([0,i.wrapLng[1]],e).x/n.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],e).y/n.x),Math.ceil(t.project([i.wrapLat[1],0],e).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,n=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),e=i.getZoomScale(n,this._tileZoom),s=i.project(t,this._tileZoom).floor(),o=i.getSize().divideBy(2*e);return new I(s.subtract(o),s.add(o))},_update:function(t){var i=this._map;if(i){var n=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var e=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(e),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 u in this._tiles){var l=this._tiles[u].coords;l.z===this._tileZoom&&a.contains(new A(l.x,l.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var c=s.min.y;c<=s.max.y;c++)for(var f=s.min.x;f<=s.max.x;f++){var d=new A(f,c);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 n=this._globalTileRange;if(!i.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!i.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var e=this._tileCoordsToBounds(t);return Z(this.options.bounds).overlaps(e)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,n=this.getTileSize(),e=t.scaleBy(n),s=e.add(n);return[i.unproject(e,t.z),i.unproject(s,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),n=new j(i[0],i[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),n=new A(+i[0],+i[1]);return n.z=+i[2],n},_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){ui(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 n=this._getTilePos(t),s=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),e(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(e(this._tileReady,this,t,null,o)),mi(o,n),this._tiles[s]={el:o,coords:t,current:!0},i.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,i,n){i&&this.fire("tileerror",{error:i,tile:n,coords:t});var s=this._tileCoordsToKey(t);(n=this._tiles[s])&&(n.loaded=+new Date,this._map._fadeAnimated?(di(n.el,0),z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),i||(ui(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ot.ielt9||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(e(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new A(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}}),te=Yn.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 n=document.createElement("img");return Pi(n,"load",e(this._tileOnLoad,this,i,n)),Pi(n,"error",e(this._tileOnError,this,i,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var n={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 e=this._globalTileRange.max.y-t.y;this.options.tms&&(n.y=e),n["-y"]=e}return v(this._url,i(n,this.options))},_tileOnLoad:function(t,i){Ot.ielt9?setTimeout(e(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,n){var e=this.options.errorTileUrl;e&&i.getAttribute("src")!==e&&(i.src=e),t(n,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=w;var n=this._tiles[t].coords;si(i),delete this._tiles[t],this.fire("tileabort",{tile:i,coords:n})}},_removeTile:function(t){var i=this._tiles[t];if(i)return i.el.setAttribute("src",w),Yn.prototype._removeTile.call(this,t)},_tileReady:function(t,i,n){if(this._map&&(!n||n.getAttribute("src")!==w))return Yn.prototype._tileReady.call(this,t,i,n)}});function ie(t,i){return new te(t,i)}var ne=te.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,n){this._url=t;var e=i({},this.defaultWmsParams);for(var s in n)s in this.options||(e[s]=n[s]);var o=(n=f(this,n)).detectRetina&&Ot.retina?2:1,r=this.getTileSize();e.width=r.x*o,e.height=r.y*o,this.wmsParams=e},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,te.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),n=this._crs,e=B(n.project(i[0]),n.project(i[1])),s=e.min,o=e.max,r=(this._wmsVersion>=1.3&&this._crs===yn?[s.y,s.x,o.y,o.x]:[s.x,s.y,o.x,o.y]).join(","),h=te.prototype.getTileUrl.call(this,t);return h+d(this.wmsParams,h,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,n){return i(this.wmsParams,t),n||this.redraw(),this}});te.WMS=ne,ie.wms=function(t,i){return new ne(t,i)};var ee=_n.extend({options:{padding:.1},initialize:function(t){f(this,t),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ui(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 n=this._map.getZoomScale(i,this._zoom),e=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,i),o=e.multiplyBy(-n).add(s).subtract(this._map._getNewPixelOrigin(t,i));Ot.any3d?vi(this._container,o,n):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(),n=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new I(n,n.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),se=ee.extend({options:{tolerance:0},getEvents:function(){var t=ee.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ee.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Pi(t,"mousemove",this._onMouseMove,this),Pi(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Pi(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){ee.prototype._update.call(this);var t=this._bounds,i=this._container,n=t.getSize(),e=Ot.retina?2:1;mi(i,t.min),i.width=e*n.x,i.height=e*n.y,i.style.width=n.x+"px",i.style.height=n.y+"px",Ot.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ee.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,n=i.next,e=i.prev;n?n.prev=e:this._drawLast=e,e?e.next=n:this._drawFirst=n,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,n,e=t.options.dashArray.split(/[, ]+/),s=[];for(n=0;n<e.length;n++){if(i=Number(e[n]),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 n=i.getSize();this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var e=this._drawFirst;e;e=e.next)t=e.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,i){if(this._drawing){var n,e,s,o,r=t._parts,h=r.length,a=this._ctx;if(h){for(a.beginPath(),n=0;n<h;n++){for(e=0,s=r[n].length;e<s;e++)a[e?"lineTo":"moveTo"]((o=r[n][e]).x,o.y);i&&a.closePath()}this._fillStroke(a,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var i=t._point,n=this._ctx,e=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||e)/e;1!==s&&(n.save(),n.scale(1,s)),n.beginPath(),n.arc(i.x,i.y/s,e,0,2*Math.PI,!1),1!==s&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,i){var n=i.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var i,n,e=this._map.mouseEventToLayerPoint(t),s=this._drawFirst;s;s=s.next)(i=s.layer).options.interactive&&i._containsPoint(e)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(i))&&(n=i);this._fireEvent(!!n&&[n],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 n,s,o=this._drawFirst;o;o=o.next)(n=o.layer).options.interactive&&n._containsPoint(i)&&(s=n);s!==this._hoveredLayer&&(this._handleMouseOut(t),s&&(ui(this._container,"leaflet-interactive"),this._fireEvent([s],t,"mouseover"),this._hoveredLayer=s)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(e((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,i,n){this._map._fireDOMEvent(i,n||i.type,t)},_bringToFront:function(t){var i=t._order;if(i){var n=i.next,e=i.prev;n&&(n.prev=e,e?e.next=n:n&&(this._drawFirst=n),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 n=i.next,e=i.prev;e&&(e.next=n,n?n.prev=e:e&&(this._drawLast=e),i.prev=null,i.next=this._drawFirst,this._drawFirst.prev=i,this._drawFirst=i,this._requestRedraw(t))}}});function oe(t){return Ot.canvas?new se(t):null}var re=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">')}}(),he={_initContainer:function(){this._container=ei("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ee.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=re("shape");ui(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=re("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,n=t._fill,e=t.options,s=t._container;s.stroked=!!e.stroke,s.filled=!!e.fill,e.stroke?(i||(i=t._stroke=re("stroke")),s.appendChild(i),i.weight=e.weight+"px",i.color=e.color,i.opacity=e.opacity,i.dashStyle=e.dashArray?m(e.dashArray)?e.dashArray.join(" "):e.dashArray.replace(/( *, *)/g," "):"",i.endcap=e.lineCap.replace("butt","flat"),i.joinstyle=e.lineJoin):i&&(s.removeChild(i),t._stroke=null),e.fill?(n||(n=t._fill=re("fill")),s.appendChild(n),n.color=e.fillColor||e.color,n.opacity=e.fillOpacity):n&&(s.removeChild(n),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),n=Math.round(t._radius),e=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+n+","+e+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){ri(t._container)},_bringToBack:function(t){hi(t._container)}},ae=Ot.vml?re:J,ue=ee.extend({_initContainer:function(){this._container=ae("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=ae("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){ee.prototype._update.call(this);var t=this._bounds,i=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,n.setAttribute("width",i.x),n.setAttribute("height",i.y)),mi(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=ae("path");t.options.className&&ui(i,t.options.className),t.options.interactive&&ui(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,n=t.options;i&&(n.stroke?(i.setAttribute("stroke",n.color),i.setAttribute("stroke-opacity",n.opacity),i.setAttribute("stroke-width",n.weight),i.setAttribute("stroke-linecap",n.lineCap),i.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?i.setAttribute("stroke-dasharray",n.dashArray):i.removeAttribute("stroke-dasharray"),n.dashOffset?i.setAttribute("stroke-dashoffset",n.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),n.fill?(i.setAttribute("fill",n.fillColor||n.color),i.setAttribute("fill-opacity",n.fillOpacity),i.setAttribute("fill-rule",n.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,K(t._parts,i))},_updateCircle:function(t){var i=t._point,n=Math.max(Math.round(t._radius),1),e="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(i.x-n)+","+i.y+e+2*n+",0 "+e+2*-n+",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 le(t){return Ot.svg||Ot.vml?new ue(t):null}Ot.vml&&ue.include(he),Wi.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&&oe(t)||le(t)}});var ce=On.extend({initialize:function(t,i){On.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});ue.create=ae,ue.pointsToPath=K,In.geometryToLayer=Bn,In.coordsToLatLng=Zn,In.coordsToLatLngs=Dn,In.latLngToCoords=Rn,In.latLngsToCoords=Nn,In.getFeature=Fn,In.asFeature=Hn,Wi.mergeOptions({boxZoom:!0});var fe=Xi.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(){Pi(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(),$t(),bi(),this._startPoint=this._map.mouseEventToContainerPoint(t),Pi(document,{contextmenu:Zi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ei("div","leaflet-zoom-box",this._container),ui(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new I(this._point,this._startPoint),n=i.getSize();mi(this._box,i.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(si(this._box),li(this._container,"leaflet-crosshair")),qt(),yi(),Li(document,{contextmenu:Zi,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(e(this._resetState,this),0);var i=new j(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())}});Wi.addInitHook("addHandler","boxZoom",fe),Wi.mergeOptions({doubleClickZoom:!0});var de=Xi.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,n=i.getZoom(),e=i.options.zoomDelta,s=t.originalEvent.shiftKey?n-e:n+e;"center"===i.options.doubleClickZoom?i.setZoom(s):i.setZoomAround(t.containerPoint,s)}});Wi.addInitHook("addHandler","doubleClickZoom",de),Wi.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var pe=Xi.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new nn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ui(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=Z(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,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),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),n=this._initialWorldOffset,e=this._draggable._newPos.x,s=(e-i+n)%t+i-n,o=(e+i+n)%t-i-n,r=Math.abs(s+n)<Math.abs(o+n)?s:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var i=this._map,n=i.options,e=!n.inertia||t.noInertia||this._times.length<2;if(i.fire("dragend",t),e)i.fire("moveend");else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),o=n.easeLinearity,r=s.multiplyBy(o/((this._lastTime-this._times[0])/1e3)),h=r.distanceTo([0,0]),a=Math.min(n.inertiaMaxSpeed,h),u=r.multiplyBy(a/h),l=a/(n.inertiaDeceleration*o),c=u.multiplyBy(-l/2).round();c.x||c.y?(c=i._limitOffset(c,i.options.maxBounds),M((function(){i.panBy(c,{duration:l,easeLinearity:o,noMoveStart:!0,animate:!0})}))):i.fire("moveend")}}});Wi.addInitHook("addHandler","dragging",pe),Wi.mergeOptions({keyboard:!0,keyboardPanDelta:80});var ve=Xi.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"),Pi(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,n=t.scrollTop||i.scrollTop,e=t.scrollLeft||i.scrollLeft;this._map._container.focus(),window.scrollTo(e,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var i,n,e=this._panKeys={},s=this.keyCodes;for(i=0,n=s.left.length;i<n;i++)e[s.left[i]]=[-1*t,0];for(i=0,n=s.right.length;i<n;i++)e[s.right[i]]=[t,0];for(i=0,n=s.down.length;i<n;i++)e[s.down[i]]=[0,t];for(i=0,n=s.up.length;i<n;i++)e[s.up[i]]=[0,-1*t]},_setZoomDelta:function(t){var i,n,e=this._zoomKeys={},s=this.keyCodes;for(i=0,n=s.zoomIn.length;i<n;i++)e[s.zoomIn[i]]=t;for(i=0,n=s.zoomOut.length;i<n;i++)e[s.zoomOut[i]]=-t},_addHooks:function(){Pi(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,n=t.keyCode,e=this._map;if(n in this._panKeys)e._panAnim&&e._panAnim._inProgress||(i=this._panKeys[n],t.shiftKey&&(i=O(i).multiplyBy(3)),e.panBy(i),e.options.maxBounds&&e.panInsideBounds(e.options.maxBounds));else if(n in this._zoomKeys)e.setZoom(e.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!e._popup||!e._popup.options.closeOnEscapeKey)return;e.closePopup()}Zi(t)}}});Wi.addInitHook("addHandler","keyboard",ve),Wi.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var me=Xi.extend({addHooks:function(){Pi(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=Ni(t),n=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var s=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(e(this._performZoom,this),s),Zi(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var e=4*Math.log(2/(1+Math.exp(-Math.abs(this._delta/(4*this._map.options.wheelPxPerZoomLevel)))))/Math.LN2,s=n?Math.ceil(e/n)*n:e,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))}});Wi.addInitHook("addHandler","scrollWheelZoom",me),Wi.mergeOptions({tapHold:Ot.touchNative&&Ot.safari&&Ot.mobile,tapTolerance:15});var ge=Xi.extend({addHooks:function(){Pi(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 A(i.clientX,i.clientY),this._holdTimeout=setTimeout(e((function(){this._cancel(),this._isTapValid()&&(Pi(document,"touchend",ji),Pi(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",i))}),this),600),Pi(document,"touchend touchcancel contextmenu",this._cancel,this),Pi(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Li(document,"touchend",ji),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 A(i.clientX,i.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,i){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY});n._simulated=!0,i.target.dispatchEvent(n)}});Wi.addInitHook("addHandler","tapHold",ge),Wi.mergeOptions({touchZoom:Ot.touch,bounceAtZoomLimits:!0});var we=Xi.extend({addHooks:function(){ui(this._map._container,"leaflet-touch-zoom"),Pi(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 n=i.mouseEventToContainerPoint(t.touches[0]),e=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(n.add(e)._divideBy(2))),this._startDist=n.distanceTo(e),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),Pi(document,"touchmove",this._onTouchMove,this),Pi(document,"touchend touchcancel",this._onTouchEnd,this),ji(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,n=i.mouseEventToContainerPoint(t.touches[0]),s=i.mouseEventToContainerPoint(t.touches[1]),o=n.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=n._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=e(i._move,i,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=M(h,this,!0),ji(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}});Wi.addInitHook("addHandler","touchZoom",we),Wi.BoxZoom=fe,Wi.DoubleClickZoom=de,Wi.Drag=pe,Wi.Keyboard=ve,Wi.ScrollWheelZoom=me,Wi.TapHold=ge,Wi.TouchZoom=we,t.Bounds=I,t.Browser=Ot,t.CRS=F,t.Canvas=se,t.Circle=An,t.CircleMarker=Sn,t.Class=T,t.Control=Gi,t.DivIcon=Qn,t.DivOverlay=Jn,t.DomEvent=Hi,t.DomUtil=zi,t.Draggable=nn,t.Evented=S,t.FeatureGroup=Mn,t.GeoJSON=In,t.GridLayer=Yn,t.Handler=Xi,t.Icon=zn,t.ImageOverlay=Vn,t.LatLng=D,t.LatLngBounds=j,t.Layer=_n,t.LayerGroup=kn,t.LineUtil=dn,t.Map=Wi,t.Marker=Ln,t.Mixin=Yi,t.Path=Cn,t.Point=A,t.PolyUtil=vn,t.Polygon=On,t.Polyline=En,t.Popup=Kn,t.PosAnimation=Ui,t.Projection=wn,t.Rectangle=ce,t.Renderer=ee,t.SVG=ue,t.SVGOverlay=qn,t.TileLayer=te,t.Tooltip=Xn,t.Transformation=G,t.Util=P,t.VideoOverlay=$n,t.bind=e,t.bounds=B,t.canvas=oe,t.circle=function(t,i,n){return new An(t,i,n)},t.circleMarker=function(t,i){return new Sn(t,i)},t.control=Vi,t.divIcon=function(t){return new Qn(t)},t.extend=i,t.featureGroup=function(t,i){return new Mn(t,i)},t.geoJSON=Wn,t.geoJson=Gn,t.gridLayer=function(t){return new Yn(t)},t.icon=function(t){return new zn(t)},t.imageOverlay=function(t,i,n){return new Vn(t,i,n)},t.latLng=R,t.latLngBounds=Z,t.layerGroup=function(t,i){return new kn(t,i)},t.map=function(t,i){return new Wi(t,i)},t.marker=function(t,i){return new Ln(t,i)},t.point=O,t.polygon=function(t,i){return new On(t,i)},t.polyline=function(t,i){return new En(t,i)},t.popup=function(t,i){return new Kn(t,i)},t.rectangle=function(t,i){return new ce(t,i)},t.setOptions=f,t.stamp=o,t.svg=le,t.svgOverlay=function(t,i,n){return new qn(t,i,n)},t.tileLayer=ie,t.tooltip=function(t,i){return new Xn(t,i)},t.transformation=V,t.version="1.8.0",t.videoOverlay=function(t,i,n){return new $n(t,i,n)};var be=window.L;t.noConflict=function(){return window.L=be,this},window.L=t}((f={path:void 0,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}).exports),f.exports);const p=class{constructor(t){n(this,t),this.colorTrekLine="#6b0030",this.colorDepartureIcon="#006b3b",this.colorArrivalIcon="#85003b"}componentDidLoad(){this.map=d.map(this.element,{center:[1,1],zoom:10}),d.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:19,attribution:"© OpenStreetMap"}).addTo(this.map),u.currentTrek?this.addTrek():this.addTreks(),l("currentTrek",(()=>{u.currentTrek?(this.removeTreks(),this.addTrek()):(this.addTreks(),this.removeTrek())}))}addTreks(){const t=[],i={type:"FeatureCollection",features:[]};for(const n of u.treks)t.push(n.departure_geom),i.features.push({type:"Feature",properties:{},geometry:{type:"Point",coordinates:n.departure_geom}});if(t.length>0){const i=d.latLngBounds(t.map((t=>[t[1],t[0]])));this.map.fitBounds(i)}this.treksLayer=d.geoJSON(i,{pointToLayer:(t,i)=>d.marker(i,{icon:d.divIcon({className:"trek-marker",iconSize:48,iconAnchor:[0,48]}),autoPanOnFocus:!1})}).addTo(this.map)}removeTreks(){this.map.removeLayer(this.treksLayer),this.treksLayer=null}addTrek(){this.trekLayer=d.geoJSON({type:"Feature",geometry:u.currentTrek.geometry,properties:{}},{style:()=>({color:this.colorTrekLine})}).addTo(this.map);const t=d.latLngBounds(u.currentTrek.geometry.coordinates.map((t=>[t[1],t[0]])));this.map.fitBounds(t);const i=[u.currentTrek.geometry.coordinates.at(0)[0],u.currentTrek.geometry.coordinates.at(0)[1]],n=[u.currentTrek.geometry.coordinates.at(-1)[0],u.currentTrek.geometry.coordinates.at(-1)[1]],e={type:"FeatureCollection",features:[{type:"Feature",properties:{type:"departure"},geometry:{type:"Point",coordinates:i}}]};i[0]===n[0]&&i[1]===n[1]||e.features.push({type:"Feature",properties:{type:"arrival"},geometry:{type:"Point",coordinates:n}}),this.departureArrivalLayer=d.geoJSON(e,{pointToLayer:(t,i)=>d.marker(i,{icon:d.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:none;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})}).addTo(this.map)}removeTrek(){this.map.removeLayer(this.trekLayer),this.map.removeLayer(this.departureArrivalLayer),this.trekLayer=null,this.departureArrivalLayer=null}render(){return e(s,{style:{"--color-departure-icon":this.colorDepartureIcon,"--color-arrival-icon":this.colorArrivalIcon}})}get element(){return o(this)}};function v(t){let i;return t<24?(i=`${Math.floor(t)}h`,t%1>0&&(i+=`${Math.round(t%1*60)}min`)):i=t/24+"j",i}function m(t){return`${Math.round(t/1e3)} km`}function g(t){return`${t} m`}p.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{display:block;height:100%}.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%}';const w='<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><polyline points="352 144 464 144 464 256" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><path d="M48,368,169.37,246.63a32,32,0,0,1,45.26,0l50.74,50.74a32,32,0,0,0,45.26,0L448,160" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>',b='<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><path d="M145.61,464H366.39c19.8,0,35.55-16.29,33.42-35.06C386.06,308,304,310,304,256s83.11-51,95.8-172.94c2-18.78-13.61-35.06-33.41-35.06H145.61c-19.8,0-35.37,16.28-33.41,35.06C124.89,205,208,201,208,256s-82.06,52-95.8,172.94C110.06,447.71,125.81,464,145.61,464Z" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><path d="M343.3,432H169.13c-15.6,0-20-18-9.06-29.16C186.55,376,240,356.78,240,326V224c0-19.85-38-35-61.51-67.2-3.88-5.31-3.49-12.8,6.37-12.8H327.59c8.41,0,10.23,7.43,6.4,12.75C310.82,189,272,204.05,272,224V326c0,30.53,55.71,47,80.4,76.87C362.35,414.91,358.87,432,343.3,432Z"/></svg>',y='<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><polyline points="304 96 416 96 416 208" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="405.77" y1="106.2" x2="111.98" y2="400.02" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><polyline points="208 416 96 416 96 304" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>',x=class{constructor(t){n(this,t),this.trekCardPress=r(this,"trekCardPress",7)}componentWillLoad(){this.currentTrek=this.trek?this.trek:u.currentTrek,this.difficulty=u.difficulties.find((t=>t.id===this.currentTrek.difficulty)),this.route=u.routes.find((t=>t.id===this.currentTrek.route)),this.practice=u.practices.find((t=>t.id===this.currentTrek.practice))}render(){var t,i,n,o,r,h,a,u;return e(s,{onClick:()=>this.trekCardPress.emit(this.currentTrek.id)},e("div",{class:"trek-card-container"},this.currentTrek.attachments[0]&&e("img",{class:"image",src:this.currentTrek.attachments[0].url,loading:"lazy"}),e("div",{class:"sub-container"},e("div",{class:"name"},null===(t=this.currentTrek)||void 0===t?void 0:t.name),e("div",{class:"description",innerHTML:null===(i=this.currentTrek)||void 0===i?void 0:i.description_teaser}),e("div",{class:"icons-labels-container"},e("div",{class:"row"},e("div",{class:"icon-label difficulty"},(null===(n=this.difficulty)||void 0===n?void 0:n.pictogram)&&e("img",{src:this.difficulty.pictogram}),null===(o=this.difficulty)||void 0===o?void 0:o.label),e("div",{class:"icon-label duration"},e("div",{class:"svg-icon",innerHTML:b}),v(this.currentTrek.duration)),e("div",{class:"icon-label route"},(null===(r=this.route)||void 0===r?void 0:r.pictogram)&&e("img",{src:this.route.pictogram}),null===(h=this.route)||void 0===h?void 0:h.route)),e("div",{class:"row"},e("div",{class:"icon-label length"},e("div",{class:"svg-icon",innerHTML:y}),m(this.currentTrek.length_2d)),e("div",{class:"icon-label ascent"},e("div",{class:"svg-icon",innerHTML:w}),g(this.currentTrek.ascent)),e("div",{class:"icon-label practice"},(null===(a=this.practice)||void 0===a?void 0:a.pictogram)&&e("img",{src:this.practice.pictogram}),null===(u=this.practice)||void 0===u?void 0:u.name))))))}};x.style=".trek-card-container{width:350px;height:auto;border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);cursor:pointer}.trek-card-container .image{width:100%;height:auto}.trek-card-container .sub-container{padding:12px}.trek-card-container .sub-container .name{color:var(--color-primary);font-size:24px;font-weight:bold;margin-bottom:12px}.trek-card-container .sub-container .description{max-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px}.trek-card-container .sub-container .description p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.trek-card-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-card-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:12px}.trek-card-container .sub-container .icons-labels-container .row .icon-label{display:flex;justify-content:center;align-items:center;width:33.3333333333%}.trek-card-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 4px}.trek-card-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:24px}.trek-card-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}";const _=class{constructor(t){n(this,t)}componentWillLoad(){this.currentTrek=this.trek?this.trek:u.currentTrek,this.difficulty=u.difficulties.find((t=>t.id===this.currentTrek.difficulty)),this.route=u.routes.find((t=>t.id===this.currentTrek.route)),this.practice=u.practices.find((t=>t.id===this.currentTrek.practice))}render(){var t,i,n,o,r,h,a;return e(s,null,e("div",{class:"trek-detail-container"},e("div",{class:"name"},this.currentTrek.name),this.currentTrek.attachments[0]&&e("img",{class:"image",src:this.currentTrek.attachments[0].url,loading:"lazy"}),e("div",{class:"sub-container"},e("div",{class:"icons-labels-container"},e("div",{class:"row"},e("div",{class:"icon-label difficulty"},(null===(t=this.difficulty)||void 0===t?void 0:t.pictogram)&&e("img",{src:this.difficulty.pictogram}),null===(i=this.difficulty)||void 0===i?void 0:i.label),e("div",{class:"icon-label duration"},e("div",{class:"svg-icon",innerHTML:b}),v(null===(n=this.currentTrek)||void 0===n?void 0:n.duration)),e("div",{class:"icon-label route"},(null===(o=this.route)||void 0===o?void 0:o.pictogram)&&e("img",{src:this.route.pictogram}),null===(r=this.route)||void 0===r?void 0:r.route)),e("div",{class:"row"},e("div",{class:"icon-label length"},e("div",{class:"svg-icon",innerHTML:y}),m(this.currentTrek.length_2d)),e("div",{class:"icon-label ascent"},e("div",{class:"svg-icon",innerHTML:w}),g(this.currentTrek.ascent)),e("div",{class:"icon-label practice"},(null===(h=this.practice)||void 0===h?void 0:h.pictogram)&&e("img",{src:this.practice.pictogram}),null===(a=this.practice)||void 0===a?void 0:a.name)))),e("div",{class:"description",innerHTML:this.currentTrek.description?this.currentTrek.description:this.currentTrek.description_teaser})))}};_.style=".trek-detail-container{display:flex;flex-direction:column;max-height:calc(100vh - 64px);overflow-y:auto}.trek-detail-container .name{color:var(--color-primary);font-size:48px;font-weight:bold;padding:24px}.trek-detail-container .image{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 .description{padding:0px 24px 24px 24px}";const k=class{constructor(t){n(this,t)}componentWillLoad(){return u.api=this.api,Promise.all([fetch(`${this.api}trek/${this.trekId}/?language=fr&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,length_2d,practice,route,geometry`),fetch(`${this.api}trek_difficulty/?language=fr`),fetch(`${this.api}trek_route/?language=fr`),fetch(`${this.api}trek_practice/?language=fr`)]).then((t=>Promise.all(t.map((t=>t.json()))))).then((([t,i,n,e])=>{u.currentTrek=t,u.difficulties=i.results,u.routes=n.results,u.practices=e.results}))}disconnectedCallback(){u.currentTrek=null}render(){return e(s,null)}},M=class{constructor(t){n(this,t),this.treksToDisplay=[],this.handleInfiniteScrollBind=this.handleInfiniteScroll.bind(this),this.step=10}componentWillLoad(){this.treksToDisplay=u.treks.slice(0,this.step),this.element.addEventListener("scroll",this.handleInfiniteScrollBind)}handleInfiniteScroll(t){t.composedPath()[0].scrollTop+t.composedPath()[0].scrollHeight/2>=t.composedPath()[0].scrollHeight&&(this.treksToDisplay.length<u.treks.length?this.treksToDisplay=u.treks.slice(0,this.treksToDisplay.length+this.step>=u.treks.length?u.treks.length:this.treksToDisplay.length+this.step):this.element.removeEventListener("scroll",this.handleInfiniteScrollBind))}render(){return e(s,{class:"treks-list-container"},this.treksToDisplay.map((t=>e("grw-trek-card",{trek:t}))))}get element(){return o(this)}};M.style=":host{display:flex;flex-wrap:wrap;justify-content:center;max-height:calc(100vh - 64px);overflow-y:auto}@media (min-width: 664px){:host{justify-content:space-between}}@media (min-width: 996px){:host{justify-content:flex-start}}grw-trek-card{margin:6px}";const z=class{constructor(t){n(this,t)}componentWillLoad(){u.api=this.api;let t=`${this.api}trek/?language=fr`;return this.portals&&(t+=`&portals=${this.portals}`),t+="&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,length_2d,practice,route,departure_geom&page_size=999",Promise.all([fetch(t),fetch(`${this.api}trek_difficulty/?language=fr`),fetch(`${this.api}trek_route/?language=fr`),fetch(`${this.api}trek_practice/?language=fr`)]).then((t=>Promise.all(t.map((t=>t.json()))))).then((([t,i,n,e])=>{u.treks=t.results,u.difficulties=i.results,u.routes=n.results,u.practices=e.results}))}render(){return e(s,null)}};export{c as grw_app,p as grw_map,x as grw_trek_card,_ as grw_trek_detail,k as grw_trek_provider,M as grw_treks_list,z as grw_treks_provider}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./cjs/index.cjs.js');
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './esm/index.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class GrwApp {
|
|
2
|
+
showTrek: boolean;
|
|
3
|
+
showMap: boolean;
|
|
4
|
+
currentTrekId: number;
|
|
5
|
+
api: string;
|
|
6
|
+
portals: string;
|
|
7
|
+
appName: string;
|
|
8
|
+
colorPrimary: string;
|
|
9
|
+
colorPrimaryTint: string;
|
|
10
|
+
onTrekCardPress(event: CustomEvent<number>): void;
|
|
11
|
+
onWindowResize(event: any): void;
|
|
12
|
+
onTrekDetailsClose(): void;
|
|
13
|
+
componentWillLoad(): void;
|
|
14
|
+
render(): any;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import L from 'leaflet';
|
|
2
|
+
export declare class GrwMap {
|
|
3
|
+
element: HTMLElement;
|
|
4
|
+
colorTrekLine: string;
|
|
5
|
+
colorDepartureIcon: string;
|
|
6
|
+
colorArrivalIcon: string;
|
|
7
|
+
map: L.Map;
|
|
8
|
+
treksLayer: L.GeoJSON<any>;
|
|
9
|
+
trekLayer: L.GeoJSON<any>;
|
|
10
|
+
departureArrivalLayer: L.GeoJSON<any>;
|
|
11
|
+
componentDidLoad(): void;
|
|
12
|
+
addTreks(): void;
|
|
13
|
+
removeTreks(): void;
|
|
14
|
+
addTrek(): void;
|
|
15
|
+
removeTrek(): void;
|
|
16
|
+
render(): any;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { Difficulty, Practice, Route, Trek } from 'types/types';
|
|
3
|
+
export declare class GrwTrekCard {
|
|
4
|
+
trek: Trek;
|
|
5
|
+
trekCardPress: EventEmitter<number>;
|
|
6
|
+
currentTrek: Trek;
|
|
7
|
+
difficulty: Difficulty;
|
|
8
|
+
route: Route;
|
|
9
|
+
practice: Practice;
|
|
10
|
+
componentWillLoad(): void;
|
|
11
|
+
render(): any;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Treks } from 'types/types';
|
|
2
|
+
export declare class GrwTreksList {
|
|
3
|
+
element: HTMLElement;
|
|
4
|
+
treksToDisplay: Treks;
|
|
5
|
+
handleInfiniteScrollBind: (event: any) => void;
|
|
6
|
+
step: number;
|
|
7
|
+
componentWillLoad(): void;
|
|
8
|
+
handleInfiniteScroll(event: any): void;
|
|
9
|
+
render(): any;
|
|
10
|
+
}
|