(self.webpackChunkroad_report=self.webpackChunkroad_report||[]).push([[257],{1200:(At,dt,v)=>{"use strict";v.d(dt,{B:()=>h});var A=v(1991),I=v(8699),o=v(1626),a=v(7110);let h=(()=>{class l extends A.G{constructor(m,d){super(m,d),this.http=m,this.helpers=d,this.endpoint="report-segmens"}static{this.\u0275fac=function(d){return new(d||l)(I.KVO(o.Qq),I.KVO(a.V))}}static{this.\u0275prov=I.jDH({token:l,factory:l.\u0275fac,providedIn:"root"})}}return l})()},4576:(At,dt,v)=>{"use strict";v.d(dt,{_:()=>h});var A=v(1991),I=v(8699),o=v(1626),a=v(7110);let h=(()=>{class l extends A.G{constructor(m,d){super(m,d),this.http=m,this.helpers=d,this.endpoint="sub-district"}static{this.\u0275fac=function(d){return new(d||l)(I.KVO(o.Qq),I.KVO(a.V))}}static{this.\u0275prov=I.jDH({token:l,factory:l.\u0275fac,providedIn:"root"})}}return l})()},5731:(At,dt,v)=>{"use strict";v.d(dt,{c:()=>h});var A=v(1991),I=v(8699),o=v(1626),a=v(7110);let h=(()=>{class l extends A.G{constructor(m,d){super(m,d),this.http=m,this.helpers=d,this.endpoint="report-schedules/detail"}static{this.\u0275fac=function(d){return new(d||l)(I.KVO(o.Qq),I.KVO(a.V))}}static{this.\u0275prov=I.jDH({token:l,factory:l.\u0275fac,providedIn:"root"})}}return l})()},2257:(At,dt,v)=>{"use strict";v.d(dt,{i:()=>et});var A=v(177),I=v(5946),o=v(6803),a=v(8244),m=(v(6484),v(7374)),c=v(8699),y=v(7110),T=v(2423),P=v(5211),W=v(1200),O=v(4576),k=v(5731);function g(rt,Rt){if(1&rt&&(c.j41(0,"li",13),c.nrm(1,"span",14),c.j41(2,"span",15),c.EFF(3),c.k0s()()),2&rt){const x=Rt.$implicit,B=c.XpG(2);c.R7$(1),c.xc7("background-color","DSS"===B.selectedOption?B.getColorByStatusDss(x.status):B.getColorByStatusTitikLaporan(x.status)),c.R7$(1),c.Y8G("ngClass","DSS"===B.selectedOption?B.getColorByStatusDss(x.status):B.getColorByStatusTitikLaporan(x.status)),c.R7$(1),c.SpI(" ",x.status,"")}}function S(rt,Rt){if(1&rt){const x=c.RV6();c.j41(0,"ul",10,11),c.bIt("ngbCollapseChange",function(C){c.eBV(x);const U=c.XpG();return c.Njj(U.isCollapsed=C)}),c.DNE(2,g,4,4,"li",12),c.k0s()}if(2&rt){const x=c.XpG();c.xc7("width","DSS"===x.selectedOption?260:190,"px"),c.Y8G("ngbCollapse",x.isCollapsed),c.R7$(2),c.Y8G("ngForOf","DSS"===x.selectedOption?x.statusDss:x.statusTitikLaporan)}}function b(rt,Rt){if(1&rt){const x=c.RV6();c.j41(0,"div",16)(1,"button",17),c.EFF(2),c.k0s(),c.j41(3,"div",18)(4,"button",19),c.bIt("click",function(){c.eBV(x);const C=c.XpG();return c.Njj(C.onOptionChange("DSS"))}),c.EFF(5," DSS "),c.k0s(),c.j41(6,"button",19),c.bIt("click",function(){c.eBV(x);const C=c.XpG();return c.Njj(C.onOptionChange("Titik Laporan"))}),c.EFF(7," Titik Laporan "),c.k0s()()()}if(2&rt){const x=c.XpG();c.R7$(2),c.SpI(" ",x.selectedOption," ")}}let et=(()=>{class rt{constructor(x,B,C,U,q,Q,ft){this.helpers=x,this.loading=B,this.api=C,this.modal=U,this.reportSegmens=q,this.subDistrict=Q,this.perbaikan=ft,this.isExpand=!0,this.polylineData=a.layerGroup(),this.showOption=!0,this.showStatus=!0,this.allowDragging=!0,this.cnterLatLng={lat:-7.869576,lng:112.5309706},this.scheduleLayer=new a.FeatureGroup,this.polylineLayer=new a.FeatureGroup,this.polygonLayer=new a.FeatureGroup,this.pointLayer=new a.FeatureGroup,this.selectedData=[],this.selectedOption="DSS",this.zoom=14,this.lat=-7.8699381,this.lng=112.5285772,this.dayjs=m,this.mapOptions={layers:[(0,a.tileLayer)("http://mt0.google.com/vt/lyrs=m&hl=en&x={x}&y={y}&z={z}&s=Ga",{maxZoom:22,minZoom:11})],scrollWheelZoom:!1,zoom:this.zoom,dragging:this.allowDragging,doubleClickZoom:!1,touchZoom:!1,tap:!1,center:(0,a.latLng)(this.lat,this.lng)},this.isCollapsed=!1,this.statusDss=[],this.statusTitikLaporan=[],this.embedReportSegments={embed:"segmen,analytic_data"},this.embedReportSegmentsPerbaikan={embed:"user.user,user.segmens.segmen,user.status_report"},this.embedReportSchedule={embed:"user.user,user.segmens.segmen,user.status_report"},this.embedReportList={embed:"segmens.segmen,segmens.analytic_data,segmens.photos,status_report,user"}}initMap(x){this.map||(this.map=x),this.map.zoomControl.setPosition("bottomright")}ngAfterViewInit(){window.dispatchEvent(new Event("resize"))}ngOnChanges(x){x.allowDragging&&(this.mapOptions.dragging=this.allowDragging)}ngOnInit(){null==this.polylineData.segmen&&null==this.perbaikanSegmen?(this.getSubDistrict(),this.getReportSegmens()):null!=this.perbaikanSegmen?this.getReportSegmensBySchedule():this.getReportSegmentById(),this.condition()}toggleCollapse(){this.isCollapsed||this.getStatusDss(),this.isCollapsed=!this.isCollapsed}toggleFullscreen(){const x=document.getElementById("map");x&&(document.fullscreenElement?document.exitFullscreen&&document.exitFullscreen():x.requestFullscreen&&x.requestFullscreen())}onOptionChange(x){this.selectedOption=x,this.map&&(this.map.removeLayer(this.pointLayer),this.map.removeLayer(this.polygonLayer),this.map.removeLayer(this.polylineLayer)),this.selectedData=[],"DSS"===x?this.map&&this.map.closePopup():"Titik Laporan"===x&&(this.getStatusTitik(),this.getStatusSegmenByReport()),this.map&&("DSS"===x?(this.polygonLayer.addTo(this.map),this.polylineLayer.addTo(this.map)):"point"===x&&this.pointLayer.addTo(this.map))}createCustomIcon(x,B,C){return new a.DivIcon({className:"custom-icon",html:`
`,iconSize:[B,C],iconAnchor:[B/2,C]})}addMarkers(x){const C={iconUrl:this.getIconByStatus(x),iconSize:[32,32]};return a.icon(C)}getIconByStatus(x){switch(x){case"PROG":return"assets/images/icon/marker-dalam_proses.png";case"FOLUP":return"assets/images/icon/marker-tindak_lanjut.png";case"DONE":return"assets/images/icon/marker-selesai.png";case"RPR":return"assets/images/icon/marker-perbaikan.png";case"FIXED":return"assets/images/icon/marker-selesai-perbaikan.png";default:return"assets/images/icon/marker-default.png"}}getColorByStatusTitikLaporan(x){return{"Dalam Proses":"#586AF5","Tindak Lanjut":"#FFAB00","Selesai Perbaikan":"#663000",Perbaikan:"#F35625",Selesai:"#24D07A"}[x]||"transparent"}getStatusDss(){const x={"Berlubang Parah":"#215A99","Berlubang Sedang":"#2B79CC","Berlubang Ringan":"#87C0FF","Terkelupas Parah":"#18795F","Terkelupas Sedang":"#1CA762","Terkelupas Ringan":"#4FDA95","Retak Parah":"#992A44","Retak Sedang":"#FF4671","Retak Ringan":"#FF90AA","Bergelombang Parah":"#322564","Bergelombang Sedang":"#644BC8","Bergelombang Ringan":"#977EFB","PermukaanKasar Berat":"#CCCC00","PermukaanKasar Sedang":"#FFFF00","PermukaanKasar Ringan":"#FFFF66"},B=Object.values(x);this.statusDss=Object.keys(x).map((C,U)=>({status:C,jumlah:0,color:B[U]}))}getStatusTitik(){const x={"Dalam Proses":"#586AF5","Tindak Lanjut":"#FFAB00","Selesai Perbaikan":"#663000",Perbaikan:"#F35625",Selesai:"#24D07A"},B=Object.values(x);this.statusTitikLaporan=Object.keys(x).map((C,U)=>({status:C,jumlah:0,color:B[U]}))}getColorByStatusDss(x,B){const U={"- -":"#EC8F5E","Berlubang Parah":"#215A99","Berlubang Sedang":"#2B79CC","Berlubang Ringan":"#87C0FF","Terkelupas Parah":"#18795F","Terkelupas Sedang":"#1CA762","Terkelupas Ringan":"#4FDA95","Retak Parah":"#992A44","Retak Sedang":"#FF4671","Retak Ringan":"#FF90AA","Bergelombang Parah":"#322564","Bergelombang Sedang":"#644BC8","Bergelombang Ringan":"#977EFB","PermukaanKasar Berat":"#CCCC00","PermukaanKasar Sedang":"#FFFF00","PermukaanKasar Ringan":"#FFFF66"};return U[`${x} ${B}`]||U[x]}condition(){return 0===this.polylineLayer.getLayers().length}sortCustomDss(){this.statusTitikLaporan.sort((x,B)=>{const C=["Dalam Proses","Ditindak Lanjuti","Perbaikan","Selesai"];return C.indexOf(x.status)-C.indexOf(B.status)})}sortByCustomOrder(){this.statusDss.sort((x,B)=>{const C=["Berlubang Parah","Berlubang Sedang","Berlubang Ringan","Terkelupas Parah","Terkelupas Sedang","Terkelupas Ringan","Retak Parah","Retak Sedang","Retak Ringan","Bergelombang Parah","Bergelombang Sedang","Bergelombang Ringan","NULL"];return C.indexOf(x.status)-C.indexOf(B.status)})}getReportSegmensBySchedule(){this.mapOptions.zoom=18,this.mapOptions.dragging=!1,this.perbaikan.getById(this.perbaikanSegmen).subscribe(x=>{const B=x.data.report.segmens;for(const C of B){const q=JSON.parse(C.segmen.geojson).coordinates,Q=q[0];this.lat=Q[1],this.lng=Q[0];const ft=q.map(yt=>({lat:yt[1],lng:yt[0]})),z=new a.Polyline(ft,{color:"#586AF5",weight:8});z.on("mouseover",function(){}),this.scheduleLayer.addLayer(z)}this.map&&(this.map?.panTo((0,a.latLng)(this.lat,this.lng)),this.scheduleLayer.addTo(this.map))})}getReportSegmentById(){this.loading.isLoading(),this.mapOptions.zoom=19,this.mapOptions.dragging=!1,this.reportSegmens.getById(this.polylineData.id).subscribe({next:({})=>{const B=JSON.parse(this.polylineData.segmen.geojson).coordinates,C=B[0];this.lat=C[1],this.lng=C[0];const U=B.map(Y=>({lat:Y[1],lng:Y[0]})),q=this.polylineData.user_level,Q=this.polylineData.user_type,ft=new a.Polyline(U,{color:this.getColorByStatusDss(Q,q),weight:8});console.log(Q,q),this.map&&(this.polylineLayer.addTo(this.map),this.map.setZoom(this.mapOptions.zoom)),this.map?.panTo((0,a.latLng)(this.lat,this.lng)),this.polylineLayer.addLayer(ft)},error:()=>{}})}getReportSegmens(){this.loading.isLoading(),this.reportSegmens.getAll(this.embedReportSegments).subscribe(x=>{const B=x.data;if(B&&B.length>0){this.polylineLayer.clearLayers();for(const C of B){const Q=JSON.parse(C.segmen.geojson).coordinates.map(z=>({lat:z[1],lng:z[0]})),$=new a.Polyline(Q,{color:this.getColorByStatusDss(C.user_type,C.user_level),weight:5});this.polylineLayer.addLayer($)}this.map&&this.polylineLayer.addTo(this.map)}},x=>{})}getStatusSegmenByReport(){this.api.getAll(this.embedReportList).subscribe(x=>{const B=x.data;if(B&&B[0]?.segmens&&B[0]?.segmens.length>0){this.pointLayer.clearLayers();for(const C of B){const U=C.segmens;for(const q of U){const Y=JSON.parse(q?.segmen?.geojson).coordinates.map(yt=>({lat:yt[1],lng:yt[0]})),$=q.user_type+" "+q.user_level,z=C.status_id;if("RJT"!==z){const yt=a.icon({iconUrl:this.getIconByStatus(z),iconSize:[32,32],iconAnchor:[16,32]}),Z=a.marker(Y[0],{icon:yt}).addTo(this.pointLayer);this.pointLayer.setStyle({className:"mask"}),Z.addTo(this.pointLayer),Z.on("click",X=>{for(const ht of q.photos)this.map&&a.popup({className:"custom-popup"}).setLatLng(X.latlng).setContent(`\n
\n
\n
\n
\n ${C.status_report.name}\n
\n
\n No.Tiket ${C.no_ticket}\n
\n
\n\n
\n

\n
\n
\n \n Nama ${C.user.fullname}\n
\n
\n \n ${q.segmen.name}\n
\n
\n \n ${m(C.created_at).format("DD-MM-YYYY")}\n
\n
\n
\n\n
\n \n \n ${"-"===q.user_type&&"-"===q.user_level?"Belum Diketahui":`${q.user_type}${q.user_level}`}\n \n
\n\n
\n ${C.note}\n
\n
\n
\n `).openOn(this.map)})}this.getColorByStatusTitikLaporan(C.status_report.name)}}this.getStatusTitik(),this.map&&this.pointLayer.addTo(this.map)}})}getSubDistrict(){this.subDistrict.getAll().subscribe(x=>{const B=x.data;if(B&&B.length>0){this.polygonLayer.clearLayers();for(const C of B){const U=JSON.parse(C.geojson),q=a.geoJSON(U,{style:{fillColor:"green",weight:2,color:"white"}});q.on("click",Q=>{const ft=Q.target,Y=C.name,$=a.popup().setContent(Y);ft.bindPopup($).openPopup()}),q.addTo(this.polygonLayer)}this.map&&this.polygonLayer.addTo(this.map)}},x=>{})}static{this.\u0275fac=function(B){return new(B||rt)(c.rXU(y.V),c.rXU(T.U),c.rXU(P.Z),c.rXU(o.Bq),c.rXU(W.B),c.rXU(O._),c.rXU(k.c))}}static{this.\u0275cmp=c.VBU({type:rt,selectors:[["app-map"]],inputs:{polylineData:"polylineData",perbaikanSegmen:"perbaikanSegmen",showOption:"showOption",showStatus:"showStatus",allowDragging:"allowDragging",cnterLatLng:"cnterLatLng"},standalone:!0,features:[c.OA$,c.aNF],decls:12,vars:4,consts:[["id","map",1,"w-100","position-relative","rounded-3","overflow-hidden","bg-secondary-subtle",2,"height","470px"],["id","status",1,"position-absolute","z-1","ms-3","mt-3"],["type","button","aria-controls","collapseExample",1,"btn","btn-light","fw-light","mb-2",3,"click"],[1,"bi","bi-info-circle","me-1","text-primary"],["class","list-unstyled d-flex flex-column row-gap-1 rounded-2 bg-white bg-opacity-75 p-3 mb-0","style","overflow: auto; max-height: 400px",3,"ngbCollapse","width","ngbCollapseChange",4,"ngIf"],["id","optionData",1,"position-absolute","z-1","me-3","mt-3","d-flex",2,"right","0"],["ngbDropdown","","class","d-inline-block",4,"ngIf"],[1,"btn","btn-light",3,"click"],[3,"ngClass"],["leaflet","",1,"tes","position-relative","z-0","w-100","h-100",3,"leafletOptions","leafletMapReady"],[1,"list-unstyled","d-flex","flex-column","row-gap-1","rounded-2","bg-white","bg-opacity-75","p-3","mb-0",2,"overflow","auto","max-height","400px",3,"ngbCollapse","ngbCollapseChange"],["collapse","ngbCollapse"],["class","d-flex align-items-center",4,"ngFor","ngForOf"],[1,"d-flex","align-items-center"],[1,"p-1","rounded-circle","bg-status","me-2"],[1,"status-text",3,"ngClass"],["ngbDropdown","",1,"d-inline-block"],["type","button","id","dropdownBasic1","ngbDropdownToggle","",1,"btn","btn-primary","me-2"],["ngbDropdownMenu","","aria-labelledby","dropdownBasic1"],["ngbDropdownItem","",1,"py-2","px-2",3,"click"]],template:function(B,C){1&B&&(c.j41(0,"div",0)(1,"div")(2,"div",1)(3,"button",2),c.bIt("click",function(){return C.toggleCollapse()}),c.nrm(4,"i",3),c.EFF(5," Info Garis "),c.k0s(),c.DNE(6,S,3,4,"ul",4),c.k0s()(),c.j41(7,"div",5),c.DNE(8,b,8,1,"div",6),c.j41(9,"button",7),c.bIt("click",function(){return C.isExpand=!C.isExpand})("click",function(){return C.toggleFullscreen()}),c.nrm(10,"i",8),c.k0s()(),c.j41(11,"div",9),c.bIt("leafletMapReady",function(q){return C.initMap(q)}),c.k0s()()),2&B&&(c.R7$(6),c.Y8G("ngIf",C.isCollapsed),c.R7$(2),c.Y8G("ngIf",C.showOption),c.R7$(2),c.Y8G("ngClass",C.isExpand?"bi bi-arrows-angle-expand":"bi bi-arrows-angle-contract"),c.R7$(1),c.Y8G("leafletOptions",C.mapOptions))},dependencies:[A.MD,A.YU,A.Sq,A.bT,I.gI,I.V1,o.zH,o.tg,o.do,o.U0,o._H,o.oi,o.HC,o.$G,o.UN],styles:['.btn-custom[_ngcontent-%COMP%]{background-color:""}.leaflet-container.crosshair-cursor-enabled[_ngcontent-%COMP%]{cursor:default} .leaflet-interactive{cursor:default!important}.leaflet-marker-icon[_ngcontent-%COMP%] .leaflet-zoom-animated[_ngcontent-%COMP%] .leaflet-interactive[_ngcontent-%COMP%], .custom-popup[_ngcontent-%COMP%]{cursor:pointer!important}']})}}return rt})()},6484:function(At,dt){!function(v){"use strict";var A=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(o){L.Util.setOptions(this,o),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var a=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,a?this._withAnimation:this._noAnimation),this._markerCluster=a?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(o){if(o instanceof L.LayerGroup)return this.addLayers([o]);if(!o.getLatLng)return this._nonPointGroup.addLayer(o),this.fire("layeradd",{layer:o}),this;if(!this._map)return this._needsClustering.push(o),this.fire("layeradd",{layer:o}),this;if(this.hasLayer(o))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(o,this._maxZoom),this.fire("layeradd",{layer:o}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var a=o,h=this._zoom;if(o.__parent)for(;a.__parent._zoom>=h;)a=a.__parent;return this._currentShownBounds.contains(a.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(o,a):this._animationAddLayerNonAnimated(o,a)),this},removeLayer:function(o){return o instanceof L.LayerGroup?this.removeLayers([o]):o.getLatLng?this._map?o.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(o)),this._removeLayer(o,!0),this.fire("layerremove",{layer:o}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),o.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(o)&&(this._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,o)&&this.hasLayer(o)&&this._needsRemoving.push({layer:o,latlng:o._latlng}),this.fire("layerremove",{layer:o}),this):(this._nonPointGroup.removeLayer(o),this.fire("layerremove",{layer:o}),this)},addLayers:function(o,a){if(!L.Util.isArray(o))return this.addLayer(o);var P,h=this._featureGroup,l=this._nonPointGroup,_=this.options.chunkedLoading,m=this.options.chunkInterval,d=this.options.chunkProgress,c=o.length,y=0,T=!0;if(this._map){var W=(new Date).getTime(),O=L.bind(function(){var g=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();ym);y++)if((P=o[y])instanceof L.LayerGroup)T&&(o=o.slice(),T=!1),this._extractNonGroupLayers(P,o),c=o.length;else if(P.getLatLng){if(!this.hasLayer(P)&&(this._addLayer(P,this._maxZoom),a||this.fire("layeradd",{layer:P}),P.__parent&&2===P.__parent.getChildCount())){var b=P.__parent.getAllChildMarkers();h.removeLayer(b[0]===P?b[1]:b[0])}}else l.addLayer(P),a||this.fire("layeradd",{layer:P});d&&d(y,c,(new Date).getTime()-W),y===c?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(O,this.options.chunkDelay)},this);O()}else for(var k=this._needsClustering;y=0;a--)o.extend(this._needsClustering[a].getLatLng());return o.extend(this._nonPointGroup.getBounds()),o},eachLayer:function(o,a){var _,m,d,h=this._needsClustering.slice(),l=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(h),m=h.length-1;m>=0;m--){for(_=!0,d=l.length-1;d>=0;d--)if(l[d].layer===h[m]){_=!1;break}_&&o.call(a,h[m])}this._nonPointGroup.eachLayer(o,a)},getLayers:function(){var o=[];return this.eachLayer(function(a){o.push(a)}),o},getLayer:function(o){var a=null;return o=parseInt(o,10),this.eachLayer(function(h){L.stamp(h)===o&&(a=h)}),a},hasLayer:function(o){if(!o)return!1;var a,h=this._needsClustering;for(a=h.length-1;a>=0;a--)if(h[a]===o)return!0;for(a=(h=this._needsRemoving).length-1;a>=0;a--)if(h[a].layer===o)return!1;return!(!o.__parent||o.__parent._group!==this)||this._nonPointGroup.hasLayer(o)},zoomToShowLayer:function(o,a){var h=this._map;"function"!=typeof a&&(a=function(){});var l=function(){(h.hasLayer(o)||h.hasLayer(o.__parent))&&!this._inZoomAnimation&&(this._map.off("moveend",l,this),this.off("animationend",l,this),h.hasLayer(o)?a():o.__parent._icon&&(this.once("spiderfied",a,this),o.__parent.spiderfy()))};o._icon&&this._map.getBounds().contains(o.getLatLng())?a():o.__parent._zoom=0;h--)if(o[h]===a)return o.splice(h,1),!0},_removeFromGridUnclustered:function(o,a){for(var h=this._map,l=this._gridUnclustered,_=Math.floor(this._map.getMinZoom());a>=_&&l[a].removeObject(o,h.project(o.getLatLng(),a));a--);},_childMarkerDragStart:function(o){o.target.__dragStart=o.target._latlng},_childMarkerMoved:function(o){if(!this._ignoreMove&&!o.target.__dragStart){var a=o.target._popup&&o.target._popup.isOpen();this._moveChild(o.target,o.oldLatLng,o.latlng),a&&o.target.openPopup()}},_moveChild:function(o,a,h){o._latlng=a,this.removeLayer(o),o._latlng=h,this.addLayer(o)},_childMarkerDragEnd:function(o){var a=o.target.__dragStart;delete o.target.__dragStart,a&&this._moveChild(o.target,a,o.target._latlng)},_removeLayer:function(o,a,h){var l=this._gridClusters,_=this._gridUnclustered,m=this._featureGroup,d=this._map,c=Math.floor(this._map.getMinZoom());a&&this._removeFromGridUnclustered(o,this._maxZoom);var P,y=o.__parent;for(this._arraySplice(y._markers,o);y&&(y._childCount--,y._boundsNeedUpdate=!0,!(y._zoom"+a+"",className:"marker-cluster"+(h+=a<10?"small":a<100?"medium":"large"),iconSize:new L.Point(40,40)})},_bindEvents:function(){var o=this._map,h=this.options.showCoverageOnHover;(this.options.spiderfyOnMaxZoom||this.options.zoomToBoundsOnClick||this.options.spiderfyOnEveryZoom)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),h&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),o.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(o){var a=o.layer,h=a;if("clusterkeypress"!==o.type||!o.originalEvent||13===o.originalEvent.keyCode){for(;1===h._childClusters.length;)h=h._childClusters[0];h._zoom===this._maxZoom&&h._childCount===a._childCount&&this.options.spiderfyOnMaxZoom?a.spiderfy():this.options.zoomToBoundsOnClick&&a.zoomToBounds(),this.options.spiderfyOnEveryZoom&&a.spiderfy(),o.originalEvent&&13===o.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(o){var a=this._map;this._inZoomAnimation||(this._shownPolygon&&a.removeLayer(this._shownPolygon),o.layer.getChildCount()>2&&o.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(o.layer.getConvexHull(),this.options.polygonOptions),a.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var a=this.options.showCoverageOnHover,_=this._map;(this.options.spiderfyOnMaxZoom||this.options.zoomToBoundsOnClick||this.options.spiderfyOnEveryZoom)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),a&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),_.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var o=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,o),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),o),this._currentShownBounds=o}},_generateInitialClusters:function(){var o=Math.ceil(this._map.getMaxZoom()),a=Math.floor(this._map.getMinZoom()),h=this.options.maxClusterRadius,l=h;"function"!=typeof h&&(l=function(){return h}),null!==this.options.disableClusteringAtZoom&&(o=this.options.disableClusteringAtZoom-1),this._maxZoom=o,this._gridClusters={},this._gridUnclustered={};for(var _=o;_>=a;_--)this._gridClusters[_]=new L.DistanceGrid(l(_)),this._gridUnclustered[_]=new L.DistanceGrid(l(_));this._topClusterLevel=new this._markerCluster(this,a-1)},_addLayer:function(o,a){var m,d,h=this._gridClusters,l=this._gridUnclustered,_=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(o),o.on(this._childMarkerEventHandlers,this);a>=_;a--){m=this._map.project(o.getLatLng(),a);var c=h[a].getNearObject(m);if(c)return c._addChild(o),void(o.__parent=c);if(c=l[a].getNearObject(m)){var y=c.__parent;y&&this._removeLayer(c,!1);var T=new this._markerCluster(this,a,c,o);h[a].addObject(T,this._map.project(T._cLatLng,a)),c.__parent=T,o.__parent=T;var P=T;for(d=a-1;d>y._zoom;d--)P=new this._markerCluster(this,d,P),h[d].addObject(P,this._map.project(c.getLatLng(),d));return y._addChild(P),void this._removeFromGridUnclustered(c,a)}l[a].addObject(o,m)}this._topClusterLevel._addChild(o),o.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(o){o instanceof L.MarkerCluster&&o._iconNeedsUpdate&&o._updateIcon()})},_enqueue:function(o){this._queue.push(o),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var o=0;oo?(this._animationStart(),this._animationZoomOut(this._zoom,o)):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(o){var a=this._maxLat;return void 0!==a&&(o.getNorth()>=a&&(o._northEast.lat=1/0),o.getSouth()<=-a&&(o._southWest.lat=-1/0)),o},_animationAddLayerNonAnimated:function(o,a){if(a===o)this._featureGroup.addLayer(o);else if(2===a._childCount){a._addToMap();var h=a.getAllChildMarkers();this._featureGroup.removeLayer(h[0]),this._featureGroup.removeLayer(h[1])}else a._updateIcon()},_extractNonGroupLayers:function(o,a){var _,h=o.getLayers(),l=0;for(a=a||[];l=0;m--)h.contains((T=y[m])._latlng)||l.removeLayer(T)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(h,a),l.eachLayer(function(d){!(d instanceof L.MarkerCluster)&&d._icon&&d.clusterShow()}),this._topClusterLevel._recursively(h,o,a,function(d){d._recursivelyRestoreChildPositions(a)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(h,o,_,function(d){l.removeLayer(d),d.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(o,a){this._animationZoomOutSingle(this._topClusterLevel,o-1,a),this._topClusterLevel._recursivelyAddChildrenToMap(null,a,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),o,this._getExpandedVisibleBounds())},_animationAddLayer:function(o,a){var h=this,l=this._featureGroup;l.addLayer(o),a!==o&&(a._childCount>2?(a._updateIcon(),this._forceLayout(),this._animationStart(),o._setPos(this._map.latLngToLayerPoint(a.getLatLng())),o.clusterHide(),this._enqueue(function(){l.removeLayer(o),o.clusterShow(),h._animationEnd()})):(this._forceLayout(),h._animationStart(),h._animationZoomOutSingle(a,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(o,a,h){var l=this._getExpandedVisibleBounds(),_=Math.floor(this._map.getMinZoom());o._recursivelyAnimateChildrenInAndAddSelfToMap(l,_,a+1,h);var m=this;this._forceLayout(),o._recursivelyBecomeVisible(l,h),this._enqueue(function(){if(1===o._childCount){var d=o._markers[0];this._ignoreMove=!0,d.setLatLng(d.getLatLng()),this._ignoreMove=!1,d.clusterShow&&d.clusterShow()}else o._recursively(l,h,_,function(c){c._recursivelyRemoveChildrenFromMap(l,_,a+1)});m._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(o){return new L.MarkerClusterGroup(o)};var I=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(o,a,h,l){L.Marker.prototype.initialize.call(this,h?h._cLatLng||h.getLatLng():new L.LatLng(0,0),{icon:this,pane:o.options.clusterPane}),this._group=o,this._zoom=a,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,h&&this._addChild(h),l&&this._addChild(l)},getAllChildMarkers:function(o,a){o=o||[];for(var h=this._childClusters.length-1;h>=0;h--)this._childClusters[h].getAllChildMarkers(o,a);for(var l=this._markers.length-1;l>=0;l--)a&&this._markers[l].__dragStart||o.push(this._markers[l]);return o},getChildCount:function(){return this._childCount},zoomToBounds:function(o){for(var d,a=this._childClusters.slice(),h=this._group._map,l=h.getBoundsZoom(this._bounds),_=this._zoom+1,m=h.getZoom();a.length>0&&l>_;){_++;var c=[];for(d=0;d_?this._group._map.setView(this._latlng,_):l<=m?this._group._map.setView(this._latlng,m+1):this._group._map.fitBounds(this._bounds,o)},getBounds:function(){var o=new L.LatLngBounds;return o.extend(this._bounds),o},_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(o,a){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(o),o instanceof L.MarkerCluster?(a||(this._childClusters.push(o),o.__parent=this),this._childCount+=o._childCount):(a||this._markers.push(o),this._childCount++),this.__parent&&this.__parent._addChild(o,!0)},_setClusterCenter:function(o){this._cLatLng||(this._cLatLng=o._cLatLng||o._latlng)},_resetBounds:function(){var o=this._bounds;o._southWest&&(o._southWest.lat=1/0,o._southWest.lng=1/0),o._northEast&&(o._northEast.lat=-1/0,o._northEast.lng=-1/0)},_recalculateBounds:function(){var m,d,c,y,o=this._markers,a=this._childClusters,h=0,l=0,_=this._childCount;if(0!==_){for(this._resetBounds(),m=0;m=0;m--)(d=_[m])._icon&&(d._setPos(a),d.clusterHide())},function(l){var m,d,_=l._childClusters;for(m=_.length-1;m>=0;m--)(d=_[m])._icon&&(d._setPos(a),d.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(o,a,h,l){this._recursively(o,l,a,function(_){_._recursivelyAnimateChildrenIn(o,_._group._map.latLngToLayerPoint(_.getLatLng()).round(),h),_._isSingleParent()&&h-1===l?(_.clusterShow(),_._recursivelyRemoveChildrenFromMap(o,a,h)):_.clusterHide(),_._addToMap()})},_recursivelyBecomeVisible:function(o,a){this._recursively(o,this._group._map.getMinZoom(),a,null,function(h){h.clusterShow()})},_recursivelyAddChildrenToMap:function(o,a,h){this._recursively(h,this._group._map.getMinZoom()-1,a,function(l){if(a!==l._zoom)for(var _=l._markers.length-1;_>=0;_--){var m=l._markers[_];h.contains(m._latlng)&&(o&&(m._backupLatlng=m.getLatLng(),m.setLatLng(o),m.clusterHide&&m.clusterHide()),l._group._featureGroup.addLayer(m))}},function(l){l._addToMap(o)})},_recursivelyRestoreChildPositions:function(o){for(var a=this._markers.length-1;a>=0;a--){var h=this._markers[a];h._backupLatlng&&(h.setLatLng(h._backupLatlng),delete h._backupLatlng)}if(o-1===this._zoom)for(var l=this._childClusters.length-1;l>=0;l--)this._childClusters[l]._restorePosition();else for(var _=this._childClusters.length-1;_>=0;_--)this._childClusters[_]._recursivelyRestoreChildPositions(o)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(o,a,h,l){var _,m;this._recursively(o,a-1,h-1,function(d){for(m=d._markers.length-1;m>=0;m--)_=d._markers[m],(!l||!l.contains(_._latlng))&&(d._group._featureGroup.removeLayer(_),_.clusterShow&&_.clusterShow())},function(d){for(m=d._childClusters.length-1;m>=0;m--)_=d._childClusters[m],(!l||!l.contains(_._latlng))&&(d._group._featureGroup.removeLayer(_),_.clusterShow&&_.clusterShow())})},_recursively:function(o,a,h,l,_){var c,y,m=this._childClusters,d=this._zoom;if(a<=d&&(l&&l(this),_&&d===h&&_(this)),d=0;c--)(y=m[c])._boundsNeedUpdate&&y._recalculateBounds(),o.intersects(y._bounds)&&y._recursively(o,a,h,l,_)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var o=this.options.opacity;return this.setOpacity(0),this.options.opacity=o,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(o){this._cellSize=o,this._sqCellSize=o*o,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(o,a){var h=this._getCoord(a.x),l=this._getCoord(a.y),_=this._grid,m=_[l]=_[l]||{},d=m[h]=m[h]||[],c=L.Util.stamp(o);this._objectPoint[c]=a,d.push(o)},updateObject:function(o,a){this.removeObject(o),this.addObject(o,a)},removeObject:function(o,a){var c,y,h=this._getCoord(a.x),l=this._getCoord(a.y),_=this._grid,m=_[l]=_[l]||{},d=m[h]=m[h]||[];for(delete this._objectPoint[L.Util.stamp(o)],c=0,y=d.length;c=0;m--)(c=this.getDistant(d=a[m],o))>0&&(_.push(d),c>h&&(h=c,l=d));return{maxPoint:l,newPoints:_}},buildConvexHull:function(o,a){var h=[],l=this.findMostDistantPointFromBaseLine(o,a);return l.maxPoint?h=(h=h.concat(this.buildConvexHull([o[0],l.maxPoint],l.newPoints))).concat(this.buildConvexHull([l.maxPoint,o[1]],l.newPoints)):[o[0]]},getConvexHull:function(o){var W,a=!1,h=!1,l=!1,_=!1,m=null,d=null,c=null,y=null,T=null,P=null;for(W=o.length-1;W>=0;W--){var O=o[W];(!1===a||O.lat>a)&&(m=O,a=O.lat),(!1===h||O.latl)&&(c=O,l=O.lng),(!1===_||O.lng<_)&&(y=O,_=O.lng)}return h!==a?(P=d,T=m):(P=y,T=c),[].concat(this.buildConvexHull([P,T],o),this.buildConvexHull([T,P],o))}},L.MarkerCluster.include({getConvexHull:function(){var h,l,o=this.getAllChildMarkers(),a=[];for(l=o.length-1;l>=0;l--)h=o[l].getLatLng(),a.push(h);return L.QuickHull.getConvexHull(a)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var _,o=this.getAllChildMarkers(null,!0),l=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?_=this._group.options.spiderfyShapePositions(o.length,l):o.length>=this._circleSpiralSwitchover?_=this._generatePointsSpiral(o.length,l):(l.y+=10,_=this._generatePointsCircle(o.length,l)),this._animationSpiderfy(o,_)}},unspiderfy:function(o){this._group._inZoomAnimation||(this._animationUnspiderfy(o),this._group._spiderfied=null)},_generatePointsCircle:function(o,a){var d,c,l=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+o)/this._2PI,_=this._2PI/o,m=[];for(l=Math.max(l,35),m.length=o,d=0;d=0;y--)y=0;m--)h.removeLayer(_=l[m]),_._preSpiderfyLatlng&&(_.setLatLng(_._preSpiderfyLatlng),delete _._preSpiderfyLatlng),_.setZIndexOffset&&_.setZIndexOffset(0),_._spiderLeg&&(a.removeLayer(_._spiderLeg),delete _._spiderLeg);o.fire("unspiderfied",{cluster:this,markers:l}),o._ignoreMove=!1,o._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(o,a){var d,c,y,T,h=this._group,l=h._map,_=h._featureGroup,m=this._group.options.spiderLegPolylineOptions;for(h._ignoreMove=!0,d=0;d=0;W--)b=_.layerPointToLatLng(a[W]),(O=o[W])._preSpiderfyLatlng=O._latlng,O.setLatLng(b),O.clusterShow&&O.clusterShow(),y&&((g=(k=O._spiderLeg)._path).style.strokeDashoffset=0,k.setStyle({opacity:P}));this.setOpacity(.3),l._ignoreMove=!1,setTimeout(function(){l._animationEnd(),l.fire("spiderfied",{cluster:h,markers:o})},200)},_animationUnspiderfy:function(o){var y,T,P,W,O,k,a=this,h=this._group,l=h._map,_=h._featureGroup,m=o?l._latLngToNewLayerPoint(this._latlng,o.zoom,o.center):l.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(null,!0),c=L.Path.SVG;for(h._ignoreMove=!0,h._animationStart(),this.setOpacity(1),T=d.length-1;T>=0;T--)(y=d[T])._preSpiderfyLatlng&&(y.closePopup(),y.setLatLng(y._preSpiderfyLatlng),delete y._preSpiderfyLatlng,k=!0,y._setPos&&(y._setPos(m),k=!1),y.clusterHide&&(y.clusterHide(),k=!1),k&&_.removeLayer(y),c&&(O=(W=(P=y._spiderLeg)._path).getTotalLength()+.1,W.style.strokeDashoffset=O,P.setStyle({opacity:0})));h._ignoreMove=!1,setTimeout(function(){var g=0;for(T=d.length-1;T>=0;T--)(y=d[T])._spiderLeg&&g++;for(T=d.length-1;T>=0;T--)(y=d[T])._spiderLeg&&(y.clusterShow&&y.clusterShow(),y.setZIndexOffset&&y.setZIndexOffset(0),g>1&&_.removeLayer(y),l.removeLayer(y._spiderLeg),delete y._spiderLeg);h._animationEnd(),h.fire("unspiderfied",{cluster:a,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(o){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(o))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(o){this._spiderfied&&this._spiderfied.unspiderfy(o)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(o){o._spiderLeg&&(this._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow(),o.setZIndexOffset&&o.setZIndexOffset(0),this._map.removeLayer(o._spiderLeg),delete o._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(o){return o?o instanceof L.MarkerClusterGroup?o=o._topClusterLevel.getAllChildMarkers():o instanceof L.LayerGroup?o=o._layers:o instanceof L.MarkerCluster?o=o.getAllChildMarkers():o instanceof L.Marker&&(o=[o]):o=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(o),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(o),this},_flagParentsIconsNeedUpdate:function(o){var a,h;for(a in o)for(h=o[a].__parent;h;)h._iconNeedsUpdate=!0,h=h.__parent},_refreshSingleMarkerModeMarkers:function(o){var a,h;for(a in o)this.hasLayer(h=o[a])&&h.setIcon(this._overrideMarkerIcon(h))}}),L.Marker.include({refreshIconOptions:function(o,a){var h=this.options.icon;return L.setOptions(h,o),this.setIcon(h),a&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),v.MarkerClusterGroup=A,v.MarkerCluster=I,Object.defineProperty(v,"__esModule",{value:!0})}(dt)},8244:function(At,dt){!function(v){"use strict";function I(t){var e,i,n,s;for(i=1,n=arguments.length;i"u")&&L&&L.Mixin){t=g(t)?t:[t];for(var e=0;e0?Math.floor(t):Math.ceil(t)};function Z(t,e,i){return t instanceof z?t:g(t)?new z(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new z(t.x,t.y):new z(t,e,i)}function X(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=ht(t);var e=this.min,i=this.max,n=t.min,s=t.max;return s.x>=e.x&&n.x<=i.x&&s.y>=e.y&&n.y<=i.y},overlaps:function(t){t=ht(t);var e=this.min,i=this.max,n=t.min,s=t.max;return s.x>e.x&&n.xe.y&&n.y=e.lat&&s.lat<=i.lat&&n.lng>=e.lng&&s.lng<=i.lng},intersects:function(t){t=it(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast();return s.lat>=e.lat&&n.lat<=i.lat&&s.lng>=e.lng&&n.lng<=i.lng},overlaps:function(t){t=it(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast();return s.lat>e.lat&&n.late.lng&&n.lng1,En=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",d,e),window.removeEventListener("testPassiveEventSupport",d,e)}catch{}return t}(),Bn=!!document.createElement("canvas").getContext,De=!(!document.createElementNS||!hi("svg").createSVGRect),zn=!!De&&function(){var t=document.createElement("div");return t.innerHTML="","http://www.w3.org/2000/svg"===(t.firstChild&&t.firstChild.namespaceURI)}(),Dn=!De&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch{return!1}}();function Lt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var E={ie:he,ielt9:yn,edge:ui,webkit:Ee,android:ci,android23:di,androidStock:wn,opera:Be,chrome:fi,gecko:_i,safari:Pn,phantom:pi,opera12:mi,win:Cn,ie3d:gi,webkit3d:ze,gecko3d:vi,any3d:xn,mobile:Xt,mobileWebkit:bn,mobileWebkit3d:Mn,msPointer:yi,pointer:Li,touch:Tn,touchNative:wi,mobileOpera:kn,mobileGecko:On,retina:Sn,passiveEvents:En,canvas:Bn,svg:De,vml:Dn,inlineSvg:zn,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Pi=E.msPointer?"MSPointerDown":"pointerdown",Ci=E.msPointer?"MSPointerMove":"pointermove",xi=E.msPointer?"MSPointerUp":"pointerup",bi=E.msPointer?"MSPointerCancel":"pointercancel",Ie={touchstart:Pi,touchmove:Ci,touchend:xi,touchcancel:bi},Mi={touchstart:function Gn(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&at(e),le(t,e)},touchmove:le,touchend:le,touchcancel:le},Nt={},Ti=!1;function An(t,e,i){return"touchstart"===e&&function Un(){Ti||(document.addEventListener(Pi,Nn,!0),document.addEventListener(Ci,Fn,!0),document.addEventListener(xi,ki,!0),document.addEventListener(bi,ki,!0),Ti=!0)}(),Mi[e]?(i=Mi[e].bind(this,i),t.addEventListener(Ie[e],i,!1),i):(console.warn("wrong event specified:",e),d)}function Nn(t){Nt[t.pointerId]=t}function Fn(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function ki(t){delete Nt[t.pointerId]}function le(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Nt)e.touches.push(Nt[i]);e.changedTouches=[e],t(e)}}var Wn=200;var Jt,Qt,Ne,fe,Ge,Ze=de(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Yt=de(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Oi="webkitTransition"===Yt||"OTransition"===Yt?Yt+"End":"transitionend";function Si(t){return"string"==typeof t?document.getElementById(t):t}function $t(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function V(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function J(t){var e=t.parentNode;e&&e.removeChild(t)}function ue(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Ft(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function Ut(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Ae(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=ce(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function N(t,e){if(void 0!==t.classList)for(var i=T(e),n=0,s=i.length;n0?2*window.devicePixelRatio:1;function Ii(t){return E.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Xn:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function Xe(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch{return!1}return i!==t}var Yn={__proto__:null,on:R,off:K,stopPropagation:Dt,disableScrollPropagation:qe,disableClickPropagation:ee,preventDefault:at,stop:It,getPropagationPath:zi,getMousePosition:Di,getWheelDelta:Ii,isExternalTarget:Xe,addListener:R,removeListener:K},Zi=$.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=zt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,it(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=Z((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=Z(e.paddingBottomRight||e.padding||[0,0]),s=this.project(this.getCenter()),r=this.project(t),u=this.getPixelBounds(),f=ht([u.min.add(i),u.max.subtract(n)]),p=f.getSize();if(!f.contains(r)){this._enforcingBounds=!0;var w=r.subtract(f.getCenter()),M=f.extend(r).getSize().subtract(p);s.x+=w.x<0?-M.x:M.x,s.y+=w.y<0?-M.y:M.y,this.panTo(this.unproject(s),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=I({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),r=n.subtract(s);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=I({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=a(this._handleGeolocationResponse,this),i=a(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var n=new j(t.coords.latitude,t.coords.longitude),s=n.toBounds(2*t.coords.accuracy),r=this._locateOptions;if(r.setView){var u=this.getBoundsZoom(s);this.setView(n,r.maxZoom?Math.min(u,r.maxZoom):u)}var f={latlng:n,bounds:s,timestamp:t.timestamp};for(var p in t.coords)"number"==typeof t.coords[p]&&(f[p]=t.coords[p]);this.fire("locationfound",f)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.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{this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),J(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(U(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)J(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=V("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new ut(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=it(t),i=Z(i||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),r=this.getMaxZoom(),u=t.getNorthWest(),f=t.getSouthEast(),p=this.getSize().subtract(i),w=ht(this.project(f,n),this.project(u,n)).getSize(),M=E.any3d?this.options.zoomSnap:1,D=p.x/w.x,F=p.y/w.y,lt=e?Math.max(D,F):Math.min(D,F);return n=this.getScaleZoom(lt,n),M&&(n=Math.round(n/(M/100))*(M/100),n=e?Math.ceil(n/M)*M:Math.floor(n/M)*M),Math.max(s,Math.min(r,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new X(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs,n=i.zoom(t*i.scale(e=void 0===e?this._zoom:e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(G(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(Z(t),e)},layerPointToLatLng:function(t){var e=Z(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(G(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(G(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(it(t))},distance:function(t,e){return this.options.crs.distance(G(t),G(e))},containerPointToLayerPoint:function(t){return Z(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return Z(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(Z(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(G(t)))},mouseEventToContainerPoint:function(t){return Di(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=Si(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");R(e,"scroll",this._onScroll,this),this._containerId=l(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&E.any3d,N(t,"leaflet-container"+(E.touch?" leaflet-touch":"")+(E.retina?" leaflet-retina":"")+(E.ielt9?" leaflet-oldie":"")+(E.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=$t(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),nt(this._mapPane,new z(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(N(t.markerPane,"leaflet-zoom-hide"),N(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){nt(this._mapPane,new z(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var s=this._zoom!==e;this._moveStart(s,i)._move(t,e)._moveEnd(s),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var s=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((s||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return U(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){nt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[l(this._container)]=this;var e=t?K:R;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),E.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){U(this._resizeRequest),this._resizeRequest=C(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],s="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,u=!1;r;){if((n=this._targets[l(r)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){u=!0;break}if(n&&n.listens(e,!0)&&(s&&!Xe(r,t)||(i.push(n),s))||r===this._container)break;r=r.parentNode}return!i.length&&!u&&!s&&this.listens(e,!0)&&(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&He(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var n=I({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}var s=this._findEventTargets(t,e);if(i){for(var r=[],u=0;u0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=E.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){tt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=V("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=Ze,n=this._proxy.style[i];Bt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){J(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Bt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(s)||(C(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,N(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&tt(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))}});var gt=Q.extend({options:{position:"topright"},initialize:function(t){P(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return N(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(J(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),ie=function(t){return new gt(t)};H.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=V("div",e+"control-container",this._container);function n(s,r){t[s+r]=V("div",e+s+" "+e+r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)J(this._controlCorners[t]);J(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ai=gt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1)?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(l(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var n,e=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((n=document.createElement("input")).type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=i):n=this._createRadioElement("leaflet-base-layers_"+l(this),i),this._layerControlInputs.push(n),n.layerId=l(t.layer),R(n,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var r=document.createElement("span");return e.appendChild(r),r.appendChild(n),r.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var e,i,t=this._layerControlInputs,n=[],s=[];this._handlingClick=!0;for(var r=t.length-1;r>=0;r--)i=this._getLayer((e=t[r]).layerId).layer,e.checked?n.push(i):e.checked||s.push(i);for(r=0;r=0;s--)i=this._getLayer((e=t[s]).layerId).layer,e.disabled=void 0!==i.options.minZoom&&ni.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,R(t,"click",at),this.expand();var e=this;setTimeout(function(){K(t,"click",at),e._preventClick=!1})}}),Ye=gt.extend({options:{position:"topleft",zoomInText:'+',zoomInTitle:"Zoom in",zoomOutText:'−',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=V("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,s){var r=V("a",i,n);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),ee(r),R(r,"click",It),R(r,"click",s,this),R(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";tt(this._zoomInButton,e),tt(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(N(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(N(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});H.mergeOptions({zoomControl:!0}),H.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ye,this.addControl(this.zoomControl))});var Ri=gt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=V("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=V("div",e,i)),t.imperial&&(this._iScale=V("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var i,n,s,e=3.2808399*t;e>5280?(n=this._getRoundNum(i=e/5280),this._updateScale(this._iScale,n+" mi",n/i)):(s=this._getRoundNum(e),this._updateScale(this._iScale,s+" ft",s/e))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),$e=gt.extend({options:{position:"bottomright",prefix:''+(E.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){P(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=V("div","leaflet-control-attribution"),ee(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' | ')}}});H.mergeOptions({attributionControl:!0}),H.addInitHook(function(){this.options.attributionControl&&(new $e).addTo(this)});gt.Layers=Ai,gt.Zoom=Ye,gt.Scale=Ri,gt.Attribution=$e,ie.layers=function(t,e,i){return new Ai(t,e,i)},ie.zoom=function(t){return new Ye(t)},ie.scale=function(t){return new Ri(t)},ie.attribution=function(t){return new $e(t)};var Pt=Q.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Pt.addTo=function(t,e){return t.addHandler(e,this),this};var ns={Events:Y},Ni=E.touch?"touchstart mousedown":"mousedown",St=$.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){P(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(R(this._dragStartTarget,Ni,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(St._dragging===this&&this.finishDrag(!0),K(this._dragStartTarget,Ni,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Ae(this._element,"leaflet-zoom-anim"))){if(t.touches&&1!==t.touches.length)return void(St._dragging===this&&this.finishDrag());if(!(St._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(St._dragging=this,this._preventOutline&&He(this._element),Fe(),Jt(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=Ei(this._element);this._startPoint=new z(e.clientX,e.clientY),this._startPos=zt(this._element),this._parentScale=We(i);var n="mousedown"===t.type;R(document,n?"mousemove":"touchmove",this._onMove,this),R(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1)return void(this._moved=!0);var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new z(e.clientX,e.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)e&&(i.push(t[n]),s=n);return sr&&(u=f,r=p);r>i&&(e[u]=1,Qe(t,e,i,n,u),Qe(t,e,i,u,s))}function Vi(t,e,i,n,s){var f,p,w,r=n?Wi:Zt(t,i),u=Zt(e,i);for(Wi=u;;){if(!(r|u))return[t,e];if(r&u)return!1;w=Zt(p=pe(t,e,f=r||u,i,s),i),f===r?(t=p,r=w):(e=p,u=w)}}function pe(t,e,i,n,s){var w,M,r=e.x-t.x,u=e.y-t.y,f=n.min,p=n.max;return 8&i?(w=t.x+r*(p.y-t.y)/u,M=p.y):4&i?(w=t.x+r*(f.y-t.y)/u,M=f.y):2&i?(w=p.x,M=t.y+u*(p.x-t.x)/r):1&i&&(w=f.x,M=t.y+u*(f.x-t.x)/r),new z(w,M,s)}function Zt(t,e){var i=0;return t.xe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function hs(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function ne(t,e,i,n){var w,s=e.x,r=e.y,u=i.x-s,f=i.y-r,p=u*u+f*f;return p>0&&((w=((t.x-s)*u+(t.y-r)*f)/p)>1?(s=i.x,r=i.y):w>0&&(s+=u*w,r+=f*w)),u=t.x-s,f=t.y-r,n?u*u+f*f:new z(s,r)}function pt(t){return!g(t[0])||"object"!=typeof t[0][0]&&typeof t[0][0]<"u"}function ji(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),pt(t)}function Ki(t,e){var i,n,s,r,u,f,p,w;if(!t||0===t.length)throw new Error("latlngs not passed");pt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var M=G([0,0]),D=it(t);D.getNorthWest().distanceTo(D.getSouthWest())*D.getNorthEast().distanceTo(D.getNorthWest())<1700&&(M=Je(t));var lt=t.length,ot=[];for(i=0;in){w=[f.x-(p=(r-n)/s)*(f.x-u.x),f.y-p*(f.y-u.y)];break}var ct=e.unproject(Z(w));return G([ct.lat+M.lat,ct.lng+M.lng])}var ls={__proto__:null,simplify:Gi,pointToSegmentDistance:Hi,closestPointOnSegment:function os(t,e,i){return ne(t,e,i)},clipSegment:Vi,_getEdgeIntersection:pe,_getBitCode:Zt,_sqClosestPointOnSegment:ne,isFlat:pt,_flat:ji,polylineCenter:Ki},ti={project:function(t){return new z(t.lng,t.lat)},unproject:function(t){return new j(t.y,t.x)},bounds:new X([-180,-90],[180,90])},ei={R:6378137,R_MINOR:6356752.314245179,bounds:new X([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,s=this.R_MINOR/i,r=Math.sqrt(1-s*s),u=r*Math.sin(n),f=Math.tan(Math.PI/4-n/2)/Math.pow((1-u)/(1+u),r/2);return n=-i*Math.log(Math.max(f,1e-10)),new z(t.lng*e*i,n)},unproject:function(t){for(var w,e=180/Math.PI,i=this.R,n=this.R_MINOR/i,s=Math.sqrt(1-n*n),r=Math.exp(-t.y/i),u=Math.PI/2-2*Math.atan(r),f=0,p=.1;f<15&&Math.abs(p)>1e-7;f++)w=s*Math.sin(u),w=Math.pow((1-w)/(1+w),s/2),u+=p=Math.PI/2-2*Math.atan(r*w)-u;return new j(u*e,t.x*e/i)}},us={__proto__:null,LonLat:ti,Mercator:ei,SphericalMercator:Te},cs=I({},Ot,{code:"EPSG:3395",projection:ei,transformation:function(){var t=.5/(Math.PI*ei.R);return qt(t,.5,-t,.5)}()}),qi=I({},Ot,{code:"EPSG:4326",projection:ti,transformation:qt(1/180,1,-1/180,.5)}),ds=I({},xt,{projection:ti,transformation:qt(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});xt.Earth=Ot,xt.EPSG3395=cs,xt.EPSG3857=Oe,xt.EPSG900913=vn,xt.EPSG4326=qi,xt.Simple=ds;var vt=$.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[l(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[l(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});H.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=l(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=l(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return l(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?g(t)?t:[t]:[]).length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()=2&&e[0]instanceof j&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){Mt.prototype._setLatLngs.call(this,t),pt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return pt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new z(e,e);if(t=new X(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip)return void(this._parts=this._rings);for(var r,n=0,s=this._rings.length;nt.y!=(s=i[f]).y>t.y&&t.x<(s.x-n.x)*(t.y-n.y)/(s.y-n.y)+n.x&&(e=!e);return e||Mt.prototype._containsPoint.call(this,t,!0)}});var Tt=bt.extend({initialize:function(t,e){P(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var i,n,s,e=g(t)?t:t.features;if(e){for(i=0,n=e.length;i0&&s.push(s[0].slice()),s}function Vt(t,e){return t.feature?I({},t.feature,{geometry:e}):we(e)}function we(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var oi={toGeoJSON:function(t){return Vt(this,{type:"Point",coordinates:si(this.getLatLng(),t)})}};function $i(t,e){return new Tt(t,e)}me.include(oi),ii.include(oi),ge.include(oi),Mt.include({toGeoJSON:function(t){var e=!pt(this._latlngs);return Vt(this,{type:(e?"Multi":"")+"LineString",coordinates:Le(this._latlngs,e?1:0,!1,t)})}}),Wt.include({toGeoJSON:function(t){var e=!pt(this._latlngs),i=e&&!pt(this._latlngs[0]),n=Le(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Vt(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Gt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Vt(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer(function(s){if(s.toGeoJSON){var r=s.toGeoJSON(t);if(i)n.push(r.geometry);else{var u=we(r);"FeatureCollection"===u.type?n.push.apply(n,u.features):n.push(u)}}}),i?Vt(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var ws=$i,Pe=vt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=it(e),P(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(N(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){J(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&Ft(this._image),this},bringToBack:function(){return this._map&&Ut(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=it(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:V("img");N(e,"leaflet-image-layer"),this._zoomAnimated&&N(e,"leaflet-zoom-animated"),this.options.className&&N(e,this.options.className),e.onselectstart=d,e.onmousemove=d,e.onload=a(this.fire,this,"load"),e.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Bt(this._image,i,e)},_reset:function(){var t=this._image,e=new X(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();nt(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){_t(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&null!=this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Ji=Pe.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:V("video");if(N(e,"leaflet-image-layer"),this._zoomAnimated&&N(e,"leaflet-zoom-animated"),this.options.className&&N(e,this.options.className),e.onselectstart=d,e.onmousemove=d,e.onloadeddata=a(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],s=0;s0?n:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var r=0;r×',R(n,"click",function(s){at(s),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var s=this.options.maxHeight,r="leaflet-popup-scrolled";s&&t.offsetHeight>s?(e.height=s+"px",N(t,r)):tt(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();nt(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)return void(this._autopanning=!1);var t=this._map,e=parseInt($t(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,s=new z(this._containerLeft,-i-this._containerBottom);s._add(zt(this._container));var r=t.layerPointToContainerPoint(s),u=Z(this.options.autoPanPadding),f=Z(this.options.autoPanPaddingTopLeft||u),p=Z(this.options.autoPanPaddingBottomRight||u),w=t.getSize(),M=0,D=0;r.x+n+p.x>w.x&&(M=r.x+n-w.x+p.x),r.x-M-f.x<0&&(M=r.x-f.x),r.y+i+p.y>w.y&&(D=r.y+i-w.y+p.y),r.y-D-f.y<0&&(D=r.y-f.y),(M||D)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([M,D]))}},_getAnchor:function(){return Z(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});H.mergeOptions({closePopupOnClick:!0}),H.include({openPopup:function(t,e,i){return this._initOverlay(Ce,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),vt.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Ce,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof bt||(this._popup._source=this),this._popup._prepareOpen(t||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(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){It(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof Et))return void(this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng));this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var xe=Ct.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ct.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ct.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ct.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){this._contentNode=this._container=V("div","leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide")),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,s=this._container,r=n.latLngToContainerPoint(n.getCenter()),u=n.layerPointToContainerPoint(t),f=this.options.direction,p=s.offsetWidth,w=s.offsetHeight,M=Z(this.options.offset),D=this._getAnchor();"top"===f?(e=p/2,i=w):"bottom"===f?(e=p/2,i=0):"center"===f?(e=p/2,i=w/2):"right"===f?(e=0,i=w/2):"left"===f?(e=p,i=w/2):u.xthis.options.maxZoom||in&&this._retainParent(s,r,u,n))},_retainChildren:function(t,e,i,n){for(var s=2*t;s<2*t+2;s++)for(var r=2*e;r<2*e+2;r++){var u=new z(s,r);u.z=i+1;var f=this._tileCoordsToKey(u),p=this._tiles[f];p&&p.active?p.retain=!0:(p&&p.loaded&&(p.retain=!0),i+1this.options.maxZoom||void 0!==this.options.minZoom&&s1)return void this._setView(t,i);for(var D=s.min.y;D<=s.max.y;D++)for(var F=s.min.x;F<=s.max.x;F++){var lt=new z(F,D);if(lt.z=this._tileZoom,this._isValidTile(lt)){var ot=this._tiles[this._tileCoordsToKey(lt)];ot?ot.current=!0:u.push(lt)}}if(u.sort(function(ct,Kt){return ct.distanceTo(r)-Kt.distanceTo(r)}),0!==u.length){this._loading||(this._loading=!0,this.fire("loading"));var mt=document.createDocumentFragment();for(F=0;Fi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return it(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),s=n.add(i);return[e.unproject(n,t.z),e.unproject(s,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new ut(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new z(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(J(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){N(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=d,t.onmousemove=d,E.ielt9&&this.options.opacity<1&&_t(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&C(a(this._tileReady,this,t,null,s)),nt(s,i),this._tiles[n]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(_t(i.el,0),U(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(N(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),E.ielt9||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new z(this._wrapX?m(t.x,this._wrapX):t.x,this._wrapY?m(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new X(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var jt=oe.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=P(this,e)).detectRetina&&E.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return R(i,"load",a(this._tileOnLoad,this,e,i)),R(i,"error",a(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:E.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return k(this._url,I(e,this.options))},_tileOnLoad:function(t,e){E.ielt9?setTimeout(a(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom;return this.options.zoomReverse&&(t=this.options.maxZoom-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=d,e.onerror=d,!e.complete)){e.src=b;var i=this._tiles[t].coords;J(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",b),oe.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==b))return oe.prototype._tileReady.call(this,t,e,i)}});function en(t,e){return new jt(t,e)}var nn=jt.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=I({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);var s=(e=P(this,e)).detectRetina&&E.retina?2:1,r=this.getTileSize();i.width=r.x*s,i.height=r.y*s,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version),this.wmsParams[this._wmsVersion>=1.3?"crs":"srs"]=this._crs.code,jt.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=ht(i.project(e[0]),i.project(e[1])),s=n.min,r=n.max,u=(this._wmsVersion>=1.3&&this._crs===qi?[s.y,s.x,r.y,r.x]:[s.x,s.y,r.x,r.y]).join(","),f=jt.prototype.getTileUrl.call(this,t);return f+W(this.wmsParams,f,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+u},setParams:function(t,e){return I(this.wmsParams,t),e||this.redraw(),this}});jt.WMS=nn,en.wms=function Os(t,e){return new nn(t,e)};var kt=vt.extend({options:{padding:.1},initialize:function(t){P(this,t),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),N(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),r=n.multiplyBy(-i).add(s).subtract(this._map._getNewPixelOrigin(t,e));E.any3d?Bt(this._container,r,i):nt(this._container,r)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new X(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sn=kt.extend({options:{tolerance:0},getEvents:function(){var t=kt.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){kt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");R(t,"mousemove",this._onMouseMove,this),R(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),R(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){U(this._redrawRequest),delete this._ctx,J(this._container),K(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(){if(!this._map._animatingZoom||!this._bounds){kt.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=E.retina?2:1;nt(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",E.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){kt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[l(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[l(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var n,s,e=t.options.dashArray.split(/[, ]+/),i=[];for(s=0;s')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Ss={_initContainer:function(){this._container=V("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(kt.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=re("shape");N(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=re("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[l(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;J(e),t.removeInteractiveTarget(e),delete this._layers[l(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(e||(e=t._stroke=re("stroke")),s.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,e.dashStyle=n.dashArray?g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):"",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(s.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=re("fill")),s.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(s.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Ft(t._container)},_bringToBack:function(t){Ut(t._container)}},be=E.vml?re:hi,ae=kt.extend({_initContainer:function(){this._container=be("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=be("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){J(this._container),K(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){kt.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),nt(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=be("path");t.options.className&&N(e,t.options.className),t.options.interactive&&N(e,"leaflet-interactive"),this._updateStyle(t),this._layers[l(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){J(t._path),t.removeInteractiveTarget(t._path),delete this._layers[l(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,li(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),s="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",r=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+s+2*i+",0 "+s+2*-i+",0 ";this._setPath(t,r)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Ft(t._path)},_bringToBack:function(t){Ut(t._path)}});function rn(t){return E.svg||E.vml?new ae(t):null}E.vml&&ae.include(Ss),H.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&on(t)||rn(t)}});var an=Wt.extend({initialize:function(t,e){Wt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=it(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});ae.create=be,ae.pointsToPath=li,Tt.geometryToLayer=ve,Tt.coordsToLatLng=ni,Tt.coordsToLatLngs=ye,Tt.latLngToCoords=si,Tt.latLngsToCoords=Le,Tt.getFeature=Vt,Tt.asFeature=we,H.mergeOptions({boxZoom:!0});var hn=Pt.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){R(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){K(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){J(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Jt(),Fe(),this._startPoint=this._map.mouseEventToContainerPoint(t),R(document,{contextmenu:It,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=V("div","leaflet-zoom-box",this._container),N(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new X(this._point,this._startPoint),i=e.getSize();nt(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(J(this._box),tt(this._container,"leaflet-crosshair")),Qt(),Ue(),K(document,{contextmenu:It,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var e=new ut(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});H.addInitHook("addHandler","boxZoom",hn),H.mergeOptions({doubleClickZoom:!0});var ln=Pt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,s=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(s):e.setZoomAround(t.containerPoint,s)}});H.addInitHook("addHandler","doubleClickZoom",ln),H.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var un=Pt.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new St(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}N(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){tt(this._map._container,"leaflet-grab"),tt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=it(this._map.options.maxBounds);this._offsetLimit=ht(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,s=(n-e+i)%t+e-i,r=(n+e+i)%t-e-i,u=Math.abs(s+i)0?r:-r))-e;this._delta=0,this._startTime=null,u&&("center"===t.options.scrollWheelZoom?t.setZoom(e+u):t.setZoomAround(this._lastMousePos,e+u))}});H.addInitHook("addHandler","scrollWheelZoom",dn);H.mergeOptions({tapHold:E.touchNative&&E.safari&&E.mobile,tapTolerance:15});var fn=Pt.extend({addHooks:function(){R(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){K(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new z(e.clientX,e.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(R(document,"touchend",at),R(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),600),R(document,"touchend touchcancel contextmenu",this._cancel,this),R(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){K(document,"touchend",at),K(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),K(document,"touchend touchcancel contextmenu",this._cancel,this),K(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new z(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});H.addInitHook("addHandler","tapHold",fn),H.mergeOptions({touchZoom:E.touch,bounceAtZoomLimits:!0});var _n=Pt.extend({addHooks:function(){N(this._map._container,"leaflet-touch-zoom"),R(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){tt(this._map._container,"leaflet-touch-zoom"),K(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),R(document,"touchmove",this._onTouchMove,this),R(document,"touchend touchcancel",this._onTouchEnd,this),at(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),s=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),U(this._animRequest);var u=a(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=C(u,this,!0),at(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,U(this._animRequest),K(document,"touchmove",this._onTouchMove,this),K(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}});H.addInitHook("addHandler","touchZoom",_n),H.BoxZoom=hn,H.DoubleClickZoom=ln,H.Drag=un,H.Keyboard=cn,H.ScrollWheelZoom=dn,H.TapHold=fn,H.TouchZoom=_n,v.Bounds=X,v.Browser=E,v.CRS=xt,v.Canvas=sn,v.Circle=ii,v.CircleMarker=ge,v.Class=Q,v.Control=gt,v.DivIcon=tn,v.DivOverlay=Ct,v.DomEvent=Yn,v.DomUtil=qn,v.Draggable=St,v.Evented=$,v.FeatureGroup=bt,v.GeoJSON=Tt,v.GridLayer=oe,v.Handler=Pt,v.Icon=Ht,v.ImageOverlay=Pe,v.LatLng=j,v.LatLngBounds=ut,v.Layer=vt,v.LayerGroup=Gt,v.LineUtil=ls,v.Map=H,v.Marker=me,v.Mixin=ns,v.Path=Et,v.Point=z,v.PolyUtil=ss,v.Polygon=Wt,v.Polyline=Mt,v.Popup=Ce,v.PosAnimation=Zi,v.Projection=us,v.Rectangle=an,v.Renderer=kt,v.SVG=ae,v.SVGOverlay=Qi,v.TileLayer=jt,v.Tooltip=xe,v.Transformation=ke,v.Util=q,v.VideoOverlay=Ji,v.bind=a,v.bounds=ht,v.canvas=on,v.circle=function vs(t,e,i){return new ii(t,e,i)},v.circleMarker=function gs(t,e){return new ge(t,e)},v.control=ie,v.divIcon=function Ts(t){return new tn(t)},v.extend=I,v.featureGroup=function(t,e){return new bt(t,e)},v.geoJSON=$i,v.geoJson=ws,v.gridLayer=function ks(t){return new oe(t)},v.icon=function ps(t){return new Ht(t)},v.imageOverlay=function(t,e,i){return new Pe(t,e,i)},v.latLng=G,v.latLngBounds=it,v.layerGroup=function(t,e){return new Gt(t,e)},v.map=function $n(t,e){return new H(t,e)},v.marker=function ms(t,e){return new me(t,e)},v.point=Z,v.polygon=function Ls(t,e){return new Wt(t,e)},v.polyline=function ys(t,e){return new Mt(t,e)},v.popup=function(t,e){return new Ce(t,e)},v.rectangle=function Es(t,e){return new an(t,e)},v.setOptions=P,v.stamp=l,v.svg=rn,v.svgOverlay=function xs(t,e,i){return new Qi(t,e,i)},v.tileLayer=en,v.tooltip=function(t,e){return new xe(t,e)},v.transformation=qt,v.version="1.9.4",v.videoOverlay=function Cs(t,e,i){return new Ji(t,e,i)};var zs=window.L;v.noConflict=function(){return window.L=zs,this},window.L=v}(dt)},5946:(At,dt,v)=>{"use strict";v.d(dt,{V1:()=>a,gI:()=>P});var A=v(8699),I=v(8244);class o{static mapToArray(k){const g=[];for(const S in k)k.hasOwnProperty(S)&&g.push(k[S]);return g}static handleEvent(k,g,S){0{g.emit(S)})}}let a=(()=>{class O{constructor(g,S){this.element=g,this.zone=S,this.DEFAULT_ZOOM=1,this.DEFAULT_CENTER=(0,I.latLng)(38.907192,-77.036871),this.DEFAULT_FPZ_OPTIONS={},this.fitBoundsOptions=this.DEFAULT_FPZ_OPTIONS,this.panOptions=this.DEFAULT_FPZ_OPTIONS,this.zoomOptions=this.DEFAULT_FPZ_OPTIONS,this.zoomPanOptions=this.DEFAULT_FPZ_OPTIONS,this.options={},this.mapReady=new A.bkB,this.zoomChange=new A.bkB,this.centerChange=new A.bkB,this.onClick=new A.bkB,this.onDoubleClick=new A.bkB,this.onMouseDown=new A.bkB,this.onMouseUp=new A.bkB,this.onMouseMove=new A.bkB,this.onMouseOver=new A.bkB,this.onMouseOut=new A.bkB,this.onMapMove=new A.bkB,this.onMapMoveStart=new A.bkB,this.onMapMoveEnd=new A.bkB,this.onMapZoom=new A.bkB,this.onMapZoomStart=new A.bkB,this.onMapZoomEnd=new A.bkB}ngOnInit(){this.zone.runOutsideAngular(()=>{this.map=(0,I.map)(this.element.nativeElement,this.options),this.addMapEventListeners()}),null!=this.center&&null!=this.zoom&&this.setView(this.center,this.zoom),null!=this.fitBounds&&this.setFitBounds(this.fitBounds),null!=this.maxBounds&&this.setMaxBounds(this.maxBounds),null!=this.minZoom&&this.setMinZoom(this.minZoom),null!=this.maxZoom&&this.setMaxZoom(this.maxZoom),this.doResize(),this.mapReady.emit(this.map)}ngOnChanges(g){g.zoom&&g.center&&null!=this.zoom&&null!=this.center?this.setView(g.center.currentValue,g.zoom.currentValue):g.zoom?this.setZoom(g.zoom.currentValue):g.center&&this.setCenter(g.center.currentValue),g.fitBounds&&this.setFitBounds(g.fitBounds.currentValue),g.maxBounds&&this.setMaxBounds(g.maxBounds.currentValue),g.minZoom&&this.setMinZoom(g.minZoom.currentValue),g.maxZoom&&this.setMaxZoom(g.maxZoom.currentValue)}ngOnDestroy(){null!=this.map&&this.map.remove()}getMap(){return this.map}onResize(){this.delayResize()}addMapEventListeners(){const g=(b,et)=>{this.map.on(b,et)};g("click",b=>o.handleEvent(this.zone,this.onClick,b)),g("dblclick",b=>o.handleEvent(this.zone,this.onDoubleClick,b)),g("mousedown",b=>o.handleEvent(this.zone,this.onMouseDown,b)),g("mouseup",b=>o.handleEvent(this.zone,this.onMouseUp,b)),g("mouseover",b=>o.handleEvent(this.zone,this.onMouseOver,b)),g("mouseout",b=>o.handleEvent(this.zone,this.onMouseOut,b)),g("mousemove",b=>o.handleEvent(this.zone,this.onMouseMove,b)),g("zoomstart",b=>o.handleEvent(this.zone,this.onMapZoomStart,b)),g("zoom",b=>o.handleEvent(this.zone,this.onMapZoom,b)),g("zoomend",b=>o.handleEvent(this.zone,this.onMapZoomEnd,b)),g("movestart",b=>o.handleEvent(this.zone,this.onMapMoveStart,b)),g("move",b=>o.handleEvent(this.zone,this.onMapMove,b)),g("moveend",b=>o.handleEvent(this.zone,this.onMapMoveEnd,b));const S=()=>{const b=this.map.getZoom();b!==this.zoom&&(this.zoom=b,o.handleEvent(this.zone,this.zoomChange,b));const et=this.map.getCenter();(null!=et||null!=this.center)&&((null==et||null==this.center)&&et!==this.center||et.lat!==this.center.lat||et.lng!==this.center.lng)&&(this.center=et,o.handleEvent(this.zone,this.centerChange,et))};g("moveend",S),g("zoomend",S)}doResize(){this.zone.runOutsideAngular(()=>{null!=this.map&&this.map.invalidateSize({})})}delayResize(){null!=this.resizeTimer&&clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(this.doResize.bind(this),200)}setView(g,S){null!=this.map&&null!=g&&null!=S&&this.map.setView(g,S,this.zoomPanOptions)}setZoom(g){null!=this.map&&null!=g&&this.map.setZoom(g,this.zoomOptions)}setCenter(g){null!=this.map&&null!=g&&this.map.panTo(g,this.panOptions)}setFitBounds(g){null!=this.map&&null!=g&&this.map.fitBounds(g,this.fitBoundsOptions)}setMaxBounds(g){null!=this.map&&null!=g&&this.map.setMaxBounds(g)}setMinZoom(g){null!=this.map&&null!=g&&this.map.setMinZoom(g)}setMaxZoom(g){null!=this.map&&null!=g&&this.map.setMaxZoom(g)}static{this.\u0275fac=function(S){return new(S||O)(A.rXU(A.aKT),A.rXU(A.SKi))}}static{this.\u0275dir=A.FsC({type:O,selectors:[["","leaflet",""]],hostBindings:function(S,b){1&S&&A.bIt("resize",function(){return b.onResize()},!1,A.tSv)},inputs:{fitBoundsOptions:["leafletFitBoundsOptions","fitBoundsOptions"],panOptions:["leafletPanOptions","panOptions"],zoomOptions:["leafletZoomOptions","zoomOptions"],zoomPanOptions:["leafletZoomPanOptions","zoomPanOptions"],options:["leafletOptions","options"],zoom:["leafletZoom","zoom"],center:["leafletCenter","center"],fitBounds:["leafletFitBounds","fitBounds"],maxBounds:["leafletMaxBounds","maxBounds"],minZoom:["leafletMinZoom","minZoom"],maxZoom:["leafletMaxZoom","maxZoom"]},outputs:{mapReady:"leafletMapReady",zoomChange:"leafletZoomChange",centerChange:"leafletCenterChange",onClick:"leafletClick",onDoubleClick:"leafletDoubleClick",onMouseDown:"leafletMouseDown",onMouseUp:"leafletMouseUp",onMouseMove:"leafletMouseMove",onMouseOver:"leafletMouseOver",onMouseOut:"leafletMouseOut",onMapMove:"leafletMapMove",onMapMoveStart:"leafletMapMoveStart",onMapMoveEnd:"leafletMapMoveEnd",onMapZoom:"leafletMapZoom",onMapZoomStart:"leafletMapZoomStart",onMapZoomEnd:"leafletMapZoomEnd"},features:[A.OA$]})}}return O})(),P=(()=>{class O{static{this.\u0275fac=function(S){return new(S||O)}}static{this.\u0275mod=A.$C({type:O})}static{this.\u0275inj=A.G2t({})}}return O})()}}]);