bigemap.js 263 KB

12345
  1. /* @preserve
  2. * Bigemap 2.1.0+doc-translated.fa4f6f5, a JS library for interactive maps. http://bigemapjs.com
  3. * (c) 2018 BIGEMAP
  4. */
  5. !function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.BM={})}(this,function(t){"use strict";function i(t){var i,e,n,s;for(e=1,n=arguments.length;e<n;e++){s=arguments[e];for(i in s)t[i]=s[i]}return t}function e(t,i){var e=Array.prototype.slice;if(t.bind)return t.bind.apply(t,e.call(arguments,1));var n=e.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(e.call(arguments)):arguments)}}function n(t){return t._bigemap_id=t._bigemap_id||++Ne,t._bigemap_id}function s(t,i,e){var n,s,o,a;return a=function(){n=!1,s&&(o.apply(e,s),s=!1)},o=function(){n?s=arguments:(t.apply(e,arguments),setTimeout(a,i),n=!0)}}function o(t,i,e){var n=i[1],s=i[0],o=n-s;return t===n&&e?t:((t-s)%o+o)%o+s}function a(){return!1}function r(t,i){var e=Math.pow(10,void 0===i?6:i);return Math.round(t*e)/e}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function l(t){return h(t).split(/\s+/)}function u(t,i){t.hasOwnProperty("options")||(t.options=t.options?Oe(t.options):{});for(var e in i)t.options[e]=i[e];return t.options}function c(t,i){return t.replace(Re,function(t,e){var n=i[e];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(i)),n})}function d(t,i){for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1}function p(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}function _(t){var i=+new Date,e=Math.max(0,16-(i-je));return je=i+e,window.setTimeout(t,e)}function m(t,i,n){if(!n||De!==_)return De.call(window,e(t,i));t.call(i)}function f(t){t&&He.call(window,t)}function g(t,i){if(!i||!i.length)return!1;for(var e=0;e<i.length;e++)if(i[e]===t)return!0;return!1}function v(t,i){-1===t.indexOf("/")?i.loadID(t):i.loadURL(t)}function y(t){"object"==typeof console&&"function"==typeof console.error&&console.error(t)}function M(t,i){if(typeof t!==i)throw new Error("Invalid argument: "+i+" expected")}function x(t,i){if(!g(t,i))throw new Error("Invalid argument: "+t+" given, valid values are "+i.join(", "))}function b(t){return t.replace(/<[^<]+>/g,"")}function w(t,e){return!e||t.accessToken?t:i({accessToken:e},t)}function T(t,i){if(i||(i=16),void 0===t&&(t=128),t<=0)return"0";for(var e=Math.log(Math.pow(2,t))/Math.log(i),n=2;e===1/0;n*=2)e=Math.log(Math.pow(2,t/n))/Math.log(i)*n;for(var s=e-Math.floor(e),o="",a=0;a<Math.floor(e);a++)o=Math.floor(Math.random()*i).toString(i)+o;if(s){var r=Math.pow(i,s);o=Math.floor(Math.random()*r).toString(i)+o}var h=parseInt(o,i);return h!==1/0&&h>=Math.pow(2,t)?T(t,i):o}function L(){}function P(t){if(BM&&BM.Mixin){t=Be(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===BM.Mixin.Events&&console.warn("Deprecated include of BM.Mixin.Events: this property will be removed in future releases, please inherit from BM.Evented instead.",(new Error).stack)}}function E(t,i,e){this.x=e?Math.round(t):t,this.y=e?Math.round(i):i}function C(t,i,e){return t instanceof E?t:Be(t)?new E(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new E(t.x,t.y):new E(t,i,e)}function S(t,i){if(t)for(var e=i?[t,i]:t,n=0,s=e.length;n<s;n++)this.extend(e[n])}function A(t,i){return!t||t instanceof S?t:new S(t,i)}function k(t,i){if(t)for(var e=i?[t,i]:t,n=0,s=e.length;n<s;n++)this.extend(e[n])}function z(t,i){return t instanceof k?t:new k(t,i)}function I(t){return new k([[t[1],t[0]],[t[3],t[2]]])}function O(t,i,e){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==e&&(this.alt=+e)}function N(t,i,e){return t instanceof O?t:Be(t)&&"object"!=typeof t[0]?3===t.length?new O(t[0],t[1],t[2]):2===t.length?new O(t[0],t[1]):null:void 0===t||null===t?t:"object"==typeof t&&"lat"in t?new O(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new O(t,i,e)}function R(t,i,e,n){if(Be(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=i,this._c=e,this._d=n}function B(t,i,e,n){return new R(t,i,e,n)}function Z(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function j(t,i){var e,n,s,o,a,r,h="";for(e=0,s=t.length;e<s;e++){for(n=0,o=(a=t[e]).length;n<o;n++)r=a[n],h+=(n?"L":"M")+r.x+" "+r.y;h+=i?kn?"z":"x":""}return h||"M0 0"}function D(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}function H(t,i,e,n){return"touchstart"===i?F(t,e,n):"touchmove"===i?Q(t,e,n):"touchend"===i&&K(t,e,n),this}function q(t,i,e){var n=t["_bigemap_"+i+e];return"touchstart"===i?t.removeEventListener(On,n,!1):"touchmove"===i?t.removeEventListener(Nn,n,!1):"touchend"===i&&(t.removeEventListener(Rn,n,!1),t.removeEventListener(Bn,n,!1)),this}function F(t,i,n){var s=e(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Zn.indexOf(t.target.tagName)<0))return;ot(t)}V(t,i)});t["_bigemap_touchstart"+n]=s,t.addEventListener(On,s,!1),Dn||(document.documentElement.addEventListener(On,G,!0),document.documentElement.addEventListener(Nn,U,!0),document.documentElement.addEventListener(Rn,W,!0),document.documentElement.addEventListener(Bn,W,!0),Dn=!0)}function G(t){jn[t.pointerId]=t,Hn++}function U(t){jn[t.pointerId]&&(jn[t.pointerId]=t)}function W(t){delete jn[t.pointerId],Hn--}function V(t,i){t.touches=[];for(var e in jn)t.touches.push(jn[e]);t.changedTouches=[t],i(t)}function Q(t,i,e){var n=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&V(t,i)};t["_bigemap_touchmove"+e]=n,t.addEventListener(Nn,n,!1)}function K(t,i,e){var n=function(t){V(t,i)};t["_bigemap_touchend"+e]=n,t.addEventListener(Rn,n,!1),t.addEventListener(Bn,n,!1)}function J(t,i,e){function n(t){var i;if(Ln){if(!sn||"mouse"===t.pointerType)return;i=Hn}else i=t.touches.length;if(!(i>1)){var e=Date.now(),n=e-(o||e);a=t.touches?t.touches[0]:t,r=n>0&&n<=h,o=e}}function s(t){if(r&&!a.cancelBubble){if(Ln){if(!sn||"mouse"===t.pointerType)return;var e,n,s={};for(n in a)e=a[n],s[n]=e&&e.bind?e.bind(a):e;a=s}a.type="dblclick",i(a),o=null}}var o,a,r=!1,h=250;return t[Gn+qn+e]=n,t[Gn+Fn+e]=s,t[Gn+"dblclick"+e]=i,t.addEventListener(qn,n,!1),t.addEventListener(Fn,s,!1),t.addEventListener("dblclick",i,!1),this}function X(t,i){var e=t[Gn+qn+i],n=t[Gn+Fn+i],s=t[Gn+"dblclick"+i];return t.removeEventListener(qn,e,!1),t.removeEventListener(Fn,n,!1),sn||t.removeEventListener("dblclick",s,!1),this}function Y(t,i,e,n){if("object"==typeof i)for(var s in i)tt(t,s,i[s],e);else for(var o=0,a=(i=l(i)).length;o<a;o++)tt(t,i[o],e,n);return this}function $(t,i,e,n){if("object"==typeof i)for(var s in i)it(t,s,i[s],e);else if(i)for(var o=0,a=(i=l(i)).length;o<a;o++)it(t,i[o],e,n);else{for(var r in t[Un])it(t,r,t[Un][r]);delete t[Un]}return this}function tt(t,i,e,s){var o=i+n(e)+(s?"_"+n(s):"");if(t[Un]&&t[Un][o])return this;var a=function(i){return e.call(s||t,i||window.event)},r=a;Ln&&0===i.indexOf("touch")?H(t,i,a,o):!Pn||"dblclick"!==i||!J||Ln&&cn?"addEventListener"in t?"mousewheel"===i?t.addEventListener("onwheel"in t?"wheel":"mousewheel",a,!1):"mouseenter"===i||"mouseleave"===i?(a=function(i){i=i||window.event,ct(t,i)&&r(i)},t.addEventListener("mouseenter"===i?"mouseover":"mouseout",a,!1)):("click"===i&&an&&(a=function(t){dt(t,r)}),t.addEventListener(i,a,!1)):"attachEvent"in t&&t.attachEvent("on"+i,a):J(t,a,o),t[Un]=t[Un]||{},t[Un][o]=a}function it(t,i,e,s){var o=i+n(e)+(s?"_"+n(s):""),a=t[Un]&&t[Un][o];if(!a)return this;Ln&&0===i.indexOf("touch")?q(t,i,o):!Pn||"dblclick"!==i||!X||Ln&&cn?"removeEventListener"in t?"mousewheel"===i?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",a,!1):t.removeEventListener("mouseenter"===i?"mouseover":"mouseleave"===i?"mouseout":i,a,!1):"detachEvent"in t&&t.detachEvent("on"+i,a):X(t,o),t[Un][o]=null}function et(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,ut(t),this}function nt(t){return tt(t,"mousewheel",et),this}function st(t){return Y(t,"mousedown touchstart dblclick",et),tt(t,"click",lt),this}function ot(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function at(t){return ot(t),et(t),this}function rt(t,i){if(!i)return new E(t.clientX,t.clientY);var e=i.getBoundingClientRect(),n=e.width/i.offsetWidth||1,s=e.height/i.offsetHeight||1;return new E(t.clientX/n-e.left-i.clientLeft,t.clientY/s-e.top-i.clientTop)}function ht(t){return sn?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Wn:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function lt(t){Vn[t.type]=!0}function ut(t){var i=Vn[t.type];return Vn[t.type]=!1,i}function ct(t,i){var e=i.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(t){return!1}return e!==t}function dt(t,i){var e=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=Qe&&e-Qe;n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?at(t):(Qe=e,i(t))}function pt(t){return"string"==typeof t?document.getElementById(t):t}function _t(t,i){var e=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!e||"auto"===e)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);e=n?n[i]:null}return"auto"===e?null:e}function mt(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function ft(t){var i=t.parentNode;i&&i.removeChild(t)}function gt(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function vt(t){var i=t.parentNode;i.lastChild!==t&&i.appendChild(t)}function yt(t){var i=t.parentNode;i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function Mt(t,i){var e=t.parentNode;i.nextSibling?i.nextSibling!==t&&e.insertBefore(t,i.nextSibling):vt(t)}function xt(t,i){var e=t.parentNode;i.previousSibling?i.previousSibling!==t&&e.insertBefore(t,i):yt(t)}function bt(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=Pt(t);return e.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function wt(t,i){if(void 0!==t.classList)for(var e=l(i),n=0,s=e.length;n<s;n++)t.classList.add(e[n]);else if(!bt(t,i)){var o=Pt(t);Lt(t,(o?o+" ":"")+i)}}function Tt(t,i){void 0!==t.classList?t.classList.remove(i):Lt(t,h((" "+Pt(t)+" ").replace(" "+i+" "," ")))}function Lt(t,i){void 0===t.className.baseVal?t.className=i:t.className.baseVal=i}function Pt(t){return void 0===t.className.baseVal?t.className:t.className.baseVal}function Et(t,i){"opacity"in t.style?t.style.opacity=i:"filter"in t.style&&Ct(t,i)}function Ct(t,i){var e=!1,n="DXImageTransform.Microsoft.Alpha";try{e=t.filters.item(n)}catch(t){if(1===i)return}i=Math.round(100*i),e?(e.Enabled=100!==i,e.Opacity=i):t.style.filter+=" progid:"+n+"(opacity="+i+")"}function St(t){for(var i=document.documentElement.style,e=0;e<t.length;e++)if(t[e]in i)return t[e];return!1}function At(t,i,e){var n=i||new E(0,0);t.style[Kn]=(gn?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")}function kt(t,i){t._bigemap_pos=i,Mn?At(t,i):(t.style.left=i.x+"px",t.style.top=i.y+"px")}function zt(t){return t._bigemap_pos||new E(0,0)}function It(){Y(window,"dragstart",ot)}function Ot(){$(window,"dragstart",ot)}function Nt(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Rt(),$n=t,ts=t.style.outline,t.style.outline="none",Y(window,"keydown",Rt))}function Rt(){$n&&($n.style.outline=ts,$n=void 0,ts=void 0,$(window,"keydown",Rt))}function Bt(t,i){if(!(i=i||BM.accessToken)&&es.REQUIRE_ACCESS_TOKEN)throw new Error("An API access token is required to use Bigemap.js. ");var e="https:"===document.location.protocol||es.FORCE_HTTPS?es.HTTPS_URL:es.HTTP_URL;if(e=e.replace(/\/v2$/,""),e+=t,es.REQUIRE_ACCESS_TOKEN){if("s"===i[0])throw new Error("Use a public access token (pk.*) with Bigemap.js, not a secret access token (sk.*). ");e+=-1!==e.indexOf("?")?"&access_token=":"?access_token=",e+=i}return e}function Zt(t,i){if(-1!==t.indexOf("/"))return t;var e=Bt("/v2/"+t+".json",i.accessToken);return 0===e.indexOf("https")&&(e+="&secure"),i.combineMode&&(e+="&mode="+i.combineMode),e}function jt(){var t=Bt("/tokens/v1","none");return 0===t.indexOf("https")&&(t+="&secure"),t}function Dt(t,i){return i={exports:{}},t(i,i.exports),i.exports}function Ht(t,i){return M(t,"string"),M(i,"function"),t=t.replace(ss,function(t,i){return"withCredentials"in new window.XMLHttpRequest?"https:"===i||"https:"===document.location.protocol?"https:":"http:":document.location.protocol}),ns(t,function(t,e){!t&&e&&(e=JSON.parse(e.responseText)),i(t,e)})}function qt(t){var i=jt();Ht(i,e(function(e,n){return e?(y("could not load Token at "+i),t(e)):n?(BM.accessToken=n.token,t(null,n.token)):void 0},this))}function Ft(t){return/^https?/.test(t.getScheme())?t.toString():/^mailto?/.test(t.getScheme())?t.toString():"data"==t.getScheme()&&/^image/.test(t.getPath())?t.toString():void 0}function Gt(t){return t}function Ut(t,i){if(!i||!t.length)return t.slice();var e=i*i;return t=Kt(t,e),t=Vt(t,e)}function Wt(t,i,e){return Math.sqrt(ti(t,i,e,!0))}function Vt(t,i){var e=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(e);n[0]=n[e-1]=1,Qt(t,n,i,0,e-1);var s,o=[];for(s=0;s<e;s++)n[s]&&o.push(t[s]);return o}function Qt(t,i,e,n,s){var o,a,r,h=0;for(a=n+1;a<=s-1;a++)(r=ti(t[a],t[n],t[s],!0))>h&&(o=a,h=r);h>e&&(i[o]=1,Qt(t,i,e,n,o),Qt(t,i,e,o,s))}function Kt(t,i){for(var e=[t[0]],n=1,s=0,o=t.length;n<o;n++)$t(t[n],t[s])>i&&(e.push(t[n]),s=n);return s<o-1&&e.push(t[o-1]),e}function Jt(t,i,e,n,s){var o,a,r,h=n?gs:Yt(t,e),l=Yt(i,e);for(gs=l;;){if(!(h|l))return[t,i];if(h&l)return!1;r=Yt(a=Xt(t,i,o=h||l,e,s),e),o===h?(t=a,h=r):(i=a,l=r)}}function Xt(t,i,e,n,s){var o,a,r=i.x-t.x,h=i.y-t.y,l=n.min,u=n.max;return 8&e?(o=t.x+r*(u.y-t.y)/h,a=u.y):4&e?(o=t.x+r*(l.y-t.y)/h,a=l.y):2&e?(o=u.x,a=t.y+h*(u.x-t.x)/r):1&e&&(o=l.x,a=t.y+h*(l.x-t.x)/r),new E(o,a,s)}function Yt(t,i){var e=0;return t.x<i.min.x?e|=1:t.x>i.max.x&&(e|=2),t.y<i.min.y?e|=4:t.y>i.max.y&&(e|=8),e}function $t(t,i){var e=i.x-t.x,n=i.y-t.y;return e*e+n*n}function ti(t,i,e,n){var s,o=i.x,a=i.y,r=e.x-o,h=e.y-a,l=r*r+h*h;return l>0&&((s=((t.x-o)*r+(t.y-a)*h)/l)>1?(o=e.x,a=e.y):s>0&&(o+=r*s,a+=h*s)),r=t.x-o,h=t.y-a,n?r*r+h*h:new E(o,a)}function ii(t){return!Be(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function ei(t){return console.warn("Deprecated use of _flat, please use BM.LineUtil.isFlat instead."),ii(t)}function ni(t,i,e){var n,s,o,a,r,h,l,u,c,d=[1,4,2,8];for(s=0,l=t.length;s<l;s++)t[s]._code=Yt(t[s],i);for(a=0;a<4;a++){for(u=d[a],n=[],s=0,o=(l=t.length)-1;s<l;o=s++)r=t[s],h=t[o],r._code&u?h._code&u||((c=Xt(h,r,u,i,e))._code=Yt(c,i),n.push(c)):(h._code&u&&((c=Xt(h,r,u,i,e))._code=Yt(c,i),n.push(c)),n.push(r));t=n}return t}function si(t){return new Ss(t)}function oi(t,i){return new zs(t,i)}function ai(t,i){var e,n,s,o,a="Feature"===t.type?t.geometry:t,r=a?a.coordinates:null,h=[],l=i&&i.pointToLayer,u=i&&i.coordsToLatLng||ri;if(!r&&!a)return null;switch(a.type){case"Point":return e=u(r),l?l(t,e):new zs(e);case"MultiPoint":for(s=0,o=r.length;s<o;s++)e=u(r[s]),h.push(l?l(t,e):new zs(e));return new Cs(h);case"LineString":case"MultiLineString":return n=hi(r,"LineString"===a.type?0:1,u),new Rs(n,i);case"Polygon":case"MultiPolygon":return n=hi(r,"Polygon"===a.type?1:2,u),new Bs(n,i);case"GeometryCollection":for(s=0,o=a.geometries.length;s<o;s++){var c=ai({geometry:a.geometries[s],type:"Feature",properties:t.properties},i);c&&h.push(c)}return new Cs(h);default:throw new Error("Invalid GeoJSON object.")}}function ri(t){return new O(t[1],t[0],t[2])}function hi(t,i,e){for(var n,s=[],o=0,a=t.length;o<a;o++)n=i?hi(t[o],i-1,e):(e||ri)(t[o]),s.push(n);return s}function li(t,i){return i="number"==typeof i?i:6,void 0!==t.alt?[r(t.lng,i),r(t.lat,i),r(t.alt,i)]:[r(t.lng,i),r(t.lat,i)]}function ui(t,i,e,n){for(var s=[],o=0,a=t.length;o<a;o++)s.push(i?ui(t[o],i-1,e,n):li(t[o],n));return!i&&e&&s.push(s[0]),s}function ci(t,e){return t.feature?i({},t.feature,{geometry:e}):di(e)}function di(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}function pi(t,i){return new Zs(t,i)}function _i(t,i){if(t[i])return t[i];for(var e,n=Object.keys(t),s=i.toLowerCase().replace(ao,""),o=-1;++o<n.length;)if(e=n[o],e.toLowerCase().replace(ao,"")===s)return t[e]}function mi(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=ho}function fi(t){return new mi(t).output()}function gi(t,i,e){Array.isArray(i)&&(e.unshift(i),i=null);var n=i?{}:t,s=e.reduce(function(t,i){return vi(i,t),t},n);i&&(t[i]=s)}function vi(t,i){if(Array.isArray(t)){var e=t.shift();if("PARAMETER"===e&&(e=t.shift()),1===t.length)return Array.isArray(t[0])?(i[e]={},void vi(t[0],i[e])):void(i[e]=t[0]);if(t.length)if("TOWGS84"!==e){if("AXIS"===e)return e in i||(i[e]=[]),void i[e].push(t);Array.isArray(e)||(i[e]={});var n;switch(e){case"UNIT":case"PRIMEM":case"VERT_DATUM":return i[e]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&vi(t[2],i[e]));case"SPHEROID":case"ELLIPSOID":return i[e]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&vi(t[3],i[e]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return t[0]=["name",t[0]],void gi(i,e,t);default:for(n=-1;++n<t.length;)if(!Array.isArray(t[n]))return vi(t,i[e]);return gi(i,e,t)}}else i[e]=t;else i[e]=!0}else i[t]=!0}function yi(t,i){var e=i[0],n=i[1];!(e in t)&&n in t&&(t[e]=t[n],3===i.length&&(t[e]=i[2](t[e])))}function Mi(t){return t*mo}function xi(t){function i(i){return i*(t.to_meter||1)}if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var e="",n=0,s=t.AXIS.length;n<s;++n){var o=[t.AXIS[n][0].toLowerCase(),t.AXIS[n][1].toLowerCase()];-1!==o[0].indexOf("north")||("y"===o[0]||"lat"===o[0])&&"north"===o[1]?e+="n":-1!==o[0].indexOf("south")||("y"===o[0]||"lat"===o[0])&&"south"===o[1]?e+="s":-1!==o[0].indexOf("east")||("x"===o[0]||"lon"===o[0])&&"east"===o[1]?e+="e":-1===o[0].indexOf("west")&&("x"!==o[0]&&"lon"!==o[0]||"west"!==o[1])||(e+="w")}2===e.length&&(e+="u"),3===e.length&&(t.axis=e)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var a=t.GEOGCS;"GEOGCS"===t.type&&(a=t),a&&(a.DATUM?t.datumCode=a.DATUM.name.toLowerCase():t.datumCode=a.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==t.datumCode&&"new_zealand_1949"!==t.datumCode||(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"_ferro"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),"_jakarta"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf("belge")&&(t.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(t.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=a.DATUM.SPHEROID.a,t.rf=parseFloat(a.DATUM.SPHEROID.rf,10)),a.DATUM&&a.DATUM.TOWGS84&&(t.datum_params=a.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a);[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Mi],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Mi],["x0","false_easting",i],["y0","false_northing",i],["long0","central_meridian",Mi],["lat0","latitude_of_origin",Mi],["lat0","standard_parallel_1",Mi],["lat1","standard_parallel_1",Mi],["lat2","standard_parallel_2",Mi],["azimuth","Azimuth"],["alpha","azimuth",Mi],["srsCode","name"]].forEach(function(i){return yi(t,i)}),t.long0||!t.longc||"Albers_Conic_Equal_Area"!==t.projName&&"Lambert_Azimuthal_Equal_Area"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||"Stereographic_South_Pole"!==t.projName&&"Polar Stereographic (variant B)"!==t.projName||(t.lat0=Mi(t.lat1>0?90:-90),t.lat_ts=t.lat1)}function bi(t){var i=this;if(2===arguments.length){var e=arguments[1];"string"==typeof e?"+"===e.charAt(0)?bi[t]=ro(arguments[1]):bi[t]=fo(arguments[1]):bi[t]=e}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){Array.isArray(t)?bi.apply(i,t):bi(t)});if("string"==typeof t){if(t in bi)return bi[t]}else"EPSG"in t?bi["EPSG:"+t.EPSG]=t:"ESRI"in t?bi["ESRI:"+t.ESRI]=t:"IAU2000"in t?bi["IAU2000:"+t.IAU2000]=t:console.log(t);return}}function wi(t){return"string"==typeof t}function Ti(t){return t in bi}function Li(t){return go.some(function(i){return t.indexOf(i)>-1})}function Pi(t){var i=_i(t,"authority");if(i){var e=_i(i,"epsg");return e&&vo.indexOf(e)>-1}}function Ei(t){var i=_i(t,"extension");if(i)return _i(i,"proj4")}function Ci(t){return"+"===t[0]}function Si(t){if(!wi(t))return t;if(Ti(t))return bi[t];if(Li(t)){var i=fo(t);if(Pi(i))return bi["EPSG:3857"];var e=Ei(i);return e?ro(e):i}return Ci(t)?ro(t):void 0}function Ai(t){return t}function ki(t,i){var e=Eo.length;return t.names?(Eo[e]=t,t.names.forEach(function(t){Po[t.toLowerCase()]=e}),this):(console.log(i),!0)}function zi(t,i,e,n){var s=t*t,o=i*i,a=(s-o)/s,r=0;return n?(s=(t*=1-a*(Ks+a*(Js+a*Xs)))*t,a=0):r=Math.sqrt(a),{es:a,e:r,ep2:(s-o)/o}}function Ii(t,i,e,n,s){if(!t){var o=_i(So,n);o||(o=Ao),t=o.a,i=o.b,e=o.rf}return e&&!i&&(i=(1-1/e)*t),(0===e||Math.abs(t-i)<Ys)&&(s=!0,i=t),{a:t,b:i,rf:e,sphere:s}}function Oi(t,i,e,n,s,o,a){var r={};return r.datum_type=void 0===t||"none"===t?Ws:Us,i&&(r.datum_params=i.map(parseFloat),0===r.datum_params[0]&&0===r.datum_params[1]&&0===r.datum_params[2]||(r.datum_type=qs),r.datum_params.length>3&&(0===r.datum_params[3]&&0===r.datum_params[4]&&0===r.datum_params[5]&&0===r.datum_params[6]||(r.datum_type=Fs,r.datum_params[3]*=Vs,r.datum_params[4]*=Vs,r.datum_params[5]*=Vs,r.datum_params[6]=r.datum_params[6]/1e6+1))),a&&(r.datum_type=Gs,r.grids=a),r.a=e,r.b=n,r.es=s,r.ep2=o,r}function Ni(t){return void 0===t?null:t.split(",").map(Ri)}function Ri(t){if(0===t.length)return null;var i="@"===t[0];return i&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!i,grid:null,isNull:!0}:{name:t,mandatory:!i,grid:zo[t]||null,isNull:!1}}function Bi(t){return t/3600*Math.PI/180}function Zi(t){var i=t.getInt32(8,!1);return 11!==i&&(11!==(i=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function ji(t,i){return{nFields:t.getInt32(8,i),nSubgridFields:t.getInt32(24,i),nSubgrids:t.getInt32(40,i),shiftType:Di(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,i),fromSemiMinorAxis:t.getFloat64(136,i),toSemiMajorAxis:t.getFloat64(152,i),toSemiMinorAxis:t.getFloat64(168,i)}}function Di(t,i,e){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(i,e)))}function Hi(t,i,e){for(var n=[],s=0;s<i.nSubgrids;s++){var o=Fi(t,176,e),a=Gi(t,176,o,e),r=Math.round(1+(o.upperLongitude-o.lowerLongitude)/o.longitudeInterval),h=Math.round(1+(o.upperLatitude-o.lowerLatitude)/o.latitudeInterval);n.push({ll:[Bi(o.lowerLongitude),Bi(o.lowerLatitude)],del:[Bi(o.longitudeInterval),Bi(o.latitudeInterval)],lim:[r,h],count:o.gridNodeCount,cvs:qi(a)})}return n}function qi(t){return t.map(function(t){return[Bi(t.longitudeShift),Bi(t.latitudeShift)]})}function Fi(t,i,e){return{name:Di(t,i+8,i+16).trim(),parent:Di(t,i+24,i+24+8).trim(),lowerLatitude:t.getFloat64(i+72,e),upperLatitude:t.getFloat64(i+88,e),lowerLongitude:t.getFloat64(i+104,e),upperLongitude:t.getFloat64(i+120,e),latitudeInterval:t.getFloat64(i+136,e),longitudeInterval:t.getFloat64(i+152,e),gridNodeCount:t.getInt32(i+168,e)}}function Gi(t,i,e,n){for(var s=i+176,o=[],a=0;a<e.gridNodeCount;a++){var r={latitudeShift:t.getFloat32(s+16*a,n),longitudeShift:t.getFloat32(s+16*a+4,n),latitudeAccuracy:t.getFloat32(s+16*a+8,n),longitudeAccuracy:t.getFloat32(s+16*a+12,n)};o.push(r)}return o}function Ui(t,i){if(!(this instanceof Ui))return new Ui(t);i=i||function(t){if(t)throw t};var e=Si(t);if("object"==typeof e){var n=Ui.projections.get(e.projName);if(n){if(e.datumCode&&"none"!==e.datumCode){var s=_i(ko,e.datumCode);s&&(e.datum_params=e.datum_params||(s.towgs84?s.towgs84.split(","):null),e.ellps=s.ellipse,e.datumName=s.datumName?s.datumName:e.datumCode)}e.k0=e.k0||1,e.axis=e.axis||"enu",e.ellps=e.ellps||"wgs84",e.lat1=e.lat1||e.lat0;var o=Ii(e.a,e.b,e.rf,e.ellps,e.sphere),a=zi(o.a,o.b,o.rf,e.R_A),r=Ni(e.nadgrids),h=e.datum||Oi(e.datumCode,e.datum_params,o.a,o.b,a.es,a.ep2,r);yo(this,e),yo(this,n),this.a=o.a,this.b=o.b,this.rf=o.rf,this.sphere=o.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=h,this.init(),i(null,this)}else i(t)}else i(t)}function Wi(t,i){return t.datum_type===i.datum_type&&(!(t.a!==i.a||Math.abs(t.es-i.es)>5e-11)&&(t.datum_type===qs?t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]:t.datum_type!==Fs||t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]&&t.datum_params[3]===i.datum_params[3]&&t.datum_params[4]===i.datum_params[4]&&t.datum_params[5]===i.datum_params[5]&&t.datum_params[6]===i.datum_params[6]))}function Vi(t,i,e){var n,s,o,a,r=t.x,h=t.y,l=t.z?t.z:0;if(h<-Qs&&h>-1.001*Qs)h=-Qs;else if(h>Qs&&h<1.001*Qs)h=Qs;else{if(h<-Qs)return{x:-1/0,y:-1/0,z:t.z};if(h>Qs)return{x:1/0,y:1/0,z:t.z}}return r>Math.PI&&(r-=2*Math.PI),s=Math.sin(h),a=Math.cos(h),o=s*s,n=e/Math.sqrt(1-i*o),{x:(n+l)*a*Math.cos(r),y:(n+l)*a*Math.sin(r),z:(n*(1-i)+l)*s}}function Qi(t,i,e,n){var s,o,a,r,h,l,u,c,d,p,_,m,f,g,v,y,M=t.x,x=t.y,b=t.z?t.z:0;if(s=Math.sqrt(M*M+x*x),o=Math.sqrt(M*M+x*x+b*b),s/e<1e-12){if(g=0,o/e<1e-12)return v=Qs,y=-n,{x:t.x,y:t.y,z:t.z}}else g=Math.atan2(x,M);a=b/o,c=(r=s/o)*(1-i)*(h=1/Math.sqrt(1-i*(2-i)*r*r)),d=a*h,f=0;do{f++,l=i*(u=e/Math.sqrt(1-i*d*d))/(u+(y=s*c+b*d-u*(1-i*d*d))),m=(_=a*(h=1/Math.sqrt(1-l*(2-l)*r*r)))*c-(p=r*(1-l)*h)*d,c=p,d=_}while(m*m>1e-24&&f<30);return v=Math.atan(_/Math.abs(p)),{x:g,y:v,z:y}}function Ki(t,i,e){if(i===qs)return{x:t.x+e[0],y:t.y+e[1],z:t.z+e[2]};if(i===Fs){var n=e[0],s=e[1],o=e[2],a=e[3],r=e[4],h=e[5],l=e[6];return{x:l*(t.x-h*t.y+r*t.z)+n,y:l*(h*t.x+t.y-a*t.z)+s,z:l*(-r*t.x+a*t.y+t.z)+o}}}function Ji(t,i,e){if(i===qs)return{x:t.x-e[0],y:t.y-e[1],z:t.z-e[2]};if(i===Fs){var n=e[0],s=e[1],o=e[2],a=e[3],r=e[4],h=e[5],l=e[6],u=(t.x-n)/l,c=(t.y-s)/l,d=(t.z-o)/l;return{x:u+h*c-r*d,y:-h*u+c+a*d,z:r*u-a*c+d}}}function Xi(t){return t===qs||t===Fs}function Yi(t,i,e){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;for(var n={x:-e.x,y:e.y},s={x:Number.NaN,y:Number.NaN},o=[],a=0;a<t.grids.length;a++){var r=t.grids[a];if(o.push(r.name),r.isNull){s=n;break}if(null!==r.grid){var h=r.grid.subgrids[0],l=(Math.abs(h.del[1])+Math.abs(h.del[0]))/1e4,u=h.ll[0]-l,c=h.ll[1]-l,d=h.ll[0]+(h.lim[0]-1)*h.del[0]+l,p=h.ll[1]+(h.lim[1]-1)*h.del[1]+l;if(!(c>n.y||u>n.x||p<n.y||d<n.x||(s=$i(n,i,h),isNaN(s.x))))break}else if(r.mandatory)return console.log("Unable to find mandatory grid '"+r.name+"'"),-1}return isNaN(s.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*to+" "+n.y*to+" tried: '"+o+"'"),-1):(e.x=-s.x,e.y=s.y,0)}function $i(t,i,e){var n={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return n;var s={x:t.x,y:t.y};s.x-=e.ll[0],s.y-=e.ll[1],s.x=bo(s.x-Math.PI)+Math.PI;var o=te(s,e);if(i){if(isNaN(o.x))return n;o.x=s.x-o.x,o.y=s.y-o.y;var a,r,h=9;do{if(r=te(o,e),isNaN(r.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}a={x:s.x-(r.x+o.x),y:s.y-(r.y+o.y)},o.x+=a.x,o.y+=a.y}while(h--&&Math.abs(a.x)>1e-12&&Math.abs(a.y)>1e-12);if(h<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=bo(o.x+e.ll[0]),n.y=o.y+e.ll[1]}else isNaN(o.x)||(n.x=t.x+o.x,n.y=t.y+o.y);return n}function te(t,i){var e,n={x:t.x/i.del[0],y:t.y/i.del[1]},s={x:Math.floor(n.x),y:Math.floor(n.y)},o={x:n.x-1*s.x,y:n.y-1*s.y},a={x:Number.NaN,y:Number.NaN};if(s.x<0||s.x>=i.lim[0])return a;if(s.y<0||s.y>=i.lim[1])return a;e=s.y*i.lim[0]+s.x;var r={x:i.cvs[e][0],y:i.cvs[e][1]};e++;var h={x:i.cvs[e][0],y:i.cvs[e][1]};e+=i.lim[0];var l={x:i.cvs[e][0],y:i.cvs[e][1]};e--;var u={x:i.cvs[e][0],y:i.cvs[e][1]},c=o.x*o.y,d=o.x*(1-o.y),p=(1-o.x)*(1-o.y),_=(1-o.x)*o.y;return a.x=p*r.x+d*h.x+_*u.x+c*l.x,a.y=p*r.y+d*h.y+_*u.y+c*l.y,a}function ie(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!==t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function ee(t,i){return(t.datum.datum_type===qs||t.datum.datum_type===Fs)&&"WGS84"!==i.datumCode||(i.datum.datum_type===qs||i.datum.datum_type===Fs)&&"WGS84"!==t.datumCode}function ne(t,i,e,n){var s;if(Array.isArray(e)&&(e=No(e)),Ro(e),t.datum&&i.datum&&ee(t,i)&&(e=ne(t,s=new Ui("WGS84"),e,n),t=s),n&&"enu"!==t.axis&&(e=Oo(t,!1,e)),"longlat"===t.projName)e={x:e.x*$s,y:e.y*$s,z:e.z||0};else if(t.to_meter&&(e={x:e.x*t.to_meter,y:e.y*t.to_meter,z:e.z||0}),!(e=t.inverse(e)))return;if(t.from_greenwich&&(e.x+=t.from_greenwich),e=Io(t.datum,i.datum,e))return i.from_greenwich&&(e={x:e.x-i.from_greenwich,y:e.y,z:e.z||0}),"longlat"===i.projName?e={x:e.x*to,y:e.y*to,z:e.z||0}:(e=i.forward(e),i.to_meter&&(e={x:e.x/i.to_meter,y:e.y/i.to_meter,z:e.z||0})),n&&"enu"!==i.axis?Oo(i,!0,e):e}function se(t,i,e,n){var s,o,a;return Array.isArray(e)?(s=ne(t,i,e,n)||{x:NaN,y:NaN},e.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==i.name&&"geocent"===i.name?"number"==typeof s.z?[s.x,s.y,s.z].concat(e.splice(3)):[s.x,s.y,e[2]].concat(e.splice(3)):[s.x,s.y].concat(e.splice(2)):[s.x,s.y]):(o=ne(t,i,e,n),2===(a=Object.keys(e)).length?o:(a.forEach(function(n){if(void 0!==t.name&&"geocent"===t.name||void 0!==i.name&&"geocent"===i.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;o[n]=e[n]}),o))}function oe(t){return t instanceof Ui?t:t.oProj?t.oProj:Ui(t)}function ae(t,i,e){t=oe(t);var n,s=!1;return void 0===i?(i=t,t=Bo,s=!0):(void 0!==i.x||Array.isArray(i))&&(e=i,i=t,t=Bo,s=!0),i=oe(i),e?se(t,i,e):(n={forward:function(e,n){return se(t,i,e,n)},inverse:function(e,n){return se(i,t,e,n)}},s&&(n.oProj=i),n)}function re(t,i){return i=i||5,_e(ce({lat:t[1],lon:t[0]}),i)}function he(t){var i=de(ve(t.toUpperCase()));return i.lat&&i.lon?[i.lon,i.lat]:[(i.left+i.right)/2,(i.top+i.bottom)/2]}function le(t){return t*(Math.PI/180)}function ue(t){return t/Math.PI*180}function ce(t){var i,e,n,s,o,a,r,h=t.lat,l=t.lon,u=6378137,c=le(h),d=le(l);r=Math.floor((l+180)/6)+1,180===l&&(r=60),h>=56&&h<64&&l>=3&&l<12&&(r=32),h>=72&&h<84&&(l>=0&&l<9?r=31:l>=9&&l<21?r=33:l>=21&&l<33?r=35:l>=33&&l<42&&(r=37)),a=le(6*(r-1)-180+3),i=u/Math.sqrt(1-.00669438*Math.sin(c)*Math.sin(c)),e=Math.tan(c)*Math.tan(c),n=.006739496752268451*Math.cos(c)*Math.cos(c);var p=.9996*i*((s=Math.cos(c)*(d-a))+(1-e+n)*s*s*s/6+(5-18*e+e*e+72*n-.39089081163157013)*s*s*s*s*s/120)+5e5,_=.9996*((o=u*(.9983242984503243*c-.002514607064228144*Math.sin(2*c)+2639046602129982e-21*Math.sin(4*c)-3.418046101696858e-9*Math.sin(6*c)))+i*Math.tan(c)*(s*s/2+(5-e+9*n+4*n*n)*s*s*s*s/24+(61-58*e+e*e+600*n-2.2240339282485886)*s*s*s*s*s*s/720));return h<0&&(_+=1e7),{northing:Math.round(_),easting:Math.round(p),zoneNumber:r,zoneLetter:pe(h)}}function de(t){var i=t.northing,e=t.easting,n=t.zoneLetter,s=t.zoneNumber;if(s<0||s>60)return null;var o,a,r,h,l,u,c,d,p=6378137,_=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),m=e-5e5,f=i;n<"N"&&(f-=1e7),u=6*(s-1)-180+3,d=(c=f/.9996/6367449.145945056)+(3*_/2-27*_*_*_/32)*Math.sin(2*c)+(21*_*_/16-55*_*_*_*_/32)*Math.sin(4*c)+151*_*_*_/96*Math.sin(6*c),o=p/Math.sqrt(1-.00669438*Math.sin(d)*Math.sin(d)),a=Math.tan(d)*Math.tan(d),r=.006739496752268451*Math.cos(d)*Math.cos(d),h=.99330562*p/Math.pow(1-.00669438*Math.sin(d)*Math.sin(d),1.5),l=m/(.9996*o);var g=d-o*Math.tan(d)/h*(l*l/2-(5+3*a+10*r-4*r*r-.06065547077041606)*l*l*l*l/24+(61+90*a+298*r+45*a*a-1.6983531815716497-3*r*r)*l*l*l*l*l*l/720);g=ue(g);var v=(l-(1+2*a+r)*l*l*l/6+(5-2*r+28*a-3*r*r+.05391597401814761+24*a*a)*l*l*l*l*l/120)/Math.cos(d);v=u+ue(v);var y;if(t.accuracy){var M=de({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});y={top:M.lat,right:M.lon,bottom:g,left:v}}else y={lat:g,lon:v};return y}function pe(t){var i="Z";return 84>=t&&t>=72?i="X":72>t&&t>=64?i="W":64>t&&t>=56?i="V":56>t&&t>=48?i="U":48>t&&t>=40?i="T":40>t&&t>=32?i="S":32>t&&t>=24?i="R":24>t&&t>=16?i="Q":16>t&&t>=8?i="P":8>t&&t>=0?i="N":0>t&&t>=-8?i="M":-8>t&&t>=-16?i="L":-16>t&&t>=-24?i="K":-24>t&&t>=-32?i="J":-32>t&&t>=-40?i="H":-40>t&&t>=-48?i="G":-48>t&&t>=-56?i="F":-56>t&&t>=-64?i="E":-64>t&&t>=-72?i="D":-72>t&&t>=-80&&(i="C"),i}function _e(t,i){var e="00000"+t.easting,n="00000"+t.northing;return t.zoneNumber+t.zoneLetter+me(t.easting,t.northing,t.zoneNumber)+e.substr(e.length-5,i)+n.substr(n.length-5,i)}function me(t,i,e){var n=fe(e);return ge(Math.floor(t/1e5),Math.floor(i/1e5)%20,n)}function fe(t){var i=t%Zo;return 0===i&&(i=Zo),i}function ge(t,i,e){var n=e-1,s=jo.charCodeAt(n),o=Do.charCodeAt(n),a=s+t-1,r=o+i,h=!1;return a>Uo&&(a=a-Uo+Ho-1,h=!0),(a===qo||s<qo&&a>qo||(a>qo||s<qo)&&h)&&a++,(a===Fo||s<Fo&&a>Fo||(a>Fo||s<Fo)&&h)&&++a===qo&&a++,a>Uo&&(a=a-Uo+Ho-1),r>Go?(r=r-Go+Ho-1,h=!0):h=!1,(r===qo||o<qo&&r>qo||(r>qo||o<qo)&&h)&&r++,(r===Fo||o<Fo&&r>Fo||(r>Fo||o<Fo)&&h)&&++r===qo&&r++,r>Go&&(r=r-Go+Ho-1),String.fromCharCode(a)+String.fromCharCode(r)}function ve(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var i,e=t.length,n=null,s="",o=0;!/[A-Z]/.test(i=t.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+t;s+=i,o++}var a=parseInt(s,10);if(0===o||o+3>e)throw"MGRSPoint bad conversion from: "+t;var r=t.charAt(o++);if(r<="A"||"B"===r||"Y"===r||r>="Z"||"I"===r||"O"===r)throw"MGRSPoint zone letter "+r+" not handled: "+t;n=t.substring(o,o+=2);for(var h=fe(a),l=ye(n.charAt(0),h),u=Me(n.charAt(1),h);u<xe(r);)u+=2e6;var c=e-o;if(c%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var d,p,_,m,f,g=c/2,v=0,y=0;return g>0&&(d=1e5/Math.pow(10,g),p=t.substring(o,o+g),v=parseFloat(p)*d,_=t.substring(o+g),y=parseFloat(_)*d),m=v+l,f=y+u,{easting:m,northing:f,zoneLetter:r,zoneNumber:a,accuracy:d}}function ye(t,i){for(var e=jo.charCodeAt(i-1),n=1e5,s=!1;e!==t.charCodeAt(0);){if(++e===qo&&e++,e===Fo&&e++,e>Uo){if(s)throw"Bad character: "+t;e=Ho,s=!0}n+=1e5}return n}function Me(t,i){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var e=Do.charCodeAt(i-1),n=0,s=!1;e!==t.charCodeAt(0);){if(++e===qo&&e++,e===Fo&&e++,e>Go){if(s)throw"Bad character: "+t;e=Ho,s=!0}n+=1e5}return n}function xe(t){var i;switch(t){case"C":i=11e5;break;case"D":i=2e6;break;case"E":i=28e5;break;case"F":i=37e5;break;case"G":i=46e5;break;case"H":i=55e5;break;case"J":i=64e5;break;case"K":i=73e5;break;case"L":i=82e5;break;case"M":i=91e5;break;case"N":i=0;break;case"P":i=8e5;break;case"Q":i=17e5;break;case"R":i=26e5;break;case"S":i=35e5;break;case"T":i=44e5;break;case"U":i=53e5;break;case"V":i=62e5;break;case"W":i=7e6;break;case"X":i=79e5;break;default:i=-1}if(i>=0)return i;throw"Invalid zone letter: "+t}function be(t,i,e){if(!(this instanceof be))return new be(t,i,e);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===i){var n=t.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=t,this.y=i,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}function we(t){var i=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e="object"==typeof t.PROJECTION?Object.keys(t.PROJECTION)[0]:t.PROJECTION;return"no_uoff"in t||"no_off"in t||-1!==i.indexOf(e)}function Te(t){var i,e=[];return e[0]=t*Sa,i=t*t,e[0]+=i*Aa,e[1]=i*za,i*=t,e[0]+=i*ka,e[1]+=i*Ia,e[2]=i*Oa,e}function Le(t,i){var e=t+t;return t+i[0]*Math.sin(e)+i[1]*Math.sin(e+e)+i[2]*Math.sin(e+e+e)}function Pe(t,i,e,n){var s;return t<Ys?(n.value=tr.AREA_0,s=0):(s=Math.atan2(i,e),Math.abs(s)<=io?n.value=tr.AREA_0:s>io&&s<=Qs+io?(n.value=tr.AREA_1,s-=Qs):s>Qs+io||s<=-(Qs+io)?(n.value=tr.AREA_2,s=s>=0?s-no:s+no):(n.value=tr.AREA_3,s+=Qs)),s}function Ee(t,i){var e=t+i;return e<-no?e+=eo:e>+no&&(e-=eo),e}function Ce(t,i,e,n){for(var s=i;n;--n){var o=t(s);if(s-=o,Math.abs(o)<e)break}return s}function Se(t,i){return new Sr(t,i)}function Ae(t,i){return new Rr(t,i)}function ke(t){return An?new Zr(t):null}function ze(t){return kn||zn?new qr(t):null}var Ie=Object.freeze;Object.freeze=function(t){return t};var Oe=Object.create||function(){function t(){}return function(i){return t.prototype=i,new t}}(),Ne=0,Re=/\{ *([\w_-]+) *\}/g,Be=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},Ze="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",je=0,De=window.requestAnimationFrame||p("RequestAnimationFrame")||_,He=window.cancelAnimationFrame||p("CancelAnimationFrame")||p("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)},qe=Object.freeze({freeze:Ie,extend:i,create:Oe,bind:e,get lastId(){return Ne},stamp:n,throttle:s,wrapNum:o,falseFn:a,formatNum:r,trim:h,splitWords:l,setOptions:u,getParamString:function(t,i,e){var n=[];for(var s in t)n.push(encodeURIComponent(e?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")},template:c,isArray:Be,indexOf:d,emptyImageUrl:Ze,requestFn:De,cancelFn:He,requestAnimFrame:m,cancelAnimFrame:f,idUrl:v,log:y,strict:M,strictInstance:function(t,i,e){if(!(t instanceof i))throw new Error("Invalid argument: "+e+" expected")},strictOneof:x,stripTags:b,withAccessToken:w,hat:T,rack:function(t,i,e){var n=function(n){var o=0;do{if(o++>10){if(!e)throw new Error("too many ID collisions, use more bits");t+=e}var a=T(t,i)}while(Object.hasOwnProperty.call(s,a));return s[a]=n,a},s=n.hats={};return n.get=function(t){return n.hats[t]},n.set=function(t,i){return n.hats[t]=i,n},n.bits=t||128,n.base=i||16,n}});L.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},n=e.__super__=this.prototype,s=Oe(n);s.constructor=e,e.prototype=s;for(var o in this)this.hasOwnProperty(o)&&"prototype"!==o&&"__super__"!==o&&(e[o]=this[o]);return t.statics&&(i(e,t.statics),delete t.statics),t.includes&&(P(t.includes),i.apply(null,[s].concat(t.includes)),delete t.includes),s.options&&(t.options=i(Oe(s.options),t.options)),i(s,t),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=s._initHooks.length;t<i;t++)s._initHooks[t].call(this)}},e},L.include=function(t){return i(this.prototype,t),this},L.mergeOptions=function(t){return i(this.prototype.options,t),this},L.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),e="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(e),this};var Fe={on:function(t,i,e){if("object"==typeof t)for(var n in t)this._on(n,t[n],i);else for(var s=0,o=(t=l(t)).length;s<o;s++)this._on(t[s],i,e);return this},off:function(t,i,e){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],i);else for(var s=0,o=(t=l(t)).length;s<o;s++)this._off(t[s],i,e);else delete this._events;return this},_on:function(t,i,e){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),e===this&&(e=void 0);for(var s={fn:i,ctx:e},o=n,a=0,r=o.length;a<r;a++)if(o[a].fn===i&&o[a].ctx===e)return;o.push(s)},_off:function(t,i,e){var n,s,o;if(this._events&&(n=this._events[t]))if(i){if(e===this&&(e=void 0),n)for(s=0,o=n.length;s<o;s++){var r=n[s];if(r.ctx===e&&r.fn===i)return r.fn=a,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(s,1)}}else{for(s=0,o=n.length;s<o;s++)n[s].fn=a;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var s=i({},e,{type:t,target:this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var a=0,r=o.length;a<r;a++){var h=o[a];h.fn.call(h.ctx||this,s)}this._firingCount--}}return n&&this._propagateEvent(s),this},listens:function(t,i){var e=this._events&&this._events[t];if(e&&e.length)return!0;if(i)for(var n in this._eventParents)if(this._eventParents[n].listens(t,i))return!0;return!1},once:function(t,i,n){if("object"==typeof t){for(var s in t)this.once(s,t[s],i);return this}var o=e(function(){this.off(t,i,n).off(t,o,n)},this);return this.on(t,i,n).on(t,o,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[n(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[n(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target},t),!0)}};Fe.addEventListener=Fe.on,Fe.removeEventListener=Fe.clearAllEventListeners=Fe.off,Fe.addOneTimeEventListener=Fe.once,Fe.fireEvent=Fe.fire,Fe.hasEventListeners=Fe.listens;var Ge=L.extend(Fe);E.prototype={clone:function(){return new E(this.x,this.y)},add:function(t){return this.clone()._add(C(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(C(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 E(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new E(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},distanceTo:function(t){var i=(t=C(t)).x-this.x,e=t.y-this.y;return Math.sqrt(i*i+e*e)},equals:function(t){return(t=C(t)).x===this.x&&t.y===this.y},contains:function(t){return t=C(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+r(this.x)+", "+r(this.y)+")"}},S.prototype={extend:function(t){return t=C(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 E((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new E(this.min.x,this.max.y)},getTopRight:function(){return new E(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var i,e;return(t="number"==typeof t[0]||t instanceof E?C(t):A(t))instanceof S?(i=t.min,e=t.max):i=e=t,i.x>=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=A(t);var i=this.min,e=this.max,n=t.min,s=t.max,o=s.x>=i.x&&n.x<=e.x,a=s.y>=i.y&&n.y<=e.y;return o&&a},overlaps:function(t){t=A(t);var i=this.min,e=this.max,n=t.min,s=t.max,o=s.x>i.x&&n.x<e.x,a=s.y>i.y&&n.y<e.y;return o&&a},isValid:function(){return!(!this.min||!this.max)}},k.prototype={extend:function(t){var i,e,n=this._southWest,s=this._northEast;if(t instanceof O)i=t,e=t;else{if(!(t instanceof k))return t?this.extend(N(t)||z(t)):this;if(i=t._southWest,e=t._northEast,!i||!e)return this}return n||s?(n.lat=Math.min(i.lat,n.lat),n.lng=Math.min(i.lng,n.lng),s.lat=Math.max(e.lat,s.lat),s.lng=Math.max(e.lng,s.lng)):(this._southWest=new O(i.lat,i.lng),this._northEast=new O(e.lat,e.lng)),this},pad:function(t){var i=this._southWest,e=this._northEast,n=Math.abs(i.lat-e.lat)*t,s=Math.abs(i.lng-e.lng)*t;return new k(new O(i.lat-n,i.lng-s),new O(e.lat+n,e.lng+s))},getCenter:function(){return new O((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 O(this.getNorth(),this.getWest())},getSouthEast:function(){return new O(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof O||"lat"in t?N(t):z(t);var i,e,n=this._southWest,s=this._northEast;return t instanceof k?(i=t.getSouthWest(),e=t.getNorthEast()):i=e=t,i.lat>=n.lat&&e.lat<=s.lat&&i.lng>=n.lng&&e.lng<=s.lng},intersects:function(t){t=z(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),o=s.lat>=i.lat&&n.lat<=e.lat,a=s.lng>=i.lng&&n.lng<=e.lng;return o&&a},overlaps:function(t){t=z(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),o=s.lat>i.lat&&n.lat<e.lat,a=s.lng>i.lng&&n.lng<e.lng;return o&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=z(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}},O.prototype={equals:function(t,i){return!!t&&(t=N(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===i?1e-9:i))},toString:function(t){return"LatLng("+r(this.lat,t)+", "+r(this.lng,t)+")"},distanceTo:function(t){return We.distance(this,N(t))},wrap:function(){return We.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,e=i/Math.cos(Math.PI/180*this.lat);return z([this.lat-i,this.lng-e],[this.lat+i,this.lng+e])},clone:function(){return new O(this.lat,this.lng,this.alt)}};var Ue={latLngToPoint:function(t,i){var e=this.projection.project(t),n=this.scale(i);return this.transformation._transform(e,n)},pointToLatLng:function(t,i){var e=this.scale(i),n=this.transformation.untransform(t,e);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var i=this.projection.bounds,e=this.scale(t);return new S(this.transformation.transform(i.min,e),this.transformation.transform(i.max,e))},infinite:!1,wrapLatLng:function(t){var i=this.wrapLng?o(t.lng,this.wrapLng,!0):t.lng;return new O(this.wrapLat?o(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),e=this.wrapLatLng(i),n=i.lat-e.lat,s=i.lng-e.lng;if(0===n&&0===s)return t;var o=t.getSouthWest(),a=t.getNorthEast();return new k(new O(o.lat-n,o.lng-s),new O(a.lat-n,a.lng-s))}},We=i({},Ue,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var e=Math.PI/180,n=t.lat*e,s=i.lat*e,o=Math.sin(n)*Math.sin(s)+Math.cos(n)*Math.cos(s)*Math.cos((i.lng-t.lng)*e);return this.R*Math.acos(Math.min(o,1))}}),Ve={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,e=this.MAX_LATITUDE,n=Math.max(Math.min(e,t.lat),-e),s=Math.sin(n*i);return new E(this.R*t.lng*i,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var i=180/Math.PI;return new O((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:function(){var t=6378137*Math.PI;return new S([-t,-t],[t,t])}()};R.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){return i=i||1,t.x=i*(this._a*t.x+this._b),t.y=i*(this._c*t.y+this._d),t},untransform:function(t,i){return i=i||1,new E((t.x/i-this._b)/this._a,(t.y/i-this._d)/this._c)}};var Qe,Ke,Je,Xe,Ye=i({},We,{code:"EPSG:3857",projection:Ve,transformation:function(){var t=.5/(Math.PI*Ve.R);return B(t,.5,-t,.5)}()}),$e=i({},Ye,{code:"EPSG:900913"}),tn=document.documentElement.style,en="ActiveXObject"in window,nn=en&&!document.addEventListener,sn="msLaunchUri"in navigator&&!("documentMode"in document),on=D("webkit"),an=D("android"),rn=D("android 2")||D("android 3"),hn=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ln=an&&D("Google")&&hn<537&&!("AudioNode"in window),un=!!window.opera,cn=D("chrome"),dn=D("gecko")&&!on&&!un&&!en,pn=!cn&&D("safari"),_n=D("phantom"),mn="OTransition"in tn,fn=0===navigator.platform.indexOf("Win"),gn=en&&"transition"in tn,vn="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rn,yn="MozPerspective"in tn,Mn=!window.L_DISABLE_3D&&(gn||vn||yn)&&!mn&&!_n,xn="undefined"!=typeof orientation||D("mobile"),bn=xn&&on,wn=xn&&vn,Tn=!window.PointerEvent&&window.MSPointerEvent,Ln=!(!window.PointerEvent&&!Tn),Pn=!window.L_NO_TOUCH&&(Ln||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),En=xn&&un,Cn=xn&&dn,Sn=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,An=!!document.createElement("canvas").getContext,kn=!(!document.createElementNS||!Z("svg").createSVGRect),zn=!kn&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}(),In=Object.freeze({ie:en,ielt9:nn,edge:sn,webkit:on,android:an,android23:rn,androidStock:ln,opera:un,chrome:cn,gecko:dn,safari:pn,phantom:_n,opera12:mn,win:fn,ie3d:gn,webkit3d:vn,gecko3d:yn,any3d:Mn,mobile:xn,mobileWebkit:bn,mobileWebkit3d:wn,msPointer:Tn,pointer:Ln,touch:Pn,mobileOpera:En,mobileGecko:Cn,retina:Sn,canvas:An,svg:kn,vml:zn}),On=Tn?"MSPointerDown":"pointerdown",Nn=Tn?"MSPointerMove":"pointermove",Rn=Tn?"MSPointerUp":"pointerup",Bn=Tn?"MSPointerCancel":"pointercancel",Zn=["INPUT","SELECT","OPTION"],jn={},Dn=!1,Hn=0,qn=Tn?"MSPointerDown":Ln?"pointerdown":"touchstart",Fn=Tn?"MSPointerUp":Ln?"pointerup":"touchend",Gn="_bigemap_",Un="_bigemap_events",Wn=fn&&cn?2*window.devicePixelRatio:dn?window.devicePixelRatio:1,Vn={},Qn=Object.freeze({on:Y,off:$,stopPropagation:et,disableScrollPropagation:nt,disableClickPropagation:st,preventDefault:ot,stop:at,getMousePosition:rt,getWheelDelta:ht,fakeStop:lt,skipped:ut,isExternalTarget:ct,addListener:Y,removeListener:$}),Kn=St(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),Jn=St(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Xn="webkitTransition"===Jn||"OTransition"===Jn?Jn+"End":"transitionend";if("onselectstart"in document)Ke=function(){Y(window,"selectstart",ot)},Je=function(){$(window,"selectstart",ot)};else{var Yn=St(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Ke=function(){if(Yn){var t=document.documentElement.style;Xe=t[Yn],t[Yn]="none"}},Je=function(){Yn&&(document.documentElement.style[Yn]=Xe,Xe=void 0)}}var $n,ts,is=Object.freeze({TRANSFORM:Kn,TRANSITION:Jn,TRANSITION_END:Xn,get:pt,getStyle:_t,create:mt,remove:ft,empty:gt,toFront:vt,toBack:yt,toFrontAt:Mt,toBackAt:xt,hasClass:bt,addClass:wt,removeClass:Tt,setClass:Lt,getClass:Pt,setOpacity:Et,testProp:St,setTransform:At,setPosition:kt,getPosition:zt,get disableTextSelection(){return Ke},get enableTextSelection(){return Je},disableImageDrag:It,enableImageDrag:Ot,preventOutline:Nt,restoreOutline:Rt}),es={HTTP_URL:"http://localhost:3001/v2",HTTPS_URL:"https://localhost:3001/v2",FORCE_HTTPS:!1,REQUIRE_ACCESS_TOKEN:!0},ns=Dt(function(t){t.exports=function(t,i,e){function n(t){return t>=200&&t<300||304===t}function s(){void 0===r.status||n(r.status)?i.call(r,null,r):i.call(r,r,null)}var o=!1;if(void 0===window.XMLHttpRequest)return i(Error("Browser not supported"));if(void 0===e){var a=t.match(/^\s*https?:\/\/[^\/]*/);e=a&&a[0]!==location.protocol+"//"+location.hostname+(location.port?":"+location.port:"")}var r=new window.XMLHttpRequest;if(e&&!("withCredentials"in r)){r=new window.XDomainRequest;var h=i;i=function(){if(o)h.apply(this,arguments);else{var t=this,i=arguments;setTimeout(function(){h.apply(t,i)},0)}}}return"onload"in r?r.onload=s:r.onreadystatechange=function(){4===r.readyState&&s()},r.onerror=function(t){i.call(this,t||!0,null),i=function(){}},r.onprogress=function(){},r.ontimeout=function(t){i.call(this,t,null),i=function(){}},r.onabort=function(t){i.call(this,t,null),i=function(){}},r.open("GET",t,!0),r.send(null),o=!0,r}}),ss=/^(https?:)?(?=\/\/(.|api)\.tiles\.mapbox\.com\/)/,os=Object.freeze({_loadTileJSON:function(t){"string"==typeof t?qt(function(i){if(i)return this.fire("error",{error:i});Ht(t=Zt(t,this.options),e(function(i,e){i?(y("could not load TileJSON at "+t),this.fire("error",{error:i})):e&&(this._setTileJSON(e),this.fire("ready"))},this))}.bind(this)):t&&"object"==typeof t&&this._setTileJSON(t)}}),as=Ge.extend({run:function(t,i,e,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=zt(t),this._offset=i.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=m(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,e=1e3*this._duration;i<e?this._runFrame(this._easeOut(i/e),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){var e=this._startPos.add(this._offset.multiplyBy(t));i&&e._round(),kt(this._el,e),this.fire("step")},_complete:function(){f(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),rs=Dt(function(t){var i=function(){function t(t){var i=(""+t).match(d);return i?new r(h(i[1]),h(i[2]),h(i[3]),h(i[4]),h(i[5]),h(i[6]),h(i[7])):null}function i(t){return"string"==typeof t?encodeURIComponent(t):null}function e(t,i){return"string"==typeof t?encodeURI(t).replace(i,n):null}function n(t){var i=t.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(i>>4&15)+"0123456789ABCDEF".charAt(15&i)}function s(t){return t.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/")}function o(t){if(null===t)return null;for(var i,e=s(t),n=u;(i=e.replace(n,"$1"))!=e;e=i);return e}function a(t,i){var e=t.clone(),n=i.hasScheme();n?e.setRawScheme(i.getRawScheme()):n=i.hasCredentials(),n?e.setRawCredentials(i.getRawCredentials()):n=i.hasDomain(),n?e.setRawDomain(i.getRawDomain()):n=i.hasPort();var s=i.getRawPath(),a=o(s);if(n)e.setPort(i.getPort()),a=a&&a.replace(c,"");else if(n=!!s){if(47!==a.charCodeAt(0)){var r=o(e.getRawPath()||"").replace(c,""),h=r.lastIndexOf("/")+1;a=o((h?r.substring(0,h):"")+o(s)).replace(c,"")}}else(a=a&&a.replace(c,""))!==s&&e.setRawPath(a);return n?e.setRawPath(a):n=i.hasQuery(),n?e.setRawQuery(i.getRawQuery()):n=i.hasFragment(),n&&e.setRawFragment(i.getRawFragment()),e}function r(t,i,e,n,s,o,a){this.scheme_=t,this.credentials_=i,this.domain_=e,this.port_=n,this.path_=s,this.query_=o,this.fragment_=a,this.paramCache_=null}function h(t){return"string"==typeof t&&t.length>0?t:null}var l=new RegExp("(/|^)(?:[^./][^/]*|\\.{2,}(?:[^./][^/]*)|\\.{3,}[^/]*)/\\.\\.(?:/|$)"),u=new RegExp(l),c=/^(?:\.\.\/)*(?:\.\.$)?/;r.prototype.toString=function(){var t=[];return null!==this.scheme_&&t.push(this.scheme_,":"),null!==this.domain_&&(t.push("//"),null!==this.credentials_&&t.push(this.credentials_,"@"),t.push(this.domain_),null!==this.port_&&t.push(":",this.port_.toString())),null!==this.path_&&t.push(this.path_),null!==this.query_&&t.push("?",this.query_),null!==this.fragment_&&t.push("#",this.fragment_),t.join("")},r.prototype.clone=function(){return new r(this.scheme_,this.credentials_,this.domain_,this.port_,this.path_,this.query_,this.fragment_)},r.prototype.getScheme=function(){return this.scheme_&&decodeURIComponent(this.scheme_).toLowerCase()},r.prototype.getRawScheme=function(){return this.scheme_},r.prototype.setScheme=function(t){return this.scheme_=e(t,p),this},r.prototype.setRawScheme=function(t){return this.scheme_=t||null,this},r.prototype.hasScheme=function(){return null!==this.scheme_},r.prototype.getCredentials=function(){return this.credentials_&&decodeURIComponent(this.credentials_)},r.prototype.getRawCredentials=function(){return this.credentials_},r.prototype.setCredentials=function(t){return this.credentials_=e(t,p),this},r.prototype.setRawCredentials=function(t){return this.credentials_=t||null,this},r.prototype.hasCredentials=function(){return null!==this.credentials_},r.prototype.getDomain=function(){return this.domain_&&decodeURIComponent(this.domain_)},r.prototype.getRawDomain=function(){return this.domain_},r.prototype.setDomain=function(t){return this.setRawDomain(t&&encodeURIComponent(t))},r.prototype.setRawDomain=function(t){return this.domain_=t||null,this.setRawPath(this.path_)},r.prototype.hasDomain=function(){return null!==this.domain_},r.prototype.getPort=function(){return this.port_&&decodeURIComponent(this.port_)},r.prototype.setPort=function(t){if(t){if((t=Number(t))!==(65535&t))throw new Error("Bad port number "+t);this.port_=""+t}else this.port_=null;return this},r.prototype.hasPort=function(){return null!==this.port_},r.prototype.getPath=function(){return this.path_&&decodeURIComponent(this.path_)},r.prototype.getRawPath=function(){return this.path_},r.prototype.setPath=function(t){return this.setRawPath(e(t,_))},r.prototype.setRawPath=function(t){return t?(t=String(t),this.path_=!this.domain_||/^\//.test(t)?t:"/"+t):this.path_=null,this},r.prototype.hasPath=function(){return null!==this.path_},r.prototype.getQuery=function(){return this.query_&&decodeURIComponent(this.query_).replace(/\+/g," ")},r.prototype.getRawQuery=function(){return this.query_},r.prototype.setQuery=function(t){return this.paramCache_=null,this.query_=i(t),this},r.prototype.setRawQuery=function(t){return this.paramCache_=null,this.query_=t||null,this},r.prototype.hasQuery=function(){return null!==this.query_},r.prototype.setAllParameters=function(t){if("object"==typeof t&&!(t instanceof Array)&&(t instanceof Object||"[object Array]"!==Object.prototype.toString.call(t))){var i=[],e=-1;for(var n in t)"string"==typeof(r=t[n])&&(i[++e]=n,i[++e]=r);t=i}this.paramCache_=null;for(var s=[],o="",a=0;a<t.length;){var n=t[a++],r=t[a++];s.push(o,encodeURIComponent(n.toString())),o="&",r&&s.push("=",encodeURIComponent(r.toString()))}return this.query_=s.join(""),this},r.prototype.checkParameterCache_=function(){if(!this.paramCache_){var t=this.query_;if(t){for(var i=t.split(/[&\?]/),e=[],n=-1,s=0;s<i.length;++s){var o=i[s].match(/^([^=]*)(?:=(.*))?$/);e[++n]=decodeURIComponent(o[1]).replace(/\+/g," "),e[++n]=decodeURIComponent(o[2]||"").replace(/\+/g," ")}this.paramCache_=e}else this.paramCache_=[]}},r.prototype.setParameterValues=function(t,i){"string"==typeof i&&(i=[i]),this.checkParameterCache_();for(var e=0,n=this.paramCache_,s=[],o=0;o<n.length;o+=2)t===n[o]?e<i.length&&s.push(t,i[e++]):s.push(n[o],n[o+1]);for(;e<i.length;)s.push(t,i[e++]);return this.setAllParameters(s),this},r.prototype.removeParameter=function(t){return this.setParameterValues(t,[])},r.prototype.getAllParameters=function(){return this.checkParameterCache_(),this.paramCache_.slice(0,this.paramCache_.length)},r.prototype.getParameterValues=function(t){this.checkParameterCache_();for(var i=[],e=0;e<this.paramCache_.length;e+=2)t===this.paramCache_[e]&&i.push(this.paramCache_[e+1]);return i},r.prototype.getParameterMap=function(t){this.checkParameterCache_();for(var i={},e=0;e<this.paramCache_.length;e+=2){var n=this.paramCache_[e++],s=this.paramCache_[e++];n in i?i[n].push(s):i[n]=[s]}return i},r.prototype.getParameterValue=function(t){this.checkParameterCache_();for(var i=0;i<this.paramCache_.length;i+=2)if(t===this.paramCache_[i])return this.paramCache_[i+1];return null},r.prototype.getFragment=function(){return this.fragment_&&decodeURIComponent(this.fragment_)},r.prototype.getRawFragment=function(){return this.fragment_},r.prototype.setFragment=function(t){return this.fragment_=t?encodeURIComponent(t):null,this},r.prototype.setRawFragment=function(t){return this.fragment_=t||null,this},r.prototype.hasFragment=function(){return null!==this.fragment_};var d=new RegExp("^(?:([^:/?#]+):)?(?://(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),p=/[#\/\?@]/g,_=/[\#\?]/g;return r.parse=t,r.create=function(t,s,o,a,h,l,u){var c=new r(e(t,p),e(s,p),i(o),a>0?a.toString():null,e(h,_),null,i(u));return l&&("string"==typeof l?c.setRawQuery(l.replace(/[^?&=0-9A-Za-z_\-~.%]/g,n)):c.setAllParameters(l)),c},r.resolve=a,r.collapse_dots=o,r.utils={mimeTypeOf:function(i){var e=t(i);return/\.html$/.test(e.getPath())?"text/html":"application/javascript"},resolve:function(i,e){return i?a(t(i),t(e)).toString():""+e}},r}(),e={};if(e.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10,MEDIA_QUERY:13},e.atype=e.atype,e.ATTRIBS={"*::class":9,"*::dir":0,"*::draggable":0,"*::hidden":0,"*::id":4,"*::inert":0,"*::itemprop":0,"*::itemref":6,"*::itemscope":0,"*::lang":0,"*::onblur":2,"*::onchange":2,"*::onclick":2,"*::ondblclick":2,"*::onfocus":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::onreset":2,"*::onscroll":2,"*::onselect":2,"*::onsubmit":2,"*::onunload":2,"*::spellcheck":0,"*::style":3,"*::title":0,"*::translate":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::shape":0,"a::tabindex":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"audio::controls":0,"audio::loop":0,"audio::mediagroup":5,"audio::muted":0,"audio::preload":0,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"command::checked":0,"command::command":5,"command::disabled":0,"command::icon":1,"command::label":0,"command::radiogroup":0,"command::type":0,"data::value":0,"del::cite":1,"del::datetime":0,"details::open":0,"dir::compact":0,"div::align":0,"dl::compact":0,"fieldset::disabled":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::novalidate":0,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,"input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::inputmode":0,"input::ismap":0,"input::list":5,"input::max":0,"input::maxlength":0,"input::min":0,"input::multiple":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::placeholder":0,"input::readonly":0,"input::required":0,"input::size":0,"input::src":1,"input::step":0,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"menu::label":0,"menu::type":0,"meter::high":0,"meter::low":0,"meter::max":0,"meter::min":0,"meter::value":0,"ol::compact":0,"ol::reversed":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"output::for":6,"output::name":8,"p::align":0,"pre::width":0,"progress::max":0,"progress::min":0,"progress::value":0,"q::cite":1,"select::autocomplete":0,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::required":0,"select::size":0,"select::tabindex":0,"source::type":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::autocomplete":0,"textarea::cols":0,"textarea::disabled":0,"textarea::inputmode":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::placeholder":0,"textarea::readonly":0,"textarea::required":0,"textarea::rows":0,"textarea::tabindex":0,"textarea::wrap":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"track::default":0,"track::kind":0,"track::label":0,"track::srclang":0,"ul::compact":0,"ul::type":0,"video::controls":0,"video::height":0,"video::loop":0,"video::mediagroup":5,"video::muted":0,"video::poster":1,"video::preload":0,"video::width":0},e.ATTRIBS=e.ATTRIBS,e.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128,VIRTUALIZED:256},e.eflags=e.eflags,e.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:272,area:2,article:0,aside:0,audio:0,b:0,base:274,basefont:274,bdi:0,bdo:0,big:0,blockquote:0,body:305,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,command:2,data:0,datalist:0,dd:1,del:0,details:0,dfn:0,dialog:272,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,figcaption:0,figure:0,font:0,footer:0,form:0,frame:274,frameset:272,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:305,header:0,hgroup:0,hr:2,html:305,i:0,iframe:16,img:2,input:2,ins:0,isindex:274,kbd:0,keygen:274,label:0,legend:0,li:1,link:274,map:0,mark:0,menu:0,meta:274,meter:0,nav:0,nobr:0,noembed:276,noframes:276,noscript:276,object:272,ol:0,optgroup:0,option:1,output:0,p:1,param:274,pre:0,progress:0,q:0,s:0,samp:0,script:84,section:0,select:0,small:0,source:2,span:0,strike:0,strong:0,style:148,sub:0,summary:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,time:0,title:280,tr:1,track:2,tt:0,u:0,ul:0,var:0,video:0,wbr:2},e.ELEMENTS=e.ELEMENTS,e.ELEMENT_DOM_INTERFACES={a:"HTMLAnchorElement",abbr:"HTMLElement",acronym:"HTMLElement",address:"HTMLElement",applet:"HTMLAppletElement",area:"HTMLAreaElement",article:"HTMLElement",aside:"HTMLElement",audio:"HTMLAudioElement",b:"HTMLElement",base:"HTMLBaseElement",basefont:"HTMLBaseFontElement",bdi:"HTMLElement",bdo:"HTMLElement",big:"HTMLElement",blockquote:"HTMLQuoteElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",center:"HTMLElement",cite:"HTMLElement",code:"HTMLElement",col:"HTMLTableColElement",colgroup:"HTMLTableColElement",command:"HTMLCommandElement",data:"HTMLElement",datalist:"HTMLDataListElement",dd:"HTMLElement",del:"HTMLModElement",details:"HTMLDetailsElement",dfn:"HTMLElement",dialog:"HTMLDialogElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",dt:"HTMLElement",em:"HTMLElement",fieldset:"HTMLFieldSetElement",figcaption:"HTMLElement",figure:"HTMLElement",font:"HTMLFontElement",footer:"HTMLElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h3:"HTMLHeadingElement",h4:"HTMLHeadingElement",h5:"HTMLHeadingElement",h6:"HTMLHeadingElement",head:"HTMLHeadElement",header:"HTMLElement",hgroup:"HTMLElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",i:"HTMLElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",ins:"HTMLModElement",isindex:"HTMLUnknownElement",kbd:"HTMLElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",nobr:"HTMLElement",noembed:"HTMLElement",noframes:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement",var:"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"},e.ELEMENT_DOM_INTERFACES=e.ELEMENT_DOM_INTERFACES,e.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2},e.ueffects=e.ueffects,e.URIEFFECTS={"a::href":2,"area::href":2,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1},e.URIEFFECTS=e.URIEFFECTS,e.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0},e.ltypes=e.ltypes,e.LOADERTYPES={"a::href":2,"area::href":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1},e.LOADERTYPES=e.LOADERTYPES,"i"!=="I".toLowerCase())throw"I/i problem";var n=function(t){function e(t){if(A.hasOwnProperty(t))return A[t];var i=t.match(k);if(i)return String.fromCharCode(parseInt(i[1],10));if(i=t.match(z))return String.fromCharCode(parseInt(i[1],16));if(O&&I.test(t)){O.innerHTML="&"+t+";";var e=O.textContent;return A[t]=e,e}return"&"+t+";"}function n(t,i){return e(i)}function s(t){return t.replace(N,"")}function o(t){return t.replace(R,n)}function a(t){return(""+t).replace(Z,"&amp;").replace(D,"&lt;").replace(H,"&gt;").replace(q,"&#34;")}function r(t){return t.replace(j,"&amp;$1").replace(D,"&lt;").replace(H,"&gt;")}function h(t){var i={cdata:t.cdata||t.cdata,comment:t.comment||t.comment,endDoc:t.endDoc||t.endDoc,endTag:t.endTag||t.endTag,pcdata:t.pcdata||t.pcdata,rcdata:t.rcdata||t.rcdata,startDoc:t.startDoc||t.startDoc,startTag:t.startTag||t.startTag};return function(t,e){return l(t,i,e)}}function l(t,i,e){c(i,d(t),0,{noMoreGT:!1,noMoreEndComments:!1},e)}function u(t,i,e,n,s){return function(){c(t,i,e,n,s)}}function c(i,e,n,s,o){try{i.startDoc&&0==n&&i.startDoc(o);for(var a,r,h,l=n,c=e.length;l<c;){var d=e[l++],f=e[l];switch(d){case"&":B.test(f)?(i.pcdata&&i.pcdata("&"+f,o,W,u(i,e,l,s,o)),l++):i.pcdata&&i.pcdata("&amp;",o,W,u(i,e,l,s,o));break;case"</":(a=/^([-\w:]+)[^\'\"]*/.exec(f))?a[0].length===f.length&&">"===e[l+1]?(l+=2,h=a[1].toLowerCase(),i.endTag&&i.endTag(h,o,W,u(i,e,l,s,o))):l=p(e,l,i,o,W,s):i.pcdata&&i.pcdata("&lt;/",o,W,u(i,e,l,s,o));break;case"<":if(a=/^([-\w:]+)\s*\/?/.exec(f))if(a[0].length===f.length&&">"===e[l+1]){l+=2,h=a[1].toLowerCase(),i.startTag&&i.startTag(h,[],o,W,u(i,e,l,s,o));var g=t.ELEMENTS[h];g&U&&(l=m(e,{name:h,next:l,eflags:g},i,o,W,s))}else l=_(e,l,i,o,W,s);else i.pcdata&&i.pcdata("&lt;",o,W,u(i,e,l,s,o));break;case"\x3c!--":if(!s.noMoreEndComments){for(r=l+1;r<c&&(">"!==e[r]||!/--$/.test(e[r-1]));r++);if(r<c){if(i.comment){var v=e.slice(l,r).join("");i.comment(v.substr(0,v.length-2),o,W,u(i,e,r+1,s,o))}l=r+1}else s.noMoreEndComments=!0}s.noMoreEndComments&&i.pcdata&&i.pcdata("&lt;!--",o,W,u(i,e,l,s,o));break;case"<!":if(/^\w/.test(f)){if(!s.noMoreGT){for(r=l+1;r<c&&">"!==e[r];r++);r<c?l=r+1:s.noMoreGT=!0}s.noMoreGT&&i.pcdata&&i.pcdata("&lt;!",o,W,u(i,e,l,s,o))}else i.pcdata&&i.pcdata("&lt;!",o,W,u(i,e,l,s,o));break;case"<?":if(!s.noMoreGT){for(r=l+1;r<c&&">"!==e[r];r++);r<c?l=r+1:s.noMoreGT=!0}s.noMoreGT&&i.pcdata&&i.pcdata("&lt;?",o,W,u(i,e,l,s,o));break;case">":i.pcdata&&i.pcdata("&gt;",o,W,u(i,e,l,s,o));break;case"":break;default:i.pcdata&&i.pcdata(d,o,W,u(i,e,l,s,o))}}i.endDoc&&i.endDoc(o)}catch(t){if(t!==W)throw t}}function d(t){var i=/(<\/|<\!--|<[!?]|[&<>])/g;if(t+="",G)return t.split(i);for(var e,n=[],s=0;null!==(e=i.exec(t));)n.push(t.substring(s,e.index)),n.push(e[0]),s=e.index+e[0].length;return n.push(t.substring(s)),n}function p(t,i,e,n,s,o){var a=f(t,i);return a?(e.endTag&&e.endTag(a.name,n,s,u(e,t,i,o,n)),a.next):t.length}function _(t,i,e,n,s,o){var a=f(t,i);return a?(e.startTag&&e.startTag(a.name,a.attrs,n,s,u(e,t,a.next,o,n)),a.eflags&U?m(t,a,e,n,s,o):a.next):t.length}function m(i,e,n,s,o,a){var h=i.length;V.hasOwnProperty(e.name)||(V[e.name]=new RegExp("^"+e.name+"(?:[\\s\\/]|$)","i"));for(var l=V[e.name],c=e.next,d=e.next+1;d<h&&("</"!==i[d-1]||!l.test(i[d]));d++);d<h&&(d-=1);var p=i.slice(c,d).join("");if(e.eflags&t.eflags.CDATA)n.cdata&&n.cdata(p,s,o,u(n,i,d,a,s));else{if(!(e.eflags&t.eflags.RCDATA))throw new Error("bug");n.rcdata&&n.rcdata(r(p),s,o,u(n,i,d,a,s))}return d}function f(i,e){var n=/^([-\w:]+)/.exec(i[e]),s={};s.name=n[1].toLowerCase(),s.eflags=t.ELEMENTS[s.name];for(var o=i[e].substr(n[0].length),a=e+1,r=i.length;a<r&&">"!==i[a];a++)o+=i[a];if(!(r<=a)){for(var h=[];""!==o;)if(n=F.exec(o)){if(n[4]&&!n[5]||n[6]&&!n[7]){for(var l=n[4]||n[6],u=!1,c=[o,i[a++]];a<r;a++){if(u){if(">"===i[a])break}else 0<=i[a].indexOf(l)&&(u=!0);c.push(i[a])}if(r<=a)break;o=c.join("");continue}var d=n[1].toLowerCase(),p=n[2]?g(n[3]):"";h.push(d,p),o=o.substr(n[0].length)}else o=o.replace(/^[\s\S][^a-z\s]*/,"");return s.attrs=h,s.next=a+1,s}}function g(t){var i=t.charCodeAt(0);return 34!==i&&39!==i||(t=t.substr(1,t.length-2)),o(s(t))}function v(i){var e,n,s=function(t,i){n||i.push(t)};return h({startDoc:function(t){e=[],n=!1},startTag:function(s,o,r){if(!n&&t.ELEMENTS.hasOwnProperty(s)){var h=t.ELEMENTS[s];if(!(h&t.eflags.FOLDABLE)){var l=i(s,o);if(l){if("object"!=typeof l)throw new Error("tagPolicy did not return object (old API?)");if(!("attribs"in l))throw new Error("tagPolicy gave no attribs");o=l.attribs;var u,c;if("tagName"in l?(c=l.tagName,u=t.ELEMENTS[c]):(c=s,u=h),h&t.eflags.OPTIONAL_ENDTAG){var d=e[e.length-1];!d||d.orig!==s||d.rep===c&&s===c||r.push("</",d.rep,">")}h&t.eflags.EMPTY||e.push({orig:s,rep:c}),r.push("<",c);for(var p=0,_=o.length;p<_;p+=2){var m=o[p],f=o[p+1];null!==f&&void 0!==f&&r.push(" ",m,'="',a(f),'"')}r.push(">"),h&t.eflags.EMPTY&&!(u&t.eflags.EMPTY)&&r.push("</",c,">")}else n=!(h&t.eflags.EMPTY)}}},endTag:function(i,s){if(n)n=!1;else if(t.ELEMENTS.hasOwnProperty(i)){var o=t.ELEMENTS[i];if(!(o&(t.eflags.EMPTY|t.eflags.FOLDABLE))){var a;if(o&t.eflags.OPTIONAL_ENDTAG)for(a=e.length;--a>=0;){var r=e[a].orig;if(r===i)break;if(!(t.ELEMENTS[r]&t.eflags.OPTIONAL_ENDTAG))return}else for(a=e.length;--a>=0&&e[a].orig!==i;);if(a<0)return;for(var h=e.length;--h>a;){var l=e[h].rep;t.ELEMENTS[l]&t.eflags.OPTIONAL_ENDTAG||s.push("</",l,">")}a<e.length&&(i=e[a].rep),e.length=a,s.push("</",i,">")}}},pcdata:s,rcdata:s,cdata:s,endDoc:function(t){for(;e.length;e.length--)t.push("</",e[e.length-1].rep,">")}})}function y(t,e,n,s,o){if(!o)return null;try{var a=i.parse(""+t);if(a&&(!a.hasScheme()||Q.test(a.getScheme()))){var r=o(a,e,n,s);return r?r.toString():null}}catch(t){return null}return null}function M(t,i,e,n,s){if(e||t(i+" removed",{change:"removed",tagName:i}),n!==s){var o="changed";n&&!s?o="removed":!n&&s&&(o="added"),t(i+"."+e+" "+o,{change:o,tagName:i,attribName:e,oldValue:n,newValue:s})}}function x(t,i,e){var n;return n=i+"::"+e,t.hasOwnProperty(n)?t[n]:(n="*::"+e,t.hasOwnProperty(n)?t[n]:void 0)}function b(i,e){return x(t.LOADERTYPES,i,e)}function w(i,e){return x(t.URIEFFECTS,i,e)}function T(i,e,n,s,o){for(var a=0;a<e.length;a+=2){var r,h=e[a],l=e[a+1],u=l,c=null;if(r=i+"::"+h,(t.ATTRIBS.hasOwnProperty(r)||(r="*::"+h,t.ATTRIBS.hasOwnProperty(r)))&&(c=t.ATTRIBS[r]),null!==c)switch(c){case t.atype.NONE:break;case t.atype.SCRIPT:l=null,o&&M(o,i,h,u,l);break;case t.atype.STYLE:if(void 0===E){l=null,o&&M(o,i,h,u,l);break}var d=[];E(l,{declaration:function(i,e){var s=i.toLowerCase(),o=S[s];o&&(C(s,o,e,n?function(i){return y(i,t.ueffects.SAME_DOCUMENT,t.ltypes.SANDBOXED,{TYPE:"CSS",CSS_PROP:s},n)}:null),d.push(i+": "+e.join(" ")))}}),l=d.length>0?d.join(" ; "):null,o&&M(o,i,h,u,l);break;case t.atype.ID:case t.atype.IDREF:case t.atype.IDREFS:case t.atype.GLOBAL_NAME:case t.atype.LOCAL_NAME:case t.atype.CLASSES:l=s?s(l):l,o&&M(o,i,h,u,l);break;case t.atype.URI:l=y(l,w(i,h),b(i,h),{TYPE:"MARKUP",XML_ATTR:h,XML_TAG:i},n),o&&M(o,i,h,u,l);break;case t.atype.URI_FRAGMENT:l&&"#"===l.charAt(0)?(l=l.substring(1),null!==(l=s?s(l):l)&&void 0!==l&&(l="#"+l)):l=null,o&&M(o,i,h,u,l);break;default:l=null,o&&M(o,i,h,u,l)}else l=null,o&&M(o,i,h,u,l);e[a+1]=l}return e}function L(i,e,n){return function(s,o){if(!(t.ELEMENTS[s]&t.eflags.UNSAFE))return{attribs:T(s,o,i,e,n)};n&&M(n,s,void 0,void 0,void 0)}}function P(t,i){var e=[];return v(i)(t,e),e.join("")}var E,C,S;"undefined"!=typeof window&&(E=window.parseCssDeclarations,C=window.sanitizeCssProperty,S=window.cssSchema);var A={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},k=/^#(\d+)$/,z=/^#x([0-9A-Fa-f]+)$/,I=/^[A-Za-z][A-za-z0-9]+$/,O="undefined"!=typeof window&&window.document?window.document.createElement("textarea"):null,N=/\0/g,R=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,B=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,Z=/&/g,j=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,D=/[<]/g,H=/>/g,q=/\"/g,F=new RegExp("^\\s*([-.:\\w]+)(?:\\s*(=)\\s*((\")[^\"]*(\"|$)|(')[^']*('|$)|(?=[a-z][-\\w]*\\s*=)|[^\"'\\s]*))?","i"),G=3==="a,b".split(/(,)/).length,U=t.eflags.CDATA|t.eflags.RCDATA,W={},V={},Q=/^(?:https?|mailto|data)$/i,K={};return K.escapeAttrib=K.escapeAttrib=a,K.makeHtmlSanitizer=K.makeHtmlSanitizer=v,K.makeSaxParser=K.makeSaxParser=h,K.makeTagPolicy=K.makeTagPolicy=L,K.normalizeRCData=K.normalizeRCData=r,K.sanitize=K.sanitize=function(t,i,e,n){return P(t,L(i,e,n))},K.sanitizeAttribs=K.sanitizeAttribs=T,K.sanitizeWithPolicy=K.sanitizeWithPolicy=P,K.unescapeEntities=K.unescapeEntities=o,K}(e).sanitize;e.ATTRIBS["*::style"]=0,e.ELEMENTS.style=0,e.ATTRIBS["a::target"]=0,e.ELEMENTS.video=0,e.ATTRIBS["video::src"]=0,e.ATTRIBS["video::poster"]=0,e.ATTRIBS["video::controls"]=0,e.ELEMENTS.audio=0,e.ATTRIBS["audio::src"]=0,e.ATTRIBS["video::autoplay"]=0,e.ATTRIBS["video::controls"]=0,t.exports=n}),hs=function(t){return t?rs(t,Ft,Gt):""},ls=Ge.extend({includes:[os],options:{crs:Ye,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,combineMode:"combine",tileLayer:{},featureLayer:{},legendControl:{},sanitizer:hs},_tilejson:{},initialize:function(t,i,n){n=u(this,n),this._initContainer(t),this._initLayout(),this._onResize=e(this._onResize,this),this._initEvents(),n.maxBounds&&this.setMaxBounds(n.maxBounds),void 0!==n.zoom&&(this._zoom=this._limitZoom(n.zoom)),n.center&&void 0!==n.zoom&&this.setView(N(n.center),n.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._zoomAnimated=Jn&&Mn&&!En&&this.options.zoomAnimation,this.callInitHooks(),this._zoomAnimated&&(this._createAnimProxy(),Y(this._proxy,Xn,this._catchTransitionEnd,this)),this._addLayers(this.options.layers),this._loadTileJSON(i),this.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(N(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),this)},setZoom:function(t,i){return this._loaded?this.setView(this.getCenter(),t,{zoom:i}):(this._zoom=t,this)},zoomIn:function(t,i){return t=t||(Mn?this.options.zoomDelta:1),this.setZoom(this._zoom+t,i)},zoomOut:function(t,i){return t=t||(Mn?this.options.zoomDelta:1),this.setZoom(this._zoom-t,i)},setZoomAround:function(t,i,e){var n=this.getZoomScale(i),s=this.getSize().divideBy(2),o=(t instanceof E?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/n),a=this.containerPointToLatLng(s.add(o));return this.setView(a,i,{zoom:e})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():z(t);var e=C(i.paddingTopLeft||i.padding||[0,0]),n=C(i.paddingBottomRight||i.padding||[0,0]),s=this.getBoundsZoom(t,!1,e.add(n));if((s="number"==typeof i.maxZoom?Math.min(i.maxZoom,s):s)===1/0)return{center:t.getCenter(),zoom:s};var o=n.subtract(e).divideBy(2),a=this.project(t.getSouthWest(),s),r=this.project(t.getNorthEast(),s);return{center:this.unproject(a.add(r).divideBy(2).add(o),s),zoom:s}},fitBounds:function(t,i){if(!(t=z(t)).isValid())throw new Error("Bounds are not valid.");var e=this._getBoundsCenterZoom(t,i);return this.setView(e.center,e.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){if(t=C(t).round(),i=i||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==i.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new as,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate){wt(this._mapPane,"bigemap-pan-anim");var e=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,e,i.duration||.25,i.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,i,e){function n(t){var i=(g*g-f*f+(t?-1:1)*M*M*v*v)/(2*(t?g:f)*M*v),e=Math.sqrt(i*i+1)-i;return e<1e-9?-18:Math.log(e)}function s(t){return(Math.exp(t)-Math.exp(-t))/2}function o(t){return(Math.exp(t)+Math.exp(-t))/2}function a(t){return s(t)/o(t)}function r(t){return f*(o(x)/o(x+y*t))}function h(t){return f*(o(x)*a(x+y*t)-s(x))/M}function l(t){return 1-Math.pow(1-t,1.5)}function u(){var e=(Date.now()-b)/T,n=l(e)*w;e<=1?(this._flyToFrame=m(u,this),this._move(this.unproject(c.add(d.subtract(c).multiplyBy(h(n)/v)),_),this.getScaleZoom(f/r(n),_),{flyTo:!0})):this._move(t,i)._moveEnd(!0)}if(!1===(e=e||{}).animate||!Mn)return this.setView(t,i,e);this._stop();var c=this.project(this.getCenter()),d=this.project(t),p=this.getSize(),_=this._zoom;t=N(t),i=void 0===i?_:i;var f=Math.max(p.x,p.y),g=f*this.getZoomScale(_,i),v=d.distanceTo(c)||1,y=1.42,M=y*y,x=n(0),b=Date.now(),w=(n(1)-x)/y,T=e.duration?1e3*e.duration:1e3*w*.8;return this._moveStart(!0),u.call(this),this},flyToBounds:function(t,i){var e=this._getBoundsCenterZoom(t,i);return this.flyTo(e.center,e.zoom,i)},setMaxBounds:function(t){return(t=z(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var i=this.options.minZoom;return this.options.minZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var i=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,z(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),o=n.divideBy(2).round(),a=s.divideBy(2).round(),r=o.subtract(a);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(e(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:s})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=e(this._handleGeolocationResponse,this),s=e(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,s,t):navigator.geolocation.getCurrentPosition(n,s,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var i=t.code,e=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+e+"."})},_handleGeolocationResponse:function(t){var i=new O(t.coords.latitude,t.coords.longitude),e=i.toBounds(t.coords.accuracy),n=this._locateOptions;if(n.setView){var s=this.getBoundsZoom(e);this.setView(i,n.maxZoom?Math.min(s,n.maxZoom):s)}var o={latlng:i,bounds:e,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(o[a]=t.coords[a]);this.fire("locationfound",o)},addHandler:function(t,i){if(!i)return this;var e=this[t]=new i(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._bigemap_id)throw new Error("Map container is being reused by another instance");try{delete this._container._bigemap_id,delete this._containerId}catch(t){this._container._bigemap_id=void 0,this._containerId=void 0}ft(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)ft(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var e=mt("div","bigemap-pane"+(t?" bigemap-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new k(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,e){t=z(t),e=C(e||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),r=t.getSouthEast(),h=this.getSize().subtract(e),l=A(this.project(r,n),this.project(a,n)).getSize(),u=Mn?this.options.zoomSnap:1,c=h.x/l.x,d=h.y/l.y,p=i?Math.max(c,d):Math.min(c,d);return n=this.getScaleZoom(p,n),u&&(n=Math.round(n/(u/100))*(u/100),n=i?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(s,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new E(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var e=this._getTopLeftPoint(t,i);return new S(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs;i=void 0===i?this._zoom:i;var n=e.zoom(t*e.scale(i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(N(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(C(t),i)},layerPointToLatLng:function(t){var i=C(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(N(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(N(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(z(t))},distance:function(t,i){return this.options.crs.distance(N(t),N(i))},containerPointToLayerPoint:function(t){return C(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return C(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(C(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(N(t)))},mouseEventToContainerPoint:function(t){return rt(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var i=this._container=pt(t);if(!i)throw new Error("Map container not found.");if(i._bigemap_id)throw new Error("Map container is already initialized.");Y(i,"scroll",this._onScroll,this),this._containerId=n(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Mn,wt(t,"bigemap-container"+(Pn?" bigemap-touch":"")+(Sn?" bigemap-retina":"")+(nn?" bigemap-oldie":"")+(pn?" bigemap-safari":"")+(this._fadeAnimated?" bigemap-fade-anim":""));var i=_t(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),kt(this._mapPane,new E(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(wt(t.markerPane,"bigemap-zoom-hide"),wt(t.shadowPane,"bigemap-zoom-hide"))},_resetView:function(t,i){kt(this._mapPane,new E(0,0));var e=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var n=this._zoom!==i;this._moveStart(n)._move(t,i)._moveEnd(n),this.fire("viewreset"),e&&this.fire("load")},_moveStart:function(t){return t&&this.fire("zoomstart"),this.fire("movestart")},_move:function(t,i,e){void 0===i&&(i=this._zoom);var n=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return f(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){kt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[n(this._container)]=this;var i=t?$:Y;i(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),Mn&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){f(this._resizeRequest),this._resizeRequest=m(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,s=[],o="mouseout"===i||"mouseover"===i,a=t.target||t.srcElement,r=!1;a;){if((e=this._targets[n(a)])&&("click"===i||"preclick"===i)&&!t._simulated&&this._draggableMoved(e)){r=!0;break}if(e&&e.listens(i,!0)){if(o&&!ct(a,t))break;if(s.push(e),o)break}if(a===this._container)break;a=a.parentNode}return s.length||r||o||!ct(a,t)||(s=[this]),s},_handleDOMEvent:function(t){if(this._loaded&&!ut(t)){var i=t.type;"mousedown"!==i&&"keypress"!==i||Nt(t.target||t.srcElement),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var s=i({},t);s.type="preclick",this._fireDOMEvent(s,s.type,n)}if(!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,e))).length){var o=n[0];"contextmenu"===e&&o.listens(e,!0)&&ot(t);var a={originalEvent:t};if("keypress"!==t.type){var r=o.options&&"icon"in o.options;a.containerPoint=r?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=r?o.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var h=0;h<n.length;h++)if(n[h].fire(e,a,!0),a.originalEvent._stopped||!1===n[h].options.bubblingMouseEvents&&-1!==d(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,i=this._handlers.length;t<i;t++)this._handlers[t].disable()},whenReady:function(t,i){return this._loaded?t.call(i||this,{target:this}):this.on("load",t,i),this},_getMapPanePos:function(){return zt(this._mapPane)||new E(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,i){return(t&&void 0!==i?this._getNewPixelOrigin(t,i):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,i){var e=this.getSize()._divideBy(2);return this.project(t,i)._subtract(e)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return this.project(t,i)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return A([this.project(t.getSouthWest(),i)._subtract(n),this.project(t.getNorthWest(),i)._subtract(n),this.project(t.getSouthEast(),i)._subtract(n),this.project(t.getNorthEast(),i)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,e){if(!e)return t;var n=this.project(t,i),s=this.getSize().divideBy(2),o=new S(n.subtract(s),n.add(s)),a=this._getBoundsOffset(o,e,i);return a.round().equals([0,0])?t:this.unproject(n.add(a),i)},_limitOffset:function(t,i){if(!i)return t;var e=this.getPixelBounds(),n=new S(e.min.add(t),e.max.add(t));return t.add(this._getBoundsOffset(n,i))},_getBoundsOffset:function(t,i,e){var n=A(this.project(i.getNorthEast(),e),this.project(i.getSouthWest(),e)),s=n.min.subtract(t.min),o=n.max.subtract(t.max);return new E(this._rebound(s.x,-o.x),this._rebound(s.y,-o.y))},_rebound:function(t,i){return t+i>0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),n=Mn?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Tt(this._mapPane,"bigemap-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var e=this._getCenterOffset(t)._floor();return!(!0!==(i&&i.animate)&&!this.getSize().contains(e))&&(this.panBy(e,i),!0)},_createAnimProxy:function(){var t=this._proxy=mt("div","bigemap-proxy bigemap-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var i=Kn,e=this._proxy.style[i];At(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),i=this.getZoom();At(this._proxy,this.project(t,i),this.getZoomScale(i,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ft(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("bigemap-zoom-animated").length},_tryAnimatedZoom:function(t,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(s))&&(m(function(){this._moveStart(!0)._animateZoom(t,i,!0)},this),!0)},_animateZoom:function(t,i,n,s){n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,wt(this._mapPane,"bigemap-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:s}),setTimeout(e(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){this._animatingZoom&&(Tt(this._mapPane,"bigemap-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),m(function(){this._moveEnd(!0)},this))},_setTileJSON:function(t){return this._tilejson=t,this._initialize(t),this},getTileJSON:function(){return this._tilejson},_initialize:function(t){if(this.tileLayer&&(this.tileLayer._setTileJSON(t),this._updateLayer(this.tileLayer)),this.featureLayer&&!this.featureLayer.getGeoJSON()&&t.data&&t.data[0]&&this.featureLayer.loadURL(t.data[0]),this.legendControl&&t.legend&&this.legendControl.addLegend(t.legend),!this._loaded&&t.center){var i=void 0!==this.getZoom()?this.getZoom():t.center[2],e=N([t.center[1],t.center[0]]);this.setView(e,i)}this.fire("tjloaded")},_onLayerAdd:function(t){"on"in t.layer&&t.layer.on("ready",this._onLayerReady,this)},_onLayerRemove:function(t){"on"in t.layer&&t.layer.off("ready",this._onLayerReady,this)},_onLayerReady:function(t){this._updateLayer(t.target)},_updateLayer:function(t){t.options&&(this.attributionControl&&this._loaded&&t.getAttribution&&this.attributionControl.addAttribution(t.getAttribution()),n(t)in this._zoomBoundLayers||!t.options.maxZoom&&!t.options.minZoom||(this._zoomBoundLayers[n(t)]=t),this._updateZoomLevels())}}),us=L.extend({options:{position:"topright"},initialize:function(t){u(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return wt(i,"bigemap-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this},remove:function(){return this._map?(ft(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),cs=function(t){return new us(t)};ls.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,s){var o=e+t+" "+e+s;i[t+s]=mt("div",o,n)}var i=this._controlCorners={},e="bigemap-",n=this._controlContainer=mt("div",e+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ft(this._controlCorners[t]);ft(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var ds=us.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,n){return e<n?-1:n<e?1:0}},initialize:function(t,i,e){u(this,e),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in i)this._addLayer(i[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return us.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,i){return this._addLayer(t,i),this._map?this._update():this},addOverlay:function(t,i){return this._addLayer(t,i,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var i=this._getLayer(n(t));return i&&this._layers.splice(this._layers.indexOf(i),1),this._map?this._update():this},expand:function(){wt(this._container,"bigemap-control-layers-expanded"),this._form.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._form.clientHeight?(wt(this._form,"bigemap-control-layers-scrollbar"),this._form.style.height=t+"px"):Tt(this._form,"bigemap-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Tt(this._container,"bigemap-control-layers-expanded"),this},_initLayout:function(){var t="bigemap-control-layers",i=this._container=mt("div",t),e=this.options.collapsed;i.setAttribute("aria-haspopup",!0),st(i),nt(i);var n=this._form=mt("form",t+"-list");e&&(this._map.on("click",this.collapse,this),an||Y(i,{mouseenter:this.expand,mouseleave:this.collapse},this));var s=this._layersLink=mt("a",t+"-toggle",i);s.href="#",s.title="Layers",Pn?(Y(s,"click",at),Y(s,"click",this.expand,this)):Y(s,"focus",this.expand,this),e||this.expand(),this._baseLayersList=mt("div",t+"-base",n),this._separator=mt("div",t+"-separator",n),this._overlaysList=mt("div",t+"-overlays",n),i.appendChild(n)},_getLayer:function(t){for(var i=0;i<this._layers.length;i++)if(this._layers[i]&&n(this._layers[i].layer)===t)return this._layers[i]},_addLayer:function(t,i,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:n}),this.options.sortLayers&&this._layers.sort(e(function(t,i){return this.options.sortFunction(t.layer,i.layer,t.name,i.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;gt(this._baseLayersList),gt(this._overlaysList),this._layerControlInputs=[];var t,i,e,n,s=0;for(e=0;e<this._layers.length;e++)n=this._layers[e],this._addItem(n),i=i||n.overlay,t=t||!n.overlay,s+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&s>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(n(t.target)),e=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;e&&this._map.fire(e,i)},_createRadioElement:function(t,i){var e='<input type="radio" class="bigemap-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="bigemap-control-layers-selector",i.defaultChecked=s):i=this._createRadioElement("bigemap-base-layers",s),this._layerControlInputs.push(i),i.layerId=n(t.layer),Y(i,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var a=document.createElement("div");return e.appendChild(a),a.appendChild(i),a.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],s=[];this._handlingClick=!0;for(var o=e.length-1;o>=0;o--)t=e[o],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||s.push(i);for(o=0;o<s.length;o++)this._map.hasLayer(s[o])&&this._map.removeLayer(s[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,i,e=this._layerControlInputs,n=this._map.getZoom(),s=e.length-1;s>=0;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&n<i.options.minZoom||void 0!==i.options.maxZoom&&n>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),ps=us.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var i="bigemap-control-zoom",e=mt("div",i+" bigemap-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,s){var o=mt("a",e,n);return o.innerHTML=t,o.href="#",o.title=i,o.setAttribute("role","button"),o.setAttribute("aria-label",i),st(o),Y(o,"click",at),Y(o,"click",s,this),Y(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,i="bigemap-disabled";Tt(this._zoomInButton,i),Tt(this._zoomOutButton,i),(this._disabled||t._zoom===t.getMinZoom())&&wt(this._zoomOutButton,i),(this._disabled||t._zoom===t.getMaxZoom())&&wt(this._zoomInButton,i)}});ls.mergeOptions({zoomControl:!0}),ls.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new ps,this.addControl(this.zoomControl))});var _s=us.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i=mt("div","bigemap-control-scale"),e=this.options;return this._addScales(e,"bigemap-control-scale-line",i),t.on(e.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)},_addScales:function(t,i,e){t.metric&&(this._mScale=mt("div",i,e)),t.imperial&&(this._iScale=mt("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),e=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,e,i/t)},_updateImperial:function(t){var i,e,n,s=3.2808399*t;s>5280?(i=s/5280,e=this._getRoundNum(i),this._updateScale(this._iScale,e+" mi",e/i)):(n=this._getRoundNum(s),this._updateScale(this._iScale,n+" ft",n/s))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),e=t/i;return e=e>=10?10:e>=5?5:e>=3?3:e>=2?2:1,i*e}}),ms=us.extend({options:{position:"bottomright"},initialize:function(t){u(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=mt("div","bigemap-control-attribution"),st(this._container);for(var i in t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),this._container},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];e.push('<a target="_blank" href="http://bigemap.com">&copy; Bigemap</a>'),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(" | ")}}});ls.mergeOptions({attributionControl:!0}),ls.addInitHook(function(){if(this.options.attributionControl&&(new ms).addTo(this),this.attributionControl){var t=this.options.attributionControl.compact;(t||!1!==t&&this._container.offsetWidth<=640)&&wt(this.attributionControl._container,"bigemap-compact-attribution"),void 0===t&&this.on("resize",function(){this._container.offsetWidth>640?Tt(this.attributionControl._container,"bigemap-compact-attribution"):wt(this.attributionControl._container,"bigemap-compact-attribution")})}});var fs=us.extend({options:{position:"bottomleft"},initialize:function(t){u(this,t)},onAdd:function(){return this._container=mt("div","bigemap-logo"),wt(this._container,"bigemap-logo-true"),this._container}});ls.addInitHook(function(){(new fs).addTo(this)});us.Layers=ds,us.Zoom=ps,us.Scale=_s,us.Attribution=ms,us.Logo=fs,cs.layers=function(t,i,e){return new ds(t,i,e)},cs.zoom=function(t){return new ps(t)},cs.scale=function(t){return new _s(t)},cs.attribution=function(t){return new ms(t)},cs.logo=function(t){return new fs(t)};var gs,vs=L.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}}),ys={Events:Fe},Ms=Pn?"touchstart mousedown":"mousedown",xs={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},bs={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ws=Ge.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){u(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(Y(this._dragStartTarget,Ms,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ws._dragging===this&&this.finishDrag(),$(this._dragStartTarget,Ms,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!bt(this._element,"bigemap-zoom-anim")&&!(ws._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(ws._dragging=this,this._preventOutline&&Nt(this._element),It(),Ke(),this._moving)))){this.fire("down");var i=t.touches?t.touches[0]:t;this._startPoint=new E(i.clientX,i.clientY),Y(document,bs[t.type],this._onMove,this),Y(document,xs[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var i=t.touches&&1===t.touches.length?t.touches[0]:t,e=new E(i.clientX,i.clientY).subtract(this._startPoint);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(ot(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=zt(this._element).subtract(e),wt(document.body,"bigemap-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),wt(this._lastTarget,"bigemap-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,f(this._animRequest),this._lastEvent=t,this._animRequest=m(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),kt(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){Tt(document.body,"bigemap-dragging"),this._lastTarget&&(Tt(this._lastTarget,"bigemap-drag-target"),this._lastTarget=null);for(var t in bs)$(document,bs[t],this._onMove,this),$(document,xs[t],this._onUp,this);Ot(),Je(),this._moved&&this._moving&&(f(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,ws._dragging=!1}}),Ts=Object.freeze({simplify:Ut,pointToSegmentDistance:Wt,closestPointOnSegment:function(t,i,e){return ti(t,i,e)},clipSegment:Jt,_getEdgeIntersection:Xt,_getBitCode:Yt,_sqClosestPointOnSegment:ti,isFlat:ii,_flat:ei}),Ls=Object.freeze({clipPolygon:ni}),Ps=Ge.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[n(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[n(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i=t.target;if(i.hasLayer(this)){if(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents){var e=this.getEvents();i.on(e,this),this.once("remove",function(){i.off(e,this)},this)}this.onAdd(i),this.getAttribution&&i.attributionControl&&i.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),i.fire("layeradd",{layer:this})}}});ls.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=n(t);return this._layers[i]?this:(this._layers[i]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var i=n(t);return this._layers[i]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&n(t)in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){for(var i=0,e=(t=t?Be(t)?t:[t]:[]).length;i<e;i++)this.addLayer(t[i])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[n(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var i=n(t);this._zoomBoundLayers[i]&&(delete this._zoomBoundLayers[i],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,i=-1/0,e=this._getZoomSpan();for(var n in this._zoomBoundLayers){var s=this._zoomBoundLayers[n].options;t=void 0===s.minZoom?t:Math.min(t,s.minZoom),i=void 0===s.maxZoom?i:Math.max(i,s.maxZoom)}this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=t===1/0?void 0:t,e!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Es=Ps.extend({initialize:function(t){this._layers={};var i,e;if(t)for(i=0,e=t.length;i<e;i++)this.addLayer(t[i])},addLayer:function(t){var i=this.getLayerId(t);return this._layers[i]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var i=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[i]&&this._map.removeLayer(this._layers[i]),delete this._layers[i],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var i,e,n=Array.prototype.slice.call(arguments,1);for(i in this._layers)(e=this._layers[i])[t]&&e[t].apply(e,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return n(t)},bringLayerToFrontAt:function(t,i){return t.bringToFrontAt(i)},bringLayerToBackAt:function(t,i){return t.bringToBackAt(i)}}),Cs=Es.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Es.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),Es.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 k;for(var i in this._layers){var e=this._layers[i];t.extend(e.getBounds?e.getBounds():e.getLatLng())}return t}}),Ss=L.extend({initialize:function(t){u(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,i){var e=this._getIconUrl(t);if(!e){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(e,i&&"IMG"===i.tagName?i:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,i){var e=this.options,n=e[i+"Size"];"number"==typeof n&&(n=[n,n]);var s=C(n),o=C("shadow"===i&&e.shadowAnchor||e.iconAnchor||s&&s.divideBy(2,!0));t.className="bigemap-marker-"+i+" "+(e.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||document.createElement("img"),i.src=t,i},_getIconUrl:function(t){return Sn&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),As=Ss.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 As.imagePath||(As.imagePath=this._detectIconPath()),(this.options.imagePath||As.imagePath)+Ss.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=mt("div","bigemap-default-icon-path",document.body),i=_t(t,"background-image")||_t(t,"backgroundImage");return document.body.removeChild(t),i=null===i||0!==i.indexOf("url")?"":i.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),ks=vs.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ws(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),wt(t,"bigemap-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Tt(this._marker._icon,"bigemap-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var i=this._marker,e=i._map,n=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,o=BM.DomUtil.getPosition(i._icon),a=e.getPixelBounds(),r=e.getPixelOrigin(),h=A(a.min._subtract(r).add(s),a.max._subtract(r).subtract(s));if(!h.contains(o)){var l=C((Math.max(h.max.x,o.x)-h.max.x)/(a.max.x-h.max.x)-(Math.min(h.min.x,o.x)-h.min.x)/(a.min.x-h.min.x),(Math.max(h.max.y,o.y)-h.max.y)/(a.max.y-h.max.y)-(Math.min(h.min.y,o.y)-h.min.y)/(a.min.y-h.min.y)).multiplyBy(n);e.panBy(l,{animate:!1}),this._draggable._newPos._add(l),this._draggable._startPos._add(l),BM.DomUtil.setPosition(i._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=m(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(f(this._panRequest),this._panRequest=m(this._adjustPan.bind(this,t)))},_onDrag:function(t){var i=this._marker,e=i._shadow,n=zt(i._icon),s=i._map.layerPointToLatLng(n);e&&kt(e,n),i._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,i.fire("move",t).fire("drag",t)},_onDragEnd:function(t){f(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),zs=Ps.extend({options:{icon:new As,interactive:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",bubblingMouseEvents:!1},initialize:function(t,i){u(this,i),this._latlng=N(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var i=this._latlng;return this._latlng=N(t),this.update(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,i="bigemap-zoom-"+(this._zoomAnimated?"animated":"hide"),e=t.icon.createIcon(this._icon),n=!1;e!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(e.title=t.title),t.alt&&(e.alt=t.alt)),wt(e,i),t.keyboard&&(e.tabIndex="0"),this._icon=e,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var s=t.icon.createShadow(this._shadow),o=!1;s!==this._shadow&&(this._removeShadow(),o=!0),s&&(wt(s,i),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&o&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ft(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ft(this._shadow),this._shadow=null},_setPos:function(t){kt(this._icon,t),this._shadow&&kt(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 i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(i)},_initInteraction:function(){if(this.options.interactive&&(wt(this._icon,"bigemap-interactive"),this.addInteractiveTarget(this._icon),ks)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ks(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;Et(this._icon,t),this._shadow&&Et(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor||[0,0]},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor||[0,0]}}),Is=Ps.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 u(this,t),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},bringToFrontAt:function(t){return this._renderer&&this._renderer._bringToFrontAt(this,t),this},bringToBackAt:function(t){return this._renderer&&this._renderer._bringToBackAt(this,t),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(Pn?10:0)}}),Os=Is.extend({options:{fill:!0,radius:10},initialize:function(t,i){u(this,i),this._latlng=N(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=N(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},setStyle:function(t){var i=t&&t.radius||this._radius;return Is.prototype.setStyle.call(this,t),this.setRadius(i),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,i=this._radiusY||t,e=this._clickTolerance(),n=[t+e,i+e];this._pxBounds=new S(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()}}),Ns=Os.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),u(this,e),this._latlng=N(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 k(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Is.prototype.setStyle,_project:function(){var t=this._latlng.lng,i=this._latlng.lat,e=this._map,n=e.options.crs;if(n.distance===We.distance){var s=Math.PI/180,o=this._mRadius/We.R/s,a=e.project([i+o,t]),r=e.project([i-o,t]),h=a.add(r).divideBy(2),l=e.unproject(h).lat,u=Math.acos((Math.cos(o*s)-Math.sin(i*s)*Math.sin(l*s))/(Math.cos(i*s)*Math.cos(l*s)))/s;(isNaN(u)||0===u)&&(u=o/Math.cos(Math.PI/180*i)),this._point=h.subtract(e.getPixelOrigin()),this._radius=isNaN(u)?0:h.x-e.project([l,t-u]).x,this._radiusY=h.y-a.y}else{var c=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=e.latLngToLayerPoint(this._latlng),this._radius=this._point.x-e.latLngToLayerPoint(c).x}this._updateBounds()}}),Rs=Is.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,i){u(this,i),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var i,e,n=1/0,s=null,o=ti,a=0,r=this._parts.length;a<r;a++)for(var h=this._parts[a],l=1,u=h.length;l<u;l++){var c=o(t,i=h[l-1],e=h[l],!0);c<n&&(n=c,s=o(t,i,e))}return s&&(s.distance=Math.sqrt(n)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,s,o,a,r=this._rings[0],h=r.length;if(!h)return null;for(t=0,i=0;t<h-1;t++)i+=r[t].distanceTo(r[t+1])/2;if(0===i)return this._map.layerPointToLatLng(r[0]);for(t=0,n=0;t<h-1;t++)if(s=r[t],o=r[t+1],e=s.distanceTo(o),(n+=e)>i)return a=(n-i)/e,this._map.layerPointToLatLng([o.x-a*(o.x-s.x),o.y-a*(o.y-s.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=N(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new k,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return ii(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],e=ii(t),n=0,s=t.length;n<s;n++)e?(i[n]=N(t[n]),this._bounds.extend(i[n])):i[n]=this._convertLatLngs(t[n]);return i},_project:function(){var t=new S;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var i=this._clickTolerance(),e=new E(i,i);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(e),t.max._add(e),this._pxBounds=t)},_projectLatlngs:function(t,i,e){var n,s,o=t[0]instanceof O,a=t.length;if(o){for(s=[],n=0;n<a;n++)s[n]=this._map.latLngToLayerPoint(t[n]),e.extend(s[n]);i.push(s)}else for(n=0;n<a;n++)this._projectLatlngs(t[n],i,e)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var i,e,n,s,o,a,r,h=this._parts;for(i=0,n=0,s=this._rings.length;i<s;i++)for(e=0,o=(r=this._rings[i]).length;e<o-1;e++)(a=Jt(r[e],r[e+1],t,e,!0))&&(h[n]=h[n]||[],h[n].push(a[0]),a[1]===r[e+1]&&e!==o-2||(h[n].push(a[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,e=0,n=t.length;e<n;e++)t[e]=Ut(t[e],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var e,n,s,o,a,r,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(e=0,o=this._parts.length;e<o;e++)for(n=0,s=(a=(r=this._parts[e]).length)-1;n<a;s=n++)if((i||0!==n)&&Wt(t,r[s],r[n])<=h)return!0;return!1}});Rs._flat=ei;var Bs=Rs.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,s,o,a,r,h,l=this._rings[0],u=l.length;if(!u)return null;for(o=a=r=0,t=0,i=u-1;t<u;i=t++)e=l[t],n=l[i],s=e.y*n.x-n.y*e.x,a+=(e.x+n.x)*s,r+=(e.y+n.y)*s,o+=3*s;return h=0===o?l[0]:[a/o,r/o],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var i=Rs.prototype._convertLatLngs.call(this,t),e=i.length;return e>=2&&i[0]instanceof O&&i[0].equals(i[e-1])&&i.pop(),i},_setLatLngs:function(t){Rs.prototype._setLatLngs.call(this,t),ii(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ii(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,e=new E(i,i);if(t=new S(t.min.subtract(e),t.max.add(e)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,s=0,o=this._rings.length;s<o;s++)(n=ni(this._rings[s],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,e,n,s,o,a,r,h,l=!1;if(!this._pxBounds.contains(t))return!1;for(s=0,r=this._parts.length;s<r;s++)for(o=0,a=(h=(i=this._parts[s]).length)-1;o<h;a=o++)e=i[o],n=i[a],e.y>t.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(l=!l);return l||Rs.prototype._containsPoint.call(this,t,!0)}}),Zs=Cs.extend({initialize:function(t,i){u(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,s=Be(t)?t:t.features;if(s){for(i=0,e=s.length;i<e;i++)((n=s[i]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var a=ai(t,o);return a?(a.feature=di(t),a.defaultOptions=a.options,this.resetStyle(a),o.onEachFeature&&o.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(i){this._setLayerStyle(i,t)},this)},_setLayerStyle:function(t,i){"function"==typeof i&&(i=i(t.feature)),t.setStyle&&t.setStyle(i)}}),js={toGeoJSON:function(t){return ci(this,{type:"Point",coordinates:li(this.getLatLng(),t)})}};zs.include(js),Ns.include(js),Os.include(js),Rs.include({toGeoJSON:function(t){var i=!ii(this._latlngs),e=ui(this._latlngs,i?1:0,!1,t);return ci(this,{type:(i?"Multi":"")+"LineString",coordinates:e})}}),Bs.include({toGeoJSON:function(t){var i=!ii(this._latlngs),e=i&&!ii(this._latlngs[0]),n=ui(this._latlngs,e?2:i?1:0,!0,t);return i||(n=[n]),ci(this,{type:(e?"Multi":"")+"Polygon",coordinates:n})}}),Es.include({toMultiPoint:function(t){var i=[];return this.eachLayer(function(e){i.push(e.toGeoJSON(t).geometry.coordinates)}),ci(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(t){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===i)return this.toMultiPoint(t);var e="GeometryCollection"===i,n=[];return this.eachLayer(function(i){if(i.toGeoJSON){var s=i.toGeoJSON(t);if(e)n.push(s.geometry);else{var o=di(s);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}}),e?ci(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Ds=pi,Hs=Ps.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,e){this._url=t,this._bounds=z(i),u(this,e)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(wt(this._image,"bigemap-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ft(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&&vt(this._image),this},bringToBack:function(){return this._map&&yt(this._image),this},bringToFrontAt:function(t){return this._map&&Mt(this._image,t._image),this},bringToBackAt:function(t){return this._map&&xt(this._image,t._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=z(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._image=mt("img","bigemap-image-layer "+(this._zoomAnimated?"bigemap-zoom-animated ":"")+(this.options.className||""));t.onselectstart=a,t.onmousemove=a,t.onload=e(this.fire,this,"load"),t.onerror=e(this._overlayOnError,this,"error"),this.options.crossOrigin&&(t.crossOrigin=""),this.options.zIndex&&this._updateZIndex(),t.src=this._url,t.alt=this.options.alt},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;At(this._image,e,i)},_reset:function(){var t=this._image,i=new S(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=i.getSize();kt(t,i.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){Et(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)}}),qs=1,Fs=2,Gs=3,Us=4,Ws=5,Vs=484813681109536e-20,Qs=Math.PI/2,Ks=.16666666666666666,Js=.04722222222222222,Xs=.022156084656084655,Ys=1e-10,$s=.017453292519943295,to=57.29577951308232,io=Math.PI/4,eo=2*Math.PI,no=3.14159265359,so={};so.greenwich=0,so.lisbon=-9.131906111111,so.paris=2.337229166667,so.bogota=-74.080916666667,so.madrid=-3.687938888889,so.rome=12.452333333333,so.bern=7.439583333333,so.jakarta=106.807719444444,so.ferro=-17.666666666667,so.brussels=4.367975,so.stockholm=18.058277777778,so.athens=23.7163375,so.oslo=10.722916666667;var oo={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},ao=/[\s_\-\/\(\)]/g,ro=function(t){var i,e,n,s={},o=t.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,i){var e=i.split("=");return e.push(!0),t[e[0].toLowerCase()]=e[1],t},{}),a={proj:"projName",datum:"datumCode",rf:function(t){s.rf=parseFloat(t)},lat_0:function(t){s.lat0=t*$s},lat_1:function(t){s.lat1=t*$s},lat_2:function(t){s.lat2=t*$s},lat_ts:function(t){s.lat_ts=t*$s},lon_0:function(t){s.long0=t*$s},lon_1:function(t){s.long1=t*$s},lon_2:function(t){s.long2=t*$s},alpha:function(t){s.alpha=parseFloat(t)*$s},gamma:function(t){s.rectified_grid_angle=parseFloat(t)},lonc:function(t){s.longc=t*$s},x_0:function(t){s.x0=parseFloat(t)},y_0:function(t){s.y0=parseFloat(t)},k_0:function(t){s.k0=parseFloat(t)},k:function(t){s.k0=parseFloat(t)},a:function(t){s.a=parseFloat(t)},b:function(t){s.b=parseFloat(t)},r_a:function(){s.R_A=!0},zone:function(t){s.zone=parseInt(t,10)},south:function(){s.utmSouth=!0},towgs84:function(t){s.datum_params=t.split(",").map(function(t){return parseFloat(t)})},to_meter:function(t){s.to_meter=parseFloat(t)},units:function(t){s.units=t;var i=_i(oo,t);i&&(s.to_meter=i.to_meter)},from_greenwich:function(t){s.from_greenwich=t*$s},pm:function(t){var i=_i(so,t);s.from_greenwich=(i||parseFloat(t))*$s},nadgrids:function(t){"@null"===t?s.datumCode="none":s.nadgrids=t},axis:function(t){3===t.length&&-1!=="ewnsud".indexOf(t.substr(0,1))&&-1!=="ewnsud".indexOf(t.substr(1,1))&&-1!=="ewnsud".indexOf(t.substr(2,1))&&(s.axis=t)},approx:function(){s.approx=!0}};for(i in o)e=o[i],i in a?"function"==typeof(n=a[i])?n(e):s[n]=e:s[i]=e;return"string"==typeof s.datumCode&&"WGS84"!==s.datumCode&&(s.datumCode=s.datumCode.toLowerCase()),s},ho=1,lo=/\s/,uo=/[A-Za-z]/,co=/[A-Za-z84_]/,po=/[,\]]/,_o=/[\d\.E\-\+]/;mi.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;lo.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case ho:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},mi.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(po.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},mi.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=ho)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=ho,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},mi.prototype.number=function(t){if(!_o.test(t)){if(po.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},mi.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},mi.prototype.keyword=function(t){if(co.test(t))this.word+=t;else{if("["===t){var i=[];return i.push(this.word),this.level++,null===this.root?this.root=i:this.currentObject.push(i),this.stack.push(this.currentObject),this.currentObject=i,void(this.state=ho)}if(!po.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},mi.prototype.neutral=function(t){if(uo.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(_o.test(t))return this.word=t,void(this.state=3);{if(!po.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)}},mi.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var mo=.017453292519943295,fo=function(t){var i=fi(t),e=i.shift(),n=i.shift();i.unshift(["name",n]),i.unshift(["type",e]);var s={};return vi(i,s),xi(s),s};!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(bi);var go=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],vo=["3857","900913","3785","102113"],yo=function(t,i){t=t||{};var e,n;if(!i)return t;for(n in i)void 0!==(e=i[n])&&(t[n]=e);return t},Mo=function(t,i,e){var n=t*i;return e/Math.sqrt(1-n*n)},xo=function(t){return t<0?-1:1},bo=function(t){return Math.abs(t)<=no?t:t-xo(t)*eo},wo=function(t,i,e){var n=t*e,s=.5*t;return n=Math.pow((1-n)/(1+n),s),Math.tan(.5*(Qs-i))/n},To=function(t,i){for(var e,n,s=.5*t,o=Qs-2*Math.atan(i),a=0;a<=15;a++)if(e=t*Math.sin(o),n=Qs-2*Math.atan(i*Math.pow((1-e)/(1+e),s))-o,o+=n,Math.abs(n)<=1e-10)return o;return-9999},Lo=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Mo(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var i=t.x,e=t.y;if(e*to>90&&e*to<-90&&i*to>180&&i*to<-180)return null;var n,s;if(Math.abs(Math.abs(e)-Qs)<=Ys)return null;if(this.sphere)n=this.x0+this.a*this.k0*bo(i-this.long0),s=this.y0+this.a*this.k0*Math.log(Math.tan(io+.5*e));else{var o=Math.sin(e),a=wo(this.e,e,o);n=this.x0+this.a*this.k0*bo(i-this.long0),s=this.y0-this.a*this.k0*Math.log(a)}return t.x=n,t.y=s,t},inverse:function(t){var i,e,n=t.x-this.x0,s=t.y-this.y0;if(this.sphere)e=Qs-2*Math.atan(Math.exp(-s/(this.a*this.k0)));else{var o=Math.exp(-s/(this.a*this.k0));if(-9999===(e=To(this.e,o)))return null}return i=bo(this.long0+n/(this.a*this.k0)),t.x=i,t.y=e,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:Ai,inverse:Ai,names:["longlat","identity"]}],Po={},Eo=[],Co={start:function(){Lo.forEach(ki)},add:ki,get:function(t){if(!t)return!1;var i=t.toLowerCase();return void 0!==Po[i]&&Eo[Po[i]]?Eo[Po[i]]:void 0}},So={};So.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},So.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},So.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},So.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},So.airy={a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},So.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},So.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},So.mod_airy={a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},So.andrae={a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},So.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},So.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},So.bessel={a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},So.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},So.clrk66={a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},So.clrk80={a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},So.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},So.CPM={a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},So.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},So.engelis={a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},So.evrst30={a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},So.evrst48={a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},So.evrst56={a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},So.evrst69={a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},So.evrstSS={a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},So.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},So.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},So.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},So.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},So.hough={a:6378270,rf:297,ellipseName:"Hough"},So.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},So.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},So.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},So.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},So.new_intl={a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},So.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},So.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},So.SEasia={a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},So.walbeck={a:6376896,b:6355834.8467,ellipseName:"Walbeck"},So.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},So.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},So.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var Ao=So.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};So.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var ko={};ko.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ko.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ko.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},ko.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},ko.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},ko.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},ko.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},ko.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},ko.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ko.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},ko.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},ko.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},ko.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},ko.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},ko.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},ko.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},ko.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var zo={};Ui.projections=Co,Ui.projections.start();var Io=function(t,i,e){if(Wi(t,i))return e;if(t.datum_type===Ws||i.datum_type===Ws)return e;var n=t.a,s=t.es;if(t.datum_type===Gs){if(0!==Yi(t,!1,e))return;n=6378137,s=.0066943799901413165}var o=i.a,a=i.b,r=i.es;return i.datum_type===Gs&&(o=6378137,a=6356752.314,r=.0066943799901413165),s!==r||n!==o||Xi(t.datum_type)||Xi(i.datum_type)?(e=Vi(e,s,n),Xi(t.datum_type)&&(e=Ki(e,t.datum_type,t.datum_params)),Xi(i.datum_type)&&(e=Ji(e,i.datum_type,i.datum_params)),e=Qi(e,r,o,a),i.datum_type!==Gs||0===Yi(i,!0,e)?e:void 0):e},Oo=function(t,i,e){var n,s,o,a=e.x,r=e.y,h=e.z||0,l={};for(o=0;o<3;o++)if(!i||2!==o||void 0!==e.z)switch(0===o?(n=a,s=-1!=="ew".indexOf(t.axis[o])?"x":"y"):1===o?(n=r,s=-1!=="ns".indexOf(t.axis[o])?"y":"x"):(n=h,s="z"),t.axis[o]){case"e":l[s]=n;break;case"w":l[s]=-n;break;case"n":l[s]=n;break;case"s":l[s]=-n;break;case"u":void 0!==e[s]&&(l.z=n);break;case"d":void 0!==e[s]&&(l.z=-n);break;default:return null}return l},No=function(t){var i={x:t[0],y:t[1]};return t.length>2&&(i.z=t[2]),t.length>3&&(i.m=t[3]),i},Ro=function(t){ie(t.x),ie(t.y)},Bo=Ui("WGS84"),Zo=6,jo="AJSAJS",Do="AFAFAF",Ho=65,qo=73,Fo=79,Go=86,Uo=90,Wo={forward:re,inverse:function(t){var i=de(ve(t.toUpperCase()));return i.lat&&i.lon?[i.lon,i.lat,i.lon,i.lat]:[i.left,i.bottom,i.right,i.top]},toPoint:he};be.fromMGRS=function(t){return new be(he(t))},be.prototype.toMGRS=function(t){return re([this.x,this.y],t)};var Vo=.01068115234375,Qo=function(t){var i=[];i[0]=1-t*(.25+t*(.046875+t*(.01953125+t*Vo))),i[1]=t*(.75-t*(.046875+t*(.01953125+t*Vo)));var e=t*t;return i[2]=e*(.46875-t*(.013020833333333334+.007120768229166667*t)),e*=t,i[3]=e*(.3645833333333333-.005696614583333333*t),i[4]=e*t*.3076171875,i},Ko=function(t,i,e,n){return e*=i,i*=i,n[0]*t-e*(n[1]+i*(n[2]+i*(n[3]+i*n[4])))},Jo=function(t,i,e){for(var n=1/(1-i),s=t,o=20;o;--o){var a=Math.sin(s),r=1-i*a*a;if(r=(Ko(s,a,Math.cos(s),e)-t)*(r*Math.sqrt(r))*n,s-=r,Math.abs(r)<Ys)return s}return s},Xo={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Qo(this.es),this.ml0=Ko(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var i,e,n,s=t.x,o=t.y,a=bo(s-this.long0),r=Math.sin(o),h=Math.cos(o);if(this.es){var l=h*a,u=Math.pow(l,2),c=this.ep2*Math.pow(h,2),d=Math.pow(c,2),p=Math.abs(h)>Ys?Math.tan(o):0,_=Math.pow(p,2),m=Math.pow(_,2);i=1-this.es*Math.pow(r,2),l/=Math.sqrt(i);var f=Ko(o,r,h,this.en);e=this.a*(this.k0*l*(1+u/6*(1-_+c+u/20*(5-18*_+m+14*c-58*_*c+u/42*(61+179*m-m*_-479*_)))))+this.x0,n=this.a*(this.k0*(f-this.ml0+r*a*l/2*(1+u/12*(5-_+9*c+4*d+u/30*(61+m-58*_+270*c-330*_*c+u/56*(1385+543*m-m*_-3111*_))))))+this.y0}else{var g=h*Math.sin(a);if(Math.abs(Math.abs(g)-1)<Ys)return 93;if(e=.5*this.a*this.k0*Math.log((1+g)/(1-g))+this.x0,n=h*Math.cos(a)/Math.sqrt(1-Math.pow(g,2)),(g=Math.abs(n))>=1){if(g-1>Ys)return 93;n=0}else n=Math.acos(n);o<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return t.x=e,t.y=n,t},inverse:function(t){var i,e,n,s,o=(t.x-this.x0)*(1/this.a),a=(t.y-this.y0)*(1/this.a);if(this.es)if(i=this.ml0+a/this.k0,e=Jo(i,this.es,this.en),Math.abs(e)<Qs){var r=Math.sin(e),h=Math.cos(e),l=Math.abs(h)>Ys?Math.tan(e):0,u=this.ep2*Math.pow(h,2),c=Math.pow(u,2),d=Math.pow(l,2),p=Math.pow(d,2);i=1-this.es*Math.pow(r,2);var _=o*Math.sqrt(i)/this.k0,m=Math.pow(_,2);n=e-(i*=l)*m/(1-this.es)*.5*(1-m/12*(5+3*d-9*u*d+u-4*c-m/30*(61+90*d-252*u*d+45*p+46*u-m/56*(1385+3633*d+4095*p+1574*p*d)))),s=bo(this.long0+_*(1-m/6*(1+2*d+u-m/20*(5+28*d+24*p+8*u*d+6*u-m/42*(61+662*d+1320*p+720*p*d))))/h)}else n=Qs*xo(a),s=0;else{var f=Math.exp(o/this.k0),g=.5*(f-1/f),v=this.lat0+a/this.k0,y=Math.cos(v);i=Math.sqrt((1-Math.pow(y,2))/(1+Math.pow(g,2))),n=Math.asin(i),a<0&&(n=-n),s=0===g&&0===y?0:bo(Math.atan2(g,y)+this.long0)}return t.x=s,t.y=n,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]},Yo=function(t){var i=Math.exp(t);return i=(i-1/i)/2},$o=function(t,i){t=Math.abs(t),i=Math.abs(i);var e=Math.max(t,i),n=Math.min(t,i)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))},ta=function(t){var i=1+t,e=i-1;return 0===e?t:t*Math.log(i)/e},ia=function(t){var i=Math.abs(t);return i=ta(i*(1+i/($o(1,i)+1))),t<0?-i:i},ea=function(t,i){for(var e,n=2*Math.cos(2*i),s=t.length-1,o=t[s],a=0;--s>=0;)e=n*o-a+t[s],a=o,o=e;return i+e*Math.sin(2*i)},na=function(t,i){for(var e,n=2*Math.cos(i),s=t.length-1,o=t[s],a=0;--s>=0;)e=n*o-a+t[s],a=o,o=e;return Math.sin(i)*e},sa=function(t){var i=Math.exp(t);return i=(i+1/i)/2},oa=function(t,i,e){for(var n,s,o=Math.sin(i),a=Math.cos(i),r=Yo(e),h=sa(e),l=2*a*h,u=-2*o*r,c=t.length-1,d=t[c],p=0,_=0,m=0;--c>=0;)n=_,s=p,d=l*(_=d)-n-u*(p=m)+t[c],m=u*_-s+l*p;return l=o*h,u=a*r,[l*d-u*m,l*m+u*d]},aa={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Xo.init.apply(this),this.forward=Xo.forward,this.inverse=Xo.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),i=t/(2-t),e=i;this.cgb[0]=i*(2+i*(-2/3+i*(i*(116/45+i*(26/45+i*(-2854/675)))-2))),this.cbg[0]=i*(i*(2/3+i*(4/3+i*(-82/45+i*(32/45+i*(4642/4725)))))-2),e*=i,this.cgb[1]=e*(7/3+i*(i*(-227/45+i*(2704/315+i*(2323/945)))-1.6)),this.cbg[1]=e*(5/3+i*(-16/15+i*(-13/9+i*(904/315+i*(-1522/945))))),e*=i,this.cgb[2]=e*(56/15+i*(-136/35+i*(-1262/105+i*(73814/2835)))),this.cbg[2]=e*(-26/15+i*(34/21+i*(1.6+i*(-12686/2835)))),e*=i,this.cgb[3]=e*(4279/630+i*(-332/35+i*(-399572/14175))),this.cbg[3]=e*(1237/630+i*(i*(-24832/14175)-2.4)),e*=i,this.cgb[4]=e*(4174/315+i*(-144838/6237)),this.cbg[4]=e*(-734/315+i*(109598/31185)),e*=i,this.cgb[5]=e*(601676/22275),this.cbg[5]=e*(444337/155925),e=Math.pow(i,2),this.Qn=this.k0/(1+i)*(1+e*(.25+e*(1/64+e/256))),this.utg[0]=i*(i*(2/3+i*(-37/96+i*(1/360+i*(81/512+i*(-96199/604800)))))-.5),this.gtu[0]=i*(.5+i*(-2/3+i*(5/16+i*(41/180+i*(-127/288+i*(7891/37800)))))),this.utg[1]=e*(-1/48+i*(-1/15+i*(437/1440+i*(-46/105+i*(1118711/3870720))))),this.gtu[1]=e*(13/48+i*(i*(557/1440+i*(281/630+i*(-1983433/1935360)))-.6)),e*=i,this.utg[2]=e*(-17/480+i*(37/840+i*(209/4480+i*(-5569/90720)))),this.gtu[2]=e*(61/240+i*(-103/140+i*(15061/26880+i*(167603/181440)))),e*=i,this.utg[3]=e*(-4397/161280+i*(11/504+i*(830251/7257600))),this.gtu[3]=e*(49561/161280+i*(-179/168+i*(6601661/7257600))),e*=i,this.utg[4]=e*(-4583/161280+i*(108847/3991680)),this.gtu[4]=e*(34729/80640+i*(-3418889/1995840)),e*=i,this.utg[5]=-.03233083094085698*e,this.gtu[5]=.6650675310896665*e;var n=ea(this.cbg,this.lat0);this.Zb=-this.Qn*(n+na(this.gtu,2*n))},forward:function(t){var i=bo(t.x-this.long0),e=t.y;e=ea(this.cbg,e);var n=Math.sin(e),s=Math.cos(e),o=Math.sin(i),a=Math.cos(i);e=Math.atan2(n,a*s),i=Math.atan2(o*s,$o(n,s*a)),i=ia(Math.tan(i));var r=oa(this.gtu,2*e,2*i);e+=r[0],i+=r[1];var h,l;return Math.abs(i)<=2.623395162778?(h=this.a*(this.Qn*i)+this.x0,l=this.a*(this.Qn*e+this.Zb)+this.y0):(h=1/0,l=1/0),t.x=h,t.y=l,t},inverse:function(t){var i=(t.x-this.x0)*(1/this.a),e=(t.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,i/=this.Qn;var n,s;if(Math.abs(i)<=2.623395162778){var o=oa(this.utg,2*e,2*i);e+=o[0],i+=o[1],i=Math.atan(Yo(i));var a=Math.sin(e),r=Math.cos(e),h=Math.sin(i),l=Math.cos(i);e=Math.atan2(a*l,$o(h,l*r)),i=Math.atan2(h,l*r),n=bo(i+this.long0),s=ea(this.cgb,e)}else n=1/0,s=1/0;return t.x=n,t.y=s,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]},ra=function(t,i){if(void 0===t){if((t=Math.floor(30*(bo(i)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t},ha={init:function(){var t=ra(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*$s,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,aa.init.apply(this),this.forward=aa.forward,this.inverse=aa.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},la=function(t,i){return Math.pow((1-t)/(1+t),i)},ua=20,ca={init:function(){var t=Math.sin(this.lat0),i=Math.cos(this.lat0);i*=i,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*i*i/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+io)/(Math.pow(Math.tan(.5*this.lat0+io),this.C)*la(this.e*t,this.ratexp))},forward:function(t){var i=t.x,e=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+io),this.C)*la(this.e*Math.sin(e),this.ratexp))-Qs,t.x=this.C*i,t},inverse:function(t){for(var i=t.x/this.C,e=t.y,n=Math.pow(Math.tan(.5*e+io)/this.K,1/this.C),s=ua;s>0&&(e=2*Math.atan(n*la(this.e*Math.sin(t.y),-.5*this.e))-Qs,!(Math.abs(e-t.y)<1e-14));--s)t.y=e;return s?(t.x=i,t.y=e,t):null},names:["gauss"]},da={init:function(){ca.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var i,e,n,s;return t.x=bo(t.x-this.long0),ca.forward.apply(this,[t]),i=Math.sin(t.y),e=Math.cos(t.y),n=Math.cos(t.x),s=this.k0*this.R2/(1+this.sinc0*i+this.cosc0*e*n),t.x=s*e*Math.sin(t.x),t.y=s*(this.cosc0*i-this.sinc0*e*n),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var i,e,n,s,o;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,o=Math.sqrt(t.x*t.x+t.y*t.y)){var a=2*Math.atan2(o,this.R2);i=Math.sin(a),e=Math.cos(a),s=Math.asin(e*this.sinc0+t.y*i*this.cosc0/o),n=Math.atan2(t.x*i,o*this.cosc0*e-t.y*this.sinc0*i)}else s=this.phic0,n=0;return t.x=n,t.y=s,ca.inverse.apply(this,[t]),t.x=bo(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},pa={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Ys&&(this.k0=.5*(1+xo(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=Ys&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Ys&&(this.k0=.5*this.cons*Mo(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/wo(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Mo(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Qs,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var i,e,n,s,o,a,r=t.x,h=t.y,l=Math.sin(h),u=Math.cos(h),c=bo(r-this.long0);return Math.abs(Math.abs(r-this.long0)-Math.PI)<=Ys&&Math.abs(h+this.lat0)<=Ys?(t.x=NaN,t.y=NaN,t):this.sphere?(i=2*this.k0/(1+this.sinlat0*l+this.coslat0*u*Math.cos(c)),t.x=this.a*i*u*Math.sin(c)+this.x0,t.y=this.a*i*(this.coslat0*l-this.sinlat0*u*Math.cos(c))+this.y0,t):(e=2*Math.atan(this.ssfn_(h,l,this.e))-Qs,s=Math.cos(e),n=Math.sin(e),Math.abs(this.coslat0)<=Ys?(o=wo(this.e,h*this.con,this.con*l),a=2*this.a*this.k0*o/this.cons,t.x=this.x0+a*Math.sin(r-this.long0),t.y=this.y0-this.con*a*Math.cos(r-this.long0),t):(Math.abs(this.sinlat0)<Ys?(i=2*this.a*this.k0/(1+s*Math.cos(c)),t.y=i*n):(i=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*n+this.cosX0*s*Math.cos(c))),t.y=i*(this.cosX0*n-this.sinX0*s*Math.cos(c))+this.y0),t.x=i*s*Math.sin(c)+this.x0,t))},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,e,n,s,o,a=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var r=2*Math.atan(a/(2*this.a*this.k0));return i=this.long0,e=this.lat0,a<=Ys?(t.x=i,t.y=e,t):(e=Math.asin(Math.cos(r)*this.sinlat0+t.y*Math.sin(r)*this.coslat0/a),i=bo(Math.abs(this.coslat0)<Ys?this.lat0>0?this.long0+Math.atan2(t.x,-1*t.y):this.long0+Math.atan2(t.x,t.y):this.long0+Math.atan2(t.x*Math.sin(r),a*this.coslat0*Math.cos(r)-t.y*this.sinlat0*Math.sin(r))),t.x=i,t.y=e,t)}if(Math.abs(this.coslat0)<=Ys){if(a<=Ys)return e=this.lat0,i=this.long0,t.x=i,t.y=e,t;t.x*=this.con,t.y*=this.con,n=a*this.cons/(2*this.a*this.k0),e=this.con*To(this.e,n),i=this.con*bo(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else s=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),i=this.long0,a<=Ys?o=this.X0:(o=Math.asin(Math.cos(s)*this.sinX0+t.y*Math.sin(s)*this.cosX0/a),i=bo(this.long0+Math.atan2(t.x*Math.sin(s),a*this.cosX0*Math.cos(s)-t.y*this.sinX0*Math.sin(s)))),e=-1*To(this.e,Math.tan(.5*(Qs+o)));return t.x=i,t.y=e,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(t,i,e){return i*=e,Math.tan(.5*(Qs+t))*Math.pow((1-i)/(1+i),.5*e)}},_a={init:function(){var t=this.lat0;this.lambda0=this.long0;var i=Math.sin(t),e=this.a,n=1/this.rf,s=2*n-Math.pow(n,2),o=this.e=Math.sqrt(s);this.R=this.k0*e*Math.sqrt(1-s)/(1-s*Math.pow(i,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(i/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),r=Math.log(Math.tan(Math.PI/4+t/2)),h=Math.log((1+o*i)/(1-o*i));this.K=a-this.alpha*r+this.alpha*o/2*h},forward:function(t){var i=Math.log(Math.tan(Math.PI/4-t.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),n=-this.alpha*(i+e)+this.K,s=2*(Math.atan(Math.exp(n))-Math.PI/4),o=this.alpha*(t.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(s)+Math.cos(this.b0)*Math.cos(o))),r=Math.asin(Math.cos(this.b0)*Math.sin(s)-Math.sin(this.b0)*Math.cos(s)*Math.cos(o));return t.y=this.R/2*Math.log((1+Math.sin(r))/(1-Math.sin(r)))+this.y0,t.x=this.R*a+this.x0,t},inverse:function(t){for(var i=t.x-this.x0,e=t.y-this.y0,n=i/this.R,s=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(s)+Math.sin(this.b0)*Math.cos(s)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(s))),r=this.lambda0+a/this.alpha,h=0,l=o,u=-1e3,c=0;Math.abs(l-u)>1e-7;){if(++c>20)return;h=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),u=l,l=2*Math.atan(Math.exp(h))-Math.PI/2}return t.x=r,t.y=l,t},names:["somerc"]},ma=1e-7,fa={init:function(){var t,i,e,n,s,o,a,r,h,l,u,c=0,d=0,p=0,_=0,m=0,f=0,g=0;this.no_off=we(this),this.no_rot="no_rot"in this;var v=!1;"alpha"in this&&(v=!0);var y=!1;if("rectified_grid_angle"in this&&(y=!0),v&&(g=this.alpha),y&&(c=this.rectified_grid_angle*$s),v||y)d=this.longc;else if(p=this.long1,m=this.lat1,_=this.long2,f=this.lat2,Math.abs(m-f)<=ma||(t=Math.abs(m))<=ma||Math.abs(t-Qs)<=ma||Math.abs(Math.abs(this.lat0)-Qs)<=ma||Math.abs(Math.abs(f)-Qs)<=ma)throw new Error;var M=1-this.es;i=Math.sqrt(M),Math.abs(this.lat0)>Ys?(r=Math.sin(this.lat0),e=Math.cos(this.lat0),t=1-this.es*r*r,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/M),this.A=this.B*this.k0*i/t,(s=(n=this.B*i/(e*Math.sqrt(t)))*n-1)<=0?s=0:(s=Math.sqrt(s),this.lat0<0&&(s=-s)),this.E=s+=n,this.E*=Math.pow(wo(this.e,this.lat0,r),this.B)):(this.B=1/i,this.A=this.k0,this.E=n=s=1),v||y?(v?(u=Math.asin(Math.sin(g)/n),y||(c=g)):(u=c,g=Math.asin(n*Math.sin(u))),this.lam0=d-Math.asin(.5*(s-1/s)*Math.tan(u))/this.B):(o=Math.pow(wo(this.e,m,Math.sin(m)),this.B),a=Math.pow(wo(this.e,f,Math.sin(f)),this.B),s=this.E/o,h=(a-o)/(a+o),l=((l=this.E*this.E)-a*o)/(l+a*o),(t=p-_)<-Math.pi?_-=eo:t>Math.pi&&(_+=eo),this.lam0=bo(.5*(p+_)-Math.atan(l*Math.tan(.5*this.B*(p-_))/h)/this.B),u=Math.atan(2*Math.sin(this.B*bo(p-this.lam0))/(s-1/s)),c=g=Math.asin(n*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(g))),this.lat0<0&&(this.u_0=-this.u_0)),s=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(io-s)),this.v_pole_s=this.ArB*Math.log(Math.tan(io+s))},forward:function(t){var i,e,n,s,o,a,r,h,l={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-Qs)>Ys){if(o=this.E/Math.pow(wo(this.e,t.y,Math.sin(t.y)),this.B),a=1/o,i=.5*(o-a),e=.5*(o+a),s=Math.sin(this.B*t.x),n=(i*this.singam-s*this.cosgam)/e,Math.abs(Math.abs(n)-1)<Ys)throw new Error;h=.5*this.ArB*Math.log((1-n)/(1+n)),a=Math.cos(this.B*t.x),r=Math.abs(a)<ma?this.A*t.x:this.ArB*Math.atan2(i*this.cosgam+s*this.singam,a)}else h=t.y>0?this.v_pole_n:this.v_pole_s,r=this.ArB*t.y;return this.no_rot?(l.x=r,l.y=h):(r-=this.u_0,l.x=h*this.cosrot+r*this.sinrot,l.y=r*this.cosrot-h*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,l},inverse:function(t){var i,e,n,s,o,a,r,h={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(e=t.y,i=t.x):(e=t.x*this.cosrot-t.y*this.sinrot,i=t.y*this.cosrot+t.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),s=.5*(n-1/n),o=.5*(n+1/n),a=Math.sin(this.BrA*i),r=(a*this.cosgam+s*this.singam)/o,Math.abs(Math.abs(r)-1)<Ys)h.x=0,h.y=r<0?-Qs:Qs;else{if(h.y=this.E/Math.sqrt((1+r)/(1-r)),h.y=To(this.e,Math.pow(h.y,1/this.B)),h.y===1/0)throw new Error;h.x=-this.rB*Math.atan2(s*this.cosgam-a*this.singam,Math.cos(this.BrA*i))}return h.x+=this.lam0,h},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]},ga={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<Ys)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var i=Math.sin(this.lat1),e=Math.cos(this.lat1),n=Mo(this.e,i,e),s=wo(this.e,this.lat1,i),o=Math.sin(this.lat2),a=Math.cos(this.lat2),r=Mo(this.e,o,a),h=wo(this.e,this.lat2,o),l=wo(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>Ys?this.ns=Math.log(n/r)/Math.log(s/h):this.ns=i,isNaN(this.ns)&&(this.ns=i),this.f0=n/(this.ns*Math.pow(s,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var i=t.x,e=t.y;Math.abs(2*Math.abs(e)-Math.PI)<=Ys&&(e=xo(e)*(Qs-2*Ys));var n,s,o=Math.abs(Math.abs(e)-Qs);if(o>Ys)n=wo(this.e,e,Math.sin(e)),s=this.a*this.f0*Math.pow(n,this.ns);else{if((o=e*this.ns)<=0)return null;s=0}var a=this.ns*bo(i-this.long0);return t.x=this.k0*(s*Math.sin(a))+this.x0,t.y=this.k0*(this.rh-s*Math.cos(a))+this.y0,t},inverse:function(t){var i,e,n,s,o,a=(t.x-this.x0)/this.k0,r=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(i=Math.sqrt(a*a+r*r),e=1):(i=-Math.sqrt(a*a+r*r),e=-1);var h=0;if(0!==i&&(h=Math.atan2(e*a,e*r)),0!==i||this.ns>0){if(e=1/this.ns,n=Math.pow(i/(this.a*this.f0),e),-9999===(s=To(this.e,n)))return null}else s=-Qs;return o=bo(h/this.ns+this.long0),t.x=o,t.y=s,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]},va={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var i,e,n,s,o,a,r,h=t.x,l=t.y,u=bo(h-this.long0);return i=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/i)-this.s45),n=-u*this.alfa,s=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),o=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(s)),a=this.n*o,r=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(s/2+this.s45),this.n),t.y=r*Math.cos(a)/1,t.x=r*Math.sin(a)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var i,e,n,s,o,a,r,h=t.x;t.x=t.y,t.y=h,this.czech||(t.y*=-1,t.x*=-1),o=Math.sqrt(t.x*t.x+t.y*t.y),s=Math.atan2(t.y,t.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),i=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(s)),e=Math.asin(Math.cos(n)*Math.sin(s)/Math.cos(i)),t.x=this.long0-e/this.alfa,a=i,r=0;var l=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(i/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-t.y)<1e-10&&(r=1),a=t.y,l+=1}while(0===r&&l<15);return l>=15?null:t},names:["Krovak","krovak"]},ya=function(t,i,e,n,s){return t*s-i*Math.sin(2*s)+e*Math.sin(4*s)-n*Math.sin(6*s)},Ma=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))},xa=function(t){return.375*t*(1+.25*t*(1+.46875*t))},ba=function(t){return.05859375*t*t*(1+.75*t)},wa=function(t){return t*t*t*(35/3072)},Ta=function(t,i,e){var n=i*e;return t/Math.sqrt(1-n*n)},La=function(t){return Math.abs(t)<Qs?t:t-xo(t)*Math.PI},Pa=function(t,i,e,n,s){var o,a;o=t/i;for(var r=0;r<15;r++)if(a=(t-(i*o-e*Math.sin(2*o)+n*Math.sin(4*o)-s*Math.sin(6*o)))/(i-2*e*Math.cos(2*o)+4*n*Math.cos(4*o)-6*s*Math.cos(6*o)),o+=a,Math.abs(a)<=1e-10)return o;return NaN},Ea={init:function(){this.sphere||(this.e0=Ma(this.es),this.e1=xa(this.es),this.e2=ba(this.es),this.e3=wa(this.es),this.ml0=this.a*ya(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var i,e,n=t.x,s=t.y;if(n=bo(n-this.long0),this.sphere)i=this.a*Math.asin(Math.cos(s)*Math.sin(n)),e=this.a*(Math.atan2(Math.tan(s),Math.cos(n))-this.lat0);else{var o=Math.sin(s),a=Math.cos(s),r=Ta(this.a,this.e,o),h=Math.tan(s)*Math.tan(s),l=n*Math.cos(s),u=l*l,c=this.es*a*a/(1-this.es);i=r*l*(1-u*h*(1/6-(8-h+8*c)*u/120)),e=this.a*ya(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+r*o/a*u*(.5+(5-h+6*c)*u/24)}return t.x=i+this.x0,t.y=e+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,e,n=t.x/this.a,s=t.y/this.a;if(this.sphere){var o=s+this.lat0;i=Math.asin(Math.sin(o)*Math.cos(n)),e=Math.atan2(Math.tan(n),Math.cos(o))}else{var a=this.ml0/this.a+s,r=Pa(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(r)-Qs)<=Ys)return t.x=this.long0,t.y=Qs,s<0&&(t.y*=-1),t;var h=Ta(this.a,this.e,Math.sin(r)),l=h*h*h/this.a/this.a*(1-this.es),u=Math.pow(Math.tan(r),2),c=n*this.a/h,d=c*c;i=r-h*Math.tan(r)/l*c*c*(.5-(1+3*u)*c*c/24),e=c*(1-d*(u/3+(1+3*u)*u*d/15))/Math.cos(r)}return t.x=bo(e+this.long0),t.y=La(i),t},names:["Cassini","Cassini_Soldner","cass"]},Ca=function(t,i){var e;return t>1e-7?(e=t*i,(1-t*t)*(i/(1-e*e)-.5/t*Math.log((1-e)/(1+e)))):2*i},Sa=.3333333333333333,Aa=.17222222222222222,ka=.10257936507936508,za=.06388888888888888,Ia=.0664021164021164,Oa=.016415012942191543,Na={init:function(){var t=Math.abs(this.lat0);if(Math.abs(t-Qs)<Ys?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<Ys?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var i;switch(this.qp=Ca(this.e,1),this.mmf=.5/(1-this.es),this.apa=Te(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),i=Math.sin(this.lat0),this.sinb1=Ca(this.e,i)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*i*i)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var i,e,n,s,o,a,r,h,l,u,c=t.x,d=t.y;if(c=bo(c-this.long0),this.sphere){if(o=Math.sin(d),u=Math.cos(d),n=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((e=this.mode===this.EQUIT?1+u*n:1+this.sinph0*o+this.cosph0*u*n)<=Ys)return null;i=(e=Math.sqrt(2/e))*u*Math.sin(c),e*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(d+this.lat0)<Ys)return null;e=io-.5*d,i=(e=2*(this.mode===this.S_POLE?Math.cos(e):Math.sin(e)))*Math.sin(c),e*=n}}else{switch(r=0,h=0,l=0,n=Math.cos(c),s=Math.sin(c),o=Math.sin(d),a=Ca(this.e,o),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(r=a/this.qp,h=Math.sqrt(1-r*r)),this.mode){case this.OBLIQ:l=1+this.sinb1*r+this.cosb1*h*n;break;case this.EQUIT:l=1+h*n;break;case this.N_POLE:l=Qs+d,a=this.qp-a;break;case this.S_POLE:l=d-Qs,a=this.qp+a}if(Math.abs(l)<Ys)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:l=Math.sqrt(2/l),e=this.mode===this.OBLIQ?this.ymf*l*(this.cosb1*r-this.sinb1*h*n):(l=Math.sqrt(2/(1+h*n)))*r*this.ymf,i=this.xmf*l*h*s;break;case this.N_POLE:case this.S_POLE:a>=0?(i=(l=Math.sqrt(a))*s,e=n*(this.mode===this.S_POLE?l:-l)):i=e=0}}return t.x=this.a*i+this.x0,t.y=this.a*e+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,e,n,s,o,a,r,h=t.x/this.a,l=t.y/this.a;if(this.sphere){var u,c=0,d=0;if(u=Math.sqrt(h*h+l*l),(e=.5*u)>1)return null;switch(e=2*Math.asin(e),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(d=Math.sin(e),c=Math.cos(e)),this.mode){case this.EQUIT:e=Math.abs(u)<=Ys?0:Math.asin(l*d/u),h*=d,l=c*u;break;case this.OBLIQ:e=Math.abs(u)<=Ys?this.lat0:Math.asin(c*this.sinph0+l*d*this.cosph0/u),h*=d*this.cosph0,l=(c-Math.sin(e)*this.sinph0)*u;break;case this.N_POLE:l=-l,e=Qs-e;break;case this.S_POLE:e-=Qs}i=0!==l||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(h,l):0}else{if(r=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(h/=this.dd,l*=this.dd,(a=Math.sqrt(h*h+l*l))<Ys)return t.x=this.long0,t.y=this.lat0,t;s=2*Math.asin(.5*a/this.rq),n=Math.cos(s),h*=s=Math.sin(s),this.mode===this.OBLIQ?(r=n*this.sinb1+l*s*this.cosb1/a,o=this.qp*r,l=a*this.cosb1*n-l*this.sinb1*s):(r=l*s/a,o=this.qp*r,l=a*n)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(l=-l),!(o=h*h+l*l))return t.x=this.long0,t.y=this.lat0,t;r=1-o/this.qp,this.mode===this.S_POLE&&(r=-r)}i=Math.atan2(h,l),e=Le(Math.asin(r),this.apa)}return t.x=bo(this.long0+i),t.y=e,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4},Ra=function(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)},Ba={init:function(){Math.abs(this.lat1+this.lat2)<Ys||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=Mo(this.e3,this.sin_po,this.cos_po),this.qs1=Ca(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Mo(this.e3,this.sin_po,this.cos_po),this.qs2=Ca(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Ca(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>Ys?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var i=t.x,e=t.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=Ca(this.e3,this.sin_phi,this.cos_phi),s=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,o=this.ns0*bo(i-this.long0),a=s*Math.sin(o)+this.x0,r=this.rh-s*Math.cos(o)+this.y0;return t.x=a,t.y=r,t},inverse:function(t){var i,e,n,s,o,a;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),n=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1),s=0,0!==i&&(s=Math.atan2(n*t.x,n*t.y)),n=i*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,e)),o=bo(s/this.ns0+this.long0),t.x=o,t.y=a,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,i){var e,n,s,o,a,r=Ra(.5*i);if(t<Ys)return r;for(var h=t*t,l=1;l<=25;l++)if(e=Math.sin(r),n=Math.cos(r),s=t*e,o=1-s*s,a=.5*o*o/n*(i/(1-h)-e/o+.5/t*Math.log((1-s)/(1+s))),r+=a,Math.abs(a)<=1e-7)return r;return null}},Za={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var i,e,n,s,o,a,r,h=t.x,l=t.y;return n=bo(h-this.long0),i=Math.sin(l),e=Math.cos(l),s=Math.cos(n),(o=this.sin_p14*i+this.cos_p14*e*s)>0||Math.abs(o)<=Ys?(a=this.x0+1*this.a*e*Math.sin(n)/o,r=this.y0+1*this.a*(this.cos_p14*i-this.sin_p14*e*s)/o):(a=this.x0+this.infinity_dist*e*Math.sin(n),r=this.y0+this.infinity_dist*(this.cos_p14*i-this.sin_p14*e*s)),t.x=a,t.y=r,t},inverse:function(t){var i,e,n,s,o,a;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(i=Math.sqrt(t.x*t.x+t.y*t.y))?(s=Math.atan2(i,this.rc),e=Math.sin(s),n=Math.cos(s),a=Ra(n*this.sin_p14+t.y*e*this.cos_p14/i),o=Math.atan2(t.x*e,i*this.cos_p14*n-t.y*this.sin_p14*e),o=bo(this.long0+o)):(a=this.phic0,o=0),t.x=o,t.y=a,t},names:["gnom"]},ja=function(t,i){var e=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(i)-e)<1e-6)return i<0?-1*Qs:Qs;for(var n,s,o,a,r=Math.asin(.5*i),h=0;h<30;h++)if(s=Math.sin(r),o=Math.cos(r),a=t*s,n=Math.pow(1-a*a,2)/(2*o)*(i/(1-t*t)-s/(1-a*a)+.5/t*Math.log((1-a)/(1+a))),r+=n,Math.abs(n)<=1e-10)return r;return NaN},Da={init:function(){this.sphere||(this.k0=Mo(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var i,e,n=t.x,s=t.y,o=bo(n-this.long0);if(this.sphere)i=this.x0+this.a*o*Math.cos(this.lat_ts),e=this.y0+this.a*Math.sin(s)/Math.cos(this.lat_ts);else{var a=Ca(this.e,Math.sin(s));i=this.x0+this.a*this.k0*o,e=this.y0+this.a*a*.5/this.k0}return t.x=i,t.y=e,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,e;return this.sphere?(i=bo(this.long0+t.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(e=ja(this.e,2*t.y*this.k0/this.a),i=bo(this.long0+t.x/(this.a*this.k0))),t.x=i,t.y=e,t},names:["cea"]},Ha={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var i=t.x,e=t.y,n=bo(i-this.long0),s=La(e-this.lat0);return t.x=this.x0+this.a*n*this.rc,t.y=this.y0+this.a*s,t},inverse:function(t){var i=t.x,e=t.y;return t.x=bo(this.long0+(i-this.x0)/(this.a*this.rc)),t.y=La(this.lat0+(e-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},qa=20,Fa={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ma(this.es),this.e1=xa(this.es),this.e2=ba(this.es),this.e3=wa(this.es),this.ml0=this.a*ya(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var i,e,n,s=t.x,o=t.y,a=bo(s-this.long0);if(n=a*Math.sin(o),this.sphere)Math.abs(o)<=Ys?(i=this.a*a,e=-1*this.a*this.lat0):(i=this.a*Math.sin(n)/Math.tan(o),e=this.a*(La(o-this.lat0)+(1-Math.cos(n))/Math.tan(o)));else if(Math.abs(o)<=Ys)i=this.a*a,e=-1*this.ml0;else{var r=Ta(this.a,this.e,Math.sin(o))/Math.tan(o);i=r*Math.sin(n),e=this.a*ya(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+r*(1-Math.cos(n))}return t.x=i+this.x0,t.y=e+this.y0,t},inverse:function(t){var i,e,n,s,o,a,r,h,l;if(n=t.x-this.x0,s=t.y-this.y0,this.sphere)if(Math.abs(s+this.a*this.lat0)<=Ys)i=bo(n/this.a+this.long0),e=0;else{a=this.lat0+s/this.a,r=n*n/this.a/this.a+a*a,h=a;var u;for(o=qa;o;--o)if(u=Math.tan(h),l=-1*(a*(h*u+1)-h-.5*(h*h+r)*u)/((h-a)/u-1),h+=l,Math.abs(l)<=Ys){e=h;break}i=bo(this.long0+Math.asin(n*Math.tan(h)/this.a)/Math.sin(e))}else if(Math.abs(s+this.ml0)<=Ys)e=0,i=bo(this.long0+n/this.a);else{a=(this.ml0+s)/this.a,r=n*n/this.a/this.a+a*a,h=a;var c,d,p,_,m;for(o=qa;o;--o)if(m=this.e*Math.sin(h),c=Math.sqrt(1-m*m)*Math.tan(h),d=this.a*ya(this.e0,this.e1,this.e2,this.e3,h),p=this.e0-2*this.e1*Math.cos(2*h)+4*this.e2*Math.cos(4*h)-6*this.e3*Math.cos(6*h),_=d/this.a,l=(a*(c*_+1)-_-.5*c*(_*_+r))/(this.es*Math.sin(2*h)*(_*_+r-2*a*_)/(4*c)+(a-_)*(c*p-2/Math.sin(2*h))-p),h-=l,Math.abs(l)<=Ys){e=h;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),i=bo(this.long0+Math.asin(n*c/this.a)/Math.sin(e))}return t.x=i,t.y=e,t},names:["Polyconic","poly"]},Ga={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var i,e=t.x,n=t.y-this.lat0,s=e-this.long0,o=n/Vs*1e-5,a=s,r=1,h=0;for(i=1;i<=10;i++)r*=o,h+=this.A[i]*r;var l,u=h,c=a,d=1,p=0,_=0,m=0;for(i=1;i<=6;i++)l=p*u+d*c,d=d*u-p*c,p=l,_=_+this.B_re[i]*d-this.B_im[i]*p,m=m+this.B_im[i]*d+this.B_re[i]*p;return t.x=m*this.a+this.x0,t.y=_*this.a+this.y0,t},inverse:function(t){var i,e,n=t.x,s=t.y,o=n-this.x0,a=(s-this.y0)/this.a,r=o/this.a,h=1,l=0,u=0,c=0;for(i=1;i<=6;i++)e=l*a+h*r,h=h*a-l*r,l=e,u=u+this.C_re[i]*h-this.C_im[i]*l,c=c+this.C_im[i]*h+this.C_re[i]*l;for(var d=0;d<this.iterations;d++){var p,_=u,m=c,f=a,g=r;for(i=2;i<=6;i++)p=m*u+_*c,_=_*u-m*c,m=p,f+=(i-1)*(this.B_re[i]*_-this.B_im[i]*m),g+=(i-1)*(this.B_im[i]*_+this.B_re[i]*m);_=1,m=0;var v=this.B_re[1],y=this.B_im[1];for(i=2;i<=6;i++)p=m*u+_*c,_=_*u-m*c,m=p,v+=i*(this.B_re[i]*_-this.B_im[i]*m),y+=i*(this.B_im[i]*_+this.B_re[i]*m);var M=v*v+y*y;u=(f*v+g*y)/M,c=(g*v-f*y)/M}var x=u,b=c,w=1,T=0;for(i=1;i<=9;i++)w*=x,T+=this.D[i]*w;var L=this.lat0+T*Vs*1e5,P=this.long0+b;return t.x=P,t.y=L,t},names:["New_Zealand_Map_Grid","nzmg"]},Ua={init:function(){},forward:function(t){var i=t.x,e=t.y,n=bo(i-this.long0),s=this.x0+this.a*n,o=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return t.x=s,t.y=o,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i=bo(this.long0+t.x/this.a),e=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=i,t.y=e,t},names:["Miller_Cylindrical","mill"]},Wa=20,Va={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Qo(this.es)},forward:function(t){var i,e,n=t.x,s=t.y;if(n=bo(n-this.long0),this.sphere){if(this.m)for(var o=this.n*Math.sin(s),a=Wa;a;--a){var r=(this.m*s+Math.sin(s)-o)/(this.m+Math.cos(s));if(s-=r,Math.abs(r)<Ys)break}else s=1!==this.n?Math.asin(this.n*Math.sin(s)):s;i=this.a*this.C_x*n*(this.m+Math.cos(s)),e=this.a*this.C_y*s}else{var h=Math.sin(s),l=Math.cos(s);e=this.a*Ko(s,h,l,this.en),i=this.a*n*l/Math.sqrt(1-this.es*h*h)}return t.x=i,t.y=e,t},inverse:function(t){var i,e,n,s;return t.x-=this.x0,n=t.x/this.a,t.y-=this.y0,i=t.y/this.a,this.sphere?(i/=this.C_y,n/=this.C_x*(this.m+Math.cos(i)),this.m?i=Ra((this.m*i+Math.sin(i))/this.n):1!==this.n&&(i=Ra(Math.sin(i)/this.n)),n=bo(n+this.long0),i=La(i)):(i=Jo(t.y/this.a,this.es,this.en),(s=Math.abs(i))<Qs?(s=Math.sin(i),e=this.long0+t.x*Math.sqrt(1-this.es*s*s)/(this.a*Math.cos(i)),n=bo(e)):s-Ys<Qs&&(n=this.long0)),t.x=n,t.y=i,t},names:["Sinusoidal","sinu"]},Qa={init:function(){},forward:function(t){for(var i=t.x,e=t.y,n=bo(i-this.long0),s=e,o=Math.PI*Math.sin(e);;){var a=-(s+Math.sin(s)-o)/(1+Math.cos(s));if(s+=a,Math.abs(a)<Ys)break}s/=2,Math.PI/2-Math.abs(e)<Ys&&(n=0);var r=.900316316158*this.a*n*Math.cos(s)+this.x0,h=1.4142135623731*this.a*Math.sin(s)+this.y0;return t.x=r,t.y=h,t},inverse:function(t){var i,e;t.x-=this.x0,t.y-=this.y0,e=t.y/(1.4142135623731*this.a),Math.abs(e)>.999999999999&&(e=.999999999999),i=Math.asin(e);var n=bo(this.long0+t.x/(.900316316158*this.a*Math.cos(i)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*i+Math.sin(2*i))/Math.PI,Math.abs(e)>1&&(e=1);var s=Math.asin(e);return t.x=n,t.y=s,t},names:["Mollweide","moll"]},Ka={init:function(){Math.abs(this.lat1+this.lat2)<Ys||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ma(this.es),this.e1=xa(this.es),this.e2=ba(this.es),this.e3=wa(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=Mo(this.e,this.sinphi,this.cosphi),this.ml1=ya(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<Ys?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=Mo(this.e,this.sinphi,this.cosphi),this.ml2=ya(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=ya(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var i,e=t.x,n=t.y;if(this.sphere)i=this.a*(this.g-n);else{var s=ya(this.e0,this.e1,this.e2,this.e3,n);i=this.a*(this.g-s)}var o=this.ns*bo(e-this.long0),a=this.x0+i*Math.sin(o),r=this.y0+this.rh-i*Math.cos(o);return t.x=a,t.y=r,t},inverse:function(t){t.x-=this.x0,t.y=this.rh-t.y+this.y0;var i,e,n,s;this.ns>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),i=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),i=-1);var o=0;if(0!==e&&(o=Math.atan2(i*t.x,i*t.y)),this.sphere)return s=bo(this.long0+o/this.ns),n=La(this.g-e/this.a),t.x=s,t.y=n,t;var a=this.g-e/this.a;return n=Pa(a,this.e0,this.e1,this.e2,this.e3),s=bo(this.long0+o/this.ns),t.x=s,t.y=n,t},names:["Equidistant_Conic","eqdc"]},Ja={init:function(){this.R=this.a},forward:function(t){var i,e,n=t.x,s=t.y,o=bo(n-this.long0);Math.abs(s)<=Ys&&(i=this.x0+this.R*o,e=this.y0);var a=Ra(2*Math.abs(s/Math.PI));(Math.abs(o)<=Ys||Math.abs(Math.abs(s)-Qs)<=Ys)&&(i=this.x0,e=s>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var r=.5*Math.abs(Math.PI/o-o/Math.PI),h=r*r,l=Math.sin(a),u=Math.cos(a),c=u/(l+u-1),d=c*c,p=c*(2/l-1),_=p*p,m=Math.PI*this.R*(r*(c-_)+Math.sqrt(h*(c-_)*(c-_)-(_+h)*(d-_)))/(_+h);o<0&&(m=-m),i=this.x0+m;var f=h+c;return m=Math.PI*this.R*(p*f-r*Math.sqrt((_+h)*(h+1)-f*f))/(_+h),e=s>=0?this.y0+m:this.y0-m,t.x=i,t.y=e,t},inverse:function(t){var i,e,n,s,o,a,r,h,l,u,c,d,p;return t.x-=this.x0,t.y-=this.y0,c=Math.PI*this.R,n=t.x/c,s=t.y/c,o=n*n+s*s,a=-Math.abs(s)*(1+o),r=a-2*s*s+n*n,h=-2*a+1+2*s*s+o*o,p=s*s/h+(2*r*r*r/h/h/h-9*a*r/h/h)/27,l=(a-r*r/3/h)/h,u=2*Math.sqrt(-l/3),c=3*p/l/u,Math.abs(c)>1&&(c=c>=0?1:-1),d=Math.acos(c)/3,e=t.y>=0?(-u*Math.cos(d+Math.PI/3)-r/3/h)*Math.PI:-(-u*Math.cos(d+Math.PI/3)-r/3/h)*Math.PI,i=Math.abs(n)<Ys?this.long0:bo(this.long0+Math.PI*(o-1+Math.sqrt(1+2*(n*n-s*s)+o*o))/2/n),t.x=i,t.y=e,t},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]},Xa={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function(t){var i,e,n,s,o,a,r,h,l,u,c,d,p,_,m,f,g,v,y,M,x,b,w,T=t.x,L=t.y,P=Math.sin(t.y),E=Math.cos(t.y),C=bo(T-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=Ys?(t.x=this.x0+this.a*(Qs-L)*Math.sin(C),t.y=this.y0-this.a*(Qs-L)*Math.cos(C),t):Math.abs(this.sin_p12+1)<=Ys?(t.x=this.x0+this.a*(Qs+L)*Math.sin(C),t.y=this.y0+this.a*(Qs+L)*Math.cos(C),t):(v=this.sin_p12*P+this.cos_p12*E*Math.cos(C),f=Math.acos(v),g=f?f/Math.sin(f):1,t.x=this.x0+this.a*g*E*Math.sin(C),t.y=this.y0+this.a*g*(this.cos_p12*P-this.sin_p12*E*Math.cos(C)),t):(i=Ma(this.es),e=xa(this.es),n=ba(this.es),s=wa(this.es),Math.abs(this.sin_p12-1)<=Ys?(o=this.a*ya(i,e,n,s,Qs),a=this.a*ya(i,e,n,s,L),t.x=this.x0+(o-a)*Math.sin(C),t.y=this.y0-(o-a)*Math.cos(C),t):Math.abs(this.sin_p12+1)<=Ys?(o=this.a*ya(i,e,n,s,Qs),a=this.a*ya(i,e,n,s,L),t.x=this.x0+(o+a)*Math.sin(C),t.y=this.y0+(o+a)*Math.cos(C),t):(r=P/E,h=Ta(this.a,this.e,this.sin_p12),l=Ta(this.a,this.e,P),u=Math.atan((1-this.es)*r+this.es*h*this.sin_p12/(l*E)),c=Math.atan2(Math.sin(C),this.cos_p12*Math.tan(u)-this.sin_p12*Math.cos(C)),y=0===c?Math.asin(this.cos_p12*Math.sin(u)-this.sin_p12*Math.cos(u)):Math.abs(Math.abs(c)-Math.PI)<=Ys?-Math.asin(this.cos_p12*Math.sin(u)-this.sin_p12*Math.cos(u)):Math.asin(Math.sin(C)*Math.cos(u)/Math.sin(c)),d=this.e*this.sin_p12/Math.sqrt(1-this.es),p=this.e*this.cos_p12*Math.cos(c)/Math.sqrt(1-this.es),_=d*p,m=p*p,M=y*y,x=M*y,b=x*y,w=b*y,f=h*y*(1-M*m*(1-m)/6+x/8*_*(1-2*m)+b/120*(m*(4-7*m)-3*d*d*(1-7*m))-w/48*_),t.x=this.x0+f*Math.sin(c),t.y=this.y0+f*Math.cos(c),t))},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,e,n,s,o,a,r,h,l,u,c,d,p,_,m,f,g,v,y,M,x,b,w,T;if(this.sphere){if((i=Math.sqrt(t.x*t.x+t.y*t.y))>2*Qs*this.a)return;return e=i/this.a,n=Math.sin(e),s=Math.cos(e),o=this.long0,Math.abs(i)<=Ys?a=this.lat0:(a=Ra(s*this.sin_p12+t.y*n*this.cos_p12/i),r=Math.abs(this.lat0)-Qs,o=bo(Math.abs(r)<=Ys?this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y):this.long0+Math.atan2(t.x*n,i*this.cos_p12*s-t.y*this.sin_p12*n))),t.x=o,t.y=a,t}return h=Ma(this.es),l=xa(this.es),u=ba(this.es),c=wa(this.es),Math.abs(this.sin_p12-1)<=Ys?(d=this.a*ya(h,l,u,c,Qs),i=Math.sqrt(t.x*t.x+t.y*t.y),p=d-i,a=Pa(p/this.a,h,l,u,c),o=bo(this.long0+Math.atan2(t.x,-1*t.y)),t.x=o,t.y=a,t):Math.abs(this.sin_p12+1)<=Ys?(d=this.a*ya(h,l,u,c,Qs),i=Math.sqrt(t.x*t.x+t.y*t.y),p=i-d,a=Pa(p/this.a,h,l,u,c),o=bo(this.long0+Math.atan2(t.x,t.y)),t.x=o,t.y=a,t):(i=Math.sqrt(t.x*t.x+t.y*t.y),f=Math.atan2(t.x,t.y),_=Ta(this.a,this.e,this.sin_p12),g=Math.cos(f),v=this.e*this.cos_p12*g,y=-v*v/(1-this.es),M=3*this.es*(1-y)*this.sin_p12*this.cos_p12*g/(1-this.es),x=i/_,b=x-y*(1+y)*Math.pow(x,3)/6-M*(1+3*y)*Math.pow(x,4)/24,w=1-y*b*b/2-x*b*b*b/6,m=Math.asin(this.sin_p12*Math.cos(b)+this.cos_p12*Math.sin(b)*g),o=bo(this.long0+Math.asin(Math.sin(f)*Math.sin(b)/Math.cos(m))),T=Math.sin(m),a=Math.atan2((T-this.es*w*this.sin_p12)*Math.tan(m),T*(1-this.es)),t.x=o,t.y=a,t)},names:["Azimuthal_Equidistant","aeqd"]},Ya={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var i,e,n,s,o,a,r,h=t.x,l=t.y;return n=bo(h-this.long0),i=Math.sin(l),e=Math.cos(l),s=Math.cos(n),((o=this.sin_p14*i+this.cos_p14*e*s)>0||Math.abs(o)<=Ys)&&(a=1*this.a*e*Math.sin(n),r=this.y0+1*this.a*(this.cos_p14*i-this.sin_p14*e*s)),t.x=a,t.y=r,t},inverse:function(t){var i,e,n,s,o,a,r;return t.x-=this.x0,t.y-=this.y0,i=Math.sqrt(t.x*t.x+t.y*t.y),e=Ra(i/this.a),n=Math.sin(e),s=Math.cos(e),a=this.long0,Math.abs(i)<=Ys?(r=this.lat0,t.x=a,t.y=r,t):(r=Ra(s*this.sin_p14+t.y*n*this.cos_p14/i),o=Math.abs(this.lat0)-Qs,Math.abs(o)<=Ys?(a=bo(this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y)),t.x=a,t.y=r,t):(a=bo(this.long0+Math.atan2(t.x*n,i*this.cos_p14*s-t.y*this.sin_p14*n)),t.x=a,t.y=r,t))},names:["ortho"]},$a={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},tr={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4},ir={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=Qs-io/2?this.face=$a.TOP:this.lat0<=-(Qs-io/2)?this.face=$a.BOTTOM:Math.abs(this.long0)<=io?this.face=$a.FRONT:Math.abs(this.long0)<=Qs+io?this.face=this.long0>0?$a.RIGHT:$a.LEFT:this.face=$a.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var i,e,n,s,o,a,r={x:0,y:0},h={value:0};if(t.x-=this.long0,i=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,e=t.x,this.face===$a.TOP)s=Qs-i,e>=io&&e<=Qs+io?(h.value=tr.AREA_0,n=e-Qs):e>Qs+io||e<=-(Qs+io)?(h.value=tr.AREA_1,n=e>0?e-no:e+no):e>-(Qs+io)&&e<=-io?(h.value=tr.AREA_2,n=e+Qs):(h.value=tr.AREA_3,n=e);else if(this.face===$a.BOTTOM)s=Qs+i,e>=io&&e<=Qs+io?(h.value=tr.AREA_0,n=-e+Qs):e<io&&e>=-io?(h.value=tr.AREA_1,n=-e):e<-io&&e>=-(Qs+io)?(h.value=tr.AREA_2,n=-e-Qs):(h.value=tr.AREA_3,n=e>0?-e+no:-e-no);else{var l,u,c,d,p,_;this.face===$a.RIGHT?e=Ee(e,+Qs):this.face===$a.BACK?e=Ee(e,+no):this.face===$a.LEFT&&(e=Ee(e,-Qs)),d=Math.sin(i),p=Math.cos(i),_=Math.sin(e),l=p*Math.cos(e),u=p*_,c=d,this.face===$a.FRONT?n=Pe(s=Math.acos(l),c,u,h):this.face===$a.RIGHT?n=Pe(s=Math.acos(u),c,-l,h):this.face===$a.BACK?n=Pe(s=Math.acos(-l),c,-u,h):this.face===$a.LEFT?n=Pe(s=Math.acos(-u),c,l,h):(s=n=0,h.value=tr.AREA_0)}return a=Math.atan(12/no*(n+Math.acos(Math.sin(n)*Math.cos(io))-Qs)),o=Math.sqrt((1-Math.cos(s))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),h.value===tr.AREA_1?a+=Qs:h.value===tr.AREA_2?a+=no:h.value===tr.AREA_3&&(a+=1.5*no),r.x=o*Math.cos(a),r.y=o*Math.sin(a),r.x=r.x*this.a+this.x0,r.y=r.y*this.a+this.y0,t.x=r.x,t.y=r.y,t},inverse:function(t){var i,e,n,s,o,a,r,h,l,u={lam:0,phi:0},c={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,e=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),i=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?c.value=tr.AREA_0:t.y>=0&&t.y>=Math.abs(t.x)?(c.value=tr.AREA_1,i-=Qs):t.x<0&&-t.x>=Math.abs(t.y)?(c.value=tr.AREA_2,i=i<0?i+no:i-no):(c.value=tr.AREA_3,i+=Qs),l=no/12*Math.tan(i),o=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),a=Math.atan(o),n=Math.cos(i),s=Math.tan(e),(r=1-n*n*s*s*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?r=-1:r>1&&(r=1),this.face===$a.TOP)h=Math.acos(r),u.phi=Qs-h,c.value===tr.AREA_0?u.lam=a+Qs:c.value===tr.AREA_1?u.lam=a<0?a+no:a-no:c.value===tr.AREA_2?u.lam=a-Qs:u.lam=a;else if(this.face===$a.BOTTOM)h=Math.acos(r),u.phi=h-Qs,c.value===tr.AREA_0?u.lam=-a+Qs:c.value===tr.AREA_1?u.lam=-a:c.value===tr.AREA_2?u.lam=-a-Qs:u.lam=a<0?-a-no:-a+no;else{var d,p,_;l=(d=r)*d,p=(l+=(_=l>=1?0:Math.sqrt(1-l)*Math.sin(a))*_)>=1?0:Math.sqrt(1-l),c.value===tr.AREA_1?(l=p,p=-_,_=l):c.value===tr.AREA_2?(p=-p,_=-_):c.value===tr.AREA_3&&(l=p,p=_,_=-l),this.face===$a.RIGHT?(l=d,d=-p,p=l):this.face===$a.BACK?(d=-d,p=-p):this.face===$a.LEFT&&(l=d,d=p,p=-l),u.phi=Math.acos(-_)-Qs,u.lam=Math.atan2(p,d),this.face===$a.RIGHT?u.lam=Ee(u.lam,-Qs):this.face===$a.BACK?u.lam=Ee(u.lam,-no):this.face===$a.LEFT&&(u.lam=Ee(u.lam,+Qs))}if(0!==this.es){var m,f,g;m=u.phi<0?1:0,f=Math.tan(u.phi),g=this.b/Math.sqrt(f*f+this.one_minus_f_squared),u.phi=Math.atan(Math.sqrt(this.a*this.a-g*g)/(this.one_minus_f*g)),m&&(u.phi=-u.phi)}return u.lam+=this.long0,t.x=u.lam,t.y=u.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},er=[[1,2.2199e-17,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],nr=[[-5.20417e-18,.0124,1.21431e-18,-8.45284e-11],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],sr=.8487,or=1.3523,ar=to/5,rr=1/ar,hr=18,lr=function(t,i){return t[0]+i*(t[1]+i*(t[2]+i*t[3]))},ur=function(t,i){return t[1]+i*(2*t[2]+3*i*t[3])},cr={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var i=bo(t.x-this.long0),e=Math.abs(t.y),n=Math.floor(e*ar);n<0?n=0:n>=hr&&(n=hr-1),e=to*(e-rr*n);var s={x:lr(er[n],e)*i,y:lr(nr[n],e)};return t.y<0&&(s.y=-s.y),s.x=s.x*this.a*sr+this.x0,s.y=s.y*this.a*or+this.y0,s},inverse:function(t){var i={x:(t.x-this.x0)/(this.a*sr),y:Math.abs(t.y-this.y0)/(this.a*or)};if(i.y>=1)i.x/=er[hr][0],i.y=t.y<0?-Qs:Qs;else{var e=Math.floor(i.y*hr);for(e<0?e=0:e>=hr&&(e=hr-1);;)if(nr[e][0]>i.y)--e;else{if(!(nr[e+1][0]<=i.y))break;++e}var n=nr[e],s=5*(i.y-n[0])/(nr[e+1][0]-n[0]);s=Ce(function(t){return(lr(n,t)-i.y)/ur(n,t)},s,Ys,100),i.x/=lr(er[e],s),i.y=(5*e+s)*$s,t.y<0&&(i.y=-i.y)}return i.x=bo(i.x+this.long0),i},names:["Robinson","robin"]},dr={init:function(){this.name="geocent"},forward:function(t){return Vi(t,this.es,this.a)},inverse:function(t){return Qi(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]},pr={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},_r={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}},mr={init:function(){if(Object.keys(_r).forEach(function(t){if(void 0===this[t])this[t]=_r[t].def;else{if(_r[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);_r[t].num&&(this[t]=parseFloat(this[t]))}_r[t].degrees&&(this[t]=this[t]*$s)}.bind(this)),Math.abs(Math.abs(this.lat0)-Qs)<Ys?this.mode=this.lat0<0?pr.S_POLE:pr.N_POLE:Math.abs(this.lat0)<Ys?this.mode=pr.EQUIT:(this.mode=pr.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,i=this.azi;this.cg=Math.cos(i),this.sg=Math.sin(i),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var i,e,n=Math.sin(t.y),s=Math.cos(t.y),o=Math.cos(t.x);switch(this.mode){case pr.OBLIQ:e=this.sinph0*n+this.cosph0*s*o;break;case pr.EQUIT:e=s*o;break;case pr.S_POLE:e=-n;break;case pr.N_POLE:e=n}switch(e=this.pn1/(this.p-e),i=e*s*Math.sin(t.x),this.mode){case pr.OBLIQ:e*=this.cosph0*n-this.sinph0*s*o;break;case pr.EQUIT:e*=n;break;case pr.N_POLE:e*=-s*o;break;case pr.S_POLE:e*=s*o}var a,r;return a=e*this.cg+i*this.sg,r=1/(a*this.sw*this.h1+this.cw),i=(i*this.cg-e*this.sg)*this.cw*r,e=a*r,t.x=i*this.a,t.y=e*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var i,e,n,s={x:t.x,y:t.y};n=1/(this.pn1-t.y*this.sw),i=this.pn1*t.x*n,e=this.pn1*t.y*this.cw*n,t.x=i*this.cg+e*this.sg,t.y=e*this.cg-i*this.sg;var o=$o(t.x,t.y);if(Math.abs(o)<Ys)s.x=0,s.y=t.y;else{var a,r;switch(r=1-o*o*this.pfact,r=(this.p-Math.sqrt(r))/(this.pn1/o+o/this.pn1),a=Math.sqrt(1-r*r),this.mode){case pr.OBLIQ:s.y=Math.asin(a*this.sinph0+t.y*r*this.cosph0/o),t.y=(a-this.sinph0*Math.sin(s.y))*o,t.x*=r*this.cosph0;break;case pr.EQUIT:s.y=Math.asin(t.y*r/o),t.y=a*o,t.x*=r;break;case pr.N_POLE:s.y=Math.asin(a),t.y=-t.y;break;case pr.S_POLE:s.y=-Math.asin(a)}s.x=Math.atan2(t.x,t.y)}return t.x=s.x+this.long0,t.y=s.y,t},names:["Tilted_Perspective","tpers"]},fr={init:function(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,i=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=i,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var i,e,n,s,o=t.x,a=t.y;if(o-=this.long0,"ellipse"===this.shape){a=Math.atan(this.radius_p2*Math.tan(a));var r=this.radius_p/$o(this.radius_p*Math.cos(a),Math.sin(a));if(e=r*Math.cos(o)*Math.cos(a),n=r*Math.sin(o)*Math.cos(a),s=r*Math.sin(a),(this.radius_g-e)*e-n*n-s*s*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;i=this.radius_g-e,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/$o(s,i)),t.y=this.radius_g_1*Math.atan(s/i)):(t.x=this.radius_g_1*Math.atan(n/i),t.y=this.radius_g_1*Math.atan(s/$o(n,i)))}else"sphere"===this.shape&&(i=Math.cos(a),e=Math.cos(o)*i,n=Math.sin(o)*i,s=Math.sin(a),i=this.radius_g-e,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/$o(s,i)),t.y=this.radius_g_1*Math.atan(s/i)):(t.x=this.radius_g_1*Math.atan(n/i),t.y=this.radius_g_1*Math.atan(s/$o(n,i))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var i,e,n,s,o=-1,a=0,r=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*$o(1,r)):(a=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*$o(1,a));var h=r/this.radius_p;if(i=a*a+h*h+o*o,e=2*this.radius_g*o,(n=e*e-4*i*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=(-e-Math.sqrt(n))/(2*i),o=this.radius_g+s*o,a*=s,r*=s,t.x=Math.atan2(a,o),t.y=Math.atan(r*Math.cos(t.x)/o),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+r*r)):(a=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+a*a)),i=a*a+r*r+o*o,e=2*this.radius_g*o,(n=e*e-4*i*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=(-e-Math.sqrt(n))/(2*i),o=this.radius_g+s*o,a*=s,r*=s,t.x=Math.atan2(a,o),t.y=Math.atan(r*Math.cos(t.x)/o)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};ae.defaultDatum="WGS84",ae.Proj=Ui,ae.WGS84=new ae.Proj("WGS84"),ae.Point=be,ae.toPoint=No,ae.defs=bi,ae.nadgrid=function(t,i){var e=new DataView(i),n=Zi(e),s=ji(e,n);s.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var o={header:s,subgrids:Hi(e,s,n)};return zo[t]=o,o},ae.transform=ne,ae.mgrs=Wo,ae.version="__VERSION__",function(t){t.Proj.projections.add(Xo),t.Proj.projections.add(aa),t.Proj.projections.add(ha),t.Proj.projections.add(da),t.Proj.projections.add(pa),t.Proj.projections.add(_a),t.Proj.projections.add(fa),t.Proj.projections.add(ga),t.Proj.projections.add(va),t.Proj.projections.add(Ea),t.Proj.projections.add(Na),t.Proj.projections.add(Ba),t.Proj.projections.add(Za),t.Proj.projections.add(Da),t.Proj.projections.add(Ha),t.Proj.projections.add(Fa),t.Proj.projections.add(Ga),t.Proj.projections.add(Ua),t.Proj.projections.add(Va),t.Proj.projections.add(Qa),t.Proj.projections.add(Ka),t.Proj.projections.add(Ja),t.Proj.projections.add(Xa),t.Proj.projections.add(Ya),t.Proj.projections.add(ir),t.Proj.projections.add(cr),t.Proj.projections.add(dr),t.Proj.projections.add(mr),t.Proj.projections.add(fr)}(ae);var gr={};gr._isProj4Obj=function(t){return void 0!==t.inverse&&void 0!==t.forward},gr.Projection=L.extend({initialize:function(t,i,e){var n=gr._isProj4Obj(t);this._proj=n?t:this._projFromCodeDef(t,i),this.bounds=n?i:e},project:function(t){var i=new E(t.lng*$s,t.lat*$s);return this._proj.forward(i)},unproject:function(t){var i=new E(t.x,t.y);return this._proj.inverse(i),new O(i.y*to,i.x*to)},_projFromCodeDef:function(t,i){if(i)ae.defs(t,i);else if(void 0===ae.defs[t]){var e=t.split(":");if(e.length>3&&(t=e[e.length-3]+":"+e[e.length-1]),void 0===ae.defs[t])throw new Error("No projection definition for code "+t)}return new ae.Proj(t)}}),gr.CRS=L.extend({includes:Ue,distance:We.distance,R:We.R,options:{transformation:B(1,0,-1,0)},initialize:function(t,i,e){var n,s,o,a;if(gr._isProj4Obj(t)?(n=(s=t).srsCode,a=i||{},this.projection=new gr.Projection(s,a.bounds)):(n=t,o=i,a=e||{},this.projection=new gr.Projection(n,o,a.bounds)),u(this,a),this.code=n,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=B(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(var r=this.options.resolutions.length-1;r>=0;r--)this.options.resolutions[r]&&(this._scales[r]=1/this.options.resolutions[r])}this.infinite=!this.options.bounds},scale:function(t){var i,e,n,s,o=Math.floor(t);return t===o?this._scales[t]:(i=this._scales[o],e=this._scales[o+1],n=e-i,s=t-o,i+n*s)},zoom:function(t){var i,e,n,s=this._closestElement(this._scales,t),o=this._scales.indexOf(s);return t===s?o:void 0===s?-1/0:(e=o+1,void 0===(i=this._scales[e])?1/0:(n=i-s,(t-s)/n+o))},_closestElement:function(t,i){for(var e,n=t.length;n--;)t[n]<=i&&(void 0===e||e<t[n])&&(e=t[n]);return e}}),gr.GeoJSON=i({},Zs,{initialize:function(t,i){this._callLevel=0,Zs.prototype.initialize.call(this,t,i)},addData:function(t){var i;t&&(t.crs&&"name"===t.crs.type?i=new gr.CRS(t.crs.properties.name):t.crs&&t.crs.type&&(i=new gr.CRS(t.crs.type+":"+t.crs.properties.code)),void 0!==i&&(this.options.coordsToLatLng=function(t){var e=C(t[0],t[1]);return i.projection.unproject(e)})),this._callLevel++;try{Zs.prototype.addData.call(this,t)}finally{0===--this._callLevel&&delete this.options.coordsToLatLng}}}),gr.geoJson=function(t,i){return new gr.GeoJSON(t,i)},gr.ImageOverlay=i({},Hs,{initialize:function(t,i,e){Hs.prototype.initialize.call(this,t,null,e),this._projectedBounds=i},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=C(this._projectedBounds.min.x,this._projectedBounds.max.y),n=this._projectedToNewLayerPoint(e,t.zoom,t.center);At(this._image,n,i)},_reset:function(){var t=this._map.getZoom(),i=this._map.getPixelOrigin(),e=new S(this._transform(this._projectedBounds.min,t)._subtract(i),this._transform(this._projectedBounds.max,t)._subtract(i)),n=e.getSize();kt(this._image,e.min),this._image.style.width=n.x+"px",this._image.style.height=n.y+"px"},_projectedToNewLayerPoint:function(t,i,e){var n=this._map.getSize()._divideBy(2),s=this._map.project(e,i)._subtract(n)._round().add(this._map._getMapPanePos());return this._transform(t,i)._subtract(s)},_transform:function(t,i){var e=this._map.options.crs,n=e.transformation,s=e.scale(i);return n.transform(t,s)}}),gr.imageOverlay=function(t,i,e){return new gr.ImageOverlay(t,i,e)};var vr={project:function(t){return new E(t.lng,t.lat)},unproject:function(t){return new O(t.y,t.x)},bounds:new S([-180,-90],[180,90])},yr={R:6378137,R_MINOR:6356752.314245179,bounds:new S([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,e=this.R,n=t.lat*i,s=this.R_MINOR/e,o=Math.sqrt(1-s*s),a=o*Math.sin(n),r=Math.tan(Math.PI/4-n/2)/Math.pow((1-a)/(1+a),o/2);return n=-e*Math.log(Math.max(r,1e-10)),new E(t.lng*i*e,n)},unproject:function(t){for(var i,e=180/Math.PI,n=this.R,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),a=Math.exp(-t.y/n),r=Math.PI/2-2*Math.atan(a),h=0,l=.1;h<15&&Math.abs(l)>1e-7;h++)i=o*Math.sin(r),i=Math.pow((1-i)/(1+i),o/2),r+=l=Math.PI/2-2*Math.atan(a*i)-r;return new O(r*e,t.x*e/n)}},Mr=Object.freeze({LonLat:vr,Mercator:yr,SphericalMercator:Ve}),xr=i({},We,{code:"EPSG:3395",projection:yr,transformation:function(){var t=.5/(Math.PI*yr.R);return B(t,.5,-t,.5)}()}),br=i({},We,{code:"EPSG:4326",projection:vr,transformation:B(1/180,1,-1/180,.5)}),wr=i({},Ue,{projection:vr,transformation:B(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(e*e+n*n)},infinite:!0}),Tr=new gr.CRS("Baidu","+proj=merc +a=6378206 +b=6356584.314245179 +lat_ts=0.0 +lon_0=0.0 +x_0=0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs",{resolutions:function(){for(var t=[],i=0;i<24;i++)t[i]=Math.pow(2,18-i);return t}(),origin:[0,0],bounds:new S([20037508.342789244,-20037508.342789244],[-20037508.342789244,20037508.342789244])});Ue.Earth=We,Ue.EPSG3395=xr,Ue.EPSG3857=Ye,Ue.EPSG900913=$e,Ue.EPSG4326=br,Ue.Simple=wr,Ue.Baidu=Tr;var Lr={icon:function(t,i){var e={small:[20,50],medium:[30,70],large:[35,90]},n=(t=t||{})["marker-size"]||"medium",s="marker-symbol"in t&&""!==t["marker-symbol"]?"-"+t["marker-symbol"]:"-circle",o=(t["marker-color"]||"52a1d8").replace("#",""),a=!1===t.visibled?"bigemap-hidden":"";return si({iconUrl:Bt("/v2/marker/pin-"+n.charAt(0)+s+"+"+o+(Sn?"@2x":"")+".png",i&&i.accessToken),iconSize:e[n],iconAnchor:[e[n][0]/2,e[n][1]/2],popupAnchor:[0,-e[n][1]/2],className:a})},style:function(t,i,e){return oi(i,{icon:this.icon(t.properties,e),title:b(hs(t.properties&&t.properties.title||""))})},createPopup:function(t,i){if(!t||!t.properties)return"";var e="";return t.properties.title&&(e+='<div class="marker-title">'+t.properties.title+"</div>"),t.properties.description&&(e+='<div class="marker-description">'+t.properties.description+"</div>"),(i||hs)(e)}},Pr={stroke:"#3bb2d0","stroke-width":2,"stroke-opacity":1,fill:"#3bb2d0","fill-opacity":.2,visibled:!0},Er=[["stroke","color"],["stroke-width","weight"],["stroke-opacity","opacity"],["fill","fillColor"],["fill-opacity","fillOpacity"]],Cr={defaults:Pr,fallback:function(t,i){var e={};for(var n in i)void 0===t[n]?e[n]=i[n]:e[n]=t[n];return e},remap:function(t){for(var i={},e=0;e<Er.length;e++)i[Er[e][1]]=t[Er[e][0]];return i.className=!1===t.visibled?"bigemap-hidden":"",i},style:function(t){return this.remap(this.fallback(t.properties||{},Pr))}},Sr=Cs.extend({options:{filter:function(){return!0},sanitizer:hs,style:Cr,popupOptions:{closeButton:!1}},initialize:function(t,i){u(this,i),this._layers={},"string"==typeof t?v(t,this):t&&"object"==typeof t&&this.setGeoJSON(t)},setGeoJSON:function(t){return this._geojson=t,this.clearLayers(),this._initialize(t),this},getGeoJSON:function(){return this._geojson},loadURL:function(t){this._request&&"abort"in this._request&&this._request.abort();var i=jt();return this._request=Ht(i,e(function(n,s){if(n&&"abort"!==n.type)y("could not load Token at "+i),this.fire("error",{error:n});else if(s){BM.accessToken=s.token;var o=Bt("/v2/"+t+"/features",this.options.accessToken);Ht(o,e(function(t,i){this._request=null,t&&"abort"!==t.type?(y("could not load features at "+o),this.fire("error",{error:t})):i&&(this.setGeoJSON(i),this.fire("ready"))},this))}},this)),this},loadID:function(t){return this.loadURL(t)},setFilter:function(t){return this.options.filter=t,this._geojson&&(this.clearLayers(),this._initialize(this._geojson)),this},getFilter:function(){return this.options.filter},_initialize:function(t){var i,e,n=Be(t)?t:t.features;if(n)for(i=0,e=n.length;i<e;i++)(n[i].geometries||n[i].geometry||n[i].features)&&this._initialize(n[i]);else if(this.options.filter(t)){var s={accessToken:this.options.accessToken},o=this.options.pointToLayer||function(t,i){return Lr.style(t,i,s)},a=Zs.geometryToLayer(t,{pointToLayer:o,pane:this.options.pane}),r=Lr.createPopup(t,this.options.sanitizer),h=this.options.style,l=h===Cr;!(h&&"setStyle"in a)||l&&(a instanceof Ns||a instanceof Os)||("function"==typeof h.style&&(h=h.style(t)),a.setStyle(h)),a.feature=t,r&&a.bindPopup(r,this.options.popupOptions),this.addLayer(a)}}});ls.addInitHook(function(){this.options.featureLayer&&(this.featureLayer=Se(void 0,w(this.options.featureLayer,this.options.accessToken)),this.addLayer(this.featureLayer))});var Ar=Hs.extend({options:{autoplay:!0,loop:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:mt("video");if(wt(i,"bigemap-image-layer"),this._zoomAnimated&&wt(i,"bigemap-zoom-animated"),i.onselectstart=a,i.onmousemove=a,i.onloadeddata=e(this.fire,this,"load"),!t){Be(this._url)||(this._url=[this._url]),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop;for(var n=0;n<this._url.length;n++){var s=mt("source");s.src=this._url[n],i.appendChild(s)}}}}),kr=Ps.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,i){u(this,t),this._source=i},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&Et(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Et(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(Et(this._container,0),this._removeTimeout=setTimeout(e(ft,void 0,this._container),200)):ft(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=N(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&&vt(this._container),this},bringToBack:function(){return this._map&&yt(this._container),this},bringToFrontAt:function(t){return this._map&&Mt(this._container,t._container),this},bringToBackAt:function(t){return this._map&&xt(this._container,t._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,i="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof i)t.innerHTML=i;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(i)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),i=C(this.options.offset),e=this._getAnchor();this._zoomAnimated?kt(this._container,t.add(e)):i=i.add(t).add(e);var n=this._containerBottom=-i.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}}),zr=kr.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){kr.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Is||this._source.on("preclick",et))},onRemove:function(t){kr.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Is||this._source.off("preclick",et))},getEvents:function(){var t=kr.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="bigemap-popup",i=this._container=mt("div",t+" "+(this.options.className||"")+" bigemap-zoom-animated"),e=this._wrapper=mt("div",t+"-content-wrapper",i);if(this._contentNode=mt("div",t+"-content",e),st(e),nt(this._contentNode),Y(e,"contextmenu",et),this._tipContainer=mt("div",t+"-tip-container",i),this._tip=mt("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=mt("a",t+"-close-button",i);n.href="#close",n.innerHTML="&#215;",Y(n,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var e=t.offsetWidth;e=Math.min(e,this.options.maxWidth),e=Math.max(e,this.options.minWidth),i.width=e+1+"px",i.whiteSpace="",i.height="";var n=t.offsetHeight,s=this.options.maxHeight;s&&n>s?(i.height=s+"px",wt(t,"bigemap-popup-scrolled")):Tt(t,"bigemap-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();kt(this._container,i.add(e))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,i=parseInt(_t(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+i,n=this._containerWidth,s=new E(this._containerLeft,-e-this._containerBottom);s._add(zt(this._container));var o=t.layerPointToContainerPoint(s),a=C(this.options.autoPanPadding),r=C(this.options.autoPanPaddingTopLeft||a),h=C(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),u=0,c=0;o.x+n+h.x>l.x&&(u=o.x+n-l.x+h.x),o.x-u-r.x<0&&(u=o.x-r.x),o.y+e+h.y>l.y&&(c=o.y+e-l.y+h.y),o.y-c-r.y<0&&(c=o.y-r.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),at(t)},_getAnchor:function(){return C(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});ls.mergeOptions({closePopupOnClick:!0}),ls.include({openPopup:function(t,i,e){return t instanceof zr||(t=new zr(e).setContent(t)),i&&t.setLatLng(i),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}}),Ps.include({bindPopup:function(t,i){return t instanceof zr?(u(t,i),this._popup=t,t._source=this):(this._popup&&!i||(this._popup=new zr(i,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,i){if(t instanceof Ps||(i=t,t=this),t instanceof Cs)for(var e in this._layers){t=this._layers[e];break}return i||(i=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,i)),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 i=t.layer||t.target;this._popup&&this._map&&(at(t),i instanceof Is?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===i?this.closePopup():this.openPopup(i,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Ir=kr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){kr.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){kr.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=kr.prototype.getEvents.call(this);return Pn&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="bigemap-tooltip "+(this.options.className||"")+" bigemap-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=mt("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i=this._map,e=this._container,n=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(t),o=this.options.direction,a=e.offsetWidth,r=e.offsetHeight,h=C(this.options.offset),l=this._getAnchor();"top"===o?t=t.add(C(-a/2+h.x,-r+h.y+l.y,!0)):"bottom"===o?t=t.subtract(C(a/2-h.x,-h.y,!0)):"center"===o?t=t.subtract(C(a/2+h.x,r/2-l.y+h.y,!0)):"right"===o||"auto"===o&&s.x<n.x?(o="right",t=t.add(C(h.x+l.x,l.y-r/2+h.y,!0))):(o="left",t=t.subtract(C(a+l.x-h.x,r/2-l.y-h.y,!0))),Tt(e,"bigemap-tooltip-right"),Tt(e,"bigemap-tooltip-left"),Tt(e,"bigemap-tooltip-top"),Tt(e,"bigemap-tooltip-bottom"),wt(e,"bigemap-tooltip-"+o),kt(e,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Et(this._container,t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(i)},_getAnchor:function(){return C(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});ls.include({openTooltip:function(t,i,e){return t instanceof Ir||(t=new Ir(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Ps.include({bindTooltip:function(t,i){return t instanceof Ir?(u(t,i),this._tooltip=t,t._source=this):(this._tooltip&&!i||(this._tooltip=new Ir(i,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 i=t?"off":"on",e={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?e.add=this._openTooltip:(e.mouseover=this._openTooltip,e.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(e.mousemove=this._moveTooltip),Pn&&(e.click=this._openTooltip)),this[i](e),this._tooltipHandlersAdded=!t}},openTooltip:function(t,i){if(t instanceof Ps||(i=t,t=this),t instanceof Cs)for(var e in this._layers){t=this._layers[e];break}return i||(i=t.getCenter?t.getCenter():t.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=t,this._tooltip.update(),this._map.openTooltip(this._tooltip,i),this._tooltip.options.interactive&&this._tooltip._container&&(wt(this._tooltip._container,"bigemap-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(Tt(this._tooltip._container,"bigemap-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 i=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(i,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var i,e,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),e=this._map.containerPointToLayerPoint(i),n=this._map.layerPointToLatLng(e)),this._tooltip.setLatLng(n)}});var Or=Ss.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"bigemap-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:document.createElement("div"),e=this.options;if(i.innerHTML=!1!==e.html?e.html:"",e.bgPos){var n=C(e.bgPos);i.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}});Ss.Default=As;var Nr=Ps.extend({options:{tileSize:256,opacity:1,updateWhenIdle:xn,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){u(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(),ft(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=null},bringToFront:function(){return this._map&&(vt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(yt(this._container),this._setAutoZIndex(Math.min)),this},bringToFrontAt:function(t){return this._map&&(Mt(this._container,t._container),this._setAutoZIndex(Math.max)),this},bringToBackAt:function(t){return this._map&&(yt(this._container,t._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=s(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 E?t:new E(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 i,e=this.getPane().children,n=-t(-1/0,1/0),s=0,o=e.length;s<o;s++)i=e[s].style.zIndex,e[s]!==this._container&&i&&(n=t(n,+i));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!nn){Et(this._container,this.options.opacity);var t=+new Date,i=!1,e=!1;for(var n in this._tiles){var s=this._tiles[n];if(s.current&&s.loaded){var o=Math.min(1,(t-s.loaded)/200);Et(s.el,o),o<1?i=!0:(s.active?e=!0:this._onOpaqueTile(s),s.active=!0)}}e&&!this._noPrune&&this._pruneTiles(),i&&(f(this._fadeFrame),this._fadeFrame=m(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=mt("div","bigemap-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,i=this.options.maxZoom;if(void 0!==t){for(var e in this._levels)this._levels[e].el.children.length||e===t?(this._levels[e].el.style.zIndex=i-Math.abs(t-e),this._onUpdateLevel(e)):(ft(this._levels[e].el),this._removeTilesAtZoom(e),this._onRemoveLevel(e),delete this._levels[e]);var n=this._levels[t],s=this._map;return n||((n=this._levels[t]={}).el=mt("div","bigemap-tile-container bigemap-zoom-animated",this._container),n.el.style.zIndex=i,n.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,s.getCenter(),s.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,i,e=this._map.getZoom();if(e>this.options.maxZoom||e<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(i=this._tiles[t]).retain=i.current;for(t in this._tiles)if((i=this._tiles[t]).current&&!i.active){var n=i.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var i in this._tiles)this._tiles[i].coords.z===t&&this._removeTile(i)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ft(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=null},_retainParent:function(t,i,e,n){var s=Math.floor(t/2),o=Math.floor(i/2),a=e-1,r=new E(+s,+o);r.z=+a;var h=this._tileCoordsToKey(r),l=this._tiles[h];return l&&l.active?(l.retain=!0,!0):(l&&l.loaded&&(l.retain=!0),a>n&&this._retainParent(s,o,a,n))},_retainChildren:function(t,i,e,n){for(var s=2*t;s<2*t+2;s++)for(var o=2*i;o<2*i+2;o++){var a=new E(s,o);a.z=e+1;var r=this._tileCoordsToKey(a),h=this._tiles[r];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),e+1<n&&this._retainChildren(s,o,e+1,n))}},_resetView:function(t){var i=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var i=this.options;return void 0!==i.minNativeZoom&&t<i.minNativeZoom?i.minNativeZoom:void 0!==i.maxNativeZoom&&i.maxNativeZoom<t?i.maxNativeZoom:t},_setView:function(t,i,e,n){var s=this._clampZoom(Math.round(i));(void 0!==this.options.maxZoom&&s>this.options.maxZoom||void 0!==this.options.minZoom&&s<this.options.minZoom)&&(s=void 0);var o=this.options.updateWhenZooming&&s!==this._tileZoom;n&&!o||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&this._update(t),e||this._pruneTiles(),this._noPrune=!!e),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var e in this._levels)this._setZoomTransform(this._levels[e],t,i)},_setZoomTransform:function(t,i,e){var n=this._map.getZoomScale(e,t.zoom),s=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(i,e)).round();Mn?At(t.el,s,n):kt(t.el,s)},_resetGrid:function(){var t=this._map,i=t.options.crs,e=this._tileSize=this.getTileSize(),n=this._tileZoom,s=this._map.getPixelWorldBounds(this._tileZoom);s&&(this._globalTileRange=this._pxBoundsToTileRange(s)),this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,i.wrapLng[0]],n).x/e.x),Math.ceil(t.project([0,i.wrapLng[1]],n).x/e.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],n).y/e.x),Math.ceil(t.project([i.wrapLat[1],0],n).y/e.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,e=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),n=i.getZoomScale(e,this._tileZoom),s=i.project(t,this._tileZoom).floor(),o=i.getSize().divideBy(2*n);return new S(s.subtract(o),s.add(o))},_update:function(t){var i=this._map;if(i){var e=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(n),o=s.getCenter(),a=[],r=this.options.keepBuffer,h=new S(s.getBottomLeft().subtract([r,-r]),s.getTopRight().add([r,-r]));if(!(isFinite(s.min.x)&&isFinite(s.min.y)&&isFinite(s.max.x)&&isFinite(s.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var l in this._tiles){var u=this._tiles[l].coords;u.z===this._tileZoom&&h.contains(new E(u.x,u.y))||(this._tiles[l].current=!1)}if(Math.abs(e-this._tileZoom)>1)this._setView(t,e);else{for(var c=s.min.y;c<=s.max.y;c++)for(var d=s.min.x;d<=s.max.x;d++){var p=new E(d,c);if(p.z=this._tileZoom,this._isValidTile(p)){var _=this._tiles[this._tileCoordsToKey(p)];_?_.current=!0:a.push(p)}}if(a.sort(function(t,i){return t.distanceTo(o)-i.distanceTo(o)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<a.length;d++)this._addTile(a[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var i=this._map.options.crs;if(!i.infinite){var e=this._globalTileRange;if(!i.wrapLng&&(t.x<e.min.x||t.x>e.max.x)||!i.wrapLat&&(t.y<e.min.y||t.y>e.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return z(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToBounds:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),s=n.add(e),o=new k(i.unproject(n,t.z),i.unproject(s,t.z));return this.options.noWrap||(o=i.wrapLatLngBounds(o)),o},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new E(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(ln||i.el.setAttribute("src",Ze),ft(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){wt(t,"bigemap-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=a,t.onmousemove=a,nn&&this.options.opacity<1&&Et(t,this.options.opacity),an&&!rn&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,i){var n=this._getTilePos(t),s=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),e(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&m(e(this._tileReady,this,t,null,o)),kt(o,n),this._tiles[s]={el:o,coords:t,current:!0},i.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,i,n){if(this._map){i&&this.fire("tileerror",{error:i,tile:n,coords:t});var s=this._tileCoordsToKey(t);(n=this._tiles[s])&&(n.loaded=+new Date,this._map._fadeAnimated?(Et(n.el,0),f(this._fadeFrame),this._fadeFrame=m(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),i||(wt(n.el,"bigemap-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),nn||!this._map._fadeAnimated?m(this._pruneTiles,this):setTimeout(e(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new E(this._wrapX?o(t.x,this._wrapX):t.x,this._wrapY?o(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new S(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Rr=Nr.extend({includes:[os],options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,combineMode:"combine"},formats:["png","jpg","png32","png64","png128","png256","jpg70","jpg80","jpg90"],scalePrefix:"@2x.",initialize:function(t,i){(i=u(this,i)).detectRetina&&Sn&&i.maxZoom>0&&(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom++):(i.zoomOffset++,i.maxZoom--),i.minZoom=Math.max(0,i.minZoom)),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),an||this.on("tileunload",this._onTileRemove),this._tilejson={},i&&i.format&&x(i.format,this.formats),this._loadTileJSON(t)},setUrl:null,_setTileJSON:function(t){M(t,"object"),this.options.format=t.format,t.tiles||(t.tiles=[t.tms]);var e=t.zoomoffset?t.zoomoffset:0;return i(this.options,{name:t.name,tiles:t.tiles,attribution:t.attribution,minZoom:t.minzoom-e,maxZoom:t.maxzoom-e,tms:"tms"===t.scheme,bounds:t.bounds&&I(t.bounds),zoomOffset:e}),this._tilejson=t,this.redraw(),this},getTileJSON:function(){return this._tilejson},createTile:function(t,i){var n=document.createElement("img");return Y(n,"load",e(this._tileOnLoad,this,i,n)),Y(n,"error",e(this._tileOnError,this,i,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={layer:this.options.name,r:Sn?"@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._globalTileRange.min.y;this.options.tms&&(e.y=n),e["-y"]=n}var s=this.options.tiles;return c(s[Math.floor(Math.abs(t.x+t.y)%s.length)],i(e,this.options))},_update:function(){this.options.tiles&&Nr.prototype._update.call(this)},_tileOnLoad:function(t,i){nn?setTimeout(e(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var n=this.options.errorTileUrl;n&&i.getAttribute("src")!==n&&(i.src=n),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,i=this.options.maxZoom,e=this.options.zoomReverse,n=this.options.zoomOffset;return e&&(t=i-t),t+n},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=a,i.onerror=a,i.complete||(i.src=Ze,ft(i),delete this._tiles[t]))}});ls.addInitHook(function(){this.options.tileLayer&&(this.tileLayer=Ae(void 0,w(this.options.tileLayer,this.options.accessToken)),this.addLayer(this.tileLayer))});var Br=Ps.extend({options:{padding:.1},initialize:function(t){u(this,t),n(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&wt(this._container,"bigemap-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var e=this._map.getZoomScale(i,this._zoom),n=zt(this._container),s=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,i),a=this._map.project(t,i).subtract(o),r=s.multiplyBy(-e).add(n).add(s).subtract(a);Mn?At(this._container,r,e):kt(this._container,r)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new S(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Zr=Br.extend({getEvents:function(){var t=Br.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Br.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Y(t,"mousemove",s(this._onMouseMove,32,this),this),Y(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Y(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){delete this._ctx,ft(this._container),$(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(var t in this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={},Br.prototype._update.call(this);var t=this._bounds,i=this._container,e=t.getSize(),n=Sn?2:1;kt(i,t.min),i.width=n*e.x,i.height=n*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",Sn&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Br.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[n(t)]=t;var i=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,n=i.prev;e?e.prev=n:this._drawLast=n,n?n.next=e:this._drawFirst=e,delete t._order,delete this._layers[BM.stamp(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(t.options.dashArray){var i,e=t.options.dashArray.split(","),n=[];for(i=0;i<e.length;i++)n.push(Number(e[i]));t.options._dashArray=n}else delete t.options._dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||m(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var i=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new S,this._redrawBounds.extend(t._pxBounds.min.subtract([i,i])),this._redrawBounds.extend(t._pxBounds.max.add([i,i]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var i=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,i.x,i.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,i=this._redrawBounds;if(this._ctx.save(),i){var e=i.getSize();this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,e.x,e.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,i){if(this._drawing&&!1!==t.options.visibled){var e,n,s,o,a=t._parts,r=a.length,h=this._ctx;if(r){for(this._drawnLayers[t._bigemap_id]=t,h.beginPath(),e=0;e<r;e++){for(n=0,s=a[e].length;n<s;n++)o=a[e][n],h[n?"lineTo":"moveTo"](o.x,o.y);i&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()&&!1!==t.options.visibled){var i=t._point,e=this._ctx,n=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||n)/n;this._drawnLayers[t._bigemap_id]=t,1!==s&&(e.save(),e.scale(1,s)),e.beginPath(),e.arc(i.x,i.y/s,n,0,2*Math.PI,!1),1!==s&&e.restore(),this._fillStroke(e,t)}},_fillStroke:function(t,i){var e=i.options;e.fill&&(t.globalAlpha=e.fillOpacity,t.fillStyle=e.fillColor||e.color,t.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=e.opacity,t.lineWidth=e.weight,t.strokeStyle=e.color,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.stroke())},_onClick:function(t){for(var i,e=this._map.mouseEventToLayerPoint(t),n=[],s=this._drawFirst;s;s=s.next)!1!==(i=s.layer).options.visibled&&i.options.interactive&&i._containsPoint(e)&&!this._map._draggableMoved(i)&&n.push(i);n.length>0&&(lt(t),this.options.multiSelection||(n=n.slice(-1)),this._fireEvent(n,t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var i=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,i)}},_handleMouseOut:function(t){var i=this._hoveredLayer;i&&(Tt(this._container,"bigemap-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,i){for(var e,n,s=this._drawFirst;s;s=s.next)(e=s.layer).options.interactive&&e._containsPoint(i)&&(n=e);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(wt(this._container,"bigemap-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,i,e){this._map._fireDOMEvent(i,e||i.type,t)},_bringToFront:function(t){var i=t._order,e=i.next,n=i.prev;e&&(e.prev=n,n?n.next=e:e&&(this._drawFirst=e),i.prev=this._drawLast,this._drawLast.next=i,i.next=null,this._drawLast=i,this._requestRedraw(t))},_bringToBack:function(t){var i=t._order,e=i.next,n=i.prev;n&&(n.next=e,e?e.prev=n:n&&(this._drawLast=n),i.prev=null,i.next=this._drawFirst,this._drawFirst.prev=i,this._drawFirst=i,this._requestRedraw(t))},_bringToFrontAt:function(t,i){var e=t._order,n=e.next,s=e.prev,o=i._order,a=o.next;a!==e&&(n?n.prev=s:this._drawLast=s,s?s.next=n:n&&(this._drawFirst=n),a?(a.prev=e,e.next=a):(e.next=null,this._drawLast=e),e.prev=o,o.next=e,this._requestRedraw(t))},_bringToBackAt:function(t,i){var e=t._order,n=e.next,s=e.prev,o=i._order,a=o.prev;a!==e&&(s?s.next=n:this._drawFirst=n,n?n.prev=s:s&&(this._drawLast=s),a?(a.next=e,e.prev=a):(e.prev=null,this._drawFirst=e),o.prev=e,e.next=o,this._requestRedraw(t))}}),jr=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">')}}}(),Dr={_initContainer:function(){this._container=mt("div","bigemap-vml-container")},_update:function(){this._map._animatingZoom||(Br.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=jr("shape");wt(i,"bigemap-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=jr("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;ft(i),t.removeInteractiveTarget(i),delete this._layers[n(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(i||(i=t._stroke=jr("stroke")),s.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=Be(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(s.removeChild(i),t._stroke=null),n.fill?(e||(e=t._fill=jr("fill")),s.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(s.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){vt(t._container)},_bringToBack:function(t){yt(t._container)},_bringToFrontAt:function(t,i){Mt(t._container,i._container)},_bringToBackAt:function(t,i){xt(t._container,i._container)}},Hr=zn?jr:Z,qr=Br.extend({getEvents:function(){var t=Br.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=Hr("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Hr("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ft(this._container),$(this._container),delete this._container,delete this._rootGroup},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Br.prototype._update.call(this);var t=this._bounds,i=t.getSize(),e=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),kt(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=Hr("path");t.options.className&&wt(i,t.options.className),t.options.interactive&&wt(i,"bigemap-interactive"),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ft(t._path),t.removeInteractiveTarget(t._path),delete this._layers[n(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"),!1===e.visibled?wt(i,"bigemap-hidden"):Tt(i,"bigemap-hidden"))},_updatePoly:function(t,i){this._setPath(t,j(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,s)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){vt(t._path)},_bringToBack:function(t){yt(t._path)},_bringToFrontAt:function(t,i){Mt(t._path,i._path)},_bringToBackAt:function(t,i){xt(t._path,i._path)}});zn&&qr.include(Dr),ls.include({getRenderer:function(t){var i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return i||(i=this._renderer=this.options.preferCanvas&&ke({multiSelection:this.options.multiSelection})||ze()),this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=qr&&ze({pane:t})||Zr&&ke({pane:t,multiSelection:this.options.multiSelection}),this._paneRenderers[t]=i),i}});var Fr=Bs.extend({initialize:function(t,i){Bs.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=z(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});qr.create=Hr,qr.pointsToPath=j,Zs.geometryToLayer=ai,Zs.coordsToLatLng=ri,Zs.coordsToLatLngs=hi,Zs.latLngToCoords=li,Zs.latLngsToCoords=ui,Zs.getFeature=ci,Zs.asFeature=di,ls.mergeOptions({boxZoom:!0});var Gr=vs.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(){Y(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){$(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ft(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(),Ke(),It(),this._startPoint=this._map.mouseEventToContainerPoint(t),Y(document,{contextmenu:at,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=mt("div","bigemap-zoom-box",this._container),wt(this._container,"bigemap-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new S(this._point,this._startPoint),e=i.getSize();kt(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(ft(this._box),Tt(this._container,"bigemap-crosshair")),Je(),Ot(),$(document,{contextmenu:at,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(e(this._resetState,this),0);var i=new k(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});ls.addInitHook("addHandler","boxZoom",Gr),ls.mergeOptions({doubleClickZoom:!0});var Ur=vs.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,s=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(s):i.setZoomAround(t.containerPoint,s)}});ls.addInitHook("addHandler","doubleClickZoom",Ur),ls.mergeOptions({dragging:!0,inertia:!rn,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Wr=vs.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ws(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))}wt(this._map._container,"bigemap-grab bigemap-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Tt(this._map._container,"bigemap-grab"),Tt(this._map._container,"bigemap-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var i=z(this._map.options.maxBounds);this._offsetLimit=A(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(i),this._prunePositions(i)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit;t.x<i.min.x&&(t.x=this._viscousLimit(t.x,i.min.x)),t.y<i.min.y&&(t.y=this._viscousLimit(t.y,i.min.y)),t.x>i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,s=(n-i+e)%t+i-e,o=(n+i+e)%t-i-e,a=Math.abs(s+e)<Math.abs(o+e)?s:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var i=this._map,e=i.options,n=!e.inertia||this._times.length<2;if(i.fire("dragend",t),n)i.fire("moveend");else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,a=e.easeLinearity,r=s.multiplyBy(a/o),h=r.distanceTo([0,0]),l=Math.min(e.inertiaMaxSpeed,h),u=r.multiplyBy(l/h),c=l/(e.inertiaDeceleration*a),d=u.multiplyBy(-c/2).round();d.x||d.y?(d=i._limitOffset(d,i.options.maxBounds),m(function(){i.panBy(d,{duration:c,easeLinearity:a,noMoveStart:!0,animate:!0})})):i.fire("moveend")}}});ls.addInitHook("addHandler","dragging",Wr),ls.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Vr=vs.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"),Y(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(),$(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,i=document.documentElement,e=t.scrollTop||i.scrollTop,n=t.scrollLeft||i.scrollLeft;this._map._container.focus(),window.scrollTo(n,e)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var i,e,n=this._panKeys={},s=this.keyCodes;for(i=0,e=s.left.length;i<e;i++)n[s.left[i]]=[-1*t,0];for(i=0,e=s.right.length;i<e;i++)n[s.right[i]]=[t,0];for(i=0,e=s.down.length;i<e;i++)n[s.down[i]]=[0,t];for(i=0,e=s.up.length;i<e;i++)n[s.up[i]]=[0,-1*t]},_setZoomDelta:function(t){var i,e,n=this._zoomKeys={},s=this.keyCodes;for(i=0,e=s.zoomIn.length;i<e;i++)n[s.zoomIn[i]]=t;for(i=0,e=s.zoomOut.length;i<e;i++)n[s.zoomOut[i]]=-t},_addHooks:function(){Y(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){$(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var i,e=t.keyCode,n=this._map;if(e in this._panKeys){if(n._panAnim&&n._panAnim._inProgress)return;i=this._panKeys[e],t.shiftKey&&(i=C(i).multiplyBy(3)),n.panBy(i),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds)}else if(e in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if(27!==e||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}at(t)}}});ls.addInitHook("addHandler","keyboard",Vr),ls.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Qr=vs.extend({addHooks:function(){Y(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){$(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var i=ht(t),n=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var s=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(e(this._performZoom,this),s),at(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),e=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),s=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,o=e?Math.ceil(s/e)*e:s,a=t._limitZoom(i+(this._delta>0?o:-o))-i;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(i+a):t.setZoomAround(this._lastMousePos,i+a))}});ls.addInitHook("addHandler","scrollWheelZoom",Qr),ls.mergeOptions({tap:!0,tapTolerance:15});var Kr=vs.extend({addHooks:function(){Y(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){$(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(ot(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new E(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&wt(n,"bigemap-active"),this._holdTimeout=setTimeout(e(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),this._simulateEvent("mousedown",i),Y(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),$(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],e=i.target;e&&e.tagName&&"a"===e.tagName.toLowerCase()&&Tt(e,"bigemap-active"),this._simulateEvent("mouseup",i),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var i=t.touches[0];this._newPos=new E(i.clientX,i.clientY),this._simulateEvent("mousemove",i)},_simulateEvent:function(t,i){var e=document.createEvent("MouseEvents");e._simulated=!0,i.target._simulatedClick=!0,e.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),i.target.dispatchEvent(e)}});Pn&&!Ln&&ls.addInitHook("addHandler","tap",Kr),ls.mergeOptions({touchZoom:Pn&&!rn,bounceAtZoomLimits:!0});var Jr=vs.extend({addHooks:function(){wt(this._map._container,"bigemap-touch-zoom"),Y(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Tt(this._map._container,"bigemap-touch-zoom"),$(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(e.add(n)._divideBy(2))),this._startDist=e.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),Y(document,"touchmove",this._onTouchMove,this),Y(document,"touchend",this._onTouchEnd,this),ot(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,n=i.mouseEventToContainerPoint(t.touches[0]),s=i.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(s)/this._startDist;if(this._zoom=i.getScaleZoom(o,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&o<1||this._zoom>i.getMaxZoom()&&o>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var a=n._add(s)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===a.x&&0===a.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(i._moveStart(!0),this._moved=!0),f(this._animRequest);var r=e(i._move,i,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=m(r,this,!0),ot(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,f(this._animRequest),$(document,"touchmove",this._onTouchMove),$(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}});ls.addInitHook("addHandler","touchZoom",Jr),ls.BoxZoom=Gr,ls.DoubleClickZoom=Ur,ls.Drag=Wr,ls.Keyboard=Vr,ls.ScrollWheelZoom=Qr,ls.Tap=Kr,ls.TouchZoom=Jr;var Xr=window.BM;window.BM=t,Object.freeze=Ie,t.version="2.1.0+doc-translated.fa4f6f5",t.noConflict=function(){return window.BM=Xr,this},t.Control=us,t.control=cs,t.Browser=In,t.Evented=Ge,t.Mixin=ys,t.Util=qe,t.Class=L,t.Handler=vs,t.extend=i,t.bind=e,t.stamp=n,t.setOptions=u,t.DomEvent=Qn,t.DomUtil=is,t.PosAnimation=as,t.Draggable=ws,t.LineUtil=Ts,t.PolyUtil=Ls,t.Point=E,t.point=C,t.Bounds=S,t.bounds=A,t.Transformation=R,t.transformation=B,t.Projection=Mr,t.LatLng=O,t.latLng=N,t.LatLngBounds=k,t.latLngBounds=z,t.Proj=gr,t.CRS=Ue,t.GeoJSON=Zs,t.geoJSON=pi,t.geoJson=Ds,t.Layer=Ps,t.LayerGroup=Es,t.layerGroup=function(t){return new Es(t)},t.FeatureGroup=Cs,t.featureGroup=function(t){return new Cs(t)},t.FeatureLayer=Sr,t.featureLayer=Se,t.ImageOverlay=Hs,t.imageOverlay=function(t,i,e){return new Hs(t,i,e)},t.VideoOverlay=Ar,t.videoOverlay=function(t,i,e){return new Ar(t,i,e)},t.DivOverlay=kr,t.Popup=zr,t.popup=function(t,i){return new zr(t,i)},t.Tooltip=Ir,t.tooltip=function(t,i){return new Ir(t,i)},t.Icon=Ss,t.icon=si,t.DivIcon=Or,t.divIcon=function(t){return new Or(t)},t.Marker=zs,t.marker=oi,t.TileLayer=Rr,t.tileLayer=Ae,t.GridLayer=Nr,t.gridLayer=function(t){return new Nr(t)},t.SVG=qr,t.svg=ze,t.Renderer=Br,t.Canvas=Zr,t.canvas=ke,t.Path=Is,t.CircleMarker=Os,t.circleMarker=function(t,i){return new Os(t,i)},t.Circle=Ns,t.circle=function(t,i,e){return new Ns(t,i,e)},t.Polyline=Rs,t.polyline=function(t,i){return new Rs(t,i)},t.Polygon=Bs,t.polygon=function(t,i){return new Bs(t,i)},t.Rectangle=Fr,t.rectangle=function(t,i){return new Fr(t,i)},t.Map=ls,t.map=function(t,i,e){return new ls(t,i,e)},t.Config=es,t.MarkerUtil=Lr,t.SimpleStyle=Cr});