Files
pymc_console-dist/frontend/dist/assets/ContactsMapMapLibre-BjK-CBHQ.js
T
GitHub Actions Bot cbbe0885d9 Release v0.6.80
Automated sync from private repository.
Built with obfuscation enabled.
2025-12-28 06:08:29 +00:00

2 lines
116 KiB
JavaScript

import{c as e,j as t,G as n,af as r,ag as o,f as a,ah as i}from"./index-B6-Tf7Us.js";import{b as l,g as s,c,r as u}from"./recharts-CGff6_7g.js";import{a as d,P as f,S as h,L as p,u as m,M as g,N as b,b as v}from"./maplibre-gl-BvGn-5PG.js";import{G as y,N as x,T as w,M as k,C as N}from"./Contacts-BZR6NcHa.js";import{a as S,C}from"./HashBadge-FDCoxkyp.js";import{L as E}from"./loader-circle-C2kvqjon.js";import{I as M}from"./info-C0zIl40Z.js";import{H as F}from"./house-WnSsxGne.js";import{R}from"./refresh-cw-CVIyJuD4.js";import{N as $}from"./trending-up-DXidjRmZ.js";import"./maplibre-gl-DsiI67my.js";import"./SignalIndicator-B33CfoYD.js";import"./triangle-alert-CS-3a-_T.js";import"./zap-C-F6fb7u.js";import"./activity-BXwm1AwF.js";import"./PageLayout-7JDu0Wyr.js";import"./users-DK9zLFN_.js";const H=e("chart-no-axes-column",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]]),T=e("chevrons-left-right-ellipsis",[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"m17 7 5 5-5 5",key:"1xlxn0"}],["path",{d:"m7 7-5 5 5 5",key:"19njba"}],["path",{d:"M8 12h.01",key:"czm47f"}]]),j=e("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),D=e("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),I=e("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),P=e("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),z=e("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);function A(e,t){const n=Math.max(5,Math.min(e,300)),r=Math.log(5),o=Math.log(300);return 1+(Math.log(n)-r)/(o-r)*5}const L="#4338CA";function O({label:e,icon:n,status:r,detail:o}){return t.jsxs("div",{className:c("flex items-center gap-3 py-3 px-4 rounded-xl transition-all duration-300","active"===r&&"bg-[#4338CA]/10","complete"===r&&"bg-accent-success/10","pending"===r&&"opacity-40"),children:[t.jsx("div",{className:c("w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 transition-all duration-300","active"===r&&"bg-[#4338CA]/20","complete"===r&&"bg-accent-success/20","pending"===r&&"bg-white/5"),children:"complete"===r?t.jsx(S,{className:"w-4 h-4 text-accent-success"}):"active"===r?t.jsx(E,{className:"w-4 h-4 animate-spin",style:{color:L}}):t.jsx("span",{className:"text-text-muted",children:n})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:c("text-sm font-medium transition-colors","active"===r&&"text-[#4338CA]","complete"===r&&"text-accent-success","pending"===r&&"text-text-muted"),children:e}),o&&"pending"!==r&&t.jsx("div",{className:"text-xs text-text-muted mt-0.5 truncate",children:o})]})]})}const B=l.memo(function({isOpen:e,currentStep:n,packetCount:r,onClose:o}){if(l.useEffect(()=>{if(!e)return;const t=e=>{"Escape"===e.key&&o&&o()};window.addEventListener("keydown",t);const n=document.body.style.overflow,r=document.body.style.position,a=document.body.style.width,i=document.body.style.top,l=window.scrollY;return document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.top=`-${l}px`,()=>{window.removeEventListener("keydown",t),document.body.style.overflow=n,document.body.style.position=r,document.body.style.width=a,document.body.style.top=i,window.scrollTo(0,l)}},[e,o]),!e)return null;const a="complete"===n,i=e=>{const t=["fetching","analyzing","building","complete"],r=t.indexOf(n),o=t.indexOf(e);return o<r?"complete":o===r?"active":"pending"};return s.createPortal(t.jsxs("div",{className:"fixed inset-0 z-[10010] flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"deep-analysis-modal-title",children:[t.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm"}),t.jsx("div",{className:"relative glass-card w-full max-w-sm mx-4 p-6 animate-in fade-in zoom-in-95 duration-200",style:{background:"rgba(20, 20, 22, 0.95)",border:"1px solid rgba(140, 160, 200, 0.15)"},children:a?t.jsxs("div",{className:"flex flex-col items-center py-6",children:[t.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mb-4 animate-in zoom-in-50 duration-300",style:{backgroundColor:"rgba(57, 217, 138, 0.2)"},children:t.jsx(S,{className:"w-8 h-8 text-accent-success"})}),t.jsx("h3",{className:"text-lg font-semibold text-accent-success",children:"Ready!"})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[t.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center",style:{backgroundColor:"rgba(67, 56, 202, 0.15)"},children:t.jsx(y,{className:"w-5 h-5",style:{color:L}})}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-base font-semibold text-text-primary",children:"Deep Analysis"}),t.jsx("p",{className:"text-xs text-text-muted",children:"Building mesh topology"})]})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(O,{label:"Fetching Packets",icon:t.jsx(D,{className:"w-4 h-4"}),status:i("fetching"),detail:r>0?`${r.toLocaleString()} packets`:"Loading database..."}),t.jsx(O,{label:"Analyzing Database",icon:t.jsx(j,{className:"w-4 h-4"}),status:i("analyzing"),detail:"Processing packet paths"}),t.jsx(O,{label:"Building Topology",icon:t.jsx(y,{className:"w-4 h-4"}),status:i("building"),detail:"Computing mesh edges"})]}),t.jsx("p",{className:"text-xs text-text-muted text-center mt-5",children:"This may take a few seconds..."})]})})]}),document.body)}),W="#4338CA",_="#FBBF24",q="#6366F1",V="#F97316",Z="#F59E0B",K="#FBBF24",U="#4B5563",G="#6B7280",X="#374151",Y="#5EEAD4",J="#6366F1",Q="#9CA3AF",ee="#6B7280",te="#FBBF24",ne=2e3;function re({text:e}){return t.jsxs("span",{className:"group relative cursor-help",children:[t.jsx(M,{className:"w-3 h-3 text-text-muted"}),t.jsx("div",{className:"absolute bottom-full left-0 mb-1 hidden group-hover:block w-44 p-2 text-[10px] leading-tight rounded-lg z-10",style:{background:"rgba(20, 20, 22, 0.98)",border:"1px solid rgba(140, 160, 200, 0.3)"},children:e})]})}function oe(e){const t=new Date(1e3*e);return`${(t.getMonth()+1).toString().padStart(2,"0")}/${t.getDate().toString().padStart(2,"0")}`}function ae({hash:e,hashPrefix:r,name:o,isHub:a,isZeroHop:i,isMobile:s,isRoomServer:c,isStale:u,lastSeenTimestamp:d,centrality:f,affinity:h,meanSnr:p,meanRssi:m,neighbor:g,onRemove:b,txDelayRec:v}){var y,k;const[N,E]=l.useState(!1),M=i?"Direct":(null==h?void 0:h.typicalHopPosition)?`${h.typicalHopPosition}-hop`:null,F=[{label:"Packets",value:(null==h?void 0:h.frequency)||0},{label:"Adverts",value:g.advert_count||0}];i&&void 0!==p?F.push({label:"SNR",value:`${p.toFixed(1)} dB`}):a&&f>0&&F.push({label:"Centrality",value:`${(100*f).toFixed(0)}%`,highlight:!0}),i&&void 0!==m&&F.push({label:"RSSI",value:`${Math.round(m)} dBm`});const R=v&&!v.insufficientData;return t.jsxs("div",{className:"w-[220px] pr-3",children:[t.jsx("div",{className:"text-[14px] font-semibold text-text-primary leading-snug truncate mb-0.5",children:o}),t.jsxs("div",{className:"flex items-center gap-1 flex-wrap mb-1.5",children:[t.jsx("code",{className:"font-mono text-[10px] text-text-muted/70 bg-white/5 px-1 py-px rounded",children:r}),t.jsx("button",{onClick:()=>{navigator.clipboard.writeText(e),E(!0),setTimeout(()=>E(!1),1500)},className:"p-0.5 hover:bg-white/10 rounded transition-colors",title:"Copy full hash",children:N?t.jsx(S,{className:"w-2.5 h-2.5 text-accent-success"}):t.jsx(C,{className:"w-2.5 h-2.5 text-text-muted/50"})}),a&&t.jsx("span",{className:"px-1 py-px text-[8px] font-bold uppercase rounded",style:{backgroundColor:"#FBBF24",color:"#000"},children:"Hub"}),M&&t.jsx("span",{className:"px-1 py-px text-[8px] font-bold uppercase rounded",style:{backgroundColor:i?K:"rgba(255,255,255,0.08)",color:i?"#000":"rgba(255,255,255,0.5)"},children:M}),s&&t.jsx("span",{className:"px-1 py-px text-[8px] font-bold uppercase rounded bg-orange-500/25 text-orange-300",children:"Mobile"}),g.is_repeater&&t.jsx("span",{className:"px-1 py-px text-[8px] font-bold uppercase rounded bg-cyan-500/20 text-cyan-400",children:"Rptr"}),c&&t.jsx("span",{className:"px-1 py-px text-[8px] font-bold uppercase rounded bg-amber-500/25 text-amber-400",children:"Room"}),u&&d&&t.jsxs("span",{className:"px-1 py-px text-[8px] font-medium rounded bg-gray-500/30 text-gray-300",title:"Neighbor not heard in 7+ days",children:["Idle ",oe(d)]})]}),t.jsxs("div",{className:"text-[10px] text-text-muted/60 mb-2 leading-tight",children:[t.jsx("span",{children:n(g.last_seen)}),(null==h?void 0:h.distanceMeters)&&t.jsxs("span",{className:"font-medium text-text-muted/80",children:[" · ",($=h.distanceMeters,null===$?"—":$<1e3?`${Math.round($)}m`:`${($/1e3).toFixed(1)}km`)]}),g.latitude&&g.longitude&&0!==g.latitude&&0!==g.longitude&&t.jsxs("span",{className:"font-mono text-[9px]",children:[" · ",g.latitude.toFixed(4),", ",g.longitude.toFixed(4)]})]}),t.jsx("div",{className:"mb-2",children:t.jsx(x,{nodeHash:e,width:"100%",height:28,showArea:!0,showTooltip:!0})}),t.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-0.5 text-[11px] mb-2",children:F.map((e,n)=>t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-text-muted/50",children:e.label}),t.jsx("span",{className:"font-semibold tabular-nums "+("highlight"in e&&e.highlight?"text-amber-400":""),children:e.value})]},n))}),(R||b)&&t.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1.5 border-t border-white/5",children:[R?t.jsxs("div",{className:"flex flex-col gap-0.5 text-[10px] text-text-muted/60",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"uppercase text-[8px] font-semibold tracking-wide text-text-muted/40",children:"TX"}),void 0!==v.floodSlots?t.jsxs(t.Fragment,{children:[t.jsxs("span",{children:["F ",t.jsxs("span",{className:"font-semibold tabular-nums "+("low"===v.dataConfidence?"text-amber-400/50":"text-amber-400"),children:[null==(y=v.floodDelaySec)?void 0:y.toFixed(1),"s"]}),t.jsxs("span",{className:"text-text-muted/40",children:[" (",v.floodSlots,")"]})]}),t.jsxs("span",{children:["D ",t.jsxs("span",{className:"font-semibold tabular-nums "+("low"===v.dataConfidence?"text-amber-400/50":"text-amber-400"),children:[null==(k=v.directDelaySec)?void 0:k.toFixed(1),"s"]}),t.jsxs("span",{className:"text-text-muted/40",children:[" (",v.directSlots,")"]})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("span",{children:["F ",t.jsx("span",{className:"font-semibold text-amber-400 tabular-nums",children:v.txDelayFactor.toFixed(2)})]}),t.jsxs("span",{children:["D ",t.jsx("span",{className:"font-semibold text-amber-400 tabular-nums",children:v.directTxDelayFactor.toFixed(2)})]})]}),"low"===v.dataConfidence&&t.jsx("span",{className:"text-[9px] text-amber-500",title:"Low confidence - limited data or asymmetric traffic",children:"⚠️"}),"high"===v.dataConfidence&&t.jsx("span",{className:"text-[9px] text-green-400",title:"High confidence - good bidirectional visibility",children:"✓"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[v.networkRole&&t.jsx("span",{className:"text-[9px] text-text-muted/40 capitalize",children:v.networkRole}),void 0!==v.observationSymmetry&&t.jsxs("span",{className:"text-[9px] "+(v.observationSymmetry>=.5?"text-green-400/60":v.observationSymmetry<.3?"text-amber-500/60":"text-text-muted/40"),title:`Edge symmetry: ${Math.round(100*v.observationSymmetry)}% bidirectional`,children:[v.observationSymmetry>=.5?"↔":v.observationSymmetry<.3?"→":"⇄",Math.round(100*v.observationSymmetry),"%"]})]})]}):t.jsx("div",{}),b&&t.jsx("button",{onClick:b,className:"flex items-center gap-0.5 p-1 text-[10px] text-text-muted/30 hover:text-red-400 hover:bg-red-500/10 rounded transition-colors",title:"Remove from contacts",children:t.jsx(w,{className:"w-3 h-3"})})]})]});var $}function ie({showTopology:e,validatedPolylineCount:n,filteredNeighborCount:r,hasLocalNode:o,meshTopology:a,zeroHopNeighbors:i,neighborsWithLocation:l}){return t.jsxs("div",{className:"absolute bottom-4 left-4 z-[600] text-xs",style:{background:"rgba(20, 20, 22, 0.95)",borderRadius:"0.75rem",padding:"0.625rem",border:"1px solid rgba(140, 160, 200, 0.2)",maxWidth:"150px"},children:[t.jsxs("div",{className:"text-text-secondary font-medium mb-1.5 flex items-center gap-1",children:["Nodes",t.jsx(re,{text:"Node type shown by shape/color. Yellow outer ring = direct RF neighbor."})]}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("div",{className:"w-3 h-3 rounded-full flex-shrink-0",style:{background:"transparent",border:`3px solid ${W}`,boxSizing:"border-box"}}),t.jsx("span",{className:"text-text-muted",children:"Node"})]}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("div",{className:"w-3 h-3 rounded-full flex-shrink-0",style:{backgroundColor:q}}),t.jsx("span",{className:"text-text-muted",children:"Hub"})]}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(F,{className:"w-3 h-3 flex-shrink-0",style:{color:_},strokeWidth:2.5}),t.jsx("span",{className:"text-text-muted",children:"Local"})]}),(s=l,s.some(([,e])=>{var t;const n=null==(t=e.contact_type)?void 0:t.toLowerCase();return"room server"===n||"room_server"===n||"room"===n||"server"===n})&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(k,{className:"w-3 h-3 flex-shrink-0",style:{color:Z},strokeWidth:2.5}),t.jsx("span",{className:"text-text-muted",children:"Room"})]})),a.mobileNodes.length>0&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("div",{className:"w-3 h-3 rounded-full flex-shrink-0",style:{background:"transparent",border:`3px solid ${V}`,boxSizing:"border-box"}}),t.jsx("span",{className:"text-text-muted",children:"Mobile"})]}),i.size>0&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsxs("div",{className:"relative w-4 h-4 flex-shrink-0",children:[t.jsx("div",{className:"absolute inset-0 rounded-full",style:{background:"transparent",border:`1px solid ${K}`,boxSizing:"border-box",opacity:.8}}),t.jsx("div",{className:"absolute rounded-full",style:{top:"4px",left:"4px",width:"8px",height:"8px",background:"transparent",border:`2px solid ${W}`,boxSizing:"border-box"}})]}),t.jsx("span",{className:"text-text-muted",children:"Neighbor"})]})]}),i.size>0&&t.jsx("div",{className:"mt-1.5 pt-1.5 border-t border-white/10",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("div",{className:"flex-shrink-0",style:{width:"14px",height:"2px",backgroundImage:`repeating-linear-gradient(90deg, ${ee} 0, ${ee} 3px, transparent 3px, transparent 5px)`,borderRadius:"1px"}}),t.jsx("span",{className:"text-text-muted",children:"Neighbor"}),t.jsx(re,{text:"Dashed gray → yellow on hover. Direct RF contact with local."})]})}),e&&n>0&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"text-text-secondary font-medium mt-2 pt-2 border-t border-white/10 mb-1 flex items-center gap-1",children:["Topology",t.jsx(re,{text:"Links with 5+ validations. Thickness = relative strength."})]}),t.jsxs("div",{className:"flex flex-col gap-0.5 text-text-muted",children:[t.jsxs("div",{className:"flex justify-between tabular-nums",children:[t.jsx("span",{children:"Nodes"}),t.jsx("span",{className:"text-text-secondary",children:r+(o?1:0)})]}),t.jsxs("div",{className:"flex justify-between tabular-nums",children:[t.jsx("span",{children:"Links"}),t.jsx("span",{className:"text-text-secondary",children:n})]}),a.hubNodes.length>0&&t.jsxs("div",{className:"flex justify-between tabular-nums",children:[t.jsx("span",{children:"Hubs"}),t.jsx("span",{style:{color:q},children:a.hubNodes.length})]})]}),t.jsxs("div",{className:"flex flex-col gap-1 mt-1.5 pt-1.5 border-t border-white/10",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("div",{className:"flex-shrink-0",style:{width:"14px",height:"3px",backgroundColor:U,borderRadius:"1px"}}),t.jsx("span",{className:"text-text-muted",children:"Link"}),t.jsx(re,{text:"Gray at rest. Hover to reveal type (teal=direct, indigo=loop)."})]}),a.loops.length>0&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsxs("div",{className:"flex-shrink-0 flex flex-col gap-0.5",style:{width:"14px"},children:[t.jsx("div",{style:{height:"2px",backgroundColor:U,borderRadius:"1px"}}),t.jsx("div",{style:{height:"2px",backgroundColor:U,borderRadius:"1px"}})]}),t.jsx("span",{className:"text-text-muted",children:"Redundant"})]})]}),a.loops.length>0&&t.jsx("div",{className:"mt-1.5 pt-1.5 border-t border-white/10",children:t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(R,{className:"w-3 h-3 flex-shrink-0",style:{color:J}}),t.jsxs("div",{className:"flex flex-col",children:[t.jsxs("span",{style:{color:J},className:"font-medium",children:[a.loops.length," ",1===a.loops.length?"Loop":"Loops"]}),t.jsx("span",{className:"text-text-muted text-[10px] leading-tight",children:"Redundant paths"})]})]})})]})]});var s}const le={background:"rgba(20, 20, 22, 0.95)",borderRadius:"0.75rem",border:"1px solid rgba(140, 160, 200, 0.2)"},se=(e,t=.4)=>({background:e,borderRadius:"0.75rem",border:`1px solid ${e.replace(/[\d.]+\)$/,`${t})`)}`});function ce({isDeepLoading:e,showDeepAnalysisModal:n,onDeepAnalysis:r,showTopology:o,onToggleTopology:a,hasValidatedPolylines:i,soloHubs:l,onToggleSoloHubs:s,hasHubNodes:c,soloDirect:u,onToggleSoloDirect:d,hasZeroHopNeighbors:f,isFullscreen:h,onToggleFullscreen:p}){return t.jsxs("div",{className:"absolute top-4 right-4 z-[600] flex gap-2",children:[t.jsxs("button",{onClick:r,disabled:e||n,className:"px-3 py-2 flex items-center gap-2 transition-colors hover:bg-white/10 disabled:opacity-50 disabled:cursor-not-allowed",style:le,title:"Deep Analysis - Load full packet history and rebuild topology",children:[t.jsx("span",{className:"text-xs font-medium text-text-primary",children:"Deep Analysis"}),t.jsx(H,{className:"w-4 h-4 text-accent-primary"})]}),i&&t.jsx("button",{onClick:a,className:"p-2 transition-colors hover:bg-white/10",style:o?se("rgba(74, 222, 128, 0.2)"):le,title:o?"Hide topology lines":"Show topology lines",children:o?t.jsx(y,{className:"w-4 h-4 text-green-400"}):t.jsx(I,{className:"w-4 h-4 text-text-secondary"})}),c&&t.jsx("button",{onClick:s,className:"p-2 transition-colors hover:bg-white/10",style:l?{...le,background:"rgba(251, 191, 36, 0.25)",border:"1px solid rgba(251, 191, 36, 0.5)"}:le,title:l?"Show all nodes":"Solo hubs & connections",children:t.jsx($,{className:"w-4 h-4 "+(l?"text-amber-400":"text-text-secondary")})}),f&&t.jsx("button",{onClick:d,className:"p-2 transition-colors hover:bg-white/10",style:u?{...le,background:"rgba(67, 56, 202, 0.35)",border:"1px solid rgba(67, 56, 202, 0.6)"}:le,title:u?"Show all nodes":"Solo direct (0-hop) nodes",children:t.jsx(T,{className:"w-4 h-4 "+(u?"text-indigo-400":"text-text-secondary")})}),t.jsx("button",{onClick:p,className:"p-2 transition-colors hover:bg-white/10",style:le,title:h?"Exit fullscreen":"Fullscreen",children:h?t.jsx(z,{className:"w-4 h-4 text-text-secondary"}):t.jsx(P,{className:"w-4 h-4 text-text-secondary"})})]})}function ue(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2}function de(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2}var fe,he={},pe={};var me,ge,be={};var ve,ye,xe=(ge||(ge=1,ve=function(){if(fe)return pe;fe=1;var e=u();function t(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=Object.prototype.hasOwnProperty,r=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,o={},a={};function i(e){return!!n.call(a,e)||!n.call(o,e)&&(r.test(e)?a[e]=!0:(o[e]=!0,!1))}function l(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var s={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){s[e]=new l(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];s[t]=new l(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){s[e]=new l(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){s[e]=new l(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){s[e]=new l(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){s[e]=new l(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){s[e]=new l(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){s[e]=new l(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){s[e]=new l(e,5,!1,e.toLowerCase(),null,!1,!1)});var c=/[\-:]([a-z])/g;function d(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(c,d);s[t]=new l(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(c,d);s[t]=new l(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(c,d);s[t]=new l(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){s[e]=new l(e,1,!1,e.toLowerCase(),null,!1,!1)}),s.xlinkHref=new l("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){s[e]=new l(e,1,!1,e.toLowerCase(),null,!0,!0)});var f={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},h=["Webkit","ms","Moz","O"];Object.keys(f).forEach(function(e){h.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),f[t]=f[e]})});var p=/["'&<>]/;function m(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=p.exec(e);if(t){var n,r="",o=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}o!==n&&(r+=e.substring(o,n)),o=n+1,r+=t}e=o!==n?r+e.substring(o,n):r}return e}var g=/([A-Z])/g,b=/^ms-/,v=Array.isArray;function y(e,t){return{insertionMode:e,selectedValue:t}}var x=new Map;function w(e,r,o){if("object"!=typeof o)throw Error(t(62));for(var a in r=!0,o)if(n.call(o,a)){var i=o[a];if(null!=i&&"boolean"!=typeof i&&""!==i){if(0===a.indexOf("--")){var l=m(a);i=m((""+i).trim())}else{l=a;var s=x.get(l);void 0!==s||(s=m(l.replace(g,"-$1").toLowerCase().replace(b,"-ms-")),x.set(l,s)),l=s,i="number"==typeof i?0===i||n.call(f,a)?""+i:i+"px":m((""+i).trim())}r?(r=!1,e.push(' style="',l,":",i)):e.push(";",l,":",i)}}r||e.push('"')}function k(e,t,n,r){switch(n){case"style":return void w(e,t,r);case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])if(null!==(t=s.hasOwnProperty(n)?s[n]:null)){switch(typeof r){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(n=t.attributeName,t.type){case 3:r&&e.push(" ",n,'=""');break;case 4:!0===r?e.push(" ",n,'=""'):!1!==r&&e.push(" ",n,'="',m(r),'"');break;case 5:isNaN(r)||e.push(" ",n,'="',m(r),'"');break;case 6:!isNaN(r)&&1<=r&&e.push(" ",n,'="',m(r),'"');break;default:t.sanitizeURL&&(r=""+r),e.push(" ",n,'="',m(r),'"')}}else if(i(n)){switch(typeof r){case"function":case"symbol":return;case"boolean":if("data-"!==(t=n.toLowerCase().slice(0,5))&&"aria-"!==t)return}e.push(" ",n,'="',m(r),'"')}}function N(e,n,r){if(null!=n){if(null!=r)throw Error(t(60));if("object"!=typeof n||!("t"in n))throw Error(t(61));null!=(n=n.t)&&e.push(""+n)}}function S(e,t,r,o){e.push(M(r));var a,i=r=null;for(a in t)if(n.call(t,a)){var l=t[a];if(null!=l)switch(a){case"children":r=l;break;case"dangerouslySetInnerHTML":i=l;break;default:k(e,o,a,l)}}return e.push(">"),N(e,i,r),"string"==typeof r?(e.push(m(r)),null):r}var C=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,E=new Map;function M(e){var n=E.get(e);if(void 0===n){if(!C.test(e))throw Error(t(65,e));n="<"+e,E.set(e,n)}return n}function F(e,n,r){if(e.push('\x3c!--$?--\x3e<template id="'),null===r)throw Error(t(395));return e.push(r),e.push('"></template>')}var R=/[<\u2028\u2029]/g;function $(e){return JSON.stringify(e).replace(R,function(e){switch(e){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function H(e,t,n,r){return n.generateStaticMarkup?(e.push(m(t)),!1):(""===t?e=r:(r&&e.push("\x3c!-- --\x3e"),e.push(m(t)),e=!0),e)}var T=Object.assign,j=Symbol.for("react.element"),D=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),L=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),V=Symbol.for("react.scope"),Z=Symbol.for("react.debug_trace_mode"),K=Symbol.for("react.legacy_hidden"),U=Symbol.for("react.default_value"),G=Symbol.iterator;function X(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case I:return"Fragment";case D:return"Portal";case z:return"Profiler";case P:return"StrictMode";case B:return"Suspense";case W:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case L:return(e.displayName||"Context")+".Consumer";case A:return(e.o.displayName||"Context")+".Provider";case O:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case _:return null!==(t=e.displayName||null)?t:X(e.type)||"Memo";case q:t=e.i,e=e.l;try{return X(e(t))}catch(n){}}return null}var Y={};function J(e,t){if(!(e=e.contextTypes))return Y;var n,r={};for(n in e)r[n]=t[n];return r}var Q=null;function ee(e,n){if(e!==n){e.context.u=e.parentValue,e=e.parent;var r=n.parent;if(null===e){if(null!==r)throw Error(t(401))}else{if(null===r)throw Error(t(401));ee(e,r)}n.context.u=n.value}}function te(e){e.context.u=e.parentValue,null!==(e=e.parent)&&te(e)}function ne(e){var t=e.parent;null!==t&&ne(t),e.context.u=e.value}function re(e,n){if(e.context.u=e.parentValue,null===(e=e.parent))throw Error(t(402));e.depth===n.depth?ee(e,n):re(e,n)}function oe(e,n){var r=n.parent;if(null===r)throw Error(t(402));e.depth===r.depth?ee(e,r):oe(e,r),n.context.u=n.value}function ae(e){var t=Q;t!==e&&(null===t?ne(e):null===e?te(t):t.depth===e.depth?ee(t,e):t.depth>e.depth?re(t,e):oe(t,e),Q=e)}var ie={isMounted:function(){return!1},enqueueSetState:function(e,t){null!==(e=e.h).queue&&e.queue.push(t)},enqueueReplaceState:function(e,t){(e=e.h).replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function le(e,t,n,r){var o=void 0!==e.state?e.state:null;e.updater=ie,e.props=n,e.state=o;var a={queue:[],replace:!1};e.h=a;var i=t.contextType;if(e.context="object"==typeof i&&null!==i?i.u:r,"function"==typeof(i=t.getDerivedStateFromProps)&&(o=null==(i=i(n,o))?o:T({},o,i),e.state=o),"function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate&&("function"==typeof e.UNSAFE_componentWillMount||"function"==typeof e.componentWillMount))if(t=e.state,"function"==typeof e.componentWillMount&&e.componentWillMount(),"function"==typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),t!==e.state&&ie.enqueueReplaceState(e,e.state,null),null!==a.queue&&0<a.queue.length)if(t=a.queue,i=a.replace,a.queue=null,a.replace=!1,i&&1===t.length)e.state=t[0];else{for(a=i?t[0]:e.state,o=!0,i=i?1:0;i<t.length;i++){var l=t[i];null!=(l="function"==typeof l?l.call(e,a,n,r):l)&&(o?(o=!1,a=T({},a,l)):T(a,l))}e.state=a}else a.queue=null}var se={id:1,overflow:""};function ce(e,t,n){var r=e.id;e=e.overflow;var o=32-ue(r)-1;r&=~(1<<o),n+=1;var a=32-ue(t)+o;if(30<a){var i=o-o%5;return a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,{id:1<<32-ue(t)+o|n<<o|r,overflow:a+e}}return{id:1<<a|n<<o|r,overflow:e}}var ue=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(de(e)/he|0)|0},de=Math.log,he=Math.LN2,me="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ge=null,be=null,ve=null,ye=null,xe=!1,we=!1,ke=0,Ne=null,Se=0;function Ce(){if(null===ge)throw Error(t(321));return ge}function Ee(){if(0<Se)throw Error(t(312));return{memoizedState:null,queue:null,next:null}}function Me(){return null===ye?null===ve?(xe=!1,ve=ye=Ee()):(xe=!0,ye=ve):null===ye.next?(xe=!1,ye=ye.next=Ee()):(xe=!0,ye=ye.next),ye}function Fe(){be=ge=null,we=!1,ve=null,Se=0,ye=Ne=null}function Re(e,t){return"function"==typeof t?t(e):t}function $e(e,t,n){if(ge=Ce(),ye=Me(),xe){var r=ye.queue;if(t=r.dispatch,null!==Ne&&void 0!==(n=Ne.get(r))){Ne.delete(r),r=ye.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return ye.memoizedState=r,[r,t]}return[ye.memoizedState,t]}return e=e===Re?"function"==typeof t?t():t:void 0!==n?n(t):t,ye.memoizedState=e,e=(e=ye.queue={last:null,dispatch:null}).dispatch=Te.bind(null,ge,e),[ye.memoizedState,e]}function He(e,t){if(ge=Ce(),t=void 0===t?null:t,null!==(ye=Me())){var n=ye.memoizedState;if(null!==n&&null!==t){var r=n[1];e:if(null===r)r=!1;else{for(var o=0;o<r.length&&o<t.length;o++)if(!me(t[o],r[o])){r=!1;break e}r=!0}if(r)return n[0]}}return e=e(),ye.memoizedState=[e,t],e}function Te(e,n,r){if(25<=Se)throw Error(t(301));if(e===ge)if(we=!0,e={action:r,next:null},null===Ne&&(Ne=new Map),void 0===(r=Ne.get(n)))Ne.set(n,e);else{for(n=r;null!==n.next;)n=n.next;n.next=e}}function je(){throw Error(t(394))}function De(){}var Ie={readContext:function(e){return e.u},useContext:function(e){return Ce(),e.u},useMemo:He,useReducer:$e,useRef:function(e){ge=Ce();var t=(ye=Me()).memoizedState;return null===t?(e={current:e},ye.memoizedState=e):t},useState:function(e){return $e(Re,e)},useInsertionEffect:De,useLayoutEffect:function(){},useCallback:function(e,t){return He(function(){return e},t)},useImperativeHandle:De,useEffect:De,useDebugValue:De,useDeferredValue:function(e){return Ce(),e},useTransition:function(){return Ce(),[!1,je]},useId:function(){var e=be.treeContext,n=e.overflow;e=((e=e.id)&~(1<<32-ue(e)-1)).toString(32)+n;var r=Pe;if(null===r)throw Error(t(404));return n=ke++,e=":"+r.idPrefix+"R"+e,0<n&&(e+="H"+n.toString(32)),e+":"},useMutableSource:function(e,t){return Ce(),t(e.p)},useSyncExternalStore:function(e,n,r){if(void 0===r)throw Error(t(407));return r()}},Pe=null,ze=e.m.ReactCurrentDispatcher;function Ae(e){return null}function Le(){}function Oe(e,t,n,r,o,a,i,l){e.allPendingTasks++,null===n?e.pendingRootTasks++:n.pendingTasks++;var s={node:t,ping:function(){var t=e.pingedTasks;t.push(s),1===t.length&&tt(e)},blockedBoundary:n,blockedSegment:r,abortSet:o,legacyContext:a,context:i,treeContext:l};return o.add(s),s}function Be(e,t,n,r,o,a){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:n,lastPushedText:o,textEmbedded:a}}function We(e,t){if(null!=(e=e.onError(t))&&"string"!=typeof e)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof e+'" instead');return e}function _e(e,t){var n=e.onShellError;n(t),(n=e.onFatalError)(t),null!==e.destination?(e.status=2,e.destination.destroy(t)):(e.status=1,e.fatalError=t)}function qe(e,t,n,r,o){for(ge={},be=t,ke=0,e=n(r,o);we;)we=!1,ke=0,Se+=1,ye=null,e=n(r,o);return Fe(),e}function Ve(e,n,r,o){var a=r.render(),i=o.childContextTypes;if(null!=i){var l=n.legacyContext;if("function"!=typeof r.getChildContext)o=l;else{for(var s in r=r.getChildContext())if(!(s in i))throw Error(t(108,X(o)||"Unknown",s));o=T({},l,r)}n.legacyContext=o,Ue(e,n,a),n.legacyContext=l}else Ue(e,n,a)}function Ze(e,t){if(e&&e.defaultProps){for(var n in t=T({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function Ke(r,o,a,l,s){if("function"==typeof a)if(a.prototype&&a.prototype.isReactComponent){s=J(a,o.legacyContext);var c=a.contextType;le(c=new a(l,"object"==typeof c&&null!==c?c.u:s),a,l,s),Ve(r,o,c,a)}else{s=qe(r,o,a,l,c=J(a,o.legacyContext));var u=0!==ke;if("object"==typeof s&&null!==s&&"function"==typeof s.render&&void 0===s.$$typeof)le(s,a,l,c),Ve(r,o,s,a);else if(u){l=o.treeContext,o.treeContext=ce(l,1,0);try{Ue(r,o,s)}finally{o.treeContext=l}}else Ue(r,o,s)}else{if("string"!=typeof a){switch(a){case K:case Z:case P:case z:case I:case W:return void Ue(r,o,l.children);case V:throw Error(t(343));case B:e:{a=o.blockedBoundary,s=o.blockedSegment,c=l.fallback,l=l.children;var d={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:u=new Set,errorDigest:null},f=Be(0,s.chunks.length,d,s.formatContext,!1,!1);s.children.push(f),s.lastPushedText=!1;var h=Be(0,0,null,s.formatContext,!1,!1);h.parentFlushed=!0,o.blockedBoundary=d,o.blockedSegment=h;try{if(Xe(r,o,l),r.responseState.generateStaticMarkup||h.lastPushedText&&h.textEmbedded&&h.chunks.push("\x3c!-- --\x3e"),h.status=1,Qe(d,h),0===d.pendingTasks)break e}catch(p){h.status=4,d.forceClientRender=!0,d.errorDigest=We(r,p)}finally{o.blockedBoundary=a,o.blockedSegment=s}o=Oe(r,c,a,f,u,o.legacyContext,o.context,o.treeContext),r.pingedTasks.push(o)}return}if("object"==typeof a&&null!==a)switch(a.$$typeof){case O:if(l=qe(r,o,a.render,l,s),0!==ke){a=o.treeContext,o.treeContext=ce(a,1,0);try{Ue(r,o,l)}finally{o.treeContext=a}}else Ue(r,o,l);return;case _:return void Ke(r,o,a=a.type,l=Ze(a,l),s);case A:if(s=l.children,a=a.o,l=l.value,c=a.u,a.u=l,Q=l={parent:u=Q,depth:null===u?0:u.depth+1,context:a,parentValue:c,value:l},o.context=l,Ue(r,o,s),null===(r=Q))throw Error(t(403));return l=r.parentValue,r.context.u=l===U?r.context.v:l,r=Q=r.parent,void(o.context=r);case L:return void Ue(r,o,l=(l=l.children)(a.u));case q:return void Ke(r,o,a=(s=a.l)(a.i),l=Ze(a,l),void 0)}throw Error(t(130,null==a?a:typeof a,""))}switch(c=function(r,o,a,l,s){switch(o){case"select":r.push(M("select"));var c=null,u=null;for(p in a)if(n.call(a,p)){var d=a[p];if(null!=d)switch(p){case"children":c=d;break;case"dangerouslySetInnerHTML":u=d;break;case"defaultValue":case"value":break;default:k(r,l,p,d)}}return r.push(">"),N(r,u,c),c;case"option":u=s.selectedValue,r.push(M("option"));var f=d=null,h=null,p=null;for(c in a)if(n.call(a,c)){var g=a[c];if(null!=g)switch(c){case"children":d=g;break;case"selected":h=g;break;case"dangerouslySetInnerHTML":p=g;break;case"value":f=g;default:k(r,l,c,g)}}if(null!=u)if(a=null!==f?""+f:function(t){var n="";return e.Children.forEach(t,function(e){null!=e&&(n+=e)}),n}(d),v(u)){for(l=0;l<u.length;l++)if(""+u[l]===a){r.push(' selected=""');break}}else""+u===a&&r.push(' selected=""');else h&&r.push(' selected=""');return r.push(">"),N(r,p,d),d;case"textarea":for(d in r.push(M("textarea")),p=u=c=null,a)if(n.call(a,d)&&null!=(f=a[d]))switch(d){case"children":p=f;break;case"value":c=f;break;case"defaultValue":u=f;break;case"dangerouslySetInnerHTML":throw Error(t(91));default:k(r,l,d,f)}if(null===c&&null!==u&&(c=u),r.push(">"),null!=p){if(null!=c)throw Error(t(92));if(v(p)&&1<p.length)throw Error(t(93));c=""+p}return"string"==typeof c&&"\n"===c[0]&&r.push("\n"),null!==c&&r.push(m(""+c)),null;case"input":for(u in r.push(M("input")),f=p=d=c=null,a)if(n.call(a,u)&&null!=(h=a[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,"input"));case"defaultChecked":f=h;break;case"defaultValue":d=h;break;case"checked":p=h;break;case"value":c=h;break;default:k(r,l,u,h)}return null!==p?k(r,l,"checked",p):null!==f&&k(r,l,"checked",f),null!==c?k(r,l,"value",c):null!==d&&k(r,l,"value",d),r.push("/>"),null;case"menuitem":for(var b in r.push(M("menuitem")),a)if(n.call(a,b)&&null!=(c=a[b]))switch(b){case"children":case"dangerouslySetInnerHTML":throw Error(t(400));default:k(r,l,b,c)}return r.push(">"),null;case"title":for(g in r.push(M("title")),c=null,a)if(n.call(a,g)&&null!=(u=a[g]))switch(g){case"children":c=u;break;case"dangerouslySetInnerHTML":throw Error(t(434));default:k(r,l,g,u)}return r.push(">"),c;case"listing":case"pre":for(f in r.push(M(o)),u=c=null,a)if(n.call(a,f)&&null!=(d=a[f]))switch(f){case"children":c=d;break;case"dangerouslySetInnerHTML":u=d;break;default:k(r,l,f,d)}if(r.push(">"),null!=u){if(null!=c)throw Error(t(60));if("object"!=typeof u||!("t"in u))throw Error(t(61));null!=(a=u.t)&&("string"==typeof a&&0<a.length&&"\n"===a[0]?r.push("\n",a):r.push(""+a))}return"string"==typeof c&&"\n"===c[0]&&r.push("\n"),c;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":for(var y in r.push(M(o)),a)if(n.call(a,y)&&null!=(c=a[y]))switch(y){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,o));default:k(r,l,y,c)}return r.push("/>"),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return S(r,a,o,l);case"html":return 0===s.insertionMode&&r.push("<!DOCTYPE html>"),S(r,a,o,l);default:if(-1===o.indexOf("-")&&"string"!=typeof a.is)return S(r,a,o,l);for(h in r.push(M(o)),u=c=null,a)if(n.call(a,h)&&null!=(d=a[h]))switch(h){case"children":c=d;break;case"dangerouslySetInnerHTML":u=d;break;case"style":w(r,l,d);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:i(h)&&"function"!=typeof d&&"symbol"!=typeof d&&r.push(" ",h,'="',m(d),'"')}return r.push(">"),N(r,u,c),c}}((s=o.blockedSegment).chunks,a,l,r.responseState,s.formatContext),s.lastPushedText=!1,u=s.formatContext,s.formatContext=function(e,t,n){switch(t){case"select":return y(1,null!=n.value?n.value:n.defaultValue);case"svg":return y(2,null);case"math":return y(3,null);case"foreignObject":return y(1,null);case"table":return y(4,null);case"thead":case"tbody":case"tfoot":return y(5,null);case"colgroup":return y(7,null);case"tr":return y(6,null)}return 4<=e.insertionMode||0===e.insertionMode?y(1,null):e}(u,a,l),Xe(r,o,c),s.formatContext=u,a){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:s.chunks.push("</",a,">")}s.lastPushedText=!1}}function Ue(e,n,r){if(n.node=r,"object"==typeof r&&null!==r){switch(r.$$typeof){case j:return void Ke(e,n,r.type,r.props,r.ref);case D:throw Error(t(257));case q:var o=r.l;return void Ue(e,n,r=o(r.i))}if(v(r))return void Ge(e,n,r);if((o=null===r||"object"!=typeof r?null:"function"==typeof(o=G&&r[G]||r["@@iterator"])?o:null)&&(o=o.call(r))){if(!(r=o.next()).done){var a=[];do{a.push(r.value),r=o.next()}while(!r.done);Ge(e,n,a)}return}throw e=Object.prototype.toString.call(r),Error(t(31,"[object Object]"===e?"object with keys {"+Object.keys(r).join(", ")+"}":e))}"string"==typeof r?(o=n.blockedSegment).lastPushedText=H(n.blockedSegment.chunks,r,e.responseState,o.lastPushedText):"number"==typeof r&&((o=n.blockedSegment).lastPushedText=H(n.blockedSegment.chunks,""+r,e.responseState,o.lastPushedText))}function Ge(e,t,n){for(var r=n.length,o=0;o<r;o++){var a=t.treeContext;t.treeContext=ce(a,r,o);try{Xe(e,t,n[o])}finally{t.treeContext=a}}}function Xe(e,t,n){var r=t.blockedSegment.formatContext,o=t.legacyContext,a=t.context;try{return Ue(e,t,n)}catch(s){if(Fe(),"object"!=typeof s||null===s||"function"!=typeof s.then)throw t.blockedSegment.formatContext=r,t.legacyContext=o,t.context=a,ae(a),s;n=s;var i=t.blockedSegment,l=Be(0,i.chunks.length,null,i.formatContext,i.lastPushedText,!0);i.children.push(l),i.lastPushedText=!1,e=Oe(e,t.node,t.blockedBoundary,l,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=r,t.legacyContext=o,t.context=a,ae(a)}}function Ye(e){var t=e.blockedBoundary;(e=e.blockedSegment).status=3,et(this,t,e)}function Je(e,n,r){var o=e.blockedBoundary;e.blockedSegment.status=3,null===o?(n.allPendingTasks--,2!==n.status&&(n.status=2,null!==n.destination&&n.destination.push(null))):(o.pendingTasks--,o.forceClientRender||(o.forceClientRender=!0,e=void 0===r?Error(t(432)):r,o.errorDigest=n.onError(e),o.parentFlushed&&n.clientRenderedBoundaries.push(o)),o.fallbackAbortableTasks.forEach(function(e){return Je(e,n,r)}),o.fallbackAbortableTasks.clear(),n.allPendingTasks--,0===n.allPendingTasks&&(o=n.onAllReady)())}function Qe(e,t){if(0===t.chunks.length&&1===t.children.length&&null===t.children[0].boundary){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,1===n.status&&Qe(e,n)}else e.completedSegments.push(t)}function et(e,n,r){if(null===n){if(r.parentFlushed){if(null!==e.completedRootSegment)throw Error(t(389));e.completedRootSegment=r}e.pendingRootTasks--,0===e.pendingRootTasks&&(e.onShellError=Le,(n=e.onShellReady)())}else n.pendingTasks--,n.forceClientRender||(0===n.pendingTasks?(r.parentFlushed&&1===r.status&&Qe(n,r),n.parentFlushed&&e.completedBoundaries.push(n),n.fallbackAbortableTasks.forEach(Ye,e),n.fallbackAbortableTasks.clear()):r.parentFlushed&&1===r.status&&(Qe(n,r),1===n.completedSegments.length&&n.parentFlushed&&e.partialBoundaries.push(n)));e.allPendingTasks--,0===e.allPendingTasks&&(e=e.onAllReady)()}function tt(e){if(2!==e.status){var t=Q,n=ze.current;ze.current=Ie;var r=Pe;Pe=e.responseState;try{var o,a=e.pingedTasks;for(o=0;o<a.length;o++){var i=a[o],l=e,s=i.blockedSegment;if(0===s.status){ae(i.context);try{Ue(l,i,i.node),l.responseState.generateStaticMarkup||s.lastPushedText&&s.textEmbedded&&s.chunks.push("\x3c!-- --\x3e"),i.abortSet.delete(i),s.status=1,et(l,i.blockedBoundary,s)}catch(h){if(Fe(),"object"==typeof h&&null!==h&&"function"==typeof h.then){var c=i.ping;h.then(c,c)}else{i.abortSet.delete(i),s.status=4;var u=i.blockedBoundary,d=h,f=We(l,d);null===u?_e(l,d):(u.pendingTasks--,u.forceClientRender||(u.forceClientRender=!0,u.errorDigest=f,u.parentFlushed&&l.clientRenderedBoundaries.push(u))),l.allPendingTasks--,0===l.allPendingTasks&&(0,l.onAllReady)()}}}}a.splice(0,o),null!==e.destination&&lt(e,e.destination)}catch(h){We(e,h),_e(e,h)}finally{Pe=r,ze.current=n,n===Ie&&ae(t)}}}function nt(e,n,r){switch(r.parentFlushed=!0,r.status){case 0:var o=r.id=e.nextSegmentId++;return r.lastPushedText=!1,r.textEmbedded=!1,e=e.responseState,n.push('<template id="'),n.push(e.placeholderPrefix),e=o.toString(16),n.push(e),n.push('"></template>');case 1:r.status=2;var a=!0;o=r.chunks;var i=0;r=r.children;for(var l=0;l<r.length;l++){for(a=r[l];i<a.index;i++)n.push(o[i]);a=rt(e,n,a)}for(;i<o.length-1;i++)n.push(o[i]);return i<o.length&&(a=n.push(o[i])),a;default:throw Error(t(390))}}function rt(e,n,r){var o=r.boundary;if(null===o)return nt(e,n,r);if(o.parentFlushed=!0,o.forceClientRender)return e.responseState.generateStaticMarkup||(o=o.errorDigest,n.push("\x3c!--$!--\x3e"),n.push("<template"),o&&(n.push(' data-dgst="'),o=m(o),n.push(o),n.push('"')),n.push("></template>")),nt(e,n,r),!!e.responseState.generateStaticMarkup||n.push("\x3c!--/$--\x3e");if(0<o.pendingTasks){o.rootSegmentID=e.nextSegmentId++,0<o.completedSegments.length&&e.partialBoundaries.push(o);var a=e.responseState,i=a.nextSuspenseID++;return a=a.boundaryPrefix+i.toString(16),o=o.id=a,F(n,e.responseState,o),nt(e,n,r),n.push("\x3c!--/$--\x3e")}if(o.byteSize>e.progressiveChunkSize)return o.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(o),F(n,e.responseState,o.id),nt(e,n,r),n.push("\x3c!--/$--\x3e");if(e.responseState.generateStaticMarkup||n.push("\x3c!--$--\x3e"),1!==(r=o.completedSegments).length)throw Error(t(391));return rt(e,n,r[0]),!!e.responseState.generateStaticMarkup||n.push("\x3c!--/$--\x3e")}function ot(e,n,r){return function(e,n,r,o){switch(r.insertionMode){case 0:case 1:return e.push('<div hidden id="'),e.push(n.segmentPrefix),n=o.toString(16),e.push(n),e.push('">');case 2:return e.push('<svg aria-hidden="true" style="display:none" id="'),e.push(n.segmentPrefix),n=o.toString(16),e.push(n),e.push('">');case 3:return e.push('<math aria-hidden="true" style="display:none" id="'),e.push(n.segmentPrefix),n=o.toString(16),e.push(n),e.push('">');case 4:return e.push('<table hidden id="'),e.push(n.segmentPrefix),n=o.toString(16),e.push(n),e.push('">');case 5:return e.push('<table hidden><tbody id="'),e.push(n.segmentPrefix),n=o.toString(16),e.push(n),e.push('">');case 6:return e.push('<table hidden><tr id="'),e.push(n.segmentPrefix),n=o.toString(16),e.push(n),e.push('">');case 7:return e.push('<table hidden><colgroup id="'),e.push(n.segmentPrefix),n=o.toString(16),e.push(n),e.push('">');default:throw Error(t(397))}}(n,e.responseState,r.formatContext,r.id),rt(e,n,r),function(e,n){switch(n.insertionMode){case 0:case 1:return e.push("</div>");case 2:return e.push("</svg>");case 3:return e.push("</math>");case 4:return e.push("</table>");case 5:return e.push("</tbody></table>");case 6:return e.push("</tr></table>");case 7:return e.push("</colgroup></table>");default:throw Error(t(397))}}(n,r.formatContext)}function at(e,n,r){for(var o=r.completedSegments,a=0;a<o.length;a++)it(e,n,r,o[a]);if(o.length=0,e=e.responseState,o=r.id,r=r.rootSegmentID,n.push(e.startInlineScript),e.sentCompleteBoundaryFunction?n.push('$RC("'):(e.sentCompleteBoundaryFunction=!0,n.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),null===o)throw Error(t(395));return r=r.toString(16),n.push(o),n.push('","'),n.push(e.segmentPrefix),n.push(r),n.push('")<\/script>')}function it(e,n,r,o){if(2===o.status)return!0;var a=o.id;if(-1===a){if(-1===(o.id=r.rootSegmentID))throw Error(t(392));return ot(e,n,o)}return ot(e,n,o),e=e.responseState,n.push(e.startInlineScript),e.sentCompleteSegmentFunction?n.push('$RS("'):(e.sentCompleteSegmentFunction=!0,n.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),n.push(e.segmentPrefix),a=a.toString(16),n.push(a),n.push('","'),n.push(e.placeholderPrefix),n.push(a),n.push('")<\/script>')}function lt(e,n){try{var r=e.completedRootSegment;if(null!==r&&0===e.pendingRootTasks){rt(e,n,r),e.completedRootSegment=null;var o=e.responseState.bootstrapChunks;for(r=0;r<o.length-1;r++)n.push(o[r]);r<o.length&&n.push(o[r])}var a,i=e.clientRenderedBoundaries;for(a=0;a<i.length;a++){var l=i[a];o=n;var s=e.responseState,c=l.id,u=l.errorDigest,d=l.errorMessage,f=l.errorComponentStack;if(o.push(s.startInlineScript),s.sentClientRenderFunction?o.push('$RX("'):(s.sentClientRenderFunction=!0,o.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),null===c)throw Error(t(395));if(o.push(c),o.push('"'),u||d||f){o.push(",");var h=$(u||"");o.push(h)}if(d||f){o.push(",");var p=$(d||"");o.push(p)}if(f){o.push(",");var m=$(f);o.push(m)}if(!o.push(")<\/script>"))return e.destination=null,a++,void i.splice(0,a)}i.splice(0,a);var g=e.completedBoundaries;for(a=0;a<g.length;a++)if(!at(e,n,g[a]))return e.destination=null,a++,void g.splice(0,a);g.splice(0,a);var b=e.partialBoundaries;for(a=0;a<b.length;a++){var v=b[a];e:{i=e,l=n;var y=v.completedSegments;for(s=0;s<y.length;s++)if(!it(i,l,v,y[s])){s++,y.splice(0,s);var x=!1;break e}y.splice(0,s),x=!0}if(!x)return e.destination=null,a++,void b.splice(0,a)}b.splice(0,a);var w=e.completedBoundaries;for(a=0;a<w.length;a++)if(!at(e,n,w[a]))return e.destination=null,a++,void w.splice(0,a);w.splice(0,a)}finally{0===e.allPendingTasks&&0===e.pingedTasks.length&&0===e.clientRenderedBoundaries.length&&0===e.completedBoundaries.length&&n.push(null)}}function st(e,t){try{var n=e.abortableTasks;n.forEach(function(n){return Je(n,e,t)}),n.clear(),null!==e.destination&&lt(e,e.destination)}catch(r){We(e,r),_e(e,r)}}function ct(){}function ut(e,n,r,o){var a=!1,i=null,l="",s={push:function(e){return null!==e&&(l+=e),!0},destroy:function(e){a=!0,i=e}},c=!1;if(e=function(e,t,n,r,o,a,i){var l=[],s=new Set;return(n=Be(t={destination:null,responseState:t,progressiveChunkSize:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:s,pingedTasks:l,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===o?Ae:o,onAllReady:Le,onShellReady:void 0===i?Le:i,onShellError:Le,onFatalError:Le},0,null,n,!1,!1)).parentFlushed=!0,e=Oe(t,e,null,n,s,Y,null,se),l.push(e),t}(e,function(e,t){return{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:(t=void 0===t?"":t)+"P:",segmentPrefix:t+"S:",boundaryPrefix:t+"B:",idPrefix:t,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:e}}(r,n?n.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,ct,0,function(){c=!0}),tt(e),st(e,o),1===e.status)e.status=2,s.destroy(e.fatalError);else if(2!==e.status&&null===e.destination){e.destination=s;try{lt(e,s)}catch(u){We(e,u),_e(e,u)}}if(a)throw i;if(!c)throw Error(t(426));return l}return pe.renderToNodeStream=function(){throw Error(t(207))},pe.renderToStaticMarkup=function(e,t){return ut(e,t,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},pe.renderToStaticNodeStream=function(){throw Error(t(208))},pe.renderToString=function(e,t){return ut(e,t,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},pe.version="18.3.1",pe}(),ye=function(){if(me)return be;me=1;var e=u();function t(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=null,r=0;function o(e,t){if(0!==t.length)if(512<t.length)0<r&&(e.enqueue(new Uint8Array(n.buffer,0,r)),n=new Uint8Array(512),r=0),e.enqueue(t);else{var o=n.length-r;o<t.length&&(0===o?e.enqueue(n):(n.set(t.subarray(0,o),r),e.enqueue(n),t=t.subarray(o)),n=new Uint8Array(512),r=0),n.set(t,r),r+=t.length}}function a(e,t){return o(e,t),!0}function i(e){n&&0<r&&(e.enqueue(new Uint8Array(n.buffer,0,r)),n=null,r=0)}var l=new TextEncoder;function s(e){return l.encode(e)}function c(e){return l.encode(e)}function d(e,t){"function"==typeof e.error?e.error(t):e.close()}var f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function g(e){return!!f.call(m,e)||!f.call(p,e)&&(h.test(e)?m[e]=!0:(p[e]=!0,!1))}function b(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){v[e]=new b(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];v[t]=new b(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){v[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){v[e]=new b(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){v[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){v[e]=new b(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){v[e]=new b(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){v[e]=new b(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){v[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var y=/[\-:]([a-z])/g;function x(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(y,x);v[t]=new b(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(y,x);v[t]=new b(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(y,x);v[t]=new b(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){v[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)}),v.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){v[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});var w={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},k=["Webkit","ms","Moz","O"];Object.keys(w).forEach(function(e){k.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),w[t]=w[e]})});var N=/["'&<>]/;function S(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=N.exec(e);if(t){var n,r="",o=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}o!==n&&(r+=e.substring(o,n)),o=n+1,r+=t}e=o!==n?r+e.substring(o,n):r}return e}var C=/([A-Z])/g,E=/^ms-/,M=Array.isArray,F=c("<script>"),R=c("<\/script>"),$=c('<script src="'),H=c('<script type="module" src="'),T=c('" async=""><\/script>'),j=/(<\/|<)(s)(cript)/gi;function D(e,t,n,r){return t+("s"===n?"\\u0073":"\\u0053")+r}function I(e,t){return{insertionMode:e,selectedValue:t}}var P=c("\x3c!-- --\x3e");function z(e,t,n,r){return""===t?r:(r&&e.push(P),e.push(s(S(t))),!0)}var A=new Map,L=c(' style="'),O=c(":"),B=c(";");function W(e,n,r){if("object"!=typeof r)throw Error(t(62));for(var o in n=!0,r)if(f.call(r,o)){var a=r[o];if(null!=a&&"boolean"!=typeof a&&""!==a){if(0===o.indexOf("--")){var i=s(S(o));a=s(S((""+a).trim()))}else{i=o;var l=A.get(i);void 0!==l||(l=c(S(i.replace(C,"-$1").toLowerCase().replace(E,"-ms-"))),A.set(i,l)),i=l,a="number"==typeof a?0===a||f.call(w,o)?s(""+a):s(a+"px"):s(S((""+a).trim()))}n?(n=!1,e.push(L,i,O,a)):e.push(B,i,O,a)}}n||e.push(V)}var _=c(" "),q=c('="'),V=c('"'),Z=c('=""');function K(e,t,n,r){switch(n){case"style":return void W(e,t,r);case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])if(null!==(t=v.hasOwnProperty(n)?v[n]:null)){switch(typeof r){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(n=s(t.attributeName),t.type){case 3:r&&e.push(_,n,Z);break;case 4:!0===r?e.push(_,n,Z):!1!==r&&e.push(_,n,q,s(S(r)),V);break;case 5:isNaN(r)||e.push(_,n,q,s(S(r)),V);break;case 6:!isNaN(r)&&1<=r&&e.push(_,n,q,s(S(r)),V);break;default:t.sanitizeURL&&(r=""+r),e.push(_,n,q,s(S(r)),V)}}else if(g(n)){switch(typeof r){case"function":case"symbol":return;case"boolean":if("data-"!==(t=n.toLowerCase().slice(0,5))&&"aria-"!==t)return}e.push(_,s(n),q,s(S(r)),V)}}var U=c(">"),G=c("/>");function X(e,n,r){if(null!=n){if(null!=r)throw Error(t(60));if("object"!=typeof n||!("t"in n))throw Error(t(61));null!=(n=n.t)&&e.push(s(""+n))}}var Y=c(' selected=""');function J(e,t,n,r){e.push(ne(n));var o,a=n=null;for(o in t)if(f.call(t,o)){var i=t[o];if(null!=i)switch(o){case"children":n=i;break;case"dangerouslySetInnerHTML":a=i;break;default:K(e,r,o,i)}}return e.push(U),X(e,a,n),"string"==typeof n?(e.push(s(S(n))),null):n}var Q=c("\n"),ee=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,te=new Map;function ne(e){var n=te.get(e);if(void 0===n){if(!ee.test(e))throw Error(t(65,e));n=c("<"+e),te.set(e,n)}return n}var re=c("<!DOCTYPE html>"),oe=c("</"),ae=c(">"),ie=c('<template id="'),le=c('"></template>'),se=c("\x3c!--$--\x3e"),ce=c('\x3c!--$?--\x3e<template id="'),ue=c('"></template>'),de=c("\x3c!--$!--\x3e"),fe=c("\x3c!--/$--\x3e"),he=c("<template"),pe=c('"'),ge=c(' data-dgst="');c(' data-msg="'),c(' data-stck="');var ve=c("></template>");function ye(e,n,r){if(o(e,ce),null===r)throw Error(t(395));return o(e,r),a(e,ue)}var xe=c('<div hidden id="'),we=c('">'),ke=c("</div>"),Ne=c('<svg aria-hidden="true" style="display:none" id="'),Se=c('">'),Ce=c("</svg>"),Ee=c('<math aria-hidden="true" style="display:none" id="'),Me=c('">'),Fe=c("</math>"),Re=c('<table hidden id="'),$e=c('">'),He=c("</table>"),Te=c('<table hidden><tbody id="'),je=c('">'),De=c("</tbody></table>"),Ie=c('<table hidden><tr id="'),Pe=c('">'),ze=c("</tr></table>"),Ae=c('<table hidden><colgroup id="'),Le=c('">'),Oe=c("</colgroup></table>"),Be=c('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),We=c('$RS("'),_e=c('","'),qe=c('")<\/script>'),Ve=c('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),Ze=c('$RC("'),Ke=c('","'),Ue=c('")<\/script>'),Ge=c('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),Xe=c('$RX("'),Ye=c('"'),Je=c(")<\/script>"),Qe=c(","),et=/[<\u2028\u2029]/g;function tt(e){return JSON.stringify(e).replace(et,function(e){switch(e){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var nt=Object.assign,rt=Symbol.for("react.element"),ot=Symbol.for("react.portal"),at=Symbol.for("react.fragment"),it=Symbol.for("react.strict_mode"),lt=Symbol.for("react.profiler"),st=Symbol.for("react.provider"),ct=Symbol.for("react.context"),ut=Symbol.for("react.forward_ref"),dt=Symbol.for("react.suspense"),ft=Symbol.for("react.suspense_list"),ht=Symbol.for("react.memo"),pt=Symbol.for("react.lazy"),mt=Symbol.for("react.scope"),gt=Symbol.for("react.debug_trace_mode"),bt=Symbol.for("react.legacy_hidden"),vt=Symbol.for("react.default_value"),yt=Symbol.iterator;function xt(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case at:return"Fragment";case ot:return"Portal";case lt:return"Profiler";case it:return"StrictMode";case dt:return"Suspense";case ft:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ct:return(e.displayName||"Context")+".Consumer";case st:return(e.o.displayName||"Context")+".Provider";case ut:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case ht:return null!==(t=e.displayName||null)?t:xt(e.type)||"Memo";case pt:t=e.i,e=e.l;try{return xt(e(t))}catch(n){}}return null}var wt={};function kt(e,t){if(!(e=e.contextTypes))return wt;var n,r={};for(n in e)r[n]=t[n];return r}var Nt=null;function St(e,n){if(e!==n){e.context.k=e.parentValue,e=e.parent;var r=n.parent;if(null===e){if(null!==r)throw Error(t(401))}else{if(null===r)throw Error(t(401));St(e,r)}n.context.k=n.value}}function Ct(e){e.context.k=e.parentValue,null!==(e=e.parent)&&Ct(e)}function Et(e){var t=e.parent;null!==t&&Et(t),e.context.k=e.value}function Mt(e,n){if(e.context.k=e.parentValue,null===(e=e.parent))throw Error(t(402));e.depth===n.depth?St(e,n):Mt(e,n)}function Ft(e,n){var r=n.parent;if(null===r)throw Error(t(402));e.depth===r.depth?St(e,r):Ft(e,r),n.context.k=n.value}function Rt(e){var t=Nt;t!==e&&(null===t?Et(e):null===e?Ct(t):t.depth===e.depth?St(t,e):t.depth>e.depth?Mt(t,e):Ft(t,e),Nt=e)}var $t={isMounted:function(){return!1},enqueueSetState:function(e,t){null!==(e=e.h).queue&&e.queue.push(t)},enqueueReplaceState:function(e,t){(e=e.h).replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function Ht(e,t,n,r){var o=void 0!==e.state?e.state:null;e.updater=$t,e.props=n,e.state=o;var a={queue:[],replace:!1};e.h=a;var i=t.contextType;if(e.context="object"==typeof i&&null!==i?i.k:r,"function"==typeof(i=t.getDerivedStateFromProps)&&(o=null==(i=i(n,o))?o:nt({},o,i),e.state=o),"function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate&&("function"==typeof e.UNSAFE_componentWillMount||"function"==typeof e.componentWillMount))if(t=e.state,"function"==typeof e.componentWillMount&&e.componentWillMount(),"function"==typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),t!==e.state&&$t.enqueueReplaceState(e,e.state,null),null!==a.queue&&0<a.queue.length)if(t=a.queue,i=a.replace,a.queue=null,a.replace=!1,i&&1===t.length)e.state=t[0];else{for(a=i?t[0]:e.state,o=!0,i=i?1:0;i<t.length;i++){var l=t[i];null!=(l="function"==typeof l?l.call(e,a,n,r):l)&&(o?(o=!1,a=nt({},a,l)):nt(a,l))}e.state=a}else a.queue=null}var Tt={id:1,overflow:""};function jt(e,t,n){var r=e.id;e=e.overflow;var o=32-Dt(r)-1;r&=~(1<<o),n+=1;var a=32-Dt(t)+o;if(30<a){var i=o-o%5;return a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,{id:1<<32-Dt(t)+o|n<<o|r,overflow:a+e}}return{id:1<<a|n<<o|r,overflow:e}}var Dt=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(It(e)/Pt|0)|0},It=Math.log,Pt=Math.LN2,zt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},At=null,Lt=null,Ot=null,Bt=null,Wt=!1,_t=!1,qt=0,Vt=null,Zt=0;function Kt(){if(null===At)throw Error(t(321));return At}function Ut(){if(0<Zt)throw Error(t(312));return{memoizedState:null,queue:null,next:null}}function Gt(){return null===Bt?null===Ot?(Wt=!1,Ot=Bt=Ut()):(Wt=!0,Bt=Ot):null===Bt.next?(Wt=!1,Bt=Bt.next=Ut()):(Wt=!0,Bt=Bt.next),Bt}function Xt(){Lt=At=null,_t=!1,Ot=null,Zt=0,Bt=Vt=null}function Yt(e,t){return"function"==typeof t?t(e):t}function Jt(e,t,n){if(At=Kt(),Bt=Gt(),Wt){var r=Bt.queue;if(t=r.dispatch,null!==Vt&&void 0!==(n=Vt.get(r))){Vt.delete(r),r=Bt.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return Bt.memoizedState=r,[r,t]}return[Bt.memoizedState,t]}return e=e===Yt?"function"==typeof t?t():t:void 0!==n?n(t):t,Bt.memoizedState=e,e=(e=Bt.queue={last:null,dispatch:null}).dispatch=en.bind(null,At,e),[Bt.memoizedState,e]}function Qt(e,t){if(At=Kt(),t=void 0===t?null:t,null!==(Bt=Gt())){var n=Bt.memoizedState;if(null!==n&&null!==t){var r=n[1];e:if(null===r)r=!1;else{for(var o=0;o<r.length&&o<t.length;o++)if(!zt(t[o],r[o])){r=!1;break e}r=!0}if(r)return n[0]}}return e=e(),Bt.memoizedState=[e,t],e}function en(e,n,r){if(25<=Zt)throw Error(t(301));if(e===At)if(_t=!0,e={action:r,next:null},null===Vt&&(Vt=new Map),void 0===(r=Vt.get(n)))Vt.set(n,e);else{for(n=r;null!==n.next;)n=n.next;n.next=e}}function tn(){throw Error(t(394))}function nn(){}var rn={readContext:function(e){return e.k},useContext:function(e){return Kt(),e.k},useMemo:Qt,useReducer:Jt,useRef:function(e){At=Kt();var t=(Bt=Gt()).memoizedState;return null===t?(e={current:e},Bt.memoizedState=e):t},useState:function(e){return Jt(Yt,e)},useInsertionEffect:nn,useLayoutEffect:function(){},useCallback:function(e,t){return Qt(function(){return e},t)},useImperativeHandle:nn,useEffect:nn,useDebugValue:nn,useDeferredValue:function(e){return Kt(),e},useTransition:function(){return Kt(),[!1,tn]},useId:function(){var e=Lt.treeContext,n=e.overflow;e=((e=e.id)&~(1<<32-Dt(e)-1)).toString(32)+n;var r=on;if(null===r)throw Error(t(404));return n=qt++,e=":"+r.idPrefix+"R"+e,0<n&&(e+="H"+n.toString(32)),e+":"},useMutableSource:function(e,t){return Kt(),t(e.p)},useSyncExternalStore:function(e,n,r){if(void 0===r)throw Error(t(407));return r()}},on=null,an=e.m.ReactCurrentDispatcher;function ln(e){return null}function sn(){}function cn(e,t,n,r,o,a,i,l){e.allPendingTasks++,null===n?e.pendingRootTasks++:n.pendingTasks++;var s={node:t,ping:function(){var t=e.pingedTasks;t.push(s),1===t.length&&Sn(e)},blockedBoundary:n,blockedSegment:r,abortSet:o,legacyContext:a,context:i,treeContext:l};return o.add(s),s}function un(e,t,n,r,o,a){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:n,lastPushedText:o,textEmbedded:a}}function dn(e,t){if(null!=(e=e.onError(t))&&"string"!=typeof e)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof e+'" instead');return e}function fn(e,t){var n=e.onShellError;n(t),(n=e.onFatalError)(t),null!==e.destination?(e.status=2,d(e.destination,t)):(e.status=1,e.fatalError=t)}function hn(e,t,n,r,o){for(At={},Lt=t,qt=0,e=n(r,o);_t;)_t=!1,qt=0,Zt+=1,Bt=null,e=n(r,o);return Xt(),e}function pn(e,n,r,o){var a=r.render(),i=o.childContextTypes;if(null!=i){var l=n.legacyContext;if("function"!=typeof r.getChildContext)o=l;else{for(var s in r=r.getChildContext())if(!(s in i))throw Error(t(108,xt(o)||"Unknown",s));o=nt({},l,r)}n.legacyContext=o,bn(e,n,a),n.legacyContext=l}else bn(e,n,a)}function mn(e,t){if(e&&e.defaultProps){for(var n in t=nt({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function gn(n,r,o,a,i){if("function"==typeof o)if(o.prototype&&o.prototype.isReactComponent){i=kt(o,r.legacyContext);var l=o.contextType;Ht(l=new o(a,"object"==typeof l&&null!==l?l.k:i),o,a,i),pn(n,r,l,o)}else{i=hn(n,r,o,a,l=kt(o,r.legacyContext));var c=0!==qt;if("object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof)Ht(i,o,a,l),pn(n,r,i,o);else if(c){a=r.treeContext,r.treeContext=jt(a,1,0);try{bn(n,r,i)}finally{r.treeContext=a}}else bn(n,r,i)}else{if("string"!=typeof o){switch(o){case bt:case gt:case it:case lt:case at:case ft:return void bn(n,r,a.children);case mt:throw Error(t(343));case dt:e:{o=r.blockedBoundary,i=r.blockedSegment,l=a.fallback,a=a.children;var u={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:c=new Set,errorDigest:null},d=un(0,i.chunks.length,u,i.formatContext,!1,!1);i.children.push(d),i.lastPushedText=!1;var h=un(0,0,null,i.formatContext,!1,!1);h.parentFlushed=!0,r.blockedBoundary=u,r.blockedSegment=h;try{if(yn(n,r,a),h.lastPushedText&&h.textEmbedded&&h.chunks.push(P),h.status=1,kn(u,h),0===u.pendingTasks)break e}catch(p){h.status=4,u.forceClientRender=!0,u.errorDigest=dn(n,p)}finally{r.blockedBoundary=o,r.blockedSegment=i}r=cn(n,l,o,d,c,r.legacyContext,r.context,r.treeContext),n.pingedTasks.push(r)}return}if("object"==typeof o&&null!==o)switch(o.$$typeof){case ut:if(a=hn(n,r,o.render,a,i),0!==qt){o=r.treeContext,r.treeContext=jt(o,1,0);try{bn(n,r,a)}finally{r.treeContext=o}}else bn(n,r,a);return;case ht:return void gn(n,r,o=o.type,a=mn(o,a),i);case st:if(i=a.children,o=o.o,a=a.value,l=o.k,o.k=a,Nt=a={parent:c=Nt,depth:null===c?0:c.depth+1,context:o,parentValue:l,value:a},r.context=a,bn(n,r,i),null===(n=Nt))throw Error(t(403));return a=n.parentValue,n.context.k=a===vt?n.context.v:a,n=Nt=n.parent,void(r.context=n);case ct:return void bn(n,r,a=(a=a.children)(o.k));case pt:return void gn(n,r,o=(i=o.l)(o.i),a=mn(o,a),void 0)}throw Error(t(130,null==o?o:typeof o,""))}switch(l=function(n,r,o,a,i){switch(r){case"select":n.push(ne("select"));var l=null,c=null;for(p in o)if(f.call(o,p)){var u=o[p];if(null!=u)switch(p){case"children":l=u;break;case"dangerouslySetInnerHTML":c=u;break;case"defaultValue":case"value":break;default:K(n,a,p,u)}}return n.push(U),X(n,c,l),l;case"option":c=i.selectedValue,n.push(ne("option"));var d=u=null,h=null,p=null;for(l in o)if(f.call(o,l)){var m=o[l];if(null!=m)switch(l){case"children":u=m;break;case"selected":h=m;break;case"dangerouslySetInnerHTML":p=m;break;case"value":d=m;default:K(n,a,l,m)}}if(null!=c)if(o=null!==d?""+d:function(t){var n="";return e.Children.forEach(t,function(e){null!=e&&(n+=e)}),n}(u),M(c)){for(a=0;a<c.length;a++)if(""+c[a]===o){n.push(Y);break}}else""+c===o&&n.push(Y);else h&&n.push(Y);return n.push(U),X(n,p,u),u;case"textarea":for(u in n.push(ne("textarea")),p=c=l=null,o)if(f.call(o,u)&&null!=(d=o[u]))switch(u){case"children":p=d;break;case"value":l=d;break;case"defaultValue":c=d;break;case"dangerouslySetInnerHTML":throw Error(t(91));default:K(n,a,u,d)}if(null===l&&null!==c&&(l=c),n.push(U),null!=p){if(null!=l)throw Error(t(92));if(M(p)&&1<p.length)throw Error(t(93));l=""+p}return"string"==typeof l&&"\n"===l[0]&&n.push(Q),null!==l&&n.push(s(S(""+l))),null;case"input":for(c in n.push(ne("input")),d=p=u=l=null,o)if(f.call(o,c)&&null!=(h=o[c]))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,"input"));case"defaultChecked":d=h;break;case"defaultValue":u=h;break;case"checked":p=h;break;case"value":l=h;break;default:K(n,a,c,h)}return null!==p?K(n,a,"checked",p):null!==d&&K(n,a,"checked",d),null!==l?K(n,a,"value",l):null!==u&&K(n,a,"value",u),n.push(G),null;case"menuitem":for(var b in n.push(ne("menuitem")),o)if(f.call(o,b)&&null!=(l=o[b]))switch(b){case"children":case"dangerouslySetInnerHTML":throw Error(t(400));default:K(n,a,b,l)}return n.push(U),null;case"title":for(m in n.push(ne("title")),l=null,o)if(f.call(o,m)&&null!=(c=o[m]))switch(m){case"children":l=c;break;case"dangerouslySetInnerHTML":throw Error(t(434));default:K(n,a,m,c)}return n.push(U),l;case"listing":case"pre":for(d in n.push(ne(r)),c=l=null,o)if(f.call(o,d)&&null!=(u=o[d]))switch(d){case"children":l=u;break;case"dangerouslySetInnerHTML":c=u;break;default:K(n,a,d,u)}if(n.push(U),null!=c){if(null!=l)throw Error(t(60));if("object"!=typeof c||!("t"in c))throw Error(t(61));null!=(o=c.t)&&("string"==typeof o&&0<o.length&&"\n"===o[0]?n.push(Q,s(o)):n.push(s(""+o)))}return"string"==typeof l&&"\n"===l[0]&&n.push(Q),l;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":for(var v in n.push(ne(r)),o)if(f.call(o,v)&&null!=(l=o[v]))switch(v){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,r));default:K(n,a,v,l)}return n.push(G),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return J(n,o,r,a);case"html":return 0===i.insertionMode&&n.push(re),J(n,o,r,a);default:if(-1===r.indexOf("-")&&"string"!=typeof o.is)return J(n,o,r,a);for(h in n.push(ne(r)),c=l=null,o)if(f.call(o,h)&&null!=(u=o[h]))switch(h){case"children":l=u;break;case"dangerouslySetInnerHTML":c=u;break;case"style":W(n,a,u);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:g(h)&&"function"!=typeof u&&"symbol"!=typeof u&&n.push(_,s(h),q,s(S(u)),V)}return n.push(U),X(n,c,l),l}}((i=r.blockedSegment).chunks,o,a,n.responseState,i.formatContext),i.lastPushedText=!1,c=i.formatContext,i.formatContext=function(e,t,n){switch(t){case"select":return I(1,null!=n.value?n.value:n.defaultValue);case"svg":return I(2,null);case"math":return I(3,null);case"foreignObject":return I(1,null);case"table":return I(4,null);case"thead":case"tbody":case"tfoot":return I(5,null);case"colgroup":return I(7,null);case"tr":return I(6,null)}return 4<=e.insertionMode||0===e.insertionMode?I(1,null):e}(c,o,a),yn(n,r,l),i.formatContext=c,o){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:i.chunks.push(oe,s(o),ae)}i.lastPushedText=!1}}function bn(e,n,r){if(n.node=r,"object"==typeof r&&null!==r){switch(r.$$typeof){case rt:return void gn(e,n,r.type,r.props,r.ref);case ot:throw Error(t(257));case pt:var o=r.l;return void bn(e,n,r=o(r.i))}if(M(r))return void vn(e,n,r);if((o=null===r||"object"!=typeof r?null:"function"==typeof(o=yt&&r[yt]||r["@@iterator"])?o:null)&&(o=o.call(r))){if(!(r=o.next()).done){var a=[];do{a.push(r.value),r=o.next()}while(!r.done);vn(e,n,a)}return}throw e=Object.prototype.toString.call(r),Error(t(31,"[object Object]"===e?"object with keys {"+Object.keys(r).join(", ")+"}":e))}"string"==typeof r?(o=n.blockedSegment).lastPushedText=z(n.blockedSegment.chunks,r,e.responseState,o.lastPushedText):"number"==typeof r&&((o=n.blockedSegment).lastPushedText=z(n.blockedSegment.chunks,""+r,e.responseState,o.lastPushedText))}function vn(e,t,n){for(var r=n.length,o=0;o<r;o++){var a=t.treeContext;t.treeContext=jt(a,r,o);try{yn(e,t,n[o])}finally{t.treeContext=a}}}function yn(e,t,n){var r=t.blockedSegment.formatContext,o=t.legacyContext,a=t.context;try{return bn(e,t,n)}catch(s){if(Xt(),"object"!=typeof s||null===s||"function"!=typeof s.then)throw t.blockedSegment.formatContext=r,t.legacyContext=o,t.context=a,Rt(a),s;n=s;var i=t.blockedSegment,l=un(0,i.chunks.length,null,i.formatContext,i.lastPushedText,!0);i.children.push(l),i.lastPushedText=!1,e=cn(e,t.node,t.blockedBoundary,l,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=r,t.legacyContext=o,t.context=a,Rt(a)}}function xn(e){var t=e.blockedBoundary;(e=e.blockedSegment).status=3,Nn(this,t,e)}function wn(e,n,r){var o=e.blockedBoundary;e.blockedSegment.status=3,null===o?(n.allPendingTasks--,2!==n.status&&(n.status=2,null!==n.destination&&n.destination.close())):(o.pendingTasks--,o.forceClientRender||(o.forceClientRender=!0,e=void 0===r?Error(t(432)):r,o.errorDigest=n.onError(e),o.parentFlushed&&n.clientRenderedBoundaries.push(o)),o.fallbackAbortableTasks.forEach(function(e){return wn(e,n,r)}),o.fallbackAbortableTasks.clear(),n.allPendingTasks--,0===n.allPendingTasks&&(o=n.onAllReady)())}function kn(e,t){if(0===t.chunks.length&&1===t.children.length&&null===t.children[0].boundary){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,1===n.status&&kn(e,n)}else e.completedSegments.push(t)}function Nn(e,n,r){if(null===n){if(r.parentFlushed){if(null!==e.completedRootSegment)throw Error(t(389));e.completedRootSegment=r}e.pendingRootTasks--,0===e.pendingRootTasks&&(e.onShellError=sn,(n=e.onShellReady)())}else n.pendingTasks--,n.forceClientRender||(0===n.pendingTasks?(r.parentFlushed&&1===r.status&&kn(n,r),n.parentFlushed&&e.completedBoundaries.push(n),n.fallbackAbortableTasks.forEach(xn,e),n.fallbackAbortableTasks.clear()):r.parentFlushed&&1===r.status&&(kn(n,r),1===n.completedSegments.length&&n.parentFlushed&&e.partialBoundaries.push(n)));e.allPendingTasks--,0===e.allPendingTasks&&(e=e.onAllReady)()}function Sn(e){if(2!==e.status){var t=Nt,n=an.current;an.current=rn;var r=on;on=e.responseState;try{var o,a=e.pingedTasks;for(o=0;o<a.length;o++){var i=a[o],l=e,s=i.blockedSegment;if(0===s.status){Rt(i.context);try{bn(l,i,i.node),s.lastPushedText&&s.textEmbedded&&s.chunks.push(P),i.abortSet.delete(i),s.status=1,Nn(l,i.blockedBoundary,s)}catch(h){if(Xt(),"object"==typeof h&&null!==h&&"function"==typeof h.then){var c=i.ping;h.then(c,c)}else{i.abortSet.delete(i),s.status=4;var u=i.blockedBoundary,d=h,f=dn(l,d);null===u?fn(l,d):(u.pendingTasks--,u.forceClientRender||(u.forceClientRender=!0,u.errorDigest=f,u.parentFlushed&&l.clientRenderedBoundaries.push(u))),l.allPendingTasks--,0===l.allPendingTasks&&(0,l.onAllReady)()}}}}a.splice(0,o),null!==e.destination&&$n(e,e.destination)}catch(h){dn(e,h),fn(e,h)}finally{on=r,an.current=n,n===rn&&Rt(t)}}}function Cn(e,n,r){switch(r.parentFlushed=!0,r.status){case 0:var i=r.id=e.nextSegmentId++;return r.lastPushedText=!1,r.textEmbedded=!1,e=e.responseState,o(n,ie),o(n,e.placeholderPrefix),o(n,e=s(i.toString(16))),a(n,le);case 1:r.status=2;var l=!0;i=r.chunks;var c=0;r=r.children;for(var u=0;u<r.length;u++){for(l=r[u];c<l.index;c++)o(n,i[c]);l=En(e,n,l)}for(;c<i.length-1;c++)o(n,i[c]);return c<i.length&&(l=a(n,i[c])),l;default:throw Error(t(390))}}function En(e,n,r){var i=r.boundary;if(null===i)return Cn(e,n,r);if(i.parentFlushed=!0,i.forceClientRender)i=i.errorDigest,a(n,de),o(n,he),i&&(o(n,ge),o(n,s(S(i))),o(n,pe)),a(n,ve),Cn(e,n,r);else if(0<i.pendingTasks){i.rootSegmentID=e.nextSegmentId++,0<i.completedSegments.length&&e.partialBoundaries.push(i);var l=e.responseState,u=l.nextSuspenseID++;l=c(l.boundaryPrefix+u.toString(16)),i=i.id=l,ye(n,e.responseState,i),Cn(e,n,r)}else if(i.byteSize>e.progressiveChunkSize)i.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(i),ye(n,e.responseState,i.id),Cn(e,n,r);else{if(a(n,se),1!==(r=i.completedSegments).length)throw Error(t(391));En(e,n,r[0])}return a(n,fe)}function Mn(e,n,r){return function(e,n,r,i){switch(r.insertionMode){case 0:case 1:return o(e,xe),o(e,n.segmentPrefix),o(e,s(i.toString(16))),a(e,we);case 2:return o(e,Ne),o(e,n.segmentPrefix),o(e,s(i.toString(16))),a(e,Se);case 3:return o(e,Ee),o(e,n.segmentPrefix),o(e,s(i.toString(16))),a(e,Me);case 4:return o(e,Re),o(e,n.segmentPrefix),o(e,s(i.toString(16))),a(e,$e);case 5:return o(e,Te),o(e,n.segmentPrefix),o(e,s(i.toString(16))),a(e,je);case 6:return o(e,Ie),o(e,n.segmentPrefix),o(e,s(i.toString(16))),a(e,Pe);case 7:return o(e,Ae),o(e,n.segmentPrefix),o(e,s(i.toString(16))),a(e,Le);default:throw Error(t(397))}}(n,e.responseState,r.formatContext,r.id),En(e,n,r),function(e,n){switch(n.insertionMode){case 0:case 1:return a(e,ke);case 2:return a(e,Ce);case 3:return a(e,Fe);case 4:return a(e,He);case 5:return a(e,De);case 6:return a(e,ze);case 7:return a(e,Oe);default:throw Error(t(397))}}(n,r.formatContext)}function Fn(e,n,r){for(var i=r.completedSegments,l=0;l<i.length;l++)Rn(e,n,r,i[l]);if(i.length=0,e=e.responseState,i=r.id,r=r.rootSegmentID,o(n,e.startInlineScript),e.sentCompleteBoundaryFunction?o(n,Ze):(e.sentCompleteBoundaryFunction=!0,o(n,Ve)),null===i)throw Error(t(395));return r=s(r.toString(16)),o(n,i),o(n,Ke),o(n,e.segmentPrefix),o(n,r),a(n,Ue)}function Rn(e,n,r,i){if(2===i.status)return!0;var l=i.id;if(-1===l){if(-1===(i.id=r.rootSegmentID))throw Error(t(392));return Mn(e,n,i)}return Mn(e,n,i),o(n,(e=e.responseState).startInlineScript),e.sentCompleteSegmentFunction?o(n,We):(e.sentCompleteSegmentFunction=!0,o(n,Be)),o(n,e.segmentPrefix),o(n,l=s(l.toString(16))),o(n,_e),o(n,e.placeholderPrefix),o(n,l),a(n,qe)}function $n(e,l){n=new Uint8Array(512),r=0;try{var c=e.completedRootSegment;if(null!==c&&0===e.pendingRootTasks){En(e,l,c),e.completedRootSegment=null;var u=e.responseState.bootstrapChunks;for(c=0;c<u.length-1;c++)o(l,u[c]);c<u.length&&a(l,u[c])}var d,f=e.clientRenderedBoundaries;for(d=0;d<f.length;d++){var h=f[d];u=l;var p=e.responseState,m=h.id,g=h.errorDigest,b=h.errorMessage,v=h.errorComponentStack;if(o(u,p.startInlineScript),p.sentClientRenderFunction?o(u,Xe):(p.sentClientRenderFunction=!0,o(u,Ge)),null===m)throw Error(t(395));o(u,m),o(u,Ye),(g||b||v)&&(o(u,Qe),o(u,s(tt(g||"")))),(b||v)&&(o(u,Qe),o(u,s(tt(b||"")))),v&&(o(u,Qe),o(u,s(tt(v)))),a(u,Je)}f.splice(0,d);var y=e.completedBoundaries;for(d=0;d<y.length;d++)Fn(e,l,y[d]);y.splice(0,d),i(l),n=new Uint8Array(512),r=0;var x=e.partialBoundaries;for(d=0;d<x.length;d++){var w=x[d];e:{f=e,h=l;var k=w.completedSegments;for(p=0;p<k.length;p++)if(!Rn(f,h,w,k[p])){p++,k.splice(0,p);var N=!1;break e}k.splice(0,p),N=!0}if(!N)return e.destination=null,d++,void x.splice(0,d)}x.splice(0,d);var S=e.completedBoundaries;for(d=0;d<S.length;d++)Fn(e,l,S[d]);S.splice(0,d)}finally{i(l),0===e.allPendingTasks&&0===e.pingedTasks.length&&0===e.clientRenderedBoundaries.length&&0===e.completedBoundaries.length&&l.close()}}function Hn(e,t){try{var n=e.abortableTasks;n.forEach(function(n){return wn(n,e,t)}),n.clear(),null!==e.destination&&$n(e,e.destination)}catch(r){dn(e,r),fn(e,r)}}return be.renderToReadableStream=function(e,t){return new Promise(function(n,r){var o,a,i=new Promise(function(e,t){a=e,o=t}),l=function(e,t,n,r,o,a,i,l,s){var c=[],u=new Set;return(n=un(t={destination:null,responseState:t,progressiveChunkSize:void 0===r?12800:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:u,pingedTasks:c,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===o?ln:o,onAllReady:void 0===a?sn:a,onShellReady:void 0===i?sn:i,onShellError:void 0===l?sn:l,onFatalError:void 0===s?sn:s},0,null,n,!1,!1)).parentFlushed=!0,e=cn(t,e,null,n,u,wt,null,Tt),c.push(e),t}(e,function(e,t,n,r,o){e=void 0===e?"":e,t=void 0===t?F:c('<script nonce="'+S(t)+'">');var a=[];if(void 0!==n&&a.push(t,s((""+n).replace(j,D)),R),void 0!==r)for(n=0;n<r.length;n++)a.push($,s(S(r[n])),T);if(void 0!==o)for(r=0;r<o.length;r++)a.push(H,s(S(o[r])),T);return{bootstrapChunks:a,startInlineScript:t,placeholderPrefix:c(e+"P:"),segmentPrefix:c(e+"S:"),boundaryPrefix:e+"B:",idPrefix:e,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}(t?t.identifierPrefix:void 0,t?t.nonce:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),function(e){return I("http://www.w3.org/2000/svg"===e?2:"http://www.w3.org/1998/Math/MathML"===e?3:0,null)}(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,a,function(){var e=new ReadableStream({type:"bytes",pull:function(e){if(1===l.status)l.status=2,d(e,l.fatalError);else if(2!==l.status&&null===l.destination){l.destination=e;try{$n(l,e)}catch(t){dn(l,t),fn(l,t)}}},cancel:function(){Hn(l)}},{highWaterMark:0});e.allReady=i,n(e)},function(e){i.catch(function(){}),r(e)},o);if(t&&t.signal){var u=t.signal,f=function(){Hn(l,u.reason),u.removeEventListener("abort",f)};u.addEventListener("abort",f)}Sn(l)})},be.version="18.3.1",be}(),he.version=ve.version,he.renderToString=ve.renderToString,he.renderToStaticMarkup=ve.renderToStaticMarkup,he.renderToNodeStream=ve.renderToNodeStream,he.renderToStaticNodeStream=ve.renderToStaticNodeStream,he.renderToReadableStream=ye.renderToReadableStream),he);const we=new Map;function ke(e,t){const n=we.get(e);if(n)return n;if(we.size>=200){const e=we.keys().next().value;e&&we.delete(e)}const r=t();return we.set(e,r),r}const Ne=xe.renderToStaticMarkup(t.jsx(F,{size:16,color:_,strokeWidth:2.5,fill:"none"})),Se=xe.renderToStaticMarkup(t.jsx(k,{size:16,color:Z,strokeWidth:2.5,fill:"none"}));function Ce(e){var t;const n=null==(t=e.contact_type)?void 0:t.toLowerCase();return"room server"===n||"room_server"===n||"room"===n||"server"===n}function Ee(e){return e.startsWith("0x")?e.slice(2,4).toUpperCase():e.slice(0,2).toUpperCase()}function Me({hash:e,neighbor:n,isZeroHop:r,isHub:o,isMobile:a,isRoomServer:i,centrality:s,lastHopData:c,affinity:u,txDelayRec:h,nodeOpacity:p,isHovered:m,onHover:g,onRequestRemove:b,isPopupOpen:v,onOpenPopup:y,onClosePopup:x}){const w=n.node_name||n.name||"Unknown",k=Ee(e),N=(null==c?void 0:c.avgSnr)??void 0,S=(null==c?void 0:c.avgRssi)??void 0,C="stale"===(null==c?void 0:c.status),E=(null==c?void 0:c.lastSeen)??void 0,M=C?Math.min(p,.5):p,F=Math.round(20*M)/20,R=l.useMemo(()=>i?function(e=1,t=!1,n=!1){return ke(`roomserver:${e}:${t}:${n}`,()=>{const r=t?1.25:1;if(n){const t=16,n=(20-t)/2;return`<div style="\n position: relative;\n width: 20px;\n height: 20px;\n opacity: ${e};\n filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)) brightness(${r});\n transition: filter 0s ease-in, filter 150ms ease-out;\n ">\n \x3c!-- Yellow outer ring --\x3e\n <div style="\n position: absolute;\n top: 0;\n left: 0;\n width: 20px;\n height: 20px;\n background: transparent;\n border-radius: 50%;\n border: 1px solid ${K};\n box-sizing: border-box;\n opacity: 0.7;\n "></div>\n \x3c!-- Icon --\x3e\n <div style="\n position: absolute;\n top: ${n}px;\n left: ${n}px;\n width: ${t}px;\n height: ${t}px;\n display: flex;\n align-items: center;\n justify-content: center;\n ">${Se}</div>\n </div>`}return`<div style="\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: ${e};\n filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)) brightness(${r});\n transition: filter 0s ease-in, filter 150ms ease-out;\n ">${Se}</div>`})}(F,m,r):o?function(e=q,t=1,n=!1,r=!1){return ke(`filled:${e}:${t}:${n}:${r}`,()=>{const o=n?1.25:1;if(r){const n=3;return`<div style="\n position: relative;\n width: 20px;\n height: 20px;\n opacity: ${t};\n filter: brightness(${o});\n transition: filter 0s ease-in, filter 150ms ease-out;\n ">\n \x3c!-- Yellow outer ring --\x3e\n <div style="\n position: absolute;\n top: 0;\n left: 0;\n width: 20px;\n height: 20px;\n background: transparent;\n border-radius: 50%;\n border: 1px solid ${K};\n box-sizing: border-box;\n opacity: 0.7;\n "></div>\n \x3c!-- Inner filled dot --\x3e\n <div style="\n position: absolute;\n top: ${n}px;\n left: ${n}px;\n width: 14px;\n height: 14px;\n background-color: ${e};\n border-radius: 50%;\n box-sizing: border-box;\n "></div>\n </div>`}return`<div style="\n width: 14px;\n height: 14px;\n background-color: ${e};\n border-radius: 50%;\n box-sizing: border-box;\n opacity: ${t};\n filter: brightness(${o});\n transition: filter 0s ease-in, filter 150ms ease-out;\n "></div>`})}(q,F,m,r):function(e=W,t=1,n=!1,r=!1){return ke(`ring:${e}:${t}:${n}:${r}`,()=>{const o=n?1.25:1;if(r){const n=3;return`<div style="\n position: relative;\n width: 20px;\n height: 20px;\n opacity: ${t};\n filter: brightness(${o});\n transition: filter 0s ease-in, filter 150ms ease-out;\n ">\n \x3c!-- Yellow outer ring --\x3e\n <div style="\n position: absolute;\n top: 0;\n left: 0;\n width: 20px;\n height: 20px;\n background: transparent;\n border-radius: 50%;\n border: 1px solid ${K};\n box-sizing: border-box;\n opacity: 0.7;\n "></div>\n \x3c!-- Inner colored ring --\x3e\n <div style="\n position: absolute;\n top: ${n}px;\n left: ${n}px;\n width: 14px;\n height: 14px;\n background: transparent;\n border-radius: 50%;\n border: 5px solid ${e};\n box-sizing: border-box;\n "></div>\n </div>`}return`<div style="\n width: 14px;\n height: 14px;\n background: transparent;\n border-radius: 50%;\n border: 5px solid ${e};\n box-sizing: border-box;\n opacity: ${t};\n filter: brightness(${o});\n transition: filter 0s ease-in, filter 150ms ease-out;\n "></div>`})}(a?V:W,F,m,r),[i,o,a,r,F,m]),$=r?20:14,H=l.useCallback(()=>g(e),[e,g]),T=l.useCallback(()=>g(null),[g]),j=l.useCallback(t=>{t.stopPropagation(),y(e)},[e,y]);return n.latitude&&n.longitude?t.jsxs(t.Fragment,{children:[t.jsx(d,{longitude:n.longitude,latitude:n.latitude,anchor:"center",children:t.jsx("div",{role:"button",tabIndex:0,"aria-label":`Node ${w}`,style:{width:32,height:32,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",touchAction:"manipulation",WebkitTapHighlightColor:"transparent"},onClick:j,onTouchEnd:j,onMouseEnter:H,onMouseLeave:T,onKeyDown:t=>"Enter"===t.key&&y(e),children:t.jsx("div",{style:{pointerEvents:"none"},dangerouslySetInnerHTML:{t:R}})})}),v&&t.jsx(f,{longitude:n.longitude,latitude:n.latitude,anchor:"bottom",offset:[0,-$/2],closeOnClick:!0,onClose:x,className:"maplibre-popup",children:t.jsx(ae,{hash:e,hashPrefix:k,name:w,isHub:o,isZeroHop:r,isMobile:a,isRoomServer:i,isStale:C,lastSeenTimestamp:E,centrality:s,affinity:u,meanSnr:N,meanRssi:S,neighbor:n,txDelayRec:h,onRemove:b?()=>b(e,w):void 0})})]}):null}function Fe({localNode:e,localHash:n,isHovered:r,onHover:o,isPopupOpen:a,onOpenPopup:i,onClosePopup:s}){const c=l.useMemo(()=>function(e=!1){return ke(`local:${e}`,()=>`<div style="\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)) brightness(${e?1.25:1});\n transition: filter 0s ease-in, filter 150ms ease-out;\n ">${Ne}</div>`)}(r),[r]),u=l.useCallback(()=>o("local"),[o]),h=l.useCallback(()=>o(null),[o]),p=l.useCallback(e=>{e.stopPropagation(),i()},[i]);return e.latitude&&e.longitude?t.jsxs(t.Fragment,{children:[t.jsx(d,{longitude:e.longitude,latitude:e.latitude,anchor:"center",children:t.jsx("div",{role:"button",tabIndex:0,"aria-label":`Local node ${e.name}`,style:{width:32,height:32,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",touchAction:"manipulation",WebkitTapHighlightColor:"transparent"},onClick:p,onTouchEnd:p,onMouseEnter:u,onMouseLeave:h,onKeyDown:e=>"Enter"===e.key&&i(),children:t.jsx("div",{style:{pointerEvents:"none"},dangerouslySetInnerHTML:{t:c}})})}),a&&t.jsx(f,{longitude:e.longitude,latitude:e.latitude,anchor:"bottom",offset:[0,-8],closeOnClick:!0,onClose:s,className:"maplibre-popup",children:t.jsxs("div",{className:"text-sm",children:[t.jsx("strong",{className:"text-base",children:e.name}),n&&t.jsx("span",{className:"ml-2 font-mono text-xs text-text-muted bg-surface-elevated px-1.5 py-0.5 rounded",children:Ee(n)}),t.jsx("br",{}),t.jsx("span",{style:{color:_},className:"font-medium",children:"This Node (Local)"}),t.jsx("br",{}),t.jsxs("span",{className:"text-xs text-text-muted",children:[e.latitude.toFixed(5),", ",e.longitude.toFixed(5)]})]})})]}):null}function Re({neighborsWithLocation:e,localNode:n,localHash:r,zeroHopNeighbors:o,lastHopNeighborMap:a,meshTopology:i,hoveredMarker:s,onMarkerHover:c,getNodeOpacity:u,shouldShowNode:d,onRequestRemove:f}){const[h,p]=l.useState(null),m=l.useCallback(e=>{p(e)},[]),g=l.useCallback(()=>{p(null)},[]),b=l.useMemo(()=>[...e].sort(([e,t],[n,r])=>{const a=(e,t)=>Ce(t)?5e3:o.has(e)?2e3:i.hubNodes.includes(e)?1e3:0;return a(e,t)-a(n,r)}),[e,o,i.hubNodes]);return t.jsxs(t.Fragment,{children:[b.map(([e,n])=>{if(!n.latitude||!n.longitude)return null;const r=d(e),l=u(e,r);if(l<=.01)return null;const p=o.has(e),b=i.hubNodes.includes(e),v=i.mobileNodes.includes(e),y=Ce(n),x=i.centrality.get(e)||0,w=a.get(e)??null,k=i.fullAffinity.get(e),N=i.txDelayRecommendations.get(e);return t.jsx(Me,{hash:e,neighbor:n,isZeroHop:p,isHub:b,isMobile:v,isRoomServer:y,centrality:x,lastHopData:w,affinity:k,txDelayRec:N,nodeOpacity:l,isHovered:s===e,onHover:c,onRequestRemove:f,isPopupOpen:h===e,onOpenPopup:m,onClosePopup:g},e)}),n&&n.latitude&&n.longitude&&t.jsx(Fe,{localNode:n,localHash:r,isHovered:"local"===s,onHover:c,isPopupOpen:"local"===h,onOpenPopup:()=>m("local"),onClosePopup:g})]})}function $e(e,t=!1,n=!1,r=!1,o=.7){return e?t?Y:n?J:Q:r?o>=.75?G:U:o>=.85?U:o>=.7?X:"#1F2937"}function He(e,t,n){const r=t[1]-e[1],o=t[0]-e[0],a=Math.sqrt(r*r+o*o);if(0===a)return{line1:[e,t],line2:[e,t]};const i=2e-5*n,l=-o/a*i,s=r/a*i;return{line1:[[e[0]+l,e[1]+s],[t[0]+l,t[1]+s]],line2:[[e[0]-l,e[1]-s],[t[0]-l,t[1]-s]]}}function Te(e){return[e[1],e[0]]}const je={id:"topology-weak-edges",type:"line",paint:{"line-color":["get","color"],"line-width":["get","width"],"line-opacity":["get","opacity"]},layout:{"line-cap":"round","line-join":"round"}},De={id:"topology-validated-edges",type:"line",paint:{"line-color":["get","color"],"line-width":["get","width"],"line-opacity":["get","opacity"]},layout:{"line-cap":"round","line-join":"round"}},Ie={id:"topology-validated-edges-hitarea",type:"line",paint:{"line-color":"transparent","line-width":16,"line-opacity":0},layout:{"line-cap":"round","line-join":"round"}};function Pe({showTopology:e,isExiting:n,validatedPolylines:r,weakPolylines:o,edgeAnimProgress:a,weightAnimProgress:i,animStartWeights:s,animTargetWeights:c,maxCertainCount:u,loopEdgeKeys:d,backboneEdgeKeys:f,hoveredEdgeKey:m,onEdgeHover:g,highlightedEdgeKey:b,neighbors:v}){const y=e||n,x=l.useMemo(()=>y?function(e,t){const n=[];for(const{from:r,to:o,edge:a}of e){const e=t.get(a.key)??0;if(e<=0)continue;const i=[r[0]+(o[0]-r[0])*e,r[1]+(o[1]-r[1])*e];n.push({type:"Feature",properties:{key:a.key,color:X,width:1.5,opacity:.5*e,isLoopEdge:!1,isBackbone:!1,isDirectPath:!1,isHubConnection:!1,certainCount:a.certainCount,confidence:a.avgConfidence??.7,symmetryRatio:a.symmetryRatio??1,dominantDirection:a.dominantDirection??"balanced",fromName:"",toName:""},geometry:{type:"LineString",coordinates:[Te(r),Te(i)]}})}return{type:"FeatureCollection",features:n}}(o,a):{type:"FeatureCollection",features:[]},[o,a,y]),w=l.useMemo(()=>y?function(e,t,n,r,o,a,i,l,s,c,u){const d=[];for(const{from:f,to:h,edge:p}of e){const e=t.get(p.key)??0;if(e<=0)continue;const a=o.get(p.key)??A(p.certainCount),m=r.get(p.key)??a,g=m+(a-m)*n,b=i.has(p.key),v=l.has(p.key),y=p.avgConfidence??.7,x=s===p.key,w=null!==s,k=c===p.key,N=u[p.fromHash],S=u[p.toHash],C=(null==N?void 0:N.node_name)||(null==N?void 0:N.name)||p.fromHash.slice(0,8),E=(null==S?void 0:S.node_name)||(null==S?void 0:S.name)||p.toHash.slice(0,8),M=[f[0]+(h[0]-f[0])*e,f[1]+(h[1]-f[1])*e],F=.82*Math.min(1.5*e,1),R=w?x?1.25:.4:1;if(b){const{line1:e,line2:t}=He(f,M,1.5*g),n=x?J:U,r=1.1*F*R,o=x?Math.max(2.5,.8*g):Math.max(1.5,.6*g);d.push({type:"Feature",properties:{key:`${p.key}-loop1`,color:n,width:o,opacity:r,isLoopEdge:!0,isBackbone:!1,isDirectPath:p.isDirectPathEdge??!1,isHubConnection:p.isHubConnection??!1,certainCount:p.certainCount,confidence:y,symmetryRatio:p.symmetryRatio??1,dominantDirection:p.dominantDirection??"balanced",fromName:C,toName:E},geometry:{type:"LineString",coordinates:[Te(e[0]),Te(e[1])]}}),d.push({type:"Feature",properties:{key:`${p.key}-loop2`,color:n,width:o,opacity:r,isLoopEdge:!0,isBackbone:!1,isDirectPath:p.isDirectPathEdge??!1,isHubConnection:p.isHubConnection??!1,certainCount:p.certainCount,confidence:y,symmetryRatio:p.symmetryRatio??1,dominantDirection:p.dominantDirection??"balanced",fromName:C,toName:E},geometry:{type:"LineString",coordinates:[Te(t[0]),Te(t[1])]}});continue}const $=k?"#FFD700":$e(x,p.isDirectPathEdge??!1,!1,v,y);let H=k?Math.max(1.6*g,4.5):v?1.3*g:g;x&&!k&&(H=Math.max(1.2*H,3));let T=k?.95:v?1.15*F:F;T*=R,d.push({type:"Feature",properties:{key:p.key,color:$,width:H,opacity:T,isLoopEdge:!1,isBackbone:v,isDirectPath:p.isDirectPathEdge??!1,isHubConnection:p.isHubConnection??!1,certainCount:p.certainCount,confidence:y,symmetryRatio:p.symmetryRatio??1,dominantDirection:p.dominantDirection??"balanced",fromName:C,toName:E},geometry:{type:"LineString",coordinates:[Te(f),Te(M)]}})}return{type:"FeatureCollection",features:d}}(r,a,i,s,c,0,d,f,m,b,v):{type:"FeatureCollection",features:[]},[r,a,i,s,c,u,d,f,m,b,v,y]);return y?t.jsxs(t.Fragment,{children:[t.jsx(h,{id:"weak-edges",type:"geojson",data:x,children:t.jsx(p,{...je})}),t.jsxs(h,{id:"validated-edges",type:"geojson",data:w,children:[t.jsx(p,{...Ie}),t.jsx(p,{...De})]})]}):null}const ze=["topology-validated-edges-hitarea","topology-validated-edges"];function Ae(e){return[e[1],e[0]]}const Le=[[0,4,3],[.5,4,2.5],[1,4,2],[1.5,4,1.5],[2,4,1],[2.5,4,.5],[3,4,0],[0,.5,3,3.5],[0,1,3,3],[0,1.5,3,2.5],[0,2,3,2],[0,2.5,3,1.5],[0,3,3,1],[0,3.5,3,.5]],Oe={id:"neighbor-edges-hitarea",type:"line",paint:{"line-color":"transparent","line-width":16,"line-opacity":0},layout:{"line-cap":"round","line-join":"round"}};function Be({neighborPolylines:e,hoveredEdgeKey:n,onEdgeHover:r}){const o=l.useRef(null),a=l.useRef(-1),[i,s]=l.useState(0),c=e.length>0,u=l.useMemo(()=>c?function(e,t){const n=[];for(const{from:r,to:o,hash:a,neighbor:i,lastHopData:l}of e){const e=i.node_name||i.name||a.slice(0,8),s=(null==l?void 0:l.avgSnr)??i.snr,c=(null==l?void 0:l.avgRssi)??i.rssi,u=null==l?void 0:l.count,d=null==l?void 0:l.confidence,f=`neighbor-${a}`,h=t===f,p=h?te:ee,m=h?2.5:1.5,g=h?1:.6;n.push({type:"Feature",properties:{key:f,hash:a,name:e,prefix:null==l?void 0:l.prefix,rssi:c,snr:s,packetCount:u,confidence:d,hasAvgRssi:void 0!==(null==l?void 0:l.avgRssi),hasAvgSnr:void 0!==(null==l?void 0:l.avgSnr),color:p,width:m,opacity:g},geometry:{type:"LineString",coordinates:[Ae(r),Ae(o)]}})}return{type:"FeatureCollection",features:n}}(e,n):{type:"FeatureCollection",features:[]},[e,n,c]),d=Le[i]||Le[0],f=l.useMemo(()=>({id:"neighbor-edges",type:"line",paint:{"line-color":["get","color"],"line-width":["get","width"],"line-opacity":["get","opacity"],"line-dasharray":d},layout:{"line-cap":"butt","line-join":"round"}}),[d]);return l.useEffect(()=>{if(!c)return;let e=!0;const t=n=>{if(!e)return;const r=Math.floor(n/100)%Le.length;r!==a.current&&(a.current=r,s(r)),o.current=requestAnimationFrame(t)};return o.current=requestAnimationFrame(t),()=>{e=!1,null!==o.current&&cancelAnimationFrame(o.current)}},[c]),c?t.jsxs(h,{id:"neighbor-edges",type:"geojson",data:u,children:[t.jsx(p,{...Oe}),t.jsx(p,{...f})]}):null}const We=["neighbor-edges-hitarea","neighbor-edges"];function _e({positions:e}){const{current:t}=m(),n=l.useRef(!1);return l.useEffect(()=>{if(t&&0!==e.length&&!n.current)if(n.current=!0,1===e.length)t.flyTo({center:[e[0][1],e[0][0]],zoom:14,duration:1e3});else{const n=e.map(([e,t])=>[t,e]);let r=1/0,o=-1/0,a=1/0,i=-1/0;for(const[e,t]of n)r=Math.min(r,e),o=Math.max(o,e),a=Math.min(a,t),i=Math.max(i,t);const l=[[r,a],[o,i]];t.fitBounds(l,{padding:{top:15,bottom:15,left:15,right:15},maxZoom:16,duration:1e3})}},[t,e]),null}function qe({targetHash:e,nodeCoordinates:t,onComplete:n}){const{current:r}=m(),o=l.useRef(null);return l.useEffect(()=>{if(!r||!e||e===o.current)return;const a=t.get(e);if(!a)return;o.current=e;const[i,l]=a;r.flyTo({center:[l,i],zoom:15,duration:2500,essential:!0}),setTimeout(()=>{null==n||n()},2600)},[e,t,r,n]),null}function Ve({highlightedEdgeKey:e,validatedPolylines:t,weakPolylines:n,onEnsureTopology:r}){const{current:o}=m();return l.useEffect(()=>{if(!o||!e)return;r();const a=t.find(t=>t.edge.key===e)||n.find(t=>t.edge.key===e);if(!a)return;const i=(a.from[0]+a.to[0])/2,l=(a.from[1]+a.to[1])/2,s=o.getZoom(),c=Math.max(s,11);o.flyTo({center:[l,i],zoom:c,duration:500,essential:!0})},[e,t,n,o,r]),null}const Ze={longitude:0,latitude:0,zoom:2};function Ke({type:e,properties:n,maxCertainCount:r}){if("neighbor"===e){const e=n;return t.jsxs("div",{className:"text-xs",children:[t.jsxs("div",{className:"font-medium text-text-primary",children:[t.jsx("span",{className:"text-amber-400",children:"●"})," ",e.name,e.prefix&&t.jsxs("span",{className:"ml-1 text-text-muted font-mono text-[10px]",children:["(",e.prefix,")"]})]}),t.jsxs("div",{className:"text-text-secondary flex gap-2",children:[void 0!==e.rssi&&null!==e.rssi&&t.jsxs("span",{children:["RSSI: ",Math.round(e.rssi)," dBm",e.hasAvgRssi&&" avg"]}),void 0!==e.snr&&null!==e.snr&&t.jsxs("span",{children:["SNR: ",Number(e.snr).toFixed(1)," dB",e.hasAvgSnr&&" avg"]})]}),void 0!==e.packetCount&&t.jsxs("div",{className:"text-text-muted text-[10px]",children:[Number(e.packetCount).toLocaleString()," packets",void 0!==e.confidence&&` • ${Math.round(100*Number(e.confidence))}% conf`]}),t.jsx("div",{className:"text-amber-400 text-[10px] mt-0.5",children:"Direct RF neighbor"})]})}const o=n,a=r>0?Number(o.certainCount)/r:0;return t.jsxs("div",{className:"text-xs",children:[t.jsxs("div",{className:"font-medium text-text-primary",children:[o.fromName," ↔ ",o.toName]}),t.jsxs("div",{className:"text-text-secondary",children:[o.certainCount," validations (",Math.round(100*a),"%) • ",Math.round(100*Number(o.confidence)),"% conf"]}),o.isBackbone&&t.jsx("div",{className:"text-gray-300 font-semibold",children:"Backbone"}),o.isLoopEdge&&t.jsx("div",{className:"text-indigo-400 text-[10px] mt-0.5",children:"Redundant path"}),o.isDirectPath&&t.jsx("div",{className:"text-teal-400 text-[10px]",children:"Direct path"})]})}function Ue({neighbors:e,localNode:n,localHash:s,onRemoveNode:c,selectedNodeHash:u,onNodeSelected:d,highlightedEdgeKey:h}){const p=l.useRef(null),m=r(),y=o(),x=a(),w=i(),[k,S]=l.useState(Ze),[C,E]=l.useState(!1),[M,F]=l.useState(!1),[R,$]=l.useState(!1),[H,T]=l.useState(!1),[j,D]=l.useState(null),[I,P]=l.useState(null),[z,L]=l.useState(null),[O,W]=l.useState(""),[_,q]=l.useState(!1),[V,Z]=l.useState("fetching"),[K,U]=l.useState(!1),[G,X]=l.useState(0),[Y,J]=l.useState(null),Q=l.useMemo(()=>Object.entries(e).filter(([,e])=>e.latitude&&e.longitude),[e]),ee=l.useMemo(()=>{const e=[];(null==n?void 0:n.latitude)&&(null==n?void 0:n.longitude)&&e.push([n.latitude,n.longitude]);for(const[,t]of Q)t.latitude&&t.longitude&&e.push([t.latitude,t.longitude]);return e},[n,Q]),te=l.useMemo(()=>{const e=new Map;s&&(null==n?void 0:n.latitude)&&(null==n?void 0:n.longitude)&&e.set(s,[n.latitude,n.longitude]);for(const[t,n]of Q)n.latitude&&n.longitude&&e.set(t,[n.latitude,n.longitude]);return e},[s,n,Q]),re=l.useMemo(()=>{const e=new Map;for(const t of x)"expired"!==t.status&&e.set(t.hash,{hash:t.hash,prefix:t.prefix,count:t.count,avgRssi:t.avgRssi,avgSnr:t.avgSnr,lastSeen:t.lastSeen,confidence:1,status:t.status});return e},[x]),oe=l.useMemo(()=>{var t,n;const r=new Set;for(const o of re.keys())(null==(t=e[o])?void 0:t.latitude)&&(null==(n=e[o])?void 0:n.longitude)&&r.add(o);return r},[re,e]),ae=l.useMemo(()=>{const e=[];for(const t of m.validatedEdges){const n=te.get(t.fromHash),r=te.get(t.toHash);n&&r&&e.push({from:n,to:r,edge:t})}return e},[m.validatedEdges,te]),le=l.useMemo(()=>{const e=[];for(const t of m.weakEdges){const n=te.get(t.fromHash),r=te.get(t.toHash);n&&r&&e.push({from:n,to:r,edge:t})}return e},[m.weakEdges,te]),se=l.useMemo(()=>{if(!(null==n?void 0:n.latitude)||!(null==n?void 0:n.longitude))return[];const t=[],r=[n.latitude,n.longitude];for(const n of oe){const o=e[n];(null==o?void 0:o.latitude)&&(null==o?void 0:o.longitude)&&t.push({from:r,to:[o.latitude,o.longitude],hash:n,neighbor:o,lastHopData:re.get(n)??null})}return t},[n,oe,e,re]),fe=l.useMemo(()=>new Set(m.loopEdgeKeys),[m.loopEdgeKeys]),he=l.useMemo(()=>new Set(m.backboneEdges),[m.backboneEdges]),pe=l.useMemo(()=>{let e=0;for(const t of m.validatedEdges)t.certainCount>e&&(e=t.certainCount);return e||1},[m.validatedEdges]),{edgeAnimProgress:me,weightAnimProgress:ge,animStartWeights:be,animTargetWeights:ve,isExiting:ye,resetAnimationState:xe}=function({showTopology:e,polylines:t,weakPolylines:n,maxCertainCount:r,getWeight:o}){const[a,i]=l.useState(new Map),[s,c]=l.useState(1),[u,d]=l.useState(!1),f=l.useRef(e),h=l.useRef(new Set),p=l.useRef(""),[m,g]=l.useState(new Map),[b,v]=l.useState(new Map),y=l.useRef(new Map),x=l.useRef(new Map);l.useEffect(()=>{x.current=a},[a]);const w=l.useCallback(()=>{i(new Map),h.current=new Set,p.current="",g(new Map),v(new Map)},[]);return l.useEffect(()=>{const t=f.current,n=e;if(f.current=e,t&&!n&&!u){d(!0);const e=new Map(x.current);let t=null;const n=r=>{t||(t=r);const o=r-t,a=Math.min(o/500,1),l=(s=a,1-Math.pow(1-s,3));var s;i(()=>{const t=new Map;for(const[n,r]of e)t.set(n,r*(1-l));return t}),a<1?requestAnimationFrame(n):(d(!1),i(new Map),h.current=new Set,p.current="",g(new Map),v(new Map))};requestAnimationFrame(n)}!t&&n&&(i(new Map),h.current=new Set,p.current="")},[e,u]),l.useEffect(()=>{if(!e||u)return;const a=[...t,...n],l=a.map(e=>`${e.edge.key}:${e.edge.certainCount}`).sort().join(","),s=0===h.current.size,d=""!==p.current&&p.current!==l;if(s||d){const e=[],n=[];for(const{edge:t}of a)h.current.has(t.key)?n.push(t.key):e.push(t.key);if(d&&n.length>0){const e=new Map;for(const t of n){const n=y.current.get(t);void 0!==n&&e.set(t,n)}g(e),c(0)}const l=new Map;for(const{edge:a}of t){const e=o(a.certainCount,r);l.set(a.key,e)}if(v(l),i(t=>{const r=new Map(t);for(const n of e)r.set(n,0);for(const e of n)r.has(e)||r.set(e,1);return r}),e.length>0){let t=null;const n=Math.min(100,ne/e.length/2),r=o=>{t||(t=o);const a=o-t;i(t=>{const r=new Map(t);return e.forEach((e,t)=>{const o=t*n,i=Math.max(0,a-o),l=ue(Math.min(i/ne,1));r.set(e,l)}),r});const l=ne+(e.length-1)*n;a<l&&requestAnimationFrame(r)};requestAnimationFrame(r)}if(d&&n.length>0){let e=null;const t=n=>{e||(e=n);const r=n-e,o=Math.min(r/ne,1),a=ue(o);c(a),o<1&&requestAnimationFrame(t)};requestAnimationFrame(t)}for(const t of e)h.current.add(t)}for(const{edge:e}of t){const t=o(e.certainCount,r);y.current.set(e.key,t)}p.current=l},[e,u,t,n,r,o]),{edgeAnimProgress:a,weightAnimProgress:s,isExiting:u,animStartWeights:m,animTargetWeights:b,resetAnimationState:w}}({showTopology:M,polylines:ae,weakPolylines:le,maxCertainCount:pe,getWeight:A}),we=l.useMemo(()=>{const e=new Set;for(const t of m.hubNodes){e.add(t);for(const n of m.validatedEdges)n.fromHash===t&&e.add(n.toHash),n.toHash===t&&e.add(n.fromHash)}return e},[m.hubNodes,m.validatedEdges]),ke=l.useMemo(()=>{const e=new Set;if(!s)return e;for(const t of m.validatedEdges)t.fromHash===s&&e.add(t.toHash),t.toHash===s&&e.add(t.fromHash);return e},[s,m.validatedEdges]),{getNodeOpacity:Ne}=function({soloDirect:e,soloHubs:t,neighborHashes:n,hubConnectedNodes:r,directNodeSet:o,localConnectedNodes:a,showTopology:i}){const[s,c]=l.useState(new Map),u=l.useRef(e),d=l.useRef(t),f=l.useRef(new Map),h=l.useRef(null),p=l.useRef(r),m=l.useRef(o),g=l.useRef(a),b=l.useRef(i);return l.useEffect(()=>{p.current=r,m.current=o,g.current=a,b.current=i},[r,o,a,i]),l.useEffect(()=>{const r=u.current,o=d.current,a=e,i=t;if(u.current=e,d.current=t,r===a&&o===i)return;h.current&&(cancelAnimationFrame(h.current),h.current=null);const l=p.current,s=m.current,v=g.current,y=b.current;for(const e of n)f.current.has(e)||f.current.set(e,Math.random());const x=(e,t,n)=>{const r=l.has(e),o=s.has(e),a=y&&v.has(e);return!t&&!n||(t&&n?r||o||a:n?r:!t||o||a)},w=[];for(const e of n){const t=x(e,r,o),n=x(e,a,i);t!==n&&w.push({hash:e,startOpacity:t?1:0,targetOpacity:n?1:0})}if(0===w.length)return;c(e=>{const t=new Map(e);for(const{hash:n,startOpacity:r}of w)t.set(n,r);return t});const k=w;let N=null;const S=e=>{N||(N=e);const t=e-N;let n=!0;c(()=>{const e=new Map;for(const{hash:r,startOpacity:o,targetOpacity:a}of k){const i=250*(f.current.get(r)??0),l=Math.max(0,t-i),s=Math.min(l/500,1),c=o+(a-o)*de(s);e.set(r,c),s<1&&(n=!1)}return e}),t<750&&!n?h.current=requestAnimationFrame(S):(h.current=null,c(new Map))};return h.current=requestAnimationFrame(S),()=>{h.current&&(cancelAnimationFrame(h.current),h.current=null)}},[e,t,n]),{nodeOpacities:s,getNodeOpacity:(e,t)=>s.has(e)?s.get(e):t?1:0}}({soloDirect:R,soloHubs:H,neighborHashes:Q.map(([e])=>e),hubConnectedNodes:we,directNodeSet:oe,localConnectedNodes:ke,showTopology:M}),Se=l.useCallback(e=>{if(!R&&!H)return!0;if(R)return oe.has(e);if(H){if(m.hubNodes.includes(e))return!0;for(const t of m.validatedEdges){if(t.fromHash===e&&m.hubNodes.includes(t.toHash))return!0;if(t.toHash===e&&m.hubNodes.includes(t.fromHash))return!0}return!1}return!0},[R,H,oe,m.hubNodes,m.validatedEdges]),Ce=l.useCallback(async()=>{U(!0),q(!0),Z("fetching"),X(0),await y(),X(w.packetCount),Z("analyzing"),await new Promise(e=>setTimeout(e,200)),Z("building");const e=Date.now(),t=Date.now()-e;t<1700&&await new Promise(e=>setTimeout(e,1700-t)),Z("complete"),await new Promise(e=>setTimeout(e,1e3)),q(!1),U(!1),xe(),setTimeout(()=>{F(!0)},150)},[y,xe,w.packetCount]),Ee=l.useCallback(e=>{S(e.viewState)},[]),Me=l.useCallback(()=>{E(e=>!e)},[]),Fe=l.useCallback(()=>{F(e=>!e)},[]),$e=l.useCallback(()=>{$(e=>!e)},[]),He=l.useCallback(()=>{T(e=>!e)},[]),Te=l.useCallback(()=>{M||F(!0)},[M]),je=l.useCallback((e,t)=>{L(e),W(t)},[]),De=l.useCallback(()=>{z&&c&&c(z),L(null),W("")},[z,c]),Ie=l.useMemo(()=>[...ze,...We],[]),Ae=l.useCallback(e=>{var t;if(!e.features||0===e.features.length)return;const n=e.features[0],r=null==(t=n.layer)?void 0:t.id,o=n.properties;if(!(null==o?void 0:o.key))return;const a=null==r?void 0:r.startsWith("topology-"),i=null==r?void 0:r.startsWith("neighbor-");if(a||i){const t=o.key.replace(/-loop[12]$/,"");P(t),e.lngLat&&J({longitude:e.lngLat.lng,latitude:e.lngLat.lat,type:a?"topology":"neighbor",properties:o})}p.current&&(p.current.getCanvas().style.cursor="pointer")},[]),Le=l.useCallback(()=>{P(null),J(null),p.current&&(p.current.getCanvas().style.cursor="")},[]),Oe=C?"h-screen":"h-[500px]",Ue=C?"fixed inset-0 z-50 bg-surface":"glass-card overflow-hidden";return t.jsxs("div",{className:`${Ue} ${Oe}`,children:[t.jsxs("div",{className:"relative w-full h-full",children:[t.jsxs(g,{ref:p,...k,onMove:Ee,mapStyle:"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",style:{width:"100%",height:"100%"},attributionControl:!1,interactiveLayerIds:Ie,onMouseMove:Ae,onMouseLeave:Le,onLoad:e=>{const t=e.target,n=t.getStyle();if(null==n?void 0:n.layers)for(const r of n.layers)"symbol"===r.type&&(t.setPaintProperty(r.id,"text-color","rgba(50, 52, 58, 1)"),t.setPaintProperty(r.id,"text-halo-color","rgba(8, 9, 11, 0.9)"),t.setPaintProperty(r.id,"text-halo-width",1),t.setLayoutProperty(r.id,"text-font",["Inter","Open Sans Regular","Arial Unicode MS Regular"]))},children:[t.jsx(b,{position:"top-left",style:{marginTop:"1rem",marginLeft:"1rem"}}),t.jsx(v,{position:"bottom-right"}),t.jsx(_e,{positions:ee}),u&&t.jsx(qe,{targetHash:u,nodeCoordinates:te,onComplete:d}),h&&t.jsx(Ve,{highlightedEdgeKey:h,validatedPolylines:ae,weakPolylines:le,onEnsureTopology:Te}),t.jsx(Pe,{showTopology:M,isExiting:ye,validatedPolylines:ae,weakPolylines:le,edgeAnimProgress:me,weightAnimProgress:ge,animStartWeights:be,animTargetWeights:ve,maxCertainCount:pe,loopEdgeKeys:fe,backboneEdgeKeys:he,hoveredEdgeKey:I,onEdgeHover:P,highlightedEdgeKey:h,neighbors:e}),t.jsx(Re,{neighborsWithLocation:Q,localNode:n,localHash:s,zeroHopNeighbors:oe,lastHopNeighborMap:re,meshTopology:m,hoveredMarker:j,onMarkerHover:D,getNodeOpacity:Ne,shouldShowNode:Se,onRequestRemove:c?je:void 0}),t.jsx(Be,{neighborPolylines:se,hoveredEdgeKey:I,onEdgeHover:P}),Y&&t.jsx(f,{longitude:Y.longitude,latitude:Y.latitude,anchor:"bottom",offset:[0,-20],closeButton:!1,closeOnClick:!1,className:"maplibre-popup",children:t.jsx(Ke,{type:Y.type,properties:Y.properties,maxCertainCount:pe})})]}),t.jsx(ce,{isDeepLoading:K,showDeepAnalysisModal:_,onDeepAnalysis:Ce,showTopology:M,onToggleTopology:Fe,hasValidatedPolylines:ae.length>0,soloHubs:H,onToggleSoloHubs:He,hasHubNodes:m.hubNodes.length>0,soloDirect:R,onToggleSoloDirect:$e,hasZeroHopNeighbors:oe.size>0,isFullscreen:C,onToggleFullscreen:Me}),t.jsx(ie,{showTopology:M,validatedPolylineCount:ae.length,filteredNeighborCount:Q.length,hasLocalNode:!(!(null==n?void 0:n.latitude)||!(null==n?void 0:n.longitude)),meshTopology:m,zeroHopNeighbors:oe,neighborsWithLocation:Q})]}),!C&&t.jsxs("div",{className:"absolute inset-0 pointer-events-none rounded-[1.125rem] overflow-hidden",children:[t.jsx("div",{className:"absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-white/20 to-transparent"}),t.jsx("div",{className:"absolute top-0 left-0 w-24 h-24 bg-gradient-to-br from-white/[0.03] to-transparent"}),t.jsx("div",{className:"absolute top-0 right-0 w-24 h-24 bg-gradient-to-bl from-white/[0.03] to-transparent"}),t.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-16 bg-gradient-to-t from-black/20 to-transparent"})]}),t.jsx(N,{isOpen:null!==z,onCancel:()=>L(null),onConfirm:De,title:"Remove Node?",message:`Remove "${O}" from the contacts list? This will hide the node until it sends a new packet.`,confirmLabel:"Remove",cancelLabel:"Cancel",variant:"danger"}),t.jsx(B,{isOpen:_,currentStep:V,packetCount:G})]})}export{Ue as default};