1!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.L={})}(this,(function(t){var e=Object.freeze;function i(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++)for(e in o=arguments[i])t[e]=o[e];return t}Object.freeze=function(t){return t};var n=Object.create||function(t){return o.prototype=t,new o};function o(){}function a(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var r=0;function s(t){return t._leaflet_id=t._leaflet_id||++r,t._leaflet_id}function l(t,e,i){var n,o,a,r;return r=function(){n=!1,o&&(a.apply(i,o),o=!1)},a=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)}}function h(t,e,i){var n=e[1],o=e[0],a=n-o;return t===n&&i?t:((t-o)%a+a)%a+o}function u(){return!1}function c(t,e){return e=void 0===e?6:e,+(Math.round(t+"e+"+e)+"e-"+e)}function d(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return d(t).split(/\s+/)}function _(t,e){for(var i in t.hasOwnProperty("options")||(t.options=t.options?n(t.options):{}),e)t.options[i]=e[i];return t.options}function m(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var f=/\{ *([\w_-]+) *\}/g;function g(t,e){return t.replace(f,(function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n}))}var y=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var k="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function w(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var b=0;function x(t){var e=+new Date,i=Math.max(0,16-(e-b));return b=e+i,window.setTimeout(t,i)}var W=window.requestAnimationFrame||w("RequestAnimationFrame")||x,C=window.cancelAnimationFrame||w("CancelAnimationFrame")||w("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function M(t,e,i){if(!i||W!==x)return W.call(window,a(t,e));t.call(e)}function T(t){t&&C.call(window,t)}var P=(Object.freeze||Object)({freeze:e,extend:i,create:n,bind:a,lastId:r,stamp:s,throttle:l,wrapNum:h,falseFn:u,formatNum:c,trim:d,splitWords:p,setOptions:_,getParamString:m,template:g,isArray:y,indexOf:v,emptyImageUrl:k,requestFn:W,cancelFn:C,requestAnimFrame:M,cancelAnimFrame:T});function E(){}E.extend=function(t){function e(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var o=e.__super__=this.prototype,a=n(o);for(var r in(a.constructor=e).prototype=a,this)this.hasOwnProperty(r)&&"prototype"!==r&&"__super__"!==r&&(e[r]=this[r]);return t.statics&&(i(e,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=y(t)?t:[t];for(var e=0;e<t.length;
vendor: 7,491 bytes, line 1
1e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),i.apply(null,[a].concat(t.includes)),delete t.includes),a.options&&(t.options=i(n(a.options),t.options)),i(a,t),a._initHooks=[],a.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=a._initHooks.length;t<e;t++)a._initHooks[t].call(this)}},e},E.include=function(t){return i(this.prototype,t),this},E.mergeOptions=function(t){return i(this.prototype.options,t),this},E.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var S={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var o=0,a=(t=p(t)).length;o<a;o++)this._on(t[o],e,i);return this},off:function(t,e,i){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else for(var o=0,a=(t=p(t)).length;o<a;o++)this._off(t[o],e,i);else delete this._events;return this},_on:function(t,e,i){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),i===this&&(i=void 0);for(var o={fn:e,ctx:i},a=n,r=0,s=a.length;r<s;r++)if(a[r].fn===e&&a[r].ctx===i)return;a.push(o)},_off:function(t,e,i){var n,o,a;if(this._events&&(n=this._events[t]))if(e){if(i===this&&(i=void 0),n)for(o=0,a=n.length;o<a;o++){var r=n[o];if(r.ctx===i&&r.fn===e)return r.fn=u,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(o,1)}}else{for(o=0,a=n.length;o<a;o++)n[o].fn=u;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var o=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var a=this._events[t];if(a){this._firingCount=this._firingCount+1||1;for(var r=0,s=a.length;r<s;r++){var l=a[r];l.fn.call(l.ctx||this,o)}this._firingCount--}}return n&&this._propagateEvent(o),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var n in t)this.once(n,t[n],e);return this}var o=a((function(){this.off(t,e,i).off(t,o,i)}),this);return this.on(t,e,i).on(t,o,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[s(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[s(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};S.addEventListener=S.on,S.removeEventListener=S.clearAllEventListeners=S.off,S.addOneTimeEventListener=S.once,S.fireEvent=S.fire,S.hasEventListeners=S.listens;var D=E.extend(S);function z(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var A=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};function O(t,e,i){return t instanceof z?t:y(t)?new z(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new z(t.x,t.y):new z(t,e,i)}function I(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function N(t,e){return!t||t instanceof I?t:new I(t,e)}function B(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function F(t,e){return t instanceof B?t:new B(t,e)}function R(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function j(t,e,i){return t instanceof R?t:y(t)&&"object"!=typeof t[0]?3===t.length?new R(t[0],t[1],t[2]):2===t.length?new R(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new R(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new R(t,e,i)}z.prototype={clone:function(){return new z(this.x,this.y)},add:function(t){return this.clone()._add(O(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(O(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new z(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new z(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=A(this.x),this.y=A(this.y),this},distanceTo:function(t){var e=(t=O(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=O(t)).x===this.x&&t.y===this.y},contains:function(t){return t=O(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},I.prototype={extend:function(t){return t=O(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new z((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new z(this.min.x,this.max.y)},getTopRight:function(){return new z(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t="number"==typeof t[0]||t instanceof z?O(t):N(t))instanceof I?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,i=this.max,n=t.min,o=t.max,a=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return a&&r},overlaps:function(t){t=N(t);var e=this.min,i=this.max,n=t.min,o=t.max,a=o.x>e.x&&n.x<i.x,r=o.y>e.y&&n.y<i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},B.prototype={extend:function(t){var e,i,n=this._southWest,o=this._northEast;if(t instanceof R)i=e=t;else{if(!(t instanceof B))return t?this.extend(j(t)||F(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||o?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),o.lat=Math.max(i.lat,o.lat),o.lng=Math.max(i.lng,o.lng)):(this._southWest=new R(e.lat,e.lng),this._northEast=new R(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new B(new R(e.lat-n,e.lng-o),new R(i.lat+n,i.lng+o))},getCenter:function(){return new R((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new R(this.getNorth(),this.getWest())},getSouthEast:function(){return new R(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat}
vendor: 2,433 bytes, line 1
1,getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof R||"lat"in t?j(t):F(t);var e,i,n=this._southWest,o=this._northEast;return t instanceof B?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=F(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),a=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return a&&r},overlaps:function(t){t=F(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),a=o.lat>e.lat&&n.lat<i.lat,r=o.lng>e.lng&&n.lng<i.lng;return a&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=F(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}};var Z,U={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t);return new I(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!(R.prototype={equals:function(t,e){return!!t&&(t=j(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return G.distance(this,j(t))},wrap:function(){return G.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return F([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new R(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var e=this.wrapLng?h(t.lng,this.wrapLng,!0):t.lng;return new R(this.wrapLat?h(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,o=e.lng-i.lng;if(0==n&&0==o)return t;
vendor: 6,880 bytes, line 1
1var a=t.getSouthWest(),r=t.getNorthEast();return new B(new R(a.lat-n,a.lng-o),new R(r.lat-n,r.lng-o))}},G=i({},U,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,a=Math.sin((e.lat-t.lat)*i/2),r=Math.sin((e.lng-t.lng)*i/2),s=a*a+Math.cos(n)*Math.cos(o)*r*r,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),H={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),o=Math.sin(n*e);return new z(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new R((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(Z=6378137*Math.PI,new I([-Z,-Z],[Z,Z]))};function V(t,e,i,n){if(y(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=n}function q(t,e,i,n){return new V(t,e,i,n)}V.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new z((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var Q,X=i({},G,{code:"EPSG:3857",projection:H,transformation:(Q=.5/(Math.PI*H.R),q(Q,.5,-Q,.5))}),Y=i({},X,{code:"EPSG:900913"});function K(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function J(t,e){var i,n,o,a,r,s,l="";for(i=0,o=t.length;i<o;i++){for(n=0,a=(r=t[i]).length;n<a;n++)l+=(n?"L":"M")+(s=r[n]).x+" "+s.y;l+=e?Pt?"z":"x":""}return l||"M0 0"}var $=document.documentElement.style,tt="ActiveXObject"in window,et=tt&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),nt=St("webkit"),ot=St("android"),at=St("android 2")||St("android 3"),rt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),st=ot&&St("Google")&&rt<537&&!("AudioNode"in window),lt=!!window.opera,ht=St("chrome"),ut=St("gecko")&&!nt&&!lt&&!tt,ct=!ht&&St("safari"),dt=St("phantom"),pt="OTransition"in $,_t=0===navigator.platform.indexOf("Win"),mt=tt&&"transition"in $,ft="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!at,gt="MozPerspective"in $,yt=!window.L_DISABLE_3D&&(mt||ft||gt)&&!pt&&!dt,vt="undefined"!=typeof orientation||St("mobile"),kt=vt&&nt,Lt=vt&&ft,wt=!window.PointerEvent&&window.MSPointerEvent,bt=!(!window.PointerEvent&&!wt),xt=!window.L_NO_TOUCH&&(bt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Wt=vt&<,Ct=vt&&ut,Mt=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),Tt=!!document.createElement("canvas").getContext,Pt=!(!document.createElementNS||!K("svg").createSVGRect),Et=!Pt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function St(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var Dt=(Object.freeze||Object)({ie:tt,ielt9:et,edge:it,webkit:nt,android:ot,android23:at,androidStock:st,opera:lt,chrome:ht,gecko:ut,safari:ct,phantom:dt,opera12:pt,win:_t,ie3d:mt,webkit3d:ft,gecko3d:gt,any3d:yt,mobile:vt,mobileWebkit:kt,mobileWebkit3d:Lt,msPointer:wt,pointer:bt,touch:xt,mobileOpera:Wt,mobileGecko:Ct,retina:Mt,canvas:Tt,svg:Pt,vml:Et}),zt=wt?"MSPointerDown":"pointerdown",At=wt?"MSPointerMove":"pointermove",Ot=wt?"MSPointerUp":"pointerup",It=wt?"MSPointerCancel":"pointercancel",Nt=["INPUT","SELECT","OPTION"],Bt={},Ft=!1,Rt=0;function jt(t){Bt[t.pointerId]=t,Rt++}function Zt(t){Bt[t.pointerId]&&(Bt[t.pointerId]=t)}function Ut(t){delete Bt[t.pointerId],Rt--}function Gt(t,e){for(var i in t.touches=[],Bt)t.touches.push(Bt[i]);t.changedTouches=[t],e(t)}var Ht=wt?"MSPointerDown":bt?"pointerdown":"touchstart",Vt=wt?"MSPointerUp":bt?"pointerup":"touchend",qt="_leaflet_";var Qt,Xt,Yt,Kt,Jt,$t=me(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),te=me(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ee="webkitTransition"===te||"OTransition"===te?te+"End":"transitionend";function ie(t){return"string"==typeof t?document.getElementById(t):t}function ne(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function oe(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function ae(t){var e=t.parentNode;e&&e.removeChild(t)}function re(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function se(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function le(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function he(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=pe(t);return 0<i.length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function ue(t,e){if(void 0!==t.classList)for(var i=p(e),n=0,o=i.length;n<o;n++)t.classList.add(i[n]);else if(!he(t,e)){var a=pe(t);de(t,(a?a+" ":"")+e)}}function ce(t,e){void 0!==t.classList?t.classList.remove(e):de(t,d((" "+pe(t)+" ").replace(" "+e+" "," ")))}function de(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function pe(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function _e(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}(t,e)}function me(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function fe(t,e,i){var n=e||new z(0,0);t.style[$t]=(mt?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function ge(t,e){t._leaflet_pos=e,yt?fe(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function ye(t){return t._leaflet_pos||new z(0,0)}if("onselectstart"in document)Qt=function(){Me(window,"selectstart",Oe)},Xt=function(){Pe(window,"selectstart",Oe)};else{var ve=me(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Qt=function(){if(ve){var t=document.documentElement.style;Yt=t[ve],t[ve]="none"}},Xt=function(){ve&&(document.documentElement.style[ve]=Yt,Yt=void 0)}}function ke(){Me(window,"dragstart",Oe)}function Le(){Pe(window,"dragstart",Oe)}function we(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(be(),Jt=(Kt=t).style.outline,t.style.outline="none",Me(window,"keydown",be))}function be(){Kt&&(Kt.style.outline=Jt,Jt=Kt=void 0,Pe(window,"keydown",be))}function xe(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function We(t){var e=t.getBoundingClientRect();
1return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ce=(Object.freeze||Object)({TRANSFORM:$t,TRANSITION:te,TRANSITION_END:ee,get:ie,getStyle:ne,create:oe,remove:ae,empty:re,toFront:se,toBack:le,hasClass:he,addClass:ue,removeClass:ce,setClass:de,getClass:pe,setOpacity:_e,testProp:me,setTransform:fe,setPosition:ge,getPosition:ye,disableTextSelection:Qt,enableTextSelection:Xt,disableImageDrag:ke,enableImageDrag:Le,preventOutline:we,restoreOutline:be,getSizedParentNode:xe,getScale:We});function Me(t,e,i,n){if("object"==typeof e)for(var o in e)Ee(t,o,e[o],i);else for(var a=0,r=(e=p(e)).length;a<r;a++)Ee(t,e[a],i,n);return this}var Te="_leaflet_events";function Pe(t,e,i,n){if("object"==typeof e)for(var o in e)Se(t,o,e[o],i);else if(e)for(var a=0,r=(e=p(e)).length;a<r;a++)Se(t,e[a],i,n);else{for(var s in t[Te])Se(t,s,t[Te][s]);delete t[Te]}return this}function Ee(t,e,i,n){var o=e+s(i)+(n?"_"+s(n):"");if(t[Te]&&t[Te][o])return this;var r=function(e){return i.call(n||t,e||window.event)},l=r;bt&&0===e.indexOf("touch")?function(t,e,i,n){return"touchstart"===e?(o=t,r=i,s=n,l=a((function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Nt.indexOf(t.target.tagName)<0))return;Oe(t)}Gt(t,r)})),o["_leaflet_touchstart"+s]=l,o.addEventListener(zt,l,!1),Ft||(document.documentElement.addEventListener(zt,jt,!0),document.documentElement.addEventListener(At,Zt,!0),document.documentElement.addEventListener(Ot,Ut,!0),document.documentElement.addEventListener(It,Ut,!0),Ft=!0)):"touchmove"===e?function(t,e,i){var n=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&Gt(t,e)};t["_leaflet_touchmove"+i]=n,t.addEventListener(At,n,!1)}(t,i,n):"touchend"===e&&function(t,e,i){var n=function(t){Gt(t,e)};t["_leaflet_touchend"+i]=n,t.addEventListener(Ot,n,!1),t.addEventListener(It,n,!1)}(t,i,n),this;var o,r,s,l}(t,e,r,o):!xt||"dblclick"!==e||bt&&ht?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,Ge(t,e)&&l(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",r,!1)):("click"===e&&ot&&(r=function(t){!function(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=Re&&i-Re;if(n&&100<n&&n<500||t.target._simulatedClick&&!t._simulated)return Ie(t);Re=i,e(t)}(t,l)}),t.addEventListener(e,r,!1)):"attachEvent"in t&&t.attachEvent("on"+e,r):function(t,e,i){var n,o,a=!1;function r(t){var e;if(bt){if(!it||"mouse"===t.pointerType)return;e=Rt}else e=t.touches.length;if(!(1<e)){var i=Date.now(),r=i-(n||i);o=t.touches?t.touches[0]:t,a=0<r&&r<=250,n=i}}function s(t){if(a&&!o.cancelBubble){if(bt){if(!it||"mouse"===t.pointerType)return;var i,r,s={};for(r in o)i=o[r],s[r]=i&&i.bind?i.bind(o):i;o=s}o.type="dblclick",o.button=0,e(o),n=null}}t[qt+Ht+i]=r,t[qt+Vt+i]=s,t[qt+"dblclick"+i]=e,t.addEventListener(Ht,r,!1),t.addEventListener(Vt,s,!1),t.addEventListener("dblclick",e,!1)}(t,r,o),t[Te]=t[Te]||{},t[Te][o]=r}function Se(t,e,i,n){var o,a,r,l=e+s(i)+(n?"_"+s(n):""),h=t[Te]&&t[Te][l];if(!h)return this;bt&&0===e.indexOf("touch")?(r=(o=t)["_leaflet_"+(a=e)+l],"touchstart"===a?o.removeEventListener(zt,r,!1):"touchmove"===a?o.removeEventListener(At,r,!1):"touchend"===a&&(o.removeEventListener(Ot,r,!1),o.removeEventListener(It,r,!1))):!xt||"dblclick"!==e||bt&&ht?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",h,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,h,!1):"detachEvent"in t&&t.detachEvent("on"+e,h):function(t,e){var i=t[qt+Ht+e],n=t[qt+Vt+e],o=t[qt+"dblclick"+e];t.removeEventListener(Ht,i,!1),t.removeEventListener(Vt,n,!1),it||t.removeEventListener("dblclick",o,!1)}(t,l),t[Te][l]=null}function De(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Ue(t),this}function ze(t){return Ee(t,"mousewheel",De),this}function Ae(t){return Me(t,"mousedown touchstart dblclick",De),Ee(t,"click",Ze),this}function Oe(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ie(t){return Oe(t),De(t),this}function Ne(t,e){if(!e)return new z(t.clientX,t.clientY);var i=We(e),n=i.boundingClientRect;return new z((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var Be=_t&&ht?2*window.devicePixelRatio:ut?window.devicePixelRatio:1;function Fe(t){return it?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Be: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
vendor: 18,200 bytes, line 1
1:t.detail?t.detail/-32765*60:0}var Re,je={};function Ze(t){je[t.type]=!0}function Ue(t){var e=je[t.type];return je[t.type]=!1,e}function Ge(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var He=(Object.freeze||Object)({on:Me,off:Pe,stopPropagation:De,disableScrollPropagation:ze,disableClickPropagation:Ae,preventDefault:Oe,stop:Ie,getMousePosition:Ne,getWheelDelta:Fe,fakeStop:Ze,skipped:Ue,isExternalTarget:Ge,addListener:Me,removeListener:Pe}),Ve=D.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=ye(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=M(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),ge(this._el,i),this.fire("step")},_complete:function(){T(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),qe=D.extend({options:{crs:X,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=_(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(j(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=te&&yt&&!Wt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Me(this._proxy,ee,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(j(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(yt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(yt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),a=(t instanceof z?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),r=this.containerPointToLatLng(o.add(a));return this.setView(r,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():F(t);var i=O(e.paddingTopLeft||e.padding||[0,0]),n=O(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var a=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),o),s=this.project(t.getNorthEast(),o);return{center:this.unproject(r.add(s).divideBy(2).add(a),o),zoom:o}},fitBounds:function(t,e){if(!(t=F(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=O(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.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 Ve,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ue(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){if(!1===(i=i||{}).animate||!yt)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),o=this.project(t),a=this.getSize(),r=this._zoom;t=j(t),e=void 0===e?r:e;var s=Math.max(a.x,a.y),l=s*this.getZoomScale(r,e),h=o.distanceTo(n)||1,u=1.42,c=u*u;function d(t){var e=(l*l-s*s+(t?-1:1)*c*c*h*h)/(2*(t?l:s)*c*h),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function _(t){return(Math.exp(t)+Math.exp(-t))/2}var m=d(0);var f=Date.now(),g=(d(1)-m)/u,y=i.duration?1e3*i.duration:1e3*g*.8;return this._moveStart(!0,i.noMoveStart),function i(){var a,l=(Date.now()-f)/y,d=(a=l,(1-Math.pow(1-a,1.5))*g);l<=1?(this._flyToFrame=M(i,this),this._move(this.unproject(n.add(o.subtract(n).multiplyBy(function(t){return s*(_(m)*(p(e=m+u*t)/_(e))-p(m))/c;var e}(d)/h)),r),this.getScaleZoom(s/function(t){return s*(_(m)/_(m+u*t))}(d),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return(t=F(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,F(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=O((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=O(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),a=this.project(o),r=this.project(t),s=this.getPixelBounds(),l=s.getSize().divideBy(2),h=N([s.min.add(i),s.max.subtract(n)]);if(!h.contains(r)){this._enforcingBounds=!0;var u=a.subtract(r),c=O(r.x+u.x,r.y+u.y);(r.x<h.min.x||r.x>h.max.x)&&(c.x=a.x-u.x,0<u.x?c.x+=l.x-i.x:c.x-=l.x-n.x),(r.y<h.min.y||r.y>h.max.y)&&(c.y=a.y-u.y,0<u.y?c.y+=l.y-i.y:c.y-=l.y-n.y),this.panTo(this.unproject(c),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),o=e.divideBy(2).round(),r=n.divideBy(2).round(),s=o.subtract(r);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=a(this._handleGeolocationResponse,this),n=a(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,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){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=new R(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(o,n.maxZoom):o)}var a={latlng:e,bounds:i,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(a[r]=t.coords[r]);this.fire("locationfound",a)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ae(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(T(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ae(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=oe("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new B(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,e,i){t=F(t),i=O(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),a=this.getMaxZoom(),r=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(i),h=N(this.project(s,n),this.project(r,n)).getSize(),u=yt?this.options.zoomSnap:1,c=l.x/h.x,d=l.y/h.y,p=e?Math.max(c,d):Math.min(c,d);return n=this.getScaleZoom(p,n),u&&(n=Math.round(n/(u/100))*(u/100),n=e?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(o,Math.min(a,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new I(i,i.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,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(j(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(O(t),e)},layerPointToLatLng:function(t){var e=O(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(j(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(j(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(F(t))},distance:function(t,e){return this.options.crs.distance(j(t),j(e))},containerPointToLayerPoint:function(t){return O(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return O(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(O(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(j(t)))},mouseEventToContainerPoint:function(t){return Ne(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ie(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Me(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&yt,ue(t,"leaflet-container"+(xt?" leaflet-touch":"")+(Mt?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(ct?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ne(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(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),ge(this._mapPane,new z(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ue(t.markerPane,"leaflet-zoom-hide"),ue(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){ge(this._mapPane,new z(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return T(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ge(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={};var e=t?Pe:Me;e((this._targets[s(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),yt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){T(this._resizeRequest),this._resizeRequest=M((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,a=t.target||t.srcElement,r=!1;a;){if((i=this._targets[s(a)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(o&&!Ge(a,t))break;if(n.push(i),o)break}if(a===this._container)break;a=a.parentNode}return n.length||r||o||!Ge(a,t)||(n=[this]),n},_handleDOMEvent:function(t){if(this._loaded&&!Ue(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||we(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var o=i({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}if(!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,e))).length){var a=n[0];"contextmenu"===e&&a.listens(e,!0)&&Oe(t);var r={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var s=a.getLatLng&&(!a._radius||a._radius<=10);r.containerPoint=s?this.latLngToContainerPoint(a.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=s?a.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var l=0;l<n.length;l++)if(n[l].fire(e,r,!0),r.originalEvent._stopped||!1===n[l].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return ye(this._mapPane)||new z(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()}
vendor: 1,064 bytes, line 1
1,_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return N([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),o=this.getSize().divideBy(2),a=new I(n.subtract(o),n.add(o)),r=this._getBoundsOffset(a,i,e);return r.round().equals([0,0])?t:this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new I(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=N(this.project(e.getNorthEast(),i),this.project(e.getSouthWest
vendor: 11,002 bytes, line 1
1(),i)),o=n.min.subtract(t.min),a=n.max.subtract(t.max);return new z(this._rebound(o.x,-a.x),this._rebound(o.y,-a.y))},_rebound:function(t,e){return 0<t+e?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=yt?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ce(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=oe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=$t,i=this._proxy.style[e];fe(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",(function(){var t=this.getCenter(),e=this.getZoom();fe(this._proxy,this.project(t,e),this.getZoomScale(e,1))}),this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ae(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(o)||(M((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ue(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ce(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),M((function(){this._moveEnd(!0)}),this))}});function Qe(t){return new Xe(t)}var Xe=E.extend({options:{position:"topright"},initialize:function(t){_(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return ue(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(ae(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}});qe.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=oe("div",e+"control-container",this._container);function n(n,o){var a=e+n+" "+e+o;t[n+o]=oe("div",a,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ae(this._controlCorners[t]);ae(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ye=Xe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in _(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Xe.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,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(s(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ue(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?(ue(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):ce(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ce(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=oe("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Ae(e),ze(e);var n=this._section=oe("section",t+"-list");i&&(this._map.on("click",this.collapse,this),ot||Me(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=oe("a",t+"-toggle",e);o.href="#",o.title="Layers",xt?(Me(o,"click",Ie),Me(o,"click",this.expand,this)):Me(o,"focus",this.expand,this),i||this.expand(),this._baseLayersList=oe("div",t+"-base",n),this._separator=oe("div",t+"-separator",n),this._overlaysList=oe("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&s(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(a((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;re(this._baseLayersList),re(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,o=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,o+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&1<o,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(s(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+s(this),n),this._layerControlInputs.push(e),e.layerId=s(t.layer),Me(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var a=document.createElement("div");return i.appendChild(a),a.appendChild(e),a.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var a=i.length-1;0<=a;a--)t=i[a],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(a=0;a<o.length;a++)this._map.hasLayer(o[a])&&this._map.removeLayer(o[a]);for(a=0;a<n.length;a++)this._map.hasLayer(n[a])||this._map.addLayer(n[a]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),o=i.length-1;0<=o;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Ke=Xe.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=oe("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},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,e,i,n,o){var a=oe("a",i,n);return a.innerHTML=t,a.href="#",a.title=e,a.setAttribute("role","button"),a.setAttribute("aria-label",e),Ae(a),Me(a,"click",Ie),Me(a,"click",o,this),Me(a,"click",this._refocusOnMap,this),a},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ce(this._zoomInButton,e),ce(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMinZoom()||ue(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMaxZoom()||ue(this._zoomInButton,e)}});qe.mergeOptions({zoomControl:!0}),qe.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Ke,this.addControl(this.zoomControl))}));var Je=Xe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=oe("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)}
1,_addScales:function(t,e,i){t.metric&&(this._mScale=oe("div",e,i)),t.imperial&&(this._iScale=oe("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;5280<o?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(10<=i?10:5<=i?5:3<=i?3:2<=i?2:1)}}),$e=Xe.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){_(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=oe("div","leaflet-control-attribution"),Ae(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},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},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}});qe.mergeOptions({attributionControl:!0}),qe.addInitHook((function(){this.options.attributionControl&&(new $e).addTo(this)})),Xe.Layers=Ye,Xe.Zoom=Ke,Xe.Scale=Je,Xe.Attribution=$e,Qe.layers=function(t,e,i){return new Ye(t,e,i)},Qe.zoom=function(t){return new Ke(t)},Qe.scale=function(t){return new Je(t)},Qe.attribution=function(t){return new $e(t)};var ti=E.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},enabled:function(){return!!this._enabled}});ti.addTo=function(t,e){return t.addHandler(e,this),this};var ei,ii={Events:S},ni=xt?"touchstart mousedown":"mousedown",oi={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},ai={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ri=D.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){_(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(Me(this._dragStartTarget,ni,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ri._dragging===this&&this.finishDrag(),Pe(this._dragStartTarget,ni,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!he(this._element,"leaflet-zoom-anim")&&!(ri._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((ri._dragging=this)._preventOutline&&we(this._element),ke(),Qt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,i=xe(this._element);this._startPoint=new z(e.clientX,e.clientY),this._parentScale=We(i),Me(document,ai[t.type],this._onMove,this),Me(document,oi[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&1<t.touches.length)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new z(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,Oe(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=ye(this._element).subtract(i),ue(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ue(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,T(this._animRequest),this._lastEvent=t,this._animRequest=M(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ge(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in ce(document.body,"leaflet-dragging"),this._lastTarget&&(ce(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),ai)Pe(document,ai[t],this._onMove,this),Pe(document,oi[t],this._onUp,this);Le(),Xt(),this._moved&&this._moving&&(T(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,ri._dragging=!1}});function si(t,e){if(!e||!t.length)return t.slice();var i=e*e;return function(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,function t(e,i,n,o,a){var r,s,l,h=0;for(s=o+1;s<=a-1;s++)h<(l=di(e[s],e[o],e[a],!0))&&(r=s,h=l);n<h&&(i[r]=1,t(e,i,n,o,r),t(e,i,n,r,a))}(t,n,e,0,i-1);var o,a=[];for(o=0;o<i;o++)n[o]&&a.push(t[o]);return a}(t=function(t,e){for(var i=[t[0]],n=1,o=0,a=t.length;n<a;n++)r=t[n],e<(l=(s=t[o]).x-r.x)*l+(h=s.y-r.y)*h&&(i.push(t[n]),o=n);var r,s,l,h;return o<a-1&&i.push(t[a-1]),i}(t,i),i)}
vendor: 15,561 bytes, line 1
1function li(t,e,i){return Math.sqrt(di(t,e,i,!0))}function hi(t,e,i,n,o){var a,r,s,l=n?ei:ci(t,i),h=ci(e,i);for(ei=h;;){if(!(l|h))return[t,e];if(l&h)return!1;s=ci(r=ui(t,e,a=l||h,i,o),i),a===l?(t=r,l=s):(e=r,h=s)}}function ui(t,e,i,n,o){var a,r,s=e.x-t.x,l=e.y-t.y,h=n.min,u=n.max;return 8&i?(a=t.x+s*(u.y-t.y)/l,r=u.y):4&i?(a=t.x+s*(h.y-t.y)/l,r=h.y):2&i?(a=u.x,r=t.y+l*(u.x-t.x)/s):1&i&&(a=h.x,r=t.y+l*(h.x-t.x)/s),new z(a,r,o)}function ci(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function di(t,e,i,n){var o,a=e.x,r=e.y,s=i.x-a,l=i.y-r,h=s*s+l*l;return 0<h&&(1<(o=((t.x-a)*s+(t.y-r)*l)/h)?(a=i.x,r=i.y):0<o&&(a+=s*o,r+=l*o)),s=t.x-a,l=t.y-r,n?s*s+l*l:new z(a,r)}function pi(t){return!y(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function _i(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),pi(t)}var mi=(Object.freeze||Object)({simplify:si,pointToSegmentDistance:li,closestPointOnSegment:function(t,e,i){return di(t,e,i)},clipSegment:hi,_getEdgeIntersection:ui,_getBitCode:ci,_sqClosestPointOnSegment:di,isFlat:pi,_flat:_i});function fi(t,e,i){var n,o,a,r,s,l,h,u,c,d=[1,4,2,8];for(o=0,h=t.length;o<h;o++)t[o]._code=ci(t[o],e);for(r=0;r<4;r++){for(u=d[r],n=[],o=0,a=(h=t.length)-1;o<h;a=o++)s=t[o],l=t[a],s._code&u?l._code&u||((c=ui(l,s,u,e,i))._code=ci(c,e),n.push(c)):(l._code&u&&((c=ui(l,s,u,e,i))._code=ci(c,e),n.push(c)),n.push(s));t=n}return t}var gi,yi=(Object.freeze||Object)({clipPolygon:fi}),vi={project:function(t){return new z(t.lng,t.lat)},unproject:function(t){return new R(t.y,t.x)},bounds:new I([-180,-90],[180,90])},ki={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,a=Math.sqrt(1-o*o),r=a*Math.sin(n),s=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),a/2);return n=-i*Math.log(Math.max(s,1e-10)),new z(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,a=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),s=Math.PI/2-2*Math.atan(r),l=0,h=.1;l<15&&1e-7<Math.abs(h);l++)e=a*Math.sin(s),e=Math.pow((1-e)/(1+e),a/2),s+=h=Math.PI/2-2*Math.atan(r*e)-s;return new R(s*i,t.x*i/n)}},Li=(Object.freeze||Object)({LonLat:vi,Mercator:ki,SphericalMercator:H}),wi=i({},G,{code:"EPSG:3395",projection:ki,transformation:(gi=.5/(Math.PI*ki.R),q(gi,.5,-gi,.5))}),bi=i({},G,{code:"EPSG:4326",projection:vi,transformation:q(1/180,1,-1/180,.5)}),xi=i({},U,{projection:vi,transformation:q(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});U.Earth=G,U.EPSG3395=wi,U.EPSG3857=X,U.EPSG900913=Y,U.EPSG4326=bi,U.Simple=xi;var Wi=D.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[s(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[s(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",(function(){e.off(i,this)}),this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});qe.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=s(t);return this._layers[e]||((this._layers[e]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=s(t);return this._layers[e]&&(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return!!t&&s(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?y(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[s(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=s(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var o=this._zoomBoundLayers[n].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==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 Ci=Wi.extend({initialize:function(t,e){var i,n;if(_(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);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 s(t)}}),Mi=Ci.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Ci.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),Ci.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 B;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Ti=E.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){_(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var o=O(n),a=O("shadow"===e&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),a&&(t.style.marginLeft=-a.x+"px",t.style.marginTop=-a.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Mt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Pi=Ti.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 Pi.imagePath||(Pi.imagePath=this._detectIconPath()),(this.options.imagePath||Pi.imagePath)+Ti.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=oe("div","leaflet-default-icon-path",document.body),e=ne(t,"background-image")||ne(t,"backgroundImage");return document.body.removeChild(t),null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Ei=ti.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ri(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ue(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&&ce(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,a=ye(e._icon),r=i.getPixelBounds(),s=i.getPixelOrigin(),l=N(r.min._subtract(s).add(o),r.max._subtract(s).subtract(o));if(!l.contains(a)){var h=O((Math.max(l.max.x,a.x)-l.max.x)/(r.max.x-l.max.x)-(Math.min(l.min.x,a.x)-l.min.x)/(r.min.x-l.min.x),(Math.max(l.max.y,a.y)-l.max.y)/(r.max.y-l.max.y)-(Math.min(l.min.y,a.y)-l.min.y)/(r.min.y-l.min.y)).multiplyBy(n);i.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),ge(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=M(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(T(this._panRequest),this._panRequest=M(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=ye(e._icon),o=e._map.layerPointToLatLng(n);i&&ge(i,n),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){T(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Si=Wi.extend({options:{icon:new Pi,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){_(this,e),this._latlng=j(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 e=this._latlng;return this._latlng=j(t),this.update(),this.fire("move",{oldLatLng:e,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,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),ue(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),a=!1;o!==this._shadow&&(this._removeShadow(),a=!0),o&&(ue(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&a&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ae(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ae(this._shadow),this._shadow=null},_setPos:function(t){ge(this._icon,t),this._shadow&&ge(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(ue(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ei)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ei(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&&_e(this._icon,t),this._shadow&&_e(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Di=Wi.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 _(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t.hasOwnProperty("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}}),zi=Di.extend({options:{fill:!0,radius:10},initialize:function(t,e){_(this,e),this._latlng=j(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=j(t),this.redraw(),this.fire("move",{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}
vendor: 2,418 bytes, line 1
1,setStyle:function(t){var e=t&&t.radius||this._radius;return Di.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new I(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Ai=zi.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),_(this,e),this._latlng=j(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 B(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Di.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===G.distance){var o=Math.PI/180,a=this._mRadius/G.R/o,r=i.project([e+a,t]),s=i.project([e-a,t]),l=r.add(s).divideBy(2),h=i.unproject(l).lat,u=Math.acos((Math.cos(a*o)-Math.sin(e*o)*Math.sin(h*o))/(Math.cos(e*o)*Math.cos(h*o)))/o;!isNaN(u)&&0!==u||(u=a/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(u)?0:l.x-i.project([h,t-u]).x,this._radiusY=l.y-r.y}else{var c=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(c).x}this._updateBounds()}}),Oi=Di.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){_(this,e),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 e,i,n=1/0,o=null,a=di,r=0,s=this._parts.length;r<s;r++)for(var l=this._parts[r],h=1,u=l.length;h<u;h++){var c=a(t,e=l[h-1],i=l[h],!0);c<n&&(n=c,o=a(t,e,i))}return o&&(o.distance=Math.sqrt(n)),o}
vendor: 7,252 bytes, line 1
1,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,a,r,s=this._rings[0],l=s.length;if(!l)return null;for(e=t=0;t<l-1;t++)e+=s[t].distanceTo(s[t+1])/2;if(0===e)return this._map.layerPointToLatLng(s[0]);for(n=t=0;t<l-1;t++)if(o=s[t],a=s[t+1],e<(n+=i=o.distanceTo(a)))return r=(n-e)/i,this._map.layerPointToLatLng([a.x-r*(a.x-o.x),a.y-r*(a.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=j(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new B,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return pi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=pi(t),n=0,o=t.length;n<o;n++)i?(e[n]=j(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new I;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new z(t,t);this._pxBounds=new I([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,i){var n,o,a=t[0]instanceof R,r=t.length;if(a){for(o=[],n=0;n<r;n++)o[n]=this._map.latLngToLayerPoint(t[n]),i.extend(o[n]);e.push(o)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],e,i)},_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 e,i,n,o,a,r,s,l=this._parts;for(n=e=0,o=this._rings.length;e<o;e++)for(i=0,a=(s=this._rings[e]).length;i<a-1;i++)(r=hi(s[i],s[i+1],t,i,!0))&&(l[n]=l[n]||[],l[n].push(r[0]),r[1]===s[i+1]&&i!==a-2||(l[n].push(r[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=si(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,o,a,r,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,a=this._parts.length;i<a;i++)for(n=0,o=(r=(s=this._parts[i]).length)-1;n<r;o=n++)if((e||0!==n)&&li(t,s[o],s[n])<=l)return!0;return!1}});Oi._flat=_i;var Ii=Oi.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,a,r,s,l,h=this._rings[0],u=h.length;if(!u)return null;for(a=r=s=0,t=0,e=u-1;t<u;e=t++)i=h[t],n=h[e],o=i.y*n.x-n.y*i.x,r+=(i.x+n.x)*o,s+=(i.y+n.y)*o,a+=3*o;return l=0===a?h[0]:[r/a,s/a],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=Oi.prototype._convertLatLngs.call(this,t),i=e.length;return 2<=i&&e[0]instanceof R&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){Oi.prototype._setLatLngs.call(this,t),pi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return pi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new z(e,e);if(t=new I(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,a=this._rings.length;o<a;o++)(n=fi(this._rings[o],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,o,a,r,s,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,s=this._parts.length;o<s;o++)for(a=0,r=(l=(e=this._parts[o]).length)-1;a<l;r=a++)i=e[a],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(h=!h);return h||Oi.prototype._containsPoint.call(this,t,!0)}}),Ni=Mi.extend({initialize:function(t,e){_(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=y(t)?t:t.features;if(o){for(e=0,i=o.length;e<i;e++)((n=o[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var a=this.options;if(a.filter&&!a.filter(t))return this;var r=Bi(t,a);return r?(r.feature=Gi(t),r.defaultOptions=r.options,this.resetStyle(r),a.onEachFeature&&a.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function Bi(t,e){var i,n,o,a,r="Feature"===t.type?t.geometry:t,s=r?r.coordinates:null,l=[],h=e&&e.pointToLayer,u=e&&e.coordsToLatLng||Fi;if(!s&&!r)return null;switch(r.type){case"Point":return i=u(s),h?h(t,i):new Si(i);case"MultiPoint":for(o=0,a=s.length;o<a;o++)i=u(s[o]),l.push(h?h(t,i):new Si(i));return new Mi(l);case"LineString":case"MultiLineString":return n=Ri(s,"LineString"===r.type?0:1,u),new Oi(n,e);case"Polygon":case"MultiPolygon":return n=Ri(s,"Polygon"===r.type?1:2,u),new Ii(n,e);case"GeometryCollection":for(o=0,a=r.geometries.length;o<a;o++){var c=Bi({geometry:r.geometries[o],type:"Feature",properties:t.properties},e);c&&l.push(c)}return new Mi(l);default:throw new Error("Invalid GeoJSON object.")}}function Fi(t){return new R(t[1],t[0],t[2])}function Ri(t,e,i){for(var n,o=[],a=0,r=t.length;a<r;a++)n=e?Ri(t[a],e-1,i):(i||Fi)(t[a]),o.push(n);return o}function ji(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function Zi(t,e,i,n){for(var o=[],a=0,r=t.length;a<r;a++)o.push(e?Zi(t[a],e-1,i,n):ji(t[a],n));return!e&&i&&o.push(o[0]),o}function Ui(t,e){return t.feature?i({},t.feature,{geometry:e}):Gi(e)}function Gi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Hi={toGeoJSON:function(t){return Ui(this,{type:"Point",coordinates:ji(this.getLatLng(),t)})}};function Vi(t,e){return new Ni(t,e)}Si.include(Hi),Ai.include(Hi),zi.include(Hi),Oi.include({toGeoJSON:function(t){var e=!pi(this._latlngs);return Ui(this,{type:(e?"Multi":"")+"LineString",coordinates:Zi(this._latlngs,e?1:0,!1,t)})}}),Ii.include({toGeoJSON:function(t){var e=!pi(this._latlngs),i=e&&!pi(this._latlngs[0]),n=Zi(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Ui(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Ci.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(i){e.push(i.toGeoJSON(t).geometry.coordinates)})),Ui(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(i)n.push(o.geometry);else{var a=Gi(o);"FeatureCollection"===a.type?n.push.apply(n,a.features):n.push(a)}}})),i?Ui(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var qi=Vi,Qi=Wi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""}
vendor: 4,768 bytes, line 1
1,initialize:function(t,e,i){this._url=t,this._bounds=F(e),_(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ue(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ae(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&&se(this._image),this},bringToBack:function(){return this._map&&le(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=F(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,e=this._image=t?this._url:oe("img");ue(e,"leaflet-image-layer"),this._zoomAnimated&&ue(e,"leaflet-zoom-animated"),this.options.className&&ue(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onload=a(this.fire,this,"load"),e.onerror=a(this._overlayOnError,this,"error"),!this.options.crossOrigin&&""!==this.options.crossOrigin||(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;fe(this._image,i,e)},_reset:function(){var t=this._image,e=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();ge(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){_e(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&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)}}),Xi=Qi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:oe("video");if(ue(e,"leaflet-image-layer"),this._zoomAnimated&&ue(e,"leaflet-zoom-animated"),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=a(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o<i.length;o++)n.push(i[o].src);this._url=0<i.length?n:[e.src]}else{y(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&e.style.hasOwnProperty("objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var r=0;r<this._url.length;r++){var s=oe("source");s.src=this._url[r],e.appendChild(s)}}}}),Yi=Qi.extend({_initImage:function(){var t=this._image=this._url;ue(t,"leaflet-image-layer"),this._zoomAnimated&&ue(t,"leaflet-zoom-animated"),t.onselectstart=u,t.onmousemove=u}}),Ki=Wi.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){_(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&_e(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&_e(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(_e(this._container,0),this._removeTimeout=setTimeout(a(ae,void 0,this._container),200)):ae(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=j(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&&se(this._container),this},bringToBack:function(){return this._map&&le(this._container),this}
vendor: 46,881 bytes, line 1
1,_prepareOpen:function(t,e,i){if(e instanceof Wi||(i=e,e=t),e instanceof Mi)for(var n in t._layers){e=t._layers[n];break}if(!i)if(e.getCenter)i=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");i=e.getLatLng()}return this._source=e,this.update(),i},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=O(this.options.offset),i=this._getAnchor();this._zoomAnimated?ge(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),Ji=Ki.extend({options:{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.openPopup(this),this},onAdd:function(t){Ki.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Di||this._source.on("preclick",De))},onRemove:function(t){Ki.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Di||this._source.off("preclick",De))},getEvents:function(){var t=Ki.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},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=oe("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=oe("div",t+"-content-wrapper",e);if(this._contentNode=oe("div",t+"-content",i),Ae(i),ze(this._contentNode),Me(i,"contextmenu",De),this._tipContainer=oe("div",t+"-tip-container",e),this._tip=oe("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=oe("a",t+"-close-button",e);n.href="#close",n.innerHTML="×",Me(n,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,o=this.options.maxHeight,a="leaflet-popup-scrolled";o&&o<n?(e.height=o+"px",ue(t,a)):ce(t,a),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();ge(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(ne(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new z(this._containerLeft,-i-this._containerBottom);o._add(ye(this._container));var a=t.layerPointToContainerPoint(o),r=O(this.options.autoPanPadding),s=O(this.options.autoPanPaddingTopLeft||r),l=O(this.options.autoPanPaddingBottomRight||r),h=t.getSize(),u=0,c=0;a.x+n+l.x>h.x&&(u=a.x+n-h.x+l.x),a.x-u-s.x<0&&(u=a.x-s.x),a.y+i+l.y>h.y&&(c=a.y+i-h.y+l.y),a.y-c-s.y<0&&(c=a.y-s.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),Ie(t)},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});qe.mergeOptions({closePopupOnClick:!0}),qe.include({openPopup:function(t,e,i){return t instanceof Ji||(t=new Ji(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Wi.include({bindPopup:function(t,e){return t instanceof Ji?(_(t,e),(this._popup=t)._source=this):(this._popup&&!e||(this._popup=new Ji(e,this)),this._popup.setContent(t)),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,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),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){var e=t.layer||t.target;this._popup&&this._map&&(Ie(t),e instanceof Di?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var $i=Ki.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Ki.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Ki.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Ki.prototype.getEvents.call(this);return xt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=oe("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),a=this.options.direction,r=i.offsetWidth,s=i.offsetHeight,l=O(this.options.offset),h=this._getAnchor();t="top"===a?t.add(O(-r/2+l.x,-s+l.y+h.y,!0)):"bottom"===a?t.subtract(O(r/2-l.x,-l.y,!0)):"center"===a?t.subtract(O(r/2+l.x,s/2-h.y+l.y,!0)):"right"===a||"auto"===a&&o.x<n.x?(a="right",t.add(O(l.x+h.x,h.y-s/2+l.y,!0))):(a="left",t.subtract(O(r+h.x-l.x,s/2-h.y-l.y,!0))),ce(i,"leaflet-tooltip-right"),ce(i,"leaflet-tooltip-left"),ce(i,"leaflet-tooltip-top"),ce(i,"leaflet-tooltip-bottom"),ue(i,"leaflet-tooltip-"+a),ge(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&_e(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return O(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});qe.include({openTooltip:function(t,e,i){return t instanceof $i||(t=new $i(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Wi.include({bindTooltip:function(t,e){return t instanceof $i?(_(t,e),(this._tooltip=t)._source=this):(this._tooltip&&!e||(this._tooltip=new $i(e,this)),this._tooltip.setContent(t)),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 e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),xt&&(i.click=this._openTooltip)),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(ue(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(ce(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var tn=Ti.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(re(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=O(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Ti.Default=Pi;var en=Wi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:vt,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){_(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ae(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(se(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(le(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(){return this._map&&(this._removeAllTiles(),this._update()),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=l(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 z?t:new z(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),o=0,a=i.length;o<a;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!et){_e(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var o=this._tiles[n];if(o.current&&o.loaded){var a=Math.min(1,(t-o.loaded)/200);_e(o.el,a),a<1?e=!0:(o.active?i=!0:this._onOpaqueTile(o),o.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(T(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=oe("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,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(ae(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=oe("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var n=e.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 e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ae(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var o=Math.floor(t/2),a=Math.floor(e/2),r=i-1,s=new z(+o,+a);s.z=+r;var l=this._tileCoordsToKey(s),h=this._tiles[l];return h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),n<r&&this._retainParent(o,a,r,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var a=2*e;a<2*e+2;a++){var r=new z(o,a);r.z=i+1;var s=this._tileCoordsToKey(r),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(o,a,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var o=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom)&&(o=void 0);var a=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!a||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();yt?fe(t.el,o,n):ge(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),o=e.project(t,this._tileZoom).floor(),a=e.getSize().divideBy(2*n);return new I(o.subtract(a),o.add(a))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),a=o.getCenter(),r=[],s=this.options.keepBuffer,l=new I(o.getBottomLeft().subtract([s,-s]),o.getTopRight().add([s,-s]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var u=this._tiles[h].coords;u.z===this._tileZoom&&l.contains(new z(u.x,u.y))||(this._tiles[h].current=!1)}if(1<Math.abs(i-this._tileZoom))this._setView(t,i);else{for(var c=o.min.y;c<=o.max.y;c++)for(var d=o.min.x;d<=o.max.x;d++){var p=new z(d,c);if(p.z=this._tileZoom,this._isValidTile(p)){var _=this._tiles[this._tileCoordsToKey(p)];_?_.current=!0:r.push(p)}}if(r.sort((function(t,e){return t.distanceTo(a)-e.distanceTo(a)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<r.length;d++)this._addTile(r[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return F(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i);return[e.unproject(n,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new B(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new z(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(ae(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ue(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,et&&this.options.opacity<1&&_e(t,this.options.opacity),ot&&!at&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(a(this._tileReady,this,t,null,o)),ge(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(_e(i.el,0),T(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(ue(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new z(this._wrapX?h(t.x,this._wrapX):t.x,this._wrapY?h(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new I(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),nn=en.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=_(this,e)).detectRetina&&Mt&&0<e.maxZoom&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),ot||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return Me(i,"load",a(this._tileOnLoad,this,e,i)),Me(i,"error",a(this._tileOnError,this,e,i)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:Mt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return g(this._url,i(e,this.options))},_tileOnLoad:function(t,e){et?setTimeout(a(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=u,e.onerror=u,e.complete||(e.src=k,ae(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return st||e.el.setAttribute("src",k),en.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==k))return en.prototype._tileReady.call(this,t,e,i)}});function on(t,e){return new nn(t,e)}var an=nn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var o in e)o in this.options||(n[o]=e[o]);var a=(e=_(this,e)).detectRetina&&Mt?2:1,r=this.getTileSize();n.width=r.x*a,n.height=r.y*a,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[e]=this._crs.code,nn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=N(i.project(e[0]),i.project(e[1])),o=n.min,a=n.max,r=(1.3<=this._wmsVersion&&this._crs===bi?[o.y,o.x,a.y,a.x]:[o.x,o.y,a.x,a.y]).join(","),s=nn.prototype.getTileUrl.call(this,t);return s+m(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});nn.WMS=an,on.wms=function(t,e){return new an(t,e)};var rn=Wi.extend({options:{padding:.1,tolerance:0},initialize:function(t){_(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ue(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,e){var i=this._map.getZoomScale(e,this._zoom),n=ye(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),a=this._map.project(this._center,e),r=this._map.project(t,e).subtract(a),s=o.multiplyBy(-i).add(n).add(o).subtract(r);yt?fe(this._container,s,i):ge(this._container,s)},_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,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new I(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sn=rn.extend({getEvents:function(){var t=rn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){rn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Me(t,"mousemove",l(this._onMouseMove,32,this),this),Me(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Me(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){T(this._redrawRequest),delete this._ctx,ae(this._container),Pe(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){rn.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Mt?2:1;ge(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Mt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){rn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t);var e=(this._layers[s(t)]=t)._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[s(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 e,i,n=t.options.dashArray.split(/[, ]+/),o=[];for(i=0;i<n.length;i++){if(e=Number(n[i]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||M(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new I,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_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 e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,o,a,r=t._parts,s=r.length,l=this._ctx;if(s){for(l.beginPath(),i=0;i<s;i++){for(n=0,o=r[i].length;n<o;n++)a=r[i][n],l[n?"lineTo":"moveTo"](a.x,a.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||n)/n;1!=o&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!=o&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(n)&&!this._map._draggableMoved(e)&&(i=e);i&&(Ze(t),this._fireEvent([i],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(ce(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var i,n,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(ue(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;i&&((i.prev=n)?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,(this._drawLast.next=e).next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;n&&((n.next=i)?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function ln(t){return Tt?new sn(t):null}var hn=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">')}}}(),un={_initContainer:function(){this._container=oe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(rn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=hn("shape");ue(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=hn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ae(e),t.removeInteractiveTarget(e),delete this._layers[s(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=hn("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=y(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=hn("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){se(t._container)},_bringToBack:function(t){le(t._container)}},cn=Et?hn:K,dn=rn.extend({getEvents:function(){var t=rn.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=cn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=cn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ae(this._container),Pe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){rn.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),ge(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=cn("path");t.options.className&&ue(e,t.options.className),t.options.interactive&&ue(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ae(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,J(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){se(t._path)},_bringToBack:function(t){le(t._path)}});function pn(t){return Pt||Et?new dn(t):null}Et&&dn.include(un),qe.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&ln(t)||pn(t)}});var _n=Ii.extend({initialize:function(t,e){Ii.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=F(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});dn.create=cn,dn.pointsToPath=J,Ni.geometryToLayer=Bi,Ni.coordsToLatLng=Fi,Ni.coordsToLatLngs=Ri,Ni.latLngToCoords=ji,Ni.latLngsToCoords=Zi,Ni.getFeature=Ui,Ni.asFeature=Gi,qe.mergeOptions({boxZoom:!0});var mn=ti.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(){Me(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Pe(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ae(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(),Qt(),ke(),this._startPoint=this._map.mouseEventToContainerPoint(t),Me(document,{contextmenu:Ie,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=oe("div","leaflet-zoom-box",this._container),ue(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new I(this._point,this._startPoint),i=e.getSize();ge(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(ae(this._box),ce(this._container,"leaflet-crosshair")),Xt(),Le(),Pe(document,{contextmenu:Ie,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(a(this._resetState,this),0);var e=new B(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});qe.addInitHook("addHandler","boxZoom",mn),qe.mergeOptions({doubleClickZoom:!0});var fn=ti.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});qe.addInitHook("addHandler","doubleClickZoom",fn),qe.mergeOptions({dragging:!0,inertia:!at,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var gn=ti.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ri(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))}ue(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ce(this._map._container,"leaflet-grab"),ce(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 e=F(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.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 e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,a=(n+e+i)%t-e-i,r=Math.abs(o+i)<Math.abs(a+i)?o:a;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),a=(this._lastTime-this._times[0])/1e3,r=i.easeLinearity,s=o.multiplyBy(r/a),l=s.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,l),u=s.multiplyBy(h/l),c=h/(i.inertiaDeceleration*r),d=u.multiplyBy(-c/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),M((function(){e.panBy(d,{duration:c,easeLinearity:r,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});qe.addInitHook("addHandler","dragging",gn),qe.mergeOptions({keyboard:!0,keyboardPanDelta:80});var yn=ti.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"),Me(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(),Pe(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,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e<i;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;e<i;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;e<i;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;e<i;e++)n[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;e<i;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;e<i;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){Me(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Pe(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys)n._panAnim&&n._panAnim._inProgress||(e=this._panKeys[i],t.shiftKey&&(e=O(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Ie(t)}}});qe.addInitHook("addHandler","keyboard",yn),qe.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var vn=ti.extend({addHooks:function(){Me(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Pe(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Fe(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(a(this._performZoom,this),n),Ie(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,a=i?Math.ceil(o/i)*i:o,r=t._limitZoom(e+(0<this._delta?a:-a))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});qe.addInitHook("addHandler","scrollWheelZoom",vn),qe.mergeOptions({tap:!0,tapTolerance:15});var kn=ti.extend({addHooks:function(){Me(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Pe(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Oe(t),this._fireClick=!0,1<t.touches.length)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],i=e.target;this._startPos=this._newPos=new z(e.clientX,e.clientY),i.tagName&&"a"===i.tagName.toLowerCase()&&ue(i,"leaflet-active"),this._holdTimeout=setTimeout(a((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),Me(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Pe(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;i&&i.tagName&&"a"===i.tagName.toLowerCase()&&ce(i,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new z(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}});xt&&!bt&&qe.addInitHook("addHandler","tap",kn),qe.mergeOptions({touchZoom:xt&&!
1at,bounceAtZoomLimits:!0});var Ln=ti.extend({addHooks:function(){ue(this._map._container,"leaflet-touch-zoom"),Me(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ce(this._map._container,"leaflet-touch-zoom"),Pe(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Me(document,"touchmove",this._onTouchMove,this),Me(document,"touchend",this._onTouchEnd,this),Oe(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&1<o)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1==o)return}else{var r=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1==o&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),T(this._animRequest);var s=a(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=M(s,this,!0),Oe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,T(this._animRequest),Pe(document,"touchmove",this._onTouchMove),Pe(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});qe.addInitHook("addHandler","touchZoom",Ln),qe.BoxZoom=mn,qe.DoubleClickZoom=fn,qe.Drag=gn,qe.Keyboard=yn,qe.ScrollWheelZoom=vn,qe.Tap=kn,qe.TouchZoom=Ln,Object.freeze=e,t.version="1.5.1+HEAD.2e3e0ff",t.Control=Xe,t.control=Qe,t.Browser=Dt,t.Evented=D,t.Mixin=ii,t.Util=P,t.Class=E,t.Handler=ti,t.extend=i,t.bind=a,t.stamp=s,t.setOptions=_,t.DomEvent=He,t.DomUtil=Ce,t.PosAnimation=Ve,t.Draggable=ri,t.LineUtil=mi,t.PolyUtil=yi,t.Point=z,t.point=O,t.Bounds=I,t.bounds=N,t.Transformation=V,t.transformation=q,t.Projection=Li,t.LatLng=R,t.latLng=j,t.LatLngBounds=B,t.latLngBounds=F,t.CRS=U,t.GeoJSON=Ni,t.geoJSON=Vi,t.geoJson=qi,t.Layer=Wi,t.LayerGroup=Ci,t.layerGroup=function(t,e){return new Ci(t,e)},t.FeatureGroup=Mi,t.featureGroup=function(t){return new Mi(t)},t.ImageOverlay=Qi,t.imageOverlay=function(t,e,i){return new Qi(t,e,i)},t.VideoOverlay=Xi,t.videoOverlay=function(t,e,i){return new Xi(t,e,i)},t.SVGOverlay=Yi,t.svgOverlay=function(t,e,i){return new Yi(t,e,i)},t.DivOverlay=Ki,t.Popup=Ji,t.popup=function(t,e){return new Ji(t,e)},t.Tooltip=$i,t.tooltip=function(t,e){return new $i(t,e)},t.Icon=Ti,t.icon=function(t){return new Ti(t)},t.DivIcon=tn,t.divIcon=function(t){return new tn(t)},t.Marker=Si,t.marker=function(t,e){return new Si(t,e)},t.TileLayer=nn,t.tileLayer=on,t.GridLayer=en,t.gridLayer=function(t){return new en(t)},t.SVG=dn,t.svg=pn,t.Renderer=rn,t.Canvas=sn,t.canvas=ln,t.Path=Di,t.CircleMarker=zi,t.circleMarker=function(t,e){return new zi(t,e)},t.Circle=Ai,t.circle=function(t,e,i){return new Ai(t,e,i)},t.Polyline=Oi,t.polyline=function(t,e){return new Oi(t,e)},t.Polygon=Ii,t.polygon=function(t,e){return new Ii(t,e)},t.Rectangle=_n,t.rectangle=function(t,e){return new _n(t,e)},t.Map=qe,t.map=function(t,e){return new qe(t,e)};var wn=window.L;t.noConflict=function(){return window.L=wn,this},window.L=t}));var Waymark_L=L.noConflict(); 2/* @preserve 3 * Leaflet Control Geocoder 1.10.0 4 * https://github.com/perliedman/leaflet-control-geocoder 5 * 6 * Copyright (c) 2012 sa3m (https://github.com/sa3m) 7 * Copyright (c) 2018 Per Liedman 8 * All rights reserved. 9 */this.L=this.L||{},this.Waymark_L.Control=this.Waymark_L.Control||{},this.Waymark_L.Control.Geocoder=function(t){"use strict";t=t&&Waymark_L.hasOwnProperty("default")?t.default:t;var e=0,i=/[&<>"'`]/g,n=/[&<>"'`]/,o={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};function a(t){return o[t]}function r(t,i,n,o,a){var r="_l_geocoder_"+e++;i[a||"callback"]=r,window[r]=Waymark_L.Util.bind(n,o);var s=document.createElement("script");s.type="text/javascript",s.src=t+h(i),s.id=r,document.getElementsByTagName("head")[0].appendChild(s)}function s(t,e,i){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){var t;if(200!==n.status&&304!==n.status)t="";else if("string"==typeof n.response)try{t=JSON.parse(n.response)}catch(e){t=n.response}else t=n.response;i(t)}},n.open("GET",t+h(e),!0),n.responseType="json",n.setRequestHeader("Accept","application/json"),n.send(null)}function l(t,e){return t.replace(/\{ *([\w_]+) *\}/g,(function(t,o){var r,s=e[o];return void 0===s?s="":"function"==typeof s&&(s=s(e)),null==(r=s)?"":r?(r=""+r,n.test(r)?r.replace(i,a):r):r+""}))}
9function h(t,e,i){var n=[];for(var o in t){var a=encodeURIComponent(i?o.toUpperCase():o),r=t[o];if(Waymark_L.Util.isArray(r))for(var s=0;s<r.length;s++)n.push(a+"="+encodeURIComponent(r[s]));else n.push(a+"="+encodeURIComponent(r))}return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var u=Waymark_L.Class.extend({options:{service_url:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"},initialize:function(t,e){Waymark_L.setOptions(this,e),this._accessToken=t},geocode:function(t,e,i){var n={SingleLine:t,outFields:"Addr_Type",forStorage:!1,maxLocations:10,f:"json"};this._key&&this._key.length&&(n.token=this._key),s(this.options.service_url+"/findAddressCandidates",Waymark_L.extend(n,this.options.geocodingQueryParams),(function(t){var n,o,a,r=[];if(t.candidates&&t.candidates.length)for(var s=0;s<=t.candidates.length-1;s++)n=t.candidates[s],o=Waymark_L.latLng(n.location.y,n.location.x),a=Waymark_L.latLngBounds(Waymark_L.latLng(n.extent.ymax,n.extent.xmax),Waymark_L.latLng(n.extent.ymin,n.extent.xmin)),r[s]={name:n.address,bbox:a,center:o};e.call(i,r)}))},suggest:function(t,e,i){return this.geocode(t,e,i)},reverse:function(t,e,i,n){var o={location:encodeURIComponent(t.lng)+","+encodeURIComponent(t.lat),distance:100,f:"json"};s(this.options.service_url+"/reverseGeocode",o,(function(t){var e,o=[];t&&!t.error&&(e=Waymark_L.latLng(t.location.y,t.location.x),o.push({name:t.address.Match_addr,center:e,bounds:Waymark_L.latLngBounds(e,e)})),i.call(n,o)}))}});var c=Waymark_L.Class.extend({initialize:function(t){this.key=t},geocode:function(t,e,i){r("https://dev.virtualearth.net/REST/v1/Locations",{query:t,key:this.key},(function(t){var n=[];if(t.resourceSets.length>0)for(var o=t.resourceSets[0].resources.length-1;o>=0;
9o--){var a=t.resourceSets[0].resources[o],r=a.bbox;n[o]={name:a.name,bbox:Waymark_L.latLngBounds([r[0],r[1]],[r[2],r[3]]),center:Waymark_L.latLng(a.point.coordinates)}}e.call(i,n)}),this,"jsonp")},reverse:function(t,e,i,n){r("//dev.virtualearth.net/REST/v1/Locations/"+t.lat+","+t.lng,{key:this.key},(function(t){for(var e=[],o=t.resourceSets[0].resources.length-1;o>=0;o--){var a=t.resourceSets[0].resources[o],r=a.bbox;e[o]={name:a.name,bbox:Waymark_L.latLngBounds([r[0],r[1]],[r[2],r[3]]),center:Waymark_L.latLng(a.point.coordinates)}}i.call(n,e)}),this,"jsonp")}});var d=Waymark_L.Class.extend({options:{serviceUrl:"https://maps.googleapis.com/maps/api/geocode/json",geocodingQueryParams:{},reverseQueryParams:{}},initialize:function(t,e){this._key=t,Waymark_L.setOptions(this,e),this.options.serviceUrl=this.options.service_url||this.options.serviceUrl},geocode:function(t,e,i){var n={address:t};this._key&&this._key.length&&(n.key=this._key),n=Waymark_L.Util.extend(n,this.options.geocodingQueryParams),s(this.options.serviceUrl,n,(function(t){var n,o,a,r=[];if(t.results&&t.results.length)for(var s=0;s<=t.results.length-1;s++)n=t.results[s],o=Waymark_L.latLng(n.geometry.location),a=Waymark_L.latLngBounds(Waymark_L.latLng(n.geometry.viewport.northeast),Waymark_L.latLng(n.geometry.viewport.southwest)),r[s]={name:n.formatted_address,bbox:a,center:o,properties:n.address_components};e.call(i,r)}))},reverse:function(t,e,i,n){var o={latlng:encodeURIComponent(t.lat)+","+encodeURIComponent(t.lng)};o=Waymark_L.Util.extend(o,this.options.reverseQueryParams),this._key&&this._key.length&&(o.key=this._key),s(this.options.serviceUrl,o,(function(t){var e,o,a,r=[];if(t.results&&t.results.length)for(var s=0;s<=t.results.length-1;s++)e=t.results[s],o=Waymark_L.latLng(e.geometry.location),a=Waymark_L.latLngBounds(Waymark_L.latLng(e.geometry.viewport.northeast),Waymark_L.latLng(e.geometry.viewport.southwest)),r[s]={name:e.formatted_address,bbox:a,center:o,properties:e.address_components};i.call(n,r)}))}});var p=Waymark_L.Class.extend({options:{geocodeUrl:"https://geocoder.api.here.com/6.2/geocode.json",reverseGeocodeUrl:"https://reverse.geocoder.api.here.com/6.2/reversegeocode.json",app_id:"<insert your app_id here>",app_code:"<insert your app_code here>",geocodingQueryParams:{},reverseQueryParams:{},reverseGeocodeProxRadius:null},initialize:function(t){Waymark_L.setOptions(this,t)},geocode:function(t,e,i){var n={searchtext:t,gen:9,app_id:this.options.app_id,app_code:this.options.app_code,jsonattributes:1};n=Waymark_L.Util.extend(n,this.options.geocodingQueryParams),this.getJSON(this.options.geocodeUrl,n,e,i)},reverse:function(t,e,i,n){var o=this.options.reverseGeocodeProxRadius?this.options.reverseGeocodeProxRadius:null,a=o?","+encodeURIComponent(o):"",r={prox:encodeURIComponent(t.lat)+","+encodeURIComponent(t.lng)+a,mode:"retrieveAddresses",app_id:this.options.app_id,app_code:this.options.app_code,gen:9,jsonattributes:1};r=Waymark_L.Util.extend(r,this.options.reverseQueryParams),this.getJSON(this.options.reverseGeocodeUrl,r,i,n)},getJSON:function(t,e,i,n){s(t,e,(function(t){var e,o,a,r=[];if(t.response.view&&t.response.view.length)for(var s=0;s<=t.response.view[0].result.length-1;s++)e=t.response.view[0].result[s].location,o=Waymark_L.latLng(e.displayPosition.latitude,e.displayPosition.longitude),a=Waymark_L.latLngBounds(Waymark_L.latLng(e.mapView.topLeft.latitude,e.mapView.topLeft.longitude),Waymark_L.latLng(e.mapView.bottomRight.latitude,e.mapView.bottomRight.longitude)),r[s]={name:e.address.label,bbox:a,center:o};i.call(n,r)}))}});var _=Waymark_L.Class.extend({options:{next:void 0,sizeInMeters:1e4},initialize:function(t){Waymark_L.Util.setOptions(this,t)},geocode:function(t,e,i){var n,o;if((n=t.match(/^([NS])\s*(\d{1,3}(?:\.\d*)?)\W*([EW])\s*(\d{1,3}(?:\.\d*)?)$/))?o=Waymark_L.latLng((/N/i.test(n[1])?1:-1)*parseFloat(n[2]),(/E/i.test(n[3])?1:-1)*parseFloat(n[4])):(n=t.match(/^(\d{1,3}(?:\.\d*)?)\s*([NS])\W*(\d{1,3}(?:\.\d*)?)\s*([EW])$/))?o=Waymark_L.latLng((/N/i.test(n[2])?1:-1)*parseFloat(n[1]),(/E/i.test(n[4])?1:-1)*parseFloat(n[3])):(n=t.match(/^([NS])\s*(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['â²]?\W*([EW])\s*(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['â²]?$/))?o=Waymark_L.latLng((/N/i.test(n[1])?1:-1)*(
9parseFloat(n[2])+parseFloat(n[3]/60)),(/E/i.test(n[4])?1:-1)*(parseFloat(n[5])+parseFloat(n[6]/60))):(n=t.match(/^(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['â²]?\s*([NS])\W*(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['â²]?\s*([EW])$/))?o=Waymark_L.latLng((/N/i.test(n[3])?1:-1)*(parseFloat(n[1])+parseFloat(n[2]/60)),(/E/i.test(n[6])?1:-1)*(parseFloat(n[4])+parseFloat(n[5]/60))):(n=t.match(/^([NS])\s*(\d{1,3})°?\s*(\d{1,2})['â²]?\s*(\d{1,3}(?:\.\d*)?)?["â³]?\W*([EW])\s*(\d{1,3})°?\s*(\d{1,2})['â²]?\s*(\d{1,3}(?:\.\d*)?)?["â³]?$/))?o=Waymark_L.latLng((/N/i.test(n[1])?1:-1)*(parseFloat(n[2])+parseFloat(n[3]/60+parseFloat(n[4]/3600))),(/E/i.test(n[5])?1:-1)*(parseFloat(n[6])+parseFloat(n[7]/60)+parseFloat(n[8]/3600))):(n=t.match(/^(\d{1,3})°?\s*(\d{1,2})['â²]?\s*(\d{1,3}(?:\.\d*)?)?["â³]\s*([NS])\W*(\d{1,3})°?\s*(\d{1,2})['â²]?\s*(\d{1,3}(?:\.\d*)?)?["â³]?\s*([EW])$/))?o=Waymark_L.latLng((/N/i.test(n[4])?1:-1)*(parseFloat(n[1])+parseFloat(n[2]/60+parseFloat(n[3]/3600))),(/E/i.test(n[8])?1:-1)*(parseFloat(n[5])+parseFloat(n[6]/60)+parseFloat(n[7]/3600))):(n=t.match(/^\s*([+-]?\d+(?:\.\d*)?)\s*[\s,]\s*([+-]?\d+(?:\.\d*)?)\s*$/))&&(o=Waymark_L.latLng(parseFloat(n[1]),parseFloat(n[2]))),o){var a=[{name:t,center:o,bbox:o.toBounds(this.options.sizeInMeters)}];e.call(i,a)}else this.options.next&&this.options.next.geocode(t,e,i)}});var m=Waymark_L.Class.extend({options:{serviceUrl:"https://api.mapbox.com/geocoding/v5/mapbox.places/",geocodingQueryParams:{},reverseQueryParams:{}},initialize:function(t,e){Waymark_L.setOptions(this,e),this.options.geocodingQueryParams.access_token=t,this.options.reverseQueryParams.access_token=t},geocode:function(t,e,i){var n=this.options.geocodingQueryParams;void 0!==n.proximity&&void 0!==n.proximity.lat&&void 0!==n.proximity.lng&&(n.proximity=n.proximity.lng+","+n.proximity.lat),s(this.options.serviceUrl+encodeURIComponent(t)+".json",n,(function(t){var n,o,a,r=[];if(t.features&&t.features.length)for(var s=0;s<=t.features.length-1;s++){n=t.features[s],o=Waymark_L.latLng(n.center.reverse()),a=n.bbox?Waymark_L.latLngBounds(Waymark_L.latLng(n.bbox.slice(0,2).reverse()),Waymark_L.latLng(n.bbox.slice(2,4).reverse())):Waymark_L.latLngBounds(o,o);for(var l={text:n.text,address:n.address},h=0;h<(n.context||[]).length;h++){l[n.context[h].id.split(".")[0]]=n.context[h].text}r[s]={name:n.place_name,bbox:a,center:o,properties:l}}e.call(i,r)}))},suggest:function(t,e,i){return this.geocode(t,e,i)},reverse:function(t,e,i,n){s(this.options.serviceUrl+encodeURIComponent(t.lng)+","+encodeURIComponent(t.lat)+".json",this.options.reverseQueryParams,(function(t){var e,o,a,r=[];if(t.features&&t.features.length)for(var s=0;s<=t.features.length-1;s++)e=t.features[s],o=Waymark_L.latLng(e.center.reverse()),a=e.bbox?Waymark_L.latLngBounds(Waymark_L.latLng(e.bbox.slice(0,2).reverse()),Waymark_L.latLng(e.bbox.slice(2,4).reverse())):Waymark_L.latLngBounds(o,o),r[s]={name:e.place_name,bbox:a,center:o};i.call(n,r)}))}});var f=Waymark_L.Class.extend({options:{serviceUrl:"https://www.mapquestapi.com/geocoding/v1"},initialize:function(t,e){this._key=decodeURIComponent(t),Waymark_L.Util.setOptions(this,e)},_formatName:function(){var t,e=[];for(t=0;t<arguments.length;t++)arguments[t]&&e.push(arguments[t]);return e.join(", ")},geocode:function(t,e,i){s(this.options.serviceUrl+"/address",{key:this._key,location:t,limit:5,outFormat:"json"},Waymark_L.bind((function(t){var n,o,a=[];if(t.results&&t.results[0].locations)for(var r=t.results[0].locations.length-1;r>=0;r--)n=t.results[0].locations[r],o=Waymark_L.latLng(n.latLng),a[r]={name:this._formatName(n.street,n.adminArea4,n.adminArea3,n.adminArea1),bbox:Waymark_L.latLngBounds(o,o),center:o};e.call(i,a)}),this))},reverse:function(t,e,i,n){s(this.options.serviceUrl+"/reverse",{key:this._key,location:t.lat+","+t.lng,outputFormat:"json"},Waymark_L.bind((function(t){var e,o,a=[];if(t.results&&t.results[0].locations)for(var r=t.results[0].locations.length-1;r>=0;r--)e=t.results[0].locations[r],o=Waymark_L.latLng(e.latLng),a[r]={name:this._formatName(e.street,e.adminArea4,e.adminArea3,e.adminArea1),bbox:Waymark_L.latLngBounds(o,o),center:o};i.call(n,a)}),this))}});var g=Waymark_L.Class.extend({options:{userId:"<insert your userId here>",apiKey:"<insert your apiKey here>",serviceUrl:"https://neutrinoapi.com/"},initialize:function(t){Waymark_L.Util.setOptions(this,t)}
9,geocode:function(t,e,i){s(this.options.serviceUrl+"geocode-address",{apiKey:this.options.apiKey,userId:this.options.userId,address:t.split(/\s+/).join(".")},(function(t){var n,o,a=[];t.locations&&(t.geometry=t.locations[0],n=Waymark_L.latLng(t.geometry.latitude,t.geometry.longitude),o=Waymark_L.latLngBounds(n,n),a[0]={name:t.geometry.address,bbox:o,center:n}),e.call(i,a)}))},suggest:function(t,e,i){return this.geocode(t,e,i)},reverse:function(t,e,i,n){s(this.options.serviceUrl+"geocode-reverse",{apiKey:this.options.apiKey,userId:this.options.userId,latitude:t.lat,longitude:t.lng},(function(e){var o,a,r=[];200==e.status.status&&e.found&&(o=Waymark_L.latLng(t.lat,t.lng),a=Waymark_L.latLngBounds(o,o),r[0]={name:e.address,bbox:a,center:o}),i.call(n,r)}))}});var y=Waymark_L.Class.extend({options:{serviceUrl:"https://nominatim.openstreetmap.org/",geocodingQueryParams:{},reverseQueryParams:{},htmlTemplate:function(t){var e=t.address,i=[];return(e.road||e.building)&&i.push("{building} {road} {house_number}"),(e.city||e.town||e.village||e.hamlet)&&i.push('<span class="'+(i.length>0?"leaflet-control-geocoder-address-detail":"")+'">{postcode} {city} {town} {village} {hamlet}</span>'),(e.state||e.country)&&i.push('<span class="'+(i.length>0?"leaflet-control-geocoder-address-context":"")+'">{state} {country}</span>'),l(i.join("<br/>"),e)}},initialize:function(t){Waymark_L.Util.setOptions(this,t)},geocode:function(t,e,i){s(this.options.serviceUrl+"search",Waymark_L.extend({q:t,limit:5,format:"json",addressdetails:1},this.options.geocodingQueryParams),Waymark_L.bind((function(t){for(var n=[],o=t.length-1;o>=0;o--){for(var a=t[o].boundingbox,r=0;r<4;r++)a[r]=parseFloat(a[r]);n[o]={icon:t[o].icon,name:t[o].display_name,html:this.options.htmlTemplate?this.options.htmlTemplate(t[o]):void 0,bbox:Waymark_L.latLngBounds([a[0],a[2]],[a[1],a[3]]),center:Waymark_L.latLng(t[o].lat,t[o].lon),properties:t[o
9]}}e.call(i,n)}),this))},reverse:function(t,e,i,n){s(this.options.serviceUrl+"reverse",Waymark_L.extend({lat:t.lat,lon:t.lng,zoom:Math.round(Math.log(e/256)/Math.log(2)),addressdetails:1,format:"json"},this.options.reverseQueryParams),Waymark_L.bind((function(t){var e,o=[];t&&t.lat&&t.lon&&(e=Waymark_L.latLng(t.lat,t.lon),o.push({name:t.display_name,html:this.options.htmlTemplate?this.options.htmlTemplate(t):void 0,center:e,bounds:Waymark_L.latLngBounds(e,e),properties:t})),i.call(n,o)}),this))}});var v=Waymark_L.Class.extend({options:{OpenLocationCode:void 0,codeLength:void 0},initialize:function(t){Waymark_L.setOptions(this,t)},geocode:function(t,e,i){try{var n=this.options.OpenLocationCode.decode(t),o={name:t,center:Waymark_L.latLng(n.latitudeCenter,n.longitudeCenter),bbox:Waymark_L.latLngBounds(Waymark_L.latLng(n.latitudeLo,n.longitudeLo),Waymark_L.latLng(n.latitudeHi,n.longitudeHi))};e.call(i,[o])}catch(t){console.warn(t),e.call(i,[])}},reverse:function(t,e,i,n){try{var o={name:this.options.OpenLocationCode.encode(t.lat,t.lng,this.options.codeLength),center:Waymark_L.latLng(t.lat,t.lng),bbox:Waymark_L.latLngBounds(Waymark_L.latLng(t.lat,t.lng),Waymark_L.latLng(t.lat,t.lng))};i.call(n,[o])}catch(t){console.warn(t),i.call(n,[])}}});var k=Waymark_L.Class.extend({options:{serviceUrl:"https://api.opencagedata.com/geocode/v1/json"},initialize:function(t){this._accessToken=t},geocode:function(t,e,i){s(this.options.serviceUrl,{key:this._accessToken,q:t},(function(t){var n,o,a,r=[];if(t.results&&t.results.length)for(var s=0;s<t.results.length;s++)a=t.results[s],n=Waymark_L.latLng(a.geometry),o=a.annotations&&a.annotations.bounds?Waymark_L.latLngBounds(Waymark_L.latLng(a.annotations.bounds.northeast),Waymark_L.latLng(a.annotations.bounds.southwest)):Waymark_L.latLngBounds(n,n),r.push({name:a.formatted,bbox:o,center:n});e.call(i,r)}))},suggest:function(t,e,i){return this.geocode(t,e,i)},reverse:function(t,e,i,n){s(this.options.serviceUrl,{key:this._accessToken,q:[t.lat,t.lng].join(",")},(function(t){var e,o,a,r=[];if(t.results&&t.results.length)for(var s=0;s<t.results.length;s++)a=t.results[s],e=Waymark_L.latLng(a.geometry),o=a.annotations&&a.annotations.bounds?Waymark_L.latLngBounds(Waymark_L.latLng(a.annotations.bounds.northeast),Waymark_L.latLng(a.annotations.bounds.southwest)):Waymark_L.latLngBounds(e,e),r.push({name:a.formatted,bbox:o,center:e});i.call(n,r)}))}});var L=Waymark_L.Class.extend({options:{serviceUrl:"https://api.geocode.earth/v1",geocodingQueryParams:{},reverseQueryParams:{}},initialize:function(t,e){Waymark_L.Util.setOptions(this,e),this._apiKey=t,this._lastSuggest=0},geocode:function(t,e,i){var n=this;s(this.options.serviceUrl+"/search",Waymark_L.extend({api_key:this._apiKey,text:t},this.options.geocodingQueryParams),(function(t){e.call(i,n._parseResults(t,"bbox"))}))},suggest:function(t,e,i){var n=this;s(this.options.serviceUrl+"/autocomplete",Waymark_L.extend({api_key:this._apiKey,text:t},this.options.geocodingQueryParams),Waymark_L.bind((function(t){t.geocoding.timestamp>this._lastSuggest&&(this._lastSuggest=t.geocoding.timestamp,e.call(i,n._parseResults(t,"bbox")))}),this))},reverse:function(t,e,i,n){var o=this;s(this.options.serviceUrl+"/reverse",Waymark_L.extend({api_key:this._apiKey,"point.lat":t.lat,"point.lon":t.lng},this.options.reverseQueryParams),(function(t){i.call(n,o._parseResults(t,"bounds"))}))},_parseResults:function(t,e){var i=[];return Waymark_L.geoJson(t,{pointToLayer:function(t,e){return Waymark_L.circleMarker(e)},onEachFeature:function(t,n){var o,a,r={};n.getBounds?a=(o=n.getBounds()).getCenter():n.feature.bbox?(a=n.getLatLng(),o=Waymark_L.latLngBounds(Waymark_L.GeoJSON.coordsToLatLng(n.feature.bbox.slice(0,2)),Waymark_L.GeoJSON.coordsToLatLng(n.feature.bbox.slice(2,4)))):(a=n.getLatLng(),o=Waymark_L.latLngBounds(a,a)),r.name=n.feature.properties.label,r.center=a,r[e]=o,r.properties=n.feature.properties,i.push(r)}}),i}});function w(t,e){return new L(t,e)}var b=L,x=w,W=L,C=w,M=W.extend({options:{serviceUrl:"https://api.openrouteservice.org/geocode"}});var T=Waymark_L.Class.extend({options:{serviceUrl:"https://photon.komoot.de/api/",reverseUrl:"https://photon.komoot.de/reverse/",nameProperties:["name","street","suburb","hamlet","town","city","state","country"]},initialize:function(t){Waymark_L.setOptions(this,t)}
9,geocode:function(t,e,i){var n=Waymark_L.extend({q:t},this.options.geocodingQueryParams);s(this.options.serviceUrl,n,Waymark_L.bind((function(t){e.call(i,this._decodeFeatures(t))}),this))},suggest:function(t,e,i){return this.geocode(t,e,i)},reverse:function(t,e,i,n){var o=Waymark_L.extend({lat:t.lat,lon:t.lng},this.options.reverseQueryParams);s(this.options.reverseUrl,o,Waymark_L.bind((function(t){i.call(n,this._decodeFeatures(t))}),this))},_decodeFeatures:function(t){var e,i,n,o,a,r,s=[];if(t&&t.features)for(e=0;e<t.features.length;e++)n=(i=t.features[e]).geometry.coordinates,o=Waymark_L.latLng(n[1],n[0]),r=(a=i.properties.extent)?Waymark_L.latLngBounds([a[1],a[0]],[a[3],a[2]]):Waymark_L.latLngBounds(o,o),s.push({name:this._decodeFeatureName(i),html:this.options.htmlTemplate?this.options.htmlTemplate(i):void 0,center:o,bbox:r,properties:i.properties});return s},_decodeFeatureName:function(t){return(this.options.nameProperties||[]).map((function(e){return t.properties[e]})).filter((function(t){return!!t})).join(", ")}});var P=Waymark_L.Class.extend({options:{serviceUrl:"https://api.what3words.com/v2/"},initialize:function(t){this._accessToken=t},geocode:function(t,e,i){s(this.options.serviceUrl+"forward",{key:this._accessToken,addr:t.split(/\s+/).join(".")},(function(t){var n,o,a=[];t.geometry&&(n=Waymark_L.latLng(t.geometry.lat,t.geometry.lng),o=Waymark_L.latLngBounds(n,n),a[0]={name:t.words,bbox:o,center:n}),e.call(i,a)}))},suggest:function(t,e,i){return this.geocode(t,e,i)},reverse:function(t,e,i,n){s(this.options.serviceUrl+"reverse",{key:this._accessToken,coords:[t.lat,t.lng].join(",")},(function(t){var e,o,a=[];200==t.status.status&&(e=Waymark_L.latLng(t.geometry.lat,t.geometry.lng),o=Waymark_L.latLngBounds(e,e),a[0]={name:t.words,bbox:o,center:e}),i.call(n,a)}))}});var E=Object.freeze({ArcGis:u,arcgis:function(t,e){return new u(t,e)},Bing:c,bing:function(t){return new c(t)},Google:d,google:function(t,e){return new d(t,e)},HERE:p,here:function(t){return new p(t)},LatLng:_,latLng:function(t){return new _(t)},Mapbox:m,mapbox:function(t,e){return new m(t,e)},MapQuest:f,mapQuest:function(t,e){return new f(t,e)},Neutrino:g,neutrino:function(t){return new g(t)},Nominatim:y,nominatim:function(t){return new y(t)},OpenLocationCode:v,openLocationCode:function(t){return new v(t)},OpenCage:k,opencage:function(t){return new k(t)},Pelias:L,pelias:w,GeocodeEarth:b,geocodeEarth:x,Mapzen:W,mapzen:C,Openrouteservice:M,openrouteservice:function(t,e){return new M(t,e)},Photon:T,photon:function(t){return new T(t)},What3Words:P,what3words:function(t){return new P(t)}}),S=Waymark_L.Control.extend({options:{showUniqueResult:!0,showResultIcons:!1,collapsed:!0,expand:"touch",position:"topright",placeholder:"Search...",errorMessage:"Nothing found.",queryMinLength:1,suggestMinLength:3,suggestTimeout:250,defaultMarkGeocode:!0},includes:Waymark_L.Evented.prototype||Waymark_L.Mixin.Events,initialize:function(t){Waymark_L.Util.setOptions(this,t),this.options.geocoder||(this.options.geocoder=new y),this._requestCount=0},addThrobberClass:function(){Waymark_L.DomUtil.addClass(this._container,"leaflet-control-geocoder-throbber")},removeThrobberClass:function(){Waymark_L.DomUtil.removeClass(this._container,"leaflet-control-geocoder-throbber")},onAdd:function(t){var e,i="leaflet-control-geocoder",n=Waymark_L.DomUtil.create("div",i+" leaflet-bar"),o=Waymark_L.DomUtil.create("button",i+"-icon",n),a=this._form=Waymark_L.DomUtil.create("div",i+"-form",n);return this._map=t,this._container=n,o.innerHTML=" ",o.type="button",(e=this._input=Waymark_L.DomUtil.create("input","",a)).type="text",e.placeholder=this.options.placeholder,Waymark_L.DomEvent.disableClickPropagation(e),this._errorElement=Waymark_L.DomUtil.create("div",i+"-form-no-error",n),this._errorElement.innerHTML=this.options.errorMessage,this._alts=Waymark_L.DomUtil.create("ul",i+"-alternatives leaflet-control-geocoder-alternatives-minimized",n),Waymark_L.DomEvent.disableClickPropagation(this._alts),Waymark_L.DomEvent.addListener(e,"keydown",this._keydown,this),this.options.geocoder.suggest&&Waymark_L.DomEvent.addListener(e,"input",this._change,this),Waymark_L.DomEvent.addListener(e,"blur",(function(){this.options.collapsed&&!this._preventBlurCollapse&&this._collapse(),this._preventBlurCollapse=!1}),this),this.options.collapsed?"click"===this.options.expand?Waymark_L.DomEvent.addListener(n,"click",(function(t){0===t.button&&2!==t.detail&&this._toggle()}),this):Waymark_L.Browser.touch&&"touch"===this.options.expand?Waymark_L.DomEvent.addListener(n,"touchstart mousedown",(function(t){this._toggle(),t.preventDefault(),t.stopPropagation()}),this):(Waymark_L.DomEvent.addListener(n,"mouseover",this._expand,this),Waymark_L.DomEvent.addListener(n,"mouseout",this._collapse,this),this._map.on("movestart",this._collapse,this)):(this._expand(),Waymark_L.Browser.touch?Waymark_L.DomEvent.addListener(n,"touchstart",(function(){this._geocode()}),this):Waymark_L.DomEvent.addListener(n,"click",(function(){this._geocode()}),this)),this.options.defaultMarkGeocode&&this.on("markgeocode",this.markGeocode,this),this.on("startgeocode",this.addThrobberClass,this),this.on("finishgeocode",this.removeThrobberClass,this),this.on("startsuggest",this.addThrobberClass,this),this.on("finishsuggest",this.removeThrobberClass,this),Waymark_L.DomEvent.disableClickPropagation(n),n},_geocodeResult:function(t,e){if(!e&&this.options.showUniqueResult&&1===t.length)this._geocodeResultSelected(t[0]);else if(t.length>0){this._alts.innerHTML="",this._results=t,Waymark_L.DomUtil.removeClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),Waymark_L.DomUtil.addClass(this._container,"leaflet-control-geocoder-options-open");for(var i=0;i<t.length;i++)this._alts.appendChild(this._createAlt(t[i],i))}else Waymark_L.DomUtil.addClass(this._container,"leaflet-control-geocoder-options-error"),Waymark_L.DomUtil.addClass(this._errorElement,"leaflet-control-geocoder-error")},markGeocode:function(t){return t=t.geocode||t,this._map.fitBounds(t.bbox),this._geocodeMarker&&this._map.removeLayer(this._geocodeMarker),this._geocodeMarker=new Waymark_L.Marker(t.center).bindPopup(t.html||t.name).addTo(this._map).openPopup(),this},_geocode:function(t){var e=this._input.value;if(t||!(e.length<this.options.queryMinLength)){var i=++this._requestCount,n=t?"suggest":"geocode",o={input:e};this._lastGeocode=e,t||this._clearResults(),this.fire("start"+n,o),this.options.geocoder[n](e,(function(e){i===this._requestCount&&(o.results=e,this.fire("finish"+n,o),this._geocodeResult(e,t))}),this)}},_geocodeResultSelected:function(t){this.fire("markgeocode",{geocode:t})},_toggle:function(){Waymark_L.DomUtil.hasClass(this._container,"leaflet-control-geocoder-expanded")?this._collapse():this._expand()},_expand:function(){Waymark_L.DomUtil.addClass(this._container,"leaflet-control-geocoder-expanded"),this._input.select(),this.fire("exp
9and")},_collapse:function(){Waymark_L.DomUtil.removeClass(this._container,"leaflet-control-geocoder-expanded"),Waymark_L.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),Waymark_L.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error"),Waymark_L.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-open"),Waymark_L.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-error"),this._input.blur(),this.fire("collapse")},_clearResults:function(){Waymark_L.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),this._selection=null,Waymark_L.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error"),Waymark_L.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-open"),Waymark_L.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-error")},_createAlt:function(t,e){var i=Waymark_L.DomUtil.create("li",""),n=Waymark_L.DomUtil.create("a","",i),o=this.options.showResultIcons&&t.icon?Waymark_L.DomUtil.create("img","",n):null,a=t.html?void 0:document.createTextNode(t.name);return o&&(o.src=t.icon),i.setAttribute("data-result-index",e),t.html?n.innerHTML=n.innerHTML+t.html:n.appendChild(a),Waymark_L.DomEvent.addListener(i,"mousedown touchstart",(function(e){this._preventBlurCollapse=!0,Waymark_L.DomEvent.stop(e),this._geocodeResultSelected(t),Waymark_L.DomEvent.on(i,"click",(function(){this.options.collapsed?this._collapse():this._clearResults()}),this)}),this),i},_keydown:function(t){var e=this,i=function(t){e._selection&&(Waymark_L.DomUtil.removeClass(e._selection,"leaflet-control-geocoder-selected"),e._selection=e._selection[t>0?"nextSibling":"previousSibling"]),e._selection||(e._selection=e._alts[t>0?"firstChild":"lastChild"]),e._selection&&Waymark_L.DomUtil.addClass(e._selection,"leaflet-control-geocoder-selected")};switch(t.keyCode){case 27:this.options.collapsed?this._collapse():this._clearResults();break;case 38:i(-1);break;case 40:i(1);break;case 13:if(this._selection){var n=parseInt(this._selection.getAttribute("data-result-index"),10);this._geocodeResultSelected(this._results[n]),this._clearResults()}else this._geocode();break;default:return}Waymark_L.DomEvent.preventDefault(t)},_change:function(){var t=this._input.value;t!==this._lastGeocode&&(clearTimeout(this._suggestTimeout),t.length>=this.options.suggestMinLength?this._suggestTimeout=setTimeout(Waymark_L.bind((function(){this._geocode(!0)}),this),this.options.suggestTimeout):this._clearResults())}});return Waymark_L.Util.extend(S,E),Waymark_L.Util.extend(Waymark_L.Control,{Geocoder:S,geocoder:function(t){return new S(t)}}),S}(L),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).DOMPurify=e()}(this,(function(){"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function e(e,i){return function(t){if(Array.isArray(t))return t}(e)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,o,a,r,s=[],l=!0,h=!1;try{if(a=(i=i.call(t)).next,0===e);else for(;!(l=(n=a.call(i)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){h=!0,o=t}finally{try{if(!l&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(h)throw o}}return s}}(e,i)||function(e,i){if(e){if("string"==typeof e)return t(e,i);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,i):void 0}}(e,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const i=Object.entries,n=Object.setPrototypeOf,o=Object.isFrozen,a=Object.getPrototypeOf,r=Object.getOwnPropertyDescriptor;let s=Object.freeze,l=Object.seal,h=Object.create,u="undefined"!=typeof Reflect&&Reflect,c=u.apply,d=u.construct;s||(s=function(t){return t}),l||(l=function(t){return t}),c||(c=function(t,e){for(var i=arguments.length,n=new Array(i>2?i-2:0),o=2;o<i;o++)n[o-2]=arguments[o];return t.apply(e,n)}),d||(d=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return new t(...i)});const p=A(Array.prototype.forEach),_=A(Array.prototype.lastIndexOf),m=A(Array.prototype.pop),f=A(Array.prototype.push),g=A(Array.prototype.splice),y=Array.isArray,v=A(String.prototype.toLowerCase),k=A(String.prototype.toString),L=A(String.prototype.match),w=A(String.prototype.replace),b=A(String.prototype.indexOf),x=A(String.prototype.trim),W=A(Number.prototype.toString),C=A(Boolean.prototype.toString),M="undefined"==typeof BigInt?null:A(BigInt.prototype.toString),T="undefined"==typeof Symbol?null:A(Symbol.prototype.toString),P=A(Object.prototype.hasOwnProperty),E=A(Object.prototype.toString),S=A(RegExp.prototype.test),D=(z=TypeError,function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return d(z,e)});var z;function A(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return c(t,e,n)}}function O(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;if(n&&n(t,null),!y(e))return t;let a=e.length;for(;a--;){let n=e[a];if("string"==typeof n){const t=i(n);t!==n&&(o(e)||(e[a]=t),n=t)}t[n]=!0}return t}function I(t){for(let e=0;e<t.length;e++)P(t,e)||(t[e]=null);return t}function N(t){const n=h(null);for(const a of i(t)){var o=e(a,2);const i=o[0],r=o[1];
vendor: 6,682 bytes, line 9
9P(t,i)&&(y(r)?n[i]=I(r):r&&"object"==typeof r&&r.constructor===Object?n[i]=N(r):n[i]=r)}return n}function B(t,e){for(;null!==t;){const i=r(t,e);if(i){if(i.get)return A(i.get);if("function"==typeof i.value)return A(i.value)}t=a(t)}return function(){return null}}const F=s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),j=s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Z=s(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),U=s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),G=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),H=s(["#text"]),V=s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),q=s(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Q=s(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","
9subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),X=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Y=l(/{{[\w\W]*|^[\w\W]*}}/g),K=l(/<%[\w\W]*|^[\w\W]*%>/g),J=l(/\${[\w\W]*/g),$=l(/^data-[\-\w.\u00B7-\uFFFF]+$/),tt=l(/^aria-[\-\w]+$/),et=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),it=l(/^(?:\w+script|data):/i),nt=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ot=l(/^html$/i),at=l(/^[a-z][.\w]*(-[.\w]+)+$/i),rt=l(/<[/\w!]/g),st=l(/<[/\w]/g),lt=l(/<\/no(script|embed|frames)/i),ht=l(/\/>/i),ut=function(){return"undefined"==typeof window?null:window},ct=function(t,e,i,n){return P(t,e)&&y(t[e])?O(n.base?N(n.base):{},t[e],n.transform):i};return function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ut();const n=e=>t(e);if(n.version="3.4.13",n.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return n.isSupported=!1,n;let o=e.document;const a=o,r=a.currentScript;e.DocumentFragment;const u=e.HTMLTemplateElement,c=e.Node,d=e.Element,z=e.NodeFilter,A=e.NamedNodeMap;void 0===A&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const I=e.DOMParser,dt=e.trustedTypes,pt=d.prototype,_t=B(pt,"cloneNode"),mt=B(pt,"remove"),ft=B(pt,"nextSibling"),gt=B(pt,"childNodes"),yt=B(pt,"parentNode"),vt=B(pt,"shadowRoot"),kt=B(pt,"attributes"),Lt=c&&c.prototype?B(c.prototype,"nodeType"):null,wt=c&&c.prototype?B(c.prototype,"nodeName"):null,bt=c&&c.prototype?B(c.prototype,"ownerDocument"):null;if("function"==typeof u){const t=o.createElement("template");t.content&&t.content.ownerDocument&&(o=t.content.ownerDocument)}let xt,Wt,Ct="",Mt=!1,Tt=0;const Pt=function(){if(Tt>0)throw D('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Et=function(t){Pt(),Tt++;try{return xt.createHTML(t)}finally{Tt--}},St=function(){return Mt||(Wt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let i=null;
vendor: 4,674 bytes, line 9
9const n="data-tt-policy-suffix";e&&e.hasAttribute(n)&&(i=e.getAttribute(n));const o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(dt,r),Mt=!0),Wt},Dt=o,zt=Dt.implementation,At=Dt.createNodeIterator,Ot=Dt.createDocumentFragment,It=Dt.getElementsByTagName,Nt=a.importNode;let Bt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof i&&"function"==typeof yt&&zt&&void 0!==zt.createHTMLDocument;const Ft=Y,Rt=K,jt=J,Zt=$,Ut=tt,Gt=it,Ht=nt,Vt=at;let qt=et,Qt=null;const Xt=O({},[...F,...R,...j,...U,...H]);let Yt=null;const Kt=O({},[...V,...q,...Q,...X]);let Jt=Object.seal(h(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$t=null,te=null;const ee=Object.seal(h(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ie=!0,ne=!0,oe=!1,ae=!0,re=!1,se=!0,le=!1,he=!1,ue=null,ce=null,de=!1,pe=!1,_e=!1,me=!1,fe=!0,ge=!1;const ye="user-content-";let ve=!0,ke=!1,Le={},we=null;const be=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let xe=null;const We=O({},["audio","video","img","source","image","track"]);let Ce=null;const Me=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Te="http://www.w3.org/1998/Math/MathML",Pe="http://www.w3.org/2000/svg",Ee="http://www.w3.org/1999/xhtml";let Se=Ee,De=!1,ze=null;const Ae=O({},[Te,Pe,Ee],k),Oe=s(["mi","mo","mn","ms","mtext"]);let Ie=O({},Oe);const Ne=s(["annotation-xml"]);let Be=O({},Ne);const Fe=O({},["title","style","font","a","script"]);let Re=null;const je=["application/xhtml+xml","text/html"];let Ze=null,Ue=null;const Ge=o.createElement("form"),He=function(t){return t instanceof RegExp||t instanceof Function},Ve=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Ue&&Ue===t)return;t&&"object"==typeof t||(t={}),t=N(t),Re=-1===je.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,Ze="application/xhtml+xml"===Re?k:v,Qt=ct(t,"ALLOWED_TAGS",Xt,{transform:Ze}),Yt=ct(t,"ALLOWED_ATTR",Kt,{transform:Ze}),ze=ct(t,"ALLOWED_NAMESPACES",Ae,{transform:k}),Ce=ct(t,"ADD_URI_SAFE_ATTR",Me,{transform:Ze,base:Me}),xe=ct(t,"ADD_DATA_URI_TAGS",We,{transform:Ze,base:We}),we=ct(t,"FORBID_CONTENTS",be,{transform:Ze}),$t=ct(t,"FORBID_TAGS",N({}),{transform:Ze}),te=ct(t,"FORBID_ATTR",N({}),{transform:Ze}),Le=!!P(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?N(t.USE_PROFILES):t.USE_PROFILES),ie=!1!==t.ALLOW_ARIA_ATTR,ne=!1!==t.ALLOW_DATA_ATTR,oe=t.ALLOW_UNKNOWN_PROTOCOLS||!1,ae=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,re=t.SAFE_FOR_TEMPLATES||!1,se=!1!==t.SAFE_FOR_XML,le=t.WHOLE_DOCUMENT||!1,pe=t.RETURN_DOM||!1,_e=t.RETURN_DOM_FRAGMENT||!1,me=t.RETURN_TRUSTED_TYPE||!1,de=t.FORCE_BODY||!1,fe=!1!==t.SANITIZE_DOM,ge=t.SANITIZE_NAMED_PROPS||!1,ve=!1!==t.KEEP_CONTENT,ke=t.IN_PLACE||!1,qt=function(t){try{return S(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:et,Se="string"==typeof t.NAMESPACE?t.NAMESPACE:Ee,Ie=P(t,"MATHML_TEXT_INTEGRATION_POINTS")&&t.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof t.MATHML_TEXT_INTEGRATION_POINTS?N(t.MATHML_TEXT_INTEGRATION_POINTS):O({},Oe),Be=P(t,"HTML_INTEGRATION_POINTS")&&t.HTML_INTEGRATION_POINTS&&"object"==typeof t.HTML_INTEGRATION_POINTS?N(t.HTML_INTEGRATION_POINTS):O({},Ne);const e=P(t,"CUSTOM_ELEMENT_HANDLING")&&t.CUSTOM_ELEMENT_HANDLING&&"object"==typeof t.CUSTOM_ELEMENT_HANDLING?N(t.CUSTOM_ELEMENT_HANDLING):h(null);if(Jt=h(null),P(e,"tagNameCheck")&&He(e.tagNameCheck)&&(Jt.tagNameCheck=e.tagNameCheck),P(e,"attributeNameCheck")&&He(e.attributeNameCheck)&&(Jt.attributeNameCheck=e.attributeNameCheck),P(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(Jt.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),l(Jt),re&&(ne=!1),_e&&(pe=!0),Le&&(Qt=O({},H),Yt=h(null),!0===Le.html&&(O(Qt,F),O(Yt,V)),!0===Le.svg&&(O(Qt,R),O(Yt,q),O(Yt,X)),!0===Le.svgFilters&&
vendor: 4,834 bytes, line 9
9(O(Qt,j),O(Yt,q),O(Yt,X)),!0===Le.mathMl&&(O(Qt,U),O(Yt,Q),O(Yt,X))),ee.tagCheck=null,ee.attributeCheck=null,P(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?ee.tagCheck=t.ADD_TAGS:y(t.ADD_TAGS)&&(Qt===Xt&&(Qt=N(Qt)),O(Qt,t.ADD_TAGS,Ze))),P(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?ee.attributeCheck=t.ADD_ATTR:y(t.ADD_ATTR)&&(Yt===Kt&&(Yt=N(Yt)),O(Yt,t.ADD_ATTR,Ze))),P(t,"ADD_URI_SAFE_ATTR")&&y(t.ADD_URI_SAFE_ATTR)&&O(Ce,t.ADD_URI_SAFE_ATTR,Ze),P(t,"FORBID_CONTENTS")&&y(t.FORBID_CONTENTS)&&(we===be&&(we=N(we)),O(we,t.FORBID_CONTENTS,Ze)),P(t,"ADD_FORBID_CONTENTS")&&y(t.ADD_FORBID_CONTENTS)&&(we===be&&(we=N(we)),O(we,t.ADD_FORBID_CONTENTS,Ze)),ve&&(Qt["#text"]=!0),le&&O(Qt,["html","head","body"]),Qt.table&&(O(Qt,["tbody"]),delete $t.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const e=xt;xt=t.TRUSTED_TYPES_POLICY;try{Ct=Et("")}catch(t){throw xt=e,t}}else null===t.TRUSTED_TYPES_POLICY?(xt=void 0,Ct=""):(void 0===xt&&(xt=St()),xt&&"string"==typeof Ct&&(Ct=Et("")));s&&s(t),Ue=t},qe=O({},[...R,...j,...Z]),Qe=O({},[...U,...G]),Xe=function(t){let e=yt(t);e&&e.tagName||(e={namespaceURI:Se,tagName:"template"});const i=v(t.tagName),n=v(e.tagName);return!!ze[t.namespaceURI]&&(t.namespaceURI===Pe?function(t,e,i){return e.namespaceURI===Ee?"svg"===t:e.namespaceURI===Te?"svg"===t&&("annotation-xml"===i||Ie[i]):Boolean(qe[t])}(i,e,n):t.namespaceURI===Te?function(t,e,i){return e.namespaceURI===Ee?"math"===t:e.namespaceURI===Pe?"math"===t&&Be[i]:Boolean(Qe[t])}(i,e,n):t.namespaceURI===Ee?function(t,e,i){return!(e.namespaceURI===Pe&&!Be[i])&&!(e.namespaceURI===Te&&!Ie[i])&&!Qe[t]&&(Fe[t]||!qe[t])}(i,e,n):!("application/xhtml+xml"!==Re||!ze[t.namespaceURI]))},Ye=function(t){f(n.removed,{element:t});try{yt(t).removeChild(t)}catch(e){if(mt(t),!yt(t))throw D("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ke=function(t){ti(t);const e=gt(t);if(e){const t=[];p(e,e=>{f(t,e)}),p(t,t=>{try{mt(t)}catch(t){}})}const i=kt(t);if(i)for(let e=i.length-1;e>=0;--e){const n=i[e],o=n&&n.name;if("string"==typeof o)try{t.removeAttribute(o)}catch(t){}}},Je=function(t,e){try{f(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){f(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(pe||_e)try{Ye(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},$e=function(t){const e=kt(t);if(e)for(let i=e.length-1;i>=0;--i){const n=e[i],o=n&&n.name;if("string"==typeof o&&!Yt[Ze(o)])try{t.removeAttribute(o)}catch(t){}}},ti=function(t){const e=[t];for(;e.length>0;){const t=e.pop();1===(Lt?Lt(t):t.nodeType)&&$e(t);const i=gt(t);if(i)for(let t=i.length-1;t>=0;--t)e.push(i[t])}},ei=function(t){let e=null,i=null;if(de)t="<remove></remove>"+t;else{const e=L(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===Re&&Se===Ee&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const n=xt?Et(t):t;if(Se===Ee)try{e=(new I).parseFromString(n,Re)}catch(t){}if(!e||!e.documentElement){e=zt.createDocument(Se,"template",null);try{e.documentElement.innerHTML=De?Ct:n}catch(t){}}const a=e.body||e.documentElement;return t&&i&&a.insertBefore(o.createTextNode(i),a.childNodes[0]||null),Se===Ee?It.call(e,le?"html":"body")[0]:le?e.documentElement:a},ii=function(t){const e=bt?bt(t):t.ownerDocument;return At.call(e||t,t,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT|z.SHOW_PROCESSING_INSTRUCTION|z.SHOW_CDATA_SECTION,null)},ni=function(t){return t=w(t,Ft," "),t=w(t,Rt," "),w(t,jt," ")},oi=function(t){var e;t.normalize();const i=bt?bt(t):t.ownerDocument,n=At.call(i||t,t,z.SHOW_TEXT|z.SHOW_COMMENT|z.SHOW_CDATA_SECTION|z.SHOW_PROCESSING_INSTRUCTION,null);let o=n.nextNode();for(;o;)o.data=ni(o.data),o=n.nextNode();const a=null===(e=t.querySelectorAll)||void 0===e?void 0:e.call(t,"template");a&&p(a,t=>{ri(t.content)&&oi(t.content)})},ai=function(t){const e=wt?wt(t):null;return"string"==typeof e&&"form"===Ze(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==kt(t)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes||t.nodeType!==Lt(t)||t.childNodes!==gt(t))},ri=function(t){if(!Lt||"object"!=typeof t||null===t)return!1;try{return 11===Lt(t)}catch(t){return!1}},si=function(t){if(!Lt||"object"!=typeof t||null===t)return!1;try{return"number"==typeof Lt(t)}catch(t){return!1}};function li(t,e,i){0!==t.length&&p(t,t=>{t.call(n,e,i,Ue)})}
vendor: 5,072 bytes, line 9
9const hi=function(t,e,i,n){return 0===t.length?e:e===i||e===n?N(e):e},ui=function(t,e){if(li(Bt.beforeSanitizeElements,t,null),t!==e&&null===yt(t))return ke&&ti(t),!0;if(ai(t))return Ye(t),!0;const i=Ze(wt?wt(t):t.nodeName);if(Qt=hi(Bt.uponSanitizeElement,Qt,Xt,ue),li(Bt.uponSanitizeElement,t,{tagName:i,allowedTags:Qt}),t!==e&&null===yt(t))return ke&&ti(t),!0;if(function(t,e){return!!(se&&t.hasChildNodes()&&!si(t.firstElementChild)&&S(rt,t.textContent)&&S(rt,t.innerHTML))||!(!se||t.namespaceURI!==Ee||"style"!==e||!si(t.firstElementChild))||7===t.nodeType||!(!se||8!==t.nodeType||!S(st,t.data))}(t,i))return Ye(t),!0;if($t[i]||!(ee.tagCheck instanceof Function&&ee.tagCheck(i))&&!Qt[i]){const n=function(t,e,i){if(!$t[e]&&pi(e)){if(Jt.tagNameCheck instanceof RegExp&&S(Jt.tagNameCheck,e))return!1;if(Jt.tagNameCheck instanceof Function&&Jt.tagNameCheck(e))return!1}if(ve&&!we[e]){const e=yt(t),n=gt(t);if(n&&e)for(let o=n.length-1;o>=0;--o){const a=t===i?_t(n[o],!0):n[o];e.insertBefore(a,ft(t))}}return Ye(t),!0}(t,i,e);return!1===n&&li(Bt.afterSanitizeElements,t,null),n}if(1===(Lt?Lt(t):t.nodeType)&&!Xe(t))return Ye(t),!0;if(("noscript"===i||"noembed"===i||"noframes"===i)&&S(lt,t.innerHTML))return Ye(t),!0;if(re&&3===t.nodeType){const e=ni(t.textContent);t.textContent!==e&&(f(n.removed,{element:t.cloneNode()}),t.textContent=e)}return li(Bt.afterSanitizeElements,t,null),!1},ci=function(t,e,i){if(te[e])return!1;if(se&&"patchsrc"===e)return!1;if(se&&"for"===e&&"label"!==t&&"output"!==t)return!1;if(fe&&("id"===e||"name"===e)&&(i in o||i in Ge))return!1;const n=Yt[e]||ee.attributeCheck instanceof Function&&ee.attributeCheck(e,t);if(ne&&S(Zt,e));else if(ie&&S(Ut,e));else if(n){if(Ce[e]);else if(S(qt,w(i,Ht,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==b(i,"data:")||!xe[t])if(oe&&!S(Gt,w(i,Ht,"")));else if(i)return!1}else if(!(pi(t)&&(Jt.tagNameCheck instanceof RegExp&&S(Jt.tagNameCheck,t)||Jt.tagNameCheck instanceof Function&&Jt.tagNameCheck(t))&&(Jt.attributeNameCheck instanceof RegExp&&S(Jt.attributeNameCheck,e)||Jt.attributeNameCheck instanceof Function&&Jt.attributeNameCheck(e,t))||"is"===e&&Jt.allowCustomizedBuiltInElements&&(Jt.tagNameCheck instanceof RegExp&&S(Jt.tagNameCheck,i)||Jt.tagNameCheck instanceof Function&&Jt.tagNameCheck(i))))return!1;return!0},di=O({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),pi=function(t){return!di[v(t)]&&S(Vt,t)},_i=function(t,e,i,n){if(xt&&"object"==typeof dt&&"function"==typeof dt.getAttributeType&&!i)switch(dt.getAttributeType(t,e)){case"TrustedHTML":return Et(n);case"TrustedScriptURL":return function(t){Pt(),Tt++;try{return xt.createScriptURL(t)}finally{Tt--}}(n)}return n},mi=function(t,e,i,o){try{i?t.setAttributeNS(i,e,o):t.setAttribute(e,o),ai(t)?Ye(t):m(n.removed)}catch(i){Je(e,t)}},fi=function(t){li(Bt.beforeSanitizeAttributes,t,null);const e=t.attributes;if(!e||ai(t))return;Yt=hi(Bt.uponSanitizeAttribute,Yt,Kt,ce);const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Yt,forceKeepAttr:void 0};let n=e.length;const o=Ze(t.nodeName);for(;n--;){const a=e[n],r=a.name,s=a.namespaceURI,l=a.value,h=Ze(r),u=l;let c="value"===r?u:x(u);i.attrName=h,i.attrValue=c,i.keepAttr=!0,i.forceKeepAttr=void 0,li(Bt.uponSanitizeAttribute,t,i),c=i.attrValue,!ge||"id"!==h&&"name"!==h||0===b(c,ye)||(Je(r,t),c=ye+c),se&&S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,c)||"attributename"===h&&L(c,"href")?Je(r,t):i.forceKeepAttr||(!i.keepAttr||!ae&&S(ht,c)?Je(r,t):(re&&(c=ni(c)),ci(o,h,c)?(c=_i(o,h,s,c),c!==u&&mi(t,r,s,c)):Je(r,t)))}li(Bt.afterSanitizeAttributes,t,null)},gi=function(t){let e=null;const i=ii(t);for(li(Bt.beforeSanitizeShadowDOM,t,null);e=i.nextNode();)if(li(Bt.uponSanitizeShadowNode,e,null),ui(e,t),fi(e),ri(e.content)&&gi(e.content),1===(Lt?Lt(e):e.nodeType)){const t=vt(e);ri(t)&&(yi(t),gi(t))}li(Bt.afterSanitizeShadowDOM,t,null)},yi=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const t=e.pop();if(t.shadow){gi(t.shadow);continue}const i=t.node,n=1===(Lt?Lt(i):i.nodeType),o=gt(i);if(o)for(let t=o.length-1;t>=0;--t)e.push({node:o[t],shadow:null});if(n){const t=wt?wt(i):null;if("string"==typeof t&&"template"===Ze(t)){const t=i.content;ri(t)&&e.push({node:t,shadow:null})}}if(n){const t=vt(i);ri(t)&&e.push({node:null,shadow:t},{node:t,shadow:null})}}};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,r=null,s=null;if(De=!t,De&&(t="\x3c!--\x3e"),"string"!=typeof t&&!si(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return W(t);case"boolean":return C(t);case"bigint":return M?M(t):"0";case"symbol":return T?T(t):"Symbol()";case"undefined":default:return E(t);case"function":case"object":{if(null===t)return E(t);const e=t,i=B(e,"toString");if("function"==typeof i){const t=i(e);return"string"==typeof t?t:E(t)}return E(t)}}}(t)))throw D("dirty is not a string, aborting");if(!n.isSupported)return t;
9he?(Qt=ue,Yt=ce):Ve(e),(Bt.uponSanitizeElement.length>0||Bt.uponSanitizeAttribute.length>0)&&(Qt=N(Qt)),Bt.uponSanitizeAttribute.length>0&&(Yt=N(Yt)),n.removed=[];const l=ke&&"string"!=typeof t&&si(t);if(l){!function(t){if(!se)return;const e=[t];for(;e.length>0;){const i=e.pop(),n=Lt?Lt(i):i.nodeType;if(7===n||8===n&&S(st,i.data)){try{mt(i)}catch(t){}continue}if(1===n){const e=i,n=Ze(wt?wt(i):i.nodeName);try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&"label"!==n&&"output"!==n&&e.removeAttribute("for")}catch(t){}}const o=gt(i);if(o)for(let t=o.length-1;t>=0;--t)e.push(o[t])}}(t);const i=wt?wt(t):t.nodeName;if("string"==typeof i){const e=Ze(i);if(!Qt[e]||$t[e])throw Ke(t),D("root node is forbidden and cannot be sanitized in-place")}if(ai(t))throw Ke(t),D("root node is clobbered and cannot be sanitized in-place");try{yi(t)}catch(e){throw Ke(t),e}}else if(si(t))i=ei("\x3c!----\x3e"),o=i.ownerDocument.importNode(t,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o),yi(o);else{if(!pe&&!re&&!le&&-1===t.indexOf("<"))return xt&&me?Et(t):t;if(i=ei(t),!i)return pe?null:me?Ct:""}i&&de&&Ye(i.firstChild);const h=l?t:i;try{const t=ii(h);for(;r=t.nextNode();)ui(r,h),fi(r),ri(r.content)&&gi(r.content)}catch(e){throw l&&(Ke(t),p(n.removed,t=>{t.element&&ti(t.element)})),e}if(l)return p(n.removed,t=>{t.element&&ti(t.element)}),re&&oi(t),t;if(pe){if(re&&oi(i),_e)for(s=Ot.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(Yt.shadowroot||Yt.shadowrootmode)&&(s=Nt.call(a,s,!0)),s}let u=le?i.outerHTML:i.innerHTML;return le&&Qt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&S(ot,i.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+u),re&&(u=ni(u)),xt&&me?Et(u):u},n.setConfig=function(){Ve(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),he=!0,ue=Qt,ce=Yt},n.clearConfig=function(){Ue=null,he=!1,ue=null,ce=null,xt=Wt,Ct=""},n.isValidAttribute=function(t,e,i){Ue||Ve({});const n=Ze(t),o=Ze(e);return ci(n,o,i)},n.addHook=function(t,e){"function"==typeof e&&P(Bt,t)&&f(Bt[t],e)},n.removeHook=function(t,e){if(P(Bt,t)){if(void 0!==e){const i=_(Bt[t],e);return-1===i?void 0:g(Bt[t],i,1)[0]}return m(Bt[t])}},n.removeHooks=function(t){P(Bt,t)&&(Bt[t]=[])},n.removeAllHooks=function(){Bt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}()})),function(t,e){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof exports&&(void 0!==e&&e.L?module.exports=t(L):module.exports=t(require("leaflet"))),void 0!==e&&e.L&&(e.Waymark_L.Control.Locate=t(L))}((function(t){var e=function(e,i,n){(n=n.split(" ")).forEach((function(n){t.DomUtil[e].call(this,i,n)}))},i=function(t,i){e("addClass",t,i)},n=function(t,i){e("removeClass",t,i)},o=t.Marker.extend({initialize:function(e,i){t.Util.setOptions(this,i),this._latlng=e,this.createIcon()},createIcon:function(){var e=this.options,i="";void 0!==e.color&&(i+="stroke:"+e.color+";"),void 0!==e.weight&&(i+="stroke-width:"+e.weight+";"),void 0!==e.fillColor&&(i+="fill:"+e.fillColor+";"),void 0!==e.fillOpacity&&(i+="fill-opacity:"+e.fillOpacity+";"),void 0!==e.opacity&&(i+="opacity:"+e.opacity+";");var n=this._getIconSVG(e,i);this._locationIcon=t.divIcon({className:n.className,html:n.svg,iconSize:[n.w,n.h]}),this.setIcon(this._locationIcon)},_getIconSVG:function(t,e){var i=t.radius,n=i+t.weight,o=2*n;return{className:"leaflet-control-locate-location",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="'+o+'" height="'+o+'" version="1.1" viewBox="-'+n+" -"+n+" "+o+" "+o+'"><circle r="'+i+'" style="'+e+'" /></svg>',w:o,h:o}},setStyle:function(e){t.Util.setOptions(this,e),this.createIcon()}}),a=o.extend({initialize:function(e,i,n){t.Util.setOptions(this,n),this._latlng=e,this._heading=i,this.createIcon()},setHeading:function(t){this._heading=t}
9,_getIconSVG:function(t,e){var i=t.radius,n=t.width+t.weight,o=2*(i+t.depth+t.weight),a="M0,0 l"+t.width/2+","+t.depth+" l-"+n+",0 z";return{className:"leaflet-control-locate-heading",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="'+n+'" height="'+o+'" version="1.1" viewBox="-'+n/2+" 0 "+n+" "+o+'" style="transform: rotate('+this._heading+'deg)"><path d="'+a+'" style="'+e+'" /></svg>',w:n,h:o}}}),r=t.Control.extend({options:{position:"topleft",layer:void 0,setView:"untilPanOrZoom",keepCurrentZoomLevel:!1,getLocationBounds:function(t){return t.bounds},flyTo:!1,clickBehavior:{inView:"stop",outOfView:"setView",inViewNotFollowing:"inView"},returnToPrevBounds:!1,cacheLocation:!0,drawCircle:!0,drawMarker:!0,showCompass:!0,markerClass:o,compassClass:a,circleStyle:{className:"leaflet-control-locate-circle",color:"#136AEC",fillColor:"#136AEC",fillOpacity:.15,weight:0},markerStyle:{className:"leaflet-control-locate-marker",color:"#fff",fillColor:"#2A93EE",fillOpacity:1,weight:3,opacity:1,radius:9},compassStyle:{fillColor:"#2A93EE",fillOpacity:1,weight:0,color:"#fff",opacity:1,radius:9,width:9,depth:6},followCircleStyle:{},followMarkerStyle:{},followCompassStyle:{},icon:"fa fa-map-marker",iconLoading:"fa fa-spinner fa-spin",iconElementTag:"span",circlePadding:[0,0],metric:!0,createButtonCallback:function(e,i){var n=t.DomUtil.create("a","leaflet-bar-part leaflet-bar-part-single",e);return n.title=i.strings.title,{link:n,icon:t.DomUtil.create(i.iconElementTag,i.icon,n)}},onLocationError:function(t,e){alert(t.message)},onLocationOutsideMapBounds:function(t){t.stop(),alert(t.options.strings.outsideMapBoundsMsg)},showPopup:!0,strings:{title:"Show me where I am",metersUnit:"meters",feetUnit:"feet",popup:"You are within {distance} {unit} from this point",outsideMapBoundsMsg:"You seem located outside the boundaries of the map"},locateOptions:{maxZoom:1/0,watch:!0,setView:!1}},initialize:function(e){for(var i in e)"object"==typeof this.options[i]?t.extend(this.options[i],e[i]):this.options[i]=e[i];this.options.followMarkerStyle=t.extend({},this.options.markerStyle,this.options.followMarkerStyle),this.options.followCircleStyle=t.extend({},this.options.circleStyle,this.options.followCircleStyle),this.options.followCompassStyle=t.extend({},this.options.compassStyle,this.options.followCompassStyle)},onAdd:function(e){var i=t.DomUtil.create("div","leaflet-control-locate leaflet-bar leaflet-control");this._layer=this.options.layer||new t.LayerGroup,this._layer.addTo(e),this._event=void 0,this._compassHeading=null,this._prevBounds=null;var n=this.options.createButtonCallback(i,this.options);return this._link=n.link,this._icon=n.icon,t.DomEvent.on(this._link,"click",t.DomEvent.stopPropagation).on(this._link,"click",t.DomEvent.preventDefault).on(this._link,"click",this._onClick,this).on(this._link,"dblclick",t.DomEvent.stopPropagation),this._resetVariables(),this._map.on("unload",this._unload,this),i},_onClick:function(){this._justClicked=!0;var t=this._isFollowing();if(this._userPanned=!1,this._userZoomed=!1,this._active&&!this._event)this.stop();else if(this._active&&void 0!==this._event){var e=this.options.clickBehavior,i=e.outOfView;switch(this._map.getBounds().contains(this._event.latlng)&&(i=t?e.inView:e.inViewNotFollowing),e[i]&&(i=e[i]),i){case"setView":this.setView();break;case"stop":this.stop(),this.options.returnToPrevBounds&&(this.options.flyTo?this._map.flyToBounds:this._map.fitBounds).bind(this._map)(this._prevBounds)}}else this.options.returnToPrevBounds&&(this._prevBounds=this._map.getBounds()),this.start();this._updateContainerStyle()},start:function(){this._activate(),this._event&&(this._drawMarker(this._map),this.options.setView&&this.setView()),this._updateContainerStyle()},stop:function(){this._deactivate(),this._cleanClasses(),this._resetVariables(),this._removeMarker()},stopFollowing:function(){this._userPanned=!0,this._updateContainerStyle(),this._drawMarker()},_activate:function(){this._active||(this._map.locate(this.options.locateOptions),this._active=!0,this._map.on("locationfound",this._onLocationFound,this),this._map.on("locationerror",this._onLocationError,this),this._map.on("dragstart",this._onDrag,this),this._map.on("zoomstart",this._onZoom,this),this._map.on("zoomend",this._onZoomEnd,this),this.options.showCompass&&("ondeviceorientationabsolute"in window?t.DomEvent.on(window,"deviceorientationabsolute",this._onDeviceOrientation,this):"ondeviceorientation"in window&&t.DomEvent.on(window,"deviceorientation",this._onDeviceOrientation,this)))},_deactivate:function(){this._map.stopLocate(),this._active=!1,this.options.cacheLocation||(this._event=void 0),this._map.off("locationfound",this._onLocationFound,this),this._map.off("locationerror",this._onLocationError,this),this._map.off("dragstart",this._onDrag,this),this._map.off("zoomstart",this._onZoom,this),this._map.off("zoomend",this._onZoomEnd,this),this.options.showCompass&&(this._compassHeading=null,"ondeviceorientationabsolute"in window?t.DomEvent.off(window,"deviceorientationabsolute",this._onDeviceOrientation,this):"ondeviceorientation"in window&&t.DomEvent.off(window,"deviceorientation",this._onDeviceOrientation,this))}
9,setView:function(){if(this._drawMarker(),this._isOutsideMapBounds())this._event=void 0,this.options.onLocationOutsideMapBounds(this);else if(this.options.keepCurrentZoomLevel)(e=this.options.flyTo?this._map.flyTo:this._map.panTo).bind(this._map)([this._event.latitude,this._event.longitude]);else{var e=this.options.flyTo?this._map.flyToBounds:this._map.fitBounds;this._ignoreEvent=!0,e.bind(this._map)(this.options.getLocationBounds(this._event),{padding:this.options.circlePadding,maxZoom:this.options.locateOptions.maxZoom}),t.Util.requestAnimFrame((function(){this._ignoreEvent=!1}),this)}},_drawCompass:function(){if(this._event){var t=this._event.latlng;if(this.options.showCompass&&t&&null!==this._compassHeading){var e=this._isFollowing()?this.options.followCompassStyle:this.options.compassStyle;this._compass?(this._compass.setLatLng(t),this._compass.setHeading(this._compassHeading),this._compass.setStyle&&this._compass.setStyle(e)):this._compass=new this.options.compassClass(t,this._compassHeading,e).addTo(this._layer)}!this._compass||this.options.showCompass&&null!==this._compassHeading||(this._compass.removeFrom(this._layer),this._compass=null)}},_drawMarker:function(){void 0===this._event.accuracy&&(this._event.accuracy=0);var e,i,n=this._event.accuracy,o=this._event.latlng;if(this.options.drawCircle){var a=this._isFollowing()?this.options.followCircleStyle:this.options.circleStyle;this._circle?this._circle.setLatLng(o).setRadius(n).setStyle(a):this._circle=t.circle(o,n,a).addTo(this._layer)}if(i=this.options.metric?(e=n.toFixed(0),this.options.strings.metersUnit):(e=(3.2808399*n).toFixed(0),this.options.strings.feetUnit),this.options.drawMarker){var r=this._isFollowing()?this.options.followMarkerStyle:this.options.markerStyle;this._marker?(this._marker.setLatLng(o),this._marker.setStyle&&this._marker.setStyle(r)):this._marker=new this.options.markerClass(o,r).addTo(this._layer)}this._drawCompass();var s=this.options.strings.popup;this.options.showPopup&&s&&this._marker&&this._marker.bindPopup(t.Util.template(s,{distance:e,unit:i}))._popup.setLatLng(o),this.options.showPopup&&s&&this._compass&&this._compass.bindPopup(t.Util.template(s,{distance:e,unit:i}))._popup.setLatLng(o)},_removeMarker:function(){this._layer.clearLayers(),this._marker=void 0,this._circle=void 0},_unload:function(){this.stop(),this._map.off("unload",this._unload,this)},_setCompassHeading:function(e){!isNaN(parseFloat(e))&&isFinite(e)?(e=Math.round(e),this._compassHeading=e,t.Util.requestAnimFrame(this._drawCompass,this)):this._compassHeading=null},_onCompassNeedsCalibration:function(){this._setCompassHeading()},_onDeviceOrientation:function(t){this._active&&(t.webkitCompassHeading?this._setCompassHeading(t.webkitCompassHeading):t.absolute&&t.alpha&&this._setCompassHeading(360-t.alpha))},_onLocationError:function(t){3==t.code&&this.options.locateOptions.watch||(this.stop(),this.options.onLocationError(t,this))},_onLocationFound:function(t){if((!this._event||this._event.latlng.lat!==t.latlng.lat||this._event.latlng.lng!==t.latlng.lng||this._event.accuracy!==t.accuracy)&&this._active){switch(this._event=t,this._drawMarker(),this._updateContainerStyle(),this.options.setView){case"once":this._justClicked&&this.setView();break;case"untilPan":this._userPanned||this.setView();break;case"untilPanOrZoom":this._userPanned||this._userZoomed||this.setView();break;case"always":this.setView()}this._justClicked=!1}},_onDrag:function(){this._event&&!this._ignoreEvent&&(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_onZoom:function(){this._event&&!this._ignoreEvent&&(this._userZoomed=!0,this._updateContainerStyle(),this._drawMarker())},_onZoomEnd:function(){this._event&&this._drawCompass(),this._event&&!this._ignoreEvent&&this._marker&&!this._map.getBounds().pad(-.3).contains(this._marker.getLatLng())&&(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_isFollowing:function(){return!!this._active&&("always"===this.options.setView||("untilPan"===this.options.setView?!this._userPanned:"untilPanOrZoom"===this.options.setView?!this._userPanned&&!this._userZoomed:void 0))},_isOutsideMapBounds:function(){return void 0!==this._event&&this._map.options.maxBounds&&!this._map.options.maxBounds.contains(this._event.latlng)}
9,_updateContainerStyle:function(){this._container&&(this._active&&!this._event?this._setClasses("requesting"):this._isFollowing()?this._setClasses("following"):this._active?this._setClasses("active"):this._cleanClasses())},_setClasses:function(t){"requesting"==t?(n(this._container,"active following"),i(this._container,"requesting"),n(this._icon,this.options.icon),i(this._icon,this.options.iconLoading)):"active"==t?(n(this._container,"requesting following"),i(this._container,"active"),n(this._icon,this.options.iconLoading),i(this._icon,this.options.icon)):"following"==t&&(n(this._container,"requesting"),i(this._container,"active following"),n(this._icon,this.options.iconLoading),i(this._icon,this.options.icon))},_cleanClasses:function(){t.DomUtil.removeClass(this._container,"requesting"),t.DomUtil.removeClass(this._container,"active"),t.DomUtil.removeClass(this._container,"following"),n(this._icon,this.options.iconLoading),i(this._icon,this.options.icon)},_resetVariables:function(){this._active=!1,this._justClicked=!1,this._userPanned=!1,this._userZoomed=!1}});return t.control.locate=function(e){return new t.Control.Locate(e)},r}),window),function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";!function(t,e){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof exports&&(module.exports=t(require("leaflet"))),void 0!==e&&e.L&&t(e.L)}((function(t){return Waymark_L.locales={},Waymark_L.locale=null,Waymark_L.registerLocale=function(t,e){Waymark_L.locales[t]=Waymark_L.Util.extend({},Waymark_L.locales[t],e)},Waymark_L.setLocale=function(t){Waymark_L.locale=t},Waymark_L.i18n=Waymark_L._=function(t,e){Waymark_L.locale&&Waymark_L.locales[Waymark_L.locale]&&Waymark_L.locales[Waymark_L.locale][t]&&(t=Waymark_L.locales[Waymark_L.locale][t]);try{t=Waymark_L.Util.template(t,e)}catch(t){}return t}}),window),Waymark_L.Control.Elevation=Waymark_L.Control.extend({includes:Waymark_L.Evented?Waymark_L.Evented.prototype:Waymark_L.Mixin.Events,options:{autohide:!Waymark_L.Browser.mobile,autohideMarker:!0,collapsed:!1,controlButton:{iconCssClass:"elevation-toggle-icon",title:"Elevation"},detached:!0,distanceFactor:1,dragging:!Waymark_L.Browser.mobile,downloadLink:"link",elevationDiv:"#elevation-div",followMarker:!0,forceAxisBounds:!1,gpxOptions:{async:!0,marker_options:{startIconUrl:null,endIconUrl:null,shadowUrl:null,wptIcons:{"":Waymark_L.divIcon({className:"elevation-waypoint-marker",html:'<i class="elevation-waypoint-icon"></i>',iconSize:[30,30],iconAnchor:[8,30]})}}},height:200,heightFactor:1,hoverNumber:{decimalsX:2,decimalsY:0,formatter:void 0},imperial:!1,interpolation:"curveLinear",lazyLoadJS:!0,legend:!0,loadData:{defer:!1,lazy:!1},marker:"elevation-line",markerIcon:Waymark_L.divIcon({className:"elevation-position-marker",html:'<i class="elevation-position-icon"></i>',iconSize:[32,32],iconAnchor:[16,16]}),placeholder:!1,position:"topright",polyline:{className:"elevation-polyline",color:"#000",opacity:.75,weight:5,lineCap:"round"},reverseCoords:!1,skipNullZCoords:!1,theme:"lightblue-theme",margins:{top:10,right:20,bottom:30,left:50},responsive:!0,summary:"inline",width:600,xLabel:"km",xTicks:void 0,yAxisMax:void 0,yAxisMin:void 0,yLabel:"m",yTicks:void 0,zFollow:13},__mileFactor:.621371,__footFactor:3.28084,addData:function(t,e){Waymark_L.Control.Elevation._d3LazyLoader=this._lazyLoadJS("https://unpkg.com/[email protected]/dist/d3.min.js","object"!=typeof d3,Waymark_L.Control.Elevation._d3LazyLoader).then(function(t,e){this._addData(t),this._container&&this._applyData(),null==e&&t.on&&(e=t),e&&(e._path&&Waymark_L.DomUtil.addClass(e._path,this.options.polyline.className+" "+this.options.theme),e.on("mousemove",this._mousemoveLayerHandler,this).on("mouseout",this._mouseoutHandler,this)),this.track_info=Waymark_L.extend({},this.track_info,{distance:this._distance,elevation_max:this._maxElevation,elevation_min:this._minElevation,ascent:this._ascent,descent:this._descent}),this._layers=this._layers||{},this._layers[Waymark_L.Util.stamp(e)]=e,this._fireEvt("eledata_added",{data:t,layer:e,track_info:this.track_info},!0)}.bind(this,t,e))},addTo:function(t){return this.options.detached?this._appendElevationDiv(t._container).appendChild(this.onAdd(t)):Waymark_L.Control.prototype.addTo.call(this,t),this},clear:function(){this._clearPath(),this._clearChart(),this._clearData(),this._fireEvt("eledata_clear")},disableDragging:function(){this._draggingEnabled=!1,this._resetDrag()},enableDragging:function(){this._draggingEnabled=!0},fitBounds:function(t){t=t||this._fullExtent,this._map&&t&&this._map.fitBounds(t)},getZFollow:function(){return this._zFollow},hide:function(){this._container.style.display="none"},initialize:function(t){this.options=this._deepMerge({},this.options,t),this.options.imperial?(this._distanceFactor=this.__mileFactor,this._heightFactor=this.__footFactor,this._xLabel="mi",this._yLabel="ft"):(this._distanceFactor=this.options.distanceFactor,this._heightFactor=this.options.heightFactor,this._xLabel=this.options.xLabel,this._yLabel=this.options.yLabel),this._chartEnabled=!0,this._draggingEnabled=this.options.dragging,this._zFollow=this.options.zFollow,this.options.followMarker&&(this._setMapView=Waymark_L.Util.throttle(this._setMapView,300,this)),this.options.placeholder&&(this.options.loadData.lazy=this.options.loadData.defer=!0),this.on("waypoint_added",(function(t){t.point._popup&&(t.point._popup.options.className="elevation-popup",t.point._popup._content=decodeURI(t.point._popup._content)),t.point._popup&&t.point._popup._content&&t.point.bindTooltip(t.point._popup._content,{direction:"top",sticky:!0,opacity:1,className:"elevation-tooltip"}).openTooltip()}))},load:function(t,e){this.loadData(t,e)},loadChart:function(t){this.addTo(t)},loadData:function(t,e){(e=Waymark_L.extend({},this.options.loadData,e)).defer?this.loadDefer(t,e):e.lazy?this.loadLazy(t,e):this._isXMLDoc(t)?this.loadGPX(t):this._isJSONDoc(t)?this.loadGeoJSON(t):this.loadFile(t)},loadDefer:function(t,e){(e=Waymark_L.extend({},this.options.loadData,e)).defer=!1,"complete"!==document.readyState?window.addEventListener("load",Waymark_L.bind(this.loadData,this,t,e),{once:!0}):this.loadData(t,e)},loadFile:function(t){this._downloadURL=t;try{let e=new XMLHttpRequest;e.responseType="text",e.open("GET",t),e.onload=function(){if(200!==e.status)throw"Error "+e.status+" while fetching remote file: "+t;this.loadData(e.response,{lazy:!1,defer:!1})}.bind(this),e.send()}catch(t){console.warn(t)}},loadGeoJSON:function(t){"string"==typeof t&&(t=JSON.parse(t)),this.layer=this.geojson=Waymark_L.geoJson(t,{style:function(t){let e=Waymark_L.extend({},this.options.polyline);return this.options.theme&&(e.className+=" "+this.options.theme),e}.bind(this),pointToLayer:function(t,e){let i=Waymark_L.marker(e,{icon:this.options.gpxOptions.marker_options.wptIcons[""]}),n=t.properties.desc?t.properties.desc:"",o=t.properties.name?t.properties.name:"";return(o||n)&&i.bindPopup("<b>"+o+"</b>"+(n.length>0?"<br>"+n:"")).openPopup(),this.fire("waypoint_added",{point:i,point_type:"waypoint",element:e}),i}.bind(this),onEachFeature:function(e,i){"Point"!=e.geometry.type&&(this.addData(e,i),this.track_info=Waymark_L.extend({},this.track_info,{type:"geojson",name:t.name}))}.bind(this)}),this._map?(this._map.once("layeradd",(function(e){this._fireEvt("eledata_loaded",{data:t,layer:this.layer,name:this.track_info.name,track_info:this.track_info},!0)}),this),this.layer.addTo(this._map)):console.warn("Undefined elevation map object")},loadGPX:function(t){Waymark_L.Control.Elevation._gpxLazyLoader=this._lazyLoadJS("https://unpkg.com/[email protected]/gpx.js","function"!=typeof Waymark_L.GPX,Waymark_L.Control.Elevation._gpxLazyLoader).then(function(t){this.options.gpxOptions.polyline_options=Waymark_L.extend({},this.options.polyline,this.options.gpxOptions.polyline_options),this.options.theme&&(this.options.gpxOptions.polyline_options.className+=" "+this.options.theme),this.layer=this.gpx=new Waymark_L.GPX(t,this.options.gpxOptions),this.layer.on("loaded",(function(t){this.fitBounds(t.target.getBounds())}),this),this.layer.on("addpoint",(function(t){this.fire("waypoint_added",t,!0)}),this),this.layer.once("addline",(function(e){this.addData(e.line),this.track_info=Waymark_L.extend({},this.track_info,{type:"gpx",name:this.layer.get_name()}),this._fireEvt("eledata_loaded",{data:t,layer:this.layer,name:this.track_info.name,track_info:this.track_info},!0)}),this),this._map?this.layer.addTo(this._map):console.warn("Undefined elevation map object")}.bind(this,t))},loadLazy:function(t,e){(e=Waymark_L.extend({},this.options.loadData,e)).lazy=!1;let i=!1,n=Waymark_L.bind((function(t){i||(Waymark_L.Util.requestAnimFrame
9((function(){this._isVisible(this.placeholder)&&(window.removeEventListener("scroll",n),this.loadData(t,e),this.once("eledata_loaded",(function(){this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder)}),this)),i=!1}),this),i=!0)}),this,t);window.addEventListener("scroll",n),this.placeholder&&this.placeholder.addEventListener("mouseenter",n,{once:!0}),n()},onAdd:function(t){this._map=t;let e=this._container=Waymark_L.DomUtil.create("div","elevation-control elevation");if(this.options.detached||Waymark_L.DomUtil.addClass(e,"leaflet-control"),this.options.theme&&Waymark_L.DomUtil.addClass(e,this.options.theme),this.options.placeholder&&!this._data){if(this.placeholder=Waymark_L.DomUtil.create("img","elevation-placeholder"),"string"==typeof this.options.placeholder)this.placeholder.src=this.options.placeholder,this.placeholder.alt="";else for(let t in this.options.placeholder)this.placeholder.setAttribute(t,this.options.placeholder[t]);e.insertBefore(this.placeholder,e.firstChild)}return Waymark_L.Control.Elevation._d3LazyLoader=this._lazyLoadJS("https://unpkg.com/[email protected]/dist/d3.min.js","object"!=typeof d3,Waymark_L.Control.Elevation._d3LazyLoader).then(function(t,e){this._initToggle(e),this._initChart(e),this._applyData(),this._map.on("zoom viewreset zoomanim",this._hidePositionMarker,this),this._map.on("resize",this._resetView,this),this._map.on("resize",this._resizeChart,this),this._map.on("mousedown",this._resetDrag,this),this._map.on("eledata_added",this._updateSummary,this),Waymark_L.DomEvent.on(this._map._container,"mousewheel",this._resetDrag,this),Waymark_L.DomEvent.on(this._map._container,"touchstart",this._resetDrag,this)}.bind(this,t,e)),e},onRemove:function(t){this._container=null},redraw:function(){this._resizeChart()},setZFollow:function(t){this._zFollow=t},show:function(){this._container.style.display="block"},_addData:function(t){let e=t&&t.geometry,i=t&&"FeatureCollection"===t.type,n=t&&t._latlngs;if(e)switch(e.type){case"LineString":this._addGeoJSONData(e.coordinates);break;case"MultiLineString":e.coordinates.forEach(t=>this._addGeoJSONData(t));break;default:console.warn("Unsopperted GeoJSON feature geometry type:"+e.type)}i&&t.features.forEach(t=>this._addData(t)),n&&this._addGPXdata(t._latlngs)},_addGeoJSONData:function(t){t&&t.forEach(t=>this._addPoint(t[1],t[0],t[2]))},_addGPXdata:function(t){t&&t.forEach(t=>this._addPoint(t.lat,t.lng,t.meta.ele))},_addPoint:function(t,e,i){this.options.reverseCoords&&([t,e]=[e,t]);let n=this._data||[],o=this._maxElevation||-1/0,a=this._minElevation||1/0,r=this._distance||0,s=new Waymark_L.LatLng(t,e),l=n.length?n[n.length-1].latlng:s,h=s.distanceTo(l)*this._distanceFactor;if(r+=Math.round(h/1e3*1e5)/1e5,!this.options.skipNullZCoords&&n.length>0){let t=n[n.length-1].z;if(isNaN(t)){let e=this._lastValidZ,o=i*this._heightFactor;isNaN(e)||isNaN(o)?isNaN(e)?isNaN(o)||(t=o):t=e:t=(e+o)/2,isNaN(t)?n.splice(n.length-1,1):n[n.length-1].z=t}}if(i*=this._heightFactor,!isNaN(i)){o=o<i?i:o,a=a>i?i:a;let t=i-this._lastValidZ;t>0?(this.track_info.ascent=(this.track_info.ascent||0)+t,this._ascent=this.track_info.ascent):t<0&&(this.track_info.descent=(this.track_info.descent||0)-t,this._descent=this.track_info.descent),this._lastValidZ=i}n.push({dist:r,x:t,y:e,z:i,latlng:s}),this._data=n,this._distance=r,this._maxElevation=o,this._minElevation=a},_appendChart:function(t){let e=t.append("g").attr("transform","translate("+this.options.margins.left+","+this.options.margins.top+")");this._appendGrid(e),this._appendAreaPath(e),this._appendAxis(e),this._appendFocusRect(e),this._appendMouseFocusG(e),this._appendLegend(e)},_appendElevationDiv:function(t){let e=document.querySelector(this.options.elevationDiv);return e||(e=Waymark_L.DomUtil.create("div","leaflet-control elevation elevation-div"),this.options.elevationDiv="#elevation-div_"+Math.random().toString(36).substr(2,9),e.id=this.options.elevationDiv.substr(1),t.parentNode.insertBefore(e,t.nextSibling)),this.options.detached&&(Waymark_L.DomUtil.addClass(e,"elevation-detached"),Waymark_L.DomUtil.removeClass(e,"leaflet-control")),this.eleDiv=e,this.eleDiv},_appendXaxis:function(t){t.append("g").attr("class","x axis").attr("transform","translate(0,"+this._height()+")").call(
9d3.axisBottom().scale(this._x).ticks(this.options.xTicks)).append("text").attr("x",this._width()+6).attr("y",30).text(this._xLabel)},_appendXGrid:function(t){t.append("g").attr("class","x grid").attr("transform","translate(0,"+this._height()+")").call(d3.axisBottom().scale(this._x).ticks(this.options.xTicks).tickSize(-this._height()).tickFormat(""))},_appendYaxis:function(t){t.append("g").attr("class","y axis").call(d3.axisLeft().scale(this._y).ticks(this.options.yTicks)).append("text").attr("x",-30).attr("y",3).text(this._yLabel)},_appendYGrid:function(t){t.append("g").attr("class","y grid").call(d3.axisLeft().scale(this._y).ticks(this.options.yTicks).tickSize(-this._width()).tickFormat(""))},_appendAreaPath:function(t){this._areapath=t.append("path").attr("class","area")},_appendAxis:function(t){this._axis=t.append("g").attr("class","axis"),this._appendXaxis(this._axis),this._appendYaxis(this._axis)},_appendFocusRect:function(t){let e=this._focusRect=t.append("rect").attr("width",this._width()).attr("height",this._height()).style("fill","none").style("stroke","none").style("pointer-events","all");Waymark_L.Browser.mobile&&(e.on("touchmove.drag",this._dragHandler.bind(this)).on("touchstart.drag",this._dragStartHandler.bind(this)).on("touchstart.focus",this._mousemoveHandler.bind(this)).on("touchmove.focus",this._mousemoveHandler.bind(this)),Waymark_L.DomEvent.on(this._container,"touchend",this._dragEndHandler,this)),e.on("mousemove.drag",this._dragHandler.bind(this)).on("mousedown.drag",this._dragStartHandler.bind(this)).on("mouseenter.focus",this._mouseenterHandler.bind(this)).on("mousemove.focus",this._mousemoveHandler.bind(this)).on("mouseout.focus",this._mouseoutHandler.bind(this)),Waymark_L.DomEvent.on(this._container,"mouseup",this._dragEndHandler,this)},_appendGrid:function(t){this._grid=t.append("g").attr("class","grid"),this._appendXGrid(this._grid),this._appendYGrid(this._grid)},_appendMouseFocusG:function(t){let e=this._focusG=t.append("g").attr("class","mouse-focus-group");this._mousefocus=e.append("svg:line").attr("class","mouse-focus-line").attr("x2","0").attr("y2","0").attr("x1","0").attr("y1","0"),this._focuslabelrect=e.append("rect").attr("class","mouse-focus-label").attr("x",0).attr("y",0).attr("width",0).attr("height",0).attr("rx",3).attr("ry",3),this._focuslabeltext=e.append("svg:text").attr("class","mouse-focus-label-text"),this._focuslabelY=this._focuslabeltext.append("svg:tspan").attr("class","mouse-focus-label-y").attr("dy","-1em"),this._focuslabelX=this._focuslabeltext.append("svg:tspan").attr("class","mouse-focus-label-x").attr("dy","2em")},_appendLegend:function(t){if(!this.options.legend)return;let e=this._legend=t.append("g").attr("class","legend"),i=this._altitudeLegend=this._legend.append("g").attr("class","legend-altitude");i.append("rect").attr("class","area").attr("x",this._width()/2-50).attr("y",this._height()+this.options.margins.bottom-17).attr("width",50).attr("height",5).attr("opacity",.75),i.append("text").text(Waymark_L._("Altitude")).attr("x",this._width()/2+5).attr("font-size",10).style("text-decoration-thickness","2px").style("font-weight","700").attr("y",this._height()+this.options.margins.bottom-11),e.on("click",function(){if(this._chartEnabled)this._clearChart(),this._clearPath(),this._chartEnabled=!1;else{this._resizeChart();for(let t in this._layers)Waymark_L.DomUtil.addClass(this._layers[t]._path,this.options.polyline.className+" "+this.options.theme);this._chartEnabled=!0}}.bind(this))},_appendPositionMarker:function(t){let e=this.options.theme,i=t.select("g");this._mouseHeightFocus=i.append("svg:line").attr("class",e+" height-focus line").attr("x2",0).attr("y2",0).attr("x1",0).attr("y1",0),this._pointG=i.append("g"),this._pointG.append("svg:circle").attr("class",e+" height-focus circle-lower").attr("r",6).attr("cx",0).attr("cy",0),this._mouseHeightFocusLabel=i.append("svg:text").attr("class",e+" height-focus-label").style("pointer-events","none")},_applyData:function(){if(!this._data)return;let t=d3.extent(this._data,t=>t.dist),e=d3.extent(this._data,t=>t.z),i=this.options;void 0!==i.yAxisMin&&(i.yAxisMin<e[0]||i.forceAxisBounds)&&(e[0]=i.yAxisMin),void 0!==i.yAxisMax&&(i.yAxisMax>e[1]||i.forceAxisBounds)&&(e[1]=i.yAxisMax),this._x.domain(t),this._y.domain(e),this._areapath.datum(this._data).attr("d",this._area),this._updateAxis(),this._fullExtent=this._calculateFullExtent(this._data)},_calculateFullExtent:function(t){if(!t||t.length<1)throw new Error("no data in parameters");let e=new Waymark_L.latLngBounds(t[0].latlng,t[0].latlng);return t.forEach(t=>e.extend(t.latlng)),e},_clearChart:function(){this._resetDrag(),this._areapath&&(this._areapath.attr("d","M0 0"),this._x.domain([0,1]),this._y.domain([0,1]),this._updateAxis()),this._altitudeLegend&&this._altitudeLegend.select("text").style("text-decoration-line","line-through")},_clearData:function(){this._data=null,this._distance=null,this._maxElevation=null,this._minElevation=null,this.track_info=null,this._layers=null},_clearPath:function(){this._hidePositionMarker();for(let t in this._layers)Waymark_L.DomUtil.removeClass(this._layers[t]._path,this.options.polyline.className),Waymark_L.DomUtil.removeClass(this._layers[t]._path,this.options.theme)},_collapse:function(){this._container&&(Waymark_L.DomUtil.removeClass(this._container,"elevation-expanded"),Waymark_L.DomUtil.addClass(this._container,"elevation-collapsed"))},_deepMerge:function(t,...e){if(!e.length)return t;const i=e.shift();if(this._isObject(t)&&this._isObject(i))for(const e in i)this._isObject(i[e])?(t[e]||Object.assign(t,{[e]:{}}),this._deepMerge(t[e],i[e])):Object.assign(t,{[e]:i[e]});return this._deepMerge(t,...e)},_dragHandler:function(){d3.event.preventDefault(),d3.event.stopPropagation(),this._gotDragged=!0,this._drawDragRectangle()},_dragEndHandler:function(){if(!this._dragStartCoords||!this._dragCurrentCoords||!this._gotDragged)return this._dragStartCoords=null,this._gotDragged=!1,void(this._draggingEnabled&&this._resetDrag());let t=this._findItemForX(this._dragStartCoords[0]),e=this._findItemForX(this._dragCurrentCoords[0]);t!=e&&(this._hidePositionMarker(),this._fitSection(t,e),this._dragStartCoords=null,this._gotDragged=!1,this._fireEvt("elechart_dragged",{data:{dragstart:this._data[t],dragend:this._data[e]}},!0))},_dragStartHandler:function(){d3.event.preventDefault(),d3.event.stopPropagation(),this._gotDragged=!1,this._dragStartCoords=d3.mouse(this._focusRect.node())},_drawDragRectangle:function(){if(!this._dragStartCoords||!this._draggingEnabled)return;let t=this._dragCurrentCoords=d3.mouse(this._focusRect.node()),e=Math.min(this._dragStartCoords[0],t[0]),i=Math.max(this._dragStartCoords[0],t[0]);if(this._dragRectangle||this._dragRectangleG)this._dragRectangle.attr("width",i-e).attr("x",e);else{let t=d3.select(this._container).select("svg").select("g");this._dragRectangleG=t.insert("g",".mouse-focus-group"),this._dragRectangle=this._dragRectangleG.append("rect").attr("width",i-e).attr("height",this._height()).attr("x",e).attr("class","mouse-drag").style("pointer-events","none")}},_expand:function(){this._container&&(Waymark_L.DomUtil.removeClass(this._container,"elevation-collapsed"),Waymark_L.DomUtil.addClass(this._container,"elevation-expanded"))},_findItemForLatLng:function(t){let e=null,i=1/0;return this._data.forEach(n=>{let o=t.distanceTo(n.latlng);o<i&&(i=o,e=n)}),e},_findItemForX:function(t){let e=this._data?this._data:[0,1];return(0,d3.bisector(t=>t.dist).left)(e,this._x.invert(t))}
9,_fireEvt:function(t,e,i){this.fire&&this.fire(t,e,i),this._map&&this._map.fire(t,e,i)},_fitSection:function(t,e){let i=Math.min(t,e),n=Math.max(t,e),o=this._calculateFullExtent(this._data.slice(i,n));this.fitBounds(o)},_formatter:function(t,e,i){let n=Waymark_L.Util.formatNum(t,e).toString(),o=n.split(".");if(o[1]){for(let t=e-o[1].length;t>0;t--)o[1]+="0";n=o.join(i||".")}return n},_height:function(){let t=this.options;return t.height-t.margins.top-t.margins.bottom},_hidePositionMarker:function(){this.options.autohideMarker&&(this._selectedItem=null,this._marker&&(this._map&&this._map.removeLayer(this._marker),this._marker=null),this._mouseHeightFocus&&(this._mouseHeightFocus.style("visibility","hidden"),this._mouseHeightFocusLabel.style("visibility","hidden")),this._pointG&&this._pointG.style("visibility","hidden"),this._focusG&&this._focusG.style("visibility","hidden"))},_initChart:function(){let t=this.options;if(t.xTicks=t.xTicks||Math.round(this._width()/75),t.yTicks=t.yTicks||Math.round(this._height()/30),t.hoverNumber.formatter=t.hoverNumber.formatter||this._formatter,t.responsive)if(t.detached){let e=this.eleDiv.offsetWidth,i=this.eleDiv.offsetHeight;t.width=e>0?e:t.width,t.height=i-20>0?i-20:t.height}else{t._maxWidth=t._maxWidth>t.width?t._maxWidth:t.width;let e=this._map._container.clientWidth;t.width=t._maxWidth>e?e-30:t.width}let e=this._x=d3.scaleLinear().range([0,this._width()]),i=this._y=d3.scaleLinear().range([this._height(),0]),n="function"==typeof t.interpolation?t.interpolation:d3[t.interpolation],o=(this._area=d3.area().curve(n).x(t=>t.xDiagCoord=e(t.dist)).y0(this._height()).y1(t=>i(t.z)),this._line=d3.line().x(t=>d3.mouse(a.select("g"))[0]).y(t=>this._height()),d3.select(this._container)),a=o.append("svg").attr("class","background").attr("width",t.width).attr("height",t.height);this.summaryDiv=o.append("div").attr("class","elevation-summary "+(this.options.summary?this.options.summary+"-summary":"")).node();this._appendChart(a),this._updateSummary()},_initToggle:function(t){if(t.setAttribute("aria-haspopup",!0),this.options.detached||Waymark_L.DomEvent.disableClickPropagation(t),Waymark_L.Browser.mobile&&Waymark_L.DomEvent.on(t,"click",Waymark_L.DomEvent.stopPropagation),!this.options.detached){let e="elevation-toggle "+this.options.controlButton.iconCssClass+(this.options.autohide?"":" close-button"),i=this._button=Waymark_L.DomUtil.create("a",e,t);i.href="#",i.title=this.options.controlButton.title,this.options.collapsed&&(this._collapse(),this.options.autohide?Waymark_L.DomEvent.on(t,"mouseover",this._expand,this).on(t,"mouseout",this._collapse,this):Waymark_L.DomEvent.on(i,"click",Waymark_L.DomEvent.stop).on(i,"click",this._toggle,this),Waymark_L.DomEvent.on(i,"focus",this._toggle,this),this._map.on("click",this._collapse,this))}},_isObject:function(t){return t&&"object"==typeof t&&!Array.isArray(t)},_isJSONDoc:function(t,e){if(e=void 0===e||e,"string"==typeof t&&e)return 0==(t=t.trim()).indexOf("{")||0==t.indexOf("[");try{JSON.parse(t.toString())}catch(i){return!("object"!=typeof t||!e)||(console.warn(i),!1)}return!0},_isXMLDoc:function(t,e){if(e=void 0===e||e,"string"==typeof t&&e)return 0==(t=t.trim()).indexOf("<");{let e=(t?t.ownerDocument||t:0).documentElement;return!!e&&"HTML"!==e.nodeName}},_isDomVisible:function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},_isVisible:function(t){if(!t)return!1;let e=window.getComputedStyle(t);return!!function(t,e){return"hidden"!==e.visibility&&"none"!==e.display}(0,e)&&!!function(t,e){let i=t.getBoundingClientRect(),n=i.left+1,o=i.right-1,a=i.top+1,r=(i.bottom,!0),s=t.style.pointerEvents;return"none"==e["pointer-events"]&&(t.style.pointerEvents="auto"),document.elementFromPoint(n,a)!==t&&(r=!1),document.elementFromPoint(o,a)!==t&&(r=!1),t.style.pointerEvents=s,r}(t,e)},_lazyLoadJS:function(t,e,i){return!1!==e&&this.options.lazyLoadJS?i instanceof Promise?i:new Promise((e,i)=>{let n=document.createElement("script");n.addEventListener("load",e,{once:!0}),n.src=t,document.head.appendChild(n)}):Promise.resolve()},_mouseenterHandler:function(){this._fireEvt("elechart_enter",null,!0)}
9,_mousemoveHandler:function(t,e,i){if(!this._data||0===this._data.length||!this._chartEnabled)return;let n=d3.mouse(this._focusRect.node())[0],o=this._data[this._findItemForX(n)];this._hidePositionMarker(),this._showDiagramIndicator(o,n),this._showPositionMarker(o),this._setMapView(o),this._map&&this._map._container&&Waymark_L.DomUtil.addClass(this._map._container,"elechart-hover"),this._fireEvt("elechart_change",{data:o},!0),this._fireEvt("elechart_hover",{data:o},!0)},_mousemoveLayerHandler:function(t){if(!this._data||0===this._data.length)return;let e=t.latlng,i=this._findItemForLatLng(e);if(i){let t=i.xDiagCoord;this._hidePositionMarker(),this._showDiagramIndicator(i,t),this._showPositionMarker(i)}},_mouseoutHandler:function(){this.options.detached||this._hidePositionMarker(),this._map&&this._map._container&&Waymark_L.DomUtil.removeClass(this._map._container,"elechart-hover"),this._fireEvt("elechart_leave",null,!0)},_mousewheelHandler:function(t){if(this._map.gestureHandling&&this._map.gestureHandling._enabled)return;let e=this._selectedItem?this._selectedItem.latlng:this._map.getCenter(),i=t.deltaY>0?this._map.getZoom()-1:this._map.getZoom()+1;this._resetDrag(),this._map.flyTo(e,i)},_resetDrag:function(){this._dragRectangleG&&(this._dragRectangleG.remove(),this._dragRectangleG=null,this._dragRectangle=null,this._hidePositionMarker())},_resetView:function(){this._map&&this._map._isFullscreen||(this._resetDrag(),this._hidePositionMarker(),this.fitBounds(this._fullExtent))},_resizeChart:function(){if(this.options.responsive)if(this.options.detached){let t=this.eleDiv.offsetWidth;if(t<=0)return;this.options.width=t,this.eleDiv.innerHTML="",this.eleDiv.appendChild(this.onAdd(this._map))}else this._map.removeControl(this._container),this.addTo(this._map)},_saveFile:function(t){let e=document,i=e.createElement("a"),n=e.body;i.href=t,i.target="_new",i.download="",i.style.display="none",n.appendChild(i),i.click(),n.removeChild(i)},_showDiagramIndicator:function(t,e){if(!this._chartEnabled)return;let i=this.options;this._focusG.style("visibility","visible"),this._mousefocus.attr("x1",e).attr("y1",0).attr("x2",e).attr("y2",this._height()).classed("hidden",!1);let n=t.z,o=t.dist,a=(t.latlng,i.hoverNumber.formatter(n,i.hoverNumber.decimalsY)),r=i.hoverNumber.formatter(o,i.hoverNumber.decimalsX);this._focuslabeltext.attr("y",this._y(t.z)).style("font-weight","700"),this._focuslabelX.text(r+" "+this._xLabel).attr("x",e+10),this._focuslabelY.text(a+" "+this._yLabel).attr("x",e+10);let s=this._focuslabeltext.node();if(this._isDomVisible(s)){let t=s.getBBox(),i=2;this._focuslabelrect.attr("x",t.x-i).attr("y",t.y-i).attr("width",t.width+2*i).attr("height",t.height+2*i),e>=this._width()/2&&(this._focuslabelrect.attr("x",this._focuslabelrect.attr("x")-this._focuslabelrect.attr("width")-2*i-10),this._focuslabelX.attr("x",this._focuslabelX.attr("x")-this._focuslabelrect.attr("width")-2*i-10),this._focuslabelY.attr("x",this._focuslabelY.attr("x")-this._focuslabelrect.attr("width")-2*i-10))}},_toggle:function(){Waymark_L.DomUtil.hasClass(this._container,"elevation-expanded")?this._collapse():this._expand()},_setMapView:function(t){if(!this.options.followMarker||!this._map)return;let e=this._map.getZoom();
9e=e<this._zFollow?this._zFollow:e,this._map.setView(t.latlng,e,{animate:!0,duration:.25})},_showPositionMarker:function(t){this._selectedItem=t,this._map&&!this._map.getPane("elevationPane")&&(this._map.createPane("elevationPane"),this._map.getPane("elevationPane").style.zIndex=625,this._map.getPane("elevationPane").style.pointerEvents="none"),"elevation-line"==this.options.marker?this._updatePositionMarker(t):"position-marker"==this.options.marker&&this._updateLeafletMarker(t)},_updateAxis:function(){this._grid.selectAll("g").remove(),this._axis.selectAll("g").remove(),this._appendXGrid(this._grid),this._appendYGrid(this._grid),this._appendXaxis(this._axis),this._appendYaxis(this._axis)},_updateHeightIndicator:function(t){let e=this.options,i=e.hoverNumber.formatter(t.z,e.hoverNumber.decimalsY),n=(e.hoverNumber.formatter(t.dist,e.hoverNumber.decimalsX),this._height()/this._maxElevation*t.z),o=t.y-n;this._mouseHeightFocus.attr("x1",t.x).attr("x2",t.x).attr("y1",t.y).attr("y2",o).style("visibility","visible"),this._mouseHeightFocusLabel.attr("x",t.x).attr("y",o).text(i+" "+this._yLabel).style("visibility","visible")},_updateLeafletMarker:function(t){let e=t.latlng;this._marker?this._marker.setLatLng(e):(this._marker=new Waymark_L.Marker(e,{icon:this.options.markerIcon,zIndexOffset:1e6}),this._marker.addTo(this._map,{pane:"elevationPane"}))},_updatePointG:function(t){this._pointG.attr("transform","translate("+t.x+","+t.y+")").style("visibility","visible")},_updatePositionMarker:function(t){let e=this._map.latLngToLayerPoint(t.latlng),i={dist:t.dist,x:e.x,y:e.y,z:t.z};if(!this._mouseHeightFocus){Waymark_L.svg({pane:"elevationPane"}).addTo(this._map);let t=d3.select(this._map.getContainer()).select(".leaflet-elevation-pane svg");this._appendPositionMarker(t)}this._updatePointG(i),this._updateHeightIndicator(i)},_updateSummary:function(){this.summaryDiv.innerHTML="",this.track_info=this.track_info||{},this.track_info.distance=this._distance||0,this.track_info.elevation_max=this._maxElevation||0,this.track_info.elevation_min=this._minElevation||0,this.track_info.ascent=this._ascent||0,this.track_info.descent=this._descent||0,this.options.summary&&(this.summaryDiv.innerHTML+='<span class="totlen"><span class="summarylabel">'+Waymark_L._("Total Length: ")+'</span><span class="summaryvalue">'+this.track_info.distance.toFixed(2)+" "+this._xLabel+'</span></span><span class="maxele"><span class="summarylabel">'+Waymark_L._("Max Elevation: ")+'</span><span class="summaryvalue">'+this.track_info.elevation_max.toFixed(2)+" "+this._yLabel+'</span></span><span class="minele"><span class="summarylabel">'+Waymark_L._("Min Elevation: ")+'</span><span class="summaryvalue">'+this.track_info.elevation_min.toFixed(2)+" "+this._yLabel+'</span></span><span class="totasc"><span class="summarylabel">'+Waymark_L._("Total Ascent: ")+'</span><span class="summaryvalue">'+this.track_info.ascent.toFixed(0)+" "+this._yLabel+'</span></span><span class="totdesc"><span class="summarylabel">'+Waymark_L._("Total Descent: ")+'</span><span class="summaryvalue">'+this.track_info.descent.toFixed(0)+" "+this._yLabel+"</span></span>"),this.options.downloadLink&&this._downloadURL&&(this.summaryDiv.innerHTML+='<span class="download"><a href="#">'+Waymark_L._("Download")+"</a></span>",this.summaryDiv.querySelector(".download a").onclick=function(t){t.preventDefault();let e={confirm:this._saveFile.bind(this,this._downloadURL)},i=this.options.downloadLink;"modal"==i?("function"==typeof CustomEvent&&document.dispatchEvent(new CustomEvent("eletrack_download",{detail:e})),this._fireEvt("eletrack_download",e)):"link"!=i&&!0!==i||e.confirm()}.bind(this))},_width:function(){let t=this.options;return t.width-t.margins.left-t.margins.right}}),Waymark_L.control.elevation=function(t){return new Waymark_L.Control.Elevation(t)}})),function(t,e){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof exports&&(module.exports=t(require("leaflet"))),void 0!==e&&e.L&&t(e.L)}((function(t){Waymark_L.Editable=Waymark_L.Evented.extend({statics:{FORWARD:1,BACKWARD:-1},options:{zIndex:1e3,polygonClass:Waymark_L.Polygon,polylineClass:Waymark_L.Polyline,markerClass:Waymark_L.Marker,rectangleClass:Waymark_L.Rectangle,circleClass:Waymark_L.Circle,drawingCSSClass:"leaflet-editable-drawing",drawingCursor:"crosshair",editLayer:void 0,featuresLayer:void 0,pol
9ylineEditorClass:void 0,polygonEditorClass:void 0,markerEditorClass:void 0,rectangleEditorClass:void 0,circleEditorClass:void 0,lineGuideOptions:{},skipMiddleMarkers:!1},initialize:function(t,e){Waymark_L.setOptions(this,e),this._lastZIndex=this.options.zIndex,this.map=t,this.editLayer=this.createEditLayer(),this.featuresLayer=this.createFeaturesLayer(),this.forwardLineGuide=this.createLineGuide(),this.backwardLineGuide=this.createLineGuide()},fireAndForward:function(t,e){(e=e||{}).editTools=this,this.fire(t,e),this.map.fire(t,e)},createLineGuide:function(){var t=Waymark_L.extend({dashArray:"5,10",weight:1,interactive:!1},this.options.lineGuideOptions);return Waymark_L.polyline([],t)},createVertexIcon:function(t){return Waymark_L.Browser.mobile&&Waymark_L.Browser.touch?new Waymark_L.Editable.TouchVertexIcon(t):new Waymark_L.Editable.VertexIcon(t)},createEditLayer:function(){return this.options.editLayer||(new Waymark_L.LayerGroup).addTo(this.map)},createFeaturesLayer:function(){return this.options.featuresLayer||(new Waymark_L.LayerGroup).addTo(this.map)},moveForwardLineGuide:function(t){this.forwardLineGuide._latlngs.length&&(this.forwardLineGuide._latlngs[1]=t,this.forwardLineGuide._bounds.extend(t),this.forwardLineGuide.redraw())},moveBackwardLineGuide:function(t){this.backwardLineGuide._latlngs.length&&(this.backwardLineGuide._latlngs[1]=t,this.backwardLineGuide._bounds.extend(t),this.backwardLineGuide.redraw())},anchorForwardLineGuide:function(t){this.forwardLineGuide._latlngs[0]=t,this.forwardLineGuide._bounds.extend(t),this.forwardLineGuide.redraw()},anchorBackwardLineGuide:function(t){this.backwardLineGuide._latlngs[0]=t,this.backwardLineGuide._bounds.extend(t),this.backwardLineGuide.redraw()},attachForwardLineGuide:function(){this.editLayer.addLayer(this.forwardLineGuide)},attachBackwardLineGuide:function(){this.editLayer.addLayer(this.backwardLineGuide)},detachForwardLineGuide:function(){this.forwardLineGuide.setLatLngs([]),this.editLayer.removeLayer(this.forwardLineGuide)},detachBackwardLineGuide:function(){this.backwardLineGuide.setLatLngs([]),this.editLayer.removeLayer(this.backwardLineGuide)},blockEvents:function(){this._oldTargets||(this._oldTargets=this.map._targets,this.map._targets={})},unblockEvents:function(){this._oldTargets&&(this.map._targets=Waymark_L.extend(this.map._targets,this._oldTargets),delete this._oldTargets)},registerForDrawing:function(t){this._drawingEditor&&this.unregisterForDrawing(this._drawingEditor),this.blockEvents(),t.reset(),this._drawingEditor=t,this.map.on("mousemove touchmove",t.onDrawingMouseMove,t),this.map.on("mousedown",this.onMousedown,this),this.map.on("mouseup",this.onMouseup,this),Waymark_L.DomUtil.addClass(this.map._container,this.options.drawingCSSClass),this.defaultMapCursor=this.map._container.style.cursor,this.map._container.style.cursor=this.options.drawingCursor},unregisterForDrawing:function(t){this.unblockEvents(),Waymark_L.DomUtil.removeClass(this.map._container,this.options.drawingCSSClass),this.map._container.style.cursor=this.defaultMapCursor,(t=t||this._drawingEditor)&&(this.map.off("mousemove touchmove",t.onDrawingMouseMove,t),this.map.off("mousedown",this.onMousedown,this),this.map.off("mouseup",this.onMouseup,this),t===this._drawingEditor&&(delete this._drawingEditor,t._drawing&&t.cancelDrawing()))},onMousedown:function(t){1==t.originalEvent.which&&(this._mouseDown=t,this._drawingEditor.onDrawingMouseDown(t))},onMouseup:function(t){if(this._mouseDown){var e=this._drawingEditor,i=this._mouseDown;if(this._mouseDown=null,e.onDrawingMouseUp(t),this._drawingEditor!==e)return;var n=Waymark_L.point(i.originalEvent.clientX,i.originalEvent.clientY),o=Waymark_L.point(t.originalEvent.clientX,t.originalEvent.clientY).distanceTo(n);Math.abs(o)<9*(window.devicePixelRatio||1)&&this._drawingEditor.onDrawingClick(t)}},drawing:function(){return this._drawingEditor&&this._drawingEditor.drawing()},stopDrawing:function(){this.unregisterForDrawing()},commitDrawing:function(t){this._drawingEditor&&this._drawingEditor.commitDrawing(t)},connectCreatedToMap:function(t){return this.featuresLayer.addLayer(t)},startPolyline:function(t,e){var i=this.createPolyline([],e);return i.enableEdit(this.map).newShape(t),i},startPolygon:function(t,e){var i=this.createPolygon([],e);return i.enableEdit(this.map).newShape(t),i},startMarker:function(t,e){t=t||this.map.getCenter().clone();var i=this.createMarker(t,e);return i.enableEdit(this.map).startDrawing(),i},startRectangle:function(t,e){var i=t||Waymark_L.latLng([0,0]),n=new Waymark_L.LatLngBounds(i,i),o=this.createRectangle(n,e);return o.enableEdit(this.map).startDrawing(),o},startCircle:function(t,e){t=t||this.map.getCenter().clone();var i=this.createCircle(t,e);return i.enableEdit(this.map).startDrawing(),i},startHole:function(t,e){t.newHole(e)}
9,createLayer:function(t,e,i){var n=new t(e,i=Waymark_L.Util.extend({editOptions:{editTools:this}},i));return this.fireAndForward("editable:created",{layer:n}),n},createPolyline:function(t,e){return this.createLayer(e&&e.polylineClass||this.options.polylineClass,t,e)},createPolygon:function(t,e){return this.createLayer(e&&e.polygonClass||this.options.polygonClass,t,e)},createMarker:function(t,e){return this.createLayer(e&&e.markerClass||this.options.markerClass,t,e)},createRectangle:function(t,e){return this.createLayer(e&&e.rectangleClass||this.options.rectangleClass,t,e)},createCircle:function(t,e){return this.createLayer(e&&e.circleClass||this.options.circleClass,t,e)}}),Waymark_L.extend(Waymark_L.Editable,{makeCancellable:function(t){t.cancel=function(){t._cancelled=!0}}}),Waymark_L.Map.mergeOptions({editToolsClass:Waymark_L.Editable,editable:!1,editOptions:{}}),Waymark_L.Map.addInitHook((function(){this.whenReady((function(){this.options.editable&&(this.editTools=new this.options.editToolsClass(this,this.options.editOptions))}))})),Waymark_L.Editable.VertexIcon=Waymark_L.DivIcon.extend({options:{iconSize:new Waymark_L.Point(8,8)}}),Waymark_L.Editable.TouchVertexIcon=Waymark_L.Editable.VertexIcon.extend({options:{iconSize:new Waymark_L.Point(20,20)}}),Waymark_L.Editable.VertexMarker=Waymark_L.Marker.extend({options:{draggable:!0,className:"leaflet-div-icon leaflet-vertex-icon"},initialize:function(t,e,i,n){this.latlng=t,this.latlngs=e,this.editor=i,Waymark_L.Marker.prototype.initialize.call(this,t,n),this.options.icon=this.editor.tools.createVertexIcon({className:this.options.className}),this.latlng.__vertex=this,this.editor.editLayer.addLayer(this),this.setZIndexOffset(i.tools._lastZIndex+1)},onAdd:function(t){Waymark_L.Marker.prototype.onAdd.call(this,t),this.on("drag",this.onDrag),this.on("dragstart",this.onDragStart),this.on("dragend",this.onDragEnd),this.on("mouseup",this.onMouseup),this.on("click",this.onClick),this.on("contextmenu",this.onContextMenu),this.on("mousedown touchstart",this.onMouseDown),this.on("mouseover",this.onMouseOver),this.on("mouseout",this.onMouseOut),this.addMiddleMarkers()},onRemove:function(t){this.middleMarker&&this.middleMarker.delete(),delete this.latlng.__vertex,this.off("drag",this.onDrag),this.off("dragstart",this.onDragStart),this.off("dragend",this.onDragEnd),this.off("mouseup",this.onMouseup),this.off("click",this.onClick),this.off("contextmenu",this.onContextMenu),this.off("mousedown touchstart",this.onMouseDown),this.off("mouseover",this.onMouseOver),this.off("mouseout",this.onMouseOut),Waymark_L.Marker.prototype.onRemove.call(this,t)},onDrag:function(t){t.vertex=this,this.editor.onVertexMarkerDrag(t);var e=Waymark_L.DomUtil.getPosition(this._icon),i=this._map.layerPointToLatLng(e);this.latlng.update(i),this._latlng=this.latlng,this.editor.refresh(),this.middleMarker&&this.middleMarker.updateLatLng();var n=this.getNext();n&&n.middleMarker&&n.middleMarker.updateLatLng()},onDragStart:function(t){t.vertex=this,this.editor.onVertexMarkerDragStart(t)},onDragEnd:function(t){t.vertex=this,this.editor.onVertexMarkerDragEnd(t)},onClick:function(t){t.vertex=this,this.editor.onVertexMarkerClick(t)},onMouseup:function(t){Waymark_L.DomEvent.stop(t),t.vertex=this,this.editor.map.fire("mouseup",t)},onContextMenu:function(t){t.vertex=this,this.editor.onVertexMarkerContextMenu(t)},onMouseDown:function(t){t.vertex=this,this.editor.onVertexMarkerMouseDown(t)},onMouseOver:function(t){t.vertex=this,this.editor.onVertexMarkerMouseOver(t)},onMouseOut:function(t){t.vertex=this,this.editor.onVertexMarkerMouseOut(t)},delete:function(){var t=this.getNext();this.latlngs.splice(this.getIndex(),1),this.editor.editLayer.removeLayer(this),this.editor.onVertexDeleted({latlng:this.latlng,vertex:this}),this.latlngs.length||this.editor.deleteShape(this.latlngs),t&&t.resetMiddleMarker(),this.editor.refresh()},getIndex:function(){return this.latlngs.indexOf(this.latlng)},getLastIndex:function(){return this.latlngs.length-1},getPrevious:function(){if(!(this.latlngs.length<2)){var t=this.getIndex(),e=t-1;0===t&&this.editor.CLOSED&&(e=this.getLastIndex());var i=this.latlngs[e];return i?i.__vertex:void 0}},getNext:function(){if(!(this.latlngs.length<2)){var t=this.getIndex(),e=t+1;t===this.getLastIndex()&&this.editor.CLOSED&&(e=0);var i=this.latlngs[e];return i?i.__vertex:void 0}},addMiddleMarker:function(t){this.editor.hasMiddleMarkers()&&(t=t||this.getPrevious())&&!this.middleMarker&&(this.middleMarker=this.editor.addMiddleMarker(t,this,this.latlngs,this.editor))},addMiddleMarkers:function(){if(this.editor.hasMiddleMarkers()){var t=this.getPrevious();t&&this.addMiddleMarker(t);var e=this.getNext();e&&e.resetMiddleMarker()}},resetMiddleMarker:function(){this.middleMarker&&this.middleMarker.delete(),this.addMiddleMarker()},split:function(){this.editor.splitShape&&this.editor.splitShape(this.latlngs,this.getIndex())},continue:function(){if(this.editor.continueBackward){var t=this.getIndex();0===t?this.editor.continueBackward(this.latlngs):t===this.getLastIndex()&&this.editor.continueForward(this.latlngs)}}}),Waymark_L.Editable.mergeOptions({vertexMarkerClass:Waymark_L.Editable.VertexMarker}),Waymark_L.Editable.MiddleMarker=Waymark_L.Marker.extend({options:{opacity:.5,className:"leaflet-div-icon leaflet-middle-icon",draggable:!0}
9,initialize:function(t,e,i,n,o){this.left=t,this.right=e,this.editor=n,this.latlngs=i,Waymark_L.Marker.prototype.initialize.call(this,this.computeLatLng(),o),this._opacity=this.options.opacity,this.options.icon=this.editor.tools.createVertexIcon({className:this.options.className}),this.editor.editLayer.addLayer(this),this.setVisibility()},setVisibility:function(){var t=this._map.latLngToContainerPoint(this.left.latlng),e=this._map.latLngToContainerPoint(this.right.latlng),i=Waymark_L.point(this.options.icon.options.iconSize);t.distanceTo(e)<3*i.x?this.hide():this.show()},show:function(){this.setOpacity(this._opacity)},hide:function(){this.setOpacity(0)},updateLatLng:function(){this.setLatLng(this.computeLatLng()),this.setVisibility()},computeLatLng:function(){var t=this.editor.map.latLngToContainerPoint(this.left.latlng),e=this.editor.map.latLngToContainerPoint(this.right.latlng),i=(t.y+e.y)/2,n=(t.x+e.x)/2;return this.editor.map.containerPointToLatLng([n,i])},onAdd:function(t){Waymark_L.Marker.prototype.onAdd.call(this,t),Waymark_L.DomEvent.on(this._icon,"mousedown touchstart",this.onMouseDown,this),t.on("zoomend",this.setVisibility,this)},onRemove:function(t){delete this.right.middleMarker,Waymark_L.DomEvent.off(this._icon,"mousedown touchstart",this.onMouseDown,this),t.off("zoomend",this.setVisibility,this),Waymark_L.Marker.prototype.onRemove.call(this,t)},onMouseDown:function(t){var e=Waymark_L.DomUtil.getPosition(this._icon);if(t={originalEvent:t,latlng:this.editor.map.layerPointToLatLng(e)},0!==this.options.opacity&&(Waymark_L.Editable.makeCancellable(t),this.editor.onMiddleMarkerMouseDown(t),!t._cancelled)){this.latlngs.splice(this.index(),0,t.latlng),this.editor.refresh();var i=this._icon,n=this.editor.addVertexMarker(t.latlng,this.latlngs);this.editor.onNewVertex(n);var o=n._icon.parentNode;o.removeChild(n._icon),n._icon=i,o.appendChild(n._icon),n._initIcon(),n._initInteraction(),n.setOpacity(1),Waymark_L.Draggable._dragging=!1,n.dragging._draggable._onDown(t.originalEvent),this.delete()}},delete:function(){this.editor.editLayer.removeLayer(this)},index:function(){return this.latlngs.indexOf(this.right.latlng)}}),Waymark_L.Editable.mergeOptions({middleMarkerClass:Waymark_L.Editable.MiddleMarker}),Waymark_L.Editable.BaseEditor=Waymark_L.Handler.extend({initialize:function(t,e,i){Waymark_L.setOptions(this,i),this.map=t,this.feature=e,this.feature.editor=this,this.editLayer=new Waymark_L.LayerGroup,this.tools=this.options.editTools||t.editTools},addHooks:function(){this.isConnected()?this.onFeatureAdd():this.feature.once("add",this.onFeatureAdd,this),this.onEnable(),this.feature.on(this._getEvents(),this)},removeHooks:function(){this.feature.off(this._getEvents(),this),this.feature.dragging&&this.feature.dragging.disable(),this.editLayer.clearLayers(),this.tools.editLayer.removeLayer(this.editLayer),this.onDisable(),this._drawing&&this.cancelDrawing()},drawing:function(){return!!this._drawing},reset:function(){},onFeatureAdd:function(){this.tools.editLayer.addLayer(this.editLayer),this.feature.dragging&&this.feature.dragging.enable()},hasMiddleMarkers:function(){return!this.options.skipMiddleMarkers&&!this.tools.options.skipMiddleMarkers},fireAndForward:function(t,e){(e=e||{}).layer=this.feature,this.feature.fire(t,e),this.tools.fireAndForward(t,e)},onEnable:function(){this.fireAndForward("editable:enable")},onDisable:function(){this.fireAndForward("editable:disable")},onEditing:function(){this.fireAndForward("editable:editing")},onStartDrawing:function(){this.fireAndForward("editable:drawing:start")},onEndDrawing:function(){this.fireAndForward("editable:drawing:end")},onCancelDrawing:function(){this.fireAndForward("editable:drawing:cancel")},onCommitDrawing:function(t){this.fireAndForward("editable:drawing:commit",t)},onDrawingMouseDown:function(t){this.fireAndForward("editable:drawing:mousedown",t)},onDrawingMouseUp:function(t){this.fireAndForward("editable:drawing:mouseup",t)},startDrawing:function(){this._drawing||(this._drawing=Waymark_L.Editable.FORWARD),this.tools.registerForDrawing(this),this.onStartDrawing()},commitDrawing:function(t){this.onCommitDrawing(t),this.endDrawing()},cancelDrawing:function(){Waymark_L.Draggable._dragging=!1,this.onCancelDrawing(),this.endDrawing()},endDrawing:function(){this._drawing=!1,this.tools.unregisterForDrawing(this),this.onEndDrawing()},onDrawingClick:function(t){this.drawing()&&(Waymark_L.Editable.makeCancellable(t),this.fireAndForward("editable:drawing:click",t),t._cancelled||(this.isConnected()||this.connect(t),this.processDrawingClick(t)))},isConnected:function(){return this.map.hasLayer(this.feature)},connect:function(){this.tools.connectCreatedToMap(this.feature),this.tools.editLayer.addLayer(this.editLayer)},onMove:function(t){this.fireAndForward("editable:drawing:move",t)},onDrawingMouseMove:function(t){this.onMove(t)},_getEvents:function(){return{dragstart:this.onDragStart,drag:this.onDrag,dragend:this.onDragEnd,remove:this.disable}},onDragStart:function(t){this.onEditing(),this.fireAndForward("editable:dragstart",t)},onDrag:function(t){this.onMove(t),this.fireAndForward("editable:drag",t)},onDragEnd:function(t){this.fireAndForward("editable:dragend",t)}}),Waymark_L.Editable.MarkerEditor=Waymark_L.Editable.BaseEditor.extend({onDrawingMouseMove:function(t){Waymark_L.Editable.BaseEditor.prototype.onDrawingMouseMove.call(this,t),this._drawing&&this.feature.setLatLng(t.latlng)}
9,processDrawingClick:function(t){this.fireAndForward("editable:drawing:clicked",t),this.commitDrawing(t)},connect:function(t){t&&(this.feature._latlng=t.latlng),Waymark_L.Editable.BaseEditor.prototype.connect.call(this,t)}}),Waymark_L.Editable.PathEditor=Waymark_L.Editable.BaseEditor.extend({CLOSED:!1,MIN_VERTEX:2,addHooks:function(){return Waymark_L.Editable.BaseEditor.prototype.addHooks.call(this),this.feature&&this.initVertexMarkers(),this},initVertexMarkers:function(t){if(this.enabled())if(t=t||this.getLatLngs(),l(t))this.addVertexMarkers(t);else for(var e=0;e<t.length;e++)this.initVertexMarkers(t[e])},getLatLngs:function(){return this.feature.getLatLngs()},reset:function(){this.editLayer.clearLayers(),this.initVertexMarkers()},addVertexMarker:function(t,e){return new this.tools.options.vertexMarkerClass(t,e,this)},onNewVertex:function(t){this.fireAndForward("editable:vertex:new",{latlng:t.latlng,vertex:t})},addVertexMarkers:function(t){for(var e=0;e<t.length;e++)this.addVertexMarker(t[e],t)},refreshVertexMarkers:function(t){t=t||this.getDefaultLatLngs();for(var e=0;e<t.length;e++)t[e].__vertex.update()},addMiddleMarker:function(t,e,i){return new this.tools.options.middleMarkerClass(t,e,i,this)},onVertexMarkerClick:function(t){if(Waymark_L.Editable.makeCancellable(t),this.fireAndForward("editable:vertex:click",t),!(t._cancelled||this.tools.drawing()&&this.tools._drawingEditor!==this)){var e,i=t.vertex.getIndex();t.originalEvent.ctrlKey?this.onVertexMarkerCtrlClick(t):t.originalEvent.altKey?this.onVertexMarkerAltClick(t):t.originalEvent.shiftKey?this.onVertexMarkerShiftClick(t):t.originalEvent.metaKey?this.onVertexMarkerMetaKeyClick(t):i===t.vertex.getLastIndex()&&this._drawing===Waymark_L.Editable.FORWARD?i>=this.MIN_VERTEX-1&&(e=!0):0===i&&this._drawing===Waymark_L.Editable.BACKWARD&&this._drawnLatLngs.length>=this.MIN_VERTEX||0===i&&this._drawing===Waymark_L.Editable.FORWARD&&this._drawnLatLngs.length>=this.MIN_VERTEX&&this.CLOSED?e=!0:this.onVertexRawMarkerClick(t),this.fireAndForward("editable:vertex:clicked",t),e&&this.commitDrawing(t)}},onVertexRawMarkerClick:function(t){this.fireAndForward("editable:vertex:rawclick",t),t._cancelled||this.vertexCanBeDeleted(t.vertex)&&t.vertex.delete()},vertexCanBeDeleted:function(t){return t.latlngs.length>this.MIN_VERTEX},onVertexDeleted:function(t){this.fireAndForward("editable:vertex:deleted",t)},onVertexMarkerCtrlClick:function(t){this.fireAndForward("editable:vertex:ctrlclick",t)},onVertexMarkerShiftClick:function(t){this.fireAndForward("editable:vertex:shiftclick",t)},onVertexMarkerMetaKeyClick:function(t){this.fireAndForward("editable:vertex:metakeyclick",t)},onVertexMarkerAltClick:function(t){this.fireAndForward("editable:vertex:altclick",t)},onVertexMarkerContextMenu:function(t){this.fireAndForward("editable:vertex:contextmenu",t)},onVertexMarkerMouseDown:function(t){this.fireAndForward("editable:vertex:mousedown",t)},onVertexMarkerMouseOver:function(t){this.fireAndForward("editable:vertex:mouseover",t)},onVertexMarkerMouseOut:function(t){this.fireAndForward("editable:vertex:mouseout",t)},onMiddleMarkerMouseDown:function(t){this.fireAndForward("editable:middlemarker:mousedown",t)},onVertexMarkerDrag:function(t){this.onMove(t),this.feature._bounds&&this.extendBounds(t),this.fireAndForward("editable:vertex:drag",t)},onVertexMarkerDragStart:function(t){this.fireAndForward("editable:vertex:dragstart",t)},onVertexMarkerDragEnd:function(t){this.fireAndForward("editable:vertex:dragend",t)},setDrawnLatLngs:function(t){this._drawnLatLngs=t||this.getDefaultLatLngs()},startDrawing:function(){this._drawnLatLngs||this.setDrawnLatLngs(),Waymark_L.Editable.BaseEditor.prototype.startDrawing.call(this)},startDrawingForward:function(){this.startDrawing()},endDrawing:function(){this.tools.detachForwardLineGuide(),this.tools.detachBackwardLineGuide(),this._drawnLatLngs&&this._drawnLatLngs.length<this.MIN_VERTEX&&this.deleteShape(this._drawnLatLngs),Waymark_L.Editable.BaseEditor.prototype.endDrawing.call(this),delete this._drawnLatLngs},addLatLng:function(t){this._drawing===Waymark_L.Editable.FORWARD?this._drawnLatLngs.push(t):this._drawnLatLngs.unshift(t),this.feature._bounds.extend(t);var e=this.addVertexMarker(t,this._drawnLatLngs);this.onNewVertex(e),this.refresh()},newPointForward:function(t){this.addLatLng(t),this.tools.attachForwardLineGuide(),this.tools.anchorForwardLineGuide(t)},newPointBackward:function(t){this.addLatLng(t),this.tools.anchorBackwardLineGuide(t)},push:function(t){if(!t)return console.error("Waymark_L.Editable.PathEditor.push expect a valid latlng as parameter");this._drawing===Waymark_L.Editable.FORWARD?this.newPointForward(t):this.newPointBackward(t)},removeLatLng:function(t){t.__vertex.delete(),this.refresh()},pop:function(){var t;if(!(this._drawnLatLngs.length<=1))return t=this._drawing===Waymark_L.Editable.FORWARD?this._drawnLatLngs[this._drawnLatLngs.length-1]:this._drawnLatLngs[0],this.removeLatLng(t),this._drawing===Waymark_L.Editable.FORWARD?this.tools.anchorForwardLineGuide(this._drawnLatLngs[this._drawnLatLngs.length-1]):this.tools.anchorForwardLineGuide(this._drawnLatLngs[0]),t},processDrawingClick:function(t){t.vertex&&t.vertex.editor===this||(this._drawing===Waymark_L.Editable.FORWARD?this.newPointForward(t.latlng):this.newPointBackward(t.latlng),this.fireAndForward("editable:drawing:clicked",t))},onDrawingMouseMove:function(t){Waymark_L.Editable.BaseEditor.prototype.onDrawingMouseMove.call(this,t),this._drawing&&(this.tools.moveForwardLineGuide(t.latlng),this.tools.moveBackwardLineGuide(t.latlng))},refresh:function(){this.feature.redraw(),this.onEditing()},newShape:function(t){var e=this.addNewEmptyShape();e&&(this.setDrawnLatLngs(e[0]||e),this.startDrawingForward(),this.fireAndForward("editable:shape:new",{shape:e}),t&&this.newPointForward(t))},deleteShape:function(t,e){var i={shape:t};if(Waymark_L.Editable.makeCancellable(i),this.fireAndForward("editable:shape:delete",i),!i._cancelled)return t=this._deleteShape(t,e),this.ensureNotFlat&&this.ensureNotFlat(),this.feature.setLatLngs(this.getLatLngs()),this.refresh(),this.reset(),this.fireAndForward("editable:shape:deleted",{shape:t}),t},_deleteShape:function(t,e){if((e=e||this.getLatLngs()).length){var i=this,n=function(t,e){return t.splice(t.indexOf(e),1),t.length||i._deleteShape(t),e};if(e===t)return function(t,e){return t.splice(0,Number.MAX_VALUE)}(e);for(var o=0;o<e.length;o++){if(e[o]===t)return n(e,t);if(-1!==e[o].indexOf(t))return n(e[o],t)}}},deleteShapeAt:function(t){var e=this.feature.shapeAt(t);if(e)return this.deleteShape(e)},appendShape:function(t){this.insertShape(t)},prependShape:function(t){this.insertShape(t,0)},insertShape:function(t,e){this.ensureMulti(),t=this.formatShape(t),void 0===e&&(e=this.feature._latlngs.length),this.feature._latlngs.splice(e,0,t),this.feature.redraw(),this._enabled&&this.reset()},extendBounds:function(t){this.feature._bounds.extend(t.vertex.latlng)},onDragStart:function(t){this.editLayer.clearLayers(),Waymark_L.Editable.BaseEditor.prototype.onDragStart.call(this,t)},onDragEnd:function(t){this.initVertexMarkers(),Waymark_L.Editable.BaseEditor.prototype.onDragEnd.call(this,t)}}),Waymark_L.Editable.PolylineEditor=Waymark_L.Editable.PathEditor.extend({startDrawingBackward:function(){this._drawing=Waymark_L.Editable.BACKWARD,this.startDrawing()},continueBackward:function(t){this.drawing()||(t=t||this.getDefaultLatLngs(),this.setDrawnLatLngs(t),t.length>0&&(this.tools.attachBackwardLineGuide(),this.tools.anchorBackwardLineGuide(t[0])),this.startDrawingBackward())},continueForward:function(t){this.drawing()||(t=t||this.getDefaultLatLngs(),this.setDrawnLatLngs(t),t.length>0&&(this.tools.attachForwardLineGuide(),this.tools.anchorForwardLineGuide(t[t.length-1])),this.startDrawingForward())},getDefaultLatLngs:function(t){return!(t=t||this.feature._latlngs).length||t[0]instanceof Waymark_L.LatLng?t:this.getDefaultLatLngs(t[0])},ensureMulti:function(){this.feature._latlngs.length&&l(this.feature._latlngs)&&(this.feature._latlngs=[this.feature._latlngs])},addNewEmptyShape:function(){if(this.feature._latlngs.length){var t=[];return this.appendShape(t),t}return this.feature._latlngs},formatShape:function(t){return l(t)?t:t[0]?this.formatShape(t[0]):void 0},splitShape:function(t,e){if(e&&!(e>=t.length-1)){this.ensureMulti();var i=this.feature._latlngs.indexOf(t);if(-1!==i){var n=t.slice(0,e+1),o=t.slice(e);o[0]=Waymark_L.latLng(o[0].lat,o[0].lng,o[0].alt),this.feature._latlngs.splice(i,1,n,o),this.refresh(),this.reset()}}}}),Waymark_L.Editable.PolygonEditor=Waymark_L.Editable.PathEditor.extend({CLOSED:!0,MIN_VERTEX:3,newPointForward:function(t){Waymark_L.Editable.PathEditor.prototype.newPointForward.call(this,t),this.tools.backwardLineGuide._latlngs.length||this.tools.anchorBackwardLineGuide(t),2===this._drawnLatLngs.length&&this.tools.attachBackwardLineGuide()},addNewEmptyHole:function(t){this.ensureNotFlat();var e=this.feature.shapeAt(t);if(e){var i=[];return e.push(i),i}},newHole:function(t){var e=this.addNewEmptyHole(t);e&&(this.setDrawnLatLngs(e),this.startDrawingForward(),t&&this.newPointForward(t))},addNewEmptyShape:function(){if(this.feature._latlngs.length&&this.feature._latlngs[0].length){var t=[];return this.appendShape(t),t}return this.feature._latlngs},ensureMulti:function(){this.feature._latlngs.length&&l(this.feature._latlngs[0])&&(this.feature._latlngs=[this.feature._latlngs])},ensureNotFlat:function(){this.feature._latlngs.length&&!l(this.feature._latlngs)||
9(this.feature._latlngs=[this.feature._latlngs])},vertexCanBeDeleted:function(t){var e=this.feature.parentShape(t.latlngs);return Waymark_L.Util.indexOf(e,t.latlngs)>0||Waymark_L.Editable.PathEditor.prototype.vertexCanBeDeleted.call(this,t)},getDefaultLatLngs:function(){return this.feature._latlngs.length||this.feature._latlngs.push([]),this.feature._latlngs[0]},formatShape:function(t){return!l(t)||t[0]&&0===t[0].length?t:[t]}}),Waymark_L.Editable.RectangleEditor=Waymark_L.Editable.PathEditor.extend({CLOSED:!0,MIN_VERTEX:4,options:{skipMiddleMarkers:!0},extendBounds:function(t){var e=t.vertex.getIndex(),i=t.vertex.getNext(),n=t.vertex.getPrevious(),o=(e+2)%4,a=t.vertex.latlngs[o],r=new Waymark_L.LatLngBounds(t.latlng,a);n.latlng.update([t.latlng.lat,a.lng]),i.latlng.update([a.lat,t.latlng.lng]),this.updateBounds(r),this.refreshVertexMarkers()},onDrawingMouseDown:function(t){Waymark_L.Editable.PathEditor.prototype.onDrawingMouseDown.call(this,t),this.connect();var e=this.getDefaultLatLngs();3===e.length&&e.push(t.latlng);var i=new Waymark_L.LatLngBounds(t.latlng,t.latlng);this.updateBounds(i),this.updateLatLngs(i),this.refresh(),this.reset(),t.originalEvent._simulated=!1,this.map.dragging._draggable._onUp(t.originalEvent),e[3].__vertex.dragging._draggable._onDown(t.originalEvent)},onDrawingMouseUp:function(t){this.commitDrawing(t),t.originalEvent._simulated=!1,Waymark_L.Editable.PathEditor.prototype.onDrawingMouseUp.call(this,t)},onDrawingMouseMove:function(t){t.originalEvent._simulated=!1,Waymark_L.Editable.PathEditor.prototype.onDrawingMouseMove.call(this,t)},getDefaultLatLngs:function(t){return t||this.feature._latlngs[0]},updateBounds:function(t){this.feature._bounds=t},updateLatLngs:function(t){for(var e=this.getDefaultLatLngs(),i=this.feature._boundsToLatLngs(t),n=0;n<e.length;n++)e[n].update(i[n])}}),Waymark_L.Editable.CircleEditor=Waymark_L.Editable.PathEditor.extend({MIN_VERTEX:2,options:{skipMiddleMarkers:!0},initialize:function(t,e,i){Waymark_L.Editable.PathEditor.prototype.initialize.call(this,t,e,i),this._resizeLatLng=this.computeResizeLatLng()},computeResizeLatLng:function(){var t=(this.feature._radius||this.feature._mRadius)*Math.cos(Math.PI/4),e=this.map.project(this.feature._latlng);return this.map.unproject([e.x+t,e.y-t])},updateResizeLatLng:function(){this._resizeLatLng.update(this.computeResizeLatLng()),this._resizeLatLng.__vertex.update()},getLatLngs:function(){return[this.feature._latlng,this._resizeLatLng]},getDefaultLatLngs:function(){return this.getLatLngs()},onVertexMarkerDrag:function(t){1===t.vertex.getIndex()?this.resize(t):this.updateResizeLatLng(t),Waymark_L.Editable.PathEditor.prototype.onVertexMarkerDrag.call(this,t)},resize:function(t){var e=this.feature._latlng.distanceTo(t.latlng);this.feature.setRadius(e)},onDrawingMouseDown:function(t){Waymark_L.Editable.PathEditor.prototype.onDrawingMouseDown.call(this,t),this._resizeLatLng.update(t.latlng),this.feature._latlng.update(t.latlng),this.connect(),t.originalEvent._simulated=!1,this.map.dragging._draggable._onUp(t.originalEvent),this._resizeLatLng.__vertex.dragging._draggable._onDown(t.originalEvent)},onDrawingMouseUp:function(t){this.commitDrawing(t),t.originalEvent._simulated=!1,Waymark_L.Editable.PathEditor.prototype.onDrawingMouseUp.call(this,t)},onDrawingMouseMove:function(t){t.originalEvent._simulated=!1,Waymark_L.Editable.PathEditor.prototype.onDrawingMouseMove.call(this,t)},onDrag:function(t){Waymark_L.Editable.PathEditor.prototype.onDrag.call(this,t),this.feature.dragging.updateLatLng(this._resizeLatLng)}});var e={createEditor:function(t){t=t||this._map;var e=(this.options.editOptions||{}).editTools||t.editTools;if(!e)throw Error("Unable to detect Editable instance.");return new(this.options.editorClass||this.getEditorClass(e))(t,this,this.options.editOptions)},enableEdit:function(t){return this.editor||this.createEditor(t),this.editor.enable(),this.editor},editEnabled:function(){return this.editor&&this.editor.enabled()},disableEdit:function(){this.editor&&(this.editor.disable(),delete this.editor)},toggleEdit:function(){this.editEnabled()?this.disableEdit():this.enableEdit()},_onEditableAdd:function(){this.editor&&this.enableEdit()}},i={getEditorClass:function(t){return t&&t.options.polylineEditorClass?t.options.polylineEditorClass:Waymark_L.Editable.PolylineEditor},shapeAt:function(t,e){var i=null;if(!(e=e||this._latlngs).length)return i;if(l(e)&&this.isInLatLngs(t,e))i=e;else for(var n=0;n<e.length;n++)if(this.isInLatLngs(t,e[n]))return e[n];return i},isInLatLngs:function(t,e){if(!e)return!1;var i,n,o,a,r=[],s=this._clickTolerance();if(this._projectLatlngs(e,r,this._pxBounds),r=r[0],a=this._map.latLngToLayerPoint(t),!this._pxBounds.contains(a))return!1;for(i=1,o=r.length,n=0;i<o;n=i++)if(Waymark_L.LineUtil.pointToSegmentDistance(a,r[n],r[i])<=s)return!0;return!1}},n={getEditorClass:function(t){return t&&t.options.polygonEditorClass?t.options.polygonEditorClass:Waymark_L.Editable.PolygonEditor},shapeAt:function(t,e){var i=null;if(!(e=e||this._latlngs).length)return i;if(l(e)&&this.isInLatLngs(t,e))i=e;else if(l(e[0])&&this.isInLatLngs(t,e[0]))i=e;else for(var n=0;n<e.length;n++)if(this.isInLatLngs(t,e[n][0]))return e[n];return i},isInLatLngs:function(t,e){var i,n,o,a,r,s=!1;for(o=0,a=(r=e.length)-1;o<r;a=o++)i=e[o],n=e[a],i.lat>t.lat!=n.lat>t.lat&&t.lng<(n.lng-i.lng)*(t.lat-i.lat)/(n.lat-i.lat)+i.lng&&(s=!s);return s},parentShape:function(t,e){if(e=e||this._latlngs){var i=Waymark_L.Util.indexOf(e,t);if(-1!==i)return e;for(var n=0;n<e.length;n++)if(-1!==(i=Waymark_L.Util.indexOf(e[n],t)))return e[n]}}},o={getEditorClass:function(t){return t&&t.options.markerEditorClass?t.options.markerEditorClass:Waymark_L.Editable.MarkerEditor}},a={getEditorClass:function(t){return t&&t.options.rectangleEditorClass?t.options.rectangleEditorClass:Waymark_L.Editable.RectangleEditor}}
9,r={getEditorClass:function(t){return t&&t.options.circleEditorClass?t.options.circleEditorClass:Waymark_L.Editable.CircleEditor}},s=function(){this.on("add",this._onEditableAdd)},l=Waymark_L.LineUtil.isFlat||Waymark_L.LineUtil._flat||Waymark_L.Polyline._flat;Waymark_L.Polyline&&(Waymark_L.Polyline.include(e),Waymark_L.Polyline.include(i),Waymark_L.Polyline.addInitHook(s)),Waymark_L.Polygon&&(Waymark_L.Polygon.include(e),Waymark_L.Polygon.include(n)),Waymark_L.Marker&&(Waymark_L.Marker.include(e),Waymark_L.Marker.include(o),Waymark_L.Marker.addInitHook(s)),Waymark_L.Rectangle&&(Waymark_L.Rectangle.include(e),Waymark_L.Rectangle.include(a)),Waymark_L.Circle&&(Waymark_L.Circle.include(e),Waymark_L.Circle.include(r)),Waymark_L.LatLng.prototype.update=function(t){t=Waymark_L.latLng(t),this.lat=t.lat,this.lng=t.lng}}),window),Waymark_L.FeatureGroup.SubGroup=Waymark_L.FeatureGroup.extend({initialize:function(t,e){Waymark_L.FeatureGroup.prototype.initialize.call(this,e),this.setParentGroup(t)},setParentGroup:function(t){var e=t instanceof Waymark_L.LayerGroup;return this._parentGroup=t,this.onAdd=e?"function"==typeof t.addLayers?this._onAddToGroupBatch:this._onAddToGroup:this._onAddToMap,this.onRemove=e?"function"==typeof t.removeLayers?this._onRemoveFromGroupBatch:this._onRemoveFromGroup:this._onRemoveFromMap,this.addLayer=e?this._addLayerToGroup:this._addLayerToMap,this.removeLayer=e?this._removeLayerFromGroup:this._removeLayerFromMap,this},setParentGroupSafe:function(t){var e=this._map;return e&&e.removeLayer(this),this.setParentGroup(t),e&&e.addLayer(this),this},getParentGroup:function(){return this._parentGroup},_onAddToGroupBatch:function(t){var e=this.getLayers();this._map=t,this._parentGroup.addLayers(e)},_onRemoveFromGroupBatch:function(){var t=this.getLayers();this._parentGroup.removeLayers(t),this._map=null},_onAddToGroup:function(t){var e=this._parentGroup;this._map=t,this.eachLayer(e.addLayer,e)},_onRemoveFromGroup:function(){var t=this._parentGroup;this.eachLayer(t.removeLayer,t),this._map=null},_onAddToMap:Waymark_L.FeatureGroup.prototype.onAdd,_onRemoveFromMap:Waymark_L.FeatureGroup.prototype.onRemove,_addLayerToGroup:function(t){if(this.hasLayer(t))return this;t.addEventParent(this);var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._parentGroup.addLayer(t),this.fire("layeradd",{layer:t})},_removeLayerFromGroup:function(t){if(!this.hasLayer(t))return this;var e=t in this._layers?t:this.getLayerId(t);return(t=this._layers[e]).removeEventParent(this),this._map&&t&&this._parentGroup.removeLayer(t),delete this._layers[e],this.fire("layerremove",{layer:t})},_addLayerToMap:Waymark_L.FeatureGroup.prototype.addLayer,_removeLayerFromMap:Waymark_L.FeatureGroup.prototype.removeLayer}),Waymark_L.featureGroup.subGroup=function(t,e){return new Waymark_L.FeatureGroup.SubGroup(t,e)},function(t){var e;if("function"==typeof define&&define.amd)define(["leaflet"],t);else if("undefined"!=typeof module)e=require("leaflet"),module.exports=t(e);else{if(void 0===window.L)throw new Error("Leaflet must be loaded first");t(window.L)}}((function(t){Waymark_L.Control.Fullscreen=Waymark_L.Control.extend({options:{position:"topleft",title:{false:"View Fullscreen",true:"Exit Fullscreen"}},onAdd:function(t){var e=Waymark_L.DomUtil.create("div","leaflet-control-fullscreen leaflet-bar leaflet-control");return this.link=Waymark_L.DomUtil.create("a","leaflet-control-fullscreen-button leaflet-bar-part",e),this.link.href="#",this._map=t,this._map.on("fullscreenchange",this._toggleTitle,this),this._toggleTitle(),Waymark_L.DomEvent.on(this.link,"click",this._click,this),e},_click:function(t){Waymark_L.DomEvent.stopPropagation(t),Waymark_L.DomEvent.preventDefault(t),this._map.toggleFullscreen(this.options)},_toggleTitle:function(){this.link.title=this.options.title[this._map.isFullscreen()]}}),Waymark_L.Map.include({isFullscreen:function(){return this._isFullscreen||!1},toggleFullscreen:function(t){var e=this.getContainer();this.isFullscreen()?t&&t.pseudoFullscreen?this._disablePseudoFullscreen(e):document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():this._disablePseudoFullscreen(e):t&&t.pseudoFullscreen?this._enablePseudoFullscreen(e):e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):e.msRequestFullscreen?e.msRequestFullscreen():this._enablePseudoFullscreen(e)},_enablePseudoFullscreen:function(t){Waymark_L.DomUtil.addClass(t,"leaflet-pseudo-fullscreen"),this._setFullscreen(!0),this.fire("fullscreenchange")},_disablePseudoFullscreen:function(t){Waymark_L.DomUtil.removeClass(t,"leaflet-pseudo-fullscreen"),this._setFullscreen(!1),this.fire("fullscreenchange")},_setFullscreen:function(t){this._isFullscreen=t;var e=this.getContainer();t?Waymark_L.DomUtil.addClass(e,"leaflet-fullscreen-on"):Waymark_L.DomUtil.removeClass(e,"leaflet-fullscreen-on"),this.invalidateSize()},_onFullscreenChange:function(t){var e=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;e!==this.getContainer()||this._isFullscreen?e!==this.getContainer()&&this._isFullscreen&&(this._setFullscreen(!1),this.fire("fullscreenchange")):(this._setFullscreen(!0),this.fire("fullscreenchange"))}}),Waymark_L.Map.mergeOptions({fullscreenControl:!1}),Waymark_L.Map.addInitHook((function(){var t;if(this.options.fullscreenControl&&(this.fullscreenControl=new Waymark_L.Control.Fullscreen(this.options.fullscreenControl),this.addControl(this.fullscreenControl)),"onfullscreenchange"in document?t="fullscreenchange":"onmozfullscreenchange"in document?t="mozfullscreenchange":"onwebkitfullscreenchange"in document?t="webkitfullscreenchange":"onmsfullscreenchange"in document&&(t="MSFullscreenChange"),t){var e=Waymark_L.bind(this._onFullscreenChange,this);this.whenReady((function(){Waymark_L.DomEvent.on(document,t,e)})),this.on("unload",(function(){Waymark_L.DomEvent.off(document,t,e)}))}})),Waymark_L.control.fullscreen=function(t){return new Waymark_L.Control.Fullscreen(t)}})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t.Leaflet=t.Leaflet||{}
vendor: 7,120 bytes, line 9
9,t.Leaflet.markercluster=t.Leaflet.markercluster||{}))}(this,(function(t){"use strict";var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t}),this):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t}),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i,n=this._featureGroup,o=this._nonPointGroup,a=this.options.chunkedLoading,r=this.options.chunkInterval,s=this.options.chunkProgress,l=t.length,h=0,u=!0;if(this._map){var c=(new Date).getTime(),d=L.bind((function(){for(var p=(new Date).getTime();l>h;h++){if(a&&0==h%200)if((new Date).getTime()-p>r)break;if((i=t[h])instanceof L.LayerGroup)u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(i,t),l=t.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),e||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var _=i.__parent.getAllChildMarkers(),m=_[0]===i?_[1]:_[0];n.removeLayer(m)}}else o.addLayer(i),e||this.fire("layeradd",{layer:i})}s&&s(h,l,(new Date).getTime()-c),h===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(d,this.options.chunkDelay)}),this);d()}else for(var p=this._needsClustering;l>h;h++)(i=t[h])instanceof L.LayerGroup?(u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(i,t),l=t.length):i.getLatLng?this.hasLayer(i)||p.push(i):o.addLayer(i);return this},removeLayers:function(t){var e,i,n=t.length,o=this._featureGroup,a=this._nonPointGroup,r=!0;if(!this._map){for(e=0;n>e;e++)(i=t[e])instanceof L.LayerGroup?(r&&(t=t.slice(),r=!1),this._extractNonGroupLayers(i,t),n=t.length):(this._arraySplice(this._needsClustering,i),a.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var s=t.slice(),l=n;for(e=0;l>e;e++)(i=s[e])instanceof L.LayerGroup?(this._extractNonGroupLayers(i,s),l=s.length):this._unspiderfyLayer(i)}for(e=0;n>e;e++)(i=t[e])instanceof L.LayerGroup?(r&&(t=t.slice(),r=!1),this._extractNonGroupLayers(i,t),n=t.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),o.hasLayer(i)&&(o.removeLayer(i),i.clusterShow&&i.clusterShow())):(a.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer((function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent}),this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n,o,a=this._needsClustering.slice(),r=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(a),n=a.length-1;n>=0;n--){for(i=!0,o=r.length-1;o>=0;o--)if(r[o].layer===a[n]){i=!1;break}i&&t.call(e,a[n])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer((function(e){t.push(e)})),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer((function(i){L.stamp(i)===t&&(e=i)})),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(e=(i=this._needsRemoving).length-1;e>=0;e--)if(i[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){"function"!=typeof e&&(e=function(){});var i=function(){!t._icon&&!t.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),t._icon?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",i,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",i,this),this.on("animationend",i,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,i,n;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";
vendor: 4,830 bytes, line 9
9for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;i>e;e++)(n=this._needsRemoving[e]).newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(e=0,i=this._needsRemoving.length;i>e;e++)n=this._needsRemoving[e],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());e>=o&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var n=this._gridClusters,o=this._gridUnclustered,a=this._featureGroup,r=this._map,s=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var l,h=t.__parent,u=h._markers;for(this._arraySplice(u,t);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom<s));)e&&h._childCount<=1?(l=h._markers[0]===t?h._markers[1]:h._markers[0],n[h._zoom].removeObject(h,r.project(h._cLatLng,h._zoom)),o[h._zoom].addObject(l,r.project(l.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(l),l.__parent=h.__parent,h._icon&&(a.removeLayer(h),i||a.addLayer(l))):h._iconNeedsUpdate=!0,h=h.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=10>e?"small":100>e?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(e||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){for(var e=t.layer,i=e;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(t||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))}
vendor: 8,102 bytes, line 9
9,_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var o=t;o>=e;o--)this._gridClusters[o]=new L.DistanceGrid(n(o)),this._gridUnclustered[o]=new L.DistanceGrid(n(o));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i,n,o=this._gridClusters,a=this._gridUnclustered,r=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=r;e--){i=this._map.project(t.getLatLng(),e);var s=o[e].getNearObject(i);if(s)return s._addChild(t),void(t.__parent=s);if(s=a[e].getNearObject(i)){var l=s.__parent;l&&this._removeLayer(s,!1);var h=new this._markerCluster(this,e,s,t);o[e].addObject(h,this._map.project(h._cLatLng,e)),s.__parent=h,t.__parent=h;var u=h;for(n=e-1;n>l._zoom;n--)u=new this._markerCluster(this,n,u),o[n].addObject(u,this._map.project(s.getLatLng(),n));return l._addChild(u),void this._removeFromGridUnclustered(s,e)}a[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer((function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()}))},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),o=0;for(e=e||[];o<n.length;o++)(i=n[o])instanceof L.LayerGroup?this._extractNonGroupLayers(i,e):e.push(i);return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var i,n=this._getExpandedVisibleBounds(),o=this._featureGroup,a=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(n,t,a,(function(a){var r,s=a._latlng,l=a._markers;for(n.contains(s)||(s=null),a._isSingleParent()&&t+1===e?(o.removeLayer(a),a._recursivelyAddChildrenToMap(null,e,n)):(a.clusterHide(),a._recursivelyAddChildrenToMap(s,e,n)),i=l.length-1;i>=0;i--)r=l[i],n.contains(r._latlng)||o.removeLayer(r)})),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),o.eachLayer((function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()})),this._topClusterLevel._recursively(n,t,e,(function(t){t._recursivelyRestoreChildPositions(e)})),this._ignoreMove=!1,this._enqueue((function(){this._topClusterLevel._recursively(n,t,a,(function(t){o.removeLayer(t),t.clusterShow()})),this._animationEnd()}))},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue((function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()}))):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds(),o=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,o,e+1,i);var a=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue((function(){if(1===t._childCount){var r=t._markers[0];this._ignoreMove=!0,r.setLatLng(r.getLatLng()),this._ignoreMove=!1,r.clusterShow&&r.clusterShow()}else t._recursively(n,i,o,(function(t){t._recursivelyRemoveChildrenFromMap(n,o,e+1)}));a._animationEnd()}))},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(t);for(var n=this._markers.length-1;n>=0;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,i=this._childClusters.slice(),n=this._group._map,o=n.getBoundsZoom(this._bounds),a=this._zoom+1,r=n.getZoom();i.length>0&&o>a;){a++;var s=[];for(e=0;e<i.length;e++)s=s.concat(i[e]._childClusters);i=s}o>
vendor: 10,768 bytes, line 9
9a?this._group._map.setView(this._latlng,a):r>=o?this._group._map.setView(this._latlng,r+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n,o=this._markers,a=this._childClusters,r=0,s=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t<o.length;t++)i=o[t]._latlng,this._bounds.extend(i),r+=i.lat,s+=i.lng;for(t=0;t<a.length;t++)(e=a[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),i=e._wLatLng,n=e._childCount,r+=i.lat*n,s+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(r/l,s/l),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,this._group._map.getMinZoom(),i-1,(function(t){var i,n,o=t._markers;for(i=o.length-1;i>=0;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())}),(function(t){var i,n,o=t._childClusters;for(i=o.length-1;i>=0;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())}))},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,(function(o){o._recursivelyAnimateChildrenIn(t,o._group._map.latLngToLayerPoint(o.getLatLng()).round(),i),o._isSingleParent()&&i-1===n?(o.clusterShow(),o._recursivelyRemoveChildrenFromMap(t,e,i)):o.clusterHide(),o._addToMap()}))},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,(function(t){t.clusterShow()}))},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,(function(n){if(e!==n._zoom)for(var o=n._markers.length-1;o>=0;o--){var a=n._markers[o];i.contains(a._latlng)&&(t&&(a._backupLatlng=a.getLatLng(),a.setLatLng(t),a.clusterHide&&a.clusterHide()),n._group._featureGroup.addLayer(a))}}),(function(e){e._addToMap(t)}))},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var o=this._childClusters.length-1;o>=0;o--)this._childClusters[o]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var o,a;this._recursively(t,e-1,i-1,(function(t){for(a=t._markers.length-1;a>=0;a--)o=t._markers[a],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}),(function(t){for(a=t._childClusters.length-1;a>=0;a--)o=t._childClusters[a],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}))},_recursively:function(t,e,i,n,o){var a,r,s=this._childClusters,l=this._zoom;if(l>=e&&(n&&n(this),o&&l===i&&o(this)),e>l||i>l)for(a=s.length-1;a>=0;a--)(r=s[a])._boundsNeedUpdate&&r._recalculateBounds(),t.intersects(r._bounds)&&r._recursively(t,e,i,n,o)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),o=this._grid,a=o[n]=o[n]||{},r=a[i]=a[i]||[],s=L.Util.stamp(t);this._objectPoint[s]=e,r.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,o=this._getCoord(e.x),a=this._getCoord(e.y),r=this._grid,s=r[a]=r[a]||{},l=s[o]=s[o]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=l.length;n>i;i++)if(l[i]===t)return l.splice(i,1),1===n&&delete s[o],!0},eachObject:function(t,e){var i,n,o,a,r,s,l=this._grid;for(i in l)for(n in r=l[i])for(o=0,a=(s=r[n]).length;a>o;o++)t.call(e,s[o])&&(o--,a--)},getNearObject:function(t){var e,i,n,o,a,r,s,l,h=this._getCoord(t.x),u=this._getCoord(t.y),c=this._objectPoint,d=this._sqCellSize,p=null;for(e=u-1;u+1>=e;e++)if(o=this._grid[e])for(i=h-1;h+1>=i;i++)if(a=o[i])for(n=0,r=a.length;r>n;n++)s=a[n],(d>(l=this._sqDist(c[L.Util.stamp(s)],t))||d>=l&&null===p)&&(d=l,p=s);return p},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,o,a=0,r=null,s=[];for(i=e.length-1;i>=0;i--)n=e[i],(o=this.getDistant(n,t))>0&&(s.push(n),o>a&&(a=o,r=n));return{maxPoint:r,newPoints:s}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints))).concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,o=!1,a=!1,r=null,s=null,l=null,h=null,u=null,c=null;for(e=t.length-1;e>=0;e--){var d=t[e];(!1===i||d.lat>i)&&(r=d,i=d.lat),(!1===n||d.lat<n)&&(s=d,n=d.lat),(!1===o||d.lng>o)&&(l=d,o=d.lng),(!1===a||d.lng<a)&&(h=d,a=d.lng)}return n!==i?(c=s,u=r):(c=h,u=l),[].concat(this.buildConvexHull([c,u],t),this.buildConvexHull([u,c],t))}},L.MarkerCluster.include({getConvexHull:function(){var t,e,i=this.getAllChildMarkers(),n=[];for(e=i.length-1;e>=0;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,i):(i.y+=10,t=this._generatePointsCircle(e.length,i)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,a=this._2PI/t,r=[];for(o=Math.max(o,35),r.length=t,i=0;t>i;i++)n=this._circleStartAngle+i*a,r[i]=new L.Point(e.x+o*Math.cos(n),e.y+o*Math.sin(n))._round();return r},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier,o=n*this._spiralLengthStart,a=n*this._spiralFootSeparation,r=n*this._spiralLengthFactor*this._2PI,s=0,l=[];for(l.length=t,i=t;i>=0;i--)t>i&&(l[i]=new L.Point(e.x+o*Math.cos(s),e.y+o*Math.sin(s))._round()),o+=r/(s+=a/o+5e-4*i);return l},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,o=i._featureGroup,a=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),e=a.length-1;e>=0;e--)t=a[e],o.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:a}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,o,a,r=this._group,s=r._map,l=r._featureGroup,h=this._group.options.spiderLegPolylineOptions;for(r._ignoreMove=!0,i=0;i<t.length;i++)a=s.layerPointToLatLng(e[i]),n=t[i],o=new L.Polyline([this._latlng,a],h),s.addLayer(o),n._spiderLeg=o,n._preSpiderfyLatlng=n._latlng,n.setLatLng(a),n.setZIndexOffset&&n.setZIndexOffset(1e6),l.addLayer(n);this.setOpacity(.3),r._ignoreMove=!1,r.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i,n,o,a,r,s,l=this,h=this._group,u=h._map,c=h._featureGroup,d=this._latlng,p=u.latLngToLayerPoint(d),_=L.Path.SVG,m=L.extend({},this._group.options.spiderLegPolylineOptions),f=m.opacity;for(void 0===f&&(f=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),_?(m.opacity=0,m.className=(m.className||"")+" leaflet-cluster-spider-leg"):m.opacity=f,h._ignoreMove=!0,i=0;i<t.length;i++)n=t[i],s=u.layerPointToLatLng(e[i]),o=new L.Polyline([d,s],m),u.addLayer(o),n._spiderLeg=o,_&&(r=(a=o._path).getTotalLength()+.1,a.style.strokeDasharray=r,a.style.strokeDashoffset=r),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),c.addLayer(n),n._setPos&&n._setPos(p);for(h._forceLayout(),h._animationStart(),i=t.length-1;i>=0;i--)s=u.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.clusterShow&&n.clusterShow(),_&&((a=(o=n._spiderLeg)._path).style.strokeDashoffset=0,o.setStyle({opacity:f}));this.setOpacity(.3),h._ignoreMove=!1,setTimeout((function(){h._animationEnd(),h.fire("spiderfied",{cluster:l,markers:t})}),200)},_animationUnspiderfy:function(t){var e,i,n,o,a,r,s=this,l=this._group,h=l._map,u=l._featureGroup,c=t?h._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):h.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(null,!0),p=L.Path.SVG;for(l._ignoreMove=!0,l._animationStart(),this.setOpacity(1),i=d.length-1;i>=0;i--)(e=d[i])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,r=!0,e._setPos&&(e._setPos(c),r=!1),e.clusterHide&&(e.clusterHide(),r=!1),r&&u.removeLayer(e),p&&(a=(o=(n=e._spiderLeg)._path).getTotalLength()+.1,o.style.strokeDashoffset=a,n.setStyle({opacity:0}
9)));l._ignoreMove=!1,setTimeout((function(){var t=0;for(i=d.length-1;i>=0;i--)(e=d[i])._spiderLeg&&t++;for(i=d.length-1;i>=0;i--)(e=d[i])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),t>1&&u.removeLayer(e),h.removeLayer(e._spiderLeg),delete e._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:s,markers:d})}),200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("leaflet")):"function"==typeof define&&define.amd?define(["leaflet"],e):e(t.L)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e=function(t,e){return(180*Math.atan2(e.y-t.y,e.x-t.x)/Math.PI+90+360)%360},i=function(t,e){var i=t.value;return t.isInPixels?i/e:i};function n(t){if("string"==typeof t&&-1!==t.indexOf("%"))return{value:parseFloat(t)/100,isInPixels:!1};var e=t?parseFloat(t):0;return{value:e,isInPixels:e>0}}var o,a,r;function s(t){return t.reduce((function(t,i,n,o){if(n>0&&!function(t,e){return t.x===e.x&&t.y===e.y}(i,o[n-1])){var a=o[n-1],r=t.length>0?t[t.length-1].distB:0,s=(l=a,u=(h=i).x-l.x,c=h.y-l.y,Math.sqrt(u*u+c*c));t.push({a:a,b:i,distA:r,distB:r+s,heading:e(a,i)})}var l,h,u,c;return t}),[])}function l(t,e,i){return e.x!==t.x?{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}:{x:t.x,y:t.y+(e.y-t.y)*i}}o=Waymark_L.Marker.prototype._initIcon,a=Waymark_L.Marker.prototype._setPos,r="msTransform"===Waymark_L.DomUtil.TRANSFORM,Waymark_L.Marker.addInitHook((function(){var t=this.options.icon&&this.options.icon.options&&this.options.icon.options.iconAnchor;t&&(t=t[0]+"px "+t[1]+"px"),this.options.rotationOrigin=this.options.rotationOrigin||t||"center bottom",this.options.rotationAngle=this.options.rotationAngle||0,this.on("drag",(function(t){t.target._applyRotation()}))})),Waymark_L.Marker.include({_initIcon:function(){o.call(this)},_setPos:function(t){a.call(this,t),this._applyRotation()},_applyRotation:function(){this.options.rotationAngle&&(this._icon.style[Waymark_L.DomUtil.TRANSFORM+"Origin"]=this.options.rotationOrigin,r?this._icon.style[Waymark_L.DomUtil.TRANSFORM]="rotate("+this.options.rotationAngle+"deg)":this._icon.style[Waymark_L.DomUtil.TRANSFORM]+=" rotateZ("+this.options.rotationAngle+"deg)")},setRotationAngle:function(t){return this.options.rotationAngle=t,this.update(),this},setRotationOrigin:function(t){return this.options.rotationOrigin=t,this.update(),this}}),t.Symbol=t.Symbol||{},t.Symbol.Dash=t.Class.extend({options:{pixelSize:10,pathOptions:{}},initialize:function(e){t.Util.setOptions(this,e),this.options.pathOptions.clickable=!1},buildSymbol:function(e,i,n,o,a){var r=this.options,s=Math.PI/180;if(r.pixelSize<=1)return t.polyline([e.latLng,e.latLng],r.pathOptions);var l=n.project(e.latLng),h=-(e.heading-90)*s,u=t.point(l.x+r.pixelSize*Math.cos(h+Math.PI)/2,l.y+r.pixelSize*Math.sin(h)/2),c=l.add(l.subtract(u));return t.polyline([n.unproject(u),n.unproject(c)],r.pathOptions)}}),t.Symbol.dash=function(e){return new t.Symbol.Dash(e)},t.Symbol.ArrowHead=t.Class.extend({options:{polygon:!0,pixelSize:10,headAngle:60,pathOptions:{stroke:!1,weight:2}},initialize:function(e){t.Util.setOptions(this,e),this.options.pathOptions.clickable=!1},buildSymbol:function(e,i,n,o,a){return this.options.polygon?t.polygon(this._buildArrowPath(e,n),this.options.pathOptions):t.polyline(this._buildArrowPath(e,n),this.options.pathOptions)},_buildArrowPath:function(e,i){var n=Math.PI/180,o=i.project(e.latLng),a=-(e.heading-90)*n,r=this.options.headAngle/2*n,s=a+r,l=a-r,h=t.point(o.x-this.options.pixelSize*Math.cos(s),o.y+this.options.pixelSize*Math.sin(s)),u=t.point(o.x-this.options.pixelSize*Math.cos(l),o.y+this.options.pixelSize*Math.sin(l));return[i.unproject(h),e.latLng,i.unproject(u)]}}),t.Symbol.arrowHead=function(e){return new t.Symbol.ArrowHead(e)},t.Symbol.Marker=t.Class.extend({options:{markerOptions:{},rotate:!1},initialize:function(e){t.Util.setOptions(this,e),this.options.markerOptions.clickable=!1,this.options.markerOptions.draggable=!1},buildSymbol:function(e,i,n,o,a){return this.options.rotate&&(this.options.markerOptions.rotationAngle=e.heading+(this.options.angleCorrection||0)),t.marker(e.latLng,this.options.markerOptions)}}),t.Symbol.marker=function(e){return new t.Symbol.Marker(e)};var h=function(e){return Array.isArray(e)&&((i=e[0])instanceof t.LatLng||Array.isArray(i)&&2===i.length&&"number"==typeof i[0]);var i};t.PolylineDecorator=t.FeatureGroup.extend({options:{patterns:[]},initialize:function(e,i){t.FeatureGroup.prototype.initialize.call(this),t.Util.setOptions(this,i),this._map=null,this._paths=this._initPaths(e),this._bounds=this._initBounds(),this._patterns=this._initPatterns(this.options.patterns)},_initPaths:function(e,i){var n=this;return h(e)?[i?e.concat([e[0]]):e]:e instanceof t.Polyline?this._initPaths(e.getLatLngs(),e instanceof t.Polygon):Array.isArray(e)?e.reduce((function(t,e){return t.concat(n._initPaths(e,i))}),[]):[]},_initPatterns:function(t){return t.map(this._parsePatternDef)},setPatterns:function(t){this.options.patterns=t,this._patterns=this._initPatterns(this.options.patterns),this.redraw()},setPaths:function(t){this._paths=this._initPaths(t),this._bounds=this._initBounds(),this.redraw()},_parsePatternDef:function(t,e){return{symbolFactory:t.symbol,offset:n(t.offset),endOffset:n(t.endOffset),repeat:n(t.repeat)}},onAdd:function(t){this._map=t,this._draw(),this._map.on("moveend",this.redraw,this)},onRemove:function(e){this._map.off("moveend",this.redraw,this),this._map=null,t.FeatureGroup.prototype.onRemove.call(this,e)},_initBounds:function(){var e=this._paths.reduce((function(t,e){return t.concat(e)}),[]);return t.latLngBounds(e)},getBounds:function(){return this._bounds}
9,_buildSymbols:function(t,e,i){var n=this;return i.map((function(o,a){return e.buildSymbol(o,t,n._map,a,i.length)}))},_getDirectionPoints:function(e,n){var o=this;return e.length<2?[]:function(t,e){var n=s(t),o=n.length;if(0===o)return[];var a=n[o-1].distB,r=i(e.offset,a),h=i(e.endOffset,a),u=a*i(e.repeat,a),c=h>0?a*h:0,d=[],p=r>0?a*r:0;do{d.push(p),p+=u}while(u>0&&p<a-c);var _=0,m=n[0];return d.map((function(t){for(;t>m.distB&&_<o-1;)_++,m=n[_];var e=(t-m.distA)/(m.distB-m.distA);return{pt:l(m.a,m.b,e),heading:m.heading}}))}(e.map((function(t){return o._map.project(t)})),n).map((function(e){return{latLng:o._map.unproject(t.point(e.pt)),heading:e.heading}}))},redraw:function(){this._map&&(this.clearLayers(),this._draw())},_getPatternLayers:function(e){var i=this,n=this._map.getBounds().pad(.1);return this._paths.map((function(o){var a=i._getDirectionPoints(o,e).filter((function(t){return n.contains(t.latLng)}));return t.featureGroup(i._buildSymbols(o,e.symbolFactory,a))}))},_draw:function(){var e=this;this._patterns.map((function(t){return e._getPatternLayers(t)})).forEach((function(i){e.addLayer(t.featureGroup(i))}))}}),t.polylineDecorator=function(e,i){return new t.PolylineDecorator(e,i)}})),Waymark_L.Control.SleepMapControl=Waymark_L.Control.extend({initialize:function(t){Waymark_L.setOptions(this,t)},options:{position:"topright",prompt:"disable map",styles:{backgroundColor:"white",padding:"5px",border:"2px solid gray"}},buildContainer:function(){var t=this,e=Waymark_L.DomUtil.create("p","sleep-button"),i=this._nonBoundEvent.bind(this);return e.appendChild(document.createTextNode(this.options.prompt)),Waymark_L.DomEvent.addListener(e,"click",i),Waymark_L.DomEvent.addListener(e,"touchstart",i),Object.keys(this.options.styles).map((function(i){e.style[i]=t.options.styles[i]})),this._container=e},onAdd:function(){return this._container||this.buildContainer()},_nonBoundEvent:function(t){return Waymark_L.DomEvent.stop(t),this._map&&this._map.sleep._sleepMap(),!1}}),Waymark_L.Control.sleepMapControl=function(){return new Waymark_L.Control.SleepMapControl},Waymark_L.Map.mergeOptions({sleep:!0,sleepTime:750,wakeTime:750,wakeMessageTouch:"Touch to Wake",sleepNote:!0,hoverToWake:!0,sleepOpacity:.7,sleepButton:Waymark_L.Control.sleepMapControl}),Waymark_L.Map.Sleep=Waymark_L.Handler.extend({addHooks:function(){this.sleepNote=Waymark_L.DomUtil.create("p","sleep-note",this._map._container),this._enterTimeout=null,this._exitTimeout=null,this._sleepButton=this._map.options.sleepButton(),this._map.tap&&this._map.addControl(this._sleepButton);var t=this._map._container.style;t.WebkitTransition+="opacity .5s",t.MozTransition+="opacity .5s",this._setSleepNoteStyle(),this._sleepMap()},removeHooks:function(){this._map.scrollWheelZoom.enabled()||this._map.scrollWheelZoom.enable(),this._map.tap&&!this._map.tap.enabled()&&(this._map.touchZoom.enable(),this._map.dragging.enable(),this._map.tap.enable()),Waymark_L.DomUtil.setOpacity(this._map._container,1),Waymark_L.DomUtil.setOpacity(this.sleepNote,0),this._removeSleepingListeners(),this._removeAwakeListeners()},_setSleepNoteStyle:function(){var t="",e=this.sleepNote.style;if(t=this._map.tap?this._map.options.wakeMessageTouch:this._map.options.wakeMessage?this._map.options.wakeMessage:this._map.options.hoverToWake?"click or hover to wake":"click to wake",this._map.options.sleepNote&&(this.sleepNote.appendChild(document.createTextNode(t)),e.pointerEvents="none",e.maxWidth="150px",e.transitionDuration=".2s",e.zIndex=5e3,e.opacity=".6",e.margin="auto",e.textAlign="center",e.borderRadius="4px",e.top="50%",e.position="relative",e.padding="5px",e.border="solid 2px black",e.background="white",this._map.options.sleepNoteStyle)){var i=this._map.options.sleepNoteStyle;Object.keys(i).map((function(t){e[t]=i[t]}))}},_wakeMap:function(t){this._stopWaiting(),this._map.scrollWheelZoom.enable(),this._map.dragging.enable(),this._map.tap&&(this._map.touchZoom.enable(),this._map.tap.enable(),this._map.addControl(this._sleepButton)),Waymark_L.DomUtil.setOpacity(this._map._container,1),this.sleepNote.style.opacity=0,this._addAwakeListeners()}
9,_sleepMap:function(){this._stopWaiting(),this._map.scrollWheelZoom.disable(),this._map.tap&&(this._map.touchZoom.disable(),this._map.dragging.disable(),this._map.tap.disable(),this._map.removeControl(this._sleepButton)),Waymark_L.DomUtil.setOpacity(this._map._container,this._map.options.sleepOpacity),this.sleepNote.style.opacity=.4,this._addSleepingListeners()},_wakePending:function(){if(this._map.once("mousedown",this._wakeMap,this),this._map.options.hoverToWake){var t=this;this._map.once("mouseout",this._sleepMap,this),t._enterTimeout=setTimeout((function(){t._map.off("mouseout",t._sleepMap,t),t._wakeMap()}),t._map.options.wakeTime)}},_sleepPending:function(){var t=this;t._map.once("mouseover",t._wakeMap,t),t._exitTimeout=setTimeout((function(){t._map.off("mouseover",t._wakeMap,t),t._sleepMap()}),t._map.options.sleepTime)},_addSleepingListeners:function(){this._map.once("mouseover",this._wakePending,this),this._map.tap&&this._map.once("click",this._wakeMap,this)},_addAwakeListeners:function(){this._map.once("mouseout",this._sleepPending,this)},_removeSleepingListeners:function(){this._map.options.hoverToWake&&this._map.off("mouseover",this._wakePending,this),this._map.off("mousedown",this._wakeMap,this),this._map.tap&&this._map.off("click",this._wakeMap,this)},_removeAwakeListeners:function(){this._map.off("mouseout",this._sleepPending,this)},_stopWaiting:function(){this._removeSleepingListeners(),this._removeAwakeListeners();this._enterTimeout&&clearTimeout(this._enterTimeout),this._exitTimeout&&clearTimeout(this._exitTimeout),this._enterTimeout=null,this._exitTimeout=null}}),Waymark_L.Map.addInitHook("addHandler","sleep",Waymark_L.Map.Sleep);var toGeoJSON=function(){var t,e=/\s*/g,i=/^\s*|\s*$/g,n=/\s+/;function o(t){if(!t||!t.length)return 0;for(var e=0,i=0;e<t.length;e++)i=(i<<5)-i+t.charCodeAt(e)|0;return i}function a(t,e){return t.getElementsByTagName(e)}function r(t,e){return t.getAttribute(e)}function s(t,e){return parseFloat(r(t,e))}function l(t,e){var i=a(t,e);return i.length?i[0]:null}function h(t){for(var e=0,i=[];e<t.length;e++)i[e]=parseFloat(t[e]);return i}function u(t){return t&&function(t){t.normalize&&t.normalize()}(t),t&&t.textContent||""}function c(t,e){var i,n,o={};for(n=0;n<e.length;n++)(i=l(t,e[n]))&&(o[e[n]]=u(i));return o}function d(t,e){for(var i in e)t[i]=e[i]}function p(t){return h(t.replace(e,"").split(","))}function _(t){for(var e=t.replace(i,"").split(n),o=[],a=0;a<e.length;a++)o.push(p(e[a]));return o}function m(t){var e,i=[s(t,"lon"),s(t,"lat")],n=l(t,"ele"),o=l(t,"gpxtpx:hr")||l(t,"hr"),a=l(t,"time");return n&&(e=parseFloat(u(n)),isNaN(e)||i.push(e)),{coordinates:i,time:a?u(a):null,heartRate:o?parseFloat(u(o)):null}}if("undefined"!=typeof XMLSerializer)t=new XMLSerializer;else{var f="object"==typeof process&&!process.browser,g="object"==typeof Titanium;if("object"!=typeof exports||!f&&!g)throw new Error("Unable to initialize serializer");t=new(require("xmldom").XMLSerializer)}function y(e){return void 0!==e.xml?e.xml:t.serializeToString(e)}return{kml:function(t){for(var e={type:"FeatureCollection",features:[]},i={},n={},s={},c=["Polygon","LineString","Point","Track","gx:Track"],d=a(t,"Placemark"),m=a(t,"Style"),f=a(t,"StyleMap"),g=0;g<m.length;g++){var v=o(y(m[g])).toString(16);i["#"+r(m[g],"id")]=v,n[v]=m[g]}for(var k=0;k<f.length;k++){i["#"+r(f[k],"id")]=o(y(f[k])).toString(16);for(var L=a(f[k],"Pair"),w={},b=0;b<L.length;b++)w[u(l(L[b],"key"))]=u(l(L[b],"styleUrl"));s["#"+r(f[k],"id")]=w}for(var x=0;x<d.length;x++)e.features=e.features.concat(T(d[x]));function W(t){var e,i;return"#"===(t=t||"").substr(0,1)&&(t=t.substr(1)),6!==t.length&&3!==t.length||(e=t),8===t.length&&(i=parseInt(t.substr(0,2),16)/255,e="#"+t.substr(6,2)+t.substr(4,2)+t.substr(2,2)),[e,isNaN(i)?void 0:i]}function C(t){return h(t.split(" "))}function M(t){var e=a(t,"coord"),i=[],n=[];0===e.length&&(e=a(t,"gx:coord"));for(var o=0;o<e.length;o++)i.push(C(u(e[o])));for(var r=a(t,"when"),s=0;s<r.length;s++)n.push(u(r[s]));return{coords:i,times:n}}function T(t){var e,o=function t(e){var i,n,o,r,s,h=[],d=[];if(l(e,"MultiGeometry"))return t(l(e,"MultiGeometry"));if(l(e,"MultiTrack"))return t(l(e,"MultiTrack"));if(l(e,"gx:MultiTrack"))return t(l(e,"gx:MultiTrack"));for(o=0;o<c.length;o++)if(n=a(e,c[o]))for(r=0;r<n.length;r++)if(i=n[r],"Point"===c[o])h.push({type:"Point",coordinates:p(u(l(i,"coordinates")))});else if("LineString"===c[o])h.push({type:"LineString",coordinates:_(u(l(i,"coordinates")))});else if("Polygon"===c[o]){var m=a(i,"LinearRing"),f=[];for(s=0;s<m.length;s++)f.push(_(u(l(m[s],"coordinates"))));h.push({type:"Polygon",coordinates:f})}else if("Track"===c[o]||"gx:Track"===c[o]){var g=M(i);h.push({type:"LineString",coordinates:g.coords}
9),g.times.length&&d.push(g.times)}return{geoms:h,coordTimes:d}}(t),h={},d=u(l(t,"name")),m=u(l(t,"address")),f=u(l(t,"styleUrl")),g=u(l(t,"description")),y=l(t,"TimeSpan"),v=l(t,"TimeStamp"),k=l(t,"ExtendedData"),L=l(t,"LineStyle"),w=l(t,"PolyStyle"),b=l(t,"visibility");if(!o.geoms.length)return[];if(d&&(h.name=d),m&&(h.address=m),f){"#"!==f[0]&&(f="#"+f),h.styleUrl=f,i[f]&&(h.styleHash=i[f]),s[f]&&(h.styleMapHash=s[f],h.styleHash=i[s[f].normal]);var x=n[h.styleHash];if(x){L||(L=l(x,"LineStyle")),w||(w=l(x,"PolyStyle"));var C=l(x,"IconStyle");if(C){var T=l(C,"Icon");if(T){var P=u(l(T,"href"));P&&(h.icon=P)}}}}if(g&&(h.description=g),y){var E=u(l(y,"begin")),S=u(l(y,"end"));h.timespan={begin:E,end:S}}if(v&&(h.timestamp=u(l(v,"when"))),L){var D=W(u(l(L,"color"))),z=D[0],A=D[1],O=parseFloat(u(l(L,"width")));z&&(h.stroke=z),isNaN(A)||(h["stroke-opacity"]=A),isNaN(O)||(h["stroke-width"]=O)}if(w){var I=W(u(l(w,"color"))),N=I[0],B=I[1],F=u(l(w,"fill")),R=u(l(w,"outline"));N&&(h.fill=N),isNaN(B)||(h["fill-opacity"]=B),F&&(h["fill-opacity"]="1"===F?h["fill-opacity"]||1:0),R&&(h["stroke-opacity"]="1"===R?h["stroke-opacity"]||1:0)}if(k){var j=a(k,"Data"),Z=a(k,"SimpleData");for(e=0;e<j.length;e++)h[j[e].getAttribute("name")]=u(l(j[e],"value"));for(e=0;e<Z.length;e++)h[Z[e].getAttribute("name")]=u(Z[e])}b&&(h.visibility=u(b)),o.coordTimes.length&&(h.coordTimes=1===o.coordTimes.length?o.coordTimes[0]:o.coordTimes);var U={type:"Feature",geometry:1===o.geoms.length?o.geoms[0]:{type:"GeometryCollection",geometries:o.geoms},properties:h};return r(t,"id")&&(U.id=r(t,"id")),[U]}return e},gpx:function(t){var e,i,n=a(t,"trk"),o=a(t,"rte"),s=a(t,"wpt"),h={type:"FeatureCollection",features:[]};for(e=0;e<n.length;e++)(i=f(n[e]))&&h.features.push(i);for(e=0;e<o.length;e++)(i=g(o[e]))&&h.features.push(i);for(e=0;e<s.length;e++)h.features.push(y(s[e]));function p(t,e){for(var i=0;i<e;i++)t.push(null);return t}function _(t,e){var i=a(t,e),n=[],o=[],r=[],s=i.length;if(s<2)return{};for(var l=0;l<s;l++){var h=m(i[l]);n.push(h.coordinates),h.time&&o.push(h.time),(h.heartRate||r.length)&&(r.length||p(r,l),r.push(h.heartRate||null))}return{line:n,times:o,heartRates:r}}function f(t){for(var e,i=a(t,"trkseg"),n=[],o=[],r=[],s=0;s<i.length;s++)if((e=_(i[s],"trkpt"))&&(e.line&&n.push(e.line),e.times&&e.times.length&&o.push(e.times),r.length||e.heartRates&&e.heartRates.length)){if(!r.length)for(var h=0;h<s;h++)r.push(p([],n[h].length));e.heartRates&&e.heartRates.length?r.push(e.heartRates):r.push(p([],e.line.length||0))}if(0!==n.length){var u=k(t);return d(u,v(l(t,"extensions"))),o.length&&(u.coordTimes=1===n.length?o[0]:o),r.length&&(u.heartRates=1===n.length?r[0]:r),{type:"Feature",properties:u,geometry:{type:1===n.length?"LineString":"MultiLineString",coordinates:1===n.length?n[0]:n}}}}function g(t){var e=_(t,"rtept");if(e.line){var i=k(t);return d(i,v(l(t,"extensions"))),{type:"Feature",properties:i,geometry:{type:"LineString",coordinates:e.line}}}}function y(t){var e=k(t);return d(e,c(t,["sym"])),{type:"Feature",properties:e,geometry:{type:"Point",coordinates:m(t).coordinates}}}function v(t){var e={};if(t){var i=l(t,"line");if(i){var n=u(l(i,"color")),o=parseFloat(u(l(i,"opacity"))),a=parseFloat(u(l(i,"width")));n&&(e.stroke=n),isNaN(o)||(e["stroke-opacity"]=o),isNaN(a)||(e["stroke-width"]=96*a/25.4)}}return e}function k(t){var e=c(t,["name","cmt","desc","type","time","keywords"]),i=a(t,"link");i.length&&(e.links=[]);for(var n,o=0;o<i.length;o++)d(n={href:r(i[o],"href")},c(i[o],["text","type"])),e.links.push(n);return e}return h}}}();function Waymark_Map(){this.init=function(t={}){for(key in Waymark=this,Waymark.start_time=(new Date).getTime(),Waymark.jq_map_container=null,Waymark.config={map_options:{debug_mode:0,map_height:null,map_div_id:"waymark-map",map_width:null,map_init_zoom:null,map_init_latlng:null,map_init_basemap:null,map_max_zoom:null,tile_layers:[{layer_name:"OpenStreetMap",layer_url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?r=1",layer_attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',layer_max_zoom:"18"}],line_types:[],shape_types:[],marker_types:[],show_scale:0},viewer_options:{show_gallery:0,show_filter:1,show_cluster:1,cluster_radius:80,cluster_threshold:14,show_elevation:0,elevation_div_id:"waymark-elevation",elevation_units:"metric",elevation_initial:1,elevation_colour:"green",sleep_delay_seconds:2,sleep_do_message:0,sleep_wake_message:"Click or Hover to Wake"},editor_options:{confirm_delete:1,data_div_id:"waymark-data"},image_size_names:["thumbnail","medium","large","full"],marker_type_defaults:{marker_title:"Marker",marker_shape:"marker",marker_size:"medium",marker_colour:"#b42714",marker_icon:"fa-star",icon_type:"font",icon_colour:"white"},line_type_defaults:{line_title:"Line",line_colour:"#b42714",line_weight:"2",line_opacity:"0.7"},shape_type_defaults:{shape_title:"Shape",shape_colour:"red",fill_opacity:"0.4"},marker_data_defaults:{title:void 0,type:void 0,image_thumbnail_url:void 0,image_medium_url:void 0,image_large_url:void 0,description:void 0},line_data_defaults:{type:void 0,title:void 0,image_thumbnail_url:void 0,image_medium_url:void 0,image_large_url:void 0,description:void 0,direction:void 0},shape_data_defaults:{type:void 0,title:void 0,image_thumbnail_url:void 0,image_medium_url:void 0,image_large_url:void 0,description:void 0},language:{action_fullscreen_activate:"View Fullscreen",action_fullscreen_deactivate:"Exit Fullscreen",action_locate_activate:"Show me where I am",action_zoom_in:"Zoom in",action_zoom_out:"Zoom out",label_total_length:"Total Length: ",label_max_elevation:"Max. Elevation: ",label_min_elevation:"Min. Elevation: ",label_ascent:"Total Ascent: ",label_descent:"Total Descent: ",add_line_title:"Draw a Line",add_photo_title:"Upload an Image",add_marker_title:"Place a Marker",add_rectangle_title:"Draw a Rectangle",add_polygon_title:"Draw a Polygon",add_circle_title:"Draw a Circle",upload_file_title:"Read Lines and Markers from file (GPX/KML/GeoJSON supported, which most apps should Export to)",action_duplicate:"Duplicate",action_delete:"Delete",action_edit:"Edit",action_edit_done:"Finish editing",action_upload_image:"Upload Image",object_title_placeholder:"Title",object_image_placeholder:"Image URL",object_description_placeholder:"Description",object_type_label:"Type",marker_latlng_label:"Lat,Lng",action_delete_confirm:"Are you sure you want to delete this",action_search_placeholder:"Search...",object_label_marker:"Marker",object_label_line:"Line",object_label_shape:"Shape",object_label_marker_plural:"Markers",object_label_line_plural:"Lines",object_label_shape_plural:"Shapes",error_message_prefix:"Waymark Error",info_message_prefix:"Waymark Info",debug_message_prefix:"Waymark Debug",error_file_type:"This file type is not supported.",error_file_conversion:"Could not convert this file to GeoJSON.",error_file_upload:"File upload error.",error_photo_meta:"Could not retrieve Image metadata.",info_exif_yes:"Image location metadata (EXIF) detected!",info_exif_no:"Image location metadata (EXIF) NOT detected.",error_no_wpmedia:"WordPress Media Library not found",no_direction:"No Direction",show_direction:"Show Direction",reverse_direction:"Reverse Direction",sleep_wake_message:"Click or Hover to Wake"}},t)if(["map_options","viewer_options","editor_options","language"].indexOf(key)>-1)for(sub_key in t[key])void 0!==Waymark.config[key][sub_key]&&("object"==typeof t[key][sub_key]?Array.isArray(t[key][sub_key])?Waymark.config[key][sub_key]=t[key][sub_key]:Waymark.config[key][sub_key]=Object.assign({},Waymark.config[key][sub_key],t[key][sub_key]):Waymark.config[key][sub_key]=t[key][sub_key]);var e=Waymark.get_type("line"),i=Waymark.make_key(e.line_title);Waymark.config.line_data_defaults.type=i;var n=Waymark.get_type("shape"),o=Waymark.make_key(n.shape_title);Waymark.config.shape_data_defaults.type=o;var a=Waymark.get_type("marker"),r=Waymark.make_key(a.marker_title);Waymark.config.marker_data_defaults.type=r,Waymark.config.map_options.debug_mode&&console.log(Waymark.config),Waymark.marker_parent_group=Waymark_L.layerGroup(),Waymark.marker_sub_groups={},Waymark.line_parent_group=Waymark_L.layerGroup(),Waymark.line_sub_groups={},Waymark.shape_parent_group=Waymark_L.layerGroup(),Waymark.shape_sub_groups={},Waymark.active_layer=null,Waymark.pre_map_setup(),Waymark.setup_map(),Waymark.handle_resize(),Waymark.init_done(),Waymark.load_done()},this.sanitize_description=function(t){return void 0===window.DOMPurify?t:window.DOMPurify.sanitize(t,{ALLOWED_TAGS:["p","a","br","b","strong","em","i","u","ul","ol","li","div","span","blockquote"],ALLOWED_ATTR:["class","href","target","title"]})},this.is_safe_url=function(t){return/^https?:\/\//i.test(t)}
9,this.escape_html=function(t){return jQuery("<span />").text(t).html()},this.get_property=function(t,...e){return e.reduce((t,e)=>t&&t[e],t)},this.debug=function(t,e="console"){this.config.map_options.debug_mode&&("string"==typeof t?this.message(t,"debug",e):("object"==typeof t&&null!==t&&(t=JSON.parse(JSON.stringify(t))),"console"==e?console.debug(t):this.message(JSON.stringify(t),"debug",e)))},this.message=function(t=null,e="info",i="console"){if(t){var n="";switch(e){case"debug":case"error":n=Waymark.config.language[e+"_message_prefix"];break;default:case"info":n=Waymark.config.language.info_message_prefix}n&&(n="["+n+"] "),"console"==i?"error"==e?console.error(n+t):"debug"==e?console.debug(n+t):console.log(n+t):alert(n+t)}},this.title_case=function(t){return t.replace(/(?:^|\s)\w/g,(function(t){return t.toUpperCase()}))},this.transliterate=function(t){var e={"Ð":"YO","Ð":"I","Ц":"TS","У":"U","Ð":"K","Ð":"E","Ð":"N","Ð":"G","Ш":"SH","Щ":"SCH","Ð":"Z","Ð¥":"H","Ъ":"'","Ñ":"yo","й":"i","Ñ":"ts","Ñ":"u","к":"k","е":"e","н":"n","г":"g","Ñ":"sh","Ñ":"sch","з":"z","Ñ
":"h","Ñ":"'","Ф":"F","Ы":"I","Ð":"V","Ð":"a","Ð":"P","Ð ":"R","Ð":"O","Ð":"L","Ð":"D","Ð":"ZH","Ð":"E","Ñ":"f","Ñ":"i","в":"v","а":"a","п":"p","Ñ":"r","о":"o","л":"l","д":"d","ж":"zh","Ñ":"e","Я":"Ya","Ч":"CH","С":"S","Ð":"M","Ð":"I","Т":"T","Ь":"'","Ð":"B","Ю":"YU","Ñ":"ya","Ñ":"ch","Ñ":"s","м":"m","и":"i","Ñ":"t","Ñ":"'","б":"b","Ñ":"yu"};return t.split("").map((function(t){return e[t]||t})).join("")},this.make_key=function(t){return t?(str_out=this.transliterate(t),str_out=str_out.replace(/[^a-z0-9+]+/gi,""),str_out=str_out.toLowerCase(),str_out||(str_out=t.split("").map((function(t){return t.charCodeAt(0).toString(16)})).join("")),str_out):t},this.get_feature_overlay_type=function(t){if(void 0===t.geometry.type)return!1;switch(t.geometry.type){case"Point":return t.properties.radius?"shape":"marker";case"LineString":case"MultiLineString":return"line";case"Polygon":case"MultiPolygon":return"shape"}return!1},this.setup_map=function(){Waymark=this,Waymark.jq_map_container=jQuery("#"+Waymark.config.map_options.map_div_id),Waymark.jq_map_container.addClass("waymark-map-container");const t=Waymark.config.map_options.map_height?Waymark.config.map_options.map_height+"px":"100%";Waymark.jq_map_container.css("height",t);var e={fullscreenControl:!1,attributionControl:!1,editable:!0,zoomControl:!1,sleep:!1};"view"==Waymark.mode?(e.dragging=!1,e.sleep=!0,e.wakeTime=1e3*Waymark.config.viewer_options.sleep_delay_seconds,"1"===Waymark.config.viewer_options.sleep_do_message?(e.sleepNote=!0,e.wakeMessage=Waymark.config.viewer_options.sleep_wake_message):(e.sleepNote=!1,e.wakeMessage=!1),e.sleepOpacity=1):e.dragging=!0,void 0!==Waymark.config.map_options&&void 0!==Waymark.config.map_options.map_max_zoom&&Waymark.config.map_options.map_max_zoom&&(e.maxZoom=Waymark.config.map_options.map_max_zoom,console.log("Max Zoom: "+e.maxZoom)),Waymark.map=Waymark_L.map(Waymark.config.map_options.map_div_id,e),Waymark_L.control.attribution({prefix:'<a href="https://www.ogis.org/waymark-js/" target="_blank" title="Make Meaningful Maps">Waymark</a>'}).addTo(Waymark.map),1==Waymark.config.map_options.show_scale&&Waymark_L.control.scale().addTo(Waymark.map),Waymark.jq_map_container.data("Waymark",Waymark);let i=Waymark.config.map_options.map_init_latlng;
9void 0!==i&&i?Waymark.map.setView(i):i=!1;let n=Waymark.config.map_options.map_init_zoom;void 0!==n&&n?Waymark.map.setZoom(n):n=!1,i||n||Waymark.debug("No initial latlng or zoom set! ð"),Waymark_L.Path.mergeOptions({color:"#b42714"}),Waymark_L.control.zoom({position:"topleft",zoomInTitle:Waymark.config.language.action_zoom_in,zoomOutTitle:Waymark.config.language.action_zoom_out}).addTo(Waymark.map),Waymark_L.control.locate({position:"bottomright",icon:"ion ion-android-locate",drawCircle:!1,strings:{title:Waymark.config.language.action_locate_activate},locateOptions:{enableHighAccuracy:!0}}).addTo(Waymark.map),Waymark_L.control.fullscreen({position:"topleft",title:{false:Waymark.config.language.action_fullscreen_activate,true:Waymark.config.language.action_fullscreen_deactivate}}).addTo(Waymark.map),Waymark.marker_parent_group.addTo(Waymark.map),Waymark.line_parent_group.addTo(Waymark.map),Waymark.shape_parent_group.addTo(Waymark.map),Waymark.setup_layers(),Waymark.create_data_layer(),Waymark.create_buttons()},this.create_data_layer=function(){Waymark=this,Waymark.map_data=Waymark_L.geoJSON(null,{pointToLayer:function(t,e){return void 0!==t.properties&&t.properties.radius?new Waymark_L.Circle(e,parseFloat(t.properties.radius)):Waymark.create_marker(e)},onEachFeature:function(t,e){switch(e.on("popupopen",(function(t){Waymark.active_layer=e})),e.on("popupclose",(function(t){Waymark.active_layer=null})),t.geometry.type){case"Point":if(t.properties.radius){t.properties=Waymark.parse_layer_data("shape",t.properties);var i=Waymark.get_type("shape",t.properties.type);e.setStyle({color:i.shape_colour,fillOpacity:i.fill_opacity}),Waymark.info_window("shape",t,e),Waymark.tooltip("shape",t,e),Waymark.add_to_group("shape",e)}else{t.properties=Waymark.parse_layer_data("marker",t.properties);i=Waymark.get_type("marker",t.properties.type);
9e.setIcon(Waymark_L.divIcon(Waymark.build_icon_data(i))),void 0!==Waymark.gallery_images&&Waymark.add_to_gallery(e),Waymark.info_window("marker",t,e),Waymark.tooltip("marker",t,e),Waymark.add_to_group("marker",e)}break;case"LineString":case"MultiLineString":t.properties=Waymark.parse_layer_data("line",t.properties);i=Waymark.get_type("line",t.properties.type);e.setStyle({color:i.line_colour,weight:i.line_weight,opacity:i.line_opacity}),Waymark.info_window("line",t,e),Waymark.tooltip("line",t,e);var n=parseInt(i.line_display);Waymark.draw_line_direction(e,n),Waymark.add_to_group("line",e);break;case"Polygon":case"MultiPolygon":t.properties=Waymark.parse_layer_data("shape",t.properties),t.properties.rectangle;i=Waymark.get_type("shape",t.properties.type);e.setStyle({color:i.shape_colour,fillOpacity:i.fill_opacity}),Waymark.info_window("shape",t,e),Waymark.tooltip("shape",t,e),Waymark.add_to_group("shape",e)}}})},this.draw_line_direction=function(t,e=!0){var i=t.feature,n=i.properties.direction,o=Waymark.get_type("line",i.properties.type);if("object"==typeof t.direction_layer&&Waymark.map.removeLayer(t.direction_layer),"string"==typeof n&&("default"==n||"reverse"==n)){var a=45;"reverse"==n&&(a=360-a);var r=Waymark_L.polylineDecorator(t,{patterns:[{repeat:100,symbol:L.Symbol.arrowHead({pixelSize:15,headAngle:a,polygon:!0,pathOptions:{color:"#fff",fillColor:o.line_colour,opacity:"0.7",stroke:!0,fillOpacity:.7,weight:2}})}]});e&&r.addTo(Waymark.map),t.direction_layer=r}},this.setup_layers=function(){Waymark=this,Waymark.layer_control=Waymark_L.control.layers();var t=[],e=0;if(void 0!==Waymark.config.map_options.map_init_basemap&&Waymark.config.map_options.map_init_basemap)for(var i in Waymark.config.map_options.tile_layers){Waymark.config.map_options.map_init_basemap.toUpperCase()===Waymark.config.map_options.tile_layers[i].layer_name.toUpperCase()&&(e=i)}for(var i in Waymark.config.map_options.tile_layers){void 0!==Waymark.config.map_options.tile_layers[i].append&&(Waymark.config.map_options.tile_layers[i].layer_url+=Waymark.config.map_options.tile_layers[i].append);var n={id:Waymark.config.map_options.tile_layers[i].layer_name.replace(/ /g,""),attribution:Waymark.config.map_options.tile_layers[i].layer_attribution},o=parseInt(Waymark.config.map_options.tile_layers[i].layer_max_zoom);o&&(n.maxZoom=o);var a=Waymark_L.tileLayer(Waymark.config.map_options.tile_layers[i].layer_url,n);t[Waymark.config.map_options.tile_layers[i].layer_name]=a,i==e&&a.addTo(Waymark.map)}if(i>=1)for(basemap_name in Waymark.layer_control.addTo(Waymark.map),t)Waymark.layer_control.addBaseLayer(t[basemap_name],basemap_name)},this.get_type=function(t,e){Waymark=this;var i=null;for(var n in Waymark.config.map_options[t+"_types"]){0==n&&(i=Waymark.config.map_options[t+"_types"][n]);var o=Waymark.config.map_options[t+"_types"][n][t+"_title"];o&&Waymark.make_key(e)==Waymark.make_key(o)&&(i=Waymark.config.map_options[t+"_types"][n])}return i=Waymark.parse_type(i,t)},this.parse_type=function(t={},e="marker"){Waymark=this,null==t&&(t={});var i=Waymark.config[e+"_type_defaults"];return(t=Object.assign({},i,t)).type_key=Waymark.make_key(t[e+"_title"]),t},this.handle_resize=function(){Waymark=this,jQuery(window).on("resize",(function(){Waymark.config.map_options.map_height=Waymark.jq_map_container.height(),Waymark.config.map_options.map_width=Waymark.jq_map_container.width(),"function"==typeof Waymark.size_gallery&&Waymark.size_gallery()}))},this.tooltip=function(t,e,i){Waymark=this;var n="",o=Waymark.get_type(t,e.properties.type);o&&void 0!==o[t+"_title"]&&(n='<span class="waymark-type-label">['+o[t+"_title"]+"]</span> ");e.properties.title&&(n+=Waymark.escape_html(e.properties.title)),n&&(i.bindTooltip(n),i.on("mouseover",(function(t){var e=t.target.getTooltip();e.setLatLng(t.latlng),e.openTooltip()})),i.on("mousemove",(function(t){t.target.getTooltip().setLatLng(t.latlng)})))},this.get_data_defaults=function(t){return Object.assign({},Waymark.config[t+"_data_defaults"])},this.parse_layer_data=function(t,e){let i={};for(key in e)if(e[key])switch(key){case"name":i.title=e[key];break;
9case"desc":case"notes":i.description=e[key];break;case"radius":i.radius=parseFloat(e[key]);break;default:i[key]=e[key]}return i},this.add_to_group=function(t,e){Waymark=this;var i=e.feature;if(void 0!==i.properties.type){var n=i.properties.type,o=Waymark.get_type(t,n);if(void 0===Waymark[t+"_sub_groups"][o.type_key]){var a=Waymark_L.featureGroup.subGroup(Waymark[t+"_parent_group"]);Waymark[t+"_sub_groups"][o.type_key]=a,"view"==Waymark.mode&&void 0!==o[t+"_display"]?"1"==o[t+"_display"]&&a.addTo(Waymark.map):a.addTo(Waymark.map)}if(e.addTo(Waymark[t+"_sub_groups"][o.type_key]),"line"==t&&"object"==typeof e.direction_layer&&e.direction_layer.addTo(Waymark[t+"_sub_groups"][o.type_key]),parseInt(Waymark.config.viewer_options.show_filter)&&"view"==Waymark.mode)for(key in Waymark.layer_control.addTo(Waymark.map),Waymark.layer_control.removeLayer(Waymark[t+"_parent_group"]),Waymark.layer_control.addOverlay(Waymark[t+"_parent_group"],"<b>"+Waymark.config.language["object_label_"+t+"_plural"]+"</b>"),Waymark_L.stamp(Waymark[t+"_parent_group"]),Waymark[t+"_sub_groups"]){var r=Waymark.get_type(t,key);a=Waymark[t+"_sub_groups"][key];Waymark.layer_control.removeLayer(a),Waymark.layer_control.addOverlay(a,Waymark.type_to_text(t,r))}}else e.addTo(Waymark[t+"_parent_group"])},this.type_to_text=function(t="",e={},i="span"){Waymark=this;var n="waymark-type-text waymark-"+t+"-type",o="";switch(t){case"marker":o+="color:"+e.icon_colour+";",o+="background:"+Waymark.get_marker_background(e.marker_colour);break;case"line":o+="background:"+e.line_colour;break;case"shape":o+="background:"+e.shape_colour}return"<"+i+' class="'+n+'" style="'+o+'">'+e[t+"_title"]+"</"+i+">"},this.create_marker=function(t){return Waymark_L.marker(t)},this.build_icon_data=function(t={}){if(Waymark=this,"object"!=typeof t||void 0===t.type_key)return!1;var e={className:"waymark-marker waymark-marker-"+t.type_key};if(void 0!==t.marker_shape&&void 0!==t.marker_size){switch(e.className+=" waymark-marker-"+t.marker_shape,e.className+=" waymark-marker-"+t.marker_size,t.marker_shape){case"rectangle":case"circle":case"marker":switch(t.marker_size){case"small":e.iconSize=[16,16];break;case"medium":e.iconSize=[25,25];break;default:case"large":e.iconSize=[32,32]}}"marker"==t.marker_shape&&(e.iconAnchor=[e.iconSize[0]/2,1.25*e.iconSize[1]])}var i="background:"+Waymark.get_marker_background(t.marker_colour)+";",n="color:"+t.icon_colour+";";e.html='<div class="waymark-marker-background" style="'+i+'"></div>',void 0===t.marker_icon&&Waymark.debug("No marker_icon for type: "+JSON.stringify(t),"alert");var o="waymark-marker-icon";switch(t.icon_type){case"text":o+=" waymark-icon-text",e.html+='<div style="'+n+'" class="'+o+'">'+t.marker_icon+"</div>";break;case"html":o+=" waymark-icon-html";var a=jQuery("<div/>").html(t.marker_icon).text();e.html+='<div class="'+o+'">'+a+"</div>";break;case"icon":default:o+=" waymark-icon-icon",0===t.marker_icon.indexOf("ion-")?(o+=" ion ",o+=" "+t.marker_icon):0===t.marker_icon.indexOf("fa-")?(o+=" fa",o+=" "+t.marker_icon):(o+=" ion",o+=" ion-"+t.marker_icon),e.html+='<i style="'+n+'" class="'+o+'"></i>'}return e},this.build_type_heading=function(t="marker",e="photo"){const i=Waymark.get_type(t,e);i||Waymark.message("Type not found: "+e,"error");let n=i.shape_colour;switch(t){case"marker":n=Waymark.get_marker_background(i.marker_colour);break;case"line":n=i.line_colour;break;case"shape":n=i.shape_colour}return i&&(heading=`\n\t\t\t\t<div class="waymark-type-heading" style="background:${n}">\n\t\t\t\t\t${Waymark.type_preview(t,i)}\n\t\t\t\t\t${Waymark.type_to_text(t,i)}\n\t\t\t\t</div>\n\t\t\t`),heading},this.type_preview=function(t="marker",e={},i="div"){Waymark=this;let n=`<${i} class="waymark-type-preview waymark-${t}-type waymark-${t}-${e.type_key}">`;switch(t){case"marker":const i=Waymark.build_icon_data(e);n+=`<div class="${i.className}" style="width:${i.iconSize[0]}px;height:${i.iconSize[1]}px;">${i.html}</div>`;break;case"line":case"shape":n+=Waymark.type_to_text(t,e,"span")}return n+=`</${i}>`,n},this.get_marker_background=function(t){if(["red","darkred","orange","green","darkgreen","blue","purple","darkpurple","cadetblue","white","black"].includes(t))switch(t){case"red":return"#da3d20";case"darkred":return"#a43233";case"orange":return"#f9960a";case"green":return"#70af00";case"darkgreen":return"#72820d";case"blue":return"#2aabe1";case"purple":return"#d553bd";case"darkpurple":return"#5c3a6e";case"cadetblue":return"#416979";case"white":return"#fbfbfb";case"black":return"#303030"}return t},this.create_marker_json=function(t,e={}){var i=Object.assign({},Waymark.config.marker_data_defaults,e);return{geometry:{type:"Point",coordinates:[t.lng,t.lat]},type:"Feature",properties:i}},this.get_exif_latlng=function(t){return t.GPSLatitudeNum&&!isNaN(t.GPSLatitudeNum)&&t.GPSLongitudeNum&&!isNaN(t.GPSLongitudeNum)?(Waymark.debug(Waymark.config.language.info_exif_yes),L.latLng(t.GPSLatitudeNum,t.GPSLongitudeNum)):(Waymark.debug(Waymark.config.language.info_exif_no),!1)},this.get_image_sizes=function(t,e){Waymark=this;var i={};for(var n in Waymark.config.image_size_names)i["image_"+Waymark.config.image_size_names[n]+"_url"]=e,void 0!==t[Waymark.config.image_size_names[n]]&&void 0!==t[Waymark.config.image_size_names[n]].url&&(i["image_"+Waymark.config.image_size_names[n]+"_url"]=t[Waymark.config.image_size_names[n]].url);return i},this.build_overlay_content=function(t=[],e="",i=[]){Waymark=this;var n=`<div class="waymark-overlay-content ${t.properties.title?"waymark-overlay-has-title":""} ${t.properties.description?"waymark-overlay-has-desc":""} ${t.properties.image_large_url?"waymark-overlay-has-image":""} waymark-overlay-${e}">`;const o=["type","title","description","image_large_url"];for(index in o){var a=o[index];switch(n+=`<div class="waymark-overlay-property waymark-overlay-property-${a}">`,a){case"type":n+=Waymark.type_to_text(e,i);break;case"title":n+=t.properties.title?Waymark.escape_html(t.properties.title):"<em>Untitled "+i[e+"_title"]+" "+Waymark.title_case(e)+"</em>";break;
9case"description":var r=t.properties.description,s=Waymark.sanitize_description(r);r&&(0===r.indexOf("<")?n+=s:n+=`<p>${s}</p>`);break;case"image_large_url":if(!t.properties.image_large_url)break;if(!Waymark.is_safe_url(t.properties.image_large_url))break;if(t.properties.image_large_url){var l=t.properties.image_large_url;t.properties.image_medium_url&&Waymark.is_safe_url(t.properties.image_medium_url)&&(l=t.properties.image_medium_url),n+=`<a href="${t.properties.image_large_url}" target="_blank" style="background-image:url(${l})"></a>`}}n+="</div>"}return n+="</div>"},this.load_done=function(){Waymark=this;let t=((new Date).getTime()-Waymark.start_time)/1e3;Waymark.debug("Waymark Loaded in "+t.toFixed(3)+" seconds"),"function"==typeof waymark_loaded_callback?(Waymark.debug("Global Callback detected! waymark_loaded_callback(waymark_instance)"),waymark_loaded_callback(Waymark)):Waymark.debug("No Global Callback detected.")},this.country_code_to_bounds=function(t=""){let e=[-140.99778,41.6751050889,-52.6480987209,83.23324];var i={AF:[60.5284298033,29.318572496,75.1580277851,38.4862816432],AO:[11.6400960629,-17.9306364885,24.0799052263,-4.43802336998],AL:[19.3044861183,39.624997667,21.0200403175,42.6882473822],AE:[51.5795186705,22.4969475367,56.3968473651,26.055464179],AR:[-73.4154357571,-55.25,-53.628348965,-21.8323104794],AM:[43.5827458026,38.7412014837,46.5057198423,41.2481285671],AQ:[-180,-90,180,-63.2706604895],TF:[68.72,-49.775,70.56,-48.625],AU:[113.338953078,-43.6345972634,153.569469029,-10.6681857235],AT:[9.47996951665,46.4318173285,16.9796667823,49.0390742051],AZ:[44.7939896991,38.2703775091,50.3928210793,41.8606751572],BI:[29.0249263852,-4.49998341229,30.752262811,-2.34848683025],BE:[2.51357303225,49.5294835476,6.15665815596,51.4750237087],BJ:[.772335646171,6.14215770103,3.79711225751,12.2356358912],BF:[-5.47056494793,9.61083486576,2.17710778159,15.1161577418],BD:[88.0844222351,20.670883287,92.6727209818,26.4465255803],BG:[22.3805257504,41.2344859889,28.5580814959,44.2349230007],BS:[-78.98,23.71,-77,27.04],BA:[15.7500260759,42.65,19.59976,45.2337767604],BY:[23.1994938494,51.3195034857,32.6936430193,56.1691299506],BZ:[-89.2291216703,15.8869375676,-88.1068129138,18.4999822047],BO:[-69.5904237535,-22.8729187965,-57.4983711412,-9.76198780685],BR:[-73.9872354804,-33.7683777809,-34.7299934555,5.24448639569],BN:[114.204016555,4.007636827,115.450710484,5.44772980389],BT:[88.8142484883,26.7194029811,92.1037117859,28.2964385035],BW:[19.8954577979,-26.8285429827,29.4321883481,-17.6618156877],CF:[14.4594071794,2.2676396753,27.3742261085,11.1423951278],CA:[-140.99778,41.6751050889,-52.6480987209,83.23324],CH:[6.02260949059,45.7769477403,10.4427014502,47.8308275417],CL:[-75.6443953112,-55.61183,-66.95992,-17.5800118954],CN:[73.6753792663,18.197700914,135.026311477,53.4588044297],CI:[-8.60288021487,4.33828847902,-2.56218950033,10.5240607772],CM:[8.48881554529,1.72767263428,16.0128524106,12.8593962671],CD:[12.1823368669,-13.2572266578,31.1741492042,5.25608775474],CG:[11.0937728207,-5.03798674888,18.4530652198,3.72819651938],CO:[-78.9909352282,-4.29818694419,-66.8763258531,12.4373031682],CR:[-85.94172543,8.22502798099,-82.5461962552,11.2171192489],CU:[-84.9749110583,19.8554808619,-74.1780248685,23.1886107447],CY:[32.2566671079,34.5718694118,34.0048808123,35.1731247015],CZ:[12.2401111182,48.5553052842,18.8531441586,51.1172677679],DE:[5.98865807458,47.3024876979,15.0169958839,54.983104153],DJ:[41.66176,10.9268785669,43.3178524107,12.6996385767],DK:[8.08997684086,54.8000145534,12.6900061378,57.730016588],DO:[-71.9451120673,17.598564358,-68.3179432848,19.8849105901],DZ:[-8.68439978681,19.0573642034,11.9995056495,37.1183806422],EC:[-80.9677654691,-4.95912851321,-75.2337227037,1.3809237736],EG:[24.70007,22,36.86623,31.58568],ER:[36.3231889178,12.4554157577,43.0812260272,17.9983074],ES:[-9.39288367353,35.946850084,3.03948408368,43.7483377142],EE:[23.3397953631,57.4745283067,28.1316992531,59.6110903998],ET:[32.95418,3.42206,47.78942,14.95943],FI:[20.6455928891,59.846373196,31.5160921567,70.1641930203],FJ:[-180,-18.28799,180,-16.0208822567],FK:[-61.2,-52.3,-57.75,-51.1],FR:[-54.5247541978,2.05338918702,9.56001631027,51.1485061713],GA:[8.79799563969,-3.97882659263,14.4254557634,2.32675751384],GB:[-7.57216793459,49.959999905,1.68153079591,58.6350001085],GE:[39.9550085793,41.0644446885,46.6379081561,43.553104153],GH:[-3.24437008301,4.7104
96214438,1.0601216976,11.0983409693],GN:[-15.1303112452,7.3090373804,-7.83210038902,12.5861829696],GM:[-16.8415246241,13.1302841252,-13.8449633448,13.8764918075],GW:[-16.6774519516,11.0404116887,-13.7004760401,12.6281700708],GQ:[9.3056132341,1.01011953369,11.285078973,2.28386607504],GR:[20.1500159034,34.9199876979,26.6041955909,41.8269046087],GL:[-73.297,60.03676,-12.20855,83.64513],GT:[-92.2292486234,13.7353376327,-88.2250227526,17.8193260767],GY:[-61.4103029039,1.26808828369,-56.5393857489,8.36703481692],HN:[-89.3533259753,12.9846857772,-83.147219001,16.0054057886],HR:[13.6569755388,42.47999136,19.3904757016,46.5037509222],HT:[-74.4580336168,18.0309927434,-71.6248732164,19.9156839055],HU:[16.2022982113,45.7594811061,22.710531447,48.6238540716],ID:[95.2930261576,-10.3599874813,141.03385176,5.47982086834],IN:[68.1766451354,7.96553477623,97.4025614766,35.4940095078],IE:[-9.97708574059,51.6693012559,-6.03298539878,55.1316222195],IR:[44.1092252948,25.0782370061,63.3166317076,39.7130026312],IQ:[38.7923405291,29.0990251735,48.5679712258,37.3852635768],IS:[-24.3261840479,63.4963829617,-13.609732225,66.5267923041],IL:[34.2654333839,29.5013261988,35.8363969256,33.2774264593],IT:[6.7499552751,36.619987291,18.4802470232,47.1153931748],JM:[-78.3377192858,17.7011162379,-76.1996585761,18.5242184514],JO:[34.9226025734,29.1974946152,39.1954683774,33.3786864284],JP:[129.408463169,31.0295791692,145.543137242,45.5514834662],KZ:[46.4664457538,40.6623245306,87.3599703308,55.3852501491],KE:[33.8935689697,-4.67677,41.8550830926,5.506],KG:[69.464886916,39.2794632025,80.2599902689,43.2983393418],KH:[102.3480994,10.4865436874,107.614547968,14.5705838078],KR:[126.117397903,34.3900458847,129.468304478,38.6122429469],KW:[46.5687134133,28.5260627304,48.4160941913,30.0590699326],LA:[100.115987583,13.88109101,107.564525181,22.4647531194],LB:[35.1260526873,33.0890400254,36.6117501157,34.6449140488],LR:[-11.4387794662,4.35575511313,-7.53971513511,8.54105520267],LY:[9.31941084152,19.58047,25.16482,33.1369957545],LK:[79.6951668639,5.96836985923,81.7879590189,9.82407766361],LS:[26.9992619158,-30.6451058896,29.3251664568,-28.6475017229],LT:[21.0558004086,53.9057022162,26.5882792498,56.3725283881],LU:[5.67405195478,49.4426671413,6.24275109216,50.1280516628],LV:[21.0558004086,55.61510692,28.1767094256,57.9701569688],MA:[-17.0204284327,21.4207341578,-1.12455115397,35.7599881048],MD:[26.6193367856,45.4882831895,30.0246586443,48.4671194525],MG:[43.2541870461,-25.6014344215,50.4765368996,-12.0405567359],MX:[-117.12776,14.5388286402,-86.811982388,32.72083],MK:[20.46315,40.8427269557,22.9523771502,42.3202595078],ML:[-12.1707502914,10.0963607854,4.27020999514,24.9745740829],MM:[92.3032344909,9.93295990645,101.180005324,28.335945136],ME:[18.45,41.87755,20.3398,43.52384],MN:[87.7512642761,41.5974095729,119.772823928,52.0473660345],MZ:[30.1794812355,-26.7421916643,40.7754752948,-10.3170960425],MR:[-17.0634232243,14.6168342147,-4.92333736817,27.3957441269],MW:[32.6881653175,-16.8012997372,35.7719047381,-9.23059905359],MY:[100.085756871,.773131415201,119.181903925,6.92805288332],NA:[11.7341988461,-29.045461928,25.0844433937,-16.9413428687],NC:[164.029605748,-22.3999760881,167.120011428,-20.1056458473],NE:[.295646396495,11.6601671412,15.9032466977,23.4716684026],NG:[2.69170169436,4.24059418377,14.5771777686,13.8659239771],NI:[-87.6684934151,10.7268390975,-83.147219001,15.0162671981],NL:[3.31497114423,50.803721015,7.09205325687,53.5104033474],NO:[4.99207807783,58.0788841824,31.29341841,80.6571442736],NP:[80.0884245137,26.3978980576,88.1748043151,30.4227169866],NZ:[166.509144322,-46.641235447,178.517093541,-34.4506617165],OM:[52.0000098,16.6510511337,59.8080603372,26.3959343531],PK:[60.8742484882,23.6919650335,77.8374507995,37.1330309108],PA:[-82.9657830472,7.2205414901,-77.2425664944,9.61161001224],PE:[-81.4109425524,-18.3479753557,-68.6650797187,-.0572054988649],PH:[117.17427453,5.58100332277,126.537423944,18.5052273625],PG:[141.000210403,-10.6524760881,156.019965448,-2.50000212973],PL:[14.0745211117,49.0273953314,24.0299857927,54.8515359564],PR:[-67.2424275377,17.946553453,-65.5910037909,18.5206011011],KP:[124.265624628,37.669070543,130.780007359,42.9853868678],PT:[-9.52657060387,36.838268541,-6.3890876937,42.28
90468655],PY:[-62.6850571357,-27.5484990374,-54.2929595608,-19.3427466773],QA:[50.7439107603,24.5563308782,51.6067004738,26.1145820175],RO:[20.2201924985,43.6884447292,29.62654341,48.2208812526],RU:[-180,41.151416124,180,81.2504],RW:[29.0249263852,-2.91785776125,30.8161348813,-1.13465911215],SA:[34.6323360532,16.3478913436,55.6666593769,32.161008816],SD:[21.93681,8.61972971293,38.4100899595,22],SS:[23.8869795809,3.50917,35.2980071182,12.2480077571],SN:[-17.6250426905,12.332089952,-11.4678991358,16.5982636581],SB:[156.491357864,-10.8263672828,162.398645868,-6.59933847415],SL:[-13.2465502588,6.78591685631,-10.2300935531,10.0469839543],SV:[-90.0955545723,13.1490168319,-87.7235029772,14.4241327987],SO:[40.98105,-1.68325,51.13387,12.02464],RS:[18.82982,42.2452243971,22.9860185076,46.1717298447],SR:[-58.0446943834,1.81766714112,-53.9580446031,6.0252914494],SK:[16.8799829444,47.7584288601,22.5581376482,49.5715740017],SI:[13.6981099789,45.4523163926,16.5648083839,46.8523859727],SE:[11.0273686052,55.3617373725,23.9033785336,69.1062472602],SZ:[30.6766085141,-27.2858794085,32.0716654803,-25.660190525],SY:[35.7007979673,32.312937527,42.3495910988,37.2298725449],TD:[13.5403935076,7.42192454674,23.88689,23.40972],TG:[-.0497847151599,5.92883738853,1.86524051271,11.0186817489],TH:[97.3758964376,5.69138418215,105.589038527,20.4178496363],TJ:[67.4422196796,36.7381712916,74.9800024759,40.9602133245],TM:[52.5024597512,35.2706639674,66.5461503437,42.7515510117],TL:[124.968682489,-9.39317310958,127.335928176,-8.27334482181],TT:[-61.95,10,-60.895,10.89],TN:[7.52448164229,30.3075560572,11.4887874691,37.3499944118],TR:[26.0433512713,35.8215347357,44.7939896991,42.1414848903],TW:[120.106188593,21.9705713974,121.951243931,25.2954588893],TZ:[29.3399975929,-11.7209380022,40.31659,-.95],UG:[29.5794661801,-1.44332244223,35.03599,4.24988494736],UA:[22.0856083513,44.3614785833,40.0807890155,52.3350745713],UY:[-58.4270741441,-34.9526465797,-53.209588996,-30.1096863746],US:[-171.791110603,18.91619,-66.96466,71.3577635769],UZ:[55.9289172707,37.1449940049,73.055417108,45.5868043076],VE:[-73.3049515449,.724452215982,-59.7582848782,12.1623070337],VN:[102.170435826,8.59975962975,109.33526981,23.3520633001],VU:[166.629136998,-16.5978496233,167.844876744,-14.6264970842],PS:[34.9274084816,31.3534353704,35.5456653175,32.5325106878],YE:[42.6048726743,12.5859504257,53.1085726255,19.0000033635],ZA:[16.3449768409,-34.8191663551,32.830120477,-22.0913127581],ZM:[21.887842645,-17.9612289364,33.4856876971,-8.23825652429],ZW:[25.2642257016,-22.2716118303,32.8498608742,-15.5077869605]};if(i[t])e=i[t];else{var n=Object.keys(i);e=i[n[Math.floor(Math.random()*n.length)]]}return Waymark_L.latLngBounds([e[1],e[0]],[e[3],e[2]])},this.clear_json=function(){Waymark=this,Waymark.map_data.eachLayer((function(t){Waymark.map.removeLayer(t),Waymark.map_data.removeLayer(t),"object"==typeof t.direction_layer&&Waymark.map.removeLayer(t.direction_layer)})),Waymark.map_data.clearLayers()},this.pre_map_setup=function(){},this.init_done=function(){},this.info_window=function(t,e,i){},this.build_content=function(t,e){}}function Waymark_Map_Viewer(){this.gallery_images=[],this.pre_map_setup=function(){Waymark=this,Waymark.mode="view"},this.init_done=function(){Waymark=this,Waymark.jq_map_container.show(),Waymark.map.invalidateSize(),Waymark.config.map_options.map_width=Waymark.jq_map_container.width(),Waymark.setup_gallery(),Waymark.setup_elevation(),Waymark.setupCluster(),jQuery(Waymark.map.getContainer()).addClass("waymark-is-viewer"),Waymark.setup_hidden_checker()},this.setupCluster=()=>{parseInt(Waymark.config.viewer_options.show_cluster)&&(Waymark.jq_map_container.addClass("waymark-has-cluster"),Waymark.map._layersMaxZoom=18,Waymark.marker_cluster=L.markerClusterGroup({animate:!1,showCoverageOnHover:!1,removeOutsideVisibleBounds:!0,iconCreateFunction:this.clusterIconFunction,spiderfyOnMaxZoom:!1,disableClusteringAtZoom:Waymark.config.viewer_options.cluster_threshold,maxClusterRadius:Waymark.config.viewer_options.cluster_radius}),Waymark.marker_parent_group=Waymark.marker_cluster,Waymark.map.addLayer(Waymark.marker_cluster))},this.clusterIconFunction=t=>{const e=new Map([]);
9t.getAllChildMarkers().forEach(t=>{const i=t.feature.properties.type,n=Waymark.get_type("marker",i);e.has(i)?n.typeCount=e.get(i).typeCount+1:n.typeCount=1,n.iconData=Waymark.build_icon_data(n),e.set(i,n)});let i="",n=0,o=0,a=0;return[...e.entries()].sort((t,e)=>e[1].typeCount-t[1].typeCount).forEach(([t,r])=>{const s=r.typeCount,l=r.iconData,h=e.size-n;o=l.iconSize[0]>o?l.iconSize[0]:o,a=l.iconSize[0]>a?l.iconSize[0]:a,s>1&&(l.html+=`<div class="waymark-cluster-count">${s}</div>`);const u=8*n;i+=`\n\t\t\t\t<div \n\t\t\t\t\tclass="${l.className}" \n\t\t\t\t\tstyle="\n\t\t\t\t\t\tleft:${u}px;\n\t\t\t\t\t\tz-index:${h};\n\t\t\t\t\t\theight:${l.iconSize[1]}px;\n\t\t\t\t\t\twidth:${l.iconSize[0]}px;\n\t\t\t\t\t\theight:${l.iconSize[1]}px;\n\t\t\t\t\t"\n\t\t\t\t>\n\t\t\t\t\t${l.html}\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t`,n++}),L.divIcon({className:"waymark-cluster",html:i,iconSize:[o,a]})},this.setup_hidden_checker=function(){let t=setInterval((function(){is_hidden=Waymark.jq_map_container.is(":hidden"),is_hidden||(Waymark.reset_map_view(),clearInterval(t))}),100)},this.create_buttons=function(){},this.load_json=function(t,e=!0){Waymark=this,"object"==typeof t&&void 0!==t.features&&(Waymark.map_data.addData(t),e&&Waymark.reset_map_view())},this.reset_map_view=function(){Waymark=this;let t=Waymark.config.map_options.map_init_latlng,e=Waymark.config.map_options.map_init_zoom;if(void 0===t&&(t=!1),void 0===e&&(e=!1),t||e)t&&e?Waymark.map.setVie
9w(t,e):(t&&(Waymark.map.setView(t),Waymark.map.setZoom(Waymark.map.getBoundsZoom(Waymark.map_data.getBounds()))),e&&(Waymark.map.setZoom(e),Waymark.map.setView(Waymark.map_data.getBounds().getCenter())));else{var i=Waymark.map_data.getBounds();"object"==typeof i&&i.isValid()&&(Waymark.map.invalidateSize(),Waymark.map.fitBounds(i))}},this.build_content=function(t,e){Waymark=this;var i=jQuery("<div />"),n=jQuery("<ul />").addClass("waymark-info waymark-"+t+"-info");for(key in Waymark.config[t+"_data_defaults"]){var o=null;switch(key){case"title":e.properties.title?o=jQuery("<strong />").text(e.properties.title):(o=jQuery("<strong />").html(" "),n.addClass("waymark-no-title"));break;case"type":var a=Waymark.get_type(t,e.properties.type);a&&(o=Waymark.type_to_text(t,a,"small"));break;case"description":var r=e.properties.description,s=Waymark.sanitize_description(r);r?o=0===r.indexOf("<")?s:jQuery("<p />").html(s):n.addClass("waymark-no-description");break;case"image_large_url":if(void 0!==e.properties.image_large_url){if(!Waymark.is_safe_url(e.properties.image_large_url)){n.addClass("waymark-no-image");break}var l=e.properties.image_large_url;if(void 0!==e.properties.image_medium_url&&Waymark.is_safe_url(e.properties.image_medium_url))l=e.properties.image_medium_url;o=jQuery("<a />").attr({href:e.properties.image_large_url,target:"_blank",style:"background-image:url("+l+")"})}else n.addClass("waymark-no-image")}o&&n.append(jQuery("<li />").addClass("waymark-info-"+key+" waymark-"+t+"-info-"+key).append(o))}return n.children().length&&i.append(n),i},this.info_window=function(t,e,i){if(Waymark=this,parseInt(Waymark.config.viewer_options.show_elevation)&&"line"==t&&(parseInt(Waymark.config.viewer_options.elevation_initial)&&Waymark.line_has_elevation_data(e)&&!Waymark.elevation_container.is(":visible")&&(Waymark.elevation_container.show(),Waymark.elevation_control.loadData(e)),jQuery(i).on("click",{W:Waymark},(function(t){var e=t.data.W,i=t.target.feature;e.elevation_control.clear(),void 0!==e.elevation_control.layer&&e.elevation_control.layer.removeFrom(e.map),e.elevation_container.hide(),e.line_has_elevation_data(i)&&(e.elevation_container.show(),e.elevation_control.loadData(i))}))),void 0!==e.properties.description||void 0!==e.properties.image_large_url){var n=Waymark.build_content(t,e,i);e.properties.title;i.bindPopup(n.get(0)).openPopup()}},this.line_has_elevation_data=function(t){if("MultiLineString"==t.geometry.type){for(var e in t.geometry.coordinates)for(var i in t.geometry.coordinates[e])if(3==t.geometry.coordinates[e][i].length)return!0}else for(var i in t.geometry.coordinates)if(3==t.geometry.coordinates[i].length)return!0;return!1},this.setup_elevation=function(){if(Waymark=this,!Waymark.config.viewer_options.show_elevation)return;Waymark.debug("Setting up Elevation Control"),Waymark_L.registerLocale("waymark",{"Total Length: ":Waymark.config.language.label_total_length,"Max Elevation: ":Waymark.config.language.label_max_elevation,"Min Elevation: ":Waymark.config.language.label_min_elevation,"Total Ascent: ":Waymark.config.language.label_ascent,"Total Descent: ":Waymark.config.language.label_descent}),Waymark_L.setLocale("waymark");var t={theme:"magenta-theme",detached:!0,followMarker:!1,width:Waymark.config.map_options.map_width};const e=`\n\t\t\tdiv#${Waymark.config.map_options.map_div_id} .elevation-polyline { stroke: ${Waymark.config.viewer_options.elevation_colour} !important; }\n\t\t\tdiv#${Waymark.config.viewer_options.elevation_div_id} .elevation-control.elevation .area { fill: ${Waymark.config.viewer_options.elevation_colour} !important; }\n\t\t`;if(jQuery("head").append(`<style type="text/css">${e}</style>`),void 0!==Waymark.config.viewer_options.elevation_div_id){t.elevationDiv="#"+Waymark.config.viewer_options.elevation_div_id,Waymark.elevation_container=jQuery(t.elevationDiv),Waymark.elevation_container.length||(Waymark.debug("Creating Elevation Container"),t.width=Waymark.config.map_options.map_width/2,Waymark.elevation_container=jQuery("<div />").attr("id",Waymark.config.viewer_options.elevation_div_id).appendTo(Waymark.jq_map_container)),Waymark.elevation_container.addClass("waymark-elevation-container").hide();
9var i=jQuery("<span />").addClass("waymark-elevation-close").text("x").on("click",{W:Waymark},(function(t){var e=t.data.W;e.elevation_control.clear(),void 0!==e.elevation_control.layer&&e.elevation_control.layer.removeFrom(e.map),e.elevation_container.hide()}));Waymark.elevation_container.append(i)}void 0!==Waymark.config.viewer_options.elevation_units&&"imperial"==Waymark.config.viewer_options.elevation_units&&(t.imperial=!0),Waymark.elevation_control=Waymark_L.control.elevation(t).addTo(Waymark.map),Waymark.map.on("overlayremove",(function(t){if(void 0!==Waymark.elevation_control.layer){var e=null;Waymark.elevation_control.layer.eachLayer((function(t){e=JSON.stringify(t.getLatLngs())})),e&&t.layer.eachLayer((function(t){void 0!==t.getLatLngs&&e==JSON.stringify(t.getLatLngs())&&(Waymark.elevation_control.clear(),Waymark.elevation_control.layer.removeFrom(Waymark.map),Waymark.elevation_container.hide())}))}}))},this.setup_gallery=function(){if(Waymark=this,parseInt(Waymark.config.viewer_options.show_gallery)){Waymark.gallery=jQuery("<div />").attr("id",Waymark.config.viewer_options.gallery_div_id).css("width",Waymark.config.map_options.map_width).addClass("waymark-gallery-container").html(""),Waymark_L.DomEvent.disableClickPropagation(Waymark.gallery.get(0)),jQuery(Waymark.map.getContainer()).append(Waymark.gallery),Waymark.size_gallery();var t=Waymark;Waymark.map.on("moveend",(function(){t.render_gallery()}),{W:t}),Waymark.map.on("layerremove layeradd",(function(){t.render_gallery()}),{W:t})}},this.size_gallery=function(){if(Waymark=this,void 0!==Waymark.gallery&&Waymark.gallery.length){gallery_padding=Waymark.gallery.css("paddingRight"),gallery_padding=gallery_padding.replace("px",""),gallery_padding=parseInt(gallery_padding);var t=Waymark.config.map_options.map_width-2*gallery_padding;Waymark.gallery.css("width",t)}},this.add_to_gallery=function(t){if(Waymark=this,void 0===t.feature.properties.image_thumbnail_url||void 0===t.feature.properties.image_large_url)return!1;var e=Object.assign({},t.feature.properties);e.latlng=t.feature.geometry.coordinates,e.marker=t,Waymark.gallery_images.push(e)},this.render_gallery=function(){Waymark=this;var t=0;if(void 0!==Waymark.gallery&&Waymark.gallery.length&&(Waymark.gallery.html(""),Waymark.gallery.hide(),jQuery(Waymark.map.getContainer()).removeClass("waymark-has-gallery"),Waymark.gallery_images.length)){for(i=0;i<Waymark.gallery_images.length;i++){var e=Waymark.gallery_images[i];let a=Waymark.map;if(parseInt(Waymark.config.viewer_options.show_cluster)&&"object"==typeof Waymark.marker_cluster&&(a=Waymark.marker_cluster),Waymark.map.getBounds().contains(e.marker.getLatLng())&&a.hasLayer(e.marker)&&Waymark.is_safe_url(e.image_thumbnail_url)){t++;var n=jQuery("<div />").addClass("waymark-image").on("click",{marker:e.marker},(function(t){var e=t.data.marker;
9Waymark.map.setView(e.getLatLng(),16),e.openPopup()})),o=jQuery("<img />").attr({src:e.image_thumbnail_url});n.append(o),Waymark.gallery.append(n)}}t&&(Waymark.gallery.show(),jQuery(Waymark.map.getContainer()).addClass("waymark-has-gallery"))}}}function Waymark_Map_Editor(){this.pre_map_setup=function(){Waymark=this,Waymark.mode="edit"},this.init_done=function(){Waymark=this,Waymark.jq_map_container.addClass("waymark-is-editor");const t=Waymark.config.editor_options.data_div_id;if(Waymark.jq_data_container=jQuery("#"+t),Waymark.jq_data_container.length){const e=Waymark.jq_data_container.val();try{const i=JSON.parse(e);Waymark.load_json(i),Waymark.debug(`Data container (#${t}) found, valid GeoJSON added to Map.`)}catch(e){Waymark.debug(`Data container (#${t}) found, but not valid GeoJSON.`)}}else Waymark.debug(`Data container (#${t}) not found, adding to DOM.`),Waymark.jq_data_container=jQuery("<textarea />").attr({id:t,name:"map_data"}).addClass("waymark-input waymark-input-map_data").appendTo(Waymark.jq_map_container);Waymark.jq_map_container.append(jQuery("<div />").attr({id:"waymark-loading"}).html('<div class="waymark-spinner"></div>')),Waymark.map.on("editable:drawing:commit",(function(t){switch(layer=t.layer,void 0===layer.feature&&(layer.feature={type:"Feature",properties:{}}),!0){case layer instanceof Waymark_L.Circle:layer.feature.properties=Waymark.config.shape_data_defaults,layer.feature.properties.radius=layer.getRadius();break;case layer instanceof Waymark_L.Rectangle:layer.feature.properties=Waymark.config.shape_data_defaults,layer.feature.properties.rectangle=!0;break;case layer instanceof Waymark_L.Polygon:layer.feature.properties=Waymark.config.shape_data_defaults;break;case layer instanceof Waymark_L.Polyline:layer.feature.properties=Waymark.config.line_data_defaults}Waymark.map_data.addData(layer.toGeoJSON()),Waymark.map.removeLayer(layer),Waymark.map_was_edited()})),Waymark.map.on("editable:editing",(function(t){layer=t.layer,void 0!==layer.feature&&layer.feature.properties.radius&&(layer.feature.properties.radius=layer.getRadius()),Waymark.map_was_edited()}))},this.create_marker=function(t){Waymark=this;var e=Waymark_L.marker(t,{draggable:!0});return e.on("moveend",(function(t){var e=t.target,i=e.feature;i.geometry.coordinates=[e._latlng.lng.toFixed(6),e._latlng.lat.toFixed(6)],Waymark.info_window("marker",i,e),Waymark.map_was_edited()})),e},this.save_data_layer=function(){Waymark=this;var t=JSON.stringify(Waymark.map_data.toGeoJSON());Waymark.jq_data_container.val(t)},this.map_was_edited=function(){Waymark=this,Waymark.save_data_layer()},this.loading_start=function(){Waymark=this,Waymark.jq_map_container.addClass("waymark-loading")},this.loading_stop=function(){Waymark=this,Waymark.jq_map_container.removeClass("waymark-loading")},this.create_buttons=function(){Waymark=this;var t=Waymark_L.Control.geocoder({position:"bottomright",defaultMarkGeocode:!1,placeholder:Waymark.config.language.action_search_placeholder});t.on("markgeocode",(function(t){Waymark.map.fitBounds(t.geocode.bbox)})),t.addTo(Waymark.map);var e=Waymark_L.Control.extend({options:{position:"bottomleft"},onAdd:function(t){var e,i=Waymark_L.DomUtil.create("div","leaflet-bar leaflet-control waymark-leaflet-control waymark-edit-toolbar");(e=Waymark_L.DomUtil.create("a","waymark-icon waymark-edit-button waymark-edit-line",i)).setAttribute("title",Waymark.config.language.add_line_title),e.onclick=function(){Waymark.map.editTools.startPolyline()},(e=Waymark_L.DomUtil.create("a","waymark-edit-button waymark-edit-image",i)).innerHTML='<i class="ion ion-image"></i>',e.setAttribute("title",Waymark.config.language.add_photo_title),e.classList.add("waymark-hidden"),(e=Waymark_L.DomUtil.create("a","waymark-edit-button waymark-edit-marker",i)).innerHTML='<i class="ion ion-location"></i>',e.setAttribute("title",Waymark.config.language.add_marker_title),e.onclick=function(){var t=Waymark.create_marker_json(Waymark.map.getCenter());Waymark.map_data.addData(t),Waymark.map_was_edited()},(e=Waymark_L.DomUtil.create("a","waymark-edit-button waymark-edit-rectangle",i)).innerHTML='<i class="ion ion-android-checkbox-outline-blank"></i>',e.setAttribute("title",Waymark.config.language.add_rectangle_title),e.onclick=function(){Waymark.map.editTools.startRectangle()},(e=Waymark_L.DomUtil.create("a","waymark-edit-button waymark-edit-polygon",i)).innerHTML='<i class="ion ion-android-star-outline"></i>',e.setAttribute("title",Waymark.config.language.add_polygon_title),e.onclick=function(){Waymark.map.editTools.startPolygon()},(e=Waymark_L.DomUtil.create("a","waymark-edit-button waymark-edit-circle",i)).innerHTML='<i class="ion ion-ios-circle-outline"></i>',e.setAttribute("title",Waymark.config.language.add_circle_title),e.onclick=function(){Waymark.map.editTools.startCircle()},(e=Waymark_L.DomUtil.create("a","waymark-edit-button waymark-edit-upload waymark-hidden",i)).innerHTML='<i class="ion ion-document"></i><i class="ion ion-arrow-up-c"></i>',e.setAttribute("title",Waymark.config.language.upload_file_title);var n=jQuery("<input />").attr({type:"file",name:"add_file"}).css("display","none").change((function(){Waymark.handle_file_upload(jQuery(this))}));return jQuery("#waymark-edit-toolbar").append(n),e.onclick=function(){n.trigger("click"),Waymark.map.editTools.stopDrawing()},i}});Waymark.map.addControl(new e)},this.handle_file_upload=function(t,e={}){Waymark=this,Waymark.loading_start();var i=new FormData;i.append("waymark_security",waymark_security),i.append("action","waymark_read_file"),i.append(t.attr("name"),t[0].files[0]),jQuery.ajax({type:"POST",url:waymark_js.ajaxurl,data:i,dataType:"json",processData:!1,contentType:!1,success:function(i){if(Waymark.debug("File upload response:"),Waymark.debug(i),null===i)return Waymark.message(Waymark.config.language.error_file_upload,"error"),Waymark.loading_stop(),!1;if(i.error)return Waymark.message(i.error,"error"),Waymark.loading_stop(),!1;switch(t.attr("name")){case"add_file":Waymark.load_file_contents(i.file_contents,i.file_type);break;case"add_photo":if(void 0===i.url)return!1;var n=Waymark.map.getCenter();(latlng=Waymark.get_exif_latlng(i))&&(n=latlng,Waymark.map.setVie
9w(n));var o=Waymark.get_image_sizes(i.sizes,i.url),a=Waymark.create_marker_json(n,o);Waymark.map_data.addData(a);break;case"marker_photo":if(void 0===i.url)return!1;o=Waymark.get_image_sizes(i.sizes,i.url);e.feature.properties=Object.assign({},e.feature.properties,o),e.img_view.attr("href",e.feature.properties.image_large_url),jQuery("img",e.img_view).attr("src",e.feature.properties.image_thumbnail_url),e.img_input.val(e.feature.properties.image_large_url)}Waymark.map_was_edited(),Waymark.loading_stop()}})},this.build_content=function(t,e,i){Waymark=this;var n=jQuery("<div />"),o=jQuery("<ul />").addClass("waymark-info");if("line"==t||"shape"==t){var a=jQuery("<button />").html('<i class="ion-edit"></i>').addClass("button").attr("title",Waymark.config.language.action_edit+" "+Waymark.title_case(Waymark.config.language["object_label_"+t])).on("click",(function(e){e.preventDefault();var n=jQuery(this),o=jQuery("i",n);return i.editEnabled()?(i.disableEdit(),n.attr("title",Waymark.config.language.action_edit+" "+Waymark.title_case(Waymark.config.language["object_label_"+t])),o.attr("class","ion-edit")):(i.enableEdit(),i.closePopup(),n.attr("title",Waymark.config.language.action_edit_done),o.attr("class","ion-android-done")),!1}));o.append(jQuery("<li />").addClass("waymark-info-button waymark-info-edit waymark-"+t+"-edit").append(a))}a=jQuery("<button />").html('<i class="ion-ios-copy"></i>').addClass("button").attr("title",Waymark.config.language.action_duplicate+" "+Waymark.title_case(Waymark.config.language["object_label_"+t])).on("click",(function(t){return t.preventDefault(),Waymark.load_json(Object.assign({},i.feature)),Waymark.map_was_edited(),!1}));o.append(jQuery("<li />").addClass("waymark-info-button waymark-info-duplicate waymark-"+t+"-duplicate").append(a));a=jQuery("<button />").html('<i class="ion-trash-a"></i>').addClass("button").attr("title",Waymark.config.language.action_delete+" "+Waymark.title_case(Waymark.config.language["object_label_"+t])).on("click",(function(e){return e.preventDefault(),!("1"==Waymark.config.editor_options.confirm_delete&&!confirm(Waymark.config.language.action_delete_confirm+" "+Waymark.title_case(Waymark.config.language["object_label_"+t])+"?"))&&(Waymark.map.removeLayer(i),Waymark.map_data.removeLayer(i),Waymark.map_was_edited(),!1)}));o.append(jQuery("<li />").addClass("waymark-info-button waymark-info-delete waymark-"+t+"-delete").append(a));var r=Waymark.config.map_options[t+"_types"];if("line"==t){var s=jQuery("<select />");s.append(jQuery("<option />").val("").text(Waymark.title_case(Waymark.config.language.no_direction)),jQuery("<option />").val("default").text(Waymark.title_case(Waymark.config.language.show_direction)),jQuery("<option />").val("reverse").text(Waymark.title_case(Waymark.config.language.reverse_direction))),s.change((function(){jQuery("option:selected",jQuery(this));var t=jQuery(this).val();e.properties.direction=t,Waymark.draw_line_direction(i),Waymark.map_was_edited()})),o.append(jQuery("<li />").addClass("waymark-info-direction waymark-line-direction").append(s)),"string"==typeof e.properties.direction&&jQuery("option",s).filter((function(){return jQuery(this).val()==Waymark.make_key(e.properties.direction)})).attr("selected","selected")}var l=jQuery("<select />");for(var h in l.append(jQuery("<option />").attr({disabled:"disabled"}).text(Waymark.title_case(Waymark.config.language["object_label_"+t])+" "+Waymark.config.language.object_type_label+":")),r){var u=Waymark.make_key(r[h][t+"_title"]);l.append(jQuery("<option />").val(u).text(r[h][t+"_title"]))}l.change((function(){jQuery("option:selected",jQuery(this));var n=jQuery(this).val();if(e.properties.type=n,"object"!=typeof n)var o=Waymark.get_type(t,e.properties.type);switch(t){case"line":i.setStyle({color:o.line_colour,weight:o.line_weight,opacity:o.line_opacity});break;case"shape":i.setStyle({color:o.shape_colour,fillOpacity:o.fill_opacity});break;case"marker":i.setIcon(Waymark_L.divIcon(Waymark.build_icon_data(o)))}Waymark.map_was_edited()})),o.append(jQuery("<li />").addClass("waymark-info-type waymark-"+t+"-type").append(l)),jQuery("option",l).filter((function(){return jQuery(this).val()==Waymark.make_key(e.properties.type)})).attr("selected","selected");var c=jQuery("<div />").addClass("waymark-overlay-preview waymark-"+t+"-preview");for(var h in r){var d=r[h][t+"_title"],p=(u=Waymark.make_key(d),Waymark.get_type(t,u)),_=jQuery("<div />").addClass("waymark-type").data("type_key",u).attr("title",d);switch(t){case"marker":var m=Waymark.build_icon_data(p);_.addClass(m.className).html(m.html).css({width:m.iconSize[0],height:m.iconSize[1]});break;case"line":_.addClass("waymark-line").append(jQuery("<div />").css({margin:"15px 0",height:"1px",borderTop:p.line_weight+"px solid "+p.line_colour}));break;case"shape":_.addClass("waymark-shape").css({border:"3px solid "+p.shape_colour}).append(jQuery("<div />").css({height:"20px",background:p.shape_colour,opacity:p.fill_opacity}))}var f=jQuery("<div />").addClass("waymark-overlay-wrap waymark-"+t+"-wrap").attr("title",d);f.append(_),f.on("click",(function(){var e=(_=jQuery(".waymark-type",jQuery(this))).data("type_key");jQuery("option",l).each((function(){_.val()==e?_.attr("selected","selected"):_.removeAttr("selected")})),l.val(e),l.trigger("change"),jQuery(".waymark-"+t+"-wrap",c).each((function(){jQuery(this).removeClass("waymark-active")})),_.parent(".waymark-"+t+"-wrap").addClass("waymark-active")})),u==Waymark.make_key(e.properties.type)?(f.addClass("waymark-active"),c.prepend(f)):c.append(f)}for(key in o.append(c),Waymark.config[t+"_data_defaults"]){a=null;switch(key){case"title":a=jQuery("<input />").attr({type:"text",value:e.properties.title,placeholder:Waymark.title_case(Waymark.config.language["object_label_"+t])+" "+Waymark.config.language.object_title_placeholder}).on("change",(function(){e.properties.title=jQuery(this).val(),Waymark.map_was_edited()}));break;
9case"description":a=jQuery("<textarea />").attr({id:"waymark-info-description",class:"wp-editor",placeholder:Waymark.title_case(Waymark.config.language["object_label_"+t])+" "+Waymark.config.language.object_description_placeholder}).val(e.properties.description).on("change",(function(){e.properties.description=jQuery(this).val(),Waymark.map_was_edited()}));break;case"image_large_url":var g=jQuery("<input />").attr({value:e.properties.image_large_url,placeholder:Waymark.config.language.object_image_placeholder}).on("change",(function(){e.properties.image_large_url=jQuery(this).val(),Waymark.map_was_edited()}));if(void 0!==e.properties.image_thumbnail_url)var y=e.properties.image_thumbnail_url;else y=e.properties.image_large_url;var v=jQuery("<img />").attr({src:y,width:160});g.on("change",(function(){v.attr("src",jQuery(this).val())}));var k=jQuery("<a />").attr({href:e.properties.image_large_url,target:"_blank"}).append(v).hover((function(){jQuery(this).addClass("waymark-hover")}),(function(){jQuery(this).removeClass("waymark-hover")}));const i=jQuery("<div />").text(Waymark.config.language.action_upload_image).addClass("button button-small waymark-hidden");a=jQuery("<div />").append(k,g,i)}a&&o.append(jQuery("<li />").addClass("waymark-info-"+key+" waymark-"+t+"-info-"+key).append(a))}if("marker"==t&&void 0!==i.feature.geometry.coordinates){i.feature.geometry.coordinates;var L=i.feature.geometry.coordinates[1],w=i.feature.geometry.coordinates[0];"number"==typeof L&&(w=w.toFixed(6),L=L.toFixed(6)),a=jQuery("<small>").html("<b>"+Waymark.config.language.marker_latlng_label+"</b>: "+L+","+w),o.append(jQuery("<li />").addClass("waymark-info-latlng waymark-marker-info-latlng").append(a))}return o.children().length&&n.append(o),n},this.info_window=function(t,e,i){Waymark=this;Waymark.title_case(Waymark.config.language.action_edit+" "+t);var n=Waymark.build_content(t,e,i).get(0);i.bindPopup(n).openPopup()},this.load_file_contents=function(t,e){switch(Waymark=this,t=t.trim(),e=e.toLowerCase()){case"gpx":var i=(new DOMParser).parseFromString(t,"text/xml"),n=toGeoJSON.gpx(i);break;case"kml":var o=(new DOMParser).parseFromString(t,"text/xml");n=toGeoJSON.kml(o);break;case"json":case"geojson":n=JSON.parse(t);break;default:Waymark.message(Waymark.config.language.error_file_type,"error")}void 0!==n?this.load_json(n):Waymark.message(Waymark.config.language.error_file_conversion,"error")},this.load_json=function(t){if(Waymark=this,"object"==typeof t){Waymark.map_data.addData(t),Waymark.map_was_edited();var e=Waymark.map_data.getBounds();e.isValid()&&Waymark.map.fitBounds(e)}}}function Waymark_Map_Factory(){this.instances=[],this.viewer=function(){var t=Object.assign(new Waymark_Map,new Waymark_Map_Viewer);return this.instances.push(t),t},this.editor=function(){var t=Object.assign(new Waymark_Map,new Waymark_Map_Editor);return this.instances.push(t),t}}"undefined"!=typeof module&&(module.exports=toGeoJSON),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).togpx=t()}}((function(){return function t(e,i,n){function o(r,s){if(!i[r]){if(!e[r]){var l="function"==typeof require&&require;if(!s&&l)return l(r,!0);if(a)return a(r,!0);var h=new Error("Cannot find module '"+r+"'");throw h.code="MODULE_NOT_FOUND",h}var u=i[r]={exports:{}};e[r][0].call(u.exports,(function(t){var i=e[r][1][t];return o(i||t)}),u,u.exports,t,e,i,n)}return i[r].exports}for(var a="function"==typeof require&&require,r=0;r<n.length;r++)o(n[r]);return o}({1:[function(t,e,i){var n=t("jxon");n.config({attrPrefix:"@"}),e.exports=function(t,e){if("string"==typeof(e=function(t,e){for(var i in t)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}({creator:"togpx",metadata:void 0,featureTitle:function t(e){if(!e)return"";if("object"==typeof e.tags){var i=t(e.tags);if(""!==i)return i}return e.name?e.name:e.ref?e.ref:e.id?e.id:""},featureDescription:function t(e){if(!e)return"";if("object"==typeof e.tags)return t(e.tags);var i="";for(var n in e)"object"!=typeof e[n]&&(i+=n+"="+e[n]+"\n");return i.substr(0,i.length-1)},featureLink:void 0,featureCoordTimes:function(t){return t.properties&&(t.properties.times||t.properties.coordTimes)||null}},e||{})).featureCoordTimes){var i=e.featureCoordTimes;e.featureCoordTimes=function(t){return t.properties[i]}}function a(t,i){e.featureLink&&(t.link={"@href":e.featureLink(i.properties)})}var r={gpx:{"@xmlns":"http://www.topografix.com/GPX/1/1","@xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","@xsi:schemaLocation":"http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd","@version":"1.1",metadata:null,wpt:[],trk:[]}};return e.creator&&(r.gpx["@creator"]=e.creator),e.metadata?r.gpx.metadata=e.metadata:delete e.metadata,("FeatureCollection"===t.type?t.features:"Feature"===t.type?[t]:[{type:"Feature",properties:{},geometry:t}
9]).forEach((function t(i){switch(i.geometry.type){case"Point":case"MultiPoint":var n=i.geometry.coordinates;"Point"==i.geometry.type&&(n=[n]),n.forEach((function(t){o={"@lat":t[1],"@lon":t[0],name:e.featureTitle(i.properties),desc:e.featureDescription(i.properties)},void 0!==t[2]&&(o.ele=t[2]),a(o,i),r.gpx.wpt.push(o)}));break;case"LineString":case"MultiLineString":n=i.geometry.coordinates;var s=e.featureCoordTimes(i);"LineString"==i.geometry.type&&(n=[n]),o={name:e.featureTitle(i.properties),desc:e.featureDescription(i.properties)},a(o,i),o.trkseg=[],n.forEach((function(t){var e={trkpt:[]};t.forEach((function(t,i){var n={"@lat":t[1],"@lon":t[0]};void 0!==t[2]&&(n.ele=t[2]),s&&s[i]&&(n.time=s[i]),e.trkpt.push(n)})),o.trkseg.push(e)})),r.gpx.trk.push(o);break;case"Polygon":case"MultiPolygon":o={name:e.featureTitle(i.properties),desc:e.featureDescription(i.properties)},a(o,i),o.trkseg=[];n=i.geometry.coordinates,s=e.featureCoordTimes(i);"Polygon"==i.geometry.type&&(n=[n]),n.forEach((function(t){t.forEach((function(t){var e={trkpt:[]},i=0;t.forEach((function(t){var n={"@lat":t[1],"@lon":t[0]};void 0!==t[2]&&(n.ele=t[2]),s&&s[i]&&(n.time=s[i]),i++,e.trkpt.push(n)})),o.trkseg.push(e)}))})),r.gpx.trk.push(o);break;case"GeometryCollection":i.geometry.geometries.forEach((function(e){var n={properties:i.properties,geometry:e};t(n)}));break;default:console.log("warning: unsupported geometry type: "+i.geometry.type)}})),gpx_str=n.stringify(r),gpx_str}},{jxon:2}],2:[function(t,e,i){var n,o;n=this,o=function(t,e){var i,n={valueKey:"_",attrKey:"$",attrPrefix:"$",lowerCaseTags:!1,trueIsEmpty:!1,autoDate:!1,ignorePrefixedNodes:!1,parseValues:!1},o=[],a=/^\s*$/,r=/^(?:true|false)$/i;return new function(){function s(t){return n.parseValues?a.test(t)?null:r.test(t)?"true"===t.toLowerCase():isFinite(t)?parseFloat(t):n.autoDate&&isFinite(Date.parse(t))?new Date(t):t:t}function l(){}function h(t,e,i,a){var r,u,c=o.length,d=t.hasChildNodes(),p=t.nodeType===t.ELEMENT_NODE&&t.hasAttributes(),_=Boolean(2&e),m=0,f="",g=_?{}:!!n.trueIsEmpty||"";if(d)for(var y,v=0;v<t.childNodes.length;v++)4===(y=t.childNodes.item(v)).nodeType?f+=y.nodeValue:3===y.nodeType?f+=y.nodeValue.trim():1!==y.nodeType||n.ignorePrefixedNodes&&y.prefix||o.push(y);var k,L=o.length,w=s(f);_||!d&&!p||(g=0===e?null===(k=w)?new l:k instanceof Object?k:new k.constructor(k):{});for(var b=c;b<L;b++)r=o[b].nodeName,n.lowerCaseTags&&(r=r.toLowerCase()),u=h(o[b],e,i,a),g.hasOwnProperty(r)?(g[r].constructor!==Array&&(g[r]=[g[r]]),g[r].push(u)):(g[r]=u,m++);if(p){for(var x,W,C=t.attributes.length,M=a?"":n.attrPrefix,T=a?{}:g,P=0;P<C;m++,P++)W=(x=t.attributes.item(P)).name,n.lowerCaseTags&&(W=W.toLowerCase()),T[M+W]=s(x.value.trim());a&&(i&&Object.freeze(T),g[n.attrKey]=T,m-=C-1)}return 3===e||(2===e||1===e&&m>0)&&f?g[n.valueKey]=w:!_&&0===m&&f&&(g=w),i&&(_||m>0)&&Object.freeze(g),o.length=c,g}this.config=function(e){for(var o in e)n[o]=e[o];n.parserErrorHandler&&(i=new t.DOMParser({errorHandler:n.parserErrorHandler,locator:{}}))},l.prototype.toString=function(){return"null"},l.prototype.valueOf=function(){return null},this.xmlToJs=this.build=function(t,e,i,n){var o=arguments.length>1&&"number"==typeof e?3&e:1;return h(t,o,i||!1,arguments.length>3?n:3===o)},this.jsToXml=this.unbuild=function(i,o,a,r){var s=(t.document&&t.document.implementation||new t.DOMImplementation).createDocument(o||null,a||"",r||null);return function t(i,o,a){var r,s,l;if(a.constructor===String||a.constructor===Number||a.constructor===Boolean){if(o.appendChild(i.createTextNode(a.toString())),a===a.valueOf())return}else a.constructor===Date&&o.appendChild(i.createTextNode(a.toISOString()));for(var h in a)if(void 0!==(r=a[h])&&(null===r&&(r={}),!(isFinite(h)||r instanceof Function)))if(h===n.valueKey)null!==r&&!0!==r&&o.appendChild(i.createTextNode(r.constructor===Date?r.toISOString():String(r)));else if(h===n.attrKey)for(var u in r)o.setAttribute(u,r[u]);else if(h===n.attrPrefix+"xmlns")e&&o.setAttribute(h.slice(1),r);else if(h.charAt(0)===n.attrPrefix)o.setAttribute(h.slice(1),r);else if(r.constructor===Array)for(var c in r)r.hasOwnProperty(c)&&(s=(l=r[c]&&r[c][n.attrPrefix+"xmlns"]||o.namespaceURI)?i.createElementNS(l,h):i.createElement(h),t(i,s,r[c]||{}),o.appendChild(s));else s=(l=(r||{})[n.attrPrefix+"xmlns"]||o.namespaceURI)?i.createElementNS(l,h):i.createElement(h),r instanceof Object?t(i,s,r):null===r||!0===r&&n.trueIsEmpty||s.appendChild(i.createTextNode(r.toString())),o.appendChild(s)}(s,s.documentElement||s,i),s}
9,this.stringToXml=function(e){return i||(i=new t.DOMParser),i.parseFromString(e,"application/xml")},this.xmlToString=function(e){return void 0!==e.xml?e.xml:(new t.XMLSerializer).serializeToString(e)},this.stringToJs=function(t){var e=this.stringToXml(t);return this.xmlToJs(e)},this.jsToString=this.stringify=function(t,e,i,n){return this.xmlToString(this.jsToXml(t,e,i,n))},this.each=function(t,e,i){t instanceof Array?t.forEach(e,i):[t].forEach(e,i)}}},"object"==typeof i?"object"==typeof window&&window.DOMImplementation&&window.XMLSerializer&&window.DOMParser?e.exports=o(window):e.exports=o(t("xmldom"),!0):n.JXON=o(window)},{xmldom:3}],3:[function(t,e,i){},{}]},{},[1])(1)})),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).tokml=t()}}((function(){return function t(e,i,n){function o(r,s){if(!i[r]){if(!e[r]){var l="function"==typeof require&&require;if(!s&&l)return l(r,!0);if(a)return a(r,!0);var h=new Error("Cannot find module '"+r+"'");throw h.code="MODULE_NOT_FOUND",h}var u=i[r]={exports:{}};e[r][0].call(u.exports,(function(t){return o(e[r][1][t]||t)}),u,u.exports,t,e,i,n)}return i[r].exports}for(var a="function"==typeof require&&require,r=0;r<n.length;r++)o(n[r]);return o}({1:[function(t,e,i){var n=t("xml-escape"),o=t("strxml").tag;function a(t,e){return function(i){if(!i.properties||!r.valid(i.geometry))return"";var a=r.any(i.geometry);if(!a)return"";var s="",u="";if(t.simplestyle){var c=function(t){var e="";t["marker-symbol"]&&(e=e+"ms"+t["marker-symbol"]);t["marker-color"]&&(e=e+"mc"+t["marker-color"].replace("#",""));t["marker-size"]&&(e=e+"ms"+t["marker-size"]);t.stroke&&(e=e+"s"+t.stroke.replace("#",""));t["stroke-width"]&&(e=e+"sw"+t["stroke-width"].toString().replace(".",""));t["stroke-opacity"]&&(e=e+"mo"+t["stroke-opacity"].toString().replace(".",""));t.fill&&(e=e+"f"+t.fill.replace("#",""));t["fill-opacity"]&&(e=e+"fo"+t["fill-opacity"].toString().replace(".",""));return e}(i.properties);c&&(r.isPoint(i.geometry)&&function(t){return!!(t["marker-size"]||t["marker-symbol"]||t["marker-color"])}(i.properties)?(-1===e.indexOf(c)&&(s=function(t,e){return o("Style",{id:e},o("IconStyle",o("Icon",o("href",function(t){var e=t["marker-size"]||"medium",i=t["marker-symbol"]?"-"+t["marker-symbol"]:"",n=(t["marker-color"]||"7e7e7e").replace("#","");return"https://api.tiles.mapbox.com/v3/marker/pin-"+e.charAt(0)+i+"+"+n+".png"}(t))))+o("hotSpot",{xunits:"fraction",yunits:"fraction",x:"0.5",y:"0.5"},""))}(i.properties,c),e.push(c)),u=o("styleUrl","#"+c)):(r.isPolygon(i.geometry)||r.isLine(i.geometry))&&function(t){for(var e in t)if({stroke:!0,"stroke-opacity":!0,"stroke-width":!0,fill:!0,"fill-opacity":!0}[e])return!0}(i.properties)&&(-1===e.indexOf(c)&&(s=function(t,e){var i=o("LineStyle",o("color",h(t.stroke,t["stroke-opacity"])||"ff555555")+o("width",{},void 0===t["stroke-width"]?2:t["stroke-width"])),n="";(t.fill||t["fill-opacity"])&&(n=o("PolyStyle",o("color",{},h(t.fill,t["fill-opacity"])||"88555555")));return o("Style",{id:e},i+n)}(i.properties,c),e.push(c)),u=o("styleUrl","#"+c)))}var d={};return i.id&&(d.id=i.id),s+o("Placemark",d,function(t,e){return t[e.name]?o("name",n(t[e.name])):""}(i.properties,t)+function(t,e){return t[e.description]?o("description",n(t[e.description])):""}(i.properties,t)+function(t){return o("ExtendedData",{},function(t){var e=[];for(var i in t)t[i]?e.push([i,t[i]]):e.push([i,""]);return e}(t).map(l).join(""))}(i.properties)+function(t,e){return t[e.timestamp]?o("TimeStamp",o("when",n(t[e.timestamp]))):""}(i.properties,t)+a+u)}}e.exports=function(t,e){return'<?xml version="1.0" encoding="UTF-8"?>'+o("kml",{xmlns:"http://www.opengis.net/kml/2.2"},o("Document",function(t){return void 0!==t.documentName?o("name",t.documentName):""}(e=e||{documentName:void 0,documentDescription:void 0,name:"name",description:"description",simplestyle:!1,timestamp:"timestamp"})+function(t){return void 0!==t.documentDescription?o("description",t.documentDescription):""}(e)+function(t,e){if(!t.type)return"";var i=[];
9switch(t.type){case"FeatureCollection":return t.features?t.features.map(a(e,i)).join(""):"";case"Feature":return a(e,i)(t);default:return a(e,i)({type:"Feature",geometry:t,properties:{}})}}(t,e)))};var r={Point:function(t){return o("Point",o("coordinates",t.coordinates.join(",")))},LineString:function(t){return o("LineString",o("coordinates",s(t.coordinates)))},Polygon:function(t){if(!t.coordinates.length)return"";var e=t.coordinates[0],i=t.coordinates.slice(1),n=o("outerBoundaryIs",o("LinearRing",o("coordinates",s(e)))),a=i.map((function(t){return o("innerBoundaryIs",o("LinearRing",o("coordinates",s(t))))})).join("");return o("Polygon",n+a)},MultiPoint:function(t){return t.coordinates.length?o("MultiGeometry",t.coordinates.map((function(t){return r.Point({coordinates:t})})).join("")):""},MultiPolygon:function(t){return t.coordinates.length?o("MultiGeometry",t.coordinates.map((function(t){return r.Polygon({coordinates:t})})).join("")):""},MultiLineString:function(t){return t.coordinates.length?o("MultiGeometry",t.coordinates.map((function(t){return r.LineString({coordinates:t})})).join("")):""},GeometryCollection:function(t){return o("MultiGeometry",t.geometries.map(r.any).join(""))},valid:function(t){return t&&t.type&&(t.coordinates||"GeometryCollection"===t.type&&t.geometries&&t.geometries.every(r.valid))},any:function(t){return r[t.type]?r[t.type](t):""},isPoint:function(t){return"Point"===t.type||"MultiPoint"===t.type},isPolygon:function(t){return"Polygon"===t.type||"MultiPolygon"===t.type},isLine:function(t){return"LineString"===t.type||"MultiLineString"===t.type}};function s(t){return t.map((function(t){return t.join(",")})).join(" ")}function l(t){return o("Data",{name:t[0]},o("value",{},n(t[1]?t[1].toString():"")))}function h(t,e){if("string"!=typeof t)return"";if(3===(t=t.replace("#","").toLowerCase()).length)t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2];else if(6!==t.length)return"";var i=t[0]+t[1],n=t[2]+t[3],o=t[4]+t[5],a="ff";return"number"==typeof e&&e>=0&&e<=1&&((a=(255*e).toString(16)).indexOf(".")>-1&&(a=a.substr(0,a.indexOf("."))),a.length<2&&(a="0"+a)),a+o+n+i}},{strxml:2,"xml-escape":3}],2:[function(t,e,i){var n=t("xml-escape");function o(t){return Object.keys(t).length?" "+Object.keys(t).map((function(e){return e+'="'+n(t[e])+'"'})).join(" "):""}e.exports.attr=o,e.exports.tagClose=function(t,e){return"<"+t+o(e)+"/>"},e.exports.tag=function(t,e,i){(Array.isArray(e)||"string"==typeof e)&&(i=e,e={});Array.isArray(i)&&(i="\n"+i.map((function(t){return" "+t})).join("\n")+"\n");return"<"+t+o(e)+">"+i+"</"+t+">"}},{"xml-escape":3}],3:[function(t,e,i){(e.exports=function t(e,i){var n;if(null!=e)return e=e.toString(),i=(i||"").replace(/[^&"<>\']/g,""),n="([&\"<>'])".replace(new RegExp("["+i+"]","g"),""),e.replace(new RegExp(n,"g"),(function(e,i){return t.map[i]}))}).map={">":">","<":"<","'":"'",'"':""","&":"&"}},{}]},{},[1])(1)})),window.Waymark_Map_Factory=new Waymark_Map_Factory;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.