!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"6c5c4a21a2e48a657cc46560f5c18b469ebbf32c"};var o=(new e.Error).stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="78e0416e-43f0-4d10-a63e-2da077f98695",e._sentryDebugIdIdentifier="sentry-dbid-78e0416e-43f0-4d10-a63e-2da077f98695")}catch(e){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[5325],{65325(e,o,t){t.r(o),t.d(o,{default:()=>C});var i=t(96540),n=t(32977),l=t(44245),r=t(78366),s=t(882),a=t(22337),d=t(66188),c=t(99728),g=t(53450),p=t(25059),h=t(74848);const f=(0,s.styled)(n.Button).withConfig({displayName:"mapControls__MapButton",componentId:"sc-1vmpoog-0"})(["&&&{background:",";color:",";box-shadow:0 1px 4px rgba(0,0,0,0.2);white-space:nowrap;.button-icon{fill:",";}}"],e=>{let{active:o}=e;return o?(0,n.getRgbColor)("primary",.9):(0,n.getRgbColor)("bright",.92)},e=>{let{active:o}=e;return o?(0,n.getColor)("bright"):(0,n.getColor)("text")},e=>{let{active:o}=e;return o?(0,n.getColor)("bright"):(0,n.getColor)("text")}),b=(0,s.styled)(n.IconButton).attrs({padding:[0]}).withConfig({displayName:"mapControls__MapIconButton",componentId:"sc-1vmpoog-1"})(["&&&{background:",";color:",";box-shadow:0 1px 4px rgba(0,0,0,0.2);width:24px;height:24px;}"],(0,n.getRgbColor)("bright",.92),(0,n.getColor)("textLite")),x=e=>{let{onToggleTraffic:o,provider:t,setProvider:l,setGoogleApiKey:r,canEdit:s}=e;const[x,u]=(0,i.useState)(!1),w=(0,c.JT)("space:UpdateSettings");return(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(n.Flex,{position:"absolute",alignItems:"center",gap:2,style:{top:10,right:10,zIndex:5},children:[t===g.mK.google&&(0,h.jsx)(f,{flavour:"borderless",small:!0,onClick:o,"aria-label":"Toggle traffic layer",children:(0,h.jsxs)(n.Flex,{alignItems:"center",gap:1,children:[(0,h.jsx)(a.gc,{icon:d.zC5,size:"sm"}),(0,h.jsx)("span",{children:"Traffic"})]})}),w&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(b,{icon:"gear",onClick:()=>u(e=>!e),flavour:"borderless",tooltip:"Map settings"}),x&&(0,h.jsx)(p.A,{onClose:()=>u(!1),provider:t,setProvider:l,setGoogleApiKey:r})]})]})})};var u=t(7960);const w=(0,u.A)(()=>Promise.all([t.e(2882),t.e(4550),t.e(6839)]).then(t.bind(t,76839)),"GoogleMapView"),m=(0,u.A)(()=>Promise.all([t.e(2492),t.e(2882),t.e(4795),t.e(2747)]).then(t.bind(t,92747)),"MapLibreView"),C=()=>{const{isGoogle:e,handleNodeClick:o,viewport:t,setViewport:s,showTraffic:a,links:d,settingsProps:c}=(0,r.A)();return(0,l.ZB)({title:"Geo Map",id:"geo-map",destination:"geo-map",type:"geomap",icon:"node_hollow",tooltip:{title:"Geo Map",description:"Visualize node locations on an interactive map"}}),(0,h.jsx)(n.Flex,{column:!0,flex:!0,overflow:"hidden",height:"100%",children:(0,h.jsxs)(n.Flex,{flex:!0,position:"relative",overflow:"hidden",children:[(0,h.jsx)(x,{...c}),(0,h.jsx)(i.Suspense,{fallback:(0,h.jsx)(n.Flex,{justifyContent:"center",alignItems:"center",height:"100%",children:(0,h.jsx)(n.Text,{color:"textLite",children:"Loading map..."})}),children:e?(0,h.jsx)(w,{onNodeClick:o,showTraffic:a,savedViewport:t,onViewportChange:s,links:d}):(0,h.jsx)(m,{onNodeClick:o,savedViewport:t,onViewportChange:s,links:d})})]})})}}}]);