@bmlt-enabled/croutonjs 4.1.2 → 4.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/crouton-gmaps.js +16 -11
- package/crouton-gmaps.min.js +4 -4
- package/crouton-gmaps.min.js.map +1 -1
- package/crouton-map.js +4 -1
- package/crouton-map.min.js +1 -1
- package/crouton-map.min.js.map +1 -1
- package/crouton.js +16 -11
- package/crouton.min.js +4 -4
- package/crouton.min.js.map +1 -1
- package/crouton.nojquery.js +12 -10
- package/crouton.nojquery.min.js +4 -4
- package/crouton.nojquery.min.js.map +1 -1
- package/package.json +1 -1
package/crouton.min.js
CHANGED
|
@@ -148,7 +148,7 @@ if(!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.
|
|
|
148
148
|
{{/if}}
|
|
149
149
|
</div>
|
|
150
150
|
</div>
|
|
151
|
-
</div>`};!function(e){var t="object"==typeof exports&&exports&&!exports.nodeType&&exports,n="object"==typeof module&&module&&!module.nodeType&&module,i="object"==typeof global&&global;i.global!==i&&i.window!==i&&i.self!==i||(e=i);var o,a,g=2147483647,_=36,y=26,r=38,s=700,l=/^xn--/,c=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=_-1,v=Math.floor,b=String.fromCharCode;function w(e){throw new RangeError(d[e])}function p(e,t){for(var n=e.length,i=[];n--;)i[n]=t(e[n]);return i}function m(e,t){var n=e.split("@"),i="";return 1<n.length&&(i=n[0]+"@",e=n[1]),i+p((e=e.replace(u,".")).split("."),t).join(".")}function A(e){for(var t,n,i=[],o=0,a=e.length;o<a;)55296<=(t=e.charCodeAt(o++))&&t<=56319&&o<a?56320==(64512&(n=e.charCodeAt(o++)))?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),o--):i.push(t);return i}function f(e){return p(e,function(e){var t="";return 65535<e&&(t+=b((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=b(e)}).join("")}function k(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,n){var i=0;for(e=n?v(e/s):e>>1,e+=v(e/t);h*y>>1<e;i+=_)e=v(e/h);return v(i+(h+1)*e/(e+r))}function S(e){var t,n,i,o,a,r,s,l=[],c=e.length,u=0,d=128,h=72,p=e.lastIndexOf("-");for(p<0&&(p=0),n=0;n<p;++n)128<=e.charCodeAt(n)&&w("not-basic"),l.push(e.charCodeAt(n));for(i=0<p?p+1:0;i<c;){for(o=u,a=1,r=_;c<=i&&w("invalid-input"),s=e.charCodeAt(i++),(_<=(s=s-48<10?s-22:s-65<26?s-65:s-97<26?s-97:_)||s>v((g-u)/a))&&w("overflow"),u+=s*a,!(s<(s=r<=h?1:h+y<=r?y:r-h));r+=_)a>v(g/(s=_-s))&&w("overflow"),a*=s;h=x(u-o,t=l.length+1,0==o),v(u/t)>g-d&&w("overflow"),d+=v(u/t),u%=t,l.splice(u++,0,d)}return f(l)}function P(e){for(var t,n,i,o,a,r,s,l,c,u,d=[],h=(e=A(e)).length,p=128,m=72,f=t=0;f<h;++f)(s=e[f])<128&&d.push(b(s));for(n=i=d.length,i&&d.push("-");n<h;){for(o=g,f=0;f<h;++f)p<=(s=e[f])&&s<o&&(o=s);for(o-p>v((g-t)/(l=n+1))&&w("overflow"),t+=(o-p)*l,p=o,f=0;f<h;++f)if((s=e[f])<p&&++t>g&&w("overflow"),s==p){for(a=t,r=_;!(a<(c=r<=m?1:m+y<=r?y:r-m));r+=_)d.push(b(k(c+(u=a-c)%(c=_-c),0))),a=v(u/c);d.push(b(k(a,0))),m=x(t,l,n==i),t=0,++n}++t,++p}return d.join("")}if(o={version:"1.4.1",ucs2:{decode:A,encode:f},decode:S,encode:P,toASCII:function(e){return m(e,function(e){return c.test(e)?"xn--"+P(e):e})},toUnicode:function(e){return m(e,function(e){return l.test(e)?S(e.slice(4).toLowerCase()):e})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return o});else if(t&&n)if(module.exports==t)n.exports=o;else for(a in o)o.hasOwnProperty(a)&&(t[a]=o[a]);else e.punycode=o}(this);var defaultOptions={timeout:3e5,jsonpCallback:"callback",jsonpCallbackFunction:null};function generateCallbackFunction(){return"jsonp_"+Date.now().toString()+"_"+Math.ceil(1e5*Math.random()).toString()}function clearFunction(t){try{delete window[t]}catch(e){window[t]=void 0}}function removeScript(e){e=document.getElementById(e);e&&document.getElementsByTagName("head")[0].removeChild(e)}function fetchJsonp(a,r){var s,l=a,c=(r=r||{}).timeout||defaultOptions.timeout,u=r.jsonpCallback||defaultOptions.jsonpCallback;return new Promise(function(t,e){var n=r.jsonpCallbackFunction||generateCallbackFunction(),i=u+"_"+n;window[n]=function(e){t({ok:!0,json:function(){return Promise.resolve(e)}}),s&&clearTimeout(s),removeScript(i),clearFunction(n)},l+=-1===l.indexOf("?")?"?":"&";var o=document.createElement("script");o.setAttribute("src",l+u+"="+n),r.charset&&o.setAttribute("charset",r.charset),r.nonce&&o.setAttribute("nonce",r.nonce),r.referrerPolicy&&o.setAttribute("referrerPolicy",r.referrerPolicy),o.id=i,document.getElementsByTagName("head")[0].appendChild(o),s=setTimeout(function(){e(new Error("JSONP request to "+a+" timed out")),clearFunction(n),removeScript(i),window[n]=function(){clearFunction(n)}},c),o.onerror=function(){e(new Error("JSONP request to "+a+" failed")),clearFunction(n),removeScript(i),s&&clearTimeout(s)}})}!function(e){("object"!=typeof exports||"undefined"==typeof module)&&"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";function e(t){var n=this.constructor;return this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){return n.reject(e)})})}function t(n){return new this(function(o,e){if(!n||void 0===n.length)return e(new TypeError(typeof n+" "+n+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var a=Array.prototype.slice.call(n);if(0===a.length)return o([]);var r=a.length;for(var t=0;t<a.length;t++)!function t(n,e){if(e&&("object"==typeof e||"function"==typeof e)){var i=e.then;if("function"==typeof i)return void i.call(e,function(e){t(n,e)},function(e){a[n]={status:"rejected",reason:e},0==--r&&o(a)})}a[n]={status:"fulfilled",value:e},0==--r&&o(a)}(t,a[t])})}var n=setTimeout,i="undefined"!=typeof setImmediate?setImmediate:null;function l(e){return Boolean(e&&void 0!==e.length)}function o(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(e,this)}function r(n,i){for(;3===n._state;)n=n._value;0!==n._state?(n._handled=!0,a._immediateFn(function(){var e,t=1===n._state?i.onFulfilled:i.onRejected;if(null!==t){try{e=t(n._value)}catch(e){return void c(i.promise,e)}s(i.promise,e)}else(1===n._state?s:c)(i.promise,n._value)})):n._deferreds.push(i)}function s(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof a)return t._state=3,t._value=e,void u(t);if("function"==typeof n)return void h((i=n,o=e,function(){i.apply(o,arguments)}),t)}t._state=1,t._value=e,u(t)}catch(e){c(t,e)}var i,o}function c(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&a._immediateFn(function(){e._handled||a._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)r(e,e._deferreds[t]);e._deferreds=null}function d(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function h(e,t){var n=!1;try{e(function(e){n||(n=!0,s(t,e))},function(e){n||(n=!0,c(t,e))})}catch(e){if(n)return;n=!0,c(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var n=new this.constructor(o);return r(this,new d(e,t,n)),n},a.prototype.finally=e,a.all=function(t){return new a(function(o,a){if(!l(t))return a(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return o([]);var s=r.length;for(var e=0;e<r.length;e++)!function t(n,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var i=e.then;if("function"==typeof i)return void i.call(e,function(e){t(n,e)},a)}r[n]=e,0==--s&&o(r)}catch(e){a(e)}}(e,r[e])})},a.allSettled=t,a.resolve=function(t){return t&&"object"==typeof t&&t.constructor===a?t:new a(function(e){e(t)})},a.reject=function(n){return new a(function(e,t){t(n)})},a.race=function(o){return new a(function(e,t){if(!l(o))return t(new TypeError("Promise.race accepts an array"));for(var n=0,i=o.length;n<i;n++)a.resolve(o[n]).then(e,t)})},a._immediateFn="function"==typeof i?function(e){i(e)}:function(e){n(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var p=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();"function"!=typeof p.Promise?p.Promise=a:(p.Promise.prototype.finally||(p.Promise.prototype.finally=e),p.Promise.allSettled||(p.Promise.allSettled=t))});var crouton_Handlebars=Handlebars.noConflict();function Crouton(e){var p=this;p.mutex=!1,p.filtering=!1,p.masterFormatCodes=[],p.currentView="weekday",p.distanceTabAllowed=!1,p.config={version:"4.1.2",on_complete:null,root_server:null,placeholder_id:"bmlt-tabs",map_max_zoom:15,time_format:"h:mm a",language:"en-US",has_tabs:!0,filter_tabs:20,filter_visible:0,header:!0,include_weekday_button:!0,int_include_unpublished:0,grouping_buttons:[{title:"City",field:"location_municipality"},{title:"Distance",field:"distance_in_km"}],formattype_grouping_buttons:[],default_filter_dropdown:"",show_map:"embed",map_search:null,has_days:!1,has_cities:!0,has_formats:!0,has_groups:!1,has_locations:!0,has_zip_codes:!1,has_areas:!1,has_regions:!1,has_states:!1,has_sub_province:!1,has_neighborhoods:!1,has_languages:!1,has_common_needs:!1,has_venues:!0,has_meeting_count:!1,recurse_service_bodies:!1,service_body:[],formats:"",venue_types:[],meeting_details_href:"",virtual_meeting_details_href:"",bmlt2ics:"",exclude_zip_codes:[],extra_meetings:[],native_lang:"",auto_tz_adjust:!1,base_tz:null,custom_query:null,sort_keys:"start_time",int_start_day_id:1,view_by:"weekday",show_qrcode:!1,force_rootserver_in_querystring:!0,force_timeformat_in_querystring:!0,force_language_in_querystring:!0,theme:"jack",report_update_url:"",meeting_data_template:croutonDefaultTemplates.meeting_data_template,metadata_template:croutonDefaultTemplates.metadata_template,observer_template:croutonDefaultTemplates.observer_template,meeting_count_template:croutonDefaultTemplates.meeting_count_template,meetingpage_title_template:croutonDefaultTemplates.meetingpage_title_template,meetingdetails_contents_template:croutonDefaultTemplates.meetingdetails_contents_template,meeting_times_template:croutonDefaultTemplates.meeting_times_template,group_data_template:croutonDefaultTemplates.group_data_template,group_title_template:croutonDefaultTemplates.group_title_template,group_details_template:croutonDefaultTemplates.group_details_contents_template,member_details_template:croutonDefaultTemplates.member_details_template,lat:0,lng:0,zoom:10,clustering:12,nominatimUrl:"https://nominatim.openstreetmap.org/",tileUrl:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",tileOptions:{attribution:'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',maxZoom:18},minZoom:6,maxZoom:17,distance_units:"miles",noMap:!1,maxTomatoWidth:160,caption:!1,groups:!1,details_table:!1},p.setConfig(e),Crouton.prototype.searchByCoordinates=function(e,t,n,i=!0){var o=p.config.custom_query;p.config.custom_query=(null!==p.config.custom_query?p.config.custom_query:"")+"&lat_val="+e+"&long_val="+t+("km"===p.config.distance_units?"&geo_width_km=":"&geo_width=")+n,p.meetingSearch(function(){p.config.refresh_map=1,p.config.show_map=1,p.reset(),p.render(!1,i)}),p.config.custom_query=o},p.getMeetings=function(o,a=null){var e=[fetchJsonp(this.config.root_server+o).then(function(e){return e.json()})];if(0<p.config.extra_meetings.length){for(var t="",n=0;n<p.config.extra_meetings.length;n++)t+="&meeting_ids[]="+p.config.extra_meetings[n];o=o.replace(/&services\[\]=\d+/,""),e.push(fetchJsonp(p.config.root_server+o+t).then(function(e){return e.json()}))}return Promise.all(e).then(function(e){var t,n=e[0],i=JSON.stringify(n.meetings);if(2===e.length&&(t=e[1]),"{}"===i||"[]"===i){i=p.config.root_server+o;return console.log('Could not find any meetings for the criteria specified with the query <a href="'+i+'" target=_blank>'+i+"</a>"),jQuery("#"+p.config.placeholder_id).html("No meetings found."),p.meetingData=[],p.formatsData=[],p.mutex=!1,void(a&&a())}0<p.config.exclude_zip_codes.length&&(n.meetings=n.meetings.filter(function(e){return!inArray(e.location_postal_code_1,p.config.exclude_zip_codes)})),p.meetingData=n.meetings,p.formatsData=n.formats,t&&(p.meetingData=p.meetingData.concat(t.meetings)),a&&a(),p.mutex=!1})},p.mutex=!0,p.meetingSearch=function(e=null){var t="/client_interface/jsonp/?switcher=GetSearchResults&get_used_formats&lang_enum="+p.config.short_language;if(p.config.formats&&(t+=p.config.formats.reduce(function(e,t){return e+"&formats[]="+t},"")),p.config.map_search&&!Array.isArray(p.config.venue_types)&&(p.config.venue_types=[]),p.config.map_search&&0===p.config.venue_types.length&&p.config.venue_types.push("-2"),p.config.venue_types&&(t+=p.config.venue_types.reduce(function(e,t){return e+"&venue_types[]="+t},"")),1===p.config.int_include_unpublished?t+="&advanced_published=0":-1===p.config.int_include_unpublished&&(t+="&advanced_published=-1"),null!=p.config.custom_query)return t+=p.config.custom_query+"&sort_keys="+p.config.sort_keys,p.getMeetings(t,e);if(0<p.config.service_body.length){for(var n=0;n<p.config.service_body.length;n++)t+="&services[]="+p.config.service_body[n];return p.config.recurse_service_bodies&&(t+="&recursive=1"),t+="&sort_keys="+p.config.sort_keys,p.getMeetings(t,e)}return new Promise(function(e,t){e()})},p.lock=function(e){var t=this,n=setInterval(function(){t.mutex||(clearInterval(n),e())},100)},p.dayTab=function(e){p.hideAllPages(),jQuery('.nav-tabs a[href="#tab'+e+'"]').tab("show"),jQuery("#"+e).removeClass("hide").addClass("show")},p.dayTabFromId=function(t){day_id=p.meetingData.find(e=>e.id_bigint==t).weekday_tinyint,p.dayTab(day_id)},p.showPage=function(e){jQuery(e+" .bmlt-data-row-placeholder").each(function(){var e=this.dataset.meetingid;const t=jQuery(this);var n=this.outerHTML;const i=jQuery("#"+e);i.before(n),t.replaceWith(i)}),p.addStripes(),jQuery(e).removeClass("hide").addClass("show")},p.showView=function(t,e=0){p.currentView=t,0<e?p.showingNow=e:e=p.showingNow||p.meetingData.length,t.endsWith("day")?!p.config.has_tabs||p.config.filter_tabs&&p.config.filter_tabs>=e?(p.byDayView(),jQuery("#byday").find(".meeting-group").each(function(e){jQuery(this).find(".bmlt-data-row.hide").length===jQuery(this).find(".bmlt-data-row").length?jQuery(this).addClass("hide"):jQuery(this).removeClass("hide")})):p.dayView():"map"==t?p.mapView():0==jQuery("#groupingButton_"+t.toUpperCase()).length?p.groupedView(p.config.grouping_buttons.find(e=>e.title.toLowerCase()===t).field):p.groupedView(t.toUpperCase())},p.byDayView=function(){p.lowlightButton(".groupingButton"),p.highlightButton("#day"),jQuery(".bmlt-page").each(function(e){p.hidePage("#"+this.id)}),p.hidePage("#days"),p.showPage("#byday"),p.hidePage("#nav-days"),p.hidePage("#tabs-content")},p.dayView=function(){p.lowlightButton(".groupingButton"),p.highlightButton("#day"),jQuery(".bmlt-page").each(function(e){p.hidePage("#"+this.id)}),jQuery("#days").removeClass("hide").addClass("show"),jQuery("#nav-days").removeClass("hide").addClass("show"),p.showPage("#tabs-content")},p.groupedView=function(t){!t.includes("distance")||p.distanceTabAllowed?(p.lowlightButton("#day"),p.lowlightButton(".groupingButton"),p.highlightButton("#groupingButton_"+t),jQuery(".bmlt-page").each(function(e){p.hidePage("#"+this.id),p.showPage("#byfield_"+t),jQuery("#byfield_"+t).find(".meeting-group").each(function(e){jQuery(this).find(".bmlt-data-row.hide").length===jQuery(this).find(".bmlt-data-row").length?jQuery(this).addClass("hide"):jQuery(this).removeClass("hide")})})):p.dayView()},p.mapView=function(){p.lowlightButton("#day"),p.lowlightButton(".groupingButton"),p.highlightButton("#groupingButton_embeddedMapPage"),p.groupedView("embeddedMapPage",!1),croutonMap.showMap(!1,!1)},p.lowlightButton=function(e){jQuery(e).removeClass("buttonHighlight").addClass("buttonLowlight")},p.highlightButton=function(e){jQuery(e).removeClass("buttonLowlight").addClass("buttonHighlight")},p.hidePage=function(e){jQuery(e).removeClass("show").addClass("hide")},p.hideAllPages=function(e){jQuery("#tab-pane").removeClass("show").addClass("hide")},p.addStripes=function(){jQuery(".bmlt-data-row").removeClass("evenRow"),jQuery(".bmlt-data-row").removeClass("oddRow"),jQuery(".bmlt-data-row:not(.hide)").each(function(e,t){jQuery(t).addClass(e%2?"oddRow":"evenRow")})},p.calcShowingNow=function(){var n=[];return jQuery(".bmlt-data-row:not(.hide)").each(function(e,t){t=t.id.split("-");n.push(t[t.length-1])}),n=[...new Set(n)]},p.filterMeetingsFromView=function(){jQuery(".group-header").removeClass("hide"),jQuery(".meeting-group").removeClass("hide"),jQuery(".bmlt-data-row").removeClass("hide"),jQuery(".filter-dropdown").each(function(e,t){var n=t.value.replace("a-","");""!==n&&("formats"!==(t=t.getAttribute("data-pointer").toLowerCase())&&"languages"!==t&&"venues"!==t&&"common_needs"!==t?jQuery(".bmlt-data-row").not("[data-"+t+"='"+n+"']"):jQuery(".bmlt-data-row").not("[data-"+t+"~='"+n+"']")).addClass("hide")}),this.addStripes();var e=this.calcShowingNow();p.updateMeetingCount(e),p.updateFilters(),croutonMap&&croutonMap.fillMap(e),p.showView(p.currentView,e.length)},p.resetFilter=function(){croutonMap.filterVisible(!1),(p.config.map_page&&p.filtering||p.config.show_map)&&croutonMap.fillMap(),p.filtering=!1,p.updateFilters(),p.updateMeetingCount(),jQuery(".filter-dropdown").val(null).trigger("change"),jQuery(".group-header").removeClass("hide"),jQuery(".meeting-group").removeClass("hide"),jQuery(".bmlt-data-row").removeClass("hide"),jQuery(".evenRow").removeClass("evenRow"),jQuery(".oddRow").removeClass("oddRow")},p.updateFilters=function(){if(p.dropdownData){const a=function(e){return e.id.replace("meeting-data-row-","")};p.dropdownData.forEach(function(i,e){let o=[];jQuery(".filter-dropdown").each(function(e,t){var n;t.id===i.elementId||""!==(n=t.value.replace("a-",""))&&(filteringDropdown=!0,"formats"!==(t=t.getAttribute("data-pointer").toLowerCase())&&"languages"!==t&&"venues"!==t&&"common_needs"!==t?jQuery(".bmlt-data-row").not("[data-"+t+"='"+n+"']").each((e,t)=>o.push(a(t))):jQuery(".bmlt-data-row").not("[data-"+t+"~='"+n+"']").each((e,t)=>o.push(a(t))))}),o=[...new Set(o)];var t=p.meetingData.filter(e=>!o.includes(e.id_bigint));i.optionsShowing=i.uniqueData(t).map(e=>i.optionName(e))})}},p.renderStandaloneMap=function(e,t,n=null,i=!0){hbs_Crouton.localization=p.localization,(window.crouton=p).setUpPartials(),croutonMap.initialize(p.createBmltMapElement(),p.meetingData,t,null,i,n,p.config.noMap)},p.retrieveGeolocation=function(){return new Promise((t,n)=>{window.storedGeolocation?t(window.storedGeolocation):navigator.geolocation?navigator.geolocation.getCurrentPosition(e=>{window.storedGeolocation={latitude:e.coords.latitude,longitude:e.coords.longitude},t(window.storedGeolocation)},e=>{n(new Error("Error getting geolocation: "+e.message))}):n(new Error("Geolocation is not supported by this browser."))})},p.getCurrentLocation=function(t){p.gretrieveGeolocation().then(e=>{t(e)}).catch(e=>{jQuery(".geo").removeClass("hide").addClass("show").html(`<p>${e.message}</p>`)})},p.renderView=function(e,t,n,i){hbs_Crouton.localization=p.localization;var o=hbs_Crouton.templates.main;jQuery(e).html(o(t)),n()},p.updateMeetingCount=function(t=null){var i=this;let e=i.meetingData.length;i.meetingCountCallback&&i.meetingCountCallback(e),i.groupCountCallback&&i.groupCountCallback((i.config.groups?i.config.meetingData:i.convertToGroups(i.config.meetingData)).length),addLive=function(e){return e+", "+e+"-live"},null!==t&&(e=t.length,addLive=function(e){return e+"-live"}),i.showingNowCount=e,jQuery(".crouton_root_service_body").each(function(){var e,t="",n="name";this.dataset.field&&(n=this.dataset.field),0<i.config.service_body.length&&((e=i.getServiceBodyDetails(i.config.service_body[0]))&&(t=e[n]||"")),jQuery(this).text(t)}),jQuery(addLive("#bmlt_tabs_meeting_count")).text(e),jQuery(addLive("#bmlt_tabs_group_count")).each(function(){var e=i.meetingData;null!==t&&(e=i.meetingData.filter(e=>t.includes(e.id_bigint)));e=i.config.groups?e:i.convertToGroups([...e]);jQuery(this).text(arrayUnique(e).length)}),jQuery(addLive("#bmlt_tabs_service_body_names")).each(function(){var e=i.meetingData,e=getUniqueValuesOfKey(e=null!==t?i.meetingData.filter(e=>t.includes(e.id_bigint)):e,"service_body_bigint"),a=this;i.getServiceBodies(e,!1).then(function(e){var t=e.length,n=e.map(e=>e.name);n.sort();var i="";if(1===t)i=n[0];else{for(var i=n[0],o=1;o<t-1;o++)i+=", ",i+=n[o];i+=" and "+n[t-1]}jQuery(a).text(i)})})},p.getServiceBodies=function(e,t=!0){return fetchJsonp(this.config.root_server+"/client_interface/jsonp/?switcher=GetServiceBodies"+(t?"&parents=1":"")+getServiceBodiesQueryString(e)).then(function(e){return e.json()})},p.getMasterFormats=function(){return fetchJsonp(this.config.root_server+"/client_interface/jsonp/?switcher=GetFormats&lang_enum=en&key_strings[]=TC&key_strings[]=VM&key_strings[]=HY").then(function(e){return e.json()})},p.errorHandler=function(e){jQuery(".geo").removeClass("hide").addClass("show").html("")},p.handlebars=function(t,e){var n=!1;handlebarMapOptions=[],crouton_Handlebars.registerHelper("crouton_map",function(e){return n=!0,p.handlebarMapOptions=e.hash,p.handlebarMapOptions.zoom||(p.handlebarMapOptions.zoom=14),p.handlebarMapOptions.lat=parseFloat(t.latitude),p.handlebarMapOptions.lng=parseFloat(t.longitude),"<div id='bmlt-handlebars-map' class='bmlt-map'></div>"});for(var i=new DOMParser;0<e.length;){var o=e.item(0);if(o.firstChild){var a="";if(1===o.firstChild.nodeType){if(!o.firstChild.firstChild||3!==o.firstChild.firstChild.nodeType){console.log("<bmlt-handlebar> tag: cannot find textnode"),o.remove();continue}a=o.firstChild.firstChild.textContent}else 3===o.firstChild.nodeType&&(a=o.firstChild.textContent);try{var r=crouton_Handlebars.compile(a)(t)}catch(e){console.log(e),r=e.message}a=i.parseFromString("<body>"+r+"</body>","text/html");if(a.body&&a.body.firstChild){for(var s,a=a.body.firstChild,l=[],c=a;s=c.nextSibling;)l.push(c=s);o.replaceWith(a),l&&a.after(...l)}else console.log("<bmlt-handlebar> tag: could not parse the Handlebars result"),o.replaceWith("<bmlt-handlebar> tag: could not parse the Handlebars result")}else console.log("<bmlt-handlebar> tag must have at least one child"),o.remove()}n&&croutonMap.loadPopupMap("bmlt-handlebars-map",t,p.handlebarMapOptions)},p.meetingCountCallback=null,p.grouoCountCallback=null,Crouton.prototype.meetingCount=function(e){p.meetingCountCallback=e},Crouton.prototype.groupCount=function(e){p.groupCountCallback=e},Crouton.prototype.filterNext24=function(e=!0){if(!e)return jQuery("#filter-dropdown-next24").val("a-"),void p.filterMeetingsFromView();const t=new Date,i=t.getDay(),o=t.getHours(),a=t.getMinutes(),n=p.meetingData.filter(function(e){var t=e.weekday_tinyint-1;if(t==i){var n=e.start_time.toString().split(":"),e=parseInt(n[0]);if(e>o)return!0;if(e==o&&parseInt(n[1])>a)return!0}else if(t==(i+1)%7)return!0;return!1}).map(e=>e.id_bigint);jQuery(".bmlt-data-row").each(function(e,t){t.dataset.next24=n.includes(t.id.split("-").pop())?"1":"0"}),jQuery("#filter-dropdown-next24").val("a-1"),p.filterMeetingsFromView()},p.toFarsinNumber=function(e){const t=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],n={AM:"صبح",PM:"بعدازظهر"};return e=(e=(e=e.replace(/\d/g,e=>t[e])).replace(/AM|am/g,n.AM)).replace(/PM|pm/g,e=>n.PM)},p.enrichMeetings=function(t){var e=[];let n="?";p.config.meeting_details_href&&0<=p.config.meeting_details_href.indexOf("?")&&(n="&");for(var i=0;i<t.length;i++){t[i].formatted_comments=t[i].comments;var o=t[i].duration_time.split(":");t[i].start_time_raw=this.getAdjustedDateTime(1===parseInt(t[i].weekday_tinyint)?7:parseInt(t[i].weekday_tinyint)-1,t[i].start_time,t[i].time_zone),t[i].start_time_formatted=t[i].start_time_raw.format(p.config.time_format),t[i].end_time_formatted=t[i].start_time_raw.clone().add(o[0],"hours").add(o[1],"minutes").format(p.config.time_format),"fa-IR"===p.config.language&&(t[i].start_time_formatted=p.toFarsinNumber(t[i].start_time_formatted),t[i].end_time_formatted=p.toFarsinNumber(t[i].end_time_formatted)),t[i].day_of_the_week=7===t[i].start_time_raw.isoWeekday()?1:t[i].start_time_raw.isoWeekday()+1,t[i].formatted_day=p.localization.getDayOfTheWeekWord(t[i].day_of_the_week);var a=t[i].formats.split(","),r=[],s=p.formatsData.filter(e=>e.root_server_uri==t[i].root_server_uri);t[i].wheelchair=!1;for(var l=0;l<a.length;l++)for(var c=0;c<s.length;c++)a[l]===s[c].key_string&&("WCHR"==s[c].world_id&&(t[i].wheelchair=!0),r.push({id:s[c].id,key:a[l],name:s[c].name_string,description:s[c].description_string,type:s[c].format_type_enum}));t[i].venue_type=parseInt(t[i].venue_type),t[i].venue_type_name=getVenueTypeName(t[i]),t[i].formats_expanded=r;var u,d,h=[t[i].location_street,t[i].location_municipality.trim(),t[i].location_province.trim(),t[i].location_postal_code_1.trim()];for(u in h.clean(),t[i].formatted_address=h.join(", "),t[i].formatted_location_info=null!=t[i].location_info?t[i].location_info.replace("/(http|https)://([A-Za-z0-9._-/?=&;%,]+)/i",'<a style="text-decoration: underline;" href="$1://$2" target="_blank">$1://$2</a>'):"",t[i].map_word=p.localization.getWord("map"),t[i].share_word=p.localization.getWord("share"),t[i].report_update_word=p.localization.getWord("report update"),t[i].show_qrcode=p.config.show_qrcode,t[i])t[i].hasOwnProperty(u)&&"string"==typeof t[i][u]&&-1!==t[i][u].indexOf("#@-@#")&&(d=t[i][u].split("#@-@#"),t[i][u]=d[d.length-1]);o=p.getServiceBodyDetails(t[i].service_body_bigint);t[i].serviceBodyUrl=o.url,t[i].serviceBodyPhone=o.helpline,t[i].serviceBodyName=o.name,t[i].serviceBodyDescription=o.description,t[i].serviceBodyContactEmail=o.contact_email,t[i].serviceBodyType=p.localization.getServiceBodyType(o.type);h=p.getServiceBodyDetails(o.parent_id);void 0!==h&&(t[i].parentServiceBodyId=o.parent_id,t[i].parentServiceBodyUrl=h.url,t[i].parentServiceBodyPhone=h.helpline,t[i].parentServiceBodyName=h.name,t[i].parentServiceBodyDescription=h.description,t[i].parentServiceBodyType=p.localization.getServiceBodyType(h.type)),t[i].meeting_details_url="",p.config.meeting_details_href&&(t[i].meeting_details_url=p.config.meeting_details_href,2===t[i].venue_type&&p.config.virtual_meeting_details_href&&(t[i].meeting_details_url=p.config.virtual_meeting_details_href),t[i].meeting_details_url+=n+("meeting-id="+t[i].id_bigint+"&language="+p.config.language+"&time_format="+encodeURIComponent(p.config.time_format)+(p.config.force_rootserver_in_querystring?"&root_server="+encodeURIComponent(p.config.root_server):""))),this.calculateDistance(t[i]),e.push(t[i])}return p.config.groups?p.convertToGroups(e):e},p.convertToGroups=function(e){if(!e||!e.length)return[];if(e[0].hasOwnProperty("membersOfGroup"))return e;e[0].hasOwnProperty("group_id")||e.forEach(e=>e.group_id=e.service_body_bigint+"|"+e.meeting_name+(2!=e.venue_type?"|"+parseFloat(e.latitude).toFixed(6)+"|"+parseFloat(e.longitude).toFixed(6):e.virtual_meeting_link+"|"+e.virtual_meeting_additional_info));const t=e.sort((e,t)=>e.group_id<t.group_id?-1:e.group_id>t.group_id?1:0),n=[];let i=null;return t.forEach(function(e){e.group_id?i&&e.group_id==i.group_id?i.membersOfGroup.push(e):(n.push(e),i=e,i.membersOfGroup=[Object.assign({},i)]):(n.push(e),e.membersOfGroup=[e])}),n.forEach(function(e){if(1<e.membersOfGroup.length){let n=e.formats.split(",");e.membersOfGroup.forEach(function(e){const t=e.formats.split(",");n=n.filter(e=>t.includes(e))}),e.formats=n.join(","),e.formats_expanded&&(e.formats_expanded=e.formats_expanded.filter(e=>n.includes(e.key))),e.membersOfGroup.forEach(function(e){e.formats=e.formats.split(",").filter(e=>!n.includes(e)).join(","),e.formats_expanded&&(e.formats_expanded=e.formats_expanded.filter(e=>!n.includes(e.key)))})}}),n},Crouton.prototype.updateDistances=function(){const o=this;var e,a=0;jQuery(".meeting-distance").each(function(e){const t=jQuery(this),n=jQuery(this).data("id");var i;n&&(a++,i=o.meetingData.find(e=>e.id_bigint==n),o.calculateDistance(i),""==i.distance?t.hasClass("hide")||t.addClass("hide"):(t.removeClass("hide"),jQuery(this).html(o.localization.getWord("Distance")+": "+i.distance),jQuery(this).closest("tr").data("distance",i.distance_in_km)))});const t=jQuery("#byfield_distance_in_km tbody");0!=t.length&&(0===a&&t.children().each(function(e){if(this.id){const n=this.id.replace("meeting-data-row-","");var t=o.meetingData.find(e=>e.id_bigint==n);t&&(o.calculateDistance(t),""!=t.distance&&(jQuery(this).data("distance",t.distance_in_km),a++))}}),e=t.children().sort(function(e,t){e=parseFloat(jQuery(e).data("distance")),t=parseFloat(jQuery(t).data("distance"));return e<t?-1:t<e?1:0}),t.html(e),jQuery("#byfield_distance_in_km tbody .bmlt-data-row").css({cursor:"pointer"}),jQuery("#byfield_distance_in_km tbody .bmlt-data-row").click(function(e){"A"!==e.target.tagName&&croutonMap.rowClick(parseInt(this.id.replace("meeting-data-row-","")))}),0<a&&(jQuery("#groupingButton_distance_in_km").removeClass("hide"),o.distanceTabAllowed=!0))},p.registerPartial=function(e,t){crouton_Handlebars.registerPartial(e,crouton_Handlebars.compile(t))},p.setUpPartials=function(){crouton_Handlebars.registerPartial("tableDataRow",p.config.groups?p.config.details_table?"<td>{{> groupStackedRow}}</td>":hbs_Crouton.templates.group3ColumnRow:p.config.details_table?"<td>{{> meetingStackedRow}}</td>":hbs_Crouton.templates.meeting3ColumnRow),p.registerPartial("meetingDataTemplate",p.config.meeting_data_template),p.registerPartial("meetingDataTemplate",p.config.meeting_data_template),p.registerPartial("metaDataTemplate",p.config.metadata_template),p.registerPartial("observerTemplate",p.config.observer_template),p.registerPartial("meetingpageTitleTemplate",p.config.meetingpage_title_template),p.registerPartial("meetingDetailsContentsTemplate",p.config.meetingdetails_contents_template),p.registerPartial("meetingCountTemplate",p.config.meeting_count_template),p.registerPartial("meetingTimesTemplate",p.config.meeting_times_template),p.registerPartial("groupData",p.config.group_data_template),p.registerPartial("groupDetailsContents",p.config.group_details_template),p.registerPartial("memberDetails",p.config.member_details_template),p.registerPartial("groupTitle",p.config.group_title_template);const e=new CroutonHandlebarsExtensions;e.registerHelpers(),e.registerPartials(p.config.groups)},p.calculateDistance=function(e){var t,n;e.distance="",2!=e.venue_type&&(t={lat:e.latitude,lng:e.longitude},(t=croutonMap.getDistanceFromSearch(t))&&(e.distance_in_km=t.km,e.distance_in_miles=t.miles,"km"===p.config.distance_units?e.distance_in_km&&(n=e.distance_in_km,e.distance=n<1?Math.round(1e3*n)+"m":(Math.round(10*n)/10).toFixed(1)+"km"):e.distance_in_miles&&(n=e.distance_in_miles,e.distance=(Math.round(100*n)/100).toFixed(2)+" miles")))},p.showMessage=function(e){jQuery("#"+p.config.placeholder_id).html("crouton: "+e),jQuery("#"+p.config.placeholder_id).removeClass("hide")},p.getUsedVenueType=function(e){let t=getUniqueValuesOfKey(e,"venue_type");return t.includes(3)||2===t.length?Object.values(p.localization.getWord("venue_type_choices")):1===t[0]?[p.localization.getWord("venue_type_choices").IN_PERSON]:[p.localization.getWord("venue_type_choices").VIRTUAL]},p.getUsedVisibility=function(e){return[{name:"Visible",value:1}]},p.getUsedNext24=function(e){return[{name:"Next24",value:1}]},p.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},p.createBmltMapElement=function(){return document.getElementById("bmlt-map")||jQuery("#bmlt-tabs").before("<div id='bmlt-map' class='bootstrap-bmlt bmlt-map "+p.localization.getWord("css-direction")+" bmlt_map_container_div'></div>"),"bmlt-map"},void 0===window.croutonMap?(window.croutonMap=new MeetingMap(p.config),p.config.map_search?p.searchMap():p.meetingSearch()):window.croutonMap.hasMapSearch()||p.meetingSearch()}function getMasterFormatId(e,t){for(var n=0;n<crouton.masterFormatCodes.length;n++){var i=crouton.masterFormatCodes[n];if(i.key_string===e&&i.root_server_uri===t.root_server_uri)return i.id}}crouton_Handlebars.registerHelper("startup",()=>""),crouton_Handlebars.registerHelper("enrich",()=>""),crouton_Handlebars.registerHelper("log",e=>console.log(e)),crouton_Handlebars.registerHelper("selectFormatPopup",()=>"formatPopup"),crouton_Handlebars.registerHelper("selectObserver",()=>"observerTemplate"),Crouton.prototype.setConfig=function(e){var t,n=this,i={button_filters:"grouping_buttons",button_format_filters:"formattype_grouping_buttons"};for(t in i)e.hasOwnProperty(t)&&(e[i[t]]=e[t],delete e[i[t]]);for(t in e)0<t.indexOf("_template")&&""===e[t].trim()||(-1===t.indexOf("int_")?"1"===e[t]||1===e[t]?n.config[t]=!0:"0"===e[t]||0===e[t]?n.config[t]=!1:n.config[t]=e[t]:n.config[t]=parseInt(e[t]||0));"embed"===n.config.show_map&&(n.config.show_map=!1,n.config.map_page=!0),n.config.day_sequence=[],n.config.day_sequence.push(n.config.int_start_day_id);for(var o=1;o<7;o++){var a=n.config.day_sequence[o-1]+1;7<a?n.config.day_sequence.push(a-7):n.config.day_sequence.push(a)}if(n.config.groups&&(n.config.view_by="city",n.config.include_weekday_button=!1,n.config.has_tabs=!1),n.config.view_by.endsWith("day")&&(n.config.include_weekday_button=!0),n.currentView=n.config.view_by,n.config.short_language="da-DK"===n.config.language?"dk":n.config.language.substring(0,2),n.localization=new CroutonLocalization(n.config.language),e.custom_translations&&""!==e.custom_translations.trim())try{n.localization.customizeTranslations(JSON.parse(e.custom_translations))}catch(e){console.log("Error parsing custom translations: "+e.message)}},Crouton.prototype.reset=function(){jQuery("#custom-css").remove(),jQuery("#"+this.config.placeholder_id).html("")},Crouton.prototype.doFilters=function(){return this.filterMeetingsFromView()},Crouton.prototype.getServiceBodyDetails=function(e){for(var t=0;t<this.all_service_bodies.length;t++){var n=this.all_service_bodies[t];if(n.id===e)return n}},Crouton.prototype.doHandlebars=function(){var i,o=document.getElementsByTagName("bmlt-handlebar");0!==o.length?(i=this).lock(function(){if(i.isEmpty(i.meetingData))for(let e=0;e<o.length;e++)o.item(e).innerHTML="Meeting not found!";else{var e=[i.getServiceBodies([i.meetingData[0].service_body_bigint])];Promise.all(e).then(function(e){hbs_Crouton.localization=i.localization,i.all_service_bodies=[];for(var t=e[0],n=0;n<t.length;n++)i.all_service_bodies.push(t[n]);e=i.enrichMeetings(i.meetingData);i.setUpPartials(),crouton_Handlebars.compile("{{startup}}")(e),crouton_Handlebars.compile("{{enrich this}}")(e[0]),i.handlebars(e[0],o),jQuery(".get-directions-modal").on("click",openDirectionsModal)})}}):console.log("No <bmlt-handlebar> tags found")},Crouton.prototype.meetingModal=function(t){this.openMeetingModal(this.meetingData.find(e=>e.id_bigint==t))},Crouton.prototype.openMeetingModal=function(e){let n=this;crouton_Handlebars.registerHelper("crouton_map",function(){return"<div id='bmlt-handlebars-map' class='bmlt-map'></div>"});let t=hbs_Crouton.templates.meetingModal;const i=document.getElementById("bmlt-tabs");let o=document.createElement("div");i.appendChild(o),o.innerHTML=t(e),[...i.getElementsByClassName("modal-close")].forEach(e=>e.addEventListener("click",e=>{croutonMap.closeModalWindow(e.target),document.getElementById("meeting_modal").remove()}));let a=document.getElementById("meeting_modal");document.body.appendChild(a),jQuery("#meeting_modal .get-directions-modal").on("click",openDirectionsModal),croutonMap.openModalWindow(a,!0),croutonMap.loadPopupMap("bmlt-handlebars-map",e,{lat:parseFloat(e.latitude),lng:parseFloat(e.longitude),zoom:14});let r=jQuery(".bmlt-data-row:visible"),s=-1;const l="meeting-data-row-";for(k=0;k<r.length;k++)if(r[k].id===l+e.id_bigint){s=k;break}function c(e){switch(e){case"left":s+=1;break;case"right":s-=1;break;default:s=-1}if(0<=s&&s<r.length){const t=r[s];meetingId=t.id.substring(l.length),a.getElementsByClassName("modal-close").item(0).dispatchEvent(new MouseEvent("click")),n.meetingModal(meetingId)}}swipedetect(a,c),s<=0?jQuery(".modal-left").addClass("hide"):a.getElementsByClassName("modal-left").item(0).addEventListener("click",e=>c("right")),s>=r.length-1?jQuery(".modal-right").addClass("hide"):a.getElementsByClassName("modal-right").item(0).addEventListener("click",e=>c("left"))},Crouton.prototype.searchMap=function(){var e=this;e.distanceTabAllowed=!0,e.config.map_search&&"object"==typeof e.config.map_search?(e.config.map_search.width||(e.config.map_search.width=-50),e.config.map_search.location||e.config.map_search.coordinates_search||(e.config.map_search.auto=!0),e.config.map_search.zoom||(e.config.map_search.zoom=14)):e.config.map_search={width:-50,auto:!0,zoom:14},e.config.map_page=!1,e.config.show_map=!1;var t=jQuery("body");""!==e.config.theme&&t.append("<div id='custom-css'><link rel='stylesheet' type='text/css' href='"+e.config.template_path+"/themes/"+e.config.theme+".css'>"),t.append("<div id='custom-css'><style type='text/css'>"+e.config.custom_css+"</style></div>"),e.meetingData=null,e.renderStandaloneMap("#"+e.config.placeholder_id,{config:e.config,meetings:{weekdays:[],groupingButtons:[],formattypeGroupingButtons:[],bydays:[],meetingCount:0,meetingData:[]},dropdownData:[],location:{latitude:0,longitude:0,zoom:10}})},Crouton.prototype.render=function(k=!1,x=!0){var S=this;S.lock(function(){var e=jQuery("body");if(""!==S.config.theme&&e.append("<div id='custom-css'><link rel='stylesheet' type='text/css' href='"+S.config.template_path+"/themes/"+S.config.theme+".css'>"),e.append("<div id='custom-css'><style type='text/css'>"+S.config.custom_css+"</style></div>"),S.isEmpty(S.meetingData))return S.showMessage("No meetings found for parameters specified."),void(S.config.refresh_map&&croutonMap.refreshMeetings(S.meetingData,x,!0));S.unique_service_bodies_ids=getUniqueValuesOfKey(S.meetingData,"service_body_bigint").sort();e=[S.getMasterFormats(),S.getServiceBodies(S.unique_service_bodies_ids)];Promise.all(e).then(function(e){S.all_service_bodies=[],S.masterFormatCodes=e[0];for(var t=e[1],n=0;n<t.length;n++)S.all_service_bodies.push(t[n]);jQuery.isEmptyObject(S.formatsData)||(S.formatsData=S.formatsData.sortByKey("name_string"));var i=S.enrichMeetings(S.meetingData);S.config.groups&&(S.meetingData=i),S.setUpPartials(),i.sort(function(e,t){return e.start_time_raw<t.start_time_raw?-1:e.start_time_raw>t.start_time_raw?1:0});for(var o=0,a=[],r={},s={},l=[];o<7;){var c=S.config.day_sequence[o],u=i.filterByObjectKeyValue("day_of_the_week",c);l.push({day:c,meetings:u}),a.push({day:S.localization.getDayOfTheWeekWord(c),meetings:u});for(var d=0;d<S.config.grouping_buttons.length;d++){var h=S.config.grouping_buttons[d].field;if(!h.startsWith("distance"))for(var p=getUniqueValuesOfKey(u,h).sort(),n=0;n<p.length;n++){var m=u.filterByObjectKeyValue(h,p[n]);r.hasOwnProperty(h)&&r[h].hasOwnProperty(p[n])?r[h][p[n]]=r[h][p[n]].concat(m):(r.hasOwnProperty(h)||(r[h]={}),r[h][p[n]]=m)}}for(d=0;d<S.config.formattype_grouping_buttons.length;d++){const h=S.config.formattype_grouping_buttons[d].field;var f=S.config.formattype_grouping_buttons[d].hasOwnProperty("accordionState")?S.config.grouping_buttons[_].accordionState:"",p=getUniqueFormatsOfType(u,h);"LANG"==h&&S.config.native_lang&&0<S.config.native_lang.length&&(p=p.filter(e=>e.key!=S.config.native_lang));for(n=0;n<p.length;n++){m=u.filter(e=>0<=e.formats_expanded.map(e=>e.key).indexOf(p[n].key));s.hasOwnProperty(h)&&s[h].hasOwnProperty(p[n].description)?s[h][p[n].description].group=s[h][p[n].description].group.concat(m):(s.hasOwnProperty(h)||(s[h]={}),s[h][p[n].description]={},s[h][p[n].description].accordionState=f,s[h][p[n].description].group=m)}}o++}for(var g={},_=0;_<S.config.grouping_buttons.length;_++){const h=S.config.grouping_buttons[_].field;var y=S.config.grouping_buttons[_].hasOwnProperty("accordionState")?S.config.grouping_buttons[_].accordionState:"";if(g[h]={},h.startsWith("distance"))g[h][S.localization.getWord("Sorted by Distance")]={},S.config.map_search?g[h][S.localization.getWord("Sorted by Distance")].group=[...S.meetingData].sort((e,t)=>e.distance_in_km-t.distance_in_km):g[h][S.localization.getWord("Sorted by Distance")].group=[...S.meetingData].filter(e=>2!=e.venue_type),g[h][S.localization.getWord("Sorted by Distance")].accordionState="non-collapsable";else{var v,b=[];for(v in r[h])b.push(v);b.sort();for(var w=0;w<b.length;w++)g[h][b[w]]={},g[h][b[w]].group=r[h][b[w]],g[h][b[w]].accordionState=y}}S.dayNamesSequenced=S.config.day_sequence.map(e=>S.localization.getDayOfTheWeekWord(e)),S.dropdownData=[],S.config.has_days&&S.dropdownData.push({placeholder:S.localization.getWord("weekday"),pointer:"weekdays",elementId:"filter-dropdown-weekdays",uniqueData:e=>sortListByList(getUniqueValuesOfKey(e,"formatted_day"),S.dayNamesSequenced),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_states&&S.dropdownData.push({placeholder:S.localization.getWord("states"),pointer:"States",elementId:"filter-dropdown-states",uniqueData:e=>getUniqueValuesOfKey(e,"location_province").sort(),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_sub_province&&S.dropdownData.push({placeholder:S.localization.getWord("counties"),pointer:"Counties",elementId:"filter-dropdown-sub_province",uniqueData:e=>getUniqueValuesOfKey(e,"location_sub_province").sort(),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_cities&&S.dropdownData.push({placeholder:S.localization.getWord("cities"),pointer:"Cities",elementId:"filter-dropdown-cities",uniqueData:e=>getUniqueValuesOfKey(e,"location_municipality").sort(),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_neighborhoods&&S.dropdownData.push({placeholder:S.localization.getWord("neighborhood"),pointer:"Neighborhoods",elementId:"filter-dropdown-neighborhoods",uniqueData:e=>getUniqueValuesOfKey(e,"location_neighborhood").sort(),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_zip_codes&&S.dropdownData.push({placeholder:S.localization.getWord("postal_codes"),pointer:"Zips",elementId:"filter-dropdown-zipcodes",uniqueData:e=>getUniqueValuesOfKey(e,"location_postal_code_1").sort(),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_locations&&S.dropdownData.push({placeholder:S.localization.getWord("locations"),pointer:"Locations",elementId:"filter-dropdown-locations",uniqueData:e=>getUniqueValuesOfKey(e,"location_text").map(e=>e.replace(/(<([^>]+)>)/gi,"")).sort(),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_regions&&S.dropdownData.push({placeholder:S.localization.getWord("regions"),pointer:"Regions",elementId:"filter-dropdown-regions",uniqueData:t=>S.all_service_bodies.filter(e=>getUniqueValuesOfKey(t,"parentServiceBodyId").includes(e.id)).sortByKey("name"),objectPointer:e=>convertToPunyCode(e.name),optionName:e=>e.name}),S.config.has_areas&&S.dropdownData.push({placeholder:S.localization.getWord("areas"),pointer:"Areas",elementId:"filter-dropdown-areas",uniqueData:t=>S.all_service_bodies.filter(e=>getUniqueValuesOfKey(t,"service_body_bigint").includes(e.id)).sortByKey("name"),objectPointer:e=>e.id,optionName:e=>e.name}),S.config.has_groups&&S.dropdownData.push({placeholder:S.localization.getWord("groups"),pointer:"Groups",elementId:"filter-dropdown-groups",uniqueData:e=>getUniqueValuesOfKey(e,"meeting_name").sort(),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_venues&&S.dropdownData.push({placeholder:S.localization.getWord("venue_types"),pointer:"Venues",elementId:"filter-dropdown-venues",uniqueData:e=>S.getUsedVenueType(e),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_formats&&S.dropdownData.push({placeholder:S.localization.getWord("formats"),pointer:"Formats",elementId:"filter-dropdown-formats",uniqueData:e=>getUniqueFormats(e),objectPointer:e=>convertToPunyCode(e.name),optionName:e=>e.name}),S.config.has_languages&&S.dropdownData.push({placeholder:S.localization.getWord("languages"),pointer:"Formats",elementId:"filter-dropdown-languages",uniqueData:e=>getUniqueFormatsOfType(e,"LANG").filter(e=>e.key!==S.config.native_lang),objectPointer:e=>convertToPunyCode(e.name),optionName:e=>e.name}),S.config.has_common_needs&&S.dropdownData.push({placeholder:S.localization.getWord("common_needs"),pointer:"Formats",elementId:"filter-dropdown-commonneeds",uniqueData:e=>getUniqueFormatsOfType(e,"FC3"),objectPointer:e=>convertToPunyCode(e.name),optionName:e=>e.name}),(k||S.config.show_map||S.config.map_page)&&S.dropdownData.push({placeholder:"",pointer:"visible",elementId:"filter-dropdown-visibile",uniqueData:e=>S.getUsedVisibility(e),objectPointer:e=>e.value,optionName:e=>e.name}),k&&S.dropdownData.push({placeholder:"",pointer:"next24",elementId:"filter-dropdown-next24",uniqueData:e=>S.getUsedNext24(e),objectPointer:e=>e.value,optionName:e=>e.name});let A=k?S.renderStandaloneMap:S.renderView;A("#"+S.config.placeholder_id,{config:S.config,meetings:{allMeetings:S.meetingData,weekdays:l,groupingButtons:g,formattypeGroupingButtons:s,bydays:a,meetingCount:S.meetingData.length,meetingData:S.meetingData},dropdownData:S.dropdownData},function(){var e;S.config.map_search||jQuery("#groupingButton_distance_in_km").addClass("hide"),S.addStripes(),S.calcShowingNow(),S.updateMeetingCount(),jQuery("#please-wait").remove(),null==S.config.map_search&&!S.config.show_map||(jQuery(".bmlt-data-row").css({cursor:"pointer"}),jQuery(".bmlt-data-row").click(function(e){"A"!==e.target.tagName&&croutonMap.rowClick(parseInt(this.id.replace("meeting-data-row-","")))})),jQuery("#"+S.config.placeholder_id).addClass("bootstrap-bmlt"),jQuery("#filter-dropdown-visibile").removeClass("crouton-select").addClass("hide"),jQuery("#filter-dropdown-next24").removeClass("crouton-select").addClass("hide"),jQuery(".crouton-select").select2({dropdownAutoWidth:!0,allowClear:!1,width:"resolve",minimumResultsForSearch:1,dropdownCssClass:"bmlt-drop",matcher:function(e,t){return"a-"===t.id?t:(elementId=t.element.parentElement.id,e.hasOwnProperty("term")&&t.text.toUpperCase().indexOf(e.term.toUpperCase())<0?null:(dropdown=S.dropdownData.find(e=>e.elementId===elementId),"undefined"==typeof dropdown||void 0===dropdown.optionsShowing||dropdown.optionsShowing.includes(t.text)?t:null))}}),jQuery('[data-toggle="popover"]').popover().click(function(e){e.preventDefault(),e.stopPropagation()}),jQuery("html").on("click",function(e){"popover"!==jQuery(e.target).data("toggle")&&jQuery('[data-toggle="popover"]').popover("hide")}),jQuery(".filter-dropdown").on("select2:select",function(e){S.filterMeetingsFromView()}),jQuery("#day").on("click",function(){S.showView("day")}),jQuery(".groupingButtonLogic").on("click",function(e){S.showView(e.target.attributes["data-field"].value.toLowerCase())}),jQuery("#groupingButton_embeddedMapPage").on("click",function(e){S.showView("map")}),jQuery(".meeting-group:not(.non-collapsable) .group-header").on("click",function(e){jQuery(e.target.parentElement).toggleClass("closed")}),jQuery(".get-directions-modal").on("click",openDirectionsModal),jQuery(".directions-map-modal-close").on("click",function(e){closeDirectionsMapModal()}),S.config.has_tabs&&(jQuery(".nav-tabs a").on("click",function(e){e.preventDefault(),jQuery(this).tab("show")}),e=(new Date).getDay(),e++,jQuery('.nav-tabs a[href="#tab'+e+'"]').tab("show"),jQuery("#tab"+e).show()),jQuery(".bmlt-header").removeClass("hide").addClass("show"),jQuery(".bmlt-tabs").removeClass("hide").addClass("show"),""!==S.config.default_filter_dropdown&&(e=S.config.default_filter_dropdown.toLowerCase().split("="),jQuery("#filter-dropdown-"+e[0]).val("a-"+e[1]).trigger("change").trigger("select2:select")),!S.config.show_map||S.config.refresh_map||k||(croutonMap.initialize(S.createBmltMapElement(),S.meetingData),jQuery("#bmlt-map").removeClass("hide")),S.config.map_page&&!k&&(0==S.meetingData.filter(e=>2!=e.venue_type).length?jQuery("#groupingButton_embeddedMapPage").addClass("hide"):croutonMap.initialize("byfield_embeddedMapPage",S.meetingData)),S.config.refresh_map&&croutonMap.refreshMeetings(S.meetingData,x,!0),"map"!=S.config.view_by||S.config.map_page||(S.config.view_by="day"),S.showView(S.config.view_by,S.meetingData.length),null!=S.config.on_complete&&isFunction(S.config.on_complete)&&S.config.on_complete()},!k)})}),Crouton.prototype.forceShowMap=function(){this.config.map_page&&jQuery("#byfield_embeddedMapPage").hasClass("hide")&&this.mapView()}};var masterFormatVenueType={IN_PERSON:"IN_PERSON",VIRTUAL:"VIRTUAL"},venueType={IN_PERSON:1,VIRTUAL:2,HYBRID:3};function getVenueTypeName(e){return e.venue_type===venueType.HYBRID||inArray(getMasterFormatId("HY",e),getFormats(e))?[crouton.localization.getVenueType(masterFormatVenueType.VIRTUAL),crouton.localization.getVenueType(masterFormatVenueType.IN_PERSON)]:e.venue_type===venueType.VIRTUAL||inArray(getMasterFormatId("VM",e),getFormats(e))?[crouton.localization.getVenueType(masterFormatVenueType.VIRTUAL)]:[crouton.localization.getVenueType(masterFormatVenueType.IN_PERSON)]}function getFormats(e){return""!==e.formats?e.format_shared_id_list.split(","):[]}function convertToPunyCode(e){return void 0!==e?punycode.toASCII(e.toLowerCase()).replace(/\W|_/g,"-"):""}function getUniqueValuesOfKey(e,n){return e.reduce(function(e,t){return t[n]&&!~e.indexOf(t[n])&&e.push(t[n]),e},[])}function getValuesFromObject(e){var t=[];for(key in e)e.hasOwnProperty(key)&&t.push(e[key]);return t}function getUniqueFormats(e){return e.reduce(function(t,e){return e.formats_expanded?t.concat(e.formats_expanded.filter(e=>t.map(e=>e.key).indexOf(e.key)<0)):t},[]).sortByKey("name")}function getUniqueFormatsOfType(e,n){return e.reduce(function(t,e){if(!e.formats_expanded)return t;e=e.formats_expanded.filter(e=>e.type===n);return t=e?t.concat(e.filter(e=>t.map(e=>e.key).indexOf(e.key)<0)):t},[]).sortByKey("name")}function arrayUnique(e,t,n){for(t=e.length;n=--t;)for(;n--;)e[t]!==e[n]||e.splice(n,1);return e}function sortListByList(e,t){for(var n=[],i=0;i<t.length;i++)for(var o=0;o<e.length;o++)t[i]===e[o]&&n.push(e[o]);return n}function inArray(e,t){return-1!==t.indexOf(e)}function isFunction(e){return e&&"[object Function]"==={}.toString.call(e)}function getServiceBodiesQueryString(e){for(var t="",n=0;n<e.length;n++)t+="&services[]="+e[n];return t}function swipedetect(e,t){var n,i,o,a,e=e,r=t||function(e){};e.addEventListener("touchstart",function(e){e=e.changedTouches[0];n=e.pageX,i=e.pageY},!1),e.addEventListener("touchend",function(e){var t;e.cancelable&&(t=e.changedTouches[0],o=t.pageX-n,a=t.pageY-i,150<=Math.abs(o)&&Math.abs(a)<=100&&(r(o<0?"left":"right"),e.preventDefault()))},!1)}function isIOSDevice(){if(navigator.userAgentData&&navigator.userAgentData.platform&&"iOS"===navigator.userAgentData.platform)return!0;var e=navigator.userAgent||navigator.vendor||window.opera,t=/iPad|iPhone|iPod/.test(e)&&!window.MSStream,e="MacIntel"===navigator.platform&&1<navigator.maxTouchPoints&&!window.MSStream;return t||e}function isAndroidDevice(){return/Android/i.test(navigator.userAgent)}function isMobileDevice(){return isIOSDevice()||isAndroidDevice()||/Mobi|Android/i.test(navigator.userAgent)}function createDirectionsOptions(){const e=[];return isIOSDevice()&&e.push({name:crouton.localization.getWord("apple_maps"),description:crouton.localization.getWord("apple_maps_desc"),icon:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23007AFF'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E",url:"https://maps.apple.com/?daddr=${latitude},${longitude}"}),e.push({name:crouton.localization.getWord("google_maps"),description:crouton.localization.getWord("google_maps_desc_mobile"),icon:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234285f4'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E",url:"https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}"}),e.push({name:crouton.localization.getWord("waze"),description:crouton.localization.getWord("waze_desc"),icon:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300D4FF'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E",url:"https://waze.com/ul?ll=${latitude},${longitude}&navigate=yes"}),e}function openDirectionsModal(e){const n=jQuery(this).data("latitude"),i=jQuery(this).data("longitude");var t=localStorage.getItem("croutonDirectionsURL");if(t&&null!=t)openDirections(t,n,i,!1);else{document.getElementById("directionsMapModal")||(o=crouton.localization.getWord("select_map_app"),e.target.insertAdjacentHTML("afterend",`<div id="directionsMapModal" class="directions-map-modal remove-after-use">
|
|
151
|
+
</div>`};!function(e){var t="object"==typeof exports&&exports&&!exports.nodeType&&exports,n="object"==typeof module&&module&&!module.nodeType&&module,i="object"==typeof global&&global;i.global!==i&&i.window!==i&&i.self!==i||(e=i);var o,a,g=2147483647,_=36,y=26,r=38,s=700,l=/^xn--/,c=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=_-1,v=Math.floor,b=String.fromCharCode;function w(e){throw new RangeError(d[e])}function p(e,t){for(var n=e.length,i=[];n--;)i[n]=t(e[n]);return i}function m(e,t){var n=e.split("@"),i="";return 1<n.length&&(i=n[0]+"@",e=n[1]),i+p((e=e.replace(u,".")).split("."),t).join(".")}function A(e){for(var t,n,i=[],o=0,a=e.length;o<a;)55296<=(t=e.charCodeAt(o++))&&t<=56319&&o<a?56320==(64512&(n=e.charCodeAt(o++)))?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),o--):i.push(t);return i}function f(e){return p(e,function(e){var t="";return 65535<e&&(t+=b((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=b(e)}).join("")}function k(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,n){var i=0;for(e=n?v(e/s):e>>1,e+=v(e/t);h*y>>1<e;i+=_)e=v(e/h);return v(i+(h+1)*e/(e+r))}function S(e){var t,n,i,o,a,r,s,l=[],c=e.length,u=0,d=128,h=72,p=e.lastIndexOf("-");for(p<0&&(p=0),n=0;n<p;++n)128<=e.charCodeAt(n)&&w("not-basic"),l.push(e.charCodeAt(n));for(i=0<p?p+1:0;i<c;){for(o=u,a=1,r=_;c<=i&&w("invalid-input"),s=e.charCodeAt(i++),(_<=(s=s-48<10?s-22:s-65<26?s-65:s-97<26?s-97:_)||s>v((g-u)/a))&&w("overflow"),u+=s*a,!(s<(s=r<=h?1:h+y<=r?y:r-h));r+=_)a>v(g/(s=_-s))&&w("overflow"),a*=s;h=x(u-o,t=l.length+1,0==o),v(u/t)>g-d&&w("overflow"),d+=v(u/t),u%=t,l.splice(u++,0,d)}return f(l)}function P(e){for(var t,n,i,o,a,r,s,l,c,u,d=[],h=(e=A(e)).length,p=128,m=72,f=t=0;f<h;++f)(s=e[f])<128&&d.push(b(s));for(n=i=d.length,i&&d.push("-");n<h;){for(o=g,f=0;f<h;++f)p<=(s=e[f])&&s<o&&(o=s);for(o-p>v((g-t)/(l=n+1))&&w("overflow"),t+=(o-p)*l,p=o,f=0;f<h;++f)if((s=e[f])<p&&++t>g&&w("overflow"),s==p){for(a=t,r=_;!(a<(c=r<=m?1:m+y<=r?y:r-m));r+=_)d.push(b(k(c+(u=a-c)%(c=_-c),0))),a=v(u/c);d.push(b(k(a,0))),m=x(t,l,n==i),t=0,++n}++t,++p}return d.join("")}if(o={version:"1.4.1",ucs2:{decode:A,encode:f},decode:S,encode:P,toASCII:function(e){return m(e,function(e){return c.test(e)?"xn--"+P(e):e})},toUnicode:function(e){return m(e,function(e){return l.test(e)?S(e.slice(4).toLowerCase()):e})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return o});else if(t&&n)if(module.exports==t)n.exports=o;else for(a in o)o.hasOwnProperty(a)&&(t[a]=o[a]);else e.punycode=o}(this);var defaultOptions={timeout:3e5,jsonpCallback:"callback",jsonpCallbackFunction:null};function generateCallbackFunction(){return"jsonp_"+Date.now().toString()+"_"+Math.ceil(1e5*Math.random()).toString()}function clearFunction(t){try{delete window[t]}catch(e){window[t]=void 0}}function removeScript(e){e=document.getElementById(e);e&&document.getElementsByTagName("head")[0].removeChild(e)}function fetchJsonp(a,r){var s,l=a,c=(r=r||{}).timeout||defaultOptions.timeout,u=r.jsonpCallback||defaultOptions.jsonpCallback;return new Promise(function(t,e){var n=r.jsonpCallbackFunction||generateCallbackFunction(),i=u+"_"+n;window[n]=function(e){t({ok:!0,json:function(){return Promise.resolve(e)}}),s&&clearTimeout(s),removeScript(i),clearFunction(n)},l+=-1===l.indexOf("?")?"?":"&";var o=document.createElement("script");o.setAttribute("src",l+u+"="+n),r.charset&&o.setAttribute("charset",r.charset),r.nonce&&o.setAttribute("nonce",r.nonce),r.referrerPolicy&&o.setAttribute("referrerPolicy",r.referrerPolicy),o.id=i,document.getElementsByTagName("head")[0].appendChild(o),s=setTimeout(function(){e(new Error("JSONP request to "+a+" timed out")),clearFunction(n),removeScript(i),window[n]=function(){clearFunction(n)}},c),o.onerror=function(){e(new Error("JSONP request to "+a+" failed")),clearFunction(n),removeScript(i),s&&clearTimeout(s)}})}!function(e){("object"!=typeof exports||"undefined"==typeof module)&&"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";function e(t){var n=this.constructor;return this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){return n.reject(e)})})}function t(n){return new this(function(o,e){if(!n||void 0===n.length)return e(new TypeError(typeof n+" "+n+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var a=Array.prototype.slice.call(n);if(0===a.length)return o([]);var r=a.length;for(var t=0;t<a.length;t++)!function t(n,e){if(e&&("object"==typeof e||"function"==typeof e)){var i=e.then;if("function"==typeof i)return void i.call(e,function(e){t(n,e)},function(e){a[n]={status:"rejected",reason:e},0==--r&&o(a)})}a[n]={status:"fulfilled",value:e},0==--r&&o(a)}(t,a[t])})}var n=setTimeout,i="undefined"!=typeof setImmediate?setImmediate:null;function l(e){return Boolean(e&&void 0!==e.length)}function o(){}function a(e){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(e,this)}function r(n,i){for(;3===n._state;)n=n._value;0!==n._state?(n._handled=!0,a._immediateFn(function(){var e,t=1===n._state?i.onFulfilled:i.onRejected;if(null!==t){try{e=t(n._value)}catch(e){return void c(i.promise,e)}s(i.promise,e)}else(1===n._state?s:c)(i.promise,n._value)})):n._deferreds.push(i)}function s(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof a)return t._state=3,t._value=e,void u(t);if("function"==typeof n)return void h((i=n,o=e,function(){i.apply(o,arguments)}),t)}t._state=1,t._value=e,u(t)}catch(e){c(t,e)}var i,o}function c(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&a._immediateFn(function(){e._handled||a._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)r(e,e._deferreds[t]);e._deferreds=null}function d(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function h(e,t){var n=!1;try{e(function(e){n||(n=!0,s(t,e))},function(e){n||(n=!0,c(t,e))})}catch(e){if(n)return;n=!0,c(t,e)}}a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var n=new this.constructor(o);return r(this,new d(e,t,n)),n},a.prototype.finally=e,a.all=function(t){return new a(function(o,a){if(!l(t))return a(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return o([]);var s=r.length;for(var e=0;e<r.length;e++)!function t(n,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var i=e.then;if("function"==typeof i)return void i.call(e,function(e){t(n,e)},a)}r[n]=e,0==--s&&o(r)}catch(e){a(e)}}(e,r[e])})},a.allSettled=t,a.resolve=function(t){return t&&"object"==typeof t&&t.constructor===a?t:new a(function(e){e(t)})},a.reject=function(n){return new a(function(e,t){t(n)})},a.race=function(o){return new a(function(e,t){if(!l(o))return t(new TypeError("Promise.race accepts an array"));for(var n=0,i=o.length;n<i;n++)a.resolve(o[n]).then(e,t)})},a._immediateFn="function"==typeof i?function(e){i(e)}:function(e){n(e,0)},a._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var p=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();"function"!=typeof p.Promise?p.Promise=a:(p.Promise.prototype.finally||(p.Promise.prototype.finally=e),p.Promise.allSettled||(p.Promise.allSettled=t))});var crouton_Handlebars=Handlebars.noConflict();function Crouton(e){var p=this;p.mutex=!1,p.filtering=!1,p.masterFormatCodes=[],p.currentView="weekday",p.distanceTabAllowed=!1,p.config={version:"4.1.3",on_complete:null,root_server:null,placeholder_id:"bmlt-tabs",map_max_zoom:15,time_format:"h:mm a",language:"en-US",has_tabs:!0,filter_tabs:20,filter_visible:0,header:!0,include_weekday_button:!0,int_include_unpublished:0,grouping_buttons:[{title:"City",field:"location_municipality"},{title:"Distance",field:"distance_in_km"}],formattype_grouping_buttons:[],default_filter_dropdown:"",show_map:"embed",map_search:null,has_days:!1,has_cities:!0,has_formats:!0,has_groups:!1,has_locations:!0,has_zip_codes:!1,has_areas:!1,has_regions:!1,has_states:!1,has_sub_province:!1,has_neighborhoods:!1,has_languages:!1,has_common_needs:!1,has_venues:!0,has_meeting_count:!1,recurse_service_bodies:!1,service_body:[],formats:"",venue_types:[],meeting_details_href:"",virtual_meeting_details_href:"",bmlt2ics:"",exclude_zip_codes:[],extra_meetings:[],native_lang:"",auto_tz_adjust:!1,base_tz:null,custom_query:null,sort_keys:"start_time",int_start_day_id:1,view_by:"weekday",show_qrcode:!1,force_rootserver_in_querystring:!0,force_timeformat_in_querystring:!0,force_language_in_querystring:!0,theme:"jack",report_update_url:"",meeting_data_template:croutonDefaultTemplates.meeting_data_template,metadata_template:croutonDefaultTemplates.metadata_template,observer_template:croutonDefaultTemplates.observer_template,meeting_count_template:croutonDefaultTemplates.meeting_count_template,meetingpage_title_template:croutonDefaultTemplates.meetingpage_title_template,meetingdetails_contents_template:croutonDefaultTemplates.meetingdetails_contents_template,meeting_times_template:croutonDefaultTemplates.meeting_times_template,group_data_template:croutonDefaultTemplates.group_data_template,group_title_template:croutonDefaultTemplates.group_title_template,group_details_template:croutonDefaultTemplates.group_details_contents_template,member_details_template:croutonDefaultTemplates.member_details_template,lat:0,lng:0,zoom:10,clustering:12,nominatimUrl:"https://nominatim.openstreetmap.org/",tileUrl:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",tileOptions:{attribution:'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',maxZoom:18},minZoom:6,maxZoom:17,distance_units:"miles",noMap:!1,maxTomatoWidth:160,caption:!1,groups:!1,details_table:!1},p.setConfig(e),Crouton.prototype.searchByCoordinates=function(e,t,n,i=!0){var o=p.config.custom_query;p.config.custom_query=(null!==p.config.custom_query?p.config.custom_query:"")+"&lat_val="+e+"&long_val="+t+("km"===p.config.distance_units?"&geo_width_km=":"&geo_width=")+n,p.meetingSearch(function(){p.config.refresh_map=1,p.config.show_map=1,p.reset(),p.render(!1,i)}),p.config.custom_query=o},p.getMeetings=function(o,a=null){var e=[fetchJsonp(this.config.root_server+o).then(function(e){return e.json()})];if(0<p.config.extra_meetings.length){for(var t="",n=0;n<p.config.extra_meetings.length;n++)t+="&meeting_ids[]="+p.config.extra_meetings[n];o=o.replace(/&services\[\]=\d+/,""),e.push(fetchJsonp(p.config.root_server+o+t).then(function(e){return e.json()}))}return Promise.all(e).then(function(e){var t,n=e[0],i=JSON.stringify(n.meetings);if(2===e.length&&(t=e[1]),"{}"===i||"[]"===i){i=p.config.root_server+o;return console.log('Could not find any meetings for the criteria specified with the query <a href="'+i+'" target=_blank>'+i+"</a>"),jQuery("#"+p.config.placeholder_id).html("No meetings found."),p.meetingData=[],p.formatsData=[],p.mutex=!1,void(a&&a())}0<p.config.exclude_zip_codes.length&&(n.meetings=n.meetings.filter(function(e){return!inArray(e.location_postal_code_1,p.config.exclude_zip_codes)})),p.meetingData=n.meetings,p.formatsData=n.formats,t&&(p.meetingData=p.meetingData.concat(t.meetings)),a&&a(),p.mutex=!1})},p.mutex=!0,p.meetingSearch=function(e=null){var t="/client_interface/jsonp/?switcher=GetSearchResults&get_used_formats&lang_enum="+p.config.short_language;if(p.config.formats&&(t+=p.config.formats.reduce(function(e,t){return e+"&formats[]="+t},"")),p.config.map_search&&!Array.isArray(p.config.venue_types)&&(p.config.venue_types=[]),p.config.map_search&&0===p.config.venue_types.length&&p.config.venue_types.push("-2"),p.config.venue_types&&(t+=p.config.venue_types.reduce(function(e,t){return e+"&venue_types[]="+t},"")),1===p.config.int_include_unpublished?t+="&advanced_published=0":-1===p.config.int_include_unpublished&&(t+="&advanced_published=-1"),null!=p.config.custom_query)return t+=p.config.custom_query+"&sort_keys="+p.config.sort_keys,p.getMeetings(t,e);if(0<p.config.service_body.length){for(var n=0;n<p.config.service_body.length;n++)t+="&services[]="+p.config.service_body[n];return p.config.recurse_service_bodies&&(t+="&recursive=1"),t+="&sort_keys="+p.config.sort_keys,p.getMeetings(t,e)}return new Promise(function(e,t){e()})},p.lock=function(e){var t=this,n=setInterval(function(){t.mutex||(clearInterval(n),e())},100)},p.dayTab=function(e){p.hideAllPages(),jQuery('.nav-tabs a[href="#tab'+e+'"]').tab("show"),jQuery("#"+e).removeClass("hide").addClass("show")},p.dayTabFromId=function(t){day_id=p.meetingData.find(e=>e.id_bigint==t).weekday_tinyint,p.dayTab(day_id)},p.showPage=function(e){jQuery(e+" .bmlt-data-row-placeholder").each(function(){var e=this.dataset.meetingid;const t=jQuery(this);var n=this.outerHTML;const i=jQuery("#"+e);i.before(n),t.replaceWith(i)}),p.addStripes(),jQuery(e).removeClass("hide").addClass("show")},p.showView=function(t,e=0){p.currentView=t,0<e?p.showingNow=e:e=p.showingNow||p.meetingData.length,t.endsWith("day")?!p.config.has_tabs||p.config.filter_tabs&&p.config.filter_tabs>=e?(p.byDayView(),jQuery("#byday").find(".meeting-group").each(function(e){jQuery(this).find(".bmlt-data-row.hide").length===jQuery(this).find(".bmlt-data-row").length?jQuery(this).addClass("hide"):jQuery(this).removeClass("hide")})):p.dayView():"map"==t?p.mapView():0==jQuery("#groupingButton_"+t.toUpperCase()).length?p.groupedView(p.config.grouping_buttons.find(e=>e.title.toLowerCase()===t).field):p.groupedView(t.toUpperCase())},p.byDayView=function(){p.lowlightButton(".groupingButton"),p.highlightButton("#day"),jQuery(".bmlt-page").each(function(e){p.hidePage("#"+this.id)}),p.hidePage("#days"),p.showPage("#byday"),p.hidePage("#nav-days"),p.hidePage("#tabs-content")},p.dayView=function(){p.lowlightButton(".groupingButton"),p.highlightButton("#day"),jQuery(".bmlt-page").each(function(e){p.hidePage("#"+this.id)}),jQuery("#days").removeClass("hide").addClass("show"),jQuery("#nav-days").removeClass("hide").addClass("show"),p.showPage("#tabs-content")},p.groupedView=function(t){!t.includes("distance")||p.distanceTabAllowed?(p.lowlightButton("#day"),p.lowlightButton(".groupingButton"),p.highlightButton("#groupingButton_"+t),jQuery(".bmlt-page").each(function(e){p.hidePage("#"+this.id),p.showPage("#byfield_"+t),jQuery("#byfield_"+t).find(".meeting-group").each(function(e){jQuery(this).find(".bmlt-data-row.hide").length===jQuery(this).find(".bmlt-data-row").length?jQuery(this).addClass("hide"):jQuery(this).removeClass("hide")})})):p.dayView()},p.mapView=function(){p.lowlightButton("#day"),p.lowlightButton(".groupingButton"),p.highlightButton("#groupingButton_embeddedMapPage"),p.groupedView("embeddedMapPage",!1),croutonMap.showMap(!1,!1)},p.lowlightButton=function(e){jQuery(e).removeClass("buttonHighlight").addClass("buttonLowlight")},p.highlightButton=function(e){jQuery(e).removeClass("buttonLowlight").addClass("buttonHighlight")},p.hidePage=function(e){jQuery(e).removeClass("show").addClass("hide")},p.hideAllPages=function(e){jQuery("#tab-pane").removeClass("show").addClass("hide")},p.addStripes=function(){jQuery(".bmlt-data-row").removeClass("evenRow"),jQuery(".bmlt-data-row").removeClass("oddRow"),jQuery(".bmlt-data-row:not(.hide)").each(function(e,t){jQuery(t).addClass(e%2?"oddRow":"evenRow")})},p.calcShowingNow=function(){var n=[];return jQuery(".bmlt-data-row:not(.hide)").each(function(e,t){t=t.id.split("-");n.push(t[t.length-1])}),n=[...new Set(n)]},p.filterMeetingsFromView=function(){jQuery(".group-header").removeClass("hide"),jQuery(".meeting-group").removeClass("hide"),jQuery(".bmlt-data-row").removeClass("hide"),jQuery(".filter-dropdown").each(function(e,t){var n=t.value.replace("a-","");""!==n&&("formats"!==(t=t.getAttribute("data-pointer").toLowerCase())&&"languages"!==t&&"venues"!==t&&"common_needs"!==t?jQuery(".bmlt-data-row").not("[data-"+t+"='"+n+"']"):jQuery(".bmlt-data-row").not("[data-"+t+"~='"+n+"']")).addClass("hide")}),this.addStripes();var e=this.calcShowingNow();p.updateMeetingCount(e),p.updateFilters(),croutonMap&&croutonMap.fillMap(e),p.showView(p.currentView,e.length)},p.resetFilter=function(){croutonMap.filterVisible(!1),(p.config.map_page&&p.filtering||p.config.show_map)&&croutonMap.fillMap(),p.filtering=!1,p.updateFilters(),p.updateMeetingCount(),jQuery(".filter-dropdown").val(null).trigger("change"),jQuery(".group-header").removeClass("hide"),jQuery(".meeting-group").removeClass("hide"),jQuery(".bmlt-data-row").removeClass("hide"),jQuery(".evenRow").removeClass("evenRow"),jQuery(".oddRow").removeClass("oddRow")},p.updateFilters=function(){if(p.dropdownData){const a=function(e){return e.id.replace("meeting-data-row-","")};p.dropdownData.forEach(function(i,e){let o=[];jQuery(".filter-dropdown").each(function(e,t){var n;t.id===i.elementId||""!==(n=t.value.replace("a-",""))&&(filteringDropdown=!0,"formats"!==(t=t.getAttribute("data-pointer").toLowerCase())&&"languages"!==t&&"venues"!==t&&"common_needs"!==t?jQuery(".bmlt-data-row").not("[data-"+t+"='"+n+"']").each((e,t)=>o.push(a(t))):jQuery(".bmlt-data-row").not("[data-"+t+"~='"+n+"']").each((e,t)=>o.push(a(t))))}),o=[...new Set(o)];var t=p.meetingData.filter(e=>!o.includes(e.id_bigint));i.optionsShowing=i.uniqueData(t).map(e=>i.optionName(e))})}},p.renderStandaloneMap=function(e,t,n=null,i=!0){hbs_Crouton.localization=p.localization,(window.crouton=p).setUpPartials(),croutonMap.initialize(p.createBmltMapElement(),p.meetingData,t,null,i,n,p.config.noMap)},p.retrieveGeolocation=function(){return new Promise((t,n)=>{window.storedGeolocation?t(window.storedGeolocation):navigator.geolocation?navigator.geolocation.getCurrentPosition(e=>{window.storedGeolocation={latitude:e.coords.latitude,longitude:e.coords.longitude},t(window.storedGeolocation)},e=>{n(new Error("Error getting geolocation: "+e.message))}):n(new Error("Geolocation is not supported by this browser."))})},p.getCurrentLocation=function(t){p.gretrieveGeolocation().then(e=>{t(e)}).catch(e=>{jQuery(".geo").removeClass("hide").addClass("show").html(`<p>${e.message}</p>`)})},p.renderView=function(e,t,n,i){hbs_Crouton.localization=p.localization;var o=hbs_Crouton.templates.main;jQuery(e).html(o(t)),n()},p.updateMeetingCount=function(t=null){var i=this;let e=i.meetingData.length;i.meetingCountCallback&&i.meetingCountCallback(e),i.groupCountCallback&&i.groupCountCallback((i.config.groups?i.config.meetingData:i.convertToGroups(i.config.meetingData)).length),addLive=function(e){return e+", "+e+"-live"},null!==t&&(e=t.length,addLive=function(e){return e+"-live"}),i.showingNowCount=e,jQuery(".crouton_root_service_body").each(function(){var e,t="",n="name";this.dataset.field&&(n=this.dataset.field),0<i.config.service_body.length&&((e=i.getServiceBodyDetails(i.config.service_body[0]))&&(t=e[n]||"")),jQuery(this).text(t)}),jQuery(addLive("#bmlt_tabs_meeting_count")).text(e),jQuery(addLive("#bmlt_tabs_group_count")).each(function(){var e=i.meetingData;null!==t&&(e=i.meetingData.filter(e=>t.includes(e.id_bigint)));e=i.config.groups?e:i.convertToGroups([...e]);jQuery(this).text(arrayUnique(e).length)}),jQuery(addLive("#bmlt_tabs_service_body_names")).each(function(){var e=i.meetingData,e=getUniqueValuesOfKey(e=null!==t?i.meetingData.filter(e=>t.includes(e.id_bigint)):e,"service_body_bigint"),a=this;i.getServiceBodies(e,!1).then(function(e){var t=e.length,n=e.map(e=>e.name);n.sort();var i="";if(1===t)i=n[0];else{for(var i=n[0],o=1;o<t-1;o++)i+=", ",i+=n[o];i+=" and "+n[t-1]}jQuery(a).text(i)})})},p.getServiceBodies=function(e,t=!0){return fetchJsonp(this.config.root_server+"/client_interface/jsonp/?switcher=GetServiceBodies"+(t?"&parents=1":"")+getServiceBodiesQueryString(e)).then(function(e){return e.json()})},p.getMasterFormats=function(){return fetchJsonp(this.config.root_server+"/client_interface/jsonp/?switcher=GetFormats&lang_enum=en&key_strings[]=TC&key_strings[]=VM&key_strings[]=HY").then(function(e){return e.json()})},p.errorHandler=function(e){jQuery(".geo").removeClass("hide").addClass("show").html("")},p.handlebars=function(t,e){var n=!1;handlebarMapOptions=[],crouton_Handlebars.registerHelper("crouton_map",function(e){return n=!0,p.handlebarMapOptions=e.hash,p.handlebarMapOptions.zoom||(p.handlebarMapOptions.zoom=14),p.handlebarMapOptions.lat=parseFloat(t.latitude),p.handlebarMapOptions.lng=parseFloat(t.longitude),"<div id='bmlt-handlebars-map' class='bmlt-map'></div>"});for(var i=new DOMParser;0<e.length;){var o=e.item(0);if(o.firstChild){var a="";if(1===o.firstChild.nodeType){if(!o.firstChild.firstChild||3!==o.firstChild.firstChild.nodeType){console.log("<bmlt-handlebar> tag: cannot find textnode"),o.remove();continue}a=o.firstChild.firstChild.textContent}else 3===o.firstChild.nodeType&&(a=o.firstChild.textContent);try{var r=crouton_Handlebars.compile(a)(t)}catch(e){console.log(e),r=e.message}a=i.parseFromString("<body>"+r+"</body>","text/html");if(a.body&&a.body.firstChild){for(var s,a=a.body.firstChild,l=[],c=a;s=c.nextSibling;)l.push(c=s);o.replaceWith(a),l&&a.after(...l)}else console.log("<bmlt-handlebar> tag: could not parse the Handlebars result"),o.replaceWith("<bmlt-handlebar> tag: could not parse the Handlebars result")}else console.log("<bmlt-handlebar> tag must have at least one child"),o.remove()}n&&croutonMap.loadPopupMap("bmlt-handlebars-map",t,p.handlebarMapOptions)},p.meetingCountCallback=null,p.grouoCountCallback=null,Crouton.prototype.meetingCount=function(e){p.meetingCountCallback=e},Crouton.prototype.groupCount=function(e){p.groupCountCallback=e},Crouton.prototype.filterNext24=function(e=!0){if(!e)return jQuery("#filter-dropdown-next24").val("a-"),void p.filterMeetingsFromView();const t=new Date,i=t.getDay(),o=t.getHours(),a=t.getMinutes(),n=p.meetingData.filter(function(e){var t=e.weekday_tinyint-1;if(t==i){var n=e.start_time.toString().split(":"),e=parseInt(n[0]);if(e>o)return!0;if(e==o&&parseInt(n[1])>a)return!0}else if(t==(i+1)%7)return!0;return!1}).map(e=>e.id_bigint);jQuery(".bmlt-data-row").each(function(e,t){t.dataset.next24=n.includes(t.id.split("-").pop())?"1":"0"}),jQuery("#filter-dropdown-next24").val("a-1"),p.filterMeetingsFromView()},p.toFarsinNumber=function(e){const t=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],n={AM:"صبح",PM:"بعدازظهر"};return e=(e=(e=e.replace(/\d/g,e=>t[e])).replace(/AM|am/g,n.AM)).replace(/PM|pm/g,e=>n.PM)},p.enrichMeetings=function(t){var e=[];let n="?";p.config.meeting_details_href&&0<=p.config.meeting_details_href.indexOf("?")&&(n="&");for(var i=0;i<t.length;i++){t[i].formatted_comments=t[i].comments;var o=t[i].duration_time.split(":");t[i].start_time_raw=this.getAdjustedDateTime(1===parseInt(t[i].weekday_tinyint)?7:parseInt(t[i].weekday_tinyint)-1,t[i].start_time,t[i].time_zone),t[i].start_time_formatted=t[i].start_time_raw.format(p.config.time_format),t[i].end_time_formatted=t[i].start_time_raw.clone().add(o[0],"hours").add(o[1],"minutes").format(p.config.time_format),"fa-IR"===p.config.language&&(t[i].start_time_formatted=p.toFarsinNumber(t[i].start_time_formatted),t[i].end_time_formatted=p.toFarsinNumber(t[i].end_time_formatted)),t[i].day_of_the_week=7===t[i].start_time_raw.isoWeekday()?1:t[i].start_time_raw.isoWeekday()+1,t[i].formatted_day=p.localization.getDayOfTheWeekWord(t[i].day_of_the_week);var a=t[i].formats.split(","),r=[],s=p.formatsData.filter(e=>e.root_server_uri==t[i].root_server_uri);t[i].wheelchair=!1;for(var l=0;l<a.length;l++)for(var c=0;c<s.length;c++)a[l]===s[c].key_string&&("WCHR"==s[c].world_id&&(t[i].wheelchair=!0),r.push({id:s[c].id,key:a[l],name:s[c].name_string,description:s[c].description_string,type:s[c].format_type_enum}));t[i].venue_type=parseInt(t[i].venue_type),t[i].venue_type_name=getVenueTypeName(t[i]),t[i].formats_expanded=r;var u,d,h=[t[i].location_street,t[i].location_municipality.trim(),t[i].location_province.trim(),t[i].location_postal_code_1.trim()];for(u in h.clean(),t[i].formatted_address=h.join(", "),t[i].formatted_location_info=null!=t[i].location_info?t[i].location_info.replace("/(http|https)://([A-Za-z0-9._-/?=&;%,]+)/i",'<a style="text-decoration: underline;" href="$1://$2" target="_blank">$1://$2</a>'):"",t[i].map_word=p.localization.getWord("map"),t[i].share_word=p.localization.getWord("share"),t[i].report_update_word=p.localization.getWord("report update"),t[i].show_qrcode=p.config.show_qrcode,t[i])t[i].hasOwnProperty(u)&&"string"==typeof t[i][u]&&-1!==t[i][u].indexOf("#@-@#")&&(d=t[i][u].split("#@-@#"),t[i][u]=d[d.length-1]);o=p.getServiceBodyDetails(t[i].service_body_bigint);t[i].serviceBodyUrl=o.url,t[i].serviceBodyPhone=o.helpline,t[i].serviceBodyName=o.name,t[i].serviceBodyDescription=o.description,t[i].serviceBodyContactEmail=o.contact_email,t[i].serviceBodyType=p.localization.getServiceBodyType(o.type);h=p.getServiceBodyDetails(o.parent_id);void 0!==h&&(t[i].parentServiceBodyId=o.parent_id,t[i].parentServiceBodyUrl=h.url,t[i].parentServiceBodyPhone=h.helpline,t[i].parentServiceBodyName=h.name,t[i].parentServiceBodyDescription=h.description,t[i].parentServiceBodyType=p.localization.getServiceBodyType(h.type)),t[i].meeting_details_url="",p.config.meeting_details_href&&(t[i].meeting_details_url=p.config.meeting_details_href,2===t[i].venue_type&&p.config.virtual_meeting_details_href&&(t[i].meeting_details_url=p.config.virtual_meeting_details_href),t[i].meeting_details_url+=n+("meeting-id="+t[i].id_bigint+"&language="+p.config.language+"&time_format="+encodeURIComponent(p.config.time_format)+(p.config.force_rootserver_in_querystring?"&root_server="+encodeURIComponent(p.config.root_server):""))),this.calculateDistance(t[i]),e.push(t[i])}return p.config.groups?p.convertToGroups(e):e},p.convertToGroups=function(e){if(!e||!e.length)return[];if(e[0].hasOwnProperty("membersOfGroup"))return e;e[0].hasOwnProperty("group_id")||e.forEach(e=>e.group_id=e.service_body_bigint+"|"+e.meeting_name+(2!=e.venue_type?"|"+parseFloat(e.latitude).toFixed(6)+"|"+parseFloat(e.longitude).toFixed(6):e.virtual_meeting_link+"|"+e.virtual_meeting_additional_info));const t=e.sort((e,t)=>e.group_id<t.group_id?-1:e.group_id>t.group_id?1:0),n=[];let i=null;return t.forEach(function(e){e.group_id?i&&e.group_id==i.group_id?i.membersOfGroup.push(e):(n.push(e),i=e,i.membersOfGroup=[Object.assign({},i)]):(n.push(e),e.membersOfGroup=[e])}),n.forEach(function(e){if(1<e.membersOfGroup.length){let n=e.formats.split(",");e.membersOfGroup.forEach(function(e){const t=e.formats.split(",");n=n.filter(e=>t.includes(e))}),e.formats=n.join(","),e.formats_expanded&&(e.formats_expanded=e.formats_expanded.filter(e=>n.includes(e.key))),e.membersOfGroup.forEach(function(e){e.formats=e.formats.split(",").filter(e=>!n.includes(e)).join(","),e.formats_expanded&&(e.formats_expanded=e.formats_expanded.filter(e=>!n.includes(e.key)))})}}),n},Crouton.prototype.updateDistances=function(){const o=this;var e,a=0;jQuery(".meeting-distance").each(function(e){const t=jQuery(this),n=jQuery(this).data("id");var i;n&&(a++,i=o.meetingData.find(e=>e.id_bigint==n),o.calculateDistance(i),""==i.distance?t.hasClass("hide")||t.addClass("hide"):(t.removeClass("hide"),jQuery(this).html(o.localization.getWord("Distance")+": "+i.distance),jQuery(this).closest("tr").data("distance",i.distance_in_km)))});const t=jQuery("#byfield_distance_in_km tbody");0!=t.length&&(0===a&&t.children().each(function(e){if(this.id){const n=this.id.replace("meeting-data-row-","");var t=o.meetingData.find(e=>e.id_bigint==n);t&&(o.calculateDistance(t),""!=t.distance&&(jQuery(this).data("distance",t.distance_in_km),a++))}}),e=t.children().sort(function(e,t){e=parseFloat(jQuery(e).data("distance")),t=parseFloat(jQuery(t).data("distance"));return e<t?-1:t<e?1:0}),t.html(e),jQuery("#byfield_distance_in_km tbody .bmlt-data-row").css({cursor:"pointer"}),jQuery("#byfield_distance_in_km tbody .bmlt-data-row").click(function(e){"A"!==e.target.tagName&&croutonMap.rowClick(parseInt(this.id.replace("meeting-data-row-","")))}),0<a&&(jQuery("#groupingButton_distance_in_km").removeClass("hide"),o.distanceTabAllowed=!0))},p.registerPartial=function(e,t){crouton_Handlebars.registerPartial(e,crouton_Handlebars.compile(t))},p.setUpPartials=function(){crouton_Handlebars.registerPartial("tableDataRow",p.config.groups?p.config.details_table?"<td>{{> groupStackedRow}}</td>":hbs_Crouton.templates.group3ColumnRow:p.config.details_table?"<td>{{> meetingStackedRow}}</td>":hbs_Crouton.templates.meeting3ColumnRow),p.registerPartial("meetingDataTemplate",p.config.meeting_data_template),p.registerPartial("meetingDataTemplate",p.config.meeting_data_template),p.registerPartial("metaDataTemplate",p.config.metadata_template),p.registerPartial("observerTemplate",p.config.observer_template),p.registerPartial("meetingpageTitleTemplate",p.config.meetingpage_title_template),p.registerPartial("meetingDetailsContentsTemplate",p.config.meetingdetails_contents_template),p.registerPartial("meetingCountTemplate",p.config.meeting_count_template),p.registerPartial("meetingTimesTemplate",p.config.meeting_times_template),p.registerPartial("groupData",p.config.group_data_template),p.registerPartial("groupDetailsContents",p.config.group_details_template),p.registerPartial("memberDetails",p.config.member_details_template),p.registerPartial("groupTitle",p.config.group_title_template);const e=new CroutonHandlebarsExtensions;e.registerHelpers(),e.registerPartials(p.config.groups)},p.calculateDistance=function(e){var t,n;e.distance="",2!=e.venue_type&&(t={lat:e.latitude,lng:e.longitude},(t=croutonMap.getDistanceFromSearch(t))&&(e.distance_in_km=t.km,e.distance_in_miles=t.miles,"km"===p.config.distance_units?e.distance_in_km&&(n=e.distance_in_km,e.distance=n<1?Math.round(1e3*n)+"m":(Math.round(10*n)/10).toFixed(1)+"km"):e.distance_in_miles&&(n=e.distance_in_miles,e.distance=(Math.round(100*n)/100).toFixed(2)+" miles")))},p.showMessage=function(e){jQuery("#"+p.config.placeholder_id).html("crouton: "+e),jQuery("#"+p.config.placeholder_id).removeClass("hide")},p.getUsedVenueType=function(e){let t=getUniqueValuesOfKey(e,"venue_type");return t.includes(3)||2===t.length?Object.values(p.localization.getWord("venue_type_choices")):1===t[0]?[p.localization.getWord("venue_type_choices").IN_PERSON]:[p.localization.getWord("venue_type_choices").VIRTUAL]},p.getUsedVisibility=function(e){return[{name:"Visible",value:1}]},p.getUsedNext24=function(e){return[{name:"Next24",value:1}]},p.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},p.createBmltMapElement=function(){return document.getElementById("bmlt-map")||jQuery("#bmlt-tabs").before("<div id='bmlt-map' class='bootstrap-bmlt bmlt-map "+p.localization.getWord("css-direction")+" bmlt_map_container_div'></div>"),"bmlt-map"},void 0===window.croutonMap?(window.croutonMap=new MeetingMap(p.config),p.config.map_search?p.searchMap():p.meetingSearch()):window.croutonMap.hasMapSearch()||p.meetingSearch()}function getMasterFormatId(e,t){for(var n=0;n<crouton.masterFormatCodes.length;n++){var i=crouton.masterFormatCodes[n];if(i.key_string===e&&i.root_server_uri===t.root_server_uri)return i.id}}crouton_Handlebars.registerHelper("startup",()=>""),crouton_Handlebars.registerHelper("enrich",()=>""),crouton_Handlebars.registerHelper("log",e=>console.log(e)),crouton_Handlebars.registerHelper("selectFormatPopup",()=>"formatPopup"),crouton_Handlebars.registerHelper("selectObserver",()=>"observerTemplate"),Crouton.prototype.setConfig=function(e){var t,n=this,i={button_filters:"grouping_buttons",button_format_filters:"formattype_grouping_buttons"};for(t in i)e.hasOwnProperty(t)&&(e[i[t]]=e[t],delete e[i[t]]);for(t in e)0<t.indexOf("_template")&&""===e[t].trim()||(-1===t.indexOf("int_")?"1"===e[t]||1===e[t]?n.config[t]=!0:"0"===e[t]||0===e[t]?n.config[t]=!1:n.config[t]=e[t]:n.config[t]=parseInt(e[t]||0));"embed"===n.config.show_map&&(n.config.show_map=!1,n.config.map_page=!0),n.config.day_sequence=[],n.config.day_sequence.push(n.config.int_start_day_id);for(var o=1;o<7;o++){var a=n.config.day_sequence[o-1]+1;7<a?n.config.day_sequence.push(a-7):n.config.day_sequence.push(a)}if(n.config.groups&&(n.config.view_by="city",n.config.include_weekday_button=!1,n.config.has_tabs=!1),n.config.view_by.endsWith("day")&&(n.config.include_weekday_button=!0),n.currentView=n.config.view_by,n.config.short_language="da-DK"===n.config.language?"dk":n.config.language.substring(0,2),n.localization=new CroutonLocalization(n.config.language),e.custom_translations&&""!==e.custom_translations.trim())try{n.localization.customizeTranslations(JSON.parse(e.custom_translations))}catch(e){console.log("Error parsing custom translations: "+e.message)}},Crouton.prototype.reset=function(){jQuery("#custom-css").remove(),jQuery("#"+this.config.placeholder_id).html("")},Crouton.prototype.doFilters=function(){return this.filterMeetingsFromView()},Crouton.prototype.getServiceBodyDetails=function(e){for(var t=0;t<this.all_service_bodies.length;t++){var n=this.all_service_bodies[t];if(n.id===e)return n}},Crouton.prototype.doHandlebars=function(){var i,o=document.getElementsByTagName("bmlt-handlebar");0!==o.length?(i=this).lock(function(){if(i.isEmpty(i.meetingData))for(let e=0;e<o.length;e++)o.item(e).innerHTML="Meeting not found!";else{var e=[i.getServiceBodies([i.meetingData[0].service_body_bigint])];Promise.all(e).then(function(e){hbs_Crouton.localization=i.localization,i.all_service_bodies=[];for(var t=e[0],n=0;n<t.length;n++)i.all_service_bodies.push(t[n]);e=i.enrichMeetings(i.meetingData);i.setUpPartials(),crouton_Handlebars.compile("{{startup}}")(e),crouton_Handlebars.compile("{{enrich this}}")(e[0]),i.handlebars(e[0],o),jQuery(".get-directions-modal").on("click",openDirectionsModal)})}}):console.log("No <bmlt-handlebar> tags found")},Crouton.prototype.meetingModal=function(t){this.openMeetingModal(this.meetingData.find(e=>e.id_bigint==t))},Crouton.prototype.openMeetingModal=function(e){let n=this;crouton_Handlebars.registerHelper("crouton_map",function(){return"<div id='bmlt-handlebars-map' class='bmlt-map'></div>"});let t=hbs_Crouton.templates.meetingModal;const i=document.getElementById("bmlt-tabs");let o=document.createElement("div");i.appendChild(o),o.innerHTML=t(e),[...i.getElementsByClassName("modal-close")].forEach(e=>e.addEventListener("click",e=>{croutonMap.closeModalWindow(e.target),document.getElementById("meeting_modal").remove()}));let a=document.getElementById("meeting_modal");document.body.appendChild(a),jQuery("#meeting_modal .get-directions-modal").on("click",openDirectionsModal),croutonMap.openModalWindow(a,!0),croutonMap.loadPopupMap("bmlt-handlebars-map",e,{lat:parseFloat(e.latitude),lng:parseFloat(e.longitude),zoom:14});let r=jQuery(".bmlt-data-row:visible"),s=-1;const l="meeting-data-row-";for(k=0;k<r.length;k++)if(r[k].id===l+e.id_bigint){s=k;break}function c(e){switch(e){case"left":s+=1;break;case"right":s-=1;break;default:s=-1}if(0<=s&&s<r.length){const t=r[s];meetingId=t.id.substring(l.length),a.getElementsByClassName("modal-close").item(0).dispatchEvent(new MouseEvent("click")),n.meetingModal(meetingId)}}swipedetect(a,c),s<=0?jQuery(".modal-left").addClass("hide"):a.getElementsByClassName("modal-left").item(0).addEventListener("click",e=>c("right")),s>=r.length-1?jQuery(".modal-right").addClass("hide"):a.getElementsByClassName("modal-right").item(0).addEventListener("click",e=>c("left"))},Crouton.prototype.searchMap=function(){var e=this;e.distanceTabAllowed=!0,e.config.map_search&&"object"==typeof e.config.map_search?(e.config.map_search.width||(e.config.map_search.width=-50),e.config.map_search.location||e.config.map_search.coordinates_search||(e.config.map_search.auto=!0),e.config.map_search.zoom||(e.config.map_search.zoom=14)):e.config.map_search={width:-50,auto:!0,zoom:14},e.config.map_page=!1,e.config.show_map=!1;var t=jQuery("body");""!==e.config.theme&&t.append("<div id='custom-css'><link rel='stylesheet' type='text/css' href='"+e.config.template_path+"/themes/"+e.config.theme+".css'>"),t.append("<div id='custom-css'><style type='text/css'>"+e.config.custom_css+"</style></div>"),e.meetingData=null,e.renderStandaloneMap("#"+e.config.placeholder_id,{config:e.config,meetings:{weekdays:[],groupingButtons:[],formattypeGroupingButtons:[],bydays:[],meetingCount:0,meetingData:[]},dropdownData:[],location:{latitude:0,longitude:0,zoom:10}})},Crouton.prototype.render=function(k=!1,x=!0){var S=this;S.lock(function(){var e=jQuery("body");if(""!==S.config.theme&&e.append("<div id='custom-css'><link rel='stylesheet' type='text/css' href='"+S.config.template_path+"/themes/"+S.config.theme+".css'>"),e.append("<div id='custom-css'><style type='text/css'>"+S.config.custom_css+"</style></div>"),S.isEmpty(S.meetingData))return S.showMessage("No meetings found for parameters specified."),void(S.config.refresh_map&&croutonMap.refreshMeetings(S.meetingData,x,!0));S.unique_service_bodies_ids=getUniqueValuesOfKey(S.meetingData,"service_body_bigint").sort();e=[S.getMasterFormats(),S.getServiceBodies(S.unique_service_bodies_ids)];Promise.all(e).then(function(e){S.all_service_bodies=[],S.masterFormatCodes=e[0];for(var t=e[1],n=0;n<t.length;n++)S.all_service_bodies.push(t[n]);jQuery.isEmptyObject(S.formatsData)||(S.formatsData=S.formatsData.sortByKey("name_string"));var i=S.enrichMeetings(S.meetingData);S.config.groups&&(S.meetingData=i),S.setUpPartials(),i.sort(function(e,t){return e.start_time_raw<t.start_time_raw?-1:e.start_time_raw>t.start_time_raw?1:0});for(var o=0,a=[],r={},s={},l=[];o<7;){var c=S.config.day_sequence[o],u=i.filterByObjectKeyValue("day_of_the_week",c);l.push({day:c,meetings:u}),a.push({day:S.localization.getDayOfTheWeekWord(c),meetings:u});for(var d=0;d<S.config.grouping_buttons.length;d++){var h=S.config.grouping_buttons[d].field;if(!h.startsWith("distance"))for(var p=getUniqueValuesOfKey(u,h).sort(),n=0;n<p.length;n++){var m=u.filterByObjectKeyValue(h,p[n]);r.hasOwnProperty(h)&&r[h].hasOwnProperty(p[n])?r[h][p[n]]=r[h][p[n]].concat(m):(r.hasOwnProperty(h)||(r[h]={}),r[h][p[n]]=m)}}for(d=0;d<S.config.formattype_grouping_buttons.length;d++){const h=S.config.formattype_grouping_buttons[d].field;var f=S.config.formattype_grouping_buttons[d].hasOwnProperty("accordionState")?S.config.grouping_buttons[_].accordionState:"",p=getUniqueFormatsOfType(u,h);"LANG"==h&&S.config.native_lang&&0<S.config.native_lang.length&&(p=p.filter(e=>e.key!=S.config.native_lang));for(n=0;n<p.length;n++){m=u.filter(e=>0<=e.formats_expanded.map(e=>e.key).indexOf(p[n].key));s.hasOwnProperty(h)&&s[h].hasOwnProperty(p[n].description)?s[h][p[n].description].group=s[h][p[n].description].group.concat(m):(s.hasOwnProperty(h)||(s[h]={}),s[h][p[n].description]={},s[h][p[n].description].accordionState=f,s[h][p[n].description].group=m)}}o++}for(var g={},_=0;_<S.config.grouping_buttons.length;_++){const h=S.config.grouping_buttons[_].field;var y=S.config.grouping_buttons[_].hasOwnProperty("accordionState")?S.config.grouping_buttons[_].accordionState:"";if(g[h]={},h.startsWith("distance"))g[h][S.localization.getWord("Sorted by Distance")]={},S.config.map_search?g[h][S.localization.getWord("Sorted by Distance")].group=[...S.meetingData].sort((e,t)=>e.distance_in_km-t.distance_in_km):g[h][S.localization.getWord("Sorted by Distance")].group=[...S.meetingData].filter(e=>2!=e.venue_type),g[h][S.localization.getWord("Sorted by Distance")].accordionState="non-collapsable";else{var v,b=[];for(v in r[h])b.push(v);b.sort();for(var w=0;w<b.length;w++)g[h][b[w]]={},g[h][b[w]].group=r[h][b[w]],g[h][b[w]].accordionState=y}}S.dayNamesSequenced=S.config.day_sequence.map(e=>S.localization.getDayOfTheWeekWord(e)),S.dropdownData=[],S.config.has_days&&S.dropdownData.push({placeholder:S.localization.getWord("weekday"),pointer:"weekdays",elementId:"filter-dropdown-weekdays",uniqueData:e=>sortListByList(getUniqueValuesOfKey(e,"formatted_day"),S.dayNamesSequenced),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_states&&S.dropdownData.push({placeholder:S.localization.getWord("states"),pointer:"States",elementId:"filter-dropdown-states",uniqueData:e=>getUniqueValuesOfKey(e,"location_province").sort(),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_sub_province&&S.dropdownData.push({placeholder:S.localization.getWord("counties"),pointer:"Counties",elementId:"filter-dropdown-sub_province",uniqueData:e=>getUniqueValuesOfKey(e,"location_sub_province").sort(),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_cities&&S.dropdownData.push({placeholder:S.localization.getWord("cities"),pointer:"Cities",elementId:"filter-dropdown-cities",uniqueData:e=>getUniqueValuesOfKey(e,"location_municipality").sort(),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_neighborhoods&&S.dropdownData.push({placeholder:S.localization.getWord("neighborhood"),pointer:"Neighborhoods",elementId:"filter-dropdown-neighborhoods",uniqueData:e=>getUniqueValuesOfKey(e,"location_neighborhood").sort(),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_zip_codes&&S.dropdownData.push({placeholder:S.localization.getWord("postal_codes"),pointer:"Zips",elementId:"filter-dropdown-zipcodes",uniqueData:e=>getUniqueValuesOfKey(e,"location_postal_code_1").sort(),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_locations&&S.dropdownData.push({placeholder:S.localization.getWord("locations"),pointer:"Locations",elementId:"filter-dropdown-locations",uniqueData:e=>getUniqueValuesOfKey(e,"location_text").map(e=>e.replace(/(<([^>]+)>)/gi,"")).sort(),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_regions&&S.dropdownData.push({placeholder:S.localization.getWord("regions"),pointer:"Regions",elementId:"filter-dropdown-regions",uniqueData:t=>S.all_service_bodies.filter(e=>getUniqueValuesOfKey(t,"parentServiceBodyId").includes(e.id)).sortByKey("name"),objectPointer:e=>convertToPunyCode(e.name),optionName:e=>e.name}),S.config.has_areas&&S.dropdownData.push({placeholder:S.localization.getWord("areas"),pointer:"Areas",elementId:"filter-dropdown-areas",uniqueData:t=>S.all_service_bodies.filter(e=>getUniqueValuesOfKey(t,"service_body_bigint").includes(e.id)).sortByKey("name"),objectPointer:e=>e.id,optionName:e=>e.name}),S.config.has_groups&&S.dropdownData.push({placeholder:S.localization.getWord("groups"),pointer:"Groups",elementId:"filter-dropdown-groups",uniqueData:e=>getUniqueValuesOfKey(e,"meeting_name").sort(),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_venues&&S.dropdownData.push({placeholder:S.localization.getWord("venue_types"),pointer:"Venues",elementId:"filter-dropdown-venues",uniqueData:e=>S.getUsedVenueType(e),objectPointer:convertToPunyCode,optionName:e=>e}),S.config.has_formats&&S.dropdownData.push({placeholder:S.localization.getWord("formats"),pointer:"Formats",elementId:"filter-dropdown-formats",uniqueData:e=>getUniqueFormats(e),objectPointer:e=>convertToPunyCode(e.name),optionName:e=>e.name}),S.config.has_languages&&S.dropdownData.push({placeholder:S.localization.getWord("languages"),pointer:"Formats",elementId:"filter-dropdown-languages",uniqueData:e=>getUniqueFormatsOfType(e,"LANG").filter(e=>e.key!==S.config.native_lang),objectPointer:e=>convertToPunyCode(e.name),optionName:e=>e.name}),S.config.has_common_needs&&S.dropdownData.push({placeholder:S.localization.getWord("common_needs"),pointer:"Formats",elementId:"filter-dropdown-commonneeds",uniqueData:e=>getUniqueFormatsOfType(e,"FC3"),objectPointer:e=>convertToPunyCode(e.name),optionName:e=>e.name}),(k||S.config.show_map||S.config.map_page)&&S.dropdownData.push({placeholder:"",pointer:"visible",elementId:"filter-dropdown-visibile",uniqueData:e=>S.getUsedVisibility(e),objectPointer:e=>e.value,optionName:e=>e.name}),k&&S.dropdownData.push({placeholder:"",pointer:"next24",elementId:"filter-dropdown-next24",uniqueData:e=>S.getUsedNext24(e),objectPointer:e=>e.value,optionName:e=>e.name});let A=k?S.renderStandaloneMap:S.renderView;A("#"+S.config.placeholder_id,{config:S.config,meetings:{allMeetings:S.meetingData,weekdays:l,groupingButtons:g,formattypeGroupingButtons:s,bydays:a,meetingCount:S.meetingData.length,meetingData:S.meetingData},dropdownData:S.dropdownData},function(){var e;S.config.map_search||jQuery("#groupingButton_distance_in_km").addClass("hide"),S.addStripes(),S.calcShowingNow(),S.updateMeetingCount(),jQuery("#please-wait").remove(),null==S.config.map_search&&!S.config.show_map||(jQuery(".bmlt-data-row").css({cursor:"pointer"}),jQuery(".bmlt-data-row").click(function(e){"A"!==e.target.tagName&&croutonMap.rowClick(parseInt(this.id.replace("meeting-data-row-","")))})),jQuery("#"+S.config.placeholder_id).addClass("bootstrap-bmlt"),jQuery("#filter-dropdown-visibile").removeClass("crouton-select").addClass("hide"),jQuery("#filter-dropdown-next24").removeClass("crouton-select").addClass("hide"),jQuery(".crouton-select").select2({dropdownAutoWidth:!0,allowClear:!1,width:"resolve",minimumResultsForSearch:1,dropdownCssClass:"bmlt-drop",matcher:function(e,t){return"a-"===t.id?t:(elementId=t.element.parentElement.id,e.hasOwnProperty("term")&&t.text.toUpperCase().indexOf(e.term.toUpperCase())<0?null:(dropdown=S.dropdownData.find(e=>e.elementId===elementId),"undefined"==typeof dropdown||void 0===dropdown.optionsShowing||dropdown.optionsShowing.includes(t.text)?t:null))}}),jQuery('[data-toggle="popover"]').popover().click(function(e){e.preventDefault(),e.stopPropagation()}),jQuery("html").on("click",function(e){"popover"!==jQuery(e.target).data("toggle")&&jQuery('[data-toggle="popover"]').popover("hide")}),jQuery(".filter-dropdown").on("select2:select",function(e){S.filterMeetingsFromView()}),jQuery("#day").on("click",function(){S.showView("day")}),jQuery(".groupingButtonLogic").on("click",function(e){S.showView(e.target.attributes["data-field"].value.toLowerCase())}),jQuery("#groupingButton_embeddedMapPage").on("click",function(e){S.showView("map")}),jQuery(".meeting-group:not(.non-collapsable) .group-header").on("click",function(e){jQuery(e.target.parentElement).toggleClass("closed")}),jQuery(".get-directions-modal").on("click",openDirectionsModal),jQuery(".directions-map-modal-close").on("click",function(e){closeDirectionsMapModal()}),S.config.has_tabs&&(jQuery(".nav-tabs a").on("click",function(e){e.preventDefault(),jQuery(this).tab("show")}),e=(new Date).getDay(),e++,jQuery('.nav-tabs a[href="#tab'+e+'"]').tab("show"),jQuery("#tab"+e).show()),jQuery(".bmlt-header").removeClass("hide").addClass("show"),jQuery(".bmlt-tabs").removeClass("hide").addClass("show"),""!==S.config.default_filter_dropdown&&(e=S.config.default_filter_dropdown.toLowerCase().split("="),jQuery("#filter-dropdown-"+e[0]).val("a-"+e[1]).trigger("change").trigger("select2:select")),!S.config.show_map||S.config.refresh_map||k||(croutonMap.initialize(S.createBmltMapElement(),S.meetingData),jQuery("#bmlt-map").removeClass("hide")),S.config.map_page&&!k&&(0==S.meetingData.filter(e=>2!=e.venue_type).length?jQuery("#groupingButton_embeddedMapPage").addClass("hide"):croutonMap.initialize("byfield_embeddedMapPage",S.meetingData)),S.config.refresh_map&&croutonMap.refreshMeetings(S.meetingData,x,!0),"map"!=S.config.view_by||S.config.map_page||(S.config.view_by="day"),S.showView(S.config.view_by,S.meetingData.length),null!=S.config.on_complete&&isFunction(S.config.on_complete)&&S.config.on_complete()},!k)})}),Crouton.prototype.forceShowMap=function(){this.config.map_page&&jQuery("#byfield_embeddedMapPage").hasClass("hide")&&this.mapView()}};var masterFormatVenueType={IN_PERSON:"IN_PERSON",VIRTUAL:"VIRTUAL"},venueType={IN_PERSON:1,VIRTUAL:2,HYBRID:3};function getVenueTypeName(e){return e.venue_type===venueType.HYBRID||inArray(getMasterFormatId("HY",e),getFormats(e))?[crouton.localization.getVenueType(masterFormatVenueType.VIRTUAL),crouton.localization.getVenueType(masterFormatVenueType.IN_PERSON)]:e.venue_type===venueType.VIRTUAL||inArray(getMasterFormatId("VM",e),getFormats(e))?[crouton.localization.getVenueType(masterFormatVenueType.VIRTUAL)]:[crouton.localization.getVenueType(masterFormatVenueType.IN_PERSON)]}function getFormats(e){return""!==e.formats?e.format_shared_id_list.split(","):[]}function convertToPunyCode(e){return void 0!==e?punycode.toASCII(e.toLowerCase()).replace(/\W|_/g,"-"):""}function getUniqueValuesOfKey(e,n){return e.reduce(function(e,t){return t[n]&&!~e.indexOf(t[n])&&e.push(t[n]),e},[])}function getValuesFromObject(e){var t=[];for(key in e)e.hasOwnProperty(key)&&t.push(e[key]);return t}function getUniqueFormats(e){return e.reduce(function(t,e){return e.formats_expanded?t.concat(e.formats_expanded.filter(e=>t.map(e=>e.key).indexOf(e.key)<0)):t},[]).sortByKey("name")}function getUniqueFormatsOfType(e,n){return e.reduce(function(t,e){if(!e.formats_expanded)return t;e=e.formats_expanded.filter(e=>e.type===n);return t=e?t.concat(e.filter(e=>t.map(e=>e.key).indexOf(e.key)<0)):t},[]).sortByKey("name")}function arrayUnique(e,t,n){for(t=e.length;n=--t;)for(;n--;)e[t]!==e[n]||e.splice(n,1);return e}function sortListByList(e,t){for(var n=[],i=0;i<t.length;i++)for(var o=0;o<e.length;o++)t[i]===e[o]&&n.push(e[o]);return n}function inArray(e,t){return-1!==t.indexOf(e)}function isFunction(e){return e&&"[object Function]"==={}.toString.call(e)}function getServiceBodiesQueryString(e){for(var t="",n=0;n<e.length;n++)t+="&services[]="+e[n];return t}function swipedetect(e,t){var n,i,o,a,e=e,r=t||function(e){};e.addEventListener("touchstart",function(e){e=e.changedTouches[0];n=e.pageX,i=e.pageY},!1),e.addEventListener("touchend",function(e){var t;e.cancelable&&(t=e.changedTouches[0],o=t.pageX-n,a=t.pageY-i,150<=Math.abs(o)&&Math.abs(a)<=100&&(r(o<0?"left":"right"),e.preventDefault()))},!1)}function isIOSDevice(){if(navigator.userAgentData&&navigator.userAgentData.platform&&"iOS"===navigator.userAgentData.platform)return!0;var e=navigator.userAgent||navigator.vendor||window.opera,t=/iPad|iPhone|iPod/.test(e)&&!window.MSStream,e="MacIntel"===navigator.platform&&1<navigator.maxTouchPoints&&!window.MSStream;return t||e}function isAndroidDevice(){return/Android/i.test(navigator.userAgent)}function isMobileDevice(){return isIOSDevice()||isAndroidDevice()||/Mobi|Android/i.test(navigator.userAgent)}function createDirectionsOptions(){const e=[];return isIOSDevice()&&e.push({name:crouton.localization.getWord("apple_maps"),description:crouton.localization.getWord("apple_maps_desc"),icon:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23007AFF'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E",url:"https://maps.apple.com/?daddr=${latitude},${longitude}"}),e.push({name:crouton.localization.getWord("google_maps"),description:crouton.localization.getWord("google_maps_desc_mobile"),icon:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234285f4'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E",url:"https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}"}),e.push({name:crouton.localization.getWord("waze"),description:crouton.localization.getWord("waze_desc"),icon:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300D4FF'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E",url:"https://waze.com/ul?ll=${latitude},${longitude}&navigate=yes"}),e}function openDirectionsModal(e){const n=jQuery(this).data("latitude"),i=jQuery(this).data("longitude");var t=localStorage.getItem("croutonDirectionsURL");if(t&&null!=t)openDirections(t,n,i,!1);else{document.getElementById("directionsMapModal")||(o=crouton.localization.getWord("select_map_app"),e.target.insertAdjacentHTML("afterend",`<div id="directionsMapModal" class="directions-map-modal remove-after-use">
|
|
152
152
|
<div class="directions-map-modal-content">
|
|
153
153
|
<span class="directions-map-modal-close">×</span>
|
|
154
154
|
<h3>`+o+`</h3>
|
|
@@ -161,7 +161,7 @@ if(!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.
|
|
|
161
161
|
<div class="directions-map-option-desc">${e.description}</div>
|
|
162
162
|
</div>
|
|
163
163
|
`,r.appendChild(t)});var o=crouton.localization.getWord("Remember my choice");const l=document.createElement("div");l.className="directions-remember-choice-div",l.innerHTML=`<input type="checkbox" id="rememberDirectionsChoice" name="rememberDirectionsChoice" value="1">
|
|
164
|
-
<label for="rememberDirectionsChoice">`+o+"</label>",r.appendChild(l),jQuery("html").on("click",".directions-map-modal-close",closeDirectionsModal),a.style.display="block"}else window.open(`https://www.google.com/maps/dir/?api=1&destination=${n},`+i,"_blank")}}function closeDirectionsModal(){const e=document.getElementById("directionsMapModal");e.style.display="none",e.className.includes("remove-after-use")&&e.remove()}function openDirections(e,t,n,i=!0){const o=jQuery("#rememberDirectionsChoice");i&&o.length&&o.is(":checked")&&localStorage.setItem("croutonDirectionsURL",e),e=(e=e.replaceAll("${latitude}",t)).replaceAll("${longitude}",n),window.open(e,"_blank"),i&&closeDirectionsModal()}function MeetingMap(e){var l=new MapDelegate(e),o=null,s=null;const c=e;c.maxZoom||(c.maxZoom=17),c.minZoom||(c.minZoom=6),c.marker_contents_template||(c.marker_contents_template=croutonDefaultTemplates.marker_contents_template);var u,d=[],n=null,a=!1,i=null,r=[],t=!1,h=!1;function p(e,t){i=e,r=t}function m(){return new Promise((t,n)=>{window.storedGeolocation?t(window.storedGeolocation):navigator.geolocation?navigator.geolocation.getCurrentPosition(e=>{window.storedGeolocation={latitude:e.coords.latitude,longitude:e.coords.longitude},t(window.storedGeolocation)},e=>{n(new Error("Error getting geolocation: "+e.message))}):n(new Error("Geolocation is not supported by this browser."))})}function f(t,n,i=null,o=null,a=!1){if(t){crouton_Handlebars.registerPartial("markerContentsTemplate",crouton_Handlebars.compile(c.marker_contents_template)),function(e){{var t;e.myThrobber||(e.myThrobber=document.createElement("div"),e.myThrobber&&(e.myThrobber.id=e.id+"Throbber_div",e.myThrobber.className="bmlt_map_throbber_div",e.myThrobber.style.display="none",e.appendChild(e.myThrobber),(t=document.createElement("img"))?(t.src=c.BMLTPlugin_images+"/Throbber.gif",t.className="bmlt_mapThrobber_img",t.id=e.id+"Throbber_img",t.alt="AJAX Throbber",e.myThrobber.appendChild(t)):e.myThrobber=null))}}(s=t),c.map_search?(c.map_search.width||(c.map_search.width=-50),c.map_search.location||c.map_search.coordinates_search||(c.map_search.auto=!0),(c.map_search.latitude||c.map_search.longitude)&&(c.lat=c.map_search.latitude,c.lng=c.map_search.longitude),c.map_search.zoom&&(c.zoom=c.map_search.zoom)):
|
|
164
|
+
<label for="rememberDirectionsChoice">`+o+"</label>",r.appendChild(l),jQuery("html").on("click",".directions-map-modal-close",closeDirectionsModal),a.style.display="block"}else window.open(`https://www.google.com/maps/dir/?api=1&destination=${n},`+i,"_blank")}}function closeDirectionsModal(){const e=document.getElementById("directionsMapModal");e.style.display="none",e.className.includes("remove-after-use")&&e.remove()}function openDirections(e,t,n,i=!0){const o=jQuery("#rememberDirectionsChoice");i&&o.length&&o.is(":checked")&&localStorage.setItem("croutonDirectionsURL",e),e=(e=e.replaceAll("${latitude}",t)).replaceAll("${longitude}",n),window.open(e,"_blank"),i&&closeDirectionsModal()}function MeetingMap(e){var l=new MapDelegate(e),o=null,s=null;const c=e;c.maxZoom||(c.maxZoom=17),c.minZoom||(c.minZoom=6),c.marker_contents_template||(c.marker_contents_template=croutonDefaultTemplates.marker_contents_template);var u,d=[],n=null,a=!1,i=null,r=[],t=!1,h=!1;function p(e,t){i=e,r=t}function m(){return new Promise((t,n)=>{window.storedGeolocation?t(window.storedGeolocation):navigator.geolocation?navigator.geolocation.getCurrentPosition(e=>{window.storedGeolocation={latitude:e.coords.latitude,longitude:e.coords.longitude},t(window.storedGeolocation)},e=>{n(new Error("Error getting geolocation: "+e.message))}):n(new Error("Geolocation is not supported by this browser."))})}function f(){return c.filter_visible&&1==c.filter_visible}function g(t,n,i=null,o=null,a=!1){if(t){crouton_Handlebars.registerPartial("markerContentsTemplate",crouton_Handlebars.compile(c.marker_contents_template)),function(e){{var t;e.myThrobber||(e.myThrobber=document.createElement("div"),e.myThrobber&&(e.myThrobber.id=e.id+"Throbber_div",e.myThrobber.className="bmlt_map_throbber_div",e.myThrobber.style.display="none",e.appendChild(e.myThrobber),(t=document.createElement("img"))?(t.src=c.BMLTPlugin_images+"/Throbber.gif",t.className="bmlt_mapThrobber_img",t.id=e.id+"Throbber_img",t.alt="AJAX Throbber",e.myThrobber.appendChild(t)):e.myThrobber=null))}}(s=t),c.map_search?(c.map_search.width||(c.map_search.width=-50),c.map_search.location||c.map_search.coordinates_search||(c.map_search.auto=!0),(c.map_search.latitude||c.map_search.longitude)&&(c.lat=c.map_search.latitude,c.lng=c.map_search.longitude),c.map_search.zoom&&(c.zoom=c.map_search.zoom)):k();let e={latitude:c.lat,longitude:c.lng,zoom:c.zoom};if(i&&(e={latitude:i.lat,longitude:i.lng}),l.createMap(t,e,a)&&(c.map_search&&f()?l.addListener("idle",te,!1):l.addListener("zoomend",function(e){var t;(void 0===C||(C===Z()?!1===Z():(C=Z(),1)))&&d&&(K?(t=ne(!1),q(),ne(t)):q())},!1),c.map_search?l.addControl(function(){const e=hbs_Crouton.templates.mapSearch,t=document.createElement("div");return t.innerHTML=e({}),t.querySelector("#map-search-button").addEventListener("click",j),t.querySelector("#bmltsearch-nearbyMeetings").addEventListener("click",w),t.querySelector("#bmltsearch-goto-text").addEventListener("keypress",function(e){"Enter"===e.key&&(e.preventDefault(),document.getElementById("bmltsearch-text-button").click())}),t.querySelector("#bmltsearch-text-button").addEventListener("click",function(){var e=document.getElementById("bmltsearch-goto-text").value.trim();""!==e&&(k(),l.callGeocoder(e,null,S),b(u))}),t.querySelector("#modal-seach-parameters").style.display="none",t.querySelector("#show-search-parameters").addEventListener("click",function(e){const t=e.target.parentElement.parentElement;let n=c.map_search.width,i="#search_radius";n<0&&(n=-n,i="#search_count"),t.querySelector(i).checked=!0,t.querySelector("#search_parameter").value=n,t.querySelector("#modal-seach-parameters").style.display="block",t.querySelector("#modal-search-page").style.display="none",t.querySelector("#search_radius_label").innerHTML=crouton.localization.getWord("Radius of search in $$").replace("$$",crouton.config.distance_units)}),t.querySelector("#show-search-page").addEventListener("click",function(e){const t=e.target.parentElement.parentElement;let n=t.querySelector("#search_parameter").value;t.querySelector("#search_count")&&(n=-Math.round(n),0==n&&(n=-1)),c.map_search.width=n,t.querySelector("#modal-seach-parameters").style.display="none",t.querySelector("#modal-search-page").style.display="block"}),t.querySelector("#bmltsearch-clicksearch").addEventListener("click",A),[...t.getElementsByClassName("modal-close")].forEach(e=>e.addEventListener("click",e=>b(e.target))),(u=t.querySelector("#bmltsearch_modal")).parentElement.removeChild(u),t}(),"topleft",o):(n?(n.imageDir=c.BMLTPlugin_images,l.addControl(function(){rules=[`.onoffswitch-inner:before {
|
|
165
165
|
content: "__text__";
|
|
166
166
|
padding-left: 10px;
|
|
167
167
|
background-color: #2d5c88; color: #FFFFFF;
|
|
@@ -179,7 +179,7 @@ if(!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.
|
|
|
179
179
|
<span class="onoffswitch-switch"></span>
|
|
180
180
|
</label>
|
|
181
181
|
</div>
|
|
182
|
-
</div>`,e.querySelector(".onoffswitch").addEventListener("click",function(e){e.pointerId<0||(
|
|
182
|
+
</div>`,e.querySelector(".onoffswitch").addEventListener("click",function(e){e.pointerId<0||(_=!_,v=!1,crouton.filterNext24(_),v=!0)}),document.styleSheets[0].insertRule(rules[0]),document.styleSheets[0].insertRule(rules[1]),e}(),"topleft")):n={imageDir:c.BMLTPlugin_images,config:c,dropdownData:!1},l.addControl(y(n),"topright",o)),c.caption)){const r=document.createElement("div");r.innerHTML='<div class="map-caption">'+c.caption.replace("\n","<br/>")+"</div>",l.addControl(r.firstChild,"bottomleft",o)}}}var _=!1;function y(e){var t=hbs_Crouton.templates.mapMenu,n=document.createElement("div");return n.innerHTML=t(e),n.querySelector("#nearbyMeetings").addEventListener("click",function(e){m().then(e=>{ne(!1),l.setViewToPosition(e,oe,ne),a={lat:e.latitude,lng:e.longitude},crouton.updateDistances()}).catch(e=>{console.log(e.message),jQuery(".geo").removeClass("hide").addClass("show").html(`<p>${e.message}</p>`)}),dropdownContent=document.getElementById("map-menu-dropdown").style.display="none"}),n.querySelector("#lookupLocation").addEventListener("click",N),e&&e.dropdownData?(n.querySelector("#filterMeetings").addEventListener("click",I),n.querySelector("#showAsTable").addEventListener("click",B)):n.querySelector("#filterTable").addEventListener("click",ie),n.querySelector("#fullscreenMode").addEventListener("click",le),n.querySelector("#map-menu-button").addEventListener("click",function(e){let t=document.getElementById("map-menu-dropdown");"inline-block"==t.style.display?t.style.display="none":(jQuery("#filteringByVisibility").html(K?"✔":""),t.style.display="inline-block")}),[...n.getElementsByClassName("modal-close")].forEach(e=>e.addEventListener("click",e=>D(e.target))),n.querySelector("#close_table").addEventListener("click",R),n.querySelector("#goto-text").addEventListener("keydown",function(e){e&&"Enter"==e.key&&(D(e.target),F(T))}),n.querySelector("#goto-button").addEventListener("click",function(e){D(e.target),F(T)}),n}var v=!0;function b(e){jQuery("#zoomed-out-message").not(".hide").addClass("hide"),D(e)}function w(){m().then(e=>{k(),a={lat:e.latitude,lng:e.longitude},crouton.searchByCoordinates(e.latitude,e.longitude,c.map_search.width),E==u&&b(u)}).catch(e=>{console.log(e.message),E!=u&&j()})}function A(e){croutonMap.showMap(!1,!1),l.clickSearch(e,function(e,t){k(),a={lat:e,lng:t},crouton.searchByCoordinates(e,t,c.map_search.width)}),b(u)}function k(){s.myThrobber&&(s.myThrobber.style.display="block")}function x(){s.myThrobber&&(s.myThrobber.style.display="none")}function S(e){k(),document.getElementById("bmltsearch-goto-text")&&(document.getElementById("bmltsearch-goto-text").value="");e=l.getGeocodeCenter(e);e?(a={lat:e.lat,lng:e.lng},crouton.searchByCoordinates(e.lat,e.lng,c.map_search.width)):x()}function P(e,t=!0,n=!1){if(null===e&&c.map_search)c.map_search.auto?w():c.map_search.coordinates_search?(k(),c.map_search.coordinates_search=!1,a={lat:c.map_search.latitude,lng:c.map_search.longitude},crouton.searchByCoordinates(c.map_search.latitude,c.map_search.longitude,c.map_search.width)):c.map_search.location?l.callGeocoder(c.map_search.location,null,S):j();else{if(d=e.filter(e=>2!=e.venue_type),t){let e=d.reduce(function(e,t){return e.push([t.latitude,t.longitude]),e},[]);var i=c.maxTomatoWidth/2;if(a&&e.push([a.lat,a.lng]),c.map_search&&f()){for(e.sort((e,t)=>de({lat:e[0],lng:e[1]},a)-de({lat:t[0],lng:t[1]},a));me(e)>i&&3<e.length;)e=e.slice(0,e.length/2);me(e)>i&&(e=e.slice(1,1))}0<e.length&&l.fitBounds(e)}q(),x(),(f()||c.centerMe||c.goto)&&crouton.forceShowMap(),c.centerMe?navigator.geolocation?navigator.geolocation.getCurrentPosition(function(e){ne(!(coords={latitude:e.coords.latitude,longitude:e.coords.longitude})),c.zoom&&l.setZoom(!1,c.zoom),l.setViewToPosition(coords,oe,()=>{ne(f())}),a={lat:e.coords.latitude,lng:e.coords.longitude},crouton.updateDistances()},N):n&&N():(c.centerMe||c.goto||c.map_search&&f()||l.afterInit(()=>ne(f())),c.goto&&l.callGeocoder(c.goto,f()?W:H))}}var M,C,T=!1,E=null,O=!1;function D(e){if(l.modalOff(),E=null,!e.classList.contains("modal"))return D(e.parentNode);if(e.style.display="none",T&&(T=!1,se()||le()),O){const t=document.body;e=t.style.top;t.style.overflowX=M,t.style.position="",t.style.top="",window.scrollTo(0,-1*parseInt(e||"0"))}}function z(e,t=!1){if(se()&&(T=!0,le()),e&&(e.style.display="block",O=t,e.focus(),E=e,dd=document.getElementById("map-menu-dropdown"),dd&&(dd.style.display="none"),l.modalOn(),O)){const n=document.body;M=n.style.overflowX;e=-window.scrollY+"px";n.style.overflowX="hidden",n.style.position="fixed",n.style.width="100%",n.style.setProperty("top",e,"important")}}function I(e){z(document.getElementById("filter_modal"))}function j(e){document.getElementById("bmltsearch_modal")||s.appendChild(u),l.isMapDefined()?jQuery("#bmltsearch-clicksearch").parent().show():jQuery("#bmltsearch-clicksearch").parent().hide(),z(u)}function N(e=0){z(document.getElementById("geocoding_modal"))}function B(e=0){ne(),jQuery("#bmlt-tabs").append(jQuery("#table_page")),jQuery("#table_page").removeClass("hide"),jQuery("#bmlt-map").css("display","none"),jQuery("#table_page").css("max-height",jQuery("#bmlt-map").height()),jQuery("#bmlt-maptable-div").css("height",jQuery("#bmlt-map").height()-jQuery("#bmlt-maptable-header").height()),document.getElementById("map-menu-dropdown").style.display="none"}function R(e=0){ne(!1),jQuery("#table_page").addClass("hide"),jQuery("#bmlt-map").css("display","block")}function W(e,t=null){ne(!1);e=oe(e);return ne(!0),a.lat==t.lat&&a.lng==t.lng||(a=t,crouton.updateDistances()),e}function H(e,t=null){ne(!1);e=oe(e);return a.lat==t.lat&&a.lng==t.lng||(a=t,crouton.updateDistances()),e}function F(e){return""!=document.getElementById("goto-text").value?e?l.addListener("idle",function(){l.callGeocoder(document.getElementById("goto-text").value,W)},!0):l.callGeocoder(document.getElementById("goto-text").value,W):alert(""),1}function q(t=!1){if(d&&d.length)try{G(t),a&&l.markSearchPoint([a.lat,a.lng])}catch(e){console.log(e),l.addListener("projection_changed",function(e){G(t),a&&l.markSearchPoint([a.lat,a.lng])},!0)}}function Z(){return!!c.groups||(void 0===l.getZoom()||void 0!==c.clustering&&l.getZoom()<c.clustering)}function G(e=!1){if(l.isMapDefined()){const t=l.getOpenMarker();l.clearAllMarkers(),l.removeClusterLayer();const n=ae(d),i=c.groups?n:Z()||1==n.length?n.map(e=>[e]):function(e){var t=new Array;for(const[n,u]of Object.entries(function(e){return e.reduce(function(e,t){return e.hasOwnProperty(t.location_municipality)?e[t.location_municipality].push(t):e[t.location_municipality]=[t],e},{})}(e))){var c=u.map(e=>(item=new Object,item.matched=!1,item.meeting=e,item.coords=l.fromLatLngToPoint(e.latitude,e.longitude),item));c.reduce(function(e,t,n){if(t.matched)return e;matches=[t.meeting];var i,o,a,r,s,l=t.coords;for(c2=n+1;c2<u.length;c2++)c[c2].matched||(i=c[c2].coords,o=l.x-8,a=l.x+8,r=l.y-8,s=l.y+8,i.x>=o&&i.x<=a&&i.y>=r&&i.y<=s&&(matches.push(c[c2].meeting),c[c2].matched=!0));return matches.sort(V),e.push(matches),e},t)}return t}(n);Z()&&l.createClusterLayer(),markerCreator=c.groups?Y:$,i.forEach(function(e){markerCreator(e,t)}),l.addClusterLayer(),e&&(e=n.reduce(function(e,t){return e.push([t.latitude,t.longitude]),e},[]),l.fitBounds(e))}}function V(e,t){var n=parseInt(e.weekday_tinyint,10),i=parseInt(t.weekday_tinyint,10);if(n<c.start_week&&(n+=7),i<c.start_week&&(i+=7),n<i)return-1;if(i<n)return 1;e=e.start_time.toString().split(":"),t=t.start_time.toString().split(":");return parseInt(e[0])<parseInt(t[0])?-1:parseInt(e[0])>parseInt(t[0])?1:parseInt(e[1])<parseInt(t[1])?-1:parseInt(e[1])>parseInt(t[1])?1:0}document.addEventListener("keydown",function(e){E&&"Escape"==e.key&&D(E)},!0);const U=crouton_Handlebars.compile(`
|
|
183
183
|
<div class="accordion">
|
|
184
184
|
{{#each this}}<div>
|
|
185
185
|
<input type="radio" name="panel" id="panel-{{this.id_bigint}}" {{#unless @index}}checked{{/unless}}/>
|
|
@@ -189,5 +189,5 @@ if(!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.
|
|
|
189
189
|
</div>
|
|
190
190
|
</div>{{/each}}
|
|
191
191
|
</div>
|
|
192
|
-
`);function U(e,t){var n=[e[0].latitude,e[0].longitude],i=V(e),n=l.createMarker(n,1<e.length,null);l.bindPopup(n,i,e.map(e=>parseInt(e.id_bigint)),t)}function $(e,t){var n=[e.latitude,e.longitude],n=l.createMarker(n,1<e.membersOfGroup.length,null);l.addMarkerCallback(n,function(){crouton.openMeetingModal(e)})}var Y=!1,K=null;function Q(t){return d.filter(e=>l.contains(t,e.latitude,e.longitude))}function J(){h=!0,c.map_search||te(!1),l.addListener("dragend",X,!0)}function X(){h=!1,c.map_search&&c.filter_visible?ee():te(!0)}function ee(e){h||(n=null,corners=l.getCorners(),t&&l.contains(t,corners.ne.lat,corners.ne.lng)&&l.contains(t,corners.sw.lat,corners.sw.lng)?te():de("km")>c.maxTomatoWidth?(jQuery("#zoomed-out-message").removeClass("hide"),I()):(t=l.getBounds(),A(),crouton.searchByCoordinates(l.getCenter().lat,l.getCenter().lng,de(),!1)))}function te(e=!0){if(e==Y&&!c.map_search)return e;let t=e?Q(l.getBounds()):d,n=t.map(e=>e.id_bigint);return jQuery(".bmlt-data-row").each(function(e,t){t.dataset.visible=n.includes(t.id.split("-").pop())?"1":"0"}),jQuery("#byday").removeClass("hide"),jQuery("#filter-dropdown-visibile").val(e?"a-1":""),y=!1,crouton.simulateFilterDropdown(),y=!0,jQuery("#filteringByVisibility").html(e?"✔":""),(Y=e)?K=l.addListener("dragstart",J,!0):K&&(l.removeListener(K),K=null),!e}function ne(){te(!Y)}function Q(t){return d.filter(e=>l.contains(t,e.latitude,e.longitude))}function ie(e){return oe(Q(e))}function oe(e){e=e.filter(e=>2!=e.venue_type);return null!=n?e.filter(e=>n.includes(e.id_bigint)):e}var ae=!1;function re(){return(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement)===s||ae}function se(e){var t=s;re()?e&&e.pseudoFullscreen?le(!1):document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():_disablePseudoFullscreen(t):e&&e.pseudoFullscreen?le(!0):t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):t.msRequestFullscreen?t.msRequestFullscreen():_enablePseudoFullscreen(t)}ae=!1;function le(e){var t=s;(ae=e)?L.DomUtil.addClass(t,"leaflet-pseudo-fullscreen"):L.DomUtil.removeClass(t,"leaflet-pseudo-fullscreen"),l.invalidateSize()}function ce(e){return e*Math.PI/180}function ue(e,t){var n=ce(t.lat-e.lat),i=ce(t.lng-e.lng),i=Math.sin(n/2)*Math.sin(n/2)+Math.cos(ce(e.lat))*Math.cos(ce(t.lat))*Math.sin(i/2)*Math.sin(i/2);return 6378137*(2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i)))}function de(e=!1){return e=e||crouton.config.distance_units,he(l.getCorners(),e)}function he(e,t="km"){return ue(e.ne,e.sw)/2e3*("km"==t?1:.62137119)}function pe(e){return he(l.getCorners(e),"km")}this.initialize=function e(t,n,i=null,o=null,a=!0,r,s){if(!l.isApiLoaded())return p(e,[t,n,i,o,a,r,s]),void l.loadApi();f(document.getElementById(t),i,o,r,s),S(n,a,!0)},this.showMap=function(e=!1,t=!0){e&&o?o.invalidateSize():(l.invalidateSize(),d&&t&&l.fitBounds((n?d.filter(e=>n.includes(e.id_bigint)):d).reduce(function(e,t){return e.push([t.latitude,t.longitude]),e},[])))},this.fillMap=function(e){n=e,d&&F(y&&!Y)},this.rowClick=function(t){var e=d.find(e=>e.id_bigint==t);e&&(14<=l.getZoom()&&l.contains(l.getBounds(),e.latitude,e.longitude)?l.openMarker(t):l.setViewToPosition({latitude:e.latitude,longitude:e.longitude},ie,function(){l.openMarker(t)}))},this.apiLoadedCallback=function(){i(...r)},this.refreshMeetings=S,this.getDistanceFromSearch=function(e){return!!a&&{km:(e=ue(e,a))/1e3,miles:.00062137119*e}},this.openModalWindow=D,this.closeModalWindow=O,this.loadPopupMap=function e(t,n,i=null){if(!l.isApiLoaded())return p(e,[t,n,i]),void l.loadApi();t=document.getElementById(t);if(t){let e=new MapDelegate(c);i&&(loc={latitude:i.lat,longitude:i.lng,zoom:i.zoom}),e.createMap(t,loc)&&(t=e.createMarker([n.latitude,n.longitude],!1,null),e.bindPopup(t,null,n.id_bigint,!1),e.addClusterLayer(),o=e)}},this.filterVisible=te,this.hasMapSearch=function(){return"map_search"in c}}function MapDelegate(c){var u,i,a=L.icon({iconUrl:c.BMLTPlugin_images+"/NAMarker.png",shadowUrl:c.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[0,-32]}),r=L.icon({iconUrl:c.BMLTPlugin_images+"/NAMarkerG.png",shadowUrl:c.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[0,-32]}),s=L.icon({iconUrl:c.BMLTPlugin_images+"/NAMarkerSel.png",shadowUrl:c.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[12,-32]}),t=L.icon({iconUrl:c.BMLTPlugin_images+"/SearchPoint.png",shadowUrl:c.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[12,-32]}),l=[],o=null,n=!1,d=!1;function h(e,t){if(!u)return 12;var n=u.getZoom();if(c.map_search&&c.filter_visible)return n;for(var i=u.getCenter(),o=u.getBounds(),a=!1;0==t(o,i).length&&6<n;){a=!0,--n;var r=L.latLng(2*o.getNorthEast().lat-i.lat,2*o.getNorthEast().lng-i.lng),s=L.latLng(2*o.getSouthWest().lat-i.lat,2*o.getSouthWest().lng-i.lng),o=L.latLngBounds(s,r)}if(!e&&!a&&n<12){for(var l=t(o).length;n<12&&0<l;){n+=1;r=L.latLng(.5*(o.getNorthEast().lat+i.lat),.5*(o.getNorthEast().lng+i.lng)),s=L.latLng(.5*(o.getSouthWest().lat+i.lat),.5*(o.getSouthWest().lng+i.lng)),l=t(o=L.latLngBounds(s,r)).length}0==l&&--n}return n}function p(e,t,n){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState){var t;if(200!==i.status&&304!==i.status)t="";else if("string"==typeof i.response)try{t=JSON.parse(i.response)}catch(e){t=i.response}else t=i.response;n(t)}},i.open("GET",e+function(e,t,n){var i,o=[];for(i in e){var a=encodeURIComponent(n?i.toUpperCase():i),r=e[i];if(L.Util.isArray(r))for(var s=0;s<r.length;s++)o.push(a+"="+encodeURIComponent(r[s]));else o.push(a+"="+encodeURIComponent(r))}return(t&&-1!==t.indexOf("?")?"&":"?")+o.join("&")}(t),!0),i.responseType="json",i.setRequestHeader("Accept","application/json"),i.setRequestHeader("Accept","*/*"),i.send(null)}function m(e){return"number"==typeof e||"string"==typeof e&&""!==e.trim()&&!isNaN(e)}this.createMap=function(e,t,n=!1){return t?n?(gDiv=e,gDiv.style.height="auto",gDiv.style.marginBottom="10px",u=null,gDiv):(myOptions={minZoom:c.minZoom,maxZoom:c.maxZoom,doubleClickZoom:!1,scrollWheelZoom:!1},myOptions=Object.assign(myOptions,{center:new L.latLng(t.latitude,t.longitude),zoom:t.zoom}),0==(n=e.offsetWidth)&&(n=e.parentNode.offsetWidth),t=e.offsetHeight,1.4*n<(t=0==t?n:t)&&(e.style.height=1.6*n+"px"),u=new L.Map(e,myOptions),i=L.tileLayer(c.tileUrl,c.tileOptions).addTo(u),u.zoomControl.setPosition("bottomright"),u.on("moveend",function(){i.redraw()}),u):null},this.addListener=function(e,t,n){if(u)return"dragend"==(e="dragstart"==(e="idle"==e?"moveend":e)?"movestart":e)&&(e="moveend"),n?u.once(e,t):u.on(e,t),{event:e,f:t}},this.removeListener=function(e){u&&u.off(e.event,e.f)},this.addControl=function(t,e,n){if(u){var i=L.Control.extend({onAdd:function(e){return t},onRemove:function(e){}});if(n){const o=new MutationObserver(function(e){e.forEach(e=>{e.addedNodes.forEach(e=>{e===t&&(o.disconnect(),n())})})});o.observe(document,{childList:!0,subtree:!0})}new i({position:e}).addTo(u)}else gDiv.appendChild(t)},this.setViewToPosition=function(e,t,n=null){u&&(e=L.latLng(e.latitude,e.longitude),u.flyTo(e),u.once("moveend",function(e){newZoom=h(!1,t),u.getZoom()!=newZoom?(u.setZoom(newZoom),u.once("zoomend",function(){u.invalidateSize(),n&&u.once("load moveend",n)})):n&&n()}))},this.clearAllMarkers=function(){u&&(l&&l.forEach(e=>{e.marker.closePopup(),u.removeLayer(e.marker)}),l=[])},this.fromLatLngToPoint=function(e,t){return u?u.latLngToLayerPoint(L.latLng(e,t)):null},this.callGeocoder=function(e,t,n=function(e,t){e&&e[0]&&e[0].bbox?(u.flyToBounds(e[0].bbox),u.on("moveend",function(e){u.off("moveend"),u.setZoom(h(!0,t)),u.once("moveend",function(){i.redraw()})})):alert(crouton.localization.getWord("address_lookup_fail"))}){geoCodeParams={},c.region&&""!==c.region.trim()&&(geoCodeParams.countrycodes=c.region),c.bounds&&m(c.bounds.north)&&m(c.bounds.east)&&m(c.bounds.south)&&m(c.bounds.west)&&(geoCodeParams.viewbox=c.bounds.west+","+c.bounds.south+","+c.bounds.east+","+c.bounds.north),function(e,t,a,r){p((c.nominatimUrl||"https://nominatim.openstreetmap.org/")+"search",L.extend({q:e,limit:5,format:"json",addressdetails:1},t),L.bind(function(e){var t=[];if(e&&e.length){for(var n=e.length-1;0<=n;n--){for(var i=e[n].boundingbox,o=0;o<4;o++)i[o]=parseFloat(i[o]);t[n]={icon:e[n].icon,name:e[n].display_name,bbox:L.latLngBounds([i[0],i[2]],[i[1],i[3]]),center:L.latLng(e[n].lat,e[n].lon),properties:e[n]}}r?a(t,r):a(t)}else alert(crouton.localization.getWord("address_lookup_fail"))},this))}(e,geoCodeParams,n,t)},this.setZoom=function(e,t=0){u&&(0<t?u.setZoom(t):u.setZoom(h(!1,e)))},this.getZoom=function(){return u?u.getZoom():null},this.createMarker=function(e,t,n){if(u){n=L.marker(e,{icon:t?r:a,title:n});return n.isMulti=t,o?o.addLayer(n):n.addTo(u),n}},this.bindPopup=function(t,e,i,o){if(e){let n=function(e){e=e.id.split("-")[1];d=e,jQuery(".bmlt-data-row > td").removeClass("rowHighlight"),jQuery("#meeting-data-row-"+e+" > td").addClass("rowHighlight"),"undefined"!=typeof crouton&&crouton.dayTabFromId(e)};t.bindPopup(e),t.on("popupopen",function(e){o&&t.getPopup().getContent().includes("panel-"+o)&&jQuery("input[type=radio][name=panel]").filter(function(){return jQuery(this).attr("id")=="panel-"+o}).each(function(e,t){jQuery(this).prop("checked",!0)}),t.setIcon(s),u.on("zoomstart",function(){t.closePopup()}),jQuery("input[type=radio][name=panel]:checked").each(function(e,t){n(t)}),jQuery("input[type=radio][name=panel]").change(function(){n(this)})}),t.on("popupclose",function(e){d=!1,t.setIcon(t.isMulti?r:a),jQuery(".bmlt-data-row > td").removeClass("rowHighlight")}),o&&i.includes(parseInt(o))&&(t.openPopup(),t.once("add",function(){t.isPopupOpen()||t.openPopup()})),l.push({ids:i,marker:t})}},this.addMarkerCallback=function(e,t,n){t&&e.on("click",function(){t(n)}),l.push({ids:n,marker:e})},this.contains=function(e,t,n){return!u||e.contains(L.latLng(t,n))},this.getBounds=function(){return u?u.getBounds():null},this.invalidateSize=function(){u&&u.invalidateSize()},this.zoomOut=function(e){u&&u.setZoom(h(!0,e))},this.fitBounds=function(e){u&&(e=e.reduce(function(e,t){return e.extend(t),e},L.latLngBounds()),u.fitBounds(e))},this.openMarker=function(t){u&&(marker=l.find(e=>e.ids.includes(t)),marker&&(marker.marker.openPopup(),jQuery("#panel-"+t).prop("checked",!0),"undefined"!=typeof crouton&&crouton.dayTabFromId(t)),jQuery(".bmlt-data-row > td").removeClass("rowHighlight"),jQuery("#meeting-data-row-"+t+" > td").addClass("rowHighlight"))},this.isApiLoaded=function(){return!0},this.createClusterLayer=function(){u&&(o=L.markerClusterGroup())},this.addClusterLayer=function(){u&&o&&u.addLayer(o)},this.removeClusterLayer=function(){u&&(o&&u.removeLayer(o),o=null)},this.clickSearch=function(e,t){L.DomUtil.addClass(u._container,"crosshair-cursor-enabled"),u.once("click",function(e){u.once("click",function(e){L.DomUtil.removeClass(u._container,"crosshair-cursor-enabled"),t(e.latlng.lat,e.latlng.lng)})})},this.getGeocodeCenter=function(e){if(e&&e[0])return{lat:e[0].center.lat,lng:e[0].center.lng};alert(crouton.localization.getWord("address_lookup_fail"))},this.modalOn=function(){u&&u.dragging.disable()},this.modalOff=function(){u&&u.dragging.enable()},this.afterInit=function(e){e()},this.isMapDefined=function(){return null!=u},this.getCorners=function(e=!1){return{ne:{lat:(e=e?e.reduce(function(e,t){return e.extend(t),e},L.latLngBounds()):u.getBounds()).getNorthEast().lat,lng:e.getNorthEast().lng},sw:{lat:e.getSouthWest().lat,lng:e.getSouthWest().lng}}},this.getCenter=function(){return{lat:u.getCenter().lat,lng:u.getCenter().lng}},this.markSearchPoint=function(e){u&&(n&&n.remove(),(n=L.marker(e,{icon:t})).addTo(u))},this.getOpenMarker=function(){return d}}Crouton.prototype.renderMeetingCount=function(){var e=this;e.lock(function(){e.updateMeetingCount()})},Crouton.prototype.simulateFilterDropdown=function(){self=this,jQuery(".bmlt-page:not(#byfield_embeddedMapPage)").each(function(){self.hidePage(this)}),self.filterMeetingsFromView()},Crouton.prototype.getAdjustedDateTime=function(e,t,n){var i=!0===this.config.auto_tz_adjust||"true"===this.config.auto_tz_adjust,o=i?(n=n||"UTC",(o=moment.tz(n).set({hour:t.split(":")[0],minute:t.split(":")[1],second:0}).isoWeekday(e)).clone().tz(moment.tz.guess())):moment().set({hour:t.split(":")[0],minute:t.split(":")[1],second:0}).isoWeekday(e),i=i?moment.tz(moment.tz.guess()):moment();return(o<i||i.isoWeekday()==o.isoWeekday()&&0==o.diff(i,"days"))&&o.add(1,"weeks"),o},Array.prototype.clone=function(){return this.slice()},Array.prototype.filterByObjectKeyValue=function(e,t){for(var n=[],i=0;i<this.length;i++)this[i][e]===t&&n.push(this[i]);return n},Array.prototype.getArrayItemByObjectKeyValue=function(e,t){for(var n=0;n<this.length;n++)if(this[n][e]===t)return this[n]},Array.prototype.clean=function(){for(var e=0;e<this.length;e++)""===this[e]&&(this.splice(e,1),e--);return this},Array.prototype.sortByKey=function(n){return this.sort(function(e,t){return e[n]<t[n]?-1:e[n]>t[n]?1:0}),this},MeetingMap.prototype.initialize=null,MeetingMap.prototype.showMap=null,MeetingMap.prototype.fillMap=null,MeetingMap.prototype.rowClick=null,MeetingMap.prototype.apiLoadedCallback=null,MeetingMap.prototype.refreshMeetings=null,MeetingMap.prototype.getDistanceFromSearch=null,MeetingMap.prototype.openModalWindow=null,MeetingMap.prototype.closeModalWindow=null,MeetingMap.prototype.loadPopupMap=null,MeetingMap.prototype.filterVisible=null,MeetingMap.prototype.hasMapSearch=null,MapDelegate.prototype.createMap=null,MapDelegate.prototype.addListener=null,MapDelegate.prototype.removeListener=null,MapDelegate.prototype.addControl=null,MapDelegate.prototype.setViewToPosition=null,MapDelegate.prototype.clearAllMarkers=null,MapDelegate.prototype.fromLatLngToPoint=null,MapDelegate.prototype.callGeocoder=null,MapDelegate.prototype.setZoom=null,MapDelegate.prototype.getZoom=null,MapDelegate.prototype.createMarker=null,MapDelegate.prototype.bindPopup=null,MapDelegate.prototype.addMarkerCallback=null,MapDelegate.prototype.contains=null,MapDelegate.prototype.getBounds=null,MapDelegate.prototype.invalidateSize=null,MapDelegate.prototype.zoomOut=null,MapDelegate.prototype.fitBounds=null,MapDelegate.prototype.openMarker=null,MapDelegate.prototype.isApiLoaded=null,MapDelegate.prototype.createClusterLayer=null,MapDelegate.prototype.addClusterLayer=null,MapDelegate.prototype.removeClusterLayer=null,MapDelegate.prototype.clickSearch=null,MapDelegate.prototype.getGeocodeCenter=null,MapDelegate.prototype.modalOn=null,MapDelegate.prototype.modalOff=null,MapDelegate.prototype.afterInit=null,MapDelegate.prototype.isMapDefined=null,MapDelegate.prototype.getCorners=null,MapDelegate.prototype.getCenter=null,MapDelegate.prototype.markSearchPoint=null,MapDelegate.prototype.getOpenMarker=null,function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).leaflet={})}(this,function(e){"use strict";function c(e){for(var t,n,i=1,o=arguments.length;i<o;i++)for(t in n=arguments[i])e[t]=n[t];return e}var s=Object.create||function(e){return t.prototype=e,new t};function t(){}function l(e,t){var n,i=Array.prototype.slice;return e.bind?e.bind.apply(e,i.call(arguments,1)):(n=i.call(arguments,2),function(){return e.apply(t,n.length?n.concat(i.call(arguments)):arguments)})}var n=0;function u(e){return"_leaflet_id"in e||(e._leaflet_id=++n),e._leaflet_id}function i(e,t,n){function i(){o=!1,a&&(r.apply(n,a),a=!1)}var o,a,r=function(){o?a=arguments:(e.apply(n,arguments),setTimeout(i,t),o=!0)};return r}function o(e,t,n){var i=t[1],o=i-(t=t[0]);return e===i&&n?e:((e-t)%o+o)%o+t}function d(){return!1}function a(e,t){return!1===t?e:(t=Math.pow(10,void 0===t?6:t),Math.round(e*t)/t)}function r(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function h(e){return r(e).split(/\s+/)}function p(e,t){for(var n in Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?s(e.options):{}),t)e.options[n]=t[n];return e.options}function m(e,t,n){var i,o=[];for(i in e)o.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(e[i]));return(t&&-1!==t.indexOf("?")?"&":"?")+o.join("&")}var f=/\{ *([\w_ -]+) *\}/g;function g(e,n){return e.replace(f,function(e,t){if(void 0===(t=n[t]))throw new Error("No value provided for variable "+e);return"function"==typeof t?t(n):t})}var _=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function y(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var w=0;function A(e){var t=+new Date,n=Math.max(0,16-(t-w));return w=t+n,window.setTimeout(e,n)}var k=window.requestAnimationFrame||b("RequestAnimationFrame")||A,x=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)};function S(e,t,n){if(!n||k!==A)return k.call(window,l(e,t));e.call(t)}function P(e){e&&x.call(window,e)}var M={__proto__:null,extend:c,create:s,bind:l,get lastId(){return n},stamp:u,throttle:i,wrapNum:o,falseFn:d,formatNum:a,trim:r,splitWords:h,setOptions:p,getParamString:m,template:g,isArray:_,indexOf:y,emptyImageUrl:v,requestFn:k,cancelFn:x,requestAnimFrame:S,cancelAnimFrame:P};function C(){}C.extend=function(e){function t(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var n,i=t.__super__=this.prototype,o=s(i);for(n in(o.constructor=t).prototype=o,this)Object.prototype.hasOwnProperty.call(this,n)&&"prototype"!==n&&"__super__"!==n&&(t[n]=this[n]);if(e.statics&&c(t,e.statics),e.includes){var a=e.includes;if("undefined"!=typeof L&&L&&L.Mixin)for(var a=_(a)?a:[a],r=0;r<a.length;r++)a[r]===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);c.apply(null,[o].concat(e.includes))}return c(o,e),delete o.statics,delete o.includes,o.options&&(o.options=i.options?s(i.options):{},c(o.options,e.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=o._initHooks.length;e<t;e++)o._initHooks[e].call(this)}},t},C.include=function(e){var t=this.prototype.options;return c(this.prototype,e),e.options&&(this.prototype.options=t,this.mergeOptions(e.options)),this},C.mergeOptions=function(e){return c(this.prototype.options,e),this},C.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var T={on:function(e,t,n){if("object"==typeof e)for(var i in e)this._on(i,e[i],t);else for(var o=0,a=(e=h(e)).length;o<a;o++)this._on(e[o],t,n);return this},off:function(e,t,n){if(arguments.length)if("object"==typeof e)for(var i in e)this._off(i,e[i],t);else{e=h(e);for(var o=1===arguments.length,a=0,r=e.length;a<r;a++)o?this._off(e[a]):this._off(e[a],t,n)}else delete this._events;return this},_on:function(e,t,n,i){"function"!=typeof t?console.warn("wrong listener type: "+typeof t):!1===this._listens(e,t,n)&&(t={fn:t,ctx:n=n===this?void 0:n},i&&(t.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t))},_off:function(e,t,n){var i,o,a;if(this._events&&(i=this._events[e]))if(1===arguments.length){if(this._firingCount)for(o=0,a=i.length;o<a;o++)i[o].fn=d;delete this._events[e]}else"function"!=typeof t?console.warn("wrong listener type: "+typeof t):!1!==(t=this._listens(e,t,n))&&(n=i[t],this._firingCount&&(n.fn=d,this._events[e]=i=i.slice()),i.splice(t,1))},fire:function(e,t,n){if(this.listens(e,n)){var i=c({},t,{type:e,target:this,sourceTarget:t&&t.sourceTarget||this});if(this._events){var o=this._events[e];if(o){this._firingCount=this._firingCount+1||1;for(var a=0,r=o.length;a<r;a++){var s=o[a],l=s.fn;s.once&&this.off(e,l,s.ctx),l.call(s.ctx||this,i)}this._firingCount--}}n&&this._propagateEvent(i)}return this},listens:function(e,t,n,i){"string"!=typeof e&&console.warn('"string" type argument expected');var o=t,a=("function"!=typeof t&&(i=!!t,n=o=void 0),this._events&&this._events[e]);if(a&&a.length&&!1!==this._listens(e,o,n))return!0;if(i)for(var r in this._eventParents)if(this._eventParents[r].listens(e,t,n,i))return!0;return!1},_listens:function(e,t,n){if(this._events){var i=this._events[e]||[];if(!t)return!!i.length;n===this&&(n=void 0);for(var o=0,a=i.length;o<a;o++)if(i[o].fn===t&&i[o].ctx===n)return o}return!1},once:function(e,t,n){if("object"==typeof e)for(var i in e)this._on(i,e[i],t,!0);else for(var o=0,a=(e=h(e)).length;o<a;o++)this._on(e[o],t,n,!0);return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[u(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[u(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,c({layer:e.target,propagatedFrom:e.target},e),!0)}},E=(T.addEventListener=T.on,T.removeEventListener=T.clearAllEventListeners=T.off,T.addOneTimeEventListener=T.once,T.fireEvent=T.fire,T.hasEventListeners=T.listens,C.extend(T));function O(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t}var D=Math.trunc||function(e){return 0<e?Math.floor(e):Math.ceil(e)};function z(e,t,n){return e instanceof O?e:_(e)?new O(e[0],e[1]):null==e?e:"object"==typeof e&&"x"in e&&"y"in e?new O(e.x,e.y):new O(e,t,n)}function I(e,t){if(e)for(var n=t?[e,t]:e,i=0,o=n.length;i<o;i++)this.extend(n[i])}function j(e,t){return!e||e instanceof I?e:new I(e,t)}function N(e,t){if(e)for(var n=t?[e,t]:e,i=0,o=n.length;i<o;i++)this.extend(n[i])}function B(e,t){return e instanceof N?e:new N(e,t)}function R(e,t,n){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==n&&(this.alt=+n)}function W(e,t,n){return e instanceof R?e:_(e)&&"object"!=typeof e[0]?3===e.length?new R(e[0],e[1],e[2]):2===e.length?new R(e[0],e[1]):null:null==e?e:"object"==typeof e&&"lat"in e?new R(e.lat,"lng"in e?e.lng:e.lon,e.alt):void 0===t?null:new R(e,t,n)}O.prototype={clone:function(){return new O(this.x,this.y)},add:function(e){return this.clone()._add(z(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(z(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new O(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new O(this.x/e.x,this.y/e.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=D(this.x),this.y=D(this.y),this},distanceTo:function(e){var t=(e=z(e)).x-this.x,e=e.y-this.y;return Math.sqrt(t*t+e*e)},equals:function(e){return(e=z(e)).x===this.x&&e.y===this.y},contains:function(e){return e=z(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+a(this.x)+", "+a(this.y)+")"}},I.prototype={extend:function(e){var t,n;if(e){if(e instanceof O||"number"==typeof e[0]||"x"in e)t=n=z(e);else if(t=(e=j(e)).min,n=e.max,!t||!n)return this;this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=t.clone(),this.max=n.clone())}return this},getCenter:function(e){return z((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return z(this.min.x,this.max.y)},getTopRight:function(){return z(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,n;return(e=("number"==typeof e[0]||e instanceof O?z:j)(e))instanceof I?(t=e.min,n=e.max):t=n=e,t.x>=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=j(e);var t=this.min,n=this.max,i=e.min,o=(e=e.max).x>=t.x&&i.x<=n.x,e=e.y>=t.y&&i.y<=n.y;return o&&e},overlaps:function(e){e=j(e);var t=this.min,n=this.max,i=e.min,o=(e=e.max).x>t.x&&i.x<n.x,e=e.y>t.y&&i.y<n.y;return o&&e},isValid:function(){return!(!this.min||!this.max)},pad:function(e){var t=this.min,n=this.max,i=Math.abs(t.x-n.x)*e,e=Math.abs(t.y-n.y)*e;return j(z(t.x-i,t.y-e),z(n.x+i,n.y+e))},equals:function(e){return!!e&&(e=j(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight()))}},N.prototype={extend:function(e){var t,n,i=this._southWest,o=this._northEast;if(e instanceof R)n=t=e;else{if(!(e instanceof N))return e?this.extend(W(e)||B(e)):this;if(t=e._southWest,n=e._northEast,!t||!n)return this}return i||o?(i.lat=Math.min(t.lat,i.lat),i.lng=Math.min(t.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new R(t.lat,t.lng),this._northEast=new R(n.lat,n.lng)),this},pad:function(e){var t=this._southWest,n=this._northEast,i=Math.abs(t.lat-n.lat)*e,e=Math.abs(t.lng-n.lng)*e;return new N(new R(t.lat-i,t.lng-e),new R(n.lat+i,n.lng+e))},getCenter:function(){return new R((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new R(this.getNorth(),this.getWest())},getSouthEast:function(){return new R(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){e=("number"==typeof e[0]||e instanceof R||"lat"in e?W:B)(e);var t,n,i=this._southWest,o=this._northEast;return e instanceof N?(t=e.getSouthWest(),n=e.getNorthEast()):t=n=e,t.lat>=i.lat&&n.lat<=o.lat&&t.lng>=i.lng&&n.lng<=o.lng},intersects:function(e){e=B(e);var t=this._southWest,n=this._northEast,i=e.getSouthWest(),o=(e=e.getNorthEast()).lat>=t.lat&&i.lat<=n.lat,e=e.lng>=t.lng&&i.lng<=n.lng;return o&&e},overlaps:function(e){e=B(e);var t=this._southWest,n=this._northEast,i=e.getSouthWest(),o=(e=e.getNorthEast()).lat>t.lat&&i.lat<n.lat,e=e.lng>t.lng&&i.lng<n.lng;return o&&e},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,t){return!!e&&(e=B(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t))},isValid:function(){return!(!this._southWest||!this._northEast)}};var H={latLngToPoint:function(e,t){return e=this.projection.project(e),t=this.scale(t),this.transformation._transform(e,t)},pointToLatLng:function(e,t){return t=this.scale(t),e=this.transformation.untransform(e,t),this.projection.unproject(e)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*Math.pow(2,e)},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){var t;return this.infinite?null:(t=this.projection.bounds,e=this.scale(e),new I(this.transformation.transform(t.min,e),this.transformation.transform(t.max,e)))},infinite:!(R.prototype={equals:function(e,t){return!!e&&(e=W(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+a(this.lat,e)+", "+a(this.lng,e)+")"},distanceTo:function(e){return F.distance(this,W(e))},wrap:function(){return F.wrapLatLng(this)},toBounds:function(e){var t=(e=180*e/40075017)/Math.cos(Math.PI/180*this.lat);return B([this.lat-e,this.lng-t],[this.lat+e,this.lng+t])},clone:function(){return new R(this.lat,this.lng,this.alt)}}),wrapLatLng:function(e){var t=this.wrapLng?o(e.lng,this.wrapLng,!0):e.lng;return new R(this.wrapLat?o(e.lat,this.wrapLat,!0):e.lat,t,e.alt)},wrapLatLngBounds:function(e){var t=e.getCenter(),n=this.wrapLatLng(t),i=t.lat-n.lat,t=t.lng-n.lng;return 0==i&&0==t?e:(n=e.getSouthWest(),e=e.getNorthEast(),new N(new R(n.lat-i,n.lng-t),new R(e.lat-i,e.lng-t)))}},F=c({},H,{wrapLng:[-180,180],R:6371e3,distance:function(e,t){var n=Math.PI/180,i=e.lat*n,o=t.lat*n,a=Math.sin((t.lat-e.lat)*n/2),t=Math.sin((t.lng-e.lng)*n/2),e=a*a+Math.cos(i)*Math.cos(o)*t*t,n=2*Math.atan2(Math.sqrt(e),Math.sqrt(1-e));return this.R*n}}),q={R:6378137,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,n=this.MAX_LATITUDE,n=Math.max(Math.min(n,e.lat),-n),n=Math.sin(n*t);return new O(this.R*e.lng*t,this.R*Math.log((1+n)/(1-n))/2)},unproject:function(e){var t=180/Math.PI;return new R((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:new I([-(q=6378137*Math.PI),-q],[q,q])};function Z(e,t,n,i){_(e)?(this._a=e[0],this._b=e[1],this._c=e[2],this._d=e[3]):(this._a=e,this._b=t,this._c=n,this._d=i)}function G(e,t,n,i){return new Z(e,t,n,i)}Z.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return e.x=(t=t||1)*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return new O((e.x/(t=t||1)-this._b)/this._a,(e.y/t-this._d)/this._c)}};var V=c({},F,{code:"EPSG:3857",projection:q,transformation:G(V=.5/(Math.PI*q.R),.5,-V,.5)}),U=c({},V,{code:"EPSG:900913"});function $(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Y(e,t){for(var n,i,o,a,r="",s=0,l=e.length;s<l;s++){for(n=0,i=(o=e[s]).length;n<i;n++)r+=(n?"L":"M")+(a=o[n]).x+" "+a.y;r+=t?Me.svg?"z":"x":""}return r||"M0 0"}var K=document.documentElement.style,Q=(bt="ActiveXObject"in window)&&!document.addEventListener,J="msLaunchUri"in navigator&&!("documentMode"in document),X=Pe("webkit"),ee=Pe("android"),te=Pe("android 2")||Pe("android 3"),ne=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ne=ee&&Pe("Google")&&ne<537&&!("AudioNode"in window),ie=!!window.opera,oe=!J&&Pe("chrome"),ae=Pe("gecko")&&!X&&!ie&&!bt,re=!oe&&Pe("safari"),se=Pe("phantom"),le="OTransition"in K,ce=0===navigator.platform.indexOf("Win"),ue=bt&&"transition"in K,de="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!te,K="MozPerspective"in K,he=!window.L_DISABLE_3D&&(ue||de||K)&&!le&&!se,pe=($n="undefined"!=typeof orientation||Pe("mobile"))&&X,me=$n&&de,fe=!window.PointerEvent&&window.MSPointerEvent,ge=!(!window.PointerEvent&&!fe),_e="ontouchstart"in window||!!window.TouchEvent,ye=!window.L_NO_TOUCH&&(_e||ge),ve=$n&&ie,be=$n&&ae,we=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),Ae=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",d,t),window.removeEventListener("testPassiveEventSupport",d,t)}catch(e){}return e}(),ke=!!document.createElement("canvas").getContext,xe=!(!document.createElementNS||!$("svg").createSVGRect),Se=!!xe&&((Se=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Se.firstChild&&Se.firstChild.namespaceURI));function Pe(e){return 0<=navigator.userAgent.toLowerCase().indexOf(e)}var Me={ie:bt,ielt9:Q,edge:J,webkit:X,android:ee,android23:te,androidStock:ne,opera:ie,chrome:oe,gecko:ae,safari:re,phantom:se,opera12:le,win:ce,ie3d:ue,webkit3d:de,gecko3d:K,any3d:he,mobile:$n,mobileWebkit:pe,mobileWebkit3d:me,msPointer:fe,pointer:ge,touch:ye,touchNative:_e,mobileOpera:ve,mobileGecko:be,retina:we,passiveEvents:Ae,canvas:ke,svg:xe,vml:!xe&&function(){try{var e=document.createElement("div"),t=(e.innerHTML='<v:shape adj="1"/>',e.firstChild);return t.style.behavior="url(#default#VML)",t&&"object"==typeof t.adj}catch(e){return!1}}(),inlineSvg:Se,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Ce=Me.msPointer?"MSPointerDown":"pointerdown",Le=Me.msPointer?"MSPointerMove":"pointermove",Te=Me.msPointer?"MSPointerUp":"pointerup",Ee=Me.msPointer?"MSPointerCancel":"pointercancel",Oe={touchstart:Ce,touchmove:Le,touchend:Te,touchcancel:Ee},De={touchstart:function(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Tt(t),Re(e,t)},touchmove:Re,touchend:Re,touchcancel:Re},ze={},Ie=!1;function je(e){ze[e.pointerId]=e}function Ne(e){ze[e.pointerId]&&(ze[e.pointerId]=e)}function Be(e){delete ze[e.pointerId]}function Re(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in t.touches=[],ze)t.touches.push(ze[n]);t.changedTouches=[t],e(t)}}var We=200;var He,Fe,qe,Ze,Ge,Ve=lt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ue=lt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),$e="webkitTransition"===Ue||"OTransition"===Ue?Ue+"End":"transitionend";function Ye(e){return"string"==typeof e?document.getElementById(e):e}function Ke(e,t){var n=e.style[t]||e.currentStyle&&e.currentStyle[t];return"auto"===(n=n&&"auto"!==n||!document.defaultView?n:(e=document.defaultView.getComputedStyle(e,null))?e[t]:null)?null:n}function Qe(e,t,n){return(e=document.createElement(e)).className=t||"",n&&n.appendChild(e),e}function Je(e){var t=e.parentNode;t&&t.removeChild(e)}function Xe(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function et(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function tt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function nt(e,t){return void 0!==e.classList?e.classList.contains(t):0<(e=rt(e)).length&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e)}function it(e,t){var n;if(void 0!==e.classList)for(var i=h(t),o=0,a=i.length;o<a;o++)e.classList.add(i[o]);else nt(e,t)||at(e,((n=rt(e))?n+" ":"")+t)}function ot(e,t){void 0!==e.classList?e.classList.remove(t):at(e,r((" "+rt(e)+" ").replace(" "+t+" "," ")))}function at(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}function rt(e){return void 0===(e=e.correspondingElement||e).className.baseVal?e.className:e.className.baseVal}function st(e,t){if("opacity"in e.style)e.style.opacity=t;else if("filter"in e.style){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=e.filters.item(i)}catch(e){if(1===t)return}t=Math.round(100*t),n?(n.Enabled=100!==t,n.Opacity=t):e.style.filter+=" progid:"+i+"(opacity="+t+")"}}function lt(e){for(var t=document.documentElement.style,n=0;n<e.length;n++)if(e[n]in t)return e[n];return!1}function ct(e,t,n){t=t||new O(0,0),e.style[Ve]=(Me.ie3d?"translate("+t.x+"px,"+t.y+"px)":"translate3d("+t.x+"px,"+t.y+"px,0)")+(n?" scale("+n+")":"")}function ut(e,t){e._leaflet_pos=t,Me.any3d?ct(e,t):(e.style.left=t.x+"px",e.style.top=t.y+"px")}function dt(e){return e._leaflet_pos||new O(0,0)}function ht(){yt(window,"dragstart",Tt)}function pt(){At(window,"dragstart",Tt)}function mt(e){for(;-1===e.tabIndex;)e=e.parentNode;e.style&&(ft(),Ge=(Ze=e).style.outlineStyle,e.style.outlineStyle="none",yt(window,"keydown",ft))}function ft(){Ze&&(Ze.style.outlineStyle=Ge,Ge=Ze=void 0,At(window,"keydown",ft))}function gt(e){for(;!((e=e.parentNode).offsetWidth&&e.offsetHeight||e===document.body););return e}function _t(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}function yt(e,t,n,i){if(t&&"object"==typeof t)for(var o in t)St(e,o,t[o],n);else for(var a=0,r=(t=h(t)).length;a<r;a++)St(e,t[a],n,i);return this}var vt="onselectstart"in document?(qe=function(){yt(window,"selectstart",Tt)},function(){At(window,"selectstart",Tt)}):(Fe=lt(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),qe=function(){var e;Fe&&(e=document.documentElement.style,He=e[Fe],e[Fe]="none")},function(){Fe&&(document.documentElement.style[Fe]=He,He=void 0)}),bt={__proto__:null,TRANSFORM:Ve,TRANSITION:Ue,TRANSITION_END:$e,get:Ye,getStyle:Ke,create:Qe,remove:Je,empty:Xe,toFront:et,toBack:tt,hasClass:nt,addClass:it,removeClass:ot,setClass:at,getClass:rt,setOpacity:st,testProp:lt,setTransform:ct,setPosition:ut,getPosition:dt,get disableTextSelection(){return qe},get enableTextSelection(){return vt},disableImageDrag:ht,enableImageDrag:pt,preventOutline:mt,restoreOutline:ft,getSizedParentNode:gt,getScale:_t},wt="_leaflet_events";function At(e,t,n,i){if(1===arguments.length)kt(e),delete e[wt];else if(t&&"object"==typeof t)for(var o in t)Pt(e,o,t[o],n);else if(t=h(t),2===arguments.length)kt(e,function(e){return-1!==y(t,e)});else for(var a=0,r=t.length;a<r;a++)Pt(e,t[a],n,i);return this}function kt(e,t){for(var n in e[wt]){var i=n.split(/\d/)[0];t&&!t(i)||Pt(e,i,null,null,n)}}var xt={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function St(t,e,n,i){var o,a,r=e+u(n)+(i?"_"+u(i):"");t[wt]&&t[wt][r]||(a=o=function(e){return n.call(i||t,e||window.event)},!Me.touchNative&&Me.pointer&&0===e.indexOf("touch")?o=function(e,t,n){return"touchstart"!==t||Ie||(document.addEventListener(Ce,je,!0),document.addEventListener(Le,Ne,!0),document.addEventListener(Te,Be,!0),document.addEventListener(Ee,Be,!0),Ie=!0),De[t]?(n=De[t].bind(this,n),e.addEventListener(Oe[t],n,!1),n):(console.warn("wrong event specified:",t),d)}(t,e,o):Me.touch&&"dblclick"===e?o=function(e,n){e.addEventListener("dblclick",n);var i,o=0;function t(e){var t;1!==e.detail?i=e.detail:"mouse"===e.pointerType||e.sourceCapabilities&&!e.sourceCapabilities.firesTouchEvents||(t=Ot(e)).some(function(e){return e instanceof HTMLLabelElement&&e.attributes.for})&&!t.some(function(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement})||((t=Date.now())-o<=We?2==++i&&n(function(e){var t,n,i={};for(n in e)t=e[n],i[n]=t&&t.bind?t.bind(e):t;return(e=i).type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}(e)):i=1,o=t)}return e.addEventListener("click",t),{dblclick:n,simDblclick:t}}(t,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(xt[e]||e,o,!!Me.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?t.addEventListener(xt[e],o=function(e){e=e||window.event,jt(t,e)&&a(e)},!1):t.addEventListener(e,a,!1):t.attachEvent("on"+e,o),t[wt]=t[wt]||{},t[wt][r]=o)}function Pt(e,t,n,i,o){var a,r;o=o||t+u(n)+(i?"_"+u(i):""),(n=e[wt]&&e[wt][o])&&(!Me.touchNative&&Me.pointer&&0===t.indexOf("touch")?(i=e,r=n,Oe[a=t]?i.removeEventListener(Oe[a],r,!1):console.warn("wrong event specified:",a)):Me.touch&&"dblclick"===t?((r=e).removeEventListener("dblclick",(i=n).dblclick),r.removeEventListener("click",i.simDblclick)):"removeEventListener"in e?e.removeEventListener(xt[t]||t,n,!1):e.detachEvent("on"+t,n),e[wt][o]=null)}function Mt(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function Ct(e){return St(e,"wheel",Mt),this}function Lt(e){return yt(e,"mousedown touchstart dblclick contextmenu",Mt),e._leaflet_disable_click=!0,this}function Tt(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function Et(e){return Tt(e),Mt(e),this}function Ot(e){if(e.composedPath)return e.composedPath();for(var t=[],n=e.target;n;)t.push(n),n=n.parentNode;return t}function Dt(e,t){var n,i;return t?(i=(n=_t(t)).boundingClientRect,new O((e.clientX-i.left)/n.x-t.clientLeft,(e.clientY-i.top)/n.y-t.clientTop)):new O(e.clientX,e.clientY)}var zt=Me.linux&&Me.chrome?window.devicePixelRatio:Me.mac?3*window.devicePixelRatio:0<window.devicePixelRatio?2*window.devicePixelRatio:1;function It(e){return Me.edge?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/zt:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}function jt(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch(e){return!1}return n!==e}var Q={__proto__:null,on:yt,off:At,stopPropagation:Mt,disableScrollPropagation:Ct,disableClickPropagation:Lt,preventDefault:Tt,stop:Et,getPropagationPath:Ot,getMousePosition:Dt,getWheelDelta:It,isExternalTarget:jt,addListener:yt,removeListener:At},Nt=E.extend({run:function(e,t,n,i){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=dt(e),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=S(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,n=1e3*this._duration;t<n?this._runFrame(this._easeOut(t/n),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){e=this._startPos.add(this._offset.multiplyBy(e)),t&&e._round(),ut(this._el,e),this.fire("step")},_complete:function(){P(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),Bt=E.extend({options:{crs:V,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(e,t){t=p(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=l(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(W(t.center),t.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Ue&&Me.any3d&&!Me.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),yt(this._proxy,$e,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,t,n){return t=void 0===t?this._zoom:this._limitZoom(t),e=this._limitCenter(W(e),t,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=c({animate:n.animate},n.zoom),n.pan=c({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,n.zoom):this._tryAnimatedPan(e,n.pan))?clearTimeout(this._sizeTimer):this._resetView(e,t,n.pan&&n.pan.noMoveStart),this},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,t){return e=e||(Me.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e=e||(Me.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,n){var i=this.getZoomScale(t),o=this.getSize().divideBy(2),e=(e instanceof O?e:this.latLngToContainerPoint(e)).subtract(o).multiplyBy(1-1/i),i=this.containerPointToLatLng(o.add(e));return this.setView(i,t,{zoom:n})},_getBoundsCenterZoom:function(e,t){t=t||{},e=e.getBounds?e.getBounds():B(e);var n=z(t.paddingTopLeft||t.padding||[0,0]),i=z(t.paddingBottomRight||t.padding||[0,0]),o=this.getBoundsZoom(e,!1,n.add(i));return(o="number"==typeof t.maxZoom?Math.min(t.maxZoom,o):o)===1/0?{center:e.getCenter(),zoom:o}:(t=i.subtract(n).divideBy(2),i=this.project(e.getSouthWest(),o),n=this.project(e.getNorthEast(),o),{center:this.unproject(i.add(n).divideBy(2).add(t),o),zoom:o})},fitBounds:function(e,t){if((e=B(e)).isValid())return e=this._getBoundsCenterZoom(e,t),this.setView(e.center,e.zoom,t);throw new Error("Bounds are not valid.")},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){var n;return t=t||{},(e=z(e).round()).x||e.y?(!0===t.animate||this.getSize().contains(e)?(this._panAnim||(this._panAnim=new Nt,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),!1!==t.animate?(it(this._mapPane,"leaflet-pan-anim"),n=this._getMapPanePos().subtract(e).round(),this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)):(this._rawPanBy(e),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this):this.fire("moveend")},flyTo:function(o,a,e){if(!1===(e=e||{}).animate||!Me.any3d)return this.setView(o,a,e);this._stop();var r=this.project(this.getCenter()),s=this.project(o),t=this.getSize(),l=this._zoom,c=(o=W(o),a=void 0===a?l:a,Math.max(t.x,t.y)),n=c*this.getZoomScale(l,a),u=s.distanceTo(r)||1,d=1.42,h=d*d;function i(e){return e=(n*n-c*c+(e?-1:1)*h*h*u*u)/(2*(e?n:c)*h*u),(e=Math.sqrt(e*e+1)-e)<1e-9?-18:Math.log(e)}function p(e){return(Math.exp(e)-Math.exp(-e))/2}function m(e){return(Math.exp(e)+Math.exp(-e))/2}var f=i(0);var g=Date.now(),_=(i(1)-f)/d,y=e.duration?1e3*e.duration:1e3*_*.8;return this._moveStart(!0,e.noMoveStart),function e(){var t,n=(Date.now()-g)/y,i=(1-Math.pow(1-n,1.5))*_;n<=1?(this._flyToFrame=S(e,this),this._move(this.unproject(r.add(s.subtract(r).multiplyBy((t=i,c*(m(f)*(p(t=f+d*t)/m(t))-p(f))/h/u))),l),this.getScaleZoom(c/(n=i,c*(m(f)/m(f+d*n))),l),{flyTo:!0})):this._move(o,a)._moveEnd(!0)}.call(this),this},flyToBounds:function(e,t){return e=this._getBoundsCenterZoom(e,t),this.flyTo(e.center,e.zoom,t)},setMaxBounds:function(e){return e=B(e),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var n=this.getCenter(),e=this._limitCenter(n,this._zoom,B(e));return n.equals(e)||this.panTo(e,t),this._enforcingBounds=!1,this},panInside:function(e,t){var n=z((t=t||{}).paddingTopLeft||t.padding||[0,0]),i=z(t.paddingBottomRight||t.padding||[0,0]),o=this.project(this.getCenter()),e=this.project(e),a=(n=j([(a=this.getPixelBounds()).min.add(n),a.max.subtract(i)])).getSize();return n.contains(e)||(this._enforcingBounds=!0,i=e.subtract(n.getCenter()),n=n.extend(e).getSize().subtract(a),o.x+=i.x<0?-n.x:n.x,o.y+=i.y<0?-n.y:n.y,this.panTo(this.unproject(o),t),this._enforcingBounds=!1),this},invalidateSize:function(e){if(!this._loaded)return this;e=c({animate:!1,pan:!0},!0===e?{animate:!0}:e);var t=this.getSize(),n=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),i=t.divideBy(2).round(),o=n.divideBy(2).round();return(i=i.subtract(o)).x||i.y?(e.animate&&e.pan?this.panBy(i):(e.pan&&this._rawPanBy(i),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(l(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:t,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){var t,n;return e=this._locateOptions=c({timeout:1e4,watch:!1},e),"geolocation"in navigator?(t=l(this._handleGeolocationResponse,this),n=l(this._handleGeolocationError,this),e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,n,e):navigator.geolocation.getCurrentPosition(t,n,e)):this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){var t;this._container._leaflet_id&&(t=e.code,e=e.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: "+e+"."}))},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t,n,i=new R(e.coords.latitude,e.coords.longitude),o=i.toBounds(2*e.coords.accuracy),a=this._locateOptions,r=(a.setView&&(t=this.getBoundsZoom(o),this.setView(i,a.maxZoom?Math.min(t,a.maxZoom):t)),{latlng:i,bounds:o,timestamp:e.timestamp});for(n in e.coords)"number"==typeof e.coords[n]&&(r[n]=e.coords[n]);this.fire("locationfound",r)}},addHandler:function(e,t){return t&&(t=this[e]=new t(this),this._handlers.push(t),this.options[e]&&t.enable()),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}for(var e in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),Je(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(P(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();for(e in this._panes)Je(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){return t=Qe("div","leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),t||this._mapPane),e&&(this._panes[e]=t),t},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new N(this.unproject(e.getBottomLeft()),this.unproject(e.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(e,t,n){e=B(e),n=z(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),a=this.getMaxZoom(),r=e.getNorthWest(),e=e.getSouthEast(),n=this.getSize().subtract(n),e=j(this.project(e,i),this.project(r,i)).getSize(),r=Me.any3d?this.options.zoomSnap:1,s=n.x/e.x,n=n.y/e.y,e=t?Math.max(s,n):Math.min(s,n),i=this.getScaleZoom(e,i);return r&&(i=Math.round(i/(r/100))*(r/100),i=t?Math.ceil(i/r)*r:Math.floor(i/r)*r),Math.max(o,Math.min(a,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){return new I(e=this._getTopLeftPoint(e,t),e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(void 0===e?this.getZoom():e)},getPane:function(e){return"string"==typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var n=this.options.crs;return t=void 0===t?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n=this.options.crs,e=(t=void 0===t?this._zoom:t,n.zoom(e*n.scale(t)));return isNaN(e)?1/0:e},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(W(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(z(e),t)},layerPointToLatLng:function(e){return e=z(e).add(this.getPixelOrigin()),this.unproject(e)},latLngToLayerPoint:function(e){return this.project(W(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(W(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(B(e))},distance:function(e,t){return this.options.crs.distance(W(e),W(t))},containerPointToLayerPoint:function(e){return z(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return z(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){return e=this.containerPointToLayerPoint(z(e)),this.layerPointToLatLng(e)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(W(e)))},mouseEventToContainerPoint:function(e){return Dt(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){if(!(e=this._container=Ye(e)))throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");yt(e,"scroll",this._onScroll,this),this._containerId=u(e)},_initLayout:function(){var e=this._container,t=(this._fadeAnimated=this.options.fadeAnimation&&Me.any3d,it(e,"leaflet-container"+(Me.touch?" leaflet-touch":"")+(Me.retina?" leaflet-retina":"")+(Me.ielt9?" leaflet-oldie":"")+(Me.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),Ke(e,"position"));"absolute"!==t&&"relative"!==t&&"fixed"!==t&&"sticky"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ut(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(it(e.markerPane,"leaflet-zoom-hide"),it(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t,n){ut(this._mapPane,new O(0,0));var i=!this._loaded,o=(this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset"),this._zoom!==t);this._moveStart(o,n)._move(e,t)._moveEnd(o),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,n,i){void 0===t&&(t=this._zoom);var o=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),i?n&&n.pinch&&this.fire("zoom",n):((o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return P(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){ut(this._mapPane,this._getMapPanePos().subtract(e))},_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(e){this._targets={};var t=e?At:yt;t((this._targets[u(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&t(window,"resize",this._onResize,this),Me.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){P(this._resizeRequest),this._resizeRequest=S(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var n,i=[],o="mouseout"===t||"mouseover"===t,a=e.target||e.srcElement,r=!1;a;){if((n=this._targets[u(a)])&&("click"===t||"preclick"===t)&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(t,!0)){if(o&&!jt(a,e))break;if(i.push(n),o)break}if(a===this._container)break;a=a.parentNode}return i.length||r||o||!this.listens(t,!0)?i:[this]},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t,n=e.target||e.srcElement;!this._loaded||n._leaflet_disable_events||"click"===e.type&&this._isClickDisabled(n)||("mousedown"===(t=e.type)&&mt(n),this._fireDOMEvent(e,t))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,t,n){"click"===e.type&&((s=c({},e)).type="preclick",this._fireDOMEvent(s,s.type,n));var i=this._findEventTargets(e,t);if(n){for(var o=[],a=0;a<n.length;a++)n[a].listens(t,!0)&&o.push(n[a]);i=o.concat(i)}if(i.length){"contextmenu"===t&&Tt(e);var r,s=i[0],l={originalEvent:e};for("keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type&&(r=s.getLatLng&&(!s._radius||s._radius<=10),l.containerPoint=r?this.latLngToContainerPoint(s.getLatLng()):this.mouseEventToContainerPoint(e),l.layerPoint=this.containerPointToLayerPoint(l.containerPoint),l.latlng=r?s.getLatLng():this.layerPointToLatLng(l.layerPoint)),a=0;a<i.length;a++)if(i[a].fire(t,l,!0),l.originalEvent._stopped||!1===i[a].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,t))return}},_draggableMoved:function(e){return(e=e.dragging&&e.dragging.enabled()?e:this).dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on("load",e,t),this},_getMapPanePos:function(){return dt(this._mapPane)||new O(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){return(e&&void 0!==t?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,n){return n=this._getNewPixelOrigin(n,t),this.project(e,t)._subtract(n)},_latLngBoundsToNewLayerBounds:function(e,t,n){return n=this._getNewPixelOrigin(n,t),j([this.project(e.getSouthWest(),t)._subtract(n),this.project(e.getNorthWest(),t)._subtract(n),this.project(e.getSouthEast(),t)._subtract(n),this.project(e.getNorthEast(),t)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,n){var i,o;return!n||(i=this.project(e,t),o=this.getSize().divideBy(2),o=new I(i.subtract(o),i.add(o)),o=this._getBoundsOffset(o,n,t),Math.abs(o.x)<=1&&Math.abs(o.y)<=1)?e:this.unproject(i.add(o),t)},_limitOffset:function(e,t){var n;return t?(n=new I((n=this.getPixelBounds()).min.add(e),n.max.add(e)),e.add(this._getBoundsOffset(n,t))):e},_getBoundsOffset:function(e,t,n){return n=(t=j(this.project(t.getNorthEast(),n),this.project(t.getSouthWest(),n))).min.subtract(e.min),t=t.max.subtract(e.max),new O(this._rebound(n.x,-t.x),this._rebound(n.y,-t.y))},_rebound:function(e,t){return 0<e+t?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom(),i=Me.any3d?this.options.zoomSnap:1;return i&&(e=Math.round(e/i)*i),Math.max(t,Math.min(n,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ot(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){return e=this._getCenterOffset(e)._trunc(),!(!0!==(t&&t.animate)&&!this.getSize().contains(e)||(this.panBy(e,t),0))},_createAnimProxy:function(){var e=this._proxy=Qe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(e){var t=Ve,n=this._proxy.style[t];ct(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Je(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();ct(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&0<=e.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,n){if(!this._animatingZoom){if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(t),i=this._getCenterOffset(e)._divideBy(1-1/i);if(!0!==n.animate&&!this.getSize().contains(i))return!1;S(function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(e,t,!0)},this)}return!0},_animateZoom:function(e,t,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,it(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(l(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ot(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Rt(e){return new Wt(e)}var Wt=C.extend({options:{position:"topright"},initialize:function(e){p(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),e=e._controlCorners[n];return it(t,"leaflet-control"),-1!==n.indexOf("bottom")?e.insertBefore(t,e.firstChild):e.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(Je(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(e){this._map&&e&&0<e.screenX&&0<e.screenY&&this._map.getContainer().focus()}}),Ht=(Bt.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var n=this._controlCorners={},i="leaflet-",o=this._controlContainer=Qe("div",i+"control-container",this._container);function e(e,t){n[e+t]=Qe("div",i+e+" "+i+t,o)}e("top","left"),e("top","right"),e("bottom","left"),e("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)Je(this._controlCorners[e]);Je(this._controlContainer),delete this._controlCorners,delete this._controlContainer}}),Wt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,i){return n<i?-1:i<n?1:0}},initialize:function(e,t,n){for(var i in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,e)this._addLayer(e[i],i);for(i in t)this._addLayer(t[i],i,!0)},onAdd:function(e){this._initLayout(),this._update(),(this._map=e).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(e){return Wt.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){return e.off("add remove",this._onLayerChange,this),(e=this._getLayer(u(e)))&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){it(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(it(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=e+"px"):ot(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ot(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=Qe("div",e),n=this.options.collapsed,i=(t.setAttribute("aria-haspopup",!0),Lt(t),Ct(t),this._section=Qe("section",e+"-list")),o=(n&&(this._map.on("click",this.collapse,this),yt(t,{mouseenter:this._expandSafely,mouseleave:this.collapse},this)),this._layersLink=Qe("a",e+"-toggle",t));o.href="#",o.title="Layers",o.setAttribute("role","button"),yt(o,{keydown:function(e){13===e.keyCode&&this._expandSafely()},click:function(e){Tt(e),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=Qe("div",e+"-base",i),this._separator=Qe("div",e+"-separator",i),this._overlaysList=Qe("div",e+"-overlays",i),t.appendChild(i)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&u(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,n){this._map&&e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:n}),this.options.sortLayers&&this._layers.sort(l(function(e,t){return this.options.sortFunction(e.layer,t.layer,e.name,t.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(this._container){Xe(this._baseLayersList),Xe(this._overlaysList),this._layerControlInputs=[];for(var e,t,n,i=0,o=0;o<this._layers.length;o++)n=this._layers[o],this._addItem(n),t=t||n.overlay,e=e||!n.overlay,i+=n.overlay?0:1;this.options.hideSingleBase&&(this._baseLayersList.style.display=(e=e&&1<i)?"":"none"),this._separator.style.display=t&&e?"":"none"}return this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(u(e.target));(e=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null)&&this._map.fire(e,t)},_createRadioElement:function(e,t){return e='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(t?' checked="checked"':"")+"/>",(t=document.createElement("div")).innerHTML=e,t.firstChild},_addItem:function(e){var t,n=document.createElement("label"),i=this._map.hasLayer(e.layer),o=((i=(e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=i):t=this._createRadioElement("leaflet-base-layers_"+u(this),i),this._layerControlInputs.push(t),t.layerId=u(e.layer),yt(t,"click",this._onInputClick,this),document.createElement("span"))).innerHTML=" "+e.name,document.createElement("span"));return n.appendChild(o),o.appendChild(t),o.appendChild(i),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var e,t,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var a=n.length-1;0<=a;a--)e=n[a],t=this._getLayer(e.layerId).layer,e.checked?i.push(t):e.checked||o.push(t);for(a=0;a<o.length;a++)this._map.hasLayer(o[a])&&this._map.removeLayer(o[a]);for(a=0;a<i.length;a++)this._map.hasLayer(i[a])||this._map.addLayer(i[a]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e,t,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;0<=o;o--)e=n[o],t=this._getLayer(e.layerId).layer,e.disabled=void 0!==t.options.minZoom&&i<t.options.minZoom||void 0!==t.options.maxZoom&&i>t.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section,t=(this._preventClick=!0,yt(e,"click",Tt),this.expand(),this);setTimeout(function(){At(e,"click",Tt),t._preventClick=!1})}})),Ft=Wt.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",n=Qe("div",t+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,t+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,t+"-out",n,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(e){e.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(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,n,i,o){return(n=Qe("a",n,i)).innerHTML=e,n.href="#",n.title=t,n.setAttribute("role","button"),n.setAttribute("aria-label",t),Lt(n),yt(n,"click",Et),yt(n,"click",o,this),yt(n,"click",this._refocusOnMap,this),n},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";ot(this._zoomInButton,t),ot(this._zoomOutButton,t),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&e._zoom!==e.getMinZoom()||(it(this._zoomOutButton,t),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&e._zoom!==e.getMaxZoom()||(it(this._zoomInButton,t),this._zoomInButton.setAttribute("aria-disabled","true"))}}),qt=(Bt.mergeOptions({zoomControl:!0}),Bt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ft,this.addControl(this.zoomControl))}),Wt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",n=Qe("div",t),i=this.options;return this._addScales(i,t+"-line",n),e.on(i.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=Qe("div",t,n)),e.imperial&&(this._iScale=Qe("div",t,n))},_update:function(){var e=(t=this._map).getSize().y/2,t=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(t)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e);this._updateScale(this._mScale,t<1e3?t+" m":t/1e3+" km",t/e)},_updateImperial:function(e){var t,n;5280<(e=3.2808399*e)?(n=this._getRoundNum(t=e/5280),this._updateScale(this._iScale,n+" mi",n/t)):(n=this._getRoundNum(e),this._updateScale(this._iScale,n+" ft",n/e))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1);return t*(10<=(e=e/t)?10:5<=e?5:3<=e?3:2<=e?2:1)}})),Zt=Wt.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Me.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(e){p(this,e),this._attributions={}},onAdd:function(e){for(var t in(e.attributionControl=this)._container=Qe("div","leaflet-control-attribution"),Lt(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e&&(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update()),this},removeAttribution:function(e){return e&&this._attributions[e]&&(this._attributions[e]--,this._update()),this},_update:function(){if(this._map){var e,t=[];for(e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}}),X=((J=(Bt.mergeOptions({attributionControl:!0}),Bt.addInitHook(function(){this.options.attributionControl&&(new Zt).addTo(this)}),Wt.Layers=Ht,Wt.Zoom=Ft,Wt.Scale=qt,Wt.Attribution=Zt,Rt.layers=function(e,t,n){return new Ht(e,t,n)},Rt.zoom=function(e){return new Ft(e)},Rt.scale=function(e){return new qt(e)},Rt.attribution=function(e){return new Zt(e)},C.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}}))).addTo=function(e,t){return e.addHandler(t,this),this},{Events:T}),Gt=Me.touch?"touchstart mousedown":"mousedown",Vt=E.extend({options:{clickTolerance:3},initialize:function(e,t,n,i){p(this,i),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||(yt(this._dragStartTarget,Gt,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Vt._dragging===this&&this.finishDrag(!0),At(this._dragStartTarget,Gt,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){var t,n;this._enabled&&(this._moved=!1,nt(this._element,"leaflet-zoom-anim")||(e.touches&&1!==e.touches.length?Vt._dragging===this&&this.finishDrag():Vt._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches||((Vt._dragging=this)._preventOutline&&mt(this._element),ht(),qe(),this._moving||(this.fire("down"),n=e.touches?e.touches[0]:e,t=gt(this._element),this._startPoint=new O(n.clientX,n.clientY),this._startPos=dt(this._element),this._parentScale=_t(t),n="mousedown"===e.type,yt(document,n?"mousemove":"touchmove",this._onMove,this),yt(document,n?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(e){var t;this._enabled&&(e.touches&&1<e.touches.length?this._moved=!0:!(t=new O((t=e.touches&&1===e.touches.length?e.touches[0]:e).clientX,t.clientY)._subtract(this._startPoint)).x&&!t.y||Math.abs(t.x)+Math.abs(t.y)<this.options.clickTolerance||(t.x/=this._parentScale.x,t.y/=this._parentScale.y,Tt(e),this._moved||(this.fire("dragstart"),this._moved=!0,it(document.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),it(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(t),this._moving=!0,this._lastEvent=e,this._updatePosition()))},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire("predrag",e),ut(this._element,this._newPos),this.fire("drag",e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){ot(document.body,"leaflet-dragging"),this._lastTarget&&(ot(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),At(document,"mousemove touchmove",this._onMove,this),At(document,"mouseup touchend touchcancel",this._onUp,this),pt(),vt();var t=this._moved&&this._moving;this._moving=!1,Vt._dragging=!1,t&&this.fire("dragend",{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function Ut(e,t,n){for(var i,o,a,r,s,l,c,u=[1,4,2,8],d=0,h=e.length;d<h;d++)e[d]._code=tn(e[d],t);for(a=0;a<4;a++){for(l=u[a],i=[],d=0,o=(h=e.length)-1;d<h;o=d++)r=e[d],s=e[o],r._code&l?s._code&l||((c=en(s,r,l,t,n))._code=tn(c,t),i.push(c)):(s._code&l&&((c=en(s,r,l,t,n))._code=tn(c,t),i.push(c)),i.push(r));e=i}return e}function $t(e,t){var n,i,o,a,r,s,l;if(!e||0===e.length)throw new Error("latlngs not passed");on(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);for(var c=W([0,0]),u=B(e),d=(u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(c=Yt(e)),e.length),h=[],p=0;p<d;p++){var m=W(e[p]);h.push(t.project(W([m.lat-c.lat,m.lng-c.lng])))}for(p=r=s=l=0,n=d-1;p<d;n=p++)i=h[p],o=h[n],a=i.y*o.x-o.y*i.x,s+=(i.x+o.x)*a,l+=(i.y+o.y)*a,r+=3*a;return u=0===r?h[0]:[s/r,l/r],W([(u=t.unproject(z(u))).lat+c.lat,u.lng+c.lng])}function Yt(e){for(var t=0,n=0,i=0,o=0;o<e.length;o++){var a=W(e[o]);t+=a.lat,n+=a.lng,i++}return W([t/i,n/i])}var Kt,ee={__proto__:null,clipPolygon:Ut,polygonCenter:$t,centroid:Yt};function Qt(e,t){if(t&&e.length){var n=e=function(e,t){for(var n,i,o,a=[e[0]],r=1,s=0,l=e.length;r<l;r++)n=e[r],i=e[s],o=void 0,(o=i.x-n.x)*o+(i=i.y-n.y)*i>t&&(a.push(e[r]),s=r);return s<l-1&&a.push(e[l-1]),a}(e,t*=t),i=n.length,o=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);o[0]=o[i-1]=1,function e(t,n,i,o,a){for(var r,s,l=0,c=o+1;c<=a-1;c++)l<(s=nn(t[c],t[o],t[a],!0))&&(r=c,l=s);i<l&&(n[r]=1,e(t,n,i,o,r),e(t,n,i,r,a))}(n,o,t,0,i-1);for(var a=[],r=0;r<i;r++)o[r]&&a.push(n[r]);return a}return e.slice()}function Jt(e,t,n){return Math.sqrt(nn(e,t,n,!0))}function Xt(e,t,n,i,o){var a,r,s,l=i?Kt:tn(e,n),c=tn(t,n);for(Kt=c;;){if(!(l|c))return[e,t];if(l&c)return!1;s=tn(r=en(e,t,a=l||c,n,o),n),a===l?(e=r,l=s):(t=r,c=s)}}function en(e,t,n,i,o){var a,r,s=t.x-e.x,t=t.y-e.y,l=i.min,i=i.max;return 8&n?(a=e.x+s*(i.y-e.y)/t,r=i.y):4&n?(a=e.x+s*(l.y-e.y)/t,r=l.y):2&n?(a=i.x,r=e.y+t*(i.x-e.x)/s):1&n&&(a=l.x,r=e.y+t*(l.x-e.x)/s),new O(a,r,o)}function tn(e,t){var n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n}function nn(e,t,n,i){var o=t.x,t=t.y,a=n.x-o,r=n.y-t,s=a*a+r*r;return 0<s&&(1<(s=((e.x-o)*a+(e.y-t)*r)/s)?(o=n.x,t=n.y):0<s&&(o+=a*s,t+=r*s)),a=e.x-o,r=e.y-t,i?a*a+r*r:new O(o,t)}function on(e){return!_(e[0])||"object"!=typeof e[0][0]&&void 0!==e[0][0]}function an(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),on(e)}function rn(e,t){var n,i,o,a,r,s;if(!e||0===e.length)throw new Error("latlngs not passed");on(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);for(var l=W([0,0]),c=B(e),u=(c.getNorthWest().distanceTo(c.getSouthWest())*c.getNorthEast().distanceTo(c.getNorthWest())<1700&&(l=Yt(e)),e.length),d=[],h=0;h<u;h++){var p=W(e[h]);d.push(t.project(W([p.lat-l.lat,p.lng-l.lng])))}for(n=h=0;h<u-1;h++)n+=d[h].distanceTo(d[h+1])/2;if(0===n)s=d[0];else for(i=h=0;h<u-1;h++)if(o=d[h],a=d[h+1],n<(i+=r=o.distanceTo(a))){s=[a.x-(r=(i-n)/r)*(a.x-o.x),a.y-r*(a.y-o.y)];break}return W([(c=t.unproject(z(s))).lat+l.lat,c.lng+l.lng])}var te={__proto__:null,simplify:Qt,pointToSegmentDistance:Jt,closestPointOnSegment:function(e,t,n){return nn(e,t,n)},clipSegment:Xt,_getEdgeIntersection:en,_getBitCode:tn,_sqClosestPointOnSegment:nn,isFlat:on,_flat:an,polylineCenter:rn},oe={__proto__:null,LonLat:ne={project:function(e){return new O(e.lng,e.lat)},unproject:function(e){return new R(e.y,e.x)},bounds:new I([-180,-90],[180,90])},Mercator:ie={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,n=this.R,i=e.lat*t,o=this.R_MINOR/n,a=(o=Math.sqrt(1-o*o))*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-a)/(1+a),o/2),i=-n*Math.log(Math.max(a,1e-10));return new O(e.lng*t*n,i)},unproject:function(e){for(var t,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,a=Math.sqrt(1-o*o),r=Math.exp(-e.y/i),s=Math.PI/2-2*Math.atan(r),l=0,c=.1;l<15&&1e-7<Math.abs(c);l++)t=a*Math.sin(s),t=Math.pow((1-t)/(1+t),a/2),s+=c=Math.PI/2-2*Math.atan(r*t)-s;return new R(s*n,e.x*n/i)}},SphericalMercator:q},re=c({},F,{code:"EPSG:3395",projection:ie,transformation:G(ae=.5/(Math.PI*ie.R),.5,-ae,.5)}),sn=c({},F,{code:"EPSG:4326",projection:ne,transformation:G(1/180,1,-1/180,.5)}),se=c({},H,{projection:ne,transformation:G(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,t=t.lat-e.lat;return Math.sqrt(n*n+t*t)},infinite:!0}),le=(H.Earth=F,H.EPSG3395=re,H.EPSG3857=V,H.EPSG900913=U,H.EPSG4326=sn,H.Simple=se,E.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[u(e)]=this},removeInteractiveTarget:function(e){return delete this._map._targets[u(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t,n=e.target;n.hasLayer(this)&&(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents&&(t=this.getEvents(),n.on(t,this),this.once("remove",function(){n.off(t,this)},this)),this.onAdd(n),this.fire("add"),n.fire("layeradd",{layer:this}))}})),ln=(Bt.include({addLayer:function(e){var t;if(e._layerAdd)return t=u(e),this._layers[t]||((this._layers[t]=e)._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e)),this;throw new Error("The provided object is not a Layer.")},removeLayer:function(e){var t=u(e);return this._layers[t]&&(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null),this},hasLayer:function(e){return u(e)in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},_addLayers:function(e){for(var t=0,n=(e=e?_(e)?e:[e]:[]).length;t<n;t++)this.addLayer(e[t])},_addZoomLimit:function(e){isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[u(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){e=u(e),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var e,t=1/0,n=-1/0,i=this._getZoomSpan();for(e in this._zoomBoundLayers)var o=this._zoomBoundLayers[e].options,t=void 0===o.minZoom?t:Math.min(t,o.minZoom),n=void 0===o.maxZoom?n:Math.max(n,o.maxZoom);this._layersMaxZoom=n===-1/0?void 0:n,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}}),le.extend({initialize:function(e,t){var n,i;if(p(this,t),this._layers={},e)for(n=0,i=e.length;n<i;n++)this.addLayer(e[n])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){return e=e in this._layers?e:this.getLayerId(e),this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(e){return("number"==typeof e?e:this.getLayerId(e))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t,n,i=Array.prototype.slice.call(arguments,1);for(t in this._layers)(n=this._layers[t])[e]&&n[e].apply(n,i);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:u})),cn=ln.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),ln.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?((e=e in this._layers?this._layers[e]:e).removeEventParent(this),ln.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e,t=new N;for(e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),un=C.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){p(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var n=this._getIconUrl(e);if(n)return n=this._createImg(n,t&&"IMG"===t.tagName?t:null),this._setIconStyles(n,e),!this.options.crossOrigin&&""!==this.options.crossOrigin||(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n;if("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null},_setIconStyles:function(e,t){var n=this.options,i=z(i="number"==typeof(i=n[t+"Size"])?[i,i]:i),o=z("shadow"===t&&n.shadowAnchor||n.iconAnchor||i&&i.divideBy(2,!0));e.className="leaflet-marker-"+t+" "+(n.className||""),o&&(e.style.marginLeft=-o.x+"px",e.style.marginTop=-o.y+"px"),i&&(e.style.width=i.x+"px",e.style.height=i.y+"px")},_createImg:function(e,t){return(t=t||document.createElement("img")).src=e,t},_getIconUrl:function(e){return Me.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}}),dn=un.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(e){return"string"!=typeof dn.imagePath&&(dn.imagePath=this._detectIconPath()),(this.options.imagePath||dn.imagePath)+un.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){function t(e,t,n){return(t=t.exec(e))&&t[n]}return(e=t(e,/^url\((['"])?(.+)\1\)$/,2))&&t(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=Qe("div","leaflet-default-icon-path",document.body),t=Ke(e,"background-image")||Ke(e,"backgroundImage");return document.body.removeChild(e),(t=this._stripUrl(t))?t:(e=document.querySelector('link[href$="leaflet.css"]'))?e.href.substring(0,e.href.length-"leaflet.css".length-1):""}}),hn=J.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new Vt(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),it(e,"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&&ot(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var t=this._marker,n=t._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,a=dt(t._icon),r=n.getPixelBounds(),s=n.getPixelOrigin();(s=j(r.min._subtract(s).add(o),r.max._subtract(s).subtract(o))).contains(a)||(o=z((Math.max(s.max.x,a.x)-s.max.x)/(r.max.x-s.max.x)-(Math.min(s.min.x,a.x)-s.min.x)/(r.min.x-s.min.x),(Math.max(s.max.y,a.y)-s.max.y)/(r.max.y-s.max.y)-(Math.min(s.min.y,a.y)-s.min.y)/(r.min.y-s.min.y)).multiplyBy(i),n.panBy(o,{animate:!1}),this._draggable._newPos._add(o),this._draggable._startPos._add(o),ut(t._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=S(this._adjustPan.bind(this,e)))},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(e){this._marker.options.autoPan&&(P(this._panRequest),this._panRequest=S(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,n=t._shadow,i=dt(t._icon),o=t._map.layerPointToLatLng(i);n&&ut(n,i),t._latlng=o,e.latlng=o,e.oldLatLng=this._oldLatLng,t.fire("move",e).fire("drag",e)},_onDragEnd:function(e){P(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),pn=le.extend({options:{icon:new dn,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,t){p(this,t),this._latlng=W(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.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(e){var t=this._latlng;return this._latlng=W(e),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){var e;return this._icon&&this._map&&(e=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(e)),this},_initIcon:function(){var e=this.options,t="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=e.icon.createIcon(this._icon),i=!1,o=!1;(n=(n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,e.title&&(n.title=e.title),"IMG"===n.tagName&&(n.alt=e.alt||"")),it(n,t),e.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&yt(n,"focus",this._panOnFocus,this),e.icon.createShadow(this._shadow)))!==this._shadow&&(this._removeShadow(),o=!0),n&&(it(n,t),n.alt=""),this._shadow=n,e.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),n&&o&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&At(this._icon,"focus",this._panOnFocus,this),Je(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Je(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&ut(this._icon,e),this._shadow&&ut(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){e=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round(),this._setPos(e)},_initInteraction:function(){var e;this.options.interactive&&(it(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),hn&&(e=this.options.draggable,this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new hn(this),e&&this.dragging.enable()))},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&st(this._icon,e),this._shadow&&st(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e,t,n=this._map;n&&(e=(t=this.options.icon.options).iconSize?z(t.iconSize):z(0,0),t=t.iconAnchor?z(t.iconAnchor):z(0,0),n.panInside(this._latlng,{paddingTopLeft:t,paddingBottomRight:e.subtract(t)}))},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),mn=le.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(e){this._renderer=e.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(e){return p(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),fn=mn.extend({options:{fill:!0,radius:10},initialize:function(e,t){p(this,t),this._latlng=W(e),this._radius=this.options.radius},setLatLng:function(e){var t=this._latlng;return this._latlng=W(e),this.redraw(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return mn.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,t=this._radiusY||e,n=this._clickTolerance(),e=[e+n,t+n];this._pxBounds=new I(this._point.subtract(e),this._point.add(e))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),gn=fn.extend({initialize:function(e,t,n){if(p(this,t="number"==typeof t?c({},n,{radius:t}):t),this._latlng=W(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:mn.prototype.setStyle,_project:function(){var e,t,n,i,o,a=this._latlng.lng,r=this._latlng.lat,s=this._map,l=s.options.crs;l.distance===F.distance?(i=Math.PI/180,o=this._mRadius/F.R/i,e=s.project([r+o,a]),t=s.project([r-o,a]),t=e.add(t).divideBy(2),n=s.unproject(t).lat,i=Math.acos((Math.cos(o*i)-Math.sin(r*i)*Math.sin(n*i))/(Math.cos(r*i)*Math.cos(n*i)))/i,!isNaN(i)&&0!==i||(i=o/Math.cos(Math.PI/180*r)),this._point=t.subtract(s.getPixelOrigin()),this._radius=isNaN(i)?0:t.x-s.project([n,a-i]).x,this._radiusY=t.y-e.y):(o=l.unproject(l.project(this._latlng).subtract([this._mRadius,0])),this._point=s.latLngToLayerPoint(this._latlng),this._radius=this._point.x-s.latLngToLayerPoint(o).x),this._updateBounds()}}),_n=mn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){p(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var t=1/0,n=null,i=nn,o=0,a=this._parts.length;o<a;o++)for(var r=this._parts[o],s=1,l=r.length;s<l;s++){var c,u,d=i(e,c=r[s-1],u=r[s],!0);d<t&&(t=d,n=i(e,c,u))}return n&&(n.distance=Math.sqrt(t)),n},getCenter:function(){if(this._map)return rn(this._defaultShape(),this._map.options.crs);throw new Error("Must add layer to map before using getCenter()")},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=W(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new N,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return on(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],n=on(e),i=0,o=e.length;i<o;i++)n?(t[i]=W(e[i]),this._bounds.extend(t[i])):t[i]=this._convertLatLngs(e[i]);return t},_project:function(){var e=new I;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=new O(e=this._clickTolerance(),e);this._rawPxBounds&&(this._pxBounds=new I([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(e,t,n){var i,o,a=e[0]instanceof R,r=e.length;if(a){for(o=[],i=0;i<r;i++)o[i]=this._map.latLngToLayerPoint(e[i]),n.extend(o[i]);t.push(o)}else for(i=0;i<r;i++)this._projectLatlngs(e[i],t,n)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var t,n,i,o,a=this._parts,r=0,s=0,l=this._rings.length;r<l;r++)for(t=0,n=(o=this._rings[r]).length;t<n-1;t++)(i=Xt(o[t],o[t+1],e,t,!0))&&(a[s]=a[s]||[],a[s].push(i[0]),i[1]===o[t+1]&&t!==n-2||(a[s].push(i[1]),s++))},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,n=0,i=e.length;n<i;n++)e[n]=Qt(e[n],t)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,t){var n,i,o,a,r,s,l=this._clickTolerance();if(this._pxBounds&&this._pxBounds.contains(e))for(n=0,a=this._parts.length;n<a;n++)for(i=0,o=(r=(s=this._parts[n]).length)-1;i<r;o=i++)if((t||0!==i)&&Jt(e,s[o],s[i])<=l)return!0;return!1}});_n._flat=an;var yn=_n.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(this._map)return $t(this._defaultShape(),this._map.options.crs);throw new Error("Must add layer to map before using getCenter()")},_convertLatLngs:function(e){var t=(e=_n.prototype._convertLatLngs.call(this,e)).length;return 2<=t&&e[0]instanceof R&&e[0].equals(e[t-1])&&e.pop(),e},_setLatLngs:function(e){_n.prototype._setLatLngs.call(this,e),on(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return(on(this._latlngs[0])?this._latlngs:this._latlngs[0])[0]},_clipPoints:function(){var e=this._renderer._bounds,t=new O(t=this.options.weight,t),e=new I(e.min.subtract(t),e.max.add(t));if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var n,i=0,o=this._rings.length;i<o;i++)(n=Ut(this._rings[i],e,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t,n,i,o,a,r,s,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(o=0,s=this._parts.length;o<s;o++)for(a=0,r=(l=(t=this._parts[o]).length)-1;a<l;r=a++)n=t[a],i=t[r],n.y>e.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(c=!c);return c||_n.prototype._containsPoint.call(this,e,!0)}}),vn=cn.extend({initialize:function(e,t){p(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,i,o=_(e)?e:e.features;if(o){for(t=0,n=o.length;t<n;t++)((i=o[t]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var a,r=this.options;return r.filter&&!r.filter(e)||!(a=bn(e,r))?this:(a.feature=Mn(e),a.defaultOptions=a.options,this.resetStyle(a),r.onEachFeature&&r.onEachFeature(e,a),this.addLayer(a))},resetStyle:function(e){return void 0===e?this.eachLayer(this.resetStyle,this):(e.options=c({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(e,t){e.setStyle&&("function"==typeof t&&(t=t(e.feature)),e.setStyle(t))}});function bn(e,t){var n,i,o,a,r="Feature"===e.type?e.geometry:e,s=r?r.coordinates:null,l=[],c=t&&t.pointToLayer,u=t&&t.coordsToLatLng||An;if(!s&&!r)return null;switch(r.type){case"Point":return wn(c,e,n=u(s),t);case"MultiPoint":for(o=0,a=s.length;o<a;o++)n=u(s[o]),l.push(wn(c,e,n,t));return new cn(l);case"LineString":case"MultiLineString":return i=kn(s,"LineString"===r.type?0:1,u),new _n(i,t);case"Polygon":case"MultiPolygon":return i=kn(s,"Polygon"===r.type?1:2,u),new yn(i,t);case"GeometryCollection":for(o=0,a=r.geometries.length;o<a;o++){var d=bn({geometry:r.geometries[o],type:"Feature",properties:e.properties},t);d&&l.push(d)}return new cn(l);case"FeatureCollection":for(o=0,a=r.features.length;o<a;o++){var h=bn(r.features[o],t);h&&l.push(h)}return new cn(l);default:throw new Error("Invalid GeoJSON object.")}}function wn(e,t,n,i){return e?e(t,n):new pn(n,i&&i.markersInheritOptions&&i)}function An(e){return new R(e[1],e[0],e[2])}function kn(e,t,n){for(var i,o=[],a=0,r=e.length;a<r;a++)i=t?kn(e[a],t-1,n):(n||An)(e[a]),o.push(i);return o}function xn(e,t){return void 0!==(e=W(e)).alt?[a(e.lng,t),a(e.lat,t),a(e.alt,t)]:[a(e.lng,t),a(e.lat,t)]}function Sn(e,t,n,i){for(var o=[],a=0,r=e.length;a<r;a++)o.push(t?Sn(e[a],on(e[a])?0:t-1,n,i):xn(e[a],i));return!t&&n&&0<o.length&&o.push(o[0].slice()),o}function Pn(e,t){return e.feature?c({},e.feature,{geometry:t}):Mn(t)}function Mn(e){return"Feature"===e.type||"FeatureCollection"===e.type?e:{type:"Feature",properties:{},geometry:e}}function Cn(e,t){return new vn(e,t)}pn.include(ce={toGeoJSON:function(e){return Pn(this,{type:"Point",coordinates:xn(this.getLatLng(),e)})}}),gn.include(ce),fn.include(ce),_n.include({toGeoJSON:function(e){var t=!on(this._latlngs);return Pn(this,{type:(t?"Multi":"")+"LineString",coordinates:Sn(this._latlngs,t?1:0,!1,e)})}}),yn.include({toGeoJSON:function(e){var t=!on(this._latlngs),n=t&&!on(this._latlngs[0]),e=Sn(this._latlngs,n?2:t?1:0,!0,e);return Pn(this,{type:(n?"Multi":"")+"Polygon",coordinates:e=t?e:[e]})}}),ln.include({toMultiPoint:function(t){var n=[];return this.eachLayer(function(e){n.push(e.toGeoJSON(t).geometry.coordinates)}),Pn(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(t){var n,i,e=this.feature&&this.feature.geometry&&this.feature.geometry.type;return"MultiPoint"===e?this.toMultiPoint(t):(n="GeometryCollection"===e,i=[],this.eachLayer(function(e){e.toGeoJSON&&(e=e.toGeoJSON(t),n?i.push(e.geometry):"FeatureCollection"===(e=Mn(e)).type?i.push.apply(i,e.features):i.push(e))}),n?Pn(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i})}});var ue=Cn,Ln=le.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,t,n){this._url=e,this._bounds=B(t),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(it(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Je(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&et(this._image),this},bringToBack:function(){return this._map&&tt(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=B(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e="IMG"===this._url.tagName,t=this._image=e?this._url:Qe("img");it(t,"leaflet-image-layer"),this._zoomAnimated&&it(t,"leaflet-zoom-animated"),this.options.className&&it(t,this.options.className),t.onselectstart=d,t.onmousemove=d,t.onload=l(this.fire,this,"load"),t.onerror=l(this._overlayOnError,this,"error"),!this.options.crossOrigin&&""!==this.options.crossOrigin||(t.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e?this._url=t.src:(t.src=this._url,t.alt=this.options.alt)},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;ct(this._image,e,t)},_reset:function(){var e=this._image,t=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=t.getSize();ut(e,t.min),e.style.width=n.x+"px",e.style.height=n.y+"px"},_updateOpacity:function(){st(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 e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),Tn=Ln.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e="VIDEO"===this._url.tagName,t=this._image=e?this._url:Qe("video");if(it(t,"leaflet-image-layer"),this._zoomAnimated&&it(t,"leaflet-zoom-animated"),this.options.className&&it(t,this.options.className),t.onselectstart=d,t.onmousemove=d,t.onloadeddata=l(this.fire,this,"load"),e){for(var n=t.getElementsByTagName("source"),i=[],o=0;o<n.length;o++)i.push(n[o].src);this._url=0<n.length?i:[t.src]}else{_(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,"objectFit")&&(t.style.objectFit="fill"),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var a=0;a<this._url.length;a++){var r=Qe("source");r.src=this._url[a],t.appendChild(r)}}}}),En=Ln.extend({_initImage:function(){var e=this._image=this._url;it(e,"leaflet-image-layer"),this._zoomAnimated&&it(e,"leaflet-zoom-animated"),this.options.className&&it(e,this.options.className),e.onselectstart=d,e.onmousemove=d}}),On=le.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(e,t){e&&(e instanceof R||_(e))?(this._latlng=W(e),p(this,t)):(p(this,e),this._source=t),this.options.content&&(this._content=this.options.content)},openOn:function(e){return(e=arguments.length?e:this._source._map).hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&st(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&st(this._container,1),this.bringToFront(),this.options.interactive&&(it(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(st(this._container,0),this._removeTimeout=setTimeout(l(Je,void 0,this._container),200)):Je(this._container),this.options.interactive&&(ot(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=W(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,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 e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&et(this._container),this},bringToBack:function(){return this._map&&tt(this._container),this},_prepareOpen:function(e){if(!(n=this._source)._map)return!1;if(n instanceof cn){var t,n=null,i=this._source._layers;for(t in i)if(i[t]._map){n=i[t];break}if(!n)return!1;this._source=n}if(!e)if(n.getCenter)e=n.getCenter();else if(n.getLatLng)e=n.getLatLng();else{if(!n.getBounds)throw new Error("Unable to get source layer LatLng.");e=n.getBounds().getCenter()}return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,t="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof t)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){var e,t,n;this._map&&(t=this._map.latLngToLayerPoint(this._latlng),e=z(this.options.offset),n=this._getAnchor(),this._zoomAnimated?ut(this._container,t.add(n)):e=e.add(t).add(n),t=this._containerBottom=-e.y,n=this._containerLeft=-Math.round(this._containerWidth/2)+e.x,this._container.style.bottom=t+"px",this._container.style.left=n+"px")},_getAnchor:function(){return[0,0]}}),Dn=(Bt.include({_initOverlay:function(e,t,n,i){var o=t;return o instanceof e||(o=new e(i).setContent(t)),n&&o.setLatLng(n),o}}),le.include({_initOverlay:function(e,t,n,i){var o=n;return o instanceof e?(p(o,i),o._source=this):(o=t&&!i?t:new e(i,this)).setContent(n),o}}),On.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(e){return!(e=arguments.length?e:this._source._map).hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,On.prototype.openOn.call(this,e)},onAdd:function(e){On.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof mn||this._source.on("preclick",Mt))},onRemove:function(e){On.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof mn||this._source.off("preclick",Mt))},getEvents:function(){var e=On.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e="leaflet-popup",t=this._container=Qe("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=Qe("div",e+"-content-wrapper",t);this._contentNode=Qe("div",e+"-content",n),Lt(t),Ct(this._contentNode),yt(t,"contextmenu",Mt),this._tipContainer=Qe("div",e+"-tip-container",t),this._tip=Qe("div",e+"-tip",this._tipContainer),this.options.closeButton&&((n=this._closeButton=Qe("a",e+"-close-button",t)).setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">×</span>',yt(n,"click",function(e){Tt(e),this.close()},this))},_updateLayout:function(){var e=this._contentNode,t=e.style,n=(t.width="",t.whiteSpace="nowrap",e.offsetWidth),n=Math.min(n,this.options.maxWidth),n=(n=Math.max(n,this.options.minWidth),t.width=n+1+"px",t.whiteSpace="",t.height="",e.offsetHeight),i=this.options.maxHeight;(i&&i<n?(t.height=i+"px",it):ot)(e,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var e=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),t=this._getAnchor();ut(this._container,e.add(t))},_adjustPan:function(){var e,t,n,i,o,a,r,s;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning?this._autopanning=!1:(e=this._map,t=parseInt(Ke(this._container,"marginBottom"),10)||0,t=this._container.offsetHeight+t,s=this._containerWidth,(n=new O(this._containerLeft,-t-this._containerBottom))._add(dt(this._container)),n=e.layerPointToContainerPoint(n),o=z(this.options.autoPanPadding),i=z(this.options.autoPanPaddingTopLeft||o),o=z(this.options.autoPanPaddingBottomRight||o),a=e.getSize(),r=0,n.x+s+o.x>a.x&&(r=n.x+s-a.x+o.x),n.x-r-i.x<(s=0)&&(r=n.x-i.x),n.y+t+o.y>a.y&&(s=n.y+t-a.y+o.y),n.y-s-i.y<0&&(s=n.y-i.y),(r||s)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([r,s]))))},_getAnchor:function(){return z(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),zn=(Bt.mergeOptions({closePopupOnClick:!0}),Bt.include({openPopup:function(e,t,n){return this._initOverlay(Dn,e,t,n).openOn(this),this},closePopup:function(e){return(e=arguments.length?e:this._popup)&&e.close(),this}}),le.include({bindPopup:function(e,t){return this._popup=this._initOverlay(Dn,this._popup,e,t),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof cn||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){var t;this._popup&&this._map&&(Et(e),t=e.layer||e.target,this._popup._source!==t||t instanceof mn?(this._popup._source=t,this.openPopup(e.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng))},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}}),On.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){On.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){On.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=On.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Qe("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+u(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,n=this._map,i=this._container,o=n.latLngToContainerPoint(n.getCenter()),n=n.layerPointToContainerPoint(e),a=this.options.direction,r=i.offsetWidth,s=i.offsetHeight,l=z(this.options.offset),c=this._getAnchor(),n="top"===a?(t=r/2,s):"bottom"===a?(t=r/2,0):(t="center"===a?r/2:"right"===a?0:"left"===a?r:n.x<o.x?(a="right",0):(a="left",r+2*(l.x+c.x)),s/2);e=e.subtract(z(t,n,!0)).add(l).add(c),ot(i,"leaflet-tooltip-right"),ot(i,"leaflet-tooltip-left"),ot(i,"leaflet-tooltip-top"),ot(i,"leaflet-tooltip-bottom"),it(i,"leaflet-tooltip-"+a),ut(i,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&st(this._container,e)},_animateZoom:function(e){e=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),this._setPosition(e)},_getAnchor:function(){return z(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}})),In=(Bt.include({openTooltip:function(e,t,n){return this._initOverlay(zn,e,t,n).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),le.include({bindTooltip:function(e,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(zn,this._tooltip,e,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(e){var t,n;!e&&this._tooltipHandlersAdded||(t=e?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[t](n),this._tooltipHandlersAdded=!e)},openTooltip:function(e){return this._tooltip&&(this instanceof cn||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var t="function"==typeof e.getElement&&e.getElement();t&&(yt(t,"focus",function(){this._tooltip._source=e,this.openTooltip()},this),yt(t,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){(e="function"==typeof e.getElement&&e.getElement())&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(e){var t;this._tooltip&&this._map&&(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag?(this._openOnceFlag=!0,(t=this)._map.once("moveend",function(){t._openOnceFlag=!1,t._openTooltip(e)})):(this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)))},_moveTooltip:function(e){var t=e.latlng;this._tooltip.options.sticky&&e.originalEvent&&(e=this._map.mouseEventToContainerPoint(e.originalEvent),e=this._map.containerPointToLayerPoint(e),t=this._map.layerPointToLatLng(e)),this._tooltip.setLatLng(t)}}),un.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var e=e&&"DIV"===e.tagName?e:document.createElement("div"),t=this.options;return t.html instanceof Element?(Xe(e),e.appendChild(t.html)):e.innerHTML=!1!==t.html?t.html:"",t.bgPos&&(t=z(t.bgPos),e.style.backgroundPosition=-t.x+"px "+-t.y+"px"),this._setIconStyles(e,"icon"),e},createShadow:function(){return null}}));un.Default=dn;var jn=le.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Me.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(e){p(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),Je(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(et(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(tt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){var e;return this._map&&(this._removeAllTiles(),(e=this._clampZoom(this._map.getZoom()))!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()),this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=i(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof O?e:new O(e,e)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t,n=this.getPane().children,i=-e(-1/0,1/0),o=0,a=n.length;o<a;o++)t=n[o].style.zIndex,n[o]!==this._container&&t&&(i=e(i,+t));isFinite(i)&&(this.options.zIndex=i+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Me.ielt9){st(this._container,this.options.opacity);var e,t=+new Date,n=!1,i=!1;for(e in this._tiles){var o,a=this._tiles[e];a.current&&a.loaded&&(o=Math.min(1,(t-a.loaded)/200),st(a.el,o),o<1?n=!0:(a.active?i=!0:this._onOpaqueTile(a),a.active=!0))}i&&!this._noPrune&&this._pruneTiles(),n&&(P(this._fadeFrame),this._fadeFrame=S(this._updateOpacity,this))}},_onOpaqueTile:d,_initContainer:function(){this._container||(this._container=Qe("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(void 0!==e){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(Je(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[e],o=this._map;return i||((i=this._levels[e]={}).el=Qe("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=t,i.origin=o.project(o.unproject(o.getPixelOrigin()),e).round(),i.zoom=e,this._setZoomTransform(i,o.getCenter(),o.getZoom()),d(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i}},_onUpdateLevel:d,_onRemoveLevel:d,_onCreateLevel:d,_pruneTiles:function(){if(this._map){var e,t,n,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(e in this._tiles)(n=this._tiles[e]).retain=n.current;for(e in this._tiles)(n=this._tiles[e]).current&&!n.active&&(t=n.coords,this._retainParent(t.x,t.y,t.z,t.z-5)||this._retainChildren(t.x,t.y,t.z,t.z+2));for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)Je(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,t,n,i){var n=n-1,o=((o=new O(+(e=Math.floor(e/2)),+(t=Math.floor(t/2)))).z=n,this._tileCoordsToKey(o));return(o=this._tiles[o])&&o.active?o.retain=!0:(o&&o.loaded&&(o.retain=!0),i<n&&this._retainParent(e,t,n,i))},_retainChildren:function(e,t,n,i){for(var o=2*e;o<2*e+2;o++)for(var a=2*t;a<2*t+2;a++){var r=((r=new O(o,a)).z=n+1,this._tileCoordsToKey(r));(r=this._tiles[r])&&r.active?r.retain=!0:(r&&r.loaded&&(r.retain=!0),n+1<i&&this._retainChildren(o,a,n+1,i))}},_resetView:function(e){e=e&&(e.pinch||e.flyTo),this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var t=this.options;return void 0!==t.minNativeZoom&&e<t.minNativeZoom?t.minNativeZoom:void 0!==t.maxNativeZoom&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,n,i){var o=Math.round(t),o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o),a=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!a||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(e),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var n in this._levels)this._setZoomTransform(this._levels[n],e,t)},_setZoomTransform:function(e,t,n){var i=this._map.getZoomScale(n,e.zoom),t=e.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(t,n)).round();Me.any3d?ct(e.el,t,i):ut(e.el,t)},_resetGrid:function(){var e=this._map,t=e.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],i).x/n.x),Math.ceil(e.project([0,t.wrapLng[1]],i).x/n.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],i).y/n.x),Math.ceil(e.project([t.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(e){var t=(n=this._map)._animatingZoom?Math.max(n._animateToZoom,n.getZoom()):n.getZoom(),t=n.getZoomScale(t,this._tileZoom),e=n.project(e,this._tileZoom).floor(),n=n.getSize().divideBy(2*t);return new I(e.subtract(n),e.add(n))},_update:function(e){if(i=this._map){var t=this._clampZoom(i.getZoom());if(void 0===e&&(e=i.getCenter()),void 0!==this._tileZoom){var n,i=this._getTiledPixelBounds(e),o=this._pxBoundsToTileRange(i),a=o.getCenter(),r=[],i=this.options.keepBuffer,s=new I(o.getBottomLeft().subtract([i,-i]),o.getTopRight().add([i,-i]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(n in this._tiles){var l=this._tiles[n].coords;l.z===this._tileZoom&&s.contains(new O(l.x,l.y))||(this._tiles[n].current=!1)}if(1<Math.abs(t-this._tileZoom))this._setView(e,t);else{for(var c=o.min.y;c<=o.max.y;c++)for(var u=o.min.x;u<=o.max.x;u++){var d,h=new O(u,c);h.z=this._tileZoom,this._isValidTile(h)&&((d=this._tiles[this._tileCoordsToKey(h)])?d.current=!0:r.push(h))}if(r.sort(function(e,t){return e.distanceTo(a)-t.distanceTo(a)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));for(var p=document.createDocumentFragment(),u=0;u<r.length;u++)this._addTile(r[u],p);this._level.el.appendChild(p)}}}}},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var n=this._globalTileRange;if(!t.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!t.wrapLat&&(e.y<n.min.y||e.y>n.max.y))return!1}return!this.options.bounds||(t=this._tileCoordsToBounds(e),B(this.options.bounds).overlaps(t))},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),i=e.scaleBy(n),n=i.add(n);return[t.unproject(i,e.z),t.unproject(n,e.z)]},_tileCoordsToBounds:function(e){return e=new N((e=this._tileCoordsToNwSe(e))[0],e[1]),this.options.noWrap?e:this._map.wrapLatLngBounds(e)},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=new O(+(e=e.split(":"))[0],+e[1]);return t.z=+e[2],t},_removeTile:function(e){var t=this._tiles[e];t&&(Je(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){it(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=d,e.onmousemove=d,Me.ielt9&&this.options.opacity<1&&st(e,this.options.opacity)},_addTile:function(e,t){var n=this._getTilePos(e),i=this._tileCoordsToKey(e),o=this.createTile(this._wrapCoords(e),l(this._tileReady,this,e));this._initTile(o),this.createTile.length<2&&S(l(this._tileReady,this,e,null,o)),ut(o,n),this._tiles[i]={el:o,coords:e,current:!0},t.appendChild(o),this.fire("tileloadstart",{tile:o,coords:e})},_tileReady:function(e,t,n){t&&this.fire("tileerror",{error:t,tile:n,coords:e});var i=this._tileCoordsToKey(e);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(st(n.el,0),P(this._fadeFrame),this._fadeFrame=S(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),t||(it(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Me.ielt9||!this._map._fadeAnimated?S(this._pruneTiles,this):setTimeout(l(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new O(this._wrapX?o(e.x,this._wrapX):e.x,this._wrapY?o(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new I(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}}),Nn=jn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,(t=p(this,t)).detectRetina&&Me.retina&&0<t.maxZoom?(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom=Math.min(t.maxZoom,t.minZoom+1)):(t.zoomOffset++,t.maxZoom=Math.max(t.minZoom,t.maxZoom-1)),t.minZoom=Math.max(0,t.minZoom)):t.zoomReverse?t.minZoom=Math.min(t.maxZoom,t.minZoom):t.maxZoom=Math.max(t.minZoom,t.maxZoom),"string"==typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&void 0===t&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var n=document.createElement("img");return yt(n,"load",l(this._tileOnLoad,this,t,n)),yt(n,"error",l(this._tileOnError,this,t,n)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(e),n},getTileUrl:function(e){var t={r:Me.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(e=this._globalTileRange.max.y-e.y,this.options.tms&&(t.y=e),t["-y"]=e),g(this._url,c(t,this.options))},_tileOnLoad:function(e,t){Me.ielt9?setTimeout(l(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,n){var i=this.options.errorTileUrl;i&&t.getAttribute("src")!==i&&(t.src=i),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom;return(e=this.options.zoomReverse?t-e:e)+this.options.zoomOffset},_getSubdomain:function(e){return e=Math.abs(e.x+e.y)%this.options.subdomains.length,this.options.subdomains[e]},_abortLoading:function(){var e,t,n;for(e in this._tiles)this._tiles[e].coords.z!==this._tileZoom&&((n=this._tiles[e].el).onload=d,n.onerror=d,n.complete||(n.src=v,t=this._tiles[e].coords,Je(n),delete this._tiles[e],this.fire("tileabort",{tile:n,coords:t})))},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute("src",v),jn.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(this._map&&(!n||n.getAttribute("src")!==v))return jn.prototype._tileReady.call(this,e,t,n)}});function Bn(e,t){return new Nn(e,t)}var Rn=Nn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,t){this._url=e;var n,i=c({},this.defaultWmsParams);for(n in t)n in this.options||(i[n]=t[n]);var e=(t=p(this,t)).detectRetina&&Me.retina?2:1,o=this.getTileSize();i.width=o.x*e,i.height=o.y*e,this.wmsParams=i},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[t]=this._crs.code,Nn.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),t=(n=j((n=this._crs).project(t[0]),n.project(t[1]))).min,n=n.max,t=(1.3<=this._wmsVersion&&this._crs===sn?[t.y,t.x,n.y,n.x]:[t.x,t.y,n.x,n.y]).join(",");return(n=Nn.prototype.getTileUrl.call(this,e))+m(this.wmsParams,n,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+t},setParams:function(e,t){return c(this.wmsParams,e),t||this.redraw(),this}});Nn.WMS=Rn,Bn.wms=function(e,t){return new Rn(e,t)};var Wn=le.extend({options:{padding:.1},initialize:function(e){p(this,e),u(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),it(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 e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var n=this._map.getZoomScale(t,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,t),i=i.multiplyBy(-n).add(o).subtract(this._map._getNewPixelOrigin(e,t));Me.any3d?ct(this._container,i,n):ut(this._container,i)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),n=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new I(n,n.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Hn=Wn.extend({options:{tolerance:0},getEvents:function(){var e=Wn.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Wn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");yt(e,"mousemove",this._onMouseMove,this),yt(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),yt(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest),delete this._ctx,Je(this._container),At(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var e in this._redrawBounds=null,this._layers)this._layers[e]._update();this._redraw()}},_update:function(){var e,t,n,i;this._map._animatingZoom&&this._bounds||(Wn.prototype._update.call(this),e=this._bounds,t=this._container,n=e.getSize(),i=Me.retina?2:1,ut(t,e.min),t.width=i*n.x,t.height=i*n.y,t.style.width=n.x+"px",t.style.height=n.y+"px",Me.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update"))},_reset:function(){Wn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),e=(this._layers[u(e)]=e)._order={layer:e,prev:this._drawLast,next:null},this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=(n=e._order).next,n=n.prev;t?t.prev=n:this._drawLast=n,n?n.next=t:this._drawFirst=t,delete e._order,delete this._layers[u(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if("string"==typeof e.options.dashArray){for(var t,n=e.options.dashArray.split(/[, ]+/),i=[],o=0;o<n.length;o++){if(t=Number(n[o]),isNaN(t))return;i.push(t)}e.options._dashArray=i}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||S(this._redraw,this))},_extendRedrawBounds:function(e){var t;e._pxBounds&&(t=(e.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new I,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._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 e,t=this._redrawBounds;t?(e=t.getSize(),this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)):(this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore())},_draw:function(){var e,t,n=this._redrawBounds;this._ctx.save(),n&&(t=n.getSize(),this._ctx.beginPath(),this._ctx.rect(n.min.x,n.min.y,t.x,t.y),this._ctx.clip()),this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)e=i.layer,(!n||e._pxBounds&&e._pxBounds.intersects(n))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var n,i,o,a,r=e._parts,s=r.length,l=this._ctx;if(s){for(l.beginPath(),n=0;n<s;n++){for(i=0,o=r[n].length;i<o;i++)a=r[n][i],l[i?"lineTo":"moveTo"](a.x,a.y);t&&l.closePath()}this._fillStroke(l,e)}}},_updateCircle:function(e){var t,n,i,o;this._drawing&&!e._empty()&&(t=e._point,n=this._ctx,i=Math.max(Math.round(e._radius),1),1!=(o=(Math.max(Math.round(e._radiusY),1)||i)/i)&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(t.x,t.y/o,i,0,2*Math.PI,!1),1!=o&&n.restore(),this._fillStroke(n,e))},_fillStroke:function(e,t){var n=t.options;n.fill&&(e.globalAlpha=n.fillOpacity,e.fillStyle=n.fillColor||n.color,e.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.globalAlpha=n.opacity,e.lineWidth=n.weight,e.strokeStyle=n.color,e.lineCap=n.lineCap,e.lineJoin=n.lineJoin,e.stroke())},_onClick:function(e){for(var t,n,i=this._map.mouseEventToLayerPoint(e),o=this._drawFirst;o;o=o.next)(t=o.layer).options.interactive&&t._containsPoint(i)&&(("click"===e.type||"preclick"===e.type)&&this._map._draggableMoved(t)||(n=t));this._fireEvent(!!n&&[n],e)},_onMouseMove:function(e){var t;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(t=this._map.mouseEventToLayerPoint(e),this._handleMouseHover(e,t))},_handleMouseOut:function(e){var t=this._hoveredLayer;t&&(ot(this._container,"leaflet-interactive"),this._fireEvent([t],e,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,t){if(!this._mouseHoverThrottled){for(var n,i,o=this._drawFirst;o;o=o.next)(n=o.layer).options.interactive&&n._containsPoint(t)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(e),i&&(it(this._container,"leaflet-interactive"),this._fireEvent([i],e,"mouseover"),this._hoveredLayer=i)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],e),this._mouseHoverThrottled=!0,setTimeout(l(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(e,t,n){this._map._fireDOMEvent(t,n||t.type,e)},_bringToFront:function(e){var t,n,i=e._order;i&&(t=i.next,n=i.prev,t&&((t.prev=n)?n.next=t:t&&(this._drawFirst=t),i.prev=this._drawLast,(this._drawLast.next=i).next=null,this._drawLast=i,this._requestRedraw(e)))},_bringToBack:function(e){var t,n,i=e._order;i&&(t=i.next,(n=i.prev)&&((n.next=t)?t.prev=n:n&&(this._drawLast=n),i.prev=null,i.next=this._drawFirst,this._drawFirst.prev=i,this._drawFirst=i,this._requestRedraw(e)))}});function Fn(e){return Me.canvas?new Hn(e):null}var qn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch(e){}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),de={_initContainer:function(){this._container=Qe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Wn.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=qn("shape");it(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=qn("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[u(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;Je(t),e.removeInteractiveTarget(t),delete this._layers[u(e)]},_updateStyle:function(e){var t=e._stroke,n=e._fill,i=e.options,o=e._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(t=t||(e._stroke=qn("stroke")),o.appendChild(t),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,i.dashArray?t.dashStyle=_(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=i.lineCap.replace("butt","flat"),t.joinstyle=i.lineJoin):t&&(o.removeChild(t),e._stroke=null),i.fill?(n=n||(e._fill=qn("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),i=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+n+","+i+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){et(e._container)},_bringToBack:function(e){tt(e._container)}},Zn=Me.vml?qn:$,Gn=Wn.extend({_initContainer:function(){this._container=Zn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Zn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Je(this._container),At(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var e,t,n;this._map._animatingZoom&&this._bounds||(Wn.prototype._update.call(this),t=(e=this._bounds).getSize(),n=this._container,this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,n.setAttribute("width",t.x),n.setAttribute("height",t.y)),ut(n,e.min),n.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update"))},_initPath:function(e){var t=e._path=Zn("path");e.options.className&&it(t,e.options.className),e.options.interactive&&it(t,"leaflet-interactive"),this._updateStyle(e),this._layers[u(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){Je(e._path),e.removeInteractiveTarget(e._path),delete this._layers[u(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,e=e.options;t&&(e.stroke?(t.setAttribute("stroke",e.color),t.setAttribute("stroke-opacity",e.opacity),t.setAttribute("stroke-width",e.weight),t.setAttribute("stroke-linecap",e.lineCap),t.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?t.setAttribute("stroke-dasharray",e.dashArray):t.removeAttribute("stroke-dasharray"),e.dashOffset?t.setAttribute("stroke-dashoffset",e.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),e.fill?(t.setAttribute("fill",e.fillColor||e.color),t.setAttribute("fill-opacity",e.fillOpacity),t.setAttribute("fill-rule",e.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,Y(e._parts,t))},_updateCircle:function(e){var t=e._point,n=Math.max(Math.round(e._radius),1),i="a"+n+","+(Math.max(Math.round(e._radiusY),1)||n)+" 0 1,0 ",t=e._empty()?"M0 0":"M"+(t.x-n)+","+t.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(e,t)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){et(e._path)},_bringToBack:function(e){tt(e._path)}});function Vn(e){return Me.svg||Me.vml?new Gn(e):null}Me.vml&&Gn.include(de),Bt.include({getRenderer:function(e){return e=(e=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(e){var t;return"overlayPane"!==e&&void 0!==e&&(void 0===(t=this._paneRenderers[e])&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t)},_createRenderer:function(e){return this.options.preferCanvas&&Fn(e)||Vn(e)}});var Un=yn.extend({initialize:function(e,t){yn.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=B(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});Gn.create=Zn,Gn.pointsToPath=Y,vn.geometryToLayer=bn,vn.coordsToLatLng=An,vn.coordsToLatLngs=kn,vn.latLngToCoords=xn,vn.latLngsToCoords=Sn,vn.getFeature=Pn,vn.asFeature=Mn,Bt.mergeOptions({boxZoom:!0});var K=J.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){yt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){At(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Je(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(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),qe(),ht(),this._startPoint=this._map.mouseEventToContainerPoint(e),yt(document,{contextmenu:Et,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=Qe("div","leaflet-zoom-box",this._container),it(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=(e=new I(this._point,this._startPoint)).getSize();ut(this._box,e.min),this._box.style.width=t.x+"px",this._box.style.height=t.y+"px"},_finish:function(){this._moved&&(Je(this._box),ot(this._container,"leaflet-crosshair")),vt(),pt(),At(document,{contextmenu:Et,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){1!==e.which&&1!==e.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(l(this._resetState,this),0),e=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})))},_onKeyDown:function(e){27===e.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),he=(Bt.addInitHook("addHandler","boxZoom",K),Bt.mergeOptions({doubleClickZoom:!0}),J.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom(),i=t.options.zoomDelta,n=e.originalEvent.shiftKey?n-i:n+i;"center"===t.options.doubleClickZoom?t.setZoom(n):t.setZoomAround(e.containerPoint,n)}})),$n=(Bt.addInitHook("addHandler","doubleClickZoom",he),Bt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),J.extend({addHooks:function(){var e;this._draggable||(e=this._map,this._draggable=new Vt(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))),it(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ot(this._map._container,"leaflet-grab"),ot(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 e,t=this._map;t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(e=B(this._map.options.maxBounds),this._offsetLimit=j(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){var t,n;this._map.options.inertia&&(t=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(n),this._times.push(t),this._prunePositions(t)),this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;1<this._positions.length&&50<e-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){var e,t;this._viscosity&&this._offsetLimit&&(e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit,e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e))},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,i=((o=this._draggable._newPos.x)-t+n)%e+t-n,o=(o+t+n)%e-t-n,e=Math.abs(i+n)<Math.abs(o+n)?i:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=e},_onDragEnd:function(e){var t,n,i,o,a=this._map,r=a.options,s=!r.inertia||e.noInertia||this._times.length<2;a.fire("dragend",e),!s&&(this._prunePositions(+new Date),e=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,t=r.easeLinearity,s=(e=e.multiplyBy(t/s)).distanceTo([0,0]),n=Math.min(r.inertiaMaxSpeed,s),e=e.multiplyBy(n/s),i=n/(r.inertiaDeceleration*t),(o=e.multiplyBy(-i/2).round()).x||o.y)?(o=a._limitOffset(o,a.options.maxBounds),S(function(){a.panBy(o,{duration:i,easeLinearity:t,noMoveStart:!0,animate:!0})})):a.fire("moveend")}})),pe=(Bt.addInitHook("addHandler","dragging",$n),Bt.mergeOptions({keyboard:!0,keyboardPanDelta:80}),J.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex="0"),yt(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),At(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(){var e,t,n;this._focused||(n=document.body,e=document.documentElement,t=n.scrollTop||e.scrollTop,n=n.scrollLeft||e.scrollLeft,this._map._container.focus(),window.scrollTo(n,t))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){for(var t=this._panKeys={},n=this.keyCodes,i=0,o=n.left.length;i<o;i++)t[n.left[i]]=[-1*e,0];for(i=0,o=n.right.length;i<o;i++)t[n.right[i]]=[e,0];for(i=0,o=n.down.length;i<o;i++)t[n.down[i]]=[0,e];for(i=0,o=n.up.length;i<o;i++)t[n.up[i]]=[0,-1*e]},_setZoomDelta:function(e){for(var t=this._zoomKeys={},n=this.keyCodes,i=0,o=n.zoomIn.length;i<o;i++)t[n.zoomIn[i]]=e;for(i=0,o=n.zoomOut.length;i<o;i++)t[n.zoomOut[i]]=-e},_addHooks:function(){yt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){At(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t,n,i=e.keyCode,o=this._map;if(i in this._panKeys)o._panAnim&&o._panAnim._inProgress||(n=this._panKeys[i],e.shiftKey&&(n=z(n).multiplyBy(3)),o.options.maxBounds&&(n=o._limitOffset(z(n),o.options.maxBounds)),o.options.worldCopyJump?(t=o.wrapLatLng(o.unproject(o.project(o.getCenter()).add(n))),o.panTo(t)):o.panBy(n));else if(i in this._zoomKeys)o.setZoom(o.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!o._popup||!o._popup.options.closeOnEscapeKey)return;o.closePopup()}Et(e)}}})),me=(Bt.addInitHook("addHandler","keyboard",pe),Bt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60}),J.extend({addHooks:function(){yt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){At(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var t=It(e),n=this._map.options.wheelDebounceTime,t=(this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date),Math.max(n-(+new Date-this._startTime),0));clearTimeout(this._timer),this._timer=setTimeout(l(this._performZoom,this),t),Et(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),n=this._map.options.zoomSnap||0,i=(e._stop(),this._delta/(4*this._map.options.wheelPxPerZoomLevel)),i=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,n=n?Math.ceil(i/n)*n:i,i=e._limitZoom(t+(0<this._delta?n:-n))-t;this._delta=0,this._startTime=null,i&&("center"===e.options.scrollWheelZoom?e.setZoom(t+i):e.setZoomAround(this._lastMousePos,t+i))}})),fe=(Bt.addInitHook("addHandler","scrollWheelZoom",me),Bt.mergeOptions({tapHold:Me.touchNative&&Me.safari&&Me.mobile,tapTolerance:15}),J.extend({addHooks:function(){yt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){At(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){var t;clearTimeout(this._holdTimeout),1===e.touches.length&&(t=e.touches[0],this._startPos=this._newPos=new O(t.clientX,t.clientY),this._holdTimeout=setTimeout(l(function(){this._cancel(),this._isTapValid()&&(yt(document,"touchend",Tt),yt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},this),600),yt(document,"touchend touchcancel contextmenu",this._cancel,this),yt(document,"touchmove",this._onMove,this))},_cancelClickPrevent:function e(){At(document,"touchend",Tt),At(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),At(document,"touchend touchcancel contextmenu",this._cancel,this),At(document,"touchmove",this._onMove,this)},_onMove:function(e){e=e.touches[0],this._newPos=new O(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){(e=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY}))._simulated=!0,t.target.dispatchEvent(e)}})),ge=(Bt.addInitHook("addHandler","tapHold",fe),Bt.mergeOptions({touchZoom:Me.touch,bounceAtZoomLimits:!0}),J.extend({addHooks:function(){it(this._map._container,"leaflet-touch-zoom"),yt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ot(this._map._container,"leaflet-touch-zoom"),At(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t,n,i=this._map;!e.touches||2!==e.touches.length||i._animatingZoom||this._zooming||(t=i.mouseEventToContainerPoint(e.touches[0]),n=i.mouseEventToContainerPoint(e.touches[1]),this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(t.add(n)._divideBy(2))),this._startDist=t.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),yt(document,"touchmove",this._onTouchMove,this),yt(document,"touchend touchcancel",this._onTouchEnd,this),Tt(e))},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var t=this._map,n=t.mouseEventToContainerPoint(e.touches[0]),i=t.mouseEventToContainerPoint(e.touches[1]),o=n.distanceTo(i)/this._startDist;if(this._zoom=t.getScaleZoom(o,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&o<1||this._zoom>t.getMaxZoom()&&1<o)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1==o)return}else{if(n=n._add(i)._divideBy(2)._subtract(this._centerPoint),1==o&&0===n.x&&0===n.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(n),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),P(this._animRequest),i=l(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0),this._animRequest=S(i,this,!0),Tt(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,P(this._animRequest),At(document,"touchmove",this._onTouchMove,this),At(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}})),Yn=(Bt.addInitHook("addHandler","touchZoom",ge),Bt.BoxZoom=K,Bt.DoubleClickZoom=he,Bt.Drag=$n,Bt.Keyboard=pe,Bt.ScrollWheelZoom=me,Bt.TapHold=fe,Bt.TouchZoom=ge,e.Bounds=I,e.Browser=Me,e.CRS=H,e.Canvas=Hn,e.Circle=gn,e.CircleMarker=fn,e.Class=C,e.Control=Wt,e.DivIcon=In,e.DivOverlay=On,e.DomEvent=Q,e.DomUtil=bt,e.Draggable=Vt,e.Evented=E,e.FeatureGroup=cn,e.GeoJSON=vn,e.GridLayer=jn,e.Handler=J,e.Icon=un,e.ImageOverlay=Ln,e.LatLng=R,e.LatLngBounds=N,e.Layer=le,e.LayerGroup=ln,e.LineUtil=te,e.Map=Bt,e.Marker=pn,e.Mixin=X,e.Path=mn,e.Point=O,e.PolyUtil=ee,e.Polygon=yn,e.Polyline=_n,e.Popup=Dn,e.PosAnimation=Nt,e.Projection=oe,e.Rectangle=Un,e.Renderer=Wn,e.SVG=Gn,e.SVGOverlay=En,e.TileLayer=Nn,e.Tooltip=zn,e.Transformation=Z,e.Util=M,e.VideoOverlay=Tn,e.bind=l,e.bounds=j,e.canvas=Fn,e.circle=function(e,t,n){return new gn(e,t,n)},e.circleMarker=function(e,t){return new fn(e,t)},e.control=Rt,e.divIcon=function(e){return new In(e)},e.extend=c,e.featureGroup=function(e,t){return new cn(e,t)},e.geoJSON=Cn,e.geoJson=ue,e.gridLayer=function(e){return new jn(e)},e.icon=function(e){return new un(e)},e.imageOverlay=function(e,t,n){return new Ln(e,t,n)},e.latLng=W,e.latLngBounds=B,e.layerGroup=function(e,t){return new ln(e,t)},e.map=function(e,t){return new Bt(e,t)},e.marker=function(e,t){return new pn(e,t)},e.point=z,e.polygon=function(e,t){return new yn(e,t)},e.polyline=function(e,t){return new _n(e,t)},e.popup=function(e,t){return new Dn(e,t)},e.rectangle=function(e,t){return new Un(e,t)},e.setOptions=p,e.stamp=u,e.svg=Vn,e.svgOverlay=function(e,t,n){return new En(e,t,n)},e.tileLayer=Bn,e.tooltip=function(e,t){return new zn(e,t)},e.transformation=G,e.version="1.9.4",e.videoOverlay=function(e,t,n){return new Tn(e,t,n)},window.L);e.noConflict=function(){return window.L=Yn,this},window.L=e}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Leaflet=e.Leaflet||{},e.Leaflet.markercluster=e.Leaflet.markercluster||{}))}(this,function(e){"use strict";var t=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(e){if(e instanceof L.LayerGroup)return this.addLayers([e]);if(!e.getLatLng)return this._nonPointGroup.addLayer(e),this.fire("layeradd",{layer:e}),this;if(!this._map)return this._needsClustering.push(e),this.fire("layeradd",{layer:e}),this;if(this.hasLayer(e))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(e,this._maxZoom),this.fire("layeradd",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=e,n=this._zoom;if(e.__parent)for(;t.__parent._zoom>=n;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(e,t):this._animationAddLayerNonAnimated(e,t)),this},removeLayer:function(e){return e instanceof L.LayerGroup?this.removeLayers([e]):(e.getLatLng?this._map?e.__parent&&(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(e)),this._removeLayer(e,!0),this.fire("layerremove",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),e.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(e)&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow())):(!this._arraySplice(this._needsClustering,e)&&this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e})):(this._nonPointGroup.removeLayer(e),this.fire("layerremove",{layer:e})),this)},addLayers:function(n,i){if(!L.Util.isArray(n))return this.addLayer(n);var o,a=this._featureGroup,r=this._nonPointGroup,s=this.options.chunkedLoading,l=this.options.chunkInterval,c=this.options.chunkProgress,u=n.length,d=0,h=!0;if(this._map){var p=(new Date).getTime(),m=L.bind(function(){for(var e=(new Date).getTime();d<u;d++){if(s&&0==d%200){var t=(new Date).getTime()-e;if(l<t)break}(o=n[d])instanceof L.LayerGroup?(h&&(n=n.slice(),h=!1),this._extractNonGroupLayers(o,n),u=n.length):o.getLatLng?!this.hasLayer(o)&&(this._addLayer(o,this._maxZoom),i||this.fire("layeradd",{layer:o}),o.__parent&&2===o.__parent.getChildCount())&&(t=(t=o.__parent.getAllChildMarkers())[0]===o?t[1]:t[0],a.removeLayer(t)):(r.addLayer(o),i||this.fire("layeradd",{layer:o}))}c&&c(d,u,(new Date).getTime()-p),d===u?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(m,this.options.chunkDelay)},this);m()}else for(var e=this._needsClustering;d<u;d++)(o=n[d])instanceof L.LayerGroup?(h&&(n=n.slice(),h=!1),this._extractNonGroupLayers(o,n),u=n.length):o.getLatLng?this.hasLayer(o)||e.push(o):r.addLayer(o);return this},removeLayers:function(e){var t,n=e.length,i=this._featureGroup,o=this._nonPointGroup,a=!0;if(!this._map){for(l=0;l<n;l++)(t=e[l])instanceof L.LayerGroup?(a&&(e=e.slice(),a=!1),this._extractNonGroupLayers(t,e),n=e.length):(this._arraySplice(this._needsClustering,t),o.removeLayer(t),this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t}));return this}if(this._unspiderfy){this._unspiderfy();for(var r=e.slice(),s=n,l=0;l<s;l++)(t=r[l])instanceof L.LayerGroup?(this._extractNonGroupLayers(t,r),s=r.length):this._unspiderfyLayer(t)}for(l=0;l<n;l++)(t=e[l])instanceof L.LayerGroup?(a&&(e=e.slice(),a=!1),this._extractNonGroupLayers(t,e),n=e.length):t.__parent?(this._removeLayer(t,!0,!0),this.fire("layerremove",{layer:t}),i.hasLayer(t)&&(i.removeLayer(t),t.clusterShow&&t.clusterShow())):(o.removeLayer(t),this.fire("layerremove",{layer:t}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(e){e.off(this._childMarkerEventHandlers,this),delete e.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var e=new L.LatLngBounds;this._topClusterLevel&&e.extend(this._topClusterLevel._bounds);for(var t=this._needsClustering.length-1;0<=t;t--)e.extend(this._needsClustering[t].getLatLng());return e.extend(this._nonPointGroup.getBounds()),e},eachLayer:function(e,t){var n,i,o,a=this._needsClustering.slice(),r=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(a),i=a.length-1;0<=i;i--){for(n=!0,o=r.length-1;0<=o;o--)if(r[o].layer===a[i]){n=!1;break}n&&e.call(t,a[i])}this._nonPointGroup.eachLayer(e,t)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var n=null;return t=parseInt(t,10),this.eachLayer(function(e){L.stamp(e)===t&&(n=e)}),n},hasLayer:function(e){if(!e)return!1;for(var t=this._needsClustering,n=t.length-1;0<=n;n--)if(t[n]===e)return!0;for(n=(t=this._needsRemoving).length-1;0<=n;n--)if(t[n].layer===e)return!1;return!(!e.__parent||e.__parent._group!==this)||this._nonPointGroup.hasLayer(e)},zoomToShowLayer:function(e,t){"function"!=typeof t&&(t=function(){});var n=function(){!e._icon&&!e.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",n,this),this.off("animationend",n,this),e._icon?t():e.__parent._icon&&(this.once("spiderfied",t,this),e.__parent.spiderfy()))};e._icon&&this._map.getBounds().contains(e.getLatLng())?t():e.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",n,this),this._map.panTo(e.getLatLng())):(this._map.on("moveend",n,this),this.on("animationend",n,this),e.__parent.zoomToBounds())},onAdd:function(e){var t,n,i;if(this._map=e,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(e),this._nonPointGroup.addTo(e),this._gridClusters||this._generateInitialClusters(),this._maxLat=e.options.crs.projection.MAX_LATITUDE,t=0,n=this._needsRemoving.length;t<n;t++)(i=this._needsRemoving[t]).newlatlng=i.layer._latlng,i.layer._latlng=i.latlng;for(t=0,n=this._needsRemoving.length;t<n;t++)i=this._needsRemoving[t],this._removeLayer(i.layer,!0),i.layer._latlng=i.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),n=this._needsClustering,this._needsClustering=[],this.addLayers(n,!0)},onRemove:function(e){e.off("zoomend",this._zoomEnd,this),e.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(e){for(var t=e;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:function(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return e.splice(n,1),!0},_removeFromGridUnclustered:function(e,t){for(var n=this._map,i=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());o<=t&&i[t].removeObject(e,n.project(e.getLatLng(),t));t--);},_childMarkerDragStart:function(e){e.target.__dragStart=e.target._latlng},_childMarkerMoved:function(e){var t;this._ignoreMove||e.target.__dragStart||(t=e.target._popup&&e.target._popup.isOpen(),this._moveChild(e.target,e.oldLatLng,e.latlng),t&&e.target.openPopup())},_moveChild:function(e,t,n){e._latlng=t,this.removeLayer(e),e._latlng=n,this.addLayer(e)},_childMarkerDragEnd:function(e){var t=e.target.__dragStart;delete e.target.__dragStart,t&&this._moveChild(e.target,t,e.target._latlng)},_removeLayer:function(e,t,n){var i=this._gridClusters,o=this._gridUnclustered,a=this._featureGroup,r=this._map,s=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(e,this._maxZoom);var l,c=e.__parent,u=c._markers;for(this._arraySplice(u,e);c&&(c._childCount--,c._boundsNeedUpdate=!0,!(c._zoom<s));)t&&c._childCount<=1?(l=c._markers[0]===e?c._markers[1]:c._markers[0],i[c._zoom].removeObject(c,r.project(c._cLatLng,c._zoom)),o[c._zoom].addObject(l,r.project(l.getLatLng(),c._zoom)),this._arraySplice(c.__parent._childClusters,c),c.__parent._markers.push(l),l.__parent=c.__parent,c._icon&&(a.removeLayer(c),n||a.addLayer(l))):c._iconNeedsUpdate=!0,c=c.__parent;delete e.__parent},_isOrIsParent:function(e,t){for(;t;){if(e===t)return!0;t=t.parentNode}return!1},fire:function(e,t,n){if(t&&t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;e="cluster"+e}L.FeatureGroup.prototype.fire.call(this,e,t,n)},listens:function(e,t){return L.FeatureGroup.prototype.listens.call(this,e,t)||L.FeatureGroup.prototype.listens.call(this,"cluster"+e,t)},_defaultIconCreateFunction:function(e){var t=e.getChildCount(),e=" marker-cluster-";return e+=t<10?"small":t<100?"medium":"large",new L.DivIcon({html:"<div><span>"+t+"</span></div>",className:"marker-cluster"+e,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=this._map,t=this.options.spiderfyOnMaxZoom,n=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick;(t||i)&&this.on("clusterclick",this._zoomOrSpiderfy,this),n&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),e.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(e){for(var t=e.layer,n=t;1===n._childClusters.length;)n=n._childClusters[0];n._zoom===this._maxZoom&&n._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),e.originalEvent&&13===e.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(e){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),2<e.layer.getChildCount()&&e.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(e.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var e=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,i=this._map;(e||n)&&this.off("clusterclick",this._zoomOrSpiderfy,this),t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),i.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){var e;this._inZoomAnimation||(e=this._getExpandedVisibleBounds(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),e),this._currentShownBounds=e)},_generateInitialClusters:function(){var e=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),n=this.options.maxClusterRadius,i="function"!=typeof n?function(){return n}:n;null!==this.options.disableClusteringAtZoom&&(e=this.options.disableClusteringAtZoom-1),this._maxZoom=e,this._gridClusters={},this._gridUnclustered={};for(var o=e;t<=o;o--)this._gridClusters[o]=new L.DistanceGrid(i(o)),this._gridUnclustered[o]=new L.DistanceGrid(i(o));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(e,t){var n=this._gridClusters,i=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(e),e.on(this._childMarkerEventHandlers,this);o<=t;t--){var a=this._map.project(e.getLatLng(),t),r=n[t].getNearObject(a);if(r)return r._addChild(e),void(e.__parent=r);if(r=i[t].getNearObject(a)){var s=r.__parent;s&&this._removeLayer(r,!1);var l=new this._markerCluster(this,t,r,e);n[t].addObject(l,this._map.project(l._cLatLng,t)),r.__parent=l;for(var c=e.__parent=l,u=t-1;u>s._zoom;u--)c=new this._markerCluster(this,u,c),n[u].addObject(c,this._map.project(r.getLatLng(),u));return s._addChild(c),void this._removeFromGridUnclustered(r,t)}i[t].addObject(e,a)}this._topClusterLevel._addChild(e),e.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(e){e instanceof L.MarkerCluster&&e._iconNeedsUpdate&&e._updateIcon()})},_enqueue:function(e){this._queue.push(e),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var e=0;e<this._queue.length;e++)this._queue[e].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var e=Math.round(this._map._zoom);this._processQueue(),this._zoom<e&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,e)):this._zoom>e?(this._animationStart(),this._animationZoomOut(this._zoom,e)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(e){var t=this._maxLat;return void 0!==t&&(e.getNorth()>=t&&(e._northEast.lat=1/0),e.getSouth()<=-t&&(e._southWest.lat=-1/0)),e},_animationAddLayerNonAnimated:function(e,t){t===e?this._featureGroup.addLayer(e):2===t._childCount?(t._addToMap(),e=t.getAllChildMarkers(),this._featureGroup.removeLayer(e[0]),this._featureGroup.removeLayer(e[1])):t._updateIcon()},_extractNonGroupLayers:function(e,t){var n,i=e.getLayers(),o=0;for(t=t||[];o<i.length;o++)(n=i[o])instanceof L.LayerGroup?this._extractNonGroupLayers(n,t):t.push(n);return t},_overrideMarkerIcon:function(e){return e.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[e]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(e,t){this._animationAddLayerNonAnimated(e,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(o,a){var r,s=this._getExpandedVisibleBounds(),l=this._featureGroup,e=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(s,o,e,function(e){var t,n=e._latlng,i=e._markers;for(s.contains(n)||(n=null),e._isSingleParent()&&o+1===a?(l.removeLayer(e),e._recursivelyAddChildrenToMap(null,a,s)):(e.clusterHide(),e._recursivelyAddChildrenToMap(n,a,s)),r=i.length-1;0<=r;r--)t=i[r],s.contains(t._latlng)||l.removeLayer(t)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(s,a),l.eachLayer(function(e){e instanceof L.MarkerCluster||!e._icon||e.clusterShow()}),this._topClusterLevel._recursively(s,o,a,function(e){e._recursivelyRestoreChildPositions(a)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(s,o,e,function(e){l.removeLayer(e),e.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(e,t){this._animationZoomOutSingle(this._topClusterLevel,e-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e,this._getExpandedVisibleBounds())},_animationAddLayer:function(e,t){var n=this,i=this._featureGroup;i.addLayer(e),t!==e&&(2<t._childCount?(t._updateIcon(),this._forceLayout(),this._animationStart(),e._setPos(this._map.latLngToLayerPoint(t.getLatLng())),e.clusterHide(),this._enqueue(function(){i.removeLayer(e),e.clusterShow(),n._animationEnd()})):(this._forceLayout(),n._animationStart(),n._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,n,i){var o=this._getExpandedVisibleBounds(),a=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(o,a,n+1,i);var r=this;this._forceLayout(),t._recursivelyBecomeVisible(o,i),this._enqueue(function(){var e;1===t._childCount?(e=t._markers[0],this._ignoreMove=!0,e.setLatLng(e.getLatLng()),this._ignoreMove=!1,e.clusterShow&&e.clusterShow()):t._recursively(o,i,a,function(e){e._recursivelyRemoveChildrenFromMap(o,a,n+1)}),r._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(e){return new L.MarkerClusterGroup(e)};var n=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(e,t,n,i){L.Marker.prototype.initialize.call(this,n?n._cLatLng||n.getLatLng():new L.LatLng(0,0),{icon:this,pane:e.options.clusterPane}),this._group=e,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,n&&this._addChild(n),i&&this._addChild(i)},getAllChildMarkers:function(e,t){e=e||[];for(var n=this._childClusters.length-1;0<=n;n--)this._childClusters[n].getAllChildMarkers(e);for(var i=this._markers.length-1;0<=i;i--)t&&this._markers[i].__dragStart||e.push(this._markers[i]);return e},getChildCount:function(){return this._childCount},zoomToBounds:function(e){for(var t=this._childClusters.slice(),n=this._group._map,i=n.getBoundsZoom(this._bounds),o=this._zoom+1,n=n.getZoom();0<t.length&&o<i;){o++;for(var a=[],r=0;r<t.length;r++)a=a.concat(t[r]._childClusters);t=a}o<i?this._group._map.setView(this._latlng,o):i<=n?this._group._map.setView(this._latlng,n+1):this._group._map.fitBounds(this._bounds,e)},getBounds:function(){var e=new L.LatLngBounds;return e.extend(this._bounds),e},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(e,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(e),e instanceof L.MarkerCluster?(t||(this._childClusters.push(e),e.__parent=this),this._childCount+=e._childCount):(t||this._markers.push(e),this._childCount++),this.__parent&&this.__parent._addChild(e,!0)},_setClusterCenter:function(e){this._cLatLng||(this._cLatLng=e._cLatLng||e._latlng)},_resetBounds:function(){var e=this._bounds;e._southWest&&(e._southWest.lat=1/0,e._southWest.lng=1/0),e._northEast&&(e._northEast.lat=-1/0,e._northEast.lng=-1/0)},_recalculateBounds:function(){var e,t,n,i=this._markers,o=this._childClusters,a=0,r=0,s=this._childCount;if(0!==s){for(this._resetBounds(),e=0;e<i.length;e++)t=i[e]._latlng,this._bounds.extend(t),a+=t.lat,r+=t.lng;for(e=0;e<o.length;e++)(n=o[e])._boundsNeedUpdate&&n._recalculateBounds(),this._bounds.extend(n._bounds),t=n._wLatLng,n=n._childCount,a+=t.lat*n,r+=t.lng*n;this._latlng=this._wLatLng=new L.LatLng(a/s,r/s),this._boundsNeedUpdate=!1}},_addToMap:function(e){e&&(this._backupLatlng=this._latlng,this.setLatLng(e)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(e,o,t){this._recursively(e,this._group._map.getMinZoom(),t-1,function(e){for(var t,n=e._markers,i=n.length-1;0<=i;i--)(t=n[i])._icon&&(t._setPos(o),t.clusterHide())},function(e){for(var t,n=e._childClusters,i=n.length-1;0<=i;i--)(t=n[i])._icon&&(t._setPos(o),t.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,n,i,o){this._recursively(t,o,n,function(e){e._recursivelyAnimateChildrenIn(t,e._group._map.latLngToLayerPoint(e.getLatLng()).round(),i),e._isSingleParent()&&i-1===o?(e.clusterShow(),e._recursivelyRemoveChildrenFromMap(t,n,i)):e.clusterHide(),e._addToMap()})},_recursivelyBecomeVisible:function(e,t){this._recursively(e,this._group._map.getMinZoom(),t,null,function(e){e.clusterShow()})},_recursivelyAddChildrenToMap:function(i,o,a){this._recursively(a,this._group._map.getMinZoom()-1,o,function(e){if(o!==e._zoom)for(var t=e._markers.length-1;0<=t;t--){var n=e._markers[t];a.contains(n._latlng)&&(i&&(n._backupLatlng=n.getLatLng(),n.setLatLng(i),n.clusterHide&&n.clusterHide()),e._group._featureGroup.addLayer(n))}},function(e){e._addToMap(i)})},_recursivelyRestoreChildPositions:function(e){for(var t=this._markers.length-1;0<=t;t--){var n=this._markers[t];n._backupLatlng&&(n.setLatLng(n._backupLatlng),delete n._backupLatlng)}if(e-1===this._zoom)for(var i=this._childClusters.length-1;0<=i;i--)this._childClusters[i]._restorePosition();else for(var o=this._childClusters.length-1;0<=o;o--)this._childClusters[o]._recursivelyRestoreChildPositions(e)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(e,t,n,i){var o,a;this._recursively(e,t-1,n-1,function(e){for(a=e._markers.length-1;0<=a;a--)o=e._markers[a],i&&i.contains(o._latlng)||(e._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())},function(e){for(a=e._childClusters.length-1;0<=a;a--)o=e._childClusters[a],i&&i.contains(o._latlng)||(e._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())})},_recursively:function(e,t,n,i,o){var a,r,s=this._childClusters,l=this._zoom;if(t<=l&&(i&&i(this),o&&l===n&&o(this)),l<t||l<n)for(a=s.length-1;0<=a;a--)(r=s[a])._boundsNeedUpdate&&r._recalculateBounds(),e.intersects(r._bounds)&&r._recursively(e,t,n,i,o)},_isSingleParent:function(){return 0<this._childClusters.length&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var e=this.options.opacity;return this.setOpacity(0),this.options.opacity=e,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(e,t){var n=this._getCoord(t.x),i=this._getCoord(t.y),o=this._grid,i=o[i]=o[i]||{},i=i[n]=i[n]||[],n=L.Util.stamp(e);this._objectPoint[n]=t,i.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var n,i,o=this._getCoord(t.x),a=this._getCoord(t.y),t=this._grid,r=t[a]=t[a]||{},s=r[o]=r[o]||[];for(delete this._objectPoint[L.Util.stamp(e)],n=0,i=s.length;n<i;n++)if(s[n]===e)return s.splice(n,1),1===i&&delete r[o],!0},eachObject:function(e,t){var n,i,o,a,r,s,l,c=this._grid;for(n in c)for(i in r=c[n])for(s=r[i],o=0,a=s.length;o<a;o++)l=e.call(t,s[o]),l&&(o--,a--)},getNearObject:function(e){for(var t,n,i,o,a,r,s,l=this._getCoord(e.x),c=this._getCoord(e.y),u=this._objectPoint,d=this._sqCellSize,h=null,p=c-1;p<=c+1;p++)if(i=this._grid[p])for(t=l-1;t<=l+1;t++)if(o=i[t])for(n=0,a=o.length;n<a;n++)r=o[n],((s=this._sqDist(u[L.Util.stamp(r)],e))<d||s<=d&&null===h)&&(d=s,h=r);return h},_getCoord:function(e){var t=Math.floor(e/this._cellSize);return isFinite(t)?t:e},_sqDist:function(e,t){var n=t.x-e.x,e=t.y-e.y;return n*n+e*e}},L.QuickHull={getDistant:function(e,t){var n=t[1].lat-t[0].lat;return(t[0].lng-t[1].lng)*(e.lat-t[0].lat)+n*(e.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(e,t){for(var n,i,o=0,a=null,r=[],s=t.length-1;0<=s;s--)n=t[s],0<(i=this.getDistant(n,e))&&(r.push(n),o<i&&(o=i,a=n));return{maxPoint:a,newPoints:r}},buildConvexHull:function(e,t){var n=[],t=this.findMostDistantPointFromBaseLine(e,t);return t.maxPoint?(n=n.concat(this.buildConvexHull([e[0],t.maxPoint],t.newPoints))).concat(this.buildConvexHull([t.maxPoint,e[1]],t.newPoints)):[e[0]]},getConvexHull:function(e){for(var t=!1,n=!1,i=!1,o=!1,a=null,r=null,s=null,l=null,c=null,u=null,d=e.length-1;0<=d;d--){var h=e[d];(!1===t||h.lat>t)&&(t=(a=h).lat),(!1===n||h.lat<n)&&(n=(r=h).lat),(!1===i||h.lng>i)&&(i=(s=h).lng),(!1===o||h.lng<o)&&(o=(l=h).lng)}c=n!==t?(u=r,a):(u=l,s);return[].concat(this.buildConvexHull([u,c],e),this.buildConvexHull([c,u],e))}},L.MarkerCluster.include({getConvexHull:function(){for(var e,t=this.getAllChildMarkers(),n=[],i=t.length-1;0<=i;i--)e=t[i].getLatLng(),n.push(e);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){var e,t;this._group._spiderfied===this||this._group._inZoomAnimation||(e=this.getAllChildMarkers(null,!0),t=this._group._map.latLngToLayerPoint(this._latlng),this._group._unspiderfy(),this._group._spiderfied=this,t=e.length>=this._circleSpiralSwitchover?this._generatePointsSpiral(e.length,t):(t.y+=10,this._generatePointsCircle(e.length,t)),this._animationSpiderfy(e,t))},unspiderfy:function(e){this._group._inZoomAnimation||(this._animationUnspiderfy(e),this._group._spiderfied=null)},_generatePointsCircle:function(e,t){var n,i,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+e)/this._2PI,a=this._2PI/e,r=[],o=Math.max(o,35);for(r.length=e,n=0;n<e;n++)i=this._circleStartAngle+n*a,r[n]=new L.Point(t.x+o*Math.cos(i),t.y+o*Math.sin(i))._round();return r},_generatePointsSpiral:function(e,t){for(var n=this._group.options.spiderfyDistanceMultiplier,i=n*this._spiralLengthStart,o=n*this._spiralFootSeparation,a=n*this._spiralLengthFactor*this._2PI,r=0,s=[],l=s.length=e;0<=l;l--)l<e&&(s[l]=new L.Point(t.x+i*Math.cos(r),t.y+i*Math.sin(r))._round()),i+=a/(r+=o/i+5e-4*l);return s},_noanimationUnspiderfy:function(){var e,t,n=this._group,i=n._map,o=n._featureGroup,a=this.getAllChildMarkers(null,!0);for(n._ignoreMove=!0,this.setOpacity(1),t=a.length-1;0<=t;t--)e=a[t],o.removeLayer(e),e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng),e.setZIndexOffset&&e.setZIndexOffset(0),e._spiderLeg&&(i.removeLayer(e._spiderLeg),delete e._spiderLeg);n.fire("unspiderfied",{cluster:this,markers:a}),n._ignoreMove=!1,n._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(e,t){var n,i,o,a,r=this._group,s=r._map,l=r._featureGroup,c=this._group.options.spiderLegPolylineOptions;for(r._ignoreMove=!0,n=0;n<e.length;n++)a=s.layerPointToLatLng(t[n]),i=e[n],o=new L.Polyline([this._latlng,a],c),s.addLayer(o),i._spiderLeg=o,i._preSpiderfyLatlng=i._latlng,i.setLatLng(a),i.setZIndexOffset&&i.setZIndexOffset(1e6),l.addLayer(i);this.setOpacity(.3),r._ignoreMove=!1,r.fire("spiderfied",{cluster:this,markers:e})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(e,t){var n,i,o,a,r,s,l=this,c=this._group,u=c._map,d=c._featureGroup,h=this._latlng,p=u.latLngToLayerPoint(h),m=L.Path.SVG,f=L.extend({},this._group.options.spiderLegPolylineOptions),g=f.opacity;for(void 0===g&&(g=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),m?(f.opacity=0,f.className=(f.className||"")+" leaflet-cluster-spider-leg"):f.opacity=g,c._ignoreMove=!0,n=0;n<e.length;n++)i=e[n],s=u.layerPointToLatLng(t[n]),o=new L.Polyline([h,s],f),u.addLayer(o),i._spiderLeg=o,m&&(r=(a=o._path).getTotalLength()+.1,a.style.strokeDasharray=r,a.style.strokeDashoffset=r),i.setZIndexOffset&&i.setZIndexOffset(1e6),i.clusterHide&&i.clusterHide(),d.addLayer(i),i._setPos&&i._setPos(p);for(c._forceLayout(),c._animationStart(),n=e.length-1;0<=n;n--)s=u.layerPointToLatLng(t[n]),(i=e[n])._preSpiderfyLatlng=i._latlng,i.setLatLng(s),i.clusterShow&&i.clusterShow(),m&&((a=(o=i._spiderLeg)._path).style.strokeDashoffset=0,o.setStyle({opacity:g}));this.setOpacity(.3),c._ignoreMove=!1,setTimeout(function(){c._animationEnd(),c.fire("spiderfied",{cluster:l,markers:e})},200)},_animationUnspiderfy:function(e){var t,n,i,o,a,r=this,s=this._group,l=s._map,c=s._featureGroup,u=e?l._latLngToNewLayerPoint(this._latlng,e.zoom,e.center):l.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(null,!0),h=L.Path.SVG;for(s._ignoreMove=!0,s._animationStart(),this.setOpacity(1),n=d.length-1;0<=n;n--)(t=d[n])._preSpiderfyLatlng&&(t.closePopup(),t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng,a=!0,t._setPos&&(t._setPos(u),a=!1),t.clusterHide&&(t.clusterHide(),a=!1),a&&c.removeLayer(t),h&&(a=(o=(i=t._spiderLeg)._path).getTotalLength()+.1,o.style.strokeDashoffset=a,i.setStyle({opacity:0})));s._ignoreMove=!1,setTimeout(function(){var e=0;for(n=d.length-1;0<=n;n--)(t=d[n])._spiderLeg&&e++;for(n=d.length-1;0<=n;n--)(t=d[n])._spiderLeg&&(t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),1<e&&c.removeLayer(t),l.removeLayer(t._spiderLeg),delete t._spiderLeg);s._animationEnd(),s.fire("unspiderfied",{cluster:r,markers:d})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(e){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(e))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(e){this._spiderfied&&this._spiderfied.unspiderfy(e)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(e){e._spiderLeg&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),this._map.removeLayer(e._spiderLeg),delete e._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(e){return e?e instanceof L.MarkerClusterGroup?e=e._topClusterLevel.getAllChildMarkers():e instanceof L.LayerGroup?e=e._layers:e instanceof L.MarkerCluster?e=e.getAllChildMarkers():e instanceof L.Marker&&(e=[e]):e=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(e),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(e),this},_flagParentsIconsNeedUpdate:function(e){var t,n;for(t in e)for(n=e[t].__parent;n;)n._iconNeedsUpdate=!0,n=n.__parent},_refreshSingleMarkerModeMarkers:function(e){var t,n;for(t in e)n=e[t],this.hasLayer(n)&&n.setIcon(this._overrideMarkerIcon(n))}}),L.Marker.include({refreshIconOptions:function(e,t){var n=this.options.icon;return L.setOptions(n,e),this.setIcon(n),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),e.MarkerClusterGroup=t,e.MarkerCluster=n});
|
|
192
|
+
`);function $(e,t){var n=[e[0].latitude,e[0].longitude],i=U(e),n=l.createMarker(n,1<e.length,null);l.bindPopup(n,i,e.map(e=>parseInt(e.id_bigint)),t)}function Y(e,t){var n=[e.latitude,e.longitude],n=l.createMarker(n,1<e.membersOfGroup.length,null);l.addMarkerCallback(n,function(){crouton.openMeetingModal(e)})}var K=!1,Q=null;function J(t){return d.filter(e=>l.contains(t,e.latitude,e.longitude))}function X(){h=!0,c.map_search||ne(!1),l.addListener("dragend",ee,!0)}function ee(){h=!1,c.map_search&&f()?te():ne(!0)}function te(e){h||(n=null,corners=l.getCorners(),t&&l.contains(t,corners.ne.lat,corners.ne.lng)&&l.contains(t,corners.sw.lat,corners.sw.lng)?ne():he("km")>c.maxTomatoWidth?(jQuery("#zoomed-out-message").removeClass("hide"),j()):(t=l.getBounds(),k(),crouton.searchByCoordinates(l.getCenter().lat,l.getCenter().lng,he(),!1)))}function ne(e=!0){if(e==K&&!c.map_search)return e;let t=e?J(l.getBounds()):d,n=t.map(e=>e.id_bigint);return jQuery(".bmlt-data-row").each(function(e,t){t.dataset.visible=n.includes(t.id.split("-").pop())?"1":"0"}),jQuery("#byday").removeClass("hide"),jQuery("#filter-dropdown-visibile").val(e?"a-1":""),v=!1,crouton.simulateFilterDropdown(),v=!0,jQuery("#filteringByVisibility").html(e?"✔":""),(K=e)?Q=l.addListener("dragstart",X,!0):Q&&(l.removeListener(Q),Q=null),!e}function ie(){ne(!K)}function J(t){return d.filter(e=>l.contains(t,e.latitude,e.longitude))}function oe(e){return ae(J(e))}function ae(e){e=e.filter(e=>2!=e.venue_type);return null!=n?e.filter(e=>n.includes(e.id_bigint)):e}var re=!1;function se(){return(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement)===s||re}function le(e){var t=s;se()?e&&e.pseudoFullscreen?ce(!1):document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():_disablePseudoFullscreen(t):e&&e.pseudoFullscreen?ce(!0):t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):t.msRequestFullscreen?t.msRequestFullscreen():_enablePseudoFullscreen(t)}re=!1;function ce(e){var t=s;(re=e)?L.DomUtil.addClass(t,"leaflet-pseudo-fullscreen"):L.DomUtil.removeClass(t,"leaflet-pseudo-fullscreen"),l.invalidateSize()}function ue(e){return e*Math.PI/180}function de(e,t){var n=ue(t.lat-e.lat),i=ue(t.lng-e.lng),i=Math.sin(n/2)*Math.sin(n/2)+Math.cos(ue(e.lat))*Math.cos(ue(t.lat))*Math.sin(i/2)*Math.sin(i/2);return 6378137*(2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i)))}function he(e=!1){return e=e||crouton.config.distance_units,pe(l.getCorners(),e)}function pe(e,t="km"){return de(e.ne,e.sw)/2e3*("km"==t?1:.62137119)}function me(e){return pe(l.getCorners(e),"km")}this.initialize=function e(t,n,i=null,o=null,a=!0,r,s){if(!l.isApiLoaded())return p(e,[t,n,i,o,a,r,s]),void l.loadApi();g(document.getElementById(t),i,o,r,s),P(n,a,!0)},this.showMap=function(e=!1,t=!0){e&&o?o.invalidateSize():(l.invalidateSize(),d&&t&&l.fitBounds((n?d.filter(e=>n.includes(e.id_bigint)):d).reduce(function(e,t){return e.push([t.latitude,t.longitude]),e},[])))},this.fillMap=function(e){n=e,d&&q(v&&!K)},this.rowClick=function(t){var e=d.find(e=>e.id_bigint==t);e&&(14<=l.getZoom()&&l.contains(l.getBounds(),e.latitude,e.longitude)?l.openMarker(t):l.setViewToPosition({latitude:e.latitude,longitude:e.longitude},oe,function(){l.openMarker(t)}))},this.apiLoadedCallback=function(){i(...r)},this.refreshMeetings=P,this.getDistanceFromSearch=function(e){return!!a&&{km:(e=de(e,a))/1e3,miles:.00062137119*e}},this.openModalWindow=z,this.closeModalWindow=D,this.loadPopupMap=function e(t,n,i=null){if(!l.isApiLoaded())return p(e,[t,n,i]),void l.loadApi();t=document.getElementById(t);if(t){let e=new MapDelegate(c);i&&(loc={latitude:i.lat,longitude:i.lng,zoom:i.zoom}),e.createMap(t,loc)&&(t=e.createMarker([n.latitude,n.longitude],!1,null),e.bindPopup(t,null,n.id_bigint,!1),e.addClusterLayer(),o=e)}},this.filterVisible=ne,this.hasMapSearch=function(){return"map_search"in c}}function MapDelegate(c){var u,i,a=L.icon({iconUrl:c.BMLTPlugin_images+"/NAMarker.png",shadowUrl:c.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[0,-32]}),r=L.icon({iconUrl:c.BMLTPlugin_images+"/NAMarkerG.png",shadowUrl:c.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[0,-32]}),s=L.icon({iconUrl:c.BMLTPlugin_images+"/NAMarkerSel.png",shadowUrl:c.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[12,-32]}),t=L.icon({iconUrl:c.BMLTPlugin_images+"/SearchPoint.png",shadowUrl:c.BMLTPlugin_images+"/NAMarkerS.png",iconSize:[23,32],shadowSize:[43,32],iconAnchor:[12,32],shadowAnchor:[12,32],popupAnchor:[12,-32]}),l=[],o=null,n=!1,d=!1;function h(e,t){if(!u)return 12;var n=u.getZoom();if(c.map_search&&c.filter_visible&&1==c.filter_visible)return n;for(var i=u.getCenter(),o=u.getBounds(),a=!1;0==t(o,i).length&&6<n;){a=!0,--n;var r=L.latLng(2*o.getNorthEast().lat-i.lat,2*o.getNorthEast().lng-i.lng),s=L.latLng(2*o.getSouthWest().lat-i.lat,2*o.getSouthWest().lng-i.lng),o=L.latLngBounds(s,r)}if(!e&&!a&&n<12){for(var l=t(o).length;n<12&&0<l;){n+=1;r=L.latLng(.5*(o.getNorthEast().lat+i.lat),.5*(o.getNorthEast().lng+i.lng)),s=L.latLng(.5*(o.getSouthWest().lat+i.lat),.5*(o.getSouthWest().lng+i.lng)),l=t(o=L.latLngBounds(s,r)).length}0==l&&--n}return n}function p(e,t,n){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState){var t;if(200!==i.status&&304!==i.status)t="";else if("string"==typeof i.response)try{t=JSON.parse(i.response)}catch(e){t=i.response}else t=i.response;n(t)}},i.open("GET",e+function(e,t,n){var i,o=[];for(i in e){var a=encodeURIComponent(n?i.toUpperCase():i),r=e[i];if(L.Util.isArray(r))for(var s=0;s<r.length;s++)o.push(a+"="+encodeURIComponent(r[s]));else o.push(a+"="+encodeURIComponent(r))}return(t&&-1!==t.indexOf("?")?"&":"?")+o.join("&")}(t),!0),i.responseType="json",i.setRequestHeader("Accept","application/json"),i.setRequestHeader("Accept","*/*"),i.send(null)}function m(e){return"number"==typeof e||"string"==typeof e&&""!==e.trim()&&!isNaN(e)}this.createMap=function(e,t,n=!1){return t?n?(gDiv=e,gDiv.style.height="auto",gDiv.style.marginBottom="10px",u=null,gDiv):(myOptions={minZoom:c.minZoom,maxZoom:c.maxZoom,doubleClickZoom:!1,scrollWheelZoom:!1},myOptions=Object.assign(myOptions,{center:new L.latLng(t.latitude,t.longitude),zoom:t.zoom}),0==(n=e.offsetWidth)&&(n=e.parentNode.offsetWidth),t=e.offsetHeight,1.4*n<(t=0==t?n:t)&&(e.style.height=1.6*n+"px"),u=new L.Map(e,myOptions),i=L.tileLayer(c.tileUrl,c.tileOptions).addTo(u),u.zoomControl.setPosition("bottomright"),u.on("moveend",function(){i.redraw()}),u):null},this.addListener=function(e,t,n){if(u)return"dragend"==(e="dragstart"==(e="idle"==e?"moveend":e)?"movestart":e)&&(e="moveend"),n?u.once(e,t):u.on(e,t),{event:e,f:t}},this.removeListener=function(e){u&&u.off(e.event,e.f)},this.addControl=function(t,e,n){if(u){var i=L.Control.extend({onAdd:function(e){return t},onRemove:function(e){}});if(n){const o=new MutationObserver(function(e){e.forEach(e=>{e.addedNodes.forEach(e=>{e===t&&(o.disconnect(),n())})})});o.observe(document,{childList:!0,subtree:!0})}new i({position:e}).addTo(u)}else gDiv.appendChild(t)},this.setViewToPosition=function(e,t,n=null){u&&(e=L.latLng(e.latitude,e.longitude),u.flyTo(e),u.once("moveend",function(e){newZoom=h(!1,t),u.getZoom()!=newZoom?(u.setZoom(newZoom),u.once("zoomend",function(){u.invalidateSize(),n&&u.once("load moveend",n)})):n&&n()}))},this.clearAllMarkers=function(){u&&(l&&l.forEach(e=>{e.marker.closePopup(),u.removeLayer(e.marker)}),l=[])},this.fromLatLngToPoint=function(e,t){return u?u.latLngToLayerPoint(L.latLng(e,t)):null},this.callGeocoder=function(e,t,n=function(e,t){e&&e[0]&&e[0].bbox?(u.flyToBounds(e[0].bbox),u.on("moveend",function(e){u.off("moveend"),u.setZoom(h(!0,t)),u.once("moveend",function(){i.redraw()})})):alert(crouton.localization.getWord("address_lookup_fail"))}){geoCodeParams={},c.region&&""!==c.region.trim()&&(geoCodeParams.countrycodes=c.region),c.bounds&&m(c.bounds.north)&&m(c.bounds.east)&&m(c.bounds.south)&&m(c.bounds.west)&&(geoCodeParams.viewbox=c.bounds.west+","+c.bounds.south+","+c.bounds.east+","+c.bounds.north),function(e,t,a,r){p((c.nominatimUrl||"https://nominatim.openstreetmap.org/")+"search",L.extend({q:e,limit:5,format:"json",addressdetails:1},t),L.bind(function(e){var t=[];if(e&&e.length){for(var n=e.length-1;0<=n;n--){for(var i=e[n].boundingbox,o=0;o<4;o++)i[o]=parseFloat(i[o]);t[n]={icon:e[n].icon,name:e[n].display_name,bbox:L.latLngBounds([i[0],i[2]],[i[1],i[3]]),center:L.latLng(e[n].lat,e[n].lon),properties:e[n]}}r?a(t,r):a(t)}else alert(crouton.localization.getWord("address_lookup_fail"))},this))}(e,geoCodeParams,n,t)},this.setZoom=function(e,t=0){u&&(0<t?u.setZoom(t):u.setZoom(h(!1,e)))},this.getZoom=function(){return u?u.getZoom():null},this.createMarker=function(e,t,n){if(u){n=L.marker(e,{icon:t?r:a,title:n});return n.isMulti=t,o?o.addLayer(n):n.addTo(u),n}},this.bindPopup=function(t,e,i,o){if(e){let n=function(e){e=e.id.split("-")[1];d=e,jQuery(".bmlt-data-row > td").removeClass("rowHighlight"),jQuery("#meeting-data-row-"+e+" > td").addClass("rowHighlight"),"undefined"!=typeof crouton&&crouton.dayTabFromId(e)};t.bindPopup(e),t.on("popupopen",function(e){o&&t.getPopup().getContent().includes("panel-"+o)&&jQuery("input[type=radio][name=panel]").filter(function(){return jQuery(this).attr("id")=="panel-"+o}).each(function(e,t){jQuery(this).prop("checked",!0)}),t.setIcon(s),u.on("zoomstart",function(){t.closePopup()}),jQuery("input[type=radio][name=panel]:checked").each(function(e,t){n(t)}),jQuery("input[type=radio][name=panel]").change(function(){n(this)})}),t.on("popupclose",function(e){d=!1,t.setIcon(t.isMulti?r:a),jQuery(".bmlt-data-row > td").removeClass("rowHighlight")}),o&&i.includes(parseInt(o))&&(t.openPopup(),t.once("add",function(){t.isPopupOpen()||t.openPopup()})),l.push({ids:i,marker:t})}},this.addMarkerCallback=function(e,t,n){t&&e.on("click",function(){t(n)}),l.push({ids:n,marker:e})},this.contains=function(e,t,n){return!u||e.contains(L.latLng(t,n))},this.getBounds=function(){return u?u.getBounds():null},this.invalidateSize=function(){u&&u.invalidateSize()},this.zoomOut=function(e){u&&u.setZoom(h(!0,e))},this.fitBounds=function(e){u&&(e=e.reduce(function(e,t){return e.extend(t),e},L.latLngBounds()),u.fitBounds(e))},this.openMarker=function(t){u&&(marker=l.find(e=>e.ids.includes(t)),marker&&(marker.marker.openPopup(),jQuery("#panel-"+t).prop("checked",!0),"undefined"!=typeof crouton&&crouton.dayTabFromId(t)),jQuery(".bmlt-data-row > td").removeClass("rowHighlight"),jQuery("#meeting-data-row-"+t+" > td").addClass("rowHighlight"))},this.isApiLoaded=function(){return!0},this.createClusterLayer=function(){u&&(o=L.markerClusterGroup())},this.addClusterLayer=function(){u&&o&&u.addLayer(o)},this.removeClusterLayer=function(){u&&(o&&u.removeLayer(o),o=null)},this.clickSearch=function(e,t){L.DomUtil.addClass(u._container,"crosshair-cursor-enabled"),u.once("click",function(e){u.once("click",function(e){L.DomUtil.removeClass(u._container,"crosshair-cursor-enabled"),t(e.latlng.lat,e.latlng.lng)})})},this.getGeocodeCenter=function(e){if(e&&e[0])return{lat:e[0].center.lat,lng:e[0].center.lng};alert(crouton.localization.getWord("address_lookup_fail"))},this.modalOn=function(){u&&u.dragging.disable()},this.modalOff=function(){u&&u.dragging.enable()},this.afterInit=function(e){e()},this.isMapDefined=function(){return null!=u},this.getCorners=function(e=!1){return{ne:{lat:(e=e?e.reduce(function(e,t){return e.extend(t),e},L.latLngBounds()):u.getBounds()).getNorthEast().lat,lng:e.getNorthEast().lng},sw:{lat:e.getSouthWest().lat,lng:e.getSouthWest().lng}}},this.getCenter=function(){return{lat:u.getCenter().lat,lng:u.getCenter().lng}},this.markSearchPoint=function(e){u&&(n&&n.remove(),(n=L.marker(e,{icon:t})).addTo(u))},this.getOpenMarker=function(){return d}}Crouton.prototype.renderMeetingCount=function(){var e=this;e.lock(function(){e.updateMeetingCount()})},Crouton.prototype.simulateFilterDropdown=function(){self=this,jQuery(".bmlt-page:not(#byfield_embeddedMapPage)").each(function(){self.hidePage(this)}),self.filterMeetingsFromView()},Crouton.prototype.getAdjustedDateTime=function(e,t,n){var i=!0===this.config.auto_tz_adjust||"true"===this.config.auto_tz_adjust,o=i?(n=n||"UTC",(o=moment.tz(n).set({hour:t.split(":")[0],minute:t.split(":")[1],second:0}).isoWeekday(e)).clone().tz(moment.tz.guess())):moment().set({hour:t.split(":")[0],minute:t.split(":")[1],second:0}).isoWeekday(e),i=i?moment.tz(moment.tz.guess()):moment();return(o<i||i.isoWeekday()==o.isoWeekday()&&0==o.diff(i,"days"))&&o.add(1,"weeks"),o},Array.prototype.clone=function(){return this.slice()},Array.prototype.filterByObjectKeyValue=function(e,t){for(var n=[],i=0;i<this.length;i++)this[i][e]===t&&n.push(this[i]);return n},Array.prototype.getArrayItemByObjectKeyValue=function(e,t){for(var n=0;n<this.length;n++)if(this[n][e]===t)return this[n]},Array.prototype.clean=function(){for(var e=0;e<this.length;e++)""===this[e]&&(this.splice(e,1),e--);return this},Array.prototype.sortByKey=function(n){return this.sort(function(e,t){return e[n]<t[n]?-1:e[n]>t[n]?1:0}),this},MeetingMap.prototype.initialize=null,MeetingMap.prototype.showMap=null,MeetingMap.prototype.fillMap=null,MeetingMap.prototype.rowClick=null,MeetingMap.prototype.apiLoadedCallback=null,MeetingMap.prototype.refreshMeetings=null,MeetingMap.prototype.getDistanceFromSearch=null,MeetingMap.prototype.openModalWindow=null,MeetingMap.prototype.closeModalWindow=null,MeetingMap.prototype.loadPopupMap=null,MeetingMap.prototype.filterVisible=null,MeetingMap.prototype.hasMapSearch=null,MapDelegate.prototype.createMap=null,MapDelegate.prototype.addListener=null,MapDelegate.prototype.removeListener=null,MapDelegate.prototype.addControl=null,MapDelegate.prototype.setViewToPosition=null,MapDelegate.prototype.clearAllMarkers=null,MapDelegate.prototype.fromLatLngToPoint=null,MapDelegate.prototype.callGeocoder=null,MapDelegate.prototype.setZoom=null,MapDelegate.prototype.getZoom=null,MapDelegate.prototype.createMarker=null,MapDelegate.prototype.bindPopup=null,MapDelegate.prototype.addMarkerCallback=null,MapDelegate.prototype.contains=null,MapDelegate.prototype.getBounds=null,MapDelegate.prototype.invalidateSize=null,MapDelegate.prototype.zoomOut=null,MapDelegate.prototype.fitBounds=null,MapDelegate.prototype.openMarker=null,MapDelegate.prototype.isApiLoaded=null,MapDelegate.prototype.createClusterLayer=null,MapDelegate.prototype.addClusterLayer=null,MapDelegate.prototype.removeClusterLayer=null,MapDelegate.prototype.clickSearch=null,MapDelegate.prototype.getGeocodeCenter=null,MapDelegate.prototype.modalOn=null,MapDelegate.prototype.modalOff=null,MapDelegate.prototype.afterInit=null,MapDelegate.prototype.isMapDefined=null,MapDelegate.prototype.getCorners=null,MapDelegate.prototype.getCenter=null,MapDelegate.prototype.markSearchPoint=null,MapDelegate.prototype.getOpenMarker=null,function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).leaflet={})}(this,function(e){"use strict";function c(e){for(var t,n,i=1,o=arguments.length;i<o;i++)for(t in n=arguments[i])e[t]=n[t];return e}var s=Object.create||function(e){return t.prototype=e,new t};function t(){}function l(e,t){var n,i=Array.prototype.slice;return e.bind?e.bind.apply(e,i.call(arguments,1)):(n=i.call(arguments,2),function(){return e.apply(t,n.length?n.concat(i.call(arguments)):arguments)})}var n=0;function u(e){return"_leaflet_id"in e||(e._leaflet_id=++n),e._leaflet_id}function i(e,t,n){function i(){o=!1,a&&(r.apply(n,a),a=!1)}var o,a,r=function(){o?a=arguments:(e.apply(n,arguments),setTimeout(i,t),o=!0)};return r}function o(e,t,n){var i=t[1],o=i-(t=t[0]);return e===i&&n?e:((e-t)%o+o)%o+t}function d(){return!1}function a(e,t){return!1===t?e:(t=Math.pow(10,void 0===t?6:t),Math.round(e*t)/t)}function r(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function h(e){return r(e).split(/\s+/)}function p(e,t){for(var n in Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?s(e.options):{}),t)e.options[n]=t[n];return e.options}function m(e,t,n){var i,o=[];for(i in e)o.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(e[i]));return(t&&-1!==t.indexOf("?")?"&":"?")+o.join("&")}var f=/\{ *([\w_ -]+) *\}/g;function g(e,n){return e.replace(f,function(e,t){if(void 0===(t=n[t]))throw new Error("No value provided for variable "+e);return"function"==typeof t?t(n):t})}var _=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function y(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var w=0;function A(e){var t=+new Date,n=Math.max(0,16-(t-w));return w=t+n,window.setTimeout(e,n)}var k=window.requestAnimationFrame||b("RequestAnimationFrame")||A,x=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)};function S(e,t,n){if(!n||k!==A)return k.call(window,l(e,t));e.call(t)}function P(e){e&&x.call(window,e)}var M={__proto__:null,extend:c,create:s,bind:l,get lastId(){return n},stamp:u,throttle:i,wrapNum:o,falseFn:d,formatNum:a,trim:r,splitWords:h,setOptions:p,getParamString:m,template:g,isArray:_,indexOf:y,emptyImageUrl:v,requestFn:k,cancelFn:x,requestAnimFrame:S,cancelAnimFrame:P};function C(){}C.extend=function(e){function t(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var n,i=t.__super__=this.prototype,o=s(i);for(n in(o.constructor=t).prototype=o,this)Object.prototype.hasOwnProperty.call(this,n)&&"prototype"!==n&&"__super__"!==n&&(t[n]=this[n]);if(e.statics&&c(t,e.statics),e.includes){var a=e.includes;if("undefined"!=typeof L&&L&&L.Mixin)for(var a=_(a)?a:[a],r=0;r<a.length;r++)a[r]===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);c.apply(null,[o].concat(e.includes))}return c(o,e),delete o.statics,delete o.includes,o.options&&(o.options=i.options?s(i.options):{},c(o.options,e.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=o._initHooks.length;e<t;e++)o._initHooks[e].call(this)}},t},C.include=function(e){var t=this.prototype.options;return c(this.prototype,e),e.options&&(this.prototype.options=t,this.mergeOptions(e.options)),this},C.mergeOptions=function(e){return c(this.prototype.options,e),this},C.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var T={on:function(e,t,n){if("object"==typeof e)for(var i in e)this._on(i,e[i],t);else for(var o=0,a=(e=h(e)).length;o<a;o++)this._on(e[o],t,n);return this},off:function(e,t,n){if(arguments.length)if("object"==typeof e)for(var i in e)this._off(i,e[i],t);else{e=h(e);for(var o=1===arguments.length,a=0,r=e.length;a<r;a++)o?this._off(e[a]):this._off(e[a],t,n)}else delete this._events;return this},_on:function(e,t,n,i){"function"!=typeof t?console.warn("wrong listener type: "+typeof t):!1===this._listens(e,t,n)&&(t={fn:t,ctx:n=n===this?void 0:n},i&&(t.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t))},_off:function(e,t,n){var i,o,a;if(this._events&&(i=this._events[e]))if(1===arguments.length){if(this._firingCount)for(o=0,a=i.length;o<a;o++)i[o].fn=d;delete this._events[e]}else"function"!=typeof t?console.warn("wrong listener type: "+typeof t):!1!==(t=this._listens(e,t,n))&&(n=i[t],this._firingCount&&(n.fn=d,this._events[e]=i=i.slice()),i.splice(t,1))},fire:function(e,t,n){if(this.listens(e,n)){var i=c({},t,{type:e,target:this,sourceTarget:t&&t.sourceTarget||this});if(this._events){var o=this._events[e];if(o){this._firingCount=this._firingCount+1||1;for(var a=0,r=o.length;a<r;a++){var s=o[a],l=s.fn;s.once&&this.off(e,l,s.ctx),l.call(s.ctx||this,i)}this._firingCount--}}n&&this._propagateEvent(i)}return this},listens:function(e,t,n,i){"string"!=typeof e&&console.warn('"string" type argument expected');var o=t,a=("function"!=typeof t&&(i=!!t,n=o=void 0),this._events&&this._events[e]);if(a&&a.length&&!1!==this._listens(e,o,n))return!0;if(i)for(var r in this._eventParents)if(this._eventParents[r].listens(e,t,n,i))return!0;return!1},_listens:function(e,t,n){if(this._events){var i=this._events[e]||[];if(!t)return!!i.length;n===this&&(n=void 0);for(var o=0,a=i.length;o<a;o++)if(i[o].fn===t&&i[o].ctx===n)return o}return!1},once:function(e,t,n){if("object"==typeof e)for(var i in e)this._on(i,e[i],t,!0);else for(var o=0,a=(e=h(e)).length;o<a;o++)this._on(e[o],t,n,!0);return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[u(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[u(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,c({layer:e.target,propagatedFrom:e.target},e),!0)}},E=(T.addEventListener=T.on,T.removeEventListener=T.clearAllEventListeners=T.off,T.addOneTimeEventListener=T.once,T.fireEvent=T.fire,T.hasEventListeners=T.listens,C.extend(T));function O(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t}var D=Math.trunc||function(e){return 0<e?Math.floor(e):Math.ceil(e)};function z(e,t,n){return e instanceof O?e:_(e)?new O(e[0],e[1]):null==e?e:"object"==typeof e&&"x"in e&&"y"in e?new O(e.x,e.y):new O(e,t,n)}function I(e,t){if(e)for(var n=t?[e,t]:e,i=0,o=n.length;i<o;i++)this.extend(n[i])}function j(e,t){return!e||e instanceof I?e:new I(e,t)}function N(e,t){if(e)for(var n=t?[e,t]:e,i=0,o=n.length;i<o;i++)this.extend(n[i])}function B(e,t){return e instanceof N?e:new N(e,t)}function R(e,t,n){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==n&&(this.alt=+n)}function W(e,t,n){return e instanceof R?e:_(e)&&"object"!=typeof e[0]?3===e.length?new R(e[0],e[1],e[2]):2===e.length?new R(e[0],e[1]):null:null==e?e:"object"==typeof e&&"lat"in e?new R(e.lat,"lng"in e?e.lng:e.lon,e.alt):void 0===t?null:new R(e,t,n)}O.prototype={clone:function(){return new O(this.x,this.y)},add:function(e){return this.clone()._add(z(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(z(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new O(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new O(this.x/e.x,this.y/e.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=D(this.x),this.y=D(this.y),this},distanceTo:function(e){var t=(e=z(e)).x-this.x,e=e.y-this.y;return Math.sqrt(t*t+e*e)},equals:function(e){return(e=z(e)).x===this.x&&e.y===this.y},contains:function(e){return e=z(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+a(this.x)+", "+a(this.y)+")"}},I.prototype={extend:function(e){var t,n;if(e){if(e instanceof O||"number"==typeof e[0]||"x"in e)t=n=z(e);else if(t=(e=j(e)).min,n=e.max,!t||!n)return this;this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=t.clone(),this.max=n.clone())}return this},getCenter:function(e){return z((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return z(this.min.x,this.max.y)},getTopRight:function(){return z(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,n;return(e=("number"==typeof e[0]||e instanceof O?z:j)(e))instanceof I?(t=e.min,n=e.max):t=n=e,t.x>=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=j(e);var t=this.min,n=this.max,i=e.min,o=(e=e.max).x>=t.x&&i.x<=n.x,e=e.y>=t.y&&i.y<=n.y;return o&&e},overlaps:function(e){e=j(e);var t=this.min,n=this.max,i=e.min,o=(e=e.max).x>t.x&&i.x<n.x,e=e.y>t.y&&i.y<n.y;return o&&e},isValid:function(){return!(!this.min||!this.max)},pad:function(e){var t=this.min,n=this.max,i=Math.abs(t.x-n.x)*e,e=Math.abs(t.y-n.y)*e;return j(z(t.x-i,t.y-e),z(n.x+i,n.y+e))},equals:function(e){return!!e&&(e=j(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight()))}},N.prototype={extend:function(e){var t,n,i=this._southWest,o=this._northEast;if(e instanceof R)n=t=e;else{if(!(e instanceof N))return e?this.extend(W(e)||B(e)):this;if(t=e._southWest,n=e._northEast,!t||!n)return this}return i||o?(i.lat=Math.min(t.lat,i.lat),i.lng=Math.min(t.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new R(t.lat,t.lng),this._northEast=new R(n.lat,n.lng)),this},pad:function(e){var t=this._southWest,n=this._northEast,i=Math.abs(t.lat-n.lat)*e,e=Math.abs(t.lng-n.lng)*e;return new N(new R(t.lat-i,t.lng-e),new R(n.lat+i,n.lng+e))},getCenter:function(){return new R((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new R(this.getNorth(),this.getWest())},getSouthEast:function(){return new R(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){e=("number"==typeof e[0]||e instanceof R||"lat"in e?W:B)(e);var t,n,i=this._southWest,o=this._northEast;return e instanceof N?(t=e.getSouthWest(),n=e.getNorthEast()):t=n=e,t.lat>=i.lat&&n.lat<=o.lat&&t.lng>=i.lng&&n.lng<=o.lng},intersects:function(e){e=B(e);var t=this._southWest,n=this._northEast,i=e.getSouthWest(),o=(e=e.getNorthEast()).lat>=t.lat&&i.lat<=n.lat,e=e.lng>=t.lng&&i.lng<=n.lng;return o&&e},overlaps:function(e){e=B(e);var t=this._southWest,n=this._northEast,i=e.getSouthWest(),o=(e=e.getNorthEast()).lat>t.lat&&i.lat<n.lat,e=e.lng>t.lng&&i.lng<n.lng;return o&&e},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,t){return!!e&&(e=B(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t))},isValid:function(){return!(!this._southWest||!this._northEast)}};var H={latLngToPoint:function(e,t){return e=this.projection.project(e),t=this.scale(t),this.transformation._transform(e,t)},pointToLatLng:function(e,t){return t=this.scale(t),e=this.transformation.untransform(e,t),this.projection.unproject(e)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*Math.pow(2,e)},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){var t;return this.infinite?null:(t=this.projection.bounds,e=this.scale(e),new I(this.transformation.transform(t.min,e),this.transformation.transform(t.max,e)))},infinite:!(R.prototype={equals:function(e,t){return!!e&&(e=W(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+a(this.lat,e)+", "+a(this.lng,e)+")"},distanceTo:function(e){return F.distance(this,W(e))},wrap:function(){return F.wrapLatLng(this)},toBounds:function(e){var t=(e=180*e/40075017)/Math.cos(Math.PI/180*this.lat);return B([this.lat-e,this.lng-t],[this.lat+e,this.lng+t])},clone:function(){return new R(this.lat,this.lng,this.alt)}}),wrapLatLng:function(e){var t=this.wrapLng?o(e.lng,this.wrapLng,!0):e.lng;return new R(this.wrapLat?o(e.lat,this.wrapLat,!0):e.lat,t,e.alt)},wrapLatLngBounds:function(e){var t=e.getCenter(),n=this.wrapLatLng(t),i=t.lat-n.lat,t=t.lng-n.lng;return 0==i&&0==t?e:(n=e.getSouthWest(),e=e.getNorthEast(),new N(new R(n.lat-i,n.lng-t),new R(e.lat-i,e.lng-t)))}},F=c({},H,{wrapLng:[-180,180],R:6371e3,distance:function(e,t){var n=Math.PI/180,i=e.lat*n,o=t.lat*n,a=Math.sin((t.lat-e.lat)*n/2),t=Math.sin((t.lng-e.lng)*n/2),e=a*a+Math.cos(i)*Math.cos(o)*t*t,n=2*Math.atan2(Math.sqrt(e),Math.sqrt(1-e));return this.R*n}}),q={R:6378137,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,n=this.MAX_LATITUDE,n=Math.max(Math.min(n,e.lat),-n),n=Math.sin(n*t);return new O(this.R*e.lng*t,this.R*Math.log((1+n)/(1-n))/2)},unproject:function(e){var t=180/Math.PI;return new R((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:new I([-(q=6378137*Math.PI),-q],[q,q])};function Z(e,t,n,i){_(e)?(this._a=e[0],this._b=e[1],this._c=e[2],this._d=e[3]):(this._a=e,this._b=t,this._c=n,this._d=i)}function G(e,t,n,i){return new Z(e,t,n,i)}Z.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return e.x=(t=t||1)*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return new O((e.x/(t=t||1)-this._b)/this._a,(e.y/t-this._d)/this._c)}};var V=c({},F,{code:"EPSG:3857",projection:q,transformation:G(V=.5/(Math.PI*q.R),.5,-V,.5)}),U=c({},V,{code:"EPSG:900913"});function $(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Y(e,t){for(var n,i,o,a,r="",s=0,l=e.length;s<l;s++){for(n=0,i=(o=e[s]).length;n<i;n++)r+=(n?"L":"M")+(a=o[n]).x+" "+a.y;r+=t?Me.svg?"z":"x":""}return r||"M0 0"}var K=document.documentElement.style,Q=(bt="ActiveXObject"in window)&&!document.addEventListener,J="msLaunchUri"in navigator&&!("documentMode"in document),X=Pe("webkit"),ee=Pe("android"),te=Pe("android 2")||Pe("android 3"),ne=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ne=ee&&Pe("Google")&&ne<537&&!("AudioNode"in window),ie=!!window.opera,oe=!J&&Pe("chrome"),ae=Pe("gecko")&&!X&&!ie&&!bt,re=!oe&&Pe("safari"),se=Pe("phantom"),le="OTransition"in K,ce=0===navigator.platform.indexOf("Win"),ue=bt&&"transition"in K,de="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!te,K="MozPerspective"in K,he=!window.L_DISABLE_3D&&(ue||de||K)&&!le&&!se,pe=($n="undefined"!=typeof orientation||Pe("mobile"))&&X,me=$n&&de,fe=!window.PointerEvent&&window.MSPointerEvent,ge=!(!window.PointerEvent&&!fe),_e="ontouchstart"in window||!!window.TouchEvent,ye=!window.L_NO_TOUCH&&(_e||ge),ve=$n&&ie,be=$n&&ae,we=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),Ae=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",d,t),window.removeEventListener("testPassiveEventSupport",d,t)}catch(e){}return e}(),ke=!!document.createElement("canvas").getContext,xe=!(!document.createElementNS||!$("svg").createSVGRect),Se=!!xe&&((Se=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Se.firstChild&&Se.firstChild.namespaceURI));function Pe(e){return 0<=navigator.userAgent.toLowerCase().indexOf(e)}var Me={ie:bt,ielt9:Q,edge:J,webkit:X,android:ee,android23:te,androidStock:ne,opera:ie,chrome:oe,gecko:ae,safari:re,phantom:se,opera12:le,win:ce,ie3d:ue,webkit3d:de,gecko3d:K,any3d:he,mobile:$n,mobileWebkit:pe,mobileWebkit3d:me,msPointer:fe,pointer:ge,touch:ye,touchNative:_e,mobileOpera:ve,mobileGecko:be,retina:we,passiveEvents:Ae,canvas:ke,svg:xe,vml:!xe&&function(){try{var e=document.createElement("div"),t=(e.innerHTML='<v:shape adj="1"/>',e.firstChild);return t.style.behavior="url(#default#VML)",t&&"object"==typeof t.adj}catch(e){return!1}}(),inlineSvg:Se,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Ce=Me.msPointer?"MSPointerDown":"pointerdown",Le=Me.msPointer?"MSPointerMove":"pointermove",Te=Me.msPointer?"MSPointerUp":"pointerup",Ee=Me.msPointer?"MSPointerCancel":"pointercancel",Oe={touchstart:Ce,touchmove:Le,touchend:Te,touchcancel:Ee},De={touchstart:function(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Tt(t),Re(e,t)},touchmove:Re,touchend:Re,touchcancel:Re},ze={},Ie=!1;function je(e){ze[e.pointerId]=e}function Ne(e){ze[e.pointerId]&&(ze[e.pointerId]=e)}function Be(e){delete ze[e.pointerId]}function Re(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in t.touches=[],ze)t.touches.push(ze[n]);t.changedTouches=[t],e(t)}}var We=200;var He,Fe,qe,Ze,Ge,Ve=lt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ue=lt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),$e="webkitTransition"===Ue||"OTransition"===Ue?Ue+"End":"transitionend";function Ye(e){return"string"==typeof e?document.getElementById(e):e}function Ke(e,t){var n=e.style[t]||e.currentStyle&&e.currentStyle[t];return"auto"===(n=n&&"auto"!==n||!document.defaultView?n:(e=document.defaultView.getComputedStyle(e,null))?e[t]:null)?null:n}function Qe(e,t,n){return(e=document.createElement(e)).className=t||"",n&&n.appendChild(e),e}function Je(e){var t=e.parentNode;t&&t.removeChild(e)}function Xe(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function et(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function tt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function nt(e,t){return void 0!==e.classList?e.classList.contains(t):0<(e=rt(e)).length&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e)}function it(e,t){var n;if(void 0!==e.classList)for(var i=h(t),o=0,a=i.length;o<a;o++)e.classList.add(i[o]);else nt(e,t)||at(e,((n=rt(e))?n+" ":"")+t)}function ot(e,t){void 0!==e.classList?e.classList.remove(t):at(e,r((" "+rt(e)+" ").replace(" "+t+" "," ")))}function at(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}function rt(e){return void 0===(e=e.correspondingElement||e).className.baseVal?e.className:e.className.baseVal}function st(e,t){if("opacity"in e.style)e.style.opacity=t;else if("filter"in e.style){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=e.filters.item(i)}catch(e){if(1===t)return}t=Math.round(100*t),n?(n.Enabled=100!==t,n.Opacity=t):e.style.filter+=" progid:"+i+"(opacity="+t+")"}}function lt(e){for(var t=document.documentElement.style,n=0;n<e.length;n++)if(e[n]in t)return e[n];return!1}function ct(e,t,n){t=t||new O(0,0),e.style[Ve]=(Me.ie3d?"translate("+t.x+"px,"+t.y+"px)":"translate3d("+t.x+"px,"+t.y+"px,0)")+(n?" scale("+n+")":"")}function ut(e,t){e._leaflet_pos=t,Me.any3d?ct(e,t):(e.style.left=t.x+"px",e.style.top=t.y+"px")}function dt(e){return e._leaflet_pos||new O(0,0)}function ht(){yt(window,"dragstart",Tt)}function pt(){At(window,"dragstart",Tt)}function mt(e){for(;-1===e.tabIndex;)e=e.parentNode;e.style&&(ft(),Ge=(Ze=e).style.outlineStyle,e.style.outlineStyle="none",yt(window,"keydown",ft))}function ft(){Ze&&(Ze.style.outlineStyle=Ge,Ge=Ze=void 0,At(window,"keydown",ft))}function gt(e){for(;!((e=e.parentNode).offsetWidth&&e.offsetHeight||e===document.body););return e}function _t(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}function yt(e,t,n,i){if(t&&"object"==typeof t)for(var o in t)St(e,o,t[o],n);else for(var a=0,r=(t=h(t)).length;a<r;a++)St(e,t[a],n,i);return this}var vt="onselectstart"in document?(qe=function(){yt(window,"selectstart",Tt)},function(){At(window,"selectstart",Tt)}):(Fe=lt(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),qe=function(){var e;Fe&&(e=document.documentElement.style,He=e[Fe],e[Fe]="none")},function(){Fe&&(document.documentElement.style[Fe]=He,He=void 0)}),bt={__proto__:null,TRANSFORM:Ve,TRANSITION:Ue,TRANSITION_END:$e,get:Ye,getStyle:Ke,create:Qe,remove:Je,empty:Xe,toFront:et,toBack:tt,hasClass:nt,addClass:it,removeClass:ot,setClass:at,getClass:rt,setOpacity:st,testProp:lt,setTransform:ct,setPosition:ut,getPosition:dt,get disableTextSelection(){return qe},get enableTextSelection(){return vt},disableImageDrag:ht,enableImageDrag:pt,preventOutline:mt,restoreOutline:ft,getSizedParentNode:gt,getScale:_t},wt="_leaflet_events";function At(e,t,n,i){if(1===arguments.length)kt(e),delete e[wt];else if(t&&"object"==typeof t)for(var o in t)Pt(e,o,t[o],n);else if(t=h(t),2===arguments.length)kt(e,function(e){return-1!==y(t,e)});else for(var a=0,r=t.length;a<r;a++)Pt(e,t[a],n,i);return this}function kt(e,t){for(var n in e[wt]){var i=n.split(/\d/)[0];t&&!t(i)||Pt(e,i,null,null,n)}}var xt={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function St(t,e,n,i){var o,a,r=e+u(n)+(i?"_"+u(i):"");t[wt]&&t[wt][r]||(a=o=function(e){return n.call(i||t,e||window.event)},!Me.touchNative&&Me.pointer&&0===e.indexOf("touch")?o=function(e,t,n){return"touchstart"!==t||Ie||(document.addEventListener(Ce,je,!0),document.addEventListener(Le,Ne,!0),document.addEventListener(Te,Be,!0),document.addEventListener(Ee,Be,!0),Ie=!0),De[t]?(n=De[t].bind(this,n),e.addEventListener(Oe[t],n,!1),n):(console.warn("wrong event specified:",t),d)}(t,e,o):Me.touch&&"dblclick"===e?o=function(e,n){e.addEventListener("dblclick",n);var i,o=0;function t(e){var t;1!==e.detail?i=e.detail:"mouse"===e.pointerType||e.sourceCapabilities&&!e.sourceCapabilities.firesTouchEvents||(t=Ot(e)).some(function(e){return e instanceof HTMLLabelElement&&e.attributes.for})&&!t.some(function(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement})||((t=Date.now())-o<=We?2==++i&&n(function(e){var t,n,i={};for(n in e)t=e[n],i[n]=t&&t.bind?t.bind(e):t;return(e=i).type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}(e)):i=1,o=t)}return e.addEventListener("click",t),{dblclick:n,simDblclick:t}}(t,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(xt[e]||e,o,!!Me.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?t.addEventListener(xt[e],o=function(e){e=e||window.event,jt(t,e)&&a(e)},!1):t.addEventListener(e,a,!1):t.attachEvent("on"+e,o),t[wt]=t[wt]||{},t[wt][r]=o)}function Pt(e,t,n,i,o){var a,r;o=o||t+u(n)+(i?"_"+u(i):""),(n=e[wt]&&e[wt][o])&&(!Me.touchNative&&Me.pointer&&0===t.indexOf("touch")?(i=e,r=n,Oe[a=t]?i.removeEventListener(Oe[a],r,!1):console.warn("wrong event specified:",a)):Me.touch&&"dblclick"===t?((r=e).removeEventListener("dblclick",(i=n).dblclick),r.removeEventListener("click",i.simDblclick)):"removeEventListener"in e?e.removeEventListener(xt[t]||t,n,!1):e.detachEvent("on"+t,n),e[wt][o]=null)}function Mt(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function Ct(e){return St(e,"wheel",Mt),this}function Lt(e){return yt(e,"mousedown touchstart dblclick contextmenu",Mt),e._leaflet_disable_click=!0,this}function Tt(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function Et(e){return Tt(e),Mt(e),this}function Ot(e){if(e.composedPath)return e.composedPath();for(var t=[],n=e.target;n;)t.push(n),n=n.parentNode;return t}function Dt(e,t){var n,i;return t?(i=(n=_t(t)).boundingClientRect,new O((e.clientX-i.left)/n.x-t.clientLeft,(e.clientY-i.top)/n.y-t.clientTop)):new O(e.clientX,e.clientY)}var zt=Me.linux&&Me.chrome?window.devicePixelRatio:Me.mac?3*window.devicePixelRatio:0<window.devicePixelRatio?2*window.devicePixelRatio:1;function It(e){return Me.edge?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/zt:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}function jt(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch(e){return!1}return n!==e}var Q={__proto__:null,on:yt,off:At,stopPropagation:Mt,disableScrollPropagation:Ct,disableClickPropagation:Lt,preventDefault:Tt,stop:Et,getPropagationPath:Ot,getMousePosition:Dt,getWheelDelta:It,isExternalTarget:jt,addListener:yt,removeListener:At},Nt=E.extend({run:function(e,t,n,i){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=dt(e),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=S(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,n=1e3*this._duration;t<n?this._runFrame(this._easeOut(t/n),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){e=this._startPos.add(this._offset.multiplyBy(e)),t&&e._round(),ut(this._el,e),this.fire("step")},_complete:function(){P(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),Bt=E.extend({options:{crs:V,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(e,t){t=p(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=l(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(W(t.center),t.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Ue&&Me.any3d&&!Me.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),yt(this._proxy,$e,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,t,n){return t=void 0===t?this._zoom:this._limitZoom(t),e=this._limitCenter(W(e),t,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=c({animate:n.animate},n.zoom),n.pan=c({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,n.zoom):this._tryAnimatedPan(e,n.pan))?clearTimeout(this._sizeTimer):this._resetView(e,t,n.pan&&n.pan.noMoveStart),this},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,t){return e=e||(Me.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e=e||(Me.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,n){var i=this.getZoomScale(t),o=this.getSize().divideBy(2),e=(e instanceof O?e:this.latLngToContainerPoint(e)).subtract(o).multiplyBy(1-1/i),i=this.containerPointToLatLng(o.add(e));return this.setView(i,t,{zoom:n})},_getBoundsCenterZoom:function(e,t){t=t||{},e=e.getBounds?e.getBounds():B(e);var n=z(t.paddingTopLeft||t.padding||[0,0]),i=z(t.paddingBottomRight||t.padding||[0,0]),o=this.getBoundsZoom(e,!1,n.add(i));return(o="number"==typeof t.maxZoom?Math.min(t.maxZoom,o):o)===1/0?{center:e.getCenter(),zoom:o}:(t=i.subtract(n).divideBy(2),i=this.project(e.getSouthWest(),o),n=this.project(e.getNorthEast(),o),{center:this.unproject(i.add(n).divideBy(2).add(t),o),zoom:o})},fitBounds:function(e,t){if((e=B(e)).isValid())return e=this._getBoundsCenterZoom(e,t),this.setView(e.center,e.zoom,t);throw new Error("Bounds are not valid.")},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){var n;return t=t||{},(e=z(e).round()).x||e.y?(!0===t.animate||this.getSize().contains(e)?(this._panAnim||(this._panAnim=new Nt,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),!1!==t.animate?(it(this._mapPane,"leaflet-pan-anim"),n=this._getMapPanePos().subtract(e).round(),this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)):(this._rawPanBy(e),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this):this.fire("moveend")},flyTo:function(o,a,e){if(!1===(e=e||{}).animate||!Me.any3d)return this.setView(o,a,e);this._stop();var r=this.project(this.getCenter()),s=this.project(o),t=this.getSize(),l=this._zoom,c=(o=W(o),a=void 0===a?l:a,Math.max(t.x,t.y)),n=c*this.getZoomScale(l,a),u=s.distanceTo(r)||1,d=1.42,h=d*d;function i(e){return e=(n*n-c*c+(e?-1:1)*h*h*u*u)/(2*(e?n:c)*h*u),(e=Math.sqrt(e*e+1)-e)<1e-9?-18:Math.log(e)}function p(e){return(Math.exp(e)-Math.exp(-e))/2}function m(e){return(Math.exp(e)+Math.exp(-e))/2}var f=i(0);var g=Date.now(),_=(i(1)-f)/d,y=e.duration?1e3*e.duration:1e3*_*.8;return this._moveStart(!0,e.noMoveStart),function e(){var t,n=(Date.now()-g)/y,i=(1-Math.pow(1-n,1.5))*_;n<=1?(this._flyToFrame=S(e,this),this._move(this.unproject(r.add(s.subtract(r).multiplyBy((t=i,c*(m(f)*(p(t=f+d*t)/m(t))-p(f))/h/u))),l),this.getScaleZoom(c/(n=i,c*(m(f)/m(f+d*n))),l),{flyTo:!0})):this._move(o,a)._moveEnd(!0)}.call(this),this},flyToBounds:function(e,t){return e=this._getBoundsCenterZoom(e,t),this.flyTo(e.center,e.zoom,t)},setMaxBounds:function(e){return e=B(e),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var n=this.getCenter(),e=this._limitCenter(n,this._zoom,B(e));return n.equals(e)||this.panTo(e,t),this._enforcingBounds=!1,this},panInside:function(e,t){var n=z((t=t||{}).paddingTopLeft||t.padding||[0,0]),i=z(t.paddingBottomRight||t.padding||[0,0]),o=this.project(this.getCenter()),e=this.project(e),a=(n=j([(a=this.getPixelBounds()).min.add(n),a.max.subtract(i)])).getSize();return n.contains(e)||(this._enforcingBounds=!0,i=e.subtract(n.getCenter()),n=n.extend(e).getSize().subtract(a),o.x+=i.x<0?-n.x:n.x,o.y+=i.y<0?-n.y:n.y,this.panTo(this.unproject(o),t),this._enforcingBounds=!1),this},invalidateSize:function(e){if(!this._loaded)return this;e=c({animate:!1,pan:!0},!0===e?{animate:!0}:e);var t=this.getSize(),n=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),i=t.divideBy(2).round(),o=n.divideBy(2).round();return(i=i.subtract(o)).x||i.y?(e.animate&&e.pan?this.panBy(i):(e.pan&&this._rawPanBy(i),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(l(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:t,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){var t,n;return e=this._locateOptions=c({timeout:1e4,watch:!1},e),"geolocation"in navigator?(t=l(this._handleGeolocationResponse,this),n=l(this._handleGeolocationError,this),e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,n,e):navigator.geolocation.getCurrentPosition(t,n,e)):this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){var t;this._container._leaflet_id&&(t=e.code,e=e.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: "+e+"."}))},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t,n,i=new R(e.coords.latitude,e.coords.longitude),o=i.toBounds(2*e.coords.accuracy),a=this._locateOptions,r=(a.setView&&(t=this.getBoundsZoom(o),this.setView(i,a.maxZoom?Math.min(t,a.maxZoom):t)),{latlng:i,bounds:o,timestamp:e.timestamp});for(n in e.coords)"number"==typeof e.coords[n]&&(r[n]=e.coords[n]);this.fire("locationfound",r)}},addHandler:function(e,t){return t&&(t=this[e]=new t(this),this._handlers.push(t),this.options[e]&&t.enable()),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}for(var e in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),Je(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(P(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();for(e in this._panes)Je(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){return t=Qe("div","leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),t||this._mapPane),e&&(this._panes[e]=t),t},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new N(this.unproject(e.getBottomLeft()),this.unproject(e.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(e,t,n){e=B(e),n=z(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),a=this.getMaxZoom(),r=e.getNorthWest(),e=e.getSouthEast(),n=this.getSize().subtract(n),e=j(this.project(e,i),this.project(r,i)).getSize(),r=Me.any3d?this.options.zoomSnap:1,s=n.x/e.x,n=n.y/e.y,e=t?Math.max(s,n):Math.min(s,n),i=this.getScaleZoom(e,i);return r&&(i=Math.round(i/(r/100))*(r/100),i=t?Math.ceil(i/r)*r:Math.floor(i/r)*r),Math.max(o,Math.min(a,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){return new I(e=this._getTopLeftPoint(e,t),e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(void 0===e?this.getZoom():e)},getPane:function(e){return"string"==typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var n=this.options.crs;return t=void 0===t?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n=this.options.crs,e=(t=void 0===t?this._zoom:t,n.zoom(e*n.scale(t)));return isNaN(e)?1/0:e},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(W(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(z(e),t)},layerPointToLatLng:function(e){return e=z(e).add(this.getPixelOrigin()),this.unproject(e)},latLngToLayerPoint:function(e){return this.project(W(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(W(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(B(e))},distance:function(e,t){return this.options.crs.distance(W(e),W(t))},containerPointToLayerPoint:function(e){return z(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return z(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){return e=this.containerPointToLayerPoint(z(e)),this.layerPointToLatLng(e)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(W(e)))},mouseEventToContainerPoint:function(e){return Dt(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){if(!(e=this._container=Ye(e)))throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");yt(e,"scroll",this._onScroll,this),this._containerId=u(e)},_initLayout:function(){var e=this._container,t=(this._fadeAnimated=this.options.fadeAnimation&&Me.any3d,it(e,"leaflet-container"+(Me.touch?" leaflet-touch":"")+(Me.retina?" leaflet-retina":"")+(Me.ielt9?" leaflet-oldie":"")+(Me.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),Ke(e,"position"));"absolute"!==t&&"relative"!==t&&"fixed"!==t&&"sticky"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ut(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(it(e.markerPane,"leaflet-zoom-hide"),it(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t,n){ut(this._mapPane,new O(0,0));var i=!this._loaded,o=(this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset"),this._zoom!==t);this._moveStart(o,n)._move(e,t)._moveEnd(o),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,n,i){void 0===t&&(t=this._zoom);var o=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),i?n&&n.pinch&&this.fire("zoom",n):((o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return P(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){ut(this._mapPane,this._getMapPanePos().subtract(e))},_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(e){this._targets={};var t=e?At:yt;t((this._targets[u(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&t(window,"resize",this._onResize,this),Me.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){P(this._resizeRequest),this._resizeRequest=S(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var n,i=[],o="mouseout"===t||"mouseover"===t,a=e.target||e.srcElement,r=!1;a;){if((n=this._targets[u(a)])&&("click"===t||"preclick"===t)&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(t,!0)){if(o&&!jt(a,e))break;if(i.push(n),o)break}if(a===this._container)break;a=a.parentNode}return i.length||r||o||!this.listens(t,!0)?i:[this]},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t,n=e.target||e.srcElement;!this._loaded||n._leaflet_disable_events||"click"===e.type&&this._isClickDisabled(n)||("mousedown"===(t=e.type)&&mt(n),this._fireDOMEvent(e,t))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,t,n){"click"===e.type&&((s=c({},e)).type="preclick",this._fireDOMEvent(s,s.type,n));var i=this._findEventTargets(e,t);if(n){for(var o=[],a=0;a<n.length;a++)n[a].listens(t,!0)&&o.push(n[a]);i=o.concat(i)}if(i.length){"contextmenu"===t&&Tt(e);var r,s=i[0],l={originalEvent:e};for("keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type&&(r=s.getLatLng&&(!s._radius||s._radius<=10),l.containerPoint=r?this.latLngToContainerPoint(s.getLatLng()):this.mouseEventToContainerPoint(e),l.layerPoint=this.containerPointToLayerPoint(l.containerPoint),l.latlng=r?s.getLatLng():this.layerPointToLatLng(l.layerPoint)),a=0;a<i.length;a++)if(i[a].fire(t,l,!0),l.originalEvent._stopped||!1===i[a].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,t))return}},_draggableMoved:function(e){return(e=e.dragging&&e.dragging.enabled()?e:this).dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on("load",e,t),this},_getMapPanePos:function(){return dt(this._mapPane)||new O(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){return(e&&void 0!==t?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,n){return n=this._getNewPixelOrigin(n,t),this.project(e,t)._subtract(n)},_latLngBoundsToNewLayerBounds:function(e,t,n){return n=this._getNewPixelOrigin(n,t),j([this.project(e.getSouthWest(),t)._subtract(n),this.project(e.getNorthWest(),t)._subtract(n),this.project(e.getSouthEast(),t)._subtract(n),this.project(e.getNorthEast(),t)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,n){var i,o;return!n||(i=this.project(e,t),o=this.getSize().divideBy(2),o=new I(i.subtract(o),i.add(o)),o=this._getBoundsOffset(o,n,t),Math.abs(o.x)<=1&&Math.abs(o.y)<=1)?e:this.unproject(i.add(o),t)},_limitOffset:function(e,t){var n;return t?(n=new I((n=this.getPixelBounds()).min.add(e),n.max.add(e)),e.add(this._getBoundsOffset(n,t))):e},_getBoundsOffset:function(e,t,n){return n=(t=j(this.project(t.getNorthEast(),n),this.project(t.getSouthWest(),n))).min.subtract(e.min),t=t.max.subtract(e.max),new O(this._rebound(n.x,-t.x),this._rebound(n.y,-t.y))},_rebound:function(e,t){return 0<e+t?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom(),i=Me.any3d?this.options.zoomSnap:1;return i&&(e=Math.round(e/i)*i),Math.max(t,Math.min(n,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ot(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){return e=this._getCenterOffset(e)._trunc(),!(!0!==(t&&t.animate)&&!this.getSize().contains(e)||(this.panBy(e,t),0))},_createAnimProxy:function(){var e=this._proxy=Qe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(e){var t=Ve,n=this._proxy.style[t];ct(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Je(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();ct(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&0<=e.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,n){if(!this._animatingZoom){if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(t),i=this._getCenterOffset(e)._divideBy(1-1/i);if(!0!==n.animate&&!this.getSize().contains(i))return!1;S(function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(e,t,!0)},this)}return!0},_animateZoom:function(e,t,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,it(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(l(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ot(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Rt(e){return new Wt(e)}var Wt=C.extend({options:{position:"topright"},initialize:function(e){p(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),e=e._controlCorners[n];return it(t,"leaflet-control"),-1!==n.indexOf("bottom")?e.insertBefore(t,e.firstChild):e.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(Je(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(e){this._map&&e&&0<e.screenX&&0<e.screenY&&this._map.getContainer().focus()}}),Ht=(Bt.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var n=this._controlCorners={},i="leaflet-",o=this._controlContainer=Qe("div",i+"control-container",this._container);function e(e,t){n[e+t]=Qe("div",i+e+" "+i+t,o)}e("top","left"),e("top","right"),e("bottom","left"),e("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)Je(this._controlCorners[e]);Je(this._controlContainer),delete this._controlCorners,delete this._controlContainer}}),Wt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,i){return n<i?-1:i<n?1:0}},initialize:function(e,t,n){for(var i in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,e)this._addLayer(e[i],i);for(i in t)this._addLayer(t[i],i,!0)},onAdd:function(e){this._initLayout(),this._update(),(this._map=e).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(e){return Wt.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){return e.off("add remove",this._onLayerChange,this),(e=this._getLayer(u(e)))&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){it(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(it(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=e+"px"):ot(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ot(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=Qe("div",e),n=this.options.collapsed,i=(t.setAttribute("aria-haspopup",!0),Lt(t),Ct(t),this._section=Qe("section",e+"-list")),o=(n&&(this._map.on("click",this.collapse,this),yt(t,{mouseenter:this._expandSafely,mouseleave:this.collapse},this)),this._layersLink=Qe("a",e+"-toggle",t));o.href="#",o.title="Layers",o.setAttribute("role","button"),yt(o,{keydown:function(e){13===e.keyCode&&this._expandSafely()},click:function(e){Tt(e),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=Qe("div",e+"-base",i),this._separator=Qe("div",e+"-separator",i),this._overlaysList=Qe("div",e+"-overlays",i),t.appendChild(i)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&u(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,n){this._map&&e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:n}),this.options.sortLayers&&this._layers.sort(l(function(e,t){return this.options.sortFunction(e.layer,t.layer,e.name,t.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(this._container){Xe(this._baseLayersList),Xe(this._overlaysList),this._layerControlInputs=[];for(var e,t,n,i=0,o=0;o<this._layers.length;o++)n=this._layers[o],this._addItem(n),t=t||n.overlay,e=e||!n.overlay,i+=n.overlay?0:1;this.options.hideSingleBase&&(this._baseLayersList.style.display=(e=e&&1<i)?"":"none"),this._separator.style.display=t&&e?"":"none"}return this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(u(e.target));(e=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null)&&this._map.fire(e,t)},_createRadioElement:function(e,t){return e='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(t?' checked="checked"':"")+"/>",(t=document.createElement("div")).innerHTML=e,t.firstChild},_addItem:function(e){var t,n=document.createElement("label"),i=this._map.hasLayer(e.layer),o=((i=(e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=i):t=this._createRadioElement("leaflet-base-layers_"+u(this),i),this._layerControlInputs.push(t),t.layerId=u(e.layer),yt(t,"click",this._onInputClick,this),document.createElement("span"))).innerHTML=" "+e.name,document.createElement("span"));return n.appendChild(o),o.appendChild(t),o.appendChild(i),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var e,t,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var a=n.length-1;0<=a;a--)e=n[a],t=this._getLayer(e.layerId).layer,e.checked?i.push(t):e.checked||o.push(t);for(a=0;a<o.length;a++)this._map.hasLayer(o[a])&&this._map.removeLayer(o[a]);for(a=0;a<i.length;a++)this._map.hasLayer(i[a])||this._map.addLayer(i[a]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e,t,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;0<=o;o--)e=n[o],t=this._getLayer(e.layerId).layer,e.disabled=void 0!==t.options.minZoom&&i<t.options.minZoom||void 0!==t.options.maxZoom&&i>t.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section,t=(this._preventClick=!0,yt(e,"click",Tt),this.expand(),this);setTimeout(function(){At(e,"click",Tt),t._preventClick=!1})}})),Ft=Wt.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",n=Qe("div",t+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,t+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,t+"-out",n,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(e){e.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(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,n,i,o){return(n=Qe("a",n,i)).innerHTML=e,n.href="#",n.title=t,n.setAttribute("role","button"),n.setAttribute("aria-label",t),Lt(n),yt(n,"click",Et),yt(n,"click",o,this),yt(n,"click",this._refocusOnMap,this),n},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";ot(this._zoomInButton,t),ot(this._zoomOutButton,t),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&e._zoom!==e.getMinZoom()||(it(this._zoomOutButton,t),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&e._zoom!==e.getMaxZoom()||(it(this._zoomInButton,t),this._zoomInButton.setAttribute("aria-disabled","true"))}}),qt=(Bt.mergeOptions({zoomControl:!0}),Bt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ft,this.addControl(this.zoomControl))}),Wt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",n=Qe("div",t),i=this.options;return this._addScales(i,t+"-line",n),e.on(i.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=Qe("div",t,n)),e.imperial&&(this._iScale=Qe("div",t,n))},_update:function(){var e=(t=this._map).getSize().y/2,t=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(t)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e);this._updateScale(this._mScale,t<1e3?t+" m":t/1e3+" km",t/e)},_updateImperial:function(e){var t,n;5280<(e=3.2808399*e)?(n=this._getRoundNum(t=e/5280),this._updateScale(this._iScale,n+" mi",n/t)):(n=this._getRoundNum(e),this._updateScale(this._iScale,n+" ft",n/e))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1);return t*(10<=(e=e/t)?10:5<=e?5:3<=e?3:2<=e?2:1)}})),Zt=Wt.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Me.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(e){p(this,e),this._attributions={}},onAdd:function(e){for(var t in(e.attributionControl=this)._container=Qe("div","leaflet-control-attribution"),Lt(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e&&(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update()),this},removeAttribution:function(e){return e&&this._attributions[e]&&(this._attributions[e]--,this._update()),this},_update:function(){if(this._map){var e,t=[];for(e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}}),X=((J=(Bt.mergeOptions({attributionControl:!0}),Bt.addInitHook(function(){this.options.attributionControl&&(new Zt).addTo(this)}),Wt.Layers=Ht,Wt.Zoom=Ft,Wt.Scale=qt,Wt.Attribution=Zt,Rt.layers=function(e,t,n){return new Ht(e,t,n)},Rt.zoom=function(e){return new Ft(e)},Rt.scale=function(e){return new qt(e)},Rt.attribution=function(e){return new Zt(e)},C.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}}))).addTo=function(e,t){return e.addHandler(t,this),this},{Events:T}),Gt=Me.touch?"touchstart mousedown":"mousedown",Vt=E.extend({options:{clickTolerance:3},initialize:function(e,t,n,i){p(this,i),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||(yt(this._dragStartTarget,Gt,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Vt._dragging===this&&this.finishDrag(!0),At(this._dragStartTarget,Gt,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){var t,n;this._enabled&&(this._moved=!1,nt(this._element,"leaflet-zoom-anim")||(e.touches&&1!==e.touches.length?Vt._dragging===this&&this.finishDrag():Vt._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches||((Vt._dragging=this)._preventOutline&&mt(this._element),ht(),qe(),this._moving||(this.fire("down"),n=e.touches?e.touches[0]:e,t=gt(this._element),this._startPoint=new O(n.clientX,n.clientY),this._startPos=dt(this._element),this._parentScale=_t(t),n="mousedown"===e.type,yt(document,n?"mousemove":"touchmove",this._onMove,this),yt(document,n?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(e){var t;this._enabled&&(e.touches&&1<e.touches.length?this._moved=!0:!(t=new O((t=e.touches&&1===e.touches.length?e.touches[0]:e).clientX,t.clientY)._subtract(this._startPoint)).x&&!t.y||Math.abs(t.x)+Math.abs(t.y)<this.options.clickTolerance||(t.x/=this._parentScale.x,t.y/=this._parentScale.y,Tt(e),this._moved||(this.fire("dragstart"),this._moved=!0,it(document.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),it(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(t),this._moving=!0,this._lastEvent=e,this._updatePosition()))},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire("predrag",e),ut(this._element,this._newPos),this.fire("drag",e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){ot(document.body,"leaflet-dragging"),this._lastTarget&&(ot(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),At(document,"mousemove touchmove",this._onMove,this),At(document,"mouseup touchend touchcancel",this._onUp,this),pt(),vt();var t=this._moved&&this._moving;this._moving=!1,Vt._dragging=!1,t&&this.fire("dragend",{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function Ut(e,t,n){for(var i,o,a,r,s,l,c,u=[1,4,2,8],d=0,h=e.length;d<h;d++)e[d]._code=tn(e[d],t);for(a=0;a<4;a++){for(l=u[a],i=[],d=0,o=(h=e.length)-1;d<h;o=d++)r=e[d],s=e[o],r._code&l?s._code&l||((c=en(s,r,l,t,n))._code=tn(c,t),i.push(c)):(s._code&l&&((c=en(s,r,l,t,n))._code=tn(c,t),i.push(c)),i.push(r));e=i}return e}function $t(e,t){var n,i,o,a,r,s,l;if(!e||0===e.length)throw new Error("latlngs not passed");on(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);for(var c=W([0,0]),u=B(e),d=(u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(c=Yt(e)),e.length),h=[],p=0;p<d;p++){var m=W(e[p]);h.push(t.project(W([m.lat-c.lat,m.lng-c.lng])))}for(p=r=s=l=0,n=d-1;p<d;n=p++)i=h[p],o=h[n],a=i.y*o.x-o.y*i.x,s+=(i.x+o.x)*a,l+=(i.y+o.y)*a,r+=3*a;return u=0===r?h[0]:[s/r,l/r],W([(u=t.unproject(z(u))).lat+c.lat,u.lng+c.lng])}function Yt(e){for(var t=0,n=0,i=0,o=0;o<e.length;o++){var a=W(e[o]);t+=a.lat,n+=a.lng,i++}return W([t/i,n/i])}var Kt,ee={__proto__:null,clipPolygon:Ut,polygonCenter:$t,centroid:Yt};function Qt(e,t){if(t&&e.length){var n=e=function(e,t){for(var n,i,o,a=[e[0]],r=1,s=0,l=e.length;r<l;r++)n=e[r],i=e[s],o=void 0,(o=i.x-n.x)*o+(i=i.y-n.y)*i>t&&(a.push(e[r]),s=r);return s<l-1&&a.push(e[l-1]),a}(e,t*=t),i=n.length,o=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);o[0]=o[i-1]=1,function e(t,n,i,o,a){for(var r,s,l=0,c=o+1;c<=a-1;c++)l<(s=nn(t[c],t[o],t[a],!0))&&(r=c,l=s);i<l&&(n[r]=1,e(t,n,i,o,r),e(t,n,i,r,a))}(n,o,t,0,i-1);for(var a=[],r=0;r<i;r++)o[r]&&a.push(n[r]);return a}return e.slice()}function Jt(e,t,n){return Math.sqrt(nn(e,t,n,!0))}function Xt(e,t,n,i,o){var a,r,s,l=i?Kt:tn(e,n),c=tn(t,n);for(Kt=c;;){if(!(l|c))return[e,t];if(l&c)return!1;s=tn(r=en(e,t,a=l||c,n,o),n),a===l?(e=r,l=s):(t=r,c=s)}}function en(e,t,n,i,o){var a,r,s=t.x-e.x,t=t.y-e.y,l=i.min,i=i.max;return 8&n?(a=e.x+s*(i.y-e.y)/t,r=i.y):4&n?(a=e.x+s*(l.y-e.y)/t,r=l.y):2&n?(a=i.x,r=e.y+t*(i.x-e.x)/s):1&n&&(a=l.x,r=e.y+t*(l.x-e.x)/s),new O(a,r,o)}function tn(e,t){var n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n}function nn(e,t,n,i){var o=t.x,t=t.y,a=n.x-o,r=n.y-t,s=a*a+r*r;return 0<s&&(1<(s=((e.x-o)*a+(e.y-t)*r)/s)?(o=n.x,t=n.y):0<s&&(o+=a*s,t+=r*s)),a=e.x-o,r=e.y-t,i?a*a+r*r:new O(o,t)}function on(e){return!_(e[0])||"object"!=typeof e[0][0]&&void 0!==e[0][0]}function an(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),on(e)}function rn(e,t){var n,i,o,a,r,s;if(!e||0===e.length)throw new Error("latlngs not passed");on(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);for(var l=W([0,0]),c=B(e),u=(c.getNorthWest().distanceTo(c.getSouthWest())*c.getNorthEast().distanceTo(c.getNorthWest())<1700&&(l=Yt(e)),e.length),d=[],h=0;h<u;h++){var p=W(e[h]);d.push(t.project(W([p.lat-l.lat,p.lng-l.lng])))}for(n=h=0;h<u-1;h++)n+=d[h].distanceTo(d[h+1])/2;if(0===n)s=d[0];else for(i=h=0;h<u-1;h++)if(o=d[h],a=d[h+1],n<(i+=r=o.distanceTo(a))){s=[a.x-(r=(i-n)/r)*(a.x-o.x),a.y-r*(a.y-o.y)];break}return W([(c=t.unproject(z(s))).lat+l.lat,c.lng+l.lng])}var te={__proto__:null,simplify:Qt,pointToSegmentDistance:Jt,closestPointOnSegment:function(e,t,n){return nn(e,t,n)},clipSegment:Xt,_getEdgeIntersection:en,_getBitCode:tn,_sqClosestPointOnSegment:nn,isFlat:on,_flat:an,polylineCenter:rn},oe={__proto__:null,LonLat:ne={project:function(e){return new O(e.lng,e.lat)},unproject:function(e){return new R(e.y,e.x)},bounds:new I([-180,-90],[180,90])},Mercator:ie={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,n=this.R,i=e.lat*t,o=this.R_MINOR/n,a=(o=Math.sqrt(1-o*o))*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-a)/(1+a),o/2),i=-n*Math.log(Math.max(a,1e-10));return new O(e.lng*t*n,i)},unproject:function(e){for(var t,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,a=Math.sqrt(1-o*o),r=Math.exp(-e.y/i),s=Math.PI/2-2*Math.atan(r),l=0,c=.1;l<15&&1e-7<Math.abs(c);l++)t=a*Math.sin(s),t=Math.pow((1-t)/(1+t),a/2),s+=c=Math.PI/2-2*Math.atan(r*t)-s;return new R(s*n,e.x*n/i)}},SphericalMercator:q},re=c({},F,{code:"EPSG:3395",projection:ie,transformation:G(ae=.5/(Math.PI*ie.R),.5,-ae,.5)}),sn=c({},F,{code:"EPSG:4326",projection:ne,transformation:G(1/180,1,-1/180,.5)}),se=c({},H,{projection:ne,transformation:G(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,t=t.lat-e.lat;return Math.sqrt(n*n+t*t)},infinite:!0}),le=(H.Earth=F,H.EPSG3395=re,H.EPSG3857=V,H.EPSG900913=U,H.EPSG4326=sn,H.Simple=se,E.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[u(e)]=this},removeInteractiveTarget:function(e){return delete this._map._targets[u(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t,n=e.target;n.hasLayer(this)&&(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents&&(t=this.getEvents(),n.on(t,this),this.once("remove",function(){n.off(t,this)},this)),this.onAdd(n),this.fire("add"),n.fire("layeradd",{layer:this}))}})),ln=(Bt.include({addLayer:function(e){var t;if(e._layerAdd)return t=u(e),this._layers[t]||((this._layers[t]=e)._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e)),this;throw new Error("The provided object is not a Layer.")},removeLayer:function(e){var t=u(e);return this._layers[t]&&(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null),this},hasLayer:function(e){return u(e)in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},_addLayers:function(e){for(var t=0,n=(e=e?_(e)?e:[e]:[]).length;t<n;t++)this.addLayer(e[t])},_addZoomLimit:function(e){isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[u(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){e=u(e),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var e,t=1/0,n=-1/0,i=this._getZoomSpan();for(e in this._zoomBoundLayers)var o=this._zoomBoundLayers[e].options,t=void 0===o.minZoom?t:Math.min(t,o.minZoom),n=void 0===o.maxZoom?n:Math.max(n,o.maxZoom);this._layersMaxZoom=n===-1/0?void 0:n,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}}),le.extend({initialize:function(e,t){var n,i;if(p(this,t),this._layers={},e)for(n=0,i=e.length;n<i;n++)this.addLayer(e[n])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){return e=e in this._layers?e:this.getLayerId(e),this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(e){return("number"==typeof e?e:this.getLayerId(e))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t,n,i=Array.prototype.slice.call(arguments,1);for(t in this._layers)(n=this._layers[t])[e]&&n[e].apply(n,i);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:u})),cn=ln.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),ln.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?((e=e in this._layers?this._layers[e]:e).removeEventParent(this),ln.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e,t=new N;for(e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),un=C.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){p(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var n=this._getIconUrl(e);if(n)return n=this._createImg(n,t&&"IMG"===t.tagName?t:null),this._setIconStyles(n,e),!this.options.crossOrigin&&""!==this.options.crossOrigin||(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n;if("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null},_setIconStyles:function(e,t){var n=this.options,i=z(i="number"==typeof(i=n[t+"Size"])?[i,i]:i),o=z("shadow"===t&&n.shadowAnchor||n.iconAnchor||i&&i.divideBy(2,!0));e.className="leaflet-marker-"+t+" "+(n.className||""),o&&(e.style.marginLeft=-o.x+"px",e.style.marginTop=-o.y+"px"),i&&(e.style.width=i.x+"px",e.style.height=i.y+"px")},_createImg:function(e,t){return(t=t||document.createElement("img")).src=e,t},_getIconUrl:function(e){return Me.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}}),dn=un.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(e){return"string"!=typeof dn.imagePath&&(dn.imagePath=this._detectIconPath()),(this.options.imagePath||dn.imagePath)+un.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){function t(e,t,n){return(t=t.exec(e))&&t[n]}return(e=t(e,/^url\((['"])?(.+)\1\)$/,2))&&t(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=Qe("div","leaflet-default-icon-path",document.body),t=Ke(e,"background-image")||Ke(e,"backgroundImage");return document.body.removeChild(e),(t=this._stripUrl(t))?t:(e=document.querySelector('link[href$="leaflet.css"]'))?e.href.substring(0,e.href.length-"leaflet.css".length-1):""}}),hn=J.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new Vt(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),it(e,"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&&ot(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var t=this._marker,n=t._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,a=dt(t._icon),r=n.getPixelBounds(),s=n.getPixelOrigin();(s=j(r.min._subtract(s).add(o),r.max._subtract(s).subtract(o))).contains(a)||(o=z((Math.max(s.max.x,a.x)-s.max.x)/(r.max.x-s.max.x)-(Math.min(s.min.x,a.x)-s.min.x)/(r.min.x-s.min.x),(Math.max(s.max.y,a.y)-s.max.y)/(r.max.y-s.max.y)-(Math.min(s.min.y,a.y)-s.min.y)/(r.min.y-s.min.y)).multiplyBy(i),n.panBy(o,{animate:!1}),this._draggable._newPos._add(o),this._draggable._startPos._add(o),ut(t._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=S(this._adjustPan.bind(this,e)))},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(e){this._marker.options.autoPan&&(P(this._panRequest),this._panRequest=S(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,n=t._shadow,i=dt(t._icon),o=t._map.layerPointToLatLng(i);n&&ut(n,i),t._latlng=o,e.latlng=o,e.oldLatLng=this._oldLatLng,t.fire("move",e).fire("drag",e)},_onDragEnd:function(e){P(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),pn=le.extend({options:{icon:new dn,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,t){p(this,t),this._latlng=W(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.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(e){var t=this._latlng;return this._latlng=W(e),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){var e;return this._icon&&this._map&&(e=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(e)),this},_initIcon:function(){var e=this.options,t="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=e.icon.createIcon(this._icon),i=!1,o=!1;(n=(n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,e.title&&(n.title=e.title),"IMG"===n.tagName&&(n.alt=e.alt||"")),it(n,t),e.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&yt(n,"focus",this._panOnFocus,this),e.icon.createShadow(this._shadow)))!==this._shadow&&(this._removeShadow(),o=!0),n&&(it(n,t),n.alt=""),this._shadow=n,e.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),n&&o&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&At(this._icon,"focus",this._panOnFocus,this),Je(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Je(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&ut(this._icon,e),this._shadow&&ut(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){e=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round(),this._setPos(e)},_initInteraction:function(){var e;this.options.interactive&&(it(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),hn&&(e=this.options.draggable,this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new hn(this),e&&this.dragging.enable()))},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&st(this._icon,e),this._shadow&&st(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e,t,n=this._map;n&&(e=(t=this.options.icon.options).iconSize?z(t.iconSize):z(0,0),t=t.iconAnchor?z(t.iconAnchor):z(0,0),n.panInside(this._latlng,{paddingTopLeft:t,paddingBottomRight:e.subtract(t)}))},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),mn=le.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(e){this._renderer=e.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(e){return p(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),fn=mn.extend({options:{fill:!0,radius:10},initialize:function(e,t){p(this,t),this._latlng=W(e),this._radius=this.options.radius},setLatLng:function(e){var t=this._latlng;return this._latlng=W(e),this.redraw(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return mn.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,t=this._radiusY||e,n=this._clickTolerance(),e=[e+n,t+n];this._pxBounds=new I(this._point.subtract(e),this._point.add(e))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),gn=fn.extend({initialize:function(e,t,n){if(p(this,t="number"==typeof t?c({},n,{radius:t}):t),this._latlng=W(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:mn.prototype.setStyle,_project:function(){var e,t,n,i,o,a=this._latlng.lng,r=this._latlng.lat,s=this._map,l=s.options.crs;l.distance===F.distance?(i=Math.PI/180,o=this._mRadius/F.R/i,e=s.project([r+o,a]),t=s.project([r-o,a]),t=e.add(t).divideBy(2),n=s.unproject(t).lat,i=Math.acos((Math.cos(o*i)-Math.sin(r*i)*Math.sin(n*i))/(Math.cos(r*i)*Math.cos(n*i)))/i,!isNaN(i)&&0!==i||(i=o/Math.cos(Math.PI/180*r)),this._point=t.subtract(s.getPixelOrigin()),this._radius=isNaN(i)?0:t.x-s.project([n,a-i]).x,this._radiusY=t.y-e.y):(o=l.unproject(l.project(this._latlng).subtract([this._mRadius,0])),this._point=s.latLngToLayerPoint(this._latlng),this._radius=this._point.x-s.latLngToLayerPoint(o).x),this._updateBounds()}}),_n=mn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){p(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var t=1/0,n=null,i=nn,o=0,a=this._parts.length;o<a;o++)for(var r=this._parts[o],s=1,l=r.length;s<l;s++){var c,u,d=i(e,c=r[s-1],u=r[s],!0);d<t&&(t=d,n=i(e,c,u))}return n&&(n.distance=Math.sqrt(t)),n},getCenter:function(){if(this._map)return rn(this._defaultShape(),this._map.options.crs);throw new Error("Must add layer to map before using getCenter()")},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=W(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new N,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return on(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],n=on(e),i=0,o=e.length;i<o;i++)n?(t[i]=W(e[i]),this._bounds.extend(t[i])):t[i]=this._convertLatLngs(e[i]);return t},_project:function(){var e=new I;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=new O(e=this._clickTolerance(),e);this._rawPxBounds&&(this._pxBounds=new I([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(e,t,n){var i,o,a=e[0]instanceof R,r=e.length;if(a){for(o=[],i=0;i<r;i++)o[i]=this._map.latLngToLayerPoint(e[i]),n.extend(o[i]);t.push(o)}else for(i=0;i<r;i++)this._projectLatlngs(e[i],t,n)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var t,n,i,o,a=this._parts,r=0,s=0,l=this._rings.length;r<l;r++)for(t=0,n=(o=this._rings[r]).length;t<n-1;t++)(i=Xt(o[t],o[t+1],e,t,!0))&&(a[s]=a[s]||[],a[s].push(i[0]),i[1]===o[t+1]&&t!==n-2||(a[s].push(i[1]),s++))},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,n=0,i=e.length;n<i;n++)e[n]=Qt(e[n],t)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,t){var n,i,o,a,r,s,l=this._clickTolerance();if(this._pxBounds&&this._pxBounds.contains(e))for(n=0,a=this._parts.length;n<a;n++)for(i=0,o=(r=(s=this._parts[n]).length)-1;i<r;o=i++)if((t||0!==i)&&Jt(e,s[o],s[i])<=l)return!0;return!1}});_n._flat=an;var yn=_n.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(this._map)return $t(this._defaultShape(),this._map.options.crs);throw new Error("Must add layer to map before using getCenter()")},_convertLatLngs:function(e){var t=(e=_n.prototype._convertLatLngs.call(this,e)).length;return 2<=t&&e[0]instanceof R&&e[0].equals(e[t-1])&&e.pop(),e},_setLatLngs:function(e){_n.prototype._setLatLngs.call(this,e),on(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return(on(this._latlngs[0])?this._latlngs:this._latlngs[0])[0]},_clipPoints:function(){var e=this._renderer._bounds,t=new O(t=this.options.weight,t),e=new I(e.min.subtract(t),e.max.add(t));if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var n,i=0,o=this._rings.length;i<o;i++)(n=Ut(this._rings[i],e,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t,n,i,o,a,r,s,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(o=0,s=this._parts.length;o<s;o++)for(a=0,r=(l=(t=this._parts[o]).length)-1;a<l;r=a++)n=t[a],i=t[r],n.y>e.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(c=!c);return c||_n.prototype._containsPoint.call(this,e,!0)}}),vn=cn.extend({initialize:function(e,t){p(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,i,o=_(e)?e:e.features;if(o){for(t=0,n=o.length;t<n;t++)((i=o[t]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var a,r=this.options;return r.filter&&!r.filter(e)||!(a=bn(e,r))?this:(a.feature=Mn(e),a.defaultOptions=a.options,this.resetStyle(a),r.onEachFeature&&r.onEachFeature(e,a),this.addLayer(a))},resetStyle:function(e){return void 0===e?this.eachLayer(this.resetStyle,this):(e.options=c({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(e,t){e.setStyle&&("function"==typeof t&&(t=t(e.feature)),e.setStyle(t))}});function bn(e,t){var n,i,o,a,r="Feature"===e.type?e.geometry:e,s=r?r.coordinates:null,l=[],c=t&&t.pointToLayer,u=t&&t.coordsToLatLng||An;if(!s&&!r)return null;switch(r.type){case"Point":return wn(c,e,n=u(s),t);case"MultiPoint":for(o=0,a=s.length;o<a;o++)n=u(s[o]),l.push(wn(c,e,n,t));return new cn(l);case"LineString":case"MultiLineString":return i=kn(s,"LineString"===r.type?0:1,u),new _n(i,t);case"Polygon":case"MultiPolygon":return i=kn(s,"Polygon"===r.type?1:2,u),new yn(i,t);case"GeometryCollection":for(o=0,a=r.geometries.length;o<a;o++){var d=bn({geometry:r.geometries[o],type:"Feature",properties:e.properties},t);d&&l.push(d)}return new cn(l);case"FeatureCollection":for(o=0,a=r.features.length;o<a;o++){var h=bn(r.features[o],t);h&&l.push(h)}return new cn(l);default:throw new Error("Invalid GeoJSON object.")}}function wn(e,t,n,i){return e?e(t,n):new pn(n,i&&i.markersInheritOptions&&i)}function An(e){return new R(e[1],e[0],e[2])}function kn(e,t,n){for(var i,o=[],a=0,r=e.length;a<r;a++)i=t?kn(e[a],t-1,n):(n||An)(e[a]),o.push(i);return o}function xn(e,t){return void 0!==(e=W(e)).alt?[a(e.lng,t),a(e.lat,t),a(e.alt,t)]:[a(e.lng,t),a(e.lat,t)]}function Sn(e,t,n,i){for(var o=[],a=0,r=e.length;a<r;a++)o.push(t?Sn(e[a],on(e[a])?0:t-1,n,i):xn(e[a],i));return!t&&n&&0<o.length&&o.push(o[0].slice()),o}function Pn(e,t){return e.feature?c({},e.feature,{geometry:t}):Mn(t)}function Mn(e){return"Feature"===e.type||"FeatureCollection"===e.type?e:{type:"Feature",properties:{},geometry:e}}function Cn(e,t){return new vn(e,t)}pn.include(ce={toGeoJSON:function(e){return Pn(this,{type:"Point",coordinates:xn(this.getLatLng(),e)})}}),gn.include(ce),fn.include(ce),_n.include({toGeoJSON:function(e){var t=!on(this._latlngs);return Pn(this,{type:(t?"Multi":"")+"LineString",coordinates:Sn(this._latlngs,t?1:0,!1,e)})}}),yn.include({toGeoJSON:function(e){var t=!on(this._latlngs),n=t&&!on(this._latlngs[0]),e=Sn(this._latlngs,n?2:t?1:0,!0,e);return Pn(this,{type:(n?"Multi":"")+"Polygon",coordinates:e=t?e:[e]})}}),ln.include({toMultiPoint:function(t){var n=[];return this.eachLayer(function(e){n.push(e.toGeoJSON(t).geometry.coordinates)}),Pn(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(t){var n,i,e=this.feature&&this.feature.geometry&&this.feature.geometry.type;return"MultiPoint"===e?this.toMultiPoint(t):(n="GeometryCollection"===e,i=[],this.eachLayer(function(e){e.toGeoJSON&&(e=e.toGeoJSON(t),n?i.push(e.geometry):"FeatureCollection"===(e=Mn(e)).type?i.push.apply(i,e.features):i.push(e))}),n?Pn(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i})}});var ue=Cn,Ln=le.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,t,n){this._url=e,this._bounds=B(t),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(it(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Je(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&et(this._image),this},bringToBack:function(){return this._map&&tt(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=B(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e="IMG"===this._url.tagName,t=this._image=e?this._url:Qe("img");it(t,"leaflet-image-layer"),this._zoomAnimated&&it(t,"leaflet-zoom-animated"),this.options.className&&it(t,this.options.className),t.onselectstart=d,t.onmousemove=d,t.onload=l(this.fire,this,"load"),t.onerror=l(this._overlayOnError,this,"error"),!this.options.crossOrigin&&""!==this.options.crossOrigin||(t.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e?this._url=t.src:(t.src=this._url,t.alt=this.options.alt)},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;ct(this._image,e,t)},_reset:function(){var e=this._image,t=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=t.getSize();ut(e,t.min),e.style.width=n.x+"px",e.style.height=n.y+"px"},_updateOpacity:function(){st(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 e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),Tn=Ln.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e="VIDEO"===this._url.tagName,t=this._image=e?this._url:Qe("video");if(it(t,"leaflet-image-layer"),this._zoomAnimated&&it(t,"leaflet-zoom-animated"),this.options.className&&it(t,this.options.className),t.onselectstart=d,t.onmousemove=d,t.onloadeddata=l(this.fire,this,"load"),e){for(var n=t.getElementsByTagName("source"),i=[],o=0;o<n.length;o++)i.push(n[o].src);this._url=0<n.length?i:[t.src]}else{_(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,"objectFit")&&(t.style.objectFit="fill"),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var a=0;a<this._url.length;a++){var r=Qe("source");r.src=this._url[a],t.appendChild(r)}}}}),En=Ln.extend({_initImage:function(){var e=this._image=this._url;it(e,"leaflet-image-layer"),this._zoomAnimated&&it(e,"leaflet-zoom-animated"),this.options.className&&it(e,this.options.className),e.onselectstart=d,e.onmousemove=d}}),On=le.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(e,t){e&&(e instanceof R||_(e))?(this._latlng=W(e),p(this,t)):(p(this,e),this._source=t),this.options.content&&(this._content=this.options.content)},openOn:function(e){return(e=arguments.length?e:this._source._map).hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&st(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&st(this._container,1),this.bringToFront(),this.options.interactive&&(it(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(st(this._container,0),this._removeTimeout=setTimeout(l(Je,void 0,this._container),200)):Je(this._container),this.options.interactive&&(ot(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=W(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,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 e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&et(this._container),this},bringToBack:function(){return this._map&&tt(this._container),this},_prepareOpen:function(e){if(!(n=this._source)._map)return!1;if(n instanceof cn){var t,n=null,i=this._source._layers;for(t in i)if(i[t]._map){n=i[t];break}if(!n)return!1;this._source=n}if(!e)if(n.getCenter)e=n.getCenter();else if(n.getLatLng)e=n.getLatLng();else{if(!n.getBounds)throw new Error("Unable to get source layer LatLng.");e=n.getBounds().getCenter()}return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,t="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof t)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){var e,t,n;this._map&&(t=this._map.latLngToLayerPoint(this._latlng),e=z(this.options.offset),n=this._getAnchor(),this._zoomAnimated?ut(this._container,t.add(n)):e=e.add(t).add(n),t=this._containerBottom=-e.y,n=this._containerLeft=-Math.round(this._containerWidth/2)+e.x,this._container.style.bottom=t+"px",this._container.style.left=n+"px")},_getAnchor:function(){return[0,0]}}),Dn=(Bt.include({_initOverlay:function(e,t,n,i){var o=t;return o instanceof e||(o=new e(i).setContent(t)),n&&o.setLatLng(n),o}}),le.include({_initOverlay:function(e,t,n,i){var o=n;return o instanceof e?(p(o,i),o._source=this):(o=t&&!i?t:new e(i,this)).setContent(n),o}}),On.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(e){return!(e=arguments.length?e:this._source._map).hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,On.prototype.openOn.call(this,e)},onAdd:function(e){On.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof mn||this._source.on("preclick",Mt))},onRemove:function(e){On.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof mn||this._source.off("preclick",Mt))},getEvents:function(){var e=On.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e="leaflet-popup",t=this._container=Qe("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=Qe("div",e+"-content-wrapper",t);this._contentNode=Qe("div",e+"-content",n),Lt(t),Ct(this._contentNode),yt(t,"contextmenu",Mt),this._tipContainer=Qe("div",e+"-tip-container",t),this._tip=Qe("div",e+"-tip",this._tipContainer),this.options.closeButton&&((n=this._closeButton=Qe("a",e+"-close-button",t)).setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">×</span>',yt(n,"click",function(e){Tt(e),this.close()},this))},_updateLayout:function(){var e=this._contentNode,t=e.style,n=(t.width="",t.whiteSpace="nowrap",e.offsetWidth),n=Math.min(n,this.options.maxWidth),n=(n=Math.max(n,this.options.minWidth),t.width=n+1+"px",t.whiteSpace="",t.height="",e.offsetHeight),i=this.options.maxHeight;(i&&i<n?(t.height=i+"px",it):ot)(e,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var e=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),t=this._getAnchor();ut(this._container,e.add(t))},_adjustPan:function(){var e,t,n,i,o,a,r,s;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning?this._autopanning=!1:(e=this._map,t=parseInt(Ke(this._container,"marginBottom"),10)||0,t=this._container.offsetHeight+t,s=this._containerWidth,(n=new O(this._containerLeft,-t-this._containerBottom))._add(dt(this._container)),n=e.layerPointToContainerPoint(n),o=z(this.options.autoPanPadding),i=z(this.options.autoPanPaddingTopLeft||o),o=z(this.options.autoPanPaddingBottomRight||o),a=e.getSize(),r=0,n.x+s+o.x>a.x&&(r=n.x+s-a.x+o.x),n.x-r-i.x<(s=0)&&(r=n.x-i.x),n.y+t+o.y>a.y&&(s=n.y+t-a.y+o.y),n.y-s-i.y<0&&(s=n.y-i.y),(r||s)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([r,s]))))},_getAnchor:function(){return z(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),zn=(Bt.mergeOptions({closePopupOnClick:!0}),Bt.include({openPopup:function(e,t,n){return this._initOverlay(Dn,e,t,n).openOn(this),this},closePopup:function(e){return(e=arguments.length?e:this._popup)&&e.close(),this}}),le.include({bindPopup:function(e,t){return this._popup=this._initOverlay(Dn,this._popup,e,t),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof cn||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){var t;this._popup&&this._map&&(Et(e),t=e.layer||e.target,this._popup._source!==t||t instanceof mn?(this._popup._source=t,this.openPopup(e.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng))},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}}),On.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){On.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){On.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=On.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Qe("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+u(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,n=this._map,i=this._container,o=n.latLngToContainerPoint(n.getCenter()),n=n.layerPointToContainerPoint(e),a=this.options.direction,r=i.offsetWidth,s=i.offsetHeight,l=z(this.options.offset),c=this._getAnchor(),n="top"===a?(t=r/2,s):"bottom"===a?(t=r/2,0):(t="center"===a?r/2:"right"===a?0:"left"===a?r:n.x<o.x?(a="right",0):(a="left",r+2*(l.x+c.x)),s/2);e=e.subtract(z(t,n,!0)).add(l).add(c),ot(i,"leaflet-tooltip-right"),ot(i,"leaflet-tooltip-left"),ot(i,"leaflet-tooltip-top"),ot(i,"leaflet-tooltip-bottom"),it(i,"leaflet-tooltip-"+a),ut(i,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&st(this._container,e)},_animateZoom:function(e){e=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),this._setPosition(e)},_getAnchor:function(){return z(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}})),In=(Bt.include({openTooltip:function(e,t,n){return this._initOverlay(zn,e,t,n).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),le.include({bindTooltip:function(e,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(zn,this._tooltip,e,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(e){var t,n;!e&&this._tooltipHandlersAdded||(t=e?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[t](n),this._tooltipHandlersAdded=!e)},openTooltip:function(e){return this._tooltip&&(this instanceof cn||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var t="function"==typeof e.getElement&&e.getElement();t&&(yt(t,"focus",function(){this._tooltip._source=e,this.openTooltip()},this),yt(t,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){(e="function"==typeof e.getElement&&e.getElement())&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(e){var t;this._tooltip&&this._map&&(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag?(this._openOnceFlag=!0,(t=this)._map.once("moveend",function(){t._openOnceFlag=!1,t._openTooltip(e)})):(this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)))},_moveTooltip:function(e){var t=e.latlng;this._tooltip.options.sticky&&e.originalEvent&&(e=this._map.mouseEventToContainerPoint(e.originalEvent),e=this._map.containerPointToLayerPoint(e),t=this._map.layerPointToLatLng(e)),this._tooltip.setLatLng(t)}}),un.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var e=e&&"DIV"===e.tagName?e:document.createElement("div"),t=this.options;return t.html instanceof Element?(Xe(e),e.appendChild(t.html)):e.innerHTML=!1!==t.html?t.html:"",t.bgPos&&(t=z(t.bgPos),e.style.backgroundPosition=-t.x+"px "+-t.y+"px"),this._setIconStyles(e,"icon"),e},createShadow:function(){return null}}));un.Default=dn;var jn=le.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Me.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(e){p(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),Je(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(et(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(tt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){var e;return this._map&&(this._removeAllTiles(),(e=this._clampZoom(this._map.getZoom()))!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()),this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=i(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof O?e:new O(e,e)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t,n=this.getPane().children,i=-e(-1/0,1/0),o=0,a=n.length;o<a;o++)t=n[o].style.zIndex,n[o]!==this._container&&t&&(i=e(i,+t));isFinite(i)&&(this.options.zIndex=i+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Me.ielt9){st(this._container,this.options.opacity);var e,t=+new Date,n=!1,i=!1;for(e in this._tiles){var o,a=this._tiles[e];a.current&&a.loaded&&(o=Math.min(1,(t-a.loaded)/200),st(a.el,o),o<1?n=!0:(a.active?i=!0:this._onOpaqueTile(a),a.active=!0))}i&&!this._noPrune&&this._pruneTiles(),n&&(P(this._fadeFrame),this._fadeFrame=S(this._updateOpacity,this))}},_onOpaqueTile:d,_initContainer:function(){this._container||(this._container=Qe("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(void 0!==e){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(Je(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[e],o=this._map;return i||((i=this._levels[e]={}).el=Qe("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=t,i.origin=o.project(o.unproject(o.getPixelOrigin()),e).round(),i.zoom=e,this._setZoomTransform(i,o.getCenter(),o.getZoom()),d(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i}},_onUpdateLevel:d,_onRemoveLevel:d,_onCreateLevel:d,_pruneTiles:function(){if(this._map){var e,t,n,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(e in this._tiles)(n=this._tiles[e]).retain=n.current;for(e in this._tiles)(n=this._tiles[e]).current&&!n.active&&(t=n.coords,this._retainParent(t.x,t.y,t.z,t.z-5)||this._retainChildren(t.x,t.y,t.z,t.z+2));for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)Je(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,t,n,i){var n=n-1,o=((o=new O(+(e=Math.floor(e/2)),+(t=Math.floor(t/2)))).z=n,this._tileCoordsToKey(o));return(o=this._tiles[o])&&o.active?o.retain=!0:(o&&o.loaded&&(o.retain=!0),i<n&&this._retainParent(e,t,n,i))},_retainChildren:function(e,t,n,i){for(var o=2*e;o<2*e+2;o++)for(var a=2*t;a<2*t+2;a++){var r=((r=new O(o,a)).z=n+1,this._tileCoordsToKey(r));(r=this._tiles[r])&&r.active?r.retain=!0:(r&&r.loaded&&(r.retain=!0),n+1<i&&this._retainChildren(o,a,n+1,i))}},_resetView:function(e){e=e&&(e.pinch||e.flyTo),this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var t=this.options;return void 0!==t.minNativeZoom&&e<t.minNativeZoom?t.minNativeZoom:void 0!==t.maxNativeZoom&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,n,i){var o=Math.round(t),o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o),a=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!a||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(e),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var n in this._levels)this._setZoomTransform(this._levels[n],e,t)},_setZoomTransform:function(e,t,n){var i=this._map.getZoomScale(n,e.zoom),t=e.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(t,n)).round();Me.any3d?ct(e.el,t,i):ut(e.el,t)},_resetGrid:function(){var e=this._map,t=e.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],i).x/n.x),Math.ceil(e.project([0,t.wrapLng[1]],i).x/n.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],i).y/n.x),Math.ceil(e.project([t.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(e){var t=(n=this._map)._animatingZoom?Math.max(n._animateToZoom,n.getZoom()):n.getZoom(),t=n.getZoomScale(t,this._tileZoom),e=n.project(e,this._tileZoom).floor(),n=n.getSize().divideBy(2*t);return new I(e.subtract(n),e.add(n))},_update:function(e){if(i=this._map){var t=this._clampZoom(i.getZoom());if(void 0===e&&(e=i.getCenter()),void 0!==this._tileZoom){var n,i=this._getTiledPixelBounds(e),o=this._pxBoundsToTileRange(i),a=o.getCenter(),r=[],i=this.options.keepBuffer,s=new I(o.getBottomLeft().subtract([i,-i]),o.getTopRight().add([i,-i]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(n in this._tiles){var l=this._tiles[n].coords;l.z===this._tileZoom&&s.contains(new O(l.x,l.y))||(this._tiles[n].current=!1)}if(1<Math.abs(t-this._tileZoom))this._setView(e,t);else{for(var c=o.min.y;c<=o.max.y;c++)for(var u=o.min.x;u<=o.max.x;u++){var d,h=new O(u,c);h.z=this._tileZoom,this._isValidTile(h)&&((d=this._tiles[this._tileCoordsToKey(h)])?d.current=!0:r.push(h))}if(r.sort(function(e,t){return e.distanceTo(a)-t.distanceTo(a)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));for(var p=document.createDocumentFragment(),u=0;u<r.length;u++)this._addTile(r[u],p);this._level.el.appendChild(p)}}}}},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var n=this._globalTileRange;if(!t.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!t.wrapLat&&(e.y<n.min.y||e.y>n.max.y))return!1}return!this.options.bounds||(t=this._tileCoordsToBounds(e),B(this.options.bounds).overlaps(t))},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),i=e.scaleBy(n),n=i.add(n);return[t.unproject(i,e.z),t.unproject(n,e.z)]},_tileCoordsToBounds:function(e){return e=new N((e=this._tileCoordsToNwSe(e))[0],e[1]),this.options.noWrap?e:this._map.wrapLatLngBounds(e)},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=new O(+(e=e.split(":"))[0],+e[1]);return t.z=+e[2],t},_removeTile:function(e){var t=this._tiles[e];t&&(Je(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){it(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=d,e.onmousemove=d,Me.ielt9&&this.options.opacity<1&&st(e,this.options.opacity)},_addTile:function(e,t){var n=this._getTilePos(e),i=this._tileCoordsToKey(e),o=this.createTile(this._wrapCoords(e),l(this._tileReady,this,e));this._initTile(o),this.createTile.length<2&&S(l(this._tileReady,this,e,null,o)),ut(o,n),this._tiles[i]={el:o,coords:e,current:!0},t.appendChild(o),this.fire("tileloadstart",{tile:o,coords:e})},_tileReady:function(e,t,n){t&&this.fire("tileerror",{error:t,tile:n,coords:e});var i=this._tileCoordsToKey(e);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(st(n.el,0),P(this._fadeFrame),this._fadeFrame=S(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),t||(it(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Me.ielt9||!this._map._fadeAnimated?S(this._pruneTiles,this):setTimeout(l(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new O(this._wrapX?o(e.x,this._wrapX):e.x,this._wrapY?o(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new I(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}}),Nn=jn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,(t=p(this,t)).detectRetina&&Me.retina&&0<t.maxZoom?(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom=Math.min(t.maxZoom,t.minZoom+1)):(t.zoomOffset++,t.maxZoom=Math.max(t.minZoom,t.maxZoom-1)),t.minZoom=Math.max(0,t.minZoom)):t.zoomReverse?t.minZoom=Math.min(t.maxZoom,t.minZoom):t.maxZoom=Math.max(t.minZoom,t.maxZoom),"string"==typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&void 0===t&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var n=document.createElement("img");return yt(n,"load",l(this._tileOnLoad,this,t,n)),yt(n,"error",l(this._tileOnError,this,t,n)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(e),n},getTileUrl:function(e){var t={r:Me.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(e=this._globalTileRange.max.y-e.y,this.options.tms&&(t.y=e),t["-y"]=e),g(this._url,c(t,this.options))},_tileOnLoad:function(e,t){Me.ielt9?setTimeout(l(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,n){var i=this.options.errorTileUrl;i&&t.getAttribute("src")!==i&&(t.src=i),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom;return(e=this.options.zoomReverse?t-e:e)+this.options.zoomOffset},_getSubdomain:function(e){return e=Math.abs(e.x+e.y)%this.options.subdomains.length,this.options.subdomains[e]},_abortLoading:function(){var e,t,n;for(e in this._tiles)this._tiles[e].coords.z!==this._tileZoom&&((n=this._tiles[e].el).onload=d,n.onerror=d,n.complete||(n.src=v,t=this._tiles[e].coords,Je(n),delete this._tiles[e],this.fire("tileabort",{tile:n,coords:t})))},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute("src",v),jn.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(this._map&&(!n||n.getAttribute("src")!==v))return jn.prototype._tileReady.call(this,e,t,n)}});function Bn(e,t){return new Nn(e,t)}var Rn=Nn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,t){this._url=e;var n,i=c({},this.defaultWmsParams);for(n in t)n in this.options||(i[n]=t[n]);var e=(t=p(this,t)).detectRetina&&Me.retina?2:1,o=this.getTileSize();i.width=o.x*e,i.height=o.y*e,this.wmsParams=i},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[t]=this._crs.code,Nn.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),t=(n=j((n=this._crs).project(t[0]),n.project(t[1]))).min,n=n.max,t=(1.3<=this._wmsVersion&&this._crs===sn?[t.y,t.x,n.y,n.x]:[t.x,t.y,n.x,n.y]).join(",");return(n=Nn.prototype.getTileUrl.call(this,e))+m(this.wmsParams,n,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+t},setParams:function(e,t){return c(this.wmsParams,e),t||this.redraw(),this}});Nn.WMS=Rn,Bn.wms=function(e,t){return new Rn(e,t)};var Wn=le.extend({options:{padding:.1},initialize:function(e){p(this,e),u(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),it(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 e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var n=this._map.getZoomScale(t,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,t),i=i.multiplyBy(-n).add(o).subtract(this._map._getNewPixelOrigin(e,t));Me.any3d?ct(this._container,i,n):ut(this._container,i)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),n=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new I(n,n.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Hn=Wn.extend({options:{tolerance:0},getEvents:function(){var e=Wn.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Wn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");yt(e,"mousemove",this._onMouseMove,this),yt(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),yt(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest),delete this._ctx,Je(this._container),At(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var e in this._redrawBounds=null,this._layers)this._layers[e]._update();this._redraw()}},_update:function(){var e,t,n,i;this._map._animatingZoom&&this._bounds||(Wn.prototype._update.call(this),e=this._bounds,t=this._container,n=e.getSize(),i=Me.retina?2:1,ut(t,e.min),t.width=i*n.x,t.height=i*n.y,t.style.width=n.x+"px",t.style.height=n.y+"px",Me.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update"))},_reset:function(){Wn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),e=(this._layers[u(e)]=e)._order={layer:e,prev:this._drawLast,next:null},this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=(n=e._order).next,n=n.prev;t?t.prev=n:this._drawLast=n,n?n.next=t:this._drawFirst=t,delete e._order,delete this._layers[u(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if("string"==typeof e.options.dashArray){for(var t,n=e.options.dashArray.split(/[, ]+/),i=[],o=0;o<n.length;o++){if(t=Number(n[o]),isNaN(t))return;i.push(t)}e.options._dashArray=i}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||S(this._redraw,this))},_extendRedrawBounds:function(e){var t;e._pxBounds&&(t=(e.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new I,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._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 e,t=this._redrawBounds;t?(e=t.getSize(),this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)):(this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore())},_draw:function(){var e,t,n=this._redrawBounds;this._ctx.save(),n&&(t=n.getSize(),this._ctx.beginPath(),this._ctx.rect(n.min.x,n.min.y,t.x,t.y),this._ctx.clip()),this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)e=i.layer,(!n||e._pxBounds&&e._pxBounds.intersects(n))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var n,i,o,a,r=e._parts,s=r.length,l=this._ctx;if(s){for(l.beginPath(),n=0;n<s;n++){for(i=0,o=r[n].length;i<o;i++)a=r[n][i],l[i?"lineTo":"moveTo"](a.x,a.y);t&&l.closePath()}this._fillStroke(l,e)}}},_updateCircle:function(e){var t,n,i,o;this._drawing&&!e._empty()&&(t=e._point,n=this._ctx,i=Math.max(Math.round(e._radius),1),1!=(o=(Math.max(Math.round(e._radiusY),1)||i)/i)&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(t.x,t.y/o,i,0,2*Math.PI,!1),1!=o&&n.restore(),this._fillStroke(n,e))},_fillStroke:function(e,t){var n=t.options;n.fill&&(e.globalAlpha=n.fillOpacity,e.fillStyle=n.fillColor||n.color,e.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.globalAlpha=n.opacity,e.lineWidth=n.weight,e.strokeStyle=n.color,e.lineCap=n.lineCap,e.lineJoin=n.lineJoin,e.stroke())},_onClick:function(e){for(var t,n,i=this._map.mouseEventToLayerPoint(e),o=this._drawFirst;o;o=o.next)(t=o.layer).options.interactive&&t._containsPoint(i)&&(("click"===e.type||"preclick"===e.type)&&this._map._draggableMoved(t)||(n=t));this._fireEvent(!!n&&[n],e)},_onMouseMove:function(e){var t;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(t=this._map.mouseEventToLayerPoint(e),this._handleMouseHover(e,t))},_handleMouseOut:function(e){var t=this._hoveredLayer;t&&(ot(this._container,"leaflet-interactive"),this._fireEvent([t],e,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,t){if(!this._mouseHoverThrottled){for(var n,i,o=this._drawFirst;o;o=o.next)(n=o.layer).options.interactive&&n._containsPoint(t)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(e),i&&(it(this._container,"leaflet-interactive"),this._fireEvent([i],e,"mouseover"),this._hoveredLayer=i)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],e),this._mouseHoverThrottled=!0,setTimeout(l(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(e,t,n){this._map._fireDOMEvent(t,n||t.type,e)},_bringToFront:function(e){var t,n,i=e._order;i&&(t=i.next,n=i.prev,t&&((t.prev=n)?n.next=t:t&&(this._drawFirst=t),i.prev=this._drawLast,(this._drawLast.next=i).next=null,this._drawLast=i,this._requestRedraw(e)))},_bringToBack:function(e){var t,n,i=e._order;i&&(t=i.next,(n=i.prev)&&((n.next=t)?t.prev=n:n&&(this._drawLast=n),i.prev=null,i.next=this._drawFirst,this._drawFirst.prev=i,this._drawFirst=i,this._requestRedraw(e)))}});function Fn(e){return Me.canvas?new Hn(e):null}var qn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch(e){}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),de={_initContainer:function(){this._container=Qe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Wn.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=qn("shape");it(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=qn("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[u(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;Je(t),e.removeInteractiveTarget(t),delete this._layers[u(e)]},_updateStyle:function(e){var t=e._stroke,n=e._fill,i=e.options,o=e._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(t=t||(e._stroke=qn("stroke")),o.appendChild(t),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,i.dashArray?t.dashStyle=_(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=i.lineCap.replace("butt","flat"),t.joinstyle=i.lineJoin):t&&(o.removeChild(t),e._stroke=null),i.fill?(n=n||(e._fill=qn("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),i=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+n+","+i+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){et(e._container)},_bringToBack:function(e){tt(e._container)}},Zn=Me.vml?qn:$,Gn=Wn.extend({_initContainer:function(){this._container=Zn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Zn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Je(this._container),At(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var e,t,n;this._map._animatingZoom&&this._bounds||(Wn.prototype._update.call(this),t=(e=this._bounds).getSize(),n=this._container,this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,n.setAttribute("width",t.x),n.setAttribute("height",t.y)),ut(n,e.min),n.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update"))},_initPath:function(e){var t=e._path=Zn("path");e.options.className&&it(t,e.options.className),e.options.interactive&&it(t,"leaflet-interactive"),this._updateStyle(e),this._layers[u(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){Je(e._path),e.removeInteractiveTarget(e._path),delete this._layers[u(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,e=e.options;t&&(e.stroke?(t.setAttribute("stroke",e.color),t.setAttribute("stroke-opacity",e.opacity),t.setAttribute("stroke-width",e.weight),t.setAttribute("stroke-linecap",e.lineCap),t.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?t.setAttribute("stroke-dasharray",e.dashArray):t.removeAttribute("stroke-dasharray"),e.dashOffset?t.setAttribute("stroke-dashoffset",e.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),e.fill?(t.setAttribute("fill",e.fillColor||e.color),t.setAttribute("fill-opacity",e.fillOpacity),t.setAttribute("fill-rule",e.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,Y(e._parts,t))},_updateCircle:function(e){var t=e._point,n=Math.max(Math.round(e._radius),1),i="a"+n+","+(Math.max(Math.round(e._radiusY),1)||n)+" 0 1,0 ",t=e._empty()?"M0 0":"M"+(t.x-n)+","+t.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(e,t)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){et(e._path)},_bringToBack:function(e){tt(e._path)}});function Vn(e){return Me.svg||Me.vml?new Gn(e):null}Me.vml&&Gn.include(de),Bt.include({getRenderer:function(e){return e=(e=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(e){var t;return"overlayPane"!==e&&void 0!==e&&(void 0===(t=this._paneRenderers[e])&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t)},_createRenderer:function(e){return this.options.preferCanvas&&Fn(e)||Vn(e)}});var Un=yn.extend({initialize:function(e,t){yn.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=B(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});Gn.create=Zn,Gn.pointsToPath=Y,vn.geometryToLayer=bn,vn.coordsToLatLng=An,vn.coordsToLatLngs=kn,vn.latLngToCoords=xn,vn.latLngsToCoords=Sn,vn.getFeature=Pn,vn.asFeature=Mn,Bt.mergeOptions({boxZoom:!0});var K=J.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){yt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){At(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Je(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(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),qe(),ht(),this._startPoint=this._map.mouseEventToContainerPoint(e),yt(document,{contextmenu:Et,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=Qe("div","leaflet-zoom-box",this._container),it(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=(e=new I(this._point,this._startPoint)).getSize();ut(this._box,e.min),this._box.style.width=t.x+"px",this._box.style.height=t.y+"px"},_finish:function(){this._moved&&(Je(this._box),ot(this._container,"leaflet-crosshair")),vt(),pt(),At(document,{contextmenu:Et,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){1!==e.which&&1!==e.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(l(this._resetState,this),0),e=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})))},_onKeyDown:function(e){27===e.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),he=(Bt.addInitHook("addHandler","boxZoom",K),Bt.mergeOptions({doubleClickZoom:!0}),J.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom(),i=t.options.zoomDelta,n=e.originalEvent.shiftKey?n-i:n+i;"center"===t.options.doubleClickZoom?t.setZoom(n):t.setZoomAround(e.containerPoint,n)}})),$n=(Bt.addInitHook("addHandler","doubleClickZoom",he),Bt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),J.extend({addHooks:function(){var e;this._draggable||(e=this._map,this._draggable=new Vt(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))),it(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ot(this._map._container,"leaflet-grab"),ot(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 e,t=this._map;t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(e=B(this._map.options.maxBounds),this._offsetLimit=j(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){var t,n;this._map.options.inertia&&(t=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(n),this._times.push(t),this._prunePositions(t)),this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;1<this._positions.length&&50<e-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){var e,t;this._viscosity&&this._offsetLimit&&(e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit,e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e))},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,i=((o=this._draggable._newPos.x)-t+n)%e+t-n,o=(o+t+n)%e-t-n,e=Math.abs(i+n)<Math.abs(o+n)?i:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=e},_onDragEnd:function(e){var t,n,i,o,a=this._map,r=a.options,s=!r.inertia||e.noInertia||this._times.length<2;a.fire("dragend",e),!s&&(this._prunePositions(+new Date),e=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,t=r.easeLinearity,s=(e=e.multiplyBy(t/s)).distanceTo([0,0]),n=Math.min(r.inertiaMaxSpeed,s),e=e.multiplyBy(n/s),i=n/(r.inertiaDeceleration*t),(o=e.multiplyBy(-i/2).round()).x||o.y)?(o=a._limitOffset(o,a.options.maxBounds),S(function(){a.panBy(o,{duration:i,easeLinearity:t,noMoveStart:!0,animate:!0})})):a.fire("moveend")}})),pe=(Bt.addInitHook("addHandler","dragging",$n),Bt.mergeOptions({keyboard:!0,keyboardPanDelta:80}),J.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex="0"),yt(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),At(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(){var e,t,n;this._focused||(n=document.body,e=document.documentElement,t=n.scrollTop||e.scrollTop,n=n.scrollLeft||e.scrollLeft,this._map._container.focus(),window.scrollTo(n,t))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){for(var t=this._panKeys={},n=this.keyCodes,i=0,o=n.left.length;i<o;i++)t[n.left[i]]=[-1*e,0];for(i=0,o=n.right.length;i<o;i++)t[n.right[i]]=[e,0];for(i=0,o=n.down.length;i<o;i++)t[n.down[i]]=[0,e];for(i=0,o=n.up.length;i<o;i++)t[n.up[i]]=[0,-1*e]},_setZoomDelta:function(e){for(var t=this._zoomKeys={},n=this.keyCodes,i=0,o=n.zoomIn.length;i<o;i++)t[n.zoomIn[i]]=e;for(i=0,o=n.zoomOut.length;i<o;i++)t[n.zoomOut[i]]=-e},_addHooks:function(){yt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){At(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t,n,i=e.keyCode,o=this._map;if(i in this._panKeys)o._panAnim&&o._panAnim._inProgress||(n=this._panKeys[i],e.shiftKey&&(n=z(n).multiplyBy(3)),o.options.maxBounds&&(n=o._limitOffset(z(n),o.options.maxBounds)),o.options.worldCopyJump?(t=o.wrapLatLng(o.unproject(o.project(o.getCenter()).add(n))),o.panTo(t)):o.panBy(n));else if(i in this._zoomKeys)o.setZoom(o.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!o._popup||!o._popup.options.closeOnEscapeKey)return;o.closePopup()}Et(e)}}})),me=(Bt.addInitHook("addHandler","keyboard",pe),Bt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60}),J.extend({addHooks:function(){yt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){At(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var t=It(e),n=this._map.options.wheelDebounceTime,t=(this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date),Math.max(n-(+new Date-this._startTime),0));clearTimeout(this._timer),this._timer=setTimeout(l(this._performZoom,this),t),Et(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),n=this._map.options.zoomSnap||0,i=(e._stop(),this._delta/(4*this._map.options.wheelPxPerZoomLevel)),i=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,n=n?Math.ceil(i/n)*n:i,i=e._limitZoom(t+(0<this._delta?n:-n))-t;this._delta=0,this._startTime=null,i&&("center"===e.options.scrollWheelZoom?e.setZoom(t+i):e.setZoomAround(this._lastMousePos,t+i))}})),fe=(Bt.addInitHook("addHandler","scrollWheelZoom",me),Bt.mergeOptions({tapHold:Me.touchNative&&Me.safari&&Me.mobile,tapTolerance:15}),J.extend({addHooks:function(){yt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){At(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){var t;clearTimeout(this._holdTimeout),1===e.touches.length&&(t=e.touches[0],this._startPos=this._newPos=new O(t.clientX,t.clientY),this._holdTimeout=setTimeout(l(function(){this._cancel(),this._isTapValid()&&(yt(document,"touchend",Tt),yt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},this),600),yt(document,"touchend touchcancel contextmenu",this._cancel,this),yt(document,"touchmove",this._onMove,this))},_cancelClickPrevent:function e(){At(document,"touchend",Tt),At(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),At(document,"touchend touchcancel contextmenu",this._cancel,this),At(document,"touchmove",this._onMove,this)},_onMove:function(e){e=e.touches[0],this._newPos=new O(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){(e=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY}))._simulated=!0,t.target.dispatchEvent(e)}})),ge=(Bt.addInitHook("addHandler","tapHold",fe),Bt.mergeOptions({touchZoom:Me.touch,bounceAtZoomLimits:!0}),J.extend({addHooks:function(){it(this._map._container,"leaflet-touch-zoom"),yt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ot(this._map._container,"leaflet-touch-zoom"),At(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t,n,i=this._map;!e.touches||2!==e.touches.length||i._animatingZoom||this._zooming||(t=i.mouseEventToContainerPoint(e.touches[0]),n=i.mouseEventToContainerPoint(e.touches[1]),this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(t.add(n)._divideBy(2))),this._startDist=t.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),yt(document,"touchmove",this._onTouchMove,this),yt(document,"touchend touchcancel",this._onTouchEnd,this),Tt(e))},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var t=this._map,n=t.mouseEventToContainerPoint(e.touches[0]),i=t.mouseEventToContainerPoint(e.touches[1]),o=n.distanceTo(i)/this._startDist;if(this._zoom=t.getScaleZoom(o,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&o<1||this._zoom>t.getMaxZoom()&&1<o)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1==o)return}else{if(n=n._add(i)._divideBy(2)._subtract(this._centerPoint),1==o&&0===n.x&&0===n.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(n),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),P(this._animRequest),i=l(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0),this._animRequest=S(i,this,!0),Tt(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,P(this._animRequest),At(document,"touchmove",this._onTouchMove,this),At(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}})),Yn=(Bt.addInitHook("addHandler","touchZoom",ge),Bt.BoxZoom=K,Bt.DoubleClickZoom=he,Bt.Drag=$n,Bt.Keyboard=pe,Bt.ScrollWheelZoom=me,Bt.TapHold=fe,Bt.TouchZoom=ge,e.Bounds=I,e.Browser=Me,e.CRS=H,e.Canvas=Hn,e.Circle=gn,e.CircleMarker=fn,e.Class=C,e.Control=Wt,e.DivIcon=In,e.DivOverlay=On,e.DomEvent=Q,e.DomUtil=bt,e.Draggable=Vt,e.Evented=E,e.FeatureGroup=cn,e.GeoJSON=vn,e.GridLayer=jn,e.Handler=J,e.Icon=un,e.ImageOverlay=Ln,e.LatLng=R,e.LatLngBounds=N,e.Layer=le,e.LayerGroup=ln,e.LineUtil=te,e.Map=Bt,e.Marker=pn,e.Mixin=X,e.Path=mn,e.Point=O,e.PolyUtil=ee,e.Polygon=yn,e.Polyline=_n,e.Popup=Dn,e.PosAnimation=Nt,e.Projection=oe,e.Rectangle=Un,e.Renderer=Wn,e.SVG=Gn,e.SVGOverlay=En,e.TileLayer=Nn,e.Tooltip=zn,e.Transformation=Z,e.Util=M,e.VideoOverlay=Tn,e.bind=l,e.bounds=j,e.canvas=Fn,e.circle=function(e,t,n){return new gn(e,t,n)},e.circleMarker=function(e,t){return new fn(e,t)},e.control=Rt,e.divIcon=function(e){return new In(e)},e.extend=c,e.featureGroup=function(e,t){return new cn(e,t)},e.geoJSON=Cn,e.geoJson=ue,e.gridLayer=function(e){return new jn(e)},e.icon=function(e){return new un(e)},e.imageOverlay=function(e,t,n){return new Ln(e,t,n)},e.latLng=W,e.latLngBounds=B,e.layerGroup=function(e,t){return new ln(e,t)},e.map=function(e,t){return new Bt(e,t)},e.marker=function(e,t){return new pn(e,t)},e.point=z,e.polygon=function(e,t){return new yn(e,t)},e.polyline=function(e,t){return new _n(e,t)},e.popup=function(e,t){return new Dn(e,t)},e.rectangle=function(e,t){return new Un(e,t)},e.setOptions=p,e.stamp=u,e.svg=Vn,e.svgOverlay=function(e,t,n){return new En(e,t,n)},e.tileLayer=Bn,e.tooltip=function(e,t){return new zn(e,t)},e.transformation=G,e.version="1.9.4",e.videoOverlay=function(e,t,n){return new Tn(e,t,n)},window.L);e.noConflict=function(){return window.L=Yn,this},window.L=e}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e.Leaflet=e.Leaflet||{},e.Leaflet.markercluster=e.Leaflet.markercluster||{}))}(this,function(e){"use strict";var t=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(e){if(e instanceof L.LayerGroup)return this.addLayers([e]);if(!e.getLatLng)return this._nonPointGroup.addLayer(e),this.fire("layeradd",{layer:e}),this;if(!this._map)return this._needsClustering.push(e),this.fire("layeradd",{layer:e}),this;if(this.hasLayer(e))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(e,this._maxZoom),this.fire("layeradd",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=e,n=this._zoom;if(e.__parent)for(;t.__parent._zoom>=n;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(e,t):this._animationAddLayerNonAnimated(e,t)),this},removeLayer:function(e){return e instanceof L.LayerGroup?this.removeLayers([e]):(e.getLatLng?this._map?e.__parent&&(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(e)),this._removeLayer(e,!0),this.fire("layerremove",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),e.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(e)&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow())):(!this._arraySplice(this._needsClustering,e)&&this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e})):(this._nonPointGroup.removeLayer(e),this.fire("layerremove",{layer:e})),this)},addLayers:function(n,i){if(!L.Util.isArray(n))return this.addLayer(n);var o,a=this._featureGroup,r=this._nonPointGroup,s=this.options.chunkedLoading,l=this.options.chunkInterval,c=this.options.chunkProgress,u=n.length,d=0,h=!0;if(this._map){var p=(new Date).getTime(),m=L.bind(function(){for(var e=(new Date).getTime();d<u;d++){if(s&&0==d%200){var t=(new Date).getTime()-e;if(l<t)break}(o=n[d])instanceof L.LayerGroup?(h&&(n=n.slice(),h=!1),this._extractNonGroupLayers(o,n),u=n.length):o.getLatLng?!this.hasLayer(o)&&(this._addLayer(o,this._maxZoom),i||this.fire("layeradd",{layer:o}),o.__parent&&2===o.__parent.getChildCount())&&(t=(t=o.__parent.getAllChildMarkers())[0]===o?t[1]:t[0],a.removeLayer(t)):(r.addLayer(o),i||this.fire("layeradd",{layer:o}))}c&&c(d,u,(new Date).getTime()-p),d===u?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(m,this.options.chunkDelay)},this);m()}else for(var e=this._needsClustering;d<u;d++)(o=n[d])instanceof L.LayerGroup?(h&&(n=n.slice(),h=!1),this._extractNonGroupLayers(o,n),u=n.length):o.getLatLng?this.hasLayer(o)||e.push(o):r.addLayer(o);return this},removeLayers:function(e){var t,n=e.length,i=this._featureGroup,o=this._nonPointGroup,a=!0;if(!this._map){for(l=0;l<n;l++)(t=e[l])instanceof L.LayerGroup?(a&&(e=e.slice(),a=!1),this._extractNonGroupLayers(t,e),n=e.length):(this._arraySplice(this._needsClustering,t),o.removeLayer(t),this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t}));return this}if(this._unspiderfy){this._unspiderfy();for(var r=e.slice(),s=n,l=0;l<s;l++)(t=r[l])instanceof L.LayerGroup?(this._extractNonGroupLayers(t,r),s=r.length):this._unspiderfyLayer(t)}for(l=0;l<n;l++)(t=e[l])instanceof L.LayerGroup?(a&&(e=e.slice(),a=!1),this._extractNonGroupLayers(t,e),n=e.length):t.__parent?(this._removeLayer(t,!0,!0),this.fire("layerremove",{layer:t}),i.hasLayer(t)&&(i.removeLayer(t),t.clusterShow&&t.clusterShow())):(o.removeLayer(t),this.fire("layerremove",{layer:t}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(e){e.off(this._childMarkerEventHandlers,this),delete e.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var e=new L.LatLngBounds;this._topClusterLevel&&e.extend(this._topClusterLevel._bounds);for(var t=this._needsClustering.length-1;0<=t;t--)e.extend(this._needsClustering[t].getLatLng());return e.extend(this._nonPointGroup.getBounds()),e},eachLayer:function(e,t){var n,i,o,a=this._needsClustering.slice(),r=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(a),i=a.length-1;0<=i;i--){for(n=!0,o=r.length-1;0<=o;o--)if(r[o].layer===a[i]){n=!1;break}n&&e.call(t,a[i])}this._nonPointGroup.eachLayer(e,t)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var n=null;return t=parseInt(t,10),this.eachLayer(function(e){L.stamp(e)===t&&(n=e)}),n},hasLayer:function(e){if(!e)return!1;for(var t=this._needsClustering,n=t.length-1;0<=n;n--)if(t[n]===e)return!0;for(n=(t=this._needsRemoving).length-1;0<=n;n--)if(t[n].layer===e)return!1;return!(!e.__parent||e.__parent._group!==this)||this._nonPointGroup.hasLayer(e)},zoomToShowLayer:function(e,t){"function"!=typeof t&&(t=function(){});var n=function(){!e._icon&&!e.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",n,this),this.off("animationend",n,this),e._icon?t():e.__parent._icon&&(this.once("spiderfied",t,this),e.__parent.spiderfy()))};e._icon&&this._map.getBounds().contains(e.getLatLng())?t():e.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",n,this),this._map.panTo(e.getLatLng())):(this._map.on("moveend",n,this),this.on("animationend",n,this),e.__parent.zoomToBounds())},onAdd:function(e){var t,n,i;if(this._map=e,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(e),this._nonPointGroup.addTo(e),this._gridClusters||this._generateInitialClusters(),this._maxLat=e.options.crs.projection.MAX_LATITUDE,t=0,n=this._needsRemoving.length;t<n;t++)(i=this._needsRemoving[t]).newlatlng=i.layer._latlng,i.layer._latlng=i.latlng;for(t=0,n=this._needsRemoving.length;t<n;t++)i=this._needsRemoving[t],this._removeLayer(i.layer,!0),i.layer._latlng=i.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),n=this._needsClustering,this._needsClustering=[],this.addLayers(n,!0)},onRemove:function(e){e.off("zoomend",this._zoomEnd,this),e.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(e){for(var t=e;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:function(e,t){for(var n=e.length-1;0<=n;n--)if(e[n]===t)return e.splice(n,1),!0},_removeFromGridUnclustered:function(e,t){for(var n=this._map,i=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());o<=t&&i[t].removeObject(e,n.project(e.getLatLng(),t));t--);},_childMarkerDragStart:function(e){e.target.__dragStart=e.target._latlng},_childMarkerMoved:function(e){var t;this._ignoreMove||e.target.__dragStart||(t=e.target._popup&&e.target._popup.isOpen(),this._moveChild(e.target,e.oldLatLng,e.latlng),t&&e.target.openPopup())},_moveChild:function(e,t,n){e._latlng=t,this.removeLayer(e),e._latlng=n,this.addLayer(e)},_childMarkerDragEnd:function(e){var t=e.target.__dragStart;delete e.target.__dragStart,t&&this._moveChild(e.target,t,e.target._latlng)},_removeLayer:function(e,t,n){var i=this._gridClusters,o=this._gridUnclustered,a=this._featureGroup,r=this._map,s=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(e,this._maxZoom);var l,c=e.__parent,u=c._markers;for(this._arraySplice(u,e);c&&(c._childCount--,c._boundsNeedUpdate=!0,!(c._zoom<s));)t&&c._childCount<=1?(l=c._markers[0]===e?c._markers[1]:c._markers[0],i[c._zoom].removeObject(c,r.project(c._cLatLng,c._zoom)),o[c._zoom].addObject(l,r.project(l.getLatLng(),c._zoom)),this._arraySplice(c.__parent._childClusters,c),c.__parent._markers.push(l),l.__parent=c.__parent,c._icon&&(a.removeLayer(c),n||a.addLayer(l))):c._iconNeedsUpdate=!0,c=c.__parent;delete e.__parent},_isOrIsParent:function(e,t){for(;t;){if(e===t)return!0;t=t.parentNode}return!1},fire:function(e,t,n){if(t&&t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;e="cluster"+e}L.FeatureGroup.prototype.fire.call(this,e,t,n)},listens:function(e,t){return L.FeatureGroup.prototype.listens.call(this,e,t)||L.FeatureGroup.prototype.listens.call(this,"cluster"+e,t)},_defaultIconCreateFunction:function(e){var t=e.getChildCount(),e=" marker-cluster-";return e+=t<10?"small":t<100?"medium":"large",new L.DivIcon({html:"<div><span>"+t+"</span></div>",className:"marker-cluster"+e,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=this._map,t=this.options.spiderfyOnMaxZoom,n=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick;(t||i)&&this.on("clusterclick",this._zoomOrSpiderfy,this),n&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),e.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(e){for(var t=e.layer,n=t;1===n._childClusters.length;)n=n._childClusters[0];n._zoom===this._maxZoom&&n._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),e.originalEvent&&13===e.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(e){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),2<e.layer.getChildCount()&&e.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(e.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var e=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,i=this._map;(e||n)&&this.off("clusterclick",this._zoomOrSpiderfy,this),t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),i.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){var e;this._inZoomAnimation||(e=this._getExpandedVisibleBounds(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),e),this._currentShownBounds=e)},_generateInitialClusters:function(){var e=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),n=this.options.maxClusterRadius,i="function"!=typeof n?function(){return n}:n;null!==this.options.disableClusteringAtZoom&&(e=this.options.disableClusteringAtZoom-1),this._maxZoom=e,this._gridClusters={},this._gridUnclustered={};for(var o=e;t<=o;o--)this._gridClusters[o]=new L.DistanceGrid(i(o)),this._gridUnclustered[o]=new L.DistanceGrid(i(o));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(e,t){var n=this._gridClusters,i=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(e),e.on(this._childMarkerEventHandlers,this);o<=t;t--){var a=this._map.project(e.getLatLng(),t),r=n[t].getNearObject(a);if(r)return r._addChild(e),void(e.__parent=r);if(r=i[t].getNearObject(a)){var s=r.__parent;s&&this._removeLayer(r,!1);var l=new this._markerCluster(this,t,r,e);n[t].addObject(l,this._map.project(l._cLatLng,t)),r.__parent=l;for(var c=e.__parent=l,u=t-1;u>s._zoom;u--)c=new this._markerCluster(this,u,c),n[u].addObject(c,this._map.project(r.getLatLng(),u));return s._addChild(c),void this._removeFromGridUnclustered(r,t)}i[t].addObject(e,a)}this._topClusterLevel._addChild(e),e.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(e){e instanceof L.MarkerCluster&&e._iconNeedsUpdate&&e._updateIcon()})},_enqueue:function(e){this._queue.push(e),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var e=0;e<this._queue.length;e++)this._queue[e].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var e=Math.round(this._map._zoom);this._processQueue(),this._zoom<e&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,e)):this._zoom>e?(this._animationStart(),this._animationZoomOut(this._zoom,e)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(e){var t=this._maxLat;return void 0!==t&&(e.getNorth()>=t&&(e._northEast.lat=1/0),e.getSouth()<=-t&&(e._southWest.lat=-1/0)),e},_animationAddLayerNonAnimated:function(e,t){t===e?this._featureGroup.addLayer(e):2===t._childCount?(t._addToMap(),e=t.getAllChildMarkers(),this._featureGroup.removeLayer(e[0]),this._featureGroup.removeLayer(e[1])):t._updateIcon()},_extractNonGroupLayers:function(e,t){var n,i=e.getLayers(),o=0;for(t=t||[];o<i.length;o++)(n=i[o])instanceof L.LayerGroup?this._extractNonGroupLayers(n,t):t.push(n);return t},_overrideMarkerIcon:function(e){return e.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[e]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(e,t){this._animationAddLayerNonAnimated(e,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(o,a){var r,s=this._getExpandedVisibleBounds(),l=this._featureGroup,e=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(s,o,e,function(e){var t,n=e._latlng,i=e._markers;for(s.contains(n)||(n=null),e._isSingleParent()&&o+1===a?(l.removeLayer(e),e._recursivelyAddChildrenToMap(null,a,s)):(e.clusterHide(),e._recursivelyAddChildrenToMap(n,a,s)),r=i.length-1;0<=r;r--)t=i[r],s.contains(t._latlng)||l.removeLayer(t)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(s,a),l.eachLayer(function(e){e instanceof L.MarkerCluster||!e._icon||e.clusterShow()}),this._topClusterLevel._recursively(s,o,a,function(e){e._recursivelyRestoreChildPositions(a)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(s,o,e,function(e){l.removeLayer(e),e.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(e,t){this._animationZoomOutSingle(this._topClusterLevel,e-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e,this._getExpandedVisibleBounds())},_animationAddLayer:function(e,t){var n=this,i=this._featureGroup;i.addLayer(e),t!==e&&(2<t._childCount?(t._updateIcon(),this._forceLayout(),this._animationStart(),e._setPos(this._map.latLngToLayerPoint(t.getLatLng())),e.clusterHide(),this._enqueue(function(){i.removeLayer(e),e.clusterShow(),n._animationEnd()})):(this._forceLayout(),n._animationStart(),n._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,n,i){var o=this._getExpandedVisibleBounds(),a=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(o,a,n+1,i);var r=this;this._forceLayout(),t._recursivelyBecomeVisible(o,i),this._enqueue(function(){var e;1===t._childCount?(e=t._markers[0],this._ignoreMove=!0,e.setLatLng(e.getLatLng()),this._ignoreMove=!1,e.clusterShow&&e.clusterShow()):t._recursively(o,i,a,function(e){e._recursivelyRemoveChildrenFromMap(o,a,n+1)}),r._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(e){return new L.MarkerClusterGroup(e)};var n=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(e,t,n,i){L.Marker.prototype.initialize.call(this,n?n._cLatLng||n.getLatLng():new L.LatLng(0,0),{icon:this,pane:e.options.clusterPane}),this._group=e,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,n&&this._addChild(n),i&&this._addChild(i)},getAllChildMarkers:function(e,t){e=e||[];for(var n=this._childClusters.length-1;0<=n;n--)this._childClusters[n].getAllChildMarkers(e);for(var i=this._markers.length-1;0<=i;i--)t&&this._markers[i].__dragStart||e.push(this._markers[i]);return e},getChildCount:function(){return this._childCount},zoomToBounds:function(e){for(var t=this._childClusters.slice(),n=this._group._map,i=n.getBoundsZoom(this._bounds),o=this._zoom+1,n=n.getZoom();0<t.length&&o<i;){o++;for(var a=[],r=0;r<t.length;r++)a=a.concat(t[r]._childClusters);t=a}o<i?this._group._map.setView(this._latlng,o):i<=n?this._group._map.setView(this._latlng,n+1):this._group._map.fitBounds(this._bounds,e)},getBounds:function(){var e=new L.LatLngBounds;return e.extend(this._bounds),e},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(e,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(e),e instanceof L.MarkerCluster?(t||(this._childClusters.push(e),e.__parent=this),this._childCount+=e._childCount):(t||this._markers.push(e),this._childCount++),this.__parent&&this.__parent._addChild(e,!0)},_setClusterCenter:function(e){this._cLatLng||(this._cLatLng=e._cLatLng||e._latlng)},_resetBounds:function(){var e=this._bounds;e._southWest&&(e._southWest.lat=1/0,e._southWest.lng=1/0),e._northEast&&(e._northEast.lat=-1/0,e._northEast.lng=-1/0)},_recalculateBounds:function(){var e,t,n,i=this._markers,o=this._childClusters,a=0,r=0,s=this._childCount;if(0!==s){for(this._resetBounds(),e=0;e<i.length;e++)t=i[e]._latlng,this._bounds.extend(t),a+=t.lat,r+=t.lng;for(e=0;e<o.length;e++)(n=o[e])._boundsNeedUpdate&&n._recalculateBounds(),this._bounds.extend(n._bounds),t=n._wLatLng,n=n._childCount,a+=t.lat*n,r+=t.lng*n;this._latlng=this._wLatLng=new L.LatLng(a/s,r/s),this._boundsNeedUpdate=!1}},_addToMap:function(e){e&&(this._backupLatlng=this._latlng,this.setLatLng(e)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(e,o,t){this._recursively(e,this._group._map.getMinZoom(),t-1,function(e){for(var t,n=e._markers,i=n.length-1;0<=i;i--)(t=n[i])._icon&&(t._setPos(o),t.clusterHide())},function(e){for(var t,n=e._childClusters,i=n.length-1;0<=i;i--)(t=n[i])._icon&&(t._setPos(o),t.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,n,i,o){this._recursively(t,o,n,function(e){e._recursivelyAnimateChildrenIn(t,e._group._map.latLngToLayerPoint(e.getLatLng()).round(),i),e._isSingleParent()&&i-1===o?(e.clusterShow(),e._recursivelyRemoveChildrenFromMap(t,n,i)):e.clusterHide(),e._addToMap()})},_recursivelyBecomeVisible:function(e,t){this._recursively(e,this._group._map.getMinZoom(),t,null,function(e){e.clusterShow()})},_recursivelyAddChildrenToMap:function(i,o,a){this._recursively(a,this._group._map.getMinZoom()-1,o,function(e){if(o!==e._zoom)for(var t=e._markers.length-1;0<=t;t--){var n=e._markers[t];a.contains(n._latlng)&&(i&&(n._backupLatlng=n.getLatLng(),n.setLatLng(i),n.clusterHide&&n.clusterHide()),e._group._featureGroup.addLayer(n))}},function(e){e._addToMap(i)})},_recursivelyRestoreChildPositions:function(e){for(var t=this._markers.length-1;0<=t;t--){var n=this._markers[t];n._backupLatlng&&(n.setLatLng(n._backupLatlng),delete n._backupLatlng)}if(e-1===this._zoom)for(var i=this._childClusters.length-1;0<=i;i--)this._childClusters[i]._restorePosition();else for(var o=this._childClusters.length-1;0<=o;o--)this._childClusters[o]._recursivelyRestoreChildPositions(e)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(e,t,n,i){var o,a;this._recursively(e,t-1,n-1,function(e){for(a=e._markers.length-1;0<=a;a--)o=e._markers[a],i&&i.contains(o._latlng)||(e._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())},function(e){for(a=e._childClusters.length-1;0<=a;a--)o=e._childClusters[a],i&&i.contains(o._latlng)||(e._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())})},_recursively:function(e,t,n,i,o){var a,r,s=this._childClusters,l=this._zoom;if(t<=l&&(i&&i(this),o&&l===n&&o(this)),l<t||l<n)for(a=s.length-1;0<=a;a--)(r=s[a])._boundsNeedUpdate&&r._recalculateBounds(),e.intersects(r._bounds)&&r._recursively(e,t,n,i,o)},_isSingleParent:function(){return 0<this._childClusters.length&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var e=this.options.opacity;return this.setOpacity(0),this.options.opacity=e,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(e,t){var n=this._getCoord(t.x),i=this._getCoord(t.y),o=this._grid,i=o[i]=o[i]||{},i=i[n]=i[n]||[],n=L.Util.stamp(e);this._objectPoint[n]=t,i.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var n,i,o=this._getCoord(t.x),a=this._getCoord(t.y),t=this._grid,r=t[a]=t[a]||{},s=r[o]=r[o]||[];for(delete this._objectPoint[L.Util.stamp(e)],n=0,i=s.length;n<i;n++)if(s[n]===e)return s.splice(n,1),1===i&&delete r[o],!0},eachObject:function(e,t){var n,i,o,a,r,s,l,c=this._grid;for(n in c)for(i in r=c[n])for(s=r[i],o=0,a=s.length;o<a;o++)l=e.call(t,s[o]),l&&(o--,a--)},getNearObject:function(e){for(var t,n,i,o,a,r,s,l=this._getCoord(e.x),c=this._getCoord(e.y),u=this._objectPoint,d=this._sqCellSize,h=null,p=c-1;p<=c+1;p++)if(i=this._grid[p])for(t=l-1;t<=l+1;t++)if(o=i[t])for(n=0,a=o.length;n<a;n++)r=o[n],((s=this._sqDist(u[L.Util.stamp(r)],e))<d||s<=d&&null===h)&&(d=s,h=r);return h},_getCoord:function(e){var t=Math.floor(e/this._cellSize);return isFinite(t)?t:e},_sqDist:function(e,t){var n=t.x-e.x,e=t.y-e.y;return n*n+e*e}},L.QuickHull={getDistant:function(e,t){var n=t[1].lat-t[0].lat;return(t[0].lng-t[1].lng)*(e.lat-t[0].lat)+n*(e.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(e,t){for(var n,i,o=0,a=null,r=[],s=t.length-1;0<=s;s--)n=t[s],0<(i=this.getDistant(n,e))&&(r.push(n),o<i&&(o=i,a=n));return{maxPoint:a,newPoints:r}},buildConvexHull:function(e,t){var n=[],t=this.findMostDistantPointFromBaseLine(e,t);return t.maxPoint?(n=n.concat(this.buildConvexHull([e[0],t.maxPoint],t.newPoints))).concat(this.buildConvexHull([t.maxPoint,e[1]],t.newPoints)):[e[0]]},getConvexHull:function(e){for(var t=!1,n=!1,i=!1,o=!1,a=null,r=null,s=null,l=null,c=null,u=null,d=e.length-1;0<=d;d--){var h=e[d];(!1===t||h.lat>t)&&(t=(a=h).lat),(!1===n||h.lat<n)&&(n=(r=h).lat),(!1===i||h.lng>i)&&(i=(s=h).lng),(!1===o||h.lng<o)&&(o=(l=h).lng)}c=n!==t?(u=r,a):(u=l,s);return[].concat(this.buildConvexHull([u,c],e),this.buildConvexHull([c,u],e))}},L.MarkerCluster.include({getConvexHull:function(){for(var e,t=this.getAllChildMarkers(),n=[],i=t.length-1;0<=i;i--)e=t[i].getLatLng(),n.push(e);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){var e,t;this._group._spiderfied===this||this._group._inZoomAnimation||(e=this.getAllChildMarkers(null,!0),t=this._group._map.latLngToLayerPoint(this._latlng),this._group._unspiderfy(),this._group._spiderfied=this,t=e.length>=this._circleSpiralSwitchover?this._generatePointsSpiral(e.length,t):(t.y+=10,this._generatePointsCircle(e.length,t)),this._animationSpiderfy(e,t))},unspiderfy:function(e){this._group._inZoomAnimation||(this._animationUnspiderfy(e),this._group._spiderfied=null)},_generatePointsCircle:function(e,t){var n,i,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+e)/this._2PI,a=this._2PI/e,r=[],o=Math.max(o,35);for(r.length=e,n=0;n<e;n++)i=this._circleStartAngle+n*a,r[n]=new L.Point(t.x+o*Math.cos(i),t.y+o*Math.sin(i))._round();return r},_generatePointsSpiral:function(e,t){for(var n=this._group.options.spiderfyDistanceMultiplier,i=n*this._spiralLengthStart,o=n*this._spiralFootSeparation,a=n*this._spiralLengthFactor*this._2PI,r=0,s=[],l=s.length=e;0<=l;l--)l<e&&(s[l]=new L.Point(t.x+i*Math.cos(r),t.y+i*Math.sin(r))._round()),i+=a/(r+=o/i+5e-4*l);return s},_noanimationUnspiderfy:function(){var e,t,n=this._group,i=n._map,o=n._featureGroup,a=this.getAllChildMarkers(null,!0);for(n._ignoreMove=!0,this.setOpacity(1),t=a.length-1;0<=t;t--)e=a[t],o.removeLayer(e),e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng),e.setZIndexOffset&&e.setZIndexOffset(0),e._spiderLeg&&(i.removeLayer(e._spiderLeg),delete e._spiderLeg);n.fire("unspiderfied",{cluster:this,markers:a}),n._ignoreMove=!1,n._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(e,t){var n,i,o,a,r=this._group,s=r._map,l=r._featureGroup,c=this._group.options.spiderLegPolylineOptions;for(r._ignoreMove=!0,n=0;n<e.length;n++)a=s.layerPointToLatLng(t[n]),i=e[n],o=new L.Polyline([this._latlng,a],c),s.addLayer(o),i._spiderLeg=o,i._preSpiderfyLatlng=i._latlng,i.setLatLng(a),i.setZIndexOffset&&i.setZIndexOffset(1e6),l.addLayer(i);this.setOpacity(.3),r._ignoreMove=!1,r.fire("spiderfied",{cluster:this,markers:e})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(e,t){var n,i,o,a,r,s,l=this,c=this._group,u=c._map,d=c._featureGroup,h=this._latlng,p=u.latLngToLayerPoint(h),m=L.Path.SVG,f=L.extend({},this._group.options.spiderLegPolylineOptions),g=f.opacity;for(void 0===g&&(g=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),m?(f.opacity=0,f.className=(f.className||"")+" leaflet-cluster-spider-leg"):f.opacity=g,c._ignoreMove=!0,n=0;n<e.length;n++)i=e[n],s=u.layerPointToLatLng(t[n]),o=new L.Polyline([h,s],f),u.addLayer(o),i._spiderLeg=o,m&&(r=(a=o._path).getTotalLength()+.1,a.style.strokeDasharray=r,a.style.strokeDashoffset=r),i.setZIndexOffset&&i.setZIndexOffset(1e6),i.clusterHide&&i.clusterHide(),d.addLayer(i),i._setPos&&i._setPos(p);for(c._forceLayout(),c._animationStart(),n=e.length-1;0<=n;n--)s=u.layerPointToLatLng(t[n]),(i=e[n])._preSpiderfyLatlng=i._latlng,i.setLatLng(s),i.clusterShow&&i.clusterShow(),m&&((a=(o=i._spiderLeg)._path).style.strokeDashoffset=0,o.setStyle({opacity:g}));this.setOpacity(.3),c._ignoreMove=!1,setTimeout(function(){c._animationEnd(),c.fire("spiderfied",{cluster:l,markers:e})},200)},_animationUnspiderfy:function(e){var t,n,i,o,a,r=this,s=this._group,l=s._map,c=s._featureGroup,u=e?l._latLngToNewLayerPoint(this._latlng,e.zoom,e.center):l.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(null,!0),h=L.Path.SVG;for(s._ignoreMove=!0,s._animationStart(),this.setOpacity(1),n=d.length-1;0<=n;n--)(t=d[n])._preSpiderfyLatlng&&(t.closePopup(),t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng,a=!0,t._setPos&&(t._setPos(u),a=!1),t.clusterHide&&(t.clusterHide(),a=!1),a&&c.removeLayer(t),h&&(a=(o=(i=t._spiderLeg)._path).getTotalLength()+.1,o.style.strokeDashoffset=a,i.setStyle({opacity:0})));s._ignoreMove=!1,setTimeout(function(){var e=0;for(n=d.length-1;0<=n;n--)(t=d[n])._spiderLeg&&e++;for(n=d.length-1;0<=n;n--)(t=d[n])._spiderLeg&&(t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),1<e&&c.removeLayer(t),l.removeLayer(t._spiderLeg),delete t._spiderLeg);s._animationEnd(),s.fire("unspiderfied",{cluster:r,markers:d})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(e){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(e))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(e){this._spiderfied&&this._spiderfied.unspiderfy(e)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(e){e._spiderLeg&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),this._map.removeLayer(e._spiderLeg),delete e._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(e){return e?e instanceof L.MarkerClusterGroup?e=e._topClusterLevel.getAllChildMarkers():e instanceof L.LayerGroup?e=e._layers:e instanceof L.MarkerCluster?e=e.getAllChildMarkers():e instanceof L.Marker&&(e=[e]):e=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(e),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(e),this},_flagParentsIconsNeedUpdate:function(e){var t,n;for(t in e)for(n=e[t].__parent;n;)n._iconNeedsUpdate=!0,n=n.__parent},_refreshSingleMarkerModeMarkers:function(e){var t,n;for(t in e)n=e[t],this.hasLayer(n)&&n.setIcon(this._overrideMarkerIcon(n))}}),L.Marker.include({refreshIconOptions:function(e,t){var n=this.options.icon;return L.setOptions(n,e),this.setIcon(n),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),e.MarkerClusterGroup=t,e.MarkerCluster=n});
|
|
193
193
|
//# sourceMappingURL=crouton.min.js.map
|