!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"95b7c22eb8a2502481fe65c08f3bb8d7c317f943"};var o=(new e.Error).stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="1f067fde-1d6c-49e8-8692-8c1a1751b548",e._sentryDebugIdIdentifier="sentry-dbid-1f067fde-1d6c-49e8-8692-8c1a1751b548")}catch(e){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[8723],{78723(e,o,t){t.r(o),t.d(o,{default:()=>u});t(98992),t(54520),t(81454),t(25509),t(65223),t(60321),t(41927),t(11632),t(64377),t(66771),t(12516),t(68931),t(52514),t(35694),t(52774),t(49536),t(21926),t(94483),t(16215);var l=t(96540),n=t(11759),s=t(85660),a=t(23226),d=t(11820),r=t(76815),i=t(65131),c=t(74848);const u=(0,l.memo)(e=>{let{topologyGraph:o,topologyActorRows:t,topologyMeta:u,topologyEvidence:g,topologyTables:f,topologyOverlays:y,presentation:p,filterKey:h}=e;const b=(0,l.useMemo)(()=>(0,i.yH)(u),[u])||p,k=(0,l.useMemo)(()=>(0,i.XG)(u?.portBulletsByActor),[u]),[x,m]=(0,l.useState)(null),[I,C]=(0,l.useState)(""),[v,w]=(0,l.useState)(""),[M,E]=(0,l.useState)(null),[,L]=(0,a.A)(),[T,{height:S}]=(0,s.A)(),A=Math.max(300,S-8),_=(0,l.useCallback)(e=>{C(e.id),w(""),m(e.id)},[]),j=(0,l.useCallback)(e=>{w(e.id),C("")},[]),N=(0,l.useCallback)(()=>m(null),[]),{nodes:B=[],links:D=[],aggregatedLinks:O}=o||{},R=(0,l.useMemo)(()=>(0,i.cl)({nodes:B,topologyTables:f,presentation:b}),[B,f,b]),F=(0,l.useMemo)(()=>new Set((t||[]).map(e=>e.id)),[t]),G=(0,l.useMemo)(()=>t?R.filter(e=>F.has(e.id)):R,[R,F,t]),K=(0,l.useMemo)(()=>t?D.filter(e=>F.has(e.source)&&F.has(e.target)):D,[D,F,t]),H=Boolean(x&&t&&!F.has(x)),X=Boolean(!G.length||H),Y=(0,l.useCallback)(e=>{E(e)},[]);return(0,l.useEffect)(()=>{x&&X&&(m(null),C(""),w(""))},[x,X]),(0,l.useEffect)(()=>{L(!!x&&!X)},[x,X,L]),G.length?(0,c.jsxs)(n.Flex,{ref:T,flex:!0,column:!0,overflow:"hidden",children:[(0,c.jsx)(d.Ay,{nodes:G,links:K,portStateLinks:D,selectedNodeId:I,selectedLinkId:v,height:A,filterKey:h,presentation:b,portInventoryOverride:k,onModalIndexesChange:Y,onNodeClick:_,onLinkClick:j}),!!x&&M&&(0,c.jsx)(r.A,{actorId:x,graphNodes:R,graphLinks:D,aggregatedLinks:O,modalIndexes:M,presentation:b,topologyEvidence:g,topologyTables:f,topologyOverlays:y,topologyMeta:u,selectedLinkId:v,onClose:N})]}):(0,c.jsx)(n.Flex,{flex:!0,alignItems:"center",justifyContent:"center",children:(0,c.jsx)(n.Text,{color:"textLite",children:"No topology data"})})})}}]);