@geotrekce/geotrek-rando-widget 0.0.13 → 0.0.14
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/dist/cjs/{css-shim-6f592941.js → css-shim-06c204c1.js} +1 -1
- package/dist/cjs/{dom-d5e52c7e.js → dom-874a1e39.js} +1 -1
- package/dist/cjs/geotrek-rando-widget.cjs.js +4 -4
- package/dist/cjs/grw-app.cjs.entry.js +4 -3
- package/dist/cjs/grw-filter_6.cjs.entry.js +14447 -14156
- package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js +2 -2
- package/dist/cjs/grw-trek-card.cjs.entry.js +15 -7
- package/dist/cjs/{index-66d58516.js → index-c3fb4999.js} +219 -66
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{shadow-css-cf936b02.js → shadow-css-a33dc836.js} +1 -1
- package/dist/cjs/{store-d301af22.js → store-5183d8f8.js} +4 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/grw-app/grw-app.js +432 -450
- package/dist/collection/components/grw-filter/grw-filter.js +65 -61
- package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.js +35 -44
- package/dist/collection/components/grw-map/grw-map.css +5 -4
- package/dist/collection/components/grw-map/grw-map.js +251 -217
- package/dist/collection/components/grw-poi-detail/grw-poi-detail.js +33 -32
- package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.js +42 -47
- package/dist/collection/components/grw-trek-card/grw-trek-card.js +142 -129
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +135 -208
- package/dist/collection/components/grw-treks-list/grw-treks-list.js +95 -65
- package/dist/collection/store/grw-trek-provider.js +61 -55
- package/dist/collection/store/grw-treks-provider.js +181 -177
- package/dist/collection/store/store.js +3 -2
- package/dist/components/grw-app.js +3 -2
- package/dist/components/grw-map2.js +14405 -14129
- package/dist/components/grw-trek-card2.js +17 -7
- package/dist/components/grw-trek-detail2.js +10 -3
- package/dist/components/grw-trek-provider2.js +6 -2
- package/dist/components/grw-treks-list2.js +7 -2
- package/dist/components/grw-treks-provider2.js +5 -3
- package/dist/components/store.js +3 -2
- package/dist/esm/{css-shim-2d0a698c.js → css-shim-bfa379cd.js} +1 -1
- package/dist/esm/{dom-9794f747.js → dom-104fb833.js} +1 -1
- package/dist/esm/geotrek-rando-widget.js +4 -4
- package/dist/esm/grw-app.entry.js +4 -3
- package/dist/esm/grw-filter_6.entry.js +14427 -14136
- package/dist/esm/grw-information-desk-detail_3.entry.js +2 -2
- package/dist/esm/grw-trek-card.entry.js +15 -7
- package/dist/esm/{index-899307bb.js → index-e834943f.js} +219 -66
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{shadow-css-4cd4480f.js → shadow-css-4261c637.js} +1 -1
- package/dist/esm/{store-70461a28.js → store-c6ccb3db.js} +4 -3
- package/dist/esm-es5/{css-shim-2d0a698c.js → css-shim-bfa379cd.js} +0 -0
- package/dist/esm-es5/{dom-9794f747.js → dom-104fb833.js} +0 -0
- package/dist/esm-es5/geotrek-rando-widget.js +1 -1
- package/dist/esm-es5/grw-app.entry.js +1 -1
- package/dist/esm-es5/grw-filter_6.entry.js +4 -5
- package/dist/esm-es5/grw-information-desk-detail_3.entry.js +1 -1
- package/dist/esm-es5/grw-trek-card.entry.js +1 -1
- package/dist/esm-es5/{index-899307bb.js → index-e834943f.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{shadow-css-4cd4480f.js → shadow-css-4261c637.js} +0 -0
- package/dist/esm-es5/{store-70461a28.js → store-c6ccb3db.js} +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.js +1 -1
- package/dist/geotrek-rando-widget/p-392538a1.system.entry.js +1 -0
- package/dist/geotrek-rando-widget/{p-d1582cff.js → p-4c61dcad.js} +0 -0
- package/dist/geotrek-rando-widget/p-4e0fcbe6.js +1 -0
- package/dist/geotrek-rando-widget/p-6469fc8a.system.js +1 -0
- package/dist/geotrek-rando-widget/{p-c8c96517.system.js → p-6523a23b.system.js} +0 -0
- package/dist/geotrek-rando-widget/{p-32d97a4f.system.js → p-70ecdd1b.system.js} +0 -0
- package/dist/geotrek-rando-widget/{p-0c5b047c.js → p-88046639.js} +0 -0
- package/dist/geotrek-rando-widget/p-88e55e13.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-93d51eaa.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-95932d69.system.entry.js +5 -0
- package/dist/geotrek-rando-widget/{p-4690907e.js → p-9c0d229f.js} +1 -1
- package/dist/geotrek-rando-widget/{p-b1530d9c.system.js → p-a8de6293.system.js} +0 -0
- package/dist/geotrek-rando-widget/p-d56c1888.system.entry.js +1 -0
- package/dist/geotrek-rando-widget/{p-533fc2bb.entry.js → p-dce99cef.entry.js} +1 -1
- package/dist/geotrek-rando-widget/{p-8f9914f4.system.js → p-e2d589f8.system.js} +1 -1
- package/dist/geotrek-rando-widget/{p-82ca029f.system.js → p-e3c13365.system.js} +1 -1
- package/dist/geotrek-rando-widget/{p-2bd0278f.system.entry.js → p-e9f13f25.system.entry.js} +1 -1
- package/dist/geotrek-rando-widget/{p-4eaf20b7.js → p-ef5d4167.js} +0 -0
- package/dist/geotrek-rando-widget/p-fce69064.entry.js +1 -0
- package/dist/types/components/grw-map/grw-map.d.ts +3 -1
- package/dist/types/components/grw-trek-card/grw-trek-card.d.ts +4 -1
- package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +3 -1
- package/dist/types/components/grw-treks-list/grw-treks-list.d.ts +1 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/types/store/store.d.ts +5 -3
- package/dist/types/types/types.d.ts +6 -0
- package/loader/package.json +1 -0
- package/package.json +12 -12
- package/readme.md +4 -6
- package/dist/geotrek-rando-widget/p-067c02c4.system.js +0 -1
- package/dist/geotrek-rando-widget/p-18038011.js +0 -1
- package/dist/geotrek-rando-widget/p-2712caa8.system.entry.js +0 -6
- package/dist/geotrek-rando-widget/p-3ed52659.entry.js +0 -1
- package/dist/geotrek-rando-widget/p-48d5dde7.entry.js +0 -1
- package/dist/geotrek-rando-widget/p-e1431f36.system.entry.js +0 -1
- package/dist/geotrek-rando-widget/p-e38f4ff4.system.entry.js +0 -1
- package/dist/geotrek-rando-widget/p-f5d98aae.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,H as e,e as n,g as s}from"./p-9c0d229f.js";import{s as o,o as r,r as h}from"./p-4e0fcbe6.js";import{d as a,f as l,l as c,a as u,b as f,c as d}from"./p-f3f7d6be.js";const p=class{constructor(i){t(this,i),this.filters=[{property:"practices",trekProperty:"practice",type:"include"},{property:"difficulties",trekProperty:"difficulty",type:"include"},{property:"durations",trekProperty:"duration",type:"interval"}]}handleFilter(t,i){const e=[...o[this.filterType]];e.find((t=>t.id===i.id)).selected=!e.find((t=>t.id===i.id)).selected,o[this.filterType]=e;let n=!1,s=[];for(const r of this.filters){const t=o[r.property].filter((t=>t.selected)).map((t=>t.id));if(t.length>0)if(s.length>0)"include"===r.type?s=[...s.filter((i=>t.includes(i[r.trekProperty])))]:"interval"===r.type&&(s=[...s.filter((i=>{for(const e of t){const t=o[r.property].find((t=>t.id===e));if(i[r.trekProperty]>=t.minValue&&i[r.trekProperty]<=t.maxValue)return!0}return!1}))]);else if(n||(n=!0),"include"===r.type)s=[...o.treks.filter((i=>t.includes(i[r.trekProperty])))];else if("interval"===r.type){let i,e;for(const n of t){const t=o[r.property].find((t=>t.id===n));(isNaN(i)||t.minValue<i)&&(i=t.minValue),(isNaN(e)||t.maxValue>e)&&(e=t.maxValue)}s=[...o.treks.filter((t=>t[r.trekProperty]>=i&&t[r.trekProperty]<=e))]}}o.currentTreks=n?s:o.treks}render(){return i(e,null,i("div",{class:"filter-name"},this.filterName),i("div",{class:"filter-button-container"},o[this.filterType].map((t=>i("div",{onClick:i=>this.handleFilter(i,t),class:t.selected?"selected-filter-button":"filter-button"},t[this.filterNameProperty])))))}};function v(t){var i,e,n,s;for(e=1,n=arguments.length;e<n;e++)for(i in s=arguments[e])t[i]=s[i];return t}p.style=".filter-name{margin-left:8px;color:var(--color-primary);font-size:24px;font-weight:bold}.filter-button-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.filter-button-container .filter-button,.filter-button-container .selected-filter-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;border:1px var(--color-primary) solid;border-radius:8px;margin:8px 0px 0px 8px;padding:8px}.filter-button-container .filter-button{color:var(--color-primary);background-color:#ffffff}.filter-button-container .selected-filter-button{color:#ffffff;background-color:var(--color-primary)}";var m=Object.create||function(){function t(){}return function(i){return t.prototype=i,new t}}();function g(t,i){var e=Array.prototype.slice;if(t.bind)return t.bind.apply(t,e.call(arguments,1));var n=e.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(e.call(arguments)):arguments)}}var b=0;function w(t){return"_leaflet_id"in t||(t._leaflet_id=++b),t._leaflet_id}function x(t,i,e){var n,s,o,r;return r=function(){n=!1,s&&(o.apply(e,s),s=!1)},o=function(){n?s=arguments:(t.apply(e,arguments),setTimeout(r,i),n=!0)}}function y(t,i,e){var n=i[1],s=i[0],o=n-s;return t===n&&e?t:((t-s)%o+o)%o+s}function k(){return!1}function _(t,i){if(!1===i)return t;var e=Math.pow(10,void 0===i?6:i);return Math.round(t*e)/e}function M(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function z(t){return M(t).split(/\s+/)}function P(t,i){for(var e in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?m(t.options):{}),i)t.options[e]=i[e];return t.options}function T(t,i,e){var n=[];for(var s in t)n.push(encodeURIComponent(e?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")}var C=/\{ *([\w_ -]+) *\}/g;function S(t,i){return t.replace(C,(function(t,e){var n=i[e];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(i)),n}))}var A=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function O(t,i){for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1}var E="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function I(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var B=0;function F(t){var i=+new Date,e=Math.max(0,16-(i-B));return B=i+e,window.setTimeout(t,e)}var R=window.requestAnimationFrame||I("RequestAnimationFrame")||F,j=window.cancelAnimationFrame||I("CancelAnimationFrame")||I("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function D(t,i,e){if(!e||R!==F)return R.call(window,g(t,i));t.call(i)}function N(t){t&&j.call(window,t)}var Z={__proto__:null,extend:v,create:m,bind:g,get lastId(){return b},stamp:w,throttle:x,wrapNum:y,falseFn:k,formatNum:_,trim:M,splitWords:z,setOptions:P,getParamString:T,template:S,isArray:A,indexOf:O,emptyImageUrl:E,requestFn:R,cancelFn:j,requestAnimFrame:D,cancelAnimFrame:N};function H(){}H.extend=function(t){var i=function(){P(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},e=i.__super__=this.prototype,n=m(e);for(var s in n.constructor=i,i.prototype=n,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(i[s]=this[s]);return t.statics&&v(i,t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=A(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),v.apply(null,[n].concat(t.includes))),v(n,t),delete n.statics,delete n.includes,n.options&&(n.options=e.options?m(e.options):{},v(n.options,t.options)),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){e.callInitHooks&&e.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=n._initHooks.length;t<i;t++)n._initHooks[t].call(this)}},i},H.include=function(t){var i=this.prototype.options;return v(this.prototype,t),t.options&&(this.prototype.options=i,this.mergeOptions(t.options)),this},H.mergeOptions=function(t){return v(this.prototype.options,t),this},H.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),e="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(e),this};var $={on:function(t,i,e){if("object"==typeof t)for(var n in t)this._on(n,t[n],i);else for(var s=0,o=(t=z(t)).length;s<o;s++)this._on(t[s],i,e);return this},off:function(t,i,e){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],i);else{t=z(t);for(var s=1===arguments.length,o=0,r=t.length;o<r;o++)s?this._off(t[o]):this._off(t[o],i,e)}else delete this._events;return this},_on:function(t,i,e,n){if("function"==typeof i){if(!1===this._listens(t,i,e)){e===this&&(e=void 0);var s={fn:i,ctx:e};n&&(s.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(s)}}else console.warn("wrong listener type: "+typeof i)},_off:function(t,i,e){var n,s,o;if(this._events&&(n=this._events[t]))if(1!==arguments.length)if("function"==typeof i){var r=this._listens(t,i,e);if(!1!==r){var h=n[r];this._firingCount&&(h.fn=k,this._events[t]=n=n.slice()),n.splice(r,1)}}else console.warn("wrong listener type: "+typeof i);else{if(this._firingCount)for(s=0,o=n.length;s<o;s++)n[s].fn=k;delete this._events[t]}},fire:function(t,i,e){if(!this.listens(t,e))return this;var n=v({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var s=this._events[t];if(s){this._firingCount=this._firingCount+1||1;for(var o=0,r=s.length;o<r;o++){var h=s[o],a=h.fn;h.once&&this.off(t,a,h.ctx),a.call(h.ctx||this,n)}this._firingCount--}}return e&&this._propagateEvent(n),this},listens:function(t,i,e,n){"string"!=typeof t&&console.warn('"string" type argument expected');var s=i;"function"!=typeof i&&(n=!!i,s=void 0,e=void 0);var o=this._events&&this._events[t];if(o&&o.length&&!1!==this._listens(t,s,e))return!0;if(n)for(var r in this._eventParents)if(this._eventParents[r].listens(t,i,e,n))return!0;return!1},_listens:function(t,i,e){if(!this._events)return!1;var n=this._events[t]||[];if(!i)return!!n.length;e===this&&(e=void 0);for(var s=0,o=n.length;s<o;s++)if(n[s].fn===i&&n[s].ctx===e)return s;return!1},once:function(t,i,e){if("object"==typeof t)for(var n in t)this._on(n,t[n],i,!0);else for(var s=0,o=(t=z(t)).length;s<o;s++)this._on(t[s],i,e,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[w(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[w(t)],this},_propagateEvent:function(t){for(var i in this._eventParents)this._eventParents[i].fire(t.type,v({layer:t.target,propagatedFrom:t.target},t),!0)}};$.addEventListener=$.on,$.removeEventListener=$.clearAllEventListeners=$.off,$.addOneTimeEventListener=$.once,$.fireEvent=$.fire,$.hasEventListeners=$.listens;var U=H.extend($);function G(t,i,e){this.x=e?Math.round(t):t,this.y=e?Math.round(i):i}var V=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function W(t,i,e){return t instanceof G?t:A(t)?new G(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new G(t.x,t.y):new G(t,i,e)}function q(t,i){if(t)for(var e=i?[t,i]:t,n=0,s=e.length;n<s;n++)this.extend(e[n])}function J(t,i){return!t||t instanceof q?t:new q(t,i)}function X(t,i){if(t)for(var e=i?[t,i]:t,n=0,s=e.length;n<s;n++)this.extend(e[n])}function K(t,i){return t instanceof X?t:new X(t,i)}function Q(t,i,e){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==e&&(this.alt=+e)}function Y(t,i,e){return t instanceof Q?t:A(t)&&"object"!=typeof t[0]?3===t.length?new Q(t[0],t[1],t[2]):2===t.length?new Q(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new Q(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new Q(t,i,e)}G.prototype={clone:function(){return new G(this.x,this.y)},add:function(t){return this.clone()._add(W(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(W(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 G(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new G(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=V(this.x),this.y=V(this.y),this},distanceTo:function(t){var i=(t=W(t)).x-this.x,e=t.y-this.y;return Math.sqrt(i*i+e*e)},equals:function(t){return(t=W(t)).x===this.x&&t.y===this.y},contains:function(t){return t=W(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+_(this.x)+", "+_(this.y)+")"}},q.prototype={extend:function(t){var i,e;if(!t)return this;if(t instanceof G||"number"==typeof t[0]||"x"in t)i=e=W(t);else if(e=(t=J(t)).max,!(i=t.min)||!e)return this;return this.min||this.max?(this.min.x=Math.min(i.x,this.min.x),this.max.x=Math.max(e.x,this.max.x),this.min.y=Math.min(i.y,this.min.y),this.max.y=Math.max(e.y,this.max.y)):(this.min=i.clone(),this.max=e.clone()),this},getCenter:function(t){return W((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return W(this.min.x,this.max.y)},getTopRight:function(){return W(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var i,e;return(t="number"==typeof t[0]||t instanceof G?W(t):J(t))instanceof q?(i=t.min,e=t.max):i=e=t,i.x>=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=J(t);var i=this.min,e=this.max,n=t.min,s=t.max;return s.x>=i.x&&n.x<=e.x&&s.y>=i.y&&n.y<=e.y},overlaps:function(t){t=J(t);var i=this.min,e=this.max,n=t.min,s=t.max;return s.x>i.x&&n.x<e.x&&s.y>i.y&&n.y<e.y},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var i=this.min,e=this.max,n=Math.abs(i.x-e.x)*t,s=Math.abs(i.y-e.y)*t;return J(W(i.x-n,i.y-s),W(e.x+n,e.y+s))},equals:function(t){return!!t&&(t=J(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},X.prototype={extend:function(t){var i,e,n=this._southWest,s=this._northEast;if(t instanceof Q)i=t,e=t;else{if(!(t instanceof X))return t?this.extend(Y(t)||K(t)):this;if(e=t._northEast,!(i=t._southWest)||!e)return this}return n||s?(n.lat=Math.min(i.lat,n.lat),n.lng=Math.min(i.lng,n.lng),s.lat=Math.max(e.lat,s.lat),s.lng=Math.max(e.lng,s.lng)):(this._southWest=new Q(i.lat,i.lng),this._northEast=new Q(e.lat,e.lng)),this},pad:function(t){var i=this._southWest,e=this._northEast,n=Math.abs(i.lat-e.lat)*t,s=Math.abs(i.lng-e.lng)*t;return new X(new Q(i.lat-n,i.lng-s),new Q(e.lat+n,e.lng+s))},getCenter:function(){return new Q((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 Q(this.getNorth(),this.getWest())},getSouthEast:function(){return new Q(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 Q||"lat"in t?Y(t):K(t);var i,e,n=this._southWest,s=this._northEast;return t instanceof X?(i=t.getSouthWest(),e=t.getNorthEast()):i=e=t,i.lat>=n.lat&&e.lat<=s.lat&&i.lng>=n.lng&&e.lng<=s.lng},intersects:function(t){t=K(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),s=t.getNorthEast();return s.lat>=i.lat&&n.lat<=e.lat&&s.lng>=i.lng&&n.lng<=e.lng},overlaps:function(t){t=K(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),s=t.getNorthEast();return s.lat>i.lat&&n.lat<e.lat&&s.lng>i.lng&&n.lng<e.lng},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=K(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}},Q.prototype={equals:function(t,i){return!!t&&(t=Y(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("+_(this.lat,t)+", "+_(this.lng,t)+")"},distanceTo:function(t){return et.distance(this,Y(t))},wrap:function(){return et.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,e=i/Math.cos(Math.PI/180*this.lat);return K([this.lat-i,this.lng-e],[this.lat+i,this.lng+e])},clone:function(){return new Q(this.lat,this.lng,this.alt)}};var tt,it={latLngToPoint:function(t,i){var e=this.projection.project(t),n=this.scale(i);return this.transformation._transform(e,n)},pointToLatLng:function(t,i){var e=this.scale(i),n=this.transformation.untransform(t,e);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var i=this.projection.bounds,e=this.scale(t);return new q(this.transformation.transform(i.min,e),this.transformation.transform(i.max,e))},infinite:!1,wrapLatLng:function(t){var i=this.wrapLng?y(t.lng,this.wrapLng,!0):t.lng;return new Q(this.wrapLat?y(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),e=this.wrapLatLng(i),n=i.lat-e.lat,s=i.lng-e.lng;if(0===n&&0===s)return t;var o=t.getSouthWest(),r=t.getNorthEast();return new X(new Q(o.lat-n,o.lng-s),new Q(r.lat-n,r.lng-s))}},et=v({},it,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var e=Math.PI/180,n=t.lat*e,s=i.lat*e,o=Math.sin((i.lat-t.lat)*e/2),r=Math.sin((i.lng-t.lng)*e/2),h=o*o+Math.cos(n)*Math.cos(s)*r*r,a=2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h));return this.R*a}}),nt={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,e=this.MAX_LATITUDE,n=Math.max(Math.min(e,t.lat),-e),s=Math.sin(n*i);return new G(this.R*t.lng*i,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var i=180/Math.PI;return new Q((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:(tt=6378137*Math.PI,new q([-tt,-tt],[tt,tt]))};function st(t,i,e,n){if(A(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=i,this._c=e,this._d=n}function ot(t,i,e,n){return new st(t,i,e,n)}st.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 G((t.x/(i=i||1)-this._b)/this._a,(t.y/i-this._d)/this._c)}};var rt,ht=v({},et,{code:"EPSG:3857",projection:nt,transformation:(rt=.5/(Math.PI*nt.R),ot(rt,.5,-rt,.5))}),at=v({},ht,{code:"EPSG:900913"});function lt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function ct(t,i){var e,n,s,o,r,h,a="";for(e=0,s=t.length;e<s;e++){for(n=0,o=(r=t[e]).length;n<o;n++)a+=(n?"L":"M")+(h=r[n]).x+" "+h.y;a+=i?Wt.svg?"z":"x":""}return a||"M0 0"}var ut,ft=document.documentElement.style,dt="ActiveXObject"in window,pt=dt&&!document.addEventListener,vt="msLaunchUri"in navigator&&!("documentMode"in document),mt=Vt("webkit"),gt=Vt("android"),bt=Vt("android 2")||Vt("android 3"),wt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),xt=gt&&Vt("Google")&&wt<537&&!("AudioNode"in window),yt=!!window.opera,kt=!vt&&Vt("chrome"),_t=Vt("gecko")&&!mt&&!yt&&!dt,Mt=!kt&&Vt("safari"),zt=Vt("phantom"),Pt="OTransition"in ft,Tt=0===navigator.platform.indexOf("Win"),Lt=dt&&"transition"in ft,Ct="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!bt,St="MozPerspective"in ft,At=!window.L_DISABLE_3D&&(Lt||Ct||St)&&!Pt&&!zt,Ot="undefined"!=typeof orientation||Vt("mobile"),Et=Ot&&mt,It=Ot&&Ct,Bt=!window.PointerEvent&&window.MSPointerEvent,Ft=!(!window.PointerEvent&&!Bt),Rt="ontouchstart"in window||!!window.TouchEvent,jt=!window.L_NO_TOUCH&&(Rt||Ft),Dt=Ot&&yt,Nt=Ot&&_t,Zt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Ht=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",k,i),window.removeEventListener("testPassiveEventSupport",k,i)}catch(e){}return t}(),$t=!!document.createElement("canvas").getContext,Ut=!(!document.createElementNS||!lt("svg").createSVGRect),Gt=!!Ut&&((ut=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(ut.firstChild&&ut.firstChild.namespaceURI));function Vt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Wt={ie:dt,ielt9:pt,edge:vt,webkit:mt,android:gt,android23:bt,androidStock:xt,opera:yt,chrome:kt,gecko:_t,safari:Mt,phantom:zt,opera12:Pt,win:Tt,ie3d:Lt,webkit3d:Ct,gecko3d:St,any3d:At,mobile:Ot,mobileWebkit:Et,mobileWebkit3d:It,msPointer:Bt,pointer:Ft,touch:jt,touchNative:Rt,mobileOpera:Dt,mobileGecko:Nt,retina:Zt,passiveEvents:Ht,canvas:$t,svg:Ut,vml:!Ut&&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(e){return!1}}(),inlineSvg:Gt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},qt=Wt.msPointer?"MSPointerDown":"pointerdown",Jt=Wt.msPointer?"MSPointerMove":"pointermove",Xt=Wt.msPointer?"MSPointerUp":"pointerup",Kt=Wt.msPointer?"MSPointerCancel":"pointercancel",Qt={touchstart:qt,touchmove:Jt,touchend:Xt,touchcancel:Kt},Yt={touchstart:function(t,i){i.MSPOINTER_TYPE_TOUCH&&i.pointerType===i.MSPOINTER_TYPE_TOUCH&&Ji(i),oi(t,i)},touchmove:oi,touchend:oi,touchcancel:oi},ti={},ii=!1;function ei(t){ti[t.pointerId]=t}function ni(t){ti[t.pointerId]&&(ti[t.pointerId]=t)}function si(t){delete ti[t.pointerId]}function oi(t,i){if(i.pointerType!==(i.MSPOINTER_TYPE_MOUSE||"mouse")){for(var e in i.touches=[],ti)i.touches.push(ti[e]);i.changedTouches=[i],t(i)}}var ri,hi,ai,li,ci,ui=Ti(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),fi=Ti(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),di="webkitTransition"===fi||"OTransition"===fi?fi+"End":"transitionend";function pi(t){return"string"==typeof t?document.getElementById(t):t}function vi(t,i){var e=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!e||"auto"===e)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);e=n?n[i]:null}return"auto"===e?null:e}function mi(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function gi(t){var i=t.parentNode;i&&i.removeChild(t)}function bi(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function wi(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function xi(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function yi(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=zi(t);return e.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function ki(t,i){if(void 0!==t.classList)for(var e=z(i),n=0,s=e.length;n<s;n++)t.classList.add(e[n]);else if(!yi(t,i)){var o=zi(t);Mi(t,(o?o+" ":"")+i)}}function _i(t,i){void 0!==t.classList?t.classList.remove(i):Mi(t,M((" "+zi(t)+" ").replace(" "+i+" "," ")))}function Mi(t,i){void 0===t.className.baseVal?t.className=i:t.className.baseVal=i}function zi(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Pi(t,i){"opacity"in t.style?t.style.opacity=i:"filter"in t.style&&function(t,i){var e=!1,n="DXImageTransform.Microsoft.Alpha";try{e=t.filters.item(n)}catch(s){if(1===i)return}i=Math.round(100*i),e?(e.Enabled=100!==i,e.Opacity=i):t.style.filter+=" progid:"+n+"(opacity="+i+")"}(t,i)}function Ti(t){for(var i=document.documentElement.style,e=0;e<t.length;e++)if(t[e]in i)return t[e];return!1}function Li(t,i,e){var n=i||new G(0,0);t.style[ui]=(Wt.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")}function Ci(t,i){t._leaflet_pos=i,Wt.any3d?Li(t,i):(t.style.left=i.x+"px",t.style.top=i.y+"px")}function Si(t){return t._leaflet_pos||new G(0,0)}if("onselectstart"in document)ri=function(){Di(window,"selectstart",Ji)},hi=function(){Zi(window,"selectstart",Ji)};else{var Ai=Ti(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ri=function(){if(Ai){var t=document.documentElement.style;ai=t[Ai],t[Ai]="none"}},hi=function(){Ai&&(document.documentElement.style[Ai]=ai,ai=void 0)}}function Oi(){Di(window,"dragstart",Ji)}function Ei(){Zi(window,"dragstart",Ji)}function Ii(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Bi(),li=t,ci=t.style.outline,t.style.outline="none",Di(window,"keydown",Bi))}function Bi(){li&&(li.style.outline=ci,li=void 0,ci=void 0,Zi(window,"keydown",Bi))}function Fi(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ri(t){var i=t.getBoundingClientRect();return{x:i.width/t.offsetWidth||1,y:i.height/t.offsetHeight||1,boundingClientRect:i}}var ji={__proto__:null,TRANSFORM:ui,TRANSITION:fi,TRANSITION_END:di,get:pi,getStyle:vi,create:mi,remove:gi,empty:bi,toFront:wi,toBack:xi,hasClass:yi,addClass:ki,removeClass:_i,setClass:Mi,getClass:zi,setOpacity:Pi,testProp:Ti,setTransform:Li,setPosition:Ci,getPosition:Si,get disableTextSelection(){return ri},get enableTextSelection(){return hi},disableImageDrag:Oi,enableImageDrag:Ei,preventOutline:Ii,restoreOutline:Bi,getSizedParentNode:Fi,getScale:Ri};function Di(t,i,e,n){if(i&&"object"==typeof i)for(var s in i)Ui(t,s,i[s],e);else for(var o=0,r=(i=z(i)).length;o<r;o++)Ui(t,i[o],e,n);return this}var Ni="_leaflet_events";function Zi(t,i,e,n){if(1===arguments.length)Hi(t),delete t[Ni];else if(i&&"object"==typeof i)for(var s in i)Gi(t,s,i[s],e);else if(i=z(i),2===arguments.length)Hi(t,(function(t){return-1!==O(i,t)}));else for(var o=0,r=i.length;o<r;o++)Gi(t,i[o],e,n);return this}function Hi(t,i){for(var e in t[Ni]){var n=e.split(/\d/)[0];i&&!i(n)||Gi(t,n,null,null,e)}}var $i={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ui(t,i,e,n){var s=i+w(e)+(n?"_"+w(n):"");if(t[Ni]&&t[Ni][s])return this;var o=function(i){return e.call(n||t,i||window.event)},r=o;!Wt.touchNative&&Wt.pointer&&0===i.indexOf("touch")?o=function(t,i,e){return"touchstart"===i&&(ii||(document.addEventListener(qt,ei,!0),document.addEventListener(Jt,ni,!0),document.addEventListener(Xt,si,!0),document.addEventListener(Kt,si,!0),ii=!0)),Yt[i]?(e=Yt[i].bind(this,e),t.addEventListener(Qt[i],e,!1),e):(console.warn("wrong event specified:",i),L.Util.falseFn)}(t,i,o):Wt.touch&&"dblclick"===i?o=function(t,i){t.addEventListener("dblclick",i);var e,n=0;function s(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var s=Ki(t);if(!s.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||s.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var o=Date.now();o-n<=200?2==++e&&i(function(t){var i,e,n={};for(e in t)n[e]=(i=t[e])&&i.bind?i.bind(t):i;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):e=1,n=o}}}else e=t.detail}return t.addEventListener("click",s),{dblclick:i,simDblclick:s}}(t,o):"addEventListener"in t?"touchstart"===i||"touchmove"===i||"wheel"===i||"mousewheel"===i?t.addEventListener($i[i]||i,o,!!Wt.passiveEvents&&{passive:!1}):"mouseenter"===i||"mouseleave"===i?t.addEventListener($i[i],o=function(i){i=i||window.event,ie(t,i)&&r(i)},!1):t.addEventListener(i,r,!1):t.attachEvent("on"+i,o),t[Ni]=t[Ni]||{},t[Ni][s]=o}function Gi(t,i,e,n,s){s=s||i+w(e)+(n?"_"+w(n):"");var o=t[Ni]&&t[Ni][s];if(!o)return this;!Wt.touchNative&&Wt.pointer&&0===i.indexOf("touch")?function(t,i,e){Qt[i]?t.removeEventListener(Qt[i],e,!1):console.warn("wrong event specified:",i)}(t,i,o):Wt.touch&&"dblclick"===i?function(t,i){t.removeEventListener("dblclick",i.dblclick),t.removeEventListener("click",i.simDblclick)}(t,o):"removeEventListener"in t?t.removeEventListener($i[i]||i,o,!1):t.detachEvent("on"+i,o),t[Ni][s]=null}function Vi(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Wi(t){return Ui(t,"wheel",Vi),this}function qi(t){return Di(t,"mousedown touchstart dblclick contextmenu",Vi),t._leaflet_disable_click=!0,this}function Ji(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Xi(t){return Ji(t),Vi(t),this}function Ki(t){if(t.composedPath)return t.composedPath();for(var i=[],e=t.target;e;)i.push(e),e=e.parentNode;return i}function Qi(t,i){if(!i)return new G(t.clientX,t.clientY);var e=Ri(i),n=e.boundingClientRect;return new G((t.clientX-n.left)/e.x-i.clientLeft,(t.clientY-n.top)/e.y-i.clientTop)}var Yi=Wt.linux&&Wt.chrome?window.devicePixelRatio:Wt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function te(t){return Wt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Yi: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 ie(t,i){var e=i.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(n){return!1}return e!==t}var ee={__proto__:null,on:Di,off:Zi,stopPropagation:Vi,disableScrollPropagation:Wi,disableClickPropagation:qi,preventDefault:Ji,stop:Xi,getPropagationPath:Ki,getMousePosition:Qi,getWheelDelta:te,isExternalTarget:ie,addListener:Di,removeListener:Zi},ne=U.extend({run:function(t,i,e,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=Si(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=D(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,e=1e3*this._duration;i<e?this._runFrame(this._easeOut(i/e),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){var e=this._startPos.add(this._offset.multiplyBy(t));i&&e._round(),Ci(this._el,e),this.fire("step")},_complete:function(){N(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),se=U.extend({options:{crs:ht,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=P(this,i),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=g(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(Y(i.center),i.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=fi&&Wt.any3d&&!Wt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Di(this._proxy,di,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,i,e){return i=void 0===i?this._zoom:this._limitZoom(i),t=this._limitCenter(Y(t),i,this.options.maxBounds),e=e||{},this._stop(),this._loaded&&!e.reset&&!0!==e&&(void 0!==e.animate&&(e.zoom=v({animate:e.animate},e.zoom),e.pan=v({animate:e.animate,duration:e.duration},e.pan)),this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,e.zoom):this._tryAnimatedPan(t,e.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,i,e.pan&&e.pan.noMoveStart),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||(Wt.any3d?this.options.zoomDelta:1)),i)},zoomOut:function(t,i){return this.setZoom(this._zoom-(t=t||(Wt.any3d?this.options.zoomDelta:1)),i)},setZoomAround:function(t,i,e){var n=this.getZoomScale(i),s=this.getSize().divideBy(2),o=(t instanceof G?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/n),r=this.containerPointToLatLng(s.add(o));return this.setView(r,i,{zoom:e})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():K(t);var e=W(i.paddingTopLeft||i.padding||[0,0]),n=W(i.paddingBottomRight||i.padding||[0,0]),s=this.getBoundsZoom(t,!1,e.add(n));if((s="number"==typeof i.maxZoom?Math.min(i.maxZoom,s):s)===1/0)return{center:t.getCenter(),zoom:s};var o=n.subtract(e).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s);return{center:this.unproject(r.add(h).divideBy(2).add(o),s),zoom:s}},fitBounds:function(t,i){if(!(t=K(t)).isValid())throw new Error("Bounds are not valid.");var e=this._getBoundsCenterZoom(t,i);return this.setView(e.center,e.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){if(i=i||{},!(t=W(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 ne,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate){ki(this._mapPane,"leaflet-pan-anim");var e=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,e,i.duration||.25,i.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,i,e){if(!1===(e=e||{}).animate||!Wt.any3d)return this.setView(t,i,e);this._stop();var n=this.project(this.getCenter()),s=this.project(t),o=this.getSize(),r=this._zoom;t=Y(t),i=void 0===i?r:i;var h=Math.max(o.x,o.y),a=h*this.getZoomScale(r,i),l=s.distanceTo(n)||1,c=1.42,u=2.0164;function f(t){var i=(a*a-h*h+(t?-1:1)*u*u*l*l)/(2*(t?a:h)*u*l),e=Math.sqrt(i*i+1)-i;return e<1e-9?-18:Math.log(e)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var v=f(0);var m=Date.now(),g=(f(1)-v)/c,b=e.duration?1e3*e.duration:1e3*g*.8;return this._moveStart(!0,e.noMoveStart),function e(){var o=(Date.now()-m)/b,a=function(t){return 1-Math.pow(1-t,1.5)}(o)*g;o<=1?(this._flyToFrame=D(e,this),this._move(this.unproject(n.add(s.subtract(n).multiplyBy(function(t){return h*(p(v)*(d(i=v+c*t)/p(i))-d(v))/u;var i}(a)/l)),r),this.getScaleZoom(h/function(t){return h*(p(v)/p(v+c*t))}(a),r),{flyTo:!0})):this._move(t,i)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,i){var e=this._getBoundsCenterZoom(t,i);return this.flyTo(e.center,e.zoom,i)},setMaxBounds:function(t){return t=K(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var i=this.options.minZoom;return this.options.minZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var i=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,K(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e=W((i=i||{}).paddingTopLeft||i.padding||[0,0]),n=W(i.paddingBottomRight||i.padding||[0,0]),s=this.project(this.getCenter()),o=this.project(t),r=this.getPixelBounds(),h=J([r.min.add(e),r.max.subtract(n)]),a=h.getSize();if(!h.contains(o)){this._enforcingBounds=!0;var l=o.subtract(h.getCenter()),c=h.extend(o).getSize().subtract(a);s.x+=l.x<0?-c.x:c.x,s.y+=l.y<0?-c.y:c.y,this.panTo(this.unproject(s),i),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=v({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var e=this.getSize(),n=i.divideBy(2).round(),s=e.divideBy(2).round(),o=n.subtract(s);return o.x||o.y?(t.animate&&t.pan?this.panBy(o):(t.pan&&this._rawPanBy(o),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(g(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:e})):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=v({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=g(this._handleGeolocationResponse,this),e=g(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,e,t):navigator.geolocation.getCurrentPosition(i,e,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var i=t.code,e=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+e+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var i=new Q(t.coords.latitude,t.coords.longitude),e=i.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var s=this.getBoundsZoom(e);this.setView(i,n.maxZoom?Math.min(s,n.maxZoom):s)}var o={latlng:i,bounds:e,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(o[r]=t.coords[r]);this.fire("locationfound",o)}},addHandler:function(t,i){if(!i)return this;var e=this[t]=new i(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(i){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),gi(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(N(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)gi(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var e=mi("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new X(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,e){t=K(t),e=W(e||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),o=this.getMaxZoom(),r=t.getNorthWest(),h=t.getSouthEast(),a=this.getSize().subtract(e),l=J(this.project(h,n),this.project(r,n)).getSize(),c=Wt.any3d?this.options.zoomSnap:1,u=a.x/l.x,f=a.y/l.y,d=i?Math.max(u,f):Math.min(u,f);return n=this.getScaleZoom(d,n),c&&(n=Math.round(n/(c/100))*(c/100),n=i?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(s,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new G(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var e=this._getTopLeftPoint(t,i);return new q(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs,n=e.zoom(t*e.scale(i=void 0===i?this._zoom:i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(Y(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(W(t),i)},layerPointToLatLng:function(t){var i=W(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(Y(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(Y(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(K(t))},distance:function(t,i){return this.options.crs.distance(Y(t),Y(i))},containerPointToLayerPoint:function(t){return W(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return W(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(W(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Y(t)))},mouseEventToContainerPoint:function(t){return Qi(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=pi(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");Di(i,"scroll",this._onScroll,this),this._containerId=w(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Wt.any3d,ki(t,"leaflet-container"+(Wt.touch?" leaflet-touch":"")+(Wt.retina?" leaflet-retina":"")+(Wt.ielt9?" leaflet-oldie":"")+(Wt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=vi(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),Ci(this._mapPane,new G(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ki(t.markerPane,"leaflet-zoom-hide"),ki(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i,e){Ci(this._mapPane,new G(0,0));var n=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var s=this._zoom!==i;this._moveStart(s,e)._move(t,i)._moveEnd(s),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,e,n){void 0===i&&(i=this._zoom);var s=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?e&&e.pinch&&this.fire("zoom",e):((s||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return N(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Ci(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[w(this._container)]=this;var i=t?Zi:Di;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),Wt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){N(this._resizeRequest),this._resizeRequest=D((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,n=[],s="mouseout"===i||"mouseover"===i,o=t.target||t.srcElement,r=!1;o;){if((e=this._targets[w(o)])&&("click"===i||"preclick"===i)&&this._draggableMoved(e)){r=!0;break}if(e&&e.listens(i,!0)){if(s&&!ie(o,t))break;if(n.push(e),s)break}if(o===this._container)break;o=o.parentNode}return n.length||r||s||!this.listens(i,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var i=t.target||t.srcElement;if(!(!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i))){var e=t.type;"mousedown"===e&&Ii(i),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,e){if("click"===t.type){var n=v({},t);n.type="preclick",this._fireDOMEvent(n,n.type,e)}var s=this._findEventTargets(t,i);if(e){for(var o=[],r=0;r<e.length;r++)e[r].listens(i,!0)&&o.push(e[r]);s=o.concat(s)}if(s.length){"contextmenu"===i&&Ji(t);var h=s[0],a={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var l=h.getLatLng&&(!h._radius||h._radius<=10);a.containerPoint=l?this.latLngToContainerPoint(h.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=l?h.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(r=0;r<s.length;r++)if(s[r].fire(i,a,!0),a.originalEvent._stopped||!1===s[r].options.bubblingMouseEvents&&-1!==O(this._mouseEvents,i))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 Si(this._mapPane)||new G(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,i){return(t&&void 0!==i?this._getNewPixelOrigin(t,i):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,i){var e=this.getSize()._divideBy(2);return this.project(t,i)._subtract(e)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return this.project(t,i)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return J([this.project(t.getSouthWest(),i)._subtract(n),this.project(t.getNorthWest(),i)._subtract(n),this.project(t.getSouthEast(),i)._subtract(n),this.project(t.getNorthEast(),i)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,e){if(!e)return t;var n=this.project(t,i),s=this.getSize().divideBy(2),o=new q(n.subtract(s),n.add(s)),r=this._getBoundsOffset(o,e,i);return r.round().equals([0,0])?t:this.unproject(n.add(r),i)},_limitOffset:function(t,i){if(!i)return t;var e=this.getPixelBounds(),n=new q(e.min.add(t),e.max.add(t));return t.add(this._getBoundsOffset(n,i))},_getBoundsOffset:function(t,i,e){var n=J(this.project(i.getNorthEast(),e),this.project(i.getSouthWest(),e)),s=n.min.subtract(t.min),o=n.max.subtract(t.max);return new G(this._rebound(s.x,-o.x),this._rebound(s.y,-o.y))},_rebound:function(t,i){return t+i>0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),n=Wt.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){_i(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var e=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(e)||(this.panBy(e,i),0))},_createAnimProxy:function(){var t=this._proxy=mi("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var i=ui,e=this._proxy.style[i];Li(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){gi(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),i=this.getZoom();Li(this._proxy,this.project(t,i),this.getZoomScale(i,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(s)||(D((function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)}),this),0))},_animateZoom:function(t,i,e,n){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,ki(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(g(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_i(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))}}),oe=H.extend({options:{position:"topright"},initialize:function(t){P(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return ki(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(gi(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()}}),re=function(t){return new oe(t)};se.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},i="leaflet-",e=this._controlContainer=mi("div",i+"control-container",this._container);function n(n,s){t[n+s]=mi("div",i+n+" "+i+s,e)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)gi(this._controlCorners[t]);gi(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var he=oe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,n){return e<n?-1:n<e?1:0}},initialize:function(t,i,e){for(var n in P(this,e),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in i)this._addLayer(i[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return oe.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(w(t));return i&&this._layers.splice(this._layers.indexOf(i),1),this._map?this._update():this},expand:function(){ki(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?(ki(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):_i(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return _i(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",i=this._container=mi("div",t),e=this.options.collapsed;i.setAttribute("aria-haspopup",!0),qi(i),Wi(i);var n=this._section=mi("section",t+"-list");e&&(this._map.on("click",this.collapse,this),Di(i,{mouseenter:function(){Di(n,"click",Ji),this.expand(),setTimeout((function(){Zi(n,"click",Ji)}))},mouseleave:this.collapse},this));var s=this._layersLink=mi("a",t+"-toggle",i);s.href="#",s.title="Layers",s.setAttribute("role","button"),Di(s,"click",Ji),Di(s,"focus",this.expand,this),e||this.expand(),this._baseLayersList=mi("div",t+"-base",n),this._separator=mi("div",t+"-separator",n),this._overlaysList=mi("div",t+"-overlays",n),i.appendChild(n)},_getLayer:function(t){for(var i=0;i<this._layers.length;i++)if(this._layers[i]&&w(this._layers[i].layer)===t)return this._layers[i]},_addLayer:function(t,i,e){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:e}),this.options.sortLayers&&this._layers.sort(g((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;bi(this._baseLayersList),bi(this._overlaysList),this._layerControlInputs=[];var t,i,e,n,s=0;for(e=0;e<this._layers.length;e++)this._addItem(n=this._layers[e]),i=i||n.overlay,t=t||!n.overlay,s+=n.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&s>1)?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(w(t.target)),e=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;e&&this._map.fire(e,i)},_createRadioElement:function(t,i){var e='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+w(this),n),this._layerControlInputs.push(i),i.layerId=w(t.layer),Di(i,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var o=document.createElement("span");return e.appendChild(o),o.appendChild(i),o.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],s=[];this._handlingClick=!0;for(var o=e.length-1;o>=0;o--)i=this._getLayer((t=e[o]).layerId).layer,t.checked?n.push(i):t.checked||s.push(i);for(o=0;o<s.length;o++)this._map.hasLayer(s[o])&&this._map.removeLayer(s[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,i,e=this._layerControlInputs,n=this._map.getZoom(),s=e.length-1;s>=0;s--)i=this._getLayer((t=e[s]).layerId).layer,t.disabled=void 0!==i.options.minZoom&&n<i.options.minZoom||void 0!==i.options.maxZoom&&n>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}}),ae=oe.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",e=mi("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,s){var o=mi("a",e,n);return o.innerHTML=t,o.href="#",o.title=i,o.setAttribute("role","button"),o.setAttribute("aria-label",i),qi(o),Di(o,"click",Xi),Di(o,"click",s,this),Di(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";_i(this._zoomInButton,i),_i(this._zoomOutButton,i),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(ki(this._zoomOutButton,i),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(ki(this._zoomInButton,i),this._zoomInButton.setAttribute("aria-disabled","true"))}});se.mergeOptions({zoomControl:!0}),se.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new ae,this.addControl(this.zoomControl))}));var le=oe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=mi("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=mi("div",i,e)),t.imperial&&(this._iScale=mi("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t);this._updateScale(this._mScale,i<1e3?i+" m":i/1e3+" km",i/t)},_updateImperial:function(t){var i,e,n,s=3.2808399*t;s>5280?(e=this._getRoundNum(i=s/5280),this._updateScale(this._iScale,e+" mi",e/i)):(n=this._getRoundNum(s),this._updateScale(this._iScale,n+" ft",n/s))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),e=t/i;return i*(e>=10?10:e>=5?5:e>=3?3:e>=2?2:1)}}),ce=oe.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Wt.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){P(this,t),this._attributions={}},onAdd:function(t){for(var i in t.attributionControl=this,this._container=mi("div","leaflet-control-attribution"),qi(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' <span aria-hidden="true">|</span> ')}}});se.mergeOptions({attributionControl:!0}),se.addInitHook((function(){this.options.attributionControl&&(new ce).addTo(this)})),oe.Layers=he,oe.Zoom=ae,oe.Scale=le,oe.Attribution=ce,re.layers=function(t,i,e){return new he(t,i,e)},re.zoom=function(t){return new ae(t)},re.scale=function(t){return new le(t)},re.attribution=function(t){return new ce(t)};var ue=H.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}});ue.addTo=function(t,i){return t.addHandler(i,this),this};var fe,de={Events:$},pe=Wt.touch?"touchstart mousedown":"mousedown",ve=U.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){P(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(Di(this._dragStartTarget,pe,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ve._dragging===this&&this.finishDrag(!0),Zi(this._dragStartTarget,pe,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!yi(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)ve._dragging===this&&this.finishDrag();else if(!(ve._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(ve._dragging=this,this._preventOutline&&Ii(this._element),Oi(),ri(),this._moving))){this.fire("down");var i=t.touches?t.touches[0]:t,e=Fi(this._element);this._startPoint=new G(i.clientX,i.clientY),this._startPos=Si(this._element),this._parentScale=Ri(e);var n="mousedown"===t.type;Di(document,n?"mousemove":"touchmove",this._onMove,this),Di(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var i=t.touches&&1===t.touches.length?t.touches[0]:t,e=new G(i.clientX,i.clientY)._subtract(this._startPoint);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,Ji(t),this._moved||(this.fire("dragstart"),this._moved=!0,ki(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ki(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Ci(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){_i(document.body,"leaflet-dragging"),this._lastTarget&&(_i(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Zi(document,"mousemove touchmove",this._onMove,this),Zi(document,"mouseup touchend touchcancel",this._onUp,this),Ei(),hi(),this._moved&&this._moving&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)}),this._moving=!1,ve._dragging=!1}});function me(t,i){if(!i||!t.length)return t.slice();var e=i*i;return function(t,i){var e=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(e);n[0]=n[e-1]=1,be(t,n,i,0,e-1);var s,o=[];for(s=0;s<e;s++)n[s]&&o.push(t[s]);return o}(t=function(t,i){for(var e=[t[0]],n=1,s=0,o=t.length;n<o;n++)a=void 0,l=void 0,(a=(h=t[s]).x-(r=t[n]).x)*a+(l=h.y-r.y)*l>i&&(e.push(t[n]),s=n);var r,h,a,l;return s<o-1&&e.push(t[o-1]),e}(t,e),e)}function ge(t,i,e){return Math.sqrt(ke(t,i,e,!0))}function be(t,i,e,n,s){var o,r,h,a=0;for(r=n+1;r<=s-1;r++)(h=ke(t[r],t[n],t[s],!0))>a&&(o=r,a=h);a>e&&(i[o]=1,be(t,i,e,n,o),be(t,i,e,o,s))}function we(t,i,e,n,s){var o,r,h,a=n?fe:ye(t,e),l=ye(i,e);for(fe=l;;){if(!(a|l))return[t,i];if(a&l)return!1;h=ye(r=xe(t,i,o=a||l,e,s),e),o===a?(t=r,a=h):(i=r,l=h)}}function xe(t,i,e,n,s){var o,r,h=i.x-t.x,a=i.y-t.y,l=n.min,c=n.max;return 8&e?(o=t.x+h*(c.y-t.y)/a,r=c.y):4&e?(o=t.x+h*(l.y-t.y)/a,r=l.y):2&e?(o=c.x,r=t.y+a*(c.x-t.x)/h):1&e&&(o=l.x,r=t.y+a*(l.x-t.x)/h),new G(o,r,s)}function ye(t,i){var e=0;return t.x<i.min.x?e|=1:t.x>i.max.x&&(e|=2),t.y<i.min.y?e|=4:t.y>i.max.y&&(e|=8),e}function ke(t,i,e,n){var s,o=i.x,r=i.y,h=e.x-o,a=e.y-r,l=h*h+a*a;return l>0&&((s=((t.x-o)*h+(t.y-r)*a)/l)>1?(o=e.x,r=e.y):s>0&&(o+=h*s,r+=a*s)),h=t.x-o,a=t.y-r,n?h*h+a*a:new G(o,r)}function _e(t){return!A(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Me(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),_e(t)}function ze(t,i){var e,n,s,o,r,h,a,l;if(!t||0===t.length)throw new Error("latlngs not passed");_e(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=[];for(var u in t)c.push(i.project(Y(t[u])));var f=c.length;for(e=0,n=0;e<f-1;e++)n+=c[e].distanceTo(c[e+1])/2;if(0===n)l=c[0];else for(e=0,o=0;e<f-1;e++)if((o+=s=(r=c[e]).distanceTo(h=c[e+1]))>n){l=[h.x-(a=(o-n)/s)*(h.x-r.x),h.y-a*(h.y-r.y)];break}return i.unproject(W(l))}var Pe={__proto__:null,simplify:me,pointToSegmentDistance:ge,closestPointOnSegment:function(t,i,e){return ke(t,i,e)},clipSegment:we,_getEdgeIntersection:xe,_getBitCode:ye,_sqClosestPointOnSegment:ke,isFlat:_e,_flat:Me,polylineCenter:ze};function Te(t,i,e){var n,s,o,r,h,a,l,c,u,f=[1,4,2,8];for(s=0,l=t.length;s<l;s++)t[s]._code=ye(t[s],i);for(r=0;r<4;r++){for(c=f[r],n=[],s=0,o=(l=t.length)-1;s<l;o=s++)a=t[o],(h=t[s])._code&c?a._code&c||((u=xe(a,h,c,i,e))._code=ye(u,i),n.push(u)):(a._code&c&&((u=xe(a,h,c,i,e))._code=ye(u,i),n.push(u)),n.push(h));t=n}return t}function Le(t,i){var e,n,s,o,r,h,a,l;if(!t||0===t.length)throw new Error("latlngs not passed");_e(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=[];for(var u in t)c.push(i.project(Y(t[u])));var f=c.length;for(h=a=l=0,e=0,n=f-1;e<f;n=e++)a+=((s=c[e]).x+(o=c[n]).x)*(r=s.y*o.x-o.y*s.x),l+=(s.y+o.y)*r,h+=3*r;return i.unproject(W(0===h?c[0]:[a/h,l/h]))}var Ce={__proto__:null,clipPolygon:Te,polygonCenter:Le},Se={project:function(t){return new G(t.lng,t.lat)},unproject:function(t){return new Q(t.y,t.x)},bounds:new q([-180,-90],[180,90])},Ae={R:6378137,R_MINOR:6356752.314245179,bounds:new q([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,e=this.R,n=t.lat*i,s=this.R_MINOR/e,o=Math.sqrt(1-s*s),r=o*Math.sin(n),h=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),o/2);return n=-e*Math.log(Math.max(h,1e-10)),new G(t.lng*i*e,n)},unproject:function(t){for(var i,e=180/Math.PI,n=this.R,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),r=Math.exp(-t.y/n),h=Math.PI/2-2*Math.atan(r),a=0,l=.1;a<15&&Math.abs(l)>1e-7;a++)i=o*Math.sin(h),i=Math.pow((1-i)/(1+i),o/2),h+=l=Math.PI/2-2*Math.atan(r*i)-h;return new Q(h*e,t.x*e/n)}},Oe={__proto__:null,LonLat:Se,Mercator:Ae,SphericalMercator:nt},Ee=v({},et,{code:"EPSG:3395",projection:Ae,transformation:function(){var t=.5/(Math.PI*Ae.R);return ot(t,.5,-t,.5)}()}),Ie=v({},et,{code:"EPSG:4326",projection:Se,transformation:ot(1/180,1,-1/180,.5)}),Be=v({},it,{projection:Se,transformation:ot(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(e*e+n*n)},infinite:!0});it.Earth=et,it.EPSG3395=Ee,it.EPSG3857=ht,it.EPSG900913=at,it.EPSG4326=Ie,it.Simple=Be;var Fe=U.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[w(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[w(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i=t.target;if(i.hasLayer(this)){if(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents){var e=this.getEvents();i.on(e,this),this.once("remove",(function(){i.off(e,this)}),this)}this.onAdd(i),this.fire("add"),i.fire("layeradd",{layer:this})}}});se.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=w(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=w(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 w(t)in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){for(var i=0,e=(t=t?A(t)?t:[t]:[]).length;i<e;i++)this.addLayer(t[i])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[w(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var i=w(t);this._zoomBoundLayers[i]&&(delete this._zoomBoundLayers[i],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,i=-1/0,e=this._getZoomSpan();for(var n in this._zoomBoundLayers){var s=this._zoomBoundLayers[n].options;t=void 0===s.minZoom?t:Math.min(t,s.minZoom),i=void 0===s.maxZoom?i:Math.max(i,s.maxZoom)}this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=t===1/0?void 0:t,e!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Re=Fe.extend({initialize:function(t,i){var e,n;if(P(this,i),this._layers={},t)for(e=0,n=t.length;e<n;e++)this.addLayer(t[e])},addLayer:function(t){var i=this.getLayerId(t);return this._layers[i]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var i=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[i]&&this._map.removeLayer(this._layers[i]),delete this._layers[i],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var i,e,n=Array.prototype.slice.call(arguments,1);for(i in this._layers)(e=this._layers[i])[t]&&e[t].apply(e,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return w(t)}}),je=Re.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Re.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),Re.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 X;for(var i in this._layers){var e=this._layers[i];t.extend(e.getBounds?e.getBounds():e.getLatLng())}return t}}),De=H.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){P(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,i){var e=this._getIconUrl(t);if(!e){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(e,i&&"IMG"===i.tagName?i:null);return this._setIconStyles(n,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n},_setIconStyles:function(t,i){var e=this.options,n=e[i+"Size"];"number"==typeof n&&(n=[n,n]);var s=W(n),o=W("shadow"===i&&e.shadowAnchor||e.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+i+" "+(e.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return(i=i||document.createElement("img")).src=t,i},_getIconUrl:function(t){return Wt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Ne=De.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 Ne.imagePath&&(Ne.imagePath=this._detectIconPath()),(this.options.imagePath||Ne.imagePath)+De.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var i=function(t,i,e){var n=i.exec(t);return n&&n[e]};return(t=i(t,/^url\((['"])?(.+)\1\)$/,2))&&i(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=mi("div","leaflet-default-icon-path",document.body),i=vi(t,"background-image")||vi(t,"backgroundImage");if(document.body.removeChild(t),i=this._stripUrl(i))return i;var e=document.querySelector('link[href$="leaflet.css"]');return e?e.href.substring(0,e.href.length-"leaflet.css".length-1):""}}),Ze=ue.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ve(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ki(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&&_i(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var i=this._marker,e=i._map,n=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,o=Si(i._icon),r=e.getPixelBounds(),h=e.getPixelOrigin(),a=J(r.min._subtract(h).add(s),r.max._subtract(h).subtract(s));if(!a.contains(o)){var l=W((Math.max(a.max.x,o.x)-a.max.x)/(r.max.x-a.max.x)-(Math.min(a.min.x,o.x)-a.min.x)/(r.min.x-a.min.x),(Math.max(a.max.y,o.y)-a.max.y)/(r.max.y-a.max.y)-(Math.min(a.min.y,o.y)-a.min.y)/(r.min.y-a.min.y)).multiplyBy(n);e.panBy(l,{animate:!1}),this._draggable._newPos._add(l),this._draggable._startPos._add(l),Ci(i._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=D(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&&(N(this._panRequest),this._panRequest=D(this._adjustPan.bind(this,t)))},_onDrag:function(t){var i=this._marker,e=i._shadow,n=Si(i._icon),s=i._map.layerPointToLatLng(n);e&&Ci(e,n),i._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,i.fire("move",t).fire("drag",t)},_onDragEnd:function(t){N(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),He=Fe.extend({options:{icon:new Ne,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){P(this,i),this._latlng=Y(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=Y(t),this.update(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),e=t.icon.createIcon(this._icon),n=!1;e!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(e.title=t.title),"IMG"===e.tagName&&(e.alt=t.alt||"")),ki(e,i),t.keyboard&&(e.tabIndex="0",e.setAttribute("role","button")),this._icon=e,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Di(e,"focus",this._panOnFocus,this);var s=t.icon.createShadow(this._shadow),o=!1;s!==this._shadow&&(this._removeShadow(),o=!0),s&&(ki(s,i),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Zi(this._icon,"focus",this._panOnFocus,this),gi(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&gi(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Ci(this._icon,t),this._shadow&&Ci(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&&(ki(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ze)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ze(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&&Pi(this._icon,t),this._shadow&&Pi(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var i=this.options.icon.options,e=i.iconSize?W(i.iconSize):W(0,0),n=i.iconAnchor?W(i.iconAnchor):W(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:e.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),$e=Fe.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 P(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)}}),Ue=$e.extend({options:{fill:!0,radius:10},initialize:function(t,i){P(this,i),this._latlng=Y(t),this._radius=this.options.radius},setLatLng:function(t){var i=this._latlng;return this._latlng=Y(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 $e.prototype.setStyle.call(this,t),this.setRadius(i),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,i=this._radiusY||t,e=this._clickTolerance(),n=[t+e,i+e];this._pxBounds=new q(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Ge=Ue.extend({initialize:function(t,i,e){if("number"==typeof i&&(i=v({},e,{radius:i})),P(this,i),this._latlng=Y(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 X(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:$e.prototype.setStyle,_project:function(){var t=this._latlng.lng,i=this._latlng.lat,e=this._map,n=e.options.crs;if(n.distance===et.distance){var s=Math.PI/180,o=this._mRadius/et.R/s,r=e.project([i+o,t]),h=e.project([i-o,t]),a=r.add(h).divideBy(2),l=e.unproject(a).lat,c=Math.acos((Math.cos(o*s)-Math.sin(i*s)*Math.sin(l*s))/(Math.cos(i*s)*Math.cos(l*s)))/s;(isNaN(c)||0===c)&&(c=o/Math.cos(Math.PI/180*i)),this._point=a.subtract(e.getPixelOrigin()),this._radius=isNaN(c)?0:a.x-e.project([l,t-c]).x,this._radiusY=a.y-r.y}else{var u=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=e.latLngToLayerPoint(this._latlng),this._radius=this._point.x-e.latLngToLayerPoint(u).x}this._updateBounds()}}),Ve=$e.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,i){P(this,i),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var i,e,n=1/0,s=null,o=ke,r=0,h=this._parts.length;r<h;r++)for(var a=this._parts[r],l=1,c=a.length;l<c;l++){var u=o(t,i=a[l-1],e=a[l],!0);u<n&&(n=u,s=o(t,i,e))}return s&&(s.distance=Math.sqrt(n)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return ze(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=Y(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new X,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return _e(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],e=_e(t),n=0,s=t.length;n<s;n++)e?(i[n]=Y(t[n]),this._bounds.extend(i[n])):i[n]=this._convertLatLngs(t[n]);return i},_project:function(){var t=new q;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 G(t,t);this._rawPxBounds&&(this._pxBounds=new q([this._rawPxBounds.min.subtract(i),this._rawPxBounds.max.add(i)]))},_projectLatlngs:function(t,i,e){var n,s,o=t.length;if(t[0]instanceof Q){for(s=[],n=0;n<o;n++)s[n]=this._map.latLngToLayerPoint(t[n]),e.extend(s[n]);i.push(s)}else for(n=0;n<o;n++)this._projectLatlngs(t[n],i,e)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var i,e,n,s,o,r,h,a=this._parts;for(i=0,n=0,s=this._rings.length;i<s;i++)for(e=0,o=(h=this._rings[i]).length;e<o-1;e++)(r=we(h[e],h[e+1],t,e,!0))&&(a[n]=a[n]||[],a[n].push(r[0]),r[1]===h[e+1]&&e!==o-2||(a[n].push(r[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,e=0,n=t.length;e<n;e++)t[e]=me(t[e],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var e,n,s,o,r,h,a=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(e=0,o=this._parts.length;e<o;e++)for(n=0,s=(r=(h=this._parts[e]).length)-1;n<r;s=n++)if((i||0!==n)&&ge(t,h[s],h[n])<=a)return!0;return!1}});Ve._flat=Me;var We=Ve.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()");return Le(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var i=Ve.prototype._convertLatLngs.call(this,t),e=i.length;return e>=2&&i[0]instanceof Q&&i[0].equals(i[e-1])&&i.pop(),i},_setLatLngs:function(t){Ve.prototype._setLatLngs.call(this,t),_e(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return _e(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,e=new G(i,i);if(t=new q(t.min.subtract(e),t.max.add(e)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,s=0,o=this._rings.length;s<o;s++)(n=Te(this._rings[s],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,e,n,s,o,r,h,a,l=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,h=this._parts.length;s<h;s++)for(o=0,r=(a=(i=this._parts[s]).length)-1;o<a;r=o++)(e=i[o]).y>t.y!=(n=i[r]).y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(l=!l);return l||Ve.prototype._containsPoint.call(this,t,!0)}}),qe=je.extend({initialize:function(t,i){P(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,s=A(t)?t:t.features;if(s){for(i=0,e=s.length;i<e;i++)((n=s[i]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var r=Je(t,o);return r?(r.feature=nn(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=v({},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 Je(t,i){var e,n,s,o,r="Feature"===t.type?t.geometry:t,h=r?r.coordinates:null,a=[],l=i&&i.pointToLayer,c=i&&i.coordsToLatLng||Ke;if(!h&&!r)return null;switch(r.type){case"Point":return Xe(l,t,e=c(h),i);case"MultiPoint":for(s=0,o=h.length;s<o;s++)e=c(h[s]),a.push(Xe(l,t,e,i));return new je(a);case"LineString":case"MultiLineString":return n=Qe(h,"LineString"===r.type?0:1,c),new Ve(n,i);case"Polygon":case"MultiPolygon":return n=Qe(h,"Polygon"===r.type?1:2,c),new We(n,i);case"GeometryCollection":for(s=0,o=r.geometries.length;s<o;s++){var u=Je({geometry:r.geometries[s],type:"Feature",properties:t.properties},i);u&&a.push(u)}return new je(a);case"FeatureCollection":for(s=0,o=r.features.length;s<o;s++){var f=Je(r.features[s],i);f&&a.push(f)}return new je(a);default:throw new Error("Invalid GeoJSON object.")}}function Xe(t,i,e,n){return t?t(i,e):new He(e,n&&n.markersInheritOptions&&n)}function Ke(t){return new Q(t[1],t[0],t[2])}function Qe(t,i,e){for(var n,s=[],o=0,r=t.length;o<r;o++)n=i?Qe(t[o],i-1,e):(e||Ke)(t[o]),s.push(n);return s}function Ye(t,i){return void 0!==(t=Y(t)).alt?[_(t.lng,i),_(t.lat,i),_(t.alt,i)]:[_(t.lng,i),_(t.lat,i)]}function tn(t,i,e,n){for(var s=[],o=0,r=t.length;o<r;o++)s.push(i?tn(t[o],_e(t[o])?0:i-1,e,n):Ye(t[o],n));return!i&&e&&s.push(s[0]),s}function en(t,i){return t.feature?v({},t.feature,{geometry:i}):nn(i)}function nn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var sn={toGeoJSON:function(t){return en(this,{type:"Point",coordinates:Ye(this.getLatLng(),t)})}};function on(t,i){return new qe(t,i)}He.include(sn),Ge.include(sn),Ue.include(sn),Ve.include({toGeoJSON:function(t){var i=!_e(this._latlngs);return en(this,{type:(i?"Multi":"")+"LineString",coordinates:tn(this._latlngs,i?1:0,!1,t)})}}),We.include({toGeoJSON:function(t){var i=!_e(this._latlngs),e=i&&!_e(this._latlngs[0]),n=tn(this._latlngs,e?2:i?1:0,!0,t);return i||(n=[n]),en(this,{type:(e?"Multi":"")+"Polygon",coordinates:n})}}),Re.include({toMultiPoint:function(t){var i=[];return this.eachLayer((function(e){i.push(e.toGeoJSON(t).geometry.coordinates)})),en(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(t){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===i)return this.toMultiPoint(t);var e="GeometryCollection"===i,n=[];return this.eachLayer((function(i){if(i.toGeoJSON){var s=i.toGeoJSON(t);if(e)n.push(s.geometry);else{var o=nn(s);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}})),e?en(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var rn=on,hn=Fe.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,e){this._url=t,this._bounds=K(i),P(this,e)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ki(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){gi(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&&wi(this._image),this},bringToBack:function(){return this._map&&xi(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=K(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:mi("img");ki(i,"leaflet-image-layer"),this._zoomAnimated&&ki(i,"leaflet-zoom-animated"),this.options.className&&ki(i,this.options.className),i.onselectstart=k,i.onmousemove=k,i.onload=g(this.fire,this,"load"),i.onerror=g(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=i.src:(i.src=this._url,i.alt=this.options.alt)},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Li(this._image,e,i)},_reset:function(){var t=this._image,i=new q(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=i.getSize();Ci(t,i.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){Pi(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()}}),an=hn.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:mi("video");if(ki(i,"leaflet-image-layer"),this._zoomAnimated&&ki(i,"leaflet-zoom-animated"),this.options.className&&ki(i,this.options.className),i.onselectstart=k,i.onmousemove=k,i.onloadeddata=g(this.fire,this,"load"),t){for(var e=i.getElementsByTagName("source"),n=[],s=0;s<e.length;s++)n.push(e[s].src);this._url=e.length>0?n:[i.src]}else{A(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 o=0;o<this._url.length;o++){var r=mi("source");r.src=this._url[o],i.appendChild(r)}}}}),ln=hn.extend({_initImage:function(){var t=this._image=this._url;ki(t,"leaflet-image-layer"),this._zoomAnimated&&ki(t,"leaflet-zoom-animated"),this.options.className&&ki(t,this.options.className),t.onselectstart=k,t.onmousemove=k}}),cn=Fe.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,i){t&&(t instanceof L.LatLng||A(t))?(this._latlng=Y(t),P(this,i)):(P(this,t),this._source=i),this.options.content&&(this._content=this.options.content)},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&&Pi(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Pi(this._container,1),this.bringToFront(),this.options.interactive&&(ki(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Pi(this._container,0),this._removeTimeout=setTimeout(g(gi,void 0,this._container),200)):gi(this._container),this.options.interactive&&(_i(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=Y(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&&wi(this._container),this},bringToBack:function(){return this._map&&xi(this._container),this},_prepareOpen:function(t){var i=this._source;if(!i._map)return!1;if(i instanceof je){i=null;var e=this._source._layers;for(var n in e)if(e[n]._map){i=e[n];break}if(!i)return!1;this._source=i}if(!t)if(i.getCenter)t=i.getCenter();else if(i.getLatLng)t=i.getLatLng();else{if(!i.getBounds)throw new Error("Unable to get source layer LatLng.");t=i.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,i="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof i)t.innerHTML=i;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(i)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),i=W(this.options.offset),e=this._getAnchor();this._zoomAnimated?Ci(this._container,t.add(e)):i=i.add(t).add(e);var n=this._containerBottom=-i.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}});se.include({_initOverlay:function(t,i,e,n){var s=i;return s instanceof t||(s=new t(n).setContent(i)),e&&s.setLatLng(e),s}}),Fe.include({_initOverlay:function(t,i,e,n){var s=e;return s instanceof t?(P(s,n),s._source=this):(s=i&&!n?i:new t(n,this)).setContent(e),s}});var un=cn.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,cn.prototype.openOn.call(this,t)},onAdd:function(t){cn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof $e||this._source.on("preclick",Vi))},onRemove:function(t){cn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof $e||this._source.off("preclick",Vi))},getEvents:function(){var t=cn.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=mi("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),e=this._wrapper=mi("div",t+"-content-wrapper",i);if(this._contentNode=mi("div",t+"-content",e),qi(i),Wi(this._contentNode),Di(i,"contextmenu",Vi),this._tipContainer=mi("div",t+"-tip-container",i),this._tip=mi("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=mi("a",t+"-close-button",i);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">×</span>',Di(n,"click",(function(t){Ji(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var e=t.offsetWidth;e=Math.min(e,this.options.maxWidth),e=Math.max(e,this.options.minWidth),i.width=e+1+"px",i.whiteSpace="",i.height="";var n=this.options.maxHeight,s="leaflet-popup-scrolled";n&&t.offsetHeight>n?(i.height=n+"px",ki(t,s)):_i(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();Ci(this._container,i.add(e))},_adjustPan:function(t){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var i=this._map,e=parseInt(vi(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,s=this._containerWidth,o=new G(this._containerLeft,-n-this._containerBottom);o._add(Si(this._container));var r=i.layerPointToContainerPoint(o),h=W(this.options.autoPanPadding),a=W(this.options.autoPanPaddingTopLeft||h),l=W(this.options.autoPanPaddingBottomRight||h),c=i.getSize(),u=0,f=0;r.x+s+l.x>c.x&&(u=r.x+s-c.x+l.x),r.x-u-a.x<0&&(u=r.x-a.x),r.y+n+l.y>c.y&&(f=r.y+n-c.y+l.y),r.y-f-a.y<0&&(f=r.y-a.y),(u||f)&&i.fire("autopanstart").panBy([u,f],{animate:t&&"moveend"===t.type})}},_getAnchor:function(){return W(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});se.mergeOptions({closePopupOnClick:!0}),se.include({openPopup:function(t,i,e){return this._initOverlay(un,t,i,e).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Fe.include({bindPopup:function(t,i){return this._popup=this._initOverlay(un,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){Xi(t);var i=t.layer||t.target;this._popup._source!==i||i instanceof $e?(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 fn=cn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){cn.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){cn.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=cn.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){this._contentNode=this._container=mi("div","leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide")),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+w(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e,n=this._map,s=this._container,o=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),h=this.options.direction,a=s.offsetWidth,l=s.offsetHeight,c=W(this.options.offset),u=this._getAnchor();"top"===h?(i=a/2,e=l):"bottom"===h?(i=a/2,e=0):"center"===h?(i=a/2,e=l/2):"right"===h?(i=0,e=l/2):"left"===h?(i=a,e=l/2):r.x<o.x?(h="right",i=0,e=l/2):(h="left",i=a+2*(c.x+u.x),e=l/2),t=t.subtract(W(i,e,!0)).add(c).add(u),_i(s,"leaflet-tooltip-right"),_i(s,"leaflet-tooltip-left"),_i(s,"leaflet-tooltip-top"),_i(s,"leaflet-tooltip-bottom"),ki(s,"leaflet-tooltip-"+h),Ci(s,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Pi(this._container,t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(i)},_getAnchor:function(){return W(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});se.include({openTooltip:function(t,i,e){return this._initOverlay(fn,t,i,e).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Fe.include({bindTooltip:function(t,i){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(fn,this._tooltip,t,i),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var i=t?"off":"on",e={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?e.add=this._openTooltip:(e.mouseover=this._openTooltip,e.mouseout=this.closeTooltip,e.click=this._openTooltip,this._map?this._addFocusListeners():e.add=this._addFocusListeners),this._tooltip.options.sticky&&(e.mousemove=this._moveTooltip),this[i](e),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this)),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},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){Di(t.getElement(),"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),Di(t.getElement(),"blur",this.closeTooltip,this)},_setAriaDescribedByOnLayer:function(t){t.getElement().setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){!this._tooltip||!this._map||this._map.dragging&&this._map.dragging.moving()||(this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0))},_moveTooltip:function(t){var i,e,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),e=this._map.containerPointToLayerPoint(i),n=this._map.layerPointToLatLng(e)),this._tooltip.setLatLng(n)}});var dn=De.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:document.createElement("div"),e=this.options;if(e.html instanceof Element?(bi(i),i.appendChild(e.html)):i.innerHTML=!1!==e.html?e.html:"",e.bgPos){var n=W(e.bgPos);i.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}});De.Default=Ne;var pn=Fe.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Wt.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){P(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),gi(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(wi(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(xi(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=x(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 G?t:new G(t,t)},_updateZIndex:function(){this._container&&null!=this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var i,e=this.getPane().children,n=-t(-1/0,1/0),s=0,o=e.length;s<o;s++)i=e[s].style.zIndex,e[s]!==this._container&&i&&(n=t(n,+i));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Wt.ielt9){Pi(this._container,this.options.opacity);var t=+new Date,i=!1,e=!1;for(var n in this._tiles){var s=this._tiles[n];if(s.current&&s.loaded){var o=Math.min(1,(t-s.loaded)/200);Pi(s.el,o),o<1?i=!0:(s.active?e=!0:this._onOpaqueTile(s),s.active=!0)}}e&&!this._noPrune&&this._pruneTiles(),i&&(N(this._fadeFrame),this._fadeFrame=D(this._updateOpacity,this))}},_onOpaqueTile:k,_initContainer:function(){this._container||(this._container=mi("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,i=this.options.maxZoom;if(void 0!==t){for(var e in this._levels)e=Number(e),this._levels[e].el.children.length||e===t?(this._levels[e].el.style.zIndex=i-Math.abs(t-e),this._onUpdateLevel(e)):(gi(this._levels[e].el),this._removeTilesAtZoom(e),this._onRemoveLevel(e),delete this._levels[e]);var n=this._levels[t],s=this._map;return n||((n=this._levels[t]={}).el=mi("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=i,n.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,s.getCenter(),s.getZoom()),this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:k,_onRemoveLevel:k,_onCreateLevel:k,_pruneTiles:function(){if(this._map){var t,i,e=this._map.getZoom();if(e>this.options.maxZoom||e<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(i=this._tiles[t]).retain=i.current;for(t in this._tiles)if((i=this._tiles[t]).current&&!i.active){var n=i.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var i in this._tiles)this._tiles[i].coords.z===t&&this._removeTile(i)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)gi(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,i,e,n){var s=Math.floor(t/2),o=Math.floor(i/2),r=e-1,h=new G(+s,+o);h.z=+r;var a=this._tileCoordsToKey(h),l=this._tiles[a];return l&&l.active?(l.retain=!0,!0):(l&&l.loaded&&(l.retain=!0),r>n&&this._retainParent(s,o,r,n))},_retainChildren:function(t,i,e,n){for(var s=2*t;s<2*t+2;s++)for(var o=2*i;o<2*i+2;o++){var r=new G(s,o);r.z=e+1;var h=this._tileCoordsToKey(r),a=this._tiles[h];a&&a.active?a.retain=!0:(a&&a.loaded&&(a.retain=!0),e+1<n&&this._retainChildren(s,o,e+1,n))}},_resetView:function(t){var i=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var i=this.options;return void 0!==i.minNativeZoom&&t<i.minNativeZoom?i.minNativeZoom:void 0!==i.maxNativeZoom&&i.maxNativeZoom<t?i.maxNativeZoom:t},_setView:function(t,i,e,n){var s=Math.round(i);s=void 0!==this.options.maxZoom&&s>this.options.maxZoom||void 0!==this.options.minZoom&&s<this.options.minZoom?void 0:this._clampZoom(s),n&&!(this.options.updateWhenZooming&&s!==this._tileZoom)||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&this._update(t),e||this._pruneTiles(),this._noPrune=!!e),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var e in this._levels)this._setZoomTransform(this._levels[e],t,i)},_setZoomTransform:function(t,i,e){var n=this._map.getZoomScale(e,t.zoom),s=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(i,e)).round();Wt.any3d?Li(t.el,s,n):Ci(t.el,s)},_resetGrid:function(){var t=this._map,i=t.options.crs,e=this._tileSize=this.getTileSize(),n=this._tileZoom,s=this._map.getPixelWorldBounds(this._tileZoom);s&&(this._globalTileRange=this._pxBoundsToTileRange(s)),this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,i.wrapLng[0]],n).x/e.x),Math.ceil(t.project([0,i.wrapLng[1]],n).x/e.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],n).y/e.x),Math.ceil(t.project([i.wrapLat[1],0],n).y/e.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,e=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),n=i.getZoomScale(e,this._tileZoom),s=i.project(t,this._tileZoom).floor(),o=i.getSize().divideBy(2*n);return new q(s.subtract(o),s.add(o))},_update:function(t){var i=this._map;if(i){var e=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(n),o=s.getCenter(),r=[],h=this.options.keepBuffer,a=new q(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 l in this._tiles){var c=this._tiles[l].coords;c.z===this._tileZoom&&a.contains(new G(c.x,c.y))||(this._tiles[l].current=!1)}if(Math.abs(e-this._tileZoom)>1)this._setView(t,e);else{for(var u=s.min.y;u<=s.max.y;u++)for(var f=s.min.x;f<=s.max.x;f++){var d=new G(f,u);if(d.z=this._tileZoom,this._isValidTile(d)){var p=this._tiles[this._tileCoordsToKey(d)];p?p.current=!0:r.push(d)}}if(r.sort((function(t,i){return t.distanceTo(o)-i.distanceTo(o)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var v=document.createDocumentFragment();for(f=0;f<r.length;f++)this._addTile(r[f],v);this._level.el.appendChild(v)}}}}},_isValidTile:function(t){var i=this._map.options.crs;if(!i.infinite){var e=this._globalTileRange;if(!i.wrapLng&&(t.x<e.min.x||t.x>e.max.x)||!i.wrapLat&&(t.y<e.min.y||t.y>e.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return K(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),s=n.add(e);return[i.unproject(n,t.z),i.unproject(s,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new X(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new G(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(gi(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ki(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=k,t.onmousemove=k,Wt.ielt9&&this.options.opacity<1&&Pi(t,this.options.opacity)},_addTile:function(t,i){var e=this._getTilePos(t),n=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),g(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&D(g(this._tileReady,this,t,null,s)),Ci(s,e),this._tiles[n]={el:s,coords:t,current:!0},i.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var n=this._tileCoordsToKey(t);(e=this._tiles[n])&&(e.loaded=+new Date,this._map._fadeAnimated?(Pi(e.el,0),N(this._fadeFrame),this._fadeFrame=D(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(ki(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Wt.ielt9||!this._map._fadeAnimated?D(this._pruneTiles,this):setTimeout(g(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new G(this._wrapX?y(t.x,this._wrapX):t.x,this._wrapY?y(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new q(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}}),vn=pn.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=P(this,i)).detectRetina&&Wt.retina&&i.maxZoom>0?(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom=Math.min(i.maxZoom,i.minZoom+1)):(i.zoomOffset++,i.maxZoom=Math.max(i.minZoom,i.maxZoom-1)),i.minZoom=Math.max(0,i.minZoom)):i.zoomReverse?i.minZoom=Math.min(i.maxZoom,i.minZoom):i.maxZoom=Math.max(i.minZoom,i.maxZoom),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url===t&&void 0===i&&(i=!0),this._url=t,i||this.redraw(),this},createTile:function(t,i){var e=document.createElement("img");return Di(e,"load",g(this._tileOnLoad,this,i,e)),Di(e,"error",g(this._tileOnError,this,i,e)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(e.referrerPolicy=this.options.referrerPolicy),e.alt="",e.src=this.getTileUrl(t),e},getTileUrl:function(t){var i={r:Wt.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&&(i.y=e),i["-y"]=e}return S(this._url,v(i,this.options))},_tileOnLoad:function(t,i){Wt.ielt9?setTimeout(g(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var n=this.options.errorTileUrl;n&&i.getAttribute("src")!==n&&(i.src=n),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom;return this.options.zoomReverse&&(t=this.options.maxZoom-t),t+this.options.zoomOffset},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=k,i.onerror=k,!i.complete)){i.src=E;var e=this._tiles[t].coords;gi(i),delete this._tiles[t],this.fire("tileabort",{tile:i,coords:e})}},_removeTile:function(t){var i=this._tiles[t];if(i)return i.el.setAttribute("src",E),pn.prototype._removeTile.call(this,t)},_tileReady:function(t,i,e){if(this._map&&(!e||e.getAttribute("src")!==E))return pn.prototype._tileReady.call(this,t,i,e)}});function mn(t,i){return new vn(t,i)}var gn=vn.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,i){this._url=t;var e=v({},this.defaultWmsParams);for(var n in i)n in this.options||(e[n]=i[n]);var s=(i=P(this,i)).detectRetina&&Wt.retina?2:1,o=this.getTileSize();e.width=o.x*s,e.height=o.y*s,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,vn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),e=this._crs,n=J(e.project(i[0]),e.project(i[1])),s=n.min,o=n.max,r=(this._wmsVersion>=1.3&&this._crs===Ie?[s.y,s.x,o.y,o.x]:[s.x,s.y,o.x,o.y]).join(","),h=vn.prototype.getTileUrl.call(this,t);return h+T(this.wmsParams,h,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,i){return v(this.wmsParams,t),i||this.redraw(),this}});vn.WMS=gn,mn.wms=function(t,i){return new gn(t,i)};var bn=Fe.extend({options:{padding:.1},initialize:function(t){P(this,t),w(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ki(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var e=this._map.getZoomScale(i,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,i),o=n.multiplyBy(-e).add(s).subtract(this._map._getNewPixelOrigin(t,i));Wt.any3d?Li(this._container,o,e):Ci(this._container,o)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new q(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),wn=bn.extend({options:{tolerance:0},getEvents:function(){var t=bn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){bn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Di(t,"mousemove",this._onMouseMove,this),Di(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Di(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){N(this._redrawRequest),delete this._ctx,gi(this._container),Zi(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){bn.prototype._update.call(this);var t=this._bounds,i=this._container,e=t.getSize(),n=Wt.retina?2:1;Ci(i,t.min),i.width=n*e.x,i.height=n*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",Wt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){bn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[w(t)]=t;var i=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,n=i.prev;e?e.prev=n:this._drawLast=n,n?n.next=e:this._drawFirst=e,delete t._order,delete this._layers[w(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var i,e,n=t.options.dashArray.split(/[, ]+/),s=[];for(e=0;e<n.length;e++){if(i=Number(n[e]),isNaN(i))return;s.push(i)}t.options._dashArray=s}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||D(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var i=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new q,this._redrawBounds.extend(t._pxBounds.min.subtract([i,i])),this._redrawBounds.extend(t._pxBounds.max.add([i,i]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var i=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,i.x,i.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,i=this._redrawBounds;if(this._ctx.save(),i){var e=i.getSize();this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,e.x,e.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,i){if(this._drawing){var e,n,s,o,r=t._parts,h=r.length,a=this._ctx;if(h){for(a.beginPath(),e=0;e<h;e++){for(n=0,s=r[e].length;n<s;n++)a[n?"lineTo":"moveTo"]((o=r[e][n]).x,o.y);i&&a.closePath()}this._fillStroke(a,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var i=t._point,e=this._ctx,n=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==s&&(e.save(),e.scale(1,s)),e.beginPath(),e.arc(i.x,i.y/s,n,0,2*Math.PI,!1),1!==s&&e.restore(),this._fillStroke(e,t)}},_fillStroke:function(t,i){var e=i.options;e.fill&&(t.globalAlpha=e.fillOpacity,t.fillStyle=e.fillColor||e.color,t.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=e.opacity,t.lineWidth=e.weight,t.strokeStyle=e.color,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.stroke())},_onClick:function(t){for(var i,e,n=this._map.mouseEventToLayerPoint(t),s=this._drawFirst;s;s=s.next)(i=s.layer).options.interactive&&i._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(i))&&(e=i);this._fireEvent(!!e&&[e],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var i=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,i)}},_handleMouseOut:function(t){var i=this._hoveredLayer;i&&(_i(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,i){if(!this._mouseHoverThrottled){for(var e,n,s=this._drawFirst;s;s=s.next)(e=s.layer).options.interactive&&e._containsPoint(i)&&(n=e);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(ki(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(g((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,i,e){this._map._fireDOMEvent(i,e||i.type,t)},_bringToFront:function(t){var i=t._order;if(i){var e=i.next,n=i.prev;e&&(e.prev=n,n?n.next=e:e&&(this._drawFirst=e),i.prev=this._drawLast,this._drawLast.next=i,i.next=null,this._drawLast=i,this._requestRedraw(t))}},_bringToBack:function(t){var i=t._order;if(i){var e=i.next,n=i.prev;n&&(n.next=e,e?e.prev=n:n&&(this._drawLast=n),i.prev=null,i.next=this._drawFirst,this._drawFirst.prev=i,this._drawFirst=i,this._requestRedraw(t))}}});function xn(t){return Wt.canvas?new wn(t):null}var yn=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">')}}(),kn={_initContainer:function(){this._container=mi("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(bn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=yn("shape");ki(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=yn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[w(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;gi(i),t.removeInteractiveTarget(i),delete this._layers[w(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(i||(i=t._stroke=yn("stroke")),s.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,i.dashStyle=n.dashArray?A(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):"",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(s.removeChild(i),t._stroke=null),n.fill?(e||(e=t._fill=yn("fill")),s.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(s.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){wi(t._container)},_bringToBack:function(t){xi(t._container)}},_n=Wt.vml?yn:lt,Mn=bn.extend({_initContainer:function(){this._container=_n("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=_n("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){gi(this._container),Zi(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){bn.prototype._update.call(this);var t=this._bounds,i=t.getSize(),e=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),Ci(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=_n("path");t.options.className&&ki(i,t.options.className),t.options.interactive&&ki(i,"leaflet-interactive"),this._updateStyle(t),this._layers[w(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){gi(t._path),t.removeInteractiveTarget(t._path),delete this._layers[w(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,ct(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,s)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){wi(t._path)},_bringToBack:function(t){xi(t._path)}});function zn(t){return Wt.svg||Wt.vml?new Mn(t):null}Wt.vml&&Mn.include(kn),se.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&&xn(t)||zn(t)}});var Pn=We.extend({initialize:function(t,i){We.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=K(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Mn.create=_n,Mn.pointsToPath=ct,qe.geometryToLayer=Je,qe.coordsToLatLng=Ke,qe.coordsToLatLngs=Qe,qe.latLngToCoords=Ye,qe.latLngsToCoords=tn,qe.getFeature=en,qe.asFeature=nn,se.mergeOptions({boxZoom:!0});var Tn=ue.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(){Di(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Zi(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){gi(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(),ri(),Oi(),this._startPoint=this._map.mouseEventToContainerPoint(t),Di(document,{contextmenu:Xi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=mi("div","leaflet-zoom-box",this._container),ki(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new q(this._point,this._startPoint),e=i.getSize();Ci(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(gi(this._box),_i(this._container,"leaflet-crosshair")),hi(),Ei(),Zi(document,{contextmenu:Xi,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(g(this._resetState,this),0);var i=new X(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())}});se.addInitHook("addHandler","boxZoom",Tn),se.mergeOptions({doubleClickZoom:!0});var Ln=ue.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,s=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(s):i.setZoomAround(t.containerPoint,s)}});se.addInitHook("addHandler","doubleClickZoom",Ln),se.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Cn=ue.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ve(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))}ki(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_i(this._map._container,"leaflet-grab"),_i(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=K(this._map.options.maxBounds);this._offsetLimit=J(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(i),this._prunePositions(i)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit;t.x<i.min.x&&(t.x=this._viscousLimit(t.x,i.min.x)),t.y<i.min.y&&(t.y=this._viscousLimit(t.y,i.min.y)),t.x>i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,s=(n-i+e)%t+i-e,o=(n+i+e)%t-i-e,r=Math.abs(s+e)<Math.abs(o+e)?s:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var i=this._map,e=i.options,n=!e.inertia||t.noInertia||this._times.length<2;if(i.fire("dragend",t),n)i.fire("moveend");else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),o=e.easeLinearity,r=s.multiplyBy(o/((this._lastTime-this._times[0])/1e3)),h=r.distanceTo([0,0]),a=Math.min(e.inertiaMaxSpeed,h),l=r.multiplyBy(a/h),c=a/(e.inertiaDeceleration*o),u=l.multiplyBy(-c/2).round();u.x||u.y?(u=i._limitOffset(u,i.options.maxBounds),D((function(){i.panBy(u,{duration:c,easeLinearity:o,noMoveStart:!0,animate:!0})}))):i.fire("moveend")}}});se.addInitHook("addHandler","dragging",Cn),se.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Sn=ue.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"),Di(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(),Zi(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,i=document.documentElement,e=t.scrollTop||i.scrollTop,n=t.scrollLeft||i.scrollLeft;this._map._container.focus(),window.scrollTo(n,e)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var i,e,n=this._panKeys={},s=this.keyCodes;for(i=0,e=s.left.length;i<e;i++)n[s.left[i]]=[-1*t,0];for(i=0,e=s.right.length;i<e;i++)n[s.right[i]]=[t,0];for(i=0,e=s.down.length;i<e;i++)n[s.down[i]]=[0,t];for(i=0,e=s.up.length;i<e;i++)n[s.up[i]]=[0,-1*t]},_setZoomDelta:function(t){var i,e,n=this._zoomKeys={},s=this.keyCodes;for(i=0,e=s.zoomIn.length;i<e;i++)n[s.zoomIn[i]]=t;for(i=0,e=s.zoomOut.length;i<e;i++)n[s.zoomOut[i]]=-t},_addHooks:function(){Di(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Zi(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var i,e=t.keyCode,n=this._map;if(e in this._panKeys)n._panAnim&&n._panAnim._inProgress||(i=this._panKeys[e],t.shiftKey&&(i=W(i).multiplyBy(3)),n.panBy(i),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(e in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if(27!==e||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Xi(t)}}});se.addInitHook("addHandler","keyboard",Sn),se.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var An=ue.extend({addHooks:function(){Di(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Zi(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var i=te(t),e=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(e-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(g(this._performZoom,this),n),Xi(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),e=this._map.options.zoomSnap||0;t._stop();var n=4*Math.log(2/(1+Math.exp(-Math.abs(this._delta/(4*this._map.options.wheelPxPerZoomLevel)))))/Math.LN2,s=e?Math.ceil(n/e)*e:n,o=t._limitZoom(i+(this._delta>0?s:-s))-i;this._delta=0,this._startTime=null,o&&("center"===t.options.scrollWheelZoom?t.setZoom(i+o):t.setZoomAround(this._lastMousePos,i+o))}});se.addInitHook("addHandler","scrollWheelZoom",An),se.mergeOptions({tapHold:Wt.touchNative&&Wt.safari&&Wt.mobile,tapTolerance:15});var On=ue.extend({addHooks:function(){Di(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Zi(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 G(i.clientX,i.clientY),this._holdTimeout=setTimeout(g((function(){this._cancel(),this._isTapValid()&&(Di(document,"touchend",Ji),Di(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",i))}),this),600),Di(document,"touchend touchcancel contextmenu",this._cancel,this),Di(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Zi(document,"touchend",Ji),Zi(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Zi(document,"touchend touchcancel contextmenu",this._cancel,this),Zi(document,"touchmove",this._onMove,this)},_onMove:function(t){var i=t.touches[0];this._newPos=new G(i.clientX,i.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,i){var e=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY});e._simulated=!0,i.target.dispatchEvent(e)}});se.addInitHook("addHandler","tapHold",On),se.mergeOptions({touchZoom:Wt.touch,bounceAtZoomLimits:!0});var En=ue.extend({addHooks:function(){ki(this._map._container,"leaflet-touch-zoom"),Di(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){_i(this._map._container,"leaflet-touch-zoom"),Zi(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(e.add(n)._divideBy(2))),this._startDist=e.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),Di(document,"touchmove",this._onTouchMove,this),Di(document,"touchend touchcancel",this._onTouchEnd,this),Ji(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]),s=e.distanceTo(n)/this._startDist;if(this._zoom=i.getScaleZoom(s,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&s<1||this._zoom>i.getMaxZoom()&&s>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var o=e._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===o.x&&0===o.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(o),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),N(this._animRequest);var r=g(i._move,i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=D(r,this,!0),Ji(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,N(this._animRequest),Zi(document,"touchmove",this._onTouchMove,this),Zi(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}});se.addInitHook("addHandler","touchZoom",En),se.BoxZoom=Tn,se.DoubleClickZoom=Ln,se.Drag=Cn,se.Keyboard=Sn,se.ScrollWheelZoom=An,se.TapHold=On,se.TouchZoom=En;var In=v({__proto__:null,version:"1.9.1",Control:oe,control:re,Class:H,Handler:ue,extend:v,bind:g,stamp:w,setOptions:P,Browser:Wt,Evented:U,Mixin:de,Util:Z,PosAnimation:ne,Draggable:ve,DomEvent:ee,DomUtil:ji,Point:G,point:W,Bounds:q,bounds:J,Transformation:st,transformation:ot,LineUtil:Pe,PolyUtil:Ce,LatLng:Q,latLng:Y,LatLngBounds:X,latLngBounds:K,CRS:it,Projection:Oe,Layer:Fe,LayerGroup:Re,layerGroup:function(t,i){return new Re(t,i)},FeatureGroup:je,featureGroup:function(t,i){return new je(t,i)},ImageOverlay:hn,imageOverlay:function(t,i,e){return new hn(t,i,e)},VideoOverlay:an,videoOverlay:function(t,i,e){return new an(t,i,e)},SVGOverlay:ln,svgOverlay:function(t,i,e){return new ln(t,i,e)},DivOverlay:cn,Popup:un,popup:function(t,i){return new un(t,i)},Tooltip:fn,tooltip:function(t,i){return new fn(t,i)},icon:function(t){return new De(t)},DivIcon:dn,divIcon:function(t){return new dn(t)},Marker:He,marker:function(t,i){return new He(t,i)},Icon:De,GridLayer:pn,gridLayer:function(t){return new pn(t)},TileLayer:vn,tileLayer:mn,Renderer:bn,Canvas:wn,canvas:xn,Path:$e,CircleMarker:Ue,circleMarker:function(t,i){return new Ue(t,i)},Circle:Ge,circle:function(t,i,e){return new Ge(t,i,e)},Polyline:Ve,polyline:function(t,i){return new Ve(t,i)},Polygon:We,polygon:function(t,i){return new We(t,i)},Rectangle:Pn,rectangle:function(t,i){return new Pn(t,i)},SVG:Mn,svg:zn,GeoJSON:qe,geoJSON:on,geoJson:rn,Map:se,map:function(t,i){return new se(t,i)}},{noConflict:function(){return Bn.L=Fn,In}}),Bn=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}(),Fn=Bn.L;Bn.L=In;const Rn=class{constructor(i){t(this,i),this.trekCardPress=n(this,"trekCardPress",7),this.mapIsReady=!1,this.center="1, 1",this.zoom=10,this.colorPrimary="#6b0030",this.colorPrimaryTint="#974c6e",this.colorTrekLine="#6b0030",this.colorDepartureIcon="#006b3b",this.colorArrivalIcon="#85003b",this.colorSensitiveArea="\t#4974a5",this.colorPoiIcon="#974c6e",this.resetStoreOnDisconnected=!0,this.handleTreksWithinBoundsBind=this.handleTreksWithinBounds.bind(this)}componentDidLoad(){this.map=In.map(this.element,{center:this.center.split(",").map(Number),zoom:this.zoom}),In.control.scale().addTo(this.map),In.tileLayer(this.urlLayer,{maxZoom:19,attribution:this.attribution}).addTo(this.map),o.currentTrek?this.addTrek():o.currentTreks&&this.addTreks(),r("currentTreks",(()=>{o.currentTrek?(this.removeTreks(),this.addTrek()):o.currentTreks&&(this.removeTrek(),this.addTreks())})),r("currentTrek",(()=>{o.currentTrek?(this.removeTreks(),this.addTrek()):(this.removeTrek(),this.addTreks())}))}addTreks(){var t;const i=[],e={type:"FeatureCollection",features:[]};if(o.currentTreks)for(const n of o.currentTreks)i.push(n.departure_geom),e.features.push({type:"Feature",geometry:{type:"Point",coordinates:n.departure_geom},properties:{id:n.id,name:n.name,practice:null===(t=o.practices.find((t=>t.id===n.practice)))||void 0===t?void 0:t.pictogram,imgSrc:n.attachments&&n.attachments.length>0&&n.attachments[0].thumbnail}});if(this.treksLayer){if(i.length>0){const t=In.latLngBounds(i.map((t=>[t[1],t[0]])));this.map.fitBounds(t)}else this.map.fire("moveend");this.treksLayer.clearLayers(),this.treksLayer.addData(e)}else{if(i.length>0&&!o.currentMapTreksBounds){const t=In.latLngBounds(i.map((t=>[t[1],t[0]])));this.map.fitBounds(t)}else o.currentMapTreksBounds&&this.map.fitBounds(o.currentMapTreksBounds);this.treksLayer=In.geoJSON(e,{pointToLayer:(t,i)=>In.marker(i,{icon:In.divIcon({html:t.properties.practice?`<img src=${t.properties.practice} />`:"<img />",className:"trek-marker",iconSize:48}),autoPanOnFocus:!1}),onEachFeature:(t,i)=>{i.once("click",(()=>{const e=In.DomUtil.create("div");e.className="trek-departure-popup",e.onclick=()=>this.trekCardPress.emit(t.properties.id);const n=In.DomUtil.create("div");if(n.innerHTML=t.properties.name,n.className="trek-name",t.properties.imgSrc){n.className+=" trek-name-margin-top";const i=In.DomUtil.create("img");i.src=t.properties.imgSrc,e.appendChild(i)}e.appendChild(n),i.bindPopup(e,{interactive:!0,autoPan:!1,closeButton:!1}).openPopup()}))}}).addTo(this.map)}!this.mapIsReady&&(this.mapIsReady=!this.mapIsReady),this.map.on("moveend",this.handleTreksWithinBoundsBind)}removeTreks(){this.treksLayer&&(o.currentMapTreksBounds=this.map.getBounds(),this.map.removeLayer(this.treksLayer),this.treksLayer=null,this.map.off("moveend",this.handleTreksWithinBoundsBind))}handleTreksWithinBounds(){(o.currentTreks&&!o.currentMapTreksBounds||o.currentTreks&&o.currentMapTreksBounds&&o.currentMapTreksBounds.toBBoxString()!==this.map.getBounds().toBBoxString())&&(o.treksWithinBounds=o.currentTreks.filter((t=>this.map.getBounds().contains(In.latLng(t.departure_geom[1],t.departure_geom[0])))))}addTrek(){var t;this.currentTrekLayer=In.geoJSON({type:"Feature",geometry:o.currentTrek.geometry,properties:{}},{style:()=>({color:this.colorTrekLine}),interactive:!1}).addTo(this.map);const i=In.latLngBounds(o.currentTrek.geometry.coordinates.map((t=>[t[1],t[0]])));this.map.fitBounds(i);const e=[o.currentTrek.geometry.coordinates.at(0)[0],o.currentTrek.geometry.coordinates.at(0)[1]],n=[o.currentTrek.geometry.coordinates.at(-1)[0],o.currentTrek.geometry.coordinates.at(-1)[1]],s={type:"FeatureCollection",features:[{type:"Feature",properties:{type:"departure"},geometry:{type:"Point",coordinates:e}}]};if(e[0]===n[0]&&e[1]===n[1]||s.features.push({type:"Feature",properties:{type:"arrival"},geometry:{type:"Point",coordinates:n}}),this.currentDepartureArrivalLayer=In.geoJSON(s,{pointToLayer:(t,i)=>In.marker(i,{icon:In.divIcon({html:'<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><path d="M80,464V68.14a8,8,0,0,1,4-6.9C91.81,56.66,112.92,48,160,48c64,0,145,48,192,48a199.53,199.53,0,0,0,77.23-15.77A2,2,0,0,1,432,82.08V301.44a4,4,0,0,1-2.39,3.65C421.37,308.7,392.33,320,352,320c-48,0-128-32-192-32s-80,16-80,16" style=";fill:#ffffff;stroke:currentColor;stroke-linecap:round;stroke-miterlimit:10;stroke-width:32px"/></svg>',className:"departure"===t.properties.type?"departure-icon":"arrival-icon",iconSize:48,iconAnchor:[0,48]}),autoPanOnFocus:!1,interactive:!1})}).addTo(this.map),o.currentTrek.parking_location&&(this.currentParkingLayer=In.geoJSON({type:"Feature",properties:{},geometry:{type:"Point",coordinates:o.currentTrek.parking_location}},{pointToLayer:(t,i)=>In.marker(i,{icon:In.divIcon({html:"<div>P</div>",className:"parking-icon",iconSize:48,iconAnchor:[0,48]}),autoPanOnFocus:!1,interactive:!1})}).addTo(this.map)),o.currentSensitiveAreas&&o.currentSensitiveAreas.length>0){const t={type:"FeatureCollection",features:[]};for(const i of o.currentSensitiveAreas)t.features.push({type:"Feature",properties:{name:i.name},geometry:i.geometry});this.currentSensitiveAreasLayer=In.geoJSON(t,{onEachFeature:(t,i)=>{i.once("mouseover",(()=>{const e=In.DomUtil.create("div");e.className="sensitive-area-tooltip";const n=In.DomUtil.create("div");n.innerHTML=t.properties.name,n.className="sensitive-area-name",e.appendChild(n),i.bindTooltip(e).openTooltip()}))},style:()=>({color:this.colorSensitiveArea})}).addTo(this.map),In.Control.SensitiveAreasCheckboxContainer=In.Control.extend({onAdd:()=>{const i=In.DomUtil.create("div");i.className="sensitiveAreasCheckboxContainer";const e=In.DomUtil.create("input");e.setAttribute("id","sensitiveAreasCheckbox"),e.setAttribute("type","checkbox"),e.setAttribute("checked","true"),e.onclick=t=>t.composedPath()[0].checked?this.map.addLayer(this.currentSensitiveAreasLayer):this.map.removeLayer(this.currentSensitiveAreasLayer);const n=In.DomUtil.create("label");return n.setAttribute("for","sensitiveAreasCheckbox"),n.innerHTML=t.features.length>1||"MultiPolygon"===t.features[0].geometry.type?"Afficher les zones sensibles":"Afficher la zone sensible",i.appendChild(e),i.appendChild(n),i}}),In.control.sensitiveAreasCheckboxContainer=()=>new In.Control.SensitiveAreasCheckboxContainer,this.sensitiveAreasControl=In.control.sensitiveAreasCheckboxContainer({position:"topright"}).addTo(this.map)}if(o.currentPois&&o.currentPois.length>0){const i={type:"FeatureCollection",features:[]};for(const e of o.currentPois)i.features.push({type:"Feature",properties:{name:e.name,type_pictogram:null===(t=o.poiTypes.find((t=>t.id===e.type)))||void 0===t?void 0:t.pictogram},geometry:e.geometry});this.currentPoisLayer=In.geoJSON(i,{pointToLayer:(t,i)=>In.marker(i,{icon:In.divIcon({html:t.properties.type_pictogram?`<img src=${t.properties.type_pictogram} />`:"<img />",className:"poi-icon",iconSize:48}),autoPanOnFocus:!1}),onEachFeature:(t,i)=>{i.once("mouseover",(()=>{const e=In.DomUtil.create("div");e.className="poi-tooltip";const n=In.DomUtil.create("div");n.innerHTML=t.properties.name,n.className="poi-name",e.appendChild(n),i.bindTooltip(e).openTooltip()}))}}).addTo(this.map)}if(o.currentInformationDesks&&o.currentInformationDesks.length>0){const t={type:"FeatureCollection",features:[]};for(const i of o.currentInformationDesks)t.features.push({type:"Feature",properties:{name:i.name,type_pictogram:i.type.pictogram},geometry:{type:"Point",coordinates:[Number(i.longitude),Number(i.latitude)]}});this.currentInformationDesksLayer=In.geoJSON(t,{pointToLayer:(t,i)=>In.marker(i,{icon:In.divIcon({html:t.properties.type_pictogram?`<img src=${t.properties.type_pictogram} />`:"<img />",className:"information-desks-icon",iconSize:48}),autoPanOnFocus:!1}),onEachFeature:(t,i)=>{i.once("mouseover",(()=>{const e=In.DomUtil.create("div");e.className="information-desks-tooltip";const n=In.DomUtil.create("div");n.innerHTML=t.properties.name,n.className="information-desks-name",e.appendChild(n),i.bindTooltip(e).openTooltip()}))}}).addTo(this.map)}if(o.currentTrek.points_reference){const t={type:"FeatureCollection",features:[]};t.features.push({type:"Feature",properties:{},geometry:o.currentTrek.points_reference});let i=0;this.currentPointsReferenceLayer=In.geoJSON(t,{pointToLayer:(t,e)=>(i+=1,In.marker(e,{icon:In.divIcon({html:i,className:"point-reference-icon",iconSize:24}),autoPanOnFocus:!1,interactive:!1}))}).addTo(this.map)}!this.mapIsReady&&(this.mapIsReady=!this.mapIsReady)}removeTrek(){this.currentTrekLayer&&(this.map.removeLayer(this.currentTrekLayer),this.currentTrekLayer=null),this.currentDepartureArrivalLayer&&(this.map.removeLayer(this.currentDepartureArrivalLayer),this.currentDepartureArrivalLayer=null),this.currentParkingLayer&&(this.map.removeLayer(this.currentParkingLayer),this.currentParkingLayer=null),this.currentSensitiveAreasLayer&&(this.map.removeLayer(this.currentSensitiveAreasLayer),this.currentSensitiveAreasLayer=null,this.map.removeControl(this.sensitiveAreasControl),this.sensitiveAreasControl=null),this.currentPoisLayer&&(this.map.removeLayer(this.currentPoisLayer),this.currentPoisLayer=null),this.currentInformationDesksLayer&&(this.map.removeLayer(this.currentInformationDesksLayer),this.currentInformationDesksLayer=null),this.currentPointsReferenceLayer&&(this.map.removeLayer(this.currentPointsReferenceLayer),this.currentPointsReferenceLayer=null)}disconnectedCallback(){this.resetStoreOnDisconnected&&h()}render(){return i(e,{style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint,"--color-departure-icon":this.colorDepartureIcon,"--color-arrival-icon":this.colorArrivalIcon,"--color-poi-icon":this.colorPoiIcon}},!this.mapIsReady&&i("div",{class:"map-loader-container"},i("span",{class:"loader"})))}get element(){return s(this)}};Rn.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;-ms-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.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{-webkit-filter:inherit;filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;-webkit-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:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1), -webkit-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{-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.65);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{-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.4);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-attribution-flag{display:inline !important;vertical-align:baseline !important;width:1em;height:0.6669em}.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;-webkit-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{-webkit-box-shadow:none;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;-webkit-box-shadow:0 3px 14px rgba(0,0,0,0.4);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}.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;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.4);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;print-color-adjust:exact}}grw-map{font-family:"Roboto";display:block;height:100%;max-height:100vh}.departure-icon svg,.arrival-icon svg{width:48px;height:48px}.departure-icon svg path,.arrival-icon svg path{fill:currentColor;stroke:currentColor}.departure-icon{color:var(--color-departure-icon)}.arrival-icon{color:var(--color-arrival-icon)}.trek-marker{background-color:var(--color-primary);border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.trek-marker img{width:36px !important}.map-loader-container{position:absolute;z-index:500;width:100%;height:100%;background:rgba(255, 255, 255, 0.5);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.map-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:rotation 1s linear infinite;animation:rotation 1s linear infinite}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.leaflet-popup-content{width:144px;margin:0}.trek-departure-popup{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100px;height:auto;padding:24px}.trek-departure-popup img{border-radius:8px;-webkit-box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-departure-popup .trek-name{color:var(--color-primary);font-weight:bold;font-size:12px}.trek-departure-popup .trek-name-margin-top{margin-top:12px}.poi-tooltip .poi-name,.poi-tooltip .information-desks-name,.poi-tooltip .sensitive-area-name,.information-desks-tooltip .poi-name,.information-desks-tooltip .information-desks-name,.information-desks-tooltip .sensitive-area-name,.sensitive-area-tooltip .poi-name,.sensitive-area-tooltip .information-desks-name,.sensitive-area-tooltip .sensitive-area-name{color:var(--color-primary);font-weight:bold;font-size:12px}.sensitiveAreasCheckboxContainer{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;background-color:#ffffff;padding:8px;border-radius:8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sensitiveAreasCheckboxContainer input,.sensitiveAreasCheckboxContainer label{cursor:pointer}.sensitiveAreasCheckboxContainer input{margin:0}.sensitiveAreasCheckboxContainer label{padding-left:8px}.poi-icon,.information-desks-icon{background-color:var(--color-poi-icon);border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.poi-icon img,.information-desks-icon img{width:36px !important}.parking-icon{background-color:#0000ff;border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:48px;height:48px;font-size:24px;color:#ffffff}.point-reference-icon{background-color:#ff0000;border:1px solid #ffffff;border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:24px;height:24px;font-size:18px;color:#ffffff}';const jn=class{constructor(i){t(this,i),this.colorPrimary="#6b0030",this.colorPrimaryShade="#4a0021",this.colorPrimaryTint="#974c6e",this.resetStoreOnDisconnected=!0}connectedCallback(){this.currentTrek=this.trek?this.trek:o.currentTrek,this.currentTrek&&(this.difficulty=o.difficulties.find((t=>t.id===this.currentTrek.difficulty)),this.route=o.routes.find((t=>t.id===this.currentTrek.route)),this.practice=o.practices.find((t=>t.id===this.currentTrek.practice)),this.themes=o.themes.filter((t=>this.currentTrek.themes.includes(t.id))),this.labels=o.labels.filter((t=>this.currentTrek.labels.includes(t.id))),this.sources=o.sources.filter((t=>this.currentTrek.source.includes(t.id))),this.accessibilities=o.accessibilities.filter((t=>this.currentTrek.accessibilities.includes(t.id))),o.accessibilitiesLevel&&(this.accessibilityLevel=o.accessibilitiesLevel.find((t=>this.currentTrek.accessibility_level===t.id)))),r("currentTrek",(()=>{this.currentTrek=this.trek?this.trek:o.currentTrek,this.currentTrek&&(this.difficulty=o.difficulties.find((t=>t.id===this.currentTrek.difficulty)),this.route=o.routes.find((t=>t.id===this.currentTrek.route)),this.practice=o.practices.find((t=>t.id===this.currentTrek.practice)),this.themes=o.themes.filter((t=>this.currentTrek.themes.includes(t.id))),this.labels=o.labels.filter((t=>this.currentTrek.labels.includes(t.id))),this.sources=o.sources.filter((t=>this.currentTrek.source.includes(t.id))),this.accessibilities=o.accessibilities.filter((t=>this.currentTrek.accessibilities.includes(t.id))),o.accessibilitiesLevel&&(this.accessibilityLevel=o.accessibilitiesLevel.find((t=>this.currentTrek.accessibility_level===t.id))))}))}disconnectedCallback(){this.resetStoreOnDisconnected&&h()}render(){var t,n,s,r,h,p,v;return i(e,{style:{"--color-primary":this.colorPrimary,"--color-primary-shade":this.colorPrimaryShade,"--color-primary-tint":this.colorPrimaryTint}},this.currentTrek&&i("div",{class:"trek-detail-container"},i("div",{class:"name"},this.currentTrek.name),this.currentTrek.attachments&&this.currentTrek.attachments[0]&&this.currentTrek.attachments[0].url&&i("img",{class:"image",src:this.currentTrek.attachments[0].url,loading:"lazy"}),i("div",{class:"sub-container"},i("div",{class:"icons-labels-container"},i("div",{class:"row"},i("div",{class:"icon-label difficulty"},(null===(t=this.difficulty)||void 0===t?void 0:t.pictogram)&&i("img",{src:this.difficulty.pictogram}),null===(n=this.difficulty)||void 0===n?void 0:n.label),i("div",{class:"icon-label duration"},i("div",{class:"svg-icon",innerHTML:a}),l(null===(s=this.currentTrek)||void 0===s?void 0:s.duration)),i("div",{class:"icon-label route"},(null===(r=this.route)||void 0===r?void 0:r.pictogram)&&i("img",{src:this.route.pictogram}),null===(h=this.route)||void 0===h?void 0:h.route)),i("div",{class:"row"},i("div",{class:"icon-label length"},i("div",{class:"svg-icon",innerHTML:c}),u(this.currentTrek.length_2d)),i("div",{class:"icon-label ascent"},i("div",{class:"svg-icon",innerHTML:f}),d(this.currentTrek.ascent)),i("div",{class:"icon-label practice"},(null===(p=this.practice)||void 0===p?void 0:p.pictogram)&&i("img",{src:this.practice.pictogram}),null===(v=this.practice)||void 0===v?void 0:v.name)))),i("div",{class:"downloads-container"},i("div",{class:"download-title"},"Téléchargements"),i("div",{class:"links-container"},i("a",{href:`${this.currentTrek.gpx}`},"GPX"),i("a",{href:`${this.currentTrek.kml}`},"KML"),i("a",{href:`${this.currentTrek.pdf}`},"PDF"))),this.themes.length>0&&i("div",{class:"themes-container"},this.themes.map((t=>i("div",{class:"theme"},t.label)))),this.currentTrek.description_teaser&&i("div",{class:"description-teaser",innerHTML:this.currentTrek.description_teaser}),this.currentTrek.ambiance&&i("div",{class:"ambiance",innerHTML:this.currentTrek.ambiance}),this.currentTrek.description&&i("div",{class:"description-container"},i("div",{class:"description-title"},"Description"),i("div",{class:"description",innerHTML:this.currentTrek.description})),this.currentTrek.departure&&i("div",{class:"departure-container"},i("div",{class:"departure-title"},"Départ : "),i("div",{innerHTML:this.currentTrek.departure})),this.currentTrek.arrival&&i("div",{class:"arrival-container"},i("div",{class:"arrival-title"},"Arrivée : "),i("div",{innerHTML:this.currentTrek.arrival})),this.currentTrek.altimetric_profile&&i("div",{class:"altimetric-profile-container"},i("div",{class:"altimetric-profile-title"},"Profil altimétrique"),i("img",{src:this.currentTrek.altimetric_profile.endsWith(".json")?this.currentTrek.altimetric_profile.replace(".json",".svg"):`${this.currentTrek.altimetric_profile}?format=svg`})),this.currentTrek.access&&i("div",{class:"access-container"},i("div",{class:"access-title"},"Accès routier"),i("div",{class:"access",innerHTML:this.currentTrek.access})),this.currentTrek.public_transport&&i("div",{class:"public-transport-container"},i("div",{class:"public-transport-title"},"Transport"),i("div",{class:"public-transport",innerHTML:this.currentTrek.public_transport})),(this.currentTrek.advice||this.labels.length>0)&&i("div",{class:"advice-container"},i("div",{class:"advice-title"},"Recommandations"),this.currentTrek.advice&&i("div",{class:"advice",innerHTML:this.currentTrek.advice}),this.labels.map((t=>i("div",{class:"label-container"},i("div",{class:"label-sub-container"},t.pictogram&&i("img",{src:t.pictogram}),i("div",{class:"label-name",innerHTML:t.name})),i("div",{class:"label-advice",innerHTML:t.advice}))))),this.currentTrek.advised_parking&&i("div",{class:"advised-parking-container"},i("div",{class:"advised-parking-title"},"Parking conseillé"),i("div",{class:"advised_parking",innerHTML:this.currentTrek.advised_parking})),this.currentTrek.gear&&i("div",{class:"gear-container"},i("div",{class:"gear-title"},"Équipements"),i("div",{class:"gear",innerHTML:this.currentTrek.gear})),o.currentSensitiveAreas&&o.currentSensitiveAreas.length>0&&i("div",{class:"sensitive-areas-container"},i("div",{class:"sensitive-areas-title"},"Zones de sensibilité environnementale"),o.currentSensitiveAreas.map((t=>i("grw-sensitive-area-detail",{sensitiveArea:t})))),o.currentInformationDesks&&o.currentInformationDesks.length>0&&i("div",{class:"information-desks-container"},i("div",{class:"information-desks-title"},"Lieux de renseignement"),o.currentInformationDesks.map((t=>i("grw-information-desk-detail",{informationDesk:t})))),(this.currentTrek.disabled_infrastructure||this.accessibilities&&this.accessibilities.length>0||this.currentTrek.accessibility_level||this.currentTrek.accessibility_slope||this.currentTrek.accessibility_width||this.currentTrek.accessibility_signage||this.currentTrek.accessibility_covering||this.currentTrek.accessibility_exposure||this.currentTrek.accessibility_advice)&&i("div",{class:"accessibilities-container"},i("div",{class:"accessibilities-title"},"Accessibilité"),this.currentTrek.disabled_infrastructure&&i("div",{innerHTML:this.currentTrek.disabled_infrastructure}),i("div",{class:"accessibilities-content-container"},this.accessibilities.map((t=>i("div",{class:"accessibility-content-container"},i("img",{src:t.pictogram}),i("div",{innerHTML:t.name}))))),this.currentTrek.accessibility_level&&i("div",{class:"accessibility-level-container"},i("div",{class:"accessibility-level-title"},"Niveau d'accessibilité"),i("div",{innerHTML:this.accessibilityLevel.name})),this.currentTrek.accessibility_slope&&i("div",{class:"accessibility-slope-container"},i("div",{class:"accessibility-slope-title"},"Pente"),i("div",{innerHTML:this.currentTrek.accessibility_slope})),this.currentTrek.accessibility_width&&i("div",{class:"accessibility-width-container"},i("div",{class:"accessibility-width-title"},"Largeur"),i("div",{innerHTML:this.currentTrek.accessibility_width})),this.currentTrek.accessibility_signage&&i("div",{class:"accessibility-signage-container"},i("div",{class:"accessibility-signage-title"},"Pente"),i("div",{innerHTML:this.currentTrek.accessibility_signage})),this.currentTrek.accessibility_covering&&i("div",{class:"accessibility-covering-container"},i("div",{class:"accessibility-covering-title"},"Revêtement"),i("div",{innerHTML:this.currentTrek.accessibility_covering})),this.currentTrek.accessibility_exposure&&i("div",{class:"accessibility-exposure-container"},i("div",{class:"accessibility-exposure-title"},"Exposition"),i("div",{innerHTML:this.currentTrek.accessibility_exposure})),this.currentTrek.accessibility_advice&&i("div",{class:"accessibility-advice-container"},i("div",{class:"accessibility-advice-title"},"Conseils"),i("div",{innerHTML:this.currentTrek.accessibility_advice}))),o.currentPois&&o.currentPois.length>0&&i("div",{class:"pois-container"},i("div",{class:"pois-title"},"Points d'intérêts"),o.currentPois.map((t=>i("grw-poi-detail",{poi:t})))),this.currentTrek.source&&this.currentTrek.source.length>0&&i("div",{class:"source-container"},i("div",{class:"source-title"},"Sources"),this.sources.map((t=>i("div",{class:"source-sub-container"},t.pictogram&&i("img",{src:t.pictogram}),i("div",null,i("div",{class:"source-name",innerHTML:t.name}),i("a",{class:"source-advice",innerHTML:t.website}))))))))}};jn.style='grw-sensitive-area-detail,grw-information-desk-detail,grw-poi-detail{margin-top:12px}.trek-detail-container{font-family:"Roboto";display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;overflow-y:auto}.trek-detail-container .name{color:var(--color-primary);font-size:48px;font-weight:bold;padding:24px}.trek-detail-container .image{border-radius:8px;-ms-flex-item-align:center;align-self:center;width:100%;max-width:700px;height:auto;-webkit-box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);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:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.trek-detail-container .sub-container .icons-labels-container .row{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;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:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:33.3333333333%}.trek-detail-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 8px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label img,.trek-detail-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:24px}.trek-detail-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}.trek-detail-container .downloads-container{padding:0px 24px 24px 24px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.trek-detail-container .downloads-container .download-title{color:var(--color-primary);font-size:18px;margin-bottom:12px}.trek-detail-container .downloads-container .links-container{display:-ms-flexbox;display:flex}.trek-detail-container .downloads-container .links-container a{background-color:var(--color-primary);padding:8px;color:#ffffff;text-decoration:none;border-radius:8px}.trek-detail-container .downloads-container .links-container a:nth-child(2){margin:0px 12px}.trek-detail-container .downloads-container .links-container a:hover{background-color:var(--color-primary-shade)}.trek-detail-container .themes-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:0px 24px 24px 24px}.trek-detail-container .themes-container .theme{background-color:var(--color-primary-tint);color:#ffffff;border-radius:8px;padding:8px;margin:0px 8px 8px 0px}.trek-detail-container .ambiance,.trek-detail-container .description-teaser,.trek-detail-container .description-container,.trek-detail-container .altimetric-profile-container,.trek-detail-container .access-container,.trek-detail-container .public-transport-container,.trek-detail-container .advice-container,.trek-detail-container .advised-parking-container,.trek-detail-container .gear-container,.trek-detail-container .pois-container,.trek-detail-container .sensitive-areas-container,.trek-detail-container .information-desks-container,.trek-detail-container .source-container,.trek-detail-container .accessibilities-container{padding:0px 24px 24px 24px}.trek-detail-container .ambiance a,.trek-detail-container .description-teaser a,.trek-detail-container .description-container a,.trek-detail-container .altimetric-profile-container a,.trek-detail-container .access-container a,.trek-detail-container .public-transport-container a,.trek-detail-container .advice-container a,.trek-detail-container .advised-parking-container a,.trek-detail-container .gear-container a,.trek-detail-container .pois-container a,.trek-detail-container .sensitive-areas-container a,.trek-detail-container .information-desks-container a,.trek-detail-container .source-container a,.trek-detail-container .accessibilities-container a{color:var(--color-primary)}.trek-detail-container .description-title,.trek-detail-container .altimetric-profile-title,.trek-detail-container .access-title,.trek-detail-container .public-transport-title,.trek-detail-container .advice-title,.trek-detail-container .advised-parking-title,.trek-detail-container .gear-title,.trek-detail-container .pois-title,.trek-detail-container .sensitive-areas-title,.trek-detail-container .information-desks-title,.trek-detail-container .source-title,.trek-detail-container .accessibilities-title{color:var(--color-primary);font-size:36px;font-weight:bold;margin:12px 0px}.label-container .label-sub-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.label-container .label-sub-container img{width:26px;margin-right:16px}.label-container .label-sub-container .label-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:12px 0px}.source-container .source-sub-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.source-container .source-sub-container img{width:26px;margin-right:16px}.source-container .source-sub-container .source-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:12px 0px}.departure-container,.arrival-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0px 24px 24px 24px}.departure-container .departure-title,.departure-container .arrival-title,.arrival-container .departure-title,.arrival-container .arrival-title{color:var(--color-primary);font-weight:bold}.accessibilities-container .accessibilities-content-container{padding:12px 0px 0px 0px;display:-ms-flexbox;display:flex}.accessibilities-container .accessibilities-content-container .accessibility-content-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin:0px 8px 8px 0px}.accessibilities-container .accessibilities-content-container .accessibility-content-container img{margin-right:16px;width:26px}.accessibilities-container .accessibility-level-title,.accessibilities-container .accessibility-slope-title,.accessibilities-container .accessibility-width-title,.accessibilities-container .accessibility-signage-title,.accessibilities-container .accessibility-covering-title,.accessibilities-container .accessibility-exposure-title,.accessibilities-container .accessibility-advice-title{color:var(--color-primary);font-size:24px;padding:12px 0px}';const Dn=class{constructor(i){t(this,i),this.language="fr",this.controller=new AbortController,this.signal=this.controller.signal}connectedCallback(){o.api=this.api;const t=[];t.push(o.difficulties?new Response("null"):fetch(`${this.api}trek_difficulty/?language=${this.language}&fields=id,label,pictogram`,{signal:this.signal})),t.push(o.routes?new Response("null"):fetch(`${this.api}trek_route/?language=${this.language}&fields=id,route,pictogram`,{signal:this.signal})),t.push(o.practices?new Response("null"):fetch(`${this.api}trek_practice/?language=${this.language}&fields=id,name,pictogram`,{signal:this.signal})),t.push(o.themes?new Response("null"):fetch(`${this.api}theme/?language=${this.language}&fields=id,label,pictogram`,{signal:this.signal})),t.push(o.cities?new Response("null"):fetch(`${this.api}city/?language=${this.language}&fields=id,name&published=true`,{signal:this.signal})),Promise.all([...t,fetch(`${this.api}sensitivearea/?language=${this.language}&published=true&trek=${this.trekId}&fields=id,geometry,name,description,contact,info_url,period,practices`,{signal:this.signal}).catch((()=>new Response("null"))),fetch(`${this.api}label/?language=${this.language}&fields=id,name,advice,pictogram`,{signal:this.signal}),fetch(`${this.api}source/?language=${this.language}&fields=id,name,website,pictogram`,{signal:this.signal}),fetch(`${this.api}trek_accessibility/?language=${this.language}&fields=id,name,pictogram`,{signal:this.signal}),fetch(`${this.api}trek_accessibility_level/?language=${this.language}&fields=id,name`,{signal:this.signal}).catch((()=>new Response("null"))),fetch(`${this.api}poi/?language=${this.language}&trek=${this.trekId}&published=true&fields=id,name,description,attachments,type,geometry&page_size=999`,{signal:this.signal}),fetch(`${this.api}poi_type/?language=${this.language}&fields=id,pictogram`,{signal:this.signal}),fetch(`${this.api}informationdesk/?language=${this.language}&near_trek=${this.trekId}&fields=id,name,description,type,phone,email,website,municipality,postal_code,street,photo_url,latitude,longitude&page_size=999`,{signal:this.signal}),fetch(`${this.api}trek/${this.trekId}/?language=${this.language}&published=true&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,geometry,gpx,kml,pdf,parking_location,departure,departure_city,arrival,altimetric_profile,ambiance,access,public_transport,advice,advised_parking,gear,labels,source,points_reference,disabled_infrastructure,accessibility_level,accessibility_slope,accessibility_width,accessibility_signage,accessibility_covering,accessibility_exposure,accessibility_advice,accessibilities`,{signal:this.signal})]).then((t=>Promise.all(t.map((t=>t.json()))))).then((([t,i,e,n,s,r,h,a,l,c,u,f,d,p])=>{o.trekNetworkError=!1,t&&(o.difficulties=t.results),i&&(o.routes=i.results),e&&(o.practices=e.results.map((t=>Object.assign(Object.assign({},t),{selected:!1})))),n&&(o.themes=n.results),s&&(o.cities=s.results),r&&(o.currentSensitiveAreas=r.results),o.labels=h.results,o.sources=a.results,o.accessibilities=l.results,c&&(o.accessibilitiesLevel=c.results),o.currentPois=u.results,o.poiTypes=f.results,o.currentInformationDesks=d.results,o.currentTrek=p})).catch((()=>{o.trekNetworkError=!0}))}disconnectedCallback(){this.controller.abort(),o.currentTrek=null,o.trekNetworkError=!1}render(){return i(e,null)}},Nn=class{constructor(i){t(this,i),this.treksToDisplay=[],this.colorPrimary="#6b0030",this.colorPrimaryTint="#974c6e",this.isLargeView=!1,this.resetStoreOnDisconnected=!0,this.step=10,this.handleInfiniteScrollBind=this.handleInfiniteScroll.bind(this),this.shouldAddInfiniteScrollEvent=!0}connectedCallback(){this.handleInfiniteScrollEvent(!0),o.currentTreks&&(this.treksToDisplay=[...o.currentTreks.slice(0,this.step)]),r("currentTreks",(()=>{this.handleInfiniteScrollEvent(!0),this.element.scroll({top:0}),o.currentTreks&&(this.treksToDisplay=[...o.currentTreks.slice(0,this.step)])})),r("treksWithinBounds",(()=>{this.handleInfiniteScrollEvent(!0),this.element.scroll({top:0}),o.treksWithinBounds&&(this.treksToDisplay=[...o.treksWithinBounds.slice(0,this.step)])}))}handleInfiniteScroll(t){t.composedPath()[0].scrollTop+t.composedPath()[0].scrollHeight/2>=t.composedPath()[0].scrollHeight&&(this.treksToDisplay.length<o.treksWithinBounds.length?this.treksToDisplay=o.treksWithinBounds.slice(0,this.treksToDisplay.length+this.step>=o.treksWithinBounds.length?o.treksWithinBounds.length:this.treksToDisplay.length+this.step):this.handleInfiniteScrollEvent(!1))}handleInfiniteScrollEvent(t){t?this.shouldAddInfiniteScrollEvent&&(this.element.addEventListener("scroll",this.handleInfiniteScrollBind),this.shouldAddInfiniteScrollEvent=!t):(this.element.removeEventListener("scroll",this.handleInfiniteScrollBind),this.shouldAddInfiniteScrollEvent=!t)}disconnectedCallback(){this.resetStoreOnDisconnected&&h(),this.handleInfiniteScrollEvent(!1)}render(){return i(e,{style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint}},this.treksToDisplay.map((t=>i("grw-trek-card",{"reset-store-on-disconnected":"false",key:`trek-${t.id}`,trek:t,"is-large-view":this.isLargeView,"color-primary":this.colorPrimary,"color-primary-tint":this.colorPrimaryTint}))))}get element(){return s(this)}};Nn.style=':host{font-family:"Roboto";width:100%;height:100%;max-height:100vh;overflow-y:auto;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:distribute;justify-content:space-around}grw-trek-card{margin:6px}';const Zn=class{constructor(i){t(this,i),this.language="fr",this.controller=new AbortController,this.signal=this.controller.signal}connectedCallback(){o.api=this.api;let t=`${this.api}trek/?language=${this.language}&published=true`;this.inBbox&&(t+=`&in_bbox=${this.inBbox}`),this.cities&&(t+=`&cities=${this.cities}`),this.districts&&(t+=`&districts=${this.districts}`),this.structures&&(t+=`&structures=${this.structures}`),this.themes&&(t+=`&themes=${this.themes}`),this.portals&&(t+=`&portals=${this.portals}`),this.routes&&(t+=`&routes=${this.routes}`),this.practices&&(t+=`&practices=${this.practices}`),t+="&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,departure,departure_city,departure_geom&page_size=999",Promise.all([fetch(`${this.api}trek_difficulty/?language=${this.language}&fields=id,label,pictogram`,{signal:this.signal}),fetch(`${this.api}trek_route/?language=${this.language}&fields=id,route,pictogram`,{signal:this.signal}),fetch(`${this.api}trek_practice/?language=${this.language}&fields=id,name,pictogram`,{signal:this.signal}),fetch(`${this.api}theme/?language=${this.language}&fields=id,label,pictogram`,{signal:this.signal}),fetch(`${this.api}city/?language=${this.language}&fields=id,name&published=true`,{signal:this.signal}),fetch(t,{signal:this.signal})]).then((t=>Promise.all(t.map((t=>t.json()))))).then((([t,i,e,n,s,r])=>{o.treksNetworkError=!1,o.difficulties=t.results,o.routes=i.results,o.practices=e.results.map((t=>Object.assign(Object.assign({},t),{selected:!1}))),o.themes=n.results,o.cities=s.results,o.durations=[{id:1,name:"0 - 1h",minValue:0,maxValue:1,selected:!1},{id:2,name:"1 - 2h",minValue:1,maxValue:2,selected:!1},{id:3,name:"2 - 5h",minValue:2,maxValue:5,selected:!1},{id:4,name:"5 - 10h",minValue:5,maxValue:10,selected:!1}],o.currentTreks=r.results,o.treksWithinBounds=r.results,o.treks=r.results})).catch((()=>o.treksNetworkError=!0))}disconnectedCallback(){this.controller.abort(),o.treksNetworkError=!1}render(){return i(e,null)}};export{p as grw_filter,Rn as grw_map,jn as grw_trek_detail,Dn as grw_trek_provider,Nn as grw_treks_list,Zn as grw_treks_provider}
|
|
@@ -15,6 +15,7 @@ export declare class GrwMap {
|
|
|
15
15
|
colorArrivalIcon: string;
|
|
16
16
|
colorSensitiveArea: string;
|
|
17
17
|
colorPoiIcon: string;
|
|
18
|
+
resetStoreOnDisconnected: boolean;
|
|
18
19
|
map: L.Map;
|
|
19
20
|
sensitiveAreasControl: any;
|
|
20
21
|
treksLayer: L.GeoJSON<any>;
|
|
@@ -26,11 +27,12 @@ export declare class GrwMap {
|
|
|
26
27
|
currentInformationDesksLayer: L.GeoJSON<any>;
|
|
27
28
|
currentPointsReferenceLayer: L.GeoJSON<any>;
|
|
28
29
|
handleTreksWithinBoundsBind: (event: any) => void;
|
|
29
|
-
|
|
30
|
+
componentDidLoad(): void;
|
|
30
31
|
addTreks(): void;
|
|
31
32
|
removeTreks(): void;
|
|
32
33
|
handleTreksWithinBounds(): void;
|
|
33
34
|
addTrek(): void;
|
|
34
35
|
removeTrek(): void;
|
|
36
|
+
disconnectedCallback(): void;
|
|
35
37
|
render(): any;
|
|
36
38
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { Difficulty, Practice, Route, Themes, Trek } from 'types/types';
|
|
2
|
+
import { City, Difficulty, Practice, Route, Themes, Trek } from 'types/types';
|
|
3
3
|
export declare class GrwTrekCard {
|
|
4
4
|
trekCardPress: EventEmitter<number>;
|
|
5
5
|
currentTrek: Trek;
|
|
@@ -7,10 +7,13 @@ export declare class GrwTrekCard {
|
|
|
7
7
|
route: Route;
|
|
8
8
|
practice: Practice;
|
|
9
9
|
themes: Themes;
|
|
10
|
+
departureCity: City;
|
|
10
11
|
trek: Trek;
|
|
11
12
|
colorPrimary: string;
|
|
12
13
|
colorPrimaryTint: string;
|
|
13
14
|
isLargeView: boolean;
|
|
15
|
+
resetStoreOnDisconnected: boolean;
|
|
14
16
|
connectedCallback(): void;
|
|
17
|
+
disconnectedCallback(): void;
|
|
15
18
|
render(): any;
|
|
16
19
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Accessibilities, AccessibilityLevel, Difficulty, Labels, Practice, Route, Sources, Themes, Trek } from 'types/types';
|
|
2
2
|
export declare class GrwTrekDetail {
|
|
3
|
+
currentTrek: Trek;
|
|
3
4
|
difficulty: Difficulty;
|
|
4
5
|
route: Route;
|
|
5
6
|
practice: Practice;
|
|
@@ -12,7 +13,8 @@ export declare class GrwTrekDetail {
|
|
|
12
13
|
colorPrimary: string;
|
|
13
14
|
colorPrimaryShade: string;
|
|
14
15
|
colorPrimaryTint: string;
|
|
15
|
-
|
|
16
|
+
resetStoreOnDisconnected: boolean;
|
|
16
17
|
connectedCallback(): void;
|
|
18
|
+
disconnectedCallback(): void;
|
|
17
19
|
render(): any;
|
|
18
20
|
}
|