@dudousxd/nestjs-telescope-ui 1.22.1 → 1.23.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # @dudousxd/nestjs-telescope-ui
2
2
 
3
+ ## 1.23.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`80392f0`](https://github.com/DavideCarvalho/nestjs-telescope/commit/80392f0e4d038b50b5c8703275cfd91e3328064b) - Add NestJS 12 to the supported peer range.
8
+
9
+ NestJS 12.0.1 shipped the framework as pure ESM and raised its floor to Node >= 20.19. Telescope's
10
+ packages are already `"type": "module"`, so the ESM shift is a non-event here — nothing needed
11
+ porting, and every watcher, storage provider and dashboard route behaves identically on 11 and 12.
12
+
13
+ The declared peer ranges (`@nestjs/common`/`@nestjs/core` at `>=10.0.0`, `>=11.0.0` for the UI
14
+ package, and the satellite peers `@nestjs/bullmq`, `@nestjs/cache-manager`, `@nestjs/event-emitter`,
15
+ `@nestjs/schedule`) already admitted a 12.x resolution, so no range changed — what changed is that
16
+ the claim is now tested. Every package's dev and test matrix moved to the 12.x line, along with the
17
+ example app and the memory-soak harness, and the whole suite builds, typechecks and passes there.
18
+
19
+ Moving the example app and the soak harness matters for more than tidiness: leaving them on
20
+ `@nestjs/platform-express@11` left a second `@nestjs/platform-express` major in the workspace, and
21
+ pnpm's peer resolution then produced two distinct `@nestjs/core@12` instances. `tsc` correctly
22
+ rejected the resulting `ModuleRef` from one instance where the other was expected. That is a
23
+ workspace resolution artifact rather than a NestJS 12 incompatibility, but it is exactly the shape
24
+ of breakage a consumer sees when they upgrade half a dependency graph.
25
+
26
+ No behaviour change — peer ranges only affect what a package manager warns about on install.
27
+
28
+ ## 1.23.0
29
+
30
+ ### Minor Changes
31
+
32
+ - [#82](https://github.com/DavideCarvalho/nestjs-telescope/pull/82) [`d245d70`](https://github.com/DavideCarvalho/nestjs-telescope/commit/d245d7093fdb748fa398d6dd1c8b24d4110cbfbb) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Let a dashboard section declare `cols: 1` — the full-width row.
33
+
34
+ A section renders as a fixed `grid-cols-N` grid, one panel per cell, with no `colSpan`, and `cols`
35
+ only accepted `2 | 3 | 4`. So the widest panel a dashboard has — a table with ten or more columns —
36
+ could not be given a row of its own. Declared in the narrowest grid available it still got half the
37
+ viewport, scrolled sideways inside its own card, and left the cell beside it empty.
38
+
39
+ That is not hypothetical: `@dudousxd/nestjs-durable-telescope` ships its eleven-column worker table
40
+ as the only panel of a `cols: 2` section, which on a 1418px viewport rendered a 1406px table into a
41
+ 575px card with a hole next to it. There was no way to express the fix.
42
+
43
+ Additive: `cols` gains `1`, existing values behave identically, and the grid needs no new responsive
44
+ class for it — it is already `grid-cols-1` at every breakpoint, so a full-width row is the absence
45
+ of an override rather than the presence of one.
46
+
3
47
  ## 1.22.1
4
48
 
5
49
  ### Patch Changes
@@ -95,10 +95,15 @@ export interface PanelDrilldown {
95
95
  /** Query-parameter name the selection is written to. */
96
96
  param: string;
97
97
  }
98
- /** A group of panels rendered together with its own column count. */
98
+ /**
99
+ * A group of panels rendered together with its own column count.
100
+ *
101
+ * `cols: 1` is the full-width row: one panel spanning the section, for a panel too wide to share
102
+ * one (a table with ten or more columns). Mirrors the core `DashboardSection`.
103
+ */
99
104
  export interface DashboardSection {
100
105
  title?: string;
101
- cols?: 2 | 3 | 4;
106
+ cols?: 1 | 2 | 3 | 4;
102
107
  panels: Panel[];
103
108
  }
104
109
  /**
@@ -280,7 +285,7 @@ export interface TelescopeMeta {
280
285
  panels: Panel[];
281
286
  sections?: {
282
287
  title?: string;
283
- cols?: 2 | 3 | 4;
288
+ cols?: 1 | 2 | 3 | 4;
284
289
  panels: Panel[];
285
290
  }[];
286
291
  }[];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/client/types.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,OAAO,EACP,eA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IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AACD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,UAAU,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACnC,SAAS,EAAE,OAAO,CAAC;CACpB"}
@@ -1 +1 @@
1
- *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.left-0{left:0}.left-1\/2{left:50%}.right-0{right:0}.top-0{top:0}.top-1\/2{top:50%}.top-8{top:2rem}.top-\[12vh\]{top:12vh}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-1\.5{height:.375rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-full{height:100%}.max-h-64{max-height:16rem}.max-h-72{max-height:18rem}.max-h-\[28rem\]{max-height:28rem}.min-h-0{min-height:0px}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-40{width:10rem}.w-48{width:12rem}.w-56{width:14rem}.w-64{width:16rem}.w-\[min\(36rem\,92vw\)\]{width:min(36rem,92vw)}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[10rem\]{min-width:10rem}.min-w-\[640px\]{min-width:640px}.min-w-\[6rem\]{min-width:6rem}.min-w-\[760px\]{min-width:760px}.min-w-\[8rem\]{min-width:8rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.list-disc{list-style-type:disc}.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-\[max-content_1fr\]{grid-template-columns:max-content 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-px{gap:1px}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-line-soft>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:color-mix(in srgb,var(--line-soft) calc(var(--tw-divide-opacity, 1) * 100%),transparent)}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-bad{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--bad) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-brand{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--accent) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-input,.border-line{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--line) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-line-soft{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--line-soft) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-line-soft\/60{border-color:color-mix(in srgb,var(--line-soft) 60%,transparent)}.border-line\/60{border-color:color-mix(in srgb,var(--line) 60%,transparent)}.border-transparent{border-color:transparent}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-background{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--bg) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-bad{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--bad) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-black\/60{background-color:#0009}.bg-brand{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--accent) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-cyan-400{--tw-bg-opacity: 1;background-color:rgb(34 211 238 / var(--tw-bg-opacity, 1))}.bg-emerald-400{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-fuchsia-400{--tw-bg-opacity: 1;background-color:rgb(232 121 249 / var(--tw-bg-opacity, 1))}.bg-good{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--good) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-indigo-400{--tw-bg-opacity: 1;background-color:rgb(129 140 248 / var(--tw-bg-opacity, 1))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.bg-lime-400{--tw-bg-opacity: 1;background-color:rgb(163 230 53 / var(--tw-bg-opacity, 1))}.bg-orange-400{--tw-bg-opacity: 1;background-color:rgb(251 146 60 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-panel{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-panel-2{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel-2) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-panel-2\/60{background-color:color-mix(in srgb,var(--panel-2) 60%,transparent)}.bg-panel-2\/80{background-color:color-mix(in srgb,var(--panel-2) 80%,transparent)}.bg-panel\/20{background-color:color-mix(in srgb,var(--panel) 20%,transparent)}.bg-panel\/40{background-color:color-mix(in srgb,var(--panel) 40%,transparent)}.bg-pink-400{--tw-bg-opacity: 1;background-color:rgb(244 114 182 / var(--tw-bg-opacity, 1))}.bg-pink-500{--tw-bg-opacity: 1;background-color:rgb(236 72 153 / var(--tw-bg-opacity, 1))}.bg-popover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel-2) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-primary{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--accent) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(192 132 252 / var(--tw-bg-opacity, 1))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-rose-400{--tw-bg-opacity: 1;background-color:rgb(251 113 133 / var(--tw-bg-opacity, 1))}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity, 1))}.bg-sky-400{--tw-bg-opacity: 1;background-color:rgb(56 189 248 / var(--tw-bg-opacity, 1))}.bg-sky-500{--tw-bg-opacity: 1;background-color:rgb(14 165 233 / var(--tw-bg-opacity, 1))}.bg-sky-500\/10{background-color:#0ea5e91a}.bg-teal-400{--tw-bg-opacity: 1;background-color:rgb(45 212 191 / var(--tw-bg-opacity, 1))}.bg-teal-500{--tw-bg-opacity: 1;background-color:rgb(20 184 166 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-violet-400{--tw-bg-opacity: 1;background-color:rgb(167 139 250 / var(--tw-bg-opacity, 1))}.bg-violet-500{--tw-bg-opacity: 1;background-color:rgb(139 92 246 / var(--tw-bg-opacity, 1))}.bg-violet-500\/15{background-color:#8b5cf626}.bg-warn{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--warn) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-zinc-400{--tw-bg-opacity: 1;background-color:rgb(161 161 170 / var(--tw-bg-opacity, 1))}.bg-zinc-500{--tw-bg-opacity: 1;background-color:rgb(113 113 122 / var(--tw-bg-opacity, 1))}.bg-zinc-600{--tw-bg-opacity: 1;background-color:rgb(82 82 91 / var(--tw-bg-opacity, 1))}.fill-accent{fill:var(--panel-2)}.fill-amber-400{fill:#fbbf24}.fill-emerald-400{fill:#34d399}.fill-none{fill:none}.fill-pink-400{fill:#f472b6}.fill-red-400{fill:#f87171}.fill-sky-400{fill:#38bdf8}.fill-violet-400{fill:#a78bfa}.fill-zinc-500{fill:#71717a}.stroke-accent{stroke:var(--panel-2)}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-1\.5{padding-left:.375rem}.pr-2{padding-right:.5rem}.pt-1{padding-top:.25rem}.pt-3{padding-top:.75rem}.pt-\[40\%\]{padding-top:40%}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.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)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-normal{letter-spacing:0em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-bad{--tw-text-opacity: 1;color:color-mix(in srgb,var(--bad) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-black\/80{color:#000c}.text-brand{--tw-text-opacity: 1;color:color-mix(in srgb,var(--accent) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--text) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-fuchsia-300{--tw-text-opacity: 1;color:rgb(240 171 252 / var(--tw-text-opacity, 1))}.text-fuchsia-400{--tw-text-opacity: 1;color:rgb(232 121 249 / var(--tw-text-opacity, 1))}.text-good{--tw-text-opacity: 1;color:color-mix(in srgb,var(--good) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-indigo-300{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.text-indigo-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-inherit{color:inherit}.text-lime-400{--tw-text-opacity: 1;color:rgb(163 230 53 / var(--tw-text-opacity, 1))}.text-muted-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--muted) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-popover-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--text) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-primary-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--bg) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-sky-300{--tw-text-opacity: 1;color:rgb(125 211 252 / var(--tw-text-opacity, 1))}.text-sky-400{--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity, 1))}.text-teal-300{--tw-text-opacity: 1;color:rgb(94 234 212 / var(--tw-text-opacity, 1))}.text-violet-300{--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.text-violet-400{--tw-text-opacity: 1;color:rgb(167 139 250 / var(--tw-text-opacity, 1))}.text-warn{--tw-text-opacity: 1;color:color-mix(in srgb,var(--warn) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.opacity-10{opacity:.1}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-line{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--line) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.blur{--tw-blur: blur(8px);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)}.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)}.backdrop-blur-\[2px\]{--tw-backdrop-blur: blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{--bg: #09090b;--panel: #0c0c0f;--panel-2: #101017;--line: #1c1c22;--line-soft: #16161a;--text: #e7e7ea;--muted: #76767f;--good: #34d399;--warn: #fbbf24;--bad: #f87171;--live: #60a5fa;--accent: #e879f9;color-scheme:dark}.light{--bg: #ffffff;--panel: #fafafa;--panel-2: #f4f4f5;--line: #e4e4e7;--line-soft: #efeff1;--text: #18181b;--muted: #71717a;--good: #047857;--warn: #b45309;--bad: #dc2626;--live: #1d4ed8;--accent: #a21caf;color-scheme:light}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}.tnum{font-variant-numeric:tabular-nums}.tint-brand{background-color:color-mix(in srgb,var(--accent) 12%,transparent);border-color:color-mix(in srgb,var(--accent) 40%,transparent);color:var(--accent)}.tint-good{background-color:color-mix(in srgb,var(--good) 12%,transparent);border-color:color-mix(in srgb,var(--good) 40%,transparent);color:var(--good)}.tint-warn{background-color:color-mix(in srgb,var(--warn) 12%,transparent);border-color:color-mix(in srgb,var(--warn) 40%,transparent);color:var(--warn)}.tint-bad{background-color:color-mix(in srgb,var(--bad) 12%,transparent);border-color:color-mix(in srgb,var(--bad) 40%,transparent);color:var(--bad)}.tint-muted{background-color:var(--panel-2);border-color:var(--line);color:var(--muted)}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:var(--line);border:3px solid var(--bg);border-radius:999px}.light .bg-zinc-950{background-color:var(--bg)}.light .bg-zinc-900{background-color:var(--panel)}.light .bg-zinc-800{background-color:var(--panel-2)}.light .text-zinc-100,.light .text-zinc-200,.light .text-zinc-300{color:var(--text)}.light .text-zinc-400,.light .text-zinc-500,.light .text-zinc-600{color:var(--muted)}.light .border-zinc-800,.light .border-zinc-700,.light .border-zinc-900{border-color:var(--line)}.placeholder\:text-muted-foreground::-moz-placeholder{--tw-text-opacity: 1;color:color-mix(in srgb,var(--muted) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.placeholder\:text-muted-foreground::placeholder{--tw-text-opacity: 1;color:color-mix(in srgb,var(--muted) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.first\:border-0:first-child{border-width:0px}.first\:pt-0:first-child{padding-top:0}.last\:border-0:last-child{border-width:0px}.hover\:border-brand:hover{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--accent) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.hover\:border-line:hover{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--line) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.hover\:bg-panel:hover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.hover\:bg-panel-2:hover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel-2) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.hover\:bg-panel\/40:hover{background-color:color-mix(in srgb,var(--panel) 40%,transparent)}.hover\:bg-panel\/70:hover{background-color:color-mix(in srgb,var(--panel) 70%,transparent)}.hover\:text-brand:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--accent) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\:text-foreground:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--text) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.hover\:brightness-110:hover{--tw-brightness: brightness(1.1);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)}.hover\:brightness-125:hover{--tw-brightness: brightness(1.25);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)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--accent) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:cursor-not-allowed[data-disabled]{cursor:not-allowed}.data-\[active\]\:bg-panel-2[data-active]{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel-2) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.data-\[highlighted\]\:bg-panel[data-highlighted]{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.data-\[active\]\:text-foreground[data-active]{--tw-text-opacity: 1;color:color-mix(in srgb,var(--text) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.data-\[selected\]\:text-brand[data-selected]{--tw-text-opacity: 1;color:color-mix(in srgb,var(--accent) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}@media (min-width: 640px){.sm\:col-span-4{grid-column:span 4 / span 4}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width: 768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-\[280px_minmax\(0\,1fr\)\]{grid-template-columns:280px minmax(0,1fr)}}.\[\&_\.recharts-brush-texts_text\]\:fill-muted-foreground .recharts-brush-texts text{fill:var(--muted)}.\[\&_\.recharts-cartesian-axis-line\]\:stroke-line .recharts-cartesian-axis-line,.\[\&_\.recharts-cartesian-axis-tick-line\]\:stroke-line .recharts-cartesian-axis-tick-line{stroke:var(--line)}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:var(--muted)}.\[\&_\.recharts-cartesian-grid_line\]\:stroke-line .recharts-cartesian-grid line{stroke:var(--line)}.\[\&_\.recharts-layer\]\:outline-none .recharts-layer{outline:2px solid transparent;outline-offset:2px}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-panel-2 .recharts-radial-bar-background-sector{fill:var(--panel-2)}.\[\&_\.recharts-reference-line_line\]\:stroke-line .recharts-reference-line line{stroke:var(--line)}.\[\&_\.recharts-sector\]\:outline-none .recharts-sector,.\[\&_\.recharts-surface\]\:outline-none .recharts-surface{outline:2px solid transparent;outline-offset:2px}
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.left-0{left:0}.left-1\/2{left:50%}.right-0{right:0}.top-0{top:0}.top-1\/2{top:50%}.top-8{top:2rem}.top-\[12vh\]{top:12vh}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-1\.5{height:.375rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-full{height:100%}.max-h-64{max-height:16rem}.max-h-72{max-height:18rem}.max-h-\[28rem\]{max-height:28rem}.min-h-0{min-height:0px}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-40{width:10rem}.w-48{width:12rem}.w-56{width:14rem}.w-64{width:16rem}.w-\[min\(36rem\,92vw\)\]{width:min(36rem,92vw)}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[10rem\]{min-width:10rem}.min-w-\[640px\]{min-width:640px}.min-w-\[6rem\]{min-width:6rem}.min-w-\[760px\]{min-width:760px}.min-w-\[8rem\]{min-width:8rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.list-disc{list-style-type:disc}.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-\[max-content_1fr\]{grid-template-columns:max-content 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-px{gap:1px}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-line-soft>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:color-mix(in srgb,var(--line-soft) calc(var(--tw-divide-opacity, 1) * 100%),transparent)}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-bad{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--bad) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-brand{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--accent) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-input,.border-line{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--line) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-line-soft{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--line-soft) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-line-soft\/60{border-color:color-mix(in srgb,var(--line-soft) 60%,transparent)}.border-line\/60{border-color:color-mix(in srgb,var(--line) 60%,transparent)}.border-transparent{border-color:transparent}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-background{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--bg) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-bad{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--bad) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-black\/60{background-color:#0009}.bg-brand{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--accent) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-cyan-400{--tw-bg-opacity: 1;background-color:rgb(34 211 238 / var(--tw-bg-opacity, 1))}.bg-emerald-400{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-fuchsia-400{--tw-bg-opacity: 1;background-color:rgb(232 121 249 / var(--tw-bg-opacity, 1))}.bg-good{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--good) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-indigo-400{--tw-bg-opacity: 1;background-color:rgb(129 140 248 / var(--tw-bg-opacity, 1))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.bg-lime-400{--tw-bg-opacity: 1;background-color:rgb(163 230 53 / var(--tw-bg-opacity, 1))}.bg-orange-400{--tw-bg-opacity: 1;background-color:rgb(251 146 60 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-panel{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-panel-2{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel-2) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-panel-2\/60{background-color:color-mix(in srgb,var(--panel-2) 60%,transparent)}.bg-panel-2\/80{background-color:color-mix(in srgb,var(--panel-2) 80%,transparent)}.bg-panel\/20{background-color:color-mix(in srgb,var(--panel) 20%,transparent)}.bg-panel\/40{background-color:color-mix(in srgb,var(--panel) 40%,transparent)}.bg-pink-400{--tw-bg-opacity: 1;background-color:rgb(244 114 182 / var(--tw-bg-opacity, 1))}.bg-pink-500{--tw-bg-opacity: 1;background-color:rgb(236 72 153 / var(--tw-bg-opacity, 1))}.bg-popover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel-2) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-primary{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--accent) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(192 132 252 / var(--tw-bg-opacity, 1))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-rose-400{--tw-bg-opacity: 1;background-color:rgb(251 113 133 / var(--tw-bg-opacity, 1))}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity, 1))}.bg-sky-400{--tw-bg-opacity: 1;background-color:rgb(56 189 248 / var(--tw-bg-opacity, 1))}.bg-sky-500{--tw-bg-opacity: 1;background-color:rgb(14 165 233 / var(--tw-bg-opacity, 1))}.bg-sky-500\/10{background-color:#0ea5e91a}.bg-teal-400{--tw-bg-opacity: 1;background-color:rgb(45 212 191 / var(--tw-bg-opacity, 1))}.bg-teal-500{--tw-bg-opacity: 1;background-color:rgb(20 184 166 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-violet-400{--tw-bg-opacity: 1;background-color:rgb(167 139 250 / var(--tw-bg-opacity, 1))}.bg-violet-500{--tw-bg-opacity: 1;background-color:rgb(139 92 246 / var(--tw-bg-opacity, 1))}.bg-violet-500\/15{background-color:#8b5cf626}.bg-warn{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--warn) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-zinc-400{--tw-bg-opacity: 1;background-color:rgb(161 161 170 / var(--tw-bg-opacity, 1))}.bg-zinc-500{--tw-bg-opacity: 1;background-color:rgb(113 113 122 / var(--tw-bg-opacity, 1))}.bg-zinc-600{--tw-bg-opacity: 1;background-color:rgb(82 82 91 / var(--tw-bg-opacity, 1))}.fill-accent{fill:var(--panel-2)}.fill-amber-400{fill:#fbbf24}.fill-emerald-400{fill:#34d399}.fill-none{fill:none}.fill-pink-400{fill:#f472b6}.fill-red-400{fill:#f87171}.fill-sky-400{fill:#38bdf8}.fill-violet-400{fill:#a78bfa}.fill-zinc-500{fill:#71717a}.stroke-accent{stroke:var(--panel-2)}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pl-1\.5{padding-left:.375rem}.pr-2{padding-right:.5rem}.pt-1{padding-top:.25rem}.pt-3{padding-top:.75rem}.pt-\[40\%\]{padding-top:40%}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.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)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-normal{letter-spacing:0em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-bad{--tw-text-opacity: 1;color:color-mix(in srgb,var(--bad) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-black\/80{color:#000c}.text-brand{--tw-text-opacity: 1;color:color-mix(in srgb,var(--accent) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--text) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-fuchsia-300{--tw-text-opacity: 1;color:rgb(240 171 252 / var(--tw-text-opacity, 1))}.text-fuchsia-400{--tw-text-opacity: 1;color:rgb(232 121 249 / var(--tw-text-opacity, 1))}.text-good{--tw-text-opacity: 1;color:color-mix(in srgb,var(--good) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-indigo-300{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.text-indigo-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-inherit{color:inherit}.text-lime-400{--tw-text-opacity: 1;color:rgb(163 230 53 / var(--tw-text-opacity, 1))}.text-muted-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--muted) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-popover-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--text) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-primary-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--bg) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-sky-300{--tw-text-opacity: 1;color:rgb(125 211 252 / var(--tw-text-opacity, 1))}.text-sky-400{--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity, 1))}.text-teal-300{--tw-text-opacity: 1;color:rgb(94 234 212 / var(--tw-text-opacity, 1))}.text-violet-300{--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.text-violet-400{--tw-text-opacity: 1;color:rgb(167 139 250 / var(--tw-text-opacity, 1))}.text-warn{--tw-text-opacity: 1;color:color-mix(in srgb,var(--warn) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.opacity-10{opacity:.1}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-line{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--line) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.blur{--tw-blur: blur(8px);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)}.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)}.backdrop-blur-\[2px\]{--tw-backdrop-blur: blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{--bg: #09090b;--panel: #0c0c0f;--panel-2: #101017;--line: #1c1c22;--line-soft: #16161a;--text: #e7e7ea;--muted: #76767f;--good: #34d399;--warn: #fbbf24;--bad: #f87171;--live: #60a5fa;--accent: #e879f9;color-scheme:dark}.light{--bg: #ffffff;--panel: #fafafa;--panel-2: #f4f4f5;--line: #e4e4e7;--line-soft: #efeff1;--text: #18181b;--muted: #71717a;--good: #047857;--warn: #b45309;--bad: #dc2626;--live: #1d4ed8;--accent: #a21caf;color-scheme:light}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}.tnum{font-variant-numeric:tabular-nums}.tint-brand{background-color:color-mix(in srgb,var(--accent) 12%,transparent);border-color:color-mix(in srgb,var(--accent) 40%,transparent);color:var(--accent)}.tint-good{background-color:color-mix(in srgb,var(--good) 12%,transparent);border-color:color-mix(in srgb,var(--good) 40%,transparent);color:var(--good)}.tint-warn{background-color:color-mix(in srgb,var(--warn) 12%,transparent);border-color:color-mix(in srgb,var(--warn) 40%,transparent);color:var(--warn)}.tint-bad{background-color:color-mix(in srgb,var(--bad) 12%,transparent);border-color:color-mix(in srgb,var(--bad) 40%,transparent);color:var(--bad)}.tint-muted{background-color:var(--panel-2);border-color:var(--line);color:var(--muted)}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:var(--line);border:3px solid var(--bg);border-radius:999px}.light .bg-zinc-950{background-color:var(--bg)}.light .bg-zinc-900{background-color:var(--panel)}.light .bg-zinc-800{background-color:var(--panel-2)}.light .text-zinc-100,.light .text-zinc-200,.light .text-zinc-300{color:var(--text)}.light .text-zinc-400,.light .text-zinc-500,.light .text-zinc-600{color:var(--muted)}.light .border-zinc-800,.light .border-zinc-700,.light .border-zinc-900{border-color:var(--line)}.placeholder\:text-muted-foreground::-moz-placeholder{--tw-text-opacity: 1;color:color-mix(in srgb,var(--muted) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.placeholder\:text-muted-foreground::placeholder{--tw-text-opacity: 1;color:color-mix(in srgb,var(--muted) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.first\:border-0:first-child{border-width:0px}.first\:pt-0:first-child{padding-top:0}.last\:border-0:last-child{border-width:0px}.hover\:border-brand:hover{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--accent) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.hover\:border-line:hover{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--line) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.hover\:bg-panel:hover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.hover\:bg-panel-2:hover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel-2) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.hover\:bg-panel\/40:hover{background-color:color-mix(in srgb,var(--panel) 40%,transparent)}.hover\:bg-panel\/70:hover{background-color:color-mix(in srgb,var(--panel) 70%,transparent)}.hover\:text-brand:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--accent) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\:text-foreground:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--text) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.hover\:brightness-110:hover{--tw-brightness: brightness(1.1);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)}.hover\:brightness-125:hover{--tw-brightness: brightness(1.25);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)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: color-mix(in srgb, var(--accent) calc(var(--tw-ring-opacity, 1) * 100%), transparent)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:cursor-not-allowed[data-disabled]{cursor:not-allowed}.data-\[active\]\:bg-panel-2[data-active]{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel-2) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.data-\[highlighted\]\:bg-panel[data-highlighted]{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.data-\[active\]\:text-foreground[data-active]{--tw-text-opacity: 1;color:color-mix(in srgb,var(--text) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.data-\[selected\]\:text-brand[data-selected]{--tw-text-opacity: 1;color:color-mix(in srgb,var(--accent) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}@media (min-width: 640px){.sm\:col-span-4{grid-column:span 4 / span 4}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width: 768px){.md\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-\[280px_minmax\(0\,1fr\)\]{grid-template-columns:280px minmax(0,1fr)}}.\[\&_\.recharts-brush-texts_text\]\:fill-muted-foreground .recharts-brush-texts text{fill:var(--muted)}.\[\&_\.recharts-cartesian-axis-line\]\:stroke-line .recharts-cartesian-axis-line,.\[\&_\.recharts-cartesian-axis-tick-line\]\:stroke-line .recharts-cartesian-axis-tick-line{stroke:var(--line)}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:var(--muted)}.\[\&_\.recharts-cartesian-grid_line\]\:stroke-line .recharts-cartesian-grid line{stroke:var(--line)}.\[\&_\.recharts-layer\]\:outline-none .recharts-layer{outline:2px solid transparent;outline-offset:2px}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-panel-2 .recharts-radial-bar-background-sector{fill:var(--panel-2)}.\[\&_\.recharts-reference-line_line\]\:stroke-line .recharts-reference-line line{stroke:var(--line)}.\[\&_\.recharts-sector\]\:outline-none .recharts-sector,.\[\&_\.recharts-surface\]\:outline-none .recharts-surface{outline:2px solid transparent;outline-offset:2px}
@@ -170,4 +170,4 @@ total ${cd(c.node.totalMs)} (${y}%) · self ${cd(c.node.selfMs)}`,className:"abs
170
170
  `)}),n=[])}function s(){r.length!==0&&(t.push({id:o(),kind:"bullets",items:r}),r=[])}for(const l of e.split(`
171
171
  `)){const u=l.trimEnd();/^#{1,6}\s+/.test(u)?(a(),s(),t.push({id:o(),kind:"heading",text:u.replace(/^#{1,6}\s+/,"")})):/^[-*]\s+/.test(u)?(a(),r.push({id:o(),text:u.replace(/^[-*]\s+/,"")})):u.trim()===""?(a(),s()):(s(),n.push(u))}return a(),s(),t}function u_({source:e}){const t=Sbe(e);return d.jsx("div",{className:"rounded bg-panel p-3",children:t.map(n=>n.kind==="heading"?d.jsx("h4",{className:"mt-3 mb-1 text-xs font-semibold text-brand",children:n.text},n.id):n.kind==="bullets"?d.jsx("ul",{className:"ml-4 list-disc text-xs leading-relaxed text-foreground",children:n.items.map(r=>d.jsx("li",{children:r.text},r.id))},n.id):d.jsx("p",{className:"whitespace-pre-wrap text-xs leading-relaxed text-foreground",children:n.text},n.id))})}const Obe=["id","type","createdAt","durationMs","tags","familyHash","traceId","content"];function c_(e){return/[",\r\n]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}function Pbe(e){if(e==null)return"";try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function jbe(e){return[e.id,e.type,e.createdAt,e.durationMs===null?"":String(e.durationMs),e.tags.join("; "),e.familyHash??"",e.traceId??"",Pbe(e.content)]}function Ebe(e){const t=[Obe.map(c_).join(",")];for(const n of e)t.push(jbe(n).map(c_).join(","));return t.join(`\r
172
172
  `)}function Abe(e,t){const n=new Blob([t],{type:"text/csv"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=e,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}const Ew=1e3,Aw=60*Ew,Cw=60*Aw,f_=24*Cw;function nf(e){return e>=f_?`${Math.round(e/f_)}d`:e>=Cw?`${Math.round(e/Cw)}h`:e>=Aw?`${Math.round(e/Aw)}m`:e>=Ew?`${Math.round(e/Ew)}s`:`${e}ms`}function Cbe(e){for(const[t,n]of Object.entries(e))if(n<1)return`${t} sampled @ ${Math.round(n*100)}%`;return null}function Tbe(){const{data:e}=ks();if(!e)return null;const t=Cbe(e.sampling??{});return d.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",title:t??void 0,children:[d.jsx("span",{className:"uppercase tracking-wide text-muted-foreground",children:"retention:"}),e.retention?d.jsx("span",{className:"text-muted-foreground",children:nf(e.retention.afterMs)}):d.jsx("span",{className:"text-muted-foreground",children:"none"}),t?d.jsx("span",{"aria-label":t,className:"cursor-help rounded-full border border-line px-1 text-[9px] text-muted-foreground",children:"?"}):null]})}const GL={request:"#34d399",query:"#38bdf8",job:"#a78bfa",exception:"#f87171",http_client:"#fbbf24",mail:"#f472b6"},d_=["#71717a","#a1a1aa","#22d3ee","#c084fc","#fb923c","#4ade80"],p_=["#34d399","#fbbf24","#f87171","#38bdf8","#a78bfa"],XL="var(--accent)";function _be(e,t=0){const n=d_[t%d_.length];return GL[e]??n??"#71717a"}function lx(e,t,n){if(n)return n;const r=p_[t%p_.length];return GL[e]??r??"#71717a"}function nc(e,t,n){const r={};return e.forEach((i,o)=>{r[i]={label:(n==null?void 0:n(i))??i,color:t(i,o)}}),r}function Ud(e){return{label:e.label,...e.series!==void 0?{series:e.series}:{},...e.id!==void 0?{id:e.id}:{},...e.value!==void 0?{value:e.value}:{}}}function kbe(e){return typeof e=="object"&&e!==null}function YL(e){if(!kbe(e))return;const t=e.activeLabel;return typeof t=="string"&&t.length>0?t:typeof t=="number"?String(t):void 0}function na({title:e,right:t,height:n=220,children:r}){return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsxs("header",{className:"mb-3 flex items-center justify-between",children:[d.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),t]}),d.jsx("div",{style:{height:n},children:r})]})}function Vd({height:e}){return d.jsx("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",style:e===void 0?void 0:{height:e},children:"No data in window."})}const Rbe=24;function Ds({title:e,data:t,right:n,color:r=XL,valueLabel:i="value",height:o=220,brush:a,valueFormatter:s,onSelect:l}){const u=O.useId(),f=o-64,c=O.useMemo(()=>nc(["value"],()=>r,()=>i),[r,i]),p=a??t.length>=Rbe,h=l?{onClick:v=>{const y=YL(v);if(y===void 0)return;const x=t.find(m=>m.label===y);l(Ud({label:y,series:"value",value:x==null?void 0:x.value}))},className:"cursor-pointer"}:{};return d.jsx(na,{title:e,right:n,height:f,children:t.length===0?d.jsx(Vd,{height:f}):d.jsx(Ss,{config:c,children:d.jsxs(B2,{data:t,margin:{top:4,right:8,bottom:0,left:-16},...h,children:[d.jsx("defs",{children:d.jsxs("linearGradient",{id:u,x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"0%",stopColor:Ui("value"),stopOpacity:.35}),d.jsx("stop",{offset:"100%",stopColor:Ui("value"),stopOpacity:0})]})}),d.jsx(_d,{vertical:!1}),d.jsx(Zi,{dataKey:"label",tickLine:!1,minTickGap:24}),d.jsx(eo,{tickLine:!1,width:40,allowDecimals:!1}),d.jsx(xu,{cursor:{stroke:"var(--line)"},content:d.jsx(bu,{...s?{valueFormatter:v=>s(v)}:{}})}),d.jsx(po,{type:"monotone",dataKey:"value",name:i,stroke:Ui("value"),strokeWidth:2,fill:`url(#${u})`,isAnimationActive:!1,dot:!1,activeDot:{r:3}}),p&&d.jsx(oa,{...V2,dataKey:"label"})]})})})}const Nbe=24;function jO({title:e,data:t,series:n,right:r,height:i=240,brush:o,onSelect:a}){const s=i-64,l=O.useMemo(()=>nc(n,_be),[n]),{hidden:u,toggle:f,isHidden:c}=Kpe(),p=o??t.length>=Nbe,h=a?{onClick:v=>{const y=YL(v);y!==void 0&&a(Ud({label:y}))},className:"cursor-pointer"}:{};return d.jsx(na,{title:e,right:r,height:s,children:t.length===0||n.length===0?d.jsx(Vd,{height:s}):d.jsx(Ss,{config:l,children:d.jsxs(B2,{data:t,margin:{top:4,right:8,bottom:0,left:-16},...h,children:[d.jsx(_d,{vertical:!1}),d.jsx(Zi,{dataKey:"label",tickLine:!1,minTickGap:24}),d.jsx(eo,{tickLine:!1,width:40,allowDecimals:!1}),d.jsx(xu,{cursor:{stroke:"var(--line)"},content:d.jsx(bu,{})}),d.jsx(ew,{content:d.jsx(nw,{hidden:u,onToggle:f})}),n.map(v=>d.jsx(po,{type:"monotone",dataKey:v,name:v,stackId:"1",stroke:Ui(v),strokeWidth:1.5,fill:Ui(v),fillOpacity:.25,hide:c(v),isAnimationActive:!1},v)),p&&d.jsx(oa,{...V2,dataKey:"label"})]})})})}function Mbe(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}function us({title:e,data:t,right:n,color:r=XL,valueLabel:i="value",height:o=220,horizontal:a=!1,truncateLabel:s,valueFormatter:l,onSelect:u,onBarClick:f}){const c=o-64,p=O.useMemo(()=>nc(["value"],()=>r,()=>i),[r,i]);function h(m,g){const b=t[g];b&&(f==null||f(b),u==null||u(Ud({label:b.label,id:b.id,value:b.value})))}const v=s!==void 0?{tickFormatter:m=>Mbe(m,s)}:{},x=u!==void 0||f!==void 0?{onClick:h,cursor:"pointer"}:{};return d.jsx(na,{title:e,right:n,height:c,children:t.length===0?d.jsx(Vd,{height:c}):d.jsx(Ss,{config:p,children:d.jsxs(YS,{data:t,layout:a?"vertical":"horizontal",margin:{top:4,right:8,bottom:0,left:a?8:-16},children:[d.jsx(_d,{horizontal:!a,vertical:a}),a?d.jsx(Zi,{type:"number",tickLine:!1,allowDecimals:!1}):d.jsx(Zi,{dataKey:"label",tickLine:!1,interval:0,...v}),a?d.jsx(eo,{type:"category",dataKey:"label",tickLine:!1,width:160,interval:0,...v}):d.jsx(eo,{tickLine:!1,width:40,allowDecimals:!1}),d.jsx(xu,{cursor:{fill:"color-mix(in srgb, var(--text) 5%, transparent)"},content:d.jsx(bu,{...l?{valueFormatter:m=>l(m)}:{}})}),d.jsx(fo,{dataKey:"value",name:i,fill:Ui("value"),radius:a?[0,3,3,0]:[3,3,0,0],isAnimationActive:!1,...x,children:t.map(m=>d.jsx(Wu,{fill:m.color??Ui("value")},m.id??m.label))})]})})})}const QL=["waiting","active","delayed","failed","completed","paused"],JL={waiting:"text-foreground",active:"text-brand",delayed:"text-warn",failed:"text-bad",completed:"text-good",paused:"text-muted-foreground"};function Ls(e){if(e==null)return"—";const t=Date.now()-e;if(t<0)return"just now";const n=Math.floor(t/1e3);if(n<60)return`${n}s ago`;const r=Math.floor(n/60);if(r<60)return`${r}m ago`;const i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}const $be="1h";function Ibe(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function Hd(e){return((e==null?void 0:e.buckets)??[]).map(t=>({label:Ibe(t.t),value:t.total}))}function jn({label:e,value:t,accent:n="text-foreground"}){return d.jsxs("div",{className:"rounded-lg border border-line bg-panel/40 px-4 py-3",children:[d.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:e}),d.jsx("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${n}`,children:t})]})}function Wd({children:e}){return d.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:e})}function EO({children:e}){return d.jsx("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:e})}function Dbe(e){return e.map(t=>({label:t.label!==""?t.label:t.familyHash.slice(0,12),value:t.p99,id:t.familyHash}))}function Lbe(e){return[{label:"2xx",value:e["2xx"],color:"var(--good)"},{label:"3xx",value:e["3xx"],color:"#38bdf8"},{label:"4xx",value:e["4xx"],color:"var(--warn)"},{label:"5xx",value:e["5xx"],color:"var(--bad)"},{label:"other",value:e.other,color:"var(--muted)"}]}function Fbe(e){return e.topKeys.map(t=>({label:t.key,value:t.count}))}function Bbe({stats:e}){const t=e.latency,n=xi();return d.jsxs(d.Fragment,{children:[d.jsxs(Wd,{children:[d.jsx(jn,{label:"Total",value:e.total.toLocaleString()}),d.jsx(jn,{label:"p50 ms",value:t?t.p50.toLocaleString():"—"}),d.jsx(jn,{label:"p99 ms",value:t?t.p99.toLocaleString():"—",accent:"text-sky-400"}),d.jsx(jn,{label:"Slow",value:t?t.slow.toLocaleString():"—",accent:t&&t.slow>0?"text-warn":"text-foreground"})]}),d.jsxs(EO,{children:[e.families?d.jsx(us,{title:"Slowest query shapes (p99)",valueLabel:"p99 ms",data:Dbe(e.families),horizontal:!0,truncateLabel:40,onBarClick:r=>{r.id!==void 0&&n(`/entries/query?familyHash=${encodeURIComponent(r.id)}`)}}):null,d.jsx(Ds,{title:"Queries over time",valueLabel:"queries",data:Hd(e.overTime)})]})]})}function zbe(e){return Object.entries(e).map(([t,n])=>({label:t,value:n.hits})).sort((t,n)=>t.label.localeCompare(n.label))}function Ube({stats:e}){const t=e.cache,n=(t==null?void 0:t.byTier)??{},r=Object.keys(n),i=(t==null?void 0:t.staleHits)??0,o=(t==null?void 0:t.deletes)??0;return d.jsxs(d.Fragment,{children:[d.jsxs(Wd,{children:[d.jsx(jn,{label:"Hit ratio",value:t?`${Math.round(t.hitRatio*100)}%`:"—",accent:"text-brand"}),d.jsx(jn,{label:"Hits",value:t?t.hits.toLocaleString():"—"}),d.jsx(jn,{label:"Misses",value:t?t.misses.toLocaleString():"—"}),d.jsx(jn,{label:"Sets",value:t?t.sets.toLocaleString():"—"}),o>0?d.jsx(jn,{label:"Deletes",value:o.toLocaleString()}):null,i>0?d.jsx(jn,{label:"Stale hits",value:i.toLocaleString(),accent:"text-warn"}):null]}),d.jsxs(EO,{children:[t?d.jsx(us,{title:"Hits vs misses",valueLabel:"count",data:[{label:"hits",value:t.hits,color:"var(--good)"},{label:"misses",value:t.misses,color:"var(--bad)"}]}):null,r.length>0?d.jsx(us,{title:"Hits by tier",valueLabel:"hits",data:zbe(n)}):null,d.jsx(Ds,{title:"Cache over time",valueLabel:"ops",data:Hd(e.overTime)})]}),t?d.jsx(us,{title:"Top keys",valueLabel:"count",data:Fbe(t)}):null]})}function Vbe({stats:e}){const t=e.latency,n=e.status,r=n?n["4xx"]+n["5xx"]:0,i=e.total>0?Math.round(r/e.total*100):0;return d.jsxs(d.Fragment,{children:[d.jsxs(Wd,{children:[d.jsx(jn,{label:"Total",value:e.total.toLocaleString()}),d.jsx(jn,{label:"p99 ms",value:t?t.p99.toLocaleString():"—",accent:"text-sky-400"}),d.jsx(jn,{label:"Error %",value:`${i}%`,accent:r>0?"text-bad":"text-foreground"})]}),d.jsxs(EO,{children:[n?d.jsx(us,{title:"Status codes",valueLabel:"count",data:Lbe(n)}):null,d.jsx(Ds,{title:"Throughput",valueLabel:"requests",data:Hd(e.overTime)})]})]})}function Hbe({values:e}){if(e.length===0)return null;const t=Math.max(1,...e);return d.jsx("div",{className:"flex h-6 items-end gap-px","aria-hidden":"true",children:e.map((n,r)=>d.jsx("div",{className:"w-1 rounded-sm bg-warn",style:{height:`${Math.max(2,Math.round(n/t*100))}%`}},r))})}function Wbe({group:e}){const t=new Date(e.lastAt).getTime();return d.jsxs(TN,{to:`/entries/exception?familyHash=${encodeURIComponent(e.key)}`,className:"flex items-center gap-3 rounded-lg border border-line bg-panel/40 px-4 py-3 transition hover:border-line hover:bg-panel/70",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("p",{className:"truncate font-mono text-sm font-semibold text-bad",children:e.class}),d.jsx("p",{className:"truncate text-xs text-muted-foreground",children:e.message})]}),d.jsx(Hbe,{values:e.overTime}),d.jsxs("div",{className:"shrink-0 text-right",children:[d.jsx("p",{className:"text-sm font-semibold tabular-nums text-foreground",children:e.count.toLocaleString()}),d.jsx("p",{className:"text-[10px] text-muted-foreground",children:Ls(Number.isNaN(t)?null:t)})]})]})}function Kbe({stats:e}){const t=e.exceptions??[];return d.jsxs(d.Fragment,{children:[d.jsxs(Wd,{children:[d.jsx(jn,{label:"Total",value:e.total.toLocaleString()}),d.jsx(jn,{label:"Groups",value:t.length.toLocaleString(),accent:t.length>0?"text-warn":"text-foreground"})]}),t.length>0?d.jsxs("div",{className:"space-y-2",children:[d.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Exception groups"}),t.map(n=>d.jsx(Wbe,{group:n},n.key))]}):null,d.jsx(Ds,{title:"Exceptions over time",valueLabel:"exceptions",data:Hd(e.overTime)})]})}function qbe({stats:e}){return d.jsxs(d.Fragment,{children:[d.jsx(Wd,{children:d.jsx(jn,{label:"Total",value:e.total.toLocaleString()})}),d.jsx(Ds,{title:"Over time",valueLabel:"entries",data:Hd(e.overTime)})]})}function Gbe({stats:e}){return e.type==="query"?d.jsx(Bbe,{stats:e}):e.type==="cache"?d.jsx(Ube,{stats:e}):e.type==="request"?d.jsx(Vbe,{stats:e}):e.type==="exception"?d.jsx(Kbe,{stats:e}):d.jsx(qbe,{stats:e})}function Xbe({type:e}){const{data:t}=n5(e,$be);return t?d.jsxs("div",{className:"mb-4 space-y-4",children:[d.jsx(Gbe,{stats:t}),t.truncated?d.jsx("p",{className:"text-[10px] text-muted-foreground",children:"sampled (window capped)"}):null]}):d.jsx("div",{className:"mb-4 h-24 animate-pulse rounded-lg border border-line bg-panel/20"})}const Ybe=["15m","1h","6h","24h"];function Kd({value:e,onChange:t}){return d.jsxs(Sw,{value:e,onValueChange:n=>{typeof n=="string"&&t(n)},children:[d.jsx(Pw,{"aria-label":"Time window",children:d.jsx(Ow,{})}),d.jsx(jw,{align:"end",children:Ybe.map(n=>d.jsx(Lc,{value:n,children:n},n))})]})}const Qbe=10;function Jbe(e,t){const n=t.trim().toLowerCase();return e.filter(r=>n===""||r.tag.toLowerCase().includes(n)).sort((r,i)=>i.count-r.count).slice(0,Qbe)}function h_({onSelect:e,prefix:t="",placeholder:n="Filter by tag…",ariaLabel:r="Filter by tag"}){const[i,o]=O.useState(""),[a,s]=O.useState(!1),[l,u]=O.useState(0),f=O.useRef(null),c=O.useId(),p=i.trim(),h=`${t}${p}`,{data:v}=t5(h),y=p===""?[]:Jbe(v??[],h),x=a&&y.length>0;function m(w){return t!==""&&w.startsWith(t)?w.slice(t.length):w}O.useEffect(()=>{u(w=>w>=y.length?0:w)},[y.length]),O.useEffect(()=>{function w(P){var E;const j=P.target;j instanceof Node&&!((E=f.current)!=null&&E.contains(j))&&s(!1)}return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[]);function g(w){e(w),o(m(w)),s(!1)}function b(w){if(w.key==="Escape"){s(!1);return}if(!x){w.key==="Enter"&&p!==""&&g(h);return}if(w.key==="ArrowDown")w.preventDefault(),u(P=>(P+1)%y.length);else if(w.key==="ArrowUp")w.preventDefault(),u(P=>(P-1+y.length)%y.length);else if(w.key==="Enter"){w.preventDefault();const P=y[l];P?g(P.tag):p!==""&&g(h)}}const S=x?`${c}-option-${l}`:void 0;return d.jsxs("div",{ref:f,className:"relative",children:[d.jsx(Es,{type:"text",value:i,onChange:w=>{o(w.target.value),s(!0)},onFocus:()=>s(!0),onKeyDown:b,placeholder:n,"aria-label":r,role:"combobox","aria-expanded":x,"aria-controls":c,"aria-autocomplete":"list",...S?{"aria-activedescendant":S}:{}}),x?d.jsx("div",{id:c,role:"listbox","aria-label":"Tag suggestions",tabIndex:-1,className:"absolute left-0 top-full z-10 mt-1 max-h-64 w-48 overflow-auto rounded border border-line bg-popover py-1 shadow-lg",children:y.map((w,P)=>d.jsxs("div",{id:`${c}-option-${P}`,role:"option",tabIndex:-1,"aria-selected":P===l,onMouseDown:j=>{j.preventDefault(),g(w.tag)},onMouseEnter:()=>u(P),className:`flex cursor-pointer items-center justify-between gap-3 px-2 py-1 text-xs ${P===l?"bg-panel-2 text-foreground":"text-foreground"}`,children:[d.jsx("span",{className:"truncate",children:m(w.tag)}),d.jsx("span",{className:"shrink-0 text-muted-foreground",children:w.count})]},w.tag))}):null]})}function Hs({title:e,children:t}){return d.jsxs("section",{className:"mb-6",children:[d.jsx("h3",{className:"mb-2 text-xs uppercase tracking-wide text-muted-foreground",children:e}),t]})}function Zbe({report:e,onSelectEntry:t,onSelectFamily:n,onSelectRoute:r,onSelectOutgoing:i}){return d.jsxs("div",{className:"text-xs",children:[e.truncated&&d.jsxs("p",{className:"mb-4 text-warn",children:["Scan truncated at ",e.scanned," entries — widen the window with care."]}),d.jsx(Hs,{title:"Entries by type",children:d.jsxs("div",{className:"flex flex-wrap gap-3",children:[Object.entries(e.counts).map(([o,a])=>d.jsxs("span",{className:"rounded bg-panel px-2 py-1",children:[d.jsx("span",{className:"text-brand",children:o})," ",d.jsx("span",{className:"text-foreground",children:a})]},o)),Object.keys(e.counts).length===0&&d.jsx("span",{className:"text-muted-foreground",children:"No entries in window."})]})}),d.jsx(Hs,{title:"Slowest",children:d.jsx("table",{className:"w-full text-left",children:d.jsxs("tbody",{children:[e.slowest.map(o=>d.jsxs("tr",{tabIndex:0,onClick:()=>t==null?void 0:t(o.id),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(t==null||t(o.id))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[d.jsx("td",{className:"py-1 text-brand",children:o.type}),d.jsx("td",{className:"max-w-md truncate text-foreground",children:o.label}),d.jsxs("td",{className:"text-right text-muted-foreground",children:[o.durationMs,"ms"]})]},o.id)),e.slowest.length===0&&d.jsx("tr",{children:d.jsx("td",{className:"py-1 text-muted-foreground",children:"—"})})]})})}),d.jsx(Hs,{title:"Top exceptions",children:d.jsx("table",{className:"w-full text-left",children:d.jsxs("tbody",{children:[e.topExceptions.map(o=>d.jsxs("tr",{className:"border-t border-line-soft",children:[d.jsx("td",{className:"py-1 text-bad",children:o.class}),d.jsx("td",{className:"max-w-md truncate text-foreground",children:o.message}),d.jsxs("td",{className:"text-right text-muted-foreground",children:["×",o.count]})]},o.familyHash)),e.topExceptions.length===0&&d.jsx("tr",{children:d.jsx("td",{className:"py-1 text-muted-foreground",children:"No exceptions 🎉"})})]})})}),d.jsx(Hs,{title:"N+1 query hotspots",children:d.jsx("table",{className:"w-full text-left",children:d.jsxs("tbody",{children:[e.nPlusOne.map(o=>d.jsxs("tr",{tabIndex:0,onClick:()=>n==null?void 0:n(o.familyHash),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(n==null||n(o.familyHash))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[d.jsxs("td",{className:"whitespace-nowrap py-1 text-warn",children:["×",o.perRequest,d.jsx("span",{className:"text-muted-foreground",children:" per request"})]}),d.jsx("td",{className:"max-w-md truncate text-foreground",children:o.sql}),d.jsxs("td",{className:"whitespace-nowrap text-right text-muted-foreground",children:[o.requests," requests · ",o.total," total"]})]},o.familyHash)),e.nPlusOne.length===0&&d.jsx("tr",{children:d.jsx("td",{className:"py-1 text-muted-foreground",children:"None detected"})})]})})}),d.jsx(Hs,{title:"Slow request hotspots",children:d.jsx("table",{className:"w-full text-left",children:d.jsxs("tbody",{children:[e.slowRoutes.map(o=>d.jsxs("tr",{tabIndex:0,onClick:()=>r==null?void 0:r(o.route),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(r==null||r(o.route))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[d.jsx("td",{className:"max-w-md truncate py-1 font-mono text-foreground",children:o.route}),d.jsxs("td",{className:"whitespace-nowrap text-right text-warn",children:[o.p99,"ms",d.jsx("span",{className:"text-muted-foreground",children:" p99"})]}),d.jsxs("td",{className:"whitespace-nowrap text-right text-muted-foreground",children:["×",o.count]})]},o.route)),e.slowRoutes.length===0&&d.jsx("tr",{children:d.jsx("td",{className:"py-1 text-muted-foreground",children:"No routes over the slow threshold"})})]})})}),d.jsx(Hs,{title:"Slow outgoing HTTP",children:d.jsx("table",{className:"w-full text-left",children:d.jsxs("tbody",{children:[e.slowOutgoing.map(o=>d.jsxs("tr",{tabIndex:0,onClick:()=>i==null?void 0:i(o.route),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(i==null||i(o.route))},className:"cursor-pointer border-t border-line-soft hover:bg-panel",children:[d.jsx("td",{className:"max-w-md truncate py-1 font-mono text-foreground",children:o.route}),d.jsxs("td",{className:"whitespace-nowrap text-right text-warn",children:[o.p99,"ms",d.jsx("span",{className:"text-muted-foreground",children:" p99"})]}),d.jsxs("td",{className:"whitespace-nowrap text-right text-muted-foreground",children:["×",o.count]})]},o.route)),e.slowOutgoing.length===0&&d.jsx("tr",{children:d.jsx("td",{className:"py-1 text-muted-foreground",children:"No outgoing calls over the slow threshold"})})]})})})]})}function m_(e){return e?`${Math.round(e.p95)}ms`:"—"}function e0e({report:e,sparkline:t}){return d.jsxs("table",{className:"w-full text-left text-xs",children:[d.jsx("thead",{className:"text-muted-foreground",children:d.jsxs("tr",{children:[d.jsx("th",{className:"py-2 font-normal",children:"Queue"}),d.jsx("th",{className:"font-normal",children:"Total"}),d.jsx("th",{className:"font-normal",children:"Failed"}),d.jsx("th",{className:"font-normal",children:"Fail %"}),d.jsx("th",{className:"font-normal",children:"Per min"}),d.jsx("th",{className:"font-normal",children:"Runtime p95"}),d.jsx("th",{className:"font-normal",children:"Wait p95"}),t&&d.jsx("th",{className:"font-normal",children:"Trend"})]})}),d.jsxs("tbody",{children:[e.queues.map(n=>d.jsxs("tr",{className:"border-t border-line-soft",children:[d.jsx("td",{className:"py-1.5 text-brand",children:n.queue}),d.jsx("td",{className:"text-foreground",children:n.total}),d.jsx("td",{className:"text-foreground",children:n.failed}),d.jsxs("td",{className:n.failureRate>0?"text-bad":"text-muted-foreground",children:[(n.failureRate*100).toFixed(1),"%"]}),d.jsx("td",{className:"text-muted-foreground",children:n.throughputPerMinute.toFixed(1)}),d.jsx("td",{className:"text-muted-foreground",children:m_(n.runtimeMs)}),d.jsx("td",{className:"text-muted-foreground",children:m_(n.waitMs)}),t&&d.jsx("td",{className:"text-muted-foreground",children:t(n.queue)})]},n.queue)),e.queues.length===0&&d.jsx("tr",{children:d.jsx("td",{className:"py-2 text-muted-foreground",colSpan:t?8:7,children:"No queue activity in window."})})]})]})}function t0e(e,t,n){if(e.length===0)return"";const r=Math.max(...e,1),i=e.length>1?t/(e.length-1):0;return e.map((o,a)=>{const s=a*i,l=n-o/r*n;return`${s.toFixed(1)},${l.toFixed(1)}`}).join(" ")}function ch({values:e,width:t=160,height:n=36}){const r=t0e(e,t,n),i=r?`0,${n} ${r} ${t},${n}`:"";return d.jsxs("svg",{width:t,height:n,viewBox:`0 0 ${t} ${n}`,preserveAspectRatio:"none",role:"img","aria-label":"throughput",children:[i&&d.jsx("polygon",{points:i,className:"fill-accent opacity-10"}),r&&d.jsx("polyline",{points:r,className:"fill-none stroke-accent",strokeWidth:1.5})]})}const g_={request:"fill-emerald-400",query:"fill-sky-400",job:"fill-violet-400",exception:"fill-red-400",http_client:"fill-amber-400",mail:"fill-pink-400"};function AO(e){const t=new Set;for(const i of e)for(const o of Object.keys(i.byType))t.add(o);const n=Object.keys(g_).filter(i=>t.has(i)),r=[...t].filter(i=>!(i in g_)).sort();return[...n,...r]}function n0e({queue:e,window:t}){const{data:n}=D1({window:t,tag:`queue:${e}`,buckets:24});return d.jsx(ch,{values:((n==null?void 0:n.buckets)??[]).map(r=>r.total),width:120,height:20})}function r0e({state:e,value:t}){const n=e==="failed"&&t>0;return d.jsxs("span",{className:`flex items-baseline gap-1 rounded px-1.5 py-0.5 ${n?"tint-bad":"bg-panel-2/60"}`,title:`${t} ${e}`,children:[d.jsx("span",{className:"text-[9px] uppercase tracking-wide text-muted-foreground",children:e.slice(0,4)}),d.jsx("span",{className:`tabular-nums ${t>0?JL[e]:"text-muted-foreground"}`,children:t})]})}function i0e({summary:e,active:t,onSelect:n}){return d.jsxs("button",{type:"button",onClick:()=>n(e.driver,e.queue),className:`w-full rounded-lg border px-3 py-2.5 text-left transition-colors ${t?"border-brand bg-panel-2":"border-line bg-panel/40 hover:border-line hover:bg-panel"}`,children:[d.jsxs("div",{className:"flex items-center justify-between gap-2",children:[d.jsx("span",{className:"min-w-0 truncate font-medium text-foreground",children:e.queue}),e.isPaused&&d.jsx("span",{className:"shrink-0 rounded bg-violet-500/15 px-1.5 py-0.5 text-[9px] uppercase tracking-wide text-violet-300",children:"paused"})]}),d.jsx("div",{className:"mt-0.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:e.driver}),d.jsx("div",{className:"mt-2 flex flex-wrap gap-1 text-[10px]",children:QL.map(r=>d.jsx(r0e,{state:r,value:e.counts[r]},r))})]})}function o0e({selected:e,onSelect:t}){const{data:n,isLoading:r,isError:i}=$N();if(r)return d.jsx("p",{className:"px-1 py-2 text-xs text-muted-foreground",children:"Loading queues…"});if(i)return d.jsx("p",{className:"px-1 py-2 text-xs text-bad",children:"Failed to load queues."});const o=(n==null?void 0:n.queues)??[];return o.length===0?d.jsx("div",{className:"rounded-lg border border-dashed border-line px-3 py-6 text-center text-xs text-muted-foreground",children:"No live queues detected."}):d.jsx("div",{className:"space-y-2",children:o.map(a=>d.jsx(i0e,{summary:a,active:(e==null?void 0:e.driver)===a.driver&&(e==null?void 0:e.queue)===a.queue,onSelect:t},`${a.driver}:${a.queue}`))})}function a0e({counts:e,state:t,onState:n}){return d.jsx(fxe,{value:t,onValueChange:r=>{typeof r=="string"&&n(r)},children:d.jsx(dxe,{children:QL.map(r=>{const i=r===t,o=(e==null?void 0:e[r])??0;return d.jsxs(pxe,{value:r,children:[d.jsx("span",{className:"capitalize",children:r}),d.jsx("span",{className:`tabular-nums text-[11px] ${i?JL[r]:"text-muted-foreground"}`,children:o})]},r)})})})}const y_=25;function s0e(e){return e.maxAttempts!=null?`${e.attemptsMade}/${e.maxAttempts}`:`${e.attemptsMade}`}function l0e({job:e,onOpen:t}){return d.jsxs("tr",{onClick:()=>t(e.id),onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&t(e.id)},className:"cursor-pointer border-t border-line-soft align-top hover:bg-panel",children:[d.jsx("td",{className:"py-1.5 pr-2 font-mono text-[11px] text-muted-foreground",children:e.id}),d.jsx("td",{className:"pr-2 text-emerald-400",children:e.name||"—"}),d.jsx("td",{className:"pr-2 tabular-nums text-muted-foreground",children:s0e(e)}),d.jsx("td",{className:"pr-2 whitespace-nowrap text-muted-foreground",children:Ls(e.timestamp)}),d.jsx("td",{className:"max-w-xs truncate pr-2 text-muted-foreground",children:e.failedReason?d.jsx("span",{className:"text-bad",children:e.failedReason}):d.jsx("span",{className:"text-muted-foreground",children:"open to inspect payload →"})})]})}function u0e(e,t){const n=new Map;for(const r of e)n.set(r.id,r);for(const r of t)n.set(r.id,r);return[...n.values()]}function c0e({driver:e,queue:t,state:n,onOpen:r}){const[i,o]=O.useState(void 0),[a,s]=O.useState([]),l=`${e}\0${t}\0${n}`,u=O.useRef(l);u.current!==l&&(u.current=l,i!==void 0&&o(void 0),a.length>0&&s([]));const{data:f,isLoading:c,isError:p}=BU(e,t,n,i!==void 0?{cursor:i,limit:y_}:{limit:y_}),h=(f==null?void 0:f.nextCursor)??null,v=f==null?void 0:f.jobs;return O.useEffect(()=>{v&&s(i===void 0?y=>f0e(y,v):y=>u0e(y,v))},[v,i]),c&&a.length===0?d.jsx("p",{className:"px-1 py-3 text-xs text-muted-foreground",children:"Loading jobs…"}):p&&a.length===0?d.jsx("p",{className:"px-1 py-3 text-xs text-bad",children:"Failed to load jobs."}):a.length===0?d.jsxs("div",{className:"rounded-lg border border-dashed border-line px-3 py-8 text-center text-xs text-muted-foreground",children:["No ",d.jsx("span",{className:"text-muted-foreground",children:n})," jobs."]}):d.jsxs("div",{className:"space-y-3",children:[d.jsxs("table",{className:"w-full text-left text-xs",children:[d.jsx("thead",{className:"text-muted-foreground",children:d.jsxs("tr",{children:[d.jsx("th",{className:"py-1.5 pr-2 font-normal",children:"ID"}),d.jsx("th",{className:"pr-2 font-normal",children:"Name"}),d.jsx("th",{className:"pr-2 font-normal",children:"Attempts"}),d.jsx("th",{className:"pr-2 font-normal",children:"Age"}),d.jsx("th",{className:"pr-2 font-normal",children:"Reason / Payload"})]})}),d.jsx("tbody",{children:a.map(y=>d.jsx(l0e,{job:y,onOpen:r},y.id))})]}),h!=null&&d.jsx("button",{type:"button",onClick:()=>o(h),className:"w-full rounded-md border border-line py-1.5 text-[11px] text-muted-foreground transition-colors hover:border-line hover:text-foreground",children:"Load more"})]})}function f0e(e,t){const n=new Set(t.map(i=>i.id)),r=e.filter(i=>!n.has(i.id));return[...t,...r]}function My(e,t,n){return e!=null&&e.mutationsEnabled?(e.actionsByDriver[t]??[]).includes(n):!1}function d0e(e,t){switch(e){case"promote":return t==="delayed";case"retry":return t==="failed"||t==="completed";case"remove":return!0;default:return!1}}function CO(e){return e instanceof Error&&/\b403\b/.test(e.message)}const p0e={retry:"good",promote:"warn",remove:"bad"};function h0e({driver:e,queue:t,id:n,action:r,onDone:i}){const o=UU(),[a,s]=O.useState(!1),l=o.isPending,u=CO(o.error);async function f(){s(!1);try{await o.mutateAsync({driver:e,queue:t,id:n,action:r}),i==null||i()}catch{}}return r==="remove"&&a?d.jsxs("span",{className:"inline-flex items-center gap-1",children:[d.jsx(Ye,{variant:"bad",disabled:l,onClick:f,children:l?"Removing…":"Confirm remove"}),d.jsx(Ye,{variant:"ghost",onClick:()=>s(!1),children:"Cancel"})]}):d.jsxs("span",{className:"inline-flex flex-col",children:[d.jsx(Ye,{variant:p0e[r],disabled:l,onClick:r==="remove"?()=>s(!0):f,className:"capitalize",children:l?`${r}…`:r}),u&&d.jsx("span",{className:"mt-0.5 text-[10px] text-bad",children:"Not authorized"})]})}function m0e({capabilities:e,driver:t,queue:n,id:r,state:i,onDone:o}){const a=["retry","promote","remove"].filter(s=>My(e,t,s)&&d0e(s,i));return a.length===0?null:d.jsx("div",{className:"flex flex-wrap items-start gap-1.5",children:a.map(s=>d.jsx(h0e,{driver:t,queue:n,id:r,action:s,onDone:o},s))})}function g0e({capabilities:e,driver:t,queue:n}){const r=IN();if(!My(e,t,"retry-all"))return null;const i=CO(r.error);async function o(){try{await r.mutateAsync({driver:t,queue:n,action:"retry-all",state:"failed"})}catch{}}return d.jsxs("span",{className:"inline-flex items-center gap-2",children:[d.jsx(Ye,{variant:"good",disabled:r.isPending,onClick:o,children:r.isPending?"Retrying all…":"Retry all failed"}),i&&d.jsx("span",{className:"text-[10px] text-bad",children:"Not authorized"})]})}function y0e({capabilities:e,driver:t,queue:n}){const r=IN(),[i,o]=O.useState(!1);if(!My(e,t,"redrive"))return null;const a=CO(r.error);async function s(){o(!1);try{await r.mutateAsync({driver:t,queue:n,action:"redrive"})}catch{}}return i?d.jsxs("span",{className:"inline-flex items-center gap-1",children:[d.jsx(Ye,{variant:"warn",disabled:r.isPending,onClick:s,children:r.isPending?"Redriving…":"Confirm redrive"}),d.jsx(Ye,{variant:"ghost",onClick:()=>o(!1),children:"Cancel"})]}):d.jsxs("span",{className:"inline-flex items-center gap-2",children:[d.jsx(Ye,{variant:"warn",disabled:r.isPending,onClick:()=>o(!0),children:"Redrive DLQ"}),a&&d.jsx("span",{className:"text-[10px] text-bad",children:"Not authorized"})]})}function v0e(e){if(e===void 0)return"—";try{return JSON.stringify(e,null,2)}catch{return String(e)}}function ux({label:e,value:t}){return d.jsxs("section",{children:[d.jsx("h4",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:e}),d.jsx("pre",{className:"overflow-auto rounded bg-background p-2.5 text-[11px] leading-relaxed text-foreground ring-1 ring-line",children:v0e(t)})]})}function Tc({label:e,value:t}){return d.jsxs("div",{className:"flex items-baseline justify-between gap-3 border-t border-line-soft py-1 first:border-0",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:e}),d.jsx("span",{className:"tabular-nums text-foreground",children:t})]})}function cx(e){return e==null?"—":`${new Date(e).toLocaleString()} (${Ls(e)})`}function x0e({detail:e,capabilities:t,driver:n,queue:r,state:i,onClose:o}){return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("header",{className:"space-y-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm font-medium text-brand",children:e.name||"job"}),d.jsx(z1,{className:"capitalize",children:e.state})]}),d.jsx("div",{className:"font-mono text-[11px] text-muted-foreground",children:e.id})]}),d.jsx(m0e,{capabilities:t,driver:n,queue:r,id:e.id,state:i,onDone:o}),d.jsxs("div",{className:"rounded-lg border border-line bg-panel px-3 py-2 text-xs",children:[d.jsx(Tc,{label:"Attempts",value:e.maxAttempts!=null?`${e.attemptsMade}/${e.maxAttempts}`:`${e.attemptsMade}`}),d.jsx(Tc,{label:"Progress",value:e.progress!=null?`${e.progress}`:"—"}),d.jsx(Tc,{label:"Created",value:cx(e.timestamp)}),d.jsx(Tc,{label:"Processed",value:cx(e.processedOn)}),d.jsx(Tc,{label:"Finished",value:cx(e.finishedOn)})]}),e.failedReason&&d.jsxs("section",{children:[d.jsx("h4",{className:"mb-1 text-[10px] uppercase tracking-wide text-bad",children:"Failed reason"}),d.jsx("p",{className:"tint-bad rounded border px-2.5 py-2 text-[11px]",children:e.failedReason})]}),d.jsx(ux,{label:"Payload (data)",value:e.data}),d.jsx(ux,{label:"Options (opts)",value:e.opts}),e.returnValue!==void 0&&e.returnValue!==null&&d.jsx(ux,{label:"Return value",value:e.returnValue}),e.stacktrace&&e.stacktrace.length>0&&d.jsxs("section",{children:[d.jsx("h4",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:"Stacktrace"}),d.jsx("pre",{className:"overflow-auto rounded bg-background p-2.5 text-[11px] leading-relaxed text-bad ring-1 ring-line",children:e.stacktrace.join(`
173
- `)})]})]})}function b0e({driver:e,queue:t,jobId:n,state:r,capabilities:i,onClose:o}){const{data:a,isLoading:s,isError:l}=zU(e,t,n);return d.jsx(yL,{open:!0,onOpenChange:u=>{u||o()},children:d.jsxs(vL,{placement:"right",className:"flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-2.5",children:[d.jsx(ove,{className:"text-xs font-normal uppercase tracking-wide text-muted-foreground",children:"Job detail"}),d.jsx(Ye,{variant:"ghost",size:"xs","aria-label":"Close job detail",onClick:o,children:"✕"})]}),d.jsx("div",{className:"flex-1 overflow-auto p-4",children:s?d.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading job…"}):l?d.jsx("p",{className:"text-xs text-bad",children:"Failed to load job."}):a?d.jsx(x0e,{detail:a,capabilities:i,driver:e,queue:t,state:r,onClose:o}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"Job not found (it may have been removed)."})})]})})}function w0e(e){return e instanceof Error&&/\b403\b/.test(e.message)}function S0e(e){const t=e.trim();if(t==="")return{ok:!1,message:"Payload is required."};try{return{ok:!0,value:JSON.parse(t)}}catch{return{ok:!1,message:"Payload must be valid JSON."}}}function O0e({capabilities:e,driver:t,queue:n}){const r=VU(),[i,o]=O.useState(""),[a,s]=O.useState(""),[l,u]=O.useState(null),[f,c]=O.useState(void 0);if(!My(e,t,"enqueue"))return null;const p=w0e(r.error);async function h(v){v.preventDefault(),c(void 0);const y=S0e(a);if(!y.ok){u(y.message);return}u(null);try{const x=await r.mutateAsync({driver:t,queue:n,...i.trim()!==""?{name:i.trim()}:{},payload:y.value});c(x.id),s("")}catch{}}return d.jsxs("form",{onSubmit:h,className:"space-y-2 rounded-lg border border-line p-3",children:[d.jsx("h3",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Send message"}),d.jsx("input",{type:"text",value:i,onChange:v=>o(v.target.value),placeholder:"Job name (optional)","aria-label":"Job name",className:"w-full rounded border border-line bg-background px-2 py-1 text-xs text-foreground placeholder:text-muted-foreground"}),d.jsx("textarea",{value:a,onChange:v=>s(v.target.value),placeholder:'{"to": "a@b.c"}',"aria-label":"Payload (JSON)",rows:4,className:"w-full rounded border border-line bg-background px-2 py-1 font-mono text-xs text-foreground placeholder:text-muted-foreground"}),l&&d.jsx("p",{className:"text-[10px] text-bad",children:l}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ye,{type:"submit",variant:"good",disabled:r.isPending,children:r.isPending?"Sending…":"Send message"}),p&&d.jsx("span",{className:"text-[10px] text-bad",children:"Not authorized"}),f!==void 0&&!p&&d.jsx("span",{className:"text-[10px] text-good",children:f?`Enqueued job ${f}`:"Message enqueued"})]})]})}const TO=O.createContext(null);function P0e(e){return e instanceof Error&&/ 401$/.test(e.message)}function j0e({children:e}){const t=Be(),n=oo(),[r,i]=O.useState("loading"),[o,a]=O.useState([]),s=O.useRef(!1),l=O.useMemo(()=>{async function u(){const c=await t.auth.me();if(c.status==="authenticated"){s.current=!0,i("app");return}if(c.status==="unauthenticated"){s.current=!0,a(c.modes),i("screen");return}s.current=!1,i("disabled")}async function f(){await t.auth.logout(),await u()}return{phase:r,modes:o,refresh:u,logout:f}},[t,r,o]);return O.useEffect(()=>{let u=!1;return t.auth.me().then(f=>{u||(f.status==="authenticated"?(s.current=!0,i("app")):f.status==="unauthenticated"?(s.current=!0,a(f.modes),i("screen")):(s.current=!1,i("disabled")))}),()=>{u=!0}},[t]),O.useEffect(()=>n.getQueryCache().subscribe(f=>{f.type==="updated"&&f.query.state.status==="error"&&s.current&&P0e(f.query.state.error)&&l.refresh()}),[n,l]),d.jsx(TO.Provider,{value:l,children:e})}function _O(){const e=O.useContext(TO);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e}function E0e(){return O.useContext(TO)}function A0e({children:e}){return d.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 font-mono text-sm text-foreground",children:d.jsxs("div",{className:"w-full max-w-sm rounded-lg border border-line bg-panel p-8 shadow-2xl",children:[d.jsx("div",{className:"mb-6 text-center text-lg font-semibold text-brand",children:"Telescope"}),e]})})}function C0e(){const e=Be(),{refresh:t}=_O(),[n,r]=O.useState(""),[i,o]=O.useState(""),a=O.useId(),s=O.useId(),[l,u]=O.useState(null),[f,c]=O.useState(!1);async function p(h){h.preventDefault(),c(!0),u(null);try{const v=await e.auth.login(n,i);if(v.ok){await t();return}u(v.message)}finally{c(!1)}}return d.jsxs("form",{onSubmit:p,className:"flex flex-col gap-4",children:[d.jsxs("label",{className:"flex flex-col gap-1.5",htmlFor:a,children:[d.jsx("span",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Username"}),d.jsx(Es,{id:a,type:"text",name:"username",autoComplete:"username",value:n,onChange:h=>r(h.target.value),className:"px-3 py-2 text-sm"})]}),d.jsxs("label",{className:"flex flex-col gap-1.5",htmlFor:s,children:[d.jsx("span",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Password"}),d.jsx(Es,{id:s,type:"password",name:"password",autoComplete:"current-password",value:i,onChange:h=>o(h.target.value),className:"px-3 py-2 text-sm"})]}),l!==null?d.jsx("p",{role:"alert",className:"text-xs text-bad",children:l}):null,d.jsx(Ye,{type:"submit",variant:"brand",size:"md",disabled:f,className:"mt-2 uppercase tracking-wide",children:f?"Signing in…":"Sign in"})]})}function T0e(){const{refresh:e}=_O(),[t,n]=O.useState(!1);async function r(){n(!0);try{await e()}finally{n(!1)}}return d.jsxs("div",{className:"flex flex-col gap-4 text-center",children:[d.jsx("p",{className:"text-sm font-medium text-foreground",children:"Open Telescope from your application"}),d.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"Your session is minted by the host app. Use its “Open Telescope” action to sign in, then come back here."}),d.jsx("button",{type:"button",onClick:r,disabled:t,className:"mt-2 rounded border border-line px-3 py-2 text-xs font-medium uppercase tracking-wide text-foreground transition-colors hover:bg-panel-2 disabled:cursor-not-allowed disabled:opacity-50",children:t?"Checking…":"Retry"})]})}function _0e({modes:e}){const t=e.includes("login");return d.jsx(A0e,{children:t?d.jsx(C0e,{}):d.jsx(T0e,{})})}const k0e=[{id:"page-overview",label:"Overview",to:"/"},{id:"page-entries",label:"Entries",to:"/entries"},{id:"page-pulse",label:"Pulse",to:"/pulse"},{id:"page-queues",label:"Queues",to:"/queues"},{id:"page-metrics",label:"Queue Metrics",to:"/queues/metrics"},{id:"page-schedules",label:"Schedules",to:"/schedules"},{id:"page-traces",label:"Traces",to:"/traces"}],R0e=[...k0e,...ql.map(e=>({id:`entry-${e.id}`,label:e.label,to:`/entries/${e.id}`}))];function N0e(e,t){const n=t.trim().toLowerCase();return n?e.filter(r=>r.label.toLowerCase().includes(n)):e}function M0e(){const[e,t]=O.useState(!1);return O.useEffect(()=>{function n(r){(r.metaKey||r.ctrlKey)&&r.key.toLowerCase()==="k"&&(r.preventDefault(),t(i=>!i))}return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[]),{open:e,setOpen:t}}function $0e({open:e,onClose:t}){const n=xi(),r=O.useRef(null),[i,o]=O.useState(""),[a,s]=O.useState(0),l=O.useId(),u=O.useMemo(()=>N0e(R0e,i),[i]);O.useEffect(()=>{var h;e&&(o(""),s(0),(h=r.current)==null||h.focus())},[e]),O.useEffect(()=>{s(h=>u.length===0?0:Math.min(h,u.length-1))},[u.length]);const f=O.useCallback(h=>{h&&(n(h.to),t())},[n,t]);function c(h){u.length!==0&&(h.key==="ArrowDown"?(h.preventDefault(),s(v=>(v+1)%u.length)):h.key==="ArrowUp"?(h.preventDefault(),s(v=>(v-1+u.length)%u.length)):h.key==="Enter"&&(h.preventDefault(),f(u[a])))}const p=u[a]?`${l}-${u[a].id}`:void 0;return d.jsx(yL,{open:e,onOpenChange:h=>{h||t()},children:d.jsxs(vL,{placement:"top","aria-label":"Command palette",className:"overflow-hidden",initialFocus:r,onKeyDown:c,children:[d.jsx("input",{ref:r,type:"text",value:i,onChange:h=>o(h.target.value),placeholder:"Jump to…","aria-label":"Search actions","aria-controls":l,"aria-activedescendant":p,className:"w-full border-b border-line bg-transparent px-4 py-3 text-sm text-foreground outline-none placeholder:text-muted-foreground"}),d.jsx("ul",{id:l,role:"listbox",className:"max-h-72 overflow-y-auto py-1",children:u.length===0?d.jsx("li",{className:"px-4 py-3 text-xs text-muted-foreground",children:"No matching actions"}):u.map((h,v)=>d.jsx("li",{id:`${l}-${h.id}`,role:"option","aria-selected":v===a,onMouseEnter:()=>s(v),onMouseDown:y=>{y.preventDefault(),f(h)},className:`cursor-pointer px-4 py-2 text-sm ${v===a?"bg-panel-2 text-brand":"text-foreground"}`,children:h.label},h.id))})]})})}const ZL="telescope-theme",fx="dark",eF=O.createContext(null);function v_(){if(typeof window>"u"||!window.localStorage)return fx;try{const e=window.localStorage.getItem(ZL);return e==="light"||e==="dark"?e:fx}catch{return fx}}function I0e(e){if(!(typeof window>"u"||!window.localStorage))try{window.localStorage.setItem(ZL,e)}catch{}}function D0e({children:e}){const[t,n]=O.useState(v_),r=O.useCallback(()=>{n(o=>{const a=o==="dark"?"light":"dark";return I0e(a),a})},[]);O.useEffect(()=>{n(v_())},[]),O.useEffect(()=>{if(typeof document>"u")return;const o=document.documentElement;return o.classList.toggle("light",t==="light"),o.classList.toggle("dark",t==="dark"),()=>{o.classList.remove("light","dark")}},[t]);const i=O.useMemo(()=>({theme:t,toggleTheme:r}),[t,r]);return d.jsx(eF.Provider,{value:i,children:d.jsx("div",{className:t,"data-theme":t,"data-testid":"telescope-root",children:e})})}function L0e(){const e=O.useContext(eF);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}const F0e=[{to:"/",label:"Overview",end:!0},{to:"/entries",label:"Entries",end:!0},{to:"/traces",label:"Traces",end:!0},{to:"/pulse",label:"Pulse",end:!1},{to:"/queues",label:"Queues",end:!1},{to:"/schedules",label:"Schedules",end:!1},{to:"/prunes",label:"Prunes",end:!1},{to:"/exports",label:"Exports",end:!1},{to:"/profiles",label:"Profiles",end:!1}];function B0e(e,t,n){return e.filter(r=>!(r.to==="/traces"&&t===!1||r.to==="/profiles"&&n!==!0))}function x_({isActive:e}){return`block rounded px-3 py-1.5 text-xs uppercase tracking-wide ${e?"bg-panel-2 text-brand":"text-muted-foreground hover:bg-panel hover:text-foreground"}`}function z0e({isActive:e}){return`flex items-center gap-2 rounded px-3 py-1.5 text-xs ${e?"bg-panel-2 text-foreground":"text-muted-foreground hover:bg-panel hover:text-foreground"}`}function U0e(){const{paused:e,setPaused:t}=RN();return d.jsxs(bO,{children:[d.jsx(wO,{render:d.jsxs(Ye,{variant:e?"warn":"good",onClick:()=>t(!e),"aria-pressed":e,className:"uppercase tracking-wide",children:[d.jsx("span",{"aria-hidden":"true",children:e?"⏸":"●"}),e?"Paused":"Live"]})}),d.jsx(SO,{children:e?"Resume live tail":"Pause live tail"})]})}function V0e(){const{theme:e,toggleTheme:t}=L0e(),n=e==="dark";return d.jsxs(bO,{children:[d.jsx(wO,{render:d.jsxs(Ye,{onClick:t,"aria-pressed":!n,children:[d.jsx("span",{"aria-hidden":"true",children:n?"☾":"☀"}),n?"Dark":"Light"]})}),d.jsx(SO,{children:n?"Switch to light theme":"Switch to dark theme"})]})}function H0e({onClick:e}){return d.jsxs(bO,{children:[d.jsx(wO,{render:d.jsx(Ye,{onClick:e,"aria-label":"Open command palette","aria-keyshortcuts":"Meta+K Control+K",className:"text-muted-foreground hover:text-foreground",children:d.jsx("span",{"aria-hidden":"true",children:"⌘K"})})}),d.jsx(SO,{children:"Open command palette (⌘K)"})]})}function W0e(){const e=E0e(),[t,n]=O.useState(!1);if(e===null||e.phase!=="app")return null;async function r(){if(e!==null){n(!0);try{await e.logout()}finally{n(!1)}}}return d.jsxs(Ye,{onClick:r,disabled:t,title:"Sign out",children:[d.jsx("span",{"aria-hidden":"true",children:"⎋"}),"Sign out"]})}function K0e({children:e}){var a,s,l,u,f,c;const{open:t,setOpen:n}=M0e(),r=ks(),i=y5(g5((a=r.data)==null?void 0:a.entryTypes),(s=r.data)==null?void 0:s.watchers),o=B0e(F0e,(l=r.data)==null?void 0:l.tracesEnabled,(f=(u=r.data)==null?void 0:u.profiling)==null?void 0:f.enabled);return d.jsxs("div",{className:"flex min-h-screen bg-background font-mono text-sm text-foreground",children:[d.jsx($0e,{open:t,onClose:()=>n(!1)}),d.jsxs("aside",{className:"flex w-56 shrink-0 flex-col gap-6 border-r border-line px-3 py-4",children:[d.jsx("span",{className:"px-3 text-base font-semibold text-brand",children:"Telescope"}),d.jsxs("nav",{className:"flex flex-col gap-1",children:[o.map(p=>d.jsx(th,{to:p.to,end:p.end,className:x_,children:p.label},p.to)),(((c=r.data)==null?void 0:c.dashboards)??[]).map(p=>d.jsx(th,{to:`/ext/${p.id}`,className:x_,children:p.label},p.id))]}),d.jsxs("nav",{className:"flex flex-col gap-1",children:[d.jsx("span",{className:"px-3 pb-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:"Watchers"}),i.map(p=>d.jsxs(th,{to:`/entries/${p.id}`,className:z0e,children:[d.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${p.dot}`,"aria-hidden":"true"}),p.label]},p.id))]})]}),d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[d.jsx("header",{className:"flex items-center justify-end gap-4 border-b border-line px-4 py-2",children:d.jsxs(Rxe,{delay:200,children:[d.jsx(Tbe,{}),d.jsx(H0e,{onClick:()=>n(!0)}),d.jsx(V0e,{}),d.jsx(U0e,{}),d.jsx(W0e,{})]})}),d.jsx("main",{className:"min-w-0 flex-1",children:e})]})]})}function q0e(e,t){if(e===void 0||!t)return null;const n=t.direction==="up-bad";return(n?e>=t.bad:e<=t.bad)?"bad":(n?e>=t.warn:e<=t.warn)?"warn":"ok"}const G0e={ok:"var(--good)",warn:"var(--warn)",bad:"var(--bad)"};function X0e({points:e}){if(e.length<2)return null;const t=Math.max(...e),n=Math.min(...e),r=t-n||1,i=e.map((o,a)=>{const s=a/(e.length-1)*100,l=20-(o-n)/r*18-1;return`${a===0?"M":"L"}${s.toFixed(1)},${l.toFixed(1)}`}).join(" ");return d.jsxs("svg",{className:"mt-2",width:"100%",height:"22",viewBox:"0 0 100 22",preserveAspectRatio:"none",children:[d.jsx("title",{children:"Trend sparkline"}),d.jsx("path",{d:i,fill:"none",stroke:"var(--muted)",strokeWidth:"1.5"})]})}function wt({label:e,value:t,delta:n,deltaLabel:r,spark:i,thresholds:o,currentValue:a,accent:s="text-foreground",hint:l}){const u=q0e(a,o),f=n===void 0||!o?null:o.direction==="up-bad"?n<0:n>0,c=f===null?"#a1a1aa":f?"var(--good)":"var(--bad)",p=n===void 0?"":n>0?"▲":n<0?"▼":"◆";return d.jsxs("div",{"data-health":u??void 0,className:"rounded-lg border border-line bg-panel/40 px-4 py-3 overflow-hidden",children:[u&&d.jsx("div",{style:{height:3,background:G0e[u],margin:"-12px -16px 9px"}}),d.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:e}),d.jsxs("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${s} flex items-baseline gap-2`,children:[t,n!==void 0&&d.jsxs("span",{className:"text-xs font-semibold",style:{color:c},children:[p," ",r??Math.abs(n)]})]}),i&&d.jsx(X0e,{points:i}),l&&d.jsx("p",{className:"mt-0.5 text-[10px] text-muted-foreground",children:l})]})}function Y0e(e){const t=Math.max(0,Math.floor(e)),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60);return n>0?`${n}d ${r}h`:r>0?`${r}h ${i}m`:`${i}m ${t%60}s`}function Q0e({stats:e}){return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Server"}),e?d.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5",children:[d.jsx(wt,{label:"Uptime",value:Y0e(e.uptimeSec),accent:"text-brand"}),d.jsx(wt,{label:"RSS",value:`${e.memory.rssMb} MB`,hint:`heap ${e.memory.heapUsedMb}/${e.memory.heapTotalMb} MB`}),d.jsx(wt,{label:"Heap used",value:`${e.memory.heapUsedMb} MB`,accent:"text-sky-400"}),d.jsx(wt,{label:"CPU",value:`${Math.round(e.cpu.userMs)} ms`,accent:"text-violet-400",hint:`sys ${Math.round(e.cpu.systemMs)} ms`}),d.jsx(wt,{label:"Event loop",value:e.eventLoopDelayMs===null?"n/a":`${e.eventLoopDelayMs} ms`,accent:e.eventLoopDelayMs!==null&&e.eventLoopDelayMs>100?"text-bad":"text-foreground",hint:`instance ${e.instanceId}`})]}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading…"})]})}function J0e(e){return`${(Math.max(0,e)/1e3).toFixed(1)} µs`}function b_(e){return e===null?"n/a":`${e.toFixed(1)} ms`}function Z0e({health:e}){return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsxs("div",{className:"mb-3 flex items-baseline justify-between gap-3",children:[d.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Telescope health"}),d.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Captures run off the response path — your requests don't wait on Telescope."})]}),e?d.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",children:[d.jsx(wt,{label:"Capture cost",value:`${J0e(e.captureCostNanos)}/capture`,accent:"text-brand",hint:"micro-benchmark"}),d.jsx(wt,{label:"Buffer",value:`${e.bufferUsed} / ${e.bufferSize}`,accent:"text-sky-400",hint:`high-water ${e.bufferHighWater}`}),d.jsx(wt,{label:"Last flush",value:b_(e.lastFlushMs),hint:`max ${b_(e.maxFlushMs)}`}),d.jsx(wt,{label:"Flushes",value:e.flushes.toLocaleString(),accent:"text-violet-400",hint:`${e.flushedEntries.toLocaleString()} entries`}),d.jsx(wt,{label:"Dropped",value:e.droppedCount.toLocaleString(),accent:e.droppedCount>0?"text-bad":"text-good",hint:e.droppedCount>0?`overflow ${e.overflowDropped} · store ${e.storeFailedDropped}`:"keeping up"}),d.jsx(wt,{label:"Truncated",value:e.truncatedCount.toLocaleString(),accent:e.truncatedCount>0?"text-warn":"text-good",hint:e.truncatedCount>0?"fat content — tune redact/sampling":"within bounds"})]}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading…"})]})}function ewe({retention:e,pruneEnabled:t}){const n=DN(),r=e==null?void 0:e.retention;async function i(){if(globalThis.confirm("Prune now deletes entries older than the retention window. Continue?"))try{const o=await n.mutateAsync();globalThis.alert(`Pruned ${o.pruned} ${o.pruned===1?"entry":"entries"}.`)}catch{globalThis.alert("Prune failed.")}}return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsxs("div",{className:"mb-3 flex items-baseline justify-between gap-3",children:[d.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Retention"}),t?d.jsx("button",{type:"button",onClick:i,disabled:n.isPending,className:"rounded border border-line px-2 py-1 text-[11px] text-foreground hover:border-brand hover:text-brand disabled:cursor-not-allowed disabled:opacity-50",children:n.isPending?"Pruning…":"Prune now"}):null]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:[d.jsx(wt,{label:"Window",value:r?nf(r.afterMs):"none",accent:r?"text-brand":"text-muted-foreground",hint:(r==null?void 0:r.keepLast)!=null?`keep last ${r.keepLast}`:"unbounded"}),d.jsx(wt,{label:"Entries",value:(e==null?void 0:e.entryCount)!=null?e.entryCount.toLocaleString():"n/a"}),d.jsx(wt,{label:"Oldest",value:(e==null?void 0:e.oldestCreatedAt)!=null?"tracked":"n/a"})]})]})}function tF(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function twe(e){return((e==null?void 0:e.buckets)??[]).map(t=>({label:tF(t.t),value:t.total}))}function nF(e){const t=AO((e==null?void 0:e.buckets)??[]);return((e==null?void 0:e.buckets)??[]).map(n=>{const r={label:tF(n.t)};for(const i of t)r[i]=n.byType[i]??0;return r})}function nwe(e){return Object.values(e).reduce((t,n)=>t+n,0)}function rwe(e){const t=e.request??0;return t===0?null:(e.exception??0)/t}const iwe=.05;function owe(e){return e===null?"n/a":`${(e*100).toFixed(1)}%`}function awe(e){return(e==null?void 0:e.slowRoutes.length)??0}const Tw=100;function swe(e){return((e==null?void 0:e.queues)??[]).filter(t=>{const n=Math.max(0,t.total-t.completed-t.failed);return t.failed>0||n>=Tw})}function lwe({pulse:e,queues:t}){const n=(e==null?void 0:e.counts)??{},r=nwe(n),i=n.request??0,o=n.exception??0,a=rwe(n),s=((t==null?void 0:t.queues)??[]).reduce((u,f)=>u+f.failed,0),l=awe(e);return d.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[d.jsx(wt,{label:"Requests",value:i.toLocaleString(),accent:"text-brand",hint:`${r.toLocaleString()} entries total`}),d.jsx(wt,{label:"Error rate",value:owe(a),accent:a!==null&&a>iwe?"text-bad":"text-foreground",hint:`${o.toLocaleString()} exceptions`}),d.jsx(wt,{label:"Failed jobs",value:s.toLocaleString(),accent:s>0?"text-bad":"text-foreground",hint:"across queues"}),d.jsx(wt,{label:"Slow routes",value:l.toLocaleString(),accent:l>0?"text-warn":"text-foreground",hint:"routes over the slow p99 threshold"})]})}function w_({title:e,emptyLabel:t,children:n}){const r=Array.isArray(n)?n.length>0:!!n;return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),r?d.jsx("ul",{className:"space-y-1 text-xs",children:n}):d.jsx("p",{className:"text-xs text-muted-foreground",children:t})]})}function uwe({hotspots:e,onSelectFamily:t}){return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"N+1 query hotspots"}),e.length>0?d.jsx("ul",{className:"space-y-1 text-xs",children:e.map(n=>d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:()=>t(n.familyHash),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[d.jsxs("span",{className:"min-w-0 truncate",children:[d.jsxs("span",{className:"whitespace-nowrap text-warn",children:["×",n.perRequest]})," ",d.jsx("span",{className:"text-muted-foreground",children:n.sql})]}),d.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[n.requests," req · ",n.total," total",n.totalDurationMs>0?` · ${Math.round(n.totalDurationMs)}ms`:""]})]})},n.familyHash))}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"None detected"})]})}function cwe({queues:e,onOpenQueues:t}){return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsxs("div",{className:"mb-3 flex items-baseline justify-between gap-3",children:[d.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Queues needing attention"}),d.jsx("button",{type:"button",onClick:t,className:"text-[11px] text-muted-foreground hover:text-brand",children:"All queues →"})]}),e.length>0?d.jsx("ul",{className:"space-y-1 text-xs",children:e.map(n=>{const r=Math.max(0,n.total-n.completed-n.failed);return d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:t,className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[d.jsx("span",{className:"min-w-0 truncate text-foreground",children:n.queue}),d.jsxs("span",{className:"shrink-0 tabular-nums",children:[n.failed>0?d.jsxs("span",{className:"text-bad",children:[n.failed," failed"]}):null,n.failed>0&&r>=Tw?d.jsx("span",{className:"text-muted-foreground",children:" · "}):null,r>=Tw?d.jsxs("span",{className:"text-warn",children:[r.toLocaleString()," pending"]}):null]})]})},n.queue)})}):d.jsx("p",{className:"text-xs text-good",children:"All queues healthy"})]})}function fwe({hotspots:e}){return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Slowest jobs"}),e.length>0?d.jsx("ul",{className:"space-y-1 text-xs",children:e.map(t=>d.jsxs("li",{className:"flex items-center justify-between gap-3 border-t border-line-soft pt-1 first:border-0 first:pt-0",children:[d.jsx("span",{className:"min-w-0 truncate text-foreground",children:t.route}),d.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[d.jsxs("span",{className:"text-warn",children:[Math.round(t.p99),"ms"]})," p99 · ",t.count,"×"]})]},t.route))}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"No jobs in window."})]})}function dwe({users:e,onSelectUser:t}){return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Load by user"}),e.length>0?d.jsx("ul",{className:"space-y-1 text-xs",children:e.map(n=>d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:()=>t(n.user),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[d.jsx("span",{className:"min-w-0 truncate text-foreground",children:n.user}),d.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[n.count," req · ",Math.round(n.totalDurationMs),"ms"]})]})},n.user))}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"No identified users in window."})]})}function pwe({history:e}){const t=(e==null?void 0:e.samples)??[],n=t.map(a=>a.cpuPercent),r=t.map(a=>a.rssMb),i=t.map(a=>a.heapUsedMb),o=t[t.length-1];return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Resource history"}),t.length>1?d.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["CPU ",o?`${o.cpuPercent}%`:""]}),d.jsx(ch,{values:n})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["RSS ",o?`${o.rssMb}MB`:""]}),d.jsx(ch,{values:r})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["Heap ",o?`${o.heapUsedMb}MB`:""]}),d.jsx(ch,{values:i})]})]}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"Collecting samples…"})]})}function hwe(){var y,x,m,g,b,S,w;const[e,t]=O.useState("1h"),n=xi(),r=FN(e),i=BN(e),o=D1({window:e,buckets:60}),a=QU(),s=JU(),l=e5(),u=HU(),f=ks(),c=twe(o.data),p=nF(o.data),h=AO(((y=o.data)==null?void 0:y.buckets)??[]),v=swe(i.data);return d.jsxs("div",{className:"space-y-4 p-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-sm text-brand",children:"Overview"}),d.jsx(Kd,{value:e,onChange:t})]}),d.jsx(lwe,{pulse:r.data,queues:i.data}),d.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[d.jsx(w_,{title:"Recent failures",emptyLabel:"No exceptions 🎉",children:(((x=r.data)==null?void 0:x.topExceptions)??[]).map(P=>d.jsxs("li",{className:"flex items-center justify-between gap-3 border-t border-line-soft pt-1 first:border-0 first:pt-0",children:[d.jsxs("span",{className:"min-w-0",children:[d.jsx("span",{className:"text-bad",children:P.class})," ",d.jsx("span",{className:"text-muted-foreground",children:P.message})]}),d.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:["×",P.count]})]},P.familyHash))}),d.jsx(uwe,{hotspots:((m=r.data)==null?void 0:m.nPlusOne)??[],onSelectFamily:P=>n(`/entries/query?familyHash=${encodeURIComponent(P)}`)})]}),d.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[d.jsx(w_,{title:"Slowest",emptyLabel:"Nothing slow in window.",children:(((g=r.data)==null?void 0:g.slowest)??[]).map(P=>d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:()=>n(`/entries/view/${P.id}`),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[d.jsxs("span",{className:"min-w-0 truncate",children:[d.jsx("span",{className:"text-brand",children:P.type})," ",d.jsx("span",{className:"text-muted-foreground",children:P.label})]}),d.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[P.durationMs,"ms"]})]})},P.id))}),d.jsx(cwe,{queues:v,onOpenQueues:()=>n("/queues")})]}),d.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[d.jsx(fwe,{hotspots:((b=r.data)==null?void 0:b.slowJobs)??[]}),d.jsx(dwe,{users:((S=r.data)==null?void 0:S.loadByUser)??[],onSelectUser:P=>n(`/entries?tag=${encodeURIComponent(`user:${P}`)}`)})]}),d.jsx(pwe,{history:s.data}),d.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[d.jsx(Ds,{title:"Throughput",valueLabel:"entries",data:c}),d.jsx(jO,{title:"By type",series:h,data:p})]}),d.jsx(Q0e,{stats:a.data}),d.jsx(Z0e,{health:l.data}),d.jsx(ewe,{retention:u.data,pruneEnabled:((w=f.data)==null?void 0:w.pruneEnabled)??!1})]})}function mwe(){const{data:e}=$N(),t=(e==null?void 0:e.queues)??[],n=e==null?void 0:e.capabilities,[r,i]=O.useState(void 0),[o,a]=O.useState("waiting"),[s,l]=O.useState(null);O.useEffect(()=>{if(r||t.length===0)return;const c=t[0];c&&i({driver:c.driver,queue:c.queue})},[t,r]);const u=t.find(c=>c.driver===(r==null?void 0:r.driver)&&c.queue===(r==null?void 0:r.queue));function f(c,p){i({driver:c,queue:p}),l(null)}return d.jsxs("div",{className:"grid grid-cols-1 gap-4 p-4 lg:grid-cols-[280px_minmax(0,1fr)]",children:[d.jsxs("aside",{className:"space-y-2",children:[d.jsx("h3",{className:"px-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:"Live queues"}),d.jsx(o0e,{...r?{selected:r}:{},onSelect:f})]}),d.jsx("section",{className:"min-w-0 space-y-3",children:r?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("h2",{className:"truncate text-sm text-brand",children:[r.queue,d.jsx("span",{className:"ml-2 text-[10px] uppercase tracking-wide text-muted-foreground",children:r.driver})]}),o==="failed"&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(g0e,{capabilities:n,driver:r.driver,queue:r.queue}),d.jsx(y0e,{capabilities:n,driver:r.driver,queue:r.queue})]})]}),d.jsx(a0e,{counts:u==null?void 0:u.counts,state:o,onState:a}),d.jsx(c0e,{driver:r.driver,queue:r.queue,state:o,onOpen:l}),d.jsx(O0e,{capabilities:n,driver:r.driver,queue:r.queue})]}):d.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-12 text-center text-xs text-muted-foreground",children:"Select a queue to inspect its jobs."})}),r&&s&&d.jsx(b0e,{driver:r.driver,queue:r.queue,jobId:s,state:o,capabilities:n,onClose:()=>l(null)})]})}function gwe(e,t){return t.trim()!==""?`No entries match tag '${t.trim()}'`:e?`No ${Tg(e)} entries`:"No entries"}function S_(){const{type:e}=Eg(),t=xi(),[n]=cU(),[r,i]=O.useState(()=>n.get("tag")??""),[o,a]=O.useState(""),[s,l]=O.useState(""),[u,f]=O.useState(0),[c,p]=O.useState(0);function h(k){i(k),p(D=>D+1)}function v(k){i(k),f(D=>D+1)}const y=e&&h5(e)?e:void 0,x=r.trim(),m=Fxe(x)?x:"",g=m===""?x:"",b=s.trim(),S=n.get("familyHash")??"",w=S!=="",P=b!=="",j=y!==void 0||x!==""||w||P,{data:E,isLoading:A}=LN({...y?zN(y):{},...x!==""?{tag:x}:{},...w?{familyHash:S}:{},...P?{search:b}:{}}),C=(E==null?void 0:E.data)??[];function _(){l(o)}function T(){a(""),l("")}function R(){i(""),T(),t("/entries")}function M(){t(y?`/entries/${y}`:"/entries")}return d.jsxs("div",{className:"p-4",children:[y?d.jsx(Xbe,{type:y}):null,d.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-3 border-b border-line pb-3",children:[y?d.jsxs(Ye,{variant:"ghost",onClick:()=>t("/entries"),className:"bg-panel text-foreground hover:bg-panel-2",children:[d.jsx("span",{className:`h-2 w-2 rounded-full ${L1(y)}`,"aria-hidden":"true"}),Tg(y),d.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):d.jsx("span",{className:"rounded bg-panel px-2 py-1 text-xs text-muted-foreground",children:"All types"}),d.jsx(h_,{onSelect:h},`tag-${u}`),d.jsx(h_,{prefix:Lxe,placeholder:"Filter by user…",ariaLabel:"Filter by user",onSelect:v},`user-${c}`),g!==""?d.jsxs(Ye,{variant:"ghost",onClick:()=>i(""),className:"bg-panel text-foreground hover:bg-panel-2",children:[d.jsx("span",{children:`tag:${g}`}),d.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,m!==""?d.jsxs(Ye,{variant:"ghost",onClick:()=>i(""),className:"bg-panel text-foreground hover:bg-panel-2",children:[d.jsx("span",{children:`User: ${OO(m)}`}),d.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,d.jsx(Es,{type:"text",value:o,onChange:k=>a(k.target.value),onKeyDown:k=>{k.key==="Enter"&&_()},onBlur:_,placeholder:"Search content…","aria-label":"Search content"}),P?d.jsxs(Ye,{variant:"ghost",onClick:T,className:"bg-panel text-foreground hover:bg-panel-2",children:[d.jsx("span",{children:`search:"${b}"`}),d.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,w?d.jsxs(Ye,{variant:"ghost",onClick:M,className:"bg-panel text-foreground hover:bg-panel-2",children:[d.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"family:"}),S.slice(0,12),d.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,j?d.jsx(Ye,{variant:"ghost",onClick:R,children:"Clear filters"}):null]}),A?d.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):C.length===0?d.jsx("p",{className:"text-muted-foreground",children:gwe(y,r)}):d.jsx(WL,{entries:C,onSelect:k=>t(`/entries/view/${k}`)})]})}function ywe(){const{id:e=""}=Eg(),t=xi(),{data:n,isLoading:r}=YU(e);return d.jsxs("div",{className:"p-4",children:[d.jsx("button",{type:"button",onClick:()=>t("/entries"),className:"mb-4 text-xs text-muted-foreground hover:text-foreground",children:"← entries"}),r||!n?d.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):d.jsx(lbe,{entry:n,onSelect:i=>t(`/entries/view/${i}`)})]})}const vwe={json:"JSON",csv:"CSV"},xwe={all:"all",...Object.fromEntries(ql.map(e=>[e.id,e.label]))},bwe=200,O_=1e3,P_=1e4,j_={"15m":15*6e4,"1h":60*6e4,"6h":6*60*6e4,"24h":24*60*6e4};function wwe(e){return e==="all"?{}:zN(e)}async function Swe(e,t,n,r,i){const o=[];let a;for(;o.length<n;){const s=Math.min(bwe,n-o.length),l=await e.entries({...t,limit:s,...a!==void 0?{cursor:a}:{}});let u=!1;for(const f of l.data){if(new Date(f.createdAt).getTime()<r){u=!0;break}if(o.push(f),o.length>=n)break}if(i(o.length),u||l.nextCursor===null)break;a=l.nextCursor}return o}function Owe({records:e}){return e.length===0?null:d.jsx("div",{className:"rounded-lg border border-line",children:d.jsxs(Fd,{className:"min-w-[640px] text-left",children:[d.jsx(Bd,{children:d.jsxs(kr,{children:[d.jsx(qe,{children:"Filename"}),d.jsx(qe,{children:"Type"}),d.jsx(qe,{children:"Rows"}),d.jsx(qe,{children:"Format"}),d.jsx(qe,{children:"Time"})]})}),d.jsx(zd,{children:e.map(t=>d.jsxs(kr,{className:"hover:bg-panel",children:[d.jsx(nt,{className:"font-mono text-foreground",children:t.filename}),d.jsx(nt,{className:"text-muted-foreground",children:t.type}),d.jsx(nt,{className:"tabular-nums text-foreground",children:t.rows.toLocaleString()}),d.jsx(nt,{className:"uppercase text-muted-foreground",children:t.format}),d.jsx(nt,{className:"text-muted-foreground",children:new Date(t.at).toLocaleTimeString()})]},`${t.filename}:${t.at}`))})]})})}function Pwe(){const e=Be(),t=O.useId(),n=O.useId(),[r,i]=O.useState("all"),[o,a]=O.useState("1h"),[s,l]=O.useState(""),[u,f]=O.useState(O_),[c,p]=O.useState("json"),[h,v]=O.useState(!1),[y,x]=O.useState(null),[m,g]=O.useState(null),[b,S]=O.useState([]);async function w(){v(!0),g(null),x(0);const P=Math.min(Math.max(1,u),P_),j=Date.now()-(j_[o]??j_["1h"]),E={...wwe(r),...s.trim()!==""?{search:s.trim()}:{}};try{const A=await Swe(e,E,P,j,x),C=new Date().toISOString().replace(/[:.]/g,"-"),_=`telescope-export-${r}-${C}.${c}`;c==="csv"?Abe(_,Ebe(A)):PO(_,A),S(T=>[{filename:_,type:r,rows:A.length,format:c,at:Date.now()},...T])}catch{g("Export failed while gathering entries.")}finally{v(!1)}}return d.jsxs("div",{className:"space-y-4 p-4",children:[d.jsxs("div",{className:"px-1",children:[d.jsx("h3",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Export workbench"}),d.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Page captured entries into a downloadable JSON or CSV file. Gathering runs in your browser against the live store, newest-first within the selected window."})]}),d.jsxs("div",{className:"flex flex-wrap items-end gap-3 rounded-lg border border-line bg-panel/40 p-4",children:[d.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:["Type",d.jsxs(Sw,{items:xwe,value:r,onValueChange:P=>{typeof P=="string"&&i(P)},children:[d.jsx(Pw,{"aria-label":"Entry type",children:d.jsx(Ow,{})}),d.jsxs(jw,{children:[d.jsx(Lc,{value:"all",children:"all"}),ql.map(P=>d.jsx(Lc,{value:P.id,children:P.label},P.id))]})]})]}),d.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:["Window",d.jsx(Kd,{value:o,onChange:a})]}),d.jsxs("label",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",htmlFor:t,children:["Search",d.jsx(Es,{id:t,type:"text",value:s,onChange:P=>l(P.target.value),placeholder:"content filter"})]}),d.jsxs("label",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",htmlFor:n,children:["Limit",d.jsx(Es,{id:n,type:"number",min:1,max:P_,value:u,onChange:P=>f(Number(P.target.value)||O_),className:"w-24 tabular-nums"})]}),d.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:["Format",d.jsxs(Sw,{items:vwe,value:c,onValueChange:P=>p(P==="csv"?"csv":"json"),children:[d.jsx(Pw,{"aria-label":"Export format",children:d.jsx(Ow,{})}),d.jsxs(jw,{children:[d.jsx(Lc,{value:"json",children:"JSON"}),d.jsx(Lc,{value:"csv",children:"CSV"})]})]})]}),d.jsx(Ye,{onClick:w,disabled:h,size:"md",children:h?"Exporting…":"Export"}),h&&y!==null&&d.jsxs("span",{className:"text-xs tabular-nums text-muted-foreground",children:["gathered ",y.toLocaleString(),"…"]})]}),m&&d.jsx("p",{className:"px-1 text-xs text-bad",children:m}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("h4",{className:"px-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:"Recent exports (this session)"}),b.length===0?d.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-10 text-center text-xs text-muted-foreground",children:"No exports yet. Pick a type, window, and format, then export."}):d.jsx(Owe,{records:b})]})]})}function jwe({title:e,segments:t,style:n="donut",height:r=220,onSelect:i}){const o=r-64,a=O.useMemo(()=>nc(t.map(f=>f.label),(f,c)=>{var p;return lx(f,c,(p=t[c])==null?void 0:p.color)}),[t]);function s(f){const c=t[f];c&&i&&i(Ud({label:c.label,value:c.value}))}const l=i?{onClick:(f,c)=>s(c),cursor:"pointer"}:{};if(t.length===0)return d.jsx(na,{title:e,height:o,children:d.jsx(Vd,{height:o})});if(n==="bar"){const f=[{name:"breakdown",...Object.fromEntries(t.map(c=>[c.label,c.value]))}];return d.jsx(na,{title:e,height:o,children:d.jsx(Ss,{config:a,children:d.jsxs(YS,{data:f,layout:"vertical",children:[d.jsx(xu,{content:d.jsx(bu,{hideLabel:!0})}),d.jsx(ew,{content:d.jsx(nw,{})}),t.map((c,p)=>d.jsx(fo,{dataKey:c.label,stackId:"a",fill:lx(c.label,p,c.color),isAnimationActive:!1,...i?{onClick:()=>s(p),cursor:"pointer"}:{}},c.label))]})})})}const u=t.map((f,c)=>({name:f.label,value:f.value,color:lx(f.label,c,f.color)}));return d.jsx(na,{title:e,height:o,children:d.jsx(Ss,{config:a,children:d.jsxs(Lpe,{children:[d.jsx(xu,{content:d.jsx(bu,{hideLabel:!0})}),d.jsx(ew,{content:d.jsx(nw,{})}),d.jsx(co,{data:u,dataKey:"value",nameKey:"name",innerRadius:"55%",outerRadius:"80%",isAnimationActive:!1,...l,children:u.map(f=>d.jsx(Wu,{fill:f.color},f.name))})]})})})}function Ewe(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`}const Awe={p50:"tint-good",p95:"tint-warn",p99:"tint-bad"};function Cwe({title:e,buckets:t,p50:n,p95:r,p99:i,height:o=220,onSelect:a}){const s=[];n!==void 0&&s.push([n,"p50"]),r!==void 0&&s.push([r,"p95"]),i!==void 0&&s.push([i,"p99"]);const l=o-64,u=O.useMemo(()=>nc(["count"],()=>"var(--live)"),[]),f=a?{onClick:(c,p)=>{const h=t[p];h&&a(Ud({label:h.label,value:h.count}))},cursor:"pointer"}:{};return d.jsx(na,{title:e,height:l,children:d.jsxs("div",{className:"flex h-full flex-col",children:[s.length>0&&d.jsx("div",{className:"mb-1.5 flex flex-wrap gap-2",children:s.map(([c,p])=>d.jsxs("span",{className:`rounded border px-1.5 text-[10px] tabular-nums ${Awe[p]}`,children:[p,": ",Ewe(c)]},p))}),d.jsx("div",{className:"min-h-0 flex-1",children:t.length===0?d.jsx(Vd,{}):d.jsx(Ss,{config:u,children:d.jsxs(YS,{data:t,margin:{top:4,right:8,bottom:0,left:-16},children:[d.jsx(_d,{vertical:!1}),d.jsx(Zi,{dataKey:"label",tickLine:!1}),d.jsx(eo,{tickLine:!1,allowDecimals:!1,width:40}),d.jsx(xu,{cursor:{fill:"color-mix(in srgb, var(--text) 5%, transparent)"},content:d.jsx(bu,{})}),d.jsx(fo,{dataKey:"count",name:"count",fill:Ui("count"),radius:[3,3,0,0],isAnimationActive:!1,...f})]})})})]})})}function Twe({title:e,value:t,min:n=0,max:r=1,label:i,color:o="var(--good)",height:a=220}){const s=r-n,l=s===0?0:Math.max(0,Math.min(1,(t-n)/s)),u=i??`${Math.round(l*100)}%`,f=a-64,c=O.useMemo(()=>nc(["value"],()=>o,()=>e),[o,e]),p=[{value:l*100}];return d.jsx(na,{title:e,height:f,children:d.jsxs("div",{className:"relative h-full",children:[d.jsx(Ss,{config:c,children:d.jsxs(Fpe,{innerRadius:"60%",outerRadius:"100%",data:p,startAngle:180,endAngle:0,barSize:16,children:[d.jsx(Xu,{type:"number",domain:[0,100],tick:!1,axisLine:!1}),d.jsx(Td,{dataKey:"value",fill:Ui("value"),background:!0,cornerRadius:4,isAnimationActive:!1})]})}),d.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center pt-[40%]",children:d.jsx("span",{className:"text-xl font-semibold tabular-nums text-foreground",children:u})})]})})}function _we({columns:e}){const[t,n]=O.useState(!1),r=O.useRef(null),i=e.filter(a=>a.getCanHide());if(O.useEffect(()=>{if(!t)return;function a(l){var u;l.target instanceof Node&&((u=r.current)!=null&&u.contains(l.target))||n(!1)}function s(l){l.key==="Escape"&&n(!1)}return document.addEventListener("mousedown",a),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",s)}},[t]),i.length===0)return null;const o=i.filter(a=>!a.getIsVisible()).length;return d.jsxs("div",{className:"relative",ref:r,children:[d.jsxs(Ye,{variant:"ghost",size:"xs","aria-haspopup":"menu","aria-expanded":t,onClick:()=>n(a=>!a),className:"px-1.5 text-muted-foreground",children:["Columns",o>0?` (${i.length-o}/${i.length})`:""]}),t&&d.jsx("div",{role:"menu",className:"absolute right-0 z-20 mt-1 min-w-[10rem] rounded border border-line bg-popover p-1 shadow-lg",children:i.map(a=>d.jsxs(Ye,{role:"menuitemcheckbox","aria-checked":a.getIsVisible(),variant:"ghost",size:"xs",onClick:()=>a.toggleVisibility(),className:"w-full justify-start gap-2 normal-case tracking-normal",children:[d.jsx("span",{"aria-hidden":"true",className:a.getIsVisible()?"":"opacity-30",children:a.getIsVisible()?"☑":"☐"}),typeof a.columnDef.header=="string"?a.columnDef.header:a.id]},a.id))})]})}function kwe(e){return Rwe(e)||typeof e=="function"||Nwe(e)}function Rwe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Nwe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Wa(e,t){return e==null?null:kwe(e)?I.createElement(e,t):e}function Mwe(e){var t,n;if("cell"in e&&e.cell){const r=e.cell,i=r.column.columnDef,o=r,a=i;return(t=o.getIsAggregated)!=null&&t.call(o)?Wa(a.aggregatedCell??i.cell,r.getContext()):(n=o.getIsPlaceholder)!=null&&n.call(o)?null:Wa(i.cell,r.getContext())}return"header"in e&&e.header?Wa(e.header.column.columnDef.header,e.header.getContext()):"footer"in e&&e.footer?Wa(e.footer.column.columnDef.footer,e.footer.getContext()):null}let we=function(e){return e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e}({});function $we({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:o,checkDirty:a,shallowPropagate:s};function r(u,f,c){const p=f.depsTail;if(p!==void 0&&p.dep===u)return;const h=p!==void 0?p.nextDep:f.deps;if(h!==void 0&&h.dep===u){h.version=c,f.depsTail=h;return}const v=u.subsTail;if(v!==void 0&&v.version===c&&v.sub===f)return;const y=f.depsTail=u.subsTail={version:c,dep:u,sub:f,prevDep:p,nextDep:h,prevSub:v,nextSub:void 0};h!==void 0&&(h.prevDep=y),p!==void 0?p.nextDep=y:f.deps=y,v!==void 0?v.nextSub=y:u.subs=y}function i(u,f=u.sub){const c=u.dep,p=u.prevDep,h=u.nextDep,v=u.nextSub,y=u.prevSub;return h!==void 0?h.prevDep=p:f.depsTail=p,p!==void 0?p.nextDep=h:f.deps=h,v!==void 0?v.prevSub=y:c.subsTail=y,y!==void 0?y.nextSub=v:(c.subs=v)===void 0&&n(c),h}function o(u){let f=u.nextSub,c;e:do{const p=u.sub;let h=p.flags;if(h&(we.RecursedCheck|we.Recursed|we.Dirty|we.Pending)?h&(we.RecursedCheck|we.Recursed)?h&we.RecursedCheck?!(h&(we.Dirty|we.Pending))&&l(u,p)?(p.flags=h|(we.Recursed|we.Pending),h&=we.Mutable):h=we.None:p.flags=h&~we.Recursed|we.Pending:h=we.None:p.flags=h|we.Pending,h&we.Watching&&t(p),h&we.Mutable){const v=p.subs;if(v!==void 0){const y=(u=v).nextSub;y!==void 0&&(c={value:f,prev:c},f=y);continue}}if((u=f)!==void 0){f=u.nextSub;continue}for(;c!==void 0;)if(u=c.value,c=c.prev,u!==void 0){f=u.nextSub;continue e}break}while(!0)}function a(u,f){let c,p=0,h=!1;e:do{const v=u.dep,y=v.flags;if(f.flags&we.Dirty)h=!0;else if((y&(we.Mutable|we.Dirty))===(we.Mutable|we.Dirty)){if(e(v)){const x=v.subs;x.nextSub!==void 0&&s(x),h=!0}}else if((y&(we.Mutable|we.Pending))===(we.Mutable|we.Pending)){(u.nextSub!==void 0||u.prevSub!==void 0)&&(c={value:u,prev:c}),u=v.deps,f=v,++p;continue}if(!h){const x=u.nextDep;if(x!==void 0){u=x;continue}}for(;p--;){const x=f.subs,m=x.nextSub!==void 0;if(m?(u=c.value,c=c.prev):u=x,h){if(e(f)){m&&s(x),f=u.sub;continue}h=!1}else f.flags&=~we.Pending;f=u.sub;const g=u.nextDep;if(g!==void 0){u=g;continue e}}return h}while(!0)}function s(u){do{const f=u.sub,c=f.flags;(c&(we.Pending|we.Dirty))===we.Pending&&(f.flags=c|we.Dirty,(c&(we.Watching|we.RecursedCheck))===we.Watching&&t(f))}while((u=u.nextSub)!==void 0)}function l(u,f){let c=f.depsTail;for(;c!==void 0;){if(c===u)return!0;c=c.prevDep}return!1}}function Iwe(e,t,n){var o,a,s;const r=typeof e=="object",i=r?e:void 0;return{next:(o=r?e.next:e)==null?void 0:o.bind(i),error:(a=r?e.error:t)==null?void 0:a.bind(i),complete:(s=r?e.complete:n)==null?void 0:s.bind(i)}}const _w=[];let fh=0;const{link:E_,unlink:Dwe,propagate:Lwe,checkDirty:rF,shallowPropagate:A_}=$we({update(e){return e._update()},notify(e){_w[kw++]=e,e.flags&=~we.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=we.Mutable|we.Dirty,rg(e))}});let zp=0,kw=0,ri,Rw=0;function Fwe(e){try{++Rw,e()}finally{--Rw||iF()}}function rg(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=Dwe(n,e)}function iF(){if(!(Rw>0)){for(;zp<kw;){const e=_w[zp];_w[zp++]=void 0,e.notify()}zp=0,kw=0}}function Bwe(e,t){const n=typeof e=="function",r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?we.None:we.Mutable,get(){return ri!==void 0&&E_(i,ri,fh),i._snapshot},subscribe(o){const a=Iwe(o),s={current:!1},l=zwe(()=>{var u;i.get(),s.current?(u=a.next)==null||u.call(a,i._snapshot):s.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(o){const a=ri,s=(t==null?void 0:t.compare)??Object.is;if(n)ri=i,++fh,i.depsTail=void 0;else if(o===void 0)return!1;n&&(i.flags=we.Mutable|we.RecursedCheck);try{const l=i._snapshot,u=typeof o=="function"?o(l):o===void 0&&n?r(l):o;return l===void 0||!s(l,u)?(i._snapshot=u,!0):!1}finally{ri=a,n&&(i.flags&=~we.RecursedCheck),rg(i)}}};return n?(i.flags=we.Mutable|we.Dirty,i.get=function(){const o=i.flags;if(o&we.Dirty||o&we.Pending&&rF(i.deps,i)){if(i._update()){const a=i.subs;a!==void 0&&A_(a)}}else o&we.Pending&&(i.flags=o&~we.Pending);return ri!==void 0&&E_(i,ri,fh),i._snapshot}):i.set=function(o){if(i._update(o)){const a=i.subs;a!==void 0&&(Lwe(a),A_(a),iF())}},i}function zwe(e){const t=()=>{const r=ri;ri=n,++fh,n.depsTail=void 0,n.flags=we.Watching|we.RecursedCheck;try{return e()}finally{ri=r,n.flags&=~we.RecursedCheck,rg(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:we.Watching|we.RecursedCheck,notify(){const r=this.flags;r&we.Dirty||r&we.Pending&&rF(this.deps,this)?t():this.flags=we.Watching},stop(){this.flags=we.None,this.depsTail=void 0,rg(this)}};return t(),n}function rf(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!t.has(r)||!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=C_(e);if(n.length!==C_(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function C_(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}function Uwe(e,t){return e===t}function oF(e,t=r=>r,n){const r=(n==null?void 0:n.compare)??Uwe,i=O.useCallback(a=>{const{unsubscribe:s}=e.subscribe(a);return s},[e]),o=O.useCallback(()=>e.get(),[e]);return ZD.useSyncExternalStoreWithSelector(i,o,o,t,r)}function Vwe(e){const t=oF(e.source,e.selector,{compare:rf});return typeof e.children=="function"?e.children(t):e.children}function Hwe(e){const t=e;return Object.defineProperty(e,"state",{get(){return e.get()}}),"set"in e&&(t.setState=e.set.bind(e)),t}function Wwe(e){const{createAtom:t,batch:n}=e,r=t(0);return{createOptionsStore:!1,wrapExternalAtoms:!1,addSubscription:()=>{throw new Error("Feature not supported in current reactivity implementation")},unmount:()=>{throw new Error("Feature not supported in current reactivity implementation")},schedule:e.schedule??(i=>queueMicrotask(i)),batch:n,untrack:i=>i(),createReadonlyAtom:(i,o)=>{const a=(o==null?void 0:o.compare)??Object.is;let s=!1,l;const u=()=>{const c=i();return(!s||!a(l,c))&&(l=c,s=!0),l},f=t(()=>(r.get(),u()),{compare:a});return{get:u,subscribe:f.subscribe.bind(f)}},createWritableAtom:(i,o)=>t(i,{compare:o==null?void 0:o.compare}),commit:()=>{r.set(i=>i+1)}}}function Kwe(e,t=Object.is){let n=!1,r;return{get:e.get,markCommitted:i=>{r=i,n=!0},subscribe:i=>e.subscribe(o=>{(!n||!t(r,o))&&i(o)})}}function qwe(){return Wwe({createAtom:Bwe,batch:Fwe})}function rc(e,t){return typeof e=="function"?e(t):e}function ro(e){if(Array.isArray(e))return e.map(ro);if(e&&typeof e=="object"){const t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return e;const n=t===null?Cn():{},r=Object.keys(e);for(let i=0;i<r.length;i++){const o=r[i];Object.defineProperty(n,o,{configurable:!0,enumerable:!0,value:ro(e[o]),writable:!0})}return n}return e}function Cn(){return Object.create(null)}function $y(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function kO(e,t){return n=>{var r;(((r=t.options.atoms)==null?void 0:r[e])??t.baseAtoms[e]).set(i=>rc(n,i))}}function aF(e){return e instanceof Function}function Gwe(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a.length&&r(a)})};return r(e),n}const Xwe=({fn:e,memoDeps:t,onAfterCompare:n,onAfterUpdate:r,onBeforeCompare:i,onBeforeUpdate:o})=>{let a=[],s;return u=>{i==null||i();const f=t==null?void 0:t(u);let c=!f||f.length!==(a==null?void 0:a.length);if(!c&&f){for(let p=0;p<f.length;p++)if(f[p]!==a[p]){c=!0;break}}return n==null||n(c),c&&(a=f,o==null||o(),s=e(...f??[]),r==null||r(s)),s}};function Ywe(e){let t=!1;return()=>{if(!t){t=!0;return}e()}}function RO({feature:e,fnName:t,objectId:n,onAfterUpdate:r,table:i,...o}){const a=()=>{if(!r)return;const{schedule:l,untrack:u}=i._reactivity;l(()=>u(()=>r()))};return Xwe({...o,...{onAfterUpdate:()=>{a()}}})}function sF(e,t="_"){const[n,r]=e.split(t);return{fnKey:r,fnName:`${n}.${r}`,parentName:n}}function wa(e,t,n){for(const[r,{fn:i,memoDeps:o}]of Object.entries(n)){const{fnKey:a,fnName:s}=sF(r);t[a]=o?RO({memoDeps:o,fn:i,fnName:s,table:t,feature:e}):i}}function la(e,t,n,r){for(const[i,{fn:o,memoDeps:a}]of Object.entries(r)){const{fnKey:s,fnName:l}=sF(i);if(a){const u=`_memo_${s}`;t[s]=function(...f){if(!this[u]){const c=this;this[u]=RO({memoDeps:p=>a(c,p),fn:(...p)=>o(c,...p),fnName:l,objectId:c.id,table:n,feature:e})}return this[u](...f)}}else t[s]=function(...u){return o(this,...u)}}}function fn(e,t,n,...r){var i;return((i=e[t])==null?void 0:i.call(e,...r))??n(e,...r)}function Qwe(e){return e.row.getValue(e.column.id)}function Jwe(e){return e.getValue()??e.table.options.renderFallbackValue}function Zwe(e){return{table:e.table,column:e.column,row:e.row,cell:e,getValue:()=>e.getValue(),renderValue:()=>e.renderValue()}}const e1e={assignCellPrototype:(e,t)=>{la("coreCellsFeature",e,t,{cell_getValue:{fn:n=>Qwe(n)},cell_renderValue:{fn:n=>Jwe(n)},cell_getContext:{fn:n=>Zwe(n),memoDeps:n=>[n]}})}};function t1e(e){var t,n;if(!e._headerPrototype){e._headerPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignHeaderPrototype)==null||n.call(t,e._headerPrototype,e)}return e._headerPrototype}function lF(e,t,n){const r=t1e(e),i=Object.create(r);i.colSpan=0,i.column=t,i.depth=n.depth,i.headerGroup=null,i.id=n.id??t.id,i.index=n.index,i.isPlaceholder=!!n.isPlaceholder,i.placeholderId=n.placeholderId,i.rowSpan=0,i.subHeaders=[];const o=e._headerInstanceInitFns;for(let a=0;a<o.length;a++)o[a](i);return i}function uF(){return{start:[],end:[]}}function n1e(){return Cn()}function cF(e,t){ig(e)&&Iy(e.table,n=>{const r=Object.assign(Cn(),n),i=t??!fn(e,"getIsVisible",Qn),o=e.getLeafColumns();for(let a=0;a<o.length;a++){const s=o[a];ig(s)&&(r[s.id]=i)}return r})}function Qn(e){var r;const t=(r=e.table.atoms.columnVisibility)==null?void 0:r.get();if(!t)return!0;const n=e.columns;return n.length?n.some(i=>fn(i,"getIsVisible",Qn)):($y(t,e.id)?t[e.id]:void 0)??!0}function ig(e){return(e.columnDef.enableHiding??!0)&&(e.table.options.enableHiding??!0)}function r1e(e){return t=>{cF(e,t.target.checked)}}function i1e(e){var u;const t=e.getAllCells(),n=[];for(let f=0;f<t.length;f++){const c=t[f];fn(c.column,"getIsVisible",Qn)&&n.push(c)}const{start:r,end:i}=((u=e.table.atoms.columnPinning)==null?void 0:u.get())??uF();if(!r.length&&!i.length)return n;const o=fn(e,"getVisibleCellsByColumnId",fF),a=[];for(let f=0;f<r.length;f++){const c=o[r[f]];c&&a.push(c)}const s=[];for(let f=0;f<i.length;f++){const c=o[i[f]];c&&s.push(c)}const l=[];for(let f=0;f<n.length;f++){const c=n[f],p=c.column.id;!r.includes(p)&&!i.includes(p)&&l.push(c)}return[...a,...l,...s]}function fF(e){const t=Cn(),n=e.getAllCells();for(let r=0;r<n.length;r++){const i=n[r];fn(i.column,"getIsVisible",Qn)&&(t[i.column.id]=i)}return t}function o1e(e){return e.getAllFlatColumns().filter(t=>fn(t,"getIsVisible",Qn))}function dF(e){return e.getAllLeafColumns().filter(t=>fn(t,"getIsVisible",Qn))}function Iy(e,t){var n,r;(r=(n=e.options).onColumnVisibilityChange)==null||r.call(n,t)}function a1e(e,t){Iy(e,t?Cn():Object.assign(Cn(),ro(e.initialState.columnVisibility??{})))}function pF(e,t){t=t??!hF(e);const n=Cn(),r=e.getAllLeafColumns();for(let i=0;i<r.length;i++){const o=r[i];n[o.id]=t||!ig(o)}Iy(e,n)}function hF(e){return!e.getAllLeafColumns().some(t=>!fn(t,"getIsVisible",Qn))}function s1e(e){return e.getAllLeafColumns().some(t=>fn(t,"getIsVisible",Qn))}function l1e(e){return t=>{pF(e,t.target.checked)}}function mF(e,t=1){let n=t;for(let r=0;r<e.length;r++){const i=e[r];fn(i,"getIsVisible",Qn)&&i.columns.length&&(n=Math.max(n,mF(i.columns,t+1)))}return n}function u1e(e,t){return String(t)}function c1e(e,t,n,r){let i=e??"";return t&&(i=i?`${i}_${t}`:String(t)),n&&(i=i?`${i}_${n}`:n),r&&(i=i?`${i}_${r}`:r),i}function f1e(e,t){let n=0;for(let r=0;r<e.length;r++)e[r].column===t&&n++;return n}function gF(e,t,n,r,i,o){const a={depth:t,id:u1e(r,t),headers:[]},s=[];for(let l=0;l<e.length;l++){if(!(l in e))continue;const u=e[l],f=s[s.length-1],c=u.column.depth===a.depth;let p,h=!1;if(c&&u.column.parent?p=u.column.parent:(p=u.column,h=!0),f&&f.column===p)f.subHeaders.push(u);else{const v=lF(n,p,{id:c1e(r,t,p.id,u.id),isPlaceholder:h,placeholderId:h?String(f1e(s,p)):void 0,depth:t,index:s.length});v.subHeaders.push(u),s.push(v)}a.headers.push(u),u.headerGroup=a}for(let l=0;l<o.length;l++)o[l](a);i.push(a),t>0&&gF(s,t-1,n,r,i,o)}function yF(e){for(let t=0;t<e.length;t++){const n=e[t];if(!fn(n.column,"getIsVisible",Qn))continue;let r=0;if(n.subHeaders.length){yF(n.subHeaders);for(let i=0;i<n.subHeaders.length;i++){const o=n.subHeaders[i];fn(o.column,"getIsVisible",Qn)&&(r+=o.colSpan)}}else r=1;if(n.colSpan=r,n.isPlaceholder&&n.subHeaders.length===1&&n.subHeaders[0].column===n.column){let i=1,o=n.subHeaders[0];for(;o;)o.rowSpan=0,i++,o=o.subHeaders.length===1&&o.subHeaders[0].column===n.column?o.subHeaders[0]:void 0;n.rowSpan=i}else n.rowSpan=1}}function T_(e,t,n,r){var l;const i=mF(e),o=[],a=n._headerGroupInstanceInitFns,s=new Array(t.length);for(let u=0;u<t.length;u++)u in t&&(s[u]=lF(n,t[u],{depth:i,index:u}));return gF(s,i-1,n,r,o,a),o.reverse(),yF(((l=o[0])==null?void 0:l.headers)??[]),o}function d1e(e){var t,n;if(!e._columnPrototype){e._columnPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignColumnPrototype)==null||n.call(t,e._columnPrototype,e)}return e._columnPrototype}function p1e(e,t,n,r){const i={...e.getDefaultColumnDef(),...t},o=i.accessorKey,a=o===void 0?void 0:String(o),s=i.id??(a==null?void 0:a.replaceAll(".","_"))??(typeof i.header=="string"?i.header:void 0);let l;if(i.accessorFn)l=i.accessorFn;else if(o!==void 0)if(typeof o=="string"&&o.includes(".")){const p=o.split(".");l=h=>{let v=h;for(let y=0;y<p.length;y++){const x=p[y];v=v==null?void 0:v[x]}return v}}else l=p=>p[i.accessorKey];if(!s)throw new Error;const u=d1e(e),f=Object.create(u);f.accessorFn=l,f.columnDef=i,f.columns=[],f.depth=n,f.id=`${String(s)}`,f.parent=r;const c=e._columnInstanceInitFns;for(let p=0;p<c.length;p++)c[p](f);return f}function vF(e){var n;const t=(n=e.atoms.columnOrder)==null?void 0:n.get();return r=>{let i=[];if(!(t!=null&&t.length))i=r;else{const o=new Map;for(let a=0;a<r.length;a++){const s=r[a];o.set(s.id,s)}for(let a=0;a<t.length;a++){const s=t[a],l=o.get(s);l&&(i.push(l),o.delete(s))}for(let a=0;a<r.length;a++){const s=r[a];o.has(s.id)&&i.push(s)}}return h1e(e,i)}}function h1e(e,t){var s;const n=((s=e.atoms.grouping)==null?void 0:s.get())??[],{groupedColumnMode:r}=e.options;if(!n.length||!r)return t;const i=t.filter(l=>!n.includes(l.id));if(r==="remove")return i;const o=new Map;for(let l=0;l<t.length;l++){const u=t[l];o.set(u.id,u)}const a=[];for(let l=0;l<n.length;l++){const u=o.get(n[l]);u&&a.push(u)}return[...a,...i]}function m1e(e){return[e,...e.columns.flatMap(t=>t.getFlatColumns())]}function g1e(e){if(e.columns.length){const t=e.columns.flatMap(n=>n.getLeafColumns());return fn(e.table,"getOrderColumns",vF)(t)}return[e]}function y1e(e){return{header:t=>{const n=t.header.column.columnDef;return n.accessorKey?n.accessorKey:n.accessorFn?n.id:null},cell:t=>{var n,r;return((r=(n=t.renderValue())==null?void 0:n.toString)==null?void 0:r.call(n))??null},...Object.values(e._features).reduce((t,n)=>{var r;return Object.assign(t,(r=n.getDefaultColumnDef)==null?void 0:r.call(n))},{}),...e.options.defaultColumn}}function xF(e,t,n,r=0){const i=new Array(t.length);for(let o=0;o<t.length;o++){if(!(o in t))continue;const a=t[o],s=p1e(e,a,r,n),l=a;s.columns=l.columns?xF(e,l.columns,s,r+1):[],i[o]=s}return i}function v1e(e){return xF(e,e.options.columns)}function x1e(e){return e.getAllColumns().flatMap(t=>t.getFlatColumns())}function b1e(e){const t=Cn(),n=e.getAllFlatColumns();for(let r=0;r<n.length;r++){const i=n[r];t[i.id]=i}return t}function w1e(e){const t=e.getAllColumns().flatMap(n=>n.getLeafColumns());return fn(e,"getOrderColumns",vF)(t)}function S1e(e){const t=Cn(),n=e.getAllLeafColumns();for(let r=0;r<n.length;r++){const i=n[r];t[i.id]=i}return t}function O1e(e,t){return e.getAllFlatColumnsById()[t]}const P1e={assignColumnPrototype:(e,t)=>{la("coreColumnsFeature",e,t,{column_getFlatColumns:{fn:n=>m1e(n),memoDeps:n=>[n.table.options.columns]},column_getLeafColumns:{fn:n=>g1e(n),memoDeps:n=>{var r,i;return[(r=n.table.atoms.columnOrder)==null?void 0:r.get(),(i=n.table.atoms.grouping)==null?void 0:i.get(),n.table.options.columns,n.table.options.groupedColumnMode]}}})},constructTableAPIs:e=>{wa("coreColumnsFeature",e,{table_getDefaultColumnDef:{fn:()=>y1e(e),memoDeps:()=>[e.options.defaultColumn]},table_getAllColumns:{fn:()=>v1e(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumns:{fn:()=>x1e(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumnsById:{fn:()=>b1e(e),memoDeps:()=>[e.options.columns]},table_getAllLeafColumns:{fn:()=>w1e(e),memoDeps:()=>{var t,n;return[(t=e.atoms.columnOrder)==null?void 0:t.get(),(n=e.atoms.grouping)==null?void 0:n.get(),e.options.columns,e.options.groupedColumnMode]}},table_getAllLeafColumnsById:{fn:()=>S1e(e),memoDeps:()=>[e.getAllLeafColumns()]},table_getColumn:{fn:t=>O1e(e,t)}})}};function bF(e,t){for(let n=0;n<e.subHeaders.length;n++)bF(e.subHeaders[n],t);t.push(e)}function j1e(e){const t=[];return bF(e,t),t}function E1e(e){return{column:e.column,header:e,table:e.column.table}}function A1e(e){var u;const{start:t,end:n}=((u=e.atoms.columnPinning)==null?void 0:u.get())??uF(),r=e.getAllColumns(),i=fn(e,"getVisibleLeafColumns",dF);if(!t.length&&!n.length)return T_(r,i,e);const o=e.getAllLeafColumnsById(),a=[];for(let f=0;f<t.length;f++){const c=o[t[f]];c&&fn(c,"getIsVisible",Qn)&&a.push(c)}const s=[];for(let f=0;f<n.length;f++){const c=o[n[f]];c&&fn(c,"getIsVisible",Qn)&&s.push(c)}const l=i.filter(f=>!t.includes(f.id)&&!n.includes(f.id));return T_(r,[...a,...l,...s],e)}function C1e(e){return[...e.getHeaderGroups()].reverse()}function T1e(e){const t=e.getHeaderGroups(),n=[];for(let r=0;r<t.length;r++){const i=t[r].headers;for(let o=0;o<i.length;o++)n.push(i[o])}return n}function _1e(e){var r;const t=((r=e.getHeaderGroups()[0])==null?void 0:r.headers)??[],n=[];for(let i=0;i<t.length;i++){const o=t[i].getLeafHeaders();for(let a=0;a<o.length;a++)n.push(o[a])}return n}const k1e={assignHeaderPrototype:(e,t)=>{la("coreHeadersFeature",e,t,{header_getLeafHeaders:{fn:n=>j1e(n),memoDeps:n=>[n.column.table.options.columns]},header_getContext:{fn:n=>E1e(n),memoDeps:n=>[n.column.table.options.columns]}})},constructTableAPIs:e=>{wa("coreHeadersFeature",e,{table_getHeaderGroups:{fn:()=>A1e(e),memoDeps:()=>{var t,n,r,i;return[e.options.columns,(t=e.atoms.columnOrder)==null?void 0:t.get(),(n=e.atoms.grouping)==null?void 0:n.get(),(r=e.atoms.columnPinning)==null?void 0:r.get(),(i=e.atoms.columnVisibility)==null?void 0:i.get(),e.options.groupedColumnMode]}},table_getFooterGroups:{fn:()=>C1e(e),memoDeps:()=>[e.getHeaderGroups()]},table_getFlatHeaders:{fn:()=>T1e(e),memoDeps:()=>[e.getHeaderGroups()]},table_getLeafHeaders:{fn:()=>_1e(e),memoDeps:()=>[e.getHeaderGroups()]}})}};function R1e(e){var t,n;if(!e._rowPrototype){e._rowPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignRowPrototype)==null||n.call(t,e._rowPrototype,e)}return e._rowPrototype}const N1e=(e,t,n,r,i,o,a)=>{const s=R1e(e),l=Object.create(s);l._displayIndexCache=-1,l._uniqueValuesCache=Cn(),l._valuesCache=Cn(),l.depth=i,l.id=t,l.index=r,l.original=n,l.parentId=a,l.subRows=[];const u=e._rowInstanceInitFns;for(let f=0;f<u.length;f++)u[f](l);return l},M1e=/([0-9]+)/gm;function ic(e){const t=Object.assign((n,r,i)=>{let o=n.getValue(i),a=r.getValue(i);const s=t.resolveDataValue;return s&&(o=s(o),a=s(a)),t.sort(o,a,n,r,i)},e);return t}ic({resolveDataValue:e=>Dy(e).toLowerCase(),sort:(e,t)=>SF(e,t)});ic({resolveDataValue:e=>Dy(e),sort:(e,t)=>SF(e,t)});ic({resolveDataValue:e=>Dy(e).toLowerCase(),sort:(e,t)=>NO(e,t)});ic({resolveDataValue:e=>Dy(e),sort:(e,t)=>NO(e,t)});ic({resolveDataValue:e=>$1e(e),sort:(e,t)=>e>t?1:e<t?-1:0});const wF=ic({sort:(e,t)=>NO(e,t)});function NO(e,t){return e===t?0:e>t?1:-1}function $1e(e){return e instanceof Date?e.getTime():e}function Dy(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function SF(e,t){let n=0,r=0;const i=e.length,o=t.length;for(;n<i&&r<o;){const a=og(e.charCodeAt(n)),s=og(t.charCodeAt(r)),l=Nw(e,n,a),u=Nw(t,r,s);if(!a&&!s){const c=I1e(e,n,l,t,r,u);if(c)return c;n=l,r=u;continue}if(a!==s)return a?1:-1;const f=D1e(e,n,l,t,r,u);if(f)return f;n=l,r=u}return k_(e,n)-k_(t,r)}function og(e){return e>=48&&e<=57}function Nw(e,t,n){let r=t+1;for(;r<e.length&&og(e.charCodeAt(r))===n;)r++;return r}function I1e(e,t,n,r,i,o){const a=n-t,s=o-i,l=a<s?a:s;for(let u=0;u<l;u++){const f=e.charCodeAt(t+u),c=r.charCodeAt(i+u);if(f>c)return 1;if(c>f)return-1}return a>s?1:s>a?-1:0}function D1e(e,t,n,r,i,o){let a=t;for(;a<n&&e.charCodeAt(a)===48;)a++;let s=i;for(;s<o&&r.charCodeAt(s)===48;)s++;const l=n-a,u=o-s;if(l===0&&u===0)return 0;if(l<=15&&u<=15){const p=__(e,a,n),h=__(r,s,o);return p>h?1:h>p?-1:0}const f=parseInt(e.slice(t,n),10),c=parseInt(r.slice(i,o),10);return f>c?1:c>f?-1:0}function __(e,t,n){let r=0;for(let i=t;i<n;i++)r=r*10+e.charCodeAt(i)-48;return r}function k_(e,t){let n=0,r=t;for(;r<e.length;)n++,r=Nw(e,r,og(e.charCodeAt(r)));return n}function L1e(){return[]}function F1e(e,t){var n,r;(r=(n=e.options).onCellSelectionChange)==null||r.call(n,t)}function B1e(e,t){F1e(e,ro(e.initialState.cellSelection)??L1e())}function z1e(e){e.atoms.cellSelection&&(e.options.autoResetAll??e.options.autoResetCellSelection??!0)&&e._reactivity.schedule(()=>B1e(e))}function U1e(e){e.atoms.expanded&&(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding)&&e._reactivity.schedule(()=>H1e(e))}function V1e(e,t){var n,r;(r=(n=e.options).onExpandedChange)==null||r.call(n,t)}function H1e(e,t){const n=e.initialState.expanded;V1e(e,n===!0?!0:Object.assign(Cn(),ro(n??{})))}const R_=0;function W1e(e){(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination)&&G1e(e)}function K1e(e,t){var r,i;const n=o=>rc(t,o);return(i=(r=e.options).onPaginationChange)==null?void 0:i.call(r,n)}function q1e(e,t){K1e(e,n=>{let r=rc(t,n.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),{...n,pageIndex:r}})}function G1e(e,t){var i,o;const n=((o=(i=e.atoms.pagination)==null?void 0:i.get())==null?void 0:o.pageIndex)??R_,r=R_;r!==n&&q1e(e,r)}function X1e(){return[]}function Ly(e,t){var n,r;(r=(n=e.options).onSortingChange)==null||r.call(n,t)}function OF(e,t){Ly(e,t?[]:ro(e.initialState.sorting??[]))}function Y1e(e){e.atoms.sorting&&(e.options.autoResetAll??e.options.autoResetSorting??!1)&&OF(e)}function PF(e){const t=e.table._rowModelFns.sortFns,n=e.table.getFilteredRowModel().flatRows.slice(0,10);let r,i=!1;for(let o=0;o<n.length;o++){const a=n[o].getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]"){r="datetime";break}if(typeof a=="string"&&(i=!0,a.split(M1e).length>1)){r="alphanumeric";break}}if(!r&&i&&(r="text"),r){let o=t==null?void 0:t[r];if(o||r==="alphanumeric"&&(o=t==null?void 0:t.text),o)return o}return wF}function jF(e){const t=e.table.getFilteredRowModel().flatRows.slice(0,10);for(let n=0;n<t.length;n++){const r=t[n].getValue(e.id);if(r!=null)return typeof r=="string"?"asc":"desc"}return"desc"}function Q1e(e){const t=e.table._rowModelFns.sortFns;return aF(e.columnDef.sortFn)?e.columnDef.sortFn:e.columnDef.sortFn==="auto"?PF(e):(t==null?void 0:t[e.columnDef.sortFn])??wF}function EF(e,t,n){const r=CF(e,n&&ag(e)),i=typeof t<"u";Ly(e.table,o=>{const a=o.findIndex(p=>p.id===e.id),s=a===-1?void 0:o[a];let l=[],u;const f=i?t:r==="desc",c=!!(o.length&&ag(e)&&n);return c?s?u="toggle":u="add":s?u="toggle":u="replace",u==="toggle"&&(i||r||(u="remove")),u==="add"?(l=[...o,{id:e.id,desc:f}],l.splice(0,l.length-(e.table.options.maxMultiSortColCount??Number.MAX_SAFE_INTEGER))):u==="toggle"?l=c?o.map(p=>p.id===e.id?{...p,desc:f}:p):[{id:e.id,desc:f}]:u==="remove"?l=c?o.filter(p=>p.id!==e.id):[]:l=[{id:e.id,desc:f}],l})}function AF(e){return e.columnDef.sortDescFirst??e.table.options.sortDescFirst??jF(e)==="desc"?"desc":"asc"}function CF(e,t){const n=AF(e),r=_F(e);return r?r!==n&&(e.table.options.enableSortingRemoval??!0)&&(!t||(e.table.options.enableMultiRemove??!0))?!1:r==="desc"?"asc":"desc":n}function TF(e){return(e.columnDef.enableSorting??!0)&&(e.table.options.enableSorting??!0)&&!!e.accessorFn}function ag(e){return e.columnDef.enableMultiSort??e.table.options.enableMultiSort??!!e.accessorFn}function _F(e){var n,r;const t=(r=(n=e.table.atoms.sorting)==null?void 0:n.get())==null?void 0:r.find(i=>i.id===e.id);return t?t.desc?"desc":"asc":!1}function J1e(e){var t,n;return((n=(t=e.table.atoms.sorting)==null?void 0:t.get())==null?void 0:n.findIndex(r=>r.id===e.id))??-1}function Z1e(e){Ly(e.table,t=>t.length?t.filter(n=>n.id!==e.id):[])}function eSe(e){const t=TF(e);return n=>{var r,i;t&&EF(e,void 0,ag(e)?(i=(r=e.table.options).isMultiSortEvent)==null?void 0:i.call(r,n):!1)}}function tSe(){return e=>RO({feature:"coreRowModelsFeature",table:e,fnName:"table.getCoreRowModel",memoDeps:()=>[e.options.data],fn:()=>nSe(e,e.options.data),onAfterUpdate:Ywe(()=>{U1e(e),W1e(e),Y1e(e),z1e(e)})})}function kF(e,t,n,r=0,i){var a;const o=[];for(let s=0;s<n.length;s++){const l=n[s],u=N1e(e,e.getRowId(l,s,i),l,s,r,void 0,i==null?void 0:i.id);t.flatRows.push(u),t.rowsById[u.id]=u,o.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(l,s),(a=u.originalSubRows)!=null&&a.length&&(u.subRows=kF(e,t,u.originalSubRows,r+1,u)))}return o}function nSe(e,t){const n={rows:[],flatRows:[],rowsById:Cn()};return n.rows=kF(e,n,t),n}function rSe(e){var t,n;return e._rowModels.coreRowModel||(e._rowModels.coreRowModel=((n=(t=e.options.features).coreRowModel)==null?void 0:n.call(t,e))??tSe()(e)),e._rowModels.coreRowModel()}function iSe(e){return e.getCoreRowModel()}function oSe(e){var t,n;return e._rowModels.filteredRowModel||(e._rowModels.filteredRowModel=(n=(t=e.options.features).filteredRowModel)==null?void 0:n.call(t,e)),e.options.manualFiltering||!e._rowModels.filteredRowModel?e.getPreFilteredRowModel():e._rowModels.filteredRowModel()}function aSe(e){return e.getFilteredRowModel()}function sSe(e){var t,n;return e._rowModels.groupedRowModel||(e._rowModels.groupedRowModel=(n=(t=e.options.features).groupedRowModel)==null?void 0:n.call(t,e)),e.options.manualGrouping||!e._rowModels.groupedRowModel?e.getPreGroupedRowModel():e._rowModels.groupedRowModel()}function lSe(e){return e.getGroupedRowModel()}function uSe(e){var t,n;return e._rowModels.sortedRowModel||(e._rowModels.sortedRowModel=(n=(t=e.options.features).sortedRowModel)==null?void 0:n.call(t,e)),e.options.manualSorting||!e._rowModels.sortedRowModel?e.getPreSortedRowModel():e._rowModels.sortedRowModel()}function cSe(e){return e.getSortedRowModel()}function fSe(e){var t,n;return e._rowModels.expandedRowModel||(e._rowModels.expandedRowModel=(n=(t=e.options.features).expandedRowModel)==null?void 0:n.call(t,e)),e.options.manualExpanding||!e._rowModels.expandedRowModel?e.getPreExpandedRowModel():e._rowModels.expandedRowModel()}function dSe(e){return e.getExpandedRowModel()}function pSe(e){var t,n;return e._rowModels.paginatedRowModel||(e._rowModels.paginatedRowModel=(n=(t=e.options.features).paginatedRowModel)==null?void 0:n.call(t,e)),e.options.manualPagination||!e._rowModels.paginatedRowModel?e.getPrePaginatedRowModel():e._rowModels.paginatedRowModel()}function hSe(e){return e.getPaginatedRowModel()}const mSe={constructTableAPIs:e=>{wa("coreRowModelsFeature",e,{table_getCoreRowModel:{fn:()=>rSe(e)},table_getPreFilteredRowModel:{fn:()=>iSe(e)},table_getFilteredRowModel:{fn:()=>oSe(e)},table_getPreGroupedRowModel:{fn:()=>aSe(e)},table_getGroupedRowModel:{fn:()=>sSe(e)},table_getPreSortedRowModel:{fn:()=>lSe(e)},table_getSortedRowModel:{fn:()=>uSe(e)},table_getPreExpandedRowModel:{fn:()=>cSe(e)},table_getExpandedRowModel:{fn:()=>fSe(e)},table_getPrePaginatedRowModel:{fn:()=>dSe(e)},table_getPaginatedRowModel:{fn:()=>pSe(e)},table_getRowModel:{fn:()=>hSe(e)}})}};function gSe(e){var t,n;if(!e._cellPrototype){e._cellPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignCellPrototype)==null||n.call(t,e._cellPrototype,e)}return e._cellPrototype}function ySe(e,t,n){const r=gSe(n),i=Object.create(r);i.column=e,i.id=`${t.id}_${e.id}`,i.row=t;const o=n._cellInstanceInitFns;for(let a=0;a<o.length;a++)o[a](i);return i}function vSe(e){const t=e.table.getRowsInDisplayOrder(),n=e._displayIndexCache;return t[n]===e?n:-1}function xSe(e){const t=e.getPrePaginatedRowModel().rows;if(e.options.paginateExpandedRows===!1){const n=[],r=i=>{var o;i._displayIndexCache=n.length,n.push(i),i.subRows.length&&((o=i.getIsExpanded)!=null&&o.call(i))&&i.subRows.forEach(r)};return t.forEach(r),n}for(let n=0;n<t.length;n++)t[n]._displayIndexCache=n;return t}function bSe(e,t){if($y(e._valuesCache,t))return e._valuesCache[t];const n=e.table.getColumn(t);if(n!=null&&n.accessorFn)return e._valuesCache[t]=n.accessorFn(e.original,e.index),e._valuesCache[t]}function wSe(e,t){if($y(e._uniqueValuesCache,t))return e._uniqueValuesCache[t];const n=e.table.getColumn(t);if(n!=null&&n.accessorFn)return n.columnDef.getUniqueValues?(e._uniqueValuesCache[t]=n.columnDef.getUniqueValues(e.original,e.index),e._uniqueValuesCache[t]):(e._uniqueValuesCache[t]=[e.getValue(t)],e._uniqueValuesCache[t])}function SSe(e,t){return e.getValue(t)??e.table.options.renderFallbackValue}function OSe(e){return Gwe(e.subRows,t=>t.subRows)}function PSe(e){const t=e.getCoreRowModel().flatRows;let n=0;for(let r=0;r<t.length;r++)n=Math.max(n,t[r].depth);return n}function jSe(e){if(e.parentId)return e.table.getCoreRowModel().rowsById[e.parentId]??e.table.getRow(e.parentId,!0)}function ESe(e){const t=[];let n=e;for(;;){const r=n.getParentRow();if(!r)break;t.push(r),n=r}return t.reverse()}function ASe(e){const t=e.table.getAllLeafColumns();let n=e._cellsCache;n||(n=e._cellsCache=new WeakMap);const r=new Array(t.length);for(let i=0;i<t.length;i++){const o=t[i];let a=n.get(o);a||(a=ySe(o,e,e.table),n.set(o,a)),r[i]=a}return r}function CSe(e){const t=Cn(),n=e.getAllCells();for(let r=0;r<n.length;r++){const i=n[r];t[i.column.id]=i}return t}function TSe(e,t,n,r){var i,o;return((o=(i=t.options).getRowId)==null?void 0:o.call(i,e,n,r))??(r?`${r.id}.${n}`:String(n))}function _Se(e,t,n){let r=(n?e.getPrePaginatedRowModel():e.getRowModel()).rowsById[t];if(!r&&(r=e.getCoreRowModel().rowsById[t],!r))throw new Error;return r}const kSe={assignRowPrototype:(e,t)=>{la("coreRowsFeature",e,t,{row_getDisplayIndex:{fn:n=>vSe(n)},row_getAllCellsByColumnId:{fn:n=>CSe(n),memoDeps:n=>[n.getAllCells()]},row_getAllCells:{fn:n=>ASe(n),memoDeps:n=>[n.table.getAllLeafColumns()]},row_getLeafRows:{fn:n=>OSe(n),memoDeps:n=>[n.subRows]},row_getParentRow:{fn:n=>jSe(n)},row_getParentRows:{fn:n=>ESe(n)},row_getUniqueValues:{fn:(n,r)=>wSe(n,r)},row_getValue:{fn:(n,r)=>bSe(n,r)},row_renderValue:{fn:(n,r)=>SSe(n,r)}})},constructTableAPIs:e=>{wa("coreRowsFeature",e,{table_getRowsInDisplayOrder:{fn:()=>xSe(e),memoDeps:()=>{var t;return[e.getPrePaginatedRowModel().rows,e.options.paginateExpandedRows,e.options.paginateExpandedRows===!1?(t=e.atoms.expanded)==null?void 0:t.get():void 0]}},table_getRowId:{fn:(t,n,r)=>TSe(t,e,n,r)},table_getRow:{fn:(t,n)=>_Se(e,t,n)},table_getMaxSubRowDepth:{fn:()=>PSe(e),memoDeps:()=>[e.getCoreRowModel()]}})}};function RF(e,t,n=(r,i)=>r===i){const r=t===void 0?e.options.state:t;e._reactivity.batch(()=>{if(r)for(const i in r){const o=e.baseAtoms[i];if(!o)continue;const a=r[i],s=a===void 0?e.initialState[i]:a;n(e._reactivity.untrack(()=>o.get()),s)||o.set(()=>s)}})}function NF(e,t,n=(r,i)=>r===i){e._reactivity.batch(()=>{var r,i;RF(e,t,n),(i=(r=e._reactivity).commit)==null||i.call(r)})}function RSe(e){var r,i;const t=ro(e.initialState);e._reactivity.batch(()=>{const o=Object.keys(t);for(let a=0;a<o.length;a++){const s=o[a];e.baseAtoms[s].set(t[s])}});const n=Object.values(e._features);for(let o=0;o<n.length;o++)(i=(r=n[o]).resetTableInstanceData)==null||i.call(r,e)}function NSe(e,t){const{features:n,atoms:r,initialState:i}=e.options;if(!e.options.mergeOptions)return{...e.options,...t,features:n,atoms:r,initialState:i};const o=e.options.mergeOptions(e.options,t),a={...Object.getOwnPropertyDescriptors(o)};return Object.defineProperties(Object.create(Object.getPrototypeOf(o)),{...a,features:{value:n,enumerable:!0,configurable:!0,writable:!0},atoms:{value:r,enumerable:!0,configurable:!0,writable:!0},initialState:{value:i,enumerable:!0,configurable:!0,writable:!0}})}function MF(e,t,n){const r=NSe(e,rc(t,e.options));e.optionsStore?e.optionsStore.set(()=>r):e.options=r,(n==null?void 0:n.syncExternalState)!==!1&&NF(e,r.state??null)}const MSe={constructTableAPIs:e=>{wa("coreTablesFeature",e,{table_reset:{fn:()=>RSe(e)},table_setOptions:{fn:t=>MF(e,t)}})}},$Se={coreCellsFeature:e1e,coreColumnsFeature:P1e,coreHeadersFeature:k1e,coreRowModelsFeature:mSe,coreRowsFeature:kSe,coreTablesFeature:MSe};function ISe(e,t={}){return Object.values(e).forEach(n=>{var r;t=((r=n.getInitialState)==null?void 0:r.call(n,t))??t}),ro(t)}function DSe(e){var P,j;const t=e.features.coreReactivityFeature,{aggregationFns:n,columnMeta:r,coreRowModel:i,expandedRowModel:o,facetedMinMaxValues:a,facetedRowModel:s,facetedUniqueValues:l,filterFns:u,filterMeta:f,filteredRowModel:c,groupedRowModel:p,paginatedRowModel:h,sortFns:v,sortedRowModel:y,tableMeta:x,...m}=e.features,g={_cellInstanceInitFns:[],_columnInstanceInitFns:[],_features:{...$Se,...m},_headerGroupInstanceInitFns:[],_headerInstanceInitFns:[],_reactivity:t,_rowInstanceInitFns:[],_rowModelFns:{aggregationFns:n,filterFns:u,sortFns:v},_rowModels:{},atoms:{},baseAtoms:{}},b=Object.values(g._features),S={...b.reduce((E,A)=>{var C;return Object.assign(E,(C=A.getDefaultTableOptions)==null?void 0:C.call(A,g))},{}),...e};if(t.wrapExternalAtoms&&S.atoms)for(const[E,A]of Object.entries(S.atoms)){const C=A,_=t.createWritableAtom(C.get(),{debugName:`externalAtom/${E}`});S.atoms[E]=_;let T=!1;const R=C.subscribe(k=>{T||_.set(k)}),M=_.subscribe(k=>{T=!0,C.set(k),T=!1});t.addSubscription(R),t.addSubscription(M)}t.createOptionsStore?(g.optionsStore=t.createWritableAtom(S,{debugName:"table/optionsStore"}),Object.defineProperty(g,"options",{configurable:!0,enumerable:!0,get(){return g.optionsStore.get()},set(E){g.optionsStore.set(()=>E)}})):g.options=S,g.initialState=ISe(g._features,g.options.initialState);const w=Object.keys(g.initialState);for(let E=0;E<w.length;E++){const A=w[E];g.baseAtoms[A]=t.createWritableAtom(g.initialState[A],{debugName:`table/baseAtoms/${A}`}),g.atoms[A]=t.createReadonlyAtom(()=>{var M;const C=g.options,_=(M=C.atoms)==null?void 0:M[A],T=_?_.get():g.baseAtoms[A].get();if(_)return T;const R=C.state;if(R&&$y(R,A)){const k=R[A];return k===void 0?g.initialState[A]:k}return T},{debugName:`table/atoms/${A}`})}RF(g),g.store=Hwe(t.createReadonlyAtom(()=>{const E={};for(let A=0;A<w.length;A++){const C=w[A];E[C]=g.atoms[C].get()}return E},{compare:rf,debugName:"table/store"}));for(let E=0;E<b.length;E++){const A=b[E];(P=A.initTableInstanceData)==null||P.call(A,g),A.initCellInstanceData&&g._cellInstanceInitFns.push(A.initCellInstanceData.bind(A)),A.initColumnInstanceData&&g._columnInstanceInitFns.push(A.initColumnInstanceData.bind(A)),A.initHeaderGroupInstanceData&&g._headerGroupInstanceInitFns.push(A.initHeaderGroupInstanceData.bind(A)),A.initHeaderInstanceData&&g._headerInstanceInitFns.push(A.initHeaderInstanceData.bind(A)),A.initRowInstanceData&&g._rowInstanceInitFns.push(A.initRowInstanceData.bind(A)),(j=A.constructTableAPIs)==null||j.call(A,g)}return g}function LSe(){return[]}function $F(e){const t=e.table._rowModelFns.filterFns,n=e.table.getCoreRowModel().flatRows;let r;for(let a=0;a<n.length;a++){const s=n[a].getValue(e.id);if(s!=null){r=s;break}}let i;return typeof r=="string"?i="includesString":typeof r=="number"?i="inNumberRange":typeof r=="boolean"?i="equals":Array.isArray(r)?i="arrIncludes":Object.prototype.toString.call(r)==="[object Date]"?i="inDateRange":r!==null&&typeof r=="object"?i="equals":i="weakEquals",t==null?void 0:t[i]}function MO(e){let t=null;const n=e.table._rowModelFns.filterFns;return t=aF(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?$F(e):n==null?void 0:n[e.columnDef.filterFn],t??void 0}function FSe(e){return(e.columnDef.enableColumnFilter??!0)&&(e.table.options.enableColumnFilters??!0)&&(e.table.options.enableFilters??!0)&&!!e.accessorFn}function BSe(e){return IF(e)>-1}function zSe(e){var t,n,r;return(r=(n=(t=e.table.atoms.columnFilters)==null?void 0:t.get())==null?void 0:n.find(i=>i.id===e.id))==null?void 0:r.value}function IF(e){var t,n;return((n=(t=e.table.atoms.columnFilters)==null?void 0:t.get())==null?void 0:n.findIndex(r=>r.id===e.id))??-1}function USe(e,t){$O(e.table,n=>{const r=MO(e),i=n.find(s=>s.id===e.id),o=rc(t,i?i.value:void 0);if(DF(r,o,e))return n.filter(s=>s.id!==e.id);const a={id:e.id,value:o};return i?n.map(s=>s.id===e.id?a:s):n.length?[...n,a]:[a]})}function $O(e,t){var i,o;const n=e.getAllLeafColumnsById(),r=a=>rc(t,a).filter(s=>{const l=n[s.id];return!(l&&DF(MO(l),s.value,l))});(o=(i=e.options).onColumnFiltersChange)==null||o.call(i,r)}function VSe(e,t){$O(e,t?[]:ro(e.initialState.columnFilters??[]))}function DF(e,t,n){return typeof t>"u"?!0:e!=null&&e.autoRemove?!!e.autoRemove(t,n):typeof t=="string"&&!t}const HSe={getInitialState:e=>({columnFilters:LSe(),...e}),getDefaultColumnDef:()=>({filterFn:"auto"}),getDefaultTableOptions:e=>({onColumnFiltersChange:kO("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),assignColumnPrototype:(e,t)=>{la("columnFilteringFeature",e,t,{column_getAutoFilterFn:{fn:n=>$F(n)},column_getFilterFn:{fn:n=>MO(n)},column_getCanFilter:{fn:n=>FSe(n)},column_getIsFiltered:{fn:n=>BSe(n)},column_getFilterValue:{fn:n=>zSe(n)},column_getFilterIndex:{fn:n=>IF(n)},column_setFilterValue:{fn:(n,r)=>USe(n,r)}})},initRowInstanceData:e=>{e.columnFilters=Cn(),e.columnFiltersMeta=Cn()},constructTableAPIs:e=>{wa("columnFilteringFeature",e,{table_setColumnFilters:{fn:t=>$O(e,t)},table_resetColumnFilters:{fn:t=>VSe(e,t)}})}},WSe={getInitialState:e=>({columnVisibility:n1e(),...e}),getDefaultTableOptions:e=>({onColumnVisibilityChange:kO("columnVisibility",e)}),assignColumnPrototype:(e,t)=>{la("columnVisibilityFeature",e,t,{column_getIsVisible:{fn:n=>Qn(n),memoDeps:n=>{var r;return[t.options.columns,(r=t.atoms.columnVisibility)==null?void 0:r.get(),n.columns]}},column_getCanHide:{fn:n=>ig(n)},column_getToggleVisibilityHandler:{fn:n=>r1e(n)},column_toggleVisibility:{fn:(n,r)=>cF(n,r)}})},assignRowPrototype:(e,t)=>{la("columnVisibilityFeature",e,t,{row_getVisibleCells:{fn:n=>i1e(n),memoDeps:n=>{var r,i;return[n.getAllCells(),(r=t.atoms.columnPinning)==null?void 0:r.get(),(i=t.atoms.columnVisibility)==null?void 0:i.get()]}},row_getVisibleCellsByColumnId:{fn:n=>fF(n),memoDeps:n=>{var r;return[n.getAllCells(),(r=t.atoms.columnVisibility)==null?void 0:r.get()]}}})},constructTableAPIs:e=>{wa("columnVisibilityFeature",e,{table_getVisibleFlatColumns:{fn:()=>o1e(e),memoDeps:()=>{var t,n,r;return[(t=e.atoms.columnVisibility)==null?void 0:t.get(),(n=e.atoms.columnOrder)==null?void 0:n.get(),(r=e.atoms.grouping)==null?void 0:r.get(),e.options.columns,e.options.groupedColumnMode]}},table_getVisibleLeafColumns:{fn:()=>dF(e),memoDeps:()=>{var t,n,r;return[(t=e.atoms.columnVisibility)==null?void 0:t.get(),(n=e.atoms.columnOrder)==null?void 0:n.get(),(r=e.atoms.grouping)==null?void 0:r.get(),e.options.columns,e.options.groupedColumnMode]}},table_setColumnVisibility:{fn:t=>Iy(e,t)},table_resetColumnVisibility:{fn:t=>a1e(e,t)},table_toggleAllColumnsVisible:{fn:t=>pF(e,t)},table_getIsAllColumnsVisible:{fn:()=>hF(e)},table_getIsSomeColumnsVisible:{fn:()=>s1e(e)},table_getToggleAllColumnsVisibilityHandler:{fn:()=>l1e(e)}})}},KSe={getInitialState(e){return{sorting:X1e(),...e}},getDefaultColumnDef(){return{sortFn:"auto",sortUndefined:1}},getDefaultTableOptions(e){return{autoResetSorting:!1,onSortingChange:kO("sorting",e),isMultiSortEvent:t=>t.shiftKey}},assignColumnPrototype(e,t){la("rowSortingFeature",e,t,{column_getAutoSortFn:{fn:n=>PF(n)},column_getAutoSortDir:{fn:n=>jF(n)},column_getSortFn:{fn:n=>Q1e(n)},column_toggleSorting:{fn:(n,r,i)=>EF(n,r,i)},column_getFirstSortDir:{fn:n=>AF(n)},column_getNextSortingOrder:{fn:(n,r)=>CF(n,r)},column_getCanSort:{fn:n=>TF(n)},column_getCanMultiSort:{fn:n=>ag(n)},column_getIsSorted:{fn:n=>_F(n)},column_getSortIndex:{fn:n=>J1e(n)},column_clearSorting:{fn:n=>Z1e(n)},column_getToggleSortingHandler:{fn:n=>eSe(n)}})},constructTableAPIs(e){wa("rowSortingFeature",e,{table_setSorting:{fn:t=>Ly(e,t)},table_resetSorting:{fn:t=>OF(e,t)}})}},qSe=typeof window>"u"?O.useEffect:O.useLayoutEffect;function GSe(e,t){const[{table:n,rootSource:r}]=O.useState(()=>{const l=DSe({...e,features:{coreReactivityFeature:qwe(),...e.features}});return l.Subscribe=u=>Vwe({...u,source:u.source??l.store}),l.FlexRender=Mwe,{table:l,rootSource:Kwe(l.store,rf)}}),i=n;MF(i,l=>({...l,...e}),{syncExternalState:!1});const o=i.options.state,a=r.get(),s=oF(r,t,{compare:rf});return qSe(()=>{r.markCommitted(a),NF(i,o??null,rf)}),O.useMemo(()=>({...n,options:e,state:s}),[n,e,s])}const XSe={rowSortingFeature:KSe,columnFilteringFeature:HSe,columnVisibilityFeature:WSe};function YSe({direction:e}){return e==="asc"?d.jsx("span",{"aria-hidden":"true",children:"↑"}):e==="desc"?d.jsx("span",{"aria-hidden":"true",children:"↓"}):d.jsx("span",{"aria-hidden":"true",className:"opacity-30",children:"↕"})}function QSe({header:e,className:t}){const n=e.column.getIsSorted(),r=Wa(e.column.columnDef.header,e.getContext());return d.jsx(qe,{className:`whitespace-nowrap p-0 ${t}`,"aria-sort":n==="asc"?"ascending":n==="desc"?"descending":"none",children:d.jsxs(Ye,{variant:"ghost",size:"xs",onClick:e.column.getToggleSortingHandler(),className:"w-full justify-start gap-1 px-3 py-2 font-normal",children:[r,d.jsx(YSe,{direction:n})]})})}function JSe({header:e}){const t=e.column.getFilterValue(),n=typeof t=="string"?t:"",[r,i]=O.useState(n);O.useEffect(()=>i(n),[n]);const o=()=>{r!==n&&e.column.setFilterValue(r)};return d.jsx(Es,{value:r,"aria-label":`Filter by ${e.column.id}`,placeholder:"Filter…",className:"w-full py-0.5",onChange:a=>i(a.target.value),onBlur:o,onKeyDown:a=>{a.key==="Enter"&&o(),a.key==="Escape"&&i(n)}})}function ZSe({table:e,sticky:t,menu:n}){var s;const r=((s=e.getHeaderGroups().at(-1))==null?void 0:s.headers)??[],i=r.some(l=>l.column.getCanFilter()),o=t?"sticky top-0 z-10 bg-panel":"",a=t?"sticky top-8 z-10 bg-panel":"";return d.jsxs(Bd,{children:[d.jsxs(kr,{children:[r.map(l=>l.column.getCanSort()?d.jsx(QSe,{header:l,className:o},l.id):d.jsx(qe,{className:`whitespace-nowrap ${o}`,children:Wa(l.column.columnDef.header,l.getContext())},l.id)),n?d.jsx(qe,{className:`w-px whitespace-nowrap text-right ${o}`,children:n}):null]}),i&&d.jsxs(kr,{children:[r.map(l=>d.jsx(qe,{className:`py-1 ${a}`,children:l.column.getCanFilter()?d.jsx(JSe,{header:l}):null},l.id)),n?d.jsx(qe,{className:a}):null]})]})}function eOe(e,t){const n=e.replace(/\{(\w+)\}/g,(r,i)=>String(t[i]??""));return/^\s*(javascript|data|vbscript):/i.test(n)?"#":n}function tOe({spec:e,row:t}){const n=String(t[e.key]??"");return e.link?d.jsx("a",{className:"text-sky-400 hover:underline",href:eOe(e.link.href,t),...e.link.external?{target:"_blank",rel:"noreferrer"}:{},children:n}):d.jsx(d.Fragment,{children:n})}function nOe(e){return e.map(t=>({id:t.key,accessorFn:n=>n[t.key],header:t.label,enableSorting:t.sortable===!0,enableColumnFilter:t.filterable===!0,enableHiding:t.hideable===!0,cell:({row:n})=>d.jsx(tOe,{spec:t,row:n.original})}))}const rOe="max-h-[28rem]";function iOe(e,t,n){return`${t.map(r=>String(e[r.key]??"")).join("|")}#${n}`}function oOe({columns:e,rows:t,sort:n,onSortChange:r,filters:i,onFiltersChange:o,scrolls:a}){const[s,l]=O.useState({}),u=O.useMemo(()=>nOe(e),[e]),f=n?[{id:n.key,desc:n.dir==="desc"}]:[],c=Object.entries(i??{}).map(([x,m])=>({id:x,value:m})),p=GSe({features:XSe,columns:u,data:t,state:{sorting:f,columnFilters:c,columnVisibility:s},onColumnVisibilityChange:l,onSortingChange:x=>{const g=(typeof x=="function"?x(f):x)[0];r==null||r(g?{key:g.id,dir:g.desc?"desc":"asc"}:void 0)},onColumnFiltersChange:x=>{const m=typeof x=="function"?x(c):x,g={};for(const b of m)typeof b.value=="string"&&b.value!==""&&(g[b.id]=b.value);o==null||o(g)},manualSorting:!0,manualFiltering:!0,getRowId:(x,m)=>iOe(x,e,m)}),h=p.getAllLeafColumns(),v=h.some(x=>x.getCanHide()),y=p.getVisibleLeafColumns().length+(v?1:0);return d.jsxs(Fd,{containerClassName:a?rOe:"",children:[d.jsx(ZSe,{table:p,sticky:a===!0,...v?{menu:d.jsx(_we,{columns:h})}:{}}),d.jsxs(zd,{children:[t.length===0?d.jsx(kr,{children:d.jsx(nt,{colSpan:y,className:"py-6 text-center text-muted-foreground",children:"No data in this window."})}):null,p.getRowModel().rows.map(x=>d.jsxs(kr,{children:[x.getVisibleCells().map(m=>d.jsx(nt,{className:"whitespace-nowrap text-foreground",children:Wa(m.column.columnDef.cell,m.getContext())},m.id)),v?d.jsx(nt,{}):null]},x.id))]})]})}function aOe(e,t){return t==="percent"?`${Math.round(e*100)}%`:t==="duration"?e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`:t==="rate"?`${new Intl.NumberFormat().format(Math.round(e))}/hr`:new Intl.NumberFormat().format(e)}function LF(e){if(typeof e!="object"||e===null||!("rows"in e))return[];const t=e.rows;return Array.isArray(t)?t.filter(n=>typeof n=="object"&&n!==null):[]}function dx(e,t){if(typeof e!="object"||e===null||!(t in e))return;const n=Reflect.get(e,t);return typeof n=="number"&&Number.isFinite(n)?n:void 0}function sOe(e){const t=LF(e);return{rows:t,total:dx(e,"total")??t.length,page:dx(e,"page")??1,limit:dx(e,"limit")??0}}function lOe({title:e}){return d.jsxs("div",{className:"rounded-lg border border-line bg-panel/40",children:[d.jsx("p",{className:"border-b border-line px-4 py-2 text-xs font-medium text-foreground",children:e}),d.jsx("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:"No data in this window."})]})}function uOe({page:e,totalPages:t,onPageChange:n}){return d.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[d.jsx(Ye,{variant:"outline",size:"xs",disabled:e<=1,onClick:()=>n==null?void 0:n(e-1),className:"px-1.5 text-muted-foreground",children:"Prev"}),d.jsxs("span",{children:["Page ",e," of ",t]}),d.jsx(Ye,{variant:"outline",size:"xs",disabled:e>=t,onClick:()=>n==null?void 0:n(e+1),className:"px-1.5 text-muted-foreground",children:"Next"})]})}function cOe({panel:e,data:t,onPageChange:n,requestedPage:r,sort:i,onSortChange:o,filters:a,onFiltersChange:s,onSelect:l}){const u=l?{onSelect:l}:{};switch(e.kind){case"stat":{const f=t??{};return d.jsx(wt,{label:e.title,value:aOe(f.value??0,e.format),...f.value!==void 0?{currentValue:f.value}:{},...f.delta!==void 0?{delta:f.delta}:{},...f.deltaLabel?{deltaLabel:f.deltaLabel}:{},...e.spark&&f.spark?{spark:f.spark}:{},...e.thresholds?{thresholds:e.thresholds}:{},...e.accent?{accent:e.accent}:{}})}case"distribution":{const f=t??{};return d.jsx(Cwe,{title:e.title,buckets:f.buckets??[],...f.p50!==void 0?{p50:f.p50}:{},...f.p95!==void 0?{p95:f.p95}:{},...f.p99!==void 0?{p99:f.p99}:{},...u})}case"gauge":{const f=t??{};return d.jsx(Twe,{title:e.title,value:f.value??0,...e.min!==void 0?{min:e.min}:{},...e.max!==void 0?{max:e.max}:{}})}case"breakdown":{const f=t??{};return d.jsx(jwe,{title:e.title,segments:f.segments??[],...e.style?{style:e.style}:{},...u})}case"timeseries":{const f=(t==null?void 0:t.rows)??[],c=e.series[0];return e.style==="stacked"?d.jsx(jO,{title:e.title,data:f,series:e.series,...u}):d.jsx(Ds,{title:e.title,data:f.map(p=>({label:p.label,value:c?Number(p[c]??0):0})),...u})}case"topN":{const f=(t==null?void 0:t.items)??[],c=e.limit?f.slice(0,e.limit):f;return c.length===0?d.jsx(lOe,{title:e.title}):d.jsx(us,{title:e.title,data:c,horizontal:!0,truncateLabel:32,...u})}case"table":{const f=d.jsx(oOe,{columns:e.columns,rows:LF(t),scrolls:e.paged===!0,sort:i,...o?{onSortChange:o}:{},filters:a,...s?{onFiltersChange:s}:{}});if(e.paged){const{rows:c,total:p,page:h,limit:v}=sOe(t),y=Math.max(1,Math.ceil(p/(v||c.length||1)));return d.jsxs("div",{className:"rounded-lg border border-line bg-panel/40",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-2",children:[d.jsx("p",{className:"text-xs font-medium text-foreground",children:e.title}),d.jsx(uOe,{page:r??h,totalPages:y,...n?{onPageChange:n}:{}})]}),f]})}return d.jsxs("div",{className:"rounded-lg border border-line bg-panel/40",children:[d.jsx("p",{className:"border-b border-line px-4 py-2 text-xs font-medium text-foreground",children:e.title}),f]})}default:return null}}const fOe="sort",dOe="dir",pOe="filter.";function hOe(e,t){const n=Object.entries(t.filters??{}).filter(([,i])=>i!=="");if(!t.paging&&!t.sort&&n.length===0)return e;const r={...e};t.paging&&(r.page=t.paging.page,r.limit=t.paging.limit),t.sort&&(r[fOe]=t.sort.key,r[dOe]=t.sort.dir);for(const[i,o]of n)r[`${pOe}${i}`]=o;return r}const mOe={2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-2 lg:grid-cols-4"},gOe=50;function yOe(e){return"drilldown"in e?e.drilldown:void 0}function vOe({status:e}){const t=e==="live";return d.jsxs("span",{"data-telescope-status":e,className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide ${t?"tint-good":"tint-warn"}`,children:[d.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${t?"animate-pulse bg-good":"bg-warn"}`}),t?"live":e]})}function xOe({ext:e,panel:t,focus:n,onSelect:r}){const i=t.kind==="table"&&t.paged===!0,[o,a]=O.useState(1),[s,l]=O.useState(void 0),[u,f]=O.useState({}),c=n?{[n.param]:n.value}:void 0,p=c?{...t.data.query,...c}:t.data.query,h=hOe(p,{...i?{paging:{page:o,limit:gOe}}:{},...s?{sort:s}:{},filters:u}),v=ZU(e,t.data.provider,h);return v.isError?d.jsxs("div",{className:"tint-bad rounded-lg border px-4 py-3 text-sm",children:['Failed to load "',t.title,'".']}):d.jsx(cOe,{panel:t,data:v.data,...i?{onPageChange:a,requestedPage:o}:{},sort:s,onSortChange:y=>{a(1),l(y)},filters:u,onFiltersChange:y=>{a(1),f(y)},...r?{onSelect:r}:{}})}function bOe(){var u,f;const{dashboardId:e}=Eg(),t=ks(),{status:n}=d5(),[r,i]=O.useState(null),o=(f=(u=t.data)==null?void 0:u.dashboards)==null?void 0:f.find(c=>c.id===e);if(!o)return d.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Dashboard not found."});const a=(e==null?void 0:e.split(".")[0])??"",s=o.sections??[{panels:o.panels,cols:2}];function l(c,p){const h=p.id??p.label,v=p.series?`${p.series} · ${p.label}`:p.label;i(y=>(y==null?void 0:y.param)===c&&y.value===h?null:{param:c,value:h,label:v})}return d.jsxs("div",{className:"p-4",children:[d.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[d.jsx("h2",{className:"text-sm font-semibold text-foreground",children:o.label}),d.jsx(vOe,{status:n}),r&&d.jsxs("span",{className:"tint-brand inline-flex items-center gap-1 rounded border py-0.5 pl-1.5 text-[10px]",children:[r.param,": ",r.label,d.jsx(Ye,{variant:"ghost",size:"xs",className:"px-1 text-inherit",onClick:()=>i(null),children:"Clear"})]})]}),s.map((c,p)=>d.jsxs("section",{className:"mb-6",children:[c.title&&d.jsx("p",{className:"mb-2 text-[10px] uppercase tracking-wide text-muted-foreground",children:c.title}),d.jsx("div",{className:`grid grid-cols-1 gap-3 ${mOe[c.cols??2]}`,children:c.panels.map(h=>{const v=yOe(h);return d.jsx(xOe,{ext:a,panel:h,focus:r,...v?{onSelect:y=>l(v.param,y)}:{}},`${h.kind}-${h.title}`)})})]},c.title??`s${p}`))]})}function wOe({profile:e,selected:t,onSelect:n}){return d.jsxs("button",{type:"button",onClick:n,className:`flex w-full flex-col gap-0.5 border-b border-line-soft px-3 py-2 text-left hover:bg-panel ${t?"bg-panel":""}`,children:[d.jsx("span",{className:"truncate font-mono text-xs text-foreground",title:e.familyHash??e.id,children:e.familyHash??"(unlabelled)"}),d.jsxs("span",{className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[d.jsx("span",{children:e.durationMs!==null?cd(e.durationMs):"—"}),e.tags.includes("manual")&&d.jsx("span",{className:"text-warn",children:"manual"}),e.tags.includes("sampled")&&d.jsx("span",{className:"text-sky-400",children:"sampled"}),d.jsx("span",{className:"ml-auto",children:Ls(new Date(e.createdAt).getTime())})]})]})}function SOe({hot:e}){return e.length===0?d.jsx("p",{className:"text-xs text-muted-foreground",children:"No hot frames."}):d.jsxs("div",{className:"rounded-lg border border-line bg-panel/40",children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-line px-3 py-1.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:[d.jsx("span",{className:"flex-1",children:"Function"}),d.jsx("span",{className:"w-16 text-right",children:"Self"}),d.jsx("span",{className:"w-12 text-right",children:"%"})]}),e.map(t=>d.jsxs("div",{className:"flex items-center gap-2 border-b border-line-soft px-3 py-1 text-[11px] last:border-0",children:[d.jsxs("span",{className:"min-w-0 flex-1 truncate font-mono text-foreground",title:`${t.name} ${t.file}`,children:[t.name,t.file&&d.jsx("span",{className:"ml-1 text-muted-foreground",children:t.file})]}),d.jsx("span",{className:"w-16 text-right tabular-nums text-foreground",children:cd(t.selfMs)}),d.jsx("span",{className:"w-12 text-right tabular-nums text-warn",children:t.selfPct.toFixed(1)})]},`${t.name}:${t.file}`))]})}function OOe({id:e}){const{data:t,isLoading:n}=c5(e);if(n)return d.jsx("p",{className:"text-muted-foreground",children:"Loading profile…"});if(!t)return d.jsx("p",{className:"text-muted-foreground",children:"Profile not found."});const r=t.content;return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1",children:[d.jsx("h3",{className:"font-mono text-sm text-foreground",children:r.label??"(unlabelled)"}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:[cd(r.durationMs)," · ",r.sampleCount," samples · ",r.reason]})]}),d.jsx(Qxe,{tree:r.tree}),d.jsx(SOe,{hot:r.hot})]})}function POe({pendingManual:e}){const[t,n]=O.useState(1),[r,i]=O.useState(""),o=f5();return d.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-lg border border-line bg-panel/40 px-3 py-2",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Capture next"}),d.jsx("input",{type:"number",min:1,value:t,onChange:a=>n(Math.max(1,Number(a.target.value))),className:"w-14 rounded border border-line bg-background px-1 py-0.5 text-xs text-foreground"}),d.jsx("span",{className:"text-[10px] text-muted-foreground",children:"request(s) matching"}),d.jsx("input",{type:"text",placeholder:"any route (e.g. GET /users/:id)",value:r,onChange:a=>i(a.target.value),className:"w-56 rounded border border-line bg-background px-1 py-0.5 text-xs text-foreground"}),d.jsx("button",{type:"button",disabled:o.isPending,onClick:()=>o.mutate({count:t,...r?{label:r}:{}}),className:"rounded bg-primary px-2 py-0.5 text-xs font-medium text-primary-foreground hover:opacity-90 disabled:opacity-50",children:o.isPending?"Arming…":"Arm capture"}),e>0&&d.jsxs("span",{className:"text-[10px] text-warn",children:[e," pending"]}),o.isError&&d.jsx("span",{className:"text-[10px] text-bad",children:o.error instanceof Error?o.error.message:"Failed to arm (mutations disabled?)"})]})}function jOe(){var u,f,c,p,h;const e=ks(),t=l5(),{data:n,isLoading:r}=u5(100),i=(n==null?void 0:n.data)??[],[o,a]=O.useState(null),s=((f=(u=e.data)==null?void 0:u.profiling)==null?void 0:f.enabled)??((c=t.data)==null?void 0:c.enabled)??!1,l=o??((p=i[0])==null?void 0:p.id)??null;return s?d.jsxs("div",{className:"space-y-4 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[d.jsx("h2",{className:"text-sm text-brand",children:"CPU Profiles"}),t.data&&d.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["sampling ",(t.data.sampleRate*100).toFixed(0),"% · ",t.data.active," active"]})]}),d.jsx(POe,{pendingManual:((h=t.data)==null?void 0:h.pendingManual)??0}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx("div",{className:"w-64 shrink-0 rounded-lg border border-line",children:r?d.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"Loading…"}):i.length===0?d.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"No profiles captured yet."}):i.map(v=>d.jsx(wOe,{profile:v,selected:v.id===l,onSelect:()=>a(v.id)},v.id))}),d.jsx("div",{className:"min-w-0 flex-1",children:l?d.jsx(OOe,{id:l}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"Select a profile to view its flamegraph."})})]})]}):d.jsxs("div",{className:"space-y-3 p-4",children:[d.jsx("h2",{className:"text-sm text-brand",children:"CPU Profiles"}),d.jsxs("div",{className:"rounded-lg border border-line bg-panel/40 p-6 text-xs text-muted-foreground",children:[d.jsx("p",{className:"mb-2 text-foreground",children:"CPU profiling is disabled."}),d.jsxs("p",{children:["Enable it with"," ",d.jsxs("code",{className:"rounded bg-panel-2 px-1 text-brand",children:["profiling: ","{"," enabled: true ","}"]})," ","in ",d.jsx("code",{className:"rounded bg-panel-2 px-1",children:"TelescopeModule.forRoot"}),". Profiling is opt-in because it carries real CPU overhead; when off there is zero cost on the request path."]})]})]})}const EOe={scheduled:"text-sky-300 bg-sky-500/10",manual:"text-warn tint-warn"};function AOe({trigger:e}){return d.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${EOe[e]}`,children:e})}function COe({type:e,count:t}){return d.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-panel-2/80 px-1.5 py-0.5 text-[10px] text-foreground",children:[d.jsx("span",{className:"text-muted-foreground",children:Tg(e)}),d.jsx("span",{className:"tabular-nums text-foreground",children:t})]})}function TOe(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}function _Oe(e,t){if(e===null)return"—";const n=new Date(e).getTime()-t;if(Number.isNaN(n))return"—";if(n<=0)return"now";const r=Math.round(n/1e3);return r<60?`~${r}s`:`~${Math.floor(r/60)}m ${r%60}s`}function kOe(){const[e,t]=O.useState(()=>Date.now());return O.useEffect(()=>{const n=setInterval(()=>t(Date.now()),1e3);return()=>clearInterval(n)},[]),e}function ROe({config:e,nextRunAt:t,nowMs:n}){const r=Object.entries(e.perType??{});return d.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[d.jsx(wt,{label:"Window",value:nf(e.afterMs),accent:"text-brand"}),d.jsx(wt,{label:"Interval",value:nf(e.intervalMs)}),d.jsx(wt,{label:"Keep last",value:e.keepLast!=null?e.keepLast.toLocaleString():"unbounded"}),d.jsx(wt,{label:"Next prune",value:_Oe(t,n),accent:"text-sky-300",...r.length>0?{hint:`${r.length} per-type override(s)`}:{}}),r.length>0&&d.jsxs("div",{className:"col-span-2 rounded-lg border border-line bg-panel/40 p-3 sm:col-span-4",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Per-type overrides"}),d.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:r.map(([i,o])=>d.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-panel-2/80 px-1.5 py-0.5 text-[10px] text-foreground",children:[d.jsx("span",{className:"text-muted-foreground",children:Tg(i)}),d.jsx("span",{className:"tabular-nums text-foreground",children:nf(o)})]},i))})]})]})}function NOe({run:e}){const t=Object.entries(e.deletedByType);return d.jsxs(kr,{className:"border-t border-line/60 align-top hover:bg-panel/40",children:[d.jsx(nt,{className:"text-xs text-muted-foreground",children:Ls(new Date(e.at).getTime())}),d.jsx(nt,{children:d.jsx(AOe,{trigger:e.trigger})}),d.jsx(nt,{className:"text-xs tabular-nums text-muted-foreground",children:TOe(e.durationMs)}),d.jsx(nt,{className:"text-xs tabular-nums text-foreground",children:e.deletedTotal.toLocaleString()}),d.jsx(nt,{children:t.length>0?d.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(([n,r])=>d.jsx(COe,{type:n,count:r},n))}):d.jsx("span",{className:"text-muted-foreground",children:"—"})}),d.jsx(nt,{className:"text-xs tabular-nums text-muted-foreground",children:e.archivedTotal!=null?e.archivedTotal.toLocaleString():"—"}),d.jsx(nt,{className:"text-xs text-bad",children:e.error??""})]})}function MOe(){var f;const{data:e,isLoading:t,isError:n}=WU(),r=ks(),i=DN(),o=kOe(),a=((f=r.data)==null?void 0:f.pruneEnabled)??!1,s=(e==null?void 0:e.runs)??[],l=(e==null?void 0:e.config)??null;async function u(){if(globalThis.confirm("Prune now deletes entries older than the retention window. Continue?"))try{const c=await i.mutateAsync();globalThis.alert(`Pruned ${c.pruned} ${c.pruned===1?"entry":"entries"}.`)}catch{globalThis.alert("Prune failed.")}}return d.jsxs("div",{className:"space-y-4 p-4",children:[d.jsxs("div",{className:"flex items-center justify-between px-1",children:[d.jsx("h3",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Prune activity"}),d.jsx(Ye,{onClick:u,disabled:!a||i.isPending,title:a?"Run a prune cycle now":"Mutations are disabled (configure authorizeAction to enable on-demand pruning).",children:i.isPending?"Pruning…":"Prune now"})]}),l?d.jsx(ROe,{config:l,nextRunAt:(e==null?void 0:e.nextRunAt)??null,nowMs:o}):d.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-6 text-center text-xs text-muted-foreground",children:"No retention window is configured. Set a `prune` option to enable automatic pruning."}),t&&d.jsx("p",{className:"px-1 py-2 text-xs text-muted-foreground",children:"Loading prune runs…"}),n&&d.jsx("p",{className:"px-1 py-2 text-xs text-bad",children:"Failed to load prune runs."}),!t&&!n&&s.length===0&&d.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-12 text-center text-xs text-muted-foreground",children:"No prune runs recorded yet on this pod."}),s.length>0&&d.jsx("div",{className:"rounded-lg border border-line",children:d.jsxs(Fd,{className:"min-w-[760px] text-left text-sm",children:[d.jsx(Bd,{children:d.jsxs(kr,{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:[d.jsx(qe,{children:"Time"}),d.jsx(qe,{children:"Trigger"}),d.jsx(qe,{children:"Duration"}),d.jsx(qe,{children:"Deleted"}),d.jsx(qe,{children:"By type"}),d.jsx(qe,{children:"Archived"}),d.jsx(qe,{children:"Error"})]})}),d.jsx(zd,{children:s.map((c,p)=>d.jsx(NOe,{run:c},`${c.at}:${p}`))})]})})]})}function $Oe(){var s;const[e,t]=O.useState("1h"),n=xi(),{data:r,isLoading:i}=FN(e),o=D1({window:e,buckets:60}),a=AO(((s=o.data)==null?void 0:s.buckets)??[]);return d.jsxs("div",{className:"space-y-4 p-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-sm text-brand",children:"Pulse"}),d.jsx(Kd,{value:e,onChange:t})]}),d.jsx(jO,{title:"Throughput by type",series:a,data:nF(o.data)}),i||!r?d.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):d.jsx(Zbe,{report:r,onSelectEntry:l=>n(`/entries/view/${l}`),onSelectFamily:l=>n(`/entries/query?familyHash=${encodeURIComponent(l)}`),onSelectRoute:l=>n(`/entries/request?familyHash=${encodeURIComponent(l)}`),onSelectOutgoing:l=>n(`/entries/http_client?familyHash=${encodeURIComponent(l)}`)})]})}const IOe="var(--bad)",DOe="var(--good)";function LOe(e){return((e==null?void 0:e.queues)??[]).map(t=>({label:t.queue,value:Number((t.failureRate*100).toFixed(1)),color:t.failureRate>0?IOe:DOe}))}function FOe(){const[e,t]=O.useState("1h"),{data:n,isLoading:r}=BN(e);return d.jsxs("div",{className:"space-y-4 p-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-sm text-brand",children:"Queue metrics"}),d.jsx(Kd,{value:e,onChange:t})]}),d.jsx(us,{title:"Failure rate by queue",valueLabel:"fail %",data:LOe(n)}),r||!n?d.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):d.jsx(e0e,{report:n,sparkline:i=>d.jsx(n0e,{queue:i,window:e})})]})}const BOe=[{to:"/queues",label:"Manage",end:!0},{to:"/queues/metrics",label:"Metrics",end:!1}];function zOe(){return d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:"flex gap-1 border-b border-line px-4 pt-3",children:BOe.map(e=>d.jsx(th,{to:e.to,end:e.end,className:({isActive:t})=>`rounded-t-md px-3 py-1.5 text-xs transition-colors ${t?"bg-panel text-brand":"text-muted-foreground hover:text-foreground"}`,children:e.label},e.to))}),d.jsx(Gz,{})]})}const UOe={cron:"tint-brand",interval:"tint-muted",timeout:"text-warn tint-warn"};function VOe({kind:e}){return d.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${UOe[e]}`,children:e})}function HOe({running:e}){return e==null?d.jsx("span",{className:"rounded bg-panel-2 px-1.5 py-0.5 text-[9px] uppercase tracking-wide text-muted-foreground",children:"unknown"}):d.jsxs("span",{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${e?"tint-good":"tint-bad"}`,children:[d.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${e?"bg-good":"bg-bad"}`}),e?"active":"stopped"]})}function WOe({status:e}){if(e===null)return d.jsx("span",{className:"text-muted-foreground",children:"—"});const t=e==="completed"?"tint-good":"tint-bad";return d.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${t}`,children:e})}function KOe(e){return e===null?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}function qOe(e){if(e===null)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleString()}function GOe({task:e}){return d.jsxs(kr,{className:"border-t border-line/60 hover:bg-panel/40",children:[d.jsx(nt,{className:"font-medium text-foreground",children:e.name}),d.jsx(nt,{children:d.jsx(VOe,{kind:e.kind})}),d.jsx(nt,{children:d.jsx(HOe,{running:e.running})}),d.jsx(nt,{className:"font-mono text-xs text-muted-foreground",children:e.schedule}),d.jsx(nt,{className:"text-xs text-muted-foreground",children:qOe(e.nextRunAt)}),d.jsx(nt,{className:"text-xs text-muted-foreground",children:Ls(XOe(e.lastRunAt))}),d.jsx(nt,{className:"text-xs tabular-nums text-muted-foreground",children:KOe(e.lastDurationMs)}),d.jsx(nt,{children:d.jsx(WOe,{status:e.lastStatus})})]})}function XOe(e){if(e===null)return null;const t=new Date(e).getTime();return Number.isNaN(t)?null:t}function YOe(){const{data:e,isLoading:t,isError:n}=FU(),r=(e==null?void 0:e.tasks)??[],i=r.filter(a=>a.running===!0).length,o=r.filter(a=>a.running===!1).length;return d.jsxs("div",{className:"space-y-3 p-4",children:[d.jsxs("div",{className:"flex items-center justify-between px-1",children:[d.jsx("h3",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Scheduled tasks"}),r.length>0&&d.jsxs("div",{className:"flex items-center gap-3 text-[10px] uppercase tracking-wide",children:[d.jsxs("span",{className:"text-good",children:[i," active"]}),o>0&&d.jsxs("span",{className:"text-bad",children:[o," stopped"]}),d.jsxs("span",{className:"text-muted-foreground",children:[r.length," total"]})]})]}),t&&d.jsx("p",{className:"px-1 py-2 text-xs text-muted-foreground",children:"Loading schedules…"}),n&&d.jsx("p",{className:"px-1 py-2 text-xs text-bad",children:"Failed to load schedules."}),!t&&!n&&r.length===0&&d.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-12 text-center text-xs text-muted-foreground",children:"No scheduled tasks detected. Register a ScheduleManager (the @nestjs/schedule watcher) to populate this console."}),r.length>0&&d.jsx("div",{className:"rounded-lg border border-line",children:d.jsxs(Fd,{className:"min-w-[760px] text-left text-sm",children:[d.jsx(Bd,{children:d.jsxs(kr,{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:[d.jsx(qe,{children:"Name"}),d.jsx(qe,{children:"Kind"}),d.jsx(qe,{children:"Active"}),d.jsx(qe,{children:"Schedule"}),d.jsx(qe,{children:"Next run"}),d.jsx(qe,{children:"Last run"}),d.jsx(qe,{children:"Duration"}),d.jsx(qe,{children:"Status"})]})}),d.jsx(zd,{children:r.map(a=>d.jsx(GOe,{task:a},`${a.kind}:${a.name}`))})]})})]})}function QOe(){const{traceId:e=""}=Eg(),t=xi(),[n,r]=O.useState("waterfall"),{data:i,isLoading:o}=LN({traceId:e}),a=(i==null?void 0:i.data)??[],{data:s,isLoading:l}=i5(e);return d.jsxs("div",{className:"p-4",children:[d.jsx("button",{type:"button",onClick:()=>t("/entries"),className:"mb-4 text-xs text-muted-foreground hover:text-foreground",children:"← entries"}),d.jsxs("div",{className:"mb-4 flex flex-wrap items-baseline gap-3 border-b border-line pb-3",children:[d.jsx("h2",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Trace"}),d.jsx("span",{className:"max-w-md truncate font-mono text-xs text-foreground",title:e,children:e}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:[a.length," ",a.length===1?"entry":"entries"]}),d.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[d.jsxs("div",{className:"flex overflow-hidden rounded border border-line text-[11px]",children:[d.jsx("button",{type:"button",onClick:()=>r("waterfall"),className:`px-2.5 py-1 transition-colors ${n==="waterfall"?"bg-panel-2 text-foreground":"bg-panel text-muted-foreground hover:text-foreground"}`,children:"Waterfall"}),d.jsx("button",{type:"button",onClick:()=>r("entries"),className:`border-l border-line px-2.5 py-1 transition-colors ${n==="entries"?"bg-panel-2 text-foreground":"bg-panel text-muted-foreground hover:text-foreground"}`,children:"Entries"})]}),a.length>0?d.jsx("button",{type:"button",onClick:()=>PO(`telescope-trace-${e}.json`,a),className:"rounded border border-line bg-panel px-2.5 py-1 text-[11px] text-foreground transition-colors hover:border-line hover:bg-panel-2 hover:text-foreground",children:"Download JSON"}):null]})]}),n==="waterfall"?l?d.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):s===void 0||s.spans.length===0?d.jsx("p",{className:"text-muted-foreground",children:"No spans in this trace"}):d.jsx(qxe,{waterfall:s,onSelect:u=>t(`/entries/view/${u}`)}):o?d.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):a.length===0?d.jsx("p",{className:"text-muted-foreground",children:"No entries in this trace"}):d.jsx(WL,{entries:a,onSelect:u=>t(`/entries/view/${u}`)})]})}function JOe(e){return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}function ZOe({trace:e}){const t=xi(),n=e.rootLabel??e.traceId;return d.jsxs("button",{type:"button",onClick:()=>t(`/traces/${e.traceId}`),className:"flex w-full items-center gap-3 border-b border-line-soft px-3 py-2 text-left hover:bg-panel",children:[d.jsx("span",{className:"flex shrink-0 items-center gap-1","aria-hidden":"true",children:e.types.map(r=>d.jsx("span",{className:`h-2 w-2 rounded-full ${L1(r)}`,title:r},r))}),d.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-foreground",title:n,children:n}),d.jsxs("span",{className:"shrink-0 text-xs text-muted-foreground",children:[e.entryCount," ",e.entryCount===1?"entry":"entries"]}),d.jsx("span",{className:"w-16 shrink-0 text-right text-xs text-muted-foreground",children:JOe(e.totalDurationMs)}),d.jsx("span",{className:"w-16 shrink-0 text-right text-xs text-muted-foreground",children:Ls(new Date(e.lastAt).getTime())})]})}function ePe(){const[e,t]=O.useState("1h"),{data:n,isLoading:r}=r5(e),i=(n==null?void 0:n.traces)??[];return d.jsxs("div",{className:"space-y-4 p-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-sm text-brand",children:"Traces"}),d.jsx(Kd,{value:e,onChange:t})]}),r?d.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):i.length===0?d.jsx("p",{className:"text-muted-foreground",children:"No traces in this window"}):d.jsx("div",{className:"border border-line",children:i.map(o=>d.jsx(ZOe,{trace:o},o.traceId))})]})}const tPe=new W4;function nPe(){return d.jsx(oU,{children:d.jsx(K0e,{children:d.jsxs(Yz,{children:[d.jsx(vn,{path:"/",element:d.jsx(hwe,{})}),d.jsx(vn,{path:"/entries",element:d.jsx(S_,{})}),d.jsx(vn,{path:"/entries/view/:id",element:d.jsx(ywe,{})}),d.jsx(vn,{path:"/entries/:type",element:d.jsx(S_,{})}),d.jsx(vn,{path:"/traces",element:d.jsx(ePe,{})}),d.jsx(vn,{path:"/traces/:traceId",element:d.jsx(QOe,{})}),d.jsx(vn,{path:"/pulse",element:d.jsx($Oe,{})}),d.jsxs(vn,{path:"/queues",element:d.jsx(zOe,{}),children:[d.jsx(vn,{index:!0,element:d.jsx(mwe,{})}),d.jsx(vn,{path:"metrics",element:d.jsx(FOe,{})})]}),d.jsx(vn,{path:"/schedules",element:d.jsx(YOe,{})}),d.jsx(vn,{path:"/prunes",element:d.jsx(MOe,{})}),d.jsx(vn,{path:"/exports",element:d.jsx(Pwe,{})}),d.jsx(vn,{path:"/profiles",element:d.jsx(jOe,{})}),d.jsx(vn,{path:"/ext/:dashboardId",element:d.jsx(bOe,{})})]})})})}function rPe(){const{phase:e,modes:t}=_O();return e==="loading"?d.jsx("div",{className:"min-h-screen bg-background","data-testid":"auth-loading"}):e==="screen"?d.jsx(_0e,{modes:t}):d.jsx(nPe,{})}function iPe(){return d.jsx(D0e,{children:d.jsx(mU,{children:d.jsx(K4,{client:tPe,children:d.jsx(j0e,{children:d.jsx(rPe,{})})})})})}const N_=document.getElementById("root");N_&&rN(N_).render(d.jsx(O.StrictMode,{children:d.jsx(iPe,{})}));
173
+ `)})]})]})}function b0e({driver:e,queue:t,jobId:n,state:r,capabilities:i,onClose:o}){const{data:a,isLoading:s,isError:l}=zU(e,t,n);return d.jsx(yL,{open:!0,onOpenChange:u=>{u||o()},children:d.jsxs(vL,{placement:"right",className:"flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-2.5",children:[d.jsx(ove,{className:"text-xs font-normal uppercase tracking-wide text-muted-foreground",children:"Job detail"}),d.jsx(Ye,{variant:"ghost",size:"xs","aria-label":"Close job detail",onClick:o,children:"✕"})]}),d.jsx("div",{className:"flex-1 overflow-auto p-4",children:s?d.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading job…"}):l?d.jsx("p",{className:"text-xs text-bad",children:"Failed to load job."}):a?d.jsx(x0e,{detail:a,capabilities:i,driver:e,queue:t,state:r,onClose:o}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"Job not found (it may have been removed)."})})]})})}function w0e(e){return e instanceof Error&&/\b403\b/.test(e.message)}function S0e(e){const t=e.trim();if(t==="")return{ok:!1,message:"Payload is required."};try{return{ok:!0,value:JSON.parse(t)}}catch{return{ok:!1,message:"Payload must be valid JSON."}}}function O0e({capabilities:e,driver:t,queue:n}){const r=VU(),[i,o]=O.useState(""),[a,s]=O.useState(""),[l,u]=O.useState(null),[f,c]=O.useState(void 0);if(!My(e,t,"enqueue"))return null;const p=w0e(r.error);async function h(v){v.preventDefault(),c(void 0);const y=S0e(a);if(!y.ok){u(y.message);return}u(null);try{const x=await r.mutateAsync({driver:t,queue:n,...i.trim()!==""?{name:i.trim()}:{},payload:y.value});c(x.id),s("")}catch{}}return d.jsxs("form",{onSubmit:h,className:"space-y-2 rounded-lg border border-line p-3",children:[d.jsx("h3",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Send message"}),d.jsx("input",{type:"text",value:i,onChange:v=>o(v.target.value),placeholder:"Job name (optional)","aria-label":"Job name",className:"w-full rounded border border-line bg-background px-2 py-1 text-xs text-foreground placeholder:text-muted-foreground"}),d.jsx("textarea",{value:a,onChange:v=>s(v.target.value),placeholder:'{"to": "a@b.c"}',"aria-label":"Payload (JSON)",rows:4,className:"w-full rounded border border-line bg-background px-2 py-1 font-mono text-xs text-foreground placeholder:text-muted-foreground"}),l&&d.jsx("p",{className:"text-[10px] text-bad",children:l}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ye,{type:"submit",variant:"good",disabled:r.isPending,children:r.isPending?"Sending…":"Send message"}),p&&d.jsx("span",{className:"text-[10px] text-bad",children:"Not authorized"}),f!==void 0&&!p&&d.jsx("span",{className:"text-[10px] text-good",children:f?`Enqueued job ${f}`:"Message enqueued"})]})]})}const TO=O.createContext(null);function P0e(e){return e instanceof Error&&/ 401$/.test(e.message)}function j0e({children:e}){const t=Be(),n=oo(),[r,i]=O.useState("loading"),[o,a]=O.useState([]),s=O.useRef(!1),l=O.useMemo(()=>{async function u(){const c=await t.auth.me();if(c.status==="authenticated"){s.current=!0,i("app");return}if(c.status==="unauthenticated"){s.current=!0,a(c.modes),i("screen");return}s.current=!1,i("disabled")}async function f(){await t.auth.logout(),await u()}return{phase:r,modes:o,refresh:u,logout:f}},[t,r,o]);return O.useEffect(()=>{let u=!1;return t.auth.me().then(f=>{u||(f.status==="authenticated"?(s.current=!0,i("app")):f.status==="unauthenticated"?(s.current=!0,a(f.modes),i("screen")):(s.current=!1,i("disabled")))}),()=>{u=!0}},[t]),O.useEffect(()=>n.getQueryCache().subscribe(f=>{f.type==="updated"&&f.query.state.status==="error"&&s.current&&P0e(f.query.state.error)&&l.refresh()}),[n,l]),d.jsx(TO.Provider,{value:l,children:e})}function _O(){const e=O.useContext(TO);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e}function E0e(){return O.useContext(TO)}function A0e({children:e}){return d.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 font-mono text-sm text-foreground",children:d.jsxs("div",{className:"w-full max-w-sm rounded-lg border border-line bg-panel p-8 shadow-2xl",children:[d.jsx("div",{className:"mb-6 text-center text-lg font-semibold text-brand",children:"Telescope"}),e]})})}function C0e(){const e=Be(),{refresh:t}=_O(),[n,r]=O.useState(""),[i,o]=O.useState(""),a=O.useId(),s=O.useId(),[l,u]=O.useState(null),[f,c]=O.useState(!1);async function p(h){h.preventDefault(),c(!0),u(null);try{const v=await e.auth.login(n,i);if(v.ok){await t();return}u(v.message)}finally{c(!1)}}return d.jsxs("form",{onSubmit:p,className:"flex flex-col gap-4",children:[d.jsxs("label",{className:"flex flex-col gap-1.5",htmlFor:a,children:[d.jsx("span",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Username"}),d.jsx(Es,{id:a,type:"text",name:"username",autoComplete:"username",value:n,onChange:h=>r(h.target.value),className:"px-3 py-2 text-sm"})]}),d.jsxs("label",{className:"flex flex-col gap-1.5",htmlFor:s,children:[d.jsx("span",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Password"}),d.jsx(Es,{id:s,type:"password",name:"password",autoComplete:"current-password",value:i,onChange:h=>o(h.target.value),className:"px-3 py-2 text-sm"})]}),l!==null?d.jsx("p",{role:"alert",className:"text-xs text-bad",children:l}):null,d.jsx(Ye,{type:"submit",variant:"brand",size:"md",disabled:f,className:"mt-2 uppercase tracking-wide",children:f?"Signing in…":"Sign in"})]})}function T0e(){const{refresh:e}=_O(),[t,n]=O.useState(!1);async function r(){n(!0);try{await e()}finally{n(!1)}}return d.jsxs("div",{className:"flex flex-col gap-4 text-center",children:[d.jsx("p",{className:"text-sm font-medium text-foreground",children:"Open Telescope from your application"}),d.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"Your session is minted by the host app. Use its “Open Telescope” action to sign in, then come back here."}),d.jsx("button",{type:"button",onClick:r,disabled:t,className:"mt-2 rounded border border-line px-3 py-2 text-xs font-medium uppercase tracking-wide text-foreground transition-colors hover:bg-panel-2 disabled:cursor-not-allowed disabled:opacity-50",children:t?"Checking…":"Retry"})]})}function _0e({modes:e}){const t=e.includes("login");return d.jsx(A0e,{children:t?d.jsx(C0e,{}):d.jsx(T0e,{})})}const k0e=[{id:"page-overview",label:"Overview",to:"/"},{id:"page-entries",label:"Entries",to:"/entries"},{id:"page-pulse",label:"Pulse",to:"/pulse"},{id:"page-queues",label:"Queues",to:"/queues"},{id:"page-metrics",label:"Queue Metrics",to:"/queues/metrics"},{id:"page-schedules",label:"Schedules",to:"/schedules"},{id:"page-traces",label:"Traces",to:"/traces"}],R0e=[...k0e,...ql.map(e=>({id:`entry-${e.id}`,label:e.label,to:`/entries/${e.id}`}))];function N0e(e,t){const n=t.trim().toLowerCase();return n?e.filter(r=>r.label.toLowerCase().includes(n)):e}function M0e(){const[e,t]=O.useState(!1);return O.useEffect(()=>{function n(r){(r.metaKey||r.ctrlKey)&&r.key.toLowerCase()==="k"&&(r.preventDefault(),t(i=>!i))}return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[]),{open:e,setOpen:t}}function $0e({open:e,onClose:t}){const n=xi(),r=O.useRef(null),[i,o]=O.useState(""),[a,s]=O.useState(0),l=O.useId(),u=O.useMemo(()=>N0e(R0e,i),[i]);O.useEffect(()=>{var h;e&&(o(""),s(0),(h=r.current)==null||h.focus())},[e]),O.useEffect(()=>{s(h=>u.length===0?0:Math.min(h,u.length-1))},[u.length]);const f=O.useCallback(h=>{h&&(n(h.to),t())},[n,t]);function c(h){u.length!==0&&(h.key==="ArrowDown"?(h.preventDefault(),s(v=>(v+1)%u.length)):h.key==="ArrowUp"?(h.preventDefault(),s(v=>(v-1+u.length)%u.length)):h.key==="Enter"&&(h.preventDefault(),f(u[a])))}const p=u[a]?`${l}-${u[a].id}`:void 0;return d.jsx(yL,{open:e,onOpenChange:h=>{h||t()},children:d.jsxs(vL,{placement:"top","aria-label":"Command palette",className:"overflow-hidden",initialFocus:r,onKeyDown:c,children:[d.jsx("input",{ref:r,type:"text",value:i,onChange:h=>o(h.target.value),placeholder:"Jump to…","aria-label":"Search actions","aria-controls":l,"aria-activedescendant":p,className:"w-full border-b border-line bg-transparent px-4 py-3 text-sm text-foreground outline-none placeholder:text-muted-foreground"}),d.jsx("ul",{id:l,role:"listbox",className:"max-h-72 overflow-y-auto py-1",children:u.length===0?d.jsx("li",{className:"px-4 py-3 text-xs text-muted-foreground",children:"No matching actions"}):u.map((h,v)=>d.jsx("li",{id:`${l}-${h.id}`,role:"option","aria-selected":v===a,onMouseEnter:()=>s(v),onMouseDown:y=>{y.preventDefault(),f(h)},className:`cursor-pointer px-4 py-2 text-sm ${v===a?"bg-panel-2 text-brand":"text-foreground"}`,children:h.label},h.id))})]})})}const ZL="telescope-theme",fx="dark",eF=O.createContext(null);function v_(){if(typeof window>"u"||!window.localStorage)return fx;try{const e=window.localStorage.getItem(ZL);return e==="light"||e==="dark"?e:fx}catch{return fx}}function I0e(e){if(!(typeof window>"u"||!window.localStorage))try{window.localStorage.setItem(ZL,e)}catch{}}function D0e({children:e}){const[t,n]=O.useState(v_),r=O.useCallback(()=>{n(o=>{const a=o==="dark"?"light":"dark";return I0e(a),a})},[]);O.useEffect(()=>{n(v_())},[]),O.useEffect(()=>{if(typeof document>"u")return;const o=document.documentElement;return o.classList.toggle("light",t==="light"),o.classList.toggle("dark",t==="dark"),()=>{o.classList.remove("light","dark")}},[t]);const i=O.useMemo(()=>({theme:t,toggleTheme:r}),[t,r]);return d.jsx(eF.Provider,{value:i,children:d.jsx("div",{className:t,"data-theme":t,"data-testid":"telescope-root",children:e})})}function L0e(){const e=O.useContext(eF);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}const F0e=[{to:"/",label:"Overview",end:!0},{to:"/entries",label:"Entries",end:!0},{to:"/traces",label:"Traces",end:!0},{to:"/pulse",label:"Pulse",end:!1},{to:"/queues",label:"Queues",end:!1},{to:"/schedules",label:"Schedules",end:!1},{to:"/prunes",label:"Prunes",end:!1},{to:"/exports",label:"Exports",end:!1},{to:"/profiles",label:"Profiles",end:!1}];function B0e(e,t,n){return e.filter(r=>!(r.to==="/traces"&&t===!1||r.to==="/profiles"&&n!==!0))}function x_({isActive:e}){return`block rounded px-3 py-1.5 text-xs uppercase tracking-wide ${e?"bg-panel-2 text-brand":"text-muted-foreground hover:bg-panel hover:text-foreground"}`}function z0e({isActive:e}){return`flex items-center gap-2 rounded px-3 py-1.5 text-xs ${e?"bg-panel-2 text-foreground":"text-muted-foreground hover:bg-panel hover:text-foreground"}`}function U0e(){const{paused:e,setPaused:t}=RN();return d.jsxs(bO,{children:[d.jsx(wO,{render:d.jsxs(Ye,{variant:e?"warn":"good",onClick:()=>t(!e),"aria-pressed":e,className:"uppercase tracking-wide",children:[d.jsx("span",{"aria-hidden":"true",children:e?"⏸":"●"}),e?"Paused":"Live"]})}),d.jsx(SO,{children:e?"Resume live tail":"Pause live tail"})]})}function V0e(){const{theme:e,toggleTheme:t}=L0e(),n=e==="dark";return d.jsxs(bO,{children:[d.jsx(wO,{render:d.jsxs(Ye,{onClick:t,"aria-pressed":!n,children:[d.jsx("span",{"aria-hidden":"true",children:n?"☾":"☀"}),n?"Dark":"Light"]})}),d.jsx(SO,{children:n?"Switch to light theme":"Switch to dark theme"})]})}function H0e({onClick:e}){return d.jsxs(bO,{children:[d.jsx(wO,{render:d.jsx(Ye,{onClick:e,"aria-label":"Open command palette","aria-keyshortcuts":"Meta+K Control+K",className:"text-muted-foreground hover:text-foreground",children:d.jsx("span",{"aria-hidden":"true",children:"⌘K"})})}),d.jsx(SO,{children:"Open command palette (⌘K)"})]})}function W0e(){const e=E0e(),[t,n]=O.useState(!1);if(e===null||e.phase!=="app")return null;async function r(){if(e!==null){n(!0);try{await e.logout()}finally{n(!1)}}}return d.jsxs(Ye,{onClick:r,disabled:t,title:"Sign out",children:[d.jsx("span",{"aria-hidden":"true",children:"⎋"}),"Sign out"]})}function K0e({children:e}){var a,s,l,u,f,c;const{open:t,setOpen:n}=M0e(),r=ks(),i=y5(g5((a=r.data)==null?void 0:a.entryTypes),(s=r.data)==null?void 0:s.watchers),o=B0e(F0e,(l=r.data)==null?void 0:l.tracesEnabled,(f=(u=r.data)==null?void 0:u.profiling)==null?void 0:f.enabled);return d.jsxs("div",{className:"flex min-h-screen bg-background font-mono text-sm text-foreground",children:[d.jsx($0e,{open:t,onClose:()=>n(!1)}),d.jsxs("aside",{className:"flex w-56 shrink-0 flex-col gap-6 border-r border-line px-3 py-4",children:[d.jsx("span",{className:"px-3 text-base font-semibold text-brand",children:"Telescope"}),d.jsxs("nav",{className:"flex flex-col gap-1",children:[o.map(p=>d.jsx(th,{to:p.to,end:p.end,className:x_,children:p.label},p.to)),(((c=r.data)==null?void 0:c.dashboards)??[]).map(p=>d.jsx(th,{to:`/ext/${p.id}`,className:x_,children:p.label},p.id))]}),d.jsxs("nav",{className:"flex flex-col gap-1",children:[d.jsx("span",{className:"px-3 pb-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:"Watchers"}),i.map(p=>d.jsxs(th,{to:`/entries/${p.id}`,className:z0e,children:[d.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${p.dot}`,"aria-hidden":"true"}),p.label]},p.id))]})]}),d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[d.jsx("header",{className:"flex items-center justify-end gap-4 border-b border-line px-4 py-2",children:d.jsxs(Rxe,{delay:200,children:[d.jsx(Tbe,{}),d.jsx(H0e,{onClick:()=>n(!0)}),d.jsx(V0e,{}),d.jsx(U0e,{}),d.jsx(W0e,{})]})}),d.jsx("main",{className:"min-w-0 flex-1",children:e})]})]})}function q0e(e,t){if(e===void 0||!t)return null;const n=t.direction==="up-bad";return(n?e>=t.bad:e<=t.bad)?"bad":(n?e>=t.warn:e<=t.warn)?"warn":"ok"}const G0e={ok:"var(--good)",warn:"var(--warn)",bad:"var(--bad)"};function X0e({points:e}){if(e.length<2)return null;const t=Math.max(...e),n=Math.min(...e),r=t-n||1,i=e.map((o,a)=>{const s=a/(e.length-1)*100,l=20-(o-n)/r*18-1;return`${a===0?"M":"L"}${s.toFixed(1)},${l.toFixed(1)}`}).join(" ");return d.jsxs("svg",{className:"mt-2",width:"100%",height:"22",viewBox:"0 0 100 22",preserveAspectRatio:"none",children:[d.jsx("title",{children:"Trend sparkline"}),d.jsx("path",{d:i,fill:"none",stroke:"var(--muted)",strokeWidth:"1.5"})]})}function wt({label:e,value:t,delta:n,deltaLabel:r,spark:i,thresholds:o,currentValue:a,accent:s="text-foreground",hint:l}){const u=q0e(a,o),f=n===void 0||!o?null:o.direction==="up-bad"?n<0:n>0,c=f===null?"#a1a1aa":f?"var(--good)":"var(--bad)",p=n===void 0?"":n>0?"▲":n<0?"▼":"◆";return d.jsxs("div",{"data-health":u??void 0,className:"rounded-lg border border-line bg-panel/40 px-4 py-3 overflow-hidden",children:[u&&d.jsx("div",{style:{height:3,background:G0e[u],margin:"-12px -16px 9px"}}),d.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:e}),d.jsxs("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${s} flex items-baseline gap-2`,children:[t,n!==void 0&&d.jsxs("span",{className:"text-xs font-semibold",style:{color:c},children:[p," ",r??Math.abs(n)]})]}),i&&d.jsx(X0e,{points:i}),l&&d.jsx("p",{className:"mt-0.5 text-[10px] text-muted-foreground",children:l})]})}function Y0e(e){const t=Math.max(0,Math.floor(e)),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60);return n>0?`${n}d ${r}h`:r>0?`${r}h ${i}m`:`${i}m ${t%60}s`}function Q0e({stats:e}){return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Server"}),e?d.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5",children:[d.jsx(wt,{label:"Uptime",value:Y0e(e.uptimeSec),accent:"text-brand"}),d.jsx(wt,{label:"RSS",value:`${e.memory.rssMb} MB`,hint:`heap ${e.memory.heapUsedMb}/${e.memory.heapTotalMb} MB`}),d.jsx(wt,{label:"Heap used",value:`${e.memory.heapUsedMb} MB`,accent:"text-sky-400"}),d.jsx(wt,{label:"CPU",value:`${Math.round(e.cpu.userMs)} ms`,accent:"text-violet-400",hint:`sys ${Math.round(e.cpu.systemMs)} ms`}),d.jsx(wt,{label:"Event loop",value:e.eventLoopDelayMs===null?"n/a":`${e.eventLoopDelayMs} ms`,accent:e.eventLoopDelayMs!==null&&e.eventLoopDelayMs>100?"text-bad":"text-foreground",hint:`instance ${e.instanceId}`})]}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading…"})]})}function J0e(e){return`${(Math.max(0,e)/1e3).toFixed(1)} µs`}function b_(e){return e===null?"n/a":`${e.toFixed(1)} ms`}function Z0e({health:e}){return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsxs("div",{className:"mb-3 flex items-baseline justify-between gap-3",children:[d.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Telescope health"}),d.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Captures run off the response path — your requests don't wait on Telescope."})]}),e?d.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",children:[d.jsx(wt,{label:"Capture cost",value:`${J0e(e.captureCostNanos)}/capture`,accent:"text-brand",hint:"micro-benchmark"}),d.jsx(wt,{label:"Buffer",value:`${e.bufferUsed} / ${e.bufferSize}`,accent:"text-sky-400",hint:`high-water ${e.bufferHighWater}`}),d.jsx(wt,{label:"Last flush",value:b_(e.lastFlushMs),hint:`max ${b_(e.maxFlushMs)}`}),d.jsx(wt,{label:"Flushes",value:e.flushes.toLocaleString(),accent:"text-violet-400",hint:`${e.flushedEntries.toLocaleString()} entries`}),d.jsx(wt,{label:"Dropped",value:e.droppedCount.toLocaleString(),accent:e.droppedCount>0?"text-bad":"text-good",hint:e.droppedCount>0?`overflow ${e.overflowDropped} · store ${e.storeFailedDropped}`:"keeping up"}),d.jsx(wt,{label:"Truncated",value:e.truncatedCount.toLocaleString(),accent:e.truncatedCount>0?"text-warn":"text-good",hint:e.truncatedCount>0?"fat content — tune redact/sampling":"within bounds"})]}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading…"})]})}function ewe({retention:e,pruneEnabled:t}){const n=DN(),r=e==null?void 0:e.retention;async function i(){if(globalThis.confirm("Prune now deletes entries older than the retention window. Continue?"))try{const o=await n.mutateAsync();globalThis.alert(`Pruned ${o.pruned} ${o.pruned===1?"entry":"entries"}.`)}catch{globalThis.alert("Prune failed.")}}return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsxs("div",{className:"mb-3 flex items-baseline justify-between gap-3",children:[d.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Retention"}),t?d.jsx("button",{type:"button",onClick:i,disabled:n.isPending,className:"rounded border border-line px-2 py-1 text-[11px] text-foreground hover:border-brand hover:text-brand disabled:cursor-not-allowed disabled:opacity-50",children:n.isPending?"Pruning…":"Prune now"}):null]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:[d.jsx(wt,{label:"Window",value:r?nf(r.afterMs):"none",accent:r?"text-brand":"text-muted-foreground",hint:(r==null?void 0:r.keepLast)!=null?`keep last ${r.keepLast}`:"unbounded"}),d.jsx(wt,{label:"Entries",value:(e==null?void 0:e.entryCount)!=null?e.entryCount.toLocaleString():"n/a"}),d.jsx(wt,{label:"Oldest",value:(e==null?void 0:e.oldestCreatedAt)!=null?"tracked":"n/a"})]})]})}function tF(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function twe(e){return((e==null?void 0:e.buckets)??[]).map(t=>({label:tF(t.t),value:t.total}))}function nF(e){const t=AO((e==null?void 0:e.buckets)??[]);return((e==null?void 0:e.buckets)??[]).map(n=>{const r={label:tF(n.t)};for(const i of t)r[i]=n.byType[i]??0;return r})}function nwe(e){return Object.values(e).reduce((t,n)=>t+n,0)}function rwe(e){const t=e.request??0;return t===0?null:(e.exception??0)/t}const iwe=.05;function owe(e){return e===null?"n/a":`${(e*100).toFixed(1)}%`}function awe(e){return(e==null?void 0:e.slowRoutes.length)??0}const Tw=100;function swe(e){return((e==null?void 0:e.queues)??[]).filter(t=>{const n=Math.max(0,t.total-t.completed-t.failed);return t.failed>0||n>=Tw})}function lwe({pulse:e,queues:t}){const n=(e==null?void 0:e.counts)??{},r=nwe(n),i=n.request??0,o=n.exception??0,a=rwe(n),s=((t==null?void 0:t.queues)??[]).reduce((u,f)=>u+f.failed,0),l=awe(e);return d.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[d.jsx(wt,{label:"Requests",value:i.toLocaleString(),accent:"text-brand",hint:`${r.toLocaleString()} entries total`}),d.jsx(wt,{label:"Error rate",value:owe(a),accent:a!==null&&a>iwe?"text-bad":"text-foreground",hint:`${o.toLocaleString()} exceptions`}),d.jsx(wt,{label:"Failed jobs",value:s.toLocaleString(),accent:s>0?"text-bad":"text-foreground",hint:"across queues"}),d.jsx(wt,{label:"Slow routes",value:l.toLocaleString(),accent:l>0?"text-warn":"text-foreground",hint:"routes over the slow p99 threshold"})]})}function w_({title:e,emptyLabel:t,children:n}){const r=Array.isArray(n)?n.length>0:!!n;return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:e}),r?d.jsx("ul",{className:"space-y-1 text-xs",children:n}):d.jsx("p",{className:"text-xs text-muted-foreground",children:t})]})}function uwe({hotspots:e,onSelectFamily:t}){return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"N+1 query hotspots"}),e.length>0?d.jsx("ul",{className:"space-y-1 text-xs",children:e.map(n=>d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:()=>t(n.familyHash),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[d.jsxs("span",{className:"min-w-0 truncate",children:[d.jsxs("span",{className:"whitespace-nowrap text-warn",children:["×",n.perRequest]})," ",d.jsx("span",{className:"text-muted-foreground",children:n.sql})]}),d.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[n.requests," req · ",n.total," total",n.totalDurationMs>0?` · ${Math.round(n.totalDurationMs)}ms`:""]})]})},n.familyHash))}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"None detected"})]})}function cwe({queues:e,onOpenQueues:t}){return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsxs("div",{className:"mb-3 flex items-baseline justify-between gap-3",children:[d.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Queues needing attention"}),d.jsx("button",{type:"button",onClick:t,className:"text-[11px] text-muted-foreground hover:text-brand",children:"All queues →"})]}),e.length>0?d.jsx("ul",{className:"space-y-1 text-xs",children:e.map(n=>{const r=Math.max(0,n.total-n.completed-n.failed);return d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:t,className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[d.jsx("span",{className:"min-w-0 truncate text-foreground",children:n.queue}),d.jsxs("span",{className:"shrink-0 tabular-nums",children:[n.failed>0?d.jsxs("span",{className:"text-bad",children:[n.failed," failed"]}):null,n.failed>0&&r>=Tw?d.jsx("span",{className:"text-muted-foreground",children:" · "}):null,r>=Tw?d.jsxs("span",{className:"text-warn",children:[r.toLocaleString()," pending"]}):null]})]})},n.queue)})}):d.jsx("p",{className:"text-xs text-good",children:"All queues healthy"})]})}function fwe({hotspots:e}){return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Slowest jobs"}),e.length>0?d.jsx("ul",{className:"space-y-1 text-xs",children:e.map(t=>d.jsxs("li",{className:"flex items-center justify-between gap-3 border-t border-line-soft pt-1 first:border-0 first:pt-0",children:[d.jsx("span",{className:"min-w-0 truncate text-foreground",children:t.route}),d.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[d.jsxs("span",{className:"text-warn",children:[Math.round(t.p99),"ms"]})," p99 · ",t.count,"×"]})]},t.route))}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"No jobs in window."})]})}function dwe({users:e,onSelectUser:t}){return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Load by user"}),e.length>0?d.jsx("ul",{className:"space-y-1 text-xs",children:e.map(n=>d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:()=>t(n.user),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[d.jsx("span",{className:"min-w-0 truncate text-foreground",children:n.user}),d.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[n.count," req · ",Math.round(n.totalDurationMs),"ms"]})]})},n.user))}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"No identified users in window."})]})}function pwe({history:e}){const t=(e==null?void 0:e.samples)??[],n=t.map(a=>a.cpuPercent),r=t.map(a=>a.rssMb),i=t.map(a=>a.heapUsedMb),o=t[t.length-1];return d.jsxs("section",{className:"rounded-lg border border-line bg-panel/40 p-4",children:[d.jsx("h3",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Resource history"}),t.length>1?d.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["CPU ",o?`${o.cpuPercent}%`:""]}),d.jsx(ch,{values:n})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["RSS ",o?`${o.rssMb}MB`:""]}),d.jsx(ch,{values:r})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 text-[11px] text-muted-foreground",children:["Heap ",o?`${o.heapUsedMb}MB`:""]}),d.jsx(ch,{values:i})]})]}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"Collecting samples…"})]})}function hwe(){var y,x,m,g,b,S,w;const[e,t]=O.useState("1h"),n=xi(),r=FN(e),i=BN(e),o=D1({window:e,buckets:60}),a=QU(),s=JU(),l=e5(),u=HU(),f=ks(),c=twe(o.data),p=nF(o.data),h=AO(((y=o.data)==null?void 0:y.buckets)??[]),v=swe(i.data);return d.jsxs("div",{className:"space-y-4 p-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-sm text-brand",children:"Overview"}),d.jsx(Kd,{value:e,onChange:t})]}),d.jsx(lwe,{pulse:r.data,queues:i.data}),d.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[d.jsx(w_,{title:"Recent failures",emptyLabel:"No exceptions 🎉",children:(((x=r.data)==null?void 0:x.topExceptions)??[]).map(P=>d.jsxs("li",{className:"flex items-center justify-between gap-3 border-t border-line-soft pt-1 first:border-0 first:pt-0",children:[d.jsxs("span",{className:"min-w-0",children:[d.jsx("span",{className:"text-bad",children:P.class})," ",d.jsx("span",{className:"text-muted-foreground",children:P.message})]}),d.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:["×",P.count]})]},P.familyHash))}),d.jsx(uwe,{hotspots:((m=r.data)==null?void 0:m.nPlusOne)??[],onSelectFamily:P=>n(`/entries/query?familyHash=${encodeURIComponent(P)}`)})]}),d.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[d.jsx(w_,{title:"Slowest",emptyLabel:"Nothing slow in window.",children:(((g=r.data)==null?void 0:g.slowest)??[]).map(P=>d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:()=>n(`/entries/view/${P.id}`),className:"flex w-full items-center justify-between gap-3 border-t border-line-soft pt-1 text-left hover:text-foreground first:border-0 first:pt-0",children:[d.jsxs("span",{className:"min-w-0 truncate",children:[d.jsx("span",{className:"text-brand",children:P.type})," ",d.jsx("span",{className:"text-muted-foreground",children:P.label})]}),d.jsxs("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:[P.durationMs,"ms"]})]})},P.id))}),d.jsx(cwe,{queues:v,onOpenQueues:()=>n("/queues")})]}),d.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[d.jsx(fwe,{hotspots:((b=r.data)==null?void 0:b.slowJobs)??[]}),d.jsx(dwe,{users:((S=r.data)==null?void 0:S.loadByUser)??[],onSelectUser:P=>n(`/entries?tag=${encodeURIComponent(`user:${P}`)}`)})]}),d.jsx(pwe,{history:s.data}),d.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[d.jsx(Ds,{title:"Throughput",valueLabel:"entries",data:c}),d.jsx(jO,{title:"By type",series:h,data:p})]}),d.jsx(Q0e,{stats:a.data}),d.jsx(Z0e,{health:l.data}),d.jsx(ewe,{retention:u.data,pruneEnabled:((w=f.data)==null?void 0:w.pruneEnabled)??!1})]})}function mwe(){const{data:e}=$N(),t=(e==null?void 0:e.queues)??[],n=e==null?void 0:e.capabilities,[r,i]=O.useState(void 0),[o,a]=O.useState("waiting"),[s,l]=O.useState(null);O.useEffect(()=>{if(r||t.length===0)return;const c=t[0];c&&i({driver:c.driver,queue:c.queue})},[t,r]);const u=t.find(c=>c.driver===(r==null?void 0:r.driver)&&c.queue===(r==null?void 0:r.queue));function f(c,p){i({driver:c,queue:p}),l(null)}return d.jsxs("div",{className:"grid grid-cols-1 gap-4 p-4 lg:grid-cols-[280px_minmax(0,1fr)]",children:[d.jsxs("aside",{className:"space-y-2",children:[d.jsx("h3",{className:"px-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:"Live queues"}),d.jsx(o0e,{...r?{selected:r}:{},onSelect:f})]}),d.jsx("section",{className:"min-w-0 space-y-3",children:r?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("h2",{className:"truncate text-sm text-brand",children:[r.queue,d.jsx("span",{className:"ml-2 text-[10px] uppercase tracking-wide text-muted-foreground",children:r.driver})]}),o==="failed"&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(g0e,{capabilities:n,driver:r.driver,queue:r.queue}),d.jsx(y0e,{capabilities:n,driver:r.driver,queue:r.queue})]})]}),d.jsx(a0e,{counts:u==null?void 0:u.counts,state:o,onState:a}),d.jsx(c0e,{driver:r.driver,queue:r.queue,state:o,onOpen:l}),d.jsx(O0e,{capabilities:n,driver:r.driver,queue:r.queue})]}):d.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-12 text-center text-xs text-muted-foreground",children:"Select a queue to inspect its jobs."})}),r&&s&&d.jsx(b0e,{driver:r.driver,queue:r.queue,jobId:s,state:o,capabilities:n,onClose:()=>l(null)})]})}function gwe(e,t){return t.trim()!==""?`No entries match tag '${t.trim()}'`:e?`No ${Tg(e)} entries`:"No entries"}function S_(){const{type:e}=Eg(),t=xi(),[n]=cU(),[r,i]=O.useState(()=>n.get("tag")??""),[o,a]=O.useState(""),[s,l]=O.useState(""),[u,f]=O.useState(0),[c,p]=O.useState(0);function h(k){i(k),p(D=>D+1)}function v(k){i(k),f(D=>D+1)}const y=e&&h5(e)?e:void 0,x=r.trim(),m=Fxe(x)?x:"",g=m===""?x:"",b=s.trim(),S=n.get("familyHash")??"",w=S!=="",P=b!=="",j=y!==void 0||x!==""||w||P,{data:E,isLoading:A}=LN({...y?zN(y):{},...x!==""?{tag:x}:{},...w?{familyHash:S}:{},...P?{search:b}:{}}),C=(E==null?void 0:E.data)??[];function _(){l(o)}function T(){a(""),l("")}function R(){i(""),T(),t("/entries")}function M(){t(y?`/entries/${y}`:"/entries")}return d.jsxs("div",{className:"p-4",children:[y?d.jsx(Xbe,{type:y}):null,d.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-3 border-b border-line pb-3",children:[y?d.jsxs(Ye,{variant:"ghost",onClick:()=>t("/entries"),className:"bg-panel text-foreground hover:bg-panel-2",children:[d.jsx("span",{className:`h-2 w-2 rounded-full ${L1(y)}`,"aria-hidden":"true"}),Tg(y),d.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):d.jsx("span",{className:"rounded bg-panel px-2 py-1 text-xs text-muted-foreground",children:"All types"}),d.jsx(h_,{onSelect:h},`tag-${u}`),d.jsx(h_,{prefix:Lxe,placeholder:"Filter by user…",ariaLabel:"Filter by user",onSelect:v},`user-${c}`),g!==""?d.jsxs(Ye,{variant:"ghost",onClick:()=>i(""),className:"bg-panel text-foreground hover:bg-panel-2",children:[d.jsx("span",{children:`tag:${g}`}),d.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,m!==""?d.jsxs(Ye,{variant:"ghost",onClick:()=>i(""),className:"bg-panel text-foreground hover:bg-panel-2",children:[d.jsx("span",{children:`User: ${OO(m)}`}),d.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,d.jsx(Es,{type:"text",value:o,onChange:k=>a(k.target.value),onKeyDown:k=>{k.key==="Enter"&&_()},onBlur:_,placeholder:"Search content…","aria-label":"Search content"}),P?d.jsxs(Ye,{variant:"ghost",onClick:T,className:"bg-panel text-foreground hover:bg-panel-2",children:[d.jsx("span",{children:`search:"${b}"`}),d.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,w?d.jsxs(Ye,{variant:"ghost",onClick:M,className:"bg-panel text-foreground hover:bg-panel-2",children:[d.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"family:"}),S.slice(0,12),d.jsx("span",{className:"text-muted-foreground","aria-hidden":"true",children:"×"})]}):null,j?d.jsx(Ye,{variant:"ghost",onClick:R,children:"Clear filters"}):null]}),A?d.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):C.length===0?d.jsx("p",{className:"text-muted-foreground",children:gwe(y,r)}):d.jsx(WL,{entries:C,onSelect:k=>t(`/entries/view/${k}`)})]})}function ywe(){const{id:e=""}=Eg(),t=xi(),{data:n,isLoading:r}=YU(e);return d.jsxs("div",{className:"p-4",children:[d.jsx("button",{type:"button",onClick:()=>t("/entries"),className:"mb-4 text-xs text-muted-foreground hover:text-foreground",children:"← entries"}),r||!n?d.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):d.jsx(lbe,{entry:n,onSelect:i=>t(`/entries/view/${i}`)})]})}const vwe={json:"JSON",csv:"CSV"},xwe={all:"all",...Object.fromEntries(ql.map(e=>[e.id,e.label]))},bwe=200,O_=1e3,P_=1e4,j_={"15m":15*6e4,"1h":60*6e4,"6h":6*60*6e4,"24h":24*60*6e4};function wwe(e){return e==="all"?{}:zN(e)}async function Swe(e,t,n,r,i){const o=[];let a;for(;o.length<n;){const s=Math.min(bwe,n-o.length),l=await e.entries({...t,limit:s,...a!==void 0?{cursor:a}:{}});let u=!1;for(const f of l.data){if(new Date(f.createdAt).getTime()<r){u=!0;break}if(o.push(f),o.length>=n)break}if(i(o.length),u||l.nextCursor===null)break;a=l.nextCursor}return o}function Owe({records:e}){return e.length===0?null:d.jsx("div",{className:"rounded-lg border border-line",children:d.jsxs(Fd,{className:"min-w-[640px] text-left",children:[d.jsx(Bd,{children:d.jsxs(kr,{children:[d.jsx(qe,{children:"Filename"}),d.jsx(qe,{children:"Type"}),d.jsx(qe,{children:"Rows"}),d.jsx(qe,{children:"Format"}),d.jsx(qe,{children:"Time"})]})}),d.jsx(zd,{children:e.map(t=>d.jsxs(kr,{className:"hover:bg-panel",children:[d.jsx(nt,{className:"font-mono text-foreground",children:t.filename}),d.jsx(nt,{className:"text-muted-foreground",children:t.type}),d.jsx(nt,{className:"tabular-nums text-foreground",children:t.rows.toLocaleString()}),d.jsx(nt,{className:"uppercase text-muted-foreground",children:t.format}),d.jsx(nt,{className:"text-muted-foreground",children:new Date(t.at).toLocaleTimeString()})]},`${t.filename}:${t.at}`))})]})})}function Pwe(){const e=Be(),t=O.useId(),n=O.useId(),[r,i]=O.useState("all"),[o,a]=O.useState("1h"),[s,l]=O.useState(""),[u,f]=O.useState(O_),[c,p]=O.useState("json"),[h,v]=O.useState(!1),[y,x]=O.useState(null),[m,g]=O.useState(null),[b,S]=O.useState([]);async function w(){v(!0),g(null),x(0);const P=Math.min(Math.max(1,u),P_),j=Date.now()-(j_[o]??j_["1h"]),E={...wwe(r),...s.trim()!==""?{search:s.trim()}:{}};try{const A=await Swe(e,E,P,j,x),C=new Date().toISOString().replace(/[:.]/g,"-"),_=`telescope-export-${r}-${C}.${c}`;c==="csv"?Abe(_,Ebe(A)):PO(_,A),S(T=>[{filename:_,type:r,rows:A.length,format:c,at:Date.now()},...T])}catch{g("Export failed while gathering entries.")}finally{v(!1)}}return d.jsxs("div",{className:"space-y-4 p-4",children:[d.jsxs("div",{className:"px-1",children:[d.jsx("h3",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Export workbench"}),d.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Page captured entries into a downloadable JSON or CSV file. Gathering runs in your browser against the live store, newest-first within the selected window."})]}),d.jsxs("div",{className:"flex flex-wrap items-end gap-3 rounded-lg border border-line bg-panel/40 p-4",children:[d.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:["Type",d.jsxs(Sw,{items:xwe,value:r,onValueChange:P=>{typeof P=="string"&&i(P)},children:[d.jsx(Pw,{"aria-label":"Entry type",children:d.jsx(Ow,{})}),d.jsxs(jw,{children:[d.jsx(Lc,{value:"all",children:"all"}),ql.map(P=>d.jsx(Lc,{value:P.id,children:P.label},P.id))]})]})]}),d.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:["Window",d.jsx(Kd,{value:o,onChange:a})]}),d.jsxs("label",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",htmlFor:t,children:["Search",d.jsx(Es,{id:t,type:"text",value:s,onChange:P=>l(P.target.value),placeholder:"content filter"})]}),d.jsxs("label",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",htmlFor:n,children:["Limit",d.jsx(Es,{id:n,type:"number",min:1,max:P_,value:u,onChange:P=>f(Number(P.target.value)||O_),className:"w-24 tabular-nums"})]}),d.jsxs("div",{className:"flex flex-col gap-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:["Format",d.jsxs(Sw,{items:vwe,value:c,onValueChange:P=>p(P==="csv"?"csv":"json"),children:[d.jsx(Pw,{"aria-label":"Export format",children:d.jsx(Ow,{})}),d.jsxs(jw,{children:[d.jsx(Lc,{value:"json",children:"JSON"}),d.jsx(Lc,{value:"csv",children:"CSV"})]})]})]}),d.jsx(Ye,{onClick:w,disabled:h,size:"md",children:h?"Exporting…":"Export"}),h&&y!==null&&d.jsxs("span",{className:"text-xs tabular-nums text-muted-foreground",children:["gathered ",y.toLocaleString(),"…"]})]}),m&&d.jsx("p",{className:"px-1 text-xs text-bad",children:m}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("h4",{className:"px-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:"Recent exports (this session)"}),b.length===0?d.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-10 text-center text-xs text-muted-foreground",children:"No exports yet. Pick a type, window, and format, then export."}):d.jsx(Owe,{records:b})]})]})}function jwe({title:e,segments:t,style:n="donut",height:r=220,onSelect:i}){const o=r-64,a=O.useMemo(()=>nc(t.map(f=>f.label),(f,c)=>{var p;return lx(f,c,(p=t[c])==null?void 0:p.color)}),[t]);function s(f){const c=t[f];c&&i&&i(Ud({label:c.label,value:c.value}))}const l=i?{onClick:(f,c)=>s(c),cursor:"pointer"}:{};if(t.length===0)return d.jsx(na,{title:e,height:o,children:d.jsx(Vd,{height:o})});if(n==="bar"){const f=[{name:"breakdown",...Object.fromEntries(t.map(c=>[c.label,c.value]))}];return d.jsx(na,{title:e,height:o,children:d.jsx(Ss,{config:a,children:d.jsxs(YS,{data:f,layout:"vertical",children:[d.jsx(xu,{content:d.jsx(bu,{hideLabel:!0})}),d.jsx(ew,{content:d.jsx(nw,{})}),t.map((c,p)=>d.jsx(fo,{dataKey:c.label,stackId:"a",fill:lx(c.label,p,c.color),isAnimationActive:!1,...i?{onClick:()=>s(p),cursor:"pointer"}:{}},c.label))]})})})}const u=t.map((f,c)=>({name:f.label,value:f.value,color:lx(f.label,c,f.color)}));return d.jsx(na,{title:e,height:o,children:d.jsx(Ss,{config:a,children:d.jsxs(Lpe,{children:[d.jsx(xu,{content:d.jsx(bu,{hideLabel:!0})}),d.jsx(ew,{content:d.jsx(nw,{})}),d.jsx(co,{data:u,dataKey:"value",nameKey:"name",innerRadius:"55%",outerRadius:"80%",isAnimationActive:!1,...l,children:u.map(f=>d.jsx(Wu,{fill:f.color},f.name))})]})})})}function Ewe(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`}const Awe={p50:"tint-good",p95:"tint-warn",p99:"tint-bad"};function Cwe({title:e,buckets:t,p50:n,p95:r,p99:i,height:o=220,onSelect:a}){const s=[];n!==void 0&&s.push([n,"p50"]),r!==void 0&&s.push([r,"p95"]),i!==void 0&&s.push([i,"p99"]);const l=o-64,u=O.useMemo(()=>nc(["count"],()=>"var(--live)"),[]),f=a?{onClick:(c,p)=>{const h=t[p];h&&a(Ud({label:h.label,value:h.count}))},cursor:"pointer"}:{};return d.jsx(na,{title:e,height:l,children:d.jsxs("div",{className:"flex h-full flex-col",children:[s.length>0&&d.jsx("div",{className:"mb-1.5 flex flex-wrap gap-2",children:s.map(([c,p])=>d.jsxs("span",{className:`rounded border px-1.5 text-[10px] tabular-nums ${Awe[p]}`,children:[p,": ",Ewe(c)]},p))}),d.jsx("div",{className:"min-h-0 flex-1",children:t.length===0?d.jsx(Vd,{}):d.jsx(Ss,{config:u,children:d.jsxs(YS,{data:t,margin:{top:4,right:8,bottom:0,left:-16},children:[d.jsx(_d,{vertical:!1}),d.jsx(Zi,{dataKey:"label",tickLine:!1}),d.jsx(eo,{tickLine:!1,allowDecimals:!1,width:40}),d.jsx(xu,{cursor:{fill:"color-mix(in srgb, var(--text) 5%, transparent)"},content:d.jsx(bu,{})}),d.jsx(fo,{dataKey:"count",name:"count",fill:Ui("count"),radius:[3,3,0,0],isAnimationActive:!1,...f})]})})})]})})}function Twe({title:e,value:t,min:n=0,max:r=1,label:i,color:o="var(--good)",height:a=220}){const s=r-n,l=s===0?0:Math.max(0,Math.min(1,(t-n)/s)),u=i??`${Math.round(l*100)}%`,f=a-64,c=O.useMemo(()=>nc(["value"],()=>o,()=>e),[o,e]),p=[{value:l*100}];return d.jsx(na,{title:e,height:f,children:d.jsxs("div",{className:"relative h-full",children:[d.jsx(Ss,{config:c,children:d.jsxs(Fpe,{innerRadius:"60%",outerRadius:"100%",data:p,startAngle:180,endAngle:0,barSize:16,children:[d.jsx(Xu,{type:"number",domain:[0,100],tick:!1,axisLine:!1}),d.jsx(Td,{dataKey:"value",fill:Ui("value"),background:!0,cornerRadius:4,isAnimationActive:!1})]})}),d.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center pt-[40%]",children:d.jsx("span",{className:"text-xl font-semibold tabular-nums text-foreground",children:u})})]})})}function _we({columns:e}){const[t,n]=O.useState(!1),r=O.useRef(null),i=e.filter(a=>a.getCanHide());if(O.useEffect(()=>{if(!t)return;function a(l){var u;l.target instanceof Node&&((u=r.current)!=null&&u.contains(l.target))||n(!1)}function s(l){l.key==="Escape"&&n(!1)}return document.addEventListener("mousedown",a),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",s)}},[t]),i.length===0)return null;const o=i.filter(a=>!a.getIsVisible()).length;return d.jsxs("div",{className:"relative",ref:r,children:[d.jsxs(Ye,{variant:"ghost",size:"xs","aria-haspopup":"menu","aria-expanded":t,onClick:()=>n(a=>!a),className:"px-1.5 text-muted-foreground",children:["Columns",o>0?` (${i.length-o}/${i.length})`:""]}),t&&d.jsx("div",{role:"menu",className:"absolute right-0 z-20 mt-1 min-w-[10rem] rounded border border-line bg-popover p-1 shadow-lg",children:i.map(a=>d.jsxs(Ye,{role:"menuitemcheckbox","aria-checked":a.getIsVisible(),variant:"ghost",size:"xs",onClick:()=>a.toggleVisibility(),className:"w-full justify-start gap-2 normal-case tracking-normal",children:[d.jsx("span",{"aria-hidden":"true",className:a.getIsVisible()?"":"opacity-30",children:a.getIsVisible()?"☑":"☐"}),typeof a.columnDef.header=="string"?a.columnDef.header:a.id]},a.id))})]})}function kwe(e){return Rwe(e)||typeof e=="function"||Nwe(e)}function Rwe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Nwe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Wa(e,t){return e==null?null:kwe(e)?I.createElement(e,t):e}function Mwe(e){var t,n;if("cell"in e&&e.cell){const r=e.cell,i=r.column.columnDef,o=r,a=i;return(t=o.getIsAggregated)!=null&&t.call(o)?Wa(a.aggregatedCell??i.cell,r.getContext()):(n=o.getIsPlaceholder)!=null&&n.call(o)?null:Wa(i.cell,r.getContext())}return"header"in e&&e.header?Wa(e.header.column.columnDef.header,e.header.getContext()):"footer"in e&&e.footer?Wa(e.footer.column.columnDef.footer,e.footer.getContext()):null}let we=function(e){return e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e}({});function $we({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:o,checkDirty:a,shallowPropagate:s};function r(u,f,c){const p=f.depsTail;if(p!==void 0&&p.dep===u)return;const h=p!==void 0?p.nextDep:f.deps;if(h!==void 0&&h.dep===u){h.version=c,f.depsTail=h;return}const v=u.subsTail;if(v!==void 0&&v.version===c&&v.sub===f)return;const y=f.depsTail=u.subsTail={version:c,dep:u,sub:f,prevDep:p,nextDep:h,prevSub:v,nextSub:void 0};h!==void 0&&(h.prevDep=y),p!==void 0?p.nextDep=y:f.deps=y,v!==void 0?v.nextSub=y:u.subs=y}function i(u,f=u.sub){const c=u.dep,p=u.prevDep,h=u.nextDep,v=u.nextSub,y=u.prevSub;return h!==void 0?h.prevDep=p:f.depsTail=p,p!==void 0?p.nextDep=h:f.deps=h,v!==void 0?v.prevSub=y:c.subsTail=y,y!==void 0?y.nextSub=v:(c.subs=v)===void 0&&n(c),h}function o(u){let f=u.nextSub,c;e:do{const p=u.sub;let h=p.flags;if(h&(we.RecursedCheck|we.Recursed|we.Dirty|we.Pending)?h&(we.RecursedCheck|we.Recursed)?h&we.RecursedCheck?!(h&(we.Dirty|we.Pending))&&l(u,p)?(p.flags=h|(we.Recursed|we.Pending),h&=we.Mutable):h=we.None:p.flags=h&~we.Recursed|we.Pending:h=we.None:p.flags=h|we.Pending,h&we.Watching&&t(p),h&we.Mutable){const v=p.subs;if(v!==void 0){const y=(u=v).nextSub;y!==void 0&&(c={value:f,prev:c},f=y);continue}}if((u=f)!==void 0){f=u.nextSub;continue}for(;c!==void 0;)if(u=c.value,c=c.prev,u!==void 0){f=u.nextSub;continue e}break}while(!0)}function a(u,f){let c,p=0,h=!1;e:do{const v=u.dep,y=v.flags;if(f.flags&we.Dirty)h=!0;else if((y&(we.Mutable|we.Dirty))===(we.Mutable|we.Dirty)){if(e(v)){const x=v.subs;x.nextSub!==void 0&&s(x),h=!0}}else if((y&(we.Mutable|we.Pending))===(we.Mutable|we.Pending)){(u.nextSub!==void 0||u.prevSub!==void 0)&&(c={value:u,prev:c}),u=v.deps,f=v,++p;continue}if(!h){const x=u.nextDep;if(x!==void 0){u=x;continue}}for(;p--;){const x=f.subs,m=x.nextSub!==void 0;if(m?(u=c.value,c=c.prev):u=x,h){if(e(f)){m&&s(x),f=u.sub;continue}h=!1}else f.flags&=~we.Pending;f=u.sub;const g=u.nextDep;if(g!==void 0){u=g;continue e}}return h}while(!0)}function s(u){do{const f=u.sub,c=f.flags;(c&(we.Pending|we.Dirty))===we.Pending&&(f.flags=c|we.Dirty,(c&(we.Watching|we.RecursedCheck))===we.Watching&&t(f))}while((u=u.nextSub)!==void 0)}function l(u,f){let c=f.depsTail;for(;c!==void 0;){if(c===u)return!0;c=c.prevDep}return!1}}function Iwe(e,t,n){var o,a,s;const r=typeof e=="object",i=r?e:void 0;return{next:(o=r?e.next:e)==null?void 0:o.bind(i),error:(a=r?e.error:t)==null?void 0:a.bind(i),complete:(s=r?e.complete:n)==null?void 0:s.bind(i)}}const _w=[];let fh=0;const{link:E_,unlink:Dwe,propagate:Lwe,checkDirty:rF,shallowPropagate:A_}=$we({update(e){return e._update()},notify(e){_w[kw++]=e,e.flags&=~we.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=we.Mutable|we.Dirty,rg(e))}});let zp=0,kw=0,ri,Rw=0;function Fwe(e){try{++Rw,e()}finally{--Rw||iF()}}function rg(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=Dwe(n,e)}function iF(){if(!(Rw>0)){for(;zp<kw;){const e=_w[zp];_w[zp++]=void 0,e.notify()}zp=0,kw=0}}function Bwe(e,t){const n=typeof e=="function",r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?we.None:we.Mutable,get(){return ri!==void 0&&E_(i,ri,fh),i._snapshot},subscribe(o){const a=Iwe(o),s={current:!1},l=zwe(()=>{var u;i.get(),s.current?(u=a.next)==null||u.call(a,i._snapshot):s.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(o){const a=ri,s=(t==null?void 0:t.compare)??Object.is;if(n)ri=i,++fh,i.depsTail=void 0;else if(o===void 0)return!1;n&&(i.flags=we.Mutable|we.RecursedCheck);try{const l=i._snapshot,u=typeof o=="function"?o(l):o===void 0&&n?r(l):o;return l===void 0||!s(l,u)?(i._snapshot=u,!0):!1}finally{ri=a,n&&(i.flags&=~we.RecursedCheck),rg(i)}}};return n?(i.flags=we.Mutable|we.Dirty,i.get=function(){const o=i.flags;if(o&we.Dirty||o&we.Pending&&rF(i.deps,i)){if(i._update()){const a=i.subs;a!==void 0&&A_(a)}}else o&we.Pending&&(i.flags=o&~we.Pending);return ri!==void 0&&E_(i,ri,fh),i._snapshot}):i.set=function(o){if(i._update(o)){const a=i.subs;a!==void 0&&(Lwe(a),A_(a),iF())}},i}function zwe(e){const t=()=>{const r=ri;ri=n,++fh,n.depsTail=void 0,n.flags=we.Watching|we.RecursedCheck;try{return e()}finally{ri=r,n.flags&=~we.RecursedCheck,rg(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:we.Watching|we.RecursedCheck,notify(){const r=this.flags;r&we.Dirty||r&we.Pending&&rF(this.deps,this)?t():this.flags=we.Watching},stop(){this.flags=we.None,this.depsTail=void 0,rg(this)}};return t(),n}function rf(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!t.has(r)||!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=C_(e);if(n.length!==C_(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function C_(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}function Uwe(e,t){return e===t}function oF(e,t=r=>r,n){const r=(n==null?void 0:n.compare)??Uwe,i=O.useCallback(a=>{const{unsubscribe:s}=e.subscribe(a);return s},[e]),o=O.useCallback(()=>e.get(),[e]);return ZD.useSyncExternalStoreWithSelector(i,o,o,t,r)}function Vwe(e){const t=oF(e.source,e.selector,{compare:rf});return typeof e.children=="function"?e.children(t):e.children}function Hwe(e){const t=e;return Object.defineProperty(e,"state",{get(){return e.get()}}),"set"in e&&(t.setState=e.set.bind(e)),t}function Wwe(e){const{createAtom:t,batch:n}=e,r=t(0);return{createOptionsStore:!1,wrapExternalAtoms:!1,addSubscription:()=>{throw new Error("Feature not supported in current reactivity implementation")},unmount:()=>{throw new Error("Feature not supported in current reactivity implementation")},schedule:e.schedule??(i=>queueMicrotask(i)),batch:n,untrack:i=>i(),createReadonlyAtom:(i,o)=>{const a=(o==null?void 0:o.compare)??Object.is;let s=!1,l;const u=()=>{const c=i();return(!s||!a(l,c))&&(l=c,s=!0),l},f=t(()=>(r.get(),u()),{compare:a});return{get:u,subscribe:f.subscribe.bind(f)}},createWritableAtom:(i,o)=>t(i,{compare:o==null?void 0:o.compare}),commit:()=>{r.set(i=>i+1)}}}function Kwe(e,t=Object.is){let n=!1,r;return{get:e.get,markCommitted:i=>{r=i,n=!0},subscribe:i=>e.subscribe(o=>{(!n||!t(r,o))&&i(o)})}}function qwe(){return Wwe({createAtom:Bwe,batch:Fwe})}function rc(e,t){return typeof e=="function"?e(t):e}function ro(e){if(Array.isArray(e))return e.map(ro);if(e&&typeof e=="object"){const t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return e;const n=t===null?Cn():{},r=Object.keys(e);for(let i=0;i<r.length;i++){const o=r[i];Object.defineProperty(n,o,{configurable:!0,enumerable:!0,value:ro(e[o]),writable:!0})}return n}return e}function Cn(){return Object.create(null)}function $y(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function kO(e,t){return n=>{var r;(((r=t.options.atoms)==null?void 0:r[e])??t.baseAtoms[e]).set(i=>rc(n,i))}}function aF(e){return e instanceof Function}function Gwe(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a.length&&r(a)})};return r(e),n}const Xwe=({fn:e,memoDeps:t,onAfterCompare:n,onAfterUpdate:r,onBeforeCompare:i,onBeforeUpdate:o})=>{let a=[],s;return u=>{i==null||i();const f=t==null?void 0:t(u);let c=!f||f.length!==(a==null?void 0:a.length);if(!c&&f){for(let p=0;p<f.length;p++)if(f[p]!==a[p]){c=!0;break}}return n==null||n(c),c&&(a=f,o==null||o(),s=e(...f??[]),r==null||r(s)),s}};function Ywe(e){let t=!1;return()=>{if(!t){t=!0;return}e()}}function RO({feature:e,fnName:t,objectId:n,onAfterUpdate:r,table:i,...o}){const a=()=>{if(!r)return;const{schedule:l,untrack:u}=i._reactivity;l(()=>u(()=>r()))};return Xwe({...o,...{onAfterUpdate:()=>{a()}}})}function sF(e,t="_"){const[n,r]=e.split(t);return{fnKey:r,fnName:`${n}.${r}`,parentName:n}}function wa(e,t,n){for(const[r,{fn:i,memoDeps:o}]of Object.entries(n)){const{fnKey:a,fnName:s}=sF(r);t[a]=o?RO({memoDeps:o,fn:i,fnName:s,table:t,feature:e}):i}}function la(e,t,n,r){for(const[i,{fn:o,memoDeps:a}]of Object.entries(r)){const{fnKey:s,fnName:l}=sF(i);if(a){const u=`_memo_${s}`;t[s]=function(...f){if(!this[u]){const c=this;this[u]=RO({memoDeps:p=>a(c,p),fn:(...p)=>o(c,...p),fnName:l,objectId:c.id,table:n,feature:e})}return this[u](...f)}}else t[s]=function(...u){return o(this,...u)}}}function fn(e,t,n,...r){var i;return((i=e[t])==null?void 0:i.call(e,...r))??n(e,...r)}function Qwe(e){return e.row.getValue(e.column.id)}function Jwe(e){return e.getValue()??e.table.options.renderFallbackValue}function Zwe(e){return{table:e.table,column:e.column,row:e.row,cell:e,getValue:()=>e.getValue(),renderValue:()=>e.renderValue()}}const e1e={assignCellPrototype:(e,t)=>{la("coreCellsFeature",e,t,{cell_getValue:{fn:n=>Qwe(n)},cell_renderValue:{fn:n=>Jwe(n)},cell_getContext:{fn:n=>Zwe(n),memoDeps:n=>[n]}})}};function t1e(e){var t,n;if(!e._headerPrototype){e._headerPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignHeaderPrototype)==null||n.call(t,e._headerPrototype,e)}return e._headerPrototype}function lF(e,t,n){const r=t1e(e),i=Object.create(r);i.colSpan=0,i.column=t,i.depth=n.depth,i.headerGroup=null,i.id=n.id??t.id,i.index=n.index,i.isPlaceholder=!!n.isPlaceholder,i.placeholderId=n.placeholderId,i.rowSpan=0,i.subHeaders=[];const o=e._headerInstanceInitFns;for(let a=0;a<o.length;a++)o[a](i);return i}function uF(){return{start:[],end:[]}}function n1e(){return Cn()}function cF(e,t){ig(e)&&Iy(e.table,n=>{const r=Object.assign(Cn(),n),i=t??!fn(e,"getIsVisible",Qn),o=e.getLeafColumns();for(let a=0;a<o.length;a++){const s=o[a];ig(s)&&(r[s.id]=i)}return r})}function Qn(e){var r;const t=(r=e.table.atoms.columnVisibility)==null?void 0:r.get();if(!t)return!0;const n=e.columns;return n.length?n.some(i=>fn(i,"getIsVisible",Qn)):($y(t,e.id)?t[e.id]:void 0)??!0}function ig(e){return(e.columnDef.enableHiding??!0)&&(e.table.options.enableHiding??!0)}function r1e(e){return t=>{cF(e,t.target.checked)}}function i1e(e){var u;const t=e.getAllCells(),n=[];for(let f=0;f<t.length;f++){const c=t[f];fn(c.column,"getIsVisible",Qn)&&n.push(c)}const{start:r,end:i}=((u=e.table.atoms.columnPinning)==null?void 0:u.get())??uF();if(!r.length&&!i.length)return n;const o=fn(e,"getVisibleCellsByColumnId",fF),a=[];for(let f=0;f<r.length;f++){const c=o[r[f]];c&&a.push(c)}const s=[];for(let f=0;f<i.length;f++){const c=o[i[f]];c&&s.push(c)}const l=[];for(let f=0;f<n.length;f++){const c=n[f],p=c.column.id;!r.includes(p)&&!i.includes(p)&&l.push(c)}return[...a,...l,...s]}function fF(e){const t=Cn(),n=e.getAllCells();for(let r=0;r<n.length;r++){const i=n[r];fn(i.column,"getIsVisible",Qn)&&(t[i.column.id]=i)}return t}function o1e(e){return e.getAllFlatColumns().filter(t=>fn(t,"getIsVisible",Qn))}function dF(e){return e.getAllLeafColumns().filter(t=>fn(t,"getIsVisible",Qn))}function Iy(e,t){var n,r;(r=(n=e.options).onColumnVisibilityChange)==null||r.call(n,t)}function a1e(e,t){Iy(e,t?Cn():Object.assign(Cn(),ro(e.initialState.columnVisibility??{})))}function pF(e,t){t=t??!hF(e);const n=Cn(),r=e.getAllLeafColumns();for(let i=0;i<r.length;i++){const o=r[i];n[o.id]=t||!ig(o)}Iy(e,n)}function hF(e){return!e.getAllLeafColumns().some(t=>!fn(t,"getIsVisible",Qn))}function s1e(e){return e.getAllLeafColumns().some(t=>fn(t,"getIsVisible",Qn))}function l1e(e){return t=>{pF(e,t.target.checked)}}function mF(e,t=1){let n=t;for(let r=0;r<e.length;r++){const i=e[r];fn(i,"getIsVisible",Qn)&&i.columns.length&&(n=Math.max(n,mF(i.columns,t+1)))}return n}function u1e(e,t){return String(t)}function c1e(e,t,n,r){let i=e??"";return t&&(i=i?`${i}_${t}`:String(t)),n&&(i=i?`${i}_${n}`:n),r&&(i=i?`${i}_${r}`:r),i}function f1e(e,t){let n=0;for(let r=0;r<e.length;r++)e[r].column===t&&n++;return n}function gF(e,t,n,r,i,o){const a={depth:t,id:u1e(r,t),headers:[]},s=[];for(let l=0;l<e.length;l++){if(!(l in e))continue;const u=e[l],f=s[s.length-1],c=u.column.depth===a.depth;let p,h=!1;if(c&&u.column.parent?p=u.column.parent:(p=u.column,h=!0),f&&f.column===p)f.subHeaders.push(u);else{const v=lF(n,p,{id:c1e(r,t,p.id,u.id),isPlaceholder:h,placeholderId:h?String(f1e(s,p)):void 0,depth:t,index:s.length});v.subHeaders.push(u),s.push(v)}a.headers.push(u),u.headerGroup=a}for(let l=0;l<o.length;l++)o[l](a);i.push(a),t>0&&gF(s,t-1,n,r,i,o)}function yF(e){for(let t=0;t<e.length;t++){const n=e[t];if(!fn(n.column,"getIsVisible",Qn))continue;let r=0;if(n.subHeaders.length){yF(n.subHeaders);for(let i=0;i<n.subHeaders.length;i++){const o=n.subHeaders[i];fn(o.column,"getIsVisible",Qn)&&(r+=o.colSpan)}}else r=1;if(n.colSpan=r,n.isPlaceholder&&n.subHeaders.length===1&&n.subHeaders[0].column===n.column){let i=1,o=n.subHeaders[0];for(;o;)o.rowSpan=0,i++,o=o.subHeaders.length===1&&o.subHeaders[0].column===n.column?o.subHeaders[0]:void 0;n.rowSpan=i}else n.rowSpan=1}}function T_(e,t,n,r){var l;const i=mF(e),o=[],a=n._headerGroupInstanceInitFns,s=new Array(t.length);for(let u=0;u<t.length;u++)u in t&&(s[u]=lF(n,t[u],{depth:i,index:u}));return gF(s,i-1,n,r,o,a),o.reverse(),yF(((l=o[0])==null?void 0:l.headers)??[]),o}function d1e(e){var t,n;if(!e._columnPrototype){e._columnPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignColumnPrototype)==null||n.call(t,e._columnPrototype,e)}return e._columnPrototype}function p1e(e,t,n,r){const i={...e.getDefaultColumnDef(),...t},o=i.accessorKey,a=o===void 0?void 0:String(o),s=i.id??(a==null?void 0:a.replaceAll(".","_"))??(typeof i.header=="string"?i.header:void 0);let l;if(i.accessorFn)l=i.accessorFn;else if(o!==void 0)if(typeof o=="string"&&o.includes(".")){const p=o.split(".");l=h=>{let v=h;for(let y=0;y<p.length;y++){const x=p[y];v=v==null?void 0:v[x]}return v}}else l=p=>p[i.accessorKey];if(!s)throw new Error;const u=d1e(e),f=Object.create(u);f.accessorFn=l,f.columnDef=i,f.columns=[],f.depth=n,f.id=`${String(s)}`,f.parent=r;const c=e._columnInstanceInitFns;for(let p=0;p<c.length;p++)c[p](f);return f}function vF(e){var n;const t=(n=e.atoms.columnOrder)==null?void 0:n.get();return r=>{let i=[];if(!(t!=null&&t.length))i=r;else{const o=new Map;for(let a=0;a<r.length;a++){const s=r[a];o.set(s.id,s)}for(let a=0;a<t.length;a++){const s=t[a],l=o.get(s);l&&(i.push(l),o.delete(s))}for(let a=0;a<r.length;a++){const s=r[a];o.has(s.id)&&i.push(s)}}return h1e(e,i)}}function h1e(e,t){var s;const n=((s=e.atoms.grouping)==null?void 0:s.get())??[],{groupedColumnMode:r}=e.options;if(!n.length||!r)return t;const i=t.filter(l=>!n.includes(l.id));if(r==="remove")return i;const o=new Map;for(let l=0;l<t.length;l++){const u=t[l];o.set(u.id,u)}const a=[];for(let l=0;l<n.length;l++){const u=o.get(n[l]);u&&a.push(u)}return[...a,...i]}function m1e(e){return[e,...e.columns.flatMap(t=>t.getFlatColumns())]}function g1e(e){if(e.columns.length){const t=e.columns.flatMap(n=>n.getLeafColumns());return fn(e.table,"getOrderColumns",vF)(t)}return[e]}function y1e(e){return{header:t=>{const n=t.header.column.columnDef;return n.accessorKey?n.accessorKey:n.accessorFn?n.id:null},cell:t=>{var n,r;return((r=(n=t.renderValue())==null?void 0:n.toString)==null?void 0:r.call(n))??null},...Object.values(e._features).reduce((t,n)=>{var r;return Object.assign(t,(r=n.getDefaultColumnDef)==null?void 0:r.call(n))},{}),...e.options.defaultColumn}}function xF(e,t,n,r=0){const i=new Array(t.length);for(let o=0;o<t.length;o++){if(!(o in t))continue;const a=t[o],s=p1e(e,a,r,n),l=a;s.columns=l.columns?xF(e,l.columns,s,r+1):[],i[o]=s}return i}function v1e(e){return xF(e,e.options.columns)}function x1e(e){return e.getAllColumns().flatMap(t=>t.getFlatColumns())}function b1e(e){const t=Cn(),n=e.getAllFlatColumns();for(let r=0;r<n.length;r++){const i=n[r];t[i.id]=i}return t}function w1e(e){const t=e.getAllColumns().flatMap(n=>n.getLeafColumns());return fn(e,"getOrderColumns",vF)(t)}function S1e(e){const t=Cn(),n=e.getAllLeafColumns();for(let r=0;r<n.length;r++){const i=n[r];t[i.id]=i}return t}function O1e(e,t){return e.getAllFlatColumnsById()[t]}const P1e={assignColumnPrototype:(e,t)=>{la("coreColumnsFeature",e,t,{column_getFlatColumns:{fn:n=>m1e(n),memoDeps:n=>[n.table.options.columns]},column_getLeafColumns:{fn:n=>g1e(n),memoDeps:n=>{var r,i;return[(r=n.table.atoms.columnOrder)==null?void 0:r.get(),(i=n.table.atoms.grouping)==null?void 0:i.get(),n.table.options.columns,n.table.options.groupedColumnMode]}}})},constructTableAPIs:e=>{wa("coreColumnsFeature",e,{table_getDefaultColumnDef:{fn:()=>y1e(e),memoDeps:()=>[e.options.defaultColumn]},table_getAllColumns:{fn:()=>v1e(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumns:{fn:()=>x1e(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumnsById:{fn:()=>b1e(e),memoDeps:()=>[e.options.columns]},table_getAllLeafColumns:{fn:()=>w1e(e),memoDeps:()=>{var t,n;return[(t=e.atoms.columnOrder)==null?void 0:t.get(),(n=e.atoms.grouping)==null?void 0:n.get(),e.options.columns,e.options.groupedColumnMode]}},table_getAllLeafColumnsById:{fn:()=>S1e(e),memoDeps:()=>[e.getAllLeafColumns()]},table_getColumn:{fn:t=>O1e(e,t)}})}};function bF(e,t){for(let n=0;n<e.subHeaders.length;n++)bF(e.subHeaders[n],t);t.push(e)}function j1e(e){const t=[];return bF(e,t),t}function E1e(e){return{column:e.column,header:e,table:e.column.table}}function A1e(e){var u;const{start:t,end:n}=((u=e.atoms.columnPinning)==null?void 0:u.get())??uF(),r=e.getAllColumns(),i=fn(e,"getVisibleLeafColumns",dF);if(!t.length&&!n.length)return T_(r,i,e);const o=e.getAllLeafColumnsById(),a=[];for(let f=0;f<t.length;f++){const c=o[t[f]];c&&fn(c,"getIsVisible",Qn)&&a.push(c)}const s=[];for(let f=0;f<n.length;f++){const c=o[n[f]];c&&fn(c,"getIsVisible",Qn)&&s.push(c)}const l=i.filter(f=>!t.includes(f.id)&&!n.includes(f.id));return T_(r,[...a,...l,...s],e)}function C1e(e){return[...e.getHeaderGroups()].reverse()}function T1e(e){const t=e.getHeaderGroups(),n=[];for(let r=0;r<t.length;r++){const i=t[r].headers;for(let o=0;o<i.length;o++)n.push(i[o])}return n}function _1e(e){var r;const t=((r=e.getHeaderGroups()[0])==null?void 0:r.headers)??[],n=[];for(let i=0;i<t.length;i++){const o=t[i].getLeafHeaders();for(let a=0;a<o.length;a++)n.push(o[a])}return n}const k1e={assignHeaderPrototype:(e,t)=>{la("coreHeadersFeature",e,t,{header_getLeafHeaders:{fn:n=>j1e(n),memoDeps:n=>[n.column.table.options.columns]},header_getContext:{fn:n=>E1e(n),memoDeps:n=>[n.column.table.options.columns]}})},constructTableAPIs:e=>{wa("coreHeadersFeature",e,{table_getHeaderGroups:{fn:()=>A1e(e),memoDeps:()=>{var t,n,r,i;return[e.options.columns,(t=e.atoms.columnOrder)==null?void 0:t.get(),(n=e.atoms.grouping)==null?void 0:n.get(),(r=e.atoms.columnPinning)==null?void 0:r.get(),(i=e.atoms.columnVisibility)==null?void 0:i.get(),e.options.groupedColumnMode]}},table_getFooterGroups:{fn:()=>C1e(e),memoDeps:()=>[e.getHeaderGroups()]},table_getFlatHeaders:{fn:()=>T1e(e),memoDeps:()=>[e.getHeaderGroups()]},table_getLeafHeaders:{fn:()=>_1e(e),memoDeps:()=>[e.getHeaderGroups()]}})}};function R1e(e){var t,n;if(!e._rowPrototype){e._rowPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignRowPrototype)==null||n.call(t,e._rowPrototype,e)}return e._rowPrototype}const N1e=(e,t,n,r,i,o,a)=>{const s=R1e(e),l=Object.create(s);l._displayIndexCache=-1,l._uniqueValuesCache=Cn(),l._valuesCache=Cn(),l.depth=i,l.id=t,l.index=r,l.original=n,l.parentId=a,l.subRows=[];const u=e._rowInstanceInitFns;for(let f=0;f<u.length;f++)u[f](l);return l},M1e=/([0-9]+)/gm;function ic(e){const t=Object.assign((n,r,i)=>{let o=n.getValue(i),a=r.getValue(i);const s=t.resolveDataValue;return s&&(o=s(o),a=s(a)),t.sort(o,a,n,r,i)},e);return t}ic({resolveDataValue:e=>Dy(e).toLowerCase(),sort:(e,t)=>SF(e,t)});ic({resolveDataValue:e=>Dy(e),sort:(e,t)=>SF(e,t)});ic({resolveDataValue:e=>Dy(e).toLowerCase(),sort:(e,t)=>NO(e,t)});ic({resolveDataValue:e=>Dy(e),sort:(e,t)=>NO(e,t)});ic({resolveDataValue:e=>$1e(e),sort:(e,t)=>e>t?1:e<t?-1:0});const wF=ic({sort:(e,t)=>NO(e,t)});function NO(e,t){return e===t?0:e>t?1:-1}function $1e(e){return e instanceof Date?e.getTime():e}function Dy(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function SF(e,t){let n=0,r=0;const i=e.length,o=t.length;for(;n<i&&r<o;){const a=og(e.charCodeAt(n)),s=og(t.charCodeAt(r)),l=Nw(e,n,a),u=Nw(t,r,s);if(!a&&!s){const c=I1e(e,n,l,t,r,u);if(c)return c;n=l,r=u;continue}if(a!==s)return a?1:-1;const f=D1e(e,n,l,t,r,u);if(f)return f;n=l,r=u}return k_(e,n)-k_(t,r)}function og(e){return e>=48&&e<=57}function Nw(e,t,n){let r=t+1;for(;r<e.length&&og(e.charCodeAt(r))===n;)r++;return r}function I1e(e,t,n,r,i,o){const a=n-t,s=o-i,l=a<s?a:s;for(let u=0;u<l;u++){const f=e.charCodeAt(t+u),c=r.charCodeAt(i+u);if(f>c)return 1;if(c>f)return-1}return a>s?1:s>a?-1:0}function D1e(e,t,n,r,i,o){let a=t;for(;a<n&&e.charCodeAt(a)===48;)a++;let s=i;for(;s<o&&r.charCodeAt(s)===48;)s++;const l=n-a,u=o-s;if(l===0&&u===0)return 0;if(l<=15&&u<=15){const p=__(e,a,n),h=__(r,s,o);return p>h?1:h>p?-1:0}const f=parseInt(e.slice(t,n),10),c=parseInt(r.slice(i,o),10);return f>c?1:c>f?-1:0}function __(e,t,n){let r=0;for(let i=t;i<n;i++)r=r*10+e.charCodeAt(i)-48;return r}function k_(e,t){let n=0,r=t;for(;r<e.length;)n++,r=Nw(e,r,og(e.charCodeAt(r)));return n}function L1e(){return[]}function F1e(e,t){var n,r;(r=(n=e.options).onCellSelectionChange)==null||r.call(n,t)}function B1e(e,t){F1e(e,ro(e.initialState.cellSelection)??L1e())}function z1e(e){e.atoms.cellSelection&&(e.options.autoResetAll??e.options.autoResetCellSelection??!0)&&e._reactivity.schedule(()=>B1e(e))}function U1e(e){e.atoms.expanded&&(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding)&&e._reactivity.schedule(()=>H1e(e))}function V1e(e,t){var n,r;(r=(n=e.options).onExpandedChange)==null||r.call(n,t)}function H1e(e,t){const n=e.initialState.expanded;V1e(e,n===!0?!0:Object.assign(Cn(),ro(n??{})))}const R_=0;function W1e(e){(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination)&&G1e(e)}function K1e(e,t){var r,i;const n=o=>rc(t,o);return(i=(r=e.options).onPaginationChange)==null?void 0:i.call(r,n)}function q1e(e,t){K1e(e,n=>{let r=rc(t,n.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),{...n,pageIndex:r}})}function G1e(e,t){var i,o;const n=((o=(i=e.atoms.pagination)==null?void 0:i.get())==null?void 0:o.pageIndex)??R_,r=R_;r!==n&&q1e(e,r)}function X1e(){return[]}function Ly(e,t){var n,r;(r=(n=e.options).onSortingChange)==null||r.call(n,t)}function OF(e,t){Ly(e,t?[]:ro(e.initialState.sorting??[]))}function Y1e(e){e.atoms.sorting&&(e.options.autoResetAll??e.options.autoResetSorting??!1)&&OF(e)}function PF(e){const t=e.table._rowModelFns.sortFns,n=e.table.getFilteredRowModel().flatRows.slice(0,10);let r,i=!1;for(let o=0;o<n.length;o++){const a=n[o].getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]"){r="datetime";break}if(typeof a=="string"&&(i=!0,a.split(M1e).length>1)){r="alphanumeric";break}}if(!r&&i&&(r="text"),r){let o=t==null?void 0:t[r];if(o||r==="alphanumeric"&&(o=t==null?void 0:t.text),o)return o}return wF}function jF(e){const t=e.table.getFilteredRowModel().flatRows.slice(0,10);for(let n=0;n<t.length;n++){const r=t[n].getValue(e.id);if(r!=null)return typeof r=="string"?"asc":"desc"}return"desc"}function Q1e(e){const t=e.table._rowModelFns.sortFns;return aF(e.columnDef.sortFn)?e.columnDef.sortFn:e.columnDef.sortFn==="auto"?PF(e):(t==null?void 0:t[e.columnDef.sortFn])??wF}function EF(e,t,n){const r=CF(e,n&&ag(e)),i=typeof t<"u";Ly(e.table,o=>{const a=o.findIndex(p=>p.id===e.id),s=a===-1?void 0:o[a];let l=[],u;const f=i?t:r==="desc",c=!!(o.length&&ag(e)&&n);return c?s?u="toggle":u="add":s?u="toggle":u="replace",u==="toggle"&&(i||r||(u="remove")),u==="add"?(l=[...o,{id:e.id,desc:f}],l.splice(0,l.length-(e.table.options.maxMultiSortColCount??Number.MAX_SAFE_INTEGER))):u==="toggle"?l=c?o.map(p=>p.id===e.id?{...p,desc:f}:p):[{id:e.id,desc:f}]:u==="remove"?l=c?o.filter(p=>p.id!==e.id):[]:l=[{id:e.id,desc:f}],l})}function AF(e){return e.columnDef.sortDescFirst??e.table.options.sortDescFirst??jF(e)==="desc"?"desc":"asc"}function CF(e,t){const n=AF(e),r=_F(e);return r?r!==n&&(e.table.options.enableSortingRemoval??!0)&&(!t||(e.table.options.enableMultiRemove??!0))?!1:r==="desc"?"asc":"desc":n}function TF(e){return(e.columnDef.enableSorting??!0)&&(e.table.options.enableSorting??!0)&&!!e.accessorFn}function ag(e){return e.columnDef.enableMultiSort??e.table.options.enableMultiSort??!!e.accessorFn}function _F(e){var n,r;const t=(r=(n=e.table.atoms.sorting)==null?void 0:n.get())==null?void 0:r.find(i=>i.id===e.id);return t?t.desc?"desc":"asc":!1}function J1e(e){var t,n;return((n=(t=e.table.atoms.sorting)==null?void 0:t.get())==null?void 0:n.findIndex(r=>r.id===e.id))??-1}function Z1e(e){Ly(e.table,t=>t.length?t.filter(n=>n.id!==e.id):[])}function eSe(e){const t=TF(e);return n=>{var r,i;t&&EF(e,void 0,ag(e)?(i=(r=e.table.options).isMultiSortEvent)==null?void 0:i.call(r,n):!1)}}function tSe(){return e=>RO({feature:"coreRowModelsFeature",table:e,fnName:"table.getCoreRowModel",memoDeps:()=>[e.options.data],fn:()=>nSe(e,e.options.data),onAfterUpdate:Ywe(()=>{U1e(e),W1e(e),Y1e(e),z1e(e)})})}function kF(e,t,n,r=0,i){var a;const o=[];for(let s=0;s<n.length;s++){const l=n[s],u=N1e(e,e.getRowId(l,s,i),l,s,r,void 0,i==null?void 0:i.id);t.flatRows.push(u),t.rowsById[u.id]=u,o.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(l,s),(a=u.originalSubRows)!=null&&a.length&&(u.subRows=kF(e,t,u.originalSubRows,r+1,u)))}return o}function nSe(e,t){const n={rows:[],flatRows:[],rowsById:Cn()};return n.rows=kF(e,n,t),n}function rSe(e){var t,n;return e._rowModels.coreRowModel||(e._rowModels.coreRowModel=((n=(t=e.options.features).coreRowModel)==null?void 0:n.call(t,e))??tSe()(e)),e._rowModels.coreRowModel()}function iSe(e){return e.getCoreRowModel()}function oSe(e){var t,n;return e._rowModels.filteredRowModel||(e._rowModels.filteredRowModel=(n=(t=e.options.features).filteredRowModel)==null?void 0:n.call(t,e)),e.options.manualFiltering||!e._rowModels.filteredRowModel?e.getPreFilteredRowModel():e._rowModels.filteredRowModel()}function aSe(e){return e.getFilteredRowModel()}function sSe(e){var t,n;return e._rowModels.groupedRowModel||(e._rowModels.groupedRowModel=(n=(t=e.options.features).groupedRowModel)==null?void 0:n.call(t,e)),e.options.manualGrouping||!e._rowModels.groupedRowModel?e.getPreGroupedRowModel():e._rowModels.groupedRowModel()}function lSe(e){return e.getGroupedRowModel()}function uSe(e){var t,n;return e._rowModels.sortedRowModel||(e._rowModels.sortedRowModel=(n=(t=e.options.features).sortedRowModel)==null?void 0:n.call(t,e)),e.options.manualSorting||!e._rowModels.sortedRowModel?e.getPreSortedRowModel():e._rowModels.sortedRowModel()}function cSe(e){return e.getSortedRowModel()}function fSe(e){var t,n;return e._rowModels.expandedRowModel||(e._rowModels.expandedRowModel=(n=(t=e.options.features).expandedRowModel)==null?void 0:n.call(t,e)),e.options.manualExpanding||!e._rowModels.expandedRowModel?e.getPreExpandedRowModel():e._rowModels.expandedRowModel()}function dSe(e){return e.getExpandedRowModel()}function pSe(e){var t,n;return e._rowModels.paginatedRowModel||(e._rowModels.paginatedRowModel=(n=(t=e.options.features).paginatedRowModel)==null?void 0:n.call(t,e)),e.options.manualPagination||!e._rowModels.paginatedRowModel?e.getPrePaginatedRowModel():e._rowModels.paginatedRowModel()}function hSe(e){return e.getPaginatedRowModel()}const mSe={constructTableAPIs:e=>{wa("coreRowModelsFeature",e,{table_getCoreRowModel:{fn:()=>rSe(e)},table_getPreFilteredRowModel:{fn:()=>iSe(e)},table_getFilteredRowModel:{fn:()=>oSe(e)},table_getPreGroupedRowModel:{fn:()=>aSe(e)},table_getGroupedRowModel:{fn:()=>sSe(e)},table_getPreSortedRowModel:{fn:()=>lSe(e)},table_getSortedRowModel:{fn:()=>uSe(e)},table_getPreExpandedRowModel:{fn:()=>cSe(e)},table_getExpandedRowModel:{fn:()=>fSe(e)},table_getPrePaginatedRowModel:{fn:()=>dSe(e)},table_getPaginatedRowModel:{fn:()=>pSe(e)},table_getRowModel:{fn:()=>hSe(e)}})}};function gSe(e){var t,n;if(!e._cellPrototype){e._cellPrototype={table:e};const r=Object.values(e._features);for(let i=0;i<r.length;i++)(n=(t=r[i]).assignCellPrototype)==null||n.call(t,e._cellPrototype,e)}return e._cellPrototype}function ySe(e,t,n){const r=gSe(n),i=Object.create(r);i.column=e,i.id=`${t.id}_${e.id}`,i.row=t;const o=n._cellInstanceInitFns;for(let a=0;a<o.length;a++)o[a](i);return i}function vSe(e){const t=e.table.getRowsInDisplayOrder(),n=e._displayIndexCache;return t[n]===e?n:-1}function xSe(e){const t=e.getPrePaginatedRowModel().rows;if(e.options.paginateExpandedRows===!1){const n=[],r=i=>{var o;i._displayIndexCache=n.length,n.push(i),i.subRows.length&&((o=i.getIsExpanded)!=null&&o.call(i))&&i.subRows.forEach(r)};return t.forEach(r),n}for(let n=0;n<t.length;n++)t[n]._displayIndexCache=n;return t}function bSe(e,t){if($y(e._valuesCache,t))return e._valuesCache[t];const n=e.table.getColumn(t);if(n!=null&&n.accessorFn)return e._valuesCache[t]=n.accessorFn(e.original,e.index),e._valuesCache[t]}function wSe(e,t){if($y(e._uniqueValuesCache,t))return e._uniqueValuesCache[t];const n=e.table.getColumn(t);if(n!=null&&n.accessorFn)return n.columnDef.getUniqueValues?(e._uniqueValuesCache[t]=n.columnDef.getUniqueValues(e.original,e.index),e._uniqueValuesCache[t]):(e._uniqueValuesCache[t]=[e.getValue(t)],e._uniqueValuesCache[t])}function SSe(e,t){return e.getValue(t)??e.table.options.renderFallbackValue}function OSe(e){return Gwe(e.subRows,t=>t.subRows)}function PSe(e){const t=e.getCoreRowModel().flatRows;let n=0;for(let r=0;r<t.length;r++)n=Math.max(n,t[r].depth);return n}function jSe(e){if(e.parentId)return e.table.getCoreRowModel().rowsById[e.parentId]??e.table.getRow(e.parentId,!0)}function ESe(e){const t=[];let n=e;for(;;){const r=n.getParentRow();if(!r)break;t.push(r),n=r}return t.reverse()}function ASe(e){const t=e.table.getAllLeafColumns();let n=e._cellsCache;n||(n=e._cellsCache=new WeakMap);const r=new Array(t.length);for(let i=0;i<t.length;i++){const o=t[i];let a=n.get(o);a||(a=ySe(o,e,e.table),n.set(o,a)),r[i]=a}return r}function CSe(e){const t=Cn(),n=e.getAllCells();for(let r=0;r<n.length;r++){const i=n[r];t[i.column.id]=i}return t}function TSe(e,t,n,r){var i,o;return((o=(i=t.options).getRowId)==null?void 0:o.call(i,e,n,r))??(r?`${r.id}.${n}`:String(n))}function _Se(e,t,n){let r=(n?e.getPrePaginatedRowModel():e.getRowModel()).rowsById[t];if(!r&&(r=e.getCoreRowModel().rowsById[t],!r))throw new Error;return r}const kSe={assignRowPrototype:(e,t)=>{la("coreRowsFeature",e,t,{row_getDisplayIndex:{fn:n=>vSe(n)},row_getAllCellsByColumnId:{fn:n=>CSe(n),memoDeps:n=>[n.getAllCells()]},row_getAllCells:{fn:n=>ASe(n),memoDeps:n=>[n.table.getAllLeafColumns()]},row_getLeafRows:{fn:n=>OSe(n),memoDeps:n=>[n.subRows]},row_getParentRow:{fn:n=>jSe(n)},row_getParentRows:{fn:n=>ESe(n)},row_getUniqueValues:{fn:(n,r)=>wSe(n,r)},row_getValue:{fn:(n,r)=>bSe(n,r)},row_renderValue:{fn:(n,r)=>SSe(n,r)}})},constructTableAPIs:e=>{wa("coreRowsFeature",e,{table_getRowsInDisplayOrder:{fn:()=>xSe(e),memoDeps:()=>{var t;return[e.getPrePaginatedRowModel().rows,e.options.paginateExpandedRows,e.options.paginateExpandedRows===!1?(t=e.atoms.expanded)==null?void 0:t.get():void 0]}},table_getRowId:{fn:(t,n,r)=>TSe(t,e,n,r)},table_getRow:{fn:(t,n)=>_Se(e,t,n)},table_getMaxSubRowDepth:{fn:()=>PSe(e),memoDeps:()=>[e.getCoreRowModel()]}})}};function RF(e,t,n=(r,i)=>r===i){const r=t===void 0?e.options.state:t;e._reactivity.batch(()=>{if(r)for(const i in r){const o=e.baseAtoms[i];if(!o)continue;const a=r[i],s=a===void 0?e.initialState[i]:a;n(e._reactivity.untrack(()=>o.get()),s)||o.set(()=>s)}})}function NF(e,t,n=(r,i)=>r===i){e._reactivity.batch(()=>{var r,i;RF(e,t,n),(i=(r=e._reactivity).commit)==null||i.call(r)})}function RSe(e){var r,i;const t=ro(e.initialState);e._reactivity.batch(()=>{const o=Object.keys(t);for(let a=0;a<o.length;a++){const s=o[a];e.baseAtoms[s].set(t[s])}});const n=Object.values(e._features);for(let o=0;o<n.length;o++)(i=(r=n[o]).resetTableInstanceData)==null||i.call(r,e)}function NSe(e,t){const{features:n,atoms:r,initialState:i}=e.options;if(!e.options.mergeOptions)return{...e.options,...t,features:n,atoms:r,initialState:i};const o=e.options.mergeOptions(e.options,t),a={...Object.getOwnPropertyDescriptors(o)};return Object.defineProperties(Object.create(Object.getPrototypeOf(o)),{...a,features:{value:n,enumerable:!0,configurable:!0,writable:!0},atoms:{value:r,enumerable:!0,configurable:!0,writable:!0},initialState:{value:i,enumerable:!0,configurable:!0,writable:!0}})}function MF(e,t,n){const r=NSe(e,rc(t,e.options));e.optionsStore?e.optionsStore.set(()=>r):e.options=r,(n==null?void 0:n.syncExternalState)!==!1&&NF(e,r.state??null)}const MSe={constructTableAPIs:e=>{wa("coreTablesFeature",e,{table_reset:{fn:()=>RSe(e)},table_setOptions:{fn:t=>MF(e,t)}})}},$Se={coreCellsFeature:e1e,coreColumnsFeature:P1e,coreHeadersFeature:k1e,coreRowModelsFeature:mSe,coreRowsFeature:kSe,coreTablesFeature:MSe};function ISe(e,t={}){return Object.values(e).forEach(n=>{var r;t=((r=n.getInitialState)==null?void 0:r.call(n,t))??t}),ro(t)}function DSe(e){var P,j;const t=e.features.coreReactivityFeature,{aggregationFns:n,columnMeta:r,coreRowModel:i,expandedRowModel:o,facetedMinMaxValues:a,facetedRowModel:s,facetedUniqueValues:l,filterFns:u,filterMeta:f,filteredRowModel:c,groupedRowModel:p,paginatedRowModel:h,sortFns:v,sortedRowModel:y,tableMeta:x,...m}=e.features,g={_cellInstanceInitFns:[],_columnInstanceInitFns:[],_features:{...$Se,...m},_headerGroupInstanceInitFns:[],_headerInstanceInitFns:[],_reactivity:t,_rowInstanceInitFns:[],_rowModelFns:{aggregationFns:n,filterFns:u,sortFns:v},_rowModels:{},atoms:{},baseAtoms:{}},b=Object.values(g._features),S={...b.reduce((E,A)=>{var C;return Object.assign(E,(C=A.getDefaultTableOptions)==null?void 0:C.call(A,g))},{}),...e};if(t.wrapExternalAtoms&&S.atoms)for(const[E,A]of Object.entries(S.atoms)){const C=A,_=t.createWritableAtom(C.get(),{debugName:`externalAtom/${E}`});S.atoms[E]=_;let T=!1;const R=C.subscribe(k=>{T||_.set(k)}),M=_.subscribe(k=>{T=!0,C.set(k),T=!1});t.addSubscription(R),t.addSubscription(M)}t.createOptionsStore?(g.optionsStore=t.createWritableAtom(S,{debugName:"table/optionsStore"}),Object.defineProperty(g,"options",{configurable:!0,enumerable:!0,get(){return g.optionsStore.get()},set(E){g.optionsStore.set(()=>E)}})):g.options=S,g.initialState=ISe(g._features,g.options.initialState);const w=Object.keys(g.initialState);for(let E=0;E<w.length;E++){const A=w[E];g.baseAtoms[A]=t.createWritableAtom(g.initialState[A],{debugName:`table/baseAtoms/${A}`}),g.atoms[A]=t.createReadonlyAtom(()=>{var M;const C=g.options,_=(M=C.atoms)==null?void 0:M[A],T=_?_.get():g.baseAtoms[A].get();if(_)return T;const R=C.state;if(R&&$y(R,A)){const k=R[A];return k===void 0?g.initialState[A]:k}return T},{debugName:`table/atoms/${A}`})}RF(g),g.store=Hwe(t.createReadonlyAtom(()=>{const E={};for(let A=0;A<w.length;A++){const C=w[A];E[C]=g.atoms[C].get()}return E},{compare:rf,debugName:"table/store"}));for(let E=0;E<b.length;E++){const A=b[E];(P=A.initTableInstanceData)==null||P.call(A,g),A.initCellInstanceData&&g._cellInstanceInitFns.push(A.initCellInstanceData.bind(A)),A.initColumnInstanceData&&g._columnInstanceInitFns.push(A.initColumnInstanceData.bind(A)),A.initHeaderGroupInstanceData&&g._headerGroupInstanceInitFns.push(A.initHeaderGroupInstanceData.bind(A)),A.initHeaderInstanceData&&g._headerInstanceInitFns.push(A.initHeaderInstanceData.bind(A)),A.initRowInstanceData&&g._rowInstanceInitFns.push(A.initRowInstanceData.bind(A)),(j=A.constructTableAPIs)==null||j.call(A,g)}return g}function LSe(){return[]}function $F(e){const t=e.table._rowModelFns.filterFns,n=e.table.getCoreRowModel().flatRows;let r;for(let a=0;a<n.length;a++){const s=n[a].getValue(e.id);if(s!=null){r=s;break}}let i;return typeof r=="string"?i="includesString":typeof r=="number"?i="inNumberRange":typeof r=="boolean"?i="equals":Array.isArray(r)?i="arrIncludes":Object.prototype.toString.call(r)==="[object Date]"?i="inDateRange":r!==null&&typeof r=="object"?i="equals":i="weakEquals",t==null?void 0:t[i]}function MO(e){let t=null;const n=e.table._rowModelFns.filterFns;return t=aF(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?$F(e):n==null?void 0:n[e.columnDef.filterFn],t??void 0}function FSe(e){return(e.columnDef.enableColumnFilter??!0)&&(e.table.options.enableColumnFilters??!0)&&(e.table.options.enableFilters??!0)&&!!e.accessorFn}function BSe(e){return IF(e)>-1}function zSe(e){var t,n,r;return(r=(n=(t=e.table.atoms.columnFilters)==null?void 0:t.get())==null?void 0:n.find(i=>i.id===e.id))==null?void 0:r.value}function IF(e){var t,n;return((n=(t=e.table.atoms.columnFilters)==null?void 0:t.get())==null?void 0:n.findIndex(r=>r.id===e.id))??-1}function USe(e,t){$O(e.table,n=>{const r=MO(e),i=n.find(s=>s.id===e.id),o=rc(t,i?i.value:void 0);if(DF(r,o,e))return n.filter(s=>s.id!==e.id);const a={id:e.id,value:o};return i?n.map(s=>s.id===e.id?a:s):n.length?[...n,a]:[a]})}function $O(e,t){var i,o;const n=e.getAllLeafColumnsById(),r=a=>rc(t,a).filter(s=>{const l=n[s.id];return!(l&&DF(MO(l),s.value,l))});(o=(i=e.options).onColumnFiltersChange)==null||o.call(i,r)}function VSe(e,t){$O(e,t?[]:ro(e.initialState.columnFilters??[]))}function DF(e,t,n){return typeof t>"u"?!0:e!=null&&e.autoRemove?!!e.autoRemove(t,n):typeof t=="string"&&!t}const HSe={getInitialState:e=>({columnFilters:LSe(),...e}),getDefaultColumnDef:()=>({filterFn:"auto"}),getDefaultTableOptions:e=>({onColumnFiltersChange:kO("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),assignColumnPrototype:(e,t)=>{la("columnFilteringFeature",e,t,{column_getAutoFilterFn:{fn:n=>$F(n)},column_getFilterFn:{fn:n=>MO(n)},column_getCanFilter:{fn:n=>FSe(n)},column_getIsFiltered:{fn:n=>BSe(n)},column_getFilterValue:{fn:n=>zSe(n)},column_getFilterIndex:{fn:n=>IF(n)},column_setFilterValue:{fn:(n,r)=>USe(n,r)}})},initRowInstanceData:e=>{e.columnFilters=Cn(),e.columnFiltersMeta=Cn()},constructTableAPIs:e=>{wa("columnFilteringFeature",e,{table_setColumnFilters:{fn:t=>$O(e,t)},table_resetColumnFilters:{fn:t=>VSe(e,t)}})}},WSe={getInitialState:e=>({columnVisibility:n1e(),...e}),getDefaultTableOptions:e=>({onColumnVisibilityChange:kO("columnVisibility",e)}),assignColumnPrototype:(e,t)=>{la("columnVisibilityFeature",e,t,{column_getIsVisible:{fn:n=>Qn(n),memoDeps:n=>{var r;return[t.options.columns,(r=t.atoms.columnVisibility)==null?void 0:r.get(),n.columns]}},column_getCanHide:{fn:n=>ig(n)},column_getToggleVisibilityHandler:{fn:n=>r1e(n)},column_toggleVisibility:{fn:(n,r)=>cF(n,r)}})},assignRowPrototype:(e,t)=>{la("columnVisibilityFeature",e,t,{row_getVisibleCells:{fn:n=>i1e(n),memoDeps:n=>{var r,i;return[n.getAllCells(),(r=t.atoms.columnPinning)==null?void 0:r.get(),(i=t.atoms.columnVisibility)==null?void 0:i.get()]}},row_getVisibleCellsByColumnId:{fn:n=>fF(n),memoDeps:n=>{var r;return[n.getAllCells(),(r=t.atoms.columnVisibility)==null?void 0:r.get()]}}})},constructTableAPIs:e=>{wa("columnVisibilityFeature",e,{table_getVisibleFlatColumns:{fn:()=>o1e(e),memoDeps:()=>{var t,n,r;return[(t=e.atoms.columnVisibility)==null?void 0:t.get(),(n=e.atoms.columnOrder)==null?void 0:n.get(),(r=e.atoms.grouping)==null?void 0:r.get(),e.options.columns,e.options.groupedColumnMode]}},table_getVisibleLeafColumns:{fn:()=>dF(e),memoDeps:()=>{var t,n,r;return[(t=e.atoms.columnVisibility)==null?void 0:t.get(),(n=e.atoms.columnOrder)==null?void 0:n.get(),(r=e.atoms.grouping)==null?void 0:r.get(),e.options.columns,e.options.groupedColumnMode]}},table_setColumnVisibility:{fn:t=>Iy(e,t)},table_resetColumnVisibility:{fn:t=>a1e(e,t)},table_toggleAllColumnsVisible:{fn:t=>pF(e,t)},table_getIsAllColumnsVisible:{fn:()=>hF(e)},table_getIsSomeColumnsVisible:{fn:()=>s1e(e)},table_getToggleAllColumnsVisibilityHandler:{fn:()=>l1e(e)}})}},KSe={getInitialState(e){return{sorting:X1e(),...e}},getDefaultColumnDef(){return{sortFn:"auto",sortUndefined:1}},getDefaultTableOptions(e){return{autoResetSorting:!1,onSortingChange:kO("sorting",e),isMultiSortEvent:t=>t.shiftKey}},assignColumnPrototype(e,t){la("rowSortingFeature",e,t,{column_getAutoSortFn:{fn:n=>PF(n)},column_getAutoSortDir:{fn:n=>jF(n)},column_getSortFn:{fn:n=>Q1e(n)},column_toggleSorting:{fn:(n,r,i)=>EF(n,r,i)},column_getFirstSortDir:{fn:n=>AF(n)},column_getNextSortingOrder:{fn:(n,r)=>CF(n,r)},column_getCanSort:{fn:n=>TF(n)},column_getCanMultiSort:{fn:n=>ag(n)},column_getIsSorted:{fn:n=>_F(n)},column_getSortIndex:{fn:n=>J1e(n)},column_clearSorting:{fn:n=>Z1e(n)},column_getToggleSortingHandler:{fn:n=>eSe(n)}})},constructTableAPIs(e){wa("rowSortingFeature",e,{table_setSorting:{fn:t=>Ly(e,t)},table_resetSorting:{fn:t=>OF(e,t)}})}},qSe=typeof window>"u"?O.useEffect:O.useLayoutEffect;function GSe(e,t){const[{table:n,rootSource:r}]=O.useState(()=>{const l=DSe({...e,features:{coreReactivityFeature:qwe(),...e.features}});return l.Subscribe=u=>Vwe({...u,source:u.source??l.store}),l.FlexRender=Mwe,{table:l,rootSource:Kwe(l.store,rf)}}),i=n;MF(i,l=>({...l,...e}),{syncExternalState:!1});const o=i.options.state,a=r.get(),s=oF(r,t,{compare:rf});return qSe(()=>{r.markCommitted(a),NF(i,o??null,rf)}),O.useMemo(()=>({...n,options:e,state:s}),[n,e,s])}const XSe={rowSortingFeature:KSe,columnFilteringFeature:HSe,columnVisibilityFeature:WSe};function YSe({direction:e}){return e==="asc"?d.jsx("span",{"aria-hidden":"true",children:"↑"}):e==="desc"?d.jsx("span",{"aria-hidden":"true",children:"↓"}):d.jsx("span",{"aria-hidden":"true",className:"opacity-30",children:"↕"})}function QSe({header:e,className:t}){const n=e.column.getIsSorted(),r=Wa(e.column.columnDef.header,e.getContext());return d.jsx(qe,{className:`whitespace-nowrap p-0 ${t}`,"aria-sort":n==="asc"?"ascending":n==="desc"?"descending":"none",children:d.jsxs(Ye,{variant:"ghost",size:"xs",onClick:e.column.getToggleSortingHandler(),className:"w-full justify-start gap-1 px-3 py-2 font-normal",children:[r,d.jsx(YSe,{direction:n})]})})}function JSe({header:e}){const t=e.column.getFilterValue(),n=typeof t=="string"?t:"",[r,i]=O.useState(n);O.useEffect(()=>i(n),[n]);const o=()=>{r!==n&&e.column.setFilterValue(r)};return d.jsx(Es,{value:r,"aria-label":`Filter by ${e.column.id}`,placeholder:"Filter…",className:"w-full py-0.5",onChange:a=>i(a.target.value),onBlur:o,onKeyDown:a=>{a.key==="Enter"&&o(),a.key==="Escape"&&i(n)}})}function ZSe({table:e,sticky:t,menu:n}){var s;const r=((s=e.getHeaderGroups().at(-1))==null?void 0:s.headers)??[],i=r.some(l=>l.column.getCanFilter()),o=t?"sticky top-0 z-10 bg-panel":"",a=t?"sticky top-8 z-10 bg-panel":"";return d.jsxs(Bd,{children:[d.jsxs(kr,{children:[r.map(l=>l.column.getCanSort()?d.jsx(QSe,{header:l,className:o},l.id):d.jsx(qe,{className:`whitespace-nowrap ${o}`,children:Wa(l.column.columnDef.header,l.getContext())},l.id)),n?d.jsx(qe,{className:`w-px whitespace-nowrap text-right ${o}`,children:n}):null]}),i&&d.jsxs(kr,{children:[r.map(l=>d.jsx(qe,{className:`py-1 ${a}`,children:l.column.getCanFilter()?d.jsx(JSe,{header:l}):null},l.id)),n?d.jsx(qe,{className:a}):null]})]})}function eOe(e,t){const n=e.replace(/\{(\w+)\}/g,(r,i)=>String(t[i]??""));return/^\s*(javascript|data|vbscript):/i.test(n)?"#":n}function tOe({spec:e,row:t}){const n=String(t[e.key]??"");return e.link?d.jsx("a",{className:"text-sky-400 hover:underline",href:eOe(e.link.href,t),...e.link.external?{target:"_blank",rel:"noreferrer"}:{},children:n}):d.jsx(d.Fragment,{children:n})}function nOe(e){return e.map(t=>({id:t.key,accessorFn:n=>n[t.key],header:t.label,enableSorting:t.sortable===!0,enableColumnFilter:t.filterable===!0,enableHiding:t.hideable===!0,cell:({row:n})=>d.jsx(tOe,{spec:t,row:n.original})}))}const rOe="max-h-[28rem]";function iOe(e,t,n){return`${t.map(r=>String(e[r.key]??"")).join("|")}#${n}`}function oOe({columns:e,rows:t,sort:n,onSortChange:r,filters:i,onFiltersChange:o,scrolls:a}){const[s,l]=O.useState({}),u=O.useMemo(()=>nOe(e),[e]),f=n?[{id:n.key,desc:n.dir==="desc"}]:[],c=Object.entries(i??{}).map(([x,m])=>({id:x,value:m})),p=GSe({features:XSe,columns:u,data:t,state:{sorting:f,columnFilters:c,columnVisibility:s},onColumnVisibilityChange:l,onSortingChange:x=>{const g=(typeof x=="function"?x(f):x)[0];r==null||r(g?{key:g.id,dir:g.desc?"desc":"asc"}:void 0)},onColumnFiltersChange:x=>{const m=typeof x=="function"?x(c):x,g={};for(const b of m)typeof b.value=="string"&&b.value!==""&&(g[b.id]=b.value);o==null||o(g)},manualSorting:!0,manualFiltering:!0,getRowId:(x,m)=>iOe(x,e,m)}),h=p.getAllLeafColumns(),v=h.some(x=>x.getCanHide()),y=p.getVisibleLeafColumns().length+(v?1:0);return d.jsxs(Fd,{containerClassName:a?rOe:"",children:[d.jsx(ZSe,{table:p,sticky:a===!0,...v?{menu:d.jsx(_we,{columns:h})}:{}}),d.jsxs(zd,{children:[t.length===0?d.jsx(kr,{children:d.jsx(nt,{colSpan:y,className:"py-6 text-center text-muted-foreground",children:"No data in this window."})}):null,p.getRowModel().rows.map(x=>d.jsxs(kr,{children:[x.getVisibleCells().map(m=>d.jsx(nt,{className:"whitespace-nowrap text-foreground",children:Wa(m.column.columnDef.cell,m.getContext())},m.id)),v?d.jsx(nt,{}):null]},x.id))]})]})}function aOe(e,t){return t==="percent"?`${Math.round(e*100)}%`:t==="duration"?e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`:t==="rate"?`${new Intl.NumberFormat().format(Math.round(e))}/hr`:new Intl.NumberFormat().format(e)}function LF(e){if(typeof e!="object"||e===null||!("rows"in e))return[];const t=e.rows;return Array.isArray(t)?t.filter(n=>typeof n=="object"&&n!==null):[]}function dx(e,t){if(typeof e!="object"||e===null||!(t in e))return;const n=Reflect.get(e,t);return typeof n=="number"&&Number.isFinite(n)?n:void 0}function sOe(e){const t=LF(e);return{rows:t,total:dx(e,"total")??t.length,page:dx(e,"page")??1,limit:dx(e,"limit")??0}}function lOe({title:e}){return d.jsxs("div",{className:"rounded-lg border border-line bg-panel/40",children:[d.jsx("p",{className:"border-b border-line px-4 py-2 text-xs font-medium text-foreground",children:e}),d.jsx("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:"No data in this window."})]})}function uOe({page:e,totalPages:t,onPageChange:n}){return d.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[d.jsx(Ye,{variant:"outline",size:"xs",disabled:e<=1,onClick:()=>n==null?void 0:n(e-1),className:"px-1.5 text-muted-foreground",children:"Prev"}),d.jsxs("span",{children:["Page ",e," of ",t]}),d.jsx(Ye,{variant:"outline",size:"xs",disabled:e>=t,onClick:()=>n==null?void 0:n(e+1),className:"px-1.5 text-muted-foreground",children:"Next"})]})}function cOe({panel:e,data:t,onPageChange:n,requestedPage:r,sort:i,onSortChange:o,filters:a,onFiltersChange:s,onSelect:l}){const u=l?{onSelect:l}:{};switch(e.kind){case"stat":{const f=t??{};return d.jsx(wt,{label:e.title,value:aOe(f.value??0,e.format),...f.value!==void 0?{currentValue:f.value}:{},...f.delta!==void 0?{delta:f.delta}:{},...f.deltaLabel?{deltaLabel:f.deltaLabel}:{},...e.spark&&f.spark?{spark:f.spark}:{},...e.thresholds?{thresholds:e.thresholds}:{},...e.accent?{accent:e.accent}:{}})}case"distribution":{const f=t??{};return d.jsx(Cwe,{title:e.title,buckets:f.buckets??[],...f.p50!==void 0?{p50:f.p50}:{},...f.p95!==void 0?{p95:f.p95}:{},...f.p99!==void 0?{p99:f.p99}:{},...u})}case"gauge":{const f=t??{};return d.jsx(Twe,{title:e.title,value:f.value??0,...e.min!==void 0?{min:e.min}:{},...e.max!==void 0?{max:e.max}:{}})}case"breakdown":{const f=t??{};return d.jsx(jwe,{title:e.title,segments:f.segments??[],...e.style?{style:e.style}:{},...u})}case"timeseries":{const f=(t==null?void 0:t.rows)??[],c=e.series[0];return e.style==="stacked"?d.jsx(jO,{title:e.title,data:f,series:e.series,...u}):d.jsx(Ds,{title:e.title,data:f.map(p=>({label:p.label,value:c?Number(p[c]??0):0})),...u})}case"topN":{const f=(t==null?void 0:t.items)??[],c=e.limit?f.slice(0,e.limit):f;return c.length===0?d.jsx(lOe,{title:e.title}):d.jsx(us,{title:e.title,data:c,horizontal:!0,truncateLabel:32,...u})}case"table":{const f=d.jsx(oOe,{columns:e.columns,rows:LF(t),scrolls:e.paged===!0,sort:i,...o?{onSortChange:o}:{},filters:a,...s?{onFiltersChange:s}:{}});if(e.paged){const{rows:c,total:p,page:h,limit:v}=sOe(t),y=Math.max(1,Math.ceil(p/(v||c.length||1)));return d.jsxs("div",{className:"rounded-lg border border-line bg-panel/40",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-2",children:[d.jsx("p",{className:"text-xs font-medium text-foreground",children:e.title}),d.jsx(uOe,{page:r??h,totalPages:y,...n?{onPageChange:n}:{}})]}),f]})}return d.jsxs("div",{className:"rounded-lg border border-line bg-panel/40",children:[d.jsx("p",{className:"border-b border-line px-4 py-2 text-xs font-medium text-foreground",children:e.title}),f]})}default:return null}}const fOe="sort",dOe="dir",pOe="filter.";function hOe(e,t){const n=Object.entries(t.filters??{}).filter(([,i])=>i!=="");if(!t.paging&&!t.sort&&n.length===0)return e;const r={...e};t.paging&&(r.page=t.paging.page,r.limit=t.paging.limit),t.sort&&(r[fOe]=t.sort.key,r[dOe]=t.sort.dir);for(const[i,o]of n)r[`${pOe}${i}`]=o;return r}const mOe={1:"",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-2 lg:grid-cols-4"},gOe=50;function yOe(e){return"drilldown"in e?e.drilldown:void 0}function vOe({status:e}){const t=e==="live";return d.jsxs("span",{"data-telescope-status":e,className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide ${t?"tint-good":"tint-warn"}`,children:[d.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${t?"animate-pulse bg-good":"bg-warn"}`}),t?"live":e]})}function xOe({ext:e,panel:t,focus:n,onSelect:r}){const i=t.kind==="table"&&t.paged===!0,[o,a]=O.useState(1),[s,l]=O.useState(void 0),[u,f]=O.useState({}),c=n?{[n.param]:n.value}:void 0,p=c?{...t.data.query,...c}:t.data.query,h=hOe(p,{...i?{paging:{page:o,limit:gOe}}:{},...s?{sort:s}:{},filters:u}),v=ZU(e,t.data.provider,h);return v.isError?d.jsxs("div",{className:"tint-bad rounded-lg border px-4 py-3 text-sm",children:['Failed to load "',t.title,'".']}):d.jsx(cOe,{panel:t,data:v.data,...i?{onPageChange:a,requestedPage:o}:{},sort:s,onSortChange:y=>{a(1),l(y)},filters:u,onFiltersChange:y=>{a(1),f(y)},...r?{onSelect:r}:{}})}function bOe(){var u,f;const{dashboardId:e}=Eg(),t=ks(),{status:n}=d5(),[r,i]=O.useState(null),o=(f=(u=t.data)==null?void 0:u.dashboards)==null?void 0:f.find(c=>c.id===e);if(!o)return d.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Dashboard not found."});const a=(e==null?void 0:e.split(".")[0])??"",s=o.sections??[{panels:o.panels,cols:2}];function l(c,p){const h=p.id??p.label,v=p.series?`${p.series} · ${p.label}`:p.label;i(y=>(y==null?void 0:y.param)===c&&y.value===h?null:{param:c,value:h,label:v})}return d.jsxs("div",{className:"p-4",children:[d.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[d.jsx("h2",{className:"text-sm font-semibold text-foreground",children:o.label}),d.jsx(vOe,{status:n}),r&&d.jsxs("span",{className:"tint-brand inline-flex items-center gap-1 rounded border py-0.5 pl-1.5 text-[10px]",children:[r.param,": ",r.label,d.jsx(Ye,{variant:"ghost",size:"xs",className:"px-1 text-inherit",onClick:()=>i(null),children:"Clear"})]})]}),s.map((c,p)=>d.jsxs("section",{className:"mb-6",children:[c.title&&d.jsx("p",{className:"mb-2 text-[10px] uppercase tracking-wide text-muted-foreground",children:c.title}),d.jsx("div",{className:`grid grid-cols-1 gap-3 ${mOe[c.cols??2]}`,children:c.panels.map(h=>{const v=yOe(h);return d.jsx(xOe,{ext:a,panel:h,focus:r,...v?{onSelect:y=>l(v.param,y)}:{}},`${h.kind}-${h.title}`)})})]},c.title??`s${p}`))]})}function wOe({profile:e,selected:t,onSelect:n}){return d.jsxs("button",{type:"button",onClick:n,className:`flex w-full flex-col gap-0.5 border-b border-line-soft px-3 py-2 text-left hover:bg-panel ${t?"bg-panel":""}`,children:[d.jsx("span",{className:"truncate font-mono text-xs text-foreground",title:e.familyHash??e.id,children:e.familyHash??"(unlabelled)"}),d.jsxs("span",{className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[d.jsx("span",{children:e.durationMs!==null?cd(e.durationMs):"—"}),e.tags.includes("manual")&&d.jsx("span",{className:"text-warn",children:"manual"}),e.tags.includes("sampled")&&d.jsx("span",{className:"text-sky-400",children:"sampled"}),d.jsx("span",{className:"ml-auto",children:Ls(new Date(e.createdAt).getTime())})]})]})}function SOe({hot:e}){return e.length===0?d.jsx("p",{className:"text-xs text-muted-foreground",children:"No hot frames."}):d.jsxs("div",{className:"rounded-lg border border-line bg-panel/40",children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-line px-3 py-1.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:[d.jsx("span",{className:"flex-1",children:"Function"}),d.jsx("span",{className:"w-16 text-right",children:"Self"}),d.jsx("span",{className:"w-12 text-right",children:"%"})]}),e.map(t=>d.jsxs("div",{className:"flex items-center gap-2 border-b border-line-soft px-3 py-1 text-[11px] last:border-0",children:[d.jsxs("span",{className:"min-w-0 flex-1 truncate font-mono text-foreground",title:`${t.name} ${t.file}`,children:[t.name,t.file&&d.jsx("span",{className:"ml-1 text-muted-foreground",children:t.file})]}),d.jsx("span",{className:"w-16 text-right tabular-nums text-foreground",children:cd(t.selfMs)}),d.jsx("span",{className:"w-12 text-right tabular-nums text-warn",children:t.selfPct.toFixed(1)})]},`${t.name}:${t.file}`))]})}function OOe({id:e}){const{data:t,isLoading:n}=c5(e);if(n)return d.jsx("p",{className:"text-muted-foreground",children:"Loading profile…"});if(!t)return d.jsx("p",{className:"text-muted-foreground",children:"Profile not found."});const r=t.content;return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1",children:[d.jsx("h3",{className:"font-mono text-sm text-foreground",children:r.label??"(unlabelled)"}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:[cd(r.durationMs)," · ",r.sampleCount," samples · ",r.reason]})]}),d.jsx(Qxe,{tree:r.tree}),d.jsx(SOe,{hot:r.hot})]})}function POe({pendingManual:e}){const[t,n]=O.useState(1),[r,i]=O.useState(""),o=f5();return d.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-lg border border-line bg-panel/40 px-3 py-2",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Capture next"}),d.jsx("input",{type:"number",min:1,value:t,onChange:a=>n(Math.max(1,Number(a.target.value))),className:"w-14 rounded border border-line bg-background px-1 py-0.5 text-xs text-foreground"}),d.jsx("span",{className:"text-[10px] text-muted-foreground",children:"request(s) matching"}),d.jsx("input",{type:"text",placeholder:"any route (e.g. GET /users/:id)",value:r,onChange:a=>i(a.target.value),className:"w-56 rounded border border-line bg-background px-1 py-0.5 text-xs text-foreground"}),d.jsx("button",{type:"button",disabled:o.isPending,onClick:()=>o.mutate({count:t,...r?{label:r}:{}}),className:"rounded bg-primary px-2 py-0.5 text-xs font-medium text-primary-foreground hover:opacity-90 disabled:opacity-50",children:o.isPending?"Arming…":"Arm capture"}),e>0&&d.jsxs("span",{className:"text-[10px] text-warn",children:[e," pending"]}),o.isError&&d.jsx("span",{className:"text-[10px] text-bad",children:o.error instanceof Error?o.error.message:"Failed to arm (mutations disabled?)"})]})}function jOe(){var u,f,c,p,h;const e=ks(),t=l5(),{data:n,isLoading:r}=u5(100),i=(n==null?void 0:n.data)??[],[o,a]=O.useState(null),s=((f=(u=e.data)==null?void 0:u.profiling)==null?void 0:f.enabled)??((c=t.data)==null?void 0:c.enabled)??!1,l=o??((p=i[0])==null?void 0:p.id)??null;return s?d.jsxs("div",{className:"space-y-4 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[d.jsx("h2",{className:"text-sm text-brand",children:"CPU Profiles"}),t.data&&d.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["sampling ",(t.data.sampleRate*100).toFixed(0),"% · ",t.data.active," active"]})]}),d.jsx(POe,{pendingManual:((h=t.data)==null?void 0:h.pendingManual)??0}),d.jsxs("div",{className:"flex gap-4",children:[d.jsx("div",{className:"w-64 shrink-0 rounded-lg border border-line",children:r?d.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"Loading…"}):i.length===0?d.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:"No profiles captured yet."}):i.map(v=>d.jsx(wOe,{profile:v,selected:v.id===l,onSelect:()=>a(v.id)},v.id))}),d.jsx("div",{className:"min-w-0 flex-1",children:l?d.jsx(OOe,{id:l}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"Select a profile to view its flamegraph."})})]})]}):d.jsxs("div",{className:"space-y-3 p-4",children:[d.jsx("h2",{className:"text-sm text-brand",children:"CPU Profiles"}),d.jsxs("div",{className:"rounded-lg border border-line bg-panel/40 p-6 text-xs text-muted-foreground",children:[d.jsx("p",{className:"mb-2 text-foreground",children:"CPU profiling is disabled."}),d.jsxs("p",{children:["Enable it with"," ",d.jsxs("code",{className:"rounded bg-panel-2 px-1 text-brand",children:["profiling: ","{"," enabled: true ","}"]})," ","in ",d.jsx("code",{className:"rounded bg-panel-2 px-1",children:"TelescopeModule.forRoot"}),". Profiling is opt-in because it carries real CPU overhead; when off there is zero cost on the request path."]})]})]})}const EOe={scheduled:"text-sky-300 bg-sky-500/10",manual:"text-warn tint-warn"};function AOe({trigger:e}){return d.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${EOe[e]}`,children:e})}function COe({type:e,count:t}){return d.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-panel-2/80 px-1.5 py-0.5 text-[10px] text-foreground",children:[d.jsx("span",{className:"text-muted-foreground",children:Tg(e)}),d.jsx("span",{className:"tabular-nums text-foreground",children:t})]})}function TOe(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}function _Oe(e,t){if(e===null)return"—";const n=new Date(e).getTime()-t;if(Number.isNaN(n))return"—";if(n<=0)return"now";const r=Math.round(n/1e3);return r<60?`~${r}s`:`~${Math.floor(r/60)}m ${r%60}s`}function kOe(){const[e,t]=O.useState(()=>Date.now());return O.useEffect(()=>{const n=setInterval(()=>t(Date.now()),1e3);return()=>clearInterval(n)},[]),e}function ROe({config:e,nextRunAt:t,nowMs:n}){const r=Object.entries(e.perType??{});return d.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[d.jsx(wt,{label:"Window",value:nf(e.afterMs),accent:"text-brand"}),d.jsx(wt,{label:"Interval",value:nf(e.intervalMs)}),d.jsx(wt,{label:"Keep last",value:e.keepLast!=null?e.keepLast.toLocaleString():"unbounded"}),d.jsx(wt,{label:"Next prune",value:_Oe(t,n),accent:"text-sky-300",...r.length>0?{hint:`${r.length} per-type override(s)`}:{}}),r.length>0&&d.jsxs("div",{className:"col-span-2 rounded-lg border border-line bg-panel/40 p-3 sm:col-span-4",children:[d.jsx("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Per-type overrides"}),d.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:r.map(([i,o])=>d.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-panel-2/80 px-1.5 py-0.5 text-[10px] text-foreground",children:[d.jsx("span",{className:"text-muted-foreground",children:Tg(i)}),d.jsx("span",{className:"tabular-nums text-foreground",children:nf(o)})]},i))})]})]})}function NOe({run:e}){const t=Object.entries(e.deletedByType);return d.jsxs(kr,{className:"border-t border-line/60 align-top hover:bg-panel/40",children:[d.jsx(nt,{className:"text-xs text-muted-foreground",children:Ls(new Date(e.at).getTime())}),d.jsx(nt,{children:d.jsx(AOe,{trigger:e.trigger})}),d.jsx(nt,{className:"text-xs tabular-nums text-muted-foreground",children:TOe(e.durationMs)}),d.jsx(nt,{className:"text-xs tabular-nums text-foreground",children:e.deletedTotal.toLocaleString()}),d.jsx(nt,{children:t.length>0?d.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(([n,r])=>d.jsx(COe,{type:n,count:r},n))}):d.jsx("span",{className:"text-muted-foreground",children:"—"})}),d.jsx(nt,{className:"text-xs tabular-nums text-muted-foreground",children:e.archivedTotal!=null?e.archivedTotal.toLocaleString():"—"}),d.jsx(nt,{className:"text-xs text-bad",children:e.error??""})]})}function MOe(){var f;const{data:e,isLoading:t,isError:n}=WU(),r=ks(),i=DN(),o=kOe(),a=((f=r.data)==null?void 0:f.pruneEnabled)??!1,s=(e==null?void 0:e.runs)??[],l=(e==null?void 0:e.config)??null;async function u(){if(globalThis.confirm("Prune now deletes entries older than the retention window. Continue?"))try{const c=await i.mutateAsync();globalThis.alert(`Pruned ${c.pruned} ${c.pruned===1?"entry":"entries"}.`)}catch{globalThis.alert("Prune failed.")}}return d.jsxs("div",{className:"space-y-4 p-4",children:[d.jsxs("div",{className:"flex items-center justify-between px-1",children:[d.jsx("h3",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Prune activity"}),d.jsx(Ye,{onClick:u,disabled:!a||i.isPending,title:a?"Run a prune cycle now":"Mutations are disabled (configure authorizeAction to enable on-demand pruning).",children:i.isPending?"Pruning…":"Prune now"})]}),l?d.jsx(ROe,{config:l,nextRunAt:(e==null?void 0:e.nextRunAt)??null,nowMs:o}):d.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-6 text-center text-xs text-muted-foreground",children:"No retention window is configured. Set a `prune` option to enable automatic pruning."}),t&&d.jsx("p",{className:"px-1 py-2 text-xs text-muted-foreground",children:"Loading prune runs…"}),n&&d.jsx("p",{className:"px-1 py-2 text-xs text-bad",children:"Failed to load prune runs."}),!t&&!n&&s.length===0&&d.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-12 text-center text-xs text-muted-foreground",children:"No prune runs recorded yet on this pod."}),s.length>0&&d.jsx("div",{className:"rounded-lg border border-line",children:d.jsxs(Fd,{className:"min-w-[760px] text-left text-sm",children:[d.jsx(Bd,{children:d.jsxs(kr,{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:[d.jsx(qe,{children:"Time"}),d.jsx(qe,{children:"Trigger"}),d.jsx(qe,{children:"Duration"}),d.jsx(qe,{children:"Deleted"}),d.jsx(qe,{children:"By type"}),d.jsx(qe,{children:"Archived"}),d.jsx(qe,{children:"Error"})]})}),d.jsx(zd,{children:s.map((c,p)=>d.jsx(NOe,{run:c},`${c.at}:${p}`))})]})})]})}function $Oe(){var s;const[e,t]=O.useState("1h"),n=xi(),{data:r,isLoading:i}=FN(e),o=D1({window:e,buckets:60}),a=AO(((s=o.data)==null?void 0:s.buckets)??[]);return d.jsxs("div",{className:"space-y-4 p-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-sm text-brand",children:"Pulse"}),d.jsx(Kd,{value:e,onChange:t})]}),d.jsx(jO,{title:"Throughput by type",series:a,data:nF(o.data)}),i||!r?d.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):d.jsx(Zbe,{report:r,onSelectEntry:l=>n(`/entries/view/${l}`),onSelectFamily:l=>n(`/entries/query?familyHash=${encodeURIComponent(l)}`),onSelectRoute:l=>n(`/entries/request?familyHash=${encodeURIComponent(l)}`),onSelectOutgoing:l=>n(`/entries/http_client?familyHash=${encodeURIComponent(l)}`)})]})}const IOe="var(--bad)",DOe="var(--good)";function LOe(e){return((e==null?void 0:e.queues)??[]).map(t=>({label:t.queue,value:Number((t.failureRate*100).toFixed(1)),color:t.failureRate>0?IOe:DOe}))}function FOe(){const[e,t]=O.useState("1h"),{data:n,isLoading:r}=BN(e);return d.jsxs("div",{className:"space-y-4 p-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-sm text-brand",children:"Queue metrics"}),d.jsx(Kd,{value:e,onChange:t})]}),d.jsx(us,{title:"Failure rate by queue",valueLabel:"fail %",data:LOe(n)}),r||!n?d.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):d.jsx(e0e,{report:n,sparkline:i=>d.jsx(n0e,{queue:i,window:e})})]})}const BOe=[{to:"/queues",label:"Manage",end:!0},{to:"/queues/metrics",label:"Metrics",end:!1}];function zOe(){return d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:"flex gap-1 border-b border-line px-4 pt-3",children:BOe.map(e=>d.jsx(th,{to:e.to,end:e.end,className:({isActive:t})=>`rounded-t-md px-3 py-1.5 text-xs transition-colors ${t?"bg-panel text-brand":"text-muted-foreground hover:text-foreground"}`,children:e.label},e.to))}),d.jsx(Gz,{})]})}const UOe={cron:"tint-brand",interval:"tint-muted",timeout:"text-warn tint-warn"};function VOe({kind:e}){return d.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${UOe[e]}`,children:e})}function HOe({running:e}){return e==null?d.jsx("span",{className:"rounded bg-panel-2 px-1.5 py-0.5 text-[9px] uppercase tracking-wide text-muted-foreground",children:"unknown"}):d.jsxs("span",{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${e?"tint-good":"tint-bad"}`,children:[d.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${e?"bg-good":"bg-bad"}`}),e?"active":"stopped"]})}function WOe({status:e}){if(e===null)return d.jsx("span",{className:"text-muted-foreground",children:"—"});const t=e==="completed"?"tint-good":"tint-bad";return d.jsx("span",{className:`rounded px-1.5 py-0.5 text-[9px] uppercase tracking-wide ${t}`,children:e})}function KOe(e){return e===null?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(2)}s`}function qOe(e){if(e===null)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleString()}function GOe({task:e}){return d.jsxs(kr,{className:"border-t border-line/60 hover:bg-panel/40",children:[d.jsx(nt,{className:"font-medium text-foreground",children:e.name}),d.jsx(nt,{children:d.jsx(VOe,{kind:e.kind})}),d.jsx(nt,{children:d.jsx(HOe,{running:e.running})}),d.jsx(nt,{className:"font-mono text-xs text-muted-foreground",children:e.schedule}),d.jsx(nt,{className:"text-xs text-muted-foreground",children:qOe(e.nextRunAt)}),d.jsx(nt,{className:"text-xs text-muted-foreground",children:Ls(XOe(e.lastRunAt))}),d.jsx(nt,{className:"text-xs tabular-nums text-muted-foreground",children:KOe(e.lastDurationMs)}),d.jsx(nt,{children:d.jsx(WOe,{status:e.lastStatus})})]})}function XOe(e){if(e===null)return null;const t=new Date(e).getTime();return Number.isNaN(t)?null:t}function YOe(){const{data:e,isLoading:t,isError:n}=FU(),r=(e==null?void 0:e.tasks)??[],i=r.filter(a=>a.running===!0).length,o=r.filter(a=>a.running===!1).length;return d.jsxs("div",{className:"space-y-3 p-4",children:[d.jsxs("div",{className:"flex items-center justify-between px-1",children:[d.jsx("h3",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"Scheduled tasks"}),r.length>0&&d.jsxs("div",{className:"flex items-center gap-3 text-[10px] uppercase tracking-wide",children:[d.jsxs("span",{className:"text-good",children:[i," active"]}),o>0&&d.jsxs("span",{className:"text-bad",children:[o," stopped"]}),d.jsxs("span",{className:"text-muted-foreground",children:[r.length," total"]})]})]}),t&&d.jsx("p",{className:"px-1 py-2 text-xs text-muted-foreground",children:"Loading schedules…"}),n&&d.jsx("p",{className:"px-1 py-2 text-xs text-bad",children:"Failed to load schedules."}),!t&&!n&&r.length===0&&d.jsx("div",{className:"rounded-lg border border-dashed border-line px-4 py-12 text-center text-xs text-muted-foreground",children:"No scheduled tasks detected. Register a ScheduleManager (the @nestjs/schedule watcher) to populate this console."}),r.length>0&&d.jsx("div",{className:"rounded-lg border border-line",children:d.jsxs(Fd,{className:"min-w-[760px] text-left text-sm",children:[d.jsx(Bd,{children:d.jsxs(kr,{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:[d.jsx(qe,{children:"Name"}),d.jsx(qe,{children:"Kind"}),d.jsx(qe,{children:"Active"}),d.jsx(qe,{children:"Schedule"}),d.jsx(qe,{children:"Next run"}),d.jsx(qe,{children:"Last run"}),d.jsx(qe,{children:"Duration"}),d.jsx(qe,{children:"Status"})]})}),d.jsx(zd,{children:r.map(a=>d.jsx(GOe,{task:a},`${a.kind}:${a.name}`))})]})})]})}function QOe(){const{traceId:e=""}=Eg(),t=xi(),[n,r]=O.useState("waterfall"),{data:i,isLoading:o}=LN({traceId:e}),a=(i==null?void 0:i.data)??[],{data:s,isLoading:l}=i5(e);return d.jsxs("div",{className:"p-4",children:[d.jsx("button",{type:"button",onClick:()=>t("/entries"),className:"mb-4 text-xs text-muted-foreground hover:text-foreground",children:"← entries"}),d.jsxs("div",{className:"mb-4 flex flex-wrap items-baseline gap-3 border-b border-line pb-3",children:[d.jsx("h2",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Trace"}),d.jsx("span",{className:"max-w-md truncate font-mono text-xs text-foreground",title:e,children:e}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:[a.length," ",a.length===1?"entry":"entries"]}),d.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[d.jsxs("div",{className:"flex overflow-hidden rounded border border-line text-[11px]",children:[d.jsx("button",{type:"button",onClick:()=>r("waterfall"),className:`px-2.5 py-1 transition-colors ${n==="waterfall"?"bg-panel-2 text-foreground":"bg-panel text-muted-foreground hover:text-foreground"}`,children:"Waterfall"}),d.jsx("button",{type:"button",onClick:()=>r("entries"),className:`border-l border-line px-2.5 py-1 transition-colors ${n==="entries"?"bg-panel-2 text-foreground":"bg-panel text-muted-foreground hover:text-foreground"}`,children:"Entries"})]}),a.length>0?d.jsx("button",{type:"button",onClick:()=>PO(`telescope-trace-${e}.json`,a),className:"rounded border border-line bg-panel px-2.5 py-1 text-[11px] text-foreground transition-colors hover:border-line hover:bg-panel-2 hover:text-foreground",children:"Download JSON"}):null]})]}),n==="waterfall"?l?d.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):s===void 0||s.spans.length===0?d.jsx("p",{className:"text-muted-foreground",children:"No spans in this trace"}):d.jsx(qxe,{waterfall:s,onSelect:u=>t(`/entries/view/${u}`)}):o?d.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):a.length===0?d.jsx("p",{className:"text-muted-foreground",children:"No entries in this trace"}):d.jsx(WL,{entries:a,onSelect:u=>t(`/entries/view/${u}`)})]})}function JOe(e){return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}function ZOe({trace:e}){const t=xi(),n=e.rootLabel??e.traceId;return d.jsxs("button",{type:"button",onClick:()=>t(`/traces/${e.traceId}`),className:"flex w-full items-center gap-3 border-b border-line-soft px-3 py-2 text-left hover:bg-panel",children:[d.jsx("span",{className:"flex shrink-0 items-center gap-1","aria-hidden":"true",children:e.types.map(r=>d.jsx("span",{className:`h-2 w-2 rounded-full ${L1(r)}`,title:r},r))}),d.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-foreground",title:n,children:n}),d.jsxs("span",{className:"shrink-0 text-xs text-muted-foreground",children:[e.entryCount," ",e.entryCount===1?"entry":"entries"]}),d.jsx("span",{className:"w-16 shrink-0 text-right text-xs text-muted-foreground",children:JOe(e.totalDurationMs)}),d.jsx("span",{className:"w-16 shrink-0 text-right text-xs text-muted-foreground",children:Ls(new Date(e.lastAt).getTime())})]})}function ePe(){const[e,t]=O.useState("1h"),{data:n,isLoading:r}=r5(e),i=(n==null?void 0:n.traces)??[];return d.jsxs("div",{className:"space-y-4 p-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-sm text-brand",children:"Traces"}),d.jsx(Kd,{value:e,onChange:t})]}),r?d.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):i.length===0?d.jsx("p",{className:"text-muted-foreground",children:"No traces in this window"}):d.jsx("div",{className:"border border-line",children:i.map(o=>d.jsx(ZOe,{trace:o},o.traceId))})]})}const tPe=new W4;function nPe(){return d.jsx(oU,{children:d.jsx(K0e,{children:d.jsxs(Yz,{children:[d.jsx(vn,{path:"/",element:d.jsx(hwe,{})}),d.jsx(vn,{path:"/entries",element:d.jsx(S_,{})}),d.jsx(vn,{path:"/entries/view/:id",element:d.jsx(ywe,{})}),d.jsx(vn,{path:"/entries/:type",element:d.jsx(S_,{})}),d.jsx(vn,{path:"/traces",element:d.jsx(ePe,{})}),d.jsx(vn,{path:"/traces/:traceId",element:d.jsx(QOe,{})}),d.jsx(vn,{path:"/pulse",element:d.jsx($Oe,{})}),d.jsxs(vn,{path:"/queues",element:d.jsx(zOe,{}),children:[d.jsx(vn,{index:!0,element:d.jsx(mwe,{})}),d.jsx(vn,{path:"metrics",element:d.jsx(FOe,{})})]}),d.jsx(vn,{path:"/schedules",element:d.jsx(YOe,{})}),d.jsx(vn,{path:"/prunes",element:d.jsx(MOe,{})}),d.jsx(vn,{path:"/exports",element:d.jsx(Pwe,{})}),d.jsx(vn,{path:"/profiles",element:d.jsx(jOe,{})}),d.jsx(vn,{path:"/ext/:dashboardId",element:d.jsx(bOe,{})})]})})})}function rPe(){const{phase:e,modes:t}=_O();return e==="loading"?d.jsx("div",{className:"min-h-screen bg-background","data-testid":"auth-loading"}):e==="screen"?d.jsx(_0e,{modes:t}):d.jsx(nPe,{})}function iPe(){return d.jsx(D0e,{children:d.jsx(mU,{children:d.jsx(K4,{client:tPe,children:d.jsx(j0e,{children:d.jsx(rPe,{})})})})})}const N_=document.getElementById("root");N_&&rN(N_).render(d.jsx(O.StrictMode,{children:d.jsx(iPe,{})}));
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Telescope</title>
7
- <script type="module" crossorigin src="/telescope/assets/index-BbmjmYKf.js"></script>
8
- <link rel="stylesheet" crossorigin href="/telescope/assets/index-Cr4sGV6r.css">
7
+ <script type="module" crossorigin src="/telescope/assets/index-DozeP9W-.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/telescope/assets/index-Bwrj-oNF.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dudousxd/nestjs-telescope-ui",
3
- "version": "1.22.1",
3
+ "version": "1.23.1",
4
4
  "description": "Bundled dashboard + composable React components for @dudousxd/nestjs-telescope.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -54,7 +54,7 @@
54
54
  "react-router-dom": "^6.0.0 || ^7.0.0",
55
55
  "recharts": "^2.0.0 || ^3.0.0",
56
56
  "reflect-metadata": "^0.1.13 || ^0.2.0",
57
- "@dudousxd/nestjs-telescope": "^1.25.0"
57
+ "@dudousxd/nestjs-telescope": "^1.28.1"
58
58
  },
59
59
  "peerDependenciesMeta": {
60
60
  "react": {
@@ -86,10 +86,10 @@
86
86
  "tailwind-merge": "^2.6.0"
87
87
  },
88
88
  "devDependencies": {
89
- "@nestjs/common": "^11.0.0",
90
- "@nestjs/core": "^11.0.0",
91
- "@nestjs/platform-express": "^11.0.0",
92
- "@nestjs/testing": "^11.0.0",
89
+ "@nestjs/common": "^12.0.0",
90
+ "@nestjs/core": "^12.0.0",
91
+ "@nestjs/platform-express": "^12.0.0",
92
+ "@nestjs/testing": "^12.0.0",
93
93
  "@tanstack/intent": "^0.3.2",
94
94
  "@tanstack/react-query": "^5.0.0",
95
95
  "@tanstack/react-table": "^9.0.0",
@@ -113,7 +113,7 @@
113
113
  "typescript": "^5.4.0",
114
114
  "vite": "^5.4.0",
115
115
  "vitest": "^3.0.0",
116
- "@dudousxd/nestjs-telescope": "1.25.0"
116
+ "@dudousxd/nestjs-telescope": "1.28.1"
117
117
  },
118
118
  "engines": {
119
119
  "node": ">=20"