exports.id=940,exports.ids=[940],exports.modules={9940:(t,r,a)=>{"use strict";a.r(r),a.d(r,{default:()=>c});var e=a(8732),o=a(7085),n=a.n(o),s=a(82015),i=a(95165),l=a.n(i);a(98088),delete l().Icon.Default.prototype._getIconUrl,l().Icon.Default.mergeOptions({iconRetinaUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/images/marker-icon-2x.png",iconUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/images/marker-icon.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/images/marker-shadow.png"});let c=({mapData:t})=>{let r=(0,s.useRef)(null),a=(0,s.useRef)(null),[o,i]=(0,s.useState)(0),[c,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(!r.current||a.current)return;let e=l().map(r.current,{center:[t.metadata.center[1],t.metadata.center[0]],zoom:t.metadata.zoom,zoomControl:!0,attributionControl:!0});a.current=e;let o={Satellite:l().tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",{attribution:"Tiles &copy; Esri",maxZoom:19}),Terrain:l().tileLayer("https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",{attribution:"Map data: &copy; OpenStreetMap contributors",maxZoom:17}),Streets:l().tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"&copy; OpenStreetMap contributors",maxZoom:19}),Dark:l().tileLayer("https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png",{attribution:"&copy; Stadia Maps",maxZoom:20})};o["dark"===t.metadata.basemap?"Dark":"terrain"===t.metadata.basemap?"Terrain":"roadmap"===t.metadata.basemap?"Streets":"Satellite"].addTo(e);let n={};t.layers.forEach((t,r)=>{let a=l().tileLayer(t.tileUrl,{attribution:"Google Earth Engine",maxZoom:20,opacity:1});n[`EE: ${t.name}`]=a,a.addTo(e)}),l().control.layers(o,n,{position:"topright",collapsed:!1}).addTo(e),l().control.scale({position:"bottomright",metric:!0,imperial:!0}).addTo(e),new(l().Control.extend({options:{position:"topleft"},onAdd:function(){let a=l().DomUtil.create("div","leaflet-bar leaflet-control custom-controls"),o=l().DomUtil.create("a","control-button",a);o.innerHTML="⛶",o.title="Fullscreen",o.href="#",o.onclick=t=>{t.preventDefault(),document.fullscreenElement?document.exitFullscreen():r.current?.requestFullscreen()};let n=l().DomUtil.create("a","control-button",a);n.innerHTML="\uD83C\uDFE0",n.title="Reset View",n.href="#",n.onclick=r=>{r.preventDefault(),e.setView([t.metadata.center[1],t.metadata.center[0]],t.metadata.zoom)};let s=l().DomUtil.create("a","control-button",a);return s.innerHTML="ℹ️",s.title="Map Info",s.href="#",s.onclick=r=>{r.preventDefault();let a=e.getBounds(),o=e.getZoom();alert(`Region: ${t.region}
Zoom: ${o}
Bounds:
  North: ${a.getNorth().toFixed(4)}
  South: ${a.getSouth().toFixed(4)}
  East: ${a.getEast().toFixed(4)}
  West: ${a.getWest().toFixed(4)}`)},a}}))().addTo(e);let s=()=>{e.invalidateSize()};return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s),e.remove(),a.current=null}},[t]),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{ref:r,className:"jsx-f2583bd1913a80a0 map-container"}),t.layers.length>1&&c&&(0,e.jsxs)("div",{className:"jsx-f2583bd1913a80a0 layer-switcher",children:[(0,e.jsx)("h4",{className:"jsx-f2583bd1913a80a0",children:"Layers"}),t.layers.map((t,r)=>(0,e.jsxs)("label",{className:"jsx-f2583bd1913a80a0",children:[(0,e.jsx)("input",{type:"radio",name:"layer",checked:o===r,onChange:()=>{i(r),a.current&&a.current.eachLayer(t=>{t.options&&"Google Earth Engine"===t.options.attribution&&t.setOpacity(0)})},className:"jsx-f2583bd1913a80a0"}),t.name]},r))]}),(0,e.jsx)(n(),{id:"f2583bd1913a80a0",children:".map-container.jsx-f2583bd1913a80a0{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;flex:1;width:100%;height:-webkit-calc(100vh - 80px);height:-moz-calc(100vh - 80px);height:calc(100vh - 80px);position:relative}@-webkit-keyframes fadeIn{from{opacity:0;-webkit-transform:translatey(-20px);transform:translatey(-20px)}to{opacity:1;-webkit-transform:translatey(0);transform:translatey(0)}}@-moz-keyframes fadeIn{from{opacity:0;-moz-transform:translatey(-20px);transform:translatey(-20px)}to{opacity:1;-moz-transform:translatey(0);transform:translatey(0)}}@-o-keyframes fadeIn{from{opacity:0;-o-transform:translatey(-20px);transform:translatey(-20px)}to{opacity:1;-o-transform:translatey(0);transform:translatey(0)}}@keyframes fadeIn{from{opacity:0;-webkit-transform:translatey(-20px);-moz-transform:translatey(-20px);-o-transform:translatey(-20px);transform:translatey(-20px)}to{opacity:1;-webkit-transform:translatey(0);-moz-transform:translatey(0);-o-transform:translatey(0);transform:translatey(0)}}@-webkit-keyframes slideIn{from{opacity:0;-webkit-transform:translatex(20px);transform:translatex(20px)}to{opacity:1;-webkit-transform:translatex(0);transform:translatex(0)}}@-moz-keyframes slideIn{from{opacity:0;-moz-transform:translatex(20px);transform:translatex(20px)}to{opacity:1;-moz-transform:translatex(0);transform:translatex(0)}}@-o-keyframes slideIn{from{opacity:0;-o-transform:translatex(20px);transform:translatex(20px)}to{opacity:1;-o-transform:translatex(0);transform:translatex(0)}}@keyframes slideIn{from{opacity:0;-webkit-transform:translatex(20px);-moz-transform:translatex(20px);-o-transform:translatex(20px);transform:translatex(20px)}to{opacity:1;-webkit-transform:translatex(0);-moz-transform:translatex(0);-o-transform:translatex(0);transform:translatex(0)}}@-webkit-keyframes flicker{0%,100%{opacity:1}50%{opacity:.8}}@-moz-keyframes flicker{0%,100%{opacity:1}50%{opacity:.8}}@-o-keyframes flicker{0%,100%{opacity:1}50%{opacity:.8}}@keyframes flicker{0%,100%{opacity:1}50%{opacity:.8}}.layer-switcher.jsx-f2583bd1913a80a0{position:absolute;top:80px;right:20px;background:rgba(42,42,42,.95);padding:1rem;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);z-index:1001;min-width:150px}.layer-switcher.jsx-f2583bd1913a80a0 h4.jsx-f2583bd1913a80a0{margin:0 0 .5rem 0;color:#4CAF50;font-size:1rem}.layer-switcher.jsx-f2583bd1913a80a0 label.jsx-f2583bd1913a80a0{display:block;padding:.25rem 0;color:#ccc;cursor:pointer}.layer-switcher.jsx-f2583bd1913a80a0 input.jsx-f2583bd1913a80a0{margin-right:.5rem}.leaflet-control-layers{background:rgba(42,42,42,.95)!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid#444;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;color:#ccc}.leaflet-control-layers-base label,.leaflet-control-layers-overlays label{color:#ccc!important}.custom-controls{background:rgba(42,42,42,.95)!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid#444;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.control-button{display:block!important;width:30px!important;height:30px!important;line-height:30px!important;text-align:center!important;text-decoration:none!important;color:white!important;font-size:18px!important;background:transparent!important;border-bottom:1px solid#444!important}.control-button:last-child{border-bottom:none!important}.control-button:hover{background:rgba(76,175,80,.3)!important}.leaflet-control-scale{background:rgba(42,42,42,.95)!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid#444!important;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;color:#ccc!important}.leaflet-control-scale-line{background:transparent!important;color:#ccc!important;border-color:#666!important}"})]})}},98088:()=>{}};