rigscope 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +3 -3
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +6 -6
  5. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  6. package/.next/server/app/_global-error.html +1 -1
  7. package/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +2 -2
  14. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  15. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  16. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  17. package/.next/server/app/administration/page_client-reference-manifest.js +1 -1
  18. package/.next/server/app/administration.html +1 -1
  19. package/.next/server/app/administration.rsc +3 -3
  20. package/.next/server/app/administration.segments/_full.segment.rsc +3 -3
  21. package/.next/server/app/administration.segments/_tree.segment.rsc +2 -2
  22. package/.next/server/app/administration.segments/administration/__PAGE__.segment.rsc +3 -3
  23. package/.next/server/app/alerts/page.js +1 -1
  24. package/.next/server/app/alerts/page_client-reference-manifest.js +1 -1
  25. package/.next/server/app/alerts.html +1 -1
  26. package/.next/server/app/alerts.rsc +4 -4
  27. package/.next/server/app/alerts.segments/_full.segment.rsc +4 -4
  28. package/.next/server/app/alerts.segments/_tree.segment.rsc +2 -2
  29. package/.next/server/app/alerts.segments/alerts/__PAGE__.segment.rsc +4 -4
  30. package/.next/server/app/connections/page.js +1 -1
  31. package/.next/server/app/connections/page.js.nft.json +1 -1
  32. package/.next/server/app/connections/page_client-reference-manifest.js +1 -1
  33. package/.next/server/app/connections.html +1 -1
  34. package/.next/server/app/connections.rsc +6 -6
  35. package/.next/server/app/connections.segments/_full.segment.rsc +6 -6
  36. package/.next/server/app/connections.segments/_tree.segment.rsc +2 -2
  37. package/.next/server/app/connections.segments/connections/__PAGE__.segment.rsc +6 -6
  38. package/.next/server/app/history/page_client-reference-manifest.js +1 -1
  39. package/.next/server/app/history.html +1 -1
  40. package/.next/server/app/history.rsc +4 -4
  41. package/.next/server/app/history.segments/_full.segment.rsc +4 -4
  42. package/.next/server/app/history.segments/_tree.segment.rsc +2 -2
  43. package/.next/server/app/history.segments/history/__PAGE__.segment.rsc +4 -4
  44. package/.next/server/app/index.html +1 -1
  45. package/.next/server/app/index.rsc +6 -6
  46. package/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -6
  47. package/.next/server/app/index.segments/_full.segment.rsc +6 -6
  48. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  49. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  50. package/.next/server/app/login.html +1 -1
  51. package/.next/server/app/login.rsc +2 -2
  52. package/.next/server/app/login.segments/_full.segment.rsc +2 -2
  53. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  54. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  55. package/.next/server/app/machines/[machineId]/page.js +1 -1
  56. package/.next/server/app/machines/[machineId]/page.js.nft.json +1 -1
  57. package/.next/server/app/machines/[machineId]/page_client-reference-manifest.js +1 -1
  58. package/.next/server/app/page.js +1 -1
  59. package/.next/server/app/page.js.nft.json +1 -1
  60. package/.next/server/app/page_client-reference-manifest.js +1 -1
  61. package/.next/server/app/processes/page.js +1 -1
  62. package/.next/server/app/processes/page_client-reference-manifest.js +1 -1
  63. package/.next/server/app/processes.html +1 -1
  64. package/.next/server/app/processes.rsc +4 -4
  65. package/.next/server/app/processes.segments/_full.segment.rsc +4 -4
  66. package/.next/server/app/processes.segments/_tree.segment.rsc +2 -2
  67. package/.next/server/app/processes.segments/processes/__PAGE__.segment.rsc +4 -4
  68. package/.next/server/app-paths-manifest.json +3 -3
  69. package/.next/server/chunks/168.js +1 -1
  70. package/.next/server/chunks/364.js +1 -0
  71. package/.next/server/chunks/751.js +1 -1
  72. package/.next/server/middleware-build-manifest.js +1 -1
  73. package/.next/server/pages/404.html +1 -1
  74. package/.next/server/pages/500.html +1 -1
  75. package/.next/static/chunks/103-13ec30dcc059b9d3.js +1 -0
  76. package/.next/static/chunks/{227-417939c480f50747.js → 130-e940915010276f88.js} +1 -1
  77. package/.next/static/chunks/408-29f55984738967db.js +1 -0
  78. package/.next/static/chunks/app/alerts/{page-fe0e877778c60af8.js → page-2548b2ab0c057953.js} +1 -1
  79. package/.next/static/chunks/app/connections/{page-99cd54d6929b3f1f.js → page-07113bf16cb352e7.js} +1 -1
  80. package/.next/static/chunks/app/machines/[machineId]/page-0b89e4393a137c4d.js +1 -0
  81. package/.next/static/chunks/app/{page-1ae9fc94c897785b.js → page-c68554c93016dd13.js} +1 -1
  82. package/.next/static/chunks/app/processes/{page-0e98a4a64e829c5f.js → page-b6d97d119f10e2a1.js} +3 -3
  83. package/.next/static/css/fb3ad9534f4681e6.css +1 -0
  84. package/CHANGELOG.md +35 -0
  85. package/DESIGN.md +27 -16
  86. package/README.md +2 -0
  87. package/dist/cli.cjs +2366 -1930
  88. package/dist/collector.cjs +18 -7
  89. package/dist/hub.cjs +1 -1
  90. package/docs/installation.md +77 -25
  91. package/docs/operations.md +13 -7
  92. package/docs/releasing.md +12 -12
  93. package/package.json +1 -1
  94. package/.next/server/chunks/877.js +0 -1
  95. package/.next/server/route-cache/APP_PAGE/16d1ab46157a868f438fa01e04bf53e805c71cddec593ea1535905c59625cd42/$/login.html +0 -1
  96. package/.next/server/route-cache/APP_PAGE/16d1ab46157a868f438fa01e04bf53e805c71cddec593ea1535905c59625cd42/$/login.meta +0 -1
  97. package/.next/server/route-cache/APP_PAGE/16d1ab46157a868f438fa01e04bf53e805c71cddec593ea1535905c59625cd42/$/login.rsc +0 -26
  98. package/.next/server/route-cache/APP_PAGE/16d1ab46157a868f438fa01e04bf53e805c71cddec593ea1535905c59625cd42/$/login.segments/_full.segment.rsc +0 -26
  99. package/.next/server/route-cache/APP_PAGE/16d1ab46157a868f438fa01e04bf53e805c71cddec593ea1535905c59625cd42/$/login.segments/_tree.segment.rsc +0 -4
  100. package/.next/server/route-cache/APP_PAGE/16d1ab46157a868f438fa01e04bf53e805c71cddec593ea1535905c59625cd42/$/login.segments/login/__PAGE__.segment.rsc +0 -32
  101. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.html +0 -1
  102. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.meta +0 -1
  103. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.rsc +0 -24
  104. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.segments/_full.segment.rsc +0 -24
  105. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.segments/_not-found/__PAGE__.segment.rsc +0 -30
  106. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.segments/_tree.segment.rsc +0 -4
  107. package/.next/server/route-cache/APP_PAGE/c6377dd9ce6a1c2cd100eb4344e843eb4639b9ed26f84643f77680e9eb454c4b/$/index.html +0 -1
  108. package/.next/server/route-cache/APP_PAGE/c6377dd9ce6a1c2cd100eb4344e843eb4639b9ed26f84643f77680e9eb454c4b/$/index.meta +0 -1
  109. package/.next/server/route-cache/APP_PAGE/c6377dd9ce6a1c2cd100eb4344e843eb4639b9ed26f84643f77680e9eb454c4b/$/index.rsc +0 -26
  110. package/.next/server/route-cache/APP_PAGE/c6377dd9ce6a1c2cd100eb4344e843eb4639b9ed26f84643f77680e9eb454c4b/$/index.segments/__PAGE__.segment.rsc +0 -31
  111. package/.next/server/route-cache/APP_PAGE/c6377dd9ce6a1c2cd100eb4344e843eb4639b9ed26f84643f77680e9eb454c4b/$/index.segments/_full.segment.rsc +0 -26
  112. package/.next/server/route-cache/APP_PAGE/c6377dd9ce6a1c2cd100eb4344e843eb4639b9ed26f84643f77680e9eb454c4b/$/index.segments/_tree.segment.rsc +0 -3
  113. package/.next/static/chunks/103-c47318242b24e9ac.js +0 -1
  114. package/.next/static/chunks/408-4fe7147e38981ee1.js +0 -1
  115. package/.next/static/chunks/app/machines/[machineId]/page-916ee73de5eb067d.js +0 -1
  116. package/.next/static/css/3fbf75e4c471c6a8.css +0 -1
  117. /package/.next/static/{xjSDCOO8Gpm5iPO9tyRG5 → oxwySrJXqXq8O6_7AzZGe}/_buildManifest.js +0 -0
  118. /package/.next/static/{xjSDCOO8Gpm5iPO9tyRG5 → oxwySrJXqXq8O6_7AzZGe}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[952],{1:(e,t,r)=>{"use strict";r.d(t,{PE:()=>o,UR:()=>c,kg:()=>l,uW:()=>d});let s=/^[\u0009\u000a\u000d ]*[=+\-@]/,n=/^[\u0009\u000a\u000d]/;function a(e){if(null==e)return"";if("number"==typeof e)return Number.isFinite(e)?String(e):"";if("boolean"==typeof e)return e?"true":"false";let t=0===e.length?e:s.test(e)||n.test(e)?`'${e}`:e;return/[",\t\r\n]/.test(t)?`"${t.replace(/"/g,'""')}"`:t}function i(e){return e.map(a).join(",")}function l(e){return`${e.map(i).join("\r\n")}\r
2
- `}function o(e,t,r){if("u"<typeof document)return;let s=new Blob([t],{type:r}),n=URL.createObjectURL(s),a=document.createElement("a");a.href=n,a.download=e,a.rel="noopener",a.style.display="none",document.body.append(a),a.click(),a.remove(),globalThis.setTimeout(()=>URL.revokeObjectURL(n),0)}let c="text/csv;charset=utf-8",d="application/json;charset=utf-8"},438:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},2910:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]])},3381:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("CloudOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5.782 5.782A7 7 0 0 0 9 19h8.5a4.5 4.5 0 0 0 1.307-.193",key:"yfwify"}],["path",{d:"M21.532 16.5A4.5 4.5 0 0 0 17.5 10h-1.79A7.008 7.008 0 0 0 10 5.07",key:"jlfiyv"}]])},4268:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},6582:(e,t,r)=>{"use strict";r.d(t,{E:()=>x,x:()=>g});var s=r(5155),n=r(8500),a=r.n(n),i=r(828),l=r(6914),o=r(7029),c=r(438),d=r(7422),u=r(1735),p=r(3440),h=r(9939);function m(e){return(0,s.jsxs)("button",{type:"button",onClick:e.onClick,className:"inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,s.jsx)(i.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),e.children]})}function f(e){return(0,s.jsx)(a(),{href:e.href,className:e.primary?"inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-accent-foreground transition-colors hover:bg-accent/90":"inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:e.children})}function g(){let{session:e,phase:t,retryConnection:r}=(0,h.M)();switch(e.kind){case"restoring":return(0,s.jsx)(p.Z,{title:"Checking session",className:"mx-auto my-12 max-w-md",children:(0,s.jsx)(p.p,{icon:l.A,note:"Checking your session…"})});case"restore-failed":return(0,s.jsxs)(p.Z,{title:"Hub unreachable",className:"mx-auto my-12 max-w-md",children:[(0,s.jsx)(p.p,{icon:o.A,note:"The hub is unreachable right now."}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(m,{onClick:r,children:"Check again"})})]});case"signed-out":if("expired"===t)return(0,s.jsxs)(p.Z,{title:"Session ended",className:"mx-auto my-12 max-w-md",children:[(0,s.jsx)(p.p,{icon:c.A,note:"Your session ended."}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(f,{href:"/login",primary:!0,children:"Sign in"})})]});return(0,s.jsxs)(p.Z,{title:"Sign in required",className:"mx-auto my-12 max-w-md",children:[(0,s.jsx)(p.p,{icon:l.A,note:"Sign in required."}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(f,{href:"/login",primary:!0,children:"Sign in"})})]});case"auth-unavailable":return(0,s.jsx)(p.Z,{title:"Sign-in unavailable",className:"mx-auto my-12 max-w-md",children:(0,s.jsx)(p.p,{icon:d.A,note:"Browser sign-in is not configured on this hub."})})}return"expired"===t?(0,s.jsxs)(p.Z,{title:"Session ended",className:"mx-auto my-12 max-w-md",children:[(0,s.jsx)(p.p,{icon:c.A,note:"Your session ended."}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(f,{href:"/login",primary:!0,children:"Sign in"})})]}):"no-permission"===t?(0,s.jsxs)(p.Z,{title:"No permission",className:"mx-auto my-12 max-w-md",children:[(0,s.jsx)(p.p,{icon:d.A,note:`You are signed in as ${e.user.username}, but this hub grants no machine view to this account.`}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(m,{onClick:r,children:"Check again"})})]}):null}function x(){let{phase:e,retryConnection:t}=(0,h.M)();return"reconnecting"!==e&&"disconnected"!==e&&"connecting"!==e?null:"connecting"===e?(0,s.jsxs)("div",{role:"status",className:"mb-5 flex items-center gap-2 rounded-lg border border-border bg-card px-4 py-2.5 text-xs text-muted-foreground",children:[(0,s.jsx)(i.A,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),"Connecting to the live feed — waiting for the first snapshot."]}):(0,s.jsxs)("div",{role:"status",className:"mb-5 flex flex-wrap items-center gap-x-3 gap-y-2 rounded-lg border border-border bg-card px-4 py-2.5 text-xs text-muted-foreground",children:[(0,s.jsx)(u.A,{className:"h-3.5 w-3.5 shrink-0 text-warn","aria-hidden":!0}),(0,s.jsxs)("span",{children:["Connection lost — values below are ",(0,s.jsx)("strong",{className:"font-medium text-foreground",children:"last known"}),", not live measurements","reconnecting"===e?" — retrying with backoff…":" — retries stopped."]}),"disconnected"===e?(0,s.jsx)(m,{onClick:t,children:"Retry now"}):null]})}},7339:(e,t,r)=>{"use strict";r.d(t,{ProcessesView:()=>eX});var s=r(5155),n=r(8500),a=r.n(n),i=r(9926),l=r(3381),o=r(8731),c=r(4173),d=r(3440),u=r(940),p=r(802),h=r(6582),m=r(9939),f=r(8664),g=r(2115),x=r(828),b=r(7422),y=r(7029),w=r(2910),v=r(1735),j=r(9764),k=r(9664),M=r(4268),N=r(9942);let A=new Set(["bash","zsh","fish","sh","dash","ksh","mksh","tcsh","csh","ash","busybox"]),P=new Set(["sshd","sshd-session","dropbear","tmux","screen","systemd"]),S=["cpuPercent","memoryRssBytes","gpuMemoryBytes","ioReadBytesPerSec","ioWriteBytesPerSec"];function $(e,t,r){return e.slice().sort((e,s)=>W(D(e,t),D(s,t),r))}function R(e){return null!==e&&!!("init.scope"===e||/^session-.+\.scope$/.test(e)||/^user@.+\.service$/.test(e))}function C(e){return null===e||!e.endsWith(".scope")&&!e.endsWith(".service")||R(e)?null:e}function B(e){let t=e.replace(/\.(scope|service)$/,"");return t.startsWith("app-gnome-")?t=t.slice(10):t.startsWith("app-")&&(t=t.slice(4)),(t=t.replace(/-\d+$/,"")).length>0?t:e}function T(e){return{key:`tree:${e.pid}:${e.startTicks}`,label:e.name,kind:"tree",leader:e}}function U(e,t){switch(t){case"cpu":return e.cpuPercent;case"memory":return e.memoryRssBytes;case"gpuMemory":return e.gpuMemoryBytes;case"ioRead":return e.ioReadBytesPerSec;case"ioWrite":return e.ioWriteBytesPerSec;case"name":return e.label;case"count":return e.count;case"pid":var r=e.members;let s=null;for(let e of r)(null===s||e.pid<s)&&(s=e.pid);return s;case"user":return e.users.length>0?e.users[0]:null}}function D(e,t){switch(t){case"cpu":return e.cpuPercent;case"memory":return e.memoryRssBytes;case"gpuMemory":return e.gpuMemoryBytes;case"ioRead":return e.ioReadBytesPerSec;case"ioWrite":return e.ioWriteBytesPerSec;case"name":return e.name;case"count":return 1;case"pid":return e.pid;case"user":return e.user}}function W(e,t,r){let s,n=null==e,a=null==t;if(n&&a)return 0;if(n)return 1;if(a)return -1;if("number"==typeof e&&"number"==typeof t)s=e-t;else{let r=String(e).toLowerCase(),n=String(t).toLowerCase();s=r<n?-1:+(r>n)}return"asc"===r?s:-s}var I=r(592),L=r(7586);let q={key:"cpu",dir:"desc"};function K(e,t,r){return null!==e&&t-e>=(!Number.isFinite(r)||r<=0?1e4:Math.max(1e4,3*r))}let _=[{value:"applications",label:"Applications"},{value:"processes",label:"Processes"},{value:"tree",label:"Tree"}];function E(e){return`${e.pid}:${e.startTicks}`}function F(e){if(void 0===e.command)return e;let{command:t,...r}=e;return r}function z(e){return null!=e&&Number.isFinite(e)?Math.round(e).toString().replace(/\B(?=(\d{3})+(?!\d))/g,","):"—"}function O(e){switch(e){case"idle":return{label:"Not connected",tone:"muted",description:"Select a machine to request process detail.",retryable:!1};case"acquiring":return{label:"Connecting",tone:"warn",description:"Requesting process detail…",retryable:!1};case"loading":return{label:"Waiting",tone:"warn",description:"Waiting for the collector's first process snapshot…",retryable:!1};case"ready":return{label:"Live",tone:"ok",description:"Process detail is live.",retryable:!1};case"paused":return{label:"Paused",tone:"muted",description:"Process updates are paused.",retryable:!1};case"stale":return{label:"Not refreshing",tone:"warn",description:"The last snapshot is retained, but new snapshots are not arriving.",retryable:!0};case"disconnected":return{label:"Disconnected",tone:"crit",description:"The collector is disconnected; the last snapshot is not live.",retryable:!0};case"withheld":return{label:"Withheld",tone:"warn",description:"Process detail is withheld for this hub.",retryable:!0};case"unsupported":return{label:"Unsupported",tone:"warn",description:"This collector cannot provide process detail.",retryable:!0};case"busy":return{label:"Busy",tone:"warn",description:"Too many process views are open for this hub.",retryable:!0};case"expired":return{label:"Expired",tone:"warn",description:"Process detail expired before a fresh snapshot arrived.",retryable:!0};case"failed":return{label:"Scan failed",tone:"crit",description:"The process scan failed repeatedly.",retryable:!0};case"cancelled":return{label:"Stopped",tone:"muted",description:"The process detail view was stopped.",retryable:!0};case"error":return{label:"Unavailable",tone:"crit",description:"Process detail is unavailable right now.",retryable:!0}}}function V(e){return"number"==typeof e&&Number.isFinite(e)&&e>0}var Z=r(7348);class G{maxAgeMs;limit;session=null;entries=new Map;constructor(e=3e5,t=32){this.maxAgeMs=e,this.limit=t}scope(e){(this.session!==e||null===e)&&this.entries.clear(),this.session=e}get(e,t,r=Date.now()){this.scope(t);let s=this.entries.get(e);return s&&r-s.lastReceivedMs>=this.maxAgeMs?void this.entries.delete(e):s}set(e,t,r){this.scope(t),this.entries.delete(e),this.entries.set(e,r),this.entries.size>this.limit&&this.entries.delete(this.entries.keys().next().value)}delete(e,t){this.scope(t),this.entries.delete(e)}}let Y=new G;function X(e,t){let r=Y.get(e??"",t);return void 0!==r?{phase:"stale",message:"Resuming process updates…",...r}:{phase:null===e?"idle":"acquiring",detail:null,message:null,intervalMs:1e3,leaseMs:15e3,lastReceivedMs:null}}async function J(e){try{let t=await e.json();if(t&&"object"==typeof t&&"error"in t){let e=t.error;if("string"==typeof e&&e.length>0)return e}}catch{}return e.statusText||null}var H=r(8698);let Q=(0,H.A)("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),ee=(0,H.A)("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),et=(0,H.A)("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var er=r(8528),es=r(6114);let en=[{id:"name",label:"Application",sortKey:"name",align:"left",width:300},{id:"count",label:"Procs",sortKey:"count",align:"right",width:76},{id:"cpu",label:"CPU / core",sortKey:"cpu",align:"right",width:104},{id:"memory",label:"RSS",sortKey:"memory",align:"right",width:96},{id:"gpuMemory",label:"VRAM",sortKey:"gpuMemory",align:"right",width:96},{id:"ioRead",label:"Read",sortKey:"ioRead",align:"right",width:104},{id:"ioWrite",label:"Write",sortKey:"ioWrite",align:"right",width:104},{id:"users",label:"Users",sortKey:"user",align:"left",width:160}],ea=[{id:"name",label:"Process",sortKey:"name",align:"left",width:300},{id:"pid",label:"PID",sortKey:"pid",align:"right",width:84},{id:"user",label:"User",sortKey:"user",align:"left",width:120},{id:"cpu",label:"CPU / core",sortKey:"cpu",align:"right",width:104},{id:"memory",label:"RSS",sortKey:"memory",align:"right",width:96},{id:"gpuMemory",label:"VRAM",sortKey:"gpuMemory",align:"right",width:96},{id:"ioRead",label:"Read",sortKey:"ioRead",align:"right",width:104},{id:"ioWrite",label:"Write",sortKey:"ioWrite",align:"right",width:104},{id:"threads",label:"Threads",align:"right",width:84}],ei=Object.freeze({}),el=Object.freeze([]),eo=new Set(["cpu","memory","gpuMemory","ioRead","ioWrite","name","count","pid","user"]);function ec(e){return Math.round(Math.min(1200,Math.max(56,e)))}function ed(e){return"applications"===e||"processes"===e||"tree"===e?e:null}function eu(e){if(null===e||"object"!=typeof e)return null;let{key:t,dir:r}=e;return"string"==typeof t&&eo.has(t)&&("asc"===r||"desc"===r)?{key:t,dir:r}:null}function ep(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;let t={};for(let[r,s]of Object.entries(e))"number"==typeof s&&Number.isFinite(s)&&(t[r]=ec(s));return t}function eh(e){return"string"==typeof e?e.slice(0,200):null}function em(e){return"boolean"==typeof e?e:null}function ef(e){return Array.isArray(e)&&e.every(e=>"string"==typeof e)?e.slice(0,500):null}let eg="overflow-hidden text-ellipsis whitespace-nowrap border-b border-border px-2 py-2 align-middle",ex=`${eg} tnum text-right text-xs`,eb="relative overflow-hidden whitespace-nowrap border-b border-border px-2 py-2 text-left text-xs font-normal text-muted-foreground";function ey(e,t){return t[e.id]??e.width}function ew({label:e,width:t,onChange:r,onReset:n}){let a=(0,g.useRef)(null);return(0,s.jsx)("div",{role:"separator","aria-orientation":"vertical","aria-label":`Resize ${e} column`,"aria-valuenow":t,"aria-valuemin":56,"aria-valuemax":1200,tabIndex:0,title:"Drag to resize \xb7 double-click to reset",onPointerDown:e=>{0===e.button&&(e.preventDefault(),e.stopPropagation(),e.currentTarget.setPointerCapture(e.pointerId),a.current={x:e.clientX,width:t})},onPointerMove:e=>{null!==a.current&&r(ec(a.current.width+e.clientX-a.current.x))},onPointerUp:e=>{null!==a.current&&r(ec(a.current.width+e.clientX-a.current.x)),a.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)},onPointerCancel:()=>{a.current=null},onLostPointerCapture:()=>{a.current=null},onClick:e=>e.stopPropagation(),onDoubleClick:e=>{e.stopPropagation(),n()},onKeyDown:e=>{"ArrowLeft"===e.key?(e.preventDefault(),r(ec(t-16))):"ArrowRight"===e.key&&(e.preventDefault(),r(ec(t+16)))},className:"group/handle absolute inset-y-0 right-0 z-10 flex w-2.5 cursor-col-resize touch-none select-none justify-end",children:(0,s.jsx)("span",{"aria-hidden":!0,className:"my-2 w-px bg-border transition-colors group-hover/handle:bg-accent group-focus-visible/handle:bg-accent"})})}function ev({column:e,sort:t,onSort:r,width:n,onResize:a,onReset:i}){let l="right"===e.align,o=e.sortKey,c=void 0!==o?t.key!==o?"none":"asc"===t.dir?"ascending":"descending":"none",d="none"!==c,u=d?"asc"===t.dir?ee:et:Q;return(0,s.jsxs)("th",{scope:"col","aria-sort":void 0!==o?c:void 0,className:l?`${eb} text-right`:eb,children:[void 0!==o?(0,s.jsxs)("button",{type:"button",onClick:()=>r(o),className:["inline-flex min-h-6 max-w-full items-center gap-1 rounded-sm transition-colors hover:text-foreground",l?"w-full justify-end pr-1":"",d?"text-foreground":""].filter(Boolean).join(" "),children:[(0,s.jsx)("span",{className:"truncate",children:e.label}),(0,s.jsx)(u,{className:d?"h-3 w-3 shrink-0":"h-3 w-3 shrink-0 opacity-40","aria-hidden":!0})]}):(0,s.jsx)("span",{className:l?"block truncate pr-1":"block truncate",children:e.label}),(0,s.jsx)(ew,{label:e.label,width:n,onChange:a,onReset:i})]})}function ej({table:e,columns:t,label:r,caption:n,sort:a,onSort:i,children:l}){let[o,c]=(0,es.u)(`processes.widths.${e}`,ei,ep),d=(0,g.useRef)(null),[u,p]=(0,g.useState)(0);(0,g.useEffect)(()=>{let e=d.current;if(!e)return;let t=new ResizeObserver(([e])=>p(e.contentRect.width));return t.observe(e),()=>t.disconnect()},[]);let h=e=>"name"===e.id?160:56,m=t.reduce((e,t)=>e+h(t),0),f=t.reduce((e,t)=>e+ey(t,o),0),x={},b=Math.max(u||f,m),y=[...t];for(;y.length>0;){let e=y.reduce((e,t)=>e+ey(t,o),0),t=y.filter(t=>b*ey(t,o)/e<h(t));if(0===t.length){for(let t of y)x[t.id]=b*ey(t,o)/e;break}for(let e of t)x[e.id]=h(e),b-=h(e);y=y.filter(e=>!t.includes(e))}return(0,s.jsx)("div",{ref:d,className:"relative min-h-0 w-full min-w-0 flex-1 overflow-auto overscroll-contain",tabIndex:0,role:"region","aria-label":r,children:(0,s.jsxs)("table",{className:"table-fixed border-separate border-spacing-0 text-left",style:{width:"100%",minWidth:m},children:[(0,s.jsx)("caption",{className:"sr-only",children:n}),(0,s.jsx)("colgroup",{children:t.map(e=>(0,s.jsx)("col",{style:{width:x[e.id]}},e.id))}),(0,s.jsx)("thead",{className:"sticky top-0 z-20 bg-card",children:(0,s.jsx)("tr",{children:t.map(e=>(0,s.jsx)(ev,{column:e,sort:a,onSort:i,width:x[e.id],onResize:r=>{let s,n,a;return s=t.indexOf(e),n=t[s+1]??t[s-1],a=Math.max(h(e)-x[e.id],Math.min(r-x[e.id],x[n.id]-h(n))),void c({...x,[e.id]:x[e.id]+a,[n.id]:x[n.id]-a})},onReset:()=>c(t=>{let{[e.id]:r,...s}=t;return s})},e.id))})}),(0,s.jsx)("tbody",{children:l})]})})}function ek({value:e,kind:t,partial:r=!1}){let n=function(e,t,r=!1){let s;if(null===e||!Number.isFinite(e)||e<0)return{text:"—",atLeast:!1,title:null};switch(t){case"percent":s=(0,L.l9)(e);break;case"bytes":s=(0,L.z3)(e);break;case"rate":s=`${(0,L.z3)(e)}/s`;break;case"count":s=z(e)}return{text:s,atLeast:r,title:r?`At least ${s}: some processes in this group did not report this metric.`:null}}(e,t,r);return(0,s.jsxs)("td",{className:"—"===n.text?`${ex} text-muted-foreground`:ex,title:n.title??void 0,children:[n.atLeast?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{"aria-hidden":!0,children:"≥ "}),(0,s.jsx)("span",{className:"sr-only",children:"at least "})]}):null,n.text]})}function eM(e){let t=e.name.length>0?e.name:"Unnamed process";return null!==e.unit?`${t} \xb7 ${e.unit}`:t}function eN({row:e,depth:t=0}){return(0,s.jsx)("th",{scope:"row",className:`${eg} text-left text-sm font-medium`,title:eM(e),children:(0,s.jsxs)("span",{style:t>0?{paddingLeft:`${14*t}px`}:void 0,children:[t>0?(0,s.jsx)("span",{className:"sr-only",children:`Nested level ${t+1}. `}):null,e.name.length>0?e.name:(0,s.jsx)("span",{className:"text-muted-foreground",children:"Unnamed process"})]})})}function eA({entries:e,sort:t,onSort:r,mode:n}){return(0,s.jsx)(ej,{table:"processes",columns:ea,label:"tree"===n?"Process tree":"Process list",caption:"tree"===n?"Process tree with nesting depth, PID, user, CPU per core, resident memory, GPU memory, read and write rates, and threads":"Processes with PID, user, CPU per core, resident memory, GPU memory, read and write rates, and threads",sort:t,onSort:r,children:e.map(({row:e,depth:t})=>(0,s.jsxs)("tr",{className:"transition-colors hover:bg-card-strong/60",children:[(0,s.jsx)(eN,{row:e,depth:t}),(0,s.jsx)("td",{className:ex,children:e.pid}),(0,s.jsx)("td",{className:`${eg} text-xs text-muted-foreground`,title:e.user??void 0,children:e.user??"—"}),(0,s.jsx)(ek,{value:e.cpuPercent,kind:"percent"}),(0,s.jsx)(ek,{value:e.memoryRssBytes,kind:"bytes"}),(0,s.jsx)(ek,{value:e.gpuMemoryBytes,kind:"bytes"}),(0,s.jsx)(ek,{value:e.ioReadBytesPerSec,kind:"rate"}),(0,s.jsx)(ek,{value:e.ioWriteBytesPerSec,kind:"rate"}),(0,s.jsx)("td",{className:ex,children:z(e.threads)})]},E(e)))})}function eP({group:e}){return(0,s.jsx)(s.Fragment,{children:e.members.map(e=>(0,s.jsxs)("tr",{className:"bg-card-strong/40 transition-colors hover:bg-card-strong/70",children:[(0,s.jsx)("th",{scope:"row",className:`${eg} text-left text-xs font-normal`,title:`${eM(e)} \xb7 PID ${e.pid}`,children:(0,s.jsxs)("span",{className:"pl-5",children:[e.name.length>0?e.name:"Unnamed process",(0,s.jsx)("span",{className:"tnum ml-2 text-muted-foreground",children:e.pid})]})}),(0,s.jsx)("td",{className:ex}),(0,s.jsx)(ek,{value:e.cpuPercent,kind:"percent"}),(0,s.jsx)(ek,{value:e.memoryRssBytes,kind:"bytes"}),(0,s.jsx)(ek,{value:e.gpuMemoryBytes,kind:"bytes"}),(0,s.jsx)(ek,{value:e.ioReadBytesPerSec,kind:"rate"}),(0,s.jsx)(ek,{value:e.ioWriteBytesPerSec,kind:"rate"}),(0,s.jsx)("td",{className:`${eg} text-xs text-muted-foreground`,title:e.user??void 0,children:e.user??"—"})]},E(e)))})}function eS({groups:e,sort:t,onSort:r,expanded:n,onToggleGroup:a}){return(0,s.jsx)(ej,{table:"applications",columns:en,label:"Applications",caption:"Applications grouped by systemd unit, process tree, or kernel, with process count, aggregate CPU per core, resident memory, GPU memory, read and write rates, and users",sort:t,onSort:r,children:e.map(e=>{var t;let r=n.has(e.key),i=e.label.length>0?e.label:"Unnamed application",l=e.users.length>0?e.users.join(", "):"—";return(0,s.jsxs)(g.Fragment,{children:[(0,s.jsxs)("tr",{className:"transition-colors hover:bg-card-strong/60",children:[(0,s.jsx)("th",{scope:"row",className:`${eg} text-left font-normal`,title:`${i} \xb7 ${"unit"===(t=e.kind)?"systemd unit":"kernel"===t?"kernel":"process tree"}`,children:(0,s.jsxs)("button",{type:"button","aria-expanded":r,onClick:()=>a(e.key),className:"inline-flex min-h-6 max-w-full items-center gap-1.5 rounded-sm text-left",children:[(0,s.jsx)(er.A,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform ${r?"rotate-90":""}`,"aria-hidden":!0}),(0,s.jsx)("span",{className:"truncate text-sm font-medium",children:i})]})}),(0,s.jsx)("td",{className:ex,children:z(e.count)}),(0,s.jsx)(ek,{value:e.cpuPercent,kind:"percent",partial:e.partial.cpuPercent}),(0,s.jsx)(ek,{value:e.memoryRssBytes,kind:"bytes",partial:e.partial.memoryRssBytes}),(0,s.jsx)(ek,{value:e.gpuMemoryBytes,kind:"bytes",partial:e.partial.gpuMemoryBytes}),(0,s.jsx)(ek,{value:e.ioReadBytesPerSec,kind:"rate",partial:e.partial.ioReadBytesPerSec}),(0,s.jsx)(ek,{value:e.ioWriteBytesPerSec,kind:"rate",partial:e.partial.ioWriteBytesPerSec}),(0,s.jsx)("td",{className:`${eg} text-xs text-muted-foreground`,title:l,children:l})]}),r?(0,s.jsx)(eP,{group:e}):null]},e.key)})})}function e$({mode:e,groups:t,rows:r,tree:n,sort:a,onSort:i,expanded:l,onToggleGroup:o}){if("applications"===e)return(0,s.jsx)(eS,{groups:t,sort:a,onSort:i,expanded:l,onToggleGroup:o});let c="tree"===e?n.map(e=>({row:e.row,depth:e.depth})):r.map(e=>({row:e,depth:0}));return(0,s.jsx)(eA,{entries:c,mode:e,sort:a,onSort:i})}var eR=r(1),eC=r(7499);let eB=[{key:"cpuPercent",label:"cpu"},{key:"memoryRssBytes",label:"memory"},{key:"gpuMemoryBytes",label:"vram"},{key:"ioReadBytesPerSec",label:"read"},{key:"ioWriteBytesPerSec",label:"write"},{key:"threads",label:"threads"}];function eT(e){return new Date(e).toISOString()}function eU(e){return e.displayName?.trim()||e.hostname.trim()||e.machineId}function eD(e){return"applications"===e.mode?e.groups.flatMap(t=>$([...t.members],e.sort.key,e.sort.dir).map(e=>({row:e,application:t.label,applicationKind:t.kind,depth:0}))):"tree"===e.mode?e.tree.map(e=>({row:e.row,application:null,applicationKind:null,depth:e.depth})):e.sortedRows.map(e=>({row:e,application:null,applicationKind:null,depth:0}))}function eW(e){let t=e.now??Date.now(),r=null===e.receivedAtMs?null:Math.max(0,t-e.receivedAtMs),s=null===r?"receipt time unknown":`${Math.round(r/1e3)}s old`;return null===e.receivedAtMs?{label:"unknown",ageMs:null,stale:!0,note:"No browser receipt time is available for this snapshot."}:"paused"===e.phase?{label:"paused",ageMs:r,stale:!1,note:`Paused \xb7 ${s}. Not live.`}:"disconnected"===e.phase?{label:"disconnected",ageMs:r,stale:!0,note:`Collector disconnected \xb7 last snapshot ${s}. Not live.`}:"withheld"===e.phase||"unsupported"===e.phase?{label:"not live",ageMs:r,stale:!0,note:`Process detail is ${e.phase} \xb7 last snapshot ${s}.`}:"failed"===e.phase||"expired"===e.phase||"busy"===e.phase||"cancelled"===e.phase||"error"===e.phase?{label:"not live",ageMs:r,stale:!0,note:`Refresh problem \xb7 last snapshot ${s}. Not live.`}:"acquiring"===e.phase||"loading"===e.phase||"idle"===e.phase?{label:"waiting",ageMs:r,stale:!0,note:`Waiting for a fresh snapshot \xb7 ${s}.`}:K(e.receivedAtMs,t,e.intervalMs)?{label:"stale",ageMs:r,stale:!0,note:`No new snapshot has arrived \xb7 ${s}. Not live.`}:{label:"live",ageMs:r,stale:!1,note:`Live \xb7 updated ${s}.`}}function eI(e){return eB.filter(({key:t})=>null===e[t]).map(({label:e})=>e).join(" ")}function eL(e,t){let r=eW({phase:e.phase,receivedAtMs:e.receivedAtMs,intervalMs:e.intervalMs,now:t}),s=null===e.receivedAtMs?"unknown":eT(e.receivedAtMs),n=e.query.trim();return[`Filtered process snapshot from the loaded view \xb7 ${r.note}`,`Search: ${n.length>0?n:"(none)"} \xb7 view: ${e.mode} \xb7 sort: ${e.sort.key} ${e.sort.dir}`,`Snapshot ${e.snapshot.processes.length} shown of ${e.snapshot.totalProcesses} processes \xb7 ${e.snapshot.inaccessible} unreadable${e.snapshot.truncated?" \xb7 collector kept the highest-CPU rows":""}`,`Captured ${e.capturedAt} \xb7 received ${s}`]}let eq=["name","pid","user","application","application_kind","tree_depth","cpu_percent","memory_rss_bytes","gpu_memory_bytes","io_read_bytes_per_sec","io_write_bytes_per_sec","threads","unavailable_metrics"],eK="inline-flex min-h-7 items-center rounded-md border border-border bg-background px-2 text-xs text-foreground transition-colors hover:bg-card-strong disabled:cursor-not-allowed disabled:opacity-50";function e_(e){let[t,r]=(0,g.useState)(null),n=null!==e.snapshot&&null!==e.capturedAt,a=n?"applications"===e.mode?e.filteredRows.length:"tree"===e.mode?e.tree.length:e.sortedRows.length:0,i=!n||0===a,l=t=>{if(null===e.snapshot||null===e.capturedAt)return;let s=Date.now(),n={...e,snapshot:e.snapshot,capturedAt:e.capturedAt,exportedAt:s};try{let e,i,l,o=function(e,t,r=Date.now()){let s=Date.parse(e.capturedAt);return(0,eC.Y8)("processes",eU(e.machine),Number.isFinite(s)?s:r,t)}(n,t,s),c="csv"===t?function(e){let t,r,s=e.exportedAt??Date.now(),n=(t=eD(e),r=eW({phase:e.phase,receivedAtMs:e.receivedAtMs,intervalMs:e.intervalMs,now:s}),[["Rigscope process snapshot"],["Scope",eL(e,s)[0]],["Machine",eU(e.machine)],["Machine ID",e.machine.machineId],["Snapshot captured",e.capturedAt],["Snapshot received",null===e.receivedAtMs?"unknown":eT(e.receivedAtMs)],["Freshness",`${r.label}${null===r.ageMs?"":` \xb7 ${Math.round(r.ageMs/1e3)}s old`}`],["Search",e.query.trim()||"(none)"],["View",e.mode],["Sort",`${e.sort.key} ${e.sort.dir}`],["Snapshot rows",`${e.snapshot.processes.length} shown of ${e.snapshot.totalProcesses}`],["Unreadable",String(e.snapshot.inaccessible)],["Collector truncated",e.snapshot.truncated?"true":"false"],["Exported rows",String(t.length)],["Note",eL(e,s).slice(1).join(" ")],[]]);for(let t of(n.push([...eq]),eD(e)))n.push(function(e){let{row:t}=e;return[t.name,t.pid,t.user,e.application,e.applicationKind,e.depth,t.cpuPercent,t.memoryRssBytes,t.gpuMemoryBytes,t.ioReadBytesPerSec,t.ioWriteBytesPerSec,t.threads,eI(t)]}(t));return(0,eR.kg)(n)}(n):(e=n.exportedAt??Date.now(),i=eW({phase:n.phase,receivedAtMs:n.receivedAtMs,intervalMs:n.intervalMs,now:e}),l={app:"Rigscope",kind:"processes",exportedAt:eT(e),scope:{description:"Filtered process snapshot from the loaded view",machine:{id:n.machine.machineId,name:eU(n.machine),hostname:n.machine.hostname,connected:n.machine.connected},query:n.query.trim(),view:n.mode,sort:n.sort},snapshot:{capturedAt:n.capturedAt,receivedAt:null===n.receivedAtMs?null:eT(n.receivedAtMs),ageMs:i.ageMs,freshness:i.label,live:!i.stale&&"live"===i.label,note:i.note,totalProcesses:n.snapshot.totalProcesses,shownProcesses:n.snapshot.processes.length,inaccessible:n.snapshot.inaccessible,truncated:n.snapshot.truncated},exportedRows:eD(n).length,notes:eL(n,e),processes:eD(n).map(e=>({name:e.row.name,pid:e.row.pid,user:e.row.user,application:e.application,applicationKind:e.applicationKind,treeDepth:e.depth,cpuPercent:e.row.cpuPercent,memoryRssBytes:e.row.memoryRssBytes,gpuMemoryBytes:e.row.gpuMemoryBytes,ioReadBytesPerSec:e.row.ioReadBytesPerSec,ioWriteBytesPerSec:e.row.ioWriteBytesPerSec,threads:e.row.threads,unavailableMetrics:eI(e.row).split(" ").filter(Boolean)}))},`${JSON.stringify(l,null,2)}
3
- `);(0,eR.PE)(o,c,"csv"===t?eR.UR:eR.uW),r(`${t.toUpperCase()} downloaded \xb7 ${a} ${1===a?"process":"processes"}`)}catch{r("The process export could not be created.")}},o=n?0===a?"No processes match the current search":void 0:"A process snapshot is not available yet";return(0,s.jsxs)("div",{className:"flex min-w-0 shrink-0 items-center gap-1.5",children:[(0,s.jsx)("span",{className:"hidden text-xs text-muted-foreground sm:inline",children:"Export"}),(0,s.jsx)("button",{type:"button",onClick:()=>l("csv"),disabled:i,"aria-label":"Download current process snapshot as CSV",title:o??"Download the filtered process snapshot as CSV",className:eK,children:"CSV"}),(0,s.jsx)("button",{type:"button",onClick:()=>l("json"),disabled:i,"aria-label":"Download current process snapshot as JSON",title:o??"Download the filtered process snapshot as JSON",className:eK,children:"JSON"}),(0,s.jsxs)("span",{role:"status",className:t?.includes("could not")?"inline-flex items-center gap-1 text-xs text-warn":"sr-only",children:[t?.includes("could not")?(0,s.jsx)(v.A,{className:"h-3 w-3","aria-hidden":!0}):null,t??""]})]})}let eE={ok:"bg-ok-soft text-ok",warn:"bg-warn-soft text-warn",crit:"bg-crit-soft text-crit",muted:"border border-border text-muted-foreground"};function eF({phase:e,message:t}){return(0,s.jsxs)("span",{title:t??e.description,className:`inline-flex h-6 w-32 shrink-0 items-center gap-1.5 rounded-full px-2 py-0.5 text-xs ${eE[e.tone]}`,children:[(0,s.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-current","aria-hidden":!0}),e.label]})}function ez({onClick:e,label:t="Check again"}){return(0,s.jsxs)("button",{type:"button",onClick:e,className:"inline-flex min-h-5 items-center gap-1.5 rounded-md border border-border bg-card px-2 py-1 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,s.jsx)(x.A,{className:"h-3 w-3","aria-hidden":!0}),t]})}function eO({phase:e,info:t,message:r,onRetry:n}){let a="withheld"===e||"unsupported"===e?b.A:"disconnected"===e||"error"===e?y.A:"paused"===e?w.A:"acquiring"===e||"loading"===e?i.A:"busy"===e||"expired"===e||"failed"===e||"stale"===e?v.A:j.A;return(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 break-words",children:[(0,s.jsx)(d.p,{icon:a,note:r??t.description,className:"min-h-64 w-full"}),"paused"!==e&&t.retryable?(0,s.jsx)(ez,{onClick:n,label:"Retry process detail"}):null]})}function eV({summary:e,lastReceivedMs:t,intervalMs:r,message:n,phase:a,hasSnapshot:i}){let l=(0,Z.c)(1e3),o="ready"===a&&K(t,l,r),c=o?"stale":a,d="paused"===c,u=O(c),p=null===t?null:(0,L.nV)(Math.max(0,l-t)),h=null===p?null:"ready"===c?`Updated ${p}`:`Last snapshot ${p}`,m=d?i?"Paused. This snapshot is not live.":"Paused. Use Resume to request a fresh snapshot.":`${u.label}${o?". No new snapshot has arrived.":""}${n?`. ${n}`:""}`;return d&&!i?(0,s.jsx)("p",{role:"status",className:"sr-only",children:m}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{role:"status",className:"sr-only",children:m}),(0,s.jsxs)("div",{className:"flex min-h-6 flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[d?(0,s.jsx)("span",{children:"Paused — not live"}):(0,s.jsx)(eF,{phase:u,message:n}),i&&null!==h?(0,s.jsx)("span",{className:"tnum",children:h}):null,i&&e.truncated?(0,s.jsxs)("span",{className:"tnum",title:"The collector kept the highest-CPU rows",children:["top ",z(e.shown)," of ",z(e.total)]}):null,i&&e.inaccessible>0?(0,s.jsxs)("span",{className:"tnum text-warn",children:[z(e.inaccessible)," unreadable"]}):null]})]})}function eZ({machine:e,csrfToken:t,paused:r,onPausedChange:n}){var a;let[i,l]=(0,es.u)("processes.query","",eh,"session"),o=(0,g.useDeferredValue)(i),[c,u]=(0,es.u)("processes.mode","applications",ed),[p,h]=(a="applications"===c?"applications":"processes",(0,es.u)(`processes.sort.${a}`,q,eu)),[m,f]=(0,es.u)("processes.expanded",el,ef,"session"),x=(0,g.useMemo)(()=>new Set(m),[m]),{state:b,refresh:y}=function(e){let{machineId:t,csrfToken:r,paused:s}=e,[n,a]=(0,g.useState)(()=>"u">typeof document&&document.hidden),[i,l]=(0,g.useState)(0),[o,c]=(0,g.useState)(()=>X(t,r)),d=(0,g.useRef)(o),u=(0,g.useRef)({machineId:t,csrfToken:r}),p=(0,g.useRef)(0),h=(0,g.useCallback)(()=>{p.current+=1,l(p.current)},[]);return(0,g.useEffect)(()=>{if("u"<typeof document)return;let e=()=>a(document.hidden);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,g.useEffect)(()=>{let e;if(u.current.machineId!==t||u.current.csrfToken!==r){u.current={machineId:t,csrfToken:r};let e=X(t,r);d.current=e,c(e)}if(!(null!==t&&null!==r&&!s&&!n)){if(t&&r){let e={...d.current,phase:"paused",message:n?"This tab is hidden — process updates are stopped until it is visible again.":"Paused — process updates are stopped until you resume."};d.current=e,c(e)}else{let e=X(t,r);d.current=e,c(e)}return}let a=!1,i=new AbortController,l=(e=globalThis.crypto)&&"function"==typeof e.randomUUID?e.randomUUID():`viewer-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,o=`/api/processes?machineId=${encodeURIComponent(t)}&viewerId=${encodeURIComponent(l)}`,p=d.current.intervalMs||1e3,h=d.current.leaseMs||15e3,m=null!==d.current.detail,f=!1,g=!1,x=!1,b=null,y=null,w=null,v=e=>{if(a)return;let s=d.current,n="function"==typeof e?e(s):e,i={...s,...n};d.current=i,null!==i.detail&&null!==i.lastReceivedMs&&Y.set(t,r,{detail:i.detail,intervalMs:i.intervalMs,leaseMs:i.leaseMs,lastReceivedMs:i.lastReceivedMs}),c(i)},j=()=>{null!==b&&(clearTimeout(b),b=null),null!==y&&(clearTimeout(y),y=null),w?.abort(),w=null},k=()=>{try{fetch(o,{method:"DELETE",cache:"no-store",keepalive:!0,headers:{"X-CSRF-Token":r,Accept:"application/json"}}).catch(()=>void 0)}catch{}},M=()=>{g=!1,null!==b&&(clearTimeout(b),b=null)},N=(e,s)=>{x=!0,j(),m=!1,Y.delete(t,r),v({phase:e,detail:null,message:s,lastReceivedMs:null}),k()},A=e=>{let t="u">typeof navigator&&!1===navigator.onLine;v({phase:m?t?"disconnected":"stale":"error",message:e})},P=async()=>{try{let e=await fetch(o,{method:"POST",cache:"no-store",signal:i.signal,headers:{"X-CSRF-Token":r,Accept:"application/json"}});if(a||i.signal.aborted)return!1;if(!e.ok){M();let t=await J(e);return 401===e.status?N("error","Your session ended. Sign in again to inspect processes."):403===e.status?N("withheld",t??"Processes are not available to this hub."):409===e.status?N("unsupported",t??"This collector requires an upgrade before Processes is available."):(429===e.status||503===e.status)&&/budget/i.test(t??"")?v({phase:"busy",message:t??"Too many process views are open for this hub."}):A(t??`Could not request process detail (HTTP ${e.status}).`),!1}g=!0;let t=null;try{t=await e.json()}catch{t=null}let s=function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;let t=e.leaseMs,r=e.intervalMs;return V(t)&&V(r)?{leaseMs:Math.round(t),intervalMs:Math.round(r)}:null}(t);if(null===s)return M(),k(),A("The hub returned an unexpected response."),!1;if(a||i.signal.aborted)return!1;return p=s.intervalMs,h=s.leaseMs,v(e=>({intervalMs:s.intervalMs,leaseMs:s.leaseMs,phase:null===e.detail?"loading":e.phase,message:null})),!0}catch(e){if(a||i.signal.aborted)return!1;return M(),A(m?"Could not refresh process detail. Showing the last snapshot, which is not live.":"Could not reach the hub for process detail."),!1}},S=()=>{a||x||null!==y||(y=setTimeout(()=>{y=null,$()},Math.max(1e3,Math.min(5e3,Math.floor(h/3)))))},$=async()=>{a||x||(await P(),a||x||(g&&!f&&null===b&&R(),S()))},R=async()=>{if(a||x||f)return;f=!0;let e=new AbortController;w=e;let t=()=>e.abort();i.signal.addEventListener("abort",t,{once:!0});try{let t=await fetch(o,{cache:"no-store",signal:e.signal,headers:{Accept:"application/json"}});if(a||e.signal.aborted)return;if(410===t.status){v({phase:m?"stale":"loading",message:"Process detail expired. Renewing…"}),await P();return}if(!t.ok){let e=await J(t);401===t.status?N("error","Your session ended. Sign in again to inspect processes."):403===t.status?N("withheld",e??"Processes are not available to this machine."):A(e??`Could not refresh processes (HTTP ${t.status}).`);return}let r=null;try{r=await t.json()}catch{r=null}let s=function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;let t=e.state;if("string"!=typeof t||0===t.length)return null;let r=e.result;if(null==r)return{state:t,result:null};try{let e=(0,I.Q_)(r);if("detail.result"!==e.type)return null;return{state:t,result:e}}catch{return null}}(r);if(a||e.signal.aborted)return;if(null===s)return void A(m?"Unable to read the process update. Showing the last snapshot.":"Unable to read the process update from the hub.");((e,t)=>{if(null!==t){m=!0;let e=d.current;if(null!==e.detail&&e.detail.subscriptionId===t.subscriptionId&&e.detail.capturedAt===t.capturedAt&&"ready"===e.phase&&null===e.message)return;v(e=>{let r=null!==e.detail&&e.detail.subscriptionId===t.subscriptionId&&e.detail.capturedAt===t.capturedAt;return{phase:"ready",detail:r?e.detail:t,message:null,lastReceivedMs:r?e.lastReceivedMs:Date.now()}});return}let r=function(e){switch(e){case"ready":return"ready";case"loading":return"loading";case"paused":return"paused";case"disconnected":return"disconnected";case"withheld":return"withheld";case"unsupported":return"unsupported";case"busy":return"busy";case"expired":return"expired";case"failed":return"failed";case"cancelled":return"cancelled";default:return"error"}}(e);switch(r){case"ready":case"loading":return v({phase:m?"stale":"loading",message:m?"Waiting for a fresh snapshot. The values shown are from the last received snapshot.":"Waiting for the collector to report processes…"});case"disconnected":return v({phase:"disconnected",message:m?"The collector is disconnected. Showing the last received snapshot; it is not live.":"The collector is disconnected."});case"withheld":case"unsupported":case"cancelled":return N(r,O(r).description);case"busy":case"expired":case"failed":return v({phase:r,message:m?`${O(r).description} Showing the last received snapshot.`:O(r).description});case"paused":return v({phase:"paused",message:"Process updates are paused."});default:v({phase:m?"stale":"error",message:"Unable to read the process status from the hub."})}})(s.state,s.result)}catch{if(a||e.signal.aborted)return;A(m?"Process refresh failed. Showing the last snapshot, which is not live.":"Could not reach the hub for process detail.")}finally{i.signal.removeEventListener("abort",t),w===e&&(w=null),f=!1,a||x||a||x||!g||null!==b||(b=setTimeout(()=>{b=null,R()},p))}};return v(e=>null===e.detail?{phase:"acquiring",message:null}:"ready"===e.phase&&null===e.message?{}:{phase:"stale",message:"Resuming process updates…"}),(async()=>{let e=await P();a||x||(S(),e&&R())})(),()=>{a=!0,x=!0,j(),k()}},[t,r,s,n,i]),{state:u.current.machineId===t&&u.current.csrfToken===r?o:X(t,r),hidden:n,refresh:h}}({machineId:e.machineId,csrfToken:t,paused:r}),v=(0,g.useMemo)(()=>b.detail?.snapshot.processes??[],[b.detail]),j=(0,g.useMemo)(()=>(function(e){if(null===e)return{total:0,shown:0,inaccessible:0,truncated:!1};let t=e.processes.length;return{total:e.totalProcesses,shown:t,inaccessible:e.inaccessible,truncated:e.truncated}})(b.detail?.snapshot??null),[b.detail]),D=(0,g.useMemo)(()=>{var e,t,r;let s;return e=v,t=o,r=e.map(F),0===(s=t.trim().toLowerCase()).length?r.slice():r.filter(e=>!!(e.name.toLowerCase().includes(s)||null!==e.user&&e.user.toLowerCase().includes(s)||String(e.pid).includes(s)||null!==e.unit&&e.unit.toLowerCase().includes(s)||void 0!==e.command&&e.command.toLowerCase().includes(s)))},[v,o]),L=(0,g.useMemo)(()=>$(D,p.key,p.dir),[D,p]),K=(0,g.useMemo)(()=>{var e,t,r;return"applications"===c?(e=function(e){let t=new Map;for(let r of e)t.has(r.pid)||t.set(r.pid,r);let r=new Map;for(let s of e){let e=function(e,t){if(function(e,t){if(2===e.pid||2===e.ppid)return!0;let r=e,s=new Set;for(;r&&!s.has(r.pid);){if(2===r.pid)return!0;s.add(r.pid),r=t.get(r.ppid)}return!1}(e,t))return{key:"kernel",label:"kernel",kind:"kernel",leader:e};let r=C(e.unit);if(null!==r)return{key:`unit:${r}`,label:B(r),kind:"unit",leader:e};let s=e,n=new Set;for(;;){if(n.has(s.pid)){let e=s;for(let r of n){let s=t.get(r);s&&(s.pid<e.pid||s.pid===e.pid&&s.startTicks<e.startTicks)&&(e=s)}return T(e)}n.add(s.pid);let e=t.get(s.ppid);if(!e||function(e,t){if(1===e.pid)return!0;let r=e.name.toLowerCase();if(A.has(r)||P.has(r)||r.startsWith("tmux:"))return!0;if(R(e.unit)){let r=t.get(e.ppid);return void 0===r||r.unit!==e.unit}return!1}(e,t))return T(s);let r=C(e.unit);if(null!==r)return{key:`unit:${r}`,label:B(r),kind:"unit",leader:e};s=e}}(s,t),n=r.get(e.key);n?n.members.push(s):r.set(e.key,{descriptor:e,members:[s]})}return[...r.values()].map(({descriptor:e,members:t})=>(function(e,t){let r={cpuPercent:{sum:0,known:0},memoryRssBytes:{sum:0,known:0},gpuMemoryBytes:{sum:0,known:0},ioReadBytesPerSec:{sum:0,known:0},ioWriteBytesPerSec:{sum:0,known:0}},s=new Set;for(let e of t)for(let t of(null!==e.user&&s.add(e.user),S)){let s=e[t];null!==s&&Number.isFinite(s)&&(r[t].sum+=s,r[t].known++)}let n=e=>0===r[e].known?null:r[e].sum,a={};for(let e of S)a[e]=r[e].known>0&&r[e].known<t.length;return{key:e.key,label:e.label,kind:e.kind,members:e.leader!==t[0]?[e.leader,...t.filter(t=>t!==e.leader)]:t,cpuPercent:n("cpuPercent"),memoryRssBytes:n("memoryRssBytes"),gpuMemoryBytes:n("gpuMemoryBytes"),ioReadBytesPerSec:n("ioReadBytesPerSec"),ioWriteBytesPerSec:n("ioWriteBytesPerSec"),count:t.length,users:[...s].sort(),partial:a}})(e,t))}(D),t=p.key,r=p.dir,e.slice().sort((e,s)=>W(U(e,t),U(s,t),r))):[]},[D,c,p]),E=(0,g.useMemo)(()=>"tree"===c?function(e){let t=e.length,r=new Map;for(let s=0;s<t;s++)r.has(e[s].pid)||r.set(e[s].pid,s);let s=e.map(e=>{let t=r.get(e.ppid);return void 0===t?null:t}),n=new Uint8Array(t);for(let e=0;e<t;e++){if(0!==n[e])continue;let t=[],r=e;for(;null!==r&&0===n[r];)n[r]=1,t.push(r),r=s[r];for(let e of(null!==r&&1===n[r]&&(s[t[t.length-1]]=null),t))n[e]=2}let a=Array.from({length:t},()=>[]),i=[];for(let e=0;e<t;e++){let t=s[e];null===t?i.push(e):a[t].push(e)}let l=[],o=[];for(let e=i.length-1;e>=0;e--)o.push({index:i[e],depth:0});for(;o.length>0;){let{index:t,depth:r}=o.pop();l.push({row:e[t],depth:r,children:a[t].length});let s=a[t];for(let e=s.length-1;e>=0;e--)o.push({index:s[e],depth:r+1})}return l}(L):[],[c,L]),z=O(b.phase),Z=null!==b.detail,G=!Z&&("acquiring"===b.phase||"loading"===b.phase),H=o.trim().slice(0,80),Q=(0,g.useMemo)(()=>{let e=D.length,t=o.trim().length>0,r=1!==e||t?"processes":"process";return"applications"===c?`${K.length} app${1===K.length?"":"s"} \xb7 ${e}${t?` of ${j.shown}`:""} ${r}`:`${e}${t?` of ${j.shown}`:""} ${r}`},[o,D.length,K.length,c,j.shown]);return(0,s.jsx)(d.Z,{title:"Process detail",action:Z?(0,s.jsx)("span",{className:"tnum hidden max-w-[18rem] truncate text-muted-foreground sm:block",children:Q}):void 0,className:"min-h-0 flex-1",children:(0,s.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[(0,s.jsxs)("div",{className:"relative min-w-0 flex-1 basis-52",children:[(0,s.jsx)("label",{htmlFor:"process-search",className:"sr-only",children:"Search processes"}),(0,s.jsx)(k.A,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground","aria-hidden":!0}),(0,s.jsx)("input",{id:"process-search",type:"search",value:i,onChange:e=>l(e.target.value),placeholder:"Search name, user, PID, or unit",autoComplete:"off",spellCheck:!1,className:"h-9 w-full rounded-md border border-border bg-card-strong py-1.5 pl-8 pr-8 text-sm text-foreground placeholder:text-muted-foreground [&::-webkit-search-cancel-button]:hidden [&::-webkit-search-cancel-button]:[-webkit-appearance:none]"}),i.length>0?(0,s.jsx)("button",{type:"button",onClick:()=>l(""),"aria-label":"Clear search",className:"absolute right-0.5 top-1/2 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-card hover:text-foreground",children:(0,s.jsx)(M.A,{className:"h-3.5 w-3.5","aria-hidden":!0})}):null]}),(0,s.jsx)("div",{role:"group","aria-label":"Process view",className:"inline-flex shrink-0 rounded-md border border-border p-0.5",children:_.map(e=>{let t=c===e.value;return(0,s.jsx)("button",{type:"button","aria-pressed":t,onClick:()=>u(e.value),className:["rounded px-2.5 py-1 text-xs transition-colors",t?"bg-selected font-medium text-foreground":"text-muted-foreground hover:bg-card-strong hover:text-foreground"].join(" "),children:e.label},e.value)})}),(0,s.jsxs)("button",{type:"button",onClick:()=>n(!r),title:r?"Resume process updates":"Pause process updates",className:"inline-flex min-h-9 shrink-0 items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:[r?(0,s.jsx)(N.A,{className:"h-3.5 w-3.5","aria-hidden":!0}):(0,s.jsx)(w.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),r?"Resume":"Pause"]}),(0,s.jsx)(e_,{machine:e,snapshot:b.detail?.snapshot??null,capturedAt:b.detail?.capturedAt??null,receivedAtMs:b.lastReceivedMs,intervalMs:b.intervalMs,phase:b.phase,query:o,mode:c,sort:p,filteredRows:D,sortedRows:L,groups:K,tree:E})]}),(0,s.jsx)(eV,{summary:j,lastReceivedMs:b.lastReceivedMs,intervalMs:b.intervalMs,message:b.message,phase:b.phase,hasSnapshot:Z}),(0,s.jsx)("div",{"aria-busy":G||"acquiring"===b.phase,className:"flex min-h-0 flex-1 flex-col overflow-auto",children:Z?0===D.length?(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 break-words",children:[(0,s.jsx)(d.p,{icon:k.A,note:0===j.shown?"The collector reported no processes in this snapshot.":o.trim().length>0?`No processes match “${H}”.`:"No processes to show.",className:"min-h-64 w-full"}),o.trim().length>0?(0,s.jsxs)("button",{type:"button",onClick:()=>l(""),className:"inline-flex min-h-6 items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,s.jsx)(M.A,{className:"h-3 w-3","aria-hidden":!0}),"Clear search"]}):null]}):(0,s.jsx)(e$,{mode:c,groups:K,rows:L,tree:E,sort:p,onSort:e=>h(t=>(function(e,t){return e.key===t?{key:t,dir:"asc"===e.dir?"desc":"asc"}:{key:t,dir:"name"===t||"user"===t||"pid"===t?"asc":"desc"}})(t,e)),expanded:x,onToggleGroup:e=>{f(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}}):(0,s.jsx)(eO,{phase:b.phase,info:z,message:b.message,onRetry:y})})]})})}function eG({waiting:e}){return(0,s.jsx)(d.Z,{title:e?"Waiting for machines":"No machines",className:"mt-2",children:(0,s.jsx)(d.p,{icon:e?i.A:l.A,note:e?"Waiting for the fleet snapshot…":"No machines are available in your authorized fleet."})})}function eY({requested:e}){return(0,s.jsxs)(d.Z,{title:"Machine not found",className:"mt-2",children:[(0,s.jsx)(d.p,{icon:o.A,note:"This machine is unavailable or outside your access."}),(0,s.jsxs)("p",{className:"tnum mt-2 break-all text-center text-xs text-muted-foreground",children:["Requested identifier: ",e]}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(a(),{href:"/",className:"mt-2 inline-flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:"Back to fleet"})})]})}function eX(){let{session:e,phase:t,machines:r}=(0,m.M)(),n=(0,h.x)(),[a,i]=(0,es.u)("processes.paused",!1,em,"session"),{machine:l,navMachineId:o,requestedMachineId:d}=(0,f.JG)("processes"),g="signed-in"===e.kind?e.user.csrfToken:null,x=0===r.length&&("connecting"===t||"idle"===t);return(0,s.jsx)(c.G,{title:"Processes",machineId:o,machineView:"processes",workspace:!0,headerRight:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.$E,{}),(0,s.jsx)(p.B,{})]}),children:n||(0,s.jsx)(s.Fragment,{children:0===r.length?(0,s.jsx)(eG,{waiting:x}):l?(0,s.jsx)(eZ,{machine:l,csrfToken:g,paused:a,onPausedChange:i},`${l.machineId}:${g}`):(0,s.jsx)(eY,{requested:d??""})})})}},7348:(e,t,r)=>{"use strict";r.d(t,{c:()=>n});var s=r(2115);function n(e=1e3){let[t,r]=(0,s.useState)(()=>Date.now());return(0,s.useEffect)(()=>{r(Date.now());let t=setInterval(()=>r(Date.now()),e);return()=>clearInterval(t)},[e]),t}},7499:(e,t,r)=>{"use strict";function s(e,t,r,s){return`rigscope-${e}-${function(e,t="machine"){let r=e.normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48).replace(/-+$/g,"");return r.length>0?r:t}(t)}-${!Number.isFinite(r)?"unknown-time":new Date(r).toISOString().replace(/[-:]/g,"").replace(/\.\d{3}Z$/,"Z")}.${s}`}r.d(t,{Y8:()=>s})},8528:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},9031:(e,t,r)=>{Promise.resolve().then(r.bind(r,1721)),Promise.resolve().then(r.bind(r,7339)),Promise.resolve().then(r.bind(r,2701)),Promise.resolve().then(r.bind(r,2394))},9664:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},9926:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]])},9942:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])}},e=>{e.O(0,[157,939,103,441,794,358],()=>e(e.s=9031)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[952],{1:(e,t,s)=>{"use strict";s.d(t,{PE:()=>o,UR:()=>c,kg:()=>l,uW:()=>d});let r=/^[\u0009\u000a\u000d ]*[=+\-@]/,n=/^[\u0009\u000a\u000d]/;function a(e){if(null==e)return"";if("number"==typeof e)return Number.isFinite(e)?String(e):"";if("boolean"==typeof e)return e?"true":"false";let t=0===e.length?e:r.test(e)||n.test(e)?`'${e}`:e;return/[",\t\r\n]/.test(t)?`"${t.replace(/"/g,'""')}"`:t}function i(e){return e.map(a).join(",")}function l(e){return`${e.map(i).join("\r\n")}\r
2
+ `}function o(e,t,s){if("u"<typeof document)return;let r=new Blob([t],{type:s}),n=URL.createObjectURL(r),a=document.createElement("a");a.href=n,a.download=e,a.rel="noopener",a.style.display="none",document.body.append(a),a.click(),a.remove(),globalThis.setTimeout(()=>URL.revokeObjectURL(n),0)}let c="text/csv;charset=utf-8",d="application/json;charset=utf-8"},438:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(8698).A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},2910:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(8698).A)("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]])},3381:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(8698).A)("CloudOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5.782 5.782A7 7 0 0 0 9 19h8.5a4.5 4.5 0 0 0 1.307-.193",key:"yfwify"}],["path",{d:"M21.532 16.5A4.5 4.5 0 0 0 17.5 10h-1.79A7.008 7.008 0 0 0 10 5.07",key:"jlfiyv"}]])},4268:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(8698).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},6582:(e,t,s)=>{"use strict";s.d(t,{E:()=>x,x:()=>g});var r=s(5155),n=s(8500),a=s.n(n),i=s(828),l=s(6914),o=s(7029),c=s(438),d=s(7422),u=s(1735),p=s(3440),h=s(9939);function m(e){return(0,r.jsxs)("button",{type:"button",onClick:e.onClick,className:"inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,r.jsx)(i.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),e.children]})}function f(e){return(0,r.jsx)(a(),{href:e.href,className:e.primary?"inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-accent-foreground transition-colors hover:bg-accent/90":"inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:e.children})}function g(){let{session:e,phase:t,retryConnection:s}=(0,h.M)();switch(e.kind){case"restoring":return(0,r.jsx)(p.Z,{title:"Checking session",className:"mx-auto my-12 max-w-md",children:(0,r.jsx)(p.p,{icon:l.A,note:"Checking your session…"})});case"restore-failed":return(0,r.jsxs)(p.Z,{title:"Hub unreachable",className:"mx-auto my-12 max-w-md",children:[(0,r.jsx)(p.p,{icon:o.A,note:"The hub is unreachable right now."}),(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(m,{onClick:s,children:"Check again"})})]});case"signed-out":if("expired"===t)return(0,r.jsxs)(p.Z,{title:"Session ended",className:"mx-auto my-12 max-w-md",children:[(0,r.jsx)(p.p,{icon:c.A,note:"Your session ended."}),(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(f,{href:"/login",primary:!0,children:"Sign in"})})]});return(0,r.jsxs)(p.Z,{title:"Sign in required",className:"mx-auto my-12 max-w-md",children:[(0,r.jsx)(p.p,{icon:l.A,note:"Sign in required."}),(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(f,{href:"/login",primary:!0,children:"Sign in"})})]});case"auth-unavailable":return(0,r.jsx)(p.Z,{title:"Sign-in unavailable",className:"mx-auto my-12 max-w-md",children:(0,r.jsx)(p.p,{icon:d.A,note:"Browser sign-in is not configured on this hub."})})}return"expired"===t?(0,r.jsxs)(p.Z,{title:"Session ended",className:"mx-auto my-12 max-w-md",children:[(0,r.jsx)(p.p,{icon:c.A,note:"Your session ended."}),(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(f,{href:"/login",primary:!0,children:"Sign in"})})]}):"no-permission"===t?(0,r.jsxs)(p.Z,{title:"No permission",className:"mx-auto my-12 max-w-md",children:[(0,r.jsx)(p.p,{icon:d.A,note:`You are signed in as ${e.user.username}, but this hub grants no machine view to this account.`}),(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(m,{onClick:s,children:"Check again"})})]}):null}function x(){let{phase:e,retryConnection:t}=(0,h.M)();return"reconnecting"!==e&&"disconnected"!==e&&"connecting"!==e?null:"connecting"===e?(0,r.jsxs)("div",{role:"status",className:"mb-5 flex items-center gap-2 rounded-lg border border-border bg-card px-4 py-2.5 text-xs text-muted-foreground",children:[(0,r.jsx)(i.A,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),"Connecting to the live feed — waiting for the first snapshot."]}):(0,r.jsxs)("div",{role:"status",className:"mb-5 flex flex-wrap items-center gap-x-3 gap-y-2 rounded-lg border border-border bg-card px-4 py-2.5 text-xs text-muted-foreground",children:[(0,r.jsx)(u.A,{className:"h-3.5 w-3.5 shrink-0 text-warn","aria-hidden":!0}),(0,r.jsxs)("span",{children:["Connection lost — values below are ",(0,r.jsx)("strong",{className:"font-medium text-foreground",children:"last known"}),", not live measurements","reconnecting"===e?" — retrying with backoff…":" — retries stopped."]}),"disconnected"===e?(0,r.jsx)(m,{onClick:t,children:"Retry now"}):null]})}},7339:(e,t,s)=>{"use strict";s.d(t,{ProcessesView:()=>eX});var r=s(5155),n=s(8500),a=s.n(n),i=s(9926),l=s(3381),o=s(8731),c=s(4173),d=s(3440),u=s(940),p=s(802),h=s(6582),m=s(9939),f=s(8664),g=s(2115),x=s(828),b=s(7422),y=s(7029),w=s(2910),v=s(1735),j=s(9764),k=s(9664),M=s(4268),N=s(9942);let A=new Set(["bash","zsh","fish","sh","dash","ksh","mksh","tcsh","csh","ash","busybox"]),P=new Set(["sshd","sshd-session","dropbear","tmux","screen","systemd"]),S=["cpuPercent","memoryRssBytes","gpuMemoryBytes","ioReadBytesPerSec","ioWriteBytesPerSec"];function $(e,t,s){return e.slice().sort((e,r)=>D(W(e,t),W(r,t),s))}function R(e){return null!==e&&!!("init.scope"===e||/^session-.+\.scope$/.test(e)||/^user@.+\.service$/.test(e))}function C(e){return null===e||!e.endsWith(".scope")&&!e.endsWith(".service")||R(e)?null:e}function B(e){let t=e.replace(/\.(scope|service)$/,"");return t.startsWith("app-gnome-")?t=t.slice(10):t.startsWith("app-")&&(t=t.slice(4)),(t=t.replace(/-\d+$/,"")).length>0?t:e}function T(e){return{key:`tree:${e.pid}:${e.startTicks}`,label:e.name,kind:"tree",leader:e}}function U(e,t){switch(t){case"cpu":return e.cpuPercent;case"memory":return e.memoryRssBytes;case"gpuMemory":return e.gpuMemoryBytes;case"ioRead":return e.ioReadBytesPerSec;case"ioWrite":return e.ioWriteBytesPerSec;case"name":return e.label;case"count":return e.count;case"pid":var s=e.members;let r=null;for(let e of s)(null===r||e.pid<r)&&(r=e.pid);return r;case"user":return e.users.length>0?e.users[0]:null}}function W(e,t){switch(t){case"cpu":return e.cpuPercent;case"memory":return e.memoryRssBytes;case"gpuMemory":return e.gpuMemoryBytes;case"ioRead":return e.ioReadBytesPerSec;case"ioWrite":return e.ioWriteBytesPerSec;case"name":return e.name;case"count":return 1;case"pid":return e.pid;case"user":return e.user}}function D(e,t,s){let r,n=null==e,a=null==t;if(n&&a)return 0;if(n)return 1;if(a)return -1;if("number"==typeof e&&"number"==typeof t)r=e-t;else{let s=String(e).toLowerCase(),n=String(t).toLowerCase();r=s<n?-1:+(s>n)}return"asc"===s?r:-r}var I=s(592),L=s(7586);let q={key:"cpu",dir:"desc"};function K(e,t,s){return null!==e&&t-e>=(!Number.isFinite(s)||s<=0?1e4:Math.max(1e4,3*s))}let _=[{value:"applications",label:"Applications"},{value:"processes",label:"Processes"},{value:"tree",label:"Tree"}];function F(e){return`${e.pid}:${e.startTicks}`}function E(e){if(void 0===e.command)return e;let{command:t,...s}=e;return s}function z(e){return null!=e&&Number.isFinite(e)?Math.round(e).toString().replace(/\B(?=(\d{3})+(?!\d))/g,","):"—"}function O(e){switch(e){case"idle":return{label:"Not connected",tone:"muted",description:"Select a machine to request process detail.",retryable:!1};case"acquiring":return{label:"Connecting",tone:"warn",description:"Requesting process detail…",retryable:!1};case"loading":return{label:"Waiting",tone:"warn",description:"Waiting for the collector's first process snapshot…",retryable:!1};case"ready":return{label:"Live",tone:"ok",description:"Process detail is live.",retryable:!1};case"paused":return{label:"Paused",tone:"muted",description:"Process updates are paused.",retryable:!1};case"stale":return{label:"Not refreshing",tone:"warn",description:"The last snapshot is retained, but new snapshots are not arriving.",retryable:!0};case"disconnected":return{label:"Disconnected",tone:"crit",description:"The collector is disconnected; the last snapshot is not live.",retryable:!0};case"withheld":return{label:"Withheld",tone:"warn",description:"Process detail is withheld for this hub.",retryable:!0};case"unsupported":return{label:"Unsupported",tone:"warn",description:"This collector cannot provide process detail.",retryable:!0};case"busy":return{label:"Busy",tone:"warn",description:"Too many process views are open for this hub.",retryable:!0};case"expired":return{label:"Expired",tone:"warn",description:"Process detail expired before a fresh snapshot arrived.",retryable:!0};case"failed":return{label:"Scan failed",tone:"crit",description:"The process scan failed repeatedly.",retryable:!0};case"cancelled":return{label:"Stopped",tone:"muted",description:"The process detail view was stopped.",retryable:!0};case"error":return{label:"Unavailable",tone:"crit",description:"Process detail is unavailable right now.",retryable:!0}}}function V(e){return"number"==typeof e&&Number.isFinite(e)&&e>0}var Z=s(7348);class G{maxAgeMs;limit;session=null;entries=new Map;constructor(e=3e5,t=32){this.maxAgeMs=e,this.limit=t}scope(e){(this.session!==e||null===e)&&this.entries.clear(),this.session=e}get(e,t,s=Date.now()){this.scope(t);let r=this.entries.get(e);return r&&s-r.lastReceivedMs>=this.maxAgeMs?void this.entries.delete(e):r}set(e,t,s){this.scope(t),this.entries.delete(e),this.entries.set(e,s),this.entries.size>this.limit&&this.entries.delete(this.entries.keys().next().value)}delete(e,t){this.scope(t),this.entries.delete(e)}}let Y=new G;function X(e,t){let s=Y.get(e??"",t);return void 0!==s?{phase:"stale",message:"Resuming process updates…",...s}:{phase:null===e?"idle":"acquiring",detail:null,message:null,intervalMs:1e3,leaseMs:15e3,lastReceivedMs:null}}async function J(e){try{let t=await e.json();if(t&&"object"==typeof t&&"error"in t){let e=t.error;if("string"==typeof e&&e.length>0)return e}}catch{}return e.statusText||null}var H=s(8698);let Q=(0,H.A)("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),ee=(0,H.A)("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),et=(0,H.A)("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var es=s(8528),er=s(6114);let en=[{id:"name",label:"Application",sortKey:"name",align:"left",width:300},{id:"count",label:"Procs",sortKey:"count",align:"right",width:76},{id:"cpu",label:"CPU / core",sortKey:"cpu",align:"right",width:104},{id:"memory",label:"RSS",sortKey:"memory",align:"right",width:96},{id:"gpuMemory",label:"VRAM",sortKey:"gpuMemory",align:"right",width:96},{id:"ioRead",label:"Read",sortKey:"ioRead",align:"right",width:104},{id:"ioWrite",label:"Write",sortKey:"ioWrite",align:"right",width:104},{id:"users",label:"Users",sortKey:"user",align:"left",width:160}],ea=[{id:"name",label:"Process",sortKey:"name",align:"left",width:300},{id:"pid",label:"PID",sortKey:"pid",align:"right",width:84},{id:"user",label:"User",sortKey:"user",align:"left",width:120},{id:"cpu",label:"CPU / core",sortKey:"cpu",align:"right",width:104},{id:"memory",label:"RSS",sortKey:"memory",align:"right",width:96},{id:"gpuMemory",label:"VRAM",sortKey:"gpuMemory",align:"right",width:96},{id:"ioRead",label:"Read",sortKey:"ioRead",align:"right",width:104},{id:"ioWrite",label:"Write",sortKey:"ioWrite",align:"right",width:104},{id:"threads",label:"Threads",align:"right",width:84}],ei=Object.freeze({}),el=Object.freeze([]),eo=new Set(["cpu","memory","gpuMemory","ioRead","ioWrite","name","count","pid","user"]);function ec(e){return Math.round(Math.min(1200,Math.max(56,e)))}function ed(e){return"applications"===e||"processes"===e||"tree"===e?e:null}function eu(e){if(null===e||"object"!=typeof e)return null;let{key:t,dir:s}=e;return"string"==typeof t&&eo.has(t)&&("asc"===s||"desc"===s)?{key:t,dir:s}:null}function ep(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;let t={};for(let[s,r]of Object.entries(e))"number"==typeof r&&Number.isFinite(r)&&(t[s]=ec(r));return t}function eh(e){return"string"==typeof e?e.slice(0,200):null}function em(e){return"boolean"==typeof e?e:null}function ef(e){return Array.isArray(e)&&e.every(e=>"string"==typeof e)?e.slice(0,500):null}let eg="overflow-hidden text-ellipsis whitespace-nowrap border-b border-border px-2 py-2 align-middle",ex=`${eg} tnum text-right text-xs`,eb="relative overflow-hidden whitespace-nowrap border-b border-border px-2 py-2 text-left text-xs font-normal text-muted-foreground";function ey(e,t){return t[e.id]??e.width}function ew({label:e,width:t,onChange:s,onReset:n}){let a=(0,g.useRef)(null);return(0,r.jsx)("div",{role:"separator","aria-orientation":"vertical","aria-label":`Resize ${e} column`,"aria-valuenow":t,"aria-valuemin":56,"aria-valuemax":1200,tabIndex:0,title:"Drag to resize \xb7 double-click to reset",onPointerDown:e=>{0===e.button&&(e.preventDefault(),e.stopPropagation(),e.currentTarget.setPointerCapture(e.pointerId),a.current={x:e.clientX,width:t})},onPointerMove:e=>{null!==a.current&&s(ec(a.current.width+e.clientX-a.current.x))},onPointerUp:e=>{null!==a.current&&s(ec(a.current.width+e.clientX-a.current.x)),a.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)},onPointerCancel:()=>{a.current=null},onLostPointerCapture:()=>{a.current=null},onClick:e=>e.stopPropagation(),onDoubleClick:e=>{e.stopPropagation(),n()},onKeyDown:e=>{"ArrowLeft"===e.key?(e.preventDefault(),s(ec(t-16))):"ArrowRight"===e.key&&(e.preventDefault(),s(ec(t+16)))},className:"group/handle absolute inset-y-0 right-0 z-10 flex w-2.5 cursor-col-resize touch-none select-none justify-end",children:(0,r.jsx)("span",{"aria-hidden":!0,className:"my-2 w-px bg-border transition-colors group-hover/handle:bg-accent group-focus-visible/handle:bg-accent"})})}function ev({column:e,sort:t,onSort:s,width:n,onResize:a,onReset:i}){let l="right"===e.align,o=e.sortKey,c=void 0!==o?t.key!==o?"none":"asc"===t.dir?"ascending":"descending":"none",d="none"!==c,u=d?"asc"===t.dir?ee:et:Q;return(0,r.jsxs)("th",{scope:"col","aria-sort":void 0!==o?c:void 0,className:l?`${eb} text-right`:eb,children:[void 0!==o?(0,r.jsxs)("button",{type:"button",onClick:()=>s(o),className:["inline-flex min-h-6 max-w-full items-center gap-1 rounded-sm transition-colors hover:text-foreground",l?"w-full justify-end pr-1":"",d?"text-foreground":""].filter(Boolean).join(" "),children:[(0,r.jsx)("span",{className:"truncate",children:e.label}),(0,r.jsx)(u,{className:d?"h-3 w-3 shrink-0":"h-3 w-3 shrink-0 opacity-40","aria-hidden":!0})]}):(0,r.jsx)("span",{className:l?"block truncate pr-1":"block truncate",children:e.label}),(0,r.jsx)(ew,{label:e.label,width:n,onChange:a,onReset:i})]})}function ej({table:e,columns:t,label:s,caption:n,sort:a,onSort:i,children:l}){let[o,c]=(0,er.u)(`processes.widths.${e}`,ei,ep),d=(0,g.useRef)(null),[u,p]=(0,g.useState)(0);(0,g.useEffect)(()=>{let e=d.current;if(!e)return;let t=new ResizeObserver(([e])=>p(e.contentRect.width));return t.observe(e),()=>t.disconnect()},[]);let h=e=>"name"===e.id?160:56,m=t.reduce((e,t)=>e+h(t),0),f=t.reduce((e,t)=>e+ey(t,o),0),x={},b=Math.max(u||f,m),y=[...t];for(;y.length>0;){let e=y.reduce((e,t)=>e+ey(t,o),0),t=y.filter(t=>b*ey(t,o)/e<h(t));if(0===t.length){for(let t of y)x[t.id]=b*ey(t,o)/e;break}for(let e of t)x[e.id]=h(e),b-=h(e);y=y.filter(e=>!t.includes(e))}return(0,r.jsx)("div",{ref:d,className:"relative min-h-0 w-full min-w-0 flex-1 overflow-auto overscroll-contain",tabIndex:0,role:"region","aria-label":s,children:(0,r.jsxs)("table",{className:"table-fixed border-separate border-spacing-0 text-left",style:{width:"100%",minWidth:m},children:[(0,r.jsx)("caption",{className:"sr-only",children:n}),(0,r.jsx)("colgroup",{children:t.map(e=>(0,r.jsx)("col",{style:{width:x[e.id]}},e.id))}),(0,r.jsx)("thead",{className:"sticky top-0 z-20 bg-card",children:(0,r.jsx)("tr",{children:t.map(e=>(0,r.jsx)(ev,{column:e,sort:a,onSort:i,width:x[e.id],onResize:s=>{let r,n,a;return r=t.indexOf(e),n=t[r+1]??t[r-1],a=Math.max(h(e)-x[e.id],Math.min(s-x[e.id],x[n.id]-h(n))),void c({...x,[e.id]:x[e.id]+a,[n.id]:x[n.id]-a})},onReset:()=>c(t=>{let{[e.id]:s,...r}=t;return r})},e.id))})}),(0,r.jsx)("tbody",{children:l})]})})}function ek({value:e,kind:t,partial:s=!1}){let n=function(e,t,s=!1){let r;if(null===e||!Number.isFinite(e)||e<0)return{text:"—",atLeast:!1,title:null};switch(t){case"percent":r=(0,L.l9)(e);break;case"bytes":r=(0,L.z3)(e);break;case"rate":r=`${(0,L.z3)(e)}/s`;break;case"count":r=z(e)}return{text:r,atLeast:s,title:s?`At least ${r}: some processes in this group did not report this metric.`:null}}(e,t,s);return(0,r.jsxs)("td",{className:"—"===n.text?`${ex} text-muted-foreground`:ex,title:n.title??void 0,children:[n.atLeast?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{"aria-hidden":!0,children:"≥ "}),(0,r.jsx)("span",{className:"sr-only",children:"at least "})]}):null,n.text]})}function eM(e){let t=e.name.length>0?e.name:"Unnamed process";return null!==e.unit?`${t} \xb7 ${e.unit}`:t}function eN({row:e,depth:t=0}){return(0,r.jsx)("th",{scope:"row",className:`${eg} text-left text-sm font-medium`,title:eM(e),children:(0,r.jsxs)("span",{style:t>0?{paddingLeft:`${14*t}px`}:void 0,children:[t>0?(0,r.jsx)("span",{className:"sr-only",children:`Nested level ${t+1}. `}):null,e.name.length>0?e.name:(0,r.jsx)("span",{className:"text-muted-foreground",children:"Unnamed process"})]})})}function eA({entries:e,sort:t,onSort:s,mode:n}){return(0,r.jsx)(ej,{table:"processes",columns:ea,label:"tree"===n?"Process tree":"Process list",caption:"tree"===n?"Process tree with nesting depth, PID, user, CPU per core, resident memory, GPU memory, read and write rates, and threads":"Processes with PID, user, CPU per core, resident memory, GPU memory, read and write rates, and threads",sort:t,onSort:s,children:e.map(({row:e,depth:t})=>(0,r.jsxs)("tr",{className:"transition-colors hover:bg-card-strong/60",children:[(0,r.jsx)(eN,{row:e,depth:t}),(0,r.jsx)("td",{className:ex,children:e.pid}),(0,r.jsx)("td",{className:`${eg} text-xs text-muted-foreground`,title:e.user??void 0,children:e.user??"—"}),(0,r.jsx)(ek,{value:e.cpuPercent,kind:"percent"}),(0,r.jsx)(ek,{value:e.memoryRssBytes,kind:"bytes"}),(0,r.jsx)(ek,{value:e.gpuMemoryBytes,kind:"bytes"}),(0,r.jsx)(ek,{value:e.ioReadBytesPerSec,kind:"rate"}),(0,r.jsx)(ek,{value:e.ioWriteBytesPerSec,kind:"rate"}),(0,r.jsx)("td",{className:ex,children:z(e.threads)})]},F(e)))})}function eP({group:e}){return(0,r.jsx)(r.Fragment,{children:e.members.map(e=>(0,r.jsxs)("tr",{className:"bg-card-strong/40 transition-colors hover:bg-card-strong/70",children:[(0,r.jsx)("th",{scope:"row",className:`${eg} text-left text-xs font-normal`,title:`${eM(e)} \xb7 PID ${e.pid}`,children:(0,r.jsxs)("span",{className:"pl-5",children:[e.name.length>0?e.name:"Unnamed process",(0,r.jsx)("span",{className:"tnum ml-2 text-muted-foreground",children:e.pid})]})}),(0,r.jsx)("td",{className:ex}),(0,r.jsx)(ek,{value:e.cpuPercent,kind:"percent"}),(0,r.jsx)(ek,{value:e.memoryRssBytes,kind:"bytes"}),(0,r.jsx)(ek,{value:e.gpuMemoryBytes,kind:"bytes"}),(0,r.jsx)(ek,{value:e.ioReadBytesPerSec,kind:"rate"}),(0,r.jsx)(ek,{value:e.ioWriteBytesPerSec,kind:"rate"}),(0,r.jsx)("td",{className:`${eg} text-xs text-muted-foreground`,title:e.user??void 0,children:e.user??"—"})]},F(e)))})}function eS({groups:e,sort:t,onSort:s,expanded:n,onToggleGroup:a}){return(0,r.jsx)(ej,{table:"applications",columns:en,label:"Applications",caption:"Applications grouped by systemd unit, process tree, or kernel, with process count, aggregate CPU per core, resident memory, GPU memory, read and write rates, and users",sort:t,onSort:s,children:e.map(e=>{var t;let s=n.has(e.key),i=e.label.length>0?e.label:"Unnamed application",l=e.users.length>0?e.users.join(", "):"—";return(0,r.jsxs)(g.Fragment,{children:[(0,r.jsxs)("tr",{className:"transition-colors hover:bg-card-strong/60",children:[(0,r.jsx)("th",{scope:"row",className:`${eg} text-left font-normal`,title:`${i} \xb7 ${"unit"===(t=e.kind)?"systemd unit":"kernel"===t?"kernel":"process tree"}`,children:(0,r.jsxs)("button",{type:"button","aria-expanded":s,onClick:()=>a(e.key),className:"inline-flex min-h-6 max-w-full items-center gap-1.5 rounded-sm text-left",children:[(0,r.jsx)(es.A,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform ${s?"rotate-90":""}`,"aria-hidden":!0}),(0,r.jsx)("span",{className:"truncate text-sm font-medium",children:i})]})}),(0,r.jsx)("td",{className:ex,children:z(e.count)}),(0,r.jsx)(ek,{value:e.cpuPercent,kind:"percent",partial:e.partial.cpuPercent}),(0,r.jsx)(ek,{value:e.memoryRssBytes,kind:"bytes",partial:e.partial.memoryRssBytes}),(0,r.jsx)(ek,{value:e.gpuMemoryBytes,kind:"bytes",partial:e.partial.gpuMemoryBytes}),(0,r.jsx)(ek,{value:e.ioReadBytesPerSec,kind:"rate",partial:e.partial.ioReadBytesPerSec}),(0,r.jsx)(ek,{value:e.ioWriteBytesPerSec,kind:"rate",partial:e.partial.ioWriteBytesPerSec}),(0,r.jsx)("td",{className:`${eg} text-xs text-muted-foreground`,title:l,children:l})]}),s?(0,r.jsx)(eP,{group:e}):null]},e.key)})})}function e$({mode:e,groups:t,rows:s,tree:n,sort:a,onSort:i,expanded:l,onToggleGroup:o}){if("applications"===e)return(0,r.jsx)(eS,{groups:t,sort:a,onSort:i,expanded:l,onToggleGroup:o});let c="tree"===e?n.map(e=>({row:e.row,depth:e.depth})):s.map(e=>({row:e,depth:0}));return(0,r.jsx)(eA,{entries:c,mode:e,sort:a,onSort:i})}var eR=s(1),eC=s(7499);let eB=[{key:"cpuPercent",label:"cpu"},{key:"memoryRssBytes",label:"memory"},{key:"gpuMemoryBytes",label:"vram"},{key:"ioReadBytesPerSec",label:"read"},{key:"ioWriteBytesPerSec",label:"write"},{key:"threads",label:"threads"}];function eT(e){return new Date(e).toISOString()}function eU(e){return e.displayName?.trim()||e.hostname.trim()||e.machineId}function eW(e){return"applications"===e.mode?e.groups.flatMap(t=>$([...t.members],e.sort.key,e.sort.dir).map(e=>({row:e,application:t.label,applicationKind:t.kind,depth:0}))):"tree"===e.mode?e.tree.map(e=>({row:e.row,application:null,applicationKind:null,depth:e.depth})):e.sortedRows.map(e=>({row:e,application:null,applicationKind:null,depth:0}))}function eD(e){let t=e.now??Date.now(),s=null===e.receivedAtMs?null:Math.max(0,t-e.receivedAtMs),r=null===s?"receipt time unknown":`${Math.round(s/1e3)}s old`;return null===e.receivedAtMs?{label:"unknown",ageMs:null,stale:!0,note:"No browser receipt time is available for this snapshot."}:"paused"===e.phase?{label:"paused",ageMs:s,stale:!1,note:`Paused \xb7 ${r}. Not live.`}:"disconnected"===e.phase?{label:"disconnected",ageMs:s,stale:!0,note:`Collector disconnected \xb7 last snapshot ${r}. Not live.`}:"withheld"===e.phase||"unsupported"===e.phase?{label:"not live",ageMs:s,stale:!0,note:`Process detail is ${e.phase} \xb7 last snapshot ${r}.`}:"failed"===e.phase||"expired"===e.phase||"busy"===e.phase||"cancelled"===e.phase||"error"===e.phase?{label:"not live",ageMs:s,stale:!0,note:`Refresh problem \xb7 last snapshot ${r}. Not live.`}:"acquiring"===e.phase||"loading"===e.phase||"idle"===e.phase?{label:"waiting",ageMs:s,stale:!0,note:`Waiting for a fresh snapshot \xb7 ${r}.`}:K(e.receivedAtMs,t,e.intervalMs)?{label:"stale",ageMs:s,stale:!0,note:`No new snapshot has arrived \xb7 ${r}. Not live.`}:{label:"live",ageMs:s,stale:!1,note:`Live \xb7 updated ${r}.`}}function eI(e){return eB.filter(({key:t})=>null===e[t]).map(({label:e})=>e).join(" ")}function eL(e,t){let s=eD({phase:e.phase,receivedAtMs:e.receivedAtMs,intervalMs:e.intervalMs,now:t}),r=null===e.receivedAtMs?"unknown":eT(e.receivedAtMs),n=e.query.trim();return[`Filtered process snapshot from the loaded view \xb7 ${s.note}`,`Search: ${n.length>0?n:"(none)"} \xb7 view: ${e.mode} \xb7 sort: ${e.sort.key} ${e.sort.dir}`,`Snapshot ${e.snapshot.processes.length} shown of ${e.snapshot.totalProcesses} processes \xb7 ${e.snapshot.inaccessible} unreadable${e.snapshot.truncated?" \xb7 collector kept the highest-CPU rows":""}`,`Captured ${e.capturedAt} \xb7 received ${r}`]}let eq=["name","pid","user","application","application_kind","tree_depth","cpu_percent","memory_rss_bytes","gpu_memory_bytes","io_read_bytes_per_sec","io_write_bytes_per_sec","threads","unavailable_metrics"],eK="inline-flex min-h-7 items-center rounded-md border border-border bg-background px-2 text-xs text-foreground transition-colors hover:bg-card-strong disabled:cursor-not-allowed disabled:opacity-50";function e_(e){let[t,s]=(0,g.useState)(null),n=null!==e.snapshot&&null!==e.capturedAt,a=n?"applications"===e.mode?e.filteredRows.length:"tree"===e.mode?e.tree.length:e.sortedRows.length:0,i=!n||0===a,l=t=>{if(null===e.snapshot||null===e.capturedAt)return;let r=Date.now(),n={...e,snapshot:e.snapshot,capturedAt:e.capturedAt,exportedAt:r};try{let e,i,l,o=function(e,t,s=Date.now()){let r=Date.parse(e.capturedAt);return(0,eC.Y8)("processes",eU(e.machine),Number.isFinite(r)?r:s,t)}(n,t,r),c="csv"===t?function(e){let t,s,r=e.exportedAt??Date.now(),n=(t=eW(e),s=eD({phase:e.phase,receivedAtMs:e.receivedAtMs,intervalMs:e.intervalMs,now:r}),[["Rigscope process snapshot"],["Scope",eL(e,r)[0]],["Machine",eU(e.machine)],["Machine ID",e.machine.machineId],["Snapshot captured",e.capturedAt],["Snapshot received",null===e.receivedAtMs?"unknown":eT(e.receivedAtMs)],["Freshness",`${s.label}${null===s.ageMs?"":` \xb7 ${Math.round(s.ageMs/1e3)}s old`}`],["Search",e.query.trim()||"(none)"],["View",e.mode],["Sort",`${e.sort.key} ${e.sort.dir}`],["Snapshot rows",`${e.snapshot.processes.length} shown of ${e.snapshot.totalProcesses}`],["Unreadable",String(e.snapshot.inaccessible)],["Collector truncated",e.snapshot.truncated?"true":"false"],["Exported rows",String(t.length)],["Note",eL(e,r).slice(1).join(" ")],[]]);for(let t of(n.push([...eq]),eW(e)))n.push(function(e){let{row:t}=e;return[t.name,t.pid,t.user,e.application,e.applicationKind,e.depth,t.cpuPercent,t.memoryRssBytes,t.gpuMemoryBytes,t.ioReadBytesPerSec,t.ioWriteBytesPerSec,t.threads,eI(t)]}(t));return(0,eR.kg)(n)}(n):(e=n.exportedAt??Date.now(),i=eD({phase:n.phase,receivedAtMs:n.receivedAtMs,intervalMs:n.intervalMs,now:e}),l={app:"Rigscope",kind:"processes",exportedAt:eT(e),scope:{description:"Filtered process snapshot from the loaded view",machine:{id:n.machine.machineId,name:eU(n.machine),hostname:n.machine.hostname,connected:n.machine.connected},query:n.query.trim(),view:n.mode,sort:n.sort},snapshot:{capturedAt:n.capturedAt,receivedAt:null===n.receivedAtMs?null:eT(n.receivedAtMs),ageMs:i.ageMs,freshness:i.label,live:!i.stale&&"live"===i.label,note:i.note,totalProcesses:n.snapshot.totalProcesses,shownProcesses:n.snapshot.processes.length,inaccessible:n.snapshot.inaccessible,truncated:n.snapshot.truncated},exportedRows:eW(n).length,notes:eL(n,e),processes:eW(n).map(e=>({name:e.row.name,pid:e.row.pid,user:e.row.user,application:e.application,applicationKind:e.applicationKind,treeDepth:e.depth,cpuPercent:e.row.cpuPercent,memoryRssBytes:e.row.memoryRssBytes,gpuMemoryBytes:e.row.gpuMemoryBytes,ioReadBytesPerSec:e.row.ioReadBytesPerSec,ioWriteBytesPerSec:e.row.ioWriteBytesPerSec,threads:e.row.threads,unavailableMetrics:eI(e.row).split(" ").filter(Boolean)}))},`${JSON.stringify(l,null,2)}
3
+ `);(0,eR.PE)(o,c,"csv"===t?eR.UR:eR.uW),s(`${t.toUpperCase()} downloaded \xb7 ${a} ${1===a?"process":"processes"}`)}catch{s("The process export could not be created.")}},o=n?0===a?"No processes match the current search":void 0:"A process snapshot is not available yet";return(0,r.jsxs)("div",{className:"flex min-w-0 shrink-0 items-center gap-1.5",children:[(0,r.jsx)("span",{className:"hidden text-xs text-muted-foreground sm:inline",children:"Export"}),(0,r.jsx)("button",{type:"button",onClick:()=>l("csv"),disabled:i,"aria-label":"Download current process snapshot as CSV",title:o??"Download the filtered process snapshot as CSV",className:eK,children:"CSV"}),(0,r.jsx)("button",{type:"button",onClick:()=>l("json"),disabled:i,"aria-label":"Download current process snapshot as JSON",title:o??"Download the filtered process snapshot as JSON",className:eK,children:"JSON"}),(0,r.jsxs)("span",{role:"status",className:t?.includes("could not")?"inline-flex items-center gap-1 text-xs text-warn":"sr-only",children:[t?.includes("could not")?(0,r.jsx)(v.A,{className:"h-3 w-3","aria-hidden":!0}):null,t??""]})]})}let eF={ok:"bg-ok-soft text-ok",warn:"bg-warn-soft text-warn",crit:"bg-crit-soft text-crit",muted:"border border-border text-muted-foreground"};function eE({phase:e,message:t}){return(0,r.jsxs)("span",{title:t??e.description,className:`inline-flex h-6 w-32 shrink-0 items-center gap-1.5 rounded-full px-2 py-0.5 text-xs ${eF[e.tone]}`,children:[(0,r.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-current","aria-hidden":!0}),e.label]})}function ez({onClick:e,label:t="Check again"}){return(0,r.jsxs)("button",{type:"button",onClick:e,className:"inline-flex min-h-5 items-center gap-1.5 rounded-md border border-border bg-card px-2 py-1 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,r.jsx)(x.A,{className:"h-3 w-3","aria-hidden":!0}),t]})}function eO({phase:e,info:t,message:s,onRetry:n}){let a="withheld"===e||"unsupported"===e?b.A:"disconnected"===e||"error"===e?y.A:"paused"===e?w.A:"acquiring"===e||"loading"===e?i.A:"busy"===e||"expired"===e||"failed"===e||"stale"===e?v.A:j.A;return(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2 break-words",children:[(0,r.jsx)(d.p,{icon:a,note:s??t.description,className:"min-h-64 w-full"}),"paused"!==e&&t.retryable?(0,r.jsx)(ez,{onClick:n,label:"Retry process detail"}):null]})}function eV({summary:e,lastReceivedMs:t,intervalMs:s,message:n,phase:a,hasSnapshot:i}){let l=(0,Z.c)(1e3),o="ready"===a&&K(t,l,s),c=o?"stale":a,d="paused"===c,u=O(c),p=null===t?null:(0,L.nV)(Math.max(0,l-t)),h=null===p?null:"ready"===c?`Updated ${p}`:`Last snapshot ${p}`,m=d?i?"Paused. This snapshot is not live.":"Paused. Use Resume to request a fresh snapshot.":`${u.label}${o?". No new snapshot has arrived.":""}${n?`. ${n}`:""}`;return d&&!i?(0,r.jsx)("p",{role:"status",className:"sr-only",children:m}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{role:"status",className:"sr-only",children:m}),(0,r.jsxs)("div",{className:"flex min-h-6 flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[d?(0,r.jsx)("span",{children:"Paused — not live"}):(0,r.jsx)(eE,{phase:u,message:n}),i&&null!==h?(0,r.jsx)("span",{className:"tnum",children:h}):null,i&&e.truncated?(0,r.jsxs)("span",{className:"tnum",title:"The collector kept the highest-CPU rows",children:["top ",z(e.shown)," of ",z(e.total)]}):null,i&&e.inaccessible>0?(0,r.jsxs)("span",{className:"tnum text-warn",children:[z(e.inaccessible)," unreadable"]}):null]})]})}function eZ({machine:e,csrfToken:t,paused:s,onPausedChange:n}){var a;let[i,l]=(0,er.u)("processes.query","",eh,"session"),o=(0,g.useDeferredValue)(i),[c,u]=(0,er.u)("processes.mode","applications",ed),[p,h]=(a="applications"===c?"applications":"processes",(0,er.u)(`processes.sort.${a}`,q,eu)),[m,f]=(0,er.u)("processes.expanded",el,ef,"session"),x=(0,g.useMemo)(()=>new Set(m),[m]),{state:b,refresh:y}=function(e){let{machineId:t,csrfToken:s,paused:r}=e,[n,a]=(0,g.useState)(()=>"u">typeof document&&document.hidden),[i,l]=(0,g.useState)(0),[o,c]=(0,g.useState)(()=>X(t,s)),d=(0,g.useRef)(o),u=(0,g.useRef)({machineId:t,csrfToken:s}),p=(0,g.useRef)(0),h=(0,g.useCallback)(()=>{p.current+=1,l(p.current)},[]);return(0,g.useEffect)(()=>{if("u"<typeof document)return;let e=()=>a(document.hidden);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,g.useEffect)(()=>{let e;if(u.current.machineId!==t||u.current.csrfToken!==s){u.current={machineId:t,csrfToken:s};let e=X(t,s);d.current=e,c(e)}if(!(null!==t&&null!==s&&!r&&!n)){if(t&&s){let e={...d.current,phase:"paused",message:n?"This tab is hidden — process updates are stopped until it is visible again.":"Paused — process updates are stopped until you resume."};d.current=e,c(e)}else{let e=X(t,s);d.current=e,c(e)}return}let a=!1,i=new AbortController,l=(e=globalThis.crypto)&&"function"==typeof e.randomUUID?e.randomUUID():`viewer-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,o=`/api/processes?machineId=${encodeURIComponent(t)}&viewerId=${encodeURIComponent(l)}`,p=d.current.intervalMs||1e3,h=d.current.leaseMs||15e3,m=null!==d.current.detail,f=!1,g=!1,x=!1,b=null,y=null,w=null,v=e=>{if(a)return;let r=d.current,n="function"==typeof e?e(r):e,i={...r,...n};d.current=i,null!==i.detail&&null!==i.lastReceivedMs&&Y.set(t,s,{detail:i.detail,intervalMs:i.intervalMs,leaseMs:i.leaseMs,lastReceivedMs:i.lastReceivedMs}),c(i)},j=()=>{null!==b&&(clearTimeout(b),b=null),null!==y&&(clearTimeout(y),y=null),w?.abort(),w=null},k=()=>{try{fetch(o,{method:"DELETE",cache:"no-store",keepalive:!0,headers:{"X-CSRF-Token":s,Accept:"application/json"}}).catch(()=>void 0)}catch{}},M=()=>{g=!1,null!==b&&(clearTimeout(b),b=null)},N=(e,r)=>{x=!0,j(),m=!1,Y.delete(t,s),v({phase:e,detail:null,message:r,lastReceivedMs:null}),k()},A=e=>{let t="u">typeof navigator&&!1===navigator.onLine;v({phase:m?t?"disconnected":"stale":"error",message:e})},P=async()=>{try{let e=await fetch(o,{method:"POST",cache:"no-store",signal:i.signal,headers:{"X-CSRF-Token":s,Accept:"application/json"}});if(a||i.signal.aborted)return!1;if(!e.ok){M();let t=await J(e);return 401===e.status?N("error","Your session ended. Sign in again to inspect processes."):403===e.status?N("withheld",t??"Processes are not available to this hub."):409===e.status?N("unsupported",t??"This collector requires an upgrade before Processes is available."):(429===e.status||503===e.status)&&/budget/i.test(t??"")?v({phase:"busy",message:t??"Too many process views are open for this hub."}):A(t??`Could not request process detail (HTTP ${e.status}).`),!1}g=!0;let t=null;try{t=await e.json()}catch{t=null}let r=function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;let t=e.leaseMs,s=e.intervalMs;return V(t)&&V(s)?{leaseMs:Math.round(t),intervalMs:Math.round(s)}:null}(t);if(null===r)return M(),k(),A("The hub returned an unexpected response."),!1;if(a||i.signal.aborted)return!1;return p=r.intervalMs,h=r.leaseMs,v(e=>({intervalMs:r.intervalMs,leaseMs:r.leaseMs,phase:null===e.detail?"loading":e.phase,message:null})),!0}catch(e){if(a||i.signal.aborted)return!1;return M(),A(m?"Could not refresh process detail. Showing the last snapshot, which is not live.":"Could not reach the hub for process detail."),!1}},S=()=>{a||x||null!==y||(y=setTimeout(()=>{y=null,$()},Math.max(1e3,Math.min(5e3,Math.floor(h/3)))))},$=async()=>{a||x||(await P(),a||x||(g&&!f&&null===b&&R(),S()))},R=async()=>{if(a||x||f)return;f=!0;let e=new AbortController;w=e;let t=()=>e.abort();i.signal.addEventListener("abort",t,{once:!0});try{let t=await fetch(o,{cache:"no-store",signal:e.signal,headers:{Accept:"application/json"}});if(a||e.signal.aborted)return;if(410===t.status){v({phase:m?"stale":"loading",message:"Process detail expired. Renewing…"}),await P();return}if(!t.ok){let e=await J(t);401===t.status?N("error","Your session ended. Sign in again to inspect processes."):403===t.status?N("withheld",e??"Processes are not available to this machine."):A(e??`Could not refresh processes (HTTP ${t.status}).`);return}let s=null;try{s=await t.json()}catch{s=null}let r=function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;let t=e.state;if("string"!=typeof t||0===t.length)return null;let s=e.result;if(null==s)return{state:t,result:null};try{let e=(0,I.Q_)(s);if("detail.result"!==e.type)return null;return{state:t,result:e}}catch{return null}}(s);if(a||e.signal.aborted)return;if(null===r)return void A(m?"Unable to read the process update. Showing the last snapshot.":"Unable to read the process update from the hub.");((e,t)=>{if(null!==t){m=!0;let e=d.current;if(null!==e.detail&&e.detail.subscriptionId===t.subscriptionId&&e.detail.capturedAt===t.capturedAt&&"ready"===e.phase&&null===e.message)return;v(e=>{let s=null!==e.detail&&e.detail.subscriptionId===t.subscriptionId&&e.detail.capturedAt===t.capturedAt;return{phase:"ready",detail:s?e.detail:t,message:null,lastReceivedMs:s?e.lastReceivedMs:Date.now()}});return}let s=function(e){switch(e){case"ready":return"ready";case"loading":return"loading";case"paused":return"paused";case"disconnected":return"disconnected";case"withheld":return"withheld";case"unsupported":return"unsupported";case"busy":return"busy";case"expired":return"expired";case"failed":return"failed";case"cancelled":return"cancelled";default:return"error"}}(e);switch(s){case"ready":case"loading":return v({phase:m?"stale":"loading",message:m?"Waiting for a fresh snapshot. The values shown are from the last received snapshot.":"Waiting for the collector to report processes…"});case"disconnected":return v({phase:"disconnected",message:m?"The collector is disconnected. Showing the last received snapshot; it is not live.":"The collector is disconnected."});case"withheld":case"unsupported":case"cancelled":return N(s,O(s).description);case"busy":case"expired":case"failed":return v({phase:s,message:m?`${O(s).description} Showing the last received snapshot.`:O(s).description});case"paused":return v({phase:"paused",message:"Process updates are paused."});default:v({phase:m?"stale":"error",message:"Unable to read the process status from the hub."})}})(r.state,r.result)}catch{if(a||e.signal.aborted)return;A(m?"Process refresh failed. Showing the last snapshot, which is not live.":"Could not reach the hub for process detail.")}finally{i.signal.removeEventListener("abort",t),w===e&&(w=null),f=!1,a||x||a||x||!g||null!==b||(b=setTimeout(()=>{b=null,R()},p))}};return v(e=>null===e.detail?{phase:"acquiring",message:null}:"ready"===e.phase&&null===e.message?{}:{phase:"stale",message:"Resuming process updates…"}),(async()=>{let e=await P();a||x||(S(),e&&R())})(),()=>{a=!0,x=!0,j(),k()}},[t,s,r,n,i]),{state:u.current.machineId===t&&u.current.csrfToken===s?o:X(t,s),hidden:n,refresh:h}}({machineId:e.machineId,csrfToken:t,paused:s}),v=(0,g.useMemo)(()=>b.detail?.snapshot.processes??[],[b.detail]),j=(0,g.useMemo)(()=>(function(e){if(null===e)return{total:0,shown:0,inaccessible:0,truncated:!1};let t=e.processes.length;return{total:e.totalProcesses,shown:t,inaccessible:e.inaccessible,truncated:e.truncated}})(b.detail?.snapshot??null),[b.detail]),W=(0,g.useMemo)(()=>{var e,t,s;let r;return e=v,t=o,s=e.map(E),0===(r=t.trim().toLowerCase()).length?s.slice():s.filter(e=>!!(e.name.toLowerCase().includes(r)||null!==e.user&&e.user.toLowerCase().includes(r)||String(e.pid).includes(r)||null!==e.unit&&e.unit.toLowerCase().includes(r)||void 0!==e.command&&e.command.toLowerCase().includes(r)))},[v,o]),L=(0,g.useMemo)(()=>$(W,p.key,p.dir),[W,p]),K=(0,g.useMemo)(()=>{var e,t,s;return"applications"===c?(e=function(e){let t=new Map;for(let s of e)t.has(s.pid)||t.set(s.pid,s);let s=new Map;for(let r of e){let e=function(e,t){if(function(e,t){if(2===e.pid||2===e.ppid)return!0;let s=e,r=new Set;for(;s&&!r.has(s.pid);){if(2===s.pid)return!0;r.add(s.pid),s=t.get(s.ppid)}return!1}(e,t))return{key:"kernel",label:"kernel",kind:"kernel",leader:e};let s=C(e.unit);if(null!==s)return{key:`unit:${s}`,label:B(s),kind:"unit",leader:e};let r=e,n=new Set;for(;;){if(n.has(r.pid)){let e=r;for(let s of n){let r=t.get(s);r&&(r.pid<e.pid||r.pid===e.pid&&r.startTicks<e.startTicks)&&(e=r)}return T(e)}n.add(r.pid);let e=t.get(r.ppid);if(!e||function(e,t){if(1===e.pid)return!0;let s=e.name.toLowerCase();if(A.has(s)||P.has(s)||s.startsWith("tmux:"))return!0;if(R(e.unit)){let s=t.get(e.ppid);return void 0===s||s.unit!==e.unit}return!1}(e,t))return T(r);let s=C(e.unit);if(null!==s)return{key:`unit:${s}`,label:B(s),kind:"unit",leader:e};r=e}}(r,t),n=s.get(e.key);n?n.members.push(r):s.set(e.key,{descriptor:e,members:[r]})}return[...s.values()].map(({descriptor:e,members:t})=>(function(e,t){let s={cpuPercent:{sum:0,known:0},memoryRssBytes:{sum:0,known:0},gpuMemoryBytes:{sum:0,known:0},ioReadBytesPerSec:{sum:0,known:0},ioWriteBytesPerSec:{sum:0,known:0}},r=new Set;for(let e of t)for(let t of(null!==e.user&&r.add(e.user),S)){let r=e[t];null!==r&&Number.isFinite(r)&&(s[t].sum+=r,s[t].known++)}let n=e=>0===s[e].known?null:s[e].sum,a={};for(let e of S)a[e]=s[e].known>0&&s[e].known<t.length;return{key:e.key,label:e.label,kind:e.kind,members:e.leader!==t[0]?[e.leader,...t.filter(t=>t!==e.leader)]:t,cpuPercent:n("cpuPercent"),memoryRssBytes:n("memoryRssBytes"),gpuMemoryBytes:n("gpuMemoryBytes"),ioReadBytesPerSec:n("ioReadBytesPerSec"),ioWriteBytesPerSec:n("ioWriteBytesPerSec"),count:t.length,users:[...r].sort(),partial:a}})(e,t))}(W),t=p.key,s=p.dir,e.slice().sort((e,r)=>D(U(e,t),U(r,t),s))):[]},[W,c,p]),F=(0,g.useMemo)(()=>"tree"===c?function(e){let t=e.length,s=new Map;for(let r=0;r<t;r++)s.has(e[r].pid)||s.set(e[r].pid,r);let r=e.map(e=>{let t=s.get(e.ppid);return void 0===t?null:t}),n=new Uint8Array(t);for(let e=0;e<t;e++){if(0!==n[e])continue;let t=[],s=e;for(;null!==s&&0===n[s];)n[s]=1,t.push(s),s=r[s];for(let e of(null!==s&&1===n[s]&&(r[t[t.length-1]]=null),t))n[e]=2}let a=Array.from({length:t},()=>[]),i=[];for(let e=0;e<t;e++){let t=r[e];null===t?i.push(e):a[t].push(e)}let l=[],o=[];for(let e=i.length-1;e>=0;e--)o.push({index:i[e],depth:0});for(;o.length>0;){let{index:t,depth:s}=o.pop();l.push({row:e[t],depth:s,children:a[t].length});let r=a[t];for(let e=r.length-1;e>=0;e--)o.push({index:r[e],depth:s+1})}return l}(L):[],[c,L]),z=O(b.phase),Z=null!==b.detail,G=!Z&&("acquiring"===b.phase||"loading"===b.phase),H=o.trim().slice(0,80),Q=(0,g.useMemo)(()=>{let e=W.length,t=o.trim().length>0,s=1!==e||t?"processes":"process";return"applications"===c?`${K.length} app${1===K.length?"":"s"} \xb7 ${e}${t?` of ${j.shown}`:""} ${s}`:`${e}${t?` of ${j.shown}`:""} ${s}`},[o,W.length,K.length,c,j.shown]);return(0,r.jsx)(d.Z,{title:"Process detail",action:Z?(0,r.jsx)("span",{className:"tnum hidden max-w-[18rem] truncate text-muted-foreground sm:block",children:Q}):void 0,className:"min-h-0 flex-1",children:(0,r.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[(0,r.jsxs)("div",{className:"relative min-w-0 flex-1 basis-52",children:[(0,r.jsx)("label",{htmlFor:"process-search",className:"sr-only",children:"Search processes"}),(0,r.jsx)(k.A,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground","aria-hidden":!0}),(0,r.jsx)("input",{id:"process-search",type:"search",value:i,onChange:e=>l(e.target.value),placeholder:"Search name, user, PID, or unit",autoComplete:"off",spellCheck:!1,className:"h-9 w-full rounded-md border border-border bg-card-strong py-1.5 pl-8 pr-8 text-sm text-foreground placeholder:text-muted-foreground [&::-webkit-search-cancel-button]:hidden [&::-webkit-search-cancel-button]:[-webkit-appearance:none]"}),i.length>0?(0,r.jsx)("button",{type:"button",onClick:()=>l(""),"aria-label":"Clear search",className:"absolute right-0.5 top-1/2 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-card hover:text-foreground",children:(0,r.jsx)(M.A,{className:"h-3.5 w-3.5","aria-hidden":!0})}):null]}),(0,r.jsx)("div",{role:"group","aria-label":"Process view",className:"inline-flex shrink-0 rounded-md border border-border p-0.5",children:_.map(e=>{let t=c===e.value;return(0,r.jsx)("button",{type:"button","aria-pressed":t,onClick:()=>u(e.value),className:["rounded px-2.5 py-1 text-xs transition-colors",t?"bg-selected font-medium text-foreground":"text-muted-foreground hover:bg-card-strong hover:text-foreground"].join(" "),children:e.label},e.value)})}),(0,r.jsxs)("button",{type:"button",onClick:()=>n(!s),title:s?"Resume process updates":"Pause process updates",className:"inline-flex min-h-9 shrink-0 items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:[s?(0,r.jsx)(N.A,{className:"h-3.5 w-3.5","aria-hidden":!0}):(0,r.jsx)(w.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),s?"Resume":"Pause"]}),(0,r.jsx)(e_,{machine:e,snapshot:b.detail?.snapshot??null,capturedAt:b.detail?.capturedAt??null,receivedAtMs:b.lastReceivedMs,intervalMs:b.intervalMs,phase:b.phase,query:o,mode:c,sort:p,filteredRows:W,sortedRows:L,groups:K,tree:F})]}),(0,r.jsx)(eV,{summary:j,lastReceivedMs:b.lastReceivedMs,intervalMs:b.intervalMs,message:b.message,phase:b.phase,hasSnapshot:Z}),(0,r.jsx)("div",{"aria-busy":G||"acquiring"===b.phase,className:"flex min-h-0 flex-1 flex-col overflow-auto",children:Z?0===W.length?(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2 break-words",children:[(0,r.jsx)(d.p,{icon:k.A,note:0===j.shown?"The collector reported no processes in this snapshot.":o.trim().length>0?`No processes match “${H}”.`:"No processes to show.",className:"min-h-64 w-full"}),o.trim().length>0?(0,r.jsxs)("button",{type:"button",onClick:()=>l(""),className:"inline-flex min-h-6 items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,r.jsx)(M.A,{className:"h-3 w-3","aria-hidden":!0}),"Clear search"]}):null]}):(0,r.jsx)(e$,{mode:c,groups:K,rows:L,tree:F,sort:p,onSort:e=>h(t=>(function(e,t){return e.key===t?{key:t,dir:"asc"===e.dir?"desc":"asc"}:{key:t,dir:"name"===t||"user"===t||"pid"===t?"asc":"desc"}})(t,e)),expanded:x,onToggleGroup:e=>{f(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}}):(0,r.jsx)(eO,{phase:b.phase,info:z,message:b.message,onRetry:y})})]})})}function eG({waiting:e}){return(0,r.jsx)(d.Z,{title:e?"Waiting for machines":"No machines",className:"mt-2",children:(0,r.jsx)(d.p,{icon:e?i.A:l.A,note:e?"Waiting for the fleet snapshot…":"No machines are available in your authorized fleet."})})}function eY({requested:e}){return(0,r.jsxs)(d.Z,{title:"Machine not found",className:"mt-2",children:[(0,r.jsx)(d.p,{icon:o.A,note:"This machine is unavailable or outside your access."}),(0,r.jsxs)("p",{className:"tnum mt-2 break-all text-center text-xs text-muted-foreground",children:["Requested identifier: ",e]}),(0,r.jsx)("div",{className:"flex justify-center",children:(0,r.jsx)(a(),{href:"/",className:"mt-2 inline-flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:"Back to fleet"})})]})}function eX(){let{session:e,phase:t,machines:s}=(0,m.M)(),n=(0,h.x)(),[a,i]=(0,er.u)("processes.paused",!1,em,"session"),{machine:l,navMachineId:o,requestedMachineId:d}=(0,f.JG)("processes"),g="signed-in"===e.kind?e.user.csrfToken:null,x=0===s.length&&("connecting"===t||"idle"===t);return(0,r.jsx)(c.G,{title:"Processes",machineId:o,machineView:"processes",workspace:!0,headerRight:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.$E,{}),(0,r.jsx)(p.B,{})]}),children:n||(0,r.jsx)(r.Fragment,{children:0===s.length?(0,r.jsx)(eG,{waiting:x}):l?(0,r.jsx)(eZ,{machine:l,csrfToken:g,paused:a,onPausedChange:i},`${l.machineId}:${g}`):(0,r.jsx)(eY,{requested:d??""})})})}},7499:(e,t,s)=>{"use strict";function r(e,t,s,r){return`rigscope-${e}-${function(e,t="machine"){let s=e.normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48).replace(/-+$/g,"");return s.length>0?s:t}(t)}-${!Number.isFinite(s)?"unknown-time":new Date(s).toISOString().replace(/[-:]/g,"").replace(/\.\d{3}Z$/,"Z")}.${r}`}s.d(t,{Y8:()=>r})},8528:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(8698).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},9031:(e,t,s)=>{Promise.resolve().then(s.bind(s,1721)),Promise.resolve().then(s.bind(s,7339)),Promise.resolve().then(s.bind(s,2701)),Promise.resolve().then(s.bind(s,2394))},9664:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(8698).A)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},9926:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(8698).A)("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]])},9942:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(8698).A)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])}},e=>{e.O(0,[157,939,103,441,794,358],()=>e(e.s=9031)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-outline-style:solid}}}@layer theme{:host,:root{--font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground)}}@layer base{*,::backdrop,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden}.absolute,.sr-only{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-y-0{inset-block:0}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.right-0{right:0}.right-0\.5{right:calc(var(--spacing) * .5)}.right-2{right:calc(var(--spacing) * 2)}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.order-first{order:-9999}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-1{margin:var(--spacing)}.m-2{margin:calc(var(--spacing) * 2)}.m-3{margin:calc(var(--spacing) * 3)}.m-74{margin:calc(var(--spacing) * 74)}.mx-auto{margin-inline:auto}.my-2{margin-block:calc(var(--spacing) * 2)}.my-3{margin-block:calc(var(--spacing) * 3)}.my-12{margin-block:calc(var(--spacing) * 12)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-10{margin-top:calc(var(--spacing) * 10)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-14{height:calc(var(--spacing) * 14)}.h-40{height:calc(var(--spacing) * 40)}.h-dvh{height:100dvh}.h-full{height:100%}.h-px{height:1px}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[min\(30dvh\,20rem\)\]{max-height:min(30dvh,20rem)}.min-h-0{min-height:0}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-5{min-height:calc(var(--spacing) * 5)}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-7{min-height:calc(var(--spacing) * 7)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-14{min-height:calc(var(--spacing) * 14)}.min-h-32{min-height:calc(var(--spacing) * 32)}.min-h-48{min-height:calc(var(--spacing) * 48)}.min-h-64{min-height:calc(var(--spacing) * 64)}.min-h-dvh{min-height:100dvh}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-4\.5{width:calc(var(--spacing) * 4.5)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-9{width:calc(var(--spacing) * 9)}.w-14{width:calc(var(--spacing) * 14)}.w-32{width:calc(var(--spacing) * 32)}.w-40{width:calc(var(--spacing) * 40)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-32{max-width:calc(var(--spacing) * 32)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-64{max-width:calc(var(--spacing) * 64)}.max-w-\[12rem\]{max-width:12rem}.max-w-\[16rem\]{max-width:16rem}.max-w-\[18rem\]{max-width:18rem}.max-w-\[1500px\]{max-width:1500px}.max-w-\[calc\(100\%-1rem\)\]{max-width:calc(100% - 1rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.basis-52{flex-basis:calc(var(--spacing) * 52)}.table-fixed{table-layout:fixed}.border-separate{border-collapse:separate}.border-spacing-0{--tw-border-spacing-x:0px;--tw-border-spacing-y:0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-crosshair{cursor:crosshair}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.scroll-mt-6{scroll-margin-top:calc(var(--spacing) * 6)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[3rem_minmax\(0\,1fr\)_4\.5rem\]{grid-template-columns:3rem minmax(0,1fr) 4.5rem}.grid-cols-\[minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-cols-\[repeat\(auto-fit\,minmax\(3\.5rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(3.5rem,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}.gap-y-4{row-gap:calc(var(--spacing) * 4)}.gap-y-5{row-gap:calc(var(--spacing) * 5)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--border)}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e+38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-\[5px\]{border-style:var(--tw-border-style);border-width:5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent\/40{border-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\/40{border-color:color-mix(in oklab,var(--accent) 40%,transparent)}}.border-accent\/60{border-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\/60{border-color:color-mix(in oklab,var(--accent) 60%,transparent)}}.border-border,.border-border\/40{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/40{border-color:color-mix(in oklab,var(--border) 40%,transparent)}}.border-crit{border-color:var(--crit)}.border-current{border-color:currentColor}.border-transparent{border-color:#0000}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-card-strong,.bg-card-strong\/25{background-color:var(--card-strong)}@supports (color:color-mix(in lab,red,red)){.bg-card-strong\/25{background-color:color-mix(in oklab,var(--card-strong) 25%,transparent)}}.bg-card-strong\/30{background-color:var(--card-strong)}@supports (color:color-mix(in lab,red,red)){.bg-card-strong\/30{background-color:color-mix(in oklab,var(--card-strong) 30%,transparent)}}.bg-card-strong\/40{background-color:var(--card-strong)}@supports (color:color-mix(in lab,red,red)){.bg-card-strong\/40{background-color:color-mix(in oklab,var(--card-strong) 40%,transparent)}}.bg-cpu{background-color:var(--cpu)}.bg-crit{background-color:var(--crit)}.bg-crit-soft{background-color:var(--crit-soft)}.bg-current{background-color:currentColor}.bg-mem{background-color:var(--mem)}.bg-muted-foreground,.bg-muted-foreground\/50{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/50{background-color:color-mix(in oklab,var(--muted-foreground) 50%,transparent)}}.bg-ok{background-color:var(--ok)}.bg-ok-soft{background-color:var(--ok-soft)}.bg-selected{background-color:var(--selected)}.bg-warn{background-color:var(--warn)}.bg-warn-soft{background-color:var(--warn-soft)}.fill-foreground{fill:var(--foreground)}.fill-muted-foreground{fill:var(--muted-foreground)}.fill-warn{fill:var(--warn)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pr-1{padding-right:var(--spacing)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--accent)}.text-accent-foreground{color:var(--accent-foreground)}.text-crit{color:var(--crit)}.text-foreground,.text-foreground\/80{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/80{color:color-mix(in oklab,var(--foreground) 80%,transparent)}}.text-muted-foreground{color:var(--muted-foreground)}.text-ok{color:var(--ok)}.text-warn{color:var(--warn)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.accent-\[var\(--accent\)\]{accent-color:var(--accent)}.accent-foreground{accent-color:var(--foreground)}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline-offset-\[-2px\]{outline-offset:-2px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\/handle\:bg-accent:is(:where(.group\/handle):hover *){background-color:var(--accent)}}.group-focus-visible\/handle\:bg-accent:is(:where(.group\/handle):focus-visible *){background-color:var(--accent)}.peer-focus-visible\:outline:is(:where(.peer):focus-visible~*){outline-style:var(--tw-outline-style);outline-width:1px}.peer-focus-visible\:outline-2:is(:where(.peer):focus-visible~*){outline-style:var(--tw-outline-style);outline-width:2px}.peer-focus-visible\:outline-offset-2:is(:where(.peer):focus-visible~*){outline-offset:2px}.peer-focus-visible\:\[outline-color\:var\(--focus\)\]:is(:where(.peer):focus-visible~*){outline-color:var(--focus)}.peer-focus-visible\:outline-accent:is(:where(.peer):focus-visible~*){outline-color:var(--accent)}.placeholder\:text-muted-foreground::placeholder,.placeholder\:text-muted-foreground\/70::placeholder{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.placeholder\:text-muted-foreground\/70::placeholder{color:color-mix(in oklab,var(--muted-foreground) 70%,transparent)}}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.hover\:border-muted-foreground\/40:hover{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.hover\:border-muted-foreground\/40:hover{border-color:color-mix(in oklab,var(--muted-foreground) 40%,transparent)}}.hover\:bg-accent\/90:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/90:hover{background-color:color-mix(in oklab,var(--accent) 90%,transparent)}}.hover\:bg-card:hover{background-color:var(--card)}.hover\:bg-card-strong:hover,.hover\:bg-card-strong\/60:hover{background-color:var(--card-strong)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card-strong\/60:hover{background-color:color-mix(in oklab,var(--card-strong) 60%,transparent)}}.hover\:bg-card-strong\/70:hover{background-color:var(--card-strong)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card-strong\/70:hover{background-color:color-mix(in oklab,var(--card-strong) 70%,transparent)}}.hover\:bg-crit-soft:hover{background-color:var(--crit-soft)}.hover\:bg-selected:hover{background-color:var(--selected)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:not-sr-only:focus{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:absolute:focus{position:absolute}.focus\:start-2:focus{inset-inline-start:calc(var(--spacing) * 2)}.focus\:top-2:focus{top:calc(var(--spacing) * 2)}.focus\:outline-2:focus{outline-style:var(--tw-outline-style);outline-width:2px}.focus\:outline-accent:focus{outline-color:var(--accent)}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-offset-\[-2px\]:focus-visible{outline-offset:-2px}.focus-visible\:outline-accent:focus-visible{outline-color:var(--accent)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.aria-\[invalid\=true\]\:border-crit[aria-invalid=true]{border-color:var(--crit)}@media not all and (min-width:48rem){.max-md\:absolute{position:absolute}.max-md\:-right-1{right:calc(var(--spacing) * -1)}.max-md\:-bottom-0\.5{bottom:calc(var(--spacing) * -.5)}.max-md\:justify-center{justify-content:center}.max-md\:px-0{padding-inline:0}}@media (min-width:40rem){.sm\:order-none{order:0}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:ml-auto{margin-left:auto}.sm\:block{display:block}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-\[3\.5rem_minmax\(0\,1fr\)_4\.5rem_3rem\]{grid-template-columns:3.5rem minmax(0,1fr) 4.5rem 3rem}.sm\:flex-row{flex-direction:row}.sm\:items-end{align-items:flex-end}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:block{display:block}.md\:hidden{display:none}.md\:inline{display:inline}.md\:w-4{width:calc(var(--spacing) * 4)}.md\:w-56{width:calc(var(--spacing) * 56)}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:p-3{padding:calc(var(--spacing) * 3)}.md\:p-5{padding:calc(var(--spacing) * 5)}.md\:p-6{padding:calc(var(--spacing) * 6)}.md\:px-3{padding-inline:calc(var(--spacing) * 3)}.md\:px-5{padding-inline:calc(var(--spacing) * 5)}.md\:px-6{padding-inline:calc(var(--spacing) * 6)}}@media (min-width:64rem){.lg\:col-span-full{grid-column:1/-1}.lg\:inline{display:inline}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\,13rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,13rem) minmax(0,1fr)}.lg\:items-start{align-items:flex-start}.lg\:border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.lg\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.lg\:pt-0{padding-top:0}.lg\:pl-6{padding-left:calc(var(--spacing) * 6)}}@media (min-width:80rem){.xl\:col-span-2{grid-column:span 2/span 2}.xl\:col-span-3{grid-column:span 3/span 3}.xl\:col-span-5{grid-column:span 5/span 5}.xl\:col-span-7{grid-column:span 7/span 7}.xl\:col-span-12{grid-column:span 12/span 12}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.xl\:grid-cols-\[minmax\(0\,1fr\)_24rem\]{grid-template-columns:minmax(0,1fr) 24rem}.xl\:grid-cols-\[repeat\(auto-fit\,minmax\(30rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(30rem,1fr))}}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}.\[\&\:\:-webkit-search-cancel-button\]\:hidden::-webkit-search-cancel-button{display:none}.\[\&\:\:-webkit-search-cancel-button\]\:\[-webkit-appearance\:none\]::-webkit-search-cancel-button{-webkit-appearance:none}}:root{color-scheme:light;--background:#f4f5f7;--card:#fff;--card-strong:#f9fafb;--border:#e2e4e9;--foreground:#1a1b1e;--muted-foreground:#5d5f64;--accent:#1c71d8;--accent-foreground:#fff;--selected:#e8f0fb;--component-selected:#1c71d8;--ok:#2a9134;--ok-soft:#2a913421;--warn:#c67b00;--warn-soft:#c67b0024;--crit:#c33c3c;--crit-soft:#c33c3c24;--cpu:#3584e4;--mem:#33a06f;--swap:#d8a23a;--scrollbar:#c7cad0;--focus:oklab(55.8192% -.0413209 -.171246/.6)}.dark{color-scheme:dark;--background:#181a1e;--card:#22252a;--card-strong:#2d3036;--border:#3a3e45;--foreground:#f1f2f4;--muted-foreground:#afb4bd;--accent:#3584e4;--accent-foreground:#fff;--selected:#1e3a5c;--component-selected:#3584e4;--ok:#58cc8b;--ok-soft:#58cc8b26;--warn:#e5b45e;--warn-soft:#e5b45e26;--crit:#e05e5e;--crit-soft:#e05e5e26;--cpu:#4c9bf5;--mem:#58cc8b;--swap:#e5b45e;--scrollbar:#3a3e45;--focus:#4c9bf5}body,html{overscroll-behavior:none}body{background-color:var(--color-background);color:var(--color-foreground);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;font-family:ui-sans-serif,system-ui,Noto Sans,Inter,sans-serif}.tnum{font-variant-numeric:tabular-nums}::selection{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){::selection{background-color:color-mix(in oklab,var(--accent) 28%,transparent)}}::selection{color:var(--foreground)}:focus-visible{outline:2px solid var(--focus);outline-offset:2px}*{scrollbar-width:thin;scrollbar-color:var(--scrollbar) transparent}@media (prefers-reduced-motion:reduce){*,:after,:before{transition-duration:.01ms!important;animation-duration:.01ms!important}}@property --tw-border-spacing-x{syntax:"<length>";inherits:false;initial-value:0}@property --tw-border-spacing-y{syntax:"<length>";inherits:false;initial-value:0}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(1turn)}}@keyframes pulse{50%{opacity:.5}}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # Release notes
2
2
 
3
+ ## 0.1.5
4
+
5
+ - Refresh the dark console palette and replace the sidebar machine selector with
6
+ visible machine rows. Show collector status dots and CPU models, align machine
7
+ names with navigation labels, and preserve the selected view when switching
8
+ machines. Alerts, Connections and administrator-only Administration remain
9
+ below the machine views; narrow screens retain initials and status indicators.
10
+ - Add a responsive showcase website with an installation command and copy button,
11
+ documentation and contact links, and an interactive synthetic demo. The demo
12
+ renders the actual Fleet, Overview, History and Processes components and product
13
+ stylesheet through isolated routing and data adapters, without accessing a hub.
14
+ - Validate synthetic fixtures against product contracts and check the website
15
+ build and types in the manual CI workflow to catch drift from the product UI.
16
+
17
+ ## 0.1.4
18
+
19
+ - Coordinate stopping running user services and owned foreground processes for
20
+ installation, configuration, enrollment and password recovery. Prompt before
21
+ stopping; `--yes` approves without prompting and `--no-restart` leaves the
22
+ installation stopped. Successful changes resume previously running components.
23
+ - **Uninstall now deletes saved data by default**, including accounts, history,
24
+ collector credentials, pending samples and backups. Use `uninstall --keep-data`
25
+ to retain data for reinstalling. `--purge` remains an explicit alias for default
26
+ deletion. Uninstall never restarts processes.
27
+ - Add terminal colors for help, status, warnings and completed actions. Piped
28
+ output and JSON remain plain; `NO_COLOR` disables terminal colors.
29
+ - Avoid extra History GPU cards created by empty historical PCI placeholder
30
+ series. Preserve historical cards that contain readings. Use the system PCI
31
+ name database when available, simplify fallback names and keep PCI addresses
32
+ separate. Normalize NVIDIA PCI domain widths without merging distinct domains.
33
+ - Clarify unavailable GPU counters, including Intel integrated adapters, and
34
+ avoid a last-known badge when no GPU reading is displayed.
35
+ - Update installation and operations documentation and add lifecycle, uninstall,
36
+ terminal output and GPU regression coverage.
37
+
3
38
  ## 0.1.3
4
39
 
5
40
  - Replace the unfinished versioned configuration formats with one canonical
package/DESIGN.md CHANGED
@@ -2,25 +2,25 @@
2
2
  name: Rigscope
3
3
  description: A calm remote monitoring console with clear hierarchy, useful density, and coherent dark/light themes.
4
4
  colors:
5
- background: "#1a1b1e"
6
- card: "#26272b"
7
- card-strong: "#2d2e33"
8
- border: "#3a3b3f"
9
- foreground: "#e4e5e8"
10
- muted-foreground: "#a2a4a9"
5
+ background: "#181a1e"
6
+ card: "#22252a"
7
+ card-strong: "#2d3036"
8
+ border: "#3a3e45"
9
+ foreground: "#f1f2f4"
10
+ muted-foreground: "#afb4bd"
11
11
  accent: "#3584e4"
12
12
  accent-foreground: "#ffffff"
13
13
  selected: "#1e3a5c"
14
- ok: "#3db84a"
15
- ok-soft: "rgba(61, 184, 74, 0.15)"
16
- warn: "#e5a83b"
17
- warn-soft: "rgba(229, 168, 59, 0.15)"
14
+ ok: "#58cc8b"
15
+ ok-soft: "rgba(88, 204, 139, 0.15)"
16
+ warn: "#e5b45e"
17
+ warn-soft: "rgba(229, 180, 94, 0.15)"
18
18
  crit: "#e05e5e"
19
19
  crit-soft: "rgba(224, 94, 94, 0.15)"
20
- cpu: "#3584e4"
21
- mem: "#4ec289"
22
- swap: "#d8a23a"
23
- scrollbar: "#3a3b3f"
20
+ cpu: "#4c9bf5"
21
+ mem: "#58cc8b"
22
+ swap: "#e5b45e"
23
+ scrollbar: "#3a3e45"
24
24
  typography:
25
25
  page-title:
26
26
  fontFamily: "system-ui, ui-sans-serif, 'Noto Sans', 'Inter', sans-serif"
@@ -231,8 +231,17 @@ the toolbar stays visible and table headers remain pinned while rows scroll. Dra
231
231
  divider, or double-click to reset. View mode, per-table sorting and widths persist in the
232
232
  browser; search, expanded applications, pause and machine selection last for the tab session.
233
233
  Machine selection is shared across Fleet, Overview, History and Processes for the tab.
234
- The sidebar keeps Fleet as the parent of a single machine selector and indented
235
- Overview/History/Processes links. Global hub pages follow in a separate group. Header
234
+ The 224px desktop sidebar keeps Fleet above a visible list of authorized machines,
235
+ with names and available tags. Selected machines use a blue surface, outlined row,
236
+ stronger name and check mark. Choosing a machine preserves the active machine view
237
+ and uses the shared tab-scoped selection. The list scrolls within a bounded height
238
+ so Overview/History/Processes and the separated Alerts, Connections and admin-only
239
+ Administration links remain reachable. On the 56px mobile rail, machine initials and
240
+ view icons retain native titles and accessible names; selection remains outlined.
241
+ The logo and live connection footer retain their existing roles. Dark surfaces use
242
+ the charcoal website palette, brighter text, blue CPU, green memory and amber swap;
243
+ light tokens retain their established palette. Warning and critical meanings remain
244
+ separate, and dark keyboard focus uses a solid blue outline. Header
236
245
  breadcrumbs show Fleet / machine / view; page-level tabs and pickers are omitted. Fleet
237
246
  rows show compact CPU/memory trends received since sign-in. Overview combines CPU/GPU
238
247
  and RAM/VRAM into two charts in one fixed ten-minute panel. History owns range and metric
@@ -297,3 +306,5 @@ Rigscope is a self-hosted Linux resource/process monitor for a machine owner or
297
306
  App surfaces use Operate mode: precise data, quiet surfaces, stable live updates and familiar controls. Freshness changes update existing status indicators without inserting banners above data. Interface copy consists of labels, values and actionable errors; omit redundant explanatory paragraphs.
298
307
 
299
308
  The identity is an open rack frame around a rising trace and two sample points. `BrandMark` is the shared, decorative 24-unit SVG in the sidebar and sign-in row; the neighboring Rigscope text/link provides its accessible name. The app icon uses the same geometry with a dark backing and bright blue stroke for light/dark browser chrome. It is legible at 16–32px, with no animation, raster assets or layout changes. Keep this small brand gesture separate from metric semantics.
309
+
310
+ Machine rows use a fixed 16px status column and the same 12px gap and horizontal inset as navigation links, so every desktop label aligns. The status dot is green for fresh live samples, amber for stale or unavailable feeds, red for disconnected collectors, and muted before the first sample; the accessible name includes the status. CPU model appears below the machine name when available, with tags as the fallback. Mobile initials retain a small status dot.
package/README.md CHANGED
@@ -36,6 +36,8 @@ The trial uses separate data and stops with Ctrl+C.
36
36
  | Check services and the dashboard URL | `rigscope status` |
37
37
  | Follow hub logs | `rigscope logs hub --follow` |
38
38
  | Upgrade from npm | `rigscope upgrade` |
39
+ | Delete installation and all saved data | `rigscope uninstall` |
40
+ | Remove installation, preserve saved data | `rigscope uninstall --keep-data` |
39
41
  | Stop or start the installation | `rigscope stop` / `rigscope start` |
40
42
  | Open the dashboard through Tailscale HTTPS | [Set up remote access](docs/installation.md#access-from-another-computer) |
41
43
  | Monitor another machine | [Add a collector](docs/installation.md#add-machines-and-hubs) |