adonisjs-server-stats 1.8.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/core/index.js +24 -22
  2. package/dist/core/log-utils.d.ts +14 -0
  3. package/dist/core/split-pane.d.ts +18 -0
  4. package/dist/core/trace-utils.d.ts +5 -0
  5. package/dist/core/types.d.ts +1 -1
  6. package/dist/react/{CacheSection-D5J5moz7.js → CacheSection-UCMptWyn.js} +1 -1
  7. package/dist/react/{CacheTab-F1MkWSZl.js → CacheTab-CA8LB1J5.js} +1 -1
  8. package/dist/react/{ConfigSection-DerLBu4o.js → ConfigSection-DfFd-WRq.js} +1 -1
  9. package/dist/react/{ConfigTab-Bsj7v9JW.js → ConfigTab-Bdg8YMer.js} +1 -1
  10. package/dist/react/{CustomPaneTab-gzdtDEvz.js → CustomPaneTab-Bxtv_8Rw.js} +1 -1
  11. package/dist/react/{EmailsSection-ndH3cvJk.js → EmailsSection-CM7stSyh.js} +1 -1
  12. package/dist/react/{EmailsTab-DVPHRx0L.js → EmailsTab-BDhEiomM.js} +1 -1
  13. package/dist/react/{EventsSection-ClIByDSk.js → EventsSection-ByQ-9blq.js} +1 -1
  14. package/dist/react/{EventsTab-CCzWEKrk.js → EventsTab-CMfY98Rl.js} +1 -1
  15. package/dist/react/{JobsSection-CVMyAs7O.js → JobsSection-DF3qEv9O.js} +1 -1
  16. package/dist/react/{JobsTab-CATUyb9V.js → JobsTab-BbrBWIOb.js} +1 -1
  17. package/dist/react/LogsSection-DcFTZY7b.js +227 -0
  18. package/dist/react/LogsTab-CicucmVk.js +103 -0
  19. package/dist/react/{OverviewSection-ae5AO2RG.js → OverviewSection-C4T1ur51.js} +1 -1
  20. package/dist/react/{QueriesSection-DFFr9Tbb.js → QueriesSection-PswteoF9.js} +1 -1
  21. package/dist/react/{QueriesTab-GrHRAREt.js → QueriesTab-osLUWd4L.js} +1 -1
  22. package/dist/react/RelatedLogs-DFDOyUMr.js +40 -0
  23. package/dist/react/RequestsSection-Nag30rEA.js +341 -0
  24. package/dist/react/{RoutesSection-F7nANhF0.js → RoutesSection-BUSkM6PY.js} +1 -1
  25. package/dist/react/{RoutesTab-rugjhCPH.js → RoutesTab-DgVzd2PZ.js} +1 -1
  26. package/dist/react/TimelineTab-Covg5weo.js +220 -0
  27. package/dist/react/{index-DDzo1bZk.js → index-Cflz9Ebj.js} +390 -395
  28. package/dist/react/index.js +1 -1
  29. package/dist/react/react/components/shared/JsonViewer.d.ts +2 -1
  30. package/dist/react/react/components/shared/RelatedLogs.d.ts +7 -0
  31. package/dist/react/style.css +1 -1
  32. package/dist/src/controller/debug_controller.js +1 -1
  33. package/dist/src/dashboard/dashboard_controller.js +13 -0
  34. package/dist/src/dashboard/dashboard_store.d.ts +1 -0
  35. package/dist/src/dashboard/dashboard_store.js +88 -41
  36. package/dist/src/dashboard/migrator.js +6 -0
  37. package/dist/src/data/data_access.d.ts +7 -0
  38. package/dist/src/data/data_access.js +32 -1
  39. package/dist/src/debug/trace_collector.d.ts +1 -1
  40. package/dist/src/debug/trace_collector.js +2 -1
  41. package/dist/src/debug/types.d.ts +4 -0
  42. package/dist/src/edge/client/dashboard.js +2 -2
  43. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  44. package/dist/src/edge/client-vue/dashboard.js +4 -4
  45. package/dist/src/edge/client-vue/debug-panel-deferred.js +3 -3
  46. package/dist/src/middleware/request_tracking_middleware.d.ts +1 -0
  47. package/dist/src/middleware/request_tracking_middleware.js +3 -1
  48. package/dist/src/provider/server_stats_provider.d.ts +3 -3
  49. package/dist/src/provider/server_stats_provider.js +29 -15
  50. package/dist/src/routes/register_routes.js +7 -2
  51. package/dist/src/styles/components.css +162 -0
  52. package/dist/src/styles/debug-panel.css +9 -0
  53. package/dist/src/types.d.ts +1 -1
  54. package/dist/vue/{CacheSection-DDvJ7bs2.js → CacheSection-oFAJL3mo.js} +2 -2
  55. package/dist/vue/{ConfigSection-GTCrvsPr.js → ConfigSection-BhfJ4KqL.js} +1 -1
  56. package/dist/vue/{EmailsSection-Ct5vsLCc.js → EmailsSection-BcNyhyHs.js} +1 -1
  57. package/dist/vue/{EventsSection-CRVhtagq.js → EventsSection-r60Q5Lmu.js} +2 -2
  58. package/dist/vue/{EventsTab-DQ4Nd6AK.js → EventsTab-BBM7olXF.js} +1 -1
  59. package/dist/vue/{JobsSection-B_wH2Co7.js → JobsSection-BHL-hkQw.js} +2 -2
  60. package/dist/vue/{JobsTab-BCvhOARO.js → JobsTab-WFnxPdN7.js} +1 -1
  61. package/dist/vue/{JsonViewer.vue_vue_type_script_setup_true_lang-Vsqar1zx.js → JsonViewer.vue_vue_type_script_setup_true_lang-Bid05zpm.js} +25 -23
  62. package/dist/vue/LogsSection-DRMGzJmg.js +252 -0
  63. package/dist/vue/LogsTab-Bg3o0Mm6.js +147 -0
  64. package/dist/vue/{OverviewSection-BqSwuMKH.js → OverviewSection-CXh6Ja1B.js} +1 -1
  65. package/dist/vue/{QueriesSection-D4Fs0YH6.js → QueriesSection-IodIsCJ-.js} +1 -1
  66. package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-CB2_TzYW.js +84 -0
  67. package/dist/vue/RequestsSection-BPuMdmMc.js +401 -0
  68. package/dist/vue/{RoutesSection-Ys5dTzvF.js → RoutesSection-NKo3Rbq3.js} +1 -1
  69. package/dist/vue/TimelineTab-zj5Z5OdT.js +338 -0
  70. package/dist/vue/components/Dashboard/sections/RequestsSection.vue.d.ts +4 -0
  71. package/dist/vue/components/DebugPanel/tabs/TimelineTab.vue.d.ts +4 -0
  72. package/dist/vue/components/shared/JsonViewer.vue.d.ts +3 -0
  73. package/dist/vue/components/{Dashboard/sections/TimelineSection.vue.d.ts → shared/RelatedLogs.vue.d.ts} +5 -6
  74. package/dist/vue/index-Dtgysd26.js +1229 -0
  75. package/dist/vue/index.js +1 -1
  76. package/dist/vue/style.css +1 -1
  77. package/package.json +1 -1
  78. package/dist/react/LogsSection-hAsLaKOC.js +0 -212
  79. package/dist/react/LogsTab-QouH4NPQ.js +0 -88
  80. package/dist/react/RequestsSection-DtwnJOnM.js +0 -209
  81. package/dist/react/TimelineSection-F5ThmTdy.js +0 -158
  82. package/dist/react/TimelineTab-Dvpf-I5C.js +0 -193
  83. package/dist/react/WaterfallChart-Cj73WdfM.js +0 -100
  84. package/dist/react/react/components/Dashboard/sections/TimelineSection.d.ts +0 -8
  85. package/dist/vue/LogsSection-C4NRFOpA.js +0 -227
  86. package/dist/vue/LogsTab-DpEQ7euu.js +0 -122
  87. package/dist/vue/RequestsSection-B0A5SKcM.js +0 -243
  88. package/dist/vue/TimelineSection-D38iHB08.js +0 -186
  89. package/dist/vue/TimelineTab-Db6lKKsD.js +0 -250
  90. package/dist/vue/WaterfallChart.vue_vue_type_script_setup_true_lang-tZ13cNj1.js +0 -118
  91. package/dist/vue/index-Bj6pm5g3.js +0 -1235
@@ -1,119 +1,119 @@
1
- import { jsx as e, jsxs as d, Fragment as H } from "react/jsx-runtime";
2
- import K, { useState as N, useRef as j, useEffect as R, useCallback as B, useMemo as O, Suspense as F, lazy as T } from "react";
3
- import { DEFAULT_FEATURES as G, detectFeatures as Q, ServerStatsController as X, getTheme as Y, onThemeChange as Z, toggleTheme as ee, buildSparklineData as se, computeStats as te, formatStatNum as U, detectMetricGroupsFromStats as ne, getVisibleMetricGroups as oe, METRIC_DEFINITIONS as ie, TAB_ICONS as L, DashboardDataController as re, subscribeToChannel as ae, DebugDataController as le, compactPreview as ce } from "adonisjs-server-stats/core";
4
- import { createPortal as de } from "react-dom";
1
+ import { jsx as e, jsxs as l, Fragment as H } from "react/jsx-runtime";
2
+ import V, { useState as y, useRef as j, useEffect as R, useCallback as B, useMemo as O, Suspense as F, lazy as T } from "react";
3
+ import { DEFAULT_FEATURES as K, detectFeatures as G, ServerStatsController as Q, getTheme as X, onThemeChange as Y, toggleTheme as Z, buildSparklineData as ee, computeStats as se, formatStatNum as U, detectMetricGroupsFromStats as te, getVisibleMetricGroups as ne, METRIC_DEFINITIONS as oe, TAB_ICONS as L, DashboardDataController as re, subscribeToChannel as ie, DebugDataController as ae, compactPreview as le } from "adonisjs-server-stats/core";
4
+ import { createPortal as ce } from "react-dom";
5
5
  function z(s = {}) {
6
- const { baseUrl: i = "", debugEndpoint: t = "/admin/api/debug", authToken: n } = s, [a, h] = N(G), [c, r] = N(!0), [g, p] = N(null), m = j(!1);
6
+ const { baseUrl: i = "", debugEndpoint: t = "/admin/api/debug", authToken: o } = s, [a, d] = y(K), [g, n] = y(!0), [v, p] = y(null), h = j(!1);
7
7
  return R(() => {
8
- if (m.current) return;
9
- m.current = !0;
10
- let l = !1;
8
+ if (h.current) return;
9
+ h.current = !0;
10
+ let u = !1;
11
11
  return (async () => {
12
12
  try {
13
- const f = await Q({ baseUrl: i, debugEndpoint: t, authToken: n });
14
- l || (h(f), r(!1));
13
+ const f = await G({ baseUrl: i, debugEndpoint: t, authToken: o });
14
+ u || (d(f), n(!1));
15
15
  } catch (f) {
16
- l || (p(f instanceof Error ? f : new Error(String(f))), r(!1));
16
+ u || (p(f instanceof Error ? f : new Error(String(f))), n(!1));
17
17
  }
18
18
  })(), () => {
19
- l = !0;
19
+ u = !0;
20
20
  };
21
- }, [i, t, n]), { features: a, isLoading: c, error: g };
21
+ }, [i, t, o]), { features: a, isLoading: g, error: v };
22
22
  }
23
- function ue(s = {}) {
23
+ function de(s = {}) {
24
24
  const {
25
25
  baseUrl: i = "",
26
26
  endpoint: t = "/admin/api/server-stats",
27
- channelName: n = "admin/server-stats",
27
+ channelName: o = "admin/server-stats",
28
28
  authToken: a,
29
- pollInterval: h = 3e3
30
- } = s, [c, r] = N(null), [g, p] = N(!1), [m, l] = N(!1), [y, f] = N(null), [b, w] = N(!1), E = j(null);
29
+ pollInterval: d = 3e3
30
+ } = s, [g, n] = y(null), [v, p] = y(!1), [h, u] = y(!1), [w, f] = y(null), [b, k] = y(!1), E = j(null);
31
31
  R(() => {
32
32
  if (b) return;
33
- const I = new X({
33
+ const I = new Q({
34
34
  baseUrl: i,
35
35
  endpoint: t,
36
- channelName: n,
36
+ channelName: o,
37
37
  authToken: a,
38
- pollInterval: h,
39
- onStatsUpdate: (C) => r(C),
38
+ pollInterval: d,
39
+ onStatsUpdate: (C) => n(C),
40
40
  onConnectionChange: (C) => p(C),
41
- onStaleChange: (C) => l(C),
41
+ onStaleChange: (C) => u(C),
42
42
  onError: (C) => f(C),
43
- onUnauthorizedChange: (C) => w(C)
43
+ onUnauthorizedChange: (C) => k(C)
44
44
  });
45
45
  return E.current = I, I.start(), () => {
46
46
  I.stop(), E.current = null;
47
47
  };
48
- }, [i, n, a, h, b]);
48
+ }, [i, o, a, d, b]);
49
49
  const _ = B((I) => E.current?.getHistory(I) ?? [], []);
50
50
  return {
51
- stats: c,
51
+ stats: g,
52
52
  history: E.current?.getAllHistory() ?? {},
53
53
  getHistory: _,
54
- isConnected: g,
55
- isStale: m,
56
- error: y,
54
+ isConnected: v,
55
+ isStale: h,
56
+ error: w,
57
57
  unauthorized: b
58
58
  };
59
59
  }
60
60
  function A() {
61
- const [s, i] = N(() => Y());
62
- R(() => Z((a) => {
61
+ const [s, i] = y(() => X());
62
+ R(() => Y((a) => {
63
63
  i(a);
64
64
  }), []);
65
65
  const t = B(() => {
66
- const n = ee();
67
- return i(n), n;
66
+ const o = Z();
67
+ return i(o), o;
68
68
  }, []);
69
69
  return { theme: s, toggleTheme: t };
70
70
  }
71
- function he({
71
+ function ue({
72
72
  data: s,
73
73
  color: i = "#34d399",
74
74
  width: t = 120,
75
- height: n = 32,
75
+ height: o = 32,
76
76
  className: a = ""
77
77
  }) {
78
- const h = O(
79
- () => se(s, { width: t, height: n }),
80
- [s, t, n]
81
- ), c = O(() => "ss-grad-" + Math.random().toString(36).slice(2, 8), []), r = { "--ss-accent": i };
82
- if (!h)
83
- return /* @__PURE__ */ e("div", { className: `ss-dash-sparkline ${a}`, style: r, children: /* @__PURE__ */ e(
78
+ const d = O(
79
+ () => ee(s, { width: t, height: o }),
80
+ [s, t, o]
81
+ ), g = O(() => "ss-grad-" + Math.random().toString(36).slice(2, 8), []), n = { "--ss-accent": i };
82
+ if (!d)
83
+ return /* @__PURE__ */ e("div", { className: `ss-dash-sparkline ${a}`, style: n, children: /* @__PURE__ */ e(
84
84
  "svg",
85
85
  {
86
86
  width: t,
87
- height: n,
88
- viewBox: `0 0 ${t} ${n}`,
87
+ height: o,
88
+ viewBox: `0 0 ${t} ${o}`,
89
89
  style: { display: "block" },
90
- children: /* @__PURE__ */ d("text", { x: t / 2, y: n / 2 + 3, textAnchor: "middle", fill: "#737373", fontSize: "9", children: [
90
+ children: /* @__PURE__ */ l("text", { x: t / 2, y: o / 2 + 3, textAnchor: "middle", fill: "#737373", fontSize: "9", children: [
91
91
  "collecting",
92
92
  "…"
93
93
  ] })
94
94
  }
95
95
  ) });
96
- const g = i || "var(--ss-accent)";
97
- return /* @__PURE__ */ e("div", { className: `ss-dash-sparkline ${a}`, style: r, children: /* @__PURE__ */ d(
96
+ const v = i || "var(--ss-accent)";
97
+ return /* @__PURE__ */ e("div", { className: `ss-dash-sparkline ${a}`, style: n, children: /* @__PURE__ */ l(
98
98
  "svg",
99
99
  {
100
100
  width: t,
101
- height: n,
102
- viewBox: `0 0 ${t} ${n}`,
101
+ height: o,
102
+ viewBox: `0 0 ${t} ${o}`,
103
103
  style: { display: "block" },
104
104
  children: [
105
- /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ d("linearGradient", { id: c, x1: "0", y1: "0", x2: "0", y2: "1", children: [
106
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: g, stopOpacity: "0.25" }),
107
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: g, stopOpacity: "0.02" })
105
+ /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ l("linearGradient", { id: g, x1: "0", y1: "0", x2: "0", y2: "1", children: [
106
+ /* @__PURE__ */ e("stop", { offset: "0%", stopColor: v, stopOpacity: "0.25" }),
107
+ /* @__PURE__ */ e("stop", { offset: "100%", stopColor: v, stopOpacity: "0.02" })
108
108
  ] }) }),
109
- /* @__PURE__ */ e("path", { d: h.areaPath, fill: `url(#${c})` }),
109
+ /* @__PURE__ */ e("path", { d: d.areaPath, fill: `url(#${g})` }),
110
110
  /* @__PURE__ */ e(
111
111
  "path",
112
112
  {
113
113
  className: "ss-dash-sparkline-line",
114
- d: "M" + h.points.replace(/ /g, " L"),
114
+ d: "M" + d.points.replace(/ /g, " L"),
115
115
  fill: "none",
116
- stroke: g,
116
+ stroke: v,
117
117
  strokeWidth: "1.5",
118
118
  strokeLinejoin: "round",
119
119
  strokeLinecap: "round"
@@ -123,14 +123,14 @@ function he({
123
123
  }
124
124
  ) });
125
125
  }
126
- const pe = {
126
+ const he = {
127
127
  "ss-red": "#f87171",
128
128
  "ss-amber": "#fbbf24",
129
129
  "ss-green": "#34d399",
130
130
  "ss-muted": "#737373"
131
131
  };
132
- function me(s, i, t) {
133
- const [n, a] = N({
132
+ function pe(s, i, t) {
133
+ const [o, a] = y({
134
134
  position: "absolute",
135
135
  bottom: "100%",
136
136
  left: 0,
@@ -139,100 +139,100 @@ function me(s, i, t) {
139
139
  });
140
140
  return R(() => {
141
141
  if (!t) return;
142
- const h = () => {
143
- const r = s.current, g = i.current;
144
- if (!r || !g) return;
145
- const p = r.closest(".ss-bar");
142
+ const d = () => {
143
+ const n = s.current, v = i.current;
144
+ if (!n || !v) return;
145
+ const p = n.closest(".ss-bar");
146
146
  if (!p) return;
147
- const m = r.getBoundingClientRect(), l = p.getBoundingClientRect(), y = m.left - l.left + m.width / 2;
147
+ const h = n.getBoundingClientRect(), u = p.getBoundingClientRect(), w = h.left - u.left + h.width / 2;
148
148
  a({
149
149
  position: "absolute",
150
150
  bottom: "100%",
151
- left: `${y}px`,
151
+ left: `${w}px`,
152
152
  transform: "translateX(-50%)",
153
153
  marginBottom: "10px",
154
154
  zIndex: 180
155
155
  }), requestAnimationFrame(() => {
156
- const f = g.getBoundingClientRect();
156
+ const f = v.getBoundingClientRect();
157
157
  let b = 0;
158
- f.left < 8 ? b = 8 - f.left : f.right > window.innerWidth - 8 && (b = window.innerWidth - 8 - f.right), b && a((w) => ({
159
- ...w,
158
+ f.left < 8 ? b = 8 - f.left : f.right > window.innerWidth - 8 && (b = window.innerWidth - 8 - f.right), b && a((k) => ({
159
+ ...k,
160
160
  transform: `translateX(calc(-50% + ${b}px))`
161
161
  }));
162
162
  });
163
163
  };
164
- h();
165
- const c = s.current?.closest(".ss-bar-scroll");
166
- return c?.addEventListener("scroll", h), window.addEventListener("resize", h), () => {
167
- c?.removeEventListener("scroll", h), window.removeEventListener("resize", h);
164
+ d();
165
+ const g = s.current?.closest(".ss-bar-scroll");
166
+ return g?.addEventListener("scroll", d), window.addEventListener("resize", d), () => {
167
+ g?.removeEventListener("scroll", d), window.removeEventListener("resize", d);
168
168
  };
169
- }, [t, s, i]), n;
169
+ }, [t, s, i]), o;
170
170
  }
171
- function be({ metric: s, stats: i, history: t, className: n = "" }) {
172
- const [a, h] = N(!1), [c, r] = N(!1), g = j(null), p = j(null);
171
+ function be({ metric: s, stats: i, history: t, className: o = "" }) {
172
+ const [a, d] = y(!1), [g, n] = y(!1), v = j(null), p = j(null);
173
173
  if (s.show && !s.show(i))
174
174
  return null;
175
- const m = s.value ? s.value(i) : s.format(i), l = s.color ? s.color(i) : "", y = l && pe[l] || "#34d399", f = typeof s.detail == "function" ? s.detail(i) : s.detail, b = O(() => te(t), [t]), w = a || c, E = me(g, p, w), _ = B(($) => {
176
- $.stopPropagation(), h((o) => !o);
175
+ const h = s.value ? s.value(i) : s.format(i), u = s.color ? s.color(i) : "", w = u && he[u] || "#34d399", f = typeof s.detail == "function" ? s.detail(i) : s.detail, b = O(() => se(t), [t]), k = a || g, E = pe(v, p, k), _ = B(($) => {
176
+ $.stopPropagation(), d((r) => !r);
177
177
  }, []);
178
178
  R(() => {
179
179
  if (!a) return;
180
- const $ = (v) => {
181
- const x = v.target;
182
- g.current && !g.current.contains(x) && p.current && !p.current.contains(x) && h(!1);
183
- }, o = (v) => {
184
- v.key === "Escape" && h(!1);
180
+ const $ = (m) => {
181
+ const x = m.target;
182
+ v.current && !v.current.contains(x) && p.current && !p.current.contains(x) && d(!1);
183
+ }, r = (m) => {
184
+ m.key === "Escape" && d(!1);
185
185
  };
186
- return document.addEventListener("click", $), document.addEventListener("keydown", o), () => {
187
- document.removeEventListener("click", $), document.removeEventListener("keydown", o);
186
+ return document.addEventListener("click", $), document.addEventListener("keydown", r), () => {
187
+ document.removeEventListener("click", $), document.removeEventListener("keydown", r);
188
188
  };
189
189
  }, [a]);
190
- const I = g.current?.closest(".ss-bar"), C = w && I ? de(
191
- /* @__PURE__ */ d(
190
+ const I = v.current?.closest(".ss-bar"), C = k && I ? ce(
191
+ /* @__PURE__ */ l(
192
192
  "div",
193
193
  {
194
194
  ref: p,
195
195
  className: `ss-tooltip ${a ? "ss-pinned" : ""}`,
196
196
  style: E,
197
197
  children: [
198
- /* @__PURE__ */ d("div", { className: "ss-tooltip-inner", style: { position: "relative" }, children: [
198
+ /* @__PURE__ */ l("div", { className: "ss-tooltip-inner", style: { position: "relative" }, children: [
199
199
  a && /* @__PURE__ */ e(
200
200
  "button",
201
201
  {
202
202
  className: "ss-tooltip-close",
203
203
  onClick: ($) => {
204
- $.stopPropagation(), h(!1);
204
+ $.stopPropagation(), d(!1);
205
205
  },
206
206
  type: "button",
207
207
  children: "×"
208
208
  }
209
209
  ),
210
- /* @__PURE__ */ d("div", { className: "ss-tooltip-header", children: [
210
+ /* @__PURE__ */ l("div", { className: "ss-tooltip-header", children: [
211
211
  /* @__PURE__ */ e("span", { className: "ss-tooltip-title", children: s.title }),
212
212
  s.unit && /* @__PURE__ */ e("span", { className: "ss-tooltip-unit", children: s.unit })
213
213
  ] }),
214
- /* @__PURE__ */ d("div", { className: "ss-tooltip-current", children: [
214
+ /* @__PURE__ */ l("div", { className: "ss-tooltip-current", children: [
215
215
  /* @__PURE__ */ e("span", { className: "ss-tooltip-current-label", children: "Current: " }),
216
- /* @__PURE__ */ e("span", { className: "ss-tooltip-current-value", children: m })
216
+ /* @__PURE__ */ e("span", { className: "ss-tooltip-current-value", children: h })
217
217
  ] }),
218
- b && /* @__PURE__ */ d("div", { className: "ss-tooltip-stats", children: [
219
- /* @__PURE__ */ d("span", { children: [
218
+ b && /* @__PURE__ */ l("div", { className: "ss-tooltip-stats", children: [
219
+ /* @__PURE__ */ l("span", { children: [
220
220
  "Min: ",
221
221
  U(b.min, s.unit)
222
222
  ] }),
223
- /* @__PURE__ */ d("span", { children: [
223
+ /* @__PURE__ */ l("span", { children: [
224
224
  "Max: ",
225
225
  U(b.max, s.unit)
226
226
  ] }),
227
- /* @__PURE__ */ d("span", { children: [
227
+ /* @__PURE__ */ l("span", { children: [
228
228
  "Avg: ",
229
229
  U(b.avg, s.unit)
230
230
  ] })
231
231
  ] }),
232
232
  f && /* @__PURE__ */ e("div", { className: "ss-tooltip-details", children: f }),
233
- t.length > 0 && /* @__PURE__ */ d(H, { children: [
234
- /* @__PURE__ */ e("div", { className: "ss-tooltip-sparkline", children: /* @__PURE__ */ e(he, { data: t, color: y }) }),
235
- /* @__PURE__ */ d("div", { className: "ss-tooltip-samples", children: [
233
+ t.length > 0 && /* @__PURE__ */ l(H, { children: [
234
+ /* @__PURE__ */ e("div", { className: "ss-tooltip-sparkline", children: /* @__PURE__ */ e(ue, { data: t, color: w }) }),
235
+ /* @__PURE__ */ l("div", { className: "ss-tooltip-samples", children: [
236
236
  "Last ",
237
237
  Math.min(t.length, 60),
238
238
  " samples (~",
@@ -247,71 +247,71 @@ function be({ metric: s, stats: i, history: t, className: n = "" }) {
247
247
  ),
248
248
  I
249
249
  ) : null;
250
- return /* @__PURE__ */ d(H, { children: [
251
- /* @__PURE__ */ d(
250
+ return /* @__PURE__ */ l(H, { children: [
251
+ /* @__PURE__ */ l(
252
252
  "div",
253
253
  {
254
- ref: g,
255
- className: `ss-badge ${a ? "ss-pinned" : ""} ${n}`,
254
+ ref: v,
255
+ className: `ss-badge ${a ? "ss-pinned" : ""} ${o}`,
256
256
  onClick: _,
257
- onMouseEnter: () => !a && r(!0),
258
- onMouseLeave: () => r(!1),
257
+ onMouseEnter: () => !a && n(!0),
258
+ onMouseLeave: () => n(!1),
259
259
  role: "button",
260
260
  tabIndex: 0,
261
261
  onKeyDown: ($) => $.key === "Enter" && _($),
262
262
  children: [
263
263
  /* @__PURE__ */ e("span", { className: "ss-label", children: s.label }),
264
- /* @__PURE__ */ e("span", { className: `ss-value ${l}`, children: m })
264
+ /* @__PURE__ */ e("span", { className: `ss-value ${u}`, children: h })
265
265
  ]
266
266
  }
267
267
  ),
268
268
  C
269
269
  ] });
270
270
  }
271
- function We(s) {
271
+ function ze(s) {
272
272
  const {
273
273
  featureOptions: i,
274
274
  autoHideOnUnauthorized: t = !0,
275
- onOpenDebugPanel: n,
275
+ onOpenDebugPanel: o,
276
276
  debugPanelOpen: a = !1,
277
- onConnectionChange: h,
278
- ...c
279
- } = s, { stats: r, getHistory: g, isConnected: p, isStale: m, unauthorized: l } = ue(c);
277
+ onConnectionChange: d,
278
+ ...g
279
+ } = s, { stats: n, getHistory: v, isConnected: p, isStale: h, unauthorized: u } = de(g);
280
280
  R(() => {
281
- h?.(p);
282
- }, [p, h]);
283
- const { features: y } = z(i), { theme: f } = A(), [b, w] = N(() => typeof window > "u" ? !0 : localStorage.getItem("admin:stats-bar") !== "hidden"), E = j(null), _ = j(null);
281
+ d?.(p);
282
+ }, [p, d]);
283
+ const { features: w } = z(i), { theme: f } = A(), [b, k] = y(() => typeof window > "u" ? !0 : localStorage.getItem("admin:stats-bar") !== "hidden"), E = j(null), _ = j(null);
284
284
  R(() => {
285
- t && l && w(!1);
286
- }, [t, l]);
285
+ t && u && k(!1);
286
+ }, [t, u]);
287
287
  const I = B(() => {
288
- w((v) => {
289
- const x = !v;
288
+ k((m) => {
289
+ const x = !m;
290
290
  return localStorage.setItem("admin:stats-bar", x ? "visible" : "hidden"), x;
291
291
  });
292
292
  }, []);
293
293
  R(() => {
294
- const v = _.current;
295
- if (!v) return;
296
- const x = (k) => {
297
- Math.abs(k.deltaX) > Math.abs(k.deltaY) || (k.preventDefault(), v.scrollLeft += k.deltaY);
294
+ const m = _.current;
295
+ if (!m) return;
296
+ const x = (N) => {
297
+ Math.abs(N.deltaX) > Math.abs(N.deltaY) || (N.preventDefault(), m.scrollLeft += N.deltaY);
298
298
  };
299
- return v.addEventListener("wheel", x, { passive: !1 }), () => v.removeEventListener("wheel", x);
299
+ return m.addEventListener("wheel", x, { passive: !1 }), () => m.removeEventListener("wheel", x);
300
300
  }, []);
301
- const C = O(() => r ? ne(r) : oe(y), [r, y]), $ = O(
302
- () => ie.filter((v) => C.has(v.group || "core")),
301
+ const C = O(() => n ? te(n) : ne(w), [n, w]), $ = O(
302
+ () => oe.filter((m) => C.has(m.group || "core")),
303
303
  [C]
304
- ), o = O(() => {
305
- const v = [];
304
+ ), r = O(() => {
305
+ const m = [];
306
306
  let x = "";
307
- for (const k of $) {
308
- const D = k.group || "core";
309
- D !== x && (x = D, v.push({ group: x, metrics: [] })), v[v.length - 1].metrics.push(k);
307
+ for (const N of $) {
308
+ const D = N.group || "core";
309
+ D !== x && (x = D, m.push({ group: x, metrics: [] })), m[m.length - 1].metrics.push(N);
310
310
  }
311
- return v;
311
+ return m;
312
312
  }, [$]);
313
- return t && l ? null : /* @__PURE__ */ d(H, { children: [
314
- /* @__PURE__ */ d(
313
+ return t && u ? null : /* @__PURE__ */ l(H, { children: [
314
+ /* @__PURE__ */ l(
315
315
  "button",
316
316
  {
317
317
  type: "button",
@@ -320,35 +320,35 @@ function We(s) {
320
320
  title: b ? "Hide stats bar" : "Show stats bar",
321
321
  "data-ss-theme": f,
322
322
  children: [
323
- !b && r && /* @__PURE__ */ d("span", { className: "ss-toggle-summary", style: { display: "flex" }, children: [
324
- C.has("process") && /* @__PURE__ */ d(H, { children: [
325
- /* @__PURE__ */ d(
323
+ !b && n && /* @__PURE__ */ l("span", { className: "ss-toggle-summary", style: { display: "flex" }, children: [
324
+ C.has("process") && /* @__PURE__ */ l(H, { children: [
325
+ /* @__PURE__ */ l(
326
326
  "span",
327
327
  {
328
- className: `ss-value ${r.cpuPercent > 80 ? "ss-red" : r.cpuPercent > 50 ? "ss-amber" : "ss-green"}`,
328
+ className: `ss-value ${n.cpuPercent > 80 ? "ss-red" : n.cpuPercent > 50 ? "ss-amber" : "ss-green"}`,
329
329
  children: [
330
- r.cpuPercent.toFixed(0),
330
+ n.cpuPercent.toFixed(0),
331
331
  "%"
332
332
  ]
333
333
  }
334
334
  ),
335
- /* @__PURE__ */ e("span", { className: "ss-value ss-green", children: r.memHeapUsed !== void 0 ? Math.round(r.memHeapUsed / (1024 * 1024)) + "M" : "-" })
335
+ /* @__PURE__ */ e("span", { className: "ss-value ss-green", children: n.memHeapUsed !== void 0 ? Math.round(n.memHeapUsed / (1024 * 1024)) + "M" : "-" })
336
336
  ] }),
337
- C.has("redis") && r.redisOk !== void 0 && /* @__PURE__ */ e("span", { className: `ss-value ${r.redisOk ? "ss-green" : "ss-red"}`, children: r.redisOk ? "✓" : "✗" })
337
+ C.has("redis") && n.redisOk !== void 0 && /* @__PURE__ */ e("span", { className: `ss-value ${n.redisOk ? "ss-green" : "ss-red"}`, children: n.redisOk ? "✓" : "✗" })
338
338
  ] }),
339
339
  b && /* @__PURE__ */ e("span", { className: "ss-toggle-label", style: { color: "#737373" }, children: "hide stats" }),
340
340
  /* @__PURE__ */ e("span", { className: "ss-toggle-arrow", children: b ? "▼" : "▲" })
341
341
  ]
342
342
  }
343
343
  ),
344
- /* @__PURE__ */ d("div", { ref: E, className: b ? "ss-bar" : "ss-bar ss-hidden", "data-ss-theme": f, children: [
345
- /* @__PURE__ */ d("div", { className: "ss-bar-left", children: [
346
- n && /* @__PURE__ */ e(
344
+ /* @__PURE__ */ l("div", { ref: E, className: b ? "ss-bar" : "ss-bar ss-hidden", "data-ss-theme": f, children: [
345
+ /* @__PURE__ */ l("div", { className: "ss-bar-left", children: [
346
+ o && /* @__PURE__ */ e(
347
347
  "button",
348
348
  {
349
349
  type: "button",
350
350
  className: `ss-dbg-btn ${a ? "ss-dbg-active" : ""}`,
351
- onClick: n,
351
+ onClick: o,
352
352
  title: "Toggle debug panel",
353
353
  id: "ss-dbg-wrench",
354
354
  children: /* @__PURE__ */ e(
@@ -367,35 +367,35 @@ function We(s) {
367
367
  )
368
368
  }
369
369
  ),
370
- /* @__PURE__ */ e("div", { className: m ? "ss-dot ss-stale" : "ss-dot" })
370
+ /* @__PURE__ */ e("div", { className: h ? "ss-dot ss-stale" : "ss-dot" })
371
371
  ] }),
372
- /* @__PURE__ */ e("div", { ref: _, className: "ss-bar-scroll", id: "ss-bar-scroll", children: r && o.map((v, x) => /* @__PURE__ */ d(K.Fragment, { children: [
372
+ /* @__PURE__ */ e("div", { ref: _, className: "ss-bar-scroll", id: "ss-bar-scroll", children: n && r.map((m, x) => /* @__PURE__ */ l(V.Fragment, { children: [
373
373
  x > 0 && /* @__PURE__ */ e("div", { className: "ss-group-sep" }),
374
- /* @__PURE__ */ e("div", { className: "ss-group", children: v.metrics.map((k) => /* @__PURE__ */ e(
374
+ /* @__PURE__ */ e("div", { className: "ss-group", children: m.metrics.map((N) => /* @__PURE__ */ e(
375
375
  be,
376
376
  {
377
- metric: k,
378
- stats: r,
379
- history: g(k.historyKey || "")
377
+ metric: N,
378
+ stats: n,
379
+ history: v(N.historyKey || "")
380
380
  },
381
- k.id
381
+ N.id
382
382
  )) })
383
- ] }, v.group)) })
383
+ ] }, m.group)) })
384
384
  ] })
385
385
  ] });
386
386
  }
387
- function J({
387
+ function W({
388
388
  theme: s,
389
389
  onToggle: i,
390
390
  className: t = "",
391
- classPrefix: n = "ss-dash"
391
+ classPrefix: o = "ss-dash"
392
392
  }) {
393
393
  const a = s === "dark";
394
394
  return /* @__PURE__ */ e(
395
395
  "button",
396
396
  {
397
397
  type: "button",
398
- className: `${n === "ss-dbg" ? "ss-dbg-theme-toggle" : "ss-dash-theme-btn"} ${t}`,
398
+ className: `${o === "ss-dbg" ? "ss-dbg-theme-toggle" : "ss-dash-theme-btn"} ${t}`,
399
399
  onClick: i,
400
400
  title: a ? "Switch to light theme" : "Switch to dark theme",
401
401
  "aria-label": a ? "Switch to light theme" : "Switch to dark theme",
@@ -435,23 +435,23 @@ function J({
435
435
  }
436
436
  );
437
437
  }
438
- const ge = T(() => import("./QueriesTab-GrHRAREt.js")), ve = T(() => import("./EventsTab-CCzWEKrk.js")), fe = T(() => import("./EmailsTab-DVPHRx0L.js")), we = T(() => import("./RoutesTab-rugjhCPH.js")), ke = T(() => import("./LogsTab-QouH4NPQ.js")), Ne = T(() => import("./TimelineTab-Dvpf-I5C.js")), ye = T(() => import("./CacheTab-F1MkWSZl.js")), Ce = T(() => import("./JobsTab-CATUyb9V.js")), Se = T(() => import("./ConfigTab-Bsj7v9JW.js")), Le = T(() => import("./InternalsTab-Oij0A2fN.js")), Te = T(() => import("./CustomPaneTab-gzdtDEvz.js"));
439
- function Je(s) {
438
+ const me = T(() => import("./QueriesTab-osLUWd4L.js")), ge = T(() => import("./EventsTab-CMfY98Rl.js")), ve = T(() => import("./EmailsTab-BDhEiomM.js")), fe = T(() => import("./RoutesTab-DgVzd2PZ.js")), we = T(() => import("./LogsTab-CicucmVk.js")), ke = T(() => import("./TimelineTab-Covg5weo.js")), Ne = T(() => import("./CacheTab-CA8LB1J5.js")), ye = T(() => import("./JobsTab-BbrBWIOb.js")), Ce = T(() => import("./ConfigTab-Bdg8YMer.js")), Se = T(() => import("./InternalsTab-Oij0A2fN.js")), Le = T(() => import("./CustomPaneTab-Bxtv_8Rw.js"));
439
+ function Ae(s) {
440
440
  const {
441
441
  defaultOpen: i = !1,
442
442
  dashboardPath: t,
443
- isOpen: n,
443
+ isOpen: o,
444
444
  onOpenChange: a,
445
- isLive: h = !1,
446
- ...c
447
- } = s, [r, g] = N(i), p = n !== void 0 ? n : r, m = (o) => {
448
- a ? a(o) : g(o);
449
- }, [l, y] = N("queries"), { features: f } = z(c), { theme: b, toggleTheme: w } = A(), E = f.customPanes || [];
445
+ isLive: d = !1,
446
+ ...g
447
+ } = s, [n, v] = y(i), p = o !== void 0 ? o : n, h = (r) => {
448
+ a ? a(r) : v(r);
449
+ }, [u, w] = y("queries"), { features: f } = z(g), { theme: b, toggleTheme: k } = A(), E = f.customPanes || [];
450
450
  R(() => {
451
- const o = (v) => {
452
- v.key === "Escape" && p && m(!1);
451
+ const r = (m) => {
452
+ m.key === "Escape" && p && h(!1);
453
453
  };
454
- return document.addEventListener("keydown", o), () => document.removeEventListener("keydown", o);
454
+ return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
455
455
  }, [p]);
456
456
  const _ = O(
457
457
  () => [
@@ -460,49 +460,49 @@ function Je(s) {
460
460
  { id: "emails", label: "Emails", visible: !0 },
461
461
  { id: "routes", label: "Routes", visible: !0 },
462
462
  { id: "logs", label: "Logs", visible: !0 },
463
- { id: "timeline", label: "Timeline", visible: f.tracing },
463
+ { id: "timeline", label: "Requests", visible: f.tracing },
464
464
  { id: "cache", label: "Cache", visible: f.cache },
465
465
  { id: "jobs", label: "Jobs", visible: f.queues },
466
466
  { id: "config", label: "Config", visible: !0 },
467
467
  { id: "internals", label: "Internals", visible: !0 }
468
468
  ],
469
469
  [f]
470
- ), I = O(() => _.filter((o) => o.visible), [_]);
470
+ ), I = O(() => _.filter((r) => r.visible), [_]);
471
471
  R(() => {
472
- const o = [
473
- ...I.map((v) => v.id),
474
- ...E.map((v) => v.id)
472
+ const r = [
473
+ ...I.map((m) => m.id),
474
+ ...E.map((m) => m.id)
475
475
  ];
476
- !o.includes(l) && o.length > 0 && y(o[0]);
477
- }, [I, E, l]);
476
+ !r.includes(u) && r.length > 0 && w(r[0]);
477
+ }, [I, E, u]);
478
478
  const C = B(() => {
479
- m(!p);
479
+ h(!p);
480
480
  }, [p]), $ = B(() => {
481
- const o = { options: c }, v = E.find((k) => k.id === l);
482
- if (v)
483
- return /* @__PURE__ */ e(F, { fallback: /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "Loading..." }), children: /* @__PURE__ */ e(Te, { pane: v, options: c }) });
481
+ const r = { options: g }, m = E.find((N) => N.id === u);
482
+ if (m)
483
+ return /* @__PURE__ */ e(F, { fallback: /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "Loading..." }), children: /* @__PURE__ */ e(Le, { pane: m, options: g }) });
484
484
  const x = {
485
- queries: /* @__PURE__ */ e(ge, { ...o }),
486
- events: /* @__PURE__ */ e(ve, { ...o }),
487
- emails: /* @__PURE__ */ e(fe, { ...o }),
485
+ queries: /* @__PURE__ */ e(me, { ...r }),
486
+ events: /* @__PURE__ */ e(ge, { ...r }),
487
+ emails: /* @__PURE__ */ e(ve, { ...r }),
488
488
  routes: /* @__PURE__ */ e(
489
- we,
489
+ fe,
490
490
  {
491
- ...o,
491
+ ...r,
492
492
  currentPath: typeof window < "u" ? window.location.pathname : ""
493
493
  }
494
494
  ),
495
- logs: /* @__PURE__ */ e(ke, { ...o }),
496
- timeline: /* @__PURE__ */ e(Ne, { ...o }),
497
- cache: /* @__PURE__ */ e(ye, { ...o, dashboardPath: t }),
498
- jobs: /* @__PURE__ */ e(Ce, { ...o, dashboardPath: t }),
499
- config: /* @__PURE__ */ e(Se, { ...o, dashboardPath: t }),
500
- internals: /* @__PURE__ */ e(Le, { ...o })
495
+ logs: /* @__PURE__ */ e(we, { ...r }),
496
+ timeline: /* @__PURE__ */ e(ke, { ...r }),
497
+ cache: /* @__PURE__ */ e(Ne, { ...r, dashboardPath: t }),
498
+ jobs: /* @__PURE__ */ e(ye, { ...r, dashboardPath: t }),
499
+ config: /* @__PURE__ */ e(Ce, { ...r, dashboardPath: t }),
500
+ internals: /* @__PURE__ */ e(Se, { ...r })
501
501
  };
502
- return /* @__PURE__ */ e(F, { fallback: /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "Loading..." }), children: x[l] || /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "Unknown tab" }) });
503
- }, [l, c, E]);
504
- return /* @__PURE__ */ d(H, { children: [
505
- n === void 0 && /* @__PURE__ */ e(
502
+ return /* @__PURE__ */ e(F, { fallback: /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "Loading..." }), children: x[u] || /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "Unknown tab" }) });
503
+ }, [u, g, E]);
504
+ return /* @__PURE__ */ l(H, { children: [
505
+ o === void 0 && /* @__PURE__ */ e(
506
506
  "button",
507
507
  {
508
508
  type: "button",
@@ -526,56 +526,56 @@ function Je(s) {
526
526
  )
527
527
  }
528
528
  ),
529
- /* @__PURE__ */ d(
529
+ /* @__PURE__ */ l(
530
530
  "div",
531
531
  {
532
532
  className: `ss-dbg-panel ${p ? "ss-dbg-open" : ""}`,
533
533
  "data-ss-theme": b,
534
534
  id: "ss-dbg-panel",
535
535
  children: [
536
- /* @__PURE__ */ d("div", { className: "ss-dbg-tabs", children: [
537
- /* @__PURE__ */ d("div", { className: "ss-dbg-tabs-scroll", children: [
538
- I.map((o) => /* @__PURE__ */ d(
536
+ /* @__PURE__ */ l("div", { className: "ss-dbg-tabs", children: [
537
+ /* @__PURE__ */ l("div", { className: "ss-dbg-tabs-scroll", children: [
538
+ I.map((r) => /* @__PURE__ */ l(
539
539
  "button",
540
540
  {
541
541
  type: "button",
542
- className: `ss-dbg-tab ${l === o.id ? "ss-dbg-active" : ""}`,
543
- onClick: () => y(o.id),
542
+ className: `ss-dbg-tab ${u === r.id ? "ss-dbg-active" : ""}`,
543
+ onClick: () => w(r.id),
544
544
  children: [
545
- L[o.id] ? /* @__PURE__ */ e(
545
+ L[r.id] ? /* @__PURE__ */ e(
546
546
  "svg",
547
547
  {
548
548
  className: "ss-dbg-tab-icon",
549
- viewBox: L[o.id].viewBox,
550
- dangerouslySetInnerHTML: { __html: L[o.id].elements.join("") }
549
+ viewBox: L[r.id].viewBox,
550
+ dangerouslySetInnerHTML: { __html: L[r.id].elements.join("") }
551
551
  }
552
552
  ) : null,
553
- o.label
553
+ r.label
554
554
  ]
555
555
  },
556
- o.id
556
+ r.id
557
557
  )),
558
- E.map((o) => /* @__PURE__ */ e(
558
+ E.map((r) => /* @__PURE__ */ e(
559
559
  "button",
560
560
  {
561
561
  type: "button",
562
- className: `ss-dbg-tab ${l === o.id ? "ss-dbg-active" : ""}`,
563
- onClick: () => y(o.id),
564
- children: o.label
562
+ className: `ss-dbg-tab ${u === r.id ? "ss-dbg-active" : ""}`,
563
+ onClick: () => w(r.id),
564
+ children: r.label
565
565
  },
566
- o.id
566
+ r.id
567
567
  ))
568
568
  ] }),
569
- /* @__PURE__ */ d("div", { className: "ss-dbg-tabs-right", children: [
569
+ /* @__PURE__ */ l("div", { className: "ss-dbg-tabs-right", children: [
570
570
  /* @__PURE__ */ e(
571
571
  "span",
572
572
  {
573
- className: `ss-dbg-conn-mode ${h ? "ss-dbg-conn-live" : "ss-dbg-conn-polling"}`,
574
- title: h ? "Connected via Transmit (SSE) — real-time updates" : "Polling every 3s",
575
- children: h ? "live" : "polling"
573
+ className: `ss-dbg-conn-mode ${d ? "ss-dbg-conn-live" : "ss-dbg-conn-polling"}`,
574
+ title: d ? "Connected via Transmit (SSE) — real-time updates" : "Polling every 3s",
575
+ children: d ? "live" : "polling"
576
576
  }
577
577
  ),
578
- /* @__PURE__ */ e(J, { theme: b, onToggle: w, classPrefix: "ss-dbg" }),
578
+ /* @__PURE__ */ e(W, { theme: b, onToggle: k, classPrefix: "ss-dbg" }),
579
579
  t && /* @__PURE__ */ e(
580
580
  "a",
581
581
  {
@@ -605,7 +605,7 @@ function Je(s) {
605
605
  {
606
606
  type: "button",
607
607
  className: "ss-dbg-close",
608
- onClick: () => m(!1),
608
+ onClick: () => h(!1),
609
609
  title: "Close panel",
610
610
  children: "×"
611
611
  }
@@ -618,26 +618,26 @@ function Je(s) {
618
618
  )
619
619
  ] });
620
620
  }
621
- function Ee(s, i = {}) {
621
+ function Te(s, i = {}) {
622
622
  const {
623
623
  baseUrl: t = "",
624
- dashboardEndpoint: n = "/__stats/api",
624
+ dashboardEndpoint: o = "/__stats/api",
625
625
  authToken: a,
626
- page: h = 1,
627
- perPage: c = 50,
628
- search: r,
629
- sort: g,
626
+ page: d = 1,
627
+ perPage: g = 50,
628
+ search: n,
629
+ sort: v,
630
630
  sortDir: p,
631
- filters: m,
632
- timeRange: l,
633
- refreshKey: y
634
- } = i, [f, b] = N(null), [w, E] = N(null), [_, I] = N(!0), [C, $] = N(null), o = j(null), v = j(s), x = j(!1);
635
- o.current || (o.current = new re({
631
+ filters: h,
632
+ timeRange: u,
633
+ refreshKey: w
634
+ } = i, [f, b] = y(null), [k, E] = y(null), [_, I] = y(!0), [C, $] = y(null), r = j(null), m = j(s), x = j(!1);
635
+ r.current || (r.current = new re({
636
636
  baseUrl: t,
637
- endpoint: n,
637
+ endpoint: o,
638
638
  authToken: a,
639
639
  section: s,
640
- perPage: c,
640
+ perPage: g,
641
641
  callbacks: {
642
642
  onData: (M) => b(M),
643
643
  onPagination: (M) => E(M),
@@ -647,20 +647,20 @@ function Ee(s, i = {}) {
647
647
  }
648
648
  }
649
649
  })), R(() => {
650
- const M = o.current, u = v.current !== s;
651
- return v.current = s, M.configure({ page: h, perPage: c, search: r, sort: g, sortDir: p, filters: m, timeRange: l }), u || !x.current ? (u ? M.setSection(s) : M.start(), x.current = !0) : M.fetch(!0), () => {
650
+ const M = r.current, c = m.current !== s;
651
+ return m.current = s, M.configure({ page: d, perPage: g, search: n, sort: v, sortDir: p, filters: h, timeRange: u }), c || !x.current ? (c ? M.setSection(s) : M.start(), x.current = !0) : M.fetch(!0), () => {
652
652
  M.stop();
653
653
  };
654
- }, [s, h, c, r, g, p, m, l, y]);
655
- const k = B(() => {
656
- o.current?.fetch(!0);
654
+ }, [s, d, g, n, v, p, h, u, w]);
655
+ const N = B(() => {
656
+ r.current?.fetch(!0);
657
657
  }, []), D = B(
658
- async (M, u = "post", S) => o.current.mutate(M, u, S),
658
+ async (M, c = "post", S) => r.current.mutate(M, c, S),
659
659
  []
660
- ), P = B(() => o.current.getApi(), []);
661
- return { data: f, meta: w, isLoading: _, error: C, refresh: k, mutate: D, getApi: P };
660
+ ), q = B(() => r.current.getApi(), []);
661
+ return { data: f, meta: k, isLoading: _, error: C, refresh: N, mutate: D, getApi: q };
662
662
  }
663
- const $e = [
663
+ const Ee = [
664
664
  "overview",
665
665
  "requests",
666
666
  "queries",
@@ -668,65 +668,61 @@ const $e = [
668
668
  "routes",
669
669
  "logs",
670
670
  "emails",
671
- "timeline",
672
671
  "cache",
673
672
  "jobs",
674
673
  "config",
675
674
  "internals"
676
- ], xe = T(() => import("./OverviewSection-ae5AO2RG.js")), Ie = T(() => import("./RequestsSection-DtwnJOnM.js")), Be = T(() => import("./QueriesSection-DFFr9Tbb.js")), Me = T(() => import("./EventsSection-ClIByDSk.js")), Re = T(() => import("./RoutesSection-F7nANhF0.js")), Oe = T(() => import("./LogsSection-hAsLaKOC.js")), _e = T(() => import("./EmailsSection-ndH3cvJk.js")), De = T(() => import("./TimelineSection-F5ThmTdy.js")), je = T(() => import("./CacheSection-D5J5moz7.js")), He = T(() => import("./JobsSection-CVMyAs7O.js")), Pe = T(() => import("./ConfigSection-DerLBu4o.js")), qe = T(() => import("./InternalsSection-t7ihcWO-.js"));
677
- function W(s) {
678
- return s === "timeline" ? "dashboard-timeline" : s;
679
- }
680
- function Ve(s) {
675
+ ], $e = T(() => import("./OverviewSection-C4T1ur51.js")), xe = T(() => import("./RequestsSection-Nag30rEA.js")), Ie = T(() => import("./QueriesSection-PswteoF9.js")), Be = T(() => import("./EventsSection-ByQ-9blq.js")), Me = T(() => import("./RoutesSection-BUSkM6PY.js")), Re = T(() => import("./LogsSection-DcFTZY7b.js")), Oe = T(() => import("./EmailsSection-CM7stSyh.js")), _e = T(() => import("./CacheSection-UCMptWyn.js")), De = T(() => import("./JobsSection-DF3qEv9O.js")), je = T(() => import("./ConfigSection-DfFd-WRq.js")), He = T(() => import("./InternalsSection-t7ihcWO-.js"));
676
+ function We(s) {
681
677
  const {
682
678
  baseUrl: i = "",
683
679
  dashboardEndpoint: t = "/__stats/api",
684
- debugEndpoint: n,
680
+ debugEndpoint: o,
685
681
  authToken: a,
686
- backUrl: h = "/",
687
- channelName: c = "server-stats/dashboard"
688
- } = s, { features: r } = z({ baseUrl: i, debugEndpoint: n, authToken: a }), { theme: g, toggleTheme: p } = A(), [m, l] = N("overview"), [y, f] = N(() => typeof window > "u" ? !1 : localStorage.getItem("ss-dash-sidebar") === "collapsed"), [b, w] = N(!1), [E, _] = N(0), I = j(0);
682
+ backUrl: d = "/",
683
+ channelName: g = "server-stats/dashboard"
684
+ } = s, { features: n } = z({ baseUrl: i, debugEndpoint: o, authToken: a }), { theme: v, toggleTheme: p } = A(), [h, u] = y("overview"), [w, f] = y(() => typeof window > "u" ? !1 : localStorage.getItem("ss-dash-sidebar") === "collapsed"), [b, k] = y(!1), [E, _] = y(0), I = j(0);
689
685
  R(() => {
690
- if (!c) return;
691
- const u = ae({
686
+ if (!g) return;
687
+ const c = ie({
692
688
  baseUrl: i,
693
- channelName: c,
689
+ channelName: g,
694
690
  authToken: a,
695
691
  onMessage: () => {
696
692
  I.current += 1, _(I.current);
697
693
  },
698
- onConnect: () => w(!0),
699
- onDisconnect: () => w(!1),
700
- onError: () => w(!1)
694
+ onConnect: () => k(!0),
695
+ onDisconnect: () => k(!1),
696
+ onError: () => k(!1)
701
697
  });
702
- return () => u.unsubscribe();
703
- }, [i, c, a]);
704
- const C = r.customPanes || [], $ = B(
705
- (u) => {
706
- const S = u.replace("#", "").split("?")[0];
707
- return S && [...$e, ...C.map((V) => V.id)].includes(S) ? S : "overview";
698
+ return () => c.unsubscribe();
699
+ }, [i, g, a]);
700
+ const C = n.customPanes || [], $ = B(
701
+ (c) => {
702
+ const S = c.replace("#", "").split("?")[0];
703
+ return S && [...Ee, ...C.map((J) => J.id)].includes(S) ? S : "overview";
708
704
  },
709
705
  [C]
710
706
  );
711
707
  R(() => {
712
708
  if (typeof window > "u") return;
713
- const u = $(window.location.hash);
714
- (u !== "overview" || window.location.hash) && l(u);
709
+ const c = $(window.location.hash);
710
+ (c !== "overview" || window.location.hash) && u(c);
715
711
  }, [$]), R(() => {
716
- const u = () => {
712
+ const c = () => {
717
713
  const S = $(window.location.hash);
718
- S !== m && l(S);
714
+ S !== h && u(S);
719
715
  };
720
- return window.addEventListener("hashchange", u), () => window.removeEventListener("hashchange", u);
721
- }, [m, $]), R(() => {
722
- typeof window > "u" || (window.location.hash = m);
723
- }, [m]);
724
- const o = B(() => {
725
- f((u) => {
726
- const S = !u;
716
+ return window.addEventListener("hashchange", c), () => window.removeEventListener("hashchange", c);
717
+ }, [h, $]), R(() => {
718
+ typeof window > "u" || (window.location.hash = h);
719
+ }, [h]);
720
+ const r = B(() => {
721
+ f((c) => {
722
+ const S = !c;
727
723
  return localStorage.setItem("ss-dash-sidebar", S ? "collapsed" : "expanded"), S;
728
724
  });
729
- }, []), v = O(
725
+ }, []), m = O(
730
726
  () => [
731
727
  { id: "overview", label: "Overview", visible: !0 },
732
728
  { id: "requests", label: "Requests", visible: !0 },
@@ -735,48 +731,46 @@ function Ve(s) {
735
731
  { id: "routes", label: "Routes", visible: !0 },
736
732
  { id: "logs", label: "Logs", visible: !0 },
737
733
  { id: "emails", label: "Emails", visible: !0 },
738
- { id: "timeline", label: "Timeline", visible: r.tracing },
739
- { id: "cache", label: "Cache", visible: r.cache },
740
- { id: "jobs", label: "Jobs", visible: r.queues },
734
+ { id: "cache", label: "Cache", visible: n.cache },
735
+ { id: "jobs", label: "Jobs", visible: n.queues },
741
736
  { id: "config", label: "Config", visible: !0 },
742
737
  { id: "internals", label: "Internals", visible: !0 }
743
738
  ],
744
- [r]
745
- ), x = O(() => v.filter((u) => u.visible), [v]), k = O(
739
+ [n]
740
+ ), x = O(() => m.filter((c) => c.visible), [m]), N = O(
746
741
  () => ({ baseUrl: i, dashboardEndpoint: t, authToken: a, refreshKey: E }),
747
742
  [i, t, a, E]
748
- ), { data: D } = Ee("overview", k), P = O(() => {
743
+ ), { data: D } = Te("overview", N), q = O(() => {
749
744
  if (!D) return {};
750
- const u = {};
751
- if (D.totalRequests > 0 && (u.requests = { count: D.totalRequests }), D.queryStats?.total > 0 && (u.queries = { count: D.queryStats.total }), D.logLevelBreakdown) {
752
- const S = D.logLevelBreakdown, q = S.error + S.warn + S.info + S.debug;
753
- q > 0 && (u.logs = { count: q });
745
+ const c = {};
746
+ if (D.totalRequests > 0 && (c.requests = { count: D.totalRequests }), D.queryStats?.total > 0 && (c.queries = { count: D.queryStats.total }), D.logLevelBreakdown) {
747
+ const S = D.logLevelBreakdown, P = S.error + S.warn + S.info + S.debug;
748
+ P > 0 && (c.logs = { count: P });
754
749
  }
755
- return u;
750
+ return c;
756
751
  }, [D]), M = B(() => {
757
- const u = {
758
- overview: /* @__PURE__ */ e(xe, { options: k }),
759
- requests: /* @__PURE__ */ e(Ie, { options: k }),
760
- queries: /* @__PURE__ */ e(Be, { options: k }),
761
- events: /* @__PURE__ */ e(Me, { options: k }),
762
- routes: /* @__PURE__ */ e(Re, { options: k }),
763
- logs: /* @__PURE__ */ e(Oe, { options: k }),
764
- emails: /* @__PURE__ */ e(_e, { options: k }),
765
- timeline: /* @__PURE__ */ e(De, { options: k }),
766
- cache: /* @__PURE__ */ e(je, { options: k }),
767
- jobs: /* @__PURE__ */ e(He, { options: k }),
768
- config: /* @__PURE__ */ e(Pe, { options: k }),
769
- internals: /* @__PURE__ */ e(qe, { options: k, debugEndpoint: n })
752
+ const c = {
753
+ overview: /* @__PURE__ */ e($e, { options: N }),
754
+ requests: /* @__PURE__ */ e(xe, { options: N }),
755
+ queries: /* @__PURE__ */ e(Ie, { options: N }),
756
+ events: /* @__PURE__ */ e(Be, { options: N }),
757
+ routes: /* @__PURE__ */ e(Me, { options: N }),
758
+ logs: /* @__PURE__ */ e(Re, { options: N }),
759
+ emails: /* @__PURE__ */ e(Oe, { options: N }),
760
+ cache: /* @__PURE__ */ e(_e, { options: N }),
761
+ jobs: /* @__PURE__ */ e(De, { options: N }),
762
+ config: /* @__PURE__ */ e(je, { options: N }),
763
+ internals: /* @__PURE__ */ e(He, { options: N, debugEndpoint: o })
770
764
  };
771
- return /* @__PURE__ */ e("div", { className: "ss-dash-pane ss-dash-active", id: `ss-dash-pane-${m}`, children: /* @__PURE__ */ e("div", { className: "ss-dash-pane-inner", children: /* @__PURE__ */ e(F, { fallback: /* @__PURE__ */ e("div", { className: "ss-dash-empty", children: "Loading..." }), children: u[m] || /* @__PURE__ */ e("div", { className: "ss-dash-empty", children: "Unknown section" }) }) }) });
772
- }, [m, k]);
773
- return /* @__PURE__ */ d("div", { className: "ss-dash", "data-theme": g, id: "ss-dash", children: [
774
- /* @__PURE__ */ d("div", { className: "ss-dash-header", children: [
775
- /* @__PURE__ */ d("div", { className: "ss-dash-header-left", children: [
765
+ return /* @__PURE__ */ e("div", { className: "ss-dash-pane ss-dash-active", id: `ss-dash-pane-${h}`, children: /* @__PURE__ */ e("div", { className: "ss-dash-pane-inner", children: /* @__PURE__ */ e(F, { fallback: /* @__PURE__ */ e("div", { className: "ss-dash-empty", children: "Loading..." }), children: c[h] || /* @__PURE__ */ e("div", { className: "ss-dash-empty", children: "Unknown section" }) }) }) });
766
+ }, [h, N]);
767
+ return /* @__PURE__ */ l("div", { className: "ss-dash", "data-theme": v, id: "ss-dash", children: [
768
+ /* @__PURE__ */ l("div", { className: "ss-dash-header", children: [
769
+ /* @__PURE__ */ l("div", { className: "ss-dash-header-left", children: [
776
770
  /* @__PURE__ */ e("span", { className: "ss-dash-logo", children: "Server Stats" }),
777
771
  /* @__PURE__ */ e("span", { className: "ss-dash-logo-sub", children: "Dashboard" })
778
772
  ] }),
779
- /* @__PURE__ */ d("div", { className: "ss-dash-header-center", children: [
773
+ /* @__PURE__ */ l("div", { className: "ss-dash-header-center", children: [
780
774
  /* @__PURE__ */ e(
781
775
  "span",
782
776
  {
@@ -793,49 +787,49 @@ function Ve(s) {
793
787
  }
794
788
  )
795
789
  ] }),
796
- /* @__PURE__ */ d("div", { className: "ss-dash-header-right", children: [
797
- /* @__PURE__ */ e(J, { theme: g, onToggle: p }),
798
- h && /* @__PURE__ */ e("a", { href: h, className: "ss-dash-back-link", title: "Back to app", children: "← App" })
790
+ /* @__PURE__ */ l("div", { className: "ss-dash-header-right", children: [
791
+ /* @__PURE__ */ e(W, { theme: v, onToggle: p }),
792
+ d && /* @__PURE__ */ e("a", { href: d, className: "ss-dash-back-link", title: "Back to app", children: "← App" })
799
793
  ] })
800
794
  ] }),
801
- /* @__PURE__ */ d("div", { className: "ss-dash-body", children: [
802
- /* @__PURE__ */ d(
795
+ /* @__PURE__ */ l("div", { className: "ss-dash-body", children: [
796
+ /* @__PURE__ */ l(
803
797
  "div",
804
798
  {
805
- className: `ss-dash-sidebar ${y ? "ss-dash-collapsed" : ""}`,
799
+ className: `ss-dash-sidebar ${w ? "ss-dash-collapsed" : ""}`,
806
800
  id: "ss-dash-sidebar",
807
801
  children: [
808
- /* @__PURE__ */ d("nav", { className: "ss-dash-nav", children: [
809
- x.map((u) => {
810
- const S = P[u.id];
811
- return /* @__PURE__ */ d(
802
+ /* @__PURE__ */ l("nav", { className: "ss-dash-nav", children: [
803
+ x.map((c) => {
804
+ const S = q[c.id];
805
+ return /* @__PURE__ */ l(
812
806
  "button",
813
807
  {
814
808
  type: "button",
815
- className: `ss-dash-nav-item ${m === u.id ? "ss-dash-active" : ""}`,
816
- "data-ss-section": u.id,
809
+ className: `ss-dash-nav-item ${h === c.id ? "ss-dash-active" : ""}`,
810
+ "data-ss-section": c.id,
817
811
  onClick: () => {
818
- u.id !== m && l(u.id);
812
+ c.id !== h && u(c.id);
819
813
  },
820
- title: y ? u.label : void 0,
814
+ title: w ? c.label : void 0,
821
815
  children: [
822
816
  /* @__PURE__ */ e("span", { className: "ss-dash-nav-icon", children: /* @__PURE__ */ e(
823
817
  "svg",
824
818
  {
825
819
  width: "20",
826
820
  height: "20",
827
- viewBox: (L[W(u.id)] || L.config).viewBox,
821
+ viewBox: (L[c.id] || L.config).viewBox,
828
822
  fill: "none",
829
823
  stroke: "currentColor",
830
824
  strokeWidth: "2",
831
825
  strokeLinecap: "round",
832
826
  strokeLinejoin: "round",
833
827
  dangerouslySetInnerHTML: {
834
- __html: (L[W(u.id)] || L.config).elements.join("")
828
+ __html: (L[c.id] || L.config).elements.join("")
835
829
  }
836
830
  }
837
831
  ) }),
838
- /* @__PURE__ */ e("span", { className: "ss-dash-nav-label", children: u.label }),
832
+ /* @__PURE__ */ e("span", { className: "ss-dash-nav-label", children: c.label }),
839
833
  S && S.count > 0 && /* @__PURE__ */ e(
840
834
  "span",
841
835
  {
@@ -845,17 +839,17 @@ function Ve(s) {
845
839
  )
846
840
  ]
847
841
  },
848
- u.id
842
+ c.id
849
843
  );
850
844
  }),
851
845
  C.length > 0 && /* @__PURE__ */ e("div", { className: "ss-dash-nav-sep" }),
852
- C.map((u) => /* @__PURE__ */ d(
846
+ C.map((c) => /* @__PURE__ */ l(
853
847
  "button",
854
848
  {
855
849
  type: "button",
856
- className: `ss-dash-nav-item ${m === u.id ? "ss-dash-active" : ""}`,
857
- onClick: () => l(u.id),
858
- title: y ? u.label : void 0,
850
+ className: `ss-dash-nav-item ${h === c.id ? "ss-dash-active" : ""}`,
851
+ onClick: () => u(c.id),
852
+ title: w ? c.label : void 0,
859
853
  children: [
860
854
  /* @__PURE__ */ e("span", { className: "ss-dash-nav-icon", children: /* @__PURE__ */ e(
861
855
  "svg",
@@ -871,10 +865,10 @@ function Ve(s) {
871
865
  dangerouslySetInnerHTML: { __html: L["custom-pane"].elements.join("") }
872
866
  }
873
867
  ) }),
874
- /* @__PURE__ */ e("span", { className: "ss-dash-nav-label", children: u.label })
868
+ /* @__PURE__ */ e("span", { className: "ss-dash-nav-label", children: c.label })
875
869
  ]
876
870
  },
877
- u.id
871
+ c.id
878
872
  ))
879
873
  ] }),
880
874
  /* @__PURE__ */ e(
@@ -883,9 +877,9 @@ function Ve(s) {
883
877
  type: "button",
884
878
  className: "ss-dash-sidebar-toggle",
885
879
  id: "ss-dash-sidebar-toggle",
886
- onClick: o,
887
- title: y ? "Expand sidebar" : "Collapse sidebar",
888
- children: y ? /* @__PURE__ */ e(
880
+ onClick: r,
881
+ title: w ? "Expand sidebar" : "Collapse sidebar",
882
+ children: w ? /* @__PURE__ */ e(
889
883
  "svg",
890
884
  {
891
885
  width: "16",
@@ -917,38 +911,38 @@ function Ve(s) {
917
911
  ] })
918
912
  ] });
919
913
  }
920
- function Ke(s, i = {}) {
921
- const { baseUrl: t = "", debugEndpoint: n = "/admin/api/debug", authToken: a } = i, [h, c] = N(null), [r, g] = N(!0), [p, m] = N(null), l = j(null);
922
- l.current || (l.current = new le({
914
+ function Je(s, i = {}) {
915
+ const { baseUrl: t = "", debugEndpoint: o = "/admin/api/debug", authToken: a } = i, [d, g] = y(null), [n, v] = y(!0), [p, h] = y(null), u = j(null);
916
+ u.current || (u.current = new ae({
923
917
  baseUrl: t,
924
- endpoint: n,
918
+ endpoint: o,
925
919
  authToken: a,
926
- onData: (w) => c(w),
927
- onLoading: (w) => g(w),
928
- onError: (w) => m(w),
929
- onUnauthorized: (w) => m(w)
920
+ onData: (k) => g(k),
921
+ onLoading: (k) => v(k),
922
+ onError: (k) => h(k),
923
+ onUnauthorized: (k) => h(k)
930
924
  })), R(() => {
931
- const w = l.current;
932
- return w.start(s), () => w.stop();
925
+ const k = u.current;
926
+ return k.start(s), () => k.stop();
933
927
  }, [s]);
934
- const y = B(() => {
935
- l.current?.refresh();
928
+ const w = B(() => {
929
+ u.current?.refresh();
936
930
  }, []), f = B(() => {
937
- c(null);
938
- }, []), b = B((w, E) => {
939
- l.current?.cacheForTab(w, E);
931
+ g(null);
932
+ }, []), b = B((k, E) => {
933
+ u.current?.cacheForTab(k, E);
940
934
  }, []);
941
- return { data: h, isLoading: r, error: p, refresh: y, clearData: f, cacheForTab: b };
935
+ return { data: d, isLoading: n, error: p, refresh: w, clearData: f, cacheForTab: b };
942
936
  }
943
- function Ge({
937
+ function Ve({
944
938
  color: s = "muted",
945
939
  children: i,
946
940
  className: t = "",
947
- classPrefix: n = "ss-dash"
941
+ classPrefix: o = "ss-dash"
948
942
  }) {
949
- return /* @__PURE__ */ e("span", { className: `${n}-badge ${n}-badge-${s} ${t}`, children: i });
943
+ return /* @__PURE__ */ e("span", { className: `${o}-badge ${o}-badge-${s} ${t}`, children: i });
950
944
  }
951
- function Qe({ method: s, className: i = "", classPrefix: t = "ss-dash" }) {
945
+ function Ke({ method: s, className: i = "", classPrefix: t = "ss-dash" }) {
952
946
  return /* @__PURE__ */ e(
953
947
  "span",
954
948
  {
@@ -957,17 +951,18 @@ function Qe({ method: s, className: i = "", classPrefix: t = "ss-dash" }) {
957
951
  }
958
952
  );
959
953
  }
960
- function Xe({ code: s, className: i = "", classPrefix: t = "ss-dash" }) {
961
- let n = `${t}-status-2xx`;
962
- return s >= 500 ? n = `${t}-status-5xx` : s >= 400 ? n = `${t}-status-4xx` : s >= 300 && (n = `${t}-status-3xx`), /* @__PURE__ */ e("span", { className: `${t}-status ${n} ${i}`, children: s });
954
+ function Ge({ code: s, className: i = "", classPrefix: t = "ss-dash" }) {
955
+ let o = `${t}-status-2xx`;
956
+ return s >= 500 ? o = `${t}-status-5xx` : s >= 400 ? o = `${t}-status-4xx` : s >= 300 && (o = `${t}-status-3xx`), /* @__PURE__ */ e("span", { className: `${t}-status ${o} ${i}`, children: s });
963
957
  }
964
- function Ye({
958
+ function Qe({
965
959
  data: s,
966
960
  maxPreviewLength: i = 100,
967
961
  className: t = "",
968
- classPrefix: n = "ss-dash"
962
+ classPrefix: o = "ss-dash",
963
+ defaultExpanded: a = !1
969
964
  }) {
970
- const [a, h] = N(!1), c = O(() => {
965
+ const [d, g] = y(a), n = O(() => {
971
966
  if (typeof s == "string")
972
967
  try {
973
968
  return JSON.parse(s);
@@ -975,73 +970,73 @@ function Ye({
975
970
  return s;
976
971
  }
977
972
  return s;
978
- }, [s]), r = O(() => typeof c == "object" && c !== null ? ce(c, i) : String(c ?? "-"), [c, i]), g = O(() => typeof c == "object" && c !== null ? JSON.stringify(c, null, 2) : String(c), [c]), p = B(() => {
979
- h((l) => !l);
980
- }, []), m = B(async () => {
973
+ }, [s]), v = O(() => typeof n == "object" && n !== null ? le(n, i) : String(n ?? "-"), [n, i]), p = O(() => typeof n == "object" && n !== null ? JSON.stringify(n, null, 2) : String(n), [n]), h = B(() => {
974
+ g((w) => !w);
975
+ }, []), u = B(async () => {
981
976
  try {
982
- await navigator.clipboard.writeText(g);
977
+ await navigator.clipboard.writeText(p);
983
978
  } catch {
984
979
  }
985
- }, [g]);
986
- return !s && s !== 0 && s !== !1 ? /* @__PURE__ */ e("span", { className: `ss-dim ${n}-c-dim`, children: "-" }) : /* @__PURE__ */ d("div", { className: `${n}-data-cell ${t}`, children: [
987
- /* @__PURE__ */ e(
980
+ }, [p]);
981
+ return !s && s !== 0 && s !== !1 ? /* @__PURE__ */ e("span", { className: `ss-dim ${o}-c-dim`, children: "-" }) : /* @__PURE__ */ l("div", { className: `${o}-data-cell ${t}`, children: [
982
+ !d && /* @__PURE__ */ e(
988
983
  "span",
989
984
  {
990
- className: `${n}-data-preview`,
991
- onClick: p,
985
+ className: `${o}-data-preview`,
986
+ onClick: h,
992
987
  role: "button",
993
988
  tabIndex: 0,
994
- onKeyDown: (l) => l.key === "Enter" && p(),
995
- children: r
989
+ onKeyDown: (w) => w.key === "Enter" && h(),
990
+ children: v
996
991
  }
997
992
  ),
998
- a && /* @__PURE__ */ d("div", { className: `${n}-data-full`, onClick: p, children: [
993
+ d && /* @__PURE__ */ l("div", { className: `${o}-data-full`, onClick: h, children: [
999
994
  /* @__PURE__ */ e(
1000
995
  "button",
1001
996
  {
1002
- className: `${n}-copy-btn`,
1003
- onClick: (l) => {
1004
- l.stopPropagation(), m();
997
+ className: `${o}-copy-btn`,
998
+ onClick: (w) => {
999
+ w.stopPropagation(), u();
1005
1000
  },
1006
1001
  title: "Copy to clipboard",
1007
1002
  type: "button",
1008
1003
  children: "Copy"
1009
1004
  }
1010
1005
  ),
1011
- /* @__PURE__ */ e("pre", { children: g })
1006
+ /* @__PURE__ */ e("pre", { children: p })
1012
1007
  ] })
1013
1008
  ] });
1014
1009
  }
1015
- function Ze({ content: s, children: i, position: t = "top", className: n = "" }) {
1016
- const [a, h] = N(!1), [c, r] = N({ left: 0, bottom: 0 }), g = j(null), p = j(null), m = B(() => {
1017
- h(!0);
1018
- }, []), l = B(() => {
1019
- h(!1);
1010
+ function Xe({ content: s, children: i, position: t = "top", className: o = "" }) {
1011
+ const [a, d] = y(!1), [g, n] = y({ left: 0, bottom: 0 }), v = j(null), p = j(null), h = B(() => {
1012
+ d(!0);
1013
+ }, []), u = B(() => {
1014
+ d(!1);
1020
1015
  }, []);
1021
1016
  return R(() => {
1022
- if (!a || !g.current || !p.current) return;
1023
- const y = g.current.getBoundingClientRect(), f = p.current.getBoundingClientRect();
1024
- let b = y.left + y.width / 2 - f.width / 2, w;
1025
- b < 8 && (b = 8), b + f.width > window.innerWidth - 8 && (b = window.innerWidth - 8 - f.width), t === "top" && (w = window.innerHeight - y.top + 8), r({ left: b, bottom: w ?? 0 });
1026
- }, [a, t]), /* @__PURE__ */ d(
1017
+ if (!a || !v.current || !p.current) return;
1018
+ const w = v.current.getBoundingClientRect(), f = p.current.getBoundingClientRect();
1019
+ let b = w.left + w.width / 2 - f.width / 2, k;
1020
+ b < 8 && (b = 8), b + f.width > window.innerWidth - 8 && (b = window.innerWidth - 8 - f.width), t === "top" && (k = window.innerHeight - w.top + 8), n({ left: b, bottom: k ?? 0 });
1021
+ }, [a, t]), /* @__PURE__ */ l(
1027
1022
  "div",
1028
1023
  {
1029
- ref: g,
1030
- className: `ss-tooltip-trigger ${n}`,
1031
- onMouseEnter: m,
1032
- onMouseLeave: l,
1024
+ ref: v,
1025
+ className: `ss-tooltip-trigger ${o}`,
1026
+ onMouseEnter: h,
1027
+ onMouseLeave: u,
1033
1028
  style: { display: "inline-flex", position: "relative" },
1034
1029
  children: [
1035
1030
  i,
1036
- a && /* @__PURE__ */ d(
1031
+ a && /* @__PURE__ */ l(
1037
1032
  "div",
1038
1033
  {
1039
1034
  ref: p,
1040
1035
  className: "ss-tooltip",
1041
1036
  style: {
1042
1037
  position: "fixed",
1043
- left: `${c.left}px`,
1044
- bottom: t === "top" ? `${c.bottom}px` : void 0,
1038
+ left: `${g.left}px`,
1039
+ bottom: t === "top" ? `${g.bottom}px` : void 0,
1045
1040
  zIndex: 200,
1046
1041
  pointerEvents: "none"
1047
1042
  },
@@ -1056,19 +1051,19 @@ function Ze({ content: s, children: i, position: t = "top", className: n = "" })
1056
1051
  );
1057
1052
  }
1058
1053
  export {
1059
- Ge as B,
1060
- Ve as D,
1061
- Ye as J,
1062
- Qe as M,
1063
- he as S,
1064
- J as T,
1065
- Ee as a,
1066
- Xe as b,
1067
- Je as c,
1068
- We as d,
1069
- Ze as e,
1054
+ Ve as B,
1055
+ We as D,
1056
+ Qe as J,
1057
+ Ke as M,
1058
+ ue as S,
1059
+ W as T,
1060
+ Te as a,
1061
+ Ge as b,
1062
+ Ae as c,
1063
+ ze as d,
1064
+ Xe as e,
1070
1065
  z as f,
1071
- ue as g,
1066
+ de as g,
1072
1067
  A as h,
1073
- Ke as u
1068
+ Je as u
1074
1069
  };