Files
pymc_console-dist/frontend/dist/assets/Contacts-C3lywEmM.js
T
GitHub Actions Bot 09e93d0c56 Release v0.9.260
Automated sync from private repository.
Built with obfuscation enabled.
2026-02-16 03:59:17 +00:00

3 lines
55 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ContactsMapMapLibre-BKi4KKfH.js","assets/vendor-react-j_fHog8x.js","assets/BasemapLayer-BT1oL_wV.js","assets/vendor-core-CmkNwW1A.js","assets/link-scoring-_TkY1XiP.js","assets/index-CtAi-cAi.js","assets/ConfirmModal-Blu4LvKT.js","assets/triangle-alert-UtYVd_CB.js","assets/DeepAnalysisModal-c0qfyPyF.js","assets/geo-utils-lidHUs5J.js","assets/git-branch-Cpt3JTVr.js","assets/database-CQBKCKbh.js","assets/message-square-DOuRXZJC.js","assets/DelayedAnimateNumber-BdwgBh7F.js","assets/index-6UGu_Ahy.js","assets/refresh-cw-BDuC10uP.js","assets/target-jX9xLuWy.js","assets/sun-BhDeiuwz.js","assets/easing-Dz5RB1Sa.js","assets/SignalIndicator-DmOBjP8S.js","assets/signal-scoring-CcBiRcks.js","assets/font-loader-BQzEmDrZ.js","assets/wifi-C3FMKsRZ.js","assets/users-Du7ERzUU.js","assets/badge-colors-YAE4qQ7m.js","assets/LightSparkline-BCL2qx0n.js","assets/copy-p1qJ5t9x.js","assets/map-pin-CUo_iI6z.js","assets/ping-DbXBzGRf.js","assets/node-types-B0Gk6phO.js","assets/PageLayout-CxsKTmXG.js","assets/listbox-DdP7D9bh.js","assets/Card-CahtPt6F.js","assets/activity-DOfZGwVk.js","assets/DataBox-B_kNKJSu.js","assets/funnel-Do14rdiu.js","assets/circle-check-DHAMqh9W.js","assets/chat-utils-BOz58-WY.js","assets/CollisionExplorerModal-BEpSaYiU.js","assets/network-pPvMBmg9.js","assets/search-_N1GMYlC.js","assets/maplibre-gl-B1CfjdFi.css","assets/index-QdsUNncv.css"])))=>i.map(i=>d[i]);
import{j as e,r as s,c as t,_ as a}from"./vendor-react-j_fHog8x.js";import{c as n,aA as l,aB as i,aC as r,au as c,h as o,aD as d,Y as m,aE as x,o as h,an as p,aF as g,aG as u,G as f,O as j,R as b,j as N,L as y,aH as v,y as w,aI as k,aJ as C,aK as M,x as S,aL as L,aM as P,aN as F,aO as $,aP as R,I as E,a5 as H}from"./index-CtAi-cAi.js";import{p as T}from"./ping-DbXBzGRf.js";import{C as _,c as z}from"./node-types-B0Gk6phO.js";import{P as O,b as I,B as A}from"./PageLayout-CxsKTmXG.js";import{L as D,a as G}from"./listbox-DdP7D9bh.js";import{C as U}from"./Card-CahtPt6F.js";import{T as V}from"./triangle-alert-UtYVd_CB.js";import{b as W,Z as B,C as K,A as q,c as Z}from"./SignalIndicator-DmOBjP8S.js";import{G as J}from"./git-branch-Cpt3JTVr.js";import{E as Y,S as Q,T as X}from"./target-jX9xLuWy.js";import{A as ee}from"./activity-DOfZGwVk.js";import{D as se}from"./DataBox-B_kNKJSu.js";import{F as te}from"./funnel-Do14rdiu.js";import{P as ae,T as ne,C as le}from"./ConfirmModal-Blu4LvKT.js";import{U as ie}from"./users-Du7ERzUU.js";import{M as re}from"./map-pin-CUo_iI6z.js";import{C as ce}from"./circle-check-DHAMqh9W.js";import{e as oe,g as de,a as me}from"./chat-utils-BOz58-WY.js";import{C as xe,S as he,M as pe}from"./CollisionExplorerModal-BEpSaYiU.js";import{C as ge}from"./badge-colors-YAE4qQ7m.js";import{M as ue}from"./message-square-DOuRXZJC.js";import{N as fe}from"./network-pPvMBmg9.js";import{S as je}from"./search-_N1GMYlC.js";const be=n("arrow-down-left",[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]]),Ne=n("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]),ye=n("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),ve=n("file-digit",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 16h2v6",key:"1bxocy"}],["path",{d:"M10 22h4",key:"ceow96"}],["rect",{x:"2",y:"16",width:"4",height:"6",rx:"2",key:"r45zd0"}]]),we=n("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]),ke=n("move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]),Ce=n("radio-tower",[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]]),Me=n("ruler",[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]]),Se=n("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]),Le=n("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]]),Pe=n("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);class Fe extends s.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}render(){var s;return this.state.hasError?e.jsx("div",{className:t("map-container-16-9 flex items-center justify-center rounded-2xl",l),role:"alert","aria-live":"assertive",children:e.jsxs("div",{className:"text-center text-fg-muted p-4",children:[e.jsx("p",{className:"text-lg mb-2",children:"Map failed to load"}),e.jsx("p",{className:"text-sm text-fg-muted",children:(null==(s=this.state.error)?void 0:s.message)||"Unknown error"}),e.jsx("p",{className:"text-xs text-fg-muted mt-2",children:"Try refreshing the page or check your browser's WebGL support."})]})}):this.props.children}}const $e=s.lazy(()=>a(()=>import("./ContactsMapMapLibre-BKi4KKfH.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42])));function Re({neighbors:a,localNode:n,localHash:i,onRemoveNode:r,selectedNodeHash:c,onNodeSelected:o,highlightedEdgeKey:d,highlightedGhost:m}){return e.jsx(Fe,{children:e.jsx(s.Suspense,{fallback:e.jsx("div",{className:t("map-container-16-9 flex items-center justify-center rounded-2xl",l),role:"status","aria-live":"polite","aria-label":"Loading map",children:e.jsxs("div",{className:"text-fg-muted flex items-center gap-3",children:[e.jsx("div",{className:"w-5 h-5 border-2 border-sys-blue border-t-transparent rounded-full animate-spin","aria-hidden":"true"}),e.jsx("span",{children:"Loading map..."})]})}),children:e.jsx($e,{neighbors:a,localNode:n,localHash:i,onRemoveNode:r,selectedNodeHash:c,onNodeSelected:o,highlightedEdgeKey:d,highlightedGhost:m})})})}function Ee(e){return e>=.7?"text-sys-green":e>=.5?"text-sys-indigo":e>=.3?"text-signal-poor":"text-sys-red"}function He(e){return`${Math.round(100*e)}%`}function Te(e,s){return s.has(e.toUpperCase())}const _e=s.memo(function({path:s,isHighlighted:t,onHighlight:a,ghostPrefixes:n}){const l=function(s){return s>.2?{icon:e.jsx(Pe,{className:"w-3 h-3"}),color:"text-sys-green"}:s<-.2?{icon:e.jsx(Le,{className:"w-3 h-3"}),color:"text-sys-red"}:{icon:e.jsx(x,{className:"w-3 h-3"}),color:"text-fg-muted"}}(s.observationTrend),i=s.weakestLinkKey&&s.weakestLinkConfidence<.5,r=s.hops.some(e=>Te(e,n));return e.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-md transition-colors cursor-pointer "+(t?"bg-sys-blue/20 border border-sys-blue/40":"hover:bg-subtle-fill"),onClick:()=>a(t?null:s.weakestLinkKey),children:[e.jsx("div",{className:"flex-shrink-0 w-12 text-center py-1 rounded-md "+(c=s.healthScore,c>=.7?"bg-sys-green/10":c>=.5?"bg-sys-indigo/10":c>=.3?"bg-signal-poor/10":"bg-sys-red/10"),children:e.jsx("span",{className:`text-xs font-semibold tabular-nums ${Ee(s.healthScore)}`,children:He(s.healthScore)})}),e.jsx("div",{className:"flex-1 flex items-center gap-0.5 overflow-x-auto min-w-0",children:s.hops.map((t,a)=>{var l;const r=Te(t,n),c=i&&(null==(l=s.weakestLinkKey)?void 0:l.includes(t));return e.jsxs("span",{className:"flex items-center",children:[e.jsxs("span",{className:"type-data-xs px-1.5 py-0.5 rounded flex items-center gap-0.5 "+(r?"bg-sys-cyan/20 text-sys-cyan border border-sys-cyan/30":c?"bg-sys-red/20 text-sys-red":"bg-subtle-fill-strong text-fg-secondary"),children:[r&&e.jsx(d,{className:"w-2.5 h-2.5"}),t]}),a<s.hops.length-1&&e.jsx("span",{className:"text-fg-muted mx-0.5",children:"→"})]},a)})}),e.jsxs("div",{className:"flex-shrink-0 flex items-center gap-3",children:[e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded "+("direct"===s.routeType?"bg-sys-green/20 text-sys-green":"flood"===s.routeType?"bg-sys-blue/20 text-sys-blue":"bg-subtle-fill-strong text-fg-muted"),children:"direct"===s.routeType?"D":"flood"===s.routeType?"F":"M"}),e.jsxs("div",{className:"flex items-center gap-1 text-fg-muted",title:"Estimated latency",children:[e.jsx(B,{className:"w-3 h-3"}),e.jsxs("span",{className:"text-xs tabular-nums",children:[s.estimatedLatencyMs,"ms"]})]}),e.jsxs("div",{className:"flex items-center gap-1 text-fg-muted",title:"Observations",children:[e.jsx(ee,{className:"w-3 h-3"}),e.jsx("span",{className:"text-xs tabular-nums",children:s.observationCount})]}),e.jsx("div",{className:`flex items-center gap-1 ${l.color}`,title:"Usage trend",children:l.icon}),r&&e.jsx("div",{className:"text-sys-cyan",title:"Path includes ghost (unknown) nodes",children:e.jsx(d,{className:"w-3 h-3"})}),i&&e.jsx("div",{className:"text-sys-red",title:`Weak link: ${s.weakestLinkConfidence.toFixed(0)}% confidence`,children:e.jsx(V,{className:"w-3 h-3"})})]})]});var c}),ze=s.memo(function({maxPaths:t=10,onHighlightEdge:a,highlightedEdge:n}){const l=i(),x=r(),h=c(),[p,g]=s.useState(!1),u=s.useMemo(()=>new Set(h.map(e=>e.prefix.toUpperCase())),[h]),f=s.useMemo(()=>l.slice(0,t),[l,t]),j=s.useMemo(()=>0===l.length?null:{avgHealth:l.reduce((e,s)=>e+s.healthScore,0)/l.length,declining:l.filter(e=>e.observationTrend<-.2).length,weakLinks:l.filter(e=>e.weakestLinkConfidence<.5).length,pathsWithGhosts:l.filter(e=>e.hops.some(e=>u.has(e.toUpperCase()))).length},[l,u]),b=e=>{null==a||a(e)};return 0===l.length?null:e.jsxs(o,{noPadding:!0,children:[e.jsx(U,{listHeader:!0,icon:e.jsx(J,{}),title:"Path Health",onClick:()=>g(!p),className:"hover:bg-subtle-fill transition-colors rounded-t-lg",titleExtra:e.jsxs("span",{className:"ml-2 text-xs font-normal text-fg-muted",children:["(",l.length," paths)"]}),actions:e.jsxs("div",{className:"flex items-center gap-3",children:[j&&e.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[e.jsxs("span",{className:`tabular-nums ${Ee(j.avgHealth)}`,children:["Avg: ",He(j.avgHealth)]}),j.weakLinks>0&&e.jsxs("span",{className:"text-sys-red flex items-center gap-1",children:[e.jsx(V,{className:"w-3 h-3"}),j.weakLinks," weak"]}),j.declining>0&&e.jsxs("span",{className:"text-signal-poor flex items-center gap-1",children:[e.jsx(Le,{className:"w-3 h-3"}),j.declining," declining"]}),j.pathsWithGhosts>0&&e.jsxs("span",{className:"text-sys-cyan flex items-center gap-1",children:[e.jsx(d,{className:"w-3 h-3"}),j.pathsWithGhosts," ghost"]})]}),p?e.jsx(W,{className:"w-4 h-4 text-fg-muted"}):e.jsx(m,{className:"w-4 h-4 text-fg-muted"})]})}),p&&e.jsxs("div",{className:"p-3 pt-0 space-y-1",children:[x.totalPaths>0&&e.jsxs("div",{className:"flex items-center gap-3 text-xs text-fg-muted pb-2 border-b border-edge-subtle",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Y,{className:"w-3 h-3 text-sys-blue"}),e.jsx("span",{className:"text-fg-secondary",children:x.totalPaths.toLocaleString()})," Viterbi decoded"]}),x.observationOverrideCount>0&&e.jsxs("span",{className:"text-sys-green",children:[Math.round(x.observationOverrideCount/x.totalPaths*100),"% observation override"]}),h.length>0&&e.jsxs("span",{className:"text-sys-cyan flex items-center gap-1",children:[e.jsx(d,{className:"w-3 h-3"}),h.length," ghost",1!==h.length?"s":""]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-fg-muted pb-2 border-b border-edge-subtle",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-sys-green"})," Healthy (≥70%)"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-sys-indigo"})," Fair (50-70%)"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-signal-poor"})," Weak (30-50%)"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-sys-red"})," Critical (<30%)"]}),h.length>0&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(d,{className:"w-3 h-3 text-sys-cyan"})," Ghost"]})]}),e.jsx("div",{className:"space-y-1 max-h-64 overflow-y-auto",children:f.map(s=>e.jsx(_e,{path:s,isHighlighted:n===s.weakestLinkKey,onHighlight:b,ghostPrefixes:u},s.pathKey))}),l.length>t&&e.jsxs("div",{className:"text-center text-xs text-fg-muted pt-2",children:["Showing top ",t," of ",l.length," paths"]})]})]})});function Oe(e){switch(e){case"rf_intersection":return"RF Circle Intersection";case"weighted_centroid":return"Weighted Centroid";case"single_anchor":return"Single Anchor (less reliable)";default:return e}}const Ie={confirmed:{label:"Confirmed",icon:e.jsx(Se,{className:"w-3.5 h-3.5"}),borderClass:"border-sys-green/40",bgClass:"bg-sys-green/10",textClass:"text-sys-green",badgeClass:"bg-sys-green/20 text-sys-green"},likely:{label:"Likely",icon:e.jsx(h,{className:"w-3.5 h-3.5"}),borderClass:"border-sys-cyan/30",bgClass:"bg-sys-cyan/5",textClass:"text-sys-cyan",badgeClass:"bg-sys-cyan/20 text-sys-cyan"},possible:{label:"Possible",icon:e.jsx(_,{className:"w-3.5 h-3.5"}),borderClass:"border-sys-indigo/20",bgClass:"bg-sys-indigo/5",textClass:"text-sys-indigo",badgeClass:"bg-sys-indigo/20 text-sys-indigo"},noise:{label:"Noise",icon:e.jsx(V,{className:"w-3.5 h-3.5"}),borderClass:"border-edge-subtle",bgClass:"bg-surface/30",textClass:"text-fg-muted",badgeClass:"bg-elevated text-fg-muted"}};function Ae({ghost:a,neighbors:n,isExpanded:l,onToggle:i,compact:r}){var c,o;const x=(null==(c=a.classification)?void 0:c.tier)??"noise",h=Ie[x],u="clusterId"in(f=a)&&"temporal"in f;var f;const j=s.useMemo(()=>Array.from(a.commonNeighbors).map(e=>{var s;return{hash:e,name:null==(s=n[e])?void 0:s.name}}),[a.commonNeighbors,n]),b=a.estimatedLocation?a.estimatedLocation.uncertaintyM>=1e3?`±${(a.estimatedLocation.uncertaintyM/1e3).toFixed(1)}km`:`±${Math.round(a.estimatedLocation.uncertaintyM)}m`:null,N=u&&a.temporal?(y=a.temporal.consistency)>=.7?{label:"Steady",color:"text-sys-green"}:y>=.4?{label:"Regular",color:"text-sys-cyan"}:y>=.2?{label:"Sporadic",color:"text-sys-indigo"}:{label:"Bursty",color:"text-signal-poor"}:null;var y;const v=u&&a.collisionCandidates&&a.collisionCandidates.length>0,w=v?a.collisionCandidates[0]:null;return r?e.jsxs("div",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded bg-elevated/50 text-sm",children:[e.jsx("span",{className:"font-mono font-medium text-fg-secondary",children:a.prefix.toUpperCase()}),e.jsx("span",{className:"text-fg-muted",children:a.observationCount})]}):e.jsxs("div",{className:t("rounded-lg border transition-all duration-150",h.borderClass,h.bgClass),children:[e.jsxs("button",{onClick:i,className:"w-full flex items-center gap-3 px-3 py-2 text-left hover:bg-subtle-fill rounded-lg",children:[e.jsx(d,{className:t("w-5 h-5 flex-shrink-0",h.textClass)}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-mono text-sm font-semibold text-fg-primary",children:a.prefix.toUpperCase()}),e.jsx("span",{className:t("px-1.5 py-0.5 rounded text-sm font-medium",h.badgeClass),children:h.label})]}),e.jsx("div",{className:t("text-sm mt-0.5",h.textClass),children:(null==(o=a.classification)?void 0:o.reason)??"Unknown"}),e.jsxs("div",{className:"flex items-center gap-3 text-sm text-fg-muted mt-1",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Y,{className:"w-3 h-3"}),a.observationCount]}),e.jsxs("span",{children:[(100*a.confidence).toFixed(0),"%"]}),a.commonNeighbors.size>0&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ie,{className:"w-3 h-3"}),a.commonNeighbors.size]}),a.estimatedLocation&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(re,{className:"w-3 h-3"}),b]}),N&&e.jsxs("span",{className:t("flex items-center gap-1",N.color),children:[e.jsx(ee,{className:"w-3 h-3"}),N.label]}),v&&e.jsxs("span",{className:"flex items-center gap-1 text-signal-poor",children:[e.jsx(Q,{className:"w-3 h-3"}),"Collision?"]})]})]}),l?e.jsx(W,{className:"w-4 h-4 text-fg-muted"}):e.jsx(m,{className:"w-4 h-4 text-fg-muted"})]}),l&&e.jsxs("div",{className:"px-3 pb-3 space-y-3 border-t border-edge-subtle/50 mt-1 pt-3",children:[v&&w&&e.jsx("div",{className:"p-2 rounded bg-signal-poor/10 border border-signal-poor/30",children:e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(Q,{className:"w-4 h-4 text-signal-poor flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-signal-poor font-medium",children:"Possible collision with known node"}),e.jsx("div",{className:"text-fg-secondary mt-0.5",children:w.knownNodeName?e.jsxs("span",{children:["May match ",e.jsx("span",{className:"font-medium",children:w.knownNodeName})," ","(",(100*w.collisionProbability).toFixed(0),"% probability)"]}):e.jsxs("span",{children:["May match ",e.jsx(se,{copy:!0,size:"compact",className:"inline",children:w.knownNodeHash})," ","(",(100*w.collisionProbability).toFixed(0),"% probability)"]})}),w.evidence&&e.jsxs("div",{className:"text-fg-muted mt-1 text-xs",children:[w.evidence.sharedEdgeCount>0&&e.jsxs("span",{className:"mr-2",children:[w.evidence.sharedEdgeCount," shared edges"]}),void 0!==w.evidence.distanceKm&&e.jsxs("span",{className:"mr-2",children:[w.evidence.distanceKm.toFixed(1),"km apart"]}),w.evidence.withinUncertainty&&e.jsx("span",{className:"text-sys-indigo",children:"Within uncertainty radius"})]})]})]})}),a.estimatedLocation?e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(re,{className:"w-4 h-4 text-sys-blue mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"text-sm",children:[e.jsxs("div",{className:"text-fg-primary font-medium",children:[a.estimatedLocation.lat.toFixed(5),", ",a.estimatedLocation.lon.toFixed(5)]}),e.jsxs("div",{className:"text-fg-muted",children:["Uncertainty: ",b]}),u&&a.location&&e.jsxs("div",{className:"mt-1 text-fg-muted",children:[e.jsxs("div",{children:["Method: ",Oe(a.location.method)]}),a.location.anchors&&a.location.anchors.length>0&&e.jsxs("div",{children:[a.location.anchors.length," anchor",1!==a.location.anchors.length?"s":""," used"," · ",(100*a.location.locationConfidence).toFixed(0),"% confidence"]})]})]})]}):e.jsxs("div",{className:"flex items-center gap-2 text-sm text-fg-muted",children:[e.jsx(V,{className:"w-4 h-4 text-signal-poor"}),"Location unknown (neighbors lack coordinates)"]}),u&&a.temporal&&e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ee,{className:"w-4 h-4 text-fg-muted mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"text-sm",children:[e.jsxs("div",{className:"text-fg-primary font-medium",children:["Temporal Pattern: ",e.jsx("span",{className:null==N?void 0:N.color,children:null==N?void 0:N.label})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-0.5 mt-1 text-fg-muted",children:[e.jsxs("span",{children:["Distinct hours: ",a.temporal.distinctHours]}),e.jsxs("span",{children:["Distinct days: ",a.temporal.distinctDays]}),e.jsxs("span",{children:["Burstiness: ",(100*a.temporal.burstiness).toFixed(0),"%"]}),e.jsxs("span",{children:["Consistency: ",(100*a.temporal.consistency).toFixed(0),"%"]}),e.jsxs("span",{children:["Last 24h: ",a.temporal.last24HourCount," obs"]}),e.jsxs("span",{children:["Active hours: ",a.temporal.activeHoursLast24,"/24"]})]})]})]}),!u&&e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(p,{className:"w-4 h-4 text-fg-muted mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"text-sm",children:[e.jsxs("div",{className:"text-fg-primary",children:["First seen: ",g(a.firstSeen)," ago"]}),e.jsxs("div",{className:"text-fg-muted",children:["Last seen: ",g(a.lastSeen)," ago"]})]})]}),u&&e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ye,{className:"w-4 h-4 text-fg-muted mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"text-sm",children:[e.jsxs("div",{className:"text-fg-primary",children:["Active period: ",g(a.firstSeen)," ",g(a.lastSeen)," ago"]}),a.temporal&&e.jsxs("div",{className:"text-fg-muted",children:["Obs/hour avg: ",a.temporal.observationsPerHour.toFixed(1)]})]})]}),j.length>0&&e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ie,{className:"w-4 h-4 text-fg-muted mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"text-sm",children:[e.jsxs("div",{className:"text-fg-muted mb-1",children:["Adjacent to ",j.length," known node",1!==j.length?"s":"",":"]}),e.jsxs("div",{className:"flex flex-wrap gap-1",children:[j.slice(0,5).map(({hash:s})=>e.jsx(se,{copy:!0,size:"compact",children:s},s)),j.length>5&&e.jsxs("span",{className:"text-fg-muted",children:["+",j.length-5," more"]})]})]})]}),u&&a.validationStages&&e.jsxs("div",{className:"pt-2 border-t border-edge-subtle/30",children:[e.jsx("div",{className:"type-micro text-fg-muted mb-1.5",children:"Validation Stages"}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.jsx(De,{label:"Candidates",passed:a.validationStages.candidateExhaustion}),e.jsx(De,{label:"Temporal",passed:a.validationStages.temporalConsistency}),e.jsx(De,{label:"Topology",passed:a.validationStages.topologicalFit}),e.jsx(De,{label:"Location",passed:a.validationStages.locationPlausible})]})]}),a.classification&&!u&&e.jsx("div",{className:"pt-2 border-t border-edge-subtle/30",children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[a.classification.criteria.hasVeryHighObservations&&e.jsx("span",{className:"px-1.5 py-0.5 rounded text-xs bg-sys-green/20 text-sys-green",children:"200+ obs"}),a.classification.criteria.hasHighObservations&&!a.classification.criteria.hasVeryHighObservations&&e.jsx("span",{className:"px-1.5 py-0.5 rounded text-xs bg-sys-cyan/20 text-sys-cyan",children:"50+ obs"}),a.classification.criteria.hasHighConfidence&&e.jsx("span",{className:"px-1.5 py-0.5 rounded text-xs bg-sys-green/20 text-sys-green",children:"70%+ conf"}),a.classification.criteria.hasCommonNeighbors&&e.jsx("span",{className:"px-1.5 py-0.5 rounded text-xs bg-sys-blue/20 text-sys-blue",children:"2+ neighbors"}),a.classification.criteria.hasGoodLocation&&e.jsx("span",{className:"px-1.5 py-0.5 rounded text-xs bg-sys-blue/20 text-sys-blue",children:"good loc"}),a.classification.criteria.isRecent&&e.jsx("span",{className:"px-1.5 py-0.5 rounded text-xs bg-fg-muted/20 text-fg-muted",children:"recent"})]})}),u&&a.upgradeRequirements&&a.upgradeRequirements.length>0&&"confirmed"!==x&&e.jsxs("div",{className:"pt-2 border-t border-edge-subtle/30",children:[e.jsx("div",{className:"type-micro text-fg-muted mb-1",children:"To upgrade tier:"}),e.jsx("ul",{className:"text-xs text-fg-secondary space-y-0.5",children:a.upgradeRequirements.slice(0,3).map((s,t)=>e.jsxs("li",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-sys-cyan",children:"•"})," ",s]},t))})]})]})]})}function De({label:s,passed:a}){return e.jsxs("span",{className:t("inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium",a?"bg-sys-green/20 text-sys-green":"bg-elevated text-fg-muted"),children:[a?e.jsx(ce,{className:"w-2.5 h-2.5"}):e.jsx(K,{className:"w-2.5 h-2.5"}),s]})}function Ge({neighbors:a,className:n,onGhostSelect:l}){const i=c(),o=r(),[p,g]=s.useState(new Set),[u,f]=s.useState("actionable"),[j,b]=s.useState(!1),[N,y]=s.useState(!0),[v,w]=s.useState(Date.now);s.useEffect(()=>{w(Date.now())},[i]);const k=s.useMemo(()=>i.filter(e=>!function(e,s){return s-1e3*e.lastSeen>6048e5}(e,v)),[i,v]),C=s.useMemo(()=>{const e=Array.from(p);return e.length>0?e[0]:null},[p]),M=s.useMemo(()=>C?k.find(e=>e.prefix===C)??null:null,[C,k]);s.useEffect(()=>{l&&l(M&&!N?{prefix:M.prefix,commonNeighbors:Array.from(M.commonNeighbors),estimatedLocation:M.estimatedLocation}:null)},[M,N,l]),s.useEffect(()=>{N&&g(new Set)},[N]);const{confirmed:S,likely:L,possible:P,noise:F,actionableCount:$}=s.useMemo(()=>{var e;const s=[],t=[],a=[],n=[];for(const i of k)switch((null==(e=i.classification)?void 0:e.tier)??"noise"){case"confirmed":s.push(i);break;case"likely":t.push(i);break;case"possible":a.push(i);break;case"noise":n.push(i)}const l=(e,s)=>s.observationCount-e.observationCount;return s.sort(l),t.sort(l),a.sort(l),n.sort(l),{confirmed:s,likely:t,possible:a,noise:n,actionableCount:s.length+t.length}},[k]);if(0===k.length)return null;const R=e=>{g(s=>s.has(e)?new Set:new Set([e]))},E="all"===u,H=S.length+L.length+(E?P.length:0)+(j?F.length:0);return e.jsxs("div",{className:n,children:[e.jsx(U,{listHeader:!0,icon:e.jsx(d,{}),title:"Ghost Buster",titleExtra:e.jsxs(e.Fragment,{children:[$>0&&e.jsxs("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium bg-sys-green/20 text-sys-green",children:[$," actionable"]}),N&&k.length>0&&e.jsxs("span",{className:"text-xs text-fg-muted ml-2",children:["(",k.length," total)"]})]}),actions:e.jsxs("div",{className:"flex items-center gap-2",children:[!N&&e.jsxs("button",{onClick:()=>f(e=>"actionable"===e?"all":"actionable"),className:t("flex items-center gap-1.5 px-2 py-1 rounded text-xs transition-colors","all"===u?"bg-sys-blue/20 text-sys-blue":"bg-elevated text-fg-muted hover:text-fg-secondary"),children:[e.jsx(te,{className:"w-3 h-3"}),"actionable"===u?"Actionable":"All"]}),e.jsx("button",{onClick:()=>y(e=>!e),className:"flex items-center gap-1 px-2 py-1 rounded text-xs bg-elevated text-fg-muted hover:text-fg-secondary transition-colors",title:N?"Expand panel":"Minimize panel",children:N?e.jsx(ae,{className:"w-3 h-3"}):e.jsx(x,{className:"w-3 h-3"})})]})}),N?e.jsxs("div",{className:"px-5 py-3 flex items-center gap-3 text-xs cursor-pointer hover:bg-subtle-fill transition-colors",onClick:()=>y(!1),children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[S.length>0&&e.jsxs("span",{className:"flex items-center gap-1 text-sys-green",children:[e.jsx(Se,{className:"w-3 h-3"}),S.length," confirmed"]}),L.length>0&&e.jsxs("span",{className:"flex items-center gap-1 text-sys-cyan",children:[e.jsx(h,{className:"w-3 h-3"}),L.length," likely"]}),P.length>0&&e.jsxs("span",{className:"text-sys-indigo",children:[P.length," possible"]}),F.length>0&&e.jsxs("span",{className:"text-fg-muted",children:[F.length," noise"]})]}),e.jsx("span",{className:"text-fg-muted ml-auto",children:"Click to expand"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"px-5 py-2 flex items-center gap-3 text-xs border-b border-edge-subtle/30",children:[e.jsxs("span",{className:"text-fg-muted",children:[o.pathsWithGhosts.toLocaleString()," / ",o.totalPaths.toLocaleString()," paths"]}),e.jsx("span",{className:"text-fg-muted",children:"•"}),e.jsxs("div",{className:"flex items-center gap-2",children:[S.length>0&&e.jsxs("span",{className:"text-sys-green",children:[S.length," confirmed"]}),L.length>0&&e.jsxs("span",{className:"text-sys-cyan",children:[L.length," likely"]}),P.length>0&&e.jsxs("span",{className:"text-sys-indigo",children:[P.length," possible"]}),F.length>0&&e.jsxs("span",{className:"text-fg-muted",children:[F.length," noise"]})]})]}),e.jsxs("div",{className:"px-5 py-4 space-y-4",children:[S.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-sys-green",children:[e.jsx(Se,{className:"w-3.5 h-3.5"}),e.jsxs("span",{className:"font-medium",children:["Confirmed Repeaters (",S.length,")"]})]}),e.jsx("div",{className:"space-y-2",children:S.map(s=>e.jsx(Ae,{ghost:s,neighbors:a,isExpanded:p.has(s.prefix),onToggle:()=>R(s.prefix)},s.prefix))})]}),L.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-sys-cyan",children:[e.jsx(h,{className:"w-3.5 h-3.5"}),e.jsxs("span",{className:"font-medium",children:["Likely Repeaters (",L.length,")"]})]}),e.jsx("div",{className:"space-y-2",children:L.map(s=>e.jsx(Ae,{ghost:s,neighbors:a,isExpanded:p.has(s.prefix),onToggle:()=>R(s.prefix)},s.prefix))})]}),E&&P.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-sys-indigo",children:[e.jsx(_,{className:"w-3.5 h-3.5"}),e.jsxs("span",{className:"font-medium",children:["Possible (",P.length,")"]})]}),e.jsxs("div",{className:"space-y-2",children:[P.slice(0,10).map(s=>e.jsx(Ae,{ghost:s,neighbors:a,isExpanded:p.has(s.prefix),onToggle:()=>R(s.prefix)},s.prefix)),P.length>10&&e.jsxs("div",{className:"text-xs text-fg-muted text-center py-1",children:["+",P.length-10," more possible nodes"]})]})]}),F.length>0&&"all"===u&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("button",{onClick:()=>b(!j),className:"flex items-center gap-2 text-xs text-fg-muted hover:text-fg-secondary transition-colors",children:[j?e.jsx(W,{className:"w-3.5 h-3.5"}):e.jsx(m,{className:"w-3.5 h-3.5"}),e.jsx(V,{className:"w-3.5 h-3.5"}),e.jsxs("span",{children:["Noise (",F.length,")"]})]}),j&&e.jsx("div",{className:"flex flex-wrap gap-1",children:F.map(s=>e.jsx(Ae,{ghost:s,neighbors:a,isExpanded:!1,onToggle:()=>{},compact:!0},s.prefix))})]}),"actionable"===u&&0===$&&e.jsxs("div",{className:"text-center py-6 text-sm text-fg-muted",children:[e.jsx(d,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:"No confirmed or likely repeaters yet."}),e.jsxs("p",{className:"text-xs mt-1",children:[P.length+F.length," prefixes need more evidence."]}),e.jsxs("button",{onClick:()=>f("all"),className:"mt-3 text-sys-blue hover:underline",children:["View all ",k.length," discovered nodes"]})]}),o.observationOverrideCount>0&&H>0&&e.jsxs("div",{className:"pt-2 border-t border-edge-subtle/30 text-xs text-fg-muted",children:[e.jsx("span",{className:"text-sys-blue",children:o.observationOverrideCount})," observation overrides • Avg confidence: ",e.jsxs("span",{className:"text-sys-indigo",children:[(100*o.avgPathConfidence).toFixed(0),"%"]})]})]})]})]})}const Ue=s.memo(function({hash:t,className:a="",size:n="sm",collisionInfo:l,isViterbiResolved:i}){const c=u(),o=r(),[d,m]=s.useState(!1),x=s.useMemo(()=>f(t),[t]),p=s.useMemo(()=>void 0!==l?l:x?c.find(e=>e.prefix===x)??null:null,[x,c,l]),g=i??(o.totalPaths>0&&o.avgPathConfidence>=.7),j=s.useCallback(e=>{e.preventDefault(),e.stopPropagation(),m(!0)},[]),b=s.useCallback(()=>{m(!1)},[]);if(!p)return null;const N="sm"===n?"w-3.5 h-3.5":"w-4 h-4",y=g?"text-sys-cyan hover:text-sys-cyan hover:bg-sys-cyan/10 focus:ring-sys-cyan/50":"text-signal-fair hover:text-sys-indigo hover:bg-signal-fair/10 focus:ring-signal-fair/50",v=g?`Prefix conflict resolved by Viterbi HMM (${(100*o.avgPathConfidence).toFixed(0)}% confidence)`:`Prefix conflict: ${p.candidateCount} nodes share prefix "${x}"`;return e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:j,className:`inline-flex items-center justify-center p-0.5 rounded focus:outline-none focus:ring-2 transition-colors cursor-pointer touch-manipulation ${y} ${a}`,title:v,"aria-label":`View prefix conflict for ${x}${g?" (Viterbi resolved)":""}`,children:g?e.jsxs("span",{className:"relative",children:[e.jsx(Y,{className:N}),e.jsx(h,{className:"absolute -bottom-0.5 -right-0.5 w-2 h-2 text-sys-green"})]}):e.jsx(ve,{className:N})}),e.jsx(xe,{isOpen:d,prefix:p.prefix,candidateHashes:p.candidateHashes,onClose:b})]})}),Ve=s.memo(function({hash:s,contact:t,isHub:a,isNeighbor:n,distance:l,centrality:i,sparklineData:r,neighborSignal:c,collisionInfo:o,isViterbiResolved:d,isPinging:m,isPingingThis:x,pingResult:p,pingError:g,gatewayInfo:u,lastForwarderPrefix:f,isMobile:v,pathStability:w,onRowClick:k,onPing:C,onRemove:M}){const S=t.latitude&&t.longitude&&0!==t.latitude&&0!==t.longitude,L=t.node_name||t.name||"Unknown",P=n&&c,F=z(t),{isRepeater:$,isCompanion:R,isRoomServer:E,isClient:H,label:T}=F,O=n?`${T} — Direct RF contact (zero-hop neighbor)`:`${T} — Flood routing (multi-hop via mesh)`,I=t.first_seen?j(t.first_seen).replace(/ ago$/i," old"):null;return e.jsxs("div",{className:`contacts-grid-row ${a?"bg-sys-amber/5 border-l-2 border-l-sys-amber":""} ${S?"cursor-pointer hover:bg-subtle-fill":""}`,onClick:()=>k(s),children:[e.jsxs("div",{className:"contacts-col-node flex items-center gap-2 min-w-0",children:[P&&null!==(null==c?void 0:c.avgSnr)?e.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0 self-center "+(D=c.avgSnr,void 0===D?"bg-[var(--signal-unknown)]":D>=5?"bg-[var(--signal-excellent)]":D>=0?"bg-[var(--signal-good)]":D>=-5?"bg-[var(--signal-fair)]":D>=-10?"bg-[var(--signal-poor)]":"bg-[var(--signal-critical)]")}):e.jsx("div",{className:"w-2 flex-shrink-0"}),e.jsx("div",{className:"w-6 h-6 flex items-center justify-center flex-shrink-0",title:O,children:(()=>{if(E&&$)return e.jsxs("div",{className:"relative w-5 h-5",children:[e.jsx(ue,{className:"w-5 h-5 absolute inset-0 text-sys-pink"}),e.jsx(he,{className:"w-2.5 h-2.5 absolute -bottom-0.5 -right-0.5 text-sys-teal"})]});if(E)return e.jsx(ue,{className:"w-5 h-5 text-sys-pink"});if($)return e.jsx("div",{className:"w-5 h-5 rounded-full flex items-center justify-center ring-[1.5px] ring-sys-blue",children:e.jsx(b,{className:"w-3.5 h-3.5 text-sys-blue"})});if((R||H)&&"Unknown"!==L){const{emoji:s,cleanName:t}=oe(L);return e.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",style:{backgroundColor:de(t)},children:s?e.jsx("span",{className:"text-sm leading-none",children:s}):e.jsx("span",{className:"text-white text-[9px] font-bold tracking-tighter",children:me(L)})})}return e.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center bg-zinc-500/20",children:e.jsx(_,{className:"w-3.5 h-3.5 text-sys-amber"})})})()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 overflow-hidden",children:[e.jsx("span",{className:"roster-title truncate",title:L,children:L}),n&&e.jsx(N,{color:ge.neighbor,compact:!0,className:"flex-shrink-0",children:"NBR"}),a&&e.jsxs(N,{color:ge.hub,compact:!0,className:"flex items-center gap-1 flex-shrink-0",children:[e.jsx(fe,{className:"w-3 h-3"}),"HUB"]}),$&&e.jsx(N,{color:ge.repeater,compact:!0,className:"flex-shrink-0",children:"RPT"}),E&&e.jsx(N,{color:ge.room,compact:!0,className:"flex-shrink-0",children:"ROOM"}),R&&e.jsx(N,{color:ge.companion,compact:!0,className:"flex-shrink-0",children:"COMP"}),H&&e.jsx(N,{color:ge.client,compact:!0,className:"flex-shrink-0",children:"CLIENT"}),v&&e.jsxs(N,{color:"cyan",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",children:[e.jsx(ke,{className:"w-2.5 h-2.5"}),"MOBILE"]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[e.jsx(se,{copy:!0,size:"compact",truncate:[8,6],children:s}),e.jsx(Ue,{hash:s,collisionInfo:o,isViterbiResolved:d}),!n&&u&&e.jsxs(N,{color:"zinc",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",title:`Via ${u.name||u.prefix} (${u.hopCount} hop${1!==u.hopCount?"s":""})`,children:[e.jsx(q,{className:"w-2.5 h-2.5"}),e.jsx("span",{className:"font-mono",children:u.prefix}),u.hopCount>1&&e.jsxs("span",{className:"opacity-60",children:["+",u.hopCount-1]})]}),f&&!n&&e.jsxs(N,{color:"zinc",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",title:`Last forwarded by ${f}`,children:[e.jsx(be,{className:"w-2.5 h-2.5"}),e.jsx("span",{className:"font-mono",children:f})]}),null!=w&&0!==w&&e.jsx(N,{color:w>0?"green":"amber",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",title:w>0?"Path stability improving":"Path stability declining",children:w>0?e.jsx(Pe,{className:"w-2.5 h-2.5"}):e.jsx(Le,{className:"w-2.5 h-2.5"})}),r.length>0&&(()=>{const s=r.reduce((e,s)=>e+s.count,0);if(0===s)return null;const t=s/24;return e.jsxs(N,{color:"zinc",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0",title:`${s} packets in last 24h (~${t.toFixed(1)}/hr)`,children:[e.jsx(Ce,{className:"w-2.5 h-2.5"}),e.jsxs("span",{children:[t<1?"<1":t.toFixed(0),"/hr"]})]})})(),I&&e.jsxs(N,{color:"zinc",compact:!0,className:"flex items-center gap-0.5 flex-shrink-0 opacity-70",title:`First discovered ${I}`,children:[e.jsx(ye,{className:"w-2.5 h-2.5"}),e.jsx("span",{children:I})]})]})]})]}),e.jsxs("div",{className:"contacts-col-signal flex items-center justify-end gap-2",children:[P&&null!==(null==c?void 0:c.avgRssi)&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Z,{rssi:c.avgRssi,className:"w-3.5 h-3.5"}),e.jsx("span",{className:"type-data-xs text-fg-muted",children:Math.round(c.avgRssi)})]}),P&&null!==(null==c?void 0:c.avgSnr)&&e.jsxs("span",{className:"type-data-xs text-fg-muted",children:[c.avgSnr.toFixed(1)," dB"]})]}),e.jsx("div",{className:"contacts-col-distance flex items-center justify-end gap-1 text-fg-muted",children:null!=l&&e.jsxs(e.Fragment,{children:[e.jsx(Me,{className:"w-3 h-3"}),e.jsx("span",{className:"type-data-xs",children:(A=l,A<1e3?`${Math.round(A)}m`:`${(A/1e3).toFixed(1)}km`)})]})}),e.jsx("div",{className:"contacts-col-centrality flex items-center justify-end gap-1",children:i>0&&e.jsxs(e.Fragment,{children:[e.jsx(ee,{className:"w-3 h-3 text-sys-indigo"}),e.jsxs("span",{className:"type-data-xs text-fg-muted",children:[(100*i).toFixed(0),"%"]})]})}),e.jsx("div",{className:"contacts-col-seen flex items-center justify-end",children:e.jsx("span",{className:"type-data-xs text-fg-primary whitespace-nowrap",children:t.last_seen?j(t.last_seen):"—"})}),e.jsxs("div",{className:"contacts-col-actions flex items-center justify-end gap-1",children:[n&&e.jsx(e.Fragment,{children:p?e.jsxs("div",{className:"flex items-center gap-1 text-sys-green",title:`RTT: ${p.rtt_ms.toFixed(0)}ms`,children:[e.jsx(h,{className:"w-3.5 h-3.5"}),e.jsxs("span",{className:"type-data-xs hidden sm:inline",children:[p.snr_db.toFixed(1),"dB"]})]}):g?e.jsx("span",{className:"text-sys-red text-xs",title:g,children:"✗"}):e.jsx("button",{onClick:e=>C(s,e),disabled:m,className:"p-1 sm:p-1.5 radius-inner text-fg-muted/50 hover:text-sys-blue hover:bg-sys-blue/10 transition-base disabled:opacity-50 disabled:cursor-not-allowed",title:"Ping neighbor for updated signal info",children:x?e.jsx(y,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 animate-spin"}):e.jsx(X,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"})})}),e.jsx("button",{onClick:e=>{e.stopPropagation(),M(s,L)},className:"p-1 sm:p-1.5 radius-inner text-fg-muted/50 hover:text-sys-red hover:bg-sys-red/10 transition-base",title:"Remove contact",children:e.jsx(ne,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4"})})]})]});var A,D}),We=[],Be=[{field:"lastHeard",icon:p,label:"Recent"},{field:"distance",icon:Me,label:"Distance"},{field:"centrality",icon:ee,label:"Centrality"}];function Ke(e,s){const{color:a="primary",border:n=!1}=s??{};return t("flex items-center gap-1.5 px-2 py-1.5 text-sm radius-inner transition-base",e?"success"===a?"bg-sys-green/20 text-sys-green":"bg-sys-blue/20 text-sys-blue":"text-fg-muted hover:text-fg-secondary hover-bg",n&&(e?"success"===a?"border border-sys-green/30":"border border-sys-blue/30":"border border-transparent"))}function qe(e,s,t,a){const n=(t-e)*Math.PI/180,l=(a-s)*Math.PI/180,i=Math.sin(n/2)*Math.sin(n/2)+Math.cos(e*Math.PI/180)*Math.cos(t*Math.PI/180)*Math.sin(l/2)*Math.sin(l/2);return 2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i))*6371e3}const Ze=Object.freeze(Object.defineProperty({__proto__:null,default:function(){const{stats:a}=v(),n=w(),l=k(),d=C(),m=M(),x=S(),p=c(),g=L(),j=P(),N=i(),V=F(),W=u(),B=r(),K=$(),q=B.totalPaths>0&&B.avgPathConfidence>=.7,Z=s.useMemo(()=>{const e=new Map;for(const s of W)e.set(s.prefix,s);return e},[W]),[J,Y]=s.useState(null),[Q,X]=s.useState("lastHeard"),[ee,se]=s.useState("desc"),[te,ae]=s.useState(""),[ne,ce]=s.useState(!1),[oe,de]=s.useState(new Set),[me,xe]=s.useState(!1),[he,ge]=s.useState(null),[fe,be]=s.useState(null),[ye,ve]=s.useState(null),[ke,Ce]=s.useState(null),[Me,Se]=s.useState(new Map),[Le,Pe]=s.useState(new Map),[Fe,$e]=s.useState(25),[Ee,He]=s.useState(25),Te=s.useRef(null),_e=s.useMemo(()=>(null==a?void 0:a.neighbors)??{},[null==a?void 0:a.neighbors]),Oe=s.useMemo(()=>Object.fromEntries(Object.entries(_e).filter(([e])=>!n.has(e))),[_e,n]),Ie=R(),Ae=null==a?void 0:a.local_hash,De=s.useMemo(()=>{const e=new Map;for(const s of N){const t=s.hops[0];if(t&&0!==s.observationTrend){const a=Object.keys(_e).find(e=>e.toUpperCase().startsWith(t.toUpperCase()));a&&!e.has(a)&&e.set(a,s.observationTrend)}}return e},[N,_e]),Ue=s.useMemo(()=>{const e=new Map;if(!Ae||0===g.size)return e;for(const[s,t]of g)if(s.endsWith(`${Ae}`)&&t.hops.length>1){const a=s.split("→")[0],n=t.hops[t.hops.length-1];e.set(a,n)}return e},[g,Ae]),Ze=s.useMemo(()=>{const e=new Map;if(!(null==Ie?void 0:Ie.latitude)||!(null==Ie?void 0:Ie.longitude))return e;for(const[s,t]of Object.entries(Oe))t.latitude&&t.longitude&&0!==t.latitude&&0!==t.longitude?e.set(s,qe(Ie.latitude,Ie.longitude,t.latitude,t.longitude)):e.set(s,null);return e},[Oe,Ie]),{neighborHashSet:Je,neighborSignalMap:Ye}=s.useMemo(()=>{const e=new Set,s=new Map;for(const t of x)e.add(t.hash),s.set(t.hash,{avgRssi:t.avgRssi,avgSnr:t.avgSnr});return{neighborHashSet:e,neighborSignalMap:s}},[x]),Qe=s.useMemo(()=>{const e=te.toLowerCase().trim(),s="neighbor"===e||"neighbors"===e,t=ne||s,a=oe.size>0;return Object.fromEntries(Object.entries(Oe).filter(([n,l])=>{if(a){const e=function(e){return function(e){switch(e){case"room_server":return"room";case"repeater":return"repeater";case"companion":case"unknown":return"companion"}}(z(e).type)}(l);if(!oe.has(e))return!1}if(t&&!Je.has(n))return!1;if(s)return!0;if(!e)return!0;const i=(l.node_name||l.name||"").toLowerCase(),r=f(n).toLowerCase();return i.includes(e)||r.includes(e)||n.toLowerCase().includes(e)}))},[Oe,te,ne,Je,oe]),Xe=s.useMemo(()=>{const e=Object.entries(Qe),s=te.toLowerCase().trim(),t=2===s.length&&/^[0-9a-f]{2}$/i.test(s);return e.sort(([e,a],[n,l])=>{if(t){const t=f(e).toLowerCase(),a=f(n).toLowerCase(),l=t===s,i=a===s;if(l&&!i)return-1;if(i&&!l)return 1}let i=0;switch(Q){case"lastHeard":i=(a.last_seen||0)-(l.last_seen||0);break;case"distance":{const s=Ze.get(e)??null,t=Ze.get(n)??null;i=null===s&&null===t?0:null===s?1:null===t?-1:s-t;break}case"centrality":i=(m.get(e)||0)-(m.get(n)||0)}return"desc"===ee?-i:i})},[Qe,Q,ee,Ze,m,te]),es=s.useMemo(()=>{let e=0,s=0,t=0,a=0,n=0;for(const[,l]of Xe){const i=z(l),r=l.latitude&&l.longitude&&0!==l.latitude&&0!==l.longitude;switch(i.type){case"room_server":t++;break;case"repeater":s++;break;case"companion":e++;break;case"unknown":n++}r&&a++}return{companions:e,repeaters:s,roomServers:t,total:Xe.length,withLocation:a,unknown:n}},[Xe]),ss=s.useMemo(()=>new Set(d),[d]),ts=s.useMemo(()=>0===Fe?Xe:Xe.slice(0,Ee),[Xe,Ee,Fe]);s.useEffect(()=>{He(Fe||Xe.length)},[Q,ee,te,ne,oe,Fe,Xe.length]),s.useEffect(()=>{const e=e=>{e.target.closest("[data-dropdown]")||xe(!1)};return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[]),s.useEffect(()=>{if(0===Fe)return;const e=new IntersectionObserver(e=>{e[0].isIntersecting&&Ee<Xe.length&&He(e=>Math.min(e+Fe,Xe.length))},{threshold:.1,rootMargin:"100px"});return Te.current&&e.observe(Te.current),()=>e.disconnect()},[Fe,Ee,Xe.length]);const as=s.useCallback(e=>{$e(e),He(e||Xe.length)},[Xe.length]),ns=s.useCallback(e=>{Q===e?se(e=>"desc"===e?"asc":"desc"):(X(e),se("desc"))},[Q]),ls=s.useCallback(e=>{const s=Oe[e];(null==s?void 0:s.latitude)&&(null==s?void 0:s.longitude)&&0!==s.latitude&&0!==s.longitude&&ge(e)},[Oe]),is=s.useCallback(()=>{ge(null)},[]),rs=s.useCallback((e,s)=>{Y({hash:e,name:s})},[]),cs=s.useCallback(async(e,s)=>{if(s.stopPropagation(),!ke){Ce(e),Se(s=>{const t=new Map(s);return t.delete(e),t}),Pe(s=>{const t=new Map(s);return t.delete(e),t});try{const s=e.startsWith("0x")?e.slice(0,4):`0x${e.slice(0,2)}`,t=await T(s,30);t.success&&t.data?(Se(s=>new Map(s).set(e,t.data)),setTimeout(()=>{Se(s=>{const t=new Map(s);return t.delete(e),t})},1e4)):(Pe(s=>new Map(s).set(e,t.error||"Ping failed")),setTimeout(()=>{Pe(s=>{const t=new Map(s);return t.delete(e),t})},5e3))}catch(t){const s=t instanceof Error?t.message:"Ping failed";Pe(t=>new Map(t).set(e,s)),setTimeout(()=>{Pe(s=>{const t=new Map(s);return t.delete(e),t})},5e3)}finally{Ce(null)}}},[ke]);return e.jsxs(O,{children:[e.jsx(I,{title:"Contacts",icon:e.jsx(ie,{}),controls:e.jsxs("div",{className:"flex items-center gap-4 sm:gap-5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Total:"}),e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:`${es.total} discovered node${1!==es.total?"s":""} on the mesh network`,children:[e.jsx(ie,{className:"w-3.5 h-3.5 text-fg-secondary"}),e.jsx("span",{children:es.total})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Types:"}),es.repeaters>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:`${es.repeaters} Repeater${1!==es.repeaters?"s":""} — Mesh network relay nodes that forward packets`,children:[e.jsx(b,{className:"w-3.5 h-3.5 text-sys-blue"}),e.jsx("span",{children:es.repeaters})]}),es.companions>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:`${es.companions} Companion${1!==es.companions?"s":""} — Client devices (phones, CLI tools) connected to the mesh`,children:[e.jsx(pe,{className:"w-3.5 h-3.5 text-fg-muted"}),e.jsx("span",{children:es.companions})]}),es.roomServers>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:`${es.roomServers} Room Server${1!==es.roomServers?"s":""} — Group chat servers hosting persistent rooms`,children:[e.jsx(ue,{className:"w-3.5 h-3.5 text-sys-pink"}),e.jsx("span",{children:es.roomServers})]}),es.withLocation>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:`${es.withLocation} node${1!==es.withLocation?"s":""} with GPS location — Visible on map`,children:[e.jsx(re,{className:"w-3.5 h-3.5 text-sys-green"}),e.jsx("span",{children:es.withLocation})]}),es.unknown>0&&e.jsxs("span",{className:"data-box flex items-center gap-1.5 cursor-default",title:`${es.unknown} unknown node${1!==es.unknown?"s":""} — No name or location advertised`,children:[e.jsx(_,{className:"w-3.5 h-3.5 text-sys-amber"}),e.jsx("span",{children:es.unknown})]})]})]})}),e.jsxs(A,{children:[V?e.jsx(Re,{neighbors:Oe,localNode:Ie??void 0,localHash:Ae,onRemoveNode:l,selectedNodeHash:he,onNodeSelected:is,highlightedEdgeKey:fe,highlightedGhost:ye}):e.jsx("div",{className:"surface-base radius-card aspect-video flex items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx("div",{className:"w-6 h-6 border-2 border-sys-blue border-t-transparent rounded-full animate-spin"}),e.jsx("span",{className:"text-sm text-fg-muted",children:"Loading map..."})]})}),e.jsx(ze,{maxPaths:10,highlightedEdge:fe,onHighlightEdge:be}),p.length>0&&(V?e.jsx(o,{noPadding:!0,children:e.jsx(Ge,{neighbors:Oe,onGhostSelect:ve})}):e.jsxs("div",{className:"surface-base radius-card",children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-edge-subtle",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"w-24 h-4 rounded bg-elevated animate-pulse"})]}),e.jsx("div",{className:"w-6 h-6 rounded bg-elevated animate-pulse"})]}),e.jsx("div",{className:"px-5 py-3",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-20 h-4 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"w-16 h-4 rounded bg-elevated animate-pulse"})]})})]})),e.jsx(o,{noPadding:!0,children:V?e.jsxs(e.Fragment,{children:[e.jsx(U,{listHeader:!0,stackActionsOnMobile:!0,icon:e.jsx(ie,{}),title:"Discovered Contacts",titleExtra:e.jsx(E,{type:"search",size:"sm",value:te,onChange:e=>ae(e.target.value),placeholder:"Search...",leadingIcon:e.jsx(je,{className:"w-3.5 h-3.5"}),trailingIcon:te?e.jsx("button",{onClick:()=>{ae(""),"neighbor"!==te.toLowerCase().trim()&&"neighbors"!==te.toLowerCase().trim()||ce(!1)},className:"text-fg-muted hover:text-fg-secondary",children:e.jsx(H,{className:"w-3 h-3"})}):void 0,className:"w-24 sm:w-32","aria-label":"Search contacts"}),actions:e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs("div",{className:"relative","data-dropdown":!0,children:[e.jsxs("button",{onClick:()=>xe(!me),className:Ke(oe.size>0,{border:!0}),title:"Filter by contact type",children:[e.jsx(we,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"hidden sm:inline",children:"Filter"}),oe.size>0&&e.jsx("span",{className:"tabular-nums text-xs bg-sys-blue/30 px-1 rounded",children:oe.size})]}),me&&e.jsxs("div",{className:"absolute left-0 top-full mt-1 z-50 surface-elevated radius-inner py-1 min-w-[140px]",children:[[{key:"repeater",label:"Repeaters"},{key:"companion",label:"Companions"},{key:"room",label:"Rooms"}].map(({key:s,label:a})=>e.jsxs("button",{onClick:()=>{de(e=>{const t=new Set(e);return t.has(s)?t.delete(s):t.add(s),t})},className:"w-full px-3 py-1.5 text-sm text-left hover-bg transition-base flex items-center gap-2",children:[e.jsx("span",{className:t("w-4 h-4 flex items-center justify-center radius-badge border",oe.has(s)?"bg-sys-blue border-sys-blue text-white":"border-edge-subtle"),children:oe.has(s)&&e.jsx(h,{className:"w-3 h-3"})}),e.jsx("span",{className:oe.has(s)?"text-fg-primary":"text-fg-secondary",children:a})]},s)),oe.size>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"border-t border-edge-subtle my-1"}),e.jsx("button",{onClick:()=>de(new Set),className:"w-full px-3 py-1.5 text-sm text-left text-fg-muted hover:text-fg-secondary hover-bg transition-base",children:"Clear filters"})]})]})]}),Je.size>0&&e.jsxs("button",{onClick:()=>ce(!ne),className:Ke(ne,{color:"success",border:!0}),title:ne?"Show all contacts":"Show only MeshCore neighbors (direct RF contact)",children:[e.jsx(b,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"hidden sm:inline",children:"Neighbors"}),e.jsx("span",{className:"sm:hidden tabular-nums",children:Je.size})]})]}),e.jsx("div",{className:"hidden sm:block h-4 w-px bg-border-subtle"}),e.jsxs("div",{className:"flex items-center gap-1",children:[Be.map(({field:s,icon:a,label:n})=>e.jsxs("button",{onClick:()=>ns(s),className:Ke(Q===s),title:`Sort by ${n.toLowerCase()}`,children:[e.jsx(a,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"hidden sm:inline",children:n}),Q===s&&e.jsx(Ne,{className:t("w-3 h-3","asc"===ee&&"rotate-180")})]},s)),e.jsx("div",{className:"h-4 w-px bg-border-subtle"}),e.jsxs(D,{value:Fe,onChange:as,className:"w-auto min-w-[50px] [&_button]:py-1 [&_button]:px-2 [&_button]:text-xs [&_button]:min-h-0","aria-label":"Items per page",children:[e.jsx(G,{value:25,children:"25"}),e.jsx(G,{value:50,children:"50"}),e.jsx(G,{value:100,children:"100"}),e.jsx(G,{value:0,children:"All"})]})]})]})}),Xe.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden sm:grid contacts-grid-header border-b border-edge-subtle/50 px-3 py-2 type-micro text-fg-muted",children:[e.jsx("div",{className:"contacts-col-node",children:"Node"}),e.jsx("div",{className:"contacts-col-signal text-right",children:"Signal"}),e.jsx("div",{className:"contacts-col-distance text-right",children:"Distance"}),e.jsx("div",{className:"contacts-col-centrality text-right",children:"Centrality"}),e.jsx("div",{className:"contacts-col-seen text-right",children:"Last Seen"}),e.jsx("div",{className:"contacts-col-actions"})]}),e.jsx("div",{className:"divide-y divide-edge-subtle/30",children:ts.map(([s,t])=>{const a=f(s),n=ss.has(s),l=Je.has(s),i=Ze.get(s)??null,r=m.get(s)||0,c=l?Ye.get(s):void 0,o=a?Z.get(a)??null:null,d=K.get(s)??We;let x=null;if(!l&&Ae&&g.size>0){const e=`${s}${Ae}`,t=g.get(e);if(t&&t.hops.length>0){const e=t.hops[0],s=Object.keys(_e).find(s=>s.toUpperCase().startsWith(e.toUpperCase())),a=s?_e[s]:null;x={prefix:e,name:(null==a?void 0:a.node_name)??(null==a?void 0:a.name)??null,hopCount:t.hopCount}}}const h=j.has(s),p=De.get(s)??null,u=Ue.get(s)??null;return e.jsx(Ve,{hash:s,contact:t,isHub:n,isNeighbor:l,distance:i,centrality:r,sparklineData:d,neighborSignal:c,collisionInfo:o,isViterbiResolved:q,isPinging:null!==ke,isPingingThis:ke===s,pingResult:Me.get(s),pingError:Le.get(s),gatewayInfo:x,lastForwarderPrefix:u,isMobile:h,pathStability:p,onRowClick:ls,onPing:cs,onRemove:rs},s)})}),Fe>0&&Ee<Xe.length&&e.jsxs("div",{ref:Te,className:"flex items-center justify-center py-4 text-fg-muted",children:[e.jsx(y,{className:"w-4 h-4 animate-spin mr-2"}),e.jsx("span",{className:"text-xs",children:"Loading more..."})]}),e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-t border-edge-subtle/50 text-xs text-fg-muted",children:[e.jsxs("span",{className:"tabular-nums",children:["Showing ",ts.length," of ",Xe.length]}),Fe>0&&Ee<Xe.length&&e.jsx("button",{onClick:()=>He(e=>Math.min(e+Fe,Xe.length)),className:"text-sys-blue hover:text-sys-blue/80 transition-base",children:"Load more"})]})]}):e.jsxs("div",{className:"roster-empty",children:[e.jsx(ie,{className:"roster-empty-icon"}),e.jsx("div",{className:"type-label text-fg-secondary",children:"No Contacts Discovered"}),e.jsx("div",{className:"type-data-xs text-fg-muted mt-1",children:"Contacts will appear here as they advertise on the mesh network."})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-edge-subtle",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"w-32 h-4 rounded bg-elevated animate-pulse"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-16 h-6 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"w-24 h-6 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"w-16 h-6 rounded bg-elevated animate-pulse"})]})]}),e.jsx("div",{className:"px-3 py-3 space-y-3",children:[...Array(5)].map((s,t)=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-5 h-5 rounded bg-elevated animate-pulse"}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("div",{className:"h-4 w-32 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"h-3 w-24 rounded bg-elevated animate-pulse"})]}),e.jsx("div",{className:"w-12 h-4 rounded bg-elevated animate-pulse"}),e.jsx("div",{className:"w-16 h-4 rounded bg-elevated animate-pulse"})]},t))})]})})]}),e.jsx(le,{isOpen:!!J,title:"Remove Contact",message:`Are you sure you would like to remove ${(null==J?void 0:J.name)||"this contact"}?`,confirmLabel:"Remove",cancelLabel:"Cancel",variant:"danger",onConfirm:()=>{J&&l(J.hash),Y(null)},onCancel:()=>Y(null)})]})}},Symbol.toStringTag,{value:"Module"}));export{Ze as C,Ue as P,Me as R};