function createMap(n,t){return new L.map(n,{minZoom:t.minZoom,maxZoom:t.maxZoom,scrollWheelZoom:t.scrollWheelZoom,dragging:t.dragging,zoomControl:t.zoomControl,doubleClickZoom:t.doubleClickZoom,worldCopyJump:t.worldCopyJump})}function createMapTileLayer(n){return new L.tileLayer(n.Url,{attribution:n.attribution,opacity:n.opacity,bounds:n.bounds,noWrap:n.noWrap,continuousWorld:n.continuousWorld})}function createGeoJsonLayer(n){return new L.GeoJSON.AJAX(n.jsonUrl,{style:function(){return{color:n.color,weight:n.weight,opacity:n.opacity,fillColor:n.fillColor,fillOpacity:n.opacity}}})}function createCurvedPath(n,t){return new L.curve(["M",n,"Q",midPointLatLng(n,t),t],curvedPathOptions)}function midPointLatLng(n,t){let i=t[1]-n[1],r=t[0]-n[0],o=Math.sqrt(Math.pow(i,2)+Math.pow(r,2)),s=Math.atan2(r,i),u=3.14/10,f=o/2/Math.cos(u),e=s+u,h=f*Math.cos(e)+n[1],c=f*Math.sin(e)+n[0];return[c,h]}function popUpModalRowContent(n,t,i,r,u){let f=null,e=null,o=null,s=null;return t&&(t.top&&(f=t.top),t.left&&(e=t.left),t.bottom&&(o=t.bottom),t.right&&(s=t.right)),u===!0?n='<a class="btn btn-sm btn-sq btn-info" href="'+addHttp(n)+'" target="_blank">More Info...<\/a>':i&&(n="<h"+i+">"+n+"<\/h"+i+">"),'<div class="row" style="word-break: break-all;'+(r?"text-align: "+r+";":"")+(f?"padding-top: "+f+"px;":"")+(e?"padding-left: "+e+"px;":"")+(o?"padding-bottom: "+o+"px;":"")+(s?"padding-right: "+s+"px;":"")+'"><div class="col-md-12 col-lg-12 col-12 col-xs-12">'+n+"<\/div><\/div>"}function removeLeafletMapMarkersAndCurvedPaths(n,t,i){n&&(t&&($.each(t,function(t,i){let r=i.getPopup();r&&r.isOpen()&&i.closePopup();n.removeLayer(i)}),t=[]),i&&($.each(i,function(t,i){n.removeLayer(i)}),i=[]))}function markMap(n,t,i){let r=L.icon({iconUrl:t.icon.url,iconSize:t.icon.size}),u=L.marker([t.lat,t.lng],{icon:r,opacity:.5}).addTo(n);i&&i.push(u)}function getMarkerIconUrl(n,t){let i=baseUrl;return i+(t?"Content/leaflet/images/small-white-circle.png":n?"Content/leaflet/images/small-green-circle.png":"Content/leaflet/images/small-blue-circle.png")}function getOpenedPopupMarkerIconUrl(n){let t=baseUrl;return t+(n?"Content/leaflet/images/medium-green-circle.png":"Content/leaflet/images/medium-blue-circle.png")}function markFlowMapCanvas(n,t,i){let r={type:"FeatureCollection",features:[]};$.each(t,function(n,t){let i={type:"Feature",properties:{s_id:t.fromLabId,s_lat:t.fromLatLng[0],s_lon:t.fromLatLng[1],d_id:t.toLabId,d_lat:t.toLatLng[0],d_lon:t.toLatLng[1]},geometry:{type:"Point"}};r.features.push(i)});let u=L.canvasFlowmapLayer(r,{originAndDestinationFieldIds:{originUniqueIdField:"s_id",originGeometry:{x:"s_lon",y:"s_lat"},destinationUniqueIdField:"d_id",destinationGeometry:{x:"d_lon",y:"d_lat"}},pathDisplayMode:"selection",animationStarted:!0,animationEasingFamily:"Cubic",animationEasingType:"In",animationDuration:2e3}).addTo(n);i.push(u);for(let n=0;n<t.length;n++)u.selectFeaturesForPathDisplayById("s_id",n,!0,"SELECTION_ADD")}function getCountryId(){return parseInt($("#dropdownCountries").data("kendoDropDownList").value()==""?0:$("#dropdownCountries").data("kendoDropDownList").value())}function addInputSearchLaboratoryDropDownEvent(){let n=$("#inputSearchLaboratory");n.keydown(function(n){n.keyCode==13&&$("#btnSearchLaboratoryLocations").click()})}function onOpenLaboratoryTypes(){if(laboratoryTypesFirstLoad){$.ajax({async:!1,type:"get",dataType:"json",headers:headers,url:baseUrl+"Home/GetLaboratoryTypesList",success:function(n){laboratoryTypesViewModel=n}});let n=$("#dropdownLaboratoryTypes").data("kendoDropDownList");n.setDataSource(laboratoryTypesViewModel);laboratoryTypesFirstLoad=!1}}function setCountriesDropdownDataSource(n){let t=$("#dropdownCountries").data("kendoDropDownList");t.setDataSource(n);$("#dropdownCountries").data("kendoDropDownList").select(0);reloadCountries=!0}function onOpenCountries(){let n=getCountryId();$.ajax({async:!1,type:"get",dataType:"json",headers:headers,url:baseUrl+"Home/GetCountriesList",success:function(n){countriesViewModel=n}});setCountriesDropdownDataSource(countriesViewModel);$("#dropdownCountries").data("kendoDropDownList").value(n)}function legendRemove(n){let t=n.name;interactiveMap.removeControl(interactiveMapLegend)}function getLaboratoryMapInformation(n,t,i){let r,f=0,e=0;removeLeafletMapMarkersAndCurvedPaths(interactiveMap,interactiveMapMarkers);n!==null&&($.ajax({async:!1,data:{laboratoryId:n,laboratoryType:t,countryId:i},type:"get",dataType:"json",headers:headers,url:baseUrl+"Home/GetLaboratoryMapInformation",success:function(n){r=n}}),bindPopUps(r),f=r.filter(function(n){return n.IsGSRIS===!0}).length,e=r.filter(function(n){return n.IsGSRIS===!1}).length);let u={lat:defaultInteractiveMapView.lat,lng:defaultInteractiveMapView.lng,zoomLevel:defaultInteractiveMapView.zoomLevel};r.length>0&&r[0].Latitude>0&&r[0].Longitude>0&&(n>0&&r[0].Latitude!==0&&r[0].Longitude!==0?(u.lat=r[0].Latitude,u.lng=r[0].Longitude,u.zoomLevel=6):(r[0].Latitude===0&&r[0].Longitude===0||i>0)&&(u.lat=r[0].CountryLatitude,u.lng=r[0].CountryLongitude,u.zoomLevel=3));setMapView(u);setLegendInfo(f,e)}function setLegendInfo(n,t){interactiveMap.removeControl(interactiveMapLegend);this.gsrisCount=n;this.nonGsrisCount=t;interactiveMap.addControl(interactiveMapLegend)}function bindPopUps(n){let t={closeButton:!1,minWidth:100};$.each(n,function(n,i){let e=L.icon({iconUrl:getMarkerIconUrl(i.IsGSRIS),iconSize:[13,13]}),l=L.icon({iconUrl:getOpenedPopupMarkerIconUrl(i.IsGSRIS),iconSize:[20,20]}),u=0,f=0;if(i.Latitude===0&&i.Longitude===0?(u=i.CountryLatitude,f=i.CountryLongitude):(u=i.Latitude,f=i.Longitude),u===0&&f===0)return!0;let r=L.marker([u,f],{icon:e,opacity:.5}).addTo(interactiveMap),w=i.Country===null?"":i.Country,o=i.Address1!==""&&i.Address1!==null?i.Address1:"",s=i.Address2!==""&&i.Address2!==null?i.Address2:"",a=i.City!==""&&i.City!==null?i.City:"",v=o+(o===""?s:", "+s)+(o===""&&s===""?"":" ")+a,y=i.Websitea===""||i.Website===null?"":'<div class="row map-pop-up-row-content-container"><a href="'+addHttp(i.Website)+'" target="_blank">'+i.Website+"<\/a><\/div>",c=i.SMTA===null||i.SMTA===""?"":"http://www.who.int/"+i.SMTA,h="";c!==""&&(h='<a class="map-pop-up-shipments-link" target="_blank" href="'+c+'">SMTA<\/a>');let p='<div class="container map-pop-up-container"><div class="row map-pop-up-title-container '+(i.IsGSRIS?"map-pop-up-title-container-gsris-color":"map-pop-up-title-container-non-gsris-color")+'"><h5 class="map-pop-up-title-text">'+i.LabNameShort+'<\/h5><\/div><div class="row"><p class="map-pop-up-lab-id-display">'+i.LabIDDisplay+'<\/p><\/div><div class="row map-pop-up-row-content-container"<p>'+i.LabName+"<\/p><p>("+i.LabNameShort+')<\/p><\/div><div class="row map-pop-up-content-empty-row"><\/div><div class="row map-pop-up-row-content-container"><p>'+i.LabName+"<\/p><p>"+v+"<\/p><\/div>"+y+'<div class="row map-pop-up-content-empty-row"><\/div>'+(i.HasShipment?'<div class="row"><a class="map-pop-up-shipments-link" target="_blank" href="'+baseUrl+"Home/LaboratoryShipments/"+i.LabID+'">Shipments<\/a><div>':"")+(i.HasShipment?h:'<div class="row">'+h+"<div>");r.bindPopup(p,t);r.on("click",function(){let n=r.getPopup();n.isOpen()?r.setIcon(l):r.setIcon(e)});r.on("popupclose",function(){r.setIcon(e)});interactiveMapMarkers.push(r)})}function setMapView(n){interactiveMap.setView([n.lat,n.lng],n.zoomLevel)}function getLaboratoryID(){let n=$("#inputSearchLaboratory").data("kendoAutoComplete");if(n){let t=n.dataItems().filter(function(t){return t.Desc===n.value()});return t.length>0?t[0].ID:$("#inputSearchLaboratory").val()===""?0:null}return 0}function periodTypeRadioValue(){return $('input[name="periodType"]:checked').val()}function periodTypeRadioText(){return $('input[name="periodType"]:checked').parent().text()}function loadMiniDashboardData(){$.ajax({async:!1,data:{periodType:periodTypeRadioValue()},type:"get",dataType:"json",headers:headers,url:baseUrl+"Home/GetMiniDashboardData",success:function(n){currentPeriodType=periodTypeRadioValue();$("#originalSpecimensCount").text(n.OriginalSpecimensCount);$("#virusesCount").text(n.VirusesCount);$("#nucleicAcidsCount").text(n.NucleicAcidsCount);$("#shipmentsCount").text(n.ShipmentsCount);let t="";periodTypeRadioValue()!="All"&&(t=" in the "+periodTypeRadioText());$("#registeredShipmentTextTitle").text("The latest 10 registered shipments"+t);removeLeafletMapMarkersAndCurvedPaths(shipmentsMap,shipmentsMarkers,flowMapCanvases);markShipmentsMapFlow(n.LastShipments)}})}function markShipmentsMapFlow(n){$.each(n,function(n,t){let s=L.icon({iconUrl:getMarkerIconUrl(t.SendingLab.IsGISRS),iconSize:[10,10]}),h=L.icon({iconUrl:getMarkerIconUrl(t.ReceivingLab.IsGISRS),iconSize:[10,10]}),i=[t.SendingLab.Latitude,t.SendingLab.Longitude],r=[t.ReceivingLab.Latitude,t.ReceivingLab.Longitude];i[0]===0&&i[1]===0&&(i[0]=t.SendingLab.CountryLatitude,i[1]=t.SendingLab.CountryLongitude);r[0]===0&&r[1]===0&&(r[0]=t.ReceivingLab.CountryLatitude,r[1]=t.ReceivingLab.CountryLongitude);let u=L.marker([i[0],i[1]],{icon:s,opacity:.5}).addTo(shipmentsMap);shipmentsMarkers.push(u);u=L.marker([r[0],r[1]],{icon:h,opacity:.5}).addTo(shipmentsMap);shipmentsMarkers.push(u);let f=[],e={},o={};if(t.IntermediateLab.LabID>0){let n=[t.IntermediateLab.Latitude,t.IntermediateLab.Longitude];n[0]===0&&n[1]===0&&(n[0]=t.IntermediateLab.CountryLatitude,n[1]=t.IntermediateLab.CountryLongitude);let f=L.icon({iconUrl:getMarkerIconUrl(null,!0),iconSize:[10,10]});u=L.marker([n[0],n[1]],{icon:f,opacity:.5}).addTo(shipmentsMap);shipmentsMarkers.push(u);e={fromLabId:0,fromLatLng:[i[0],i[1]],toLabId:1,toLatLng:[n[0],n[1]]};o={fromLabId:1,fromLatLng:[n[0],n[1]],toLabId:2,toLatLng:[r[0],r[1]]}}else e={fromLabId:0,fromLatLng:[i[0],i[1]],toLabId:1,toLatLng:[r[0],r[1]]};f.push(e);$.isEmptyObject(o)||f.push(o);markFlowMapCanvas(shipmentsMap,f,flowMapCanvases)})}function showShipmentsMaterialsModalWindow(n,t){markModalMap(t);modal.find(".modal-title").text(n);modal.modal("show")}function markModalMap(n){$.each(materialsShipmentsModalMapMarkers,function(n,t){materialsShipmentsModalMap.removeLayer(t)});materialsShipmentsModalMapMarkers=[];let u={closeButton:!1},t=0,i=0,r=0;$.each(n,function(n,r){r.IsGISRS?t+=r.ItemCount:i+=r.ItemCount});r=t+i;$.each(n,function(n,t){let s="",i=80;s=getMarkerIconUrl(t.IsGISRS);i*=t.ItemCount/r;i<10&&(i=10);let h=L.icon({iconUrl:s,iconSize:[i,i]}),f=0,e=0;t.Latitude===0&&t.Longitude===0?(f=t.CountryLatitude,e=t.CountryLongitude):(f=t.Latitude,e=t.Longitude);let o=L.marker([f,e],{icon:h,opacity:.5}).addTo(materialsShipmentsModalMap);o.on("mouseover",function(){this.openPopup()});let c='<div class="container"><div class="row"><p>'+t.LabNameShort+"<\/p><p>"+t.ItemCount+"<\/p><\/div><\/div>";o.bindPopup(c,u);materialsShipmentsModalMapMarkers.push(o)});materialsShipmentsModalMap.setView([43,0],1.4);setTimeout(function(){materialsShipmentsModalMap.invalidateSize()},400)}function getNewsDescription(n){return $.ajax({async:!1,data:{newsId:n},type:"get",dataType:"json",headers:headers,url:baseUrl+"Home/GetNewsDescription",success:function(n){return n}})}var token=$('input[name="__RequestVerificationToken"]').val(),headers={},baseUrl,_Group,TWEEN,gsrisCount,nonGsrisCount,interactiveMap;headers.__RequestVerificationToken=token;baseUrl=$("#baseUrl").data("base-url");baseUrl.slice(-1)!=="/"&&(baseUrl+="/");!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.L={})}(this,function(n){"use strict";function s(n){for(var i,r,t=1,u=arguments.length;t<u;t++){r=arguments[t];for(i in r)n[i]=r[i]}return n}function c(n,t){var i=Array.prototype.slice,r;return n.bind?n.bind.apply(n,i.call(arguments,1)):(r=i.call(arguments,2),function(){return n.apply(t,r.length?r.concat(i.call(arguments)):arguments)})}function o(n){return n._leaflet_id=n._leaflet_id||++rh,n._leaflet_id}function ef(n,t,i){var u,r,f,e;return e=function(){u=!1;r&&(f.apply(i,r),r=!1)},f=function(){u?r=arguments:(n.apply(i,arguments),setTimeout(e,t),u=!0)}}function hr(n,t,i){var f=t[1],r=t[0],u=f-r;return n===f&&i?n:((n-r)%u+u)%u+r}function g(){return!1}function lt(n,t){var i=Math.pow(10,void 0===t?6:t);return Math.round(n*i)/i}function of(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function yi(n){return of(n).split(/\s+/)}function l(n,t){n.hasOwnProperty("options")||(n.options=n.options?yu(n.options):{});for(var i in t)n.options[i]=t[i];return n.options}function ts(n,t,i){var u=[],r;for(r in n)u.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(n[r]));return(t&&-1!==t.indexOf("?")?"&":"?")+u.join("&")}function is(n,t){return n.replace(kc,function(n,i){var r=t[i];if(void 0===r)throw new Error("No value provided for variable "+n);return"function"==typeof r&&(r=r(t)),r})}function rs(n,t){for(var i=0;i<n.length;i++)if(n[i]===t)return i;return-1}function sf(n){return window["webkit"+n]||window["moz"+n]||window["ms"+n]}function us(n){var t=+new Date,i=Math.max(0,16-(t-uh));return uh=t+i,window.setTimeout(n,i)}function d(n,t,i){if(!i||fe!==us)return fe.call(window,c(n,t));n.call(t)}function nt(n){n&&fh.call(window,n)}function kt(){}function fc(n){if("undefined"!=typeof L&&L&&L.Mixin){n=pt(n)?n:[n];for(var t=0;t<n.length;t++)n[t]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}function t(n,t,i){this.x=i?Math.round(n):n;this.y=i?Math.round(t):t}function u(n,i,r){return n instanceof t?n:pt(n)?new t(n[0],n[1]):void 0===n||null===n?n:"object"==typeof n&&"x"in n&&"y"in n?new t(n.x,n.y):new t(n,i,r)}function v(n,t){if(n)for(var r=t?[n,t]:n,i=0,u=r.length;i<u;i++)this.extend(r[i])}function at(n,t){return!n||n instanceof v?n:new v(n,t)}function tt(n,t){if(n)for(var r=t?[n,t]:n,i=0,u=r.length;i<u;i++)this.extend(r[i])}function k(n,t){return n instanceof tt?n:new tt(n,t)}function h(n,t,i){if(isNaN(n)||isNaN(t))throw new Error("Invalid LatLng object: ("+n+", "+t+")");this.lat=+n;this.lng=+t;void 0!==i&&(this.alt=+i)}function y(n,t,i){return n instanceof h?n:pt(n)&&"object"!=typeof n[0]?3===n.length?new h(n[0],n[1],n[2]):2===n.length?new h(n[0],n[1]):null:void 0===n||null===n?n:"object"==typeof n&&"lat"in n?new h(n.lat,"lng"in n?n.lng:n.lon,n.alt):void 0===t?null:new h(n,t,i)}function hf(n,t,i,r){if(pt(n))return this._a=n[0],this._b=n[1],this._c=n[2],void(this._d=n[3]);this._a=n;this._b=t;this._c=i;this._d=r}function cr(n,t,i,r){return new hf(n,t,i,r)}function fs(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function es(n,t){for(var i,o,s,u,f="",r=0,e=n.length;r<e;r++){for(i=0,o=(s=n[r]).length;i<o;i++)u=s[i],f+=(i?"L":"M")+u.x+" "+u.y;f+=t?bu?"z":"x":""}return f||"M0 0"}function vt(n){return navigator.userAgent.toLowerCase().indexOf(n)>=0}function ec(n,t,i,r){return"touchstart"===t?sc(n,i,r):"touchmove"===t?lc(n,i,r):"touchend"===t&&ac(n,i,r),this}function oc(n,t,i){var r=n["_leaflet_"+t+i];return"touchstart"===t?n.removeEventListener(we,r,!1):"touchmove"===t?n.removeEventListener(be,r,!1):"touchend"===t&&(n.removeEventListener(ke,r,!1),n.removeEventListener(de,r,!1)),this}function sc(n,t,i){var r=c(function(n){if("mouse"!==n.pointerType&&n.MSPOINTER_TYPE_MOUSE&&n.pointerType!==n.MSPOINTER_TYPE_MOUSE){if(!(fl.indexOf(n.target.tagName)<0))return;ft(n)}cf(n,t)});n["_leaflet_touchstart"+i]=r;n.addEventListener(we,r,!1);yh||(document.documentElement.addEventListener(we,hc,!0),document.documentElement.addEventListener(be,cc,!0),document.documentElement.addEventListener(ke,os,!0),document.documentElement.addEventListener(de,os,!0),yh=!0)}function hc(n){tr[n.pointerId]=n;ge++}function cc(n){tr[n.pointerId]&&(tr[n.pointerId]=n)}function os(n){delete tr[n.pointerId];ge--}function cf(n,t){n.touches=[];for(var i in tr)n.touches.push(tr[i]);n.changedTouches=[n];t(n)}function lc(n,t,i){var r=function(n){(n.pointerType!==n.MSPOINTER_TYPE_MOUSE&&"mouse"!==n.pointerType||0!==n.buttons)&&cf(n,t)};n["_leaflet_touchmove"+i]=r;n.addEventListener(be,r,!1)}function ac(n,t,i){var r=function(n){cf(n,t)};n["_leaflet_touchend"+i]=r;n.addEventListener(ke,r,!1);n.addEventListener(de,r,!1)}function ss(n,t,i){function f(n){var i,t,f;if(ot){if(!wr||"mouse"===n.pointerType)return;i=ge}else i=n.touches.length;i>1||(t=Date.now(),f=t-(u||t),r=n.touches?n.touches[0]:n,o=f>0&&f<=s,u=t)}function e(n){if(o&&!r.cancelBubble){if(ot){if(!wr||"mouse"===n.pointerType)return;var i,f,e={};for(f in r)i=r[f],e[f]=i&&i.bind?i.bind(r):i;r=e}r.type="dblclick";t(r);u=null}}var u,r,o=!1,s=250;return n[ir+du+i]=f,n[ir+gu+i]=e,n[ir+"dblclick"+i]=t,n.addEventListener(du,f,!1),n.addEventListener(gu,e,!1),n.addEventListener("dblclick",t,!1),this}function hs(n,t){var i=n[ir+du+t],r=n[ir+gu+t],u=n[ir+"dblclick"+t];return n.removeEventListener(du,i,!1),n.removeEventListener(gu,r,!1),wr||n.removeEventListener("dblclick",u,!1),this}function cs(n){return"string"==typeof n?document.getElementById(n):n}function lr(n,t){var i=n.style[t]||n.currentStyle&&n.currentStyle[t],r;return(!i||"auto"===i)&&document.defaultView&&(r=document.defaultView.getComputedStyle(n,null),i=r?r[t]:null),"auto"===i?null:i}function e(n,t,i){var r=document.createElement(n);return r.className=t||"",i&&i.appendChild(r),r}function a(n){var t=n.parentNode;t&&t.removeChild(n)}function lf(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function pi(n){var t=n.parentNode;t.lastChild!==n&&t.appendChild(n)}function wi(n){var t=n.parentNode;t.firstChild!==n&&t.insertBefore(n,t.firstChild)}function af(n,t){if(void 0!==n.classList)return n.classList.contains(t);var i=fu(n);return i.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(i)}function i(n,t){var r;if(void 0!==n.classList)for(var u=yi(t),i=0,f=u.length;i<f;i++)n.classList.add(u[i]);else af(n,t)||(r=fu(n),vf(n,(r?r+" ":"")+t))}function p(n,t){void 0!==n.classList?n.classList.remove(t):vf(n,of((" "+fu(n)+" ").replace(" "+t+" "," ")))}function vf(n,t){void 0===n.className.baseVal?n.className=t:n.className.baseVal=t}function fu(n){return void 0===n.className.baseVal?n.className:n.className.baseVal}function ut(n,t){"opacity"in n.style?n.style.opacity=t:"filter"in n.style&&vc(n,t)}function vc(n,t){var i=!1,r="DXImageTransform.Microsoft.Alpha";try{i=n.filters.item(r)}catch(n){if(1===t)return}t=Math.round(100*t);i?(i.Enabled=100!==t,i.Opacity=t):n.style.filter+=" progid:"+r+"(opacity="+t+")"}function eu(n){for(var i=document.documentElement.style,t=0;t<n.length;t++)if(n[t]in i)return n[t];return!1}function si(n,i,r){var u=i||new t(0,0);n.style[no]=(ye?"translate("+u.x+"px,"+u.y+"px)":"translate3d("+u.x+"px,"+u.y+"px,0)")+(r?" scale("+r+")":"")}function b(n,t){n._leaflet_pos=t;et?si(n,t):(n.style.left=t.x+"px",n.style.top=t.y+"px")}function ri(n){return n._leaflet_pos||new t(0,0)}function yf(){r(window,"dragstart",ft)}function pf(){w(window,"dragstart",ft)}function wf(n){for(;-1===n.tabIndex;)n=n.parentNode;n.style&&(ou(),nf=n,to=n.style.outline,n.style.outline="none",r(window,"keydown",ou))}function ou(){nf&&(nf.style.outline=to,nf=void 0,to=void 0,w(window,"keydown",ou))}function ls(n){do n=n.parentNode;while(!(n.offsetWidth&&n.offsetHeight||n===document.body));return n}function bf(n){var t=n.getBoundingClientRect();return{x:t.width/n.offsetWidth||1,y:t.height/n.offsetHeight||1,boundingClientRect:t}}function r(n,t,i,r){var f,u,e;if("object"==typeof t)for(f in t)su(n,f,t[f],i);else for(u=0,e=(t=yi(t)).length;u<e;u++)su(n,t[u],i,r);return this}function w(n,t,i,r){var f,u,o,e;if("object"==typeof t)for(f in t)kf(n,f,t[f],i);else if(t)for(u=0,o=(t=yi(t)).length;u<o;u++)kf(n,t[u],i,r);else{for(e in n[st])kf(n,e,n[st][e]);delete n[st]}return this}function su(n,t,i,r){var f=t+o(i)+(r?"_"+o(r):""),u,e;if(n[st]&&n[st][f])return this;u=function(t){return i.call(r||n,t||window.event)};e=u;ot&&0===t.indexOf("touch")?ec(n,t,u,f):!wt||"dblclick"!==t||!ss||ot&&kr?"addEventListener"in n?"mousewheel"===t?n.addEventListener("onwheel"in n?"wheel":"mousewheel",u,!1):"mouseenter"===t||"mouseleave"===t?(u=function(t){t=t||window.event;hu(n,t)&&e(t)},n.addEventListener("mouseenter"===t?"mouseover":"mouseout",u,!1)):("click"===t&&gi&&(u=function(n){yc(n,e)}),n.addEventListener(t,u,!1)):"attachEvent"in n&&n.attachEvent("on"+t,u):ss(n,u,f);n[st]=n[st]||{};n[st][f]=u}function kf(n,t,i,r){var u=t+o(i)+(r?"_"+o(r):""),f=n[st]&&n[st][u];if(!f)return this;ot&&0===t.indexOf("touch")?oc(n,t,u):!wt||"dblclick"!==t||!hs||ot&&kr?"removeEventListener"in n?"mousewheel"===t?n.removeEventListener("onwheel"in n?"wheel":"mousewheel",f,!1):n.removeEventListener("mouseenter"===t?"mouseover":"mouseleave"===t?"mouseout":t,f,!1):"detachEvent"in n&&n.detachEvent("on"+t,f):hs(n,u);n[st][u]=null}function hi(n){return n.stopPropagation?n.stopPropagation():n.originalEvent?n.originalEvent._stopped=!0:n.cancelBubble=!0,ne(n),this}function df(n){return su(n,"mousewheel",hi),this}function ar(n){return r(n,"mousedown touchstart dblclick",hi),su(n,"click",gf),this}function ft(n){return n.preventDefault?n.preventDefault():n.returnValue=!1,this}function yt(n){return ft(n),hi(n),this}function as(n,i){if(!i)return new t(n.clientX,n.clientY);var r=bf(i),u=r.boundingClientRect;return new t((n.clientX-u.left)/r.x-i.clientLeft,(n.clientY-u.top)/r.y-i.clientTop)}function vs(n){return wr?n.wheelDeltaY/2:n.deltaY&&0===n.deltaMode?-n.deltaY/ol:n.deltaY&&1===n.deltaMode?20*-n.deltaY:n.deltaY&&2===n.deltaMode?60*-n.deltaY:n.deltaX||n.deltaZ?0:n.wheelDelta?(n.wheelDeltaY||n.wheelDelta)/2:n.detail&&Math.abs(n.detail)<32765?20*-n.detail:n.detail?n.detail/-32765*60:0}function gf(n){ro[n.type]=!0}function ne(n){var t=ro[n.type];return ro[n.type]=!1,t}function hu(n,t){var i=t.relatedTarget;if(!i)return!0;try{for(;i&&i!==n;)i=i.parentNode}catch(n){return!1}return i!==n}function yc(n,t){var r=n.timeStamp||n.originalEvent&&n.originalEvent.timeStamp,i=io&&r-io;i&&i>100&&i<500||n.target._simulatedClick&&!n._simulated?yt(n):(io=r,t(n))}function ys(n,t){if(!t||!n.length)return n.slice();var i=t*t;return n=wc(n,i),n=pc(n,i)}function ps(n,t,i){return Math.sqrt(vr(n,t,i,!0))}function pc(n,t){var r=n.length,u=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(r),i,f;for(u[0]=u[r-1]=1,te(n,u,t,0,r-1),f=[],i=0;i<r;i++)u[i]&&f.push(n[i]);return f}function te(n,t,i,r,u){for(var e,s,o=0,f=r+1;f<=u-1;f++)(s=vr(n[f],n[r],n[u],!0))>o&&(e=f,o=s);o>i&&(t[e]=1,te(n,t,i,r,e),te(n,t,i,e,u))}function wc(n,t){for(var r=[n[0]],i=1,u=0,f=n.length;i<f;i++)bc(n[i],n[u])>t&&(r.push(n[i]),u=i);return u<f-1&&r.push(n[f-1]),r}function ws(n,t,i,r,u){var h,o,s,f=r?bh:ci(n,i),e=ci(t,i);for(bh=e;;){if(!(f|e))return[n,t];if(f&e)return!1;s=ci(o=cu(n,t,h=f||e,i,u),i);h===f?(n=o,f=s):(t=o,e=s)}}function cu(n,i,r,u,f){var e,o,s=i.x-n.x,h=i.y-n.y,c=u.min,l=u.max;return 8&r?(e=n.x+s*(l.y-n.y)/h,o=l.y):4&r?(e=n.x+s*(c.y-n.y)/h,o=c.y):2&r?(e=l.x,o=n.y+h*(l.x-n.x)/s):1&r&&(e=c.x,o=n.y+h*(c.x-n.x)/s),new t(e,o,f)}function ci(n,t){var i=0;return n.x<t.min.x?i|=1:n.x>t.max.x&&(i|=2),n.y<t.min.y?i|=4:n.y>t.max.y&&(i|=8),i}function bc(n,t){var i=t.x-n.x,r=t.y-n.y;return i*i+r*r}function vr(n,i,r,u){var h,o=i.x,s=i.y,f=r.x-o,e=r.y-s,c=f*f+e*e;return c>0&&((h=((n.x-o)*f+(n.y-s)*e)/c)>1?(o=r.x,s=r.y):h>0&&(o+=f*h,s+=e*h)),f=n.x-o,e=n.y-s,u?f*f+e*e:new t(o,s)}function dt(n){return!pt(n[0])||"object"!=typeof n[0][0]&&void 0!==n[0][0]}function bs(n){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),dt(n)}function ks(n,t,i){for(var e,l,h,o,s,u,f,a=[1,4,2,8],r=0,c=n.length;r<c;r++)n[r]._code=ci(n[r],t);for(h=0;h<4;h++){for(u=a[h],e=[],r=0,l=(c=n.length)-1;r<c;l=r++)o=n[r],s=n[l],o._code&u?s._code&u||((f=cu(s,o,u,t,i))._code=ci(f,t),e.push(f)):(s._code&u&&((f=cu(s,o,u,t,i))._code=ci(f,t),e.push(f)),e.push(o));n=e}return n}function ie(n,t){var u,e,i,o,r="Feature"===n.type?n.geometry:n,f=r?r.coordinates:null,s=[],h=t&&t.pointToLayer,c=t&&t.coordsToLatLng||re,l;if(!f&&!r)return null;switch(r.type){case"Point":return u=c(f),h?h(n,u):new tu(u);case"MultiPoint":for(i=0,o=f.length;i<o;i++)u=c(f[i]),s.push(h?h(n,u):new tu(u));return new ai(s);case"LineString":case"MultiLineString":return e=lu(f,"LineString"===r.type?0:1,c),new ni(e,t);case"Polygon":case"MultiPolygon":return e=lu(f,"Polygon"===r.type?1:2,c),new er(e,t);case"GeometryCollection":for(i=0,o=r.geometries.length;i<o;i++)l=ie({geometry:r.geometries[i],type:"Feature",properties:n.properties},t),l&&s.push(l);return new ai(s);default:throw new Error("Invalid GeoJSON object.");}}function re(n){return new h(n[1],n[0],n[2])}function lu(n,t,i){for(var u,f=[],r=0,e=n.length;r<e;r++)u=t?lu(n[r],t-1,i):(i||re)(n[r]),f.push(u);return f}function ue(n,t){return t="number"==typeof t?t:6,void 0!==n.alt?[lt(n.lng,t),lt(n.lat,t),lt(n.alt,t)]:[lt(n.lng,t),lt(n.lat,t)]}function au(n,t,i,r){for(var u=[],f=0,e=n.length;f<e;f++)u.push(t?au(n[f],t-1,i,r):ue(n[f],r));return!t&&i&&u.push(u[0]),u}function bi(n,t){return n.feature?s({},n.feature,{geometry:t}):vu(t)}function vu(n){return"Feature"===n.type||"FeatureCollection"===n.type?n:{type:"Feature",properties:{},geometry:n}}function ds(n,t){return new ti(n,t)}function gs(n,t){return new sr(n,t)}function nh(n){return vh?new rc(n):null}function th(n){return bu||ku?new uu(n):null}var ih=Object.freeze,it,ki,ee,rr,uo,tf,fo,rf,ct,rt,vi,ao,vo,yo,po,wo,bo,ko,go,ns,uc;Object.freeze=function(n){return n};var yu=Object.create||function(){function n(){}return function(t){return n.prototype=t,new n}}(),rh=0,kc=/\{ *([\w_-]+) *\}/g,pt=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)},pu="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",uh=0,fe=window.requestAnimationFrame||sf("RequestAnimationFrame")||us,fh=window.cancelAnimationFrame||sf("CancelAnimationFrame")||sf("CancelRequestAnimationFrame")||function(n){window.clearTimeout(n)},dc=(Object.freeze||Object)({freeze:ih,extend:s,create:yu,bind:c,lastId:rh,stamp:o,throttle:ef,wrapNum:hr,falseFn:g,formatNum:lt,trim:of,splitWords:yi,setOptions:l,getParamString:ts,template:is,isArray:pt,indexOf:rs,emptyImageUrl:pu,requestFn:fe,cancelFn:fh,requestAnimFrame:d,cancelAnimFrame:nt});kt.extend=function(n){var i=function(){this.initialize&&this.initialize.apply(this,arguments);this.callInitHooks()},u=i.__super__=this.prototype,t=yu(u),r;t.constructor=i;i.prototype=t;for(r in this)this.hasOwnProperty(r)&&"prototype"!==r&&"__super__"!==r&&(i[r]=this[r]);return n.statics&&(s(i,n.statics),delete n.statics),n.includes&&(fc(n.includes),s.apply(null,[t].concat(n.includes)),delete n.includes),t.options&&(n.options=s(yu(t.options),n.options)),s(t,n),t._initHooks=[],t.callInitHooks=function(){if(!this._initHooksCalled){u.callInitHooks&&u.callInitHooks.call(this);this._initHooksCalled=!0;for(var n=0,i=t._initHooks.length;n<i;n++)t._initHooks[n].call(this)}},i};kt.include=function(n){return s(this.prototype,n),this};kt.mergeOptions=function(n){return s(this.prototype.options,n),this};kt.addInitHook=function(n){var t=Array.prototype.slice.call(arguments,1),i="function"==typeof n?n:function(){this[n].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};it={on:function(n,t,i){var u,r,f;if("object"==typeof n)for(u in n)this._on(u,n[u],t);else for(r=0,f=(n=yi(n)).length;r<f;r++)this._on(n[r],t,i);return this},off:function(n,t,i){var u,r,f;if(n)if("object"==typeof n)for(u in n)this._off(u,n[u],t);else for(r=0,f=(n=yi(n)).length;r<f;r++)this._off(n[r],t,i);else delete this._events;return this},_on:function(n,t,i){var r;this._events=this._events||{};r=this._events[n];r||(r=[],this._events[n]=r);i===this&&(i=void 0);for(var e={fn:t,ctx:i},u=r,f=0,o=u.length;f<o;f++)if(u[f].fn===t&&u[f].ctx===i)return;u.push(e)},_off:function(n,t,i){var r,u,f,e;if(this._events&&(r=this._events[n]))if(t){if(i===this&&(i=void 0),r)for(u=0,f=r.length;u<f;u++)if(e=r[u],e.ctx===i&&e.fn===t)return e.fn=g,this._firingCount&&(this._events[n]=r=r.slice()),void r.splice(u,1)}else{for(u=0,f=r.length;u<f;u++)r[u].fn=g;delete this._events[n]}},fire:function(n,t,i){var f,r,u,o,e;if(!this.listens(n,i))return this;if(f=s({},t,{type:n,target:this,sourceTarget:t&&t.sourceTarget||this}),this._events&&(r=this._events[n],r)){for(this._firingCount=this._firingCount+1||1,u=0,o=r.length;u<o;u++)e=r[u],e.fn.call(e.ctx||this,f);this._firingCount--}return i&&this._propagateEvent(f),this},listens:function(n,t){var i=this._events&&this._events[n],r;if(i&&i.length)return!0;if(t)for(r in this._eventParents)if(this._eventParents[r].listens(n,t))return!0;return!1},once:function(n,t,i){var r,u;if("object"==typeof n){for(r in n)this.once(r,n[r],t);return this}u=c(function(){this.off(n,t,i).off(n,u,i)},this);return this.on(n,t,i).on(n,u,i)},addEventParent:function(n){return this._eventParents=this._eventParents||{},this._eventParents[o(n)]=n,this},removeEventParent:function(n){return this._eventParents&&delete this._eventParents[o(n)],this},_propagateEvent:function(n){for(var t in this._eventParents)this._eventParents[t].fire(n.type,s({layer:n.target,propagatedFrom:n.target},n),!0)}};it.addEventListener=it.on;it.removeEventListener=it.clearAllEventListeners=it.off;it.addOneTimeEventListener=it.once;it.fireEvent=it.fire;it.hasEventListeners=it.listens;ki=kt.extend(it);ee=Math.trunc||function(n){return n>0?Math.floor(n):Math.ceil(n)};t.prototype={clone:function(){return new t(this.x,this.y)},add:function(n){return this.clone()._add(u(n))},_add:function(n){return this.x+=n.x,this.y+=n.y,this},subtract:function(n){return this.clone()._subtract(u(n))},_subtract:function(n){return this.x-=n.x,this.y-=n.y,this},divideBy:function(n){return this.clone()._divideBy(n)},_divideBy:function(n){return this.x/=n,this.y/=n,this},multiplyBy:function(n){return this.clone()._multiplyBy(n)},_multiplyBy:function(n){return this.x*=n,this.y*=n,this},scaleBy:function(n){return new t(this.x*n.x,this.y*n.y)},unscaleBy:function(n){return new t(this.x/n.x,this.y/n.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ee(this.x),this.y=ee(this.y),this},distanceTo:function(n){var t=(n=u(n)).x-this.x,i=n.y-this.y;return Math.sqrt(t*t+i*i)},equals:function(n){return(n=u(n)).x===this.x&&n.y===this.y},contains:function(n){return n=u(n),Math.abs(n.x)<=Math.abs(this.x)&&Math.abs(n.y)<=Math.abs(this.y)},toString:function(){return"Point("+lt(this.x)+", "+lt(this.y)+")"}};v.prototype={extend:function(n){return n=u(n),this.min||this.max?(this.min.x=Math.min(n.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(n.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=n.clone(),this.max=n.clone()),this},getCenter:function(n){return new t((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,n)},getBottomLeft:function(){return new t(this.min.x,this.max.y)},getTopRight:function(){return new t(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(n){var i,r;return(n="number"==typeof n[0]||n instanceof t?u(n):at(n))instanceof v?(i=n.min,r=n.max):i=r=n,i.x>=this.min.x&&r.x<=this.max.x&&i.y>=this.min.y&&r.y<=this.max.y},intersects:function(n){n=at(n);var t=this.min,i=this.max,r=n.min,u=n.max,f=u.x>=t.x&&r.x<=i.x,e=u.y>=t.y&&r.y<=i.y;return f&&e},overlaps:function(n){n=at(n);var t=this.min,i=this.max,r=n.min,u=n.max,f=u.x>t.x&&r.x<i.x,e=u.y>t.y&&r.y<i.y;return f&&e},isValid:function(){return!(!this.min||!this.max)}};tt.prototype={extend:function(n){var t,i,r=this._southWest,u=this._northEast;if(n instanceof h)t=n,i=n;else{if(!(n instanceof tt))return n?this.extend(y(n)||k(n)):this;if(t=n._southWest,i=n._northEast,!t||!i)return this}return r||u?(r.lat=Math.min(t.lat,r.lat),r.lng=Math.min(t.lng,r.lng),u.lat=Math.max(i.lat,u.lat),u.lng=Math.max(i.lng,u.lng)):(this._southWest=new h(t.lat,t.lng),this._northEast=new h(i.lat,i.lng)),this},pad:function(n){var t=this._southWest,i=this._northEast,r=Math.abs(t.lat-i.lat)*n,u=Math.abs(t.lng-i.lng)*n;return new tt(new h(t.lat-r,t.lng-u),new h(i.lat+r,i.lng+u))},getCenter:function(){return new h((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 h(this.getNorth(),this.getWest())},getSouthEast:function(){return new h(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(n){n="number"==typeof n[0]||n instanceof h||"lat"in n?y(n):k(n);var t,i,r=this._southWest,u=this._northEast;return n instanceof tt?(t=n.getSouthWest(),i=n.getNorthEast()):t=i=n,t.lat>=r.lat&&i.lat<=u.lat&&t.lng>=r.lng&&i.lng<=u.lng},intersects:function(n){n=k(n);var t=this._southWest,i=this._northEast,r=n.getSouthWest(),u=n.getNorthEast(),f=u.lat>=t.lat&&r.lat<=i.lat,e=u.lng>=t.lng&&r.lng<=i.lng;return f&&e},overlaps:function(n){n=k(n);var t=this._southWest,i=this._northEast,r=n.getSouthWest(),u=n.getNorthEast(),f=u.lat>t.lat&&r.lat<i.lat,e=u.lng>t.lng&&r.lng<i.lng;return f&&e},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(n,t){return!!n&&(n=k(n),this._southWest.equals(n.getSouthWest(),t)&&this._northEast.equals(n.getNorthEast(),t))},isValid:function(){return!(!this._southWest||!this._northEast)}};h.prototype={equals:function(n,t){return!!n&&(n=y(n),Math.max(Math.abs(this.lat-n.lat),Math.abs(this.lng-n.lng))<=(void 0===t?1e-9:t))},toString:function(n){return"LatLng("+lt(this.lat,n)+", "+lt(this.lng,n)+")"},distanceTo:function(n){return ui.distance(this,y(n))},wrap:function(){return ui.wrapLatLng(this)},toBounds:function(n){var t=180*n/40075017,i=t/Math.cos(Math.PI/180*this.lat);return k([this.lat-t,this.lng-i],[this.lat+t,this.lng+i])},clone:function(){return new h(this.lat,this.lng,this.alt)}};var gt={latLngToPoint:function(n,t){var i=this.projection.project(n),r=this.scale(t);return this.transformation._transform(i,r)},pointToLatLng:function(n,t){var i=this.scale(t),r=this.transformation.untransform(n,i);return this.projection.unproject(r)},project:function(n){return this.projection.project(n)},unproject:function(n){return this.projection.unproject(n)},scale:function(n){return 256*Math.pow(2,n)},zoom:function(n){return Math.log(n/256)/Math.LN2},getProjectedBounds:function(n){if(this.infinite)return null;var t=this.projection.bounds,i=this.scale(n);return new v(this.transformation.transform(t.min,i),this.transformation.transform(t.max,i))},infinite:!1,wrapLatLng:function(n){var t=this.wrapLng?hr(n.lng,this.wrapLng,!0):n.lng;return new h(this.wrapLat?hr(n.lat,this.wrapLat,!0):n.lat,t,n.alt)},wrapLatLngBounds:function(n){var t=n.getCenter(),e=this.wrapLatLng(t),i=t.lat-e.lat,r=t.lng-e.lng,u,f;return 0===i&&0===r?n:(u=n.getSouthWest(),f=n.getNorthEast(),new tt(new h(u.lat-i,u.lng-r),new h(f.lat-i,f.lng-r)))}},ui=s({},gt,{wrapLng:[-180,180],R:6371e3,distance:function(n,t){var i=Math.PI/180,e=n.lat*i,o=t.lat*i,r=Math.sin((t.lat-n.lat)*i/2),u=Math.sin((t.lng-n.lng)*i/2),f=r*r+Math.cos(e)*Math.cos(o)*u*u,s=2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f));return this.R*s}}),oe={R:6378137,MAX_LATITUDE:85.0511287798,project:function(n){var i=Math.PI/180,r=this.MAX_LATITUDE,f=Math.max(Math.min(r,n.lat),-r),u=Math.sin(f*i);return new t(this.R*n.lng*i,this.R*Math.log((1+u)/(1-u))/2)},unproject:function(n){var t=180/Math.PI;return new h((2*Math.atan(Math.exp(n.y/this.R))-Math.PI/2)*t,n.x*t/this.R)},bounds:function(){var n=6378137*Math.PI;return new v([-n,-n],[n,n])}()};hf.prototype={transform:function(n,t){return this._transform(n.clone(),t)},_transform:function(n,t){return t=t||1,n.x=t*(this._a*n.x+this._b),n.y=t*(this._c*n.y+this._d),n},untransform:function(n,i){return i=i||1,new t((n.x/i-this._b)/this._a,(n.y/i-this._d)/this._c)}};var yr,pr,se,he=s({},ui,{code:"EPSG:3857",projection:oe,transformation:function(){var n=.5/(Math.PI*oe.R);return cr(n,.5,-n,.5)}()}),gc=s({},he,{code:"EPSG:900913"}),ce=document.documentElement.style,wu="ActiveXObject"in window,di=wu&&!document.addEventListener,wr="msLaunchUri"in navigator&&!("documentMode"in document),le=vt("webkit"),gi=vt("android"),br=vt("android 2")||vt("android 3"),nl=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),eh=gi&&vt("Google")&&nl<537&&!("AudioNode"in window),ae=!!window.opera,kr=vt("chrome"),ve=vt("gecko")&&!le&&!ae&&!wu,oh=!kr&&vt("safari"),sh=vt("phantom"),hh="OTransition"in ce,ch=0===navigator.platform.indexOf("Win"),ye=wu&&"transition"in ce,pe="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!br,lh="MozPerspective"in ce,et=!window.L_DISABLE_3D&&(ye||pe||lh)&&!hh&&!sh,nr="undefined"!=typeof orientation||vt("mobile"),tl=nr&&le,il=nr&&pe,fi=!window.PointerEvent&&window.MSPointerEvent,ot=!(!window.PointerEvent&&!fi),wt=!window.L_NO_TOUCH&&(ot||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),ah=nr&&ae,rl=nr&&ve,ei=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,vh=!!document.createElement("canvas").getContext,bu=!(!document.createElementNS||!fs("svg").createSVGRect),ku=!bu&&function(){var t,n;try{return t=document.createElement("div"),t.innerHTML='<v:shape adj="1"/>',n=t.firstChild,n.style.behavior="url(#default#VML)",n&&"object"==typeof n.adj}catch(t){return!1}}(),ul=(Object.freeze||Object)({ie:wu,ielt9:di,edge:wr,webkit:le,android:gi,android23:br,androidStock:eh,opera:ae,chrome:kr,gecko:ve,safari:oh,phantom:sh,opera12:hh,win:ch,ie3d:ye,webkit3d:pe,gecko3d:lh,any3d:et,mobile:nr,mobileWebkit:tl,mobileWebkit3d:il,msPointer:fi,pointer:ot,touch:wt,mobileOpera:ah,mobileGecko:rl,retina:ei,canvas:vh,svg:bu,vml:ku}),we=fi?"MSPointerDown":"pointerdown",be=fi?"MSPointerMove":"pointermove",ke=fi?"MSPointerUp":"pointerup",de=fi?"MSPointerCancel":"pointercancel",fl=["INPUT","SELECT","OPTION"],tr={},yh=!1,ge=0,du=fi?"MSPointerDown":ot?"pointerdown":"touchstart",gu=fi?"MSPointerUp":ot?"pointerup":"touchend",ir="_leaflet_",no=eu(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),dr=eu(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ph="webkitTransition"===dr||"OTransition"===dr?dr+"End":"transitionend";"onselectstart"in document?(yr=function(){r(window,"selectstart",ft)},pr=function(){w(window,"selectstart",ft)}):(rr=eu(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),yr=function(){if(rr){var n=document.documentElement.style;se=n[rr];n[rr]="none"}},pr=function(){rr&&(document.documentElement.style[rr]=se,se=void 0)});var nf,to,io,el=(Object.freeze||Object)({TRANSFORM:no,TRANSITION:dr,TRANSITION_END:ph,get:cs,getStyle:lr,create:e,remove:a,empty:lf,toFront:pi,toBack:wi,hasClass:af,addClass:i,removeClass:p,setClass:vf,getClass:fu,setOpacity:ut,testProp:eu,setTransform:si,setPosition:b,getPosition:ri,disableTextSelection:yr,enableTextSelection:pr,disableImageDrag:yf,enableImageDrag:pf,preventOutline:wf,restoreOutline:ou,getSizedParentNode:ls,getScale:bf}),st="_leaflet_events",ol=ch&&kr?2*window.devicePixelRatio:ve?window.devicePixelRatio:1,ro={},sl=(Object.freeze||Object)({on:r,off:w,stopPropagation:hi,disableScrollPropagation:df,disableClickPropagation:ar,preventDefault:ft,stop:yt,getMousePosition:as,getWheelDelta:vs,fakeStop:gf,skipped:ne,isExternalTarget:hu,addListener:r,removeListener:w}),wh=ki.extend({run:function(n,t,i,r){this.stop();this._el=n;this._inProgress=!0;this._duration=i||.25;this._easeOutPower=1/Math.max(r||.5,.2);this._startPos=ri(n);this._offset=t.subtract(this._startPos);this._startTime=+new Date;this.fire("start");this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=d(this._animate,this);this._step()},_step:function(n){var t=+new Date-this._startTime,i=1e3*this._duration;t<i?this._runFrame(this._easeOut(t/i),n):(this._runFrame(1),this._complete())},_runFrame:function(n,t){var i=this._startPos.add(this._offset.multiplyBy(n));t&&i._round();b(this._el,i);this.fire("step")},_complete:function(){nt(this._animId);this._inProgress=!1;this.fire("end")},_easeOut:function(n){return 1-Math.pow(1-n,this._easeOutPower)}}),f=ki.extend({options:{crs:he,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(n,t){t=l(this,t);this._initContainer(n);this._initLayout();this._onResize=c(this._onResize,this);this._initEvents();t.maxBounds&&this.setMaxBounds(t.maxBounds);void 0!==t.zoom&&(this._zoom=this._limitZoom(t.zoom));t.center&&void 0!==t.zoom&&this.setView(y(t.center),t.zoom,{reset:!0});this._handlers=[];this._layers={};this._zoomBoundLayers={};this._sizeChanged=!0;this.callInitHooks();this._zoomAnimated=dr&&et&&!ah&&this.options.zoomAnimation;this._zoomAnimated&&(this._createAnimProxy(),r(this._proxy,ph,this._catchTransitionEnd,this));this._addLayers(this.options.layers)},setView:function(n,t,i){return t=void 0===t?this._zoom:this._limitZoom(t),n=this._limitCenter(y(n),t,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=s({animate:i.animate},i.zoom),i.pan=s({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(n,t,i.zoom):this._tryAnimatedPan(n,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(n,t),this)},setZoom:function(n,t){return this._loaded?this.setView(this.getCenter(),n,{zoom:t}):(this._zoom=n,this)},zoomIn:function(n,t){return n=n||(et?this.options.zoomDelta:1),this.setZoom(this._zoom+n,t)},zoomOut:function(n,t){return n=n||(et?this.options.zoomDelta:1),this.setZoom(this._zoom-n,t)},setZoomAround:function(n,i,r){var f=this.getZoomScale(i),u=this.getSize().divideBy(2),e=(n instanceof t?n:this.latLngToContainerPoint(n)).subtract(u).multiplyBy(1-1/f),o=this.containerPointToLatLng(u.add(e));return this.setView(o,i,{zoom:r})},_getBoundsCenterZoom:function(n,t){t=t||{};n=n.getBounds?n.getBounds():k(n);var r=u(t.paddingTopLeft||t.padding||[0,0]),f=u(t.paddingBottomRight||t.padding||[0,0]),i=this.getBoundsZoom(n,!1,r.add(f));if((i="number"==typeof t.maxZoom?Math.min(t.maxZoom,i):i)===1/0)return{center:n.getCenter(),zoom:i};var e=f.subtract(r).divideBy(2),o=this.project(n.getSouthWest(),i),s=this.project(n.getNorthEast(),i);return{center:this.unproject(o.add(s).divideBy(2).add(e),i),zoom:i}},fitBounds:function(n,t){if(!(n=k(n)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(n,t);return this.setView(i.center,i.zoom,t)},fitWorld:function(n){return this.fitBounds([[-90,-180],[90,180]],n)},panTo:function(n,t){return this.setView(n,this._zoom,{pan:t})},panBy:function(n,t){if(n=u(n).round(),t=t||{},!n.x&&!n.y)return this.fire("moveend");if(!0!==t.animate&&!this.getSize().contains(n))return this._resetView(this.unproject(this.project(this.getCenter()).add(n)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new wh,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),!1!==t.animate){i(this._mapPane,"leaflet-pan-anim");var r=this._getMapPanePos().subtract(n).round();this._panAnim.run(this._mapPane,r,t.duration||.25,t.easeLinearity)}else this._rawPanBy(n),this.fire("move").fire("moveend");return this},flyTo:function(n,t,i){function a(n){var t=(l*l-r*r+(n?-1:1)*h*h*s*s)/(2*(n?l:r)*h*s),i=Math.sqrt(t*t+1)-t;return i<1e-9?-18:Math.log(i)}function v(n){return(Math.exp(n)-Math.exp(-n))/2}function e(n){return(Math.exp(n)+Math.exp(-n))/2}function g(n){return v(n)/e(n)}function nt(n){return r*(e(u)/e(u+f*n))}function tt(n){return r*(e(u)*g(u+f*n)-v(u))/h}function it(n){return 1-Math.pow(1-n,1.5)}function p(){var i=(Date.now()-rt)/ut,u=it(i)*k;i<=1?(this._flyToFrame=d(p,this),this._move(this.unproject(c.add(w.subtract(c).multiplyBy(tt(u)/s)),o),this.getScaleZoom(r/nt(u),o),{flyTo:!0})):this._move(n,t)._moveEnd(!0)}if(!1===(i=i||{}).animate||!et)return this.setView(n,t,i);this._stop();var c=this.project(this.getCenter()),w=this.project(n),b=this.getSize(),o=this._zoom;n=y(n);t=void 0===t?o:t;var r=Math.max(b.x,b.y),l=r*this.getZoomScale(o,t),s=w.distanceTo(c)||1,f=1.42,h=f*f,u=a(0),rt=Date.now(),k=(a(1)-u)/f,ut=i.duration?1e3*i.duration:1e3*k*.8;return this._moveStart(!0,i.noMoveStart),p.call(this),this},flyToBounds:function(n,t){var i=this._getBoundsCenterZoom(n,t);return this.flyTo(i.center,i.zoom,t)},setMaxBounds:function(n){return(n=k(n)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=n,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(n){var t=this.options.minZoom;return this.options.minZoom=n,this._loaded&&t!==n&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(n):this},setMaxZoom:function(n){var t=this.options.maxZoom;return this.options.maxZoom=n,this._loaded&&t!==n&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(n):this},panInsideBounds:function(n,t){this._enforcingBounds=!0;var i=this.getCenter(),r=this._limitCenter(i,this._zoom,k(n));return i.equals(r)||this.panTo(r,t),this._enforcingBounds=!1,this},invalidateSize:function(n){var i;if(!this._loaded)return this;n=s({animate:!1,pan:!0},!0===n?{animate:!0}:n);i=this.getSize();this._sizeChanged=!0;this._lastCenter=null;var r=this.getSize(),u=i.divideBy(2).round(),f=r.divideBy(2).round(),t=u.subtract(f);return t.x||t.y?(n.animate&&n.pan?this.panBy(t):(n.pan&&this._rawPanBy(t),this.fire("move"),n.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(c(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:r})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(n){if(n=this._locateOptions=s({timeout:1e4,watch:!1},n),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=c(this._handleGeolocationResponse,this),i=c(this._handleGeolocationError,this);return n.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,i,n):navigator.geolocation.getCurrentPosition(t,i,n),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(n){var t=n.code,i=n.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld();this.fire("locationerror",{code:t,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(n){var i=new h(n.coords.latitude,n.coords.longitude),e=i.toBounds(2*n.coords.accuracy),r=this._locateOptions,u,f,t;r.setView&&(u=this.getBoundsZoom(e),this.setView(i,r.maxZoom?Math.min(u,r.maxZoom):u));f={latlng:i,bounds:e,timestamp:n.timestamp};for(t in n.coords)"number"==typeof n.coords[t]&&(f[t]=n.coords[t]);this.fire("locationfound",f)},addHandler:function(n,t){if(!t)return this;var i=this[n]=new t(this);return this._handlers.push(i),this.options[n]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id;delete this._containerId}catch(n){this._container._leaflet_id=void 0;this._containerId=void 0}void 0!==this._locationWatchId&&this.stopLocate();this._stop();a(this._mapPane);this._clearControlPos&&this._clearControlPos();this._resizeRequest&&(nt(this._resizeRequest),this._resizeRequest=null);this._clearHandlers();this._loaded&&this.fire("unload");var n;for(n in this._layers)this._layers[n].remove();for(n in this._panes)a(this._panes[n]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(n,t){var i=e("div","leaflet-pane"+(n?" leaflet-"+n.replace("Pane","")+"-pane":""),t||this._mapPane);return n&&(this._panes[n]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var n=this.getPixelBounds();return new tt(this.unproject(n.getBottomLeft()),this.unproject(n.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(n,t,i){n=k(n);i=u(i||[0,0]);var r=this.getZoom()||0,c=this.getMinZoom(),l=this.getMaxZoom(),a=n.getNorthWest(),v=n.getSouthEast(),e=this.getSize().subtract(i),o=at(this.project(v,r),this.project(a,r)).getSize(),f=et?this.options.zoomSnap:1,s=e.x/o.x,h=e.y/o.y,y=t?Math.max(s,h):Math.min(s,h);return r=this.getScaleZoom(y,r),f&&(r=Math.round(r/(f/100))*(f/100),r=t?Math.ceil(r/f)*f:Math.floor(r/f)*f),Math.max(c,Math.min(l,r))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new t(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(n,t){var i=this._getTopLeftPoint(n,t);return new v(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(n){return this.options.crs.getProjectedBounds(void 0===n?this.getZoom():n)},getPane:function(n){return"string"==typeof n?this._panes[n]:n},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(n,t){var i=this.options.crs;return t=void 0===t?this._zoom:t,i.scale(n)/i.scale(t)},getScaleZoom:function(n,t){var r=this.options.crs,i;return t=void 0===t?this._zoom:t,i=r.zoom(n*r.scale(t)),isNaN(i)?1/0:i},project:function(n,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(y(n),t)},unproject:function(n,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(u(n),t)},layerPointToLatLng:function(n){var t=u(n).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(n){return this.project(y(n))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(n){return this.options.crs.wrapLatLng(y(n))},wrapLatLngBounds:function(n){return this.options.crs.wrapLatLngBounds(k(n))},distance:function(n,t){return this.options.crs.distance(y(n),y(t))},containerPointToLayerPoint:function(n){return u(n).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(n){return u(n).add(this._getMapPanePos())},containerPointToLatLng:function(n){var t=this.containerPointToLayerPoint(u(n));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(n){return this.layerPointToContainerPoint(this.latLngToLayerPoint(y(n)))},mouseEventToContainerPoint:function(n){return as(n,this._container)},mouseEventToLayerPoint:function(n){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(n))},mouseEventToLatLng:function(n){return this.layerPointToLatLng(this.mouseEventToLayerPoint(n))},_initContainer:function(n){var t=this._container=cs(n);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");r(t,"scroll",this._onScroll,this);this._containerId=o(t)},_initLayout:function(){var t=this._container,n;this._fadeAnimated=this.options.fadeAnimation&&et;i(t,"leaflet-container"+(wt?" leaflet-touch":"")+(ei?" leaflet-retina":"")+(di?" leaflet-oldie":"")+(oh?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));n=lr(t,"position");"absolute"!==n&&"relative"!==n&&"fixed"!==n&&(t.style.position="relative");this._initPanes();this._initControlPos&&this._initControlPos()},_initPanes:function(){var n=this._panes={};this._paneRenderers={};this._mapPane=this.createPane("mapPane",this._container);b(this._mapPane,new t(0,0));this.createPane("tilePane");this.createPane("shadowPane");this.createPane("overlayPane");this.createPane("markerPane");this.createPane("tooltipPane");this.createPane("popupPane");this.options.markerZoomAnimation||(i(n.markerPane,"leaflet-zoom-hide"),i(n.shadowPane,"leaflet-zoom-hide"))},_resetView:function(n,i){var u,r;b(this._mapPane,new t(0,0));u=!this._loaded;this._loaded=!0;i=this._limitZoom(i);this.fire("viewprereset");r=this._zoom!==i;this._moveStart(r,!1)._move(n,i)._moveEnd(r);this.fire("viewreset");u&&this.fire("load")},_moveStart:function(n,t){return n&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(n,t,i){void 0===t&&(t=this._zoom);var r=this._zoom!==t;return this._zoom=t,this._lastCenter=n,this._pixelOrigin=this._getNewPixelOrigin(n),(r||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(n){return n&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return nt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(n){b(this._mapPane,this._getMapPanePos().subtract(n))},_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(n){this._targets={};this._targets[o(this._container)]=this;var t=n?w:r;t(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this);this.options.trackResize&&t(window,"resize",this._onResize,this);et&&this.options.transform3DLimit&&(n?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){nt(this._resizeRequest);this._resizeRequest=d(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0;this._container.scrollLeft=0},_onMoveEnd:function(){var n=this._getMapPanePos();Math.max(Math.abs(n.x),Math.abs(n.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(n,t){for(var r,u=[],f="mouseout"===t||"mouseover"===t,i=n.target||n.srcElement,e=!1;i;){if((r=this._targets[o(i)])&&("click"===t||"preclick"===t)&&!n._simulated&&this._draggableMoved(r)){e=!0;break}if(r&&r.listens(t,!0)){if(f&&!hu(i,n))break;if(u.push(r),f)break}if(i===this._container)break;i=i.parentNode}return u.length||e||f||!hu(i,n)||(u=[this]),u},_handleDOMEvent:function(n){if(this._loaded&&!ne(n)){var t=n.type;"mousedown"!==t&&"keypress"!==t||wf(n.target||n.srcElement);this._fireDOMEvent(n,t)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(n,t,i){var e,u,r,o,f;if("click"===n.type&&(e=s({},n),e.type="preclick",this._fireDOMEvent(e,e.type,i)),!n._stopped&&(i=(i||[]).concat(this._findEventTargets(n,t))).length)for(u=i[0],"contextmenu"===t&&u.listens(t,!0)&&ft(n),r={originalEvent:n},"keypress"!==n.type&&(o=u.getLatLng&&(!u._radius||u._radius<=10),r.containerPoint=o?this.latLngToContainerPoint(u.getLatLng()):this.mouseEventToContainerPoint(n),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=o?u.getLatLng():this.layerPointToLatLng(r.layerPoint)),f=0;f<i.length;f++)if(i[f].fire(t,r,!0),r.originalEvent._stopped||!1===i[f].options.bubblingMouseEvents&&-1!==rs(this._mouseEvents,t))return},_draggableMoved:function(n){return(n=n.dragging&&n.dragging.enabled()?n:this).dragging&&n.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var n=0,t=this._handlers.length;n<t;n++)this._handlers[n].disable()},whenReady:function(n,t){return this._loaded?n.call(t||this,{target:this}):this.on("load",n,t),this},_getMapPanePos:function(){return ri(this._mapPane)||new t(0,0)},_moved:function(){var n=this._getMapPanePos();return n&&!n.equals([0,0])},_getTopLeftPoint:function(n,t){return(n&&void 0!==t?this._getNewPixelOrigin(n,t):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(n,t){var i=this.getSize()._divideBy(2);return this.project(n,t)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(n,t,i){var r=this._getNewPixelOrigin(i,t);return this.project(n,t)._subtract(r)},_latLngBoundsToNewLayerBounds:function(n,t,i){var r=this._getNewPixelOrigin(i,t);return at([this.project(n.getSouthWest(),t)._subtract(r),this.project(n.getNorthWest(),t)._subtract(r),this.project(n.getSouthEast(),t)._subtract(r),this.project(n.getNorthEast(),t)._subtract(r)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(n){return this.latLngToLayerPoint(n).subtract(this._getCenterLayerPoint())},_limitCenter:function(n,t,i){if(!i)return n;var r=this.project(n,t),u=this.getSize().divideBy(2),e=new v(r.subtract(u),r.add(u)),f=this._getBoundsOffset(e,i,t);return f.round().equals([0,0])?n:this.unproject(r.add(f),t)},_limitOffset:function(n,t){if(!t)return n;var i=this.getPixelBounds(),r=new v(i.min.add(n),i.max.add(n));return n.add(this._getBoundsOffset(r,t))},_getBoundsOffset:function(n,i,r){var u=at(this.project(i.getNorthEast(),r),this.project(i.getSouthWest(),r)),f=u.min.subtract(n.min),e=u.max.subtract(n.max);return new t(this._rebound(f.x,-e.x),this._rebound(f.y,-e.y))},_rebound:function(n,t){return n+t>0?Math.round(n-t)/2:Math.max(0,Math.ceil(n))-Math.max(0,Math.floor(t))},_limitZoom:function(n){var i=this.getMinZoom(),r=this.getMaxZoom(),t=et?this.options.zoomSnap:1;return t&&(n=Math.round(n/t)*t),Math.max(i,Math.min(r,n))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){p(this._mapPane,"leaflet-pan-anim");this.fire("moveend")},_tryAnimatedPan:function(n,t){var i=this._getCenterOffset(n)._trunc();return!(!0!==(t&&t.animate)&&!this.getSize().contains(i))&&(this.panBy(i,t),!0)},_createAnimProxy:function(){var n=this._proxy=e("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(n);this.on("zoomanim",function(n){var t=no,i=this._proxy.style[t];si(this._proxy,this.project(n.center,n.zoom),this.getZoomScale(n.zoom,1));i===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()},this);this.on("load moveend",function(){var t=this.getCenter(),n=this.getZoom();si(this._proxy,this.project(t,n),this.getZoomScale(n,1))},this);this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){a(this._proxy);delete this._proxy},_catchTransitionEnd:function(n){this._animatingZoom&&n.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(n,t,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(t),u=this._getCenterOffset(n)._divideBy(1-1/r);return!(!0!==i.animate&&!this.getSize().contains(u))&&(d(function(){this._moveStart(!0,!1)._animateZoom(n,t,!0)},this),!0)},_animateZoom:function(n,t,r,u){this._mapPane&&(r&&(this._animatingZoom=!0,this._animateToCenter=n,this._animateToZoom=t,i(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:n,zoom:t,noUpdate:u}),setTimeout(c(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&p(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),d(function(){this._moveEnd(!0)},this))}}),ht=kt.extend({options:{position:"topright"},initialize:function(n){l(this,n)},getPosition:function(){return this.options.position},setPosition:function(n){var t=this._map;return t&&t.removeControl(this),this.options.position=n,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(n){this.remove();this._map=n;var t=this._container=this.onAdd(n),u=this.getPosition(),r=n._controlCorners[u];return i(t,"leaflet-control"),-1!==u.indexOf("bottom")?r.insertBefore(t,r.firstChild):r.appendChild(t),this},remove:function(){return this._map?(a(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(n){this._map&&n&&n.screenX>0&&n.screenY>0&&this._map.getContainer().focus()}}),gr=function(n){return new ht(n)};f.include({addControl:function(n){return n.addTo(this),this},removeControl:function(n){return n.remove(),this},_initControlPos:function(){function n(n,u){var f=t+n+" "+t+u;i[n+u]=e("div",f,r)}var i=this._controlCorners={},t="leaflet-",r=this._controlContainer=e("div",t+"control-container",this._container);n("top","left");n("top","right");n("bottom","left");n("bottom","right")},_clearControlPos:function(){for(var n in this._controlCorners)a(this._controlCorners[n]);a(this._controlContainer);delete this._controlCorners;delete this._controlContainer}});uo=ht.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(n,t,i,r){return i<r?-1:r<i?1:0}},initialize:function(n,t,i){l(this,i);this._layerControlInputs=[];this._layers=[];this._lastZIndex=0;this._handlingClick=!1;for(var r in n)this._addLayer(n[r],r);for(r in t)this._addLayer(t[r],r,!0)},onAdd:function(n){this._initLayout();this._update();this._map=n;n.on("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(n){return ht.prototype.addTo.call(this,n),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var n=0;n<this._layers.length;n++)this._layers[n].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(n,t){return this._addLayer(n,t),this._map?this._update():this},addOverlay:function(n,t){return this._addLayer(n,t,!0),this._map?this._update():this},removeLayer:function(n){n.off("add remove",this._onLayerChange,this);var t=this._getLayer(o(n));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){i(this._container,"leaflet-control-layers-expanded");this._form.style.height=null;var n=this._map.getSize().y-(this._container.offsetTop+50);return n<this._form.clientHeight?(i(this._form,"leaflet-control-layers-scrollbar"),this._form.style.height=n+"px"):p(this._form,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return p(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var n="leaflet-control-layers",t=this._container=e("div",n),f=this.options.collapsed,u,i;t.setAttribute("aria-haspopup",!0);ar(t);df(t);u=this._form=e("form",n+"-list");f&&(this._map.on("click",this.collapse,this),gi||r(t,{mouseenter:this.expand,mouseleave:this.collapse},this));i=this._layersLink=e("a",n+"-toggle",t);i.href="#";i.title="Layers";wt?(r(i,"click",yt),r(i,"click",this.expand,this)):r(i,"focus",this.expand,this);f||this.expand();this._baseLayersList=e("div",n+"-base",u);this._separator=e("div",n+"-separator",u);this._overlaysList=e("div",n+"-overlays",u);t.appendChild(u)},_getLayer:function(n){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&o(this._layers[t].layer)===n)return this._layers[t]},_addLayer:function(n,t,i){this._map&&n.on("add remove",this._onLayerChange,this);this._layers.push({layer:n,name:t,overlay:i});this.options.sortLayers&&this._layers.sort(c(function(n,t){return this.options.sortFunction(n.layer,t.layer,n.name,t.name)},this));this.options.autoZIndex&&n.setZIndex&&(this._lastZIndex++,n.setZIndex(this._lastZIndex));this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;lf(this._baseLayersList);lf(this._overlaysList);this._layerControlInputs=[];for(var n,r,t,u=0,i=0;i<this._layers.length;i++)t=this._layers[i],this._addItem(t),r=r||t.overlay,n=n||!t.overlay,u+=t.overlay?0:1;return this.options.hideSingleBase&&(n=n&&u>1,this._baseLayersList.style.display=n?"":"none"),this._separator.style.display=r&&n?"":"none",this},_onLayerChange:function(n){this._handlingClick||this._update();var t=this._getLayer(o(n.target)),i=t.overlay?"add"===n.type?"overlayadd":"overlayremove":"add"===n.type?"baselayerchange":null;i&&this._map.fire(i,t)},_createRadioElement:function(n,t){var r='<input type="radio" class="leaflet-control-layers-selector" name="'+n+'"'+(t?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=r,i.firstChild},_addItem:function(n){var t,u=document.createElement("label"),e=this._map.hasLayer(n.layer),f,i;return n.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=e):t=this._createRadioElement("leaflet-base-layers",e),this._layerControlInputs.push(t),t.layerId=o(n.layer),r(t,"click",this._onInputClick,this),f=document.createElement("span"),f.innerHTML=" "+n.name,i=document.createElement("div"),u.appendChild(i),i.appendChild(t),i.appendChild(f),(n.overlay?this._overlaysList:this._baseLayersList).appendChild(u),this._checkDisabledLayers(),u},_onInputClick:function(){var t,u,f=this._layerControlInputs,i=[],r=[],n;for(this._handlingClick=!0,n=f.length-1;n>=0;n--)t=f[n],u=this._getLayer(t.layerId).layer,t.checked?i.push(u):t.checked||r.push(u);for(n=0;n<r.length;n++)this._map.hasLayer(r[n])&&this._map.removeLayer(r[n]);for(n=0;n<i.length;n++)this._map.hasLayer(i[n])||this._map.addLayer(i[n]);this._handlingClick=!1;this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,n,r=this._layerControlInputs,u=this._map.getZoom(),i=r.length-1;i>=0;i--)t=r[i],n=this._getLayer(t.layerId).layer,t.disabled=void 0!==n.options.minZoom&&u<n.options.minZoom||void 0!==n.options.maxZoom&&u>n.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}});tf=ht.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(n){var i="leaflet-control-zoom",r=e("div",i+" leaflet-bar"),t=this.options;return this._zoomInButton=this._createButton(t.zoomInText,t.zoomInTitle,i+"-in",r,this._zoomIn),this._zoomOutButton=this._createButton(t.zoomOutText,t.zoomOutTitle,i+"-out",r,this._zoomOut),this._updateDisabled(),n.on("zoomend zoomlevelschange",this._updateDisabled,this),r},onRemove:function(n){n.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(n){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(n.shiftKey?3:1))},_zoomOut:function(n){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(n.shiftKey?3:1))},_createButton:function(n,t,i,u,f){var o=e("a",i,u);return o.innerHTML=n,o.href="#",o.title=t,o.setAttribute("role","button"),o.setAttribute("aria-label",t),ar(o),r(o,"click",yt),r(o,"click",f,this),r(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var n=this._map,t="leaflet-disabled";p(this._zoomInButton,t);p(this._zoomOutButton,t);(this._disabled||n._zoom===n.getMinZoom())&&i(this._zoomOutButton,t);(this._disabled||n._zoom===n.getMaxZoom())&&i(this._zoomInButton,t)}});f.mergeOptions({zoomControl:!0});f.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new tf,this.addControl(this.zoomControl))});fo=ht.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(n){var t=e("div","leaflet-control-scale"),i=this.options;return this._addScales(i,"leaflet-control-scale-line",t),n.on(i.updateWhenIdle?"moveend":"move",this._update,this),n.whenReady(this._update,this),t},onRemove:function(n){n.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(n,t,i){n.metric&&(this._mScale=e("div",t,i));n.imperial&&(this._iScale=e("div",t,i))},_update:function(){var n=this._map,t=n.getSize().y/2,i=n.distance(n.containerPointToLatLng([0,t]),n.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(i)},_updateScales:function(n){this.options.metric&&n&&this._updateMetric(n);this.options.imperial&&n&&this._updateImperial(n)},_updateMetric:function(n){var t=this._getRoundNum(n),i=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,i,t/n)},_updateImperial:function(n){var i,r,u,t=3.2808399*n;t>5280?(i=t/5280,r=this._getRoundNum(i),this._updateScale(this._iScale,r+" mi",r/i)):(u=this._getRoundNum(t),this._updateScale(this._iScale,u+" ft",u/t))},_updateScale:function(n,t,i){n.style.width=Math.round(this.options.maxWidth*i)+"px";n.innerHTML=t},_getRoundNum:function(n){var i=Math.pow(10,(Math.floor(n)+"").length-1),t=n/i;return t=t>=10?10:t>=5?5:t>=3?3:t>=2?2:1,i*t}});rf=ht.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet<\/a>'},initialize:function(n){l(this,n);this._attributions={}},onAdd:function(n){n.attributionControl=this;this._container=e("div","leaflet-control-attribution");ar(this._container);for(var t in n._layers)n._layers[t].getAttribution&&this.addAttribution(n._layers[t].getAttribution());return this._update(),this._container},setPrefix:function(n){return this.options.prefix=n,this._update(),this},addAttribution:function(n){return n?(this._attributions[n]||(this._attributions[n]=0),this._attributions[n]++,this._update(),this):this},removeAttribution:function(n){return n?(this._attributions[n]&&(this._attributions[n]--,this._update()),this):this},_update:function(){var n,i,t;if(this._map){n=[];for(i in this._attributions)this._attributions[i]&&n.push(i);t=[];this.options.prefix&&t.push(this.options.prefix);n.length&&t.push(n.join(", "));this._container.innerHTML=t.join(" | ")}}});f.mergeOptions({attributionControl:!0});f.addInitHook(function(){this.options.attributionControl&&(new rf).addTo(this)});ht.Layers=uo;ht.Zoom=tf;ht.Scale=fo;ht.Attribution=rf;gr.layers=function(n,t,i){return new uo(n,t,i)};gr.zoom=function(n){return new tf(n)};gr.scale=function(n){return new fo(n)};gr.attribution=function(n){return new rf(n)};ct=kt.extend({initialize:function(n){this._map=n},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}});ct.addTo=function(n,t){return n.addHandler(t,this),this};var bh,hl={Events:it},kh=wt?"touchstart mousedown":"mousedown",dh={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},eo={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},li=ki.extend({options:{clickTolerance:3},initialize:function(n,t,i,r){l(this,r);this._element=n;this._dragStartTarget=t||n;this._preventOutline=i},enable:function(){this._enabled||(r(this._dragStartTarget,kh,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(li._dragging===this&&this.finishDrag(),w(this._dragStartTarget,kh,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(n){if(!n._simulated&&this._enabled&&(this._moved=!1,!af(this._element,"leaflet-zoom-anim")&&!(li._dragging||n.shiftKey||1!==n.which&&1!==n.button&&!n.touches||(li._dragging=this,this._preventOutline&&wf(this._element),yf(),yr(),this._moving)))){this.fire("down");var i=n.touches?n.touches[0]:n,u=ls(this._element);this._startPoint=new t(i.clientX,i.clientY);this._parentScale=bf(u);r(document,eo[n.type],this._onMove,this);r(document,dh[n.type],this._onUp,this)}},_onMove:function(n){if(!n._simulated&&this._enabled)if(n.touches&&n.touches.length>1)this._moved=!0;else{var u=n.touches&&1===n.touches.length?n.touches[0]:n,r=new t(u.clientX,u.clientY)._subtract(this._startPoint);(r.x||r.y)&&(Math.abs(r.x)+Math.abs(r.y)<this.options.clickTolerance||(r.x/=this._parentScale.x,r.y/=this._parentScale.y,ft(n),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=ri(this._element).subtract(r),i(document.body,"leaflet-dragging"),this._lastTarget=n.target||n.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),i(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(r),this._moving=!0,nt(this._animRequest),this._lastEvent=n,this._animRequest=d(this._updatePosition,this,!0)))}},_updatePosition:function(){var n={originalEvent:this._lastEvent};this.fire("predrag",n);b(this._element,this._newPos);this.fire("drag",n)},_onUp:function(n){!n._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){p(document.body,"leaflet-dragging");this._lastTarget&&(p(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var n in eo)w(document,eo[n],this._onMove,this),w(document,dh[n],this._onUp,this);pf();pr();this._moved&&this._moving&&(nt(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)}));this._moving=!1;li._dragging=!1}}),cl=(Object.freeze||Object)({simplify:ys,pointToSegmentDistance:ps,closestPointOnSegment:function(n,t,i){return vr(n,t,i)},clipSegment:ws,_getEdgeIntersection:cu,_getBitCode:ci,_sqClosestPointOnSegment:vr,isFlat:dt,_flat:bs}),ll=(Object.freeze||Object)({clipPolygon:ks}),oo={project:function(n){return new t(n.lng,n.lat)},unproject:function(n){return new h(n.y,n.x)},bounds:new v([-180,-90],[180,90])},so={R:6378137,R_MINOR:6356752.3142451793,bounds:new v([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(n){var u=Math.PI/180,r=this.R,i=n.lat*u,f=this.R_MINOR/r,e=Math.sqrt(1-f*f),o=e*Math.sin(i),s=Math.tan(Math.PI/4-i/2)/Math.pow((1-o)/(1+o),e/2);return i=-r*Math.log(Math.max(s,1e-10)),new t(n.lng*u*r,i)},unproject:function(n){for(var t,u=180/Math.PI,r=this.R,f=this.R_MINOR/r,e=Math.sqrt(1-f*f),o=Math.exp(-n.y/r),i=Math.PI/2-2*Math.atan(o),s=0,c=.1;s<15&&Math.abs(c)>1e-7;s++)t=e*Math.sin(i),t=Math.pow((1-t)/(1+t),e/2),i+=c=Math.PI/2-2*Math.atan(o*t)-i;return new h(i*u,n.x*u/r)}},al=(Object.freeze||Object)({LonLat:oo,Mercator:so,SphericalMercator:oe}),vl=s({},ui,{code:"EPSG:3395",projection:so,transformation:function(){var n=.5/(Math.PI*so.R);return cr(n,.5,-n,.5)}()}),gh=s({},ui,{code:"EPSG:4326",projection:oo,transformation:cr(1/180,1,-1/180,.5)}),yl=s({},gt,{projection:oo,transformation:cr(1,0,-1,0),scale:function(n){return Math.pow(2,n)},zoom:function(n){return Math.log(n)/Math.LN2},distance:function(n,t){var i=t.lng-n.lng,r=t.lat-n.lat;return Math.sqrt(i*i+r*r)},infinite:!0});gt.Earth=ui;gt.EPSG3395=vl;gt.EPSG3857=he;gt.EPSG900913=gc;gt.EPSG4326=gh;gt.Simple=yl;rt=ki.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(n){return n.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(n){return n&&n.removeLayer(this),this},getPane:function(n){return this._map.getPane(n?this.options[n]||n:this.options.pane)},addInteractiveTarget:function(n){return this._map._targets[o(n)]=this,this},removeInteractiveTarget:function(n){return delete this._map._targets[o(n)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(n){var t=n.target,i;t.hasLayer(this)&&((this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents)&&(i=this.getEvents(),t.on(i,this),this.once("remove",function(){t.off(i,this)},this)),this.onAdd(t),this.getAttribution&&t.attributionControl&&t.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),t.fire("layeradd",{layer:this}))}});f.include({addLayer:function(n){if(!n._layerAdd)throw new Error("The provided object is not a Layer.");var t=o(n);return this._layers[t]?this:(this._layers[t]=n,n._mapToAdd=this,n.beforeAdd&&n.beforeAdd(this),this.whenReady(n._layerAdd,n),this)},removeLayer:function(n){var t=o(n);return this._layers[t]?(this._loaded&&n.onRemove(this),n.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(n.getAttribution()),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:n}),n.fire("remove")),n._map=n._mapToAdd=null,this):this},hasLayer:function(n){return!!n&&o(n)in this._layers},eachLayer:function(n,t){for(var i in this._layers)n.call(t,this._layers[i]);return this},_addLayers:function(n){for(var t=0,i=(n=n?pt(n)?n:[n]:[]).length;t<i;t++)this.addLayer(n[t])},_addZoomLimit:function(n){!isNaN(n.options.maxZoom)&&isNaN(n.options.minZoom)||(this._zoomBoundLayers[o(n)]=n,this._updateZoomLevels())},_removeZoomLimit:function(n){var t=o(n);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var n=1/0,t=-1/0,u=this._getZoomSpan(),r,i;for(r in this._zoomBoundLayers)i=this._zoomBoundLayers[r].options,n=void 0===i.minZoom?n:Math.min(n,i.minZoom),t=void 0===i.maxZoom?t:Math.max(t,i.maxZoom);this._layersMaxZoom=t===-1/0?void 0:t;this._layersMinZoom=n===1/0?void 0:n;u!==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 ur=rt.extend({initialize:function(n,t){l(this,t);this._layers={};var i,r;if(n)for(i=0,r=n.length;i<r;i++)this.addLayer(n[i])},addLayer:function(n){var t=this.getLayerId(n);return this._layers[t]=n,this._map&&this._map.addLayer(n),this},removeLayer:function(n){var t=n in this._layers?n:this.getLayerId(n);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(n){return!!n&&(n in this._layers||this.getLayerId(n)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(n){var i,t,r=Array.prototype.slice.call(arguments,1);for(i in this._layers)(t=this._layers[i])[n]&&t[n].apply(t,r);return this},onAdd:function(n){this.eachLayer(n.addLayer,n)},onRemove:function(n){this.eachLayer(n.removeLayer,n)},eachLayer:function(n,t){for(var i in this._layers)n.call(t,this._layers[i]);return this},getLayer:function(n){return this._layers[n]},getLayers:function(){var n=[];return this.eachLayer(n.push,n),n},setZIndex:function(n){return this.invoke("setZIndex",n)},getLayerId:function(n){return o(n)}}),ai=ur.extend({addLayer:function(n){return this.hasLayer(n)?this:(n.addEventParent(this),ur.prototype.addLayer.call(this,n),this.fire("layeradd",{layer:n}))},removeLayer:function(n){return this.hasLayer(n)?(n in this._layers&&(n=this._layers[n]),n.removeEventParent(this),ur.prototype.removeLayer.call(this,n),this.fire("layerremove",{layer:n})):this},setStyle:function(n){return this.invoke("setStyle",n)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new tt,i,n;for(i in this._layers)n=this._layers[i],t.extend(n.getBounds?n.getBounds():n.getLatLng());return t}}),fr=kt.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(n){l(this,n)},createIcon:function(n){return this._createIcon("icon",n)},createShadow:function(n){return this._createIcon("shadow",n)},_createIcon:function(n,t){var r=this._getIconUrl(n),i;if(!r){if("icon"===n)throw new Error("iconUrl not set in Icon options (see the docs).");return null}return i=this._createImg(r,t&&"IMG"===t.tagName?t:null),this._setIconStyles(i,n),i},_setIconStyles:function(n,t){var f=this.options,r=f[t+"Size"],i,e;"number"==typeof r&&(r=[r,r]);i=u(r);e=u("shadow"===t&&f.shadowAnchor||f.iconAnchor||i&&i.divideBy(2,!0));n.className="leaflet-marker-"+t+" "+(f.className||"");e&&(n.style.marginLeft=-e.x+"px",n.style.marginTop=-e.y+"px");i&&(n.style.width=i.x+"px",n.style.height=i.y+"px")},_createImg:function(n,t){return t=t||document.createElement("img"),t.src=n,t},_getIconUrl:function(n){return ei&&this.options[n+"RetinaUrl"]||this.options[n+"Url"]}}),nu=fr.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(n){return nu.imagePath||(nu.imagePath=this._detectIconPath()),(this.options.imagePath||nu.imagePath)+fr.prototype._getIconUrl.call(this,n)},_detectIconPath:function(){var t=e("div","leaflet-default-icon-path",document.body),n=lr(t,"background-image")||lr(t,"backgroundImage");return document.body.removeChild(t),n=null===n||0!==n.indexOf("url")?"":n.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),nc=ct.extend({initialize:function(n){this._marker=n},addHooks:function(){var n=this._marker._icon;this._draggable||(this._draggable=new li(n,n,!0));this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable();i(n,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable();this._marker._icon&&p(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(n){var e=this._marker,o=e._map,c=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,r=ri(e._icon),i=o.getPixelBounds(),h=o.getPixelOrigin(),t=at(i.min._subtract(h).add(s),i.max._subtract(h).subtract(s)),f;t.contains(r)||(f=u((Math.max(t.max.x,r.x)-t.max.x)/(i.max.x-t.max.x)-(Math.min(t.min.x,r.x)-t.min.x)/(i.min.x-t.min.x),(Math.max(t.max.y,r.y)-t.max.y)/(i.max.y-t.max.y)-(Math.min(t.min.y,r.y)-t.min.y)/(i.min.y-t.min.y)).multiplyBy(c),o.panBy(f,{animate:!1}),this._draggable._newPos._add(f),this._draggable._startPos._add(f),b(e._icon,this._draggable._newPos),this._onDrag(n),this._panRequest=d(this._adjustPan.bind(this,n)))},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng();this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(n){this._marker.options.autoPan&&(nt(this._panRequest),this._panRequest=d(this._adjustPan.bind(this,n)))},_onDrag:function(n){var t=this._marker,i=t._shadow,r=ri(t._icon),u=t._map.layerPointToLatLng(r);i&&b(i,r);t._latlng=u;n.latlng=u;n.oldLatLng=this._oldLatLng;t.fire("move",n).fire("drag",n)},_onDragEnd:function(n){nt(this._panRequest);delete this._oldLatLng;this._marker.fire("moveend").fire("dragend",n)}}),tu=rt.extend({options:{icon:new nu,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(n,t){l(this,t);this._latlng=y(n)},onAdd:function(n){this._zoomAnimated=this._zoomAnimated&&n.options.markerZoomAnimation;this._zoomAnimated&&n.on("zoomanim",this._animateZoom,this);this._initIcon();this.update()},onRemove:function(n){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks());delete this.dragging;this._zoomAnimated&&n.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(n){var t=this._latlng;return this._latlng=y(n),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(n){return this.options.zIndexOffset=n,this.update()},setIcon:function(n){return this.options.icon=n,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 n=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(n)}return this},_initIcon:function(){var n=this.options,f="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),t=n.icon.createIcon(this._icon),e=!1,r,u;t!==this._icon&&(this._icon&&this._removeIcon(),e=!0,n.title&&(t.title=n.title),"IMG"===t.tagName&&(t.alt=n.alt||""));i(t,f);n.keyboard&&(t.tabIndex="0");this._icon=t;n.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});r=n.icon.createShadow(this._shadow);u=!1;r!==this._shadow&&(this._removeShadow(),u=!0);r&&(i(r,f),r.alt="");this._shadow=r;n.opacity<1&&this._updateOpacity();e&&this.getPane().appendChild(this._icon);this._initInteraction();r&&u&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex});a(this._icon);this.removeInteractiveTarget(this._icon);this._icon=null},_removeShadow:function(){this._shadow&&a(this._shadow);this._shadow=null},_setPos:function(n){b(this._icon,n);this._shadow&&b(this._shadow,n);this._zIndex=n.y+this.options.zIndexOffset;this._resetZIndex()},_updateZIndex:function(n){this._icon.style.zIndex=this._zIndex+n},_animateZoom:function(n){var t=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&(i(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),nc)){var n=this.options.draggable;this.dragging&&(n=this.dragging.enabled(),this.dragging.disable());this.dragging=new nc(this);n&&this.dragging.enable()}},setOpacity:function(n){return this.options.opacity=n,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var n=this.options.opacity;ut(this._icon,n);this._shadow&&ut(this._shadow,n)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),oi=rt.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(n){this._renderer=n.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(n){return l(this,n),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},getElement:function(){return this._path},_reset:function(){this._project();this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),uf=oi.extend({options:{fill:!0,radius:10},initialize:function(n,t){l(this,t);this._latlng=y(n);this._radius=this.options.radius},setLatLng:function(n){return this._latlng=y(n),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(n){return this.options.radius=this._radius=n,this.redraw()},getRadius:function(){return this._radius},setStyle:function(n){var t=n&&n.radius||this._radius;return oi.prototype.setStyle.call(this,n),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng);this._updateBounds()},_updateBounds:function(){var n=this._radius,r=this._radiusY||n,t=this._clickTolerance(),i=[n+t,r+t];this._pxBounds=new v(this._point.subtract(i),this._point.add(i))},_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(n){return n.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),ho=uf.extend({initialize:function(n,t,i){if("number"==typeof t&&(t=s({},i,{radius:t})),l(this,t),this._latlng=y(n),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(n){return this._mRadius=n,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var n=[this._radius,this._radiusY||this._radius];return new tt(this._map.layerPointToLatLng(this._point.subtract(n)),this._map.layerPointToLatLng(this._point.add(n)))},setStyle:oi.prototype.setStyle,_project:function(){var e=this._latlng.lng,i=this._latlng.lat,n=this._map,o=n.options.crs,c;if(o.distance===ui.distance){var t=Math.PI/180,u=this._mRadius/ui.R/t,h=n.project([i+u,e]),l=n.project([i-u,e]),f=h.add(l).divideBy(2),s=n.unproject(f).lat,r=Math.acos((Math.cos(u*t)-Math.sin(i*t)*Math.sin(s*t))/(Math.cos(i*t)*Math.cos(s*t)))/t;(isNaN(r)||0===r)&&(r=u/Math.cos(Math.PI/180*i));this._point=f.subtract(n.getPixelOrigin());this._radius=isNaN(r)?0:f.x-n.project([s,e-r]).x;this._radiusY=f.y-h.y}else c=o.unproject(o.project(this._latlng).subtract([this._mRadius,0])),this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(c).x;this._updateBounds()}}),ni=oi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(n,t){l(this,t);this._setLatLngs(n)},getLatLngs:function(){return this._latlngs},setLatLngs:function(n){return this._setLatLngs(n),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(n){for(var e,o,s,r=1/0,t=null,h=vr,u=0,c=this._parts.length;u<c;u++)for(var f=this._parts[u],i=1,l=f.length;i<l;i++)e=h(n,o=f[i-1],s=f[i],!0),e<r&&(r=e,t=h(n,o,s));return t&&(t.distance=Math.sqrt(r)),t},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var n,r,f,e,u,t,o,i=this._rings[0],s=i.length;if(!s)return null;for(n=0,r=0;n<s-1;n++)r+=i[n].distanceTo(i[n+1])/2;if(0===r)return this._map.layerPointToLatLng(i[0]);for(n=0,e=0;n<s-1;n++)if(u=i[n],t=i[n+1],f=u.distanceTo(t),(e+=f)>r)return o=(e-r)/f,this._map.layerPointToLatLng([t.x-o*(t.x-u.x),t.y-o*(t.y-u.y)])},getBounds:function(){return this._bounds},addLatLng:function(n,t){return t=t||this._defaultShape(),n=y(n),t.push(n),this._bounds.extend(n),this.redraw()},_setLatLngs:function(n){this._bounds=new tt;this._latlngs=this._convertLatLngs(n)},_defaultShape:function(){return dt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(n){for(var i=[],r=dt(n),t=0,u=n.length;t<u;t++)r?(i[t]=y(n[t]),this._bounds.extend(i[t])):i[t]=this._convertLatLngs(n[t]);return i},_project:function(){var n=new v,i,r;this._rings=[];this._projectLatlngs(this._latlngs,this._rings,n);i=this._clickTolerance();r=new t(i,i);this._bounds.isValid()&&n.isValid()&&(n.min._subtract(r),n.max._add(r),this._pxBounds=n)},_projectLatlngs:function(n,t,i){var r,u,e=n[0]instanceof h,f=n.length;if(e){for(u=[],r=0;r<f;r++)u[r]=this._map.latLngToLayerPoint(n[r]),i.extend(u[r]);t.push(u)}else for(r=0;r<f;r++)this._projectLatlngs(n[r],t,i)},_clipPoints:function(){var o=this._renderer._bounds,r,n,t,s,e,u,f,i;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(o))if(this.options.noClip)this._parts=this._rings;else for(i=this._parts,r=0,t=0,s=this._rings.length;r<s;r++)for(n=0,e=(f=this._rings[r]).length;n<e-1;n++)(u=ws(f[n],f[n+1],o,n,!0))&&(i[t]=i[t]||[],i[t].push(u[0]),u[1]===f[n+1]&&n!==e-2||(i[t].push(u[1]),t++))},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,n=0,r=t.length;n<r;n++)t[n]=ys(t[n],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(n,t){var r,i,u,e,o,f,s=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(n))return!1;for(r=0,e=this._parts.length;r<e;r++)for(i=0,u=(o=(f=this._parts[r]).length)-1;i<o;u=i++)if((t||0!==i)&&ps(n,f[u],f[i])<=s)return!0;return!1}});ni._flat=bs;var er=ni.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 r,e,n,t,u,i,o,s,c,f=this._rings[0],h=f.length;if(!h)return null;for(i=o=s=0,r=0,e=h-1;r<h;e=r++)n=f[r],t=f[e],u=n.y*t.x-t.y*n.x,o+=(n.x+t.x)*u,s+=(n.y+t.y)*u,i+=3*u;return c=0===i?f[0]:[o/i,s/i],this._map.layerPointToLatLng(c)},_convertLatLngs:function(n){var t=ni.prototype._convertLatLngs.call(this,n),i=t.length;return i>=2&&t[0]instanceof h&&t[0].equals(t[i-1])&&t.pop(),t},_setLatLngs:function(n){ni.prototype._setLatLngs.call(this,n);dt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return dt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var n=this._renderer._bounds,r=this.options.weight,u=new t(r,r),f,i,e;if(n=new v(n.min.subtract(u),n.max.add(u)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(n))if(this.options.noClip)this._parts=this._rings;else for(i=0,e=this._rings.length;i<e;i++)(f=ks(this._rings[i],n,!0)).length&&this._parts.push(f)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(n){var f,t,i,r,u,e,s,h,o=!1;if(!this._pxBounds||!this._pxBounds.contains(n))return!1;for(r=0,s=this._parts.length;r<s;r++)for(u=0,e=(h=(f=this._parts[r]).length)-1;u<h;e=u++)t=f[u],i=f[e],t.y>n.y!=i.y>n.y&&n.x<(i.x-t.x)*(n.y-t.y)/(i.y-t.y)+t.x&&(o=!o);return o||ni.prototype._containsPoint.call(this,n,!0)}}),ti=ai.extend({initialize:function(n,t){l(this,t);this._layers={};n&&this.addData(n)},addData:function(n){var u,e,r,f=pt(n)?n:n.features,i,t;if(f){for(u=0,e=f.length;u<e;u++)((r=f[u]).geometries||r.geometry||r.features||r.coordinates)&&this.addData(r);return this}return(i=this.options,i.filter&&!i.filter(n))?this:(t=ie(n,i),t?(t.feature=vu(n),t.defaultOptions=t.options,this.resetStyle(t),i.onEachFeature&&i.onEachFeature(n,t),this.addLayer(t)):this)},resetStyle:function(n){return n.options=s({},n.defaultOptions),this._setLayerStyle(n,this.options.style),this},setStyle:function(n){return this.eachLayer(function(t){this._setLayerStyle(t,n)},this)},_setLayerStyle:function(n,t){"function"==typeof t&&(t=t(n.feature));n.setStyle&&n.setStyle(t)}}),co={toGeoJSON:function(n){return bi(this,{type:"Point",coordinates:ue(this.getLatLng(),n)})}};tu.include(co);ho.include(co);uf.include(co);ni.include({toGeoJSON:function(n){var t=!dt(this._latlngs),i=au(this._latlngs,t?1:0,!1,n);return bi(this,{type:(t?"Multi":"")+"LineString",coordinates:i})}});er.include({toGeoJSON:function(n){var t=!dt(this._latlngs),r=t&&!dt(this._latlngs[0]),i=au(this._latlngs,r?2:t?1:0,!0,n);return t||(i=[i]),bi(this,{type:(r?"Multi":"")+"Polygon",coordinates:i})}});ur.include({toMultiPoint:function(n){var t=[];return this.eachLayer(function(i){t.push(i.toGeoJSON(n).geometry.coordinates)}),bi(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(n){var r=this.feature&&this.feature.geometry&&this.feature.geometry.type,i,t;return"MultiPoint"===r?this.toMultiPoint(n):(i="GeometryCollection"===r,t=[],this.eachLayer(function(r){var f,u;r.toGeoJSON&&(f=r.toGeoJSON(n),i?t.push(f.geometry):(u=vu(f),"FeatureCollection"===u.type?t.push.apply(t,u.features):t.push(u)))}),i?bi(this,{geometries:t,type:"GeometryCollection"}):{type:"FeatureCollection",features:t})}});var pl=ds,lo=rt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(n,t,i){this._url=n;this._bounds=k(t);l(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity());this.options.interactive&&(i(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image));this.getPane().appendChild(this._image);this._reset()},onRemove:function(){a(this._image);this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(n){return this.options.opacity=n,this._image&&this._updateOpacity(),this},setStyle:function(n){return n.opacity&&this.setOpacity(n.opacity),this},bringToFront:function(){return this._map&&pi(this._image),this},bringToBack:function(){return this._map&&wi(this._image),this},setUrl:function(n){return this._url=n,this._image&&(this._image.src=n),this},setBounds:function(n){return this._bounds=k(n),this._map&&this._reset(),this},getEvents:function(){var n={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(n.zoomanim=this._animateZoom),n},setZIndex:function(n){return this.options.zIndex=n,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,n=this._image=t?this._url:e("img");i(n,"leaflet-image-layer");this._zoomAnimated&&i(n,"leaflet-zoom-animated");this.options.className&&i(n,this.options.className);n.onselectstart=g;n.onmousemove=g;n.onload=c(this.fire,this,"load");n.onerror=c(this._overlayOnError,this,"error");(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin);this.options.zIndex&&this._updateZIndex();t?this._url=n.src:(n.src=this._url,n.alt=this.options.alt)},_animateZoom:function(n){var t=this._map.getZoomScale(n.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,n.zoom,n.center).min;si(this._image,i,t)},_reset:function(){var n=this._image,t=new v(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=t.getSize();b(n,t.min);n.style.width=i.x+"px";n.style.height=i.y+"px"},_updateOpacity:function(){ut(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 n=this.options.errorOverlayUrl;n&&this._url!==n&&(this._url=n,this._image.src=n)}}),tc=lo.extend({options:{autoplay:!0,loop:!0},_initImage:function(){var o="VIDEO"===this._url.tagName,n=this._image=o?this._url:e("video"),t,f;if(i(n,"leaflet-image-layer"),this._zoomAnimated&&i(n,"leaflet-zoom-animated"),n.onselectstart=g,n.onmousemove=g,n.onloadeddata=c(this.fire,this,"load"),o){for(var r=n.getElementsByTagName("source"),s=[],u=0;u<r.length;u++)s.push(r[u].src);this._url=r.length>0?s:[n.src]}else for(pt(this._url)||(this._url=[this._url]),n.autoplay=!!this.options.autoplay,n.loop=!!this.options.loop,t=0;t<this._url.length;t++)f=e("source"),f.src=this._url[t],n.appendChild(f)}}),ii=rt.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(n,t){l(this,n);this._source=t},onAdd:function(n){this._zoomAnimated=n._zoomAnimated;this._container||this._initLayout();n._fadeAnimated&&ut(this._container,0);clearTimeout(this._removeTimeout);this.getPane().appendChild(this._container);this.update();n._fadeAnimated&&ut(this._container,1);this.bringToFront()},onRemove:function(n){n._fadeAnimated?(ut(this._container,0),this._removeTimeout=setTimeout(c(a,void 0,this._container),200)):a(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(n){return this._latlng=y(n),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(n){return this._content=n,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 n={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(n.zoomanim=this._animateZoom),n},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&pi(this._container),this},bringToBack:function(){return this._map&&wi(this._container),this},_updateContent:function(){if(this._content){var n=this._contentNode,t="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof t)n.innerHTML=t;else{for(;n.hasChildNodes();)n.removeChild(n.firstChild);n.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){var r,f;if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),n=u(this.options.offset),i=this._getAnchor();this._zoomAnimated?b(this._container,t.add(i)):n=n.add(t).add(i);r=this._containerBottom=-n.y;f=this._containerLeft=-Math.round(this._containerWidth/2)+n.x;this._container.style.bottom=r+"px";this._container.style.left=f+"px"}},_getAnchor:function(){return[0,0]}}),or=ii.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(n){return n.openPopup(this),this},onAdd:function(n){ii.prototype.onAdd.call(this,n);n.fire("popupopen",{popup:this});this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof oi||this._source.on("preclick",hi))},onRemove:function(n){ii.prototype.onRemove.call(this,n);n.fire("popupclose",{popup:this});this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof oi||this._source.off("preclick",hi))},getEvents:function(){var n=ii.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(n.preclick=this._close),this.options.keepInView&&(n.moveend=this._adjustPan),n},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var n="leaflet-popup",i=this._container=e("div",n+" "+(this.options.className||"")+" leaflet-zoom-animated"),u=this._wrapper=e("div",n+"-content-wrapper",i),t;(this._contentNode=e("div",n+"-content",u),ar(u),df(this._contentNode),r(u,"contextmenu",hi),this._tipContainer=e("div",n+"-tip-container",i),this._tip=e("div",n+"-tip",this._tipContainer),this.options.closeButton)&&(t=this._closeButton=e("a",n+"-close-button",i),t.href="#close",t.innerHTML="&#215;",r(t,"click",this._onCloseButtonClick,this))},_updateLayout:function(){var r=this._contentNode,n=r.style,t,f,u;n.width="";n.whiteSpace="nowrap";t=r.offsetWidth;t=Math.min(t,this.options.maxWidth);t=Math.max(t,this.options.minWidth);n.width=t+1+"px";n.whiteSpace="";n.height="";f=r.offsetHeight;u=this.options.maxHeight;u&&f>u?(n.height=u+"px",i(r,"leaflet-popup-scrolled")):p(r,"leaflet-popup-scrolled");this._containerWidth=this._container.offsetWidth},_animateZoom:function(n){var t=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center),i=this._getAnchor();b(this._container,t.add(i))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var s=this._map,v=parseInt(lr(this._container,"marginBottom"),10)||0,h=this._container.offsetHeight+v,c=this._containerWidth,l=new t(this._containerLeft,-h-this._containerBottom);l._add(ri(this._container));var n=s.layerPointToContainerPoint(l),a=u(this.options.autoPanPadding),f=u(this.options.autoPanPaddingTopLeft||a),e=u(this.options.autoPanPaddingBottomRight||a),o=s.getSize(),i=0,r=0;n.x+c+e.x>o.x&&(i=n.x+c-o.x+e.x);n.x-i-f.x<0&&(i=n.x-f.x);n.y+h+e.y>o.y&&(r=n.y+h-o.y+e.y);n.y-r-f.y<0&&(r=n.y-f.y);(i||r)&&s.fire("autopanstart").panBy([i,r])}},_onCloseButtonClick:function(n){this._close();yt(n)},_getAnchor:function(){return u(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});f.mergeOptions({closePopupOnClick:!0});f.include({openPopup:function(n,t,i){return n instanceof or||(n=new or(i).setContent(n)),t&&n.setLatLng(t),this.hasLayer(n)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=n,this.addLayer(n))},closePopup:function(n){return n&&n!==this._popup||(n=this._popup,this._popup=null),n&&this.removeLayer(n),this}});rt.include({bindPopup:function(n,t){return n instanceof or?(l(n,t),this._popup=n,n._source=this):(this._popup&&!t||(this._popup=new or(t,this)),this._popup.setContent(n)),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(n,t){if(n instanceof rt||(t=n,n=this),n instanceof ai)for(var i in this._layers){n=this._layers[i];break}return t||(t=n.getCenter?n.getCenter():n.getLatLng()),this._popup&&this._map&&(this._popup._source=n,this._popup.update(),this._map.openPopup(this._popup,t)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(n){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(n)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(n){return this._popup&&this._popup.setContent(n),this},getPopup:function(){return this._popup},_openPopup:function(n){var t=n.layer||n.target;this._popup&&this._map&&(yt(n),t instanceof oi?this.openPopup(n.layer||n.target,n.latlng):this._map.hasLayer(this._popup)&&this._popup._source===t?this.closePopup():this.openPopup(t,n.latlng))},_movePopup:function(n){this._popup.setLatLng(n.latlng)},_onKeyPress:function(n){13===n.originalEvent.keyCode&&this._openPopup(n)}});vi=ii.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(n){ii.prototype.onAdd.call(this,n);this.setOpacity(this.options.opacity);n.fire("tooltipopen",{tooltip:this});this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(n){ii.prototype.onRemove.call(this,n);n.fire("tooltipclose",{tooltip:this});this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var n=ii.prototype.getEvents.call(this);return wt&&!this.options.permanent&&(n.preclick=this._close),n},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var n="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=e("div",n)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(n){var h=this._map,r=this._container,c=h.latLngToContainerPoint(h.getCenter()),l=h.layerPointToContainerPoint(n),f=this.options.direction,o=r.offsetWidth,s=r.offsetHeight,t=u(this.options.offset),e=this._getAnchor();"top"===f?n=n.add(u(-o/2+t.x,-s+t.y+e.y,!0)):"bottom"===f?n=n.subtract(u(o/2-t.x,-t.y,!0)):"center"===f?n=n.subtract(u(o/2+t.x,s/2-e.y+t.y,!0)):"right"===f||"auto"===f&&l.x<c.x?(f="right",n=n.add(u(t.x+e.x,e.y-s/2+t.y,!0))):(f="left",n=n.subtract(u(o+e.x-t.x,s/2-e.y-t.y,!0)));p(r,"leaflet-tooltip-right");p(r,"leaflet-tooltip-left");p(r,"leaflet-tooltip-top");p(r,"leaflet-tooltip-bottom");i(r,"leaflet-tooltip-"+f);b(r,n)},_updatePosition:function(){var n=this._map.latLngToLayerPoint(this._latlng);this._setPosition(n)},setOpacity:function(n){this.options.opacity=n;this._container&&ut(this._container,n)},_animateZoom:function(n){var t=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center);this._setPosition(t)},_getAnchor:function(){return u(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});f.include({openTooltip:function(n,t,i){return n instanceof vi||(n=new vi(i).setContent(n)),t&&n.setLatLng(t),this.hasLayer(n)?this:this.addLayer(n)},closeTooltip:function(n){return n&&this.removeLayer(n),this}});rt.include({bindTooltip:function(n,t){return n instanceof vi?(l(n,t),this._tooltip=n,n._source=this):(this._tooltip&&!t||(this._tooltip=new vi(t,this)),this._tooltip.setContent(n)),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(n){if(n||!this._tooltipHandlersAdded){var i=n?"off":"on",t={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?t.add=this._openTooltip:(t.mouseover=this._openTooltip,t.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(t.mousemove=this._moveTooltip),wt&&(t.click=this._openTooltip));this[i](t);this._tooltipHandlersAdded=!n}},openTooltip:function(n,t){if(n instanceof rt||(t=n,n=this),n instanceof ai)for(var r in this._layers){n=this._layers[r];break}return t||(t=n.getCenter?n.getCenter():n.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=n,this._tooltip.update(),this._map.openTooltip(this._tooltip,t),this._tooltip.options.interactive&&this._tooltip._container&&(i(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(p(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(n){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(n)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(n){return this._tooltip&&this._tooltip.setContent(n),this},getTooltip:function(){return this._tooltip},_openTooltip:function(n){var t=n.layer||n.target;this._tooltip&&this._map&&this.openTooltip(t,this._tooltip.options.sticky?n.latlng:void 0)},_moveTooltip:function(n){var t,i,r=n.latlng;this._tooltip.options.sticky&&n.originalEvent&&(t=this._map.mouseEventToContainerPoint(n.originalEvent),i=this._map.containerPointToLayerPoint(t),r=this._map.layerPointToLatLng(i));this._tooltip.setLatLng(r)}});ao=fr.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(n){var t=n&&"DIV"===n.tagName?n:document.createElement("div"),i=this.options,r;return(t.innerHTML=!1!==i.html?i.html:"",i.bgPos)&&(r=u(i.bgPos),t.style.backgroundPosition=-r.x+"px "+-r.y+"px"),this._setIconStyles(t,"icon"),t},createShadow:function(){return null}});fr.Default=nu;var iu=rt.extend({options:{tileSize:256,opacity:1,updateWhenIdle:nr,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(n){l(this,n)},onAdd:function(){this._initContainer();this._levels={};this._tiles={};this._resetView();this._update()},beforeAdd:function(n){n._addZoomLimit(this)},onRemove:function(n){this._removeAllTiles();a(this._container);n._removeZoomLimit(this);this._container=null;this._tileZoom=void 0},bringToFront:function(){return this._map&&(pi(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(wi(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(n){return this.options.opacity=n,this._updateOpacity(),this},setZIndex:function(n){return this.options.zIndex=n,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var n={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=ef(this._onMoveEnd,this.options.updateInterval,this)),n.move=this._onMove),this._zoomAnimated&&(n.zoomanim=this._animateZoom),n},createTile:function(){return document.createElement("div")},getTileSize:function(){var n=this.options.tileSize;return n instanceof t?n:new t(n,n)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(n){for(var r,u=this.getPane().children,t=-n(-1/0,1/0),i=0,f=u.length;i<f;i++)r=u[i].style.zIndex,u[i]!==this._container&&r&&(t=n(t,+r));isFinite(t)&&(this.options.zIndex=t+n(-1,1),this._updateZIndex())},_updateOpacity:function(){var u,n,t;if(this._map&&!di){ut(this._container,this.options.opacity);var f=+new Date,i=!1,r=!1;for(u in this._tiles)n=this._tiles[u],n.current&&n.loaded&&(t=Math.min(1,(f-n.loaded)/200),ut(n.el,t),t<1?i=!0:(n.active?r=!0:this._onOpaqueTile(n),n.active=!0));r&&!this._noPrune&&this._pruneTiles();i&&(nt(this._fadeFrame),this._fadeFrame=d(this._updateOpacity,this))}},_onOpaqueTile:g,_initContainer:function(){this._container||(this._container=e("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var i=this._tileZoom,u=this.options.maxZoom,t,n,r;if(void 0!==i){for(t in this._levels)this._levels[t].el.children.length||t===i?(this._levels[t].el.style.zIndex=u-Math.abs(i-t),this._onUpdateLevel(t)):(a(this._levels[t].el),this._removeTilesAtZoom(t),this._onRemoveLevel(t),delete this._levels[t]);return n=this._levels[i],r=this._map,n||((n=this._levels[i]={}).el=e("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=u,n.origin=r.project(r.unproject(r.getPixelOrigin()),i).round(),n.zoom=i,this._setZoomTransform(n,r.getCenter(),r.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:g,_onRemoveLevel:g,_onCreateLevel:g,_pruneTiles:function(){var t,i,r,n;if(this._map)if(r=this._map.getZoom(),r>this.options.maxZoom||r<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(i=this._tiles[t]).retain=i.current;for(t in this._tiles)(i=this._tiles[t]).current&&!i.active&&(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(n){for(var t in this._tiles)this._tiles[t].coords.z===n&&this._removeTile(t)},_removeAllTiles:function(){for(var n in this._tiles)this._removeTile(n)},_invalidateAll:function(){for(var n in this._levels)a(this._levels[n].el),this._onRemoveLevel(n),delete this._levels[n];this._removeAllTiles();this._tileZoom=void 0},_retainParent:function(n,i,r,u){var o=Math.floor(n/2),s=Math.floor(i/2),e=r-1,h=new t(+o,+s),c,f;return h.z=+e,c=this._tileCoordsToKey(h),f=this._tiles[c],f&&f.active?(f.retain=!0,!0):(f&&f.loaded&&(f.retain=!0),e>u&&this._retainParent(o,s,e,u))},_retainChildren:function(n,i,r,u){for(var o,s,h,f,e=2*n;e<2*n+2;e++)for(o=2*i;o<2*i+2;o++)s=new t(e,o),s.z=r+1,h=this._tileCoordsToKey(s),f=this._tiles[h],f&&f.active?f.retain=!0:(f&&f.loaded&&(f.retain=!0),r+1<u&&this._retainChildren(e,o,r+1,u))},_resetView:function(n){var t=n&&(n.pinch||n.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(n){this._setView(n.center,n.zoom,!0,n.noUpdate)},_clampZoom:function(n){var t=this.options;return void 0!==t.minNativeZoom&&n<t.minNativeZoom?t.minNativeZoom:void 0!==t.maxNativeZoom&&t.maxNativeZoom<n?t.maxNativeZoom:n},_setView:function(n,t,i,r){var u=this._clampZoom(Math.round(t)),f;(void 0!==this.options.maxZoom&&u>this.options.maxZoom||void 0!==this.options.minZoom&&u<this.options.minZoom)&&(u=void 0);f=this.options.updateWhenZooming&&u!==this._tileZoom;r&&!f||(this._tileZoom=u,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==u&&this._update(n),i||this._pruneTiles(),this._noPrune=!!i);this._setZoomTransforms(n,t)},_setZoomTransforms:function(n,t){for(var i in this._levels)this._setZoomTransform(this._levels[i],n,t)},_setZoomTransform:function(n,t,i){var r=this._map.getZoomScale(i,n.zoom),u=n.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(t,i)).round();et?si(n.el,u,r):b(n.el,u)},_resetGrid:function(){var t=this._map,n=t.options.crs,i=this._tileSize=this.getTileSize(),r=this._tileZoom,u=this._map.getPixelWorldBounds(this._tileZoom);u&&(this._globalTileRange=this._pxBoundsToTileRange(u));this._wrapX=n.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,n.wrapLng[0]],r).x/i.x),Math.ceil(t.project([0,n.wrapLng[1]],r).x/i.y)];this._wrapY=n.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([n.wrapLat[0],0],r).y/i.x),Math.ceil(t.project([n.wrapLat[1],0],r).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(n){var t=this._map,u=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),f=t.getZoomScale(u,this._tileZoom),i=t.project(n,this._tileZoom).floor(),r=t.getSize().divideBy(2*f);return new v(i.subtract(r),i.add(r))},_update:function(n){var h=this._map,c,l,o,s,r,f,a,y;if(h&&(c=this._clampZoom(h.getZoom()),void 0===n&&(n=h.getCenter()),void 0!==this._tileZoom)){var w=this._getTiledPixelBounds(n),i=this._pxBoundsToTileRange(w),p=i.getCenter(),u=[],e=this.options.keepBuffer,b=new v(i.getBottomLeft().subtract([e,-e]),i.getTopRight().add([e,-e]));if(!(isFinite(i.min.x)&&isFinite(i.min.y)&&isFinite(i.max.x)&&isFinite(i.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(l in this._tiles)o=this._tiles[l].coords,o.z===this._tileZoom&&b.contains(new t(o.x,o.y))||(this._tiles[l].current=!1);if(Math.abs(c-this._tileZoom)>1)this._setView(n,c);else{for(s=i.min.y;s<=i.max.y;s++)for(r=i.min.x;r<=i.max.x;r++)f=new t(r,s),(f.z=this._tileZoom,this._isValidTile(f))&&(a=this._tiles[this._tileCoordsToKey(f)],a?a.current=!0:u.push(f));if(u.sort(function(n,t){return n.distanceTo(p)-t.distanceTo(p)}),0!==u.length){for(this._loading||(this._loading=!0,this.fire("loading")),y=document.createDocumentFragment(),r=0;r<u.length;r++)this._addTile(u[r],y);this._level.el.appendChild(y)}}}},_isValidTile:function(n){var i=this._map.options.crs,t,r;return!i.infinite&&(t=this._globalTileRange,!i.wrapLng&&(n.x<t.min.x||n.x>t.max.x)||!i.wrapLat&&(n.y<t.min.y||n.y>t.max.y))?!1:this.options.bounds?(r=this._tileCoordsToBounds(n),k(this.options.bounds).overlaps(r)):!0},_keyToBounds:function(n){return this._tileCoordsToBounds(this._keyToTileCoords(n))},_tileCoordsToNwSe:function(n){var t=this._map,i=this.getTileSize(),r=n.scaleBy(i),u=r.add(i);return[t.unproject(r,n.z),t.unproject(u,n.z)]},_tileCoordsToBounds:function(n){var i=this._tileCoordsToNwSe(n),t=new tt(i[0],i[1]);return this.options.noWrap||(t=this._map.wrapLatLngBounds(t)),t},_tileCoordsToKey:function(n){return n.x+":"+n.y+":"+n.z},_keyToTileCoords:function(n){var i=n.split(":"),r=new t(+i[0],+i[1]);return r.z=+i[2],r},_removeTile:function(n){var t=this._tiles[n];t&&(a(t.el),delete this._tiles[n],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(n)}))},_initTile:function(n){i(n,"leaflet-tile");var t=this.getTileSize();n.style.width=t.x+"px";n.style.height=t.y+"px";n.onselectstart=g;n.onmousemove=g;di&&this.options.opacity<1&&ut(n,this.options.opacity);gi&&!br&&(n.style.WebkitBackfaceVisibility="hidden")},_addTile:function(n,t){var r=this._getTilePos(n),u=this._tileCoordsToKey(n),i=this.createTile(this._wrapCoords(n),c(this._tileReady,this,n));this._initTile(i);this.createTile.length<2&&d(c(this._tileReady,this,n,null,i));b(i,r);this._tiles[u]={el:i,coords:n,current:!0};t.appendChild(i);this.fire("tileloadstart",{tile:i,coords:n})},_tileReady:function(n,t,r){t&&this.fire("tileerror",{error:t,tile:r,coords:n});var u=this._tileCoordsToKey(n);(r=this._tiles[u])&&(r.loaded=+new Date,this._map._fadeAnimated?(ut(r.el,0),nt(this._fadeFrame),this._fadeFrame=d(this._updateOpacity,this)):(r.active=!0,this._pruneTiles()),t||(i(r.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:r.el,coords:n})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),di||!this._map._fadeAnimated?d(this._pruneTiles,this):setTimeout(c(this._pruneTiles,this),250)))},_getTilePos:function(n){return n.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(n){var i=new t(this._wrapX?hr(n.x,this._wrapX):n.x,this._wrapY?hr(n.y,this._wrapY):n.y);return i.z=n.z,i},_pxBoundsToTileRange:function(n){var t=this.getTileSize();return new v(n.min.unscaleBy(t).floor(),n.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var n in this._tiles)if(!this._tiles[n].loaded)return!1;return!0}}),sr=iu.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(n,t){this._url=n;(t=l(this,t)).detectRetina&&ei&&t.maxZoom>0&&(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom++):(t.zoomOffset++,t.maxZoom--),t.minZoom=Math.max(0,t.minZoom));"string"==typeof t.subdomains&&(t.subdomains=t.subdomains.split(""));gi||this.on("tileunload",this._onTileRemove)},setUrl:function(n,t){return this._url=n,t||this.redraw(),this},createTile:function(n,t){var i=document.createElement("img");return r(i,"load",c(this._tileOnLoad,this,t,i)),r(i,"error",c(this._tileOnError,this,t,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(n),i},getTileUrl:function(n){var t={r:ei?"@2x":"",s:this._getSubdomain(n),x:n.x,y:n.y,z:this._getZoomForUrl()},i;return this._map&&!this._map.options.crs.infinite&&(i=this._globalTileRange.max.y-n.y,this.options.tms&&(t.y=i),t["-y"]=i),is(this._url,s(t,this.options))},_tileOnLoad:function(n,t){di?setTimeout(c(n,this,null,t),0):n(null,t)},_tileOnError:function(n,t,i){var r=this.options.errorTileUrl;r&&t.getAttribute("src")!==r&&(t.src=r);n(i,t)},_onTileRemove:function(n){n.tile.onload=null},_getZoomForUrl:function(){var n=this._tileZoom,t=this.options.maxZoom,i=this.options.zoomReverse,r=this.options.zoomOffset;return i&&(n=t-n),n+r},_getSubdomain:function(n){var t=Math.abs(n.x+n.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var t,n;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((n=this._tiles[t].el).onload=g,n.onerror=g,n.complete||(n.src=pu,a(n),delete this._tiles[t]))},_removeTile:function(n){var t=this._tiles[n];if(t)return eh||t.el.setAttribute("src",pu),iu.prototype._removeTile.call(this,n)},_tileReady:function(n,t,i){if(this._map&&(!i||i.getAttribute("src")!==pu))return iu.prototype._tileReady.call(this,n,t,i)}}),ic=sr.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(n,t){var i,r,u,f;this._url=n;i=s({},this.defaultWmsParams);for(r in t)r in this.options||(i[r]=t[r]);u=(t=l(this,t)).detectRetina&&ei?2:1;f=this.getTileSize();i.width=f.x*u;i.height=f.y*u;this.wmsParams=i},onAdd:function(n){this._crs=this.options.crs||n.options.crs;this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code;sr.prototype.onAdd.call(this,n)},getTileUrl:function(n){var r=this._tileCoordsToNwSe(n),u=this._crs,f=at(u.project(r[0]),u.project(r[1])),t=f.min,i=f.max,o=(this._wmsVersion>=1.3&&this._crs===gh?[t.y,t.x,i.y,i.x]:[t.x,t.y,i.x,i.y]).join(","),e=sr.prototype.getTileUrl.call(this,n);return e+ts(this.wmsParams,e,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+o},setParams:function(n,t){return s(this.wmsParams,n),t||this.redraw(),this}});sr.WMS=ic;gs.wms=function(n,t){return new ic(n,t)};var bt=rt.extend({options:{padding:.1,tolerance:0},initialize:function(n){l(this,n);o(this);this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&i(this._container,"leaflet-zoom-animated"));this.getPane().appendChild(this._container);this._update();this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this);this._destroyContainer()},getEvents:function(){var n={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(n.zoomanim=this._onAnimZoom),n},_onAnimZoom:function(n){this._updateTransform(n.center,n.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(n,t){var i=this._map.getZoomScale(t,this._zoom),f=ri(this._container),r=this._map.getSize().multiplyBy(.5+this.options.padding),e=this._map.project(this._center,t),o=this._map.project(n,t).subtract(e),u=r.multiplyBy(-i).add(f).add(r).subtract(o);et?si(this._container,u,i):b(this._container,u)},_reset:function(){this._update();this._updateTransform(this._center,this._zoom);for(var n in this._layers)this._layers[n]._reset()},_onZoomEnd:function(){for(var n in this._layers)this._layers[n]._project()},_updatePaths:function(){for(var n in this._layers)this._layers[n]._update()},_update:function(){var n=this.options.padding,t=this._map.getSize(),i=this._map.containerPointToLayerPoint(t.multiplyBy(-n)).round();this._bounds=new v(i,i.add(t.multiplyBy(1+2*n)).round());this._center=this._map.getCenter();this._zoom=this._map.getZoom()}}),rc=bt.extend({getEvents:function(){var n=bt.prototype.getEvents.call(this);return n.viewprereset=this._onViewPreReset,n},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){bt.prototype.onAdd.call(this);this._draw()},_initContainer:function(){var n=this._container=document.createElement("canvas");r(n,"mousemove",ef(this._onMouseMove,32,this),this);r(n,"click dblclick mousedown mouseup contextmenu",this._onClick,this);r(n,"mouseout",this._handleMouseOut,this);this._ctx=n.getContext("2d")},_destroyContainer:function(){nt(this._redrawRequest);delete this._ctx;a(this._container);w(this._container);delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(var n in this._layers)this._layers[n]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={};bt.prototype._update.call(this);var t=this._bounds,n=this._container,i=t.getSize(),r=ei?2:1;b(n,t.min);n.width=r*i.x;n.height=r*i.y;n.style.width=i.x+"px";n.style.height=i.y+"px";ei&&this._ctx.scale(2,2);this._ctx.translate(-t.min.x,-t.min.y);this.fire("update")}},_reset:function(){bt.prototype._reset.call(this);this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(n){this._updateDashArray(n);this._layers[o(n)]=n;var t=n._order={layer:n,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t);this._drawLast=t;this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(n){this._requestRedraw(n)},_removePath:function(n){var r=n._order,t=r.next,i=r.prev;t?t.prev=i:this._drawLast=i;i?i.next=t:this._drawFirst=t;delete this._drawnLayers[n._leaflet_id];delete n._order;delete this._layers[o(n)];this._requestRedraw(n)},_updatePath:function(n){this._extendRedrawBounds(n);n._project();n._update();this._requestRedraw(n)},_updateStyle:function(n){this._updateDashArray(n);this._requestRedraw(n)},_updateDashArray:function(n){if("string"==typeof n.options.dashArray){for(var i=n.options.dashArray.split(/[, ]+/),r=[],t=0;t<i.length;t++)r.push(Number(i[t]));n.options._dashArray=r}else n.options._dashArray=n.options.dashArray},_requestRedraw:function(n){this._map&&(this._extendRedrawBounds(n),this._redrawRequest=this._redrawRequest||d(this._redraw,this))},_extendRedrawBounds:function(n){if(n._pxBounds){var t=(n.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new v;this._redrawBounds.extend(n._pxBounds.min.subtract([t,t]));this._redrawBounds.extend(n._pxBounds.max.add([t,t]))}},_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 n=this._redrawBounds,t;n?(t=n.getSize(),this._ctx.clearRect(n.min.x,n.min.y,t.x,t.y)):this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var i,n=this._redrawBounds,r,t;for((this._ctx.save(),n)&&(r=n.getSize(),this._ctx.beginPath(),this._ctx.rect(n.min.x,n.min.y,r.x,r.y),this._ctx.clip()),this._drawing=!0,t=this._drawFirst;t;t=t.next)i=t.layer,(!n||i._pxBounds&&i._pxBounds.intersects(n))&&i._updatePath();this._drawing=!1;this._ctx.restore()},_updatePoly:function(n,t){if(this._drawing){var i,r,o,f,e=n._parts,s=e.length,u=this._ctx;if(s){for(this._drawnLayers[n._leaflet_id]=n,u.beginPath(),i=0;i<s;i++){for(r=0,o=e[i].length;r<o;r++)f=e[i][r],u[r?"lineTo":"moveTo"](f.x,f.y);t&&u.closePath()}this._fillStroke(u,n)}}},_updateCircle:function(n){if(this._drawing&&!n._empty()){var u=n._point,t=this._ctx,r=Math.max(Math.round(n._radius),1),i=(Math.max(Math.round(n._radiusY),1)||r)/r;this._drawnLayers[n._leaflet_id]=n;1!==i&&(t.save(),t.scale(1,i));t.beginPath();t.arc(u.x,u.y/i,r,0,2*Math.PI,!1);1!==i&&t.restore();this._fillStroke(t,n)}},_fillStroke:function(n,t){var i=t.options;i.fill&&(n.globalAlpha=i.fillOpacity,n.fillStyle=i.fillColor||i.color,n.fill(i.fillRule||"evenodd"));i.stroke&&0!==i.weight&&(n.setLineDash&&n.setLineDash(t.options&&t.options._dashArray||[]),n.globalAlpha=i.opacity,n.lineWidth=i.weight,n.strokeStyle=i.color,n.lineCap=i.lineCap,n.lineJoin=i.lineJoin,n.stroke())},_onClick:function(n){for(var t,r,u=this._map.mouseEventToLayerPoint(n),i=this._drawFirst;i;i=i.next)(t=i.layer).options.interactive&&t._containsPoint(u)&&!this._map._draggableMoved(t)&&(r=t);r&&(gf(n),this._fireEvent([r],n))},_onMouseMove:function(n){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var t=this._map.mouseEventToLayerPoint(n);this._handleMouseHover(n,t)}},_handleMouseOut:function(n){var t=this._hoveredLayer;t&&(p(this._container,"leaflet-interactive"),this._fireEvent([t],n,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(n,t){for(var f,r,u=this._drawFirst;u;u=u.next)(f=u.layer).options.interactive&&f._containsPoint(t)&&(r=f);r!==this._hoveredLayer&&(this._handleMouseOut(n),r&&(i(this._container,"leaflet-interactive"),this._fireEvent([r],n,"mouseover"),this._hoveredLayer=r));this._hoveredLayer&&this._fireEvent([this._hoveredLayer],n)},_fireEvent:function(n,t,i){this._map._fireDOMEvent(t,i||t.type,n)},_bringToFront:function(n){var t=n._order,i=t.next,r=t.prev;i&&(i.prev=r,r?r.next=i:i&&(this._drawFirst=i),t.prev=this._drawLast,this._drawLast.next=t,t.next=null,this._drawLast=t,this._requestRedraw(n))},_bringToBack:function(n){var t=n._order,r=t.next,i=t.prev;i&&(i.next=r,r?r.prev=i:i&&(this._drawLast=i),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(n))}}),ru=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(n){return document.createElement("<lvml:"+n+' class="lvml">')}}catch(n){return function(n){return document.createElement("<"+n+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),wl={_initContainer:function(){this._container=e("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(bt.prototype._update.call(this),this.fire("update"))},_initPath:function(n){var t=n._container=ru("shape");i(t,"leaflet-vml-shape "+(this.options.className||""));t.coordsize="1 1";n._path=ru("path");t.appendChild(n._path);this._updateStyle(n);this._layers[o(n)]=n},_addPath:function(n){var t=n._container;this._container.appendChild(t);n.options.interactive&&n.addInteractiveTarget(t)},_removePath:function(n){var t=n._container;a(t);n.removeInteractiveTarget(t);delete this._layers[o(n)]},_updateStyle:function(n){var i=n._stroke,r=n._fill,t=n.options,u=n._container;u.stroked=!!t.stroke;u.filled=!!t.fill;t.stroke?(i||(i=n._stroke=ru("stroke")),u.appendChild(i),i.weight=t.weight+"px",i.color=t.color,i.opacity=t.opacity,i.dashStyle=t.dashArray?pt(t.dashArray)?t.dashArray.join(" "):t.dashArray.replace(/( *, *)/g," "):"",i.endcap=t.lineCap.replace("butt","flat"),i.joinstyle=t.lineJoin):i&&(u.removeChild(i),n._stroke=null);t.fill?(r||(r=n._fill=ru("fill")),u.appendChild(r),r.color=t.fillColor||t.color,r.opacity=t.fillOpacity):r&&(u.removeChild(r),n._fill=null)},_updateCircle:function(n){var t=n._point.round(),i=Math.round(n._radius),r=Math.round(n._radiusY||i);this._setPath(n,n._empty()?"M0 0":"AL "+t.x+","+t.y+" "+i+","+r+" 0,23592600")},_setPath:function(n,t){n._path.v=t},_bringToFront:function(n){pi(n._container)},_bringToBack:function(n){wi(n._container)}},ff=ku?ru:fs,uu=bt.extend({getEvents:function(){var n=bt.prototype.getEvents.call(this);return n.zoomstart=this._onZoomStart,n},_initContainer:function(){this._container=ff("svg");this._container.setAttribute("pointer-events","none");this._rootGroup=ff("g");this._container.appendChild(this._rootGroup)},_destroyContainer:function(){a(this._container);w(this._container);delete this._container;delete this._rootGroup;delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){bt.prototype._update.call(this);var t=this._bounds,n=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(n)||(this._svgSize=n,i.setAttribute("width",n.x),i.setAttribute("height",n.y));b(i,t.min);i.setAttribute("viewBox",[t.min.x,t.min.y,n.x,n.y].join(" "));this.fire("update")}},_initPath:function(n){var t=n._path=ff("path");n.options.className&&i(t,n.options.className);n.options.interactive&&i(t,"leaflet-interactive");this._updateStyle(n);this._layers[o(n)]=n},_addPath:function(n){this._rootGroup||this._initContainer();this._rootGroup.appendChild(n._path);n.addInteractiveTarget(n._path)},_removePath:function(n){a(n._path);n.removeInteractiveTarget(n._path);delete this._layers[o(n)]},_updatePath:function(n){n._project();n._update()},_updateStyle:function(n){var t=n._path,i=n.options;t&&(i.stroke?(t.setAttribute("stroke",i.color),t.setAttribute("stroke-opacity",i.opacity),t.setAttribute("stroke-width",i.weight),t.setAttribute("stroke-linecap",i.lineCap),t.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?t.setAttribute("stroke-dasharray",i.dashArray):t.removeAttribute("stroke-dasharray"),i.dashOffset?t.setAttribute("stroke-dashoffset",i.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),i.fill?(t.setAttribute("fill",i.fillColor||i.color),t.setAttribute("fill-opacity",i.fillOpacity),t.setAttribute("fill-rule",i.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(n,t){this._setPath(n,es(n._parts,t))},_updateCircle:function(n){var i=n._point,t=Math.max(Math.round(n._radius),1),r="a"+t+","+(Math.max(Math.round(n._radiusY),1)||t)+" 0 1,0 ",u=n._empty()?"M0 0":"M"+(i.x-t)+","+i.y+r+2*t+",0 "+r+2*-t+",0 ";this._setPath(n,u)},_setPath:function(n,t){n._path.setAttribute("d",t)},_bringToFront:function(n){pi(n._path)},_bringToBack:function(n){wi(n._path)}});ku&&uu.include(wl);f.include({getRenderer:function(n){var t=n.options.renderer||this._getPaneRenderer(n.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(n){if("overlayPane"===n||void 0===n)return!1;var t=this._paneRenderers[n];return void 0===t&&(t=this._createRenderer({pane:n}),this._paneRenderers[n]=t),t},_createRenderer:function(n){return this.options.preferCanvas&&nh(n)||th(n)}});vo=er.extend({initialize:function(n,t){er.prototype.initialize.call(this,this._boundsToLatLngs(n),t)},setBounds:function(n){return this.setLatLngs(this._boundsToLatLngs(n))},_boundsToLatLngs:function(n){return n=k(n),[n.getSouthWest(),n.getNorthWest(),n.getNorthEast(),n.getSouthEast()]}});uu.create=ff;uu.pointsToPath=es;ti.geometryToLayer=ie;ti.coordsToLatLng=re;ti.coordsToLatLngs=lu;ti.latLngToCoords=ue;ti.latLngsToCoords=au;ti.getFeature=bi;ti.asFeature=vu;f.mergeOptions({boxZoom:!0});yo=ct.extend({initialize:function(n){this._map=n;this._container=n._container;this._pane=n._panes.overlayPane;this._resetStateTimeout=0;n.on("unload",this._destroy,this)},addHooks:function(){r(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){w(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){a(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(n){if(!n.shiftKey||1!==n.which&&1!==n.button)return!1;this._clearDeferredResetState();this._resetState();yr();yf();this._startPoint=this._map.mouseEventToContainerPoint(n);r(document,{contextmenu:yt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(n){this._moved||(this._moved=!0,this._box=e("div","leaflet-zoom-box",this._container),i(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart"));this._point=this._map.mouseEventToContainerPoint(n);var t=new v(this._point,this._startPoint),r=t.getSize();b(this._box,t.min);this._box.style.width=r.x+"px";this._box.style.height=r.y+"px"},_finish:function(){this._moved&&(a(this._box),p(this._container,"leaflet-crosshair"));pr();pf();w(document,{contextmenu:yt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(n){if((1===n.which||1===n.button)&&(this._finish(),this._moved)){this._clearDeferredResetState();this._resetStateTimeout=setTimeout(c(this._resetState,this),0);var t=new tt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(n){27===n.keyCode&&this._finish()}});f.addInitHook("addHandler","boxZoom",yo);f.mergeOptions({doubleClickZoom:!0});po=ct.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(n){var t=this._map,i=t.getZoom(),r=t.options.zoomDelta,u=n.originalEvent.shiftKey?i-r:i+r;"center"===t.options.doubleClickZoom?t.setZoom(u):t.setZoomAround(n.containerPoint,u)}});f.addInitHook("addHandler","doubleClickZoom",po);f.mergeOptions({dragging:!0,inertia:!br,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});wo=ct.extend({addHooks:function(){if(!this._draggable){var n=this._map;this._draggable=new li(n._mapPane,n._container);this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this);this._draggable.on("predrag",this._onPreDragLimit,this);n.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),n.on("zoomend",this._onZoomEnd,this),n.whenReady(this._onZoomEnd,this))}i(this._map._container,"leaflet-grab leaflet-touch-drag");this._draggable.enable();this._positions=[];this._times=[]},removeHooks:function(){p(this._map._container,"leaflet-grab");p(this._map._container,"leaflet-touch-drag");this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var n=this._map,t;(n._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity)?(t=k(this._map.options.maxBounds),this._offsetLimit=at(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null;n.fire("movestart").fire("dragstart");n.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(n){if(this._map.options.inertia){var t=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i);this._times.push(t);this._prunePositions(t)}this._map.fire("move",n).fire("drag",n)},_prunePositions:function(n){for(;this._positions.length>1&&n-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var n=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(n).x;this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(n,t){return n-(n-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var n=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;n.x<t.min.x&&(n.x=this._viscousLimit(n.x,t.min.x));n.y<t.min.y&&(n.y=this._viscousLimit(n.y,t.min.y));n.x>t.max.x&&(n.x=this._viscousLimit(n.x,t.max.x));n.y>t.max.y&&(n.y=this._viscousLimit(n.y,t.max.y));this._draggable._newPos=this._draggable._startPos.add(n)}},_onPreDragWrap:function(){var i=this._worldWidth,t=Math.round(i/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,u=(r-t+n)%i+t-n,f=(r+t+n)%i-t-n,e=Math.abs(u+n)<Math.abs(f+n)?u:f;this._draggable._absPos=this._draggable._newPos.clone();this._draggable._newPos.x=e},_onDragEnd:function(n){var t=this._map,r=t.options,h=!r.inertia||this._times.length<2;if(t.fire("dragend",n),h)t.fire("moveend");else{this._prunePositions(+new Date);var c=this._lastPos.subtract(this._positions[0]),l=(this._lastTime-this._times[0])/1e3,u=r.easeLinearity,f=c.multiplyBy(u/l),e=f.distanceTo([0,0]),o=Math.min(r.inertiaMaxSpeed,e),a=f.multiplyBy(o/e),s=o/(r.inertiaDeceleration*u),i=a.multiplyBy(-s/2).round();i.x||i.y?(i=t._limitOffset(i,t.options.maxBounds),d(function(){t.panBy(i,{duration:s,easeLinearity:u,noMoveStart:!0,animate:!0})})):t.fire("moveend")}}});f.addInitHook("addHandler","dragging",wo);f.mergeOptions({keyboard:!0,keyboardPanDelta:80});bo=ct.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(n){this._map=n;this._setPanDelta(n.options.keyboardPanDelta);this._setZoomDelta(n.options.zoomDelta)},addHooks:function(){var n=this._map._container;n.tabIndex<=0&&(n.tabIndex="0");r(n,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this);this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks();w(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 n=document.body,t=document.documentElement,i=n.scrollTop||t.scrollTop,r=n.scrollLeft||t.scrollLeft;this._map._container.focus();window.scrollTo(r,i)}},_onFocus:function(){this._focused=!0;this._map.fire("focus")},_onBlur:function(){this._focused=!1;this._map.fire("blur")},_setPanDelta:function(n){for(var u=this._panKeys={},r=this.keyCodes,t=0,i=r.left.length;t<i;t++)u[r.left[t]]=[-1*n,0];for(t=0,i=r.right.length;t<i;t++)u[r.right[t]]=[n,0];for(t=0,i=r.down.length;t<i;t++)u[r.down[t]]=[0,n];for(t=0,i=r.up.length;t<i;t++)u[r.up[t]]=[0,-1*n]},_setZoomDelta:function(n){for(var u=this._zoomKeys={},r=this.keyCodes,t=0,i=r.zoomIn.length;t<i;t++)u[r.zoomIn[t]]=n;for(t=0,i=r.zoomOut.length;t<i;t++)u[r.zoomOut[t]]=-n},_addHooks:function(){r(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){w(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(n){if(!(n.altKey||n.ctrlKey||n.metaKey)){var r,i=n.keyCode,t=this._map;if(i in this._panKeys)t._panAnim&&t._panAnim._inProgress||(r=this._panKeys[i],n.shiftKey&&(r=u(r).multiplyBy(3)),t.panBy(r),t.options.maxBounds&&t.panInsideBounds(t.options.maxBounds));else if(i in this._zoomKeys)t.setZoom(t.getZoom()+(n.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!t._popup||!t._popup.options.closeOnEscapeKey)return;t.closePopup()}yt(n)}}});f.addInitHook("addHandler","keyboard",bo);f.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});ko=ct.extend({addHooks:function(){r(this._map._container,"mousewheel",this._onWheelScroll,this);this._delta=0},removeHooks:function(){w(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(n){var i=vs(n),r=this._map.options.wheelDebounceTime,t;this._delta+=i;this._lastMousePos=this._map.mouseEventToContainerPoint(n);this._startTime||(this._startTime=+new Date);t=Math.max(r-(+new Date-this._startTime),0);clearTimeout(this._timer);this._timer=setTimeout(c(this._performZoom,this),t);yt(n)},_performZoom:function(){var n=this._map,t=n.getZoom(),i=this._map.options.zoomSnap||0;n._stop();var e=this._delta/(4*this._map.options.wheelPxPerZoomLevel),u=4*Math.log(2/(1+Math.exp(-Math.abs(e))))/Math.LN2,f=i?Math.ceil(u/i)*i:u,r=n._limitZoom(t+(this._delta>0?f:-f))-t;this._delta=0;this._startTime=null;r&&("center"===n.options.scrollWheelZoom?n.setZoom(t+r):n.setZoomAround(this._lastMousePos,t+r))}});f.addInitHook("addHandler","scrollWheelZoom",ko);f.mergeOptions({tap:!0,tapTolerance:15});go=ct.extend({addHooks:function(){r(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){w(this._map._container,"touchstart",this._onDown,this)},_onDown:function(n){if(n.touches){if(ft(n),this._fireClick=!0,n.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var u=n.touches[0],f=u.target;this._startPos=this._newPos=new t(u.clientX,u.clientY);f.tagName&&"a"===f.tagName.toLowerCase()&&i(f,"leaflet-active");this._holdTimeout=setTimeout(c(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",u))},this),1e3);this._simulateEvent("mousedown",u);r(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(n){if(clearTimeout(this._holdTimeout),w(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&n&&n.changedTouches){var i=n.changedTouches[0],t=i.target;t&&t.tagName&&"a"===t.tagName.toLowerCase()&&p(t,"leaflet-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(n){var i=n.touches[0];this._newPos=new t(i.clientX,i.clientY);this._simulateEvent("mousemove",i)},_simulateEvent:function(n,t){var i=document.createEvent("MouseEvents");i._simulated=!0;t.target._simulatedClick=!0;i.initMouseEvent(n,!0,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,!1,!1,!1,!1,0,null);t.target.dispatchEvent(i)}});wt&&!ot&&f.addInitHook("addHandler","tap",go);f.mergeOptions({touchZoom:wt&&!br,bounceAtZoomLimits:!0});ns=ct.extend({addHooks:function(){i(this._map._container,"leaflet-touch-zoom");r(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){p(this._map._container,"leaflet-touch-zoom");w(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(n){var t=this._map,i,u;!n.touches||2!==n.touches.length||t._animatingZoom||this._zooming||(i=t.mouseEventToContainerPoint(n.touches[0]),u=t.mouseEventToContainerPoint(n.touches[1]),this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),"center"!==t.options.touchZoom&&(this._pinchStartLatLng=t.containerPointToLatLng(i.add(u)._divideBy(2))),this._startDist=i.distanceTo(u),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),r(document,"touchmove",this._onTouchMove,this),r(document,"touchend",this._onTouchEnd,this),ft(n))},_onTouchMove:function(n){var r,e;if(n.touches&&2===n.touches.length&&this._zooming){var t=this._map,u=t.mouseEventToContainerPoint(n.touches[0]),f=t.mouseEventToContainerPoint(n.touches[1]),i=u.distanceTo(f)/this._startDist;if(this._zoom=t.getScaleZoom(i,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&i<1||this._zoom>t.getMaxZoom()&&i>1)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1===i)return}else{if(r=u._add(f)._divideBy(2)._subtract(this._centerPoint),1===i&&0===r.x&&0===r.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0);nt(this._animRequest);e=c(t._move,t,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=d(e,this,!0);ft(n)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,nt(this._animRequest),w(document,"touchmove",this._onTouchMove),w(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}});f.addInitHook("addHandler","touchZoom",ns);f.BoxZoom=yo;f.DoubleClickZoom=po;f.Drag=wo;f.Keyboard=bo;f.ScrollWheelZoom=ko;f.Tap=go;f.TouchZoom=ns;Object.freeze=ih;n.version="1.3.4";n.Control=ht;n.control=gr;n.Browser=ul;n.Evented=ki;n.Mixin=hl;n.Util=dc;n.Class=kt;n.Handler=ct;n.extend=s;n.bind=c;n.stamp=o;n.setOptions=l;n.DomEvent=sl;n.DomUtil=el;n.PosAnimation=wh;n.Draggable=li;n.LineUtil=cl;n.PolyUtil=ll;n.Point=t;n.point=u;n.Bounds=v;n.bounds=at;n.Transformation=hf;n.transformation=cr;n.Projection=al;n.LatLng=h;n.latLng=y;n.LatLngBounds=tt;n.latLngBounds=k;n.CRS=gt;n.GeoJSON=ti;n.geoJSON=ds;n.geoJson=pl;n.Layer=rt;n.LayerGroup=ur;n.layerGroup=function(n,t){return new ur(n,t)};n.FeatureGroup=ai;n.featureGroup=function(n){return new ai(n)};n.ImageOverlay=lo;n.imageOverlay=function(n,t,i){return new lo(n,t,i)};n.VideoOverlay=tc;n.videoOverlay=function(n,t,i){return new tc(n,t,i)};n.DivOverlay=ii;n.Popup=or;n.popup=function(n,t){return new or(n,t)};n.Tooltip=vi;n.tooltip=function(n,t){return new vi(n,t)};n.Icon=fr;n.icon=function(n){return new fr(n)};n.DivIcon=ao;n.divIcon=function(n){return new ao(n)};n.Marker=tu;n.marker=function(n,t){return new tu(n,t)};n.TileLayer=sr;n.tileLayer=gs;n.GridLayer=iu;n.gridLayer=function(n){return new iu(n)};n.SVG=uu;n.svg=th;n.Renderer=bt;n.Canvas=rc;n.canvas=nh;n.Path=oi;n.CircleMarker=uf;n.circleMarker=function(n,t){return new uf(n,t)};n.Circle=ho;n.circle=function(n,t,i){return new ho(n,t,i)};n.Polyline=ni;n.polyline=function(n,t){return new ni(n,t)};n.Polygon=er;n.polygon=function(n,t){return new er(n,t)};n.Rectangle=vo;n.rectangle=function(n,t){return new vo(n,t)};n.Map=f;n.map=function(n,t){return new f(n,t)};uc=window.L;n.noConflict=function(){return window.L=uc,this};window.L=n});!function e(n,t,i){function r(u,e){var s,h,o;if(!t[u]){if(!n[u]){if(s="function"==typeof require&&require,!e&&s)return s(u,!0);if(f)return f(u,!0);h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h;}o=t[u]={exports:{}};n[u][0].call(o.exports,function(t){var i=n[u][1][t];return r(i?i:t)},o,o.exports,e,n,t,i)}return t[u].exports}for(var f="function"==typeof require&&require,u=0;u<i.length;u++)r(i[u]);return r}({1:[function(n,t,i){"use strict";function u(){}function e(n){if("function"!=typeof n)throw new TypeError("resolver must be a function");this.state=a;this.queue=[];this.outcome=void 0;n!==u&&h(this,n)}function f(n,t,i){this.promise=n;"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled);"function"==typeof i&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}function o(n,t,i){k(function(){var u;try{u=t(i)}catch(f){return r.reject(n,f)}u===n?r.reject(n,new TypeError("Cannot resolve promise with itself")):r.resolve(n,u)})}function v(n){var t=n&&n.then;if(n&&"object"==typeof n&&"function"==typeof t)return function(){t.apply(n,arguments)}}function h(n,t){function u(t){i||(i=!0,r.reject(n,t))}function e(t){i||(i=!0,r.resolve(n,t))}function o(){t(e,u)}var i=!1,f=c(o);"error"===f.status&&u(f.value)}function c(n,t){var i={};try{i.value=n(t);i.status="success"}catch(r){i.status="error";i.value=r}return i}function y(n){return n instanceof this?n:r.resolve(new this(u),n)}function p(n){var t=new this(u);return r.reject(t,n)}function w(n){function s(n,u){function f(n){o[u]=n;++c!==t||i||(i=!0,r.resolve(e,o))}h.resolve(n).then(f,function(n){i||(i=!0,r.reject(e,n))})}var h=this,t,i;if("[object Array]"!==Object.prototype.toString.call(n))return this.reject(new TypeError("must be an array"));if(t=n.length,i=!1,!t)return this.resolve([]);for(var o=new Array(t),c=0,f=-1,e=new this(u);++f<t;)s(n[f],f);return e}function b(n){function o(n){s.resolve(n).then(function(n){t||(t=!0,r.resolve(i,n))},function(n){t||(t=!0,r.reject(i,n))})}var s=this,f,t,e,i;if("[object Array]"!==Object.prototype.toString.call(n))return this.reject(new TypeError("must be an array"));if(f=n.length,t=!1,!f)return this.resolve([]);for(e=-1,i=new this(u);++e<f;)o(n[e]);return i}var k=n("immediate"),r={},l=["REJECTED"],s=["FULFILLED"],a=["PENDING"];t.exports=i=e;e.prototype["catch"]=function(n){return this.then(null,n)};e.prototype.then=function(n,t){var i,r;return"function"!=typeof n&&this.state===s||"function"!=typeof t&&this.state===l?this:(i=new this.constructor(u),this.state!==a?(r=this.state===s?n:t,o(i,r,this.outcome)):this.queue.push(new f(i,n,t)),i)};f.prototype.callFulfilled=function(n){r.resolve(this.promise,n)};f.prototype.otherCallFulfilled=function(n){o(this.promise,this.onFulfilled,n)};f.prototype.callRejected=function(n){r.reject(this.promise,n)};f.prototype.otherCallRejected=function(n){o(this.promise,this.onRejected,n)};r.resolve=function(n,t){var i=c(v,t),u,f,e;if("error"===i.status)return r.reject(n,i.value);if(u=i.value,u)h(n,u);else for(n.state=s,n.outcome=t,f=-1,e=n.queue.length;++f<e;)n.queue[f].callFulfilled(t);return n};r.reject=function(n,t){n.state=l;n.outcome=t;for(var i=-1,r=n.queue.length;++i<r;)n.queue[i].callRejected(t);return n};i.resolve=y;i.reject=p;i.all=w;i.race=b},{immediate:2}],2:[function(n,t){(function(n){"use strict";function r(){e=!0;for(var n,r,t=i.length;t;){for(r=i,i=[],n=-1;++n<t;)r[n]();t=i.length}e=!1}function c(n){1!==i.push(n)||e||u()}var u,o=n.MutationObserver||n.WebKitMutationObserver,f,e,i;if(o){var s=0,l=new o(r),h=n.document.createTextNode("");l.observe(h,{characterData:!0});u=function(){h.data=s=++s%2}}else n.setImmediate||"undefined"==typeof n.MessageChannel?u="document"in n&&"onreadystatechange"in n.document.createElement("script")?function(){var t=n.document.createElement("script");t.onreadystatechange=function(){r();t.onreadystatechange=null;t.parentNode.removeChild(t);t=null};n.document.documentElement.appendChild(t)}:function(){setTimeout(r,0)}:(f=new n.MessageChannel,f.port1.onmessage=r,u=function(){f.port2.postMessage(0)});i=[];t.exports=c}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(n,t){(function(i){"use strict";var r=n("./jsonp"),u=n("lie");t.exports=function(n,t){if(t=t||{},t.jsonp)return r(n,t);var f,o,e=new u(function(r,u){o=u;void 0===i.XMLHttpRequest&&u("XMLHttpRequest is not supported");var e;f=new i.XMLHttpRequest;f.open("GET",n);t.headers&&Object.keys(t.headers).forEach(function(n){f.setRequestHeader(n,t.headers[n])});f.onreadystatechange=function(){4===f.readyState&&(f.status<400&&t.local||200===f.status?(i.JSON?e=JSON.parse(f.responseText):u(new Error("JSON is not supported")),r(e)):u(f.status?f.statusText:"Attempted cross origin request without CORS enabled"))};f.send()});return e["catch"](function(n){return f.abort(),n}),e.abort=o,e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./jsonp":5,lie:1}],4:[function(n){(function(t){"use strict";var i=t.L||n("leaflet"),r=n("lie"),u=n("./ajax");i.GeoJSON.AJAX=i.GeoJSON.extend({defaultAJAXparams:{dataType:"json",callbackParam:"callback",local:!1,middleware:function(n){return n}},initialize:function(n,t){var f,u,e;this.urls=[];n&&("string"==typeof n?this.urls.push(n):"function"==typeof n.pop?this.urls=this.urls.concat(n):(t=n,n=void 0));f=i.Util.extend({},this.defaultAJAXparams);for(u in t)this.defaultAJAXparams.hasOwnProperty(u)&&(f[u]=t[u]);this.ajaxParams=f;this._layers={};i.Util.setOptions(this,t);this.on("data:loaded",function(){this.filter&&this.refilter(this.filter)},this);e=this;this.urls.length>0&&new r(function(n){n()}).then(function(){e.addUrl()})},clearLayers:function(){return this.urls=[],i.GeoJSON.prototype.clearLayers.call(this),this},addUrl:function(n){var t=this,r,f;n&&("string"==typeof n?t.urls.push(n):"function"==typeof n.pop&&(t.urls=t.urls.concat(n)));r=t.urls.length;f=0;t.fire("data:loading");t.urls.forEach(function(n){"json"===t.ajaxParams.dataType.toLowerCase()?u(n,t.ajaxParams).then(function(n){var i=t.ajaxParams.middleware(n);t.addData(i);t.fire("data:progress",i)},function(n){t.fire("data:progress",{error:n})}):"jsonp"===t.ajaxParams.dataType.toLowerCase()&&i.Util.jsonp(n,t.ajaxParams).then(function(n){var i=t.ajaxParams.middleware(n);t.addData(i);t.fire("data:progress",i)},function(n){t.fire("data:progress",{error:n})})});t.on("data:progress",function(){++f===r&&t.fire("data:loaded")})},refresh:function(n){n=n||this.urls;this.clearLayers();this.addUrl(n)},refilter:function(n){"function"!=typeof n?(this.filter=!1,this.eachLayer(function(n){n.setStyle({stroke:!0,clickable:!0})})):(this.filter=n,this.eachLayer(function(t){n(t.feature)?t.setStyle({stroke:!0,clickable:!0}):t.setStyle({stroke:!1,clickable:!1})}))}});i.Util.Promise=r;i.Util.ajax=u;i.Util.jsonp=n("./jsonp");i.geoJson.ajax=function(n,t){return new i.GeoJSON.AJAX(n,t)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./ajax":3,"./jsonp":5,leaflet:void 0,lie:1}],5:[function(n,t){(function(i){"use strict";var r=i.L||n("leaflet"),u=n("lie");t.exports=function(n,t){t=t||{};var e,h,f,c,s=document.getElementsByTagName("head")[0],o=r.DomUtil.create("script","",s),l=new u(function(r,u){c=u;var l=t.cbParam||"callback";t.callbackName?e=t.callbackName:(f="_"+(""+Math.random()).slice(2),e="_leafletJSONPcallbacks."+f);o.type="text/javascript";f&&(i._leafletJSONPcallbacks||(i._leafletJSONPcallbacks={length:0}),i._leafletJSONPcallbacks.length++,i._leafletJSONPcallbacks[f]=function(n){s.removeChild(o);delete i._leafletJSONPcallbacks[f];i._leafletJSONPcallbacks.length--;i._leafletJSONPcallbacks.length||delete i._leafletJSONPcallbacks;r(n)});h=-1===n.indexOf("?")?n+"?"+l+"="+e:n+"&"+l+"="+e;o.src=h}).then(null,function(n){return s.removeChild(o),delete r.Util.ajax.cb[f],n});return l.abort=c,l}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{leaflet:void 0,lie:1}]},{},[4]);L.Curve=L.Path.extend({options:{},initialize:function(n,t){L.setOptions(this,t);this._initialUpdate=!0;this._setPath(n)},getPath:function(){return this._coords},setPath:function(n){return this._setPath(n),this.redraw()},getBounds:function(){return this._bounds},_setPath:function(n){this._coords=n;this._bounds=this._computeBounds()},_computeBounds:function(){for(var r=new L.LatLngBounds,t,o,n,s,f,i,e,h,c,u=0;u<this._coords.length;u++)n=this._coords[u],typeof n=="string"||n instanceof String?o=n:o=="H"?(r.extend([t.lat,n[0]]),t=new L.latLng(t.lat,n[0])):o=="V"?(r.extend([n[0],t.lng]),t=new L.latLng(n[0],t.lng)):o=="C"?(f=new L.latLng(n[0],n[1]),n=this._coords[++u],s=new L.latLng(n[0],n[1]),n=this._coords[++u],i=new L.latLng(n[0],n[1]),r.extend(f),r.extend(s),r.extend(i),i.controlPoint1=f,i.controlPoint2=s,t=i):o=="S"?(s=new L.latLng(n[0],n[1]),n=this._coords[++u],i=new L.latLng(n[0],n[1]),f=t,t.controlPoint2&&(h=t.lat-t.controlPoint2.lat,c=t.lng-t.controlPoint2.lng,f=new L.latLng(t.lat+h,t.lng+c)),r.extend(f),r.extend(s),r.extend(i),i.controlPoint1=f,i.controlPoint2=s,t=i):o=="Q"?(e=new L.latLng(n[0],n[1]),n=this._coords[++u],i=new L.latLng(n[0],n[1]),r.extend(e),r.extend(i),i.controlPoint=e,t=i):o=="T"?(i=new L.latLng(n[0],n[1]),e=t,t.controlPoint&&(h=t.lat-t.controlPoint.lat,c=t.lng-t.controlPoint.lng,e=new L.latLng(t.lat+h,t.lng+c)),r.extend(e),r.extend(i),i.controlPoint=e,t=i):(r.extend(n),t=new L.latLng(n[0],n[1]));return r},getCenter:function(){return this._bounds.getCenter()},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updatecurve(this)},_project:function(){var n,t,u,i,r;for(this._points=[],r=0;r<this._coords.length;r++)if(n=this._coords[r],typeof n=="string"||n instanceof String)this._points.push(n),u=n;else{switch(n.length){case 2:i=this._map.latLngToLayerPoint(n);t=n;break;case 1:u=="H"?(i=this._map.latLngToLayerPoint([t[0],n[0]]),t=[t[0],n[0]]):(i=this._map.latLngToLayerPoint([n[0],t[1]]),t=[n[0],t[1]])}this._points.push(i)}}});L.curve=function(n,t){return new L.Curve(n,t)};L.SVG.include({_updatecurve:function(n){if(this._setPath(n,this._curvePointsToPath(n._points)),n.options.animate){var t=n._path,i=t.getTotalLength();n.options.dashArray||(t.style.strokeDasharray=i+" "+i);n._initialUpdate&&(t.animate([{strokeDashoffset:i},{strokeDashoffset:0}],n.options.animate),n._initialUpdate=!1)}},_curvePointsToPath:function(n){for(var t,u,i="",r=0;r<n.length;r++)if(t=n[r],typeof t=="string"||t instanceof String)u=t,i+=u;else switch(u){case"H":i+=t.x+" ";break;case"V":i+=t.y+" ";break;default:i+=t.x+","+t.y+" "}return i||"M0 0"}});!function(n,t){var r={},i={};!function(n){function d(n){var t,i;if("number"==typeof n)return n;t={};for(i in n)t[i]=n[i];return t}function h(){this._delay=0;this._endDelay=0;this._fill="none";this._iterationStart=0;this._iterations=1;this._duration=0;this._playbackRate=1;this._direction="normal";this._easing="linear";this._easingFunction=f}function r(){return n.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function c(t,i){var r=new h;return i&&(r.fill="both",r.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.getOwnPropertyNames(t).forEach(function(i){if("auto"!=t[i]){if(("number"==typeof r[i]||"duration"==i)&&("number"!=typeof t[i]||isNaN(t[i])))return;if("fill"==i&&-1==ht.indexOf(t[i]))return;if("direction"==i&&-1==ct.indexOf(t[i]))return;if("playbackRate"==i&&1!==t[i]&&n.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;r[i]=t[i]}}):r.duration=t,r}function g(n){return"number"==typeof n&&(n=isNaN(n)?{duration:0}:{duration:n}),n}function nt(t,i){return t=n.numericTimingToObject(t),c(t,i)}function t(n,t,i,r){return n<0||n>1||i<0||i>1?f:function(u){function c(n,t,i){return 3*n*(1-i)*(1-i)*i+3*t*(1-i)*i*i+i*i*i}var e,o,s,h,f,l;if(u<=0)return e=0,n>0?e=t/n:!t&&i>0&&(e=r/i),e*u;if(u>=1)return o=0,i<1?o=(r-1)/(i-1):1==i&&n<1&&(o=(t-1)/(n-1)),1+o*(u-1);for(s=0,h=1;s<h;){if(f=(s+h)/2,l=c(n,i,f),Math.abs(u-l)<1e-5)return c(t,r,f);l<u?s=f:h=f}return c(t,r,f)}}function u(n,t){return function(i){if(i>=1)return 1;var r=1/n;return(i+=t*r)-i%r}}function l(n){i||(i=document.createElement("div").style);i.animationTimingFunction="";i.animationTimingFunction=n;var t=i.animationTimingFunction;if(""==t&&r())throw new TypeError(n+" is not a valid value for easing");return t}function a(n){var r,i;return"linear"==n?f:(r=at.exec(n),r)?t.apply(this,r.slice(1).map(Number)):(i=vt.exec(n),i?u(Number(i[1]),{start:y,middle:p,end:w}[i[2]]):lt[n]||f)}function tt(n){return Math.abs(it(n)/n.playbackRate)}function it(n){return 0===n.duration||0===n.iterations?0:n.duration*n.iterations}function v(n,t,i){if(null==t)return b;var r=i.delay+n+i.endDelay;return t<Math.min(i.delay,r)?s:t>=Math.min(i.delay+n,r)?o:k}function rt(n,t,i,r,u){switch(r){case s:return"backwards"==t||"both"==t?0:null;case k:return i-u;case o:return"forwards"==t||"both"==t?n:null;case b:return null}}function ut(n,t,i,r,u){var f=u;return 0===n?t!==s&&(f+=i):f+=r/n,f}function ft(n,t,i,r,u,f){var e=n===1/0?t%1:n%1;return 0!==e||i!==o||0===r||0===u&&0!==f||(e=1),e}function et(n,t,i,r){return n===o&&t===1/0?1/0:1===i?Math.floor(r)-1:Math.floor(r)}function ot(n,t,i){var u=n,r;return"normal"!==n&&"reverse"!==n&&(r=t,"alternate-reverse"===n&&(r+=1),u="normal",r!==1/0&&r%2!=0&&(u="reverse")),"normal"===u?i:1-i}function st(n,t,i){var r=v(n,t,i),u=rt(n,i.fill,t,r,i.delay);if(null===u)return null;var f=ut(i.duration,r,i.iterations,u,i.iterationStart),e=ft(f,i.iterationStart,r,i.iterations,u,i.duration),o=et(r,i.iterations,e,f),s=ot(i.direction,o,e);return i._easingFunction(s)}var ht="backwards|forwards|both|none".split("|"),ct="reverse|alternate|alternate-reverse".split("|"),f=function(n){return n};h.prototype={_setMember:function(t,i){this["_"+t]=i;this._effect&&(this._effect._timingInput[t]=i,this._effect._timing=n.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=n.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(n){this._setMember("delay",n)},get delay(){return this._delay},set endDelay(n){this._setMember("endDelay",n)},get endDelay(){return this._endDelay},set fill(n){this._setMember("fill",n)},get fill(){return this._fill},set iterationStart(n){if((isNaN(n)||n<0)&&r())throw new TypeError("iterationStart must be a non-negative number, received: "+timing.iterationStart);this._setMember("iterationStart",n)},get iterationStart(){return this._iterationStart},set duration(n){if("auto"!=n&&(isNaN(n)||n<0)&&r())throw new TypeError("duration must be non-negative or auto, received: "+n);this._setMember("duration",n)},get duration(){return this._duration},set direction(n){this._setMember("direction",n)},get direction(){return this._direction},set easing(n){this._easingFunction=a(l(n));this._setMember("easing",n)},get easing(){return this._easing},set iterations(n){if((isNaN(n)||n<0)&&r())throw new TypeError("iterations must be non-negative, received: "+n);this._setMember("iterations",n)},get iterations(){return this._iterations}};var y=1,p=.5,w=0,lt={ease:t(.25,.1,.25,1),"ease-in":t(.42,0,1,1),"ease-out":t(0,0,.58,1),"ease-in-out":t(.42,0,.58,1),"step-start":u(1,y),"step-middle":u(1,p),"step-end":u(1,w)},i=null,e="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",at=new RegExp("cubic-bezier\\("+e+","+e+","+e+","+e+"\\)"),vt=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,b=0,s=1,o=2,k=3;n.cloneTimingInput=d;n.makeTiming=c;n.numericTimingToObject=g;n.normalizeTimingInput=nt;n.calculateActiveDuration=tt;n.calculateIterationProgress=st;n.calculatePhase=v;n.normalizeEasing=l;n.parseEasingFunction=a}(r),function(n){function i(n,t){return n in f?f[n][t]||t:t}function e(n){return"display"===n||0===n.lastIndexOf("animation",0)||0===n.lastIndexOf("transition",0)}function o(n,t,r){var f,s,o,c;if(!e(n))if(f=h[n],f){u.style[n]=t;for(s in f)o=f[s],c=u.style[o],r[o]=i(o,c)}else r[n]=i(n,t)}function r(n){var e=[],u,t,i,f,r;for(u in n)if(!(u in["easing","offset","composite"]))for(t=n[u],Array.isArray(t)||(t=[t]),f=t.length,r=0;r<f;r++)i={},i.offset="offset"in n?n.offset:1==f?1:r/(f-1),"easing"in n&&(i.easing=n.easing),"composite"in n&&(i.composite=n.composite),i[u]=t[r],e.push(i);return e.sort(function(n,t){return n.offset-t.offset}),e}function s(t){function h(){var r=i.length,f,t;null==i[r-1].offset&&(i[r-1].offset=1);r>1&&null==i[0].offset&&(i[0].offset=0);for(var u=0,e=i[0].offset,n=1;n<r;n++)if(f=i[n].offset,null!=f){for(t=1;t<n-u;t++)i[u+t].offset=e+(f-e)*t/(n-u);u=n;e=f}}var u;if(null==t)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&t[Symbol.iterator]&&(t=Array.from(t));Array.isArray(t)||(t=r(t));for(var i=t.map(function(t){var r={},u,i;for(u in t){if(i=t[u],"offset"==u){if(null!=i){if(i=Number(i),!isFinite(i))throw new TypeError("Keyframe offsets must be numbers.");if(i<0||i>1)throw new TypeError("Keyframe offsets must be between 0 and 1.");}}else if("composite"==u){if("add"==i||"accumulate"==i)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=i)throw new TypeError("Invalid composite mode "+i+".");}else i="easing"==u?n.normalizeEasing(i):""+i;o(u,i,r)}return void 0==r.offset&&(r.offset=null),void 0==r.easing&&(r.easing="linear"),r}),e=!0,s=-1/0,f=0;f<i.length;f++)if(u=i[f].offset,null!=u){if(u<s)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");s=u}else e=!1;return i=i.filter(function(n){return n.offset>=0&&n.offset<=1}),e||h(),i}var h={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},u=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t={thin:"1px",medium:"3px",thick:"5px"},f={borderBottomWidth:t,borderLeftWidth:t,borderRightWidth:t,borderTopWidth:t,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:t,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};n.convertToArrayForm=r;n.normalizeKeyframes=s}(r),function(n){var t={};n.isDeprecated=function(n,i,r,u){var e=u?"are":"is",o=new Date,f=new Date(i);return f.setMonth(f.getMonth()+3),!(o<f&&(n in t||console.warn("Web Animations: "+n+" "+e+" deprecated and will stop working on "+f.toDateString()+". "+r),t[n]=!0,1))};n.deprecated=function(t,i,r,u){var f=u?"are":"is";if(n.isDeprecated(t,i,r,u))throw new Error(t+" "+f+" no longer supported. "+r);}}(r),function(){if(document.documentElement.animate){var t=document.documentElement.animate([],0),n=!0;if(t&&(n=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(i){void 0===t[i]&&(n=!0)})),!n)return}!function(n,t){function i(n){for(var t,f,e,u,i={},r=0;r<n.length;r++)for(t in n[r])"offset"!=t&&"easing"!=t&&"composite"!=t&&(f={offset:n[r].offset,easing:n[r].easing,value:n[r][t]},i[t]=i[t]||[],i[t].push(f));for(e in i)if(u=i[e],0!=u[0].offset||1!=u[u.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"};return i}function r(i){var s=[],o,r,u;for(o in i)for(r=i[o],u=0;u<r.length-1;u++){var f=u,e=u+1,h=r[f].offset,c=r[e].offset,l=h,a=c;0==u&&(l=-1/0,0==c&&(e=f));u==r.length-2&&(a=1/0,1==h&&(f=e));s.push({applyFrom:l,applyTo:a,startOffset:r[f].offset,endOffset:r[e].offset,easingFunction:n.parseEasingFunction(r[f].easing),property:o,interpolation:t.propertyInterpolation(o,r[f].value,r[e].value)})}return s.sort(function(n,t){return n.startOffset-t.startOffset}),s}t.convertEffectInput=function(u){var e=n.normalizeKeyframes(u),f=i(e),o=r(f);return function(n,i){if(null!=i)o.filter(function(n){return i>=n.applyFrom&&i<n.applyTo}).forEach(function(r){var f=i-r.startOffset,u=r.endOffset-r.startOffset,e=0==u?0:r.easingFunction(f/u);t.apply(n,r.property,r.interpolation(e))});else for(var r in f)"offset"!=r&&"easing"!=r&&"composite"!=r&&t.clear(n,r)}}}(r,i),function(n,t){function u(n){return n.replace(/-(.)/g,function(n,t){return t.toUpperCase()})}function f(n,t,r){i[r]=i[r]||[];i[r].push([n,t])}function e(n,t,i){for(var r=0;r<i.length;r++)f(n,t,u(i[r]))}function o(f,e,o){var c=f,s,h,l,a,v,y;for(/-/.test(f)&&!n.isDeprecated("Hyphenated property names","2016-03-22","Use camelCase instead.",!0)&&(c=u(f)),"initial"!=e&&"initial"!=o||("initial"==e&&(e=r[c]),"initial"==o&&(o=r[c])),s=e==o?[]:i[c],h=0;s&&h<s.length;h++)if(l=s[h][0](e),a=s[h][0](o),void 0!==l&&void 0!==a&&(v=s[h][1](l,a),v))return y=t.Interpolation.apply(null,v),function(n){return 0==n?e:1==n?o:y(n)};return t.Interpolation(!1,!0,function(n){return n?o:e})}var i={},r;t.addPropertiesHandler=e;r={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",strokeDasharray:"none",strokeDashoffset:"0px",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"};t.propertyInterpolation=o}(r,i),function(n,t){function i(t){var i=n.calculateActiveDuration(t),r=function(r){return n.calculateIterationProgress(i,r,t)};return r._totalDuration=t.delay+i+t.endDelay,r}t.KeyframeEffect=function(r,u,f,e){var s,h=i(n.normalizeTimingInput(f)),c=t.convertEffectInput(u),o=function(){c(r,s)};return o._update=function(n){return null!==(s=h(n))},o._clear=function(){c(r,null)},o._hasSameTarget=function(n){return r===n},o._target=r,o._totalDuration=h._totalDuration,o._id=e,o}}(r,i),function(n){function o(n,t){return!(!t.namespaceURI||-1==t.namespaceURI.indexOf("/svg"))&&(u in n||(n[u]=/Trident|MSIE|IEMobile|Edge|Android 4/i.test(n.navigator.userAgent)),n[u])}function f(n,t,i){i.enumerable=!0;i.configurable=!0;Object.defineProperty(n,t,i)}function t(n){var t,i;for(this._element=n,this._surrogateStyle=document.createElementNS("http://www.w3.org/1999/xhtml","div").style,this._style=n.style,this._length=0,this._isAnimatedProperty={},this._updateSvgTransformAttr=o(window,n),this._savedTransformAttr=null,t=0;t<this._style.length;t++)i=this._style[t],this._surrogateStyle[i]=this._style[i];this._updateIndices()}function s(n){if(!n._webAnimationsPatchedStyle){var i=new t(n);try{f(n,"style",{get:function(){return i}})}catch(i){n.style._set=function(t,i){n.style[t]=i};n.style._clear=function(t){n.style[t]=""}}n._webAnimationsPatchedStyle=n.style}}var u="_webAnimationsUpdateSvgTransformAttr",h={cssText:1,length:1,parentRule:1},e={getPropertyCSSValue:1,getPropertyPriority:1,getPropertyValue:1,item:1,removeProperty:1,setProperty:1},c={removeProperty:1,setProperty:1},i,r;t.prototype={get cssText(){return this._surrogateStyle.cssText},set cssText(n){for(var r,i={},t=0;t<this._surrogateStyle.length;t++)i[this._surrogateStyle[t]]=!0;for(this._surrogateStyle.cssText=n,this._updateIndices(),t=0;t<this._surrogateStyle.length;t++)i[this._surrogateStyle[t]]=!0;for(r in i)this._isAnimatedProperty[r]||this._style.setProperty(r,this._surrogateStyle.getPropertyValue(r))},get length(){return this._surrogateStyle.length},get parentRule(){return this._style.parentRule},_updateIndices:function(){for(;this._length<this._surrogateStyle.length;)Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,get:function(n){return function(){return this._surrogateStyle[n]}}(this._length)}),this._length++;for(;this._length>this._surrogateStyle.length;)this._length--,Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,value:void 0})},_set:function(t,i){this._style[t]=i;this._isAnimatedProperty[t]=!0;this._updateSvgTransformAttr&&"transform"==n.unprefixedPropertyName(t)&&(null==this._savedTransformAttr&&(this._savedTransformAttr=this._element.getAttribute("transform")),this._element.setAttribute("transform",n.transformToSvgMatrix(i)))},_clear:function(t){this._style[t]=this._surrogateStyle[t];this._updateSvgTransformAttr&&"transform"==n.unprefixedPropertyName(t)&&(this._savedTransformAttr?this._element.setAttribute("transform",this._savedTransformAttr):this._element.removeAttribute("transform"),this._savedTransformAttr=null);delete this._isAnimatedProperty[t]}};for(i in e)t.prototype[i]=function(n,t){return function(){var i=this._surrogateStyle[n].apply(this._surrogateStyle,arguments);return t&&(this._isAnimatedProperty[arguments[0]]||this._style[n].apply(this._style,arguments),this._updateIndices()),i}}(i,i in c);for(r in document.documentElement.style)r in h||r in e||function(n){f(t.prototype,n,{get:function(){return this._surrogateStyle[n]},set:function(t){this._surrogateStyle[n]=t;this._updateIndices();this._isAnimatedProperty[n]||(this._style[n]=t)}})}(r);n.apply=function(t,i,r){s(t);t.style._set(n.propertyName(i),r)};n.clear=function(t,i){t._webAnimationsPatchedStyle&&t.style._clear(n.propertyName(i))}}(i),function(n){window.Element.prototype.animate=function(t,i){var r="";return i&&i.id&&(r=i.id),n.timeline._play(n.KeyframeEffect(this,t,i,r))}}(i),function(n){function t(n,i,r){if("number"==typeof n&&"number"==typeof i)return n*(1-r)+i*r;if("boolean"==typeof n&&"boolean"==typeof i)return r<.5?n:i;if(n.length==i.length){for(var f=[],u=0;u<n.length;u++)f.push(t(n[u],i[u],r));return f}throw"Mismatched interpolation arguments "+n+":"+i;}n.Interpolation=function(n,i,r){return function(u){return r(t(n,i,u))}}}(i),function(n){function t(n,t,i){return Math.max(Math.min(n,i),t)}function i(i,r,u){var f=n.dot(i,r),e;if(f=t(f,-1,1),e=[],1===f)e=i;else for(var s=Math.acos(f),h=1*Math.sin(u*s)/Math.sqrt(1-f*f),o=0;o<4;o++)e.push(i[o]*(Math.cos(u*s)-f*h)+r[o]*h);return e}var r=function(){function n(n,t){for(var r,u,f=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],i=0;i<4;i++)for(r=0;r<4;r++)for(u=0;u<4;u++)f[i][r]+=t[i][u]*n[u][r];return f}function t(n){return 0==n[0][2]&&0==n[0][3]&&0==n[1][2]&&0==n[1][3]&&0==n[2][0]&&0==n[2][1]&&1==n[2][2]&&0==n[2][3]&&0==n[3][2]&&1==n[3][3]}function i(i,r,u,f,e){for(var y,h,o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;s<4;s++)o[s][3]=e[s];for(s=0;s<3;s++)for(h=0;h<3;h++)o[3][s]+=i[h]*o[h][s];var c=f[0],l=f[1],a=f[2],p=f[3],v=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];for(v[0][0]=1-2*(l*l+a*a),v[0][1]=2*(c*l-a*p),v[0][2]=2*(c*a+l*p),v[1][0]=2*(c*l+a*p),v[1][1]=1-2*(c*c+a*a),v[1][2]=2*(l*a-c*p),v[2][0]=2*(c*a-l*p),v[2][1]=2*(l*a+c*p),v[2][2]=1-2*(c*c+l*l),o=n(o,v),y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],u[2]&&(y[2][1]=u[2],o=n(o,y)),u[1]&&(y[2][1]=0,y[2][0]=u[0],o=n(o,y)),u[0]&&(y[2][0]=0,y[1][0]=u[0],o=n(o,y)),s=0;s<3;s++)for(h=0;h<3;h++)o[s][h]*=r[s];return t(o)?[o[0][0],o[0][1],o[1][0],o[1][1],o[3][0],o[3][1]]:o[0].concat(o[1],o[2],o[3])}return i}();n.composeMatrix=r;n.quat=i}(i),function(n,t){n.sequenceNumber=0;var i=function(n,t,i){this.target=n;this.currentTime=t;this.timelineTime=i;this.type="finish";this.bubbles=!1;this.cancelable=!1;this.currentTarget=n;this.defaultPrevented=!1;this.eventPhase=Event.AT_TARGET;this.timeStamp=Date.now()};t.Animation=function(t){this.id="";t&&t._id&&(this.id=t._id);this._sequenceNumber=n.sequenceNumber++;this._currentTime=0;this._startTime=null;this._paused=!1;this._playbackRate=1;this._inTimeline=!0;this._finishedFlag=!0;this.onfinish=null;this._finishHandlers=[];this._effect=t;this._inEffect=this._effect._update(0);this._idle=!0;this._currentTimePending=!1};t.Animation.prototype={_ensureAlive:function(){this._inEffect=this.playbackRate<0&&0===this.currentTime?this._effect._update(-1):this._effect._update(this.currentTime);this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,t.timeline._animations.push(this))},_tickCurrentTime:function(n,t){n!=this._currentTime&&(this._currentTime=n,this._isFinished&&!t&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(n){n=+n;isNaN(n)||(t.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-n/this._playbackRate),this._currentTimePending=!1,this._currentTime!=n&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(n,!0),t.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(n){n=+n;isNaN(n)||this._paused||this._idle||(this._startTime=n,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),t.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(n){if(n!=this._playbackRate){var i=this.currentTime;this._playbackRate=n;this._startTime=null;"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),t.applyDirtiedAnimation(this));null!=i&&(this.currentTime=i)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1;(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null);this._finishedFlag=!1;this._idle=!1;this._ensureAlive();t.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0;this._startTime=null;this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,t.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._isFinished=!0,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),t.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1;this.play()},addEventListener:function(n,t){"function"==typeof t&&"finish"==n&&this._finishHandlers.push(t)},removeEventListener:function(n,t){if("finish"==n){var i=this._finishHandlers.indexOf(t);i>=0&&this._finishHandlers.splice(i,1)}},_fireEvents:function(n){if(this._isFinished){if(!this._finishedFlag){var t=new i(this,this._currentTime,n),r=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){r.forEach(function(n){n.call(t.target,t)})},0);this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(n,t){this._idle||this._paused||(null==this._startTime?t&&(this.startTime=n-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((n-this._startTime)*this.playbackRate));t&&(this._currentTimePending=!1,this._fireEvents(n))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var n=this._effect._target;return n._activeAnimations||(n._activeAnimations=[]),n._activeAnimations},_markTarget:function(){var n=this._targetAnimations();-1===n.indexOf(this)&&n.push(this)},_unmarkTarget:function(){var n=this._targetAnimations(),t=n.indexOf(this);-1!==t&&n.splice(t,1)}}}(r,i),function(n,t){function a(n){var t=u;u=[];n<i.currentTime&&(n=i.currentTime);i._animations.sort(s);i._animations=l(n,!0,i._animations)[0];t.forEach(function(t){t[1](n)});c();p=void 0}function s(n,t){return n._sequenceNumber-t._sequenceNumber}function h(){this._animations=[];this.currentTime=window.performance&&performance.now?performance.now():0}function c(){r.forEach(function(n){n()});r.length=0}function l(n,i,u){o=!0;e=!1;t.timeline.currentTime=n;f=!1;var s=[],h=[],c=[],l=[];return u.forEach(function(t){t._tick(n,i);t._inEffect?(h.push(t._effect),t._markTarget()):(s.push(t._effect),t._unmarkTarget());t._needsTick&&(f=!0);var r=t._inEffect||t._needsTick;t._inTimeline=r;r?c.push(t):l.push(t)}),r.push.apply(r,s),r.push.apply(r,h),f&&requestAnimationFrame(function(){}),o=!1,[c,l]}var v=window.requestAnimationFrame,u=[],y=0;window.requestAnimationFrame=function(n){var t=y++;return 0==u.length&&v(a),u.push([t,n]),t};window.cancelAnimationFrame=function(n){u.forEach(function(t){t[0]==n&&(t[1]=function(){})})};h.prototype={_play:function(i){i._timing=n.normalizeTimingInput(i.timing);var r=new t.Animation(i);return r._idle=!1,r._timeline=this,this._animations.push(r),t.restart(),t.applyDirtiedAnimation(r),r}};var p=void 0,f=!1,e=!1;t.restart=function(){return f||(f=!0,requestAnimationFrame(function(){}),e=!0),e};t.applyDirtiedAnimation=function(n){if(!o){n._markTarget();var r=n._targetAnimations();r.sort(s);l(t.timeline.currentTime,!1,r.slice())[1].forEach(function(n){var t=i._animations.indexOf(n);-1!==t&&i._animations.splice(t,1)});c()}};var r=[],o=!1,i=new h;t.timeline=i}(r,i),function(n){function i(n,t){for(var r=0,i=0;i<n.length;i++)r+=n[i]*t[i];return r}function u(n,t){return[n[0]*t[0]+n[4]*t[1]+n[8]*t[2]+n[12]*t[3],n[1]*t[0]+n[5]*t[1]+n[9]*t[2]+n[13]*t[3],n[2]*t[0]+n[6]*t[1]+n[10]*t[2]+n[14]*t[3],n[3]*t[0]+n[7]*t[1]+n[11]*t[2]+n[15]*t[3],n[0]*t[4]+n[4]*t[5]+n[8]*t[6]+n[12]*t[7],n[1]*t[4]+n[5]*t[5]+n[9]*t[6]+n[13]*t[7],n[2]*t[4]+n[6]*t[5]+n[10]*t[6]+n[14]*t[7],n[3]*t[4]+n[7]*t[5]+n[11]*t[6]+n[15]*t[7],n[0]*t[8]+n[4]*t[9]+n[8]*t[10]+n[12]*t[11],n[1]*t[8]+n[5]*t[9]+n[9]*t[10]+n[13]*t[11],n[2]*t[8]+n[6]*t[9]+n[10]*t[10]+n[14]*t[11],n[3]*t[8]+n[7]*t[9]+n[11]*t[10]+n[15]*t[11],n[0]*t[12]+n[4]*t[13]+n[8]*t[14]+n[12]*t[15],n[1]*t[12]+n[5]*t[13]+n[9]*t[14]+n[13]*t[15],n[2]*t[12]+n[6]*t[13]+n[10]*t[14]+n[14]*t[15],n[3]*t[12]+n[7]*t[13]+n[11]*t[14]+n[15]*t[15]]}function t(n){var t=n.rad||0;return((n.deg||0)/360+(n.grad||0)/400+(n.turn||0))*2*Math.PI+t}function f(n){var s,l,a,i,r,u,f;switch(n.t){case"rotatex":return i=t(n.d[0]),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=t(n.d[0]),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=t(n.d[0]),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var r=n.d[0],u=n.d[1],f=n.d[2],i=t(n.d[3]),h=r*r+u*u+f*f;0===h?(r=1,u=0,f=0):1!==h&&(s=Math.sqrt(h),r/=s,u/=s,f/=s);var c=Math.sin(i/2),o=c*Math.cos(i/2),e=c*c;return[1-2*(u*u+f*f)*e,2*(r*u*e+f*o),2*(r*f*e-u*o),0,2*(r*u*e-f*o),1-2*(r*r+f*f)*e,2*(u*f*e+r*o),0,2*(r*f*e+u*o),2*(u*f*e-r*o),1-2*(r*r+u*u)*e,0,0,0,0,1];case"scale":return[n.d[0],0,0,0,0,n.d[1],0,0,0,0,1,0,0,0,0,1];case"scalex":return[n.d[0],0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,n.d[0],0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,n.d[0],0,0,0,0,1];case"scale3d":return[n.d[0],0,0,0,0,n.d[1],0,0,0,0,n.d[2],0,0,0,0,1];case"skew":return l=t(n.d[0]),a=t(n.d[1]),[1,Math.tan(a),0,0,Math.tan(l),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=t(n.d[0]),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=t(n.d[0]),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return r=n.d[0].px||0,u=n.d[1].px||0,[1,0,0,0,0,1,0,0,0,0,1,0,r,u,0,1];case"translatex":return r=n.d[0].px||0,[1,0,0,0,0,1,0,0,0,0,1,0,r,0,0,1];case"translatey":return u=n.d[0].px||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,u,0,1];case"translatez":return f=n.d[0].px||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,f,1];case"translate3d":var r=n.d[0].px||0,u=n.d[1].px||0,f=n.d[2].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,r,u,f,1];case"perspective":return[1,0,0,0,0,1,0,0,0,0,1,n.d[0].px?-1/n.d[0].px:0,0,0,0,1];case"matrix":return[n.d[0],n.d[1],0,0,n.d[2],n.d[3],0,0,0,0,1,0,n.d[4],n.d[5],0,1];case"matrix3d":return n.d}}function r(n){return 0===n.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:n.map(f).reduce(u)}function e(n){return[o(r(n))]}var o=function(){function u(n){return n[0][0]*n[1][1]*n[2][2]+n[1][0]*n[2][1]*n[0][2]+n[2][0]*n[0][1]*n[1][2]-n[0][2]*n[1][1]*n[2][0]-n[1][2]*n[2][1]*n[0][0]-n[2][2]*n[0][1]*n[1][0]}function f(n){for(var w,i,t=1/u(n),r=n[0][0],f=n[0][1],e=n[0][2],o=n[1][0],s=n[1][1],h=n[1][2],c=n[2][0],l=n[2][1],a=n[2][2],v=[[(s*a-h*l)*t,(e*l-f*a)*t,(f*h-e*s)*t,0],[(h*c-o*a)*t,(r*a-e*c)*t,(e*o-r*h)*t,0],[(o*l-s*c)*t,(c*f-r*l)*t,(r*s-f*o)*t,0]],y=[],p=0;p<3;p++){for(w=0,i=0;i<3;i++)w+=n[3][i]*v[i][p];y.push(w)}return y.push(1),v.push(y),v}function e(n){return[[n[0][0],n[1][0],n[2][0],n[3][0]],[n[0][1],n[1][1],n[2][1],n[3][1]],[n[0][2],n[1][2],n[2][2],n[3][2]],[n[0][3],n[1][3],n[2][3],n[3][3]]]}function o(n,t){for(var f,i,u=[],r=0;r<4;r++){for(f=0,i=0;i<4;i++)f+=n[i]*t[i][r];u.push(f)}return u}function t(t){var i=n(t);return[t[0]/i,t[1]/i,t[2]/i]}function n(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2])}function r(n,t,i,r){return[i*n[0]+r*t[0],i*n[1]+r*t[1],i*n[2]+r*t[2]]}function s(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function h(h){var v=[h.slice(0,4),h.slice(4,8),h.slice(8,12),h.slice(12,16)],b,d,w,nt,c,p,y,tt,a,l,k,g;if(1!==v[3][3])return null;for(b=[],a=0;a<4;a++)b.push(v[a].slice());for(a=0;a<3;a++)b[a][3]=0;if(0===u(b))return null;if(w=[],v[0][3]||v[1][3]||v[2][3]?(w.push(v[0][3]),w.push(v[1][3]),w.push(v[2][3]),w.push(v[3][3]),d=o(w,e(f(b)))):d=[0,0,0,1],nt=v[3].slice(0,3),c=[],c.push(v[0].slice(0,3)),p=[],p.push(n(c[0])),c[0]=t(c[0]),y=[],c.push(v[1].slice(0,3)),y.push(i(c[0],c[1])),c[1]=r(c[1],c[0],1,-y[0]),p.push(n(c[1])),c[1]=t(c[1]),y[0]/=p[1],c.push(v[2].slice(0,3)),y.push(i(c[0],c[2])),c[2]=r(c[2],c[0],1,-y[1]),y.push(i(c[1],c[2])),c[2]=r(c[2],c[1],1,-y[2]),p.push(n(c[2])),c[2]=t(c[2]),y[1]/=p[2],y[2]/=p[2],tt=s(c[1],c[2]),i(c[0],tt)<0)for(a=0;a<3;a++)p[a]*=-1,c[a][0]*=-1,c[a][1]*=-1,c[a][2]*=-1;return g=c[0][0]+c[1][1]+c[2][2]+1,g>.0001?(l=.5/Math.sqrt(g),k=[(c[2][1]-c[1][2])*l,(c[0][2]-c[2][0])*l,(c[1][0]-c[0][1])*l,.25/l]):c[0][0]>c[1][1]&&c[0][0]>c[2][2]?(l=2*Math.sqrt(1+c[0][0]-c[1][1]-c[2][2]),k=[.25*l,(c[0][1]+c[1][0])/l,(c[0][2]+c[2][0])/l,(c[2][1]-c[1][2])/l]):c[1][1]>c[2][2]?(l=2*Math.sqrt(1+c[1][1]-c[0][0]-c[2][2]),k=[(c[0][1]+c[1][0])/l,.25*l,(c[1][2]+c[2][1])/l,(c[0][2]-c[2][0])/l]):(l=2*Math.sqrt(1+c[2][2]-c[0][0]-c[1][1]),k=[(c[0][2]+c[2][0])/l,(c[1][2]+c[2][1])/l,.25*l,(c[1][0]-c[0][1])/l]),[nt,p,y,k,d]}return h}();n.dot=i;n.makeMatrixDecomposition=e;n.transformListToMatrix=r}(i),function(n){function t(n,t){var i=n.exec(t);if(i)return i=n.ignoreCase?i[0].toLowerCase():i[0],[i,t.substr(i.length)]}function i(n,t){t=t.replace(/^\s*/,"");var i=n(t);if(i)return[i[0],i[1].replace(/^\s*/,"")]}function u(n,r,u){var e,f;for(n=i.bind(null,n),e=[];;){if(f=n(u),!f)return[e,u];if(e.push(f[0]),u=f[1],!(f=t(r,u))||""==f[1])return[e,u];u=f[1]}}function f(n,t){for(var u,r=0,i=0;i<t.length&&(!/\s|,/.test(t[i])||0!=r);i++)if("("==t[i])r++;else if(")"==t[i]&&(r--,0==r&&i++,r<=0))break;return u=n(t.substr(0,i)),void 0==u?void 0:[u,t.substr(i)]}function e(n,t){for(var i=n,r=t;i&&r;)i>r?i%=r:r%=i;return n*t/(i+r)}function o(n){return function(t){var i=n(t);return i&&(i[0]=void 0),i}}function s(n,t){return function(i){return n(i)||[t,i]}}function h(t,i){for(var r,f=[],u=0;u<t.length;u++){if(r=n.consumeTrimmed(t[u],i),!r||""==r[0])return;void 0!==r[0]&&f.push(r[0]);i=r[1]}if(""==i)return f}function r(n,t,i,r,u){for(var f,s=[],h=[],c=[],l=e(r.length,u.length),o=0;o<l;o++){if(f=t(r[o%r.length],u[o%u.length]),!f)return;s.push(f[0]);h.push(f[1]);c.push(f[2])}return[s,h,function(t){var r=t.map(function(n,t){return c[t](n)}).join(i);return n?n(r):r}]}function c(n,t,i){for(var u,f=[],e=[],o=[],s=0,r=0;r<i.length;r++)"function"==typeof i[r]?(u=i[r](n[s],t[s++]),f.push(u[0]),e.push(u[1]),o.push(u[2])):!function(n){f.push(!1);e.push(!1);o.push(function(){return i[n]})}(r);return[f,e,function(n){for(var i="",t=0;t<n.length;t++)i+=o[t](n[t]);return i}]}n.consumeToken=t;n.consumeTrimmed=i;n.consumeRepeated=u;n.consumeParenthesised=f;n.ignore=o;n.optional=s;n.consumeList=h;n.mergeNestedRepeated=r.bind(null,null);n.mergeWrappedNestedRepeated=r;n.mergeList=c}(i),function(n){function t(t){function u(t){var r=n.consumeToken(/^inset/i,t);return r?(i.inset=!0,r):(r=n.consumeLengthOrPercent(t),r)?(i.lengths.push(r[0]),r):(r=n.consumeColor(t),r?(i.color=r[0],r):void 0)}var i={inset:!1,lengths:[],color:null},r=n.consumeRepeated(u,/^/,t);if(r&&r[0].length)return[i,r[1]]}function i(i){var r=n.consumeRepeated(t,/^,/,i);if(r&&""==r[1])return r[0]}function r(t,i){for(var u,f;t.lengths.length<Math.max(t.lengths.length,i.lengths.length);)t.lengths.push({px:0});for(;i.lengths.length<Math.max(t.lengths.length,i.lengths.length);)i.lengths.push({px:0});if(t.inset==i.inset&&!!t.color==!!i.color){for(var e,o=[],s=[[],0],h=[[],0],r=0;r<t.lengths.length;r++)u=n.mergeDimensions(t.lengths[r],i.lengths[r],2==r),s[0].push(u[0]),h[0].push(u[1]),o.push(u[2]);return t.color&&i.color&&(f=n.mergeColors(t.color,i.color),s[1]=f[0],h[1]=f[1],e=f[2]),[s,h,function(n){for(var r=t.inset?"inset ":" ",i=0;i<o.length;i++)r+=o[i](n[0][i])+" ";return e&&(r+=e(n[1])),r}]}}function u(t,i,r,u){function e(n){return{inset:n,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var h,c,o=[],s=[],f=0;f<r.length||f<u.length;f++)h=r[f]||e(u[f].inset),c=u[f]||e(r[f].inset),o.push(h),s.push(c);return n.mergeNestedRepeated(t,i,o,s)}var f=u.bind(null,r,", ");n.addPropertiesHandler(i,f,["box-shadow","text-shadow"])}(i),function(n){function i(n){return n.toFixed(3).replace(/0+$/,"").replace(/\.$/,"")}function r(n,t,i){return Math.min(t,Math.max(n,i))}function t(n){if(/^\s*[-+]?(\d*\.)?\d+\s*$/.test(n))return Number(n)}function e(n,t){return[n,t,i]}function o(n,t){if(0!=n)return u(0,1/0)(n,t)}function s(n,t){return[n,t,function(n){return Math.round(r(1,1/0,n))}]}function u(n,t){return function(u,f){return[u,f,function(u){return i(r(n,t,u))}]}}function f(n){var r=n.trim().split(/\s*[\s,]\s*/),u,i,f;if(0!==r.length){for(u=[],i=0;i<r.length;i++){if(f=t(r[i]),void 0===f)return;u.push(f)}return u}}function h(n,t){if(n.length==t.length)return[n,t,function(n){return n.map(i).join(" ")}]}function c(n,t){return[n,t,Math.round]}n.clamp=r;n.addPropertiesHandler(f,h,["stroke-dasharray"]);n.addPropertiesHandler(t,u(0,1/0),["border-image-width","line-height"]);n.addPropertiesHandler(t,u(0,1),["opacity","shape-image-threshold"]);n.addPropertiesHandler(t,o,["flex-grow","flex-shrink"]);n.addPropertiesHandler(t,s,["orphans","widows"]);n.addPropertiesHandler(t,c,["z-index"]);n.parseNumber=t;n.parseNumberList=f;n.mergeNumbers=e;n.numberToString=i}(i),function(n){function t(n,t){if("visible"==n||"visible"==t)return[0,1,function(i){return i<=0?n:i>=1?t:"visible"}]}n.addPropertiesHandler(String,t,["visibility"])}(i),function(n){function r(n){var u,i,r;return n=n.trim(),t.fillStyle="#000",t.fillStyle=n,u=t.fillStyle,(t.fillStyle="#fff",t.fillStyle=n,u==t.fillStyle)?(t.fillRect(0,0,1,1),i=t.getImageData(0,0,1,1).data,t.clearRect(0,0,1,1),r=i[3]/255,[i[0]*r,i[1]*r,i[2]*r,r]):void 0}function u(t,i){return[t,i,function(t){function r(n){return Math.max(0,Math.min(255,n))}if(t[3])for(var i=0;i<3;i++)t[i]=Math.round(r(t[i]/t[3]));return t[3]=n.numberToString(n.clamp(0,1,t[3])),"rgba("+t.join(",")+")"}]}var i=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),t;i.width=i.height=1;t=i.getContext("2d");n.addPropertiesHandler(r,u,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","fill","flood-color","lighting-color","outline-color","stop-color","stroke","text-decoration-color"]);n.consumeColor=n.consumeParenthesised.bind(null,r);n.mergeColors=u}(i),function(n){function h(n){function i(){var i=o.exec(n);t=i?i[0]:void 0}function e(){var n=Number(t);return i(),n}function r(){if("("!==t)return e();i();var n=f();return")"!==t?NaN:(i(),n)}function u(){for(var f,u,n=r();"*"===t||"/"===t;)f=t,i(),u=r(),"*"===f?n*=u:n/=u;return n}function f(){for(var f,r,n=u();"+"===t||"-"===t;)f=t,i(),r=u(),"+"===f?n+=r:n-=r;return n}var t,o=/([\+\-\w\.]+|[\(\)\*\/])/g;return i(),f()}function i(n,t){var i,e,o;if("0"==(t=t.trim().toLowerCase())&&"px".search(n)>=0)return{px:0};if(/^[^(]*$|^calc/.test(t)){t=t.replace(/calc\(/g,"(");i={};t=t.replace(n,function(n){return i[n]=null,"U"+n});for(var s="U("+n.source+")",u=t.replace(/[-+]?(\d*\.)?\d+([Ee][-+]?\d+)?/g,"N").replace(new RegExp("N"+s,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],r=0;r<f.length;)f[r].test(u)?(u=u.replace(f[r],"$1"),r=0):r++;if("D"==u){for(e in i){if(o=h(t.replace(new RegExp("U"+e,"g"),"").replace(new RegExp(s,"g"),"*0")),!isFinite(o))return;i[e]=o}return i}}}function u(n,t){return r(n,t,!0)}function r(t,i,r){var f,u=[];for(f in t)u.push(f);for(f in i)u.indexOf(f)<0&&u.push(f);return t=u.map(function(n){return t[n]||0}),i=u.map(function(n){return i[n]||0}),[t,i,function(t){var i=t.map(function(i,f){return 1==t.length&&r&&(i=Math.max(i,0)),n.numberToString(i)+u[f]}).join(" + ");return t.length>1?"calc("+i+")":i}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",e=i.bind(null,new RegExp(f,"g")),t=i.bind(null,new RegExp(f+"|%","g")),c=i.bind(null,/deg|rad|grad|turn/g);n.parseLength=e;n.parseLengthOrPercent=t;n.consumeLengthOrPercent=n.consumeParenthesised.bind(null,t);n.parseAngle=c;n.mergeDimensions=r;var l=n.consumeParenthesised.bind(null,e),a=n.consumeRepeated.bind(void 0,l,/^/),o=n.consumeRepeated.bind(void 0,a,/^,/);n.consumeSizePairList=o;var v=function(n){var t=o(n);if(t&&""==t[1])return t[0]},s=n.mergeNestedRepeated.bind(void 0,u," "),y=n.mergeNestedRepeated.bind(void 0,s,",");n.mergeNonNegativeSizePair=s;n.addPropertiesHandler(v,y,["background-size"]);n.addPropertiesHandler(t,u,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]);n.addPropertiesHandler(t,r,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","stroke-dashoffset","text-indent","top","vertical-align","word-spacing"])}(i),function(n){function r(t){return n.consumeLengthOrPercent(t)||n.consumeToken(/^auto/,t)}function t(t){var i=n.consumeList([n.ignore(n.consumeToken.bind(null,/^rect/)),n.ignore(n.consumeToken.bind(null,/^\(/)),n.consumeRepeated.bind(null,r,/^,/),n.ignore(n.consumeToken.bind(null,/^\)/))],t);if(i&&4==i[0].length)return i[0]}function u(t,i){return"auto"==t||"auto"==i?[!0,!1,function(r){var u=r?t:i,f;return"auto"==u?"auto":(f=n.mergeDimensions(u,u),f[2](f[0]))}]:n.mergeDimensions(t,i)}function f(n){return"rect("+n+")"}var i=n.mergeWrappedNestedRepeated.bind(null,f,u,", ");n.parseBox=t;n.mergeBoxes=i;n.addPropertiesHandler(t,i,["clip"])}(i),function(n){function i(n){return function(i){var r=0;return n.map(function(n){return n===t?i[r++]:n})}}function u(n){return n}function l(t){var s,h,l,f,o,u,b,a,v;if("none"==(t=t.toLowerCase().trim()))return[];for(var i,y=/\s*(\w+)\(([^)]*)\)/g,p=[],w=0;i=y.exec(t);){if(i.index!=w)return;if(w=i.index+i[0].length,s=i[1],h=c[s],!h)return;if(l=i[2].split(","),f=h[0],f.length<l.length)return;for(o=[],u=0;u<f.length;u++){if(a=l[u],v=f[u],void 0===(b=a?{A:function(t){return"0"==t.trim()?e:n.parseAngle(t)},N:n.parseNumber,T:n.parseLengthOrPercent,L:n.parseLength}[v.toUpperCase()](a):{a:e,n:o[0],t:r}[v]))return;o.push(b)}if(p.push({t:s,d:o}),y.lastIndex==t.length)return p}}function f(n){return n.toFixed(6).replace(".000000","")}function o(t,i){var r,u;return t.decompositionPair!==i&&(t.decompositionPair=i,r=n.makeMatrixDecomposition(t)),i.decompositionPair!==t&&(i.decompositionPair=t,u=n.makeMatrixDecomposition(i)),null==r[0]||null==u[0]?[[!1],[!0],function(n){return n?i[0].d:t[0].d}]:(r[0].push(0),u[0].push(1),[r,u,function(t){var i=n.quat(r[0][3],u[0][3],t[5]);return n.composeMatrix(t[0],t[1],t[2],i,t[4]).map(f).join(",")}])}function s(n){return n.replace(/[xy]/,"")}function h(n){return n.replace(/(x|y|z|3d)?$/,"3d")}function a(t,i){var g=n.makeMatrixDecomposition&&!0,nt=!1,u,ft,r,et;if(!t.length||!i.length)for(t.length||(nt=!0,t=i,i=[]),u=0;u<t.length;u++){var p=t[u].t,ot=t[u].d,tt="scale"==p.substr(0,5)?1:0;i.push({t:p,d:ot.map(function(n){var t,i;if("number"==typeof n)return tt;t={};for(i in n)t[i]=tt;return t})})}var st=function(n,t){return"perspective"==n&&"perspective"==t||("matrix"==n||"matrix3d"==n)&&("matrix"==t||"matrix3d"==t)},l=[],a=[],f=[];if(t.length!=i.length){if(!g)return;r=o(t,i);l=[r[0]];a=[r[1]];f=[["matrix",[r[2]]]]}else for(u=0;u<t.length;u++){var p,e=t[u].t,w=i[u].t,v=t[u].d,b=i[u].d,k=c[e],d=c[w];if(st(e,w)){if(!g)return;r=o([t[u]],[i[u]]);l.push(r[0]);a.push(r[1]);f.push(["matrix",[r[2]]])}else{if(e==w)p=e;else if(k[2]&&d[2]&&s(e)==s(w))p=s(e),v=k[2](v),b=d[2](b);else{if(!k[1]||!d[1]||h(e)!=h(w)){if(!g)return;r=o(t,i);l=[r[0]];a=[r[1]];f=[["matrix",[r[2]]]];break}p=h(e);v=k[1](v);b=d[1](b)}for(var it=[],rt=[],ut=[],y=0;y<v.length;y++)ft="number"==typeof v[y]?n.mergeNumbers:n.mergeDimensions,r=ft(v[y],b[y]),it[y]=r[0],rt[y]=r[1],ut.push(r[2]);l.push(it);a.push(rt);f.push([p,ut])}}return nt&&(et=l,l=a,a=et),[l,a,function(n){return n.map(function(n,t){var i=n.map(function(n,i){return f[t][1][i](n)}).join(",");return"matrix"==f[t][0]&&16==i.split(",").length&&(f[t][0]="matrix3d"),f[t][0]+"("+i+")"}).join(" ")}]}var t=null,r={px:0},e={deg:0},c={matrix:["NNNNNN",[t,t,0,0,t,t,0,0,0,0,1,0,t,t,0,1],u],matrix3d:["NNNNNNNNNNNNNNNN",u],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",i([t,t,1]),u],scalex:["N",i([t,1,1]),i([t,1])],scaley:["N",i([1,t,1]),i([1,t])],scalez:["N",i([1,1,t])],scale3d:["NNN",u],skew:["Aa",null,u],skewx:["A",null,i([t,e])],skewy:["A",null,i([e,t])],translate:["Tt",i([t,t,r]),u],translatex:["T",i([t,r,r]),i([t,r])],translatey:["T",i([r,t,r]),i([r,t])],translatez:["L",i([r,r,t])],translate3d:["TTL",u]};n.addPropertiesHandler(l,a,["transform"]);n.transformToSvgMatrix=function(t){var i=n.transformListToMatrix(l(t));return"matrix("+f(i[0])+" "+f(i[1])+" "+f(i[4])+" "+f(i[5])+" "+f(i[12])+" "+f(i[13])+")"}}(i),function(n){function t(n){var t=Number(n);if(!(isNaN(t)||t<100||t>900||t%100!=0))return t}function i(t){return t=100*Math.round(t/100),t=n.clamp(100,900,t),400===t?"normal":700===t?"bold":String(t)}function r(n,t){return[n,t,i]}n.addPropertiesHandler(t,r,["font-weight"])}(i),function(n){function o(n){var i={},t;for(t in n)i[t]=-n[t];return i}function i(t){return n.consumeToken(/^(left|center|right|top|bottom)\b/i,t)||n.consumeLengthOrPercent(t)}function r(t,r){var e=n.consumeRepeated(i,/^/,r),u,o;if(e&&""==e[1]&&(u=e[0],(u[0]=u[0]||"center",u[1]=u[1]||"center",3==t&&(u[2]=u[2]||{px:0}),u.length==t)&&((/top|bottom/.test(u[0])||/left|right/.test(u[1]))&&(o=u[0],u[0]=u[1],u[1]=o),/left|right|center|Object/.test(u[0])&&/top|bottom|center|Object/.test(u[1]))))return u.map(function(n){return"object"==typeof n?n:f[n]})}function u(t){var e=n.consumeRepeated(i,/^/,t),r;if(e){for(var l=e[0],s=[{"%":50},{"%":50}],u=0,h=!1,c=0;c<l.length;c++)r=l[c],"string"==typeof r?(h=/bottom|right/.test(r),u={left:0,right:0,center:u,top:1,bottom:1}[r],s[u]=f[r],"center"==r&&u++):(h&&(r=o(r),r["%"]=(r["%"]||0)+100),s[u]=r,u++,h=!1);return[s,e[1]]}}function s(t){var i=n.consumeRepeated(u,/^,/,t);if(i&&""==i[1])return i[0]}var f={left:{"%":0},center:{"%":50},right:{"%":100},top:{"%":0},bottom:{"%":100}},t=n.mergeNestedRepeated.bind(null,n.mergeDimensions," "),e;n.addPropertiesHandler(r.bind(null,3),t,["transform-origin"]);n.addPropertiesHandler(r.bind(null,2),t,["perspective-origin"]);n.consumePosition=u;n.mergeOffsetList=t;e=n.mergeNestedRepeated.bind(null,t,", ");n.addPropertiesHandler(s,e,["background-position","object-position"])}(i),function(n){function i(i){var e=n.consumeToken(/^circle/,i),r,f;return e&&e[0]?["circle"].concat(n.consumeList([n.ignore(n.consumeToken.bind(void 0,/^\(/)),t,n.ignore(n.consumeToken.bind(void 0,/^at/)),n.consumePosition,n.ignore(n.consumeToken.bind(void 0,/^\)/))],e[1])):(r=n.consumeToken(/^ellipse/,i),r&&r[0])?["ellipse"].concat(n.consumeList([n.ignore(n.consumeToken.bind(void 0,/^\(/)),u,n.ignore(n.consumeToken.bind(void 0,/^at/)),n.consumePosition,n.ignore(n.consumeToken.bind(void 0,/^\)/))],r[1])):(f=n.consumeToken(/^polygon/,i),f&&f[0]?["polygon"].concat(n.consumeList([n.ignore(n.consumeToken.bind(void 0,/^\(/)),n.optional(n.consumeToken.bind(void 0,/^nonzero\s*,|^evenodd\s*,/),"nonzero,"),n.consumeSizePairList,n.ignore(n.consumeToken.bind(void 0,/^\)/))],f[1])):void 0)}function r(t,i){if(t[0]===i[0])return"circle"==t[0]?n.mergeList(t.slice(1),i.slice(1),["circle(",n.mergeDimensions," at ",n.mergeOffsetList,")"]):"ellipse"==t[0]?n.mergeList(t.slice(1),i.slice(1),["ellipse(",n.mergeNonNegativeSizePair," at ",n.mergeOffsetList,")"]):"polygon"==t[0]&&t[1]==i[1]?n.mergeList(t.slice(2),i.slice(2),["polygon(",t[1],e,")"]):void 0}var t=n.consumeParenthesised.bind(null,n.parseLengthOrPercent),u=n.consumeRepeated.bind(void 0,t,/^/),f=n.mergeNestedRepeated.bind(void 0,n.mergeDimensions," "),e=n.mergeNestedRepeated.bind(void 0,f,",");n.addPropertiesHandler(i,r,["shape-outside"])}(i),function(n){function t(n,t){t.concat([n]).forEach(function(t){t in document.documentElement.style&&(i[n]=t);r[t]=n})}var i={},r={};t("transform",["webkitTransform","msTransform"]);t("transformOrigin",["webkitTransformOrigin"]);t("perspective",["webkitPerspective"]);t("perspectiveOrigin",["webkitPerspectiveOrigin"]);n.propertyName=function(n){return i[n]||n};n.unprefixedPropertyName=function(n){return r[n]||n}}(i)}(),function(){var n,t,i;void 0===document.createElement("div").animate([]).oncancel&&(n=window.performance&&performance.now?function(){return performance.now()}:function(){return Date.now()},t=function(n,t,i){this.target=n;this.currentTime=t;this.timelineTime=i;this.type="cancel";this.bubbles=!1;this.cancelable=!1;this.currentTarget=n;this.defaultPrevented=!1;this.eventPhase=Event.AT_TARGET;this.timeStamp=Date.now()},i=window.Element.prototype.animate,window.Element.prototype.animate=function(r,u){var f=i.call(this,r,u),e,o,s;return f._cancelHandlers=[],f.oncancel=null,e=f.cancel,f.cancel=function(){e.call(this);var i=new t(this,null,n()),r=this._cancelHandlers.concat(this.oncancel?[this.oncancel]:[]);setTimeout(function(){r.forEach(function(n){n.call(i.target,i)})},0)},o=f.addEventListener,f.addEventListener=function(n,t){"function"==typeof t&&"cancel"==n?this._cancelHandlers.push(t):o.call(this,n,t)},s=f.removeEventListener,f.removeEventListener=function(n,t){if("cancel"==n){var i=this._cancelHandlers.indexOf(t);i>=0&&this._cancelHandlers.splice(i,1)}else s.call(this,n,t)},f})}(),function(n){var r=document.documentElement,t=null,u=!1,f,i,e;try{f=getComputedStyle(r).getPropertyValue("opacity");i="0"==f?"1":"0";t=r.animate({opacity:[i,i]},{duration:1});t.currentTime=0;u=getComputedStyle(r).getPropertyValue("opacity")==i}catch(n){}finally{t&&t.cancel()}u||(e=window.Element.prototype.animate,window.Element.prototype.animate=function(t,i){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&t[Symbol.iterator]&&(t=Array.from(t)),Array.isArray(t)||null===t||(t=n.convertToArrayForm(t)),e.call(this,t,i)})}(r);t.true=n}({},function(){return this}());_Group=function(){this._tweens={};this._tweensAddedDuringUpdate={}};_Group.prototype={getAll:function(){return Object.keys(this._tweens).map(function(n){return this._tweens[n]}.bind(this))},removeAll:function(){this._tweens={}},add:function(n){this._tweens[n.getId()]=n;this._tweensAddedDuringUpdate[n.getId()]=n},remove:function(n){delete this._tweens[n.getId()];delete this._tweensAddedDuringUpdate[n.getId()]},update:function(n,t){var i=Object.keys(this._tweens),r,u;if(0===i.length)return!1;for(n=void 0!==n?n:TWEEN.now();i.length>0;){for(this._tweensAddedDuringUpdate={},r=0;r<i.length;r++)u=this._tweens[i[r]],u&&!1===u.update(n)&&(u._isPlaying=!1,t||delete this._tweens[i[r]]);i=Object.keys(this._tweensAddedDuringUpdate)}return!0}};TWEEN=new _Group;TWEEN.Group=_Group;TWEEN._nextId=0;TWEEN.nextId=function(){return TWEEN._nextId++};TWEEN.now="undefined"==typeof window&&"undefined"!=typeof process?function(){var n=process.hrtime();return 1e3*n[0]+n[1]/1e6}:"undefined"!=typeof window&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now.bind(window.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()};TWEEN.Tween=function(n,t){this._object=n;this._valuesStart={};this._valuesEnd={};this._valuesStartRepeat={};this._duration=1e3;this._repeat=0;this._repeatDelayTime=void 0;this._yoyo=!1;this._isPlaying=!1;this._reversed=!1;this._delayTime=0;this._startTime=null;this._easingFunction=TWEEN.Easing.Linear.None;this._interpolationFunction=TWEEN.Interpolation.Linear;this._chainedTweens=[];this._onStartCallback=null;this._onStartCallbackFired=!1;this._onUpdateCallback=null;this._onCompleteCallback=null;this._onStopCallback=null;this._group=t||TWEEN;this._id=TWEEN.nextId()};TWEEN.Tween.prototype={getId:function(){return this._id},isPlaying:function(){return this._isPlaying},to:function(n,t){return this._valuesEnd=n,void 0!==t&&(this._duration=t),this},start:function(n){this._group.add(this);this._isPlaying=!0;this._onStartCallbackFired=!1;this._startTime=void 0!==n?"string"==typeof n?TWEEN.now()+parseFloat(n):n:TWEEN.now();this._startTime+=this._delayTime;for(var t in this._valuesEnd){if(this._valuesEnd[t]instanceof Array){if(0===this._valuesEnd[t].length)continue;this._valuesEnd[t]=[this._object[t]].concat(this._valuesEnd[t])}void 0!==this._object[t]&&(this._valuesStart[t]=this._object[t],this._valuesStart[t]instanceof Array==!1&&(this._valuesStart[t]*=1),this._valuesStartRepeat[t]=this._valuesStart[t]||0)}return this},stop:function(){return this._isPlaying?(this._group.remove(this),this._isPlaying=!1,null!==this._onStopCallback&&this._onStopCallback(this._object),this.stopChainedTweens(),this):this},end:function(){return this.update(this._startTime+this._duration),this},stopChainedTweens:function(){for(var n=0,t=this._chainedTweens.length;n<t;n++)this._chainedTweens[n].stop()},group:function(n){return this._group=n,this},delay:function(n){return this._delayTime=n,this},repeat:function(n){return this._repeat=n,this},repeatDelay:function(n){return this._repeatDelayTime=n,this},yoyo:function(n){return this._yoyo=n,this},easing:function(n){return this._easingFunction=n,this},interpolation:function(n){return this._interpolationFunction=n,this},chain:function(){return this._chainedTweens=arguments,this},onStart:function(n){return this._onStartCallback=n,this},onUpdate:function(n){return this._onUpdateCallback=n,this},onComplete:function(n){return this._onCompleteCallback=n,this},onStop:function(n){return this._onStopCallback=n,this},update:function(n){var t,r,e,u,i,o,f,s;if(n<this._startTime)return!0;!1===this._onStartCallbackFired&&(null!==this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0);r=(n-this._startTime)/this._duration;r=0===this._duration||r>1?1:r;e=this._easingFunction(r);for(t in this._valuesEnd)void 0!==this._valuesStart[t]&&(u=this._valuesStart[t]||0,i=this._valuesEnd[t],i instanceof Array?this._object[t]=this._interpolationFunction(i,e):("string"==typeof i&&(i="+"===i.charAt(0)||"-"===i.charAt(0)?u+parseFloat(i):parseFloat(i)),"number"==typeof i&&(this._object[t]=u+(i-u)*e)));if(null!==this._onUpdateCallback&&this._onUpdateCallback(this._object),1===r){if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(t in this._valuesStartRepeat)("string"==typeof this._valuesEnd[t]&&(this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(this._valuesEnd[t])),this._yoyo)&&(o=this._valuesStartRepeat[t],this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=o),this._valuesStart[t]=this._valuesStartRepeat[t];return this._yoyo&&(this._reversed=!this._reversed),this._startTime=void 0!==this._repeatDelayTime?n+this._repeatDelayTime:n+this._delayTime,!0}for(null!==this._onCompleteCallback&&this._onCompleteCallback(this._object),f=0,s=this._chainedTweens.length;f<s;f++)this._chainedTweens[f].start(this._startTime+this._duration);return!1}return!0}};TWEEN.Easing={Linear:{None:function(n){return n}},Quadratic:{In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)}},Cubic:{In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}},Quartic:{In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}},Quintic:{In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}},Sinusoidal:{In:function(n){return 1-Math.cos(n*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return.5*(1-Math.cos(Math.PI*n))}},Exponential:{In:function(n){return 0===n?0:Math.pow(1024,n-1)},Out:function(n){return 1===n?1:1-Math.pow(2,-10*n)},InOut:function(n){return 0===n?0:1===n?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(2-Math.pow(2,-10*(n-1)))}},Circular:{In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)}},Elastic:{In:function(n){return 0===n?0:1===n?1:-Math.pow(2,10*(n-1))*Math.sin(5*(n-1.1)*Math.PI)},Out:function(n){return 0===n?0:1===n?1:Math.pow(2,-10*n)*Math.sin(5*(n-.1)*Math.PI)+1},InOut:function(n){return 0===n?0:1===n?1:(n*=2)<1?-.5*Math.pow(2,10*(n-1))*Math.sin(5*(n-1.1)*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin(5*(n-1.1)*Math.PI)+1}},Back:{In:function(n){return n*n*(2.70158*n-1.70158)},Out:function(n){return--n*n*(2.70158*n+1.70158)+1},InOut:function(n){var t=2.5949095;return(n*=2)<1?n*n*((t+1)*n-t)*.5:.5*((n-=2)*n*((t+1)*n+t)+2)}},Bounce:{In:function(n){return 1-TWEEN.Easing.Bounce.Out(1-n)},Out:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return n<.5?.5*TWEEN.Easing.Bounce.In(2*n):.5*TWEEN.Easing.Bounce.Out(2*n-1)+.5}}};TWEEN.Interpolation={Linear:function(n,t){var i=n.length-1,r=i*t,u=Math.floor(r),f=TWEEN.Interpolation.Utils.Linear;return t<0?f(n[0],n[1],r):t>1?f(n[i],n[i-1],i-r):f(n[u],n[u+1>i?i:u+1],r-u)},Bezier:function(n,t){for(var u=0,r=n.length-1,f=Math.pow,e=TWEEN.Interpolation.Utils.Bernstein,i=0;i<=r;i++)u+=f(1-t,r-i)*f(t,i)*n[i]*e(r,i);return u},CatmullRom:function(n,t){var i=n.length-1,u=i*t,r=Math.floor(u),f=TWEEN.Interpolation.Utils.CatmullRom;return n[0]===n[i]?(t<0&&(r=Math.floor(u=i*(1+t))),f(n[(r-1+i)%i],n[r],n[(r+1)%i],n[(r+2)%i],u-r)):t<0?n[0]-(f(n[0],n[0],n[1],n[1],-u)-n[0]):t>1?n[i]-(f(n[i],n[i],n[i-1],n[i-1],u-i)-n[i]):f(n[r?r-1:0],n[r],n[i<r+1?i:r+1],n[i<r+2?i:r+2],u-r)},Utils:{Linear:function(n,t,i){return(t-n)*i+n},Bernstein:function(n,t){var i=TWEEN.Interpolation.Utils.Factorial;return i(n)/i(t)/i(n-t)},Factorial:function(){var n=[1];return function(t){var r=1,i;if(n[t])return n[t];for(i=t;i>1;i--)r*=i;return n[t]=r,r}}(),CatmullRom:function(n,t,i,r,u){var f=.5*(i-n),e=.5*(r-t),o=u*u;return(2*t-2*i+f+e)*u*o+(-3*t+3*i-2*f-e)*o+f*u+t}}},function(n){"function"==typeof define&&define.amd?define([],function(){return TWEEN}):"undefined"!=typeof module&&"object"==typeof exports?module.exports=TWEEN:void 0!==n&&(n.TWEEN=TWEEN)}(this),function(n,t){typeof define=="function"&&define.amd?define(["leaflet"],n):typeof exports=="object"&&(module.exports=n(require("leaflet")));typeof t!="undefined"&&t.L&&(t.L.CanvasFlowmapLayer=n(L),t.L.canvasFlowmapLayer=function(n,i){return new t.L.CanvasFlowmapLayer(n,i)})}(function(n){var t=n.canvas();return n.GeoJSON.extend({options:{originAndDestinationFieldIds:{originUniqueIdField:"origin_id",originGeometry:{x:"origin_lon",y:"origin_lat"},destinationUniqueIdField:"destination_id",destinationGeometry:{x:"destination_lon",y:"destination_lat"}},canvasBezierStyle:{type:"simple",symbol:{strokeStyle:"rgba(255, 0, 51, 0.8)",lineWidth:.75,lineCap:"round",shadowColor:"rgb(255, 0, 51)",shadowBlur:1.5}},animatedCanvasBezierStyle:{type:"simple",symbol:{strokeStyle:"rgb(255, 46, 88)",lineWidth:1.25,lineDashOffsetSize:4,lineCap:"round",shadowColor:"rgb(255, 0, 51)",shadowBlur:2}},pathDisplayMode:"all",wrapAroundCanvas:!0,animationStarted:!1,animationEasingFamily:"Cubic",animationEasingType:"In",animationDuration:2e3,pointToLayer:function(t,i){return n.circleMarker(i)},style:function(n){return n.properties.isOrigin?{renderer:t,radius:5,weight:1,color:"rgb(195, 255, 62)",fillColor:"rgba(195, 255, 62, 0.6)",fillOpacity:.6}:{renderer:t,radius:2.5,weight:.25,color:"rgb(17, 142, 170)",fillColor:"rgb(17, 142, 170)",fillOpacity:.7}}},_customCanvases:[],initialize:function(t,i){n.setOptions(this,i);this._animationPropertiesStatic={offset:0,resetOffset:200,repeat:Infinity,yoyo:!1};this._animationPropertiesDynamic={duration:null,easingInfo:null};this._layers={};t&&this.options.originAndDestinationFieldIds&&this.setOriginAndDestinationGeoJsonPoints(t);window.hasOwnProperty("TWEEN")?(this.setAnimationDuration(this.options.animationDuration),this.setAnimationEasing(this.options.animationEasingFamily,this.options.animationEasingType),this._animationTween=new TWEEN.Tween(this._animationPropertiesStatic).to({offset:this._animationPropertiesStatic.resetOffset},this._animationPropertiesDynamic.duration).easing(this._animationPropertiesDynamic.easingInfo.tweenEasingFunction).repeat(this._animationPropertiesStatic.repeat).yoyo(this._animationPropertiesStatic.yoyo).start()):this.options.animationStarted=!1},setOriginAndDestinationGeoJsonPoints:function(n){var t,i,r;return n.features?(t=this.options.originAndDestinationFieldIds.originGeometry,i=this.options.originAndDestinationFieldIds.destinationGeometry,n.features.forEach(function(r,u){if(r.type==="Feature"&&r.geometry&&r.geometry.type==="Point"){r.properties.isOrigin=!0;r.properties._isSelectedForPathDisplay=this.options.pathDisplayMode==="all"?!0:!1;r.properties._uniqueId=u+"_origin";r.geometry.coordinates=[r.properties[t.x],r.properties[t.y]];var f=JSON.parse(JSON.stringify(r));f.properties.isOrigin=!1;f.properties._isSelectedForPathDisplay=!1;f.properties._uniqueId=u+"_destination";f.geometry.coordinates=[f.properties[i.x],f.properties[i.y]];n.features.push(f)}},this),this.originAndDestinationGeoJsonPoints=n,r=this._filterGeoJsonPointsToDraw(n),this.addData(r)):this.originAndDestinationGeoJsonPoints=null,this},onAdd:function(t){n.GeoJSON.prototype.onAdd.call(this,t);this._animationCanvasElement=this._insertCustomCanvasElement(t,this.options);this._canvasElement=this._insertCustomCanvasElement(t,this.options);this._customCanvases=[this._canvasElement,this._animationCanvasElement];this.on("click mouseover",this._modifyInteractionEvent,this);t.on("move",this._resetCanvas,this);t.on("moveend",this._resetCanvasAndWrapGeoJsonCircleMarkers,this);t.on("resize",this._resizeCanvas,this);if(t.options.zoomAnimation&&n.Browser.any3d)t.on("zoomanim",this._animateZoom,this);return this._resizeCanvas(),this._resetCanvasAndWrapGeoJsonCircleMarkers(),this},onRemove:function(t){return n.GeoJSON.prototype.onRemove.call(this,t),this._clearCanvas(),this._customCanvases.forEach(function(t){n.DomUtil.remove(t)}),this.off("click mouseover",this._modifyInteractionEvent,this),t.off("move",this._resetCanvas,this),t.off("moveend",this._resetCanvasAndWrapGeoJsonCircleMarkers,this),t.off("resize",this._resizeCanvas,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this),this},bringToBack:function(){return n.GeoJSON.prototype.bringToBack.call(this),n.DomUtil.toBack(this._animationCanvasElement),n.DomUtil.toBack(this._canvasElement),this},bringToFront:function(){return n.DomUtil.toFront(this._canvasElement),n.DomUtil.toFront(this._animationCanvasElement),n.GeoJSON.prototype.bringToFront.call(this),this},setAnimationDuration:function(n){n=Number(n)||this.options.animationDuration;this._animationTween&&this._animationTween.to({offset:this._animationPropertiesStatic.resetOffset},n);this._animationPropertiesDynamic.duration=n},setAnimationEasing:function(n,t){var i;TWEEN.Easing.hasOwnProperty(n)&&TWEEN.Easing[n].hasOwnProperty(t)?i=TWEEN.Easing[n][t]:(n=this.options.animationEasingFamily,t=this.options.animationEasingType,i=TWEEN.Easing[n][t]);this._animationTween&&this._animationTween.easing(i);this._animationPropertiesDynamic.easingInfo={easingFamily:n,easingType:t,tweenEasingFunction:i}},getAnimationEasingOptions:function(n){var t={},i={};return Object.keys(TWEEN.Easing).forEach(function(n){t[n]={types:Object.keys(TWEEN.Easing[n]).join('", "')};i[n]={types:Object.keys(TWEEN.Easing[n])}}),!n||console.table(t),i},playAnimation:function(){this.options.animationStarted=!0;this._redrawCanvas()},stopAnimation:function(){this.options.animationStarted=!1;this._redrawCanvas()},selectFeaturesForPathDisplay:function(n,t){this._applyFeaturesSelection(n,t,"_isSelectedForPathDisplay")},selectFeaturesForPathDisplayById:function(n,t,i,r){if(n!==this.options.originAndDestinationFieldIds.originUniqueIdField&&n!==this.options.originAndDestinationFieldIds.destinationUniqueIdField){console.error("Invalid unique id field supplied for origin or destination. It must be one of these: "+this.options.originAndDestinationFieldIds.originUniqueIdField+", "+this.options.originAndDestinationFieldIds.destinationUniqueIdField);return}var f=this.originAndDestinationGeoJsonPoints.features.filter(function(r){return r.properties.isOrigin===i&&r.properties[n]===t})[0],u=this._getSharedOriginOrDestinationFeatures(f);u.isOriginFeature?this.selectFeaturesForPathDisplay(u.sharedOriginFeatures,r):this.selectFeaturesForPathDisplay(u.sharedDestinationFeatures,r)},clearAllPathSelections:function(){this.originAndDestinationGeoJsonPoints.features.forEach(function(n){n.properties._isSelectedForPathDisplay=!1});this._resetCanvas()},_filterGeoJsonPointsToDraw:function(n){var t={type:"FeatureCollection",features:[]},i=[],r=[],u=this.options.originAndDestinationFieldIds.originUniqueIdField,f=this.options.originAndDestinationFieldIds.destinationUniqueIdField;return n.features.forEach(function(n){var e=n.properties.isOrigin;if(e&&i.indexOf(n.properties[u])===-1)i.push(n.properties[u]),t.features.push(n);else{if(e||r.indexOf(n.properties[f])!==-1)return;r.push(n.properties[f]);t.features.push(n)}}),t},_insertCustomCanvasElement:function(t,i){var r=n.DomUtil.create("canvas","leaflet-zoom-animated"),f=n.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]),u;return r.style[f]="50% 50%",u=t.getPane(i.pane),u.insertBefore(r,u.firstChild),r},_modifyInteractionEvent:function(n){var t=this._getSharedOriginOrDestinationFeatures(n.layer.feature);n.isOriginFeature=t.isOriginFeature;n.sharedOriginFeatures=t.sharedOriginFeatures;n.sharedDestinationFeatures=t.sharedDestinationFeatures},_getSharedOriginOrDestinationFeatures:function(n){var r=n.properties.isOrigin,u=[],f=[],t,e,i,o;return r?(t=this.options.originAndDestinationFieldIds.originUniqueIdField,e=n.properties[t],u=this.originAndDestinationGeoJsonPoints.features.filter(function(n){return n.properties.isOrigin&&n.properties[t]===e})):(i=this.options.originAndDestinationFieldIds.destinationUniqueIdField,o=n.properties[i],f=this.originAndDestinationGeoJsonPoints.features.filter(function(n){return n.properties.isOrigin&&n.properties[i]===o})),{isOriginFeature:r,sharedOriginFeatures:u,sharedDestinationFeatures:f}},_applyFeaturesSelection:function(n,t,i){var r=n.map(function(n){return n.properties._uniqueId});if(t==="SELECTION_NEW")this.originAndDestinationGeoJsonPoints.features.forEach(function(n){n.properties[i]=r.indexOf(n.properties._uniqueId)>-1?!0:!1});else if(t==="SELECTION_ADD")this.originAndDestinationGeoJsonPoints.features.forEach(function(n){r.indexOf(n.properties._uniqueId)>-1&&(n.properties[i]=!0)});else if(t==="SELECTION_SUBTRACT")this.originAndDestinationGeoJsonPoints.features.forEach(function(n){r.indexOf(n.properties._uniqueId)>-1&&(n.properties[i]=!1)});else return;this._resetCanvas()},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),r=this._map._getCenterOffset(t.center)._multiplyBy(-i).subtract(this._map._getMapPanePos());n.DomUtil.setTransform?this._customCanvases.forEach(function(t){n.DomUtil.setTransform(t,r,i)}):this._customCanvases.forEach(function(t){t.style[n.DomUtil.TRANSFORM]=n.DomUtil.getTranslateString(r)+" scale("+i+")"})},_resizeCanvas:function(){var n=this._map.getSize();this._customCanvases.forEach(function(t){t.width=n.x;t.height=n.y});this._resetCanvas()},_resetCanvas:function(){var t=this._map.containerPointToLayerPoint([0,0]);this._customCanvases.forEach(function(i){n.DomUtil.setPosition(i,t)});this._redrawCanvas()},_resetCanvasAndWrapGeoJsonCircleMarkers:function(){this._resetCanvas();this._wrapGeoJsonCircleMarkers()},_redrawCanvas:function(){this._map&&this.originAndDestinationGeoJsonPoints&&(this._clearCanvas(),this._drawSelectedCanvasPaths(!1),this._animationFrameId&&n.Util.cancelAnimFrame(this._animationFrameId),this.options.animationStarted&&this.originAndDestinationGeoJsonPoints.features.some(function(n){return n.properties._isSelectedForPathDisplay})&&this._animator())},_clearCanvas:function(){this._customCanvases.forEach(function(n){n.getContext("2d").clearRect(0,0,n.width,n.height)});this._animationFrameId&&n.Util.cancelAnimFrame(this._animationFrameId)},_drawSelectedCanvasPaths:function(t){var i=t?this._animationCanvasElement.getContext("2d"):this._canvasElement.getContext("2d"),r;t&&i.beginPath();r=this.options.originAndDestinationFieldIds;this.originAndDestinationGeoJsonPoints.features.forEach(function(u){if(u.properties._isSelectedForPathDisplay){var s=u.properties[r.originGeometry.x],h=u.properties[r.originGeometry.y],c=u.properties[r.destinationGeometry.x],l=u.properties[r.destinationGeometry.y],a=this._wrapAroundLatLng(n.latLng([h,s])),v=this._wrapAroundLatLng(n.latLng([l,c])),e=this._map.latLngToContainerPoint(a),o=this._map.latLngToContainerPoint(v),f;t?(f=this._getSymbolProperties(u,this.options.animatedCanvasBezierStyle),this._animateCanvasLineSymbol(i,f,e,o)):(f=this._getSymbolProperties(u,this.options.canvasBezierStyle),i.beginPath(),this._applyAnimatedCanvasLineSymbol(i,f,e,o),i.stroke(),i.closePath())}},this);t&&(i.stroke(),i.closePath())},_getSymbolProperties:function(n,t){var r,i;return t.type==="simple"?r=t.symbol:t.type==="uniqueValue"?(i=t.uniqueValueInfos.filter(function(i){return i.value===n.properties[t.field]}),r=i[0].symbol):t.type==="classBreaks"&&(i=t.classBreakInfos.filter(function(i){return i.classMinValue<=n.properties[t.field]&&i.classMaxValue>=n.properties[t.field]}),r=i.length?i[0].symbol:t.defaultSymbol),r},_applyAnimatedCanvasLineSymbol:function(n,t,i,r){n.lineCap=t.lineCap;n.lineWidth=t.lineWidth;n.strokeStyle=t.strokeStyle;n.shadowBlur=t.shadowBlur;n.shadowColor=t.shadowColor;n.moveTo(i.x,i.y);n.bezierCurveTo(i.x,r.y,r.x,r.y,r.x,r.y)},_animateCanvasLineSymbol:function(n,t,i,r){n.lineCap=t.lineCap;n.lineWidth=t.lineWidth;n.strokeStyle=t.strokeStyle;n.shadowBlur=t.shadowBlur;n.shadowColor=t.shadowColor;n.setLineDash([t.lineDashOffsetSize,this._animationPropertiesStatic.resetOffset-t.lineDashOffsetSize]);n.lineDashOffset=-this._animationPropertiesStatic.offset;n.moveTo(i.x,i.y);n.bezierCurveTo(i.x,r.y,r.x,r.y,r.x,r.y)},_animator:function(t){this._animationCanvasElement.getContext("2d").clearRect(0,0,this._animationCanvasElement.width,this._animationCanvasElement.height);this._drawSelectedCanvasPaths(!0);TWEEN.update(t);this._animationFrameId=n.Util.requestAnimFrame(this._animator,this)},_wrapGeoJsonCircleMarkers:function(){this.eachLayer(function(n){var t=this._wrapAroundLatLng(n.getLatLng());n.setLatLng(t)},this)},_wrapAroundLatLng:function(n){if(this._map&&this.options.wrapAroundCanvas){var t=n.clone(),r=this._map.getCenter().lng,i=r-t.lng;return(i<-180||i>180)&&(t.lng+=Math.round(i/360)*360),t}return n}})},window);let cartodbAttribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap<\/a> contributors, &copy; <a href="http://cartodb.com/attributions">CartoDB<\/a>',defaultBaseLayer={Url:"http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",attribution:cartodbAttribution,opacity:0},whoTileLayer={Url:"https://tiles.arcgis.com/tiles/5T5nSi527N4F7luB/arcgis/rest/services/basemap_test/MapServer/tile/{z}/{y}/{x}",opacity:.5},curvedPathOptions={color:"#000000",weight:1};let laboratoriesFirstLoad=!0,laboratoriesViewModel=null,laboratoryTypesFirstLoad=!0,laboratoryTypesViewModel=[],countriesViewModel=[],reloadCountries=!0,interactiveMapMarkers=[];gsrisCount=0;nonGsrisCount=0;$("#dropdownLaboratoryTypes, #dropdownCountries").on("change",function(){getLaboratoryMapInformation(0,$("#dropdownLaboratoryTypes").data("kendoDropDownList").value(),getCountryId());$("#inputSearchLaboratory").val("")});$("#inputSearchLaboratory").kendoAutoComplete({dataTextField:"Desc",dataValueField:"ID",dataSource:laboratoriesViewModel,filter:"contains",valuePrimitive:!0}).parent().addClass("laboratoryAutocomplete");addInputSearchLaboratoryDropDownEvent();$("#inputSearchLaboratory").on("click",function(){if(laboratoriesFirstLoad){let n=$(this).val();$.ajax({async:!1,type:"get",dataType:"json",headers:headers,url:baseUrl+"Home/GetLabShortAndLongNamesAsync",success:function(n){laboratoriesViewModel=n}});let t=$("#inputSearchLaboratory").data("kendoAutoComplete");t.setDataSource(laboratoriesViewModel);$(this).val(n);$("#inputSearchLaboratory").focus();laboratoriesFirstLoad=!1}});$("#dropdownLaboratoryTypes").kendoDropDownList({optionLabel:"Laboratory Type",dataTextField:"Description",dataValueField:"Key",dataSource:laboratoryTypesViewModel,index:0,open:onOpenLaboratoryTypes});$("#dropdownLaboratoryTypes").data("kendoDropDownList").select(0);$("#dropdownCountries").kendoDropDownList({optionLabel:"Country",dataTextField:"Desc",dataValueField:"ID",dataSource:countriesViewModel,index:0,open:onOpenCountries});$("#dropdownCountries").data("kendoDropDownList").select(0);interactiveMap=L.map("interactive-map",{minZoom:2,maxZoom:10,worldCopyJump:!0});let defaultInteractiveMapView={lat:43,lng:0,zoomLevel:1};setMapView(defaultInteractiveMapView);interactiveMap.zoomControl.setPosition("topright");let interactiveMapWhoTileLayer=createMapTileLayer(whoTileLayer).addTo(interactiveMap),interactiveMapLegend=L.control({position:"bottomleft"});interactiveMapLegend.onAdd=function(){let n=L.DomUtil.create("div","info legend");return n.innerHTML+='<div class="map-legend"><div><span class="badge legend-gsris-count">'+gsrisCount+'<\/span><small class="map-legend-text"> GISRS Laboratories<\/small><\/div><div><span class="badge legend-nonGsris-count">'+nonGsrisCount+'<\/span><small class="map-legend-text"> Non-GISRS Laboratories<\/small><\/div><div><span class="badge legend-total-count">'+(gsrisCount+nonGsrisCount)+'<\/span><small class="map-legend-text"> Total Laboratories<\/small><\/div><\/div>',n};getLaboratoryMapInformation(0,"",0,0);$("#btnSearchLaboratoryLocations").on("click",function(){let n=getLaboratoryID();$("#dropdownLaboratoryTypes").data("kendoDropDownList").select(0);$("#dropdownCountries").data("kendoDropDownList").select(0);getLaboratoryMapInformation(n,"",0)});let shipmentsMarkers=[],flowMapCanvases=[],currentPeriodType="",materialsShipmentsModalMapMarkers=[];$("#info-pop-up-modal-container").attr("id","materials-shipments-modal");let modal=$("#materials-shipments-modal");modal.find(".modal-body-content").append('<div id="materials-shipments-modal-map"><\/div>');let shipmentsMap=createMap("shipments-map",{minZoom:.6,maxZoom:10,scrollWheelZoom:!1,dragging:!0,zoomControl:!1,doubleClickZoom:!1}),materialsShipmentsModalMap=createMap("materials-shipments-modal-map",{minZoom:1.4,maxZoom:10,scrollWheelZoom:!0,dragging:!0,zoomControl:!0,doubleClickZoom:!0,worldCopyJump:!0}),shipmentsMapWhoTileLayer=createMapTileLayer(whoTileLayer).addTo(shipmentsMap),materialsShipmentsModalMapWhoTileLayer=createMapTileLayer(whoTileLayer).addTo(materialsShipmentsModalMap);if(typeof document.getElementById("shipments-map").animate=="function")curvedPathOptions.animate={duration:2e3,easing:"ease-in-out"};shipmentsMap.setView([43,0],.6);loadMiniDashboardData();materialsShipmentsModalMap.zoomControl.setPosition("topright");$('#periodTypes input[type="radio"]').click(function(){periodTypeRadioValue()!=currentPeriodType&&loadMiniDashboardData()});$(".js-materials-count").on("click",function(n){if($("body").addClass("modal-open"),parseInt($(this).text())===0)return!1;let i=$(this).text(),t=$(this).data();$.ajax({async:!1,data:{materialTypeCode:t.materialTypeCode,periodType:periodTypeRadioValue()},type:"get",dataType:"json",headers:headers,url:baseUrl+"Home/GetLaboratoriesMaterialsCount",success:function(n){showShipmentsMaterialsModalWindow(i+" "+t.modalwindowtitletext,n)}});n.preventDefault()});$("#btnShipmentsCount").on("click",function(n){if($("body").addClass("modal-open"),parseInt($(this).text())===0)return!1;let t=$(this).text();$.ajax({async:!1,data:{periodType:periodTypeRadioValue()},type:"get",dataType:"json",headers:headers,url:baseUrl+"Home/GetLaboratoriesShipmentsCount",success:function(n){showShipmentsMaterialsModalWindow(t+" Shipments",n)}});n.preventDefault()});$(".news-heading").click(function(n){let t=$("#info-pop-up-modal-container"),i=getNewsDescription(parseInt(this.dataset.newsId)),r=$(this).text();t.find(".modal-body-content").html("");t.find(".modal-title").text("");t.find(".modal-body-content").append(popUpModalRowContent(r,{top:5,bottom:20,left:20,right:20},2)+popUpModalRowContent(i.responseJSON.Description,{left:20,bottom:20,right:20})+popUpModalRowContent(i.responseJSON.Link,{top:5,bottom:20,left:20,right:20},null,"right",!0));t.modal("show");n.preventDefault()});$('.carousel[data-type="multi"] .item').each(function(){var n=$(this).next(),t;for(n.length||(n=$(this).siblings(":first")),n.children(":first-child").clone().appendTo($(this)),t=0;t<2;t++)n=n.next(),n.length||(n=$(this).siblings(":first")),n.children(":first-child").clone().appendTo($(this))});$(function(){$("#li-home").addClass("active")})