@devqubit/ui 0.1.11 → 0.1.12

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/dist/index.js CHANGED
@@ -1,106 +1,106 @@
1
- import ks, { useState as T, useEffect as je, useContext as Ss, useCallback as _e, createContext as Ps, useRef as _s, forwardRef as Xe } from "react";
2
- import { useLocation as ur, Link as z, useSearchParams as $e, useParams as Qe, useNavigate as hr, Navigate as xr, createBrowserRouter as mr, RouterProvider as fr } from "react-router-dom";
3
- var Fe = { exports: {} }, be = {};
4
- var ws;
5
- function jr() {
6
- if (ws) return be;
7
- ws = 1;
8
- var r = ks, t = /* @__PURE__ */ Symbol.for("react.element"), n = /* @__PURE__ */ Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, u = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
9
- function d(i, f, h) {
10
- var m, p = {}, _ = null, U = null;
11
- h !== void 0 && (_ = "" + h), f.key !== void 0 && (_ = "" + f.key), f.ref !== void 0 && (U = f.ref);
12
- for (m in f) a.call(f, m) && !o.hasOwnProperty(m) && (p[m] = f[m]);
13
- if (i && i.defaultProps) for (m in f = i.defaultProps, f) p[m] === void 0 && (p[m] = f[m]);
14
- return { $$typeof: t, type: i, key: _, ref: U, props: p, _owner: u.current };
1
+ import Bt, { useContext as dt, createContext as ut, useState as T, useEffect as de, useCallback as me, useRef as De, forwardRef as ht, useMemo as ke } from "react";
2
+ import { useLocation as Rs, Link as se, useSearchParams as He, useParams as xt, useNavigate as Es, Navigate as ks, createBrowserRouter as Cs, RouterProvider as Ts } from "react-router-dom";
3
+ var Ge = { exports: {} }, Te = {};
4
+ var Ft;
5
+ function Ss() {
6
+ if (Ft) return Te;
7
+ Ft = 1;
8
+ var t = Bt, s = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, l = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
9
+ function c(i, u, h) {
10
+ var m, p = {}, b = null, D = null;
11
+ h !== void 0 && (b = "" + h), u.key !== void 0 && (b = "" + u.key), u.ref !== void 0 && (D = u.ref);
12
+ for (m in u) n.call(u, m) && !o.hasOwnProperty(m) && (p[m] = u[m]);
13
+ if (i && i.defaultProps) for (m in u = i.defaultProps, u) p[m] === void 0 && (p[m] = u[m]);
14
+ return { $$typeof: s, type: i, key: b, ref: D, props: p, _owner: l.current };
15
15
  }
16
- return be.Fragment = n, be.jsx = d, be.jsxs = d, be;
17
- }
18
- var ye = {};
19
- var Rs;
20
- function pr() {
21
- return Rs || (Rs = 1, process.env.NODE_ENV !== "production" && (function() {
22
- var r = ks, t = /* @__PURE__ */ Symbol.for("react.element"), n = /* @__PURE__ */ Symbol.for("react.portal"), a = /* @__PURE__ */ Symbol.for("react.fragment"), u = /* @__PURE__ */ Symbol.for("react.strict_mode"), o = /* @__PURE__ */ Symbol.for("react.profiler"), d = /* @__PURE__ */ Symbol.for("react.provider"), i = /* @__PURE__ */ Symbol.for("react.context"), f = /* @__PURE__ */ Symbol.for("react.forward_ref"), h = /* @__PURE__ */ Symbol.for("react.suspense"), m = /* @__PURE__ */ Symbol.for("react.suspense_list"), p = /* @__PURE__ */ Symbol.for("react.memo"), _ = /* @__PURE__ */ Symbol.for("react.lazy"), U = /* @__PURE__ */ Symbol.for("react.offscreen"), w = Symbol.iterator, H = "@@iterator";
23
- function k(s) {
24
- if (s === null || typeof s != "object")
16
+ return Te.Fragment = a, Te.jsx = c, Te.jsxs = c, Te;
17
+ }
18
+ var Se = {};
19
+ var $t;
20
+ function Ps() {
21
+ return $t || ($t = 1, process.env.NODE_ENV !== "production" && (function() {
22
+ var t = Bt, s = /* @__PURE__ */ Symbol.for("react.element"), a = /* @__PURE__ */ Symbol.for("react.portal"), n = /* @__PURE__ */ Symbol.for("react.fragment"), l = /* @__PURE__ */ Symbol.for("react.strict_mode"), o = /* @__PURE__ */ Symbol.for("react.profiler"), c = /* @__PURE__ */ Symbol.for("react.provider"), i = /* @__PURE__ */ Symbol.for("react.context"), u = /* @__PURE__ */ Symbol.for("react.forward_ref"), h = /* @__PURE__ */ Symbol.for("react.suspense"), m = /* @__PURE__ */ Symbol.for("react.suspense_list"), p = /* @__PURE__ */ Symbol.for("react.memo"), b = /* @__PURE__ */ Symbol.for("react.lazy"), D = /* @__PURE__ */ Symbol.for("react.offscreen"), g = Symbol.iterator, I = "@@iterator";
23
+ function E(r) {
24
+ if (r === null || typeof r != "object")
25
25
  return null;
26
- var l = w && s[w] || s[H];
27
- return typeof l == "function" ? l : null;
26
+ var x = g && r[g] || r[I];
27
+ return typeof x == "function" ? x : null;
28
28
  }
29
- var O = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
30
- function S(s) {
29
+ var A = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
30
+ function S(r) {
31
31
  {
32
- for (var l = arguments.length, x = new Array(l > 1 ? l - 1 : 0), g = 1; g < l; g++)
33
- x[g - 1] = arguments[g];
34
- se("error", s, x);
32
+ for (var x = arguments.length, f = new Array(x > 1 ? x - 1 : 0), v = 1; v < x; v++)
33
+ f[v - 1] = arguments[v];
34
+ ie("error", r, f);
35
35
  }
36
36
  }
37
- function se(s, l, x) {
37
+ function ie(r, x, f) {
38
38
  {
39
- var g = O.ReactDebugCurrentFrame, E = g.getStackAddendum();
40
- E !== "" && (l += "%s", x = x.concat([E]));
41
- var C = x.map(function(R) {
39
+ var v = A.ReactDebugCurrentFrame, k = v.getStackAddendum();
40
+ k !== "" && (x += "%s", f = f.concat([k]));
41
+ var P = f.map(function(R) {
42
42
  return String(R);
43
43
  });
44
- C.unshift("Warning: " + l), Function.prototype.apply.call(console[s], console, C);
44
+ P.unshift("Warning: " + x), Function.prototype.apply.call(console[r], console, P);
45
45
  }
46
46
  }
47
- var te = !1, J = !1, Z = !1, ne = !1, xe = !1, pe;
48
- pe = /* @__PURE__ */ Symbol.for("react.module.reference");
49
- function Be(s) {
50
- return !!(typeof s == "string" || typeof s == "function" || s === a || s === o || xe || s === u || s === h || s === m || ne || s === U || te || J || Z || typeof s == "object" && s !== null && (s.$$typeof === _ || s.$$typeof === p || s.$$typeof === d || s.$$typeof === i || s.$$typeof === f || // This needs to include all possible module reference object
47
+ var ce = !1, Z = !1, J = !1, y = !1, W = !1, ue;
48
+ ue = /* @__PURE__ */ Symbol.for("react.module.reference");
49
+ function V(r) {
50
+ return !!(typeof r == "string" || typeof r == "function" || r === n || r === o || W || r === l || r === h || r === m || y || r === D || ce || Z || J || typeof r == "object" && r !== null && (r.$$typeof === b || r.$$typeof === p || r.$$typeof === c || r.$$typeof === i || r.$$typeof === u || // This needs to include all possible module reference object
51
51
  // types supported by any Flight configuration anywhere since
52
52
  // we don't know which Flight build this will end up being used
53
53
  // with.
54
- s.$$typeof === pe || s.getModuleId !== void 0));
54
+ r.$$typeof === ue || r.getModuleId !== void 0));
55
55
  }
56
- function Ie(s, l, x) {
57
- var g = s.displayName;
58
- if (g)
59
- return g;
60
- var E = l.displayName || l.name || "";
61
- return E !== "" ? x + "(" + E + ")" : x;
56
+ function ee(r, x, f) {
57
+ var v = r.displayName;
58
+ if (v)
59
+ return v;
60
+ var k = x.displayName || x.name || "";
61
+ return k !== "" ? f + "(" + k + ")" : f;
62
62
  }
63
- function ke(s) {
64
- return s.displayName || "Context";
63
+ function je(r) {
64
+ return r.displayName || "Context";
65
65
  }
66
- function y(s) {
67
- if (s == null)
66
+ function ne(r) {
67
+ if (r == null)
68
68
  return null;
69
- if (typeof s.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
70
- return s.displayName || s.name || null;
71
- if (typeof s == "string")
72
- return s;
73
- switch (s) {
74
- case a:
75
- return "Fragment";
69
+ if (typeof r.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
70
+ return r.displayName || r.name || null;
71
+ if (typeof r == "string")
72
+ return r;
73
+ switch (r) {
76
74
  case n:
75
+ return "Fragment";
76
+ case a:
77
77
  return "Portal";
78
78
  case o:
79
79
  return "Profiler";
80
- case u:
80
+ case l:
81
81
  return "StrictMode";
82
82
  case h:
83
83
  return "Suspense";
84
84
  case m:
85
85
  return "SuspenseList";
86
86
  }
87
- if (typeof s == "object")
88
- switch (s.$$typeof) {
87
+ if (typeof r == "object")
88
+ switch (r.$$typeof) {
89
89
  case i:
90
- var l = s;
91
- return ke(l) + ".Consumer";
92
- case d:
93
- var x = s;
94
- return ke(x._context) + ".Provider";
95
- case f:
96
- return Ie(s, s.render, "ForwardRef");
90
+ var x = r;
91
+ return je(x) + ".Consumer";
92
+ case c:
93
+ var f = r;
94
+ return je(f._context) + ".Provider";
95
+ case u:
96
+ return ee(r, r.render, "ForwardRef");
97
97
  case p:
98
- var g = s.displayName || null;
99
- return g !== null ? g : y(s.type) || "Memo";
100
- case _: {
101
- var E = s, C = E._payload, R = E._init;
98
+ var v = r.displayName || null;
99
+ return v !== null ? v : ne(r.type) || "Memo";
100
+ case b: {
101
+ var k = r, P = k._payload, R = k._init;
102
102
  try {
103
- return y(R(C));
103
+ return ne(R(P));
104
104
  } catch {
105
105
  return null;
106
106
  }
@@ -108,103 +108,103 @@ function pr() {
108
108
  }
109
109
  return null;
110
110
  }
111
- var P = Object.assign, ce = 0, ge, Se, le, ts, ns, as, is;
112
- function cs() {
111
+ var te = Object.assign, le = 0, C, L, pe, he, Le, ye, qe;
112
+ function gt() {
113
113
  }
114
- cs.__reactDisabledLog = !0;
115
- function Bs() {
114
+ gt.__reactDisabledLog = !0;
115
+ function Qt() {
116
116
  {
117
- if (ce === 0) {
118
- ge = console.log, Se = console.info, le = console.warn, ts = console.error, ns = console.group, as = console.groupCollapsed, is = console.groupEnd;
119
- var s = {
117
+ if (le === 0) {
118
+ C = console.log, L = console.info, pe = console.warn, he = console.error, Le = console.group, ye = console.groupCollapsed, qe = console.groupEnd;
119
+ var r = {
120
120
  configurable: !0,
121
121
  enumerable: !0,
122
- value: cs,
122
+ value: gt,
123
123
  writable: !0
124
124
  };
125
125
  Object.defineProperties(console, {
126
- info: s,
127
- log: s,
128
- warn: s,
129
- error: s,
130
- group: s,
131
- groupCollapsed: s,
132
- groupEnd: s
126
+ info: r,
127
+ log: r,
128
+ warn: r,
129
+ error: r,
130
+ group: r,
131
+ groupCollapsed: r,
132
+ groupEnd: r
133
133
  });
134
134
  }
135
- ce++;
135
+ le++;
136
136
  }
137
137
  }
138
- function Is() {
138
+ function Zt() {
139
139
  {
140
- if (ce--, ce === 0) {
141
- var s = {
140
+ if (le--, le === 0) {
141
+ var r = {
142
142
  configurable: !0,
143
143
  enumerable: !0,
144
144
  writable: !0
145
145
  };
146
146
  Object.defineProperties(console, {
147
- log: P({}, s, {
148
- value: ge
147
+ log: te({}, r, {
148
+ value: C
149
149
  }),
150
- info: P({}, s, {
151
- value: Se
150
+ info: te({}, r, {
151
+ value: L
152
152
  }),
153
- warn: P({}, s, {
154
- value: le
153
+ warn: te({}, r, {
154
+ value: pe
155
155
  }),
156
- error: P({}, s, {
157
- value: ts
156
+ error: te({}, r, {
157
+ value: he
158
158
  }),
159
- group: P({}, s, {
160
- value: ns
159
+ group: te({}, r, {
160
+ value: Le
161
161
  }),
162
- groupCollapsed: P({}, s, {
163
- value: as
162
+ groupCollapsed: te({}, r, {
163
+ value: ye
164
164
  }),
165
- groupEnd: P({}, s, {
166
- value: is
165
+ groupEnd: te({}, r, {
166
+ value: qe
167
167
  })
168
168
  });
169
169
  }
170
- ce < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
170
+ le < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
171
171
  }
172
172
  }
173
- var qe = O.ReactCurrentDispatcher, Ue;
174
- function Pe(s, l, x) {
173
+ var Je = A.ReactCurrentDispatcher, Xe;
174
+ function Ie(r, x, f) {
175
175
  {
176
- if (Ue === void 0)
176
+ if (Xe === void 0)
177
177
  try {
178
178
  throw Error();
179
- } catch (E) {
180
- var g = E.stack.trim().match(/\n( *(at )?)/);
181
- Ue = g && g[1] || "";
179
+ } catch (k) {
180
+ var v = k.stack.trim().match(/\n( *(at )?)/);
181
+ Xe = v && v[1] || "";
182
182
  }
183
183
  return `
184
- ` + Ue + s;
184
+ ` + Xe + r;
185
185
  }
186
186
  }
187
- var Me = !1, Te;
187
+ var Qe = !1, Be;
188
188
  {
189
- var qs = typeof WeakMap == "function" ? WeakMap : Map;
190
- Te = new qs();
189
+ var es = typeof WeakMap == "function" ? WeakMap : Map;
190
+ Be = new es();
191
191
  }
192
- function ls(s, l) {
193
- if (!s || Me)
192
+ function vt(r, x) {
193
+ if (!r || Qe)
194
194
  return "";
195
195
  {
196
- var x = Te.get(s);
197
- if (x !== void 0)
198
- return x;
196
+ var f = Be.get(r);
197
+ if (f !== void 0)
198
+ return f;
199
199
  }
200
- var g;
201
- Me = !0;
202
- var E = Error.prepareStackTrace;
200
+ var v;
201
+ Qe = !0;
202
+ var k = Error.prepareStackTrace;
203
203
  Error.prepareStackTrace = void 0;
204
- var C;
205
- C = qe.current, qe.current = null, Bs();
204
+ var P;
205
+ P = Je.current, Je.current = null, Qt();
206
206
  try {
207
- if (l) {
207
+ if (x) {
208
208
  var R = function() {
209
209
  throw Error();
210
210
  };
@@ -215,434 +215,436 @@ function pr() {
215
215
  }), typeof Reflect == "object" && Reflect.construct) {
216
216
  try {
217
217
  Reflect.construct(R, []);
218
- } catch (M) {
219
- g = M;
218
+ } catch (X) {
219
+ v = X;
220
220
  }
221
- Reflect.construct(s, [], R);
221
+ Reflect.construct(r, [], R);
222
222
  } else {
223
223
  try {
224
224
  R.call();
225
- } catch (M) {
226
- g = M;
225
+ } catch (X) {
226
+ v = X;
227
227
  }
228
- s.call(R.prototype);
228
+ r.call(R.prototype);
229
229
  }
230
230
  } else {
231
231
  try {
232
232
  throw Error();
233
- } catch (M) {
234
- g = M;
233
+ } catch (X) {
234
+ v = X;
235
235
  }
236
- s();
236
+ r();
237
237
  }
238
- } catch (M) {
239
- if (M && g && typeof M.stack == "string") {
240
- for (var v = M.stack.split(`
241
- `), q = g.stack.split(`
242
- `), A = v.length - 1, F = q.length - 1; A >= 1 && F >= 0 && v[A] !== q[F]; )
243
- F--;
244
- for (; A >= 1 && F >= 0; A--, F--)
245
- if (v[A] !== q[F]) {
246
- if (A !== 1 || F !== 1)
238
+ } catch (X) {
239
+ if (X && v && typeof X.stack == "string") {
240
+ for (var _ = X.stack.split(`
241
+ `), z = v.stack.split(`
242
+ `), O = _.length - 1, M = z.length - 1; O >= 1 && M >= 0 && _[O] !== z[M]; )
243
+ M--;
244
+ for (; O >= 1 && M >= 0; O--, M--)
245
+ if (_[O] !== z[M]) {
246
+ if (O !== 1 || M !== 1)
247
247
  do
248
- if (A--, F--, F < 0 || v[A] !== q[F]) {
249
- var X = `
250
- ` + v[A].replace(" at new ", " at ");
251
- return s.displayName && X.includes("<anonymous>") && (X = X.replace("<anonymous>", s.displayName)), typeof s == "function" && Te.set(s, X), X;
248
+ if (O--, M--, M < 0 || _[O] !== z[M]) {
249
+ var ae = `
250
+ ` + _[O].replace(" at new ", " at ");
251
+ return r.displayName && ae.includes("<anonymous>") && (ae = ae.replace("<anonymous>", r.displayName)), typeof r == "function" && Be.set(r, ae), ae;
252
252
  }
253
- while (A >= 1 && F >= 0);
253
+ while (O >= 1 && M >= 0);
254
254
  break;
255
255
  }
256
256
  }
257
257
  } finally {
258
- Me = !1, qe.current = C, Is(), Error.prepareStackTrace = E;
258
+ Qe = !1, Je.current = P, Zt(), Error.prepareStackTrace = k;
259
259
  }
260
- var fe = s ? s.displayName || s.name : "", oe = fe ? Pe(fe) : "";
261
- return typeof s == "function" && Te.set(s, oe), oe;
260
+ var Ee = r ? r.displayName || r.name : "", Ne = Ee ? Ie(Ee) : "";
261
+ return typeof r == "function" && Be.set(r, Ne), Ne;
262
262
  }
263
- function Us(s, l, x) {
264
- return ls(s, !1);
263
+ function ts(r, x, f) {
264
+ return vt(r, !1);
265
265
  }
266
- function Ms(s) {
267
- var l = s.prototype;
268
- return !!(l && l.isReactComponent);
266
+ function ss(r) {
267
+ var x = r.prototype;
268
+ return !!(x && x.isReactComponent);
269
269
  }
270
- function De(s, l, x) {
271
- if (s == null)
270
+ function Ue(r, x, f) {
271
+ if (r == null)
272
272
  return "";
273
- if (typeof s == "function")
274
- return ls(s, Ms(s));
275
- if (typeof s == "string")
276
- return Pe(s);
277
- switch (s) {
273
+ if (typeof r == "function")
274
+ return vt(r, ss(r));
275
+ if (typeof r == "string")
276
+ return Ie(r);
277
+ switch (r) {
278
278
  case h:
279
- return Pe("Suspense");
279
+ return Ie("Suspense");
280
280
  case m:
281
- return Pe("SuspenseList");
281
+ return Ie("SuspenseList");
282
282
  }
283
- if (typeof s == "object")
284
- switch (s.$$typeof) {
285
- case f:
286
- return Us(s.render);
283
+ if (typeof r == "object")
284
+ switch (r.$$typeof) {
285
+ case u:
286
+ return ts(r.render);
287
287
  case p:
288
- return De(s.type, l, x);
289
- case _: {
290
- var g = s, E = g._payload, C = g._init;
288
+ return Ue(r.type, x, f);
289
+ case b: {
290
+ var v = r, k = v._payload, P = v._init;
291
291
  try {
292
- return De(C(E), l, x);
292
+ return Ue(P(k), x, f);
293
293
  } catch {
294
294
  }
295
295
  }
296
296
  }
297
297
  return "";
298
298
  }
299
- var ve = Object.prototype.hasOwnProperty, os = {}, ds = O.ReactDebugCurrentFrame;
300
- function Ae(s) {
301
- if (s) {
302
- var l = s._owner, x = De(s.type, s._source, l ? l.type : null);
303
- ds.setExtraStackFrame(x);
299
+ var Ce = Object.prototype.hasOwnProperty, bt = {}, yt = A.ReactDebugCurrentFrame;
300
+ function We(r) {
301
+ if (r) {
302
+ var x = r._owner, f = Ue(r.type, r._source, x ? x.type : null);
303
+ yt.setExtraStackFrame(f);
304
304
  } else
305
- ds.setExtraStackFrame(null);
305
+ yt.setExtraStackFrame(null);
306
306
  }
307
- function Ws(s, l, x, g, E) {
307
+ function rs(r, x, f, v, k) {
308
308
  {
309
- var C = Function.call.bind(ve);
310
- for (var R in s)
311
- if (C(s, R)) {
312
- var v = void 0;
309
+ var P = Function.call.bind(Ce);
310
+ for (var R in r)
311
+ if (P(r, R)) {
312
+ var _ = void 0;
313
313
  try {
314
- if (typeof s[R] != "function") {
315
- var q = Error((g || "React class") + ": " + x + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
316
- throw q.name = "Invariant Violation", q;
314
+ if (typeof r[R] != "function") {
315
+ var z = Error((v || "React class") + ": " + f + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
316
+ throw z.name = "Invariant Violation", z;
317
317
  }
318
- v = s[R](l, R, g, x, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
319
- } catch (A) {
320
- v = A;
318
+ _ = r[R](x, R, v, f, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
319
+ } catch (O) {
320
+ _ = O;
321
321
  }
322
- v && !(v instanceof Error) && (Ae(E), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", x, R, typeof v), Ae(null)), v instanceof Error && !(v.message in os) && (os[v.message] = !0, Ae(E), S("Failed %s type: %s", x, v.message), Ae(null));
322
+ _ && !(_ instanceof Error) && (We(k), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", f, R, typeof _), We(null)), _ instanceof Error && !(_.message in bt) && (bt[_.message] = !0, We(k), S("Failed %s type: %s", f, _.message), We(null));
323
323
  }
324
324
  }
325
325
  }
326
- var Gs = Array.isArray;
327
- function We(s) {
328
- return Gs(s);
326
+ var ns = Array.isArray;
327
+ function Ze(r) {
328
+ return ns(r);
329
329
  }
330
- function Vs(s) {
330
+ function as(r) {
331
331
  {
332
- var l = typeof Symbol == "function" && Symbol.toStringTag, x = l && s[Symbol.toStringTag] || s.constructor.name || "Object";
333
- return x;
332
+ var x = typeof Symbol == "function" && Symbol.toStringTag, f = x && r[Symbol.toStringTag] || r.constructor.name || "Object";
333
+ return f;
334
334
  }
335
335
  }
336
- function zs(s) {
336
+ function is(r) {
337
337
  try {
338
- return us(s), !1;
338
+ return Nt(r), !1;
339
339
  } catch {
340
340
  return !0;
341
341
  }
342
342
  }
343
- function us(s) {
344
- return "" + s;
343
+ function Nt(r) {
344
+ return "" + r;
345
345
  }
346
- function hs(s) {
347
- if (zs(s))
348
- return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Vs(s)), us(s);
346
+ function _t(r) {
347
+ if (is(r))
348
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", as(r)), Nt(r);
349
349
  }
350
- var xs = O.ReactCurrentOwner, Ys = {
350
+ var wt = A.ReactCurrentOwner, cs = {
351
351
  key: !0,
352
352
  ref: !0,
353
353
  __self: !0,
354
354
  __source: !0
355
- }, ms, fs;
356
- function Ks(s) {
357
- if (ve.call(s, "ref")) {
358
- var l = Object.getOwnPropertyDescriptor(s, "ref").get;
359
- if (l && l.isReactWarning)
355
+ }, Rt, Et;
356
+ function ls(r) {
357
+ if (Ce.call(r, "ref")) {
358
+ var x = Object.getOwnPropertyDescriptor(r, "ref").get;
359
+ if (x && x.isReactWarning)
360
360
  return !1;
361
361
  }
362
- return s.ref !== void 0;
362
+ return r.ref !== void 0;
363
363
  }
364
- function Hs(s) {
365
- if (ve.call(s, "key")) {
366
- var l = Object.getOwnPropertyDescriptor(s, "key").get;
367
- if (l && l.isReactWarning)
364
+ function os(r) {
365
+ if (Ce.call(r, "key")) {
366
+ var x = Object.getOwnPropertyDescriptor(r, "key").get;
367
+ if (x && x.isReactWarning)
368
368
  return !1;
369
369
  }
370
- return s.key !== void 0;
370
+ return r.key !== void 0;
371
371
  }
372
- function Js(s, l) {
373
- typeof s.ref == "string" && xs.current;
372
+ function ds(r, x) {
373
+ typeof r.ref == "string" && wt.current;
374
374
  }
375
- function Xs(s, l) {
375
+ function us(r, x) {
376
376
  {
377
- var x = function() {
378
- ms || (ms = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
377
+ var f = function() {
378
+ Rt || (Rt = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
379
379
  };
380
- x.isReactWarning = !0, Object.defineProperty(s, "key", {
381
- get: x,
380
+ f.isReactWarning = !0, Object.defineProperty(r, "key", {
381
+ get: f,
382
382
  configurable: !0
383
383
  });
384
384
  }
385
385
  }
386
- function Qs(s, l) {
386
+ function hs(r, x) {
387
387
  {
388
- var x = function() {
389
- fs || (fs = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
388
+ var f = function() {
389
+ Et || (Et = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
390
390
  };
391
- x.isReactWarning = !0, Object.defineProperty(s, "ref", {
392
- get: x,
391
+ f.isReactWarning = !0, Object.defineProperty(r, "ref", {
392
+ get: f,
393
393
  configurable: !0
394
394
  });
395
395
  }
396
396
  }
397
- var Zs = function(s, l, x, g, E, C, R) {
398
- var v = {
397
+ var xs = function(r, x, f, v, k, P, R) {
398
+ var _ = {
399
399
  // This tag allows us to uniquely identify this as a React Element
400
- $$typeof: t,
400
+ $$typeof: s,
401
401
  // Built-in properties that belong on the element
402
- type: s,
403
- key: l,
404
- ref: x,
402
+ type: r,
403
+ key: x,
404
+ ref: f,
405
405
  props: R,
406
406
  // Record the component responsible for creating this element.
407
- _owner: C
407
+ _owner: P
408
408
  };
409
- return v._store = {}, Object.defineProperty(v._store, "validated", {
409
+ return _._store = {}, Object.defineProperty(_._store, "validated", {
410
410
  configurable: !1,
411
411
  enumerable: !1,
412
412
  writable: !0,
413
413
  value: !1
414
- }), Object.defineProperty(v, "_self", {
414
+ }), Object.defineProperty(_, "_self", {
415
415
  configurable: !1,
416
416
  enumerable: !1,
417
417
  writable: !1,
418
- value: g
419
- }), Object.defineProperty(v, "_source", {
418
+ value: v
419
+ }), Object.defineProperty(_, "_source", {
420
420
  configurable: !1,
421
421
  enumerable: !1,
422
422
  writable: !1,
423
- value: E
424
- }), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
423
+ value: k
424
+ }), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
425
425
  };
426
- function er(s, l, x, g, E) {
426
+ function ms(r, x, f, v, k) {
427
427
  {
428
- var C, R = {}, v = null, q = null;
429
- x !== void 0 && (hs(x), v = "" + x), Hs(l) && (hs(l.key), v = "" + l.key), Ks(l) && (q = l.ref, Js(l, E));
430
- for (C in l)
431
- ve.call(l, C) && !Ys.hasOwnProperty(C) && (R[C] = l[C]);
432
- if (s && s.defaultProps) {
433
- var A = s.defaultProps;
434
- for (C in A)
435
- R[C] === void 0 && (R[C] = A[C]);
428
+ var P, R = {}, _ = null, z = null;
429
+ f !== void 0 && (_t(f), _ = "" + f), os(x) && (_t(x.key), _ = "" + x.key), ls(x) && (z = x.ref, ds(x, k));
430
+ for (P in x)
431
+ Ce.call(x, P) && !cs.hasOwnProperty(P) && (R[P] = x[P]);
432
+ if (r && r.defaultProps) {
433
+ var O = r.defaultProps;
434
+ for (P in O)
435
+ R[P] === void 0 && (R[P] = O[P]);
436
436
  }
437
- if (v || q) {
438
- var F = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
439
- v && Xs(R, F), q && Qs(R, F);
437
+ if (_ || z) {
438
+ var M = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
439
+ _ && us(R, M), z && hs(R, M);
440
440
  }
441
- return Zs(s, v, q, E, g, xs.current, R);
441
+ return xs(r, _, z, k, v, wt.current, R);
442
442
  }
443
443
  }
444
- var Ge = O.ReactCurrentOwner, js = O.ReactDebugCurrentFrame;
445
- function me(s) {
446
- if (s) {
447
- var l = s._owner, x = De(s.type, s._source, l ? l.type : null);
448
- js.setExtraStackFrame(x);
444
+ var et = A.ReactCurrentOwner, kt = A.ReactDebugCurrentFrame;
445
+ function Re(r) {
446
+ if (r) {
447
+ var x = r._owner, f = Ue(r.type, r._source, x ? x.type : null);
448
+ kt.setExtraStackFrame(f);
449
449
  } else
450
- js.setExtraStackFrame(null);
450
+ kt.setExtraStackFrame(null);
451
451
  }
452
- var Ve;
453
- Ve = !1;
454
- function ze(s) {
455
- return typeof s == "object" && s !== null && s.$$typeof === t;
452
+ var tt;
453
+ tt = !1;
454
+ function st(r) {
455
+ return typeof r == "object" && r !== null && r.$$typeof === s;
456
456
  }
457
- function ps() {
457
+ function Ct() {
458
458
  {
459
- if (Ge.current) {
460
- var s = y(Ge.current.type);
461
- if (s)
459
+ if (et.current) {
460
+ var r = ne(et.current.type);
461
+ if (r)
462
462
  return `
463
463
 
464
- Check the render method of \`` + s + "`.";
464
+ Check the render method of \`` + r + "`.";
465
465
  }
466
466
  return "";
467
467
  }
468
468
  }
469
- function sr(s) {
469
+ function fs(r) {
470
470
  return "";
471
471
  }
472
- var gs = {};
473
- function rr(s) {
472
+ var Tt = {};
473
+ function js(r) {
474
474
  {
475
- var l = ps();
476
- if (!l) {
477
- var x = typeof s == "string" ? s : s.displayName || s.name;
478
- x && (l = `
475
+ var x = Ct();
476
+ if (!x) {
477
+ var f = typeof r == "string" ? r : r.displayName || r.name;
478
+ f && (x = `
479
479
 
480
- Check the top-level render call using <` + x + ">.");
480
+ Check the top-level render call using <` + f + ">.");
481
481
  }
482
- return l;
482
+ return x;
483
483
  }
484
484
  }
485
- function vs(s, l) {
485
+ function St(r, x) {
486
486
  {
487
- if (!s._store || s._store.validated || s.key != null)
487
+ if (!r._store || r._store.validated || r.key != null)
488
488
  return;
489
- s._store.validated = !0;
490
- var x = rr(l);
491
- if (gs[x])
489
+ r._store.validated = !0;
490
+ var f = js(x);
491
+ if (Tt[f])
492
492
  return;
493
- gs[x] = !0;
494
- var g = "";
495
- s && s._owner && s._owner !== Ge.current && (g = " It was passed a child from " + y(s._owner.type) + "."), me(s), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', x, g), me(null);
493
+ Tt[f] = !0;
494
+ var v = "";
495
+ r && r._owner && r._owner !== et.current && (v = " It was passed a child from " + ne(r._owner.type) + "."), Re(r), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', f, v), Re(null);
496
496
  }
497
497
  }
498
- function bs(s, l) {
498
+ function Pt(r, x) {
499
499
  {
500
- if (typeof s != "object")
500
+ if (typeof r != "object")
501
501
  return;
502
- if (We(s))
503
- for (var x = 0; x < s.length; x++) {
504
- var g = s[x];
505
- ze(g) && vs(g, l);
502
+ if (Ze(r))
503
+ for (var f = 0; f < r.length; f++) {
504
+ var v = r[f];
505
+ st(v) && St(v, x);
506
506
  }
507
- else if (ze(s))
508
- s._store && (s._store.validated = !0);
509
- else if (s) {
510
- var E = k(s);
511
- if (typeof E == "function" && E !== s.entries)
512
- for (var C = E.call(s), R; !(R = C.next()).done; )
513
- ze(R.value) && vs(R.value, l);
507
+ else if (st(r))
508
+ r._store && (r._store.validated = !0);
509
+ else if (r) {
510
+ var k = E(r);
511
+ if (typeof k == "function" && k !== r.entries)
512
+ for (var P = k.call(r), R; !(R = P.next()).done; )
513
+ st(R.value) && St(R.value, x);
514
514
  }
515
515
  }
516
516
  }
517
- function tr(s) {
517
+ function ps(r) {
518
518
  {
519
- var l = s.type;
520
- if (l == null || typeof l == "string")
519
+ var x = r.type;
520
+ if (x == null || typeof x == "string")
521
521
  return;
522
- var x;
523
- if (typeof l == "function")
524
- x = l.propTypes;
525
- else if (typeof l == "object" && (l.$$typeof === f || // Note: Memo only checks outer props here.
522
+ var f;
523
+ if (typeof x == "function")
524
+ f = x.propTypes;
525
+ else if (typeof x == "object" && (x.$$typeof === u || // Note: Memo only checks outer props here.
526
526
  // Inner props are checked in the reconciler.
527
- l.$$typeof === p))
528
- x = l.propTypes;
527
+ x.$$typeof === p))
528
+ f = x.propTypes;
529
529
  else
530
530
  return;
531
- if (x) {
532
- var g = y(l);
533
- Ws(x, s.props, "prop", g, s);
534
- } else if (l.PropTypes !== void 0 && !Ve) {
535
- Ve = !0;
536
- var E = y(l);
537
- S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
531
+ if (f) {
532
+ var v = ne(x);
533
+ rs(f, r.props, "prop", v, r);
534
+ } else if (x.PropTypes !== void 0 && !tt) {
535
+ tt = !0;
536
+ var k = ne(x);
537
+ S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", k || "Unknown");
538
538
  }
539
- typeof l.getDefaultProps == "function" && !l.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
539
+ typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
540
540
  }
541
541
  }
542
- function nr(s) {
542
+ function gs(r) {
543
543
  {
544
- for (var l = Object.keys(s.props), x = 0; x < l.length; x++) {
545
- var g = l[x];
546
- if (g !== "children" && g !== "key") {
547
- me(s), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), me(null);
544
+ for (var x = Object.keys(r.props), f = 0; f < x.length; f++) {
545
+ var v = x[f];
546
+ if (v !== "children" && v !== "key") {
547
+ Re(r), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), Re(null);
548
548
  break;
549
549
  }
550
550
  }
551
- s.ref !== null && (me(s), S("Invalid attribute `ref` supplied to `React.Fragment`."), me(null));
551
+ r.ref !== null && (Re(r), S("Invalid attribute `ref` supplied to `React.Fragment`."), Re(null));
552
552
  }
553
553
  }
554
- var ys = {};
555
- function Ns(s, l, x, g, E, C) {
554
+ var Dt = {};
555
+ function At(r, x, f, v, k, P) {
556
556
  {
557
- var R = Be(s);
557
+ var R = V(r);
558
558
  if (!R) {
559
- var v = "";
560
- (s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (v += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
561
- var q = sr();
562
- q ? v += q : v += ps();
563
- var A;
564
- s === null ? A = "null" : We(s) ? A = "array" : s !== void 0 && s.$$typeof === t ? (A = "<" + (y(s.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : A = typeof s, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", A, v);
559
+ var _ = "";
560
+ (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
561
+ var z = fs();
562
+ z ? _ += z : _ += Ct();
563
+ var O;
564
+ r === null ? O = "null" : Ze(r) ? O = "array" : r !== void 0 && r.$$typeof === s ? (O = "<" + (ne(r.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : O = typeof r, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", O, _);
565
565
  }
566
- var F = er(s, l, x, E, C);
567
- if (F == null)
568
- return F;
566
+ var M = ms(r, x, f, k, P);
567
+ if (M == null)
568
+ return M;
569
569
  if (R) {
570
- var X = l.children;
571
- if (X !== void 0)
572
- if (g)
573
- if (We(X)) {
574
- for (var fe = 0; fe < X.length; fe++)
575
- bs(X[fe], s);
576
- Object.freeze && Object.freeze(X);
570
+ var ae = x.children;
571
+ if (ae !== void 0)
572
+ if (v)
573
+ if (Ze(ae)) {
574
+ for (var Ee = 0; Ee < ae.length; Ee++)
575
+ Pt(ae[Ee], r);
576
+ Object.freeze && Object.freeze(ae);
577
577
  } else
578
578
  S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
579
579
  else
580
- bs(X, s);
580
+ Pt(ae, r);
581
581
  }
582
- if (ve.call(l, "key")) {
583
- var oe = y(s), M = Object.keys(l).filter(function(dr) {
584
- return dr !== "key";
585
- }), Ye = M.length > 0 ? "{key: someKey, " + M.join(": ..., ") + ": ...}" : "{key: someKey}";
586
- if (!ys[oe + Ye]) {
587
- var or = M.length > 0 ? "{" + M.join(": ..., ") + ": ...}" : "{}";
582
+ if (Ce.call(x, "key")) {
583
+ var Ne = ne(r), X = Object.keys(x).filter(function(ws) {
584
+ return ws !== "key";
585
+ }), rt = X.length > 0 ? "{key: someKey, " + X.join(": ..., ") + ": ...}" : "{key: someKey}";
586
+ if (!Dt[Ne + rt]) {
587
+ var _s = X.length > 0 ? "{" + X.join(": ..., ") + ": ...}" : "{}";
588
588
  S(`A props object containing a "key" prop is being spread into JSX:
589
589
  let props = %s;
590
590
  <%s {...props} />
591
591
  React keys must be passed directly to JSX without using spread:
592
592
  let props = %s;
593
- <%s key={someKey} {...props} />`, Ye, oe, or, oe), ys[oe + Ye] = !0;
593
+ <%s key={someKey} {...props} />`, rt, Ne, _s, Ne), Dt[Ne + rt] = !0;
594
594
  }
595
595
  }
596
- return s === a ? nr(F) : tr(F), F;
596
+ return r === n ? gs(M) : ps(M), M;
597
597
  }
598
598
  }
599
- function ar(s, l, x) {
600
- return Ns(s, l, x, !0);
599
+ function vs(r, x, f) {
600
+ return At(r, x, f, !0);
601
601
  }
602
- function ir(s, l, x) {
603
- return Ns(s, l, x, !1);
602
+ function bs(r, x, f) {
603
+ return At(r, x, f, !1);
604
604
  }
605
- var cr = ir, lr = ar;
606
- ye.Fragment = a, ye.jsx = cr, ye.jsxs = lr;
607
- })()), ye;
605
+ var ys = bs, Ns = vs;
606
+ Se.Fragment = n, Se.jsx = ys, Se.jsxs = Ns;
607
+ })()), Se;
608
608
  }
609
- var Es;
610
- function gr() {
611
- return Es || (Es = 1, process.env.NODE_ENV === "production" ? Fe.exports = jr() : Fe.exports = pr()), Fe.exports;
609
+ var Ot;
610
+ function Ds() {
611
+ return Ot || (Ot = 1, process.env.NODE_ENV === "production" ? Ge.exports = Ss() : Ge.exports = Ps()), Ge.exports;
612
612
  }
613
- var e = gr();
614
- class we extends Error {
615
- constructor(t, n) {
616
- super(n), this.status = t, this.name = "ApiError";
613
+ var e = Ds();
614
+ class Ae extends Error {
615
+ constructor(s, a) {
616
+ super(a), this.status = s, this.name = "ApiError";
617
617
  }
618
618
  }
619
- class vr {
619
+ class As {
620
620
  baseUrl;
621
621
  headers;
622
- constructor(t = {}) {
623
- this.baseUrl = t.baseUrl ?? "", this.headers = {
622
+ constructor(s = {}) {
623
+ this.baseUrl = s.baseUrl ?? "", this.headers = {
624
624
  "Content-Type": "application/json",
625
- ...t.headers
625
+ ...s.headers
626
626
  };
627
627
  }
628
- async request(t, n, a = {}) {
629
- let u = `${this.baseUrl}${n}`;
630
- if (a.params) {
631
- const d = new URLSearchParams();
632
- Object.entries(a.params).forEach(([f, h]) => {
633
- h != null && h !== "" && d.set(f, String(h));
628
+ async request(s, a, n = {}) {
629
+ let l = `${this.baseUrl}${a}`;
630
+ if (n.params) {
631
+ const c = new URLSearchParams();
632
+ Object.entries(n.params).forEach(([u, h]) => {
633
+ h != null && h !== "" && c.set(u, String(h));
634
634
  });
635
- const i = d.toString();
636
- i && (u += `?${i}`);
637
- }
638
- const o = await fetch(u, {
639
- method: t,
640
- headers: this.headers,
641
- body: a.body ? JSON.stringify(a.body) : void 0
635
+ const i = c.toString();
636
+ i && (l += `?${i}`);
637
+ }
638
+ const o = await fetch(l, {
639
+ method: s,
640
+ headers: { ...this.headers, ...n.headers },
641
+ body: n.body ? JSON.stringify(n.body) : void 0,
642
+ credentials: n.credentials,
643
+ cache: "no-store"
642
644
  });
643
645
  if (!o.ok) {
644
- const d = await o.json().catch(() => ({ detail: "Unknown error" }));
645
- throw new we(o.status, d.detail || o.statusText);
646
+ const c = await o.json().catch(() => ({ detail: "Unknown error" }));
647
+ throw new Ae(o.status, c.detail || o.statusText);
646
648
  }
647
649
  if (!(o.status === 204 || o.headers.get("content-length") === "0"))
648
650
  return o.json();
@@ -650,510 +652,625 @@ class vr {
650
652
  async getCapabilities() {
651
653
  return this.request("GET", "/api/v1/capabilities");
652
654
  }
653
- async listRuns(t) {
654
- return this.request("GET", "/api/runs", { params: t });
655
+ async listRuns(s) {
656
+ return this.request("GET", "/api/runs", { params: s });
655
657
  }
656
- async getRun(t) {
657
- return this.request("GET", `/api/runs/${t}`);
658
+ async getRun(s) {
659
+ return this.request("GET", `/api/runs/${s}`);
658
660
  }
659
- async deleteRun(t) {
660
- await this.request("DELETE", `/api/runs/${t}`);
661
+ async deleteRun(s) {
662
+ await this.request("DELETE", `/api/runs/${s}`);
661
663
  }
662
- async setBaseline(t, n) {
663
- return this.request("POST", `/api/projects/${t}/baseline/${n}`, {
664
+ async setBaseline(s, a) {
665
+ return this.request("POST", `/api/projects/${s}/baseline/${a}`, {
664
666
  params: { redirect: "false" }
665
667
  });
666
668
  }
667
- async listProjects(t) {
668
- return this.request("GET", "/api/projects", { params: t });
669
+ async listProjects(s) {
670
+ return this.request("GET", "/api/projects", { params: s });
669
671
  }
670
- async listGroups(t) {
671
- return this.request("GET", "/api/groups", { params: t });
672
+ async listGroups(s) {
673
+ return this.request("GET", "/api/groups", { params: s });
672
674
  }
673
- async getGroup(t) {
674
- return this.request("GET", `/api/groups/${t}`);
675
+ async getGroup(s) {
676
+ return this.request("GET", `/api/groups/${s}`);
675
677
  }
676
- async getDiff(t, n) {
678
+ async getDiff(s, a) {
677
679
  return this.request("GET", "/api/diff", {
678
- params: { a: t, b: n }
680
+ params: { a: s, b: a }
679
681
  });
680
682
  }
681
- async getArtifact(t, n) {
682
- return this.request("GET", `/api/runs/${t}/artifacts/${n}`);
683
+ async getArtifact(s, a) {
684
+ return this.request("GET", `/api/runs/${s}/artifacts/${a}`);
685
+ }
686
+ getArtifactDownloadUrl(s, a) {
687
+ return `${this.baseUrl}/api/runs/${s}/artifacts/${a}/raw`;
683
688
  }
684
- getArtifactDownloadUrl(t, n) {
685
- return `${this.baseUrl}/api/runs/${t}/artifacts/${n}/raw`;
689
+ async createExport(s) {
690
+ return this.request("POST", `/api/runs/${s}/export`);
686
691
  }
687
- async createExport(t) {
688
- return this.request("POST", `/api/runs/${t}/export`);
692
+ async getExportInfo(s) {
693
+ return this.request("GET", `/api/runs/${s}/export/info`);
689
694
  }
690
- async getExportInfo(t) {
691
- return this.request("GET", `/api/runs/${t}/export/info`);
695
+ getExportDownloadUrl(s) {
696
+ return `${this.baseUrl}/api/runs/${s}/export/download`;
692
697
  }
693
- getExportDownloadUrl(t) {
694
- return `${this.baseUrl}/api/runs/${t}/export/download`;
698
+ async getMetricSeries(s) {
699
+ return this.request("GET", `/api/runs/${s}/metric_series`);
700
+ }
701
+ }
702
+ const Fs = new As();
703
+ function oe(t) {
704
+ return t?.slice(0, 8) ?? "";
705
+ }
706
+ function ct(t) {
707
+ return t?.slice(0, 12) ?? "N/A";
708
+ }
709
+ function Ye(t) {
710
+ const s = new Date(t), n = Math.floor(((/* @__PURE__ */ new Date()).getTime() - s.getTime()) / 1e3);
711
+ if (n < 60) return "just now";
712
+ if (n < 3600) {
713
+ const o = Math.floor(n / 60);
714
+ return `${o} minute${o !== 1 ? "s" : ""} ago`;
715
+ }
716
+ if (n < 86400) {
717
+ const o = Math.floor(n / 3600);
718
+ return `${o} hour${o !== 1 ? "s" : ""} ago`;
719
+ }
720
+ if (n < 2592e3) {
721
+ const o = Math.floor(n / 86400);
722
+ return `${o} day${o !== 1 ? "s" : ""} ago`;
723
+ }
724
+ if (n < 31536e3) {
725
+ const o = Math.floor(n / 2592e3);
726
+ return `${o} month${o !== 1 ? "s" : ""} ago`;
695
727
  }
728
+ const l = Math.floor(n / 31536e3);
729
+ return `${l} year${l !== 1 ? "s" : ""} ago`;
696
730
  }
697
- const br = new vr(), Ts = Ps(null);
698
- function yr({
699
- children: r,
700
- api: t = br,
701
- initialWorkspace: n = null
731
+ function lt(t, s = 6) {
732
+ return typeof t != "number" || isNaN(t) ? String(t) : Number(t.toPrecision(s)).toString();
733
+ }
734
+ function Ve(t) {
735
+ return t < 1024 ? `${t} bytes` : t < 1048576 ? `${(t / 1024).toFixed(1)} KB` : `${(t / 1048576).toFixed(1)} MB`;
736
+ }
737
+ function $s(t) {
738
+ return JSON.stringify(t, null, 2);
739
+ }
740
+ function Os(t, s = 60) {
741
+ return t ? t.length <= s ? t : t.slice(0, s - 3) + "..." : "";
742
+ }
743
+ function kr(t, s) {
744
+ const a = new URLSearchParams();
745
+ Object.entries(s).forEach(([l, o]) => {
746
+ o != null && o !== "" && a.set(l, String(o));
747
+ });
748
+ const n = a.toString();
749
+ return n ? `${t}?${n}` : t;
750
+ }
751
+ function q(...t) {
752
+ return t.filter(Boolean).join(" ");
753
+ }
754
+ function Ut(t, s) {
755
+ const a = new Date(t).getTime(), n = s ? new Date(s).getTime() : Date.now();
756
+ return Math.max(0, Math.floor((n - a) / 1e3));
757
+ }
758
+ function Wt(t) {
759
+ if (t < 60) return `${t}s`;
760
+ const s = Math.floor(t / 86400), a = Math.floor(t % 86400 / 3600), n = Math.floor(t % 3600 / 60), l = t % 60;
761
+ return s > 0 ? `${s}d ${a}h ${n}m` : a > 0 ? `${a}h ${n}m ${l}s` : `${n}m ${l}s`;
762
+ }
763
+ function $e(t) {
764
+ return t === "FINISHED" || t === "FAILED" || t === "KILLED";
765
+ }
766
+ const Gt = ut(null);
767
+ function Cr({ children: t }) {
768
+ const s = {
769
+ theme: "light",
770
+ resolvedTheme: "light",
771
+ setTheme: () => {
772
+ },
773
+ toggleTheme: () => {
774
+ }
775
+ };
776
+ return /* @__PURE__ */ e.jsx(Gt.Provider, { value: s, children: t });
777
+ }
778
+ function Ms() {
779
+ const t = dt(Gt);
780
+ return t || {
781
+ theme: "light",
782
+ resolvedTheme: "light",
783
+ setTheme: () => {
784
+ },
785
+ toggleTheme: () => {
786
+ }
787
+ };
788
+ }
789
+ function Tr() {
790
+ return Ms();
791
+ }
792
+ const nt = 1e3, Ls = {
793
+ runsActive: nt,
794
+ runsIdle: nt,
795
+ runDetail: nt
796
+ }, Vt = ut(null);
797
+ function qs({
798
+ children: t,
799
+ api: s = Fs,
800
+ initialWorkspace: a = null,
801
+ pollingConfig: n
702
802
  }) {
703
- const [a, u] = T(null), [o, d] = T(n);
704
- return je(() => {
705
- t.getCapabilities().then(u).catch(console.error);
706
- }, [t]), /* @__PURE__ */ e.jsx(Ts.Provider, { value: { api: t, capabilities: a, currentWorkspace: o, setCurrentWorkspace: d }, children: r });
803
+ const [l, o] = T(null), [c, i] = T(a), u = {
804
+ ...Ls,
805
+ ...n
806
+ };
807
+ return de(() => {
808
+ s.getCapabilities().then(o).catch(console.error);
809
+ }, [s]), /* @__PURE__ */ e.jsx(Vt.Provider, { value: { api: s, capabilities: l, currentWorkspace: c, setCurrentWorkspace: i, pollingConfig: u }, children: t });
707
810
  }
708
811
  function K() {
709
- const r = Ss(Ts);
710
- if (!r) throw new Error("useApp must be used within AppProvider");
711
- return r;
812
+ const t = dt(Vt);
813
+ if (!t) throw new Error("useApp must be used within AppProvider");
814
+ return t;
712
815
  }
713
- function ue(r, t = []) {
714
- const [n, a] = T({
816
+ function be(t, s = []) {
817
+ const [a, n] = T({
715
818
  data: null,
716
819
  loading: !0,
717
820
  error: null
718
- }), u = _s(!0), o = _s(r);
719
- o.current = r;
720
- const d = _e(async () => {
721
- a((i) => ({ ...i, loading: !0, error: null }));
821
+ }), l = De(!0), o = De(t);
822
+ o.current = t;
823
+ const c = me(async (u) => {
824
+ u || n((h) => ({ ...h, loading: !0, error: null }));
722
825
  try {
723
- const i = await o.current();
724
- u.current && a({ data: i, loading: !1, error: null });
725
- } catch (i) {
726
- u.current && a({
727
- data: null,
728
- loading: !1,
729
- error: i instanceof we ? i : new we(500, String(i))
730
- });
826
+ const h = await o.current();
827
+ l.current && n({ data: h, loading: !1, error: null });
828
+ } catch (h) {
829
+ if (l.current) {
830
+ const m = h instanceof Ae ? h : new Ae(500, String(h));
831
+ n((p) => ({
832
+ data: u ? p.data : null,
833
+ loading: !1,
834
+ error: m
835
+ }));
836
+ }
731
837
  }
732
838
  }, []);
733
- return je(() => (u.current = !0, d(), () => {
734
- u.current = !1;
735
- }), t), { ...n, refetch: d };
736
- }
737
- function Ds(r) {
738
- const { api: t, currentWorkspace: n } = K();
739
- return ue(
740
- () => t.listRuns({ ...r, workspace: n?.id }),
741
- [t, n?.id, r?.project, r?.status, r?.q, r?.limit]
742
- );
839
+ de(() => (l.current = !0, c(!1), () => {
840
+ l.current = !1;
841
+ }), s);
842
+ const i = me(() => c(!0), [c]);
843
+ return { ...a, refetch: i };
844
+ }
845
+ function mt(t, s, a) {
846
+ de(() => {
847
+ if (!a) return;
848
+ let n, l = !1;
849
+ const o = () => {
850
+ if (l) return;
851
+ const u = s * 0.1 * (Math.random() * 2 - 1);
852
+ n = setTimeout(c, Math.max(500, s + u));
853
+ }, c = async () => {
854
+ if (!l && document.visibilityState !== "hidden") {
855
+ try {
856
+ await t();
857
+ } catch {
858
+ }
859
+ o();
860
+ }
861
+ };
862
+ o();
863
+ const i = () => {
864
+ l || document.visibilityState !== "visible" || (clearTimeout(n), Promise.resolve(t()).catch(() => {
865
+ }).finally(o));
866
+ };
867
+ return document.addEventListener("visibilitychange", i), () => {
868
+ l = !0, clearTimeout(n), document.removeEventListener("visibilitychange", i);
869
+ };
870
+ }, [t, s, a]);
871
+ }
872
+ function zt(t) {
873
+ const { api: s, currentWorkspace: a, pollingConfig: n } = K(), l = be(
874
+ () => s.listRuns({ ...t, workspace: a?.id }),
875
+ [s, a?.id, t?.project, t?.status, t?.q, t?.limit]
876
+ ), c = l.data?.runs.some((i) => !$e(i.status)) ?? !1 ? n.runsActive : n.runsIdle;
877
+ return mt(l.refetch, c, !0), l;
743
878
  }
744
- function As(r) {
745
- const { api: t } = K();
746
- return ue(
879
+ function Yt(t) {
880
+ const { api: s, pollingConfig: a } = K(), n = be(
747
881
  async () => {
748
- const { run: n } = await t.getRun(r);
749
- return n;
882
+ const { run: o } = await s.getRun(t);
883
+ return o;
750
884
  },
751
- [t, r]
752
- );
885
+ [s, t]
886
+ ), l = n.data ? !$e(n.data.status) : !1;
887
+ return mt(n.refetch, a.runDetail, l), n;
753
888
  }
754
- function Le() {
755
- const { api: r, currentWorkspace: t } = K();
756
- return ue(
889
+ function Ke() {
890
+ const { api: t, currentWorkspace: s } = K();
891
+ return be(
757
892
  async () => {
758
- const { projects: n } = await r.listProjects({ workspace: t?.id });
759
- return n;
893
+ const { projects: a } = await t.listProjects({ workspace: s?.id });
894
+ return a;
760
895
  },
761
- [r, t?.id]
896
+ [t, s?.id]
762
897
  );
763
898
  }
764
- function Nr(r) {
765
- const { api: t, currentWorkspace: n } = K();
766
- return ue(
899
+ function Is(t) {
900
+ const { api: s, currentWorkspace: a } = K();
901
+ return be(
767
902
  async () => {
768
- const { groups: a } = await t.listGroups({ ...r, workspace: n?.id });
769
- return a;
903
+ const { groups: n } = await s.listGroups({ ...t, workspace: a?.id });
904
+ return n;
770
905
  },
771
- [t, n?.id, r?.project]
906
+ [s, a?.id, t?.project]
772
907
  );
773
908
  }
774
- function _r(r) {
775
- const { api: t } = K();
776
- return ue(
777
- () => t.getGroup(r),
778
- [t, r]
909
+ function Bs(t) {
910
+ const { api: s } = K();
911
+ return be(
912
+ () => s.getGroup(t),
913
+ [s, t]
779
914
  );
780
915
  }
781
- function wr(r, t) {
782
- const { api: n } = K();
783
- return ue(
784
- () => n.getDiff(r, t),
785
- [n, r, t]
916
+ function Us(t, s) {
917
+ const { api: a } = K();
918
+ return be(
919
+ () => a.getDiff(t, s),
920
+ [a, t, s]
786
921
  );
787
922
  }
788
- function Rr(r, t) {
789
- const { api: n } = K();
790
- return ue(
791
- () => n.getArtifact(r, t),
792
- [n, r, t]
923
+ function Ws(t, s) {
924
+ const { api: a } = K();
925
+ return be(
926
+ () => a.getArtifact(t, s),
927
+ [a, t, s]
793
928
  );
794
929
  }
795
- function Re(r) {
796
- const [t, n] = T(!1), [a, u] = T(null);
797
- return { mutate: _e(async (...d) => {
798
- n(!0), u(null);
930
+ function Fe(t) {
931
+ const [s, a] = T(!1), [n, l] = T(null);
932
+ return { mutate: me(async (...c) => {
933
+ a(!0), l(null);
799
934
  try {
800
- return await r(...d);
935
+ return await t(...c);
801
936
  } catch (i) {
802
- const f = i instanceof we ? i : new we(500, String(i));
803
- throw u(f), f;
937
+ const u = i instanceof Ae ? i : new Ae(500, String(i));
938
+ throw l(u), u;
804
939
  } finally {
805
- n(!1);
940
+ a(!1);
806
941
  }
807
- }, [r]), loading: t, error: a };
808
- }
809
- function Q(r) {
810
- return r?.slice(0, 8) ?? "";
811
- }
812
- function He(r) {
813
- return r?.slice(0, 12) ?? "N/A";
814
- }
815
- function Ze(r) {
816
- const t = new Date(r), a = Math.floor(((/* @__PURE__ */ new Date()).getTime() - t.getTime()) / 1e3);
817
- if (a < 60) return "just now";
818
- if (a < 3600) {
819
- const o = Math.floor(a / 60);
820
- return `${o} minute${o !== 1 ? "s" : ""} ago`;
821
- }
822
- if (a < 86400) {
823
- const o = Math.floor(a / 3600);
824
- return `${o} hour${o !== 1 ? "s" : ""} ago`;
825
- }
826
- if (a < 2592e3) {
827
- const o = Math.floor(a / 86400);
828
- return `${o} day${o !== 1 ? "s" : ""} ago`;
829
- }
830
- if (a < 31536e3) {
831
- const o = Math.floor(a / 2592e3);
832
- return `${o} month${o !== 1 ? "s" : ""} ago`;
833
- }
834
- const u = Math.floor(a / 31536e3);
835
- return `${u} year${u !== 1 ? "s" : ""} ago`;
836
- }
837
- function Er(r, t = 6) {
838
- return typeof r != "number" || isNaN(r) ? String(r) : Number(r.toPrecision(t)).toString();
839
- }
840
- function Oe(r) {
841
- return r < 1024 ? `${r} bytes` : r < 1048576 ? `${(r / 1024).toFixed(1)} KB` : `${(r / 1048576).toFixed(1)} MB`;
842
- }
843
- function Cr(r) {
844
- return JSON.stringify(r, null, 2);
942
+ }, [t]), loading: s, error: n };
845
943
  }
846
- function kr(r, t = 60) {
847
- return r ? r.length <= t ? r : r.slice(0, t - 3) + "..." : "";
848
- }
849
- function rt(r, t) {
850
- const n = new URLSearchParams();
851
- Object.entries(t).forEach(([u, o]) => {
852
- o != null && o !== "" && n.set(u, String(o));
853
- });
854
- const a = n.toString();
855
- return a ? `${r}?${a}` : r;
856
- }
857
- function $(...r) {
858
- return r.filter(Boolean).join(" ");
944
+ function Gs(t, s) {
945
+ const { api: a, pollingConfig: n } = K(), l = be(
946
+ async () => {
947
+ try {
948
+ const { series: c } = await a.getMetricSeries(t);
949
+ return Object.values(c).some((u) => u.length > 0) ? c : null;
950
+ } catch {
951
+ return null;
952
+ }
953
+ },
954
+ [a, t]
955
+ ), o = De(s);
956
+ return de(() => {
957
+ o.current && !s && l.refetch(), o.current = s;
958
+ }, [s, l.refetch]), mt(l.refetch, n.runDetail, s), l;
859
959
  }
860
- const Sr = [
960
+ const Vs = [
861
961
  { href: "/runs", label: "Runs", matchPaths: ["/runs"] },
862
962
  { href: "/projects", label: "Projects", matchPaths: ["/projects"] },
863
963
  { href: "/groups", label: "Groups", matchPaths: ["/groups"] },
864
964
  { href: "/diff", label: "Compare", matchPaths: ["/diff"] },
865
965
  { href: "/search", label: "Search", matchPaths: ["/search"] }
866
- ], Fs = Ps(null);
867
- function tt({
868
- config: r,
869
- children: t
966
+ ], Ht = ut(null);
967
+ function Sr({
968
+ config: t,
969
+ children: s
870
970
  }) {
871
- return /* @__PURE__ */ e.jsx(Fs.Provider, { value: r, children: t });
971
+ return /* @__PURE__ */ e.jsx(Ht.Provider, { value: t, children: s });
872
972
  }
873
- function Pr() {
874
- return Ss(Fs);
973
+ function zs() {
974
+ return dt(Ht);
875
975
  }
876
- function V({ children: r, config: t }) {
877
- const n = ur(), u = { ...Pr(), ...t }, o = u?.navLinks ?? Sr, d = [
878
- ...u?.prependNavLinks ?? [],
976
+ function Q({ children: t, config: s }) {
977
+ const a = Rs(), l = { ...zs(), ...s }, o = l?.navLinks ?? Vs, c = [
978
+ ...l?.prependNavLinks ?? [],
879
979
  ...o,
880
- ...u?.appendNavLinks ?? []
881
- ], i = u?.logo ?? { text: "devqubit", icon: "⚛" }, f = (h) => h.matchPaths ? h.matchPaths.some((m) => n.pathname.startsWith(m)) : n.pathname === h.href;
882
- return /* @__PURE__ */ e.jsxs("div", { className: "min-h-screen bg-gray-50", children: [
883
- /* @__PURE__ */ e.jsx("header", { className: "bg-gray-900 h-14 sticky top-0 z-50 shadow-sm", children: /* @__PURE__ */ e.jsxs("div", { className: "max-w-container mx-auto px-6 h-full flex items-center justify-between", children: [
884
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-8", children: [
885
- /* @__PURE__ */ e.jsxs(z, { to: "/", className: "text-lg font-semibold text-primary hover:text-primary-light flex items-center gap-2 transition-colors", children: [
886
- i.icon && /* @__PURE__ */ e.jsx("span", { className: "text-xl", children: i.icon }),
980
+ ...l?.appendNavLinks ?? []
981
+ ], i = l?.logo ?? { text: "devqubit", icon: "⚛" }, u = (h) => h.matchPaths ? h.matchPaths.some((m) => a.pathname.startsWith(m)) : a.pathname === h.href;
982
+ return /* @__PURE__ */ e.jsxs("div", { className: "dq-layout", children: [
983
+ /* @__PURE__ */ e.jsx("header", { className: "dq-header", children: /* @__PURE__ */ e.jsxs("div", { className: "dq-header-inner", children: [
984
+ /* @__PURE__ */ e.jsxs("div", { className: "dq-header-left", children: [
985
+ /* @__PURE__ */ e.jsxs(se, { to: "/", className: "dq-logo", children: [
986
+ i.icon && /* @__PURE__ */ e.jsx("span", { className: "dq-logo-icon", children: i.icon }),
887
987
  i.text
888
988
  ] }),
889
- /* @__PURE__ */ e.jsx("nav", { className: "flex gap-1", children: d.map((h) => /* @__PURE__ */ e.jsx(
890
- z,
989
+ /* @__PURE__ */ e.jsx("nav", { className: "dq-nav", children: c.map((h) => /* @__PURE__ */ e.jsx(
990
+ se,
891
991
  {
892
992
  to: h.href,
893
- className: $(
894
- "px-3 py-2 rounded-md text-sm font-medium transition-colors duration-150",
895
- f(h) ? "text-white bg-white/10" : "text-gray-400 hover:text-white hover:bg-white/5"
896
- ),
993
+ className: q("dq-nav-link", u(h) && "active"),
897
994
  children: h.label
898
995
  },
899
996
  h.href
900
997
  )) })
901
998
  ] }),
902
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-4", children: u?.headerRight })
999
+ /* @__PURE__ */ e.jsx("div", { className: "dq-header-right", children: l?.headerRight })
903
1000
  ] }) }),
904
- /* @__PURE__ */ e.jsx("main", { className: "max-w-container mx-auto p-6 fade-in", children: r })
1001
+ /* @__PURE__ */ e.jsx("main", { className: "dq-main fade-in", children: t })
905
1002
  ] });
906
1003
  }
907
- function Ee({ title: r, subtitle: t, actions: n }) {
908
- return /* @__PURE__ */ e.jsxs("div", { className: "flex items-start justify-between mb-6 gap-4 flex-wrap", children: [
1004
+ function Oe({ title: t, subtitle: s, actions: a }) {
1005
+ return /* @__PURE__ */ e.jsxs("div", { className: "page-header", children: [
909
1006
  /* @__PURE__ */ e.jsxs("div", { children: [
910
- /* @__PURE__ */ e.jsx("h1", { className: "text-2xl font-semibold text-gray-900 flex items-center gap-2 flex-wrap", children: r }),
911
- t && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-1", children: t })
1007
+ /* @__PURE__ */ e.jsx("h1", { className: "page-title", children: t }),
1008
+ s && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-1", children: s })
912
1009
  ] }),
913
- n && /* @__PURE__ */ e.jsx("div", { className: "flex gap-2", children: n })
1010
+ a && /* @__PURE__ */ e.jsx("div", { className: "flex gap-2", children: a })
914
1011
  ] });
915
1012
  }
916
- function Y({ variant: r = "gray", className: t, children: n, ...a }) {
917
- return /* @__PURE__ */ e.jsx("span", { className: $("badge", `badge-${r}`, t), ...a, children: n });
1013
+ function re({ variant: t = "gray", className: s, children: a, ...n }) {
1014
+ return /* @__PURE__ */ e.jsx("span", { className: q("badge", `badge-${t}`, s), ...n, children: a });
918
1015
  }
919
- const D = Xe(
920
- ({ variant: r = "secondary", size: t = "default", loading: n, className: a, children: u, disabled: o, ...d }, i) => /* @__PURE__ */ e.jsxs(
1016
+ const $ = ht(
1017
+ ({ variant: t = "secondary", size: s = "default", loading: a, className: n, children: l, disabled: o, ...c }, i) => /* @__PURE__ */ e.jsxs(
921
1018
  "button",
922
1019
  {
923
1020
  ref: i,
924
- className: $(
1021
+ className: q(
925
1022
  "btn",
926
- r === "ghost-danger" ? "btn-ghost-danger" : `btn-${r}`,
927
- t === "sm" && "btn-sm",
928
- a
1023
+ t === "ghost-danger" ? "btn-ghost-danger" : `btn-${t}`,
1024
+ s === "sm" && "btn-sm",
1025
+ n
929
1026
  ),
930
- disabled: o || n,
931
- ...d,
1027
+ disabled: o || a,
1028
+ ...c,
932
1029
  children: [
933
- n && /* @__PURE__ */ e.jsx(I, {}),
934
- u
1030
+ a && /* @__PURE__ */ e.jsx(G, {}),
1031
+ l
935
1032
  ]
936
1033
  }
937
1034
  )
938
1035
  );
939
- D.displayName = "Button";
940
- function b({ className: r, children: t, ...n }) {
941
- return /* @__PURE__ */ e.jsx("div", { className: $("card", r), ...n, children: t });
1036
+ $.displayName = "Button";
1037
+ function N({ className: t, children: s, ...a }) {
1038
+ return /* @__PURE__ */ e.jsx("div", { className: q("card", t), ...a, children: s });
942
1039
  }
943
- function W({ className: r, children: t, ...n }) {
944
- return /* @__PURE__ */ e.jsx("div", { className: $("card-header", r), ...n, children: t });
1040
+ function Y({ className: t, children: s, ...a }) {
1041
+ return /* @__PURE__ */ e.jsx("div", { className: q("card-header", t), ...a, children: s });
945
1042
  }
946
- function G({ className: r, children: t, ...n }) {
947
- return /* @__PURE__ */ e.jsx("h3", { className: $("card-title", r), ...n, children: t });
1043
+ function H({ className: t, children: s, ...a }) {
1044
+ return /* @__PURE__ */ e.jsx("h3", { className: q("card-title", t), ...a, children: s });
948
1045
  }
949
- function nt({ variant: r = "info", className: t, children: n, ...a }) {
950
- return /* @__PURE__ */ e.jsx("div", { className: $("alert", `alert-${r}`, t), ...a, children: n });
1046
+ function Pr({ variant: t = "info", className: s, children: a, ...n }) {
1047
+ return /* @__PURE__ */ e.jsx("div", { className: q("alert", `alert-${t}`, s), ...n, children: a });
951
1048
  }
952
- function I({ className: r, ...t }) {
953
- return /* @__PURE__ */ e.jsx("span", { className: $("spinner", r), ...t });
1049
+ function G({ className: t, ...s }) {
1050
+ return /* @__PURE__ */ e.jsx("span", { className: q("spinner", t), ...s });
954
1051
  }
955
- function he({ message: r, hint: t, className: n, ...a }) {
956
- return /* @__PURE__ */ e.jsxs("div", { className: $("empty-state", n), ...a, children: [
957
- /* @__PURE__ */ e.jsx("p", { children: r }),
958
- t && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-2", children: t })
1052
+ function we({ message: t, hint: s, className: a, ...n }) {
1053
+ return /* @__PURE__ */ e.jsxs("div", { className: q("empty-state", a), ...n, children: [
1054
+ /* @__PURE__ */ e.jsx("p", { children: t }),
1055
+ s && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-2", children: s })
959
1056
  ] });
960
1057
  }
961
- function Je({ items: r, className: t, ...n }) {
962
- return /* @__PURE__ */ e.jsx("dl", { className: $("kv-list", t), ...n, children: r.map(({ label: a, value: u }) => /* @__PURE__ */ e.jsxs("div", { className: "contents", children: [
963
- /* @__PURE__ */ e.jsx("dt", { children: a }),
964
- /* @__PURE__ */ e.jsx("dd", { children: u })
965
- ] }, a)) });
1058
+ function ot({ items: t, className: s, ...a }) {
1059
+ return /* @__PURE__ */ e.jsx("dl", { className: q("kv-list", s), ...a, children: t.map(({ label: n, value: l }) => /* @__PURE__ */ e.jsxs("div", { className: "contents", children: [
1060
+ /* @__PURE__ */ e.jsx("dt", { children: n }),
1061
+ /* @__PURE__ */ e.jsx("dd", { children: l })
1062
+ ] }, n)) });
966
1063
  }
967
- function es({ open: r, onClose: t, title: n, children: a, actions: u }) {
968
- return r ? /* @__PURE__ */ e.jsx(
1064
+ function ft({ open: t, onClose: s, title: a, children: n, actions: l }) {
1065
+ return t ? /* @__PURE__ */ e.jsx(
969
1066
  "div",
970
1067
  {
971
- className: $("modal-backdrop", r && "active"),
972
- onClick: (o) => o.target === o.currentTarget && t(),
1068
+ className: q("modal-backdrop", "active"),
1069
+ onClick: (o) => o.target === o.currentTarget && s(),
973
1070
  children: /* @__PURE__ */ e.jsxs("div", { className: "modal", onClick: (o) => o.stopPropagation(), children: [
974
- /* @__PURE__ */ e.jsx("h3", { className: "modal-title", children: n }),
975
- /* @__PURE__ */ e.jsx("div", { className: "modal-body", children: a }),
976
- u && /* @__PURE__ */ e.jsx("div", { className: "modal-actions", children: u })
1071
+ /* @__PURE__ */ e.jsx("h3", { className: "modal-title", children: a }),
1072
+ /* @__PURE__ */ e.jsx("div", { className: "modal-body", children: n }),
1073
+ l && /* @__PURE__ */ e.jsx("div", { className: "modal-actions", children: l })
977
1074
  ] })
978
1075
  }
979
1076
  ) : null;
980
1077
  }
981
- function Ce({ message: r, variant: t = "info", visible: n, onClose: a }) {
982
- if (!n) return null;
983
- const u = {
1078
+ function Me({ message: t, variant: s = "info", visible: a, onClose: n }) {
1079
+ if (!a) return null;
1080
+ const l = {
984
1081
  success: "✓",
985
1082
  error: "✕",
986
1083
  info: "i"
987
- }[t], o = {
1084
+ }[s], o = {
988
1085
  success: "text-[#059669]",
989
1086
  error: "text-[#DC4A4A]",
990
1087
  info: "text-[#2563EB]"
991
- }[t];
992
- return /* @__PURE__ */ e.jsxs("div", { className: "toast", onClick: a, children: [
993
- /* @__PURE__ */ e.jsx("span", { className: $("mr-2 font-bold", o), children: u }),
994
- r
1088
+ }[s];
1089
+ return /* @__PURE__ */ e.jsxs("div", { className: "toast", onClick: n, children: [
1090
+ /* @__PURE__ */ e.jsx("span", { className: q("mr-2 font-bold", o), children: l }),
1091
+ t
995
1092
  ] });
996
1093
  }
997
- function ee({ children: r, className: t }) {
998
- return /* @__PURE__ */ e.jsx("div", { className: $("form-group", t), children: r });
1094
+ function xe({ children: t, className: s }) {
1095
+ return /* @__PURE__ */ e.jsx("div", { className: q("form-group", s), children: t });
999
1096
  }
1000
- function ie({ className: r, children: t, ...n }) {
1001
- return /* @__PURE__ */ e.jsx("label", { className: $("form-label", r), ...n, children: t });
1097
+ function ve({ className: t, children: s, ...a }) {
1098
+ return /* @__PURE__ */ e.jsx("label", { className: q("form-label", t), ...a, children: s });
1002
1099
  }
1003
- const ss = Xe(
1004
- ({ className: r, ...t }, n) => /* @__PURE__ */ e.jsx("input", { ref: n, className: $("form-input", r), ...t })
1100
+ const jt = ht(
1101
+ ({ className: t, ...s }, a) => /* @__PURE__ */ e.jsx("input", { ref: a, className: q("form-input", t), ...s })
1005
1102
  );
1006
- ss.displayName = "Input";
1007
- const de = Xe(
1008
- ({ className: r, children: t, ...n }, a) => /* @__PURE__ */ e.jsx("select", { ref: a, className: $("form-input", r), ...n, children: t })
1103
+ jt.displayName = "Input";
1104
+ const _e = ht(
1105
+ ({ className: t, children: s, ...a }, n) => /* @__PURE__ */ e.jsx("select", { ref: n, className: q("form-input", t), ...a, children: s })
1009
1106
  );
1010
- de.displayName = "Select";
1011
- function Os({ children: r, className: t }) {
1012
- return /* @__PURE__ */ e.jsx("div", { className: $("form-row", t), children: r });
1107
+ _e.displayName = "Select";
1108
+ function Kt({ children: t, className: s }) {
1109
+ return /* @__PURE__ */ e.jsx("div", { className: q("form-row", s), children: t });
1013
1110
  }
1014
- function L({ className: r, children: t, ...n }) {
1015
- return /* @__PURE__ */ e.jsx("table", { className: $("table", r), ...n, children: t });
1111
+ function B({ className: t, children: s, ...a }) {
1112
+ return /* @__PURE__ */ e.jsx("table", { className: q("table", t), ...a, children: s });
1016
1113
  }
1017
- function re({ className: r, children: t, ...n }) {
1018
- return /* @__PURE__ */ e.jsx("thead", { className: r, ...n, children: t });
1114
+ function fe({ className: t, children: s, ...a }) {
1115
+ return /* @__PURE__ */ e.jsx("thead", { className: t, ...a, children: s });
1019
1116
  }
1020
- function B({ className: r, children: t, ...n }) {
1021
- return /* @__PURE__ */ e.jsx("tbody", { className: r, ...n, children: t });
1117
+ function U({ className: t, children: s, ...a }) {
1118
+ return /* @__PURE__ */ e.jsx("tbody", { className: t, ...a, children: s });
1022
1119
  }
1023
- function j({ className: r, children: t, ...n }) {
1024
- return /* @__PURE__ */ e.jsx("tr", { className: r, ...n, children: t });
1120
+ function j({ className: t, children: s, ...a }) {
1121
+ return /* @__PURE__ */ e.jsx("tr", { className: t, ...a, children: s });
1025
1122
  }
1026
- function N({ className: r, children: t, ...n }) {
1027
- return /* @__PURE__ */ e.jsx("th", { className: r, ...n, children: t });
1123
+ function w({ className: t, children: s, ...a }) {
1124
+ return /* @__PURE__ */ e.jsx("th", { className: t, ...a, children: s });
1028
1125
  }
1029
- function c({ className: r, children: t, ...n }) {
1030
- return /* @__PURE__ */ e.jsx("td", { className: r, ...n, children: t });
1126
+ function d({ className: t, children: s, ...a }) {
1127
+ return /* @__PURE__ */ e.jsx("td", { className: t, ...a, children: s });
1031
1128
  }
1032
- function $s({ status: r }) {
1033
- const t = {
1129
+ function Jt({ status: t }) {
1130
+ const s = {
1034
1131
  FINISHED: "success",
1035
1132
  FAILED: "danger",
1133
+ KILLED: "gray",
1036
1134
  RUNNING: "warning",
1037
1135
  UNKNOWN: "gray"
1038
- }[r];
1039
- return /* @__PURE__ */ e.jsx(Y, { variant: t, children: r });
1040
- }
1041
- function rs({ runs: r, onDelete: t, loading: n, emptyHint: a, baselineRunId: u }) {
1042
- const [o, d] = T(null), i = () => {
1043
- o && t && (t(o.run_id), d(null));
1136
+ }[t];
1137
+ return /* @__PURE__ */ e.jsx(re, { variant: s, children: t });
1138
+ }
1139
+ function Ys({ createdAt: t, endedAt: s, status: a }) {
1140
+ const n = !$e(a), [l, o] = T(Date.now());
1141
+ de(() => {
1142
+ if (!n) return;
1143
+ const h = setInterval(() => o(Date.now()), 1e3);
1144
+ return () => clearInterval(h);
1145
+ }, [n]);
1146
+ const i = Ut(t, n ? void 0 : s), u = n ? Math.max(0, Math.floor((l - new Date(t).getTime()) / 1e3)) : i;
1147
+ return /* @__PURE__ */ e.jsx("span", { className: n ? "tabular-nums" : void 0, children: Wt(u) });
1148
+ }
1149
+ function pt({ runs: t, onDelete: s, loading: a, emptyHint: n, baselineRunId: l }) {
1150
+ const [o, c] = T(null), i = () => {
1151
+ o && s && (s(o.run_id), c(null));
1044
1152
  };
1045
- return r.length ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1046
- /* @__PURE__ */ e.jsxs(L, { children: [
1047
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1048
- /* @__PURE__ */ e.jsx(N, { children: "Run ID" }),
1049
- /* @__PURE__ */ e.jsx(N, { children: "Name" }),
1050
- /* @__PURE__ */ e.jsx(N, { children: "Project" }),
1051
- /* @__PURE__ */ e.jsx(N, { children: "Status" }),
1052
- /* @__PURE__ */ e.jsx(N, { children: "Created" }),
1053
- /* @__PURE__ */ e.jsx(N, { children: "Actions" })
1153
+ return t.length ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1154
+ /* @__PURE__ */ e.jsxs(B, { children: [
1155
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1156
+ /* @__PURE__ */ e.jsx(w, { children: "Run ID" }),
1157
+ /* @__PURE__ */ e.jsx(w, { children: "Name" }),
1158
+ /* @__PURE__ */ e.jsx(w, { children: "Project" }),
1159
+ /* @__PURE__ */ e.jsx(w, { children: "Status" }),
1160
+ /* @__PURE__ */ e.jsx(w, { children: "Duration" }),
1161
+ /* @__PURE__ */ e.jsx(w, { children: "Created" }),
1162
+ /* @__PURE__ */ e.jsx(w, { children: "Actions" })
1054
1163
  ] }) }),
1055
- /* @__PURE__ */ e.jsx(B, { children: r.map((f) => /* @__PURE__ */ e.jsxs(j, { children: [
1056
- /* @__PURE__ */ e.jsxs(c, { children: [
1057
- /* @__PURE__ */ e.jsx(z, { to: `/runs/${f.run_id}`, className: "font-mono", children: Q(f.run_id) }),
1058
- f.run_id === u && /* @__PURE__ */ e.jsx(Y, { variant: "info", className: "ml-2", children: "Baseline" })
1164
+ /* @__PURE__ */ e.jsx(U, { children: t.map((u) => /* @__PURE__ */ e.jsxs(j, { children: [
1165
+ /* @__PURE__ */ e.jsxs(d, { children: [
1166
+ /* @__PURE__ */ e.jsx(se, { to: `/runs/${u.run_id}`, className: "font-mono", children: oe(u.run_id) }),
1167
+ u.run_id === l && /* @__PURE__ */ e.jsx(re, { variant: "info", className: "ml-2", children: "Baseline" })
1059
1168
  ] }),
1060
- /* @__PURE__ */ e.jsx(c, { children: f.run_name || "—" }),
1061
- /* @__PURE__ */ e.jsx(c, { children: f.project }),
1062
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx($s, { status: f.status }) }),
1063
- /* @__PURE__ */ e.jsx(c, { className: "text-muted", children: Ze(f.created_at) }),
1064
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
1065
- /* @__PURE__ */ e.jsx(z, { to: `/runs/${f.run_id}`, children: /* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", children: "View" }) }),
1066
- t && /* @__PURE__ */ e.jsx(
1067
- D,
1169
+ /* @__PURE__ */ e.jsx(d, { children: u.run_name || "—" }),
1170
+ /* @__PURE__ */ e.jsx(d, { children: u.project }),
1171
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Jt, { status: u.status }) }),
1172
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: /* @__PURE__ */ e.jsx(
1173
+ Ys,
1174
+ {
1175
+ createdAt: u.created_at,
1176
+ endedAt: u.ended_at,
1177
+ status: u.status
1178
+ }
1179
+ ) }),
1180
+ /* @__PURE__ */ e.jsx(d, { className: "text-muted", children: Ye(u.created_at) }),
1181
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
1182
+ /* @__PURE__ */ e.jsx(se, { to: `/runs/${u.run_id}`, children: /* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", children: "View" }) }),
1183
+ s && /* @__PURE__ */ e.jsx(
1184
+ $,
1068
1185
  {
1069
1186
  variant: "ghost-danger",
1070
1187
  size: "sm",
1071
- onClick: () => d(f),
1072
- disabled: n,
1188
+ onClick: () => c(u),
1189
+ disabled: a,
1073
1190
  children: "Delete"
1074
1191
  }
1075
1192
  )
1076
1193
  ] }) })
1077
- ] }, f.run_id)) })
1194
+ ] }, u.run_id)) })
1078
1195
  ] }),
1079
1196
  /* @__PURE__ */ e.jsxs(
1080
- es,
1197
+ ft,
1081
1198
  {
1082
1199
  open: !!o,
1083
- onClose: () => d(null),
1200
+ onClose: () => c(null),
1084
1201
  title: "Delete Run",
1085
1202
  actions: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1086
- /* @__PURE__ */ e.jsx(D, { variant: "secondary", onClick: () => d(null), children: "Cancel" }),
1087
- /* @__PURE__ */ e.jsxs(D, { variant: "danger", onClick: i, disabled: n, children: [
1088
- n && /* @__PURE__ */ e.jsx(I, {}),
1203
+ /* @__PURE__ */ e.jsx($, { variant: "secondary", onClick: () => c(null), children: "Cancel" }),
1204
+ /* @__PURE__ */ e.jsxs($, { variant: "danger", onClick: i, disabled: a, children: [
1205
+ a && /* @__PURE__ */ e.jsx(G, {}),
1089
1206
  "Delete"
1090
1207
  ] })
1091
1208
  ] }),
1092
1209
  children: [
1093
1210
  /* @__PURE__ */ e.jsx("p", { children: "Are you sure you want to delete this run?" }),
1094
- o && /* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children: Q(o.run_id) }),
1211
+ o && /* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children: oe(o.run_id) }),
1095
1212
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-danger mt-2", children: "This action cannot be undone." })
1096
1213
  ]
1097
1214
  }
1098
1215
  )
1099
1216
  ] }) : /* @__PURE__ */ e.jsx(
1100
- he,
1217
+ we,
1101
1218
  {
1102
1219
  message: "No runs found",
1103
- hint: a ?? "Try adjusting your filters"
1220
+ hint: n ?? "Try adjusting your filters"
1104
1221
  }
1105
1222
  );
1106
1223
  }
1107
- function Tr() {
1108
- const [r, t] = $e(), { api: n } = K(), { data: a } = Le(), [u, o] = T(null), [d, i] = T({
1109
- project: r.get("project") || "",
1110
- status: r.get("status") || "",
1111
- q: r.get("q") || "",
1112
- limit: parseInt(r.get("limit") || "25", 10)
1113
- }), { data: f, loading: h, refetch: m } = Ds(d), p = Re((w) => n.deleteRun(w));
1114
- je(() => {
1115
- if (u) {
1116
- const w = setTimeout(() => o(null), 3e3);
1117
- return () => clearTimeout(w);
1118
- }
1119
- }, [u]);
1120
- const _ = _e((w, H) => {
1121
- i((O) => ({ ...O, [w]: H }));
1122
- const k = new URLSearchParams(r);
1123
- H ? k.set(w, String(H)) : k.delete(w), t(k, { replace: !0 });
1124
- }, [r, t]), U = _e(async (w) => {
1224
+ function Hs() {
1225
+ const [t, s] = He(), { api: a } = K(), { data: n } = Ke(), [l, o] = T(null), [c, i] = T({
1226
+ project: t.get("project") || "",
1227
+ status: t.get("status") || "",
1228
+ q: t.get("q") || "",
1229
+ limit: parseInt(t.get("limit") || "25", 10)
1230
+ }), { data: u, loading: h, refetch: m } = zt(c), p = Fe((g) => a.deleteRun(g));
1231
+ de(() => {
1232
+ if (l) {
1233
+ const g = setTimeout(() => o(null), 3e3);
1234
+ return () => clearTimeout(g);
1235
+ }
1236
+ }, [l]);
1237
+ const b = me((g, I) => {
1238
+ i((A) => ({ ...A, [g]: I }));
1239
+ const E = new URLSearchParams(t);
1240
+ I ? E.set(g, String(I)) : E.delete(g), s(E, { replace: !0 });
1241
+ }, [t, s]), D = me(async (g) => {
1125
1242
  try {
1126
- await p.mutate(w), o({ message: "Run deleted", variant: "success" }), m();
1243
+ await p.mutate(g), o({ message: "Run deleted", variant: "success" }), m();
1127
1244
  } catch {
1128
1245
  o({ message: "Failed to delete run", variant: "error" });
1129
1246
  }
1130
1247
  }, [p, m]);
1131
- return /* @__PURE__ */ e.jsxs(V, { children: [
1132
- /* @__PURE__ */ e.jsx(Ee, { title: "Runs" }),
1133
- /* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsxs(Os, { children: [
1134
- /* @__PURE__ */ e.jsxs(ee, { children: [
1135
- /* @__PURE__ */ e.jsx(ie, { htmlFor: "project", children: "Project" }),
1248
+ return /* @__PURE__ */ e.jsxs(Q, { children: [
1249
+ /* @__PURE__ */ e.jsx(Oe, { title: "Runs" }),
1250
+ /* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsxs(Kt, { children: [
1251
+ /* @__PURE__ */ e.jsxs(xe, { children: [
1252
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "project", children: "Project" }),
1136
1253
  /* @__PURE__ */ e.jsxs(
1137
- de,
1254
+ _e,
1138
1255
  {
1139
1256
  id: "project",
1140
- value: d.project,
1141
- onChange: (w) => _("project", w.target.value),
1257
+ value: c.project,
1258
+ onChange: (g) => b("project", g.target.value),
1142
1259
  children: [
1143
1260
  /* @__PURE__ */ e.jsx("option", { value: "", children: "All projects" }),
1144
- a?.map((w) => /* @__PURE__ */ e.jsx("option", { value: w.name, children: w.name }, w.name))
1261
+ n?.map((g) => /* @__PURE__ */ e.jsx("option", { value: g.name, children: g.name }, g.name))
1145
1262
  ]
1146
1263
  }
1147
1264
  )
1148
1265
  ] }),
1149
- /* @__PURE__ */ e.jsxs(ee, { children: [
1150
- /* @__PURE__ */ e.jsx(ie, { htmlFor: "status", children: "Status" }),
1266
+ /* @__PURE__ */ e.jsxs(xe, { children: [
1267
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "status", children: "Status" }),
1151
1268
  /* @__PURE__ */ e.jsxs(
1152
- de,
1269
+ _e,
1153
1270
  {
1154
1271
  id: "status",
1155
- value: d.status,
1156
- onChange: (w) => _("status", w.target.value),
1272
+ value: c.status,
1273
+ onChange: (g) => b("status", g.target.value),
1157
1274
  children: [
1158
1275
  /* @__PURE__ */ e.jsx("option", { value: "", children: "All" }),
1159
1276
  /* @__PURE__ */ e.jsx("option", { value: "FINISHED", children: "Finished" }),
@@ -1163,26 +1280,26 @@ function Tr() {
1163
1280
  }
1164
1281
  )
1165
1282
  ] }),
1166
- /* @__PURE__ */ e.jsxs(ee, { children: [
1167
- /* @__PURE__ */ e.jsx(ie, { htmlFor: "q", children: "Query" }),
1283
+ /* @__PURE__ */ e.jsxs(xe, { children: [
1284
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "q", children: "Query" }),
1168
1285
  /* @__PURE__ */ e.jsx(
1169
- ss,
1286
+ jt,
1170
1287
  {
1171
1288
  id: "q",
1172
- value: d.q,
1173
- onChange: (w) => _("q", w.target.value),
1289
+ value: c.q,
1290
+ onChange: (g) => b("q", g.target.value),
1174
1291
  placeholder: "metric.fidelity > 0.9"
1175
1292
  }
1176
1293
  )
1177
1294
  ] }),
1178
- /* @__PURE__ */ e.jsxs(ee, { children: [
1179
- /* @__PURE__ */ e.jsx(ie, { htmlFor: "limit", children: "Limit" }),
1295
+ /* @__PURE__ */ e.jsxs(xe, { children: [
1296
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "limit", children: "Limit" }),
1180
1297
  /* @__PURE__ */ e.jsxs(
1181
- de,
1298
+ _e,
1182
1299
  {
1183
1300
  id: "limit",
1184
- value: d.limit,
1185
- onChange: (w) => _("limit", parseInt(w.target.value, 10)),
1301
+ value: c.limit,
1302
+ onChange: (g) => b("limit", parseInt(g.target.value, 10)),
1186
1303
  children: [
1187
1304
  /* @__PURE__ */ e.jsx("option", { value: "25", children: "25" }),
1188
1305
  /* @__PURE__ */ e.jsx("option", { value: "50", children: "50" }),
@@ -1191,196 +1308,187 @@ function Tr() {
1191
1308
  }
1192
1309
  )
1193
1310
  ] }),
1194
- /* @__PURE__ */ e.jsxs(ee, { className: "flex items-end gap-2", children: [
1195
- /* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: () => m(), children: "Filter" }),
1196
- h && /* @__PURE__ */ e.jsx(I, {})
1311
+ /* @__PURE__ */ e.jsxs(xe, { className: "flex items-end gap-2", children: [
1312
+ /* @__PURE__ */ e.jsx($, { variant: "primary", onClick: () => m(), children: "Filter" }),
1313
+ h && /* @__PURE__ */ e.jsx(G, {})
1197
1314
  ] })
1198
1315
  ] }) }),
1199
- /* @__PURE__ */ e.jsx(b, { children: h && !f ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(I, {}) }) : /* @__PURE__ */ e.jsx(
1200
- rs,
1316
+ /* @__PURE__ */ e.jsx(N, { children: h && !u ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(G, {}) }) : /* @__PURE__ */ e.jsx(
1317
+ pt,
1201
1318
  {
1202
- runs: f?.runs ?? [],
1203
- onDelete: U,
1319
+ runs: u?.runs ?? [],
1320
+ onDelete: D,
1204
1321
  loading: p.loading,
1205
- baselineRunId: d.project ? a?.find((w) => w.name === d.project)?.baseline?.run_id : void 0
1322
+ baselineRunId: c.project ? n?.find((g) => g.name === c.project)?.baseline?.run_id : void 0
1206
1323
  }
1207
1324
  ) }),
1208
- u && /* @__PURE__ */ e.jsx(
1209
- Ce,
1325
+ l && /* @__PURE__ */ e.jsx(
1326
+ Me,
1210
1327
  {
1211
- message: u.message,
1212
- variant: u.variant,
1213
- visible: !!u,
1328
+ message: l.message,
1329
+ variant: l.variant,
1330
+ visible: !!l,
1214
1331
  onClose: () => o(null)
1215
1332
  }
1216
1333
  )
1217
1334
  ] });
1218
1335
  }
1219
- function Dr({ projects: r, currentWorkspace: t }) {
1220
- if (!r.length)
1336
+ function Ks({ projects: t, currentWorkspace: s }) {
1337
+ if (!t.length)
1221
1338
  return /* @__PURE__ */ e.jsx(
1222
- he,
1339
+ we,
1223
1340
  {
1224
1341
  message: "No projects yet",
1225
1342
  hint: "Projects are created automatically when you log runs"
1226
1343
  }
1227
1344
  );
1228
- const n = (a) => {
1229
- const u = new URLSearchParams({ project: a });
1230
- return t && u.set("workspace", t.id), `/runs?${u}`;
1345
+ const a = (n) => {
1346
+ const l = new URLSearchParams({ project: n });
1347
+ return s && l.set("workspace", s.id), `/runs?${l}`;
1231
1348
  };
1232
- return /* @__PURE__ */ e.jsxs(L, { children: [
1233
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1234
- /* @__PURE__ */ e.jsx(N, { children: "Project" }),
1235
- /* @__PURE__ */ e.jsx(N, { children: "Runs" }),
1236
- /* @__PURE__ */ e.jsx(N, { children: "Baseline" }),
1237
- /* @__PURE__ */ e.jsx(N, {})
1349
+ return /* @__PURE__ */ e.jsxs(B, { children: [
1350
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1351
+ /* @__PURE__ */ e.jsx(w, { children: "Project" }),
1352
+ /* @__PURE__ */ e.jsx(w, { children: "Runs" }),
1353
+ /* @__PURE__ */ e.jsx(w, { children: "Baseline" }),
1354
+ /* @__PURE__ */ e.jsx(w, {})
1238
1355
  ] }) }),
1239
- /* @__PURE__ */ e.jsx(B, { children: r.map((a) => /* @__PURE__ */ e.jsxs(j, { children: [
1240
- /* @__PURE__ */ e.jsxs(c, { children: [
1241
- /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: a.name }),
1242
- a.description && /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm", children: kr(a.description) })
1356
+ /* @__PURE__ */ e.jsx(U, { children: t.map((n) => /* @__PURE__ */ e.jsxs(j, { children: [
1357
+ /* @__PURE__ */ e.jsxs(d, { children: [
1358
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: n.name }),
1359
+ n.description && /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm", children: Os(n.description) })
1243
1360
  ] }),
1244
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(Y, { variant: "gray", children: a.run_count ?? 0 }) }),
1245
- /* @__PURE__ */ e.jsx(c, { children: a.baseline ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1246
- /* @__PURE__ */ e.jsx(z, { to: `/runs/${a.baseline.run_id}`, className: "font-mono text-sm", children: Q(a.baseline.run_id) }),
1247
- a.baseline.run_name && /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm", children: a.baseline.run_name })
1361
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(re, { variant: "gray", children: n.run_count ?? 0 }) }),
1362
+ /* @__PURE__ */ e.jsx(d, { children: n.baseline ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1363
+ /* @__PURE__ */ e.jsx(se, { to: `/runs/${n.baseline.run_id}`, className: "font-mono text-sm", children: oe(n.baseline.run_id) }),
1364
+ n.baseline.run_name && /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm", children: n.baseline.run_name })
1248
1365
  ] }) : /* @__PURE__ */ e.jsx("span", { className: "text-muted", children: "—" }) }),
1249
- /* @__PURE__ */ e.jsx(c, { className: "text-right", children: /* @__PURE__ */ e.jsx(z, { to: n(a.name), children: /* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", children: "View Runs" }) }) })
1250
- ] }, a.name)) })
1366
+ /* @__PURE__ */ e.jsx(d, { className: "text-right", children: /* @__PURE__ */ e.jsx(se, { to: a(n.name), children: /* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", children: "View Runs" }) }) })
1367
+ ] }, n.name)) })
1251
1368
  ] });
1252
1369
  }
1253
- function Ar({ groups: r }) {
1254
- return r.length ? /* @__PURE__ */ e.jsxs(L, { children: [
1255
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1256
- /* @__PURE__ */ e.jsx(N, { children: "Group ID" }),
1257
- /* @__PURE__ */ e.jsx(N, { children: "Name" }),
1258
- /* @__PURE__ */ e.jsx(N, { children: "Project" }),
1259
- /* @__PURE__ */ e.jsx(N, { children: "Runs" }),
1260
- /* @__PURE__ */ e.jsx(N, { children: "Actions" })
1370
+ function Js({ groups: t }) {
1371
+ return t.length ? /* @__PURE__ */ e.jsxs(B, { children: [
1372
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1373
+ /* @__PURE__ */ e.jsx(w, { children: "Group ID" }),
1374
+ /* @__PURE__ */ e.jsx(w, { children: "Name" }),
1375
+ /* @__PURE__ */ e.jsx(w, { children: "Project" }),
1376
+ /* @__PURE__ */ e.jsx(w, { children: "Runs" }),
1377
+ /* @__PURE__ */ e.jsx(w, { children: "Actions" })
1261
1378
  ] }) }),
1262
- /* @__PURE__ */ e.jsx(B, { children: r.map((t) => /* @__PURE__ */ e.jsxs(j, { children: [
1263
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: Q(t.group_id) }),
1264
- /* @__PURE__ */ e.jsx(c, { children: t.group_name || "—" }),
1265
- /* @__PURE__ */ e.jsx(c, { children: t.project }),
1266
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(Y, { variant: "gray", children: t.run_count }) }),
1267
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(z, { to: `/groups/${t.group_id}`, children: /* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", children: "View Runs" }) }) })
1268
- ] }, t.group_id)) })
1379
+ /* @__PURE__ */ e.jsx(U, { children: t.map((s) => /* @__PURE__ */ e.jsxs(j, { children: [
1380
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: oe(s.group_id) }),
1381
+ /* @__PURE__ */ e.jsx(d, { children: s.group_name || "—" }),
1382
+ /* @__PURE__ */ e.jsx(d, { children: s.project }),
1383
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(re, { variant: "gray", children: s.run_count }) }),
1384
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(se, { to: `/groups/${s.group_id}`, children: /* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", children: "View Runs" }) }) })
1385
+ ] }, s.group_id)) })
1269
1386
  ] }) : /* @__PURE__ */ e.jsx(
1270
- he,
1387
+ we,
1271
1388
  {
1272
1389
  message: "No groups found",
1273
1390
  hint: "Groups are created when runs have a group_id set"
1274
1391
  }
1275
1392
  );
1276
1393
  }
1277
- function Fr({
1278
- runId: r,
1279
- runName: t,
1280
- variant: n = "secondary",
1281
- size: a = "sm",
1282
- className: u = "",
1283
- apiBaseUrl: o = ""
1394
+ function Xs({
1395
+ runId: t,
1396
+ runName: s,
1397
+ variant: a = "secondary",
1398
+ size: n = "sm",
1399
+ className: l = ""
1284
1400
  }) {
1285
- const [d, i] = T({ status: "idle" }), [f, h] = T(!1), [m, p] = T(null), _ = async () => {
1401
+ const { api: o } = K(), [c, i] = T({ status: "idle" }), [u, h] = T(!1), [m, p] = T(null), b = async () => {
1286
1402
  i({ status: "preparing", message: "Preparing bundle..." }), h(!0);
1287
1403
  try {
1288
- const k = await fetch(`${o}/api/runs/${r}/export`, {
1289
- method: "POST",
1290
- headers: { "Content-Type": "application/json" }
1291
- });
1292
- if (!k.ok) {
1293
- const ne = await k.json().catch(() => ({ detail: "Export failed" }));
1294
- throw new Error(ne.detail || `Export failed: ${k.statusText}`);
1295
- }
1296
- const O = await k.json();
1404
+ const E = await o.createExport(t);
1297
1405
  i({
1298
1406
  status: "packing",
1299
1407
  message: "Creating bundle...",
1300
- artifactCount: O.artifact_count,
1301
- objectCount: O.object_count
1302
- }), i((ne) => ({
1303
- ...ne,
1408
+ artifactCount: E.artifact_count,
1409
+ objectCount: E.object_count
1410
+ }), i((y) => ({
1411
+ ...y,
1304
1412
  status: "downloading",
1305
1413
  message: "Downloading bundle..."
1306
1414
  }));
1307
- const S = await fetch(`${o}/api/runs/${r}/export/download`);
1415
+ const A = o.getExportDownloadUrl(t), S = await fetch(A, {
1416
+ credentials: "same-origin"
1417
+ });
1308
1418
  if (!S.ok)
1309
1419
  throw new Error("Download failed");
1310
- const se = await S.blob(), te = t ? `${t.replace(/[^a-zA-Z0-9_-]/g, "_")}_${r.slice(0, 8)}.zip` : `run_${r.slice(0, 8)}.zip`, J = URL.createObjectURL(se), Z = document.createElement("a");
1311
- Z.href = J, Z.download = te, document.body.appendChild(Z), Z.click(), document.body.removeChild(Z), URL.revokeObjectURL(J), i({
1420
+ const ie = await S.blob(), ce = s ? `${s.replace(/[^a-zA-Z0-9_-]/g, "_")}_${t.slice(0, 8)}.zip` : `run_${t.slice(0, 8)}.zip`, Z = URL.createObjectURL(ie), J = document.createElement("a");
1421
+ J.href = Z, J.download = ce, document.body.appendChild(J), J.click(), document.body.removeChild(J), URL.revokeObjectURL(Z), i({
1312
1422
  status: "complete",
1313
1423
  message: "Export complete!",
1314
- bundleSize: se.size,
1315
- artifactCount: O.artifact_count,
1316
- objectCount: O.object_count
1317
- }), p({ message: "Bundle downloaded successfully", variant: "success" }), setTimeout(() => {
1318
- h(!1), i({ status: "idle" });
1319
- }, 2e3);
1320
- } catch (k) {
1321
- const O = k instanceof Error ? k.message : "Export failed";
1322
- i({ status: "error", message: O }), p({ message: O, variant: "error" });
1323
- }
1324
- }, U = () => {
1325
- d.status !== "preparing" && d.status !== "packing" && d.status !== "downloading" && (h(!1), i({ status: "idle" }));
1326
- }, w = (k) => k < 1024 ? `${k} B` : k < 1024 * 1024 ? `${(k / 1024).toFixed(1)} KB` : `${(k / (1024 * 1024)).toFixed(1)} MB`, H = ["preparing", "packing", "downloading"].includes(d.status);
1424
+ bundleSize: ie.size,
1425
+ artifactCount: E.artifact_count,
1426
+ objectCount: E.object_count
1427
+ });
1428
+ } catch (E) {
1429
+ const A = E instanceof Error ? E.message : "Export failed";
1430
+ i({ status: "error", message: A }), p({ message: A, variant: "error" });
1431
+ }
1432
+ }, D = () => {
1433
+ c.status !== "preparing" && c.status !== "packing" && c.status !== "downloading" && (h(!1), i({ status: "idle" }));
1434
+ }, g = (E) => E < 1024 ? `${E} B` : E < 1024 * 1024 ? `${(E / 1024).toFixed(1)} KB` : `${(E / (1024 * 1024)).toFixed(1)} MB`, I = ["preparing", "packing", "downloading"].includes(c.status);
1327
1435
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1328
1436
  /* @__PURE__ */ e.jsxs(
1329
- D,
1437
+ $,
1330
1438
  {
1331
- variant: n,
1332
- size: a,
1333
- onClick: _,
1334
- disabled: H,
1335
- className: u,
1439
+ variant: a,
1440
+ size: n,
1441
+ onClick: b,
1442
+ disabled: I,
1443
+ className: l,
1336
1444
  children: [
1337
- H && /* @__PURE__ */ e.jsx(I, {}),
1338
- /* @__PURE__ */ e.jsx(Or, {}),
1445
+ I && /* @__PURE__ */ e.jsx(G, {}),
1446
+ /* @__PURE__ */ e.jsx(Qs, {}),
1339
1447
  "Export"
1340
1448
  ]
1341
1449
  }
1342
1450
  ),
1343
1451
  /* @__PURE__ */ e.jsx(
1344
- es,
1452
+ ft,
1345
1453
  {
1346
- open: f,
1347
- onClose: U,
1454
+ open: u,
1455
+ onClose: D,
1348
1456
  title: "Export Run",
1349
- actions: d.status === "error" || d.status === "complete" ? /* @__PURE__ */ e.jsx(D, { variant: "secondary", onClick: U, children: "Close" }) : void 0,
1457
+ actions: c.status === "error" || c.status === "complete" ? /* @__PURE__ */ e.jsx($, { variant: "secondary", onClick: D, children: "Close" }) : void 0,
1350
1458
  children: /* @__PURE__ */ e.jsxs("div", { className: "py-4", children: [
1351
1459
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3 mb-4", children: [
1352
- d.status === "error" ? /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-danger-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(Lr, {}) }) : d.status === "complete" ? /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-success-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx($r, {}) }) : /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-primary-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(I, {}) }),
1460
+ c.status === "error" ? /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-danger-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(er, {}) }) : c.status === "complete" ? /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-success-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(Zs, {}) }) : /* @__PURE__ */ e.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--dq-primary-bg)] flex items-center justify-center", children: /* @__PURE__ */ e.jsx(G, {}) }),
1353
1461
  /* @__PURE__ */ e.jsxs("div", { children: [
1354
- /* @__PURE__ */ e.jsx("p", { className: "font-medium", children: d.message }),
1355
- d.status === "error" && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-[var(--dq-text-muted)]", children: "Please try again or contact support." })
1462
+ /* @__PURE__ */ e.jsx("p", { className: "font-medium", children: c.message }),
1463
+ c.status === "error" && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-[var(--dq-text-muted)]", children: "Please try again or contact support." })
1356
1464
  ] })
1357
1465
  ] }),
1358
- (d.artifactCount !== void 0 || d.objectCount !== void 0 || d.bundleSize !== void 0) && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-wrap gap-2 mt-4", children: [
1359
- d.artifactCount !== void 0 && /* @__PURE__ */ e.jsxs(Y, { variant: "gray", children: [
1360
- d.artifactCount,
1466
+ (c.artifactCount !== void 0 || c.objectCount !== void 0 || c.bundleSize !== void 0) && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-wrap gap-2 mt-4", children: [
1467
+ c.artifactCount !== void 0 && /* @__PURE__ */ e.jsxs(re, { variant: "gray", children: [
1468
+ c.artifactCount,
1361
1469
  " artifacts"
1362
1470
  ] }),
1363
- d.objectCount !== void 0 && /* @__PURE__ */ e.jsxs(Y, { variant: "gray", children: [
1364
- d.objectCount,
1471
+ c.objectCount !== void 0 && /* @__PURE__ */ e.jsxs(re, { variant: "gray", children: [
1472
+ c.objectCount,
1365
1473
  " objects"
1366
1474
  ] }),
1367
- d.bundleSize !== void 0 && /* @__PURE__ */ e.jsx(Y, { variant: "info", children: w(d.bundleSize) })
1475
+ c.bundleSize !== void 0 && /* @__PURE__ */ e.jsx(re, { variant: "info", children: g(c.bundleSize) })
1368
1476
  ] }),
1369
1477
  /* @__PURE__ */ e.jsxs("div", { className: "mt-4 pt-4 border-t border-[var(--dq-border-light)]", children: [
1370
1478
  /* @__PURE__ */ e.jsxs("p", { className: "text-sm text-[var(--dq-text-muted)]", children: [
1371
1479
  "Run ID: ",
1372
- /* @__PURE__ */ e.jsx("code", { className: "text-xs", children: r })
1480
+ /* @__PURE__ */ e.jsx("code", { className: "text-xs", children: t })
1373
1481
  ] }),
1374
- t && /* @__PURE__ */ e.jsxs("p", { className: "text-sm text-[var(--dq-text-muted)]", children: [
1482
+ s && /* @__PURE__ */ e.jsxs("p", { className: "text-sm text-[var(--dq-text-muted)]", children: [
1375
1483
  "Name: ",
1376
- t
1484
+ s
1377
1485
  ] })
1378
1486
  ] })
1379
1487
  ] })
1380
1488
  }
1381
1489
  ),
1382
1490
  m && /* @__PURE__ */ e.jsx(
1383
- Ce,
1491
+ Me,
1384
1492
  {
1385
1493
  message: m.message,
1386
1494
  variant: m.variant,
@@ -1390,7 +1498,7 @@ function Fr({
1390
1498
  )
1391
1499
  ] });
1392
1500
  }
1393
- function Or() {
1501
+ function Qs() {
1394
1502
  return /* @__PURE__ */ e.jsxs(
1395
1503
  "svg",
1396
1504
  {
@@ -1410,7 +1518,7 @@ function Or() {
1410
1518
  }
1411
1519
  );
1412
1520
  }
1413
- function $r() {
1521
+ function Zs() {
1414
1522
  return /* @__PURE__ */ e.jsx(
1415
1523
  "svg",
1416
1524
  {
@@ -1426,7 +1534,7 @@ function $r() {
1426
1534
  }
1427
1535
  );
1428
1536
  }
1429
- function Lr() {
1537
+ function er() {
1430
1538
  return /* @__PURE__ */ e.jsxs(
1431
1539
  "svg",
1432
1540
  {
@@ -1446,403 +1554,736 @@ function Lr() {
1446
1554
  }
1447
1555
  );
1448
1556
  }
1449
- function Br() {
1450
- const { runId: r } = Qe(), t = hr(), { api: n } = K(), { data: a, loading: u, error: o, refetch: d } = As(r), { data: i, refetch: f } = Le(), [h, m] = T(!1), [p, _] = T(null), { mutate: U, loading: w } = Re(
1451
- () => n.setBaseline(a.project, a.run_id)
1452
- ), { mutate: H, loading: k } = Re(
1453
- () => n.deleteRun(r)
1454
- ), S = i?.find((y) => y.name === a?.project)?.baseline?.run_id === r;
1455
- if (je(() => {
1456
- if (p) {
1457
- const y = setTimeout(() => _(null), 3e3);
1458
- return () => clearTimeout(y);
1459
- }
1460
- }, [p]), u)
1461
- return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(I, {}) }) });
1462
- if (o || !a)
1463
- return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsx(
1464
- he,
1557
+ const F = { top: 12, right: 16, bottom: 28, left: 56 }, at = 210, Mt = 5, Lt = [
1558
+ "var(--dq-primary)",
1559
+ "var(--dq-info)",
1560
+ "var(--dq-warning)",
1561
+ "var(--dq-danger)",
1562
+ "#8B5CF6",
1563
+ "#EC4899"
1564
+ ];
1565
+ function tr(t, s) {
1566
+ const a = t / s, n = Math.pow(10, Math.floor(Math.log10(a))), l = a / n;
1567
+ return (l < 1.5 ? 1 : l < 3 ? 2 : l < 7 ? 5 : 10) * n;
1568
+ }
1569
+ function qt(t, s, a) {
1570
+ if (t === s) return [t];
1571
+ const n = tr(s - t, a), l = Math.floor(t / n) * n, o = [];
1572
+ for (let c = l; c <= s + n * 0.01; c += n)
1573
+ o.push(c);
1574
+ return o;
1575
+ }
1576
+ function sr(t) {
1577
+ const s = Math.abs(t);
1578
+ return s === 0 ? "0" : s >= 1e6 ? (t / 1e6).toFixed(1) + "M" : s >= 1e3 ? (t / 1e3).toFixed(1) + "k" : s >= 1 ? t.toFixed(s >= 100 ? 0 : s >= 10 ? 1 : 2) : t.toPrecision(3);
1579
+ }
1580
+ function rr(t, s) {
1581
+ if (t.length <= s) return t;
1582
+ const a = t.length / s, n = [t[0]];
1583
+ for (let l = 1; l < s - 1; l++) {
1584
+ const o = Math.floor(l * a), c = Math.min(Math.floor((l + 1) * a), t.length);
1585
+ let i = t[o], u = t[o];
1586
+ for (let h = o; h < c; h++)
1587
+ t[h].value < i.value && (i = t[h]), t[h].value > u.value && (u = t[h]);
1588
+ i.step <= u.step ? (n.push(i), i !== u && n.push(u)) : (n.push(u), i !== u && n.push(i));
1589
+ }
1590
+ return n.push(t[t.length - 1]), n;
1591
+ }
1592
+ function nr(t) {
1593
+ const [s, a] = T(0);
1594
+ return de(() => {
1595
+ const n = t.current;
1596
+ if (!n) return;
1597
+ const l = new ResizeObserver((o) => {
1598
+ const c = o[0]?.contentRect.width;
1599
+ c && c > 0 && a(Math.floor(c));
1600
+ });
1601
+ return l.observe(n), a(Math.floor(n.getBoundingClientRect().width) || 0), () => l.disconnect();
1602
+ }, [t]), s;
1603
+ }
1604
+ function ar({ x: t, y: s, value: a, step: n, chartWidth: l }) {
1605
+ const c = `${a} step ${n}`.length * 6.2 + 16, i = 22, u = 8;
1606
+ let h = s - i - u;
1607
+ h < 2 && (h = s + u + 4);
1608
+ let m = t - c / 2;
1609
+ return m = Math.max(F.left, Math.min(m, l - F.right - c)), /* @__PURE__ */ e.jsxs("g", { pointerEvents: "none", children: [
1610
+ /* @__PURE__ */ e.jsx(
1611
+ "rect",
1612
+ {
1613
+ x: m,
1614
+ y: h,
1615
+ width: c,
1616
+ height: i,
1617
+ rx: 4,
1618
+ fill: "var(--dq-bg-primary)",
1619
+ stroke: "var(--dq-border-color)",
1620
+ strokeWidth: 1
1621
+ }
1622
+ ),
1623
+ /* @__PURE__ */ e.jsxs(
1624
+ "text",
1625
+ {
1626
+ x: m + 8,
1627
+ y: h + i / 2,
1628
+ dominantBaseline: "central",
1629
+ fontSize: 11,
1630
+ className: "fill-[var(--dq-text-primary)]",
1631
+ fontFamily: "ui-monospace, monospace",
1632
+ children: [
1633
+ /* @__PURE__ */ e.jsx("tspan", { children: a }),
1634
+ /* @__PURE__ */ e.jsxs("tspan", { dx: 8, className: "fill-[var(--dq-text-muted)]", children: [
1635
+ "step ",
1636
+ n
1637
+ ] })
1638
+ ]
1639
+ }
1640
+ )
1641
+ ] });
1642
+ }
1643
+ function ir({ metricKey: t, points: s, color: a }) {
1644
+ const n = De(null), l = De(null), o = nr(n), [c, i] = T(null), u = ke(
1645
+ () => [...s].sort((y, W) => y.step - W.step),
1646
+ [s]
1647
+ ), h = o - F.left - F.right, m = at - F.top - F.bottom, p = ke(
1648
+ () => h > 0 ? rr(u, h) : u,
1649
+ [u, h]
1650
+ ), { xMin: b, xMax: D, yMin: g, yMax: I } = ke(() => {
1651
+ let y = 1 / 0, W = -1 / 0;
1652
+ for (const V of u)
1653
+ V.value < y && (y = V.value), V.value > W && (W = V.value);
1654
+ const ue = (W - y) * 0.05 || 0.1;
1655
+ return {
1656
+ xMin: u[0]?.step ?? 0,
1657
+ xMax: u[u.length - 1]?.step ?? 1,
1658
+ yMin: y - ue,
1659
+ yMax: W + ue
1660
+ };
1661
+ }, [u]), E = me(
1662
+ (y) => F.left + (y - b) / (D - b || 1) * h,
1663
+ [b, D, h]
1664
+ ), A = me(
1665
+ (y) => F.top + m - (y - g) / (I - g || 1) * m,
1666
+ [g, I, m]
1667
+ ), S = ke(
1668
+ () => p.map((y, W) => `${W === 0 ? "M" : "L"}${E(y.step).toFixed(1)},${A(y.value).toFixed(1)}`).join(" "),
1669
+ [p, E, A]
1670
+ ), ie = ke(() => qt(g, I, Mt), [g, I]), ce = ke(() => qt(b, D, Mt).map(Math.round), [b, D]), Z = me(
1671
+ (y) => {
1672
+ const W = l.current?.getBoundingClientRect();
1673
+ if (!W || !u.length) return;
1674
+ const ue = y.clientX - W.left, V = b + (ue - F.left) / h * (D - b);
1675
+ let ee = 0, je = u.length - 1;
1676
+ for (; ee < je; ) {
1677
+ const le = ee + je >> 1;
1678
+ u[le].step < V ? ee = le + 1 : je = le;
1679
+ }
1680
+ const ne = ee > 0 && Math.abs(u[ee - 1].step - V) < Math.abs(u[ee].step - V) ? ee - 1 : ee, te = u[ne];
1681
+ i({ x: E(te.step), y: A(te.value), pt: te });
1682
+ },
1683
+ [u, b, D, h, E, A]
1684
+ ), J = u[u.length - 1];
1685
+ return o < 100 ? /* @__PURE__ */ e.jsx("div", { ref: n, className: "metric-chart" }) : /* @__PURE__ */ e.jsxs("div", { ref: n, className: "metric-chart", children: [
1686
+ /* @__PURE__ */ e.jsxs("div", { className: "metric-chart-header", children: [
1687
+ /* @__PURE__ */ e.jsx("span", { className: "metric-chart-label", style: { color: a }, children: t }),
1688
+ J && /* @__PURE__ */ e.jsxs("span", { className: "metric-chart-latest", children: [
1689
+ "latest: ",
1690
+ lt(J.value),
1691
+ " @ step ",
1692
+ J.step
1693
+ ] })
1694
+ ] }),
1695
+ /* @__PURE__ */ e.jsxs(
1696
+ "svg",
1697
+ {
1698
+ ref: l,
1699
+ width: o,
1700
+ height: at,
1701
+ className: "metric-chart-svg",
1702
+ onMouseMove: Z,
1703
+ onMouseLeave: () => i(null),
1704
+ children: [
1705
+ ie.map((y) => /* @__PURE__ */ e.jsx(
1706
+ "line",
1707
+ {
1708
+ x1: F.left,
1709
+ x2: o - F.right,
1710
+ y1: A(y),
1711
+ y2: A(y),
1712
+ stroke: "var(--dq-border-color)",
1713
+ strokeWidth: 0.5,
1714
+ strokeDasharray: "3,3"
1715
+ },
1716
+ `gy-${y}`
1717
+ )),
1718
+ ce.map((y) => /* @__PURE__ */ e.jsx(
1719
+ "line",
1720
+ {
1721
+ x1: E(y),
1722
+ x2: E(y),
1723
+ y1: F.top,
1724
+ y2: F.top + m,
1725
+ stroke: "var(--dq-border-color)",
1726
+ strokeWidth: 0.5,
1727
+ strokeDasharray: "3,3"
1728
+ },
1729
+ `gx-${y}`
1730
+ )),
1731
+ /* @__PURE__ */ e.jsx(
1732
+ "line",
1733
+ {
1734
+ x1: F.left,
1735
+ y1: F.top,
1736
+ x2: F.left,
1737
+ y2: F.top + m,
1738
+ stroke: "var(--dq-border-color)",
1739
+ strokeWidth: 1
1740
+ }
1741
+ ),
1742
+ /* @__PURE__ */ e.jsx(
1743
+ "line",
1744
+ {
1745
+ x1: F.left,
1746
+ y1: F.top + m,
1747
+ x2: o - F.right,
1748
+ y2: F.top + m,
1749
+ stroke: "var(--dq-border-color)",
1750
+ strokeWidth: 1
1751
+ }
1752
+ ),
1753
+ ie.map((y) => /* @__PURE__ */ e.jsx(
1754
+ "text",
1755
+ {
1756
+ x: F.left - 6,
1757
+ y: A(y),
1758
+ textAnchor: "end",
1759
+ dominantBaseline: "middle",
1760
+ className: "fill-[var(--dq-text-muted)]",
1761
+ fontSize: 10,
1762
+ children: sr(y)
1763
+ },
1764
+ y
1765
+ )),
1766
+ ce.map((y) => /* @__PURE__ */ e.jsx(
1767
+ "text",
1768
+ {
1769
+ x: E(y),
1770
+ y: at - 4,
1771
+ textAnchor: "middle",
1772
+ className: "fill-[var(--dq-text-muted)]",
1773
+ fontSize: 10,
1774
+ children: y
1775
+ },
1776
+ y
1777
+ )),
1778
+ /* @__PURE__ */ e.jsx(
1779
+ "path",
1780
+ {
1781
+ d: S,
1782
+ fill: "none",
1783
+ stroke: a,
1784
+ strokeWidth: 1.5,
1785
+ strokeLinejoin: "round",
1786
+ strokeLinecap: "round"
1787
+ }
1788
+ ),
1789
+ c && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1790
+ /* @__PURE__ */ e.jsx(
1791
+ "line",
1792
+ {
1793
+ x1: c.x,
1794
+ x2: c.x,
1795
+ y1: F.top,
1796
+ y2: F.top + m,
1797
+ stroke: "var(--dq-text-muted)",
1798
+ strokeWidth: 1,
1799
+ strokeDasharray: "3,3",
1800
+ opacity: 0.4
1801
+ }
1802
+ ),
1803
+ /* @__PURE__ */ e.jsx("circle", { cx: c.x, cy: c.y, r: 3.5, fill: a }),
1804
+ /* @__PURE__ */ e.jsx(
1805
+ ar,
1806
+ {
1807
+ x: c.x,
1808
+ y: c.y,
1809
+ value: lt(c.pt.value),
1810
+ step: c.pt.step,
1811
+ chartWidth: o
1812
+ }
1813
+ )
1814
+ ] })
1815
+ ]
1816
+ }
1817
+ )
1818
+ ] });
1819
+ }
1820
+ const ze = 6;
1821
+ function cr({ series: t }) {
1822
+ const s = Object.keys(t).sort(), [a, n] = T(0);
1823
+ if (!s.length) return null;
1824
+ const l = Math.ceil(s.length / ze), o = s.slice(a * ze, (a + 1) * ze);
1825
+ return /* @__PURE__ */ e.jsxs("div", { children: [
1826
+ /* @__PURE__ */ e.jsx("div", { className: "metric-charts-grid", children: o.map((c, i) => /* @__PURE__ */ e.jsx(
1827
+ ir,
1828
+ {
1829
+ metricKey: c,
1830
+ points: t[c],
1831
+ color: Lt[(a * ze + i) % Lt.length]
1832
+ },
1833
+ c
1834
+ )) }),
1835
+ l > 1 && /* @__PURE__ */ e.jsxs("div", { className: "metric-charts-pagination", children: [
1836
+ /* @__PURE__ */ e.jsx(
1837
+ "button",
1838
+ {
1839
+ className: "metric-charts-page-btn",
1840
+ onClick: () => n((c) => c - 1),
1841
+ disabled: a === 0,
1842
+ children: "‹ Prev"
1843
+ }
1844
+ ),
1845
+ /* @__PURE__ */ e.jsxs("span", { className: "metric-charts-page-info", children: [
1846
+ a + 1,
1847
+ " / ",
1848
+ l
1849
+ ] }),
1850
+ /* @__PURE__ */ e.jsx(
1851
+ "button",
1852
+ {
1853
+ className: "metric-charts-page-btn",
1854
+ onClick: () => n((c) => c + 1),
1855
+ disabled: a >= l - 1,
1856
+ children: "Next ›"
1857
+ }
1858
+ )
1859
+ ] })
1860
+ ] });
1861
+ }
1862
+ function lr({ createdAt: t, endedAt: s, status: a }) {
1863
+ const n = !$e(a), [l, o] = T(Date.now());
1864
+ de(() => {
1865
+ if (!n) return;
1866
+ const i = setInterval(() => o(Date.now()), 1e3);
1867
+ return () => clearInterval(i);
1868
+ }, [n]);
1869
+ const c = n ? Math.max(0, Math.floor((l - new Date(t).getTime()) / 1e3)) : Ut(t, s);
1870
+ return /* @__PURE__ */ e.jsx("span", { className: n ? "tabular-nums" : void 0, children: Wt(c) });
1871
+ }
1872
+ function or() {
1873
+ const { runId: t } = xt(), s = Es(), { api: a } = K(), { data: n, loading: l, error: o, refetch: c } = Yt(t), { data: i, refetch: u } = Ke(), h = n ? !$e(n.status) : !1, { data: m } = Gs(t, h), [p, b] = T(!1), [D, g] = T(null), { mutate: I, loading: E } = Fe(
1874
+ () => a.setBaseline(n.project, n.run_id)
1875
+ ), { mutate: A, loading: S } = Fe(
1876
+ () => a.deleteRun(t)
1877
+ ), ce = i?.find((C) => C.name === n?.project)?.baseline?.run_id === t;
1878
+ if (de(() => {
1879
+ if (D) {
1880
+ const C = setTimeout(() => g(null), 3e3);
1881
+ return () => clearTimeout(C);
1882
+ }
1883
+ }, [D]), l)
1884
+ return /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(G, {}) }) });
1885
+ if (o || !n)
1886
+ return /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(
1887
+ we,
1465
1888
  {
1466
1889
  message: "Run not found",
1467
- hint: o?.message || `Run ${r} does not exist`
1890
+ hint: o?.message || `Run ${t} does not exist`
1468
1891
  }
1469
1892
  ) }) });
1470
- const se = a.backend || {}, te = a.fingerprints || {}, J = a.data?.params || {}, Z = a.data?.metrics || {}, ne = a.data?.tags || {}, xe = a.artifacts || [], pe = a.errors || [], Be = async () => {
1893
+ const Z = n.backend || {}, J = n.fingerprints || {}, y = n.data?.params || {}, W = n.data?.metrics || {}, ue = n.data?.tags || {}, V = n.artifacts || [], ee = n.errors || [], je = async () => {
1471
1894
  try {
1472
- await U(), await f(), d(), _({ message: "Baseline updated", variant: "success" });
1895
+ await I(), await u(), c(), g({ message: "Baseline updated", variant: "success" });
1473
1896
  } catch {
1474
- _({ message: "Failed to set baseline", variant: "error" });
1897
+ g({ message: "Failed to set baseline", variant: "error" });
1475
1898
  }
1476
- }, Ie = async () => {
1899
+ }, ne = async () => {
1477
1900
  try {
1478
- await H(), m(!1), _({ message: "Run deleted", variant: "success" }), setTimeout(() => t("/runs"), 1e3);
1901
+ await A(), b(!1), g({ message: "Run deleted", variant: "success" }), setTimeout(() => s("/runs"), 1e3);
1479
1902
  } catch {
1480
- _({ message: "Failed to delete run", variant: "error" }), m(!1);
1903
+ g({ message: "Failed to delete run", variant: "error" }), b(!1);
1481
1904
  }
1482
- }, ke = async (y) => {
1483
- const P = xe[y];
1905
+ }, te = async (C) => {
1906
+ const L = V[C];
1484
1907
  try {
1485
- const ce = n.getArtifactDownloadUrl(a.run_id, y), ge = await fetch(ce);
1486
- if (!ge.ok) throw new Error("Download failed");
1487
- const Se = await ge.blob(), le = document.createElement("a");
1488
- le.href = URL.createObjectURL(Se), le.download = P?.kind || `artifact-${y}`, le.click(), URL.revokeObjectURL(le.href), _({ message: "Download started", variant: "success" });
1489
- } catch {
1490
- _({ message: "Download failed", variant: "error" });
1491
- }
1492
- };
1493
- return /* @__PURE__ */ e.jsxs(V, { children: [
1494
- S && /* @__PURE__ */ e.jsxs("div", { className: "mb-4 px-4 py-3 bg-[#EFF6FF] border border-[#2563EB]/20 rounded-md text-[#2563EB] text-sm font-medium", children: [
1908
+ const pe = a.getArtifactDownloadUrl(n.run_id, C), he = await fetch(pe);
1909
+ if (!he.ok) {
1910
+ const qe = {
1911
+ 404: "Artifact not found",
1912
+ 403: "Permission denied"
1913
+ };
1914
+ throw new Error(
1915
+ qe[he.status] ?? (he.status >= 500 ? "Server error" : `Download failed (${he.status})`)
1916
+ );
1917
+ }
1918
+ const Le = await he.blob(), ye = document.createElement("a");
1919
+ ye.href = URL.createObjectURL(Le), ye.download = L?.kind || `artifact-${C}`, ye.click(), URL.revokeObjectURL(ye.href), g({ message: "Download complete", variant: "success" });
1920
+ } catch (pe) {
1921
+ const he = pe instanceof Error && pe.message ? pe.message : "Download failed";
1922
+ g({ message: he, variant: "error" });
1923
+ }
1924
+ }, le = [
1925
+ { label: "Project", value: /* @__PURE__ */ e.jsx(se, { to: `/runs?project=${n.project}`, children: n.project }) },
1926
+ { label: "Name", value: n.run_name || "—" },
1927
+ { label: "Adapter", value: n.adapter || "N/A" },
1928
+ { label: "Status", value: /* @__PURE__ */ e.jsx(Jt, { status: n.status }) },
1929
+ { label: "Created", value: `${n.created_at} (${Ye(n.created_at)})` },
1930
+ {
1931
+ label: "Duration",
1932
+ value: /* @__PURE__ */ e.jsx(lr, { createdAt: n.created_at, endedAt: n.ended_at, status: n.status })
1933
+ },
1934
+ ...n.ended_at ? [{ label: "Ended", value: `${n.ended_at} (${Ye(n.ended_at)})` }] : [],
1935
+ { label: "Backend", value: Z.name || "N/A" },
1936
+ ...n.group_id ? [{
1937
+ label: "Group",
1938
+ value: /* @__PURE__ */ e.jsx(se, { to: `/groups/${n.group_id}`, children: n.group_name || oe(n.group_id) })
1939
+ }] : []
1940
+ ];
1941
+ return /* @__PURE__ */ e.jsxs(Q, { children: [
1942
+ ce && /* @__PURE__ */ e.jsxs("div", { className: "mb-4 px-4 py-3 bg-[#EFF6FF] border border-[#2563EB]/20 rounded-md text-[#2563EB] text-sm font-medium", children: [
1495
1943
  'This run is the current baseline for project "',
1496
- a.project,
1944
+ n.project,
1497
1945
  '"'
1498
1946
  ] }),
1499
1947
  /* @__PURE__ */ e.jsxs("div", { className: "page-header", children: [
1500
1948
  /* @__PURE__ */ e.jsxs("div", { children: [
1501
- /* @__PURE__ */ e.jsx("h1", { className: "page-title", children: a.run_name || "Unnamed Run" }),
1502
- /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm font-mono", children: a.run_id })
1949
+ /* @__PURE__ */ e.jsx("h1", { className: "page-title", children: n.run_name || "Unnamed Run" }),
1950
+ /* @__PURE__ */ e.jsx("p", { className: "text-muted text-sm font-mono", children: n.run_id })
1503
1951
  ] }),
1504
1952
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
1505
- /* @__PURE__ */ e.jsx(Fr, { runId: a.run_id, runName: a.run_name }),
1506
- !S && /* @__PURE__ */ e.jsxs(D, { variant: "secondary", size: "sm", onClick: Be, disabled: w, children: [
1507
- w && /* @__PURE__ */ e.jsx(I, {}),
1953
+ /* @__PURE__ */ e.jsx(Xs, { runId: n.run_id, runName: n.run_name }),
1954
+ !ce && /* @__PURE__ */ e.jsxs($, { variant: "secondary", size: "sm", onClick: je, disabled: E, children: [
1955
+ E && /* @__PURE__ */ e.jsx(G, {}),
1508
1956
  "Set as Baseline"
1509
1957
  ] }),
1510
- /* @__PURE__ */ e.jsx(D, { variant: "ghost-danger", size: "sm", onClick: () => m(!0), children: "Delete" })
1958
+ /* @__PURE__ */ e.jsx($, { variant: "ghost-danger", size: "sm", onClick: () => b(!0), children: "Delete" })
1511
1959
  ] })
1512
1960
  ] }),
1513
1961
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
1514
- /* @__PURE__ */ e.jsxs(b, { children: [
1515
- /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Overview" }) }),
1516
- /* @__PURE__ */ e.jsx(Je, { items: [
1517
- { label: "Project", value: /* @__PURE__ */ e.jsx(z, { to: `/runs?project=${a.project}`, children: a.project }) },
1518
- { label: "Name", value: a.run_name || "—" },
1519
- { label: "Adapter", value: a.adapter || "N/A" },
1520
- { label: "Status", value: /* @__PURE__ */ e.jsx($s, { status: a.status }) },
1521
- { label: "Created", value: `${a.created_at} (${Ze(a.created_at)})` },
1522
- { label: "Backend", value: se.name || "N/A" },
1523
- ...a.group_id ? [{
1524
- label: "Group",
1525
- value: /* @__PURE__ */ e.jsx(z, { to: `/groups/${a.group_id}`, children: a.group_name || Q(a.group_id) })
1526
- }] : []
1527
- ] })
1962
+ /* @__PURE__ */ e.jsxs(N, { children: [
1963
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Overview" }) }),
1964
+ /* @__PURE__ */ e.jsx(ot, { items: le })
1528
1965
  ] }),
1529
- /* @__PURE__ */ e.jsxs(b, { children: [
1530
- /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Fingerprints" }) }),
1531
- /* @__PURE__ */ e.jsx(Je, { items: [
1532
- { label: "Run", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children: te.run || "N/A" }) },
1533
- { label: "Program", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children: te.program || "N/A" }) }
1966
+ /* @__PURE__ */ e.jsxs(N, { children: [
1967
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Fingerprints" }) }),
1968
+ /* @__PURE__ */ e.jsx(ot, { items: [
1969
+ { label: "Run", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children: J.run || "N/A" }) },
1970
+ { label: "Program", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm truncate", children: J.program || "N/A" }) }
1534
1971
  ] })
1535
1972
  ] })
1536
1973
  ] }),
1537
1974
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4 mb-4", children: [
1538
- /* @__PURE__ */ e.jsxs(b, { children: [
1539
- /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Parameters" }) }),
1540
- Object.keys(J).length ? /* @__PURE__ */ e.jsx(L, { children: /* @__PURE__ */ e.jsx(B, { children: Object.entries(J).map(([y, P]) => /* @__PURE__ */ e.jsxs(j, { children: [
1541
- /* @__PURE__ */ e.jsx(c, { children: y }),
1542
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(P) })
1543
- ] }, y)) }) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No parameters" })
1975
+ /* @__PURE__ */ e.jsxs(N, { children: [
1976
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Parameters" }) }),
1977
+ Object.keys(y).length ? /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsx(U, { children: Object.entries(y).map(([C, L]) => /* @__PURE__ */ e.jsxs(j, { children: [
1978
+ /* @__PURE__ */ e.jsx(d, { children: C }),
1979
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(L) })
1980
+ ] }, C)) }) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No parameters" })
1544
1981
  ] }),
1545
- /* @__PURE__ */ e.jsxs(b, { children: [
1546
- /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Metrics" }) }),
1547
- Object.keys(Z).length ? /* @__PURE__ */ e.jsx(L, { children: /* @__PURE__ */ e.jsx(B, { children: Object.entries(Z).map(([y, P]) => /* @__PURE__ */ e.jsxs(j, { children: [
1548
- /* @__PURE__ */ e.jsx(c, { children: y }),
1549
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: typeof P == "number" ? Er(P) : String(P) })
1550
- ] }, y)) }) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No metrics" })
1982
+ /* @__PURE__ */ e.jsxs(N, { children: [
1983
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Metrics" }) }),
1984
+ Object.keys(W).length ? /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsx(U, { children: Object.entries(W).map(([C, L]) => /* @__PURE__ */ e.jsxs(j, { children: [
1985
+ /* @__PURE__ */ e.jsx(d, { children: C }),
1986
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: typeof L == "number" ? lt(L) : String(L) })
1987
+ ] }, C)) }) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No metrics" })
1551
1988
  ] }),
1552
- /* @__PURE__ */ e.jsxs(b, { children: [
1553
- /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Tags" }) }),
1554
- Object.keys(ne).length ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: Object.entries(ne).map(([y, P]) => /* @__PURE__ */ e.jsxs(Y, { variant: "gray", children: [
1555
- y,
1989
+ /* @__PURE__ */ e.jsxs(N, { children: [
1990
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Tags" }) }),
1991
+ Object.keys(ue).length ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: Object.entries(ue).map(([C, L]) => /* @__PURE__ */ e.jsxs(re, { variant: "gray", children: [
1992
+ C,
1556
1993
  ": ",
1557
- String(P)
1558
- ] }, y)) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No tags" })
1994
+ String(L)
1995
+ ] }, C)) }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No tags" })
1559
1996
  ] })
1560
1997
  ] }),
1561
- /* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
1562
- /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsxs(G, { children: [
1998
+ m && /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
1999
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Metric History" }) }),
2000
+ /* @__PURE__ */ e.jsx("div", { className: "p-4", children: /* @__PURE__ */ e.jsx(cr, { series: m }) })
2001
+ ] }),
2002
+ /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
2003
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsxs(H, { children: [
1563
2004
  "Artifacts (",
1564
- xe.length,
2005
+ V.length,
1565
2006
  ")"
1566
2007
  ] }) }),
1567
- xe.length ? /* @__PURE__ */ e.jsxs(L, { children: [
1568
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1569
- /* @__PURE__ */ e.jsx(N, { children: "#" }),
1570
- /* @__PURE__ */ e.jsx(N, { children: "Kind" }),
1571
- /* @__PURE__ */ e.jsx(N, { children: "Role" }),
1572
- /* @__PURE__ */ e.jsx(N, { children: "Media Type" }),
1573
- /* @__PURE__ */ e.jsx(N, { children: "Digest" }),
1574
- /* @__PURE__ */ e.jsx(N, { children: "Actions" })
2008
+ V.length ? /* @__PURE__ */ e.jsxs(B, { children: [
2009
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2010
+ /* @__PURE__ */ e.jsx(w, { children: "#" }),
2011
+ /* @__PURE__ */ e.jsx(w, { children: "Kind" }),
2012
+ /* @__PURE__ */ e.jsx(w, { children: "Role" }),
2013
+ /* @__PURE__ */ e.jsx(w, { children: "Media Type" }),
2014
+ /* @__PURE__ */ e.jsx(w, { children: "Digest" }),
2015
+ /* @__PURE__ */ e.jsx(w, { children: "Actions" })
1575
2016
  ] }) }),
1576
- /* @__PURE__ */ e.jsx(B, { children: xe.map((y, P) => /* @__PURE__ */ e.jsxs(j, { children: [
1577
- /* @__PURE__ */ e.jsx(c, { children: P }),
1578
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: y.kind }),
1579
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(Y, { variant: "gray", children: y.role }) }),
1580
- /* @__PURE__ */ e.jsx(c, { className: "text-muted text-sm", children: y.media_type }),
1581
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: He(y.digest) }),
1582
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
1583
- /* @__PURE__ */ e.jsx(z, { to: `/runs/${a.run_id}/artifacts/${P}`, children: /* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", children: "View" }) }),
1584
- /* @__PURE__ */ e.jsx(D, { variant: "secondary", size: "sm", onClick: () => ke(P), children: "Download" })
2017
+ /* @__PURE__ */ e.jsx(U, { children: V.map((C, L) => /* @__PURE__ */ e.jsxs(j, { children: [
2018
+ /* @__PURE__ */ e.jsx(d, { children: L }),
2019
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: C.kind }),
2020
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(re, { variant: "gray", children: C.role }) }),
2021
+ /* @__PURE__ */ e.jsx(d, { className: "text-muted text-sm", children: C.media_type }),
2022
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: ct(C.digest) }),
2023
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
2024
+ /* @__PURE__ */ e.jsx(se, { to: `/runs/${n.run_id}/artifacts/${L}`, children: /* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", children: "View" }) }),
2025
+ /* @__PURE__ */ e.jsx($, { variant: "secondary", size: "sm", onClick: () => te(L), children: "Download" })
1585
2026
  ] }) })
1586
- ] }, P)) })
2027
+ ] }, L)) })
1587
2028
  ] }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No artifacts" })
1588
2029
  ] }),
1589
- pe.length > 0 && /* @__PURE__ */ e.jsxs(b, { children: [
1590
- /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { className: "text-danger", children: "Errors" }) }),
1591
- pe.map((y, P) => /* @__PURE__ */ e.jsxs("div", { className: "mb-2", children: [
1592
- /* @__PURE__ */ e.jsx("strong", { children: y.type }),
2030
+ ee.length > 0 && /* @__PURE__ */ e.jsxs(N, { children: [
2031
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { className: "text-danger", children: "Errors" }) }),
2032
+ ee.map((C, L) => /* @__PURE__ */ e.jsxs("div", { className: "mb-2", children: [
2033
+ /* @__PURE__ */ e.jsx("strong", { children: C.type }),
1593
2034
  ": ",
1594
- y.message,
1595
- y.traceback && /* @__PURE__ */ e.jsx("pre", { className: "mt-2", children: y.traceback })
1596
- ] }, P))
2035
+ C.message,
2036
+ C.traceback && /* @__PURE__ */ e.jsx("pre", { className: "mt-2", children: C.traceback })
2037
+ ] }, L))
1597
2038
  ] }),
1598
2039
  /* @__PURE__ */ e.jsxs(
1599
- es,
2040
+ ft,
1600
2041
  {
1601
- open: h,
1602
- onClose: () => m(!1),
2042
+ open: p,
2043
+ onClose: () => b(!1),
1603
2044
  title: "Delete Run",
1604
2045
  actions: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1605
- /* @__PURE__ */ e.jsx(D, { variant: "secondary", onClick: () => m(!1), children: "Cancel" }),
1606
- /* @__PURE__ */ e.jsxs(D, { variant: "danger", onClick: Ie, disabled: k, children: [
1607
- k && /* @__PURE__ */ e.jsx(I, {}),
2046
+ /* @__PURE__ */ e.jsx($, { variant: "secondary", onClick: () => b(!1), children: "Cancel" }),
2047
+ /* @__PURE__ */ e.jsxs($, { variant: "danger", onClick: ne, disabled: S, children: [
2048
+ S && /* @__PURE__ */ e.jsx(G, {}),
1608
2049
  "Delete"
1609
2050
  ] })
1610
2051
  ] }),
1611
2052
  children: [
1612
2053
  /* @__PURE__ */ e.jsx("p", { children: "Are you sure you want to delete this run?" }),
1613
- /* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children: Q(a.run_id) }),
2054
+ /* @__PURE__ */ e.jsx("p", { className: "font-mono text-sm mt-2", children: oe(n.run_id) }),
1614
2055
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-danger mt-2", children: "This action cannot be undone." })
1615
2056
  ]
1616
2057
  }
1617
2058
  ),
1618
- p && /* @__PURE__ */ e.jsx(
1619
- Ce,
2059
+ D && /* @__PURE__ */ e.jsx(
2060
+ Me,
1620
2061
  {
1621
- message: p.message,
1622
- variant: p.variant,
1623
- visible: !!p,
1624
- onClose: () => _(null)
2062
+ message: D.message,
2063
+ variant: D.variant,
2064
+ visible: !!D,
2065
+ onClose: () => g(null)
1625
2066
  }
1626
2067
  )
1627
2068
  ] });
1628
2069
  }
1629
- function Ir() {
1630
- const { currentWorkspace: r } = K(), { data: t, loading: n } = Le();
1631
- return /* @__PURE__ */ e.jsxs(V, { children: [
1632
- /* @__PURE__ */ e.jsx(Ee, { title: "Projects" }),
1633
- /* @__PURE__ */ e.jsx(b, { children: n ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(I, {}) }) : /* @__PURE__ */ e.jsx(Dr, { projects: t ?? [], currentWorkspace: r }) })
2070
+ function dr() {
2071
+ const { currentWorkspace: t } = K(), { data: s, loading: a } = Ke();
2072
+ return /* @__PURE__ */ e.jsxs(Q, { children: [
2073
+ /* @__PURE__ */ e.jsx(Oe, { title: "Projects" }),
2074
+ /* @__PURE__ */ e.jsx(N, { children: a ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(G, {}) }) : /* @__PURE__ */ e.jsx(Ks, { projects: s ?? [], currentWorkspace: t }) })
1634
2075
  ] });
1635
2076
  }
1636
- function qr() {
1637
- const [r, t] = $e(), { data: n } = Le(), [a, u] = T(r.get("project") || ""), { data: o, loading: d, refetch: i } = Nr({ project: a || void 0 }), f = _e((h) => {
1638
- u(h);
1639
- const m = new URLSearchParams(r);
1640
- h ? m.set("project", h) : m.delete("project"), t(m, { replace: !0 });
1641
- }, [r, t]);
1642
- return /* @__PURE__ */ e.jsxs(V, { children: [
1643
- /* @__PURE__ */ e.jsx(Ee, { title: "Run Groups" }),
1644
- /* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsxs(Os, { children: [
1645
- /* @__PURE__ */ e.jsxs(ee, { children: [
1646
- /* @__PURE__ */ e.jsx(ie, { htmlFor: "project", children: "Project" }),
2077
+ function ur() {
2078
+ const [t, s] = He(), { data: a } = Ke(), [n, l] = T(t.get("project") || ""), { data: o, loading: c, refetch: i } = Is({ project: n || void 0 }), u = me((h) => {
2079
+ l(h);
2080
+ const m = new URLSearchParams(t);
2081
+ h ? m.set("project", h) : m.delete("project"), s(m, { replace: !0 });
2082
+ }, [t, s]);
2083
+ return /* @__PURE__ */ e.jsxs(Q, { children: [
2084
+ /* @__PURE__ */ e.jsx(Oe, { title: "Run Groups" }),
2085
+ /* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsxs(Kt, { children: [
2086
+ /* @__PURE__ */ e.jsxs(xe, { children: [
2087
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "project", children: "Project" }),
1647
2088
  /* @__PURE__ */ e.jsxs(
1648
- de,
2089
+ _e,
1649
2090
  {
1650
2091
  id: "project",
1651
- value: a,
1652
- onChange: (h) => f(h.target.value),
2092
+ value: n,
2093
+ onChange: (h) => u(h.target.value),
1653
2094
  children: [
1654
2095
  /* @__PURE__ */ e.jsx("option", { value: "", children: "All projects" }),
1655
- n?.map((h) => /* @__PURE__ */ e.jsx("option", { value: h.name, children: h.name }, h.name))
2096
+ a?.map((h) => /* @__PURE__ */ e.jsx("option", { value: h.name, children: h.name }, h.name))
1656
2097
  ]
1657
2098
  }
1658
2099
  )
1659
2100
  ] }),
1660
- /* @__PURE__ */ e.jsxs(ee, { className: "flex items-end gap-2", children: [
1661
- /* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: () => i(), children: "Filter" }),
1662
- d && /* @__PURE__ */ e.jsx(I, {})
2101
+ /* @__PURE__ */ e.jsxs(xe, { className: "flex items-end gap-2", children: [
2102
+ /* @__PURE__ */ e.jsx($, { variant: "primary", onClick: () => i(), children: "Filter" }),
2103
+ c && /* @__PURE__ */ e.jsx(G, {})
1663
2104
  ] })
1664
2105
  ] }) }),
1665
- /* @__PURE__ */ e.jsx(b, { children: d && !o ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(I, {}) }) : /* @__PURE__ */ e.jsx(Ar, { groups: o ?? [] }) })
2106
+ /* @__PURE__ */ e.jsx(N, { children: c && !o ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(G, {}) }) : /* @__PURE__ */ e.jsx(Js, { groups: o ?? [] }) })
1666
2107
  ] });
1667
2108
  }
1668
- function Ur() {
1669
- const { groupId: r } = Qe(), { api: t } = K(), { data: n, loading: a, error: u, refetch: o } = _r(r), [d, i] = T(null), f = Re((m) => t.deleteRun(m));
1670
- je(() => {
1671
- if (d) {
2109
+ function hr() {
2110
+ const { groupId: t } = xt(), { api: s } = K(), { data: a, loading: n, error: l, refetch: o } = Bs(t), [c, i] = T(null), u = Fe((m) => s.deleteRun(m));
2111
+ de(() => {
2112
+ if (c) {
1672
2113
  const m = setTimeout(() => i(null), 3e3);
1673
2114
  return () => clearTimeout(m);
1674
2115
  }
1675
- }, [d]);
2116
+ }, [c]);
1676
2117
  const h = async (m) => {
1677
2118
  try {
1678
- await f.mutate(m), i({ message: "Run deleted", variant: "success" }), o();
2119
+ await u.mutate(m), i({ message: "Run deleted", variant: "success" }), o();
1679
2120
  } catch {
1680
2121
  i({ message: "Failed to delete run", variant: "error" });
1681
2122
  }
1682
2123
  };
1683
- return a ? /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(I, {}) }) }) : u || !n ? /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsx(he, { message: "Group not found", hint: u?.message }) }) }) : /* @__PURE__ */ e.jsxs(V, { children: [
2124
+ return n ? /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(G, {}) }) }) : l || !a ? /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(we, { message: "Group not found", hint: l?.message }) }) }) : /* @__PURE__ */ e.jsxs(Q, { children: [
1684
2125
  /* @__PURE__ */ e.jsx(
1685
- Ee,
2126
+ Oe,
1686
2127
  {
1687
2128
  title: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1688
2129
  "Group ",
1689
- /* @__PURE__ */ e.jsx("span", { className: "font-mono", children: Q(r) })
2130
+ /* @__PURE__ */ e.jsx("span", { className: "font-mono", children: oe(t) })
1690
2131
  ] }),
1691
- subtitle: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-muted", children: r })
2132
+ subtitle: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-muted", children: t })
1692
2133
  }
1693
2134
  ),
1694
- /* @__PURE__ */ e.jsxs(b, { children: [
1695
- /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsxs(G, { children: [
2135
+ /* @__PURE__ */ e.jsxs(N, { children: [
2136
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsxs(H, { children: [
1696
2137
  "Runs in Group (",
1697
- n.runs.length,
2138
+ a.runs.length,
1698
2139
  ")"
1699
2140
  ] }) }),
1700
2141
  /* @__PURE__ */ e.jsx(
1701
- rs,
2142
+ pt,
1702
2143
  {
1703
- runs: n.runs,
2144
+ runs: a.runs,
1704
2145
  onDelete: h,
1705
- loading: f.loading
2146
+ loading: u.loading
1706
2147
  }
1707
2148
  )
1708
2149
  ] }),
1709
- d && /* @__PURE__ */ e.jsx(
1710
- Ce,
2150
+ c && /* @__PURE__ */ e.jsx(
2151
+ Me,
1711
2152
  {
1712
- message: d.message,
1713
- variant: d.variant,
1714
- visible: !!d,
2153
+ message: c.message,
2154
+ variant: c.variant,
2155
+ visible: !!c,
1715
2156
  onClose: () => i(null)
1716
2157
  }
1717
2158
  )
1718
2159
  ] });
1719
2160
  }
1720
- function Mr({ className: r = "" }) {
1721
- return /* @__PURE__ */ e.jsx("svg", { className: r, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e.jsx("polyline", { points: "20 6 9 17 4 12" }) });
2161
+ function xr({ className: t = "" }) {
2162
+ return /* @__PURE__ */ e.jsx("svg", { className: t, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e.jsx("polyline", { points: "20 6 9 17 4 12" }) });
1722
2163
  }
1723
- function Wr({ className: r = "" }) {
1724
- return /* @__PURE__ */ e.jsxs("svg", { className: r, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
2164
+ function mr({ className: t = "" }) {
2165
+ return /* @__PURE__ */ e.jsxs("svg", { className: t, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
1725
2166
  /* @__PURE__ */ e.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
1726
2167
  /* @__PURE__ */ e.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
1727
2168
  ] });
1728
2169
  }
1729
- function Gr({ className: r = "" }) {
1730
- return /* @__PURE__ */ e.jsxs("svg", { className: r, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2170
+ function fr({ className: t = "" }) {
2171
+ return /* @__PURE__ */ e.jsxs("svg", { className: t, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1731
2172
  /* @__PURE__ */ e.jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
1732
2173
  /* @__PURE__ */ e.jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
1733
2174
  /* @__PURE__ */ e.jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
1734
2175
  ] });
1735
2176
  }
1736
- function Ke({ className: r = "" }) {
1737
- return /* @__PURE__ */ e.jsxs("svg", { className: r, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
2177
+ function it({ className: t = "" }) {
2178
+ return /* @__PURE__ */ e.jsxs("svg", { className: t, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1738
2179
  /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "10" }),
1739
2180
  /* @__PURE__ */ e.jsx("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
1740
2181
  /* @__PURE__ */ e.jsx("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
1741
2182
  ] });
1742
2183
  }
1743
- function Ne({ match: r }) {
1744
- return r ? /* @__PURE__ */ e.jsxs("span", { className: "diff-match inline-flex items-center gap-1.5", children: [
1745
- /* @__PURE__ */ e.jsx(Mr, { className: "flex-shrink-0" }),
2184
+ function Pe({ match: t }) {
2185
+ return t ? /* @__PURE__ */ e.jsxs("span", { className: "diff-match inline-flex items-center gap-1.5", children: [
2186
+ /* @__PURE__ */ e.jsx(xr, { className: "flex-shrink-0" }),
1746
2187
  /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: "Match" })
1747
2188
  ] }) : /* @__PURE__ */ e.jsxs("span", { className: "diff-mismatch inline-flex items-center gap-1.5", children: [
1748
- /* @__PURE__ */ e.jsx(Wr, { className: "flex-shrink-0" }),
2189
+ /* @__PURE__ */ e.jsx(mr, { className: "flex-shrink-0" }),
1749
2190
  /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: "Different" })
1750
2191
  ] });
1751
2192
  }
1752
- function Vr({ warnings: r }) {
1753
- return !r || r.length === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "alert alert-warning mb-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-3", children: [
1754
- /* @__PURE__ */ e.jsx(Gr, { className: "flex-shrink-0 mt-0.5" }),
2193
+ function jr({ warnings: t }) {
2194
+ return !t || t.length === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "alert alert-warning mb-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-3", children: [
2195
+ /* @__PURE__ */ e.jsx(fr, { className: "flex-shrink-0 mt-0.5" }),
1755
2196
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1", children: [
1756
- /* @__PURE__ */ e.jsx("p", { className: "font-semibold mb-1", children: r.length === 1 ? "Warning" : `${r.length} Warnings` }),
1757
- /* @__PURE__ */ e.jsx("ul", { className: "space-y-1", children: r.map((t, n) => /* @__PURE__ */ e.jsx("li", { className: "text-sm", children: t }, n)) })
2197
+ /* @__PURE__ */ e.jsx("p", { className: "font-semibold mb-1", children: t.length === 1 ? "Warning" : `${t.length} Warnings` }),
2198
+ /* @__PURE__ */ e.jsx("ul", { className: "space-y-1", children: t.map((s, a) => /* @__PURE__ */ e.jsx("li", { className: "text-sm", children: s }, a)) })
1758
2199
  ] })
1759
2200
  ] }) });
1760
2201
  }
1761
- function Cs({
1762
- label: r,
1763
- run: t,
1764
- variant: n
2202
+ function It({
2203
+ label: t,
2204
+ run: s,
2205
+ variant: a
1765
2206
  }) {
1766
2207
  return /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1767
- /* @__PURE__ */ e.jsx("div", { className: `absolute top-0 left-0 w-1 h-full rounded-l ${n === "a" ? "bg-info" : "bg-primary"}` }),
2208
+ /* @__PURE__ */ e.jsx("div", { className: `absolute top-0 left-0 w-1 h-full rounded-l ${a === "a" ? "bg-info" : "bg-primary"}` }),
1768
2209
  /* @__PURE__ */ e.jsxs("div", { className: "pl-4", children: [
1769
- /* @__PURE__ */ e.jsx("p", { className: `text-xs font-semibold uppercase tracking-wider mb-2 ${n === "a" ? "text-info" : "text-primary"}`, children: r }),
1770
- /* @__PURE__ */ e.jsx(z, { to: `/runs/${t.run_id}`, className: "text-base font-medium hover:underline", children: t.run_name || "Unnamed Run" }),
1771
- /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs mt-1 text-muted", children: Q(t.run_id) }),
2210
+ /* @__PURE__ */ e.jsx("p", { className: `text-xs font-semibold uppercase tracking-wider mb-2 ${a === "a" ? "text-info" : "text-primary"}`, children: t }),
2211
+ /* @__PURE__ */ e.jsx(se, { to: `/runs/${s.run_id}`, className: "text-base font-medium hover:underline", children: s.run_name || "Unnamed Run" }),
2212
+ /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs mt-1 text-muted", children: oe(s.run_id) }),
1772
2213
  /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-1 text-muted", children: [
1773
- t.project,
2214
+ s.project,
1774
2215
  " · ",
1775
- Ze(t.created_at)
2216
+ Ye(s.created_at)
1776
2217
  ] })
1777
2218
  ] })
1778
2219
  ] });
1779
2220
  }
1780
- function ae({
1781
- children: r,
1782
- badge: t
2221
+ function ge({
2222
+ children: t,
2223
+ badge: s
1783
2224
  }) {
1784
- return /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-2 flex-wrap", children: [
1785
- r,
1786
- t && /* @__PURE__ */ e.jsx(Y, { variant: t.variant, children: t.label })
2225
+ return /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-2 flex-wrap", children: [
2226
+ t,
2227
+ s && /* @__PURE__ */ e.jsx(re, { variant: s.variant, children: s.label })
1787
2228
  ] }) }) });
1788
2229
  }
1789
- function zr({
1790
- tvd: r,
1791
- noiseContext: t
2230
+ function pr({
2231
+ tvd: t,
2232
+ noiseContext: s
1792
2233
  }) {
1793
- if (r === 0)
2234
+ if (t === 0)
1794
2235
  return /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-4 text-success", children: "✓ Distributions are identical (TVD = 0)" });
1795
- if (!t) return null;
1796
- const { p_value: n, noise_ratio: a } = t;
1797
- return n != null ? n >= 0.1 ? /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-4 text-success", children: "✓ Consistent with sampling noise — difference is not statistically significant" }) : n >= 0.05 ? /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-warning", children: [
2236
+ if (!s) return null;
2237
+ const { p_value: a, noise_ratio: n } = s;
2238
+ return a != null ? a >= 0.1 ? /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-4 text-success", children: "✓ Consistent with sampling noise — difference is not statistically significant" }) : a >= 0.05 ? /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-warning", children: [
1798
2239
  "⚠ Borderline (p=",
1799
- n.toFixed(2),
2240
+ a.toFixed(2),
1800
2241
  ") — consider increasing shots"
1801
2242
  ] }) : /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-danger", children: [
1802
2243
  "✗ Statistically significant difference (p=",
1803
- n.toFixed(2),
2244
+ a.toFixed(2),
1804
2245
  ") — results show meaningful divergence"
1805
- ] }) : a != null ? a < 1.5 ? /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-4 text-success", children: "✓ TVD is within expected shot noise range" }) : a < 3 ? /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-warning", children: [
2246
+ ] }) : n != null ? n < 1.5 ? /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-4 text-success", children: "✓ TVD is within expected shot noise range" }) : n < 3 ? /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-warning", children: [
1806
2247
  "⚠ Ambiguous (",
1807
- a.toFixed(1),
2248
+ n.toFixed(1),
1808
2249
  "× expected noise) — consider increasing shots"
1809
2250
  ] }) : /* @__PURE__ */ e.jsxs("p", { className: "text-sm mt-4 text-danger", children: [
1810
2251
  "✗ TVD exceeds expected noise (",
1811
- a.toFixed(1),
2252
+ n.toFixed(1),
1812
2253
  "×) — results show meaningful differences"
1813
2254
  ] }) : null;
1814
2255
  }
1815
- function Yr() {
1816
- const [r, t] = $e(), { data: n } = Ds({ limit: 100 }), a = n?.runs ?? [], [u, o] = T(r.get("a") || ""), [d, i] = T(r.get("b") || ""), [f, h] = T(""), m = (p) => {
1817
- if (p.preventDefault(), !u || !d) {
2256
+ function gr() {
2257
+ const [t, s] = He(), { data: a } = zt({ limit: 100 }), n = a?.runs ?? [], [l, o] = T(t.get("a") || ""), [c, i] = T(t.get("b") || ""), [u, h] = T(""), m = (p) => {
2258
+ if (p.preventDefault(), !l || !c) {
1818
2259
  h("Please select both runs to compare");
1819
2260
  return;
1820
2261
  }
1821
- if (u === d) {
2262
+ if (l === c) {
1822
2263
  h("Please select two different runs");
1823
2264
  return;
1824
2265
  }
1825
- h(""), t({ a: u, b: d });
2266
+ h(""), s({ a: l, b: c });
1826
2267
  };
1827
2268
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1828
- /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsxs("form", { onSubmit: m, children: [
2269
+ /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsxs("form", { onSubmit: m, children: [
1829
2270
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
1830
- /* @__PURE__ */ e.jsxs(ee, { children: [
1831
- /* @__PURE__ */ e.jsx(ie, { htmlFor: "a", children: "Run A (Baseline)" }),
2271
+ /* @__PURE__ */ e.jsxs(xe, { children: [
2272
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "a", children: "Run A (Baseline)" }),
1832
2273
  /* @__PURE__ */ e.jsxs(
1833
- de,
2274
+ _e,
1834
2275
  {
1835
2276
  id: "a",
1836
- value: u,
2277
+ value: l,
1837
2278
  onChange: (p) => {
1838
2279
  o(p.target.value), h("");
1839
2280
  },
1840
2281
  children: [
1841
2282
  /* @__PURE__ */ e.jsx("option", { value: "", children: "Select run..." }),
1842
- a.map((p) => /* @__PURE__ */ e.jsxs("option", { value: p.run_id, children: [
2283
+ n.map((p) => /* @__PURE__ */ e.jsxs("option", { value: p.run_id, children: [
1843
2284
  p.run_name || "Unnamed",
1844
2285
  " (",
1845
- Q(p.run_id),
2286
+ oe(p.run_id),
1846
2287
  ") — ",
1847
2288
  p.project
1848
2289
  ] }, p.run_id))
@@ -1850,22 +2291,22 @@ function Yr() {
1850
2291
  }
1851
2292
  )
1852
2293
  ] }),
1853
- /* @__PURE__ */ e.jsxs(ee, { children: [
1854
- /* @__PURE__ */ e.jsx(ie, { htmlFor: "b", children: "Run B (Candidate)" }),
2294
+ /* @__PURE__ */ e.jsxs(xe, { children: [
2295
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "b", children: "Run B (Candidate)" }),
1855
2296
  /* @__PURE__ */ e.jsxs(
1856
- de,
2297
+ _e,
1857
2298
  {
1858
2299
  id: "b",
1859
- value: d,
2300
+ value: c,
1860
2301
  onChange: (p) => {
1861
2302
  i(p.target.value), h("");
1862
2303
  },
1863
2304
  children: [
1864
2305
  /* @__PURE__ */ e.jsx("option", { value: "", children: "Select run..." }),
1865
- a.map((p) => /* @__PURE__ */ e.jsxs("option", { value: p.run_id, children: [
2306
+ n.map((p) => /* @__PURE__ */ e.jsxs("option", { value: p.run_id, children: [
1866
2307
  p.run_name || "Unnamed",
1867
2308
  " (",
1868
- Q(p.run_id),
2309
+ oe(p.run_id),
1869
2310
  ") — ",
1870
2311
  p.project
1871
2312
  ] }, p.run_id))
@@ -1874,100 +2315,100 @@ function Yr() {
1874
2315
  )
1875
2316
  ] })
1876
2317
  ] }),
1877
- f && /* @__PURE__ */ e.jsx("p", { className: "text-sm mb-3 text-danger", children: f }),
1878
- /* @__PURE__ */ e.jsx(D, { type: "submit", variant: "primary", children: "Compare" })
2318
+ u && /* @__PURE__ */ e.jsx("p", { className: "text-sm mb-3 text-danger", children: u }),
2319
+ /* @__PURE__ */ e.jsx($, { type: "submit", variant: "primary", children: "Compare" })
1879
2320
  ] }) }),
1880
- /* @__PURE__ */ e.jsxs(b, { className: "mt-4", children: [
1881
- /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "How it works" }) }),
2321
+ /* @__PURE__ */ e.jsxs(N, { className: "mt-4", children: [
2322
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "How it works" }) }),
1882
2323
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2 text-sm text-muted", children: [
1883
2324
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
1884
- /* @__PURE__ */ e.jsx(Ke, { className: "flex-shrink-0 mt-0.5" }),
2325
+ /* @__PURE__ */ e.jsx(it, { className: "flex-shrink-0 mt-0.5" }),
1885
2326
  /* @__PURE__ */ e.jsx("span", { children: "Select two runs to compare their parameters, metrics, and artifacts" })
1886
2327
  ] }),
1887
2328
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
1888
- /* @__PURE__ */ e.jsx(Ke, { className: "flex-shrink-0 mt-0.5" }),
2329
+ /* @__PURE__ */ e.jsx(it, { className: "flex-shrink-0 mt-0.5" }),
1889
2330
  /* @__PURE__ */ e.jsx("span", { children: "The diff shows changed values and computes TVD for result distributions" })
1890
2331
  ] }),
1891
2332
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
1892
- /* @__PURE__ */ e.jsx(Ke, { className: "flex-shrink-0 mt-0.5" }),
2333
+ /* @__PURE__ */ e.jsx(it, { className: "flex-shrink-0 mt-0.5" }),
1893
2334
  /* @__PURE__ */ e.jsx("span", { children: "You can also compare from the run detail page" })
1894
2335
  ] })
1895
2336
  ] })
1896
2337
  ] })
1897
2338
  ] });
1898
2339
  }
1899
- function Kr({ runIdA: r, runIdB: t }) {
1900
- const { data: n, loading: a, error: u } = wr(r, t);
1901
- if (a)
1902
- return /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center justify-center py-12 gap-3", children: [
1903
- /* @__PURE__ */ e.jsx(I, {}),
2340
+ function vr({ runIdA: t, runIdB: s }) {
2341
+ const { data: a, loading: n, error: l } = Us(t, s);
2342
+ if (n)
2343
+ return /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col items-center justify-center py-12 gap-3", children: [
2344
+ /* @__PURE__ */ e.jsx(G, {}),
1904
2345
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted", children: "Comparing runs..." })
1905
2346
  ] }) });
1906
- if (u || !n)
1907
- return /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsx(he, { message: "Failed to load diff", hint: u?.message }) });
1908
- const { run_a: o, run_b: d, report: i } = n, f = i.device_drift?.significant_drift ? { variant: "warning", label: "Drift Detected" } : i.device_drift?.has_calibration_data ? { variant: "success", label: "Stable" } : { variant: "gray", label: "No Data" };
2347
+ if (l || !a)
2348
+ return /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(we, { message: "Failed to load diff", hint: l?.message }) });
2349
+ const { run_a: o, run_b: c, report: i } = a, u = i.device_drift?.significant_drift ? { variant: "warning", label: "Drift Detected" } : i.device_drift?.has_calibration_data ? { variant: "success", label: "Stable" } : { variant: "gray", label: "No Data" };
1909
2350
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1910
- /* @__PURE__ */ e.jsx(Vr, { warnings: i.warnings || [] }),
1911
- /* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
1912
- /* @__PURE__ */ e.jsx(Cs, { label: "Run A (Baseline)", run: o, variant: "a" }),
1913
- /* @__PURE__ */ e.jsx(Cs, { label: "Run B (Candidate)", run: d, variant: "b" })
2351
+ /* @__PURE__ */ e.jsx(jr, { warnings: i.warnings || [] }),
2352
+ /* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [
2353
+ /* @__PURE__ */ e.jsx(It, { label: "Run A (Baseline)", run: o, variant: "a" }),
2354
+ /* @__PURE__ */ e.jsx(It, { label: "Run B (Candidate)", run: c, variant: "b" })
1914
2355
  ] }) }),
1915
2356
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
1916
- /* @__PURE__ */ e.jsxs(b, { children: [
1917
- /* @__PURE__ */ e.jsx(ae, { children: "Metadata" }),
1918
- /* @__PURE__ */ e.jsx(L, { children: /* @__PURE__ */ e.jsxs(B, { children: [
2357
+ /* @__PURE__ */ e.jsxs(N, { children: [
2358
+ /* @__PURE__ */ e.jsx(ge, { children: "Metadata" }),
2359
+ /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
1919
2360
  /* @__PURE__ */ e.jsxs(j, { children: [
1920
- /* @__PURE__ */ e.jsx(c, { children: "Project" }),
1921
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(Ne, { match: i.metadata.project_match }) })
2361
+ /* @__PURE__ */ e.jsx(d, { children: "Project" }),
2362
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.metadata.project_match }) })
1922
2363
  ] }),
1923
2364
  /* @__PURE__ */ e.jsxs(j, { children: [
1924
- /* @__PURE__ */ e.jsx(c, { children: "Backend" }),
1925
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(Ne, { match: i.metadata.backend_match }) })
2365
+ /* @__PURE__ */ e.jsx(d, { children: "Backend" }),
2366
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.metadata.backend_match }) })
1926
2367
  ] }),
1927
2368
  !i.metadata.project_match && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1928
2369
  /* @__PURE__ */ e.jsxs(j, { children: [
1929
- /* @__PURE__ */ e.jsx(c, { className: "text-sm text-muted", children: "Project A" }),
1930
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: i.metadata.project_a || "N/A" })
2370
+ /* @__PURE__ */ e.jsx(d, { className: "text-sm text-muted", children: "Project A" }),
2371
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: i.metadata.project_a || "N/A" })
1931
2372
  ] }),
1932
2373
  /* @__PURE__ */ e.jsxs(j, { children: [
1933
- /* @__PURE__ */ e.jsx(c, { className: "text-sm text-muted", children: "Project B" }),
1934
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: i.metadata.project_b || "N/A" })
2374
+ /* @__PURE__ */ e.jsx(d, { className: "text-sm text-muted", children: "Project B" }),
2375
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: i.metadata.project_b || "N/A" })
1935
2376
  ] })
1936
2377
  ] }),
1937
2378
  !i.metadata.backend_match && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1938
2379
  /* @__PURE__ */ e.jsxs(j, { children: [
1939
- /* @__PURE__ */ e.jsx(c, { className: "text-sm text-muted", children: "Backend A" }),
1940
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: i.metadata.backend_a || "N/A" })
2380
+ /* @__PURE__ */ e.jsx(d, { className: "text-sm text-muted", children: "Backend A" }),
2381
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: i.metadata.backend_a || "N/A" })
1941
2382
  ] }),
1942
2383
  /* @__PURE__ */ e.jsxs(j, { children: [
1943
- /* @__PURE__ */ e.jsx(c, { className: "text-sm text-muted", children: "Backend B" }),
1944
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: i.metadata.backend_b || "N/A" })
2384
+ /* @__PURE__ */ e.jsx(d, { className: "text-sm text-muted", children: "Backend B" }),
2385
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: i.metadata.backend_b || "N/A" })
1945
2386
  ] })
1946
2387
  ] })
1947
2388
  ] }) })
1948
2389
  ] }),
1949
- /* @__PURE__ */ e.jsxs(b, { children: [
1950
- /* @__PURE__ */ e.jsx(ae, { children: "Fingerprints" }),
1951
- /* @__PURE__ */ e.jsx(L, { children: /* @__PURE__ */ e.jsxs(B, { children: [
2390
+ /* @__PURE__ */ e.jsxs(N, { children: [
2391
+ /* @__PURE__ */ e.jsx(ge, { children: "Fingerprints" }),
2392
+ /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
1952
2393
  /* @__PURE__ */ e.jsxs(j, { children: [
1953
- /* @__PURE__ */ e.jsx(c, { children: "Run A" }),
1954
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: He(i.fingerprints.a) })
2394
+ /* @__PURE__ */ e.jsx(d, { children: "Run A" }),
2395
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: ct(i.fingerprints.a) })
1955
2396
  ] }),
1956
2397
  /* @__PURE__ */ e.jsxs(j, { children: [
1957
- /* @__PURE__ */ e.jsx(c, { children: "Run B" }),
1958
- /* @__PURE__ */ e.jsx(c, { className: "font-mono text-sm", children: He(i.fingerprints.b) })
2398
+ /* @__PURE__ */ e.jsx(d, { children: "Run B" }),
2399
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono text-sm", children: ct(i.fingerprints.b) })
1959
2400
  ] }),
1960
2401
  /* @__PURE__ */ e.jsxs(j, { children: [
1961
- /* @__PURE__ */ e.jsx(c, { children: "Match" }),
1962
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(Ne, { match: i.fingerprints.a === i.fingerprints.b }) })
2402
+ /* @__PURE__ */ e.jsx(d, { children: "Match" }),
2403
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.fingerprints.a === i.fingerprints.b }) })
1963
2404
  ] })
1964
2405
  ] }) })
1965
2406
  ] })
1966
2407
  ] }),
1967
2408
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 mb-4", children: [
1968
- /* @__PURE__ */ e.jsxs(b, { children: [
2409
+ /* @__PURE__ */ e.jsxs(N, { children: [
1969
2410
  /* @__PURE__ */ e.jsx(
1970
- ae,
2411
+ ge,
1971
2412
  {
1972
2413
  badge: {
1973
2414
  variant: i.program.exact_match ? "success" : i.program.structural_match ? "info" : "warning",
@@ -1976,69 +2417,69 @@ function Kr({ runIdA: r, runIdB: t }) {
1976
2417
  children: "Program"
1977
2418
  }
1978
2419
  ),
1979
- /* @__PURE__ */ e.jsx(L, { children: /* @__PURE__ */ e.jsxs(B, { children: [
2420
+ /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
1980
2421
  /* @__PURE__ */ e.jsxs(j, { children: [
1981
- /* @__PURE__ */ e.jsx(c, { children: "Exact Match" }),
1982
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(Ne, { match: i.program.exact_match }) })
2422
+ /* @__PURE__ */ e.jsx(d, { children: "Exact Match" }),
2423
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.program.exact_match }) })
1983
2424
  ] }),
1984
2425
  /* @__PURE__ */ e.jsxs(j, { children: [
1985
- /* @__PURE__ */ e.jsx(c, { children: "Structural Match" }),
1986
- /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsx(Ne, { match: i.program.structural_match }) })
2426
+ /* @__PURE__ */ e.jsx(d, { children: "Structural Match" }),
2427
+ /* @__PURE__ */ e.jsx(d, { children: /* @__PURE__ */ e.jsx(Pe, { match: i.program.structural_match }) })
1987
2428
  ] })
1988
2429
  ] }) })
1989
2430
  ] }),
1990
- /* @__PURE__ */ e.jsxs(b, { children: [
1991
- /* @__PURE__ */ e.jsx(ae, { badge: f, children: "Device Calibration" }),
2431
+ /* @__PURE__ */ e.jsxs(N, { children: [
2432
+ /* @__PURE__ */ e.jsx(ge, { badge: u, children: "Device Calibration" }),
1992
2433
  i.device_drift?.significant_drift ? /* @__PURE__ */ e.jsx("p", { className: "text-sm text-warning", children: "Significant calibration drift detected between runs" }) : i.device_drift?.has_calibration_data ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "Calibration within acceptable thresholds" }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "No calibration data available" })
1993
2434
  ] })
1994
2435
  ] }),
1995
- /* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
1996
- /* @__PURE__ */ e.jsx(ae, { badge: { variant: i.params.match ? "success" : "warning", label: i.params.match ? "Match" : "Different" }, children: "Parameters" }),
1997
- i.params.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "All parameters match" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.params.changed && Object.keys(i.params.changed).length > 0 && /* @__PURE__ */ e.jsxs(L, { children: [
1998
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
1999
- /* @__PURE__ */ e.jsx(N, { children: "Parameter" }),
2000
- /* @__PURE__ */ e.jsx(N, { children: "Run A" }),
2001
- /* @__PURE__ */ e.jsx(N, { children: "Run B" })
2436
+ /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
2437
+ /* @__PURE__ */ e.jsx(ge, { badge: { variant: i.params.match ? "success" : "warning", label: i.params.match ? "Match" : "Different" }, children: "Parameters" }),
2438
+ i.params.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "All parameters match" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.params.changed && Object.keys(i.params.changed).length > 0 && /* @__PURE__ */ e.jsxs(B, { children: [
2439
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2440
+ /* @__PURE__ */ e.jsx(w, { children: "Parameter" }),
2441
+ /* @__PURE__ */ e.jsx(w, { children: "Run A" }),
2442
+ /* @__PURE__ */ e.jsx(w, { children: "Run B" })
2002
2443
  ] }) }),
2003
- /* @__PURE__ */ e.jsx(B, { children: Object.entries(i.params.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
2004
- /* @__PURE__ */ e.jsx(c, { children: h }),
2005
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(m.a) }),
2006
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(m.b) })
2444
+ /* @__PURE__ */ e.jsx(U, { children: Object.entries(i.params.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
2445
+ /* @__PURE__ */ e.jsx(d, { children: h }),
2446
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(m.a) }),
2447
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(m.b) })
2007
2448
  ] }, h)) })
2008
2449
  ] }) })
2009
2450
  ] }),
2010
- /* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
2011
- /* @__PURE__ */ e.jsx(ae, { badge: { variant: i.metrics.match ? "success" : "warning", label: i.metrics.match ? "Match" : "Different" }, children: "Metrics" }),
2012
- i.metrics.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "All metrics match" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.metrics.changed && Object.keys(i.metrics.changed).length > 0 && /* @__PURE__ */ e.jsxs(L, { children: [
2013
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2014
- /* @__PURE__ */ e.jsx(N, { children: "Metric" }),
2015
- /* @__PURE__ */ e.jsx(N, { children: "Run A" }),
2016
- /* @__PURE__ */ e.jsx(N, { children: "Run B" })
2451
+ /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
2452
+ /* @__PURE__ */ e.jsx(ge, { badge: { variant: i.metrics.match ? "success" : "warning", label: i.metrics.match ? "Match" : "Different" }, children: "Metrics" }),
2453
+ i.metrics.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "All metrics match" }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.metrics.changed && Object.keys(i.metrics.changed).length > 0 && /* @__PURE__ */ e.jsxs(B, { children: [
2454
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2455
+ /* @__PURE__ */ e.jsx(w, { children: "Metric" }),
2456
+ /* @__PURE__ */ e.jsx(w, { children: "Run A" }),
2457
+ /* @__PURE__ */ e.jsx(w, { children: "Run B" })
2017
2458
  ] }) }),
2018
- /* @__PURE__ */ e.jsx(B, { children: Object.entries(i.metrics.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
2019
- /* @__PURE__ */ e.jsx(c, { children: h }),
2020
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: m.a }),
2021
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: m.b })
2459
+ /* @__PURE__ */ e.jsx(U, { children: Object.entries(i.metrics.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
2460
+ /* @__PURE__ */ e.jsx(d, { children: h }),
2461
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: m.a }),
2462
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: m.b })
2022
2463
  ] }, h)) })
2023
2464
  ] }) })
2024
2465
  ] }),
2025
- i.circuit_diff && /* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
2026
- /* @__PURE__ */ e.jsx(ae, { badge: { variant: i.circuit_diff.match ? "success" : "warning", label: i.circuit_diff.match ? "Match" : "Different" }, children: "Circuit" }),
2466
+ i.circuit_diff && /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
2467
+ /* @__PURE__ */ e.jsx(ge, { badge: { variant: i.circuit_diff.match ? "success" : "warning", label: i.circuit_diff.match ? "Match" : "Different" }, children: "Circuit" }),
2027
2468
  i.circuit_diff.match ? /* @__PURE__ */ e.jsx("p", { className: "text-muted", children: "Circuit structure matches" }) : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
2028
2469
  i.circuit_diff.changed && Object.keys(i.circuit_diff.changed).length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
2029
2470
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "Changed Properties" }),
2030
- /* @__PURE__ */ e.jsxs(L, { children: [
2031
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2032
- /* @__PURE__ */ e.jsx(N, { children: "Property" }),
2033
- /* @__PURE__ */ e.jsx(N, { children: "Run A" }),
2034
- /* @__PURE__ */ e.jsx(N, { children: "Run B" }),
2035
- /* @__PURE__ */ e.jsx(N, { children: "Delta" })
2471
+ /* @__PURE__ */ e.jsxs(B, { children: [
2472
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2473
+ /* @__PURE__ */ e.jsx(w, { children: "Property" }),
2474
+ /* @__PURE__ */ e.jsx(w, { children: "Run A" }),
2475
+ /* @__PURE__ */ e.jsx(w, { children: "Run B" }),
2476
+ /* @__PURE__ */ e.jsx(w, { children: "Delta" })
2036
2477
  ] }) }),
2037
- /* @__PURE__ */ e.jsx(B, { children: Object.entries(i.circuit_diff.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
2038
- /* @__PURE__ */ e.jsx(c, { children: m.label || h }),
2039
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(m.a) }),
2040
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: String(m.b) }),
2041
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: m.delta != null && /* @__PURE__ */ e.jsxs("span", { className: m.delta > 0 ? "text-danger" : "text-success", children: [
2478
+ /* @__PURE__ */ e.jsx(U, { children: Object.entries(i.circuit_diff.changed).map(([h, m]) => /* @__PURE__ */ e.jsxs(j, { children: [
2479
+ /* @__PURE__ */ e.jsx(d, { children: m.label || h }),
2480
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(m.a) }),
2481
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: String(m.b) }),
2482
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: m.delta != null && /* @__PURE__ */ e.jsxs("span", { className: m.delta > 0 ? "text-danger" : "text-success", children: [
2042
2483
  m.delta > 0 ? "+" : "",
2043
2484
  m.delta,
2044
2485
  m.pct != null && ` (${m.pct > 0 ? "+" : ""}${m.pct.toFixed(1)}%)`
@@ -2048,89 +2489,89 @@ function Kr({ runIdA: r, runIdB: t }) {
2048
2489
  ] }),
2049
2490
  i.circuit_diff.is_clifford_changed && /* @__PURE__ */ e.jsxs("div", { children: [
2050
2491
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "Clifford Status" }),
2051
- /* @__PURE__ */ e.jsx(L, { children: /* @__PURE__ */ e.jsxs(B, { children: [
2492
+ /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
2052
2493
  /* @__PURE__ */ e.jsxs(j, { children: [
2053
- /* @__PURE__ */ e.jsx(c, { children: "Run A" }),
2054
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: i.circuit_diff.is_clifford_a != null ? String(i.circuit_diff.is_clifford_a) : "unknown" })
2494
+ /* @__PURE__ */ e.jsx(d, { children: "Run A" }),
2495
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: i.circuit_diff.is_clifford_a != null ? String(i.circuit_diff.is_clifford_a) : "unknown" })
2055
2496
  ] }),
2056
2497
  /* @__PURE__ */ e.jsxs(j, { children: [
2057
- /* @__PURE__ */ e.jsx(c, { children: "Run B" }),
2058
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: i.circuit_diff.is_clifford_b != null ? String(i.circuit_diff.is_clifford_b) : "unknown" })
2498
+ /* @__PURE__ */ e.jsx(d, { children: "Run B" }),
2499
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: i.circuit_diff.is_clifford_b != null ? String(i.circuit_diff.is_clifford_b) : "unknown" })
2059
2500
  ] })
2060
2501
  ] }) })
2061
2502
  ] }),
2062
2503
  i.circuit_diff.added_gates && i.circuit_diff.added_gates.length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
2063
2504
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "New Gate Types (in B)" }),
2064
- /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: i.circuit_diff.added_gates.map((h) => /* @__PURE__ */ e.jsx(Y, { variant: "success", children: h }, h)) })
2505
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: i.circuit_diff.added_gates.map((h) => /* @__PURE__ */ e.jsx(re, { variant: "success", children: h }, h)) })
2065
2506
  ] }),
2066
2507
  i.circuit_diff.removed_gates && i.circuit_diff.removed_gates.length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
2067
2508
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-medium mb-2 text-muted", children: "Removed Gate Types (from A)" }),
2068
- /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: i.circuit_diff.removed_gates.map((h) => /* @__PURE__ */ e.jsx(Y, { variant: "danger", children: h }, h)) })
2509
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1", children: i.circuit_diff.removed_gates.map((h) => /* @__PURE__ */ e.jsx(re, { variant: "danger", children: h }, h)) })
2069
2510
  ] })
2070
2511
  ] })
2071
2512
  ] }),
2072
- i.tvd != null && /* @__PURE__ */ e.jsxs(b, { className: "mb-4", children: [
2073
- /* @__PURE__ */ e.jsx(ae, { children: "Results Distribution" }),
2074
- /* @__PURE__ */ e.jsx(L, { children: /* @__PURE__ */ e.jsxs(B, { children: [
2513
+ i.tvd != null && /* @__PURE__ */ e.jsxs(N, { className: "mb-4", children: [
2514
+ /* @__PURE__ */ e.jsx(ge, { children: "Results Distribution" }),
2515
+ /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
2075
2516
  /* @__PURE__ */ e.jsxs(j, { children: [
2076
- /* @__PURE__ */ e.jsx(c, { children: "Total Variation Distance (TVD)" }),
2077
- /* @__PURE__ */ e.jsx(c, { className: "font-mono font-medium", children: i.tvd.toFixed(6) })
2517
+ /* @__PURE__ */ e.jsx(d, { children: "Total Variation Distance (TVD)" }),
2518
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono font-medium", children: i.tvd.toFixed(6) })
2078
2519
  ] }),
2079
2520
  i.shots && /* @__PURE__ */ e.jsxs(j, { children: [
2080
- /* @__PURE__ */ e.jsx(c, { children: "Total Shots (A / B)" }),
2081
- /* @__PURE__ */ e.jsxs(c, { className: "font-mono", children: [
2521
+ /* @__PURE__ */ e.jsx(d, { children: "Total Shots (A / B)" }),
2522
+ /* @__PURE__ */ e.jsxs(d, { className: "font-mono", children: [
2082
2523
  i.shots.a,
2083
2524
  " / ",
2084
2525
  i.shots.b
2085
2526
  ] })
2086
2527
  ] }),
2087
2528
  i.noise_context?.noise_p95 && /* @__PURE__ */ e.jsxs(j, { children: [
2088
- /* @__PURE__ */ e.jsx(c, { children: "Noise Threshold (p95)" }),
2089
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: i.noise_context.noise_p95.toFixed(6) })
2529
+ /* @__PURE__ */ e.jsx(d, { children: "Noise Threshold (p95)" }),
2530
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: i.noise_context.noise_p95.toFixed(6) })
2090
2531
  ] }),
2091
2532
  i.noise_context?.p_value != null && /* @__PURE__ */ e.jsxs(j, { children: [
2092
- /* @__PURE__ */ e.jsx(c, { children: "p-value" }),
2093
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: i.noise_context.p_value.toFixed(4) })
2533
+ /* @__PURE__ */ e.jsx(d, { children: "p-value" }),
2534
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: i.noise_context.p_value.toFixed(4) })
2094
2535
  ] })
2095
2536
  ] }) }),
2096
- /* @__PURE__ */ e.jsx(zr, { tvd: i.tvd, noiseContext: i.noise_context })
2537
+ /* @__PURE__ */ e.jsx(pr, { tvd: i.tvd, noiseContext: i.noise_context })
2097
2538
  ] })
2098
2539
  ] });
2099
2540
  }
2100
- function Hr() {
2101
- const [r] = $e(), t = r.get("a"), n = r.get("b"), a = t && n;
2102
- return /* @__PURE__ */ e.jsxs(V, { children: [
2541
+ function br() {
2542
+ const [t] = He(), s = t.get("a"), a = t.get("b"), n = s && a;
2543
+ return /* @__PURE__ */ e.jsxs(Q, { children: [
2103
2544
  /* @__PURE__ */ e.jsx("div", { className: "page-header", children: /* @__PURE__ */ e.jsxs("div", { children: [
2104
2545
  /* @__PURE__ */ e.jsx("h1", { className: "page-title", children: "Compare Runs" }),
2105
- a && /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-1 text-muted", children: /* @__PURE__ */ e.jsx(z, { to: "/diff", children: "← Select different runs" }) })
2546
+ n && /* @__PURE__ */ e.jsx("p", { className: "text-sm mt-1 text-muted", children: /* @__PURE__ */ e.jsx(se, { to: "/diff", children: "← Select different runs" }) })
2106
2547
  ] }) }),
2107
- a ? /* @__PURE__ */ e.jsx(Kr, { runIdA: t, runIdB: n }) : /* @__PURE__ */ e.jsx(Yr, {})
2548
+ n ? /* @__PURE__ */ e.jsx(vr, { runIdA: s, runIdB: a }) : /* @__PURE__ */ e.jsx(gr, {})
2108
2549
  ] });
2109
2550
  }
2110
- function Jr() {
2111
- const { api: r } = K(), [t, n] = T(""), [a, u] = T(null), [o, d] = T(!1), [i, f] = T(""), { mutate: h, loading: m } = Re(async () => {
2112
- const _ = await r.listRuns({ q: t, limit: 100 });
2113
- return u(_.runs), d(!0), _;
2114
- }), p = (_) => {
2115
- if (_.preventDefault(), !t.trim()) {
2116
- f("Please enter a search query");
2551
+ function yr() {
2552
+ const { api: t } = K(), [s, a] = T(""), [n, l] = T(null), [o, c] = T(!1), [i, u] = T(""), { mutate: h, loading: m } = Fe(async () => {
2553
+ const b = await t.listRuns({ q: s, limit: 100 });
2554
+ return l(b.runs), c(!0), b;
2555
+ }), p = (b) => {
2556
+ if (b.preventDefault(), !s.trim()) {
2557
+ u("Please enter a search query");
2117
2558
  return;
2118
2559
  }
2119
- f(""), h();
2560
+ u(""), h();
2120
2561
  };
2121
- return /* @__PURE__ */ e.jsxs(V, { children: [
2562
+ return /* @__PURE__ */ e.jsxs(Q, { children: [
2122
2563
  /* @__PURE__ */ e.jsx("div", { className: "page-header", children: /* @__PURE__ */ e.jsx("h1", { className: "page-title", children: "Search Runs" }) }),
2123
- /* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsxs("form", { onSubmit: p, children: [
2124
- /* @__PURE__ */ e.jsxs(ee, { children: [
2125
- /* @__PURE__ */ e.jsx(ie, { htmlFor: "q", children: "Query" }),
2564
+ /* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsxs("form", { onSubmit: p, children: [
2565
+ /* @__PURE__ */ e.jsxs(xe, { children: [
2566
+ /* @__PURE__ */ e.jsx(ve, { htmlFor: "q", children: "Query" }),
2126
2567
  /* @__PURE__ */ e.jsx(
2127
- ss,
2568
+ jt,
2128
2569
  {
2129
2570
  id: "q",
2130
2571
  type: "text",
2131
- value: t,
2132
- onChange: (_) => {
2133
- n(_.target.value), f("");
2572
+ value: s,
2573
+ onChange: (b) => {
2574
+ a(b.target.value), u("");
2134
2575
  },
2135
2576
  placeholder: "metric.fidelity > 0.95 and params.shots = 1000",
2136
2577
  className: "font-mono"
@@ -2139,284 +2580,293 @@ function Jr() {
2139
2580
  ] }),
2140
2581
  i && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-[#DC4A4A] mb-3", children: i }),
2141
2582
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center", children: [
2142
- /* @__PURE__ */ e.jsxs(D, { type: "submit", variant: "primary", disabled: m, children: [
2143
- m && /* @__PURE__ */ e.jsx(I, {}),
2583
+ /* @__PURE__ */ e.jsxs($, { type: "submit", variant: "primary", disabled: m, children: [
2584
+ m && /* @__PURE__ */ e.jsx(G, {}),
2144
2585
  "Search"
2145
2586
  ] }),
2146
2587
  m && /* @__PURE__ */ e.jsx("span", { className: "text-muted text-sm", children: "Searching..." })
2147
2588
  ] })
2148
2589
  ] }) }),
2149
- o && a && /* @__PURE__ */ e.jsx(b, { className: "mb-4", children: a.length > 0 ? /* @__PURE__ */ e.jsx(rs, { runs: a }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted text-center py-8", children: "No runs match your query" }) }),
2590
+ o && n && /* @__PURE__ */ e.jsx(N, { className: "mb-4", children: n.length > 0 ? /* @__PURE__ */ e.jsx(pt, { runs: n }) : /* @__PURE__ */ e.jsx("p", { className: "text-muted text-center py-8", children: "No runs match your query" }) }),
2150
2591
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
2151
- /* @__PURE__ */ e.jsxs(b, { children: [
2152
- /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Query Syntax" }) }),
2153
- /* @__PURE__ */ e.jsxs(L, { children: [
2154
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2155
- /* @__PURE__ */ e.jsx(N, { children: "Field" }),
2156
- /* @__PURE__ */ e.jsx(N, { children: "Description" })
2592
+ /* @__PURE__ */ e.jsxs(N, { children: [
2593
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Query Syntax" }) }),
2594
+ /* @__PURE__ */ e.jsxs(B, { children: [
2595
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2596
+ /* @__PURE__ */ e.jsx(w, { children: "Field" }),
2597
+ /* @__PURE__ */ e.jsx(w, { children: "Description" })
2157
2598
  ] }) }),
2158
- /* @__PURE__ */ e.jsxs(B, { children: [
2599
+ /* @__PURE__ */ e.jsxs(U, { children: [
2159
2600
  /* @__PURE__ */ e.jsxs(j, { children: [
2160
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "params.X" }),
2161
- /* @__PURE__ */ e.jsx(c, { children: "Parameter value" })
2601
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "params.X" }),
2602
+ /* @__PURE__ */ e.jsx(d, { children: "Parameter value" })
2162
2603
  ] }),
2163
2604
  /* @__PURE__ */ e.jsxs(j, { children: [
2164
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "metric.X" }),
2165
- /* @__PURE__ */ e.jsx(c, { children: "Metric value" })
2605
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "metric.X" }),
2606
+ /* @__PURE__ */ e.jsx(d, { children: "Metric value" })
2166
2607
  ] }),
2167
2608
  /* @__PURE__ */ e.jsxs(j, { children: [
2168
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "tags.X" }),
2169
- /* @__PURE__ */ e.jsx(c, { children: "Tag value" })
2609
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "tags.X" }),
2610
+ /* @__PURE__ */ e.jsx(d, { children: "Tag value" })
2170
2611
  ] }),
2171
2612
  /* @__PURE__ */ e.jsxs(j, { children: [
2172
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "status" }),
2173
- /* @__PURE__ */ e.jsx(c, { children: "Run status" })
2613
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "status" }),
2614
+ /* @__PURE__ */ e.jsx(d, { children: "Run status" })
2174
2615
  ] }),
2175
2616
  /* @__PURE__ */ e.jsxs(j, { children: [
2176
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "project" }),
2177
- /* @__PURE__ */ e.jsx(c, { children: "Project name" })
2617
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "project" }),
2618
+ /* @__PURE__ */ e.jsx(d, { children: "Project name" })
2178
2619
  ] }),
2179
2620
  /* @__PURE__ */ e.jsxs(j, { children: [
2180
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "backend" }),
2181
- /* @__PURE__ */ e.jsx(c, { children: "Backend name" })
2621
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "backend" }),
2622
+ /* @__PURE__ */ e.jsx(d, { children: "Backend name" })
2182
2623
  ] })
2183
2624
  ] })
2184
2625
  ] })
2185
2626
  ] }),
2186
- /* @__PURE__ */ e.jsxs(b, { children: [
2187
- /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Operators" }) }),
2188
- /* @__PURE__ */ e.jsxs(L, { children: [
2189
- /* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2190
- /* @__PURE__ */ e.jsx(N, { children: "Operator" }),
2191
- /* @__PURE__ */ e.jsx(N, { children: "Description" })
2627
+ /* @__PURE__ */ e.jsxs(N, { children: [
2628
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Operators" }) }),
2629
+ /* @__PURE__ */ e.jsxs(B, { children: [
2630
+ /* @__PURE__ */ e.jsx(fe, { children: /* @__PURE__ */ e.jsxs(j, { children: [
2631
+ /* @__PURE__ */ e.jsx(w, { children: "Operator" }),
2632
+ /* @__PURE__ */ e.jsx(w, { children: "Description" })
2192
2633
  ] }) }),
2193
- /* @__PURE__ */ e.jsxs(B, { children: [
2634
+ /* @__PURE__ */ e.jsxs(U, { children: [
2194
2635
  /* @__PURE__ */ e.jsxs(j, { children: [
2195
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "=" }),
2196
- /* @__PURE__ */ e.jsx(c, { children: "Equals" })
2636
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "=" }),
2637
+ /* @__PURE__ */ e.jsx(d, { children: "Equals" })
2197
2638
  ] }),
2198
2639
  /* @__PURE__ */ e.jsxs(j, { children: [
2199
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "!=" }),
2200
- /* @__PURE__ */ e.jsx(c, { children: "Not equals" })
2640
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "!=" }),
2641
+ /* @__PURE__ */ e.jsx(d, { children: "Not equals" })
2201
2642
  ] }),
2202
2643
  /* @__PURE__ */ e.jsxs(j, { children: [
2203
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: ">" }),
2204
- /* @__PURE__ */ e.jsx(c, { children: "Greater than" })
2644
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: ">" }),
2645
+ /* @__PURE__ */ e.jsx(d, { children: "Greater than" })
2205
2646
  ] }),
2206
2647
  /* @__PURE__ */ e.jsxs(j, { children: [
2207
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: ">=" }),
2208
- /* @__PURE__ */ e.jsx(c, { children: "Greater or equal" })
2648
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: ">=" }),
2649
+ /* @__PURE__ */ e.jsx(d, { children: "Greater or equal" })
2209
2650
  ] }),
2210
2651
  /* @__PURE__ */ e.jsxs(j, { children: [
2211
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "<" }),
2212
- /* @__PURE__ */ e.jsx(c, { children: "Less than" })
2652
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "<" }),
2653
+ /* @__PURE__ */ e.jsx(d, { children: "Less than" })
2213
2654
  ] }),
2214
2655
  /* @__PURE__ */ e.jsxs(j, { children: [
2215
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "<=" }),
2216
- /* @__PURE__ */ e.jsx(c, { children: "Less or equal" })
2656
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "<=" }),
2657
+ /* @__PURE__ */ e.jsx(d, { children: "Less or equal" })
2217
2658
  ] }),
2218
2659
  /* @__PURE__ */ e.jsxs(j, { children: [
2219
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "~" }),
2220
- /* @__PURE__ */ e.jsx(c, { children: "Contains" })
2660
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "~" }),
2661
+ /* @__PURE__ */ e.jsx(d, { children: "Contains" })
2221
2662
  ] }),
2222
2663
  /* @__PURE__ */ e.jsxs(j, { children: [
2223
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "and" }),
2224
- /* @__PURE__ */ e.jsx(c, { children: "Combine conditions" })
2664
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "and" }),
2665
+ /* @__PURE__ */ e.jsx(d, { children: "Combine conditions" })
2225
2666
  ] })
2226
2667
  ] })
2227
2668
  ] })
2228
2669
  ] })
2229
2670
  ] }),
2230
- /* @__PURE__ */ e.jsxs(b, { className: "mt-4", children: [
2231
- /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Examples" }) }),
2232
- /* @__PURE__ */ e.jsx(L, { children: /* @__PURE__ */ e.jsxs(B, { children: [
2671
+ /* @__PURE__ */ e.jsxs(N, { className: "mt-4", children: [
2672
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Examples" }) }),
2673
+ /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(U, { children: [
2233
2674
  /* @__PURE__ */ e.jsxs(j, { children: [
2234
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "metric.fidelity > 0.95" }),
2235
- /* @__PURE__ */ e.jsx(c, { children: "High fidelity runs" })
2675
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "metric.fidelity > 0.95" }),
2676
+ /* @__PURE__ */ e.jsx(d, { children: "High fidelity runs" })
2236
2677
  ] }),
2237
2678
  /* @__PURE__ */ e.jsxs(j, { children: [
2238
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "params.shots = 1000 and status = FINISHED" }),
2239
- /* @__PURE__ */ e.jsx(c, { children: "Finished runs with 1000 shots" })
2679
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "params.shots = 1000 and status = FINISHED" }),
2680
+ /* @__PURE__ */ e.jsx(d, { children: "Finished runs with 1000 shots" })
2240
2681
  ] }),
2241
2682
  /* @__PURE__ */ e.jsxs(j, { children: [
2242
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "tags.backend ~ ibm" }),
2243
- /* @__PURE__ */ e.jsx(c, { children: "Runs with IBM backends" })
2683
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "tags.backend ~ ibm" }),
2684
+ /* @__PURE__ */ e.jsx(d, { children: "Runs with IBM backends" })
2244
2685
  ] }),
2245
2686
  /* @__PURE__ */ e.jsxs(j, { children: [
2246
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "metric.error < 0.01" }),
2247
- /* @__PURE__ */ e.jsx(c, { children: "Low error runs" })
2687
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "metric.error < 0.01" }),
2688
+ /* @__PURE__ */ e.jsx(d, { children: "Low error runs" })
2248
2689
  ] }),
2249
2690
  /* @__PURE__ */ e.jsxs(j, { children: [
2250
- /* @__PURE__ */ e.jsx(c, { className: "font-mono", children: "project = vqe and metric.energy < -2.0" }),
2251
- /* @__PURE__ */ e.jsx(c, { children: "VQE runs with low energy" })
2691
+ /* @__PURE__ */ e.jsx(d, { className: "font-mono", children: "project = vqe and metric.energy < -2.0" }),
2692
+ /* @__PURE__ */ e.jsx(d, { children: "VQE runs with low energy" })
2252
2693
  ] })
2253
2694
  ] }) })
2254
2695
  ] })
2255
2696
  ] });
2256
2697
  }
2257
- function Xr() {
2258
- const { runId: r, index: t } = Qe(), n = parseInt(t, 10), { api: a } = K(), { data: u } = As(r), { data: o, loading: d, error: i } = Rr(r, n), [f, h] = T(null);
2259
- je(() => {
2260
- if (f) {
2698
+ function Nr() {
2699
+ const { runId: t, index: s } = xt(), a = parseInt(s, 10), { api: n } = K(), { data: l } = Yt(t), { data: o, loading: c, error: i } = Ws(t, a), [u, h] = T(null);
2700
+ de(() => {
2701
+ if (u) {
2261
2702
  const S = setTimeout(() => h(null), 3e3);
2262
2703
  return () => clearTimeout(S);
2263
2704
  }
2264
- }, [f]);
2705
+ }, [u]);
2265
2706
  const m = async () => {
2266
2707
  try {
2267
- const S = a.getArtifactDownloadUrl(r, n), se = await fetch(S);
2268
- if (!se.ok) throw new Error("Download failed");
2269
- const te = await se.blob(), J = document.createElement("a");
2270
- J.href = URL.createObjectURL(te), J.download = p?.kind || `artifact-${n}`, J.click(), URL.revokeObjectURL(J.href), h({ message: "Download started", variant: "success" });
2708
+ const S = n.getArtifactDownloadUrl(t, a), ie = await fetch(S);
2709
+ if (!ie.ok) throw new Error("Download failed");
2710
+ const ce = await ie.blob(), Z = document.createElement("a");
2711
+ Z.href = URL.createObjectURL(ce), Z.download = p?.kind || `artifact-${a}`, Z.click(), URL.revokeObjectURL(Z.href), h({ message: "Download complete", variant: "success" });
2271
2712
  } catch {
2272
2713
  h({ message: "Download failed", variant: "error" });
2273
2714
  }
2274
2715
  };
2275
- if (d)
2276
- return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(I, {}) }) });
2716
+ if (c)
2717
+ return /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-12", children: /* @__PURE__ */ e.jsx(G, {}) }) });
2277
2718
  if (i || !o)
2278
- return /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsx(he, { message: "Artifact not found", hint: i?.message }) }) });
2279
- const { artifact: p, size: _, content: U, content_json: w, preview_available: H, error: k } = o, O = 10 * 1024 * 1024;
2280
- return /* @__PURE__ */ e.jsxs(V, { children: [
2719
+ return /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(we, { message: "Artifact not found", hint: i?.message }) }) });
2720
+ const { artifact: p, size: b, content: D, content_json: g, preview_available: I, error: E } = o, A = 10 * 1024 * 1024;
2721
+ return /* @__PURE__ */ e.jsxs(Q, { children: [
2281
2722
  /* @__PURE__ */ e.jsx(
2282
- Ee,
2723
+ Oe,
2283
2724
  {
2284
2725
  title: p.kind,
2285
2726
  subtitle: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2286
2727
  "← Back to run ",
2287
- /* @__PURE__ */ e.jsxs(z, { to: `/runs/${r}`, children: [
2288
- Q(r),
2289
- u?.run_name && ` — ${u.run_name}`
2728
+ /* @__PURE__ */ e.jsxs(se, { to: `/runs/${t}`, children: [
2729
+ oe(t),
2730
+ l?.run_name && ` — ${l.run_name}`
2290
2731
  ] })
2291
2732
  ] }),
2292
- actions: /* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: m, children: "Download" })
2733
+ actions: /* @__PURE__ */ e.jsx($, { variant: "primary", onClick: m, children: "Download" })
2293
2734
  }
2294
2735
  ),
2295
- /* @__PURE__ */ e.jsx(b, { className: "mb-4", children: /* @__PURE__ */ e.jsx(Je, { items: [
2736
+ /* @__PURE__ */ e.jsx(N, { className: "mb-4", children: /* @__PURE__ */ e.jsx(ot, { items: [
2296
2737
  { label: "Kind", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono", children: p.kind }) },
2297
- { label: "Role", value: /* @__PURE__ */ e.jsx(Y, { variant: "gray", children: p.role }) },
2738
+ { label: "Role", value: /* @__PURE__ */ e.jsx(re, { variant: "gray", children: p.role }) },
2298
2739
  { label: "Media Type", value: p.media_type },
2299
2740
  { label: "Digest", value: /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm", children: p.digest }) },
2300
- { label: "Size", value: Oe(_) }
2741
+ { label: "Size", value: Ve(b) }
2301
2742
  ] }) }),
2302
- /* @__PURE__ */ e.jsxs(b, { children: [
2303
- /* @__PURE__ */ e.jsx(W, { children: /* @__PURE__ */ e.jsx(G, { children: "Content" }) }),
2304
- k ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2743
+ /* @__PURE__ */ e.jsxs(N, { children: [
2744
+ /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(H, { children: "Content" }) }),
2745
+ E ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2305
2746
  /* @__PURE__ */ e.jsxs("p", { className: "text-sm text-danger", children: [
2306
2747
  "Error loading artifact: ",
2307
- k
2748
+ E
2308
2749
  ] }),
2309
- /* @__PURE__ */ e.jsx("p", { className: "text-muted mt-2", children: /* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: m, children: "Download to view" }) })
2310
- ] }) : H ? w ? /* @__PURE__ */ e.jsx("pre", { children: Cr(w) }) : U ? /* @__PURE__ */ e.jsx("pre", { children: U }) : /* @__PURE__ */ e.jsxs("p", { className: "text-muted", children: [
2750
+ /* @__PURE__ */ e.jsx("p", { className: "text-muted mt-2", children: /* @__PURE__ */ e.jsx($, { variant: "primary", onClick: m, children: "Download to view" }) })
2751
+ ] }) : I ? g ? /* @__PURE__ */ e.jsx("pre", { children: $s(g) }) : D ? /* @__PURE__ */ e.jsx("pre", { children: D }) : /* @__PURE__ */ e.jsxs("p", { className: "text-muted", children: [
2311
2752
  "Binary content (",
2312
- Oe(_),
2753
+ Ve(b),
2313
2754
  ") — download to view"
2314
2755
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2315
2756
  /* @__PURE__ */ e.jsxs("p", { className: "text-muted", children: [
2316
2757
  /* @__PURE__ */ e.jsx("strong", { children: "Artifact too large for preview" }),
2317
2758
  " (",
2318
- Oe(_),
2759
+ Ve(b),
2319
2760
  " exceeds ",
2320
- Oe(O),
2761
+ Ve(A),
2321
2762
  " limit)"
2322
2763
  ] }),
2323
2764
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted mt-2", children: "Download the artifact to view its contents." }),
2324
- /* @__PURE__ */ e.jsx("p", { className: "mt-4", children: /* @__PURE__ */ e.jsx(D, { variant: "primary", onClick: m, children: "Download" }) })
2765
+ /* @__PURE__ */ e.jsx("p", { className: "mt-4", children: /* @__PURE__ */ e.jsx($, { variant: "primary", onClick: m, children: "Download" }) })
2325
2766
  ] })
2326
2767
  ] }),
2327
- f && /* @__PURE__ */ e.jsx(
2328
- Ce,
2768
+ u && /* @__PURE__ */ e.jsx(
2769
+ Me,
2329
2770
  {
2330
- message: f.message,
2331
- variant: f.variant,
2332
- visible: !!f,
2771
+ message: u.message,
2772
+ variant: u.variant,
2773
+ visible: !!u,
2333
2774
  onClose: () => h(null)
2334
2775
  }
2335
2776
  )
2336
2777
  ] });
2337
2778
  }
2338
- const Qr = [
2339
- { path: "/", element: /* @__PURE__ */ e.jsx(xr, { to: "/runs", replace: !0 }) },
2340
- { path: "/runs", element: /* @__PURE__ */ e.jsx(Tr, {}) },
2341
- { path: "/runs/:runId", element: /* @__PURE__ */ e.jsx(Br, {}) },
2342
- { path: "/runs/:runId/artifacts/:index", element: /* @__PURE__ */ e.jsx(Xr, {}) },
2343
- { path: "/projects", element: /* @__PURE__ */ e.jsx(Ir, {}) },
2344
- { path: "/groups", element: /* @__PURE__ */ e.jsx(qr, {}) },
2345
- { path: "/groups/:groupId", element: /* @__PURE__ */ e.jsx(Ur, {}) },
2346
- { path: "/diff", element: /* @__PURE__ */ e.jsx(Hr, {}) },
2347
- { path: "/search", element: /* @__PURE__ */ e.jsx(Jr, {}) }
2779
+ const _r = [
2780
+ { path: "/", element: /* @__PURE__ */ e.jsx(ks, { to: "/runs", replace: !0 }) },
2781
+ { path: "/runs", element: /* @__PURE__ */ e.jsx(Hs, {}) },
2782
+ { path: "/runs/:runId", element: /* @__PURE__ */ e.jsx(or, {}) },
2783
+ { path: "/runs/:runId/artifacts/:index", element: /* @__PURE__ */ e.jsx(Nr, {}) },
2784
+ { path: "/projects", element: /* @__PURE__ */ e.jsx(dr, {}) },
2785
+ { path: "/groups", element: /* @__PURE__ */ e.jsx(ur, {}) },
2786
+ { path: "/groups/:groupId", element: /* @__PURE__ */ e.jsx(hr, {}) },
2787
+ { path: "/diff", element: /* @__PURE__ */ e.jsx(br, {}) },
2788
+ { path: "/search", element: /* @__PURE__ */ e.jsx(yr, {}) }
2348
2789
  ];
2349
- function Ls(r = []) {
2350
- return mr([...Qr, ...r]);
2790
+ function Xt(t = []) {
2791
+ return Cs([..._r, ...t]);
2351
2792
  }
2352
- const Zr = Ls();
2353
- function at({ additionalRoutes: r, ...t }) {
2354
- const n = r?.length ? Ls(r) : Zr;
2355
- return /* @__PURE__ */ e.jsx(yr, { ...t, children: /* @__PURE__ */ e.jsx(fr, { router: n }) });
2793
+ const wr = Xt();
2794
+ function Dr({ additionalRoutes: t, ...s }) {
2795
+ const a = t?.length ? Xt(t) : wr;
2796
+ return /* @__PURE__ */ e.jsx(qs, { ...s, children: /* @__PURE__ */ e.jsx(Ts, { router: a }) });
2356
2797
  }
2357
2798
  export {
2358
- nt as Alert,
2359
- vr as ApiClient,
2360
- we as ApiError,
2361
- at as App,
2362
- yr as AppProvider,
2363
- Xr as ArtifactPage,
2364
- Y as Badge,
2365
- D as Button,
2366
- b as Card,
2367
- W as CardHeader,
2368
- G as CardTitle,
2369
- Hr as DiffPage,
2370
- he as EmptyState,
2371
- ee as FormGroup,
2372
- Os as FormRow,
2373
- Ur as GroupDetailPage,
2374
- qr as GroupsPage,
2375
- Ar as GroupsTable,
2376
- ss as Input,
2377
- Je as KVList,
2378
- ie as Label,
2379
- V as Layout,
2380
- tt as LayoutConfigProvider,
2381
- es as Modal,
2382
- Ee as PageHeader,
2383
- Ir as ProjectsPage,
2384
- Dr as ProjectsTable,
2385
- Br as RunDetailPage,
2386
- Tr as RunsPage,
2387
- rs as RunsTable,
2388
- Jr as SearchPage,
2389
- de as Select,
2390
- I as Spinner,
2391
- $s as StatusBadge,
2392
- L as Table,
2393
- B as TableBody,
2394
- c as TableCell,
2395
- re as TableHead,
2396
- N as TableHeader,
2799
+ Pr as Alert,
2800
+ As as ApiClient,
2801
+ Ae as ApiError,
2802
+ Dr as App,
2803
+ qs as AppProvider,
2804
+ Nr as ArtifactPage,
2805
+ re as Badge,
2806
+ $ as Button,
2807
+ N as Card,
2808
+ Y as CardHeader,
2809
+ H as CardTitle,
2810
+ br as DiffPage,
2811
+ we as EmptyState,
2812
+ Xs as ExportRunButton,
2813
+ xe as FormGroup,
2814
+ Kt as FormRow,
2815
+ hr as GroupDetailPage,
2816
+ ur as GroupsPage,
2817
+ Js as GroupsTable,
2818
+ jt as Input,
2819
+ ot as KVList,
2820
+ ve as Label,
2821
+ Q as Layout,
2822
+ Sr as LayoutConfigProvider,
2823
+ ft as Modal,
2824
+ nt as POLL_INTERVAL,
2825
+ Oe as PageHeader,
2826
+ dr as ProjectsPage,
2827
+ Ks as ProjectsTable,
2828
+ or as RunDetailPage,
2829
+ Hs as RunsPage,
2830
+ pt as RunsTable,
2831
+ yr as SearchPage,
2832
+ _e as Select,
2833
+ G as Spinner,
2834
+ Jt as StatusBadge,
2835
+ B as Table,
2836
+ U as TableBody,
2837
+ d as TableCell,
2838
+ fe as TableHead,
2839
+ w as TableHeader,
2397
2840
  j as TableRow,
2398
- Ce as Toast,
2399
- br as api,
2400
- rt as buildUrl,
2401
- $ as cn,
2402
- Qr as coreRoutes,
2403
- Ls as createRouter,
2404
- Oe as formatBytes,
2405
- Er as formatNumber,
2406
- Cr as jsonPretty,
2407
- Zr as router,
2408
- He as shortDigest,
2409
- Q as shortId,
2410
- Ze as timeAgo,
2411
- kr as truncate,
2841
+ Cr as ThemeProvider,
2842
+ Me as Toast,
2843
+ Fs as api,
2844
+ kr as buildUrl,
2845
+ q as cn,
2846
+ _r as coreRoutes,
2847
+ Xt as createRouter,
2848
+ Ut as elapsedSeconds,
2849
+ Ve as formatBytes,
2850
+ Wt as formatDuration,
2851
+ lt as formatNumber,
2852
+ $e as isTerminalStatus,
2853
+ $s as jsonPretty,
2854
+ wr as router,
2855
+ ct as shortDigest,
2856
+ oe as shortId,
2857
+ Ye as timeAgo,
2858
+ Os as truncate,
2412
2859
  K as useApp,
2413
- Rr as useArtifact,
2414
- wr as useDiff,
2415
- _r as useGroup,
2416
- Nr as useGroups,
2417
- Pr as useLayoutConfig,
2418
- Re as useMutation,
2419
- Le as useProjects,
2420
- As as useRun,
2421
- Ds as useRuns
2860
+ Ws as useArtifact,
2861
+ Us as useDiff,
2862
+ Bs as useGroup,
2863
+ Is as useGroups,
2864
+ zs as useLayoutConfig,
2865
+ Fe as useMutation,
2866
+ mt as usePolling,
2867
+ Ke as useProjects,
2868
+ Yt as useRun,
2869
+ zt as useRuns,
2870
+ Ms as useTheme,
2871
+ Tr as useThemeOptional
2422
2872
  };