@ioai/lerobot-studio 1.3.1 → 1.3.3

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.
@@ -1,4 +1,4 @@
1
- import { $ as e, A as t, B as n, C as r, D as i, Et as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, St as y, T as b, Tt as x, V as S, W as C, X as w, Y as T, Z as E, _ as D, _t as O, at as k, c as ee, ct as A, dt as j, ft as M, gt as N, ht as P, it as te, j as ne, k as re, l as F, lt as ie, mt as ae, nt as oe, ot as se, p as ce, pt as le, q as ue, st as de, t as fe, tt as pe, u as me, ut as he, v as ge, vt as _e, w as ve, wt as ye, x as be, xt as xe, y as Se, yt as Ce, z as I } from "./react-window-DqEyepq_.js";
1
+ import { $ as e, A as t, B as n, C as r, Ct as i, D as a, Dt as o, Et as s, F as c, G as l, H as u, I as d, J as f, K as p, L as m, M as h, N as g, O as _, Ot as v, P as y, R as b, T as x, V as S, X as C, Y as w, Z as T, _ as E, _t as D, bt as O, c as k, ct as A, dt as j, et as M, ft as N, gt as P, ht as ee, it as te, j as ne, k as re, l as F, lt as ie, mt as ae, ot as oe, p as se, pt as ce, q as le, rt as ue, st as de, t as fe, tt as pe, u as me, ut as he, v as ge, vt as _e, w as ve, wt as ye, x as be, xt as xe, y as Se, yt as Ce, z as I } from "./react-window-CNIimuLk.js";
2
2
  import { n as L } from "./MediaCache-DZ7bEoOY.js";
3
3
  import * as R from "react";
4
4
  import z, { Component as we, createContext as Te, memo as Ee, startTransition as De, useCallback as B, useDeferredValue as Oe, useEffect as V, useMemo as H, useRef as U, useState as ke, useSyncExternalStore as Ae } from "react";
@@ -22,12 +22,12 @@ var Ne = Object.defineProperty, K = (e, t) => Ne(e, "name", {
22
22
  }, ze = {
23
23
  ltr: ["ArrowLeft"],
24
24
  rtl: ["ArrowRight"]
25
- }, Be = "Menu", [Ve, He, Ue] = N(Be), [We, Ge] = O(Be, [
25
+ }, Be = "Menu", [Ve, He, Ue] = _e(Be), [We, Ge] = Ce(Be, [
26
26
  Ue,
27
- w,
28
- d
29
- ]), Ke = w(), qe = d(), [Je, Ye] = We(Be), [Xe, Ze] = We(Be), Qe = /* @__PURE__ */ K((e) => {
30
- let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = Ke(t), [c, l] = R.useState(null), u = R.useRef(!1), d = he(a), f = j(i);
27
+ T,
28
+ le
29
+ ]), Ke = T(), qe = le(), [Je, Ye] = We(Be), [Xe, Ze] = We(Be), Qe = /* @__PURE__ */ K((e) => {
30
+ let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = Ke(t), [c, l] = R.useState(null), u = R.useRef(!1), d = N(a), f = ce(i);
31
31
  return R.useEffect(() => {
32
32
  let e = /* @__PURE__ */ K(() => {
33
33
  u.current = !0, document.addEventListener("pointerdown", t, {
@@ -45,7 +45,7 @@ var Ne = Object.defineProperty, K = (e, t) => Ne(e, "name", {
45
45
  if (!n) return;
46
46
  let e = /* @__PURE__ */ K(() => d(!1), "handleBlur");
47
47
  return window.addEventListener("blur", e), () => window.removeEventListener("blur", e);
48
- }, [n, d]), /* @__PURE__ */ W(T, {
48
+ }, [n, d]), /* @__PURE__ */ W(C, {
49
49
  ...s,
50
50
  children: /* @__PURE__ */ W(Je, {
51
51
  scope: t,
@@ -65,7 +65,7 @@ var Ne = Object.defineProperty, K = (e, t) => Ne(e, "name", {
65
65
  });
66
66
  }, "Menu"), $e = /* @__PURE__ */ R.forwardRef(/* @__PURE__ */ K(function(e, t) {
67
67
  let { __scopeMenu: n, ...r } = e, i = Ke(n);
68
- return /* @__PURE__ */ W(ue, {
68
+ return /* @__PURE__ */ W(f, {
69
69
  ...i,
70
70
  ...r,
71
71
  ref: t
@@ -75,9 +75,9 @@ var Ne = Object.defineProperty, K = (e, t) => Ne(e, "name", {
75
75
  return /* @__PURE__ */ W(tt, {
76
76
  scope: t,
77
77
  forceMount: n,
78
- children: /* @__PURE__ */ W(le, {
78
+ children: /* @__PURE__ */ W(ee, {
79
79
  present: n || a.open,
80
- children: /* @__PURE__ */ W(de, {
80
+ children: /* @__PURE__ */ W(ie, {
81
81
  asChild: !0,
82
82
  container: i,
83
83
  children: r
@@ -88,7 +88,7 @@ var Ne = Object.defineProperty, K = (e, t) => Ne(e, "name", {
88
88
  let n = nt(it, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = Ye(it, e.__scopeMenu), o = Ze(it, e.__scopeMenu);
89
89
  return /* @__PURE__ */ W(Ve.Provider, {
90
90
  scope: e.__scopeMenu,
91
- children: /* @__PURE__ */ W(le, {
91
+ children: /* @__PURE__ */ W(ee, {
92
92
  present: r || a.open,
93
93
  children: /* @__PURE__ */ W(Ve.Slot, {
94
94
  scope: e.__scopeMenu,
@@ -103,17 +103,17 @@ var Ne = Object.defineProperty, K = (e, t) => Ne(e, "name", {
103
103
  })
104
104
  });
105
105
  }, "MenuContent")), ct = /* @__PURE__ */ R.forwardRef(/* @__PURE__ */ K(function(e, t) {
106
- let n = Ye(it, e.__scopeMenu), r = R.useRef(null), i = y(t, r);
106
+ let n = Ye(it, e.__scopeMenu), r = R.useRef(null), i = ye(t, r);
107
107
  return R.useEffect(() => {
108
108
  let e = r.current;
109
- if (e) return te(e);
109
+ if (e) return oe(e);
110
110
  }, []), /* @__PURE__ */ W(dt, {
111
111
  ...e,
112
112
  ref: i,
113
113
  trapFocus: n.open,
114
114
  disableOutsidePointerEvents: n.open,
115
115
  disableOutsideScroll: !0,
116
- onFocusOutside: P(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
116
+ onFocusOutside: D(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
117
117
  onDismiss: () => n.onOpenChange(!1)
118
118
  });
119
119
  }, "MenuRootContentModal")), lt = /* @__PURE__ */ R.forwardRef(/* @__PURE__ */ K(function(e, t) {
@@ -126,93 +126,93 @@ var Ne = Object.defineProperty, K = (e, t) => Ne(e, "name", {
126
126
  disableOutsideScroll: !1,
127
127
  onDismiss: () => n.onOpenChange(!1)
128
128
  });
129
- }, "MenuRootContentNonModal")), ut = xe("MenuContent.ScrollLock"), dt = /* @__PURE__ */ R.forwardRef(/* @__PURE__ */ K(function(e, t) {
130
- let { __scopeMenu: n, loop: r = !1, trapFocus: i, onOpenAutoFocus: a, onCloseAutoFocus: o, disableOutsidePointerEvents: c, onEntryFocus: l, onEscapeKeyDown: d, onPointerDownOutside: f, onFocusOutside: p, onInteractOutside: m, onDismiss: h, disableOutsideScroll: g, ..._ } = e, v = Ye(it, n), b = Ze(it, n), x = Ke(n), S = qe(n), C = He(n), [w, T] = R.useState(null), E = R.useRef(null), D = y(t, E, v.onContentChange), O = R.useRef(0), ee = R.useRef(""), j = R.useRef(0), M = R.useRef(null), N = R.useRef("right"), te = R.useRef(0), ne = g ? k : R.Fragment, re = g ? {
129
+ }, "MenuRootContentNonModal")), ut = i("MenuContent.ScrollLock"), dt = /* @__PURE__ */ R.forwardRef(/* @__PURE__ */ K(function(e, t) {
130
+ let { __scopeMenu: n, loop: r = !1, trapFocus: i, onOpenAutoFocus: a, onCloseAutoFocus: o, disableOutsidePointerEvents: s, onEntryFocus: c, onEscapeKeyDown: l, onPointerDownOutside: u, onFocusOutside: d, onInteractOutside: f, onDismiss: m, disableOutsideScroll: h, ...g } = e, _ = Ye(it, n), v = Ze(it, n), y = Ke(n), b = qe(n), x = He(n), [S, C] = R.useState(null), T = R.useRef(null), E = ye(t, T, _.onContentChange), O = R.useRef(0), k = R.useRef(""), M = R.useRef(0), N = R.useRef(null), P = R.useRef("right"), ee = R.useRef(0), te = h ? de : R.Fragment, ne = h ? {
131
131
  as: ut,
132
132
  allowPinchZoom: !0
133
- } : void 0, F = /* @__PURE__ */ K((e) => {
134
- let t = ee.current + e, n = C().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = Nt(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
133
+ } : void 0, re = /* @__PURE__ */ K((e) => {
134
+ let t = k.current + e, n = x().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = Nt(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
135
135
  (/* @__PURE__ */ K((function e(t) {
136
- ee.current = t, window.clearTimeout(O.current), t !== "" && (O.current = window.setTimeout(() => e(""), 1e3));
136
+ k.current = t, window.clearTimeout(O.current), t !== "" && (O.current = window.setTimeout(() => e(""), 1e3));
137
137
  }), "updateSearch"))(t), o && setTimeout(() => o.focus());
138
138
  }, "handleTypeaheadSearch");
139
- R.useEffect(() => () => window.clearTimeout(O.current), []), se();
140
- let ae = R.useCallback((e) => N.current === M.current?.side && Ft(e, M.current?.area), []);
139
+ R.useEffect(() => () => window.clearTimeout(O.current), []), A();
140
+ let F = R.useCallback((e) => P.current === N.current?.side && Ft(e, N.current?.area), []);
141
141
  return /* @__PURE__ */ W(at, {
142
142
  scope: n,
143
- searchRef: ee,
143
+ searchRef: k,
144
144
  onItemEnter: R.useCallback((e) => {
145
- ae(e) && e.preventDefault();
146
- }, [ae]),
145
+ F(e) && e.preventDefault();
146
+ }, [F]),
147
147
  onItemLeave: R.useCallback((e) => {
148
- ae(e) || (E.current?.focus(), T(null));
149
- }, [ae]),
148
+ F(e) || (T.current?.focus(), C(null));
149
+ }, [F]),
150
150
  onTriggerLeave: R.useCallback((e) => {
151
- ae(e) && e.preventDefault();
152
- }, [ae]),
153
- pointerGraceTimerRef: j,
151
+ F(e) && e.preventDefault();
152
+ }, [F]),
153
+ pointerGraceTimerRef: M,
154
154
  onPointerGraceIntentChange: R.useCallback((e) => {
155
- M.current = e;
155
+ N.current = e;
156
156
  }, []),
157
- children: /* @__PURE__ */ W(ne, {
158
- ...re,
159
- children: /* @__PURE__ */ W(A, {
157
+ children: /* @__PURE__ */ W(te, {
158
+ ...ne,
159
+ children: /* @__PURE__ */ W(he, {
160
160
  asChild: !0,
161
161
  trapped: i,
162
- onMountAutoFocus: P(a, (e) => {
163
- e.preventDefault(), E.current?.focus({ preventScroll: !0 });
162
+ onMountAutoFocus: D(a, (e) => {
163
+ e.preventDefault(), T.current?.focus({ preventScroll: !0 });
164
164
  }),
165
165
  onUnmountAutoFocus: o,
166
- children: /* @__PURE__ */ W(ie, {
166
+ children: /* @__PURE__ */ W(j, {
167
167
  asChild: !0,
168
- disableOutsidePointerEvents: c,
169
- onEscapeKeyDown: d,
170
- onPointerDownOutside: f,
171
- onFocusOutside: p,
172
- onInteractOutside: m,
173
- onDismiss: h,
174
- children: /* @__PURE__ */ W(s, {
168
+ disableOutsidePointerEvents: s,
169
+ onEscapeKeyDown: l,
170
+ onPointerDownOutside: u,
171
+ onFocusOutside: d,
172
+ onInteractOutside: f,
173
+ onDismiss: m,
174
+ children: /* @__PURE__ */ W(p, {
175
175
  asChild: !0,
176
- ...S,
177
- dir: b.dir,
176
+ ...b,
177
+ dir: v.dir,
178
178
  orientation: "vertical",
179
179
  loop: r,
180
- currentTabStopId: w,
181
- onCurrentTabStopIdChange: T,
182
- onEntryFocus: P(l, (e) => {
183
- b.isUsingKeyboardRef.current || e.preventDefault();
180
+ currentTabStopId: S,
181
+ onCurrentTabStopIdChange: C,
182
+ onEntryFocus: D(c, (e) => {
183
+ v.isUsingKeyboardRef.current || e.preventDefault();
184
184
  }),
185
185
  preventScrollOnEntryFocus: !0,
186
- children: /* @__PURE__ */ W(u, {
186
+ children: /* @__PURE__ */ W(w, {
187
187
  role: "menu",
188
188
  "aria-orientation": "vertical",
189
- "data-state": Ot(v.open),
189
+ "data-state": Ot(_.open),
190
190
  "data-radix-menu-content": "",
191
- dir: b.dir,
192
- ...x,
193
- ..._,
194
- ref: D,
191
+ dir: v.dir,
192
+ ...y,
193
+ ...g,
194
+ ref: E,
195
195
  style: {
196
196
  outline: "none",
197
- ..._.style
197
+ ...g.style
198
198
  },
199
- onKeyDown: P(_.onKeyDown, (e) => {
199
+ onKeyDown: D(g.onKeyDown, (e) => {
200
200
  let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
201
- t && (e.key === "Tab" && e.preventDefault(), !n && r && F(e.key));
202
- let i = E.current;
201
+ t && (e.key === "Tab" && e.preventDefault(), !n && r && re(e.key));
202
+ let i = T.current;
203
203
  if (e.target !== i || !Le.includes(e.key)) return;
204
204
  e.preventDefault();
205
- let a = C().filter((e) => !e.disabled).map((e) => e.ref.current);
205
+ let a = x().filter((e) => !e.disabled).map((e) => e.ref.current);
206
206
  Ie.includes(e.key) && a.reverse(), jt(a);
207
207
  }),
208
- onBlur: P(e.onBlur, (e) => {
209
- e.currentTarget.contains(e.target) || (window.clearTimeout(O.current), ee.current = "");
208
+ onBlur: D(e.onBlur, (e) => {
209
+ e.currentTarget.contains(e.target) || (window.clearTimeout(O.current), k.current = "");
210
210
  }),
211
- onPointerMove: P(e.onPointerMove, It((e) => {
212
- let t = e.target, n = te.current !== e.clientX;
211
+ onPointerMove: D(e.onPointerMove, It((e) => {
212
+ let t = e.target, n = ee.current !== e.clientX;
213
213
  if (e.currentTarget.contains(t) && n) {
214
- let t = e.clientX > te.current ? "right" : "left";
215
- N.current = t, te.current = e.clientX;
214
+ let t = e.clientX > ee.current ? "right" : "left";
215
+ P.current = t, ee.current = e.clientX;
216
216
  }
217
217
  }))
218
218
  })
@@ -222,57 +222,57 @@ var Ne = Object.defineProperty, K = (e, t) => Ne(e, "name", {
222
222
  })
223
223
  });
224
224
  }, "MenuContentImpl")), ft = "MenuItem", pt = "menu.itemSelect", mt = /* @__PURE__ */ R.forwardRef(/* @__PURE__ */ K(function(e, t) {
225
- let { disabled: n = !1, onSelect: r, ...i } = e, a = R.useRef(null), o = Ze(ft, e.__scopeMenu), s = ot(ft, e.__scopeMenu), c = y(t, a), l = R.useRef(!1), u = /* @__PURE__ */ K(() => {
225
+ let { disabled: n = !1, onSelect: r, ...i } = e, a = R.useRef(null), o = Ze(ft, e.__scopeMenu), s = ot(ft, e.__scopeMenu), c = ye(t, a), l = R.useRef(!1), u = /* @__PURE__ */ K(() => {
226
226
  let e = a.current;
227
227
  if (!n && e) {
228
228
  let t = new CustomEvent(pt, {
229
229
  bubbles: !0,
230
230
  cancelable: !0
231
231
  });
232
- e.addEventListener(pt, (e) => r?.(e), { once: !0 }), Ce(e, t), t.defaultPrevented ? l.current = !1 : o.onClose();
232
+ e.addEventListener(pt, (e) => r?.(e), { once: !0 }), xe(e, t), t.defaultPrevented ? l.current = !1 : o.onClose();
233
233
  }
234
234
  }, "handleSelect");
235
235
  return /* @__PURE__ */ W(ht, {
236
236
  ...i,
237
237
  ref: c,
238
238
  disabled: n,
239
- onClick: P(e.onClick, u),
239
+ onClick: D(e.onClick, u),
240
240
  onPointerDown: (t) => {
241
241
  e.onPointerDown?.(t), l.current = !0;
242
242
  },
243
- onPointerUp: P(e.onPointerUp, (e) => {
243
+ onPointerUp: D(e.onPointerUp, (e) => {
244
244
  l.current || e.currentTarget?.click();
245
245
  }),
246
- onKeyDown: P(e.onKeyDown, (e) => {
246
+ onKeyDown: D(e.onKeyDown, (e) => {
247
247
  n || e.target !== e.currentTarget || (s.searchRef.current === "" || e.key !== " ") && Pe.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
248
248
  })
249
249
  });
250
250
  }, "MenuItem")), ht = /* @__PURE__ */ R.forwardRef(/* @__PURE__ */ K(function(e, t) {
251
- let { __scopeMenu: n, disabled: r = !1, textValue: i, ...a } = e, o = ot(ft, n), s = qe(n), c = R.useRef(null), l = y(t, c), [u, d] = R.useState(!1), [f, p] = R.useState("");
251
+ let { __scopeMenu: n, disabled: r = !1, textValue: i, ...a } = e, o = ot(ft, n), s = qe(n), c = R.useRef(null), u = ye(t, c), [d, f] = R.useState(!1), [p, m] = R.useState("");
252
252
  return R.useEffect(() => {
253
253
  let e = c.current;
254
- e && p((e.textContent ?? "").trim());
254
+ e && m((e.textContent ?? "").trim());
255
255
  }, [a.children]), /* @__PURE__ */ W(Ve.ItemSlot, {
256
256
  scope: n,
257
257
  disabled: r,
258
- textValue: i ?? f,
259
- children: /* @__PURE__ */ W(C, {
258
+ textValue: i ?? p,
259
+ children: /* @__PURE__ */ W(l, {
260
260
  asChild: !0,
261
261
  ...s,
262
262
  focusable: !r,
263
- children: /* @__PURE__ */ W(_e.div, {
263
+ children: /* @__PURE__ */ W(O.div, {
264
264
  role: "menuitem",
265
- "data-highlighted": u ? "" : void 0,
265
+ "data-highlighted": d ? "" : void 0,
266
266
  "aria-disabled": r || void 0,
267
267
  "data-disabled": r ? "" : void 0,
268
268
  ...a,
269
- ref: l,
270
- onPointerMove: P(e.onPointerMove, It((e) => {
269
+ ref: u,
270
+ onPointerMove: D(e.onPointerMove, It((e) => {
271
271
  r ? o.onItemLeave(e) : (o.onItemEnter(e), e.defaultPrevented || e.currentTarget.focus({ preventScroll: !0 }));
272
272
  })),
273
- onPointerLeave: P(e.onPointerLeave, It((e) => o.onItemLeave(e))),
274
- onFocus: P(e.onFocus, () => d(!0)),
275
- onBlur: P(e.onBlur, () => d(!1))
273
+ onPointerLeave: D(e.onPointerLeave, It((e) => o.onItemLeave(e))),
274
+ onFocus: D(e.onFocus, () => f(!0)),
275
+ onBlur: D(e.onBlur, () => f(!1))
276
276
  })
277
277
  })
278
278
  });
@@ -280,8 +280,8 @@ var Ne = Object.defineProperty, K = (e, t) => Ne(e, "name", {
280
280
  value: void 0,
281
281
  onValueChange: /* @__PURE__ */ K(() => {}, "onValueChange")
282
282
  }), [vt, yt] = We("MenuItemIndicator", { checked: !1 }), bt = "MenuSub", [xt, St] = We(bt), Ct = /* @__PURE__ */ K((e) => {
283
- let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, a = Ye(bt, t), o = Ke(t), [s, c] = R.useState(null), [l, u] = R.useState(null), d = he(i);
284
- return R.useEffect(() => (a.open === !1 && d(!1), () => d(!1)), [a.open, d]), /* @__PURE__ */ W(T, {
283
+ let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, a = Ye(bt, t), o = Ke(t), [s, c] = R.useState(null), [l, u] = R.useState(null), d = N(i);
284
+ return R.useEffect(() => (a.open === !1 && d(!1), () => d(!1)), [a.open, d]), /* @__PURE__ */ W(C, {
285
285
  ...o,
286
286
  children: /* @__PURE__ */ W(Je, {
287
287
  scope: t,
@@ -291,8 +291,8 @@ var Ne = Object.defineProperty, K = (e, t) => Ne(e, "name", {
291
291
  onContentChange: u,
292
292
  children: /* @__PURE__ */ W(xt, {
293
293
  scope: t,
294
- contentId: M(),
295
- triggerId: M(),
294
+ contentId: ae(),
295
+ triggerId: ae(),
296
296
  trigger: s,
297
297
  onTriggerChange: c,
298
298
  children: n
@@ -309,7 +309,7 @@ var Ne = Object.defineProperty, K = (e, t) => Ne(e, "name", {
309
309
  window.clearTimeout(e), c(null);
310
310
  };
311
311
  }, [s, c]);
312
- let d = y(t, i.onTriggerChange);
312
+ let d = ye(t, i.onTriggerChange);
313
313
  return /* @__PURE__ */ W($e, {
314
314
  asChild: !0,
315
315
  ...l,
@@ -324,12 +324,12 @@ var Ne = Object.defineProperty, K = (e, t) => Ne(e, "name", {
324
324
  onClick: (t) => {
325
325
  e.onClick?.(t), !(e.disabled || t.defaultPrevented) && (t.currentTarget.focus(), n.open || n.onOpenChange(!0));
326
326
  },
327
- onPointerMove: P(e.onPointerMove, It((t) => {
327
+ onPointerMove: D(e.onPointerMove, It((t) => {
328
328
  a.onItemEnter(t), !t.defaultPrevented && !e.disabled && !n.open && !o.current && (a.onPointerGraceIntentChange(null), o.current = window.setTimeout(() => {
329
329
  n.onOpenChange(!0), u();
330
330
  }, 100));
331
331
  })),
332
- onPointerLeave: P(e.onPointerLeave, It((e) => {
332
+ onPointerLeave: D(e.onPointerLeave, It((e) => {
333
333
  u();
334
334
  let t = n.content?.getBoundingClientRect();
335
335
  if (t) {
@@ -364,16 +364,16 @@ var Ne = Object.defineProperty, K = (e, t) => Ne(e, "name", {
364
364
  a.onPointerGraceIntentChange(null);
365
365
  }
366
366
  })),
367
- onKeyDown: P(e.onKeyDown, (t) => {
367
+ onKeyDown: D(e.onKeyDown, (t) => {
368
368
  e.disabled || t.target !== t.currentTarget || (a.searchRef.current === "" || t.key !== " ") && Re[r.dir].includes(t.key) && (n.onOpenChange(!0), n.content?.focus(), t.preventDefault());
369
369
  })
370
370
  })
371
371
  });
372
372
  }, "MenuSubTrigger")), Et = "MenuSubContent", Dt = /* @__PURE__ */ R.forwardRef(/* @__PURE__ */ K(function(e, t) {
373
- let n = nt(it, e.__scopeMenu), { forceMount: r = n.forceMount, align: i = "start", ...a } = e, o = Ye(it, e.__scopeMenu), s = Ze(it, e.__scopeMenu), c = St(Et, e.__scopeMenu), l = R.useRef(null), u = y(t, l);
373
+ let n = nt(it, e.__scopeMenu), { forceMount: r = n.forceMount, align: i = "start", ...a } = e, o = Ye(it, e.__scopeMenu), s = Ze(it, e.__scopeMenu), c = St(Et, e.__scopeMenu), l = R.useRef(null), u = ye(t, l);
374
374
  return /* @__PURE__ */ W(Ve.Provider, {
375
375
  scope: e.__scopeMenu,
376
- children: /* @__PURE__ */ W(le, {
376
+ children: /* @__PURE__ */ W(ee, {
377
377
  present: r || o.open,
378
378
  children: /* @__PURE__ */ W(Ve.Slot, {
379
379
  scope: e.__scopeMenu,
@@ -391,13 +391,13 @@ var Ne = Object.defineProperty, K = (e, t) => Ne(e, "name", {
391
391
  s.isUsingKeyboardRef.current && l.current?.focus(), e.preventDefault();
392
392
  },
393
393
  onCloseAutoFocus: (e) => e.preventDefault(),
394
- onFocusOutside: P(e.onFocusOutside, (e) => {
394
+ onFocusOutside: D(e.onFocusOutside, (e) => {
395
395
  e.target !== c.trigger && o.onOpenChange(!1);
396
396
  }),
397
- onEscapeKeyDown: P(e.onEscapeKeyDown, (e) => {
397
+ onEscapeKeyDown: D(e.onEscapeKeyDown, (e) => {
398
398
  s.onClose(), e.preventDefault();
399
399
  }),
400
- onKeyDown: P(e.onKeyDown, (e) => {
400
+ onKeyDown: D(e.onKeyDown, (e) => {
401
401
  let t = e.currentTarget.contains(e.target), n = ze[s.dir].includes(e.key);
402
402
  t && n && (o.onOpenChange(!1), c.trigger?.focus(), e.preventDefault());
403
403
  })
@@ -457,8 +457,8 @@ K(It, "whenMouse");
457
457
  var Lt = Qe, Rt = $e, zt = rt, Bt = st, Vt = mt, Ht = Ct, Ut = Tt, Wt = Dt, Gt = Object.defineProperty, Kt = (e, t) => Gt(e, "name", {
458
458
  value: t,
459
459
  configurable: !0
460
- }), qt = "DropdownMenu", [Jt, Yt] = O(qt, [Ge]), Xt = Ge(), [Zt, Qt] = Jt(qt), $t = /* @__PURE__ */ Kt((e) => {
461
- let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: a, onOpenChange: o, modal: s = !0 } = e, c = Xt(t), l = R.useRef(null), [u, d] = ae({
460
+ }), qt = "DropdownMenu", [Jt, Yt] = Ce(qt, [Ge]), Xt = Ge(), [Zt, Qt] = Jt(qt), $t = /* @__PURE__ */ Kt((e) => {
461
+ let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: a, onOpenChange: o, modal: s = !0 } = e, c = Xt(t), l = R.useRef(null), [u, d] = P({
462
462
  prop: i,
463
463
  defaultProp: a ?? !1,
464
464
  onChange: o,
@@ -466,9 +466,9 @@ var Lt = Qe, Rt = $e, zt = rt, Bt = st, Vt = mt, Ht = Ct, Ut = Tt, Wt = Dt, Gt =
466
466
  });
467
467
  return /* @__PURE__ */ W(Zt, {
468
468
  scope: t,
469
- triggerId: M(),
469
+ triggerId: ae(),
470
470
  triggerRef: l,
471
- contentId: M(),
471
+ contentId: ae(),
472
472
  open: u,
473
473
  onOpenChange: d,
474
474
  onOpenToggle: R.useCallback(() => d((e) => !e), [d]),
@@ -483,11 +483,11 @@ var Lt = Qe, Rt = $e, zt = rt, Bt = st, Vt = mt, Ht = Ct, Ut = Tt, Wt = Dt, Gt =
483
483
  })
484
484
  });
485
485
  }, "DropdownMenu"), en = "DropdownMenuTrigger", tn = /* @__PURE__ */ R.forwardRef(/* @__PURE__ */ Kt(function(e, t) {
486
- let { __scopeDropdownMenu: n, disabled: r = !1, ...i } = e, a = Qt(en, n), o = Xt(n), s = y(t, a.triggerRef);
486
+ let { __scopeDropdownMenu: n, disabled: r = !1, ...i } = e, a = Qt(en, n), o = Xt(n), s = ye(t, a.triggerRef);
487
487
  return /* @__PURE__ */ W(Rt, {
488
488
  asChild: !0,
489
489
  ...o,
490
- children: /* @__PURE__ */ W(_e.button, {
490
+ children: /* @__PURE__ */ W(O.button, {
491
491
  type: "button",
492
492
  id: a.triggerId,
493
493
  "aria-haspopup": "menu",
@@ -498,10 +498,10 @@ var Lt = Qe, Rt = $e, zt = rt, Bt = st, Vt = mt, Ht = Ct, Ut = Tt, Wt = Dt, Gt =
498
498
  disabled: r,
499
499
  ...i,
500
500
  ref: s,
501
- onPointerDown: P(e.onPointerDown, (e) => {
501
+ onPointerDown: D(e.onPointerDown, (e) => {
502
502
  !r && e.button === 0 && e.ctrlKey === !1 && (a.onOpenToggle(), a.open || e.preventDefault());
503
503
  }),
504
- onKeyDown: P(e.onKeyDown, (e) => {
504
+ onKeyDown: D(e.onKeyDown, (e) => {
505
505
  r || (["Enter", " "].includes(e.key) && a.onOpenToggle(), e.key === "ArrowDown" && a.onOpenChange(!0), [
506
506
  "Enter",
507
507
  " ",
@@ -524,10 +524,10 @@ var Lt = Qe, Rt = $e, zt = rt, Bt = st, Vt = mt, Ht = Ct, Ut = Tt, Wt = Dt, Gt =
524
524
  ...a,
525
525
  ...r,
526
526
  ref: t,
527
- onCloseAutoFocus: P(e.onCloseAutoFocus, (e) => {
527
+ onCloseAutoFocus: D(e.onCloseAutoFocus, (e) => {
528
528
  o.current || i.triggerRef.current?.focus(), o.current = !1, e.preventDefault();
529
529
  }),
530
- onInteractOutside: P(e.onInteractOutside, (e) => {
530
+ onInteractOutside: D(e.onInteractOutside, (e) => {
531
531
  let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
532
532
  (!i.modal || r) && (o.current = !0);
533
533
  }),
@@ -548,7 +548,7 @@ var Lt = Qe, Rt = $e, zt = rt, Bt = st, Vt = mt, Ht = Ct, Ut = Tt, Wt = Dt, Gt =
548
548
  ref: t
549
549
  });
550
550
  }, "DropdownMenuItem")), sn = /* @__PURE__ */ Kt((e) => {
551
- let { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: i, defaultOpen: a } = e, o = Xt(t), [s, c] = ae({
551
+ let { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: i, defaultOpen: a } = e, o = Xt(t), [s, c] = P({
552
552
  prop: r,
553
553
  defaultProp: a ?? !1,
554
554
  onChange: i,
@@ -740,13 +740,13 @@ function jn({ render: e, children: t, ...n }) {
740
740
  });
741
741
  }
742
742
  function Mn({ className: e, sideOffset: t = 4, ...n }) {
743
- let r = ye();
743
+ let r = s();
744
744
  return /* @__PURE__ */ W(fn, {
745
745
  container: r,
746
746
  children: /* @__PURE__ */ W(pn, {
747
747
  "data-slot": "dropdown-menu-content",
748
748
  sideOffset: t,
749
- className: x("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", e),
749
+ className: o("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", e),
750
750
  ...n
751
751
  })
752
752
  });
@@ -759,7 +759,7 @@ function Nn({ className: e, inset: t, variant: n = "default", onClick: r, onSele
759
759
  onSelect: (e) => {
760
760
  i?.(e), !e.defaultPrevented && r && r(e);
761
761
  },
762
- className: x("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:hover:bg-destructive/10 data-[variant=destructive]:hover:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:hover:bg-destructive/20 dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!", e),
762
+ className: o("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:hover:bg-destructive/10 data-[variant=destructive]:hover:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:hover:bg-destructive/20 dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!", e),
763
763
  ...a
764
764
  });
765
765
  }
@@ -773,7 +773,7 @@ function Fn({ className: e, inset: t, children: n, ...r }) {
773
773
  return /* @__PURE__ */ G(gn, {
774
774
  "data-slot": "dropdown-menu-sub-trigger",
775
775
  "data-inset": t,
776
- className: x("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", e),
776
+ className: o("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", e),
777
777
  ...r,
778
778
  children: [n, /* @__PURE__ */ W(I, { className: "ml-auto size-4" })]
779
779
  });
@@ -781,39 +781,39 @@ function Fn({ className: e, inset: t, children: n, ...r }) {
781
781
  function In({ className: e, ...t }) {
782
782
  return /* @__PURE__ */ W(_n, {
783
783
  "data-slot": "dropdown-menu-sub-content",
784
- className: x("z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", e),
784
+ className: o("z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", e),
785
785
  ...t
786
786
  });
787
787
  }
788
788
  //#endregion
789
789
  //#region src/ui/components/ui/sheet.tsx
790
- function Ln({ ...e }) {
791
- return /* @__PURE__ */ W(E, {
790
+ function Ln({ ...t }) {
791
+ return /* @__PURE__ */ W(e, {
792
792
  "data-slot": "sheet",
793
- ...e
793
+ ...t
794
794
  });
795
795
  }
796
796
  function Rn({ container: e, ...t }) {
797
- let n = ye();
798
- return /* @__PURE__ */ W(oe, {
797
+ let n = s();
798
+ return /* @__PURE__ */ W(te, {
799
799
  "data-slot": "sheet-portal",
800
800
  container: e ?? n,
801
801
  ...t
802
802
  });
803
803
  }
804
804
  function zn({ className: e, ...t }) {
805
- return /* @__PURE__ */ W(pe, {
805
+ return /* @__PURE__ */ W(ue, {
806
806
  "data-slot": "sheet-overlay",
807
- className: x("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", e),
807
+ className: o("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", e),
808
808
  ...t
809
809
  });
810
810
  }
811
- function Bn({ className: n, children: r, side: i = "right", showCloseButton: a = !0, ...o }) {
812
- return /* @__PURE__ */ G(Rn, { children: [/* @__PURE__ */ W(zn, {}), /* @__PURE__ */ G(e, {
811
+ function Bn({ className: e, children: n, side: r = "right", showCloseButton: i = !0, ...a }) {
812
+ return /* @__PURE__ */ G(Rn, { children: [/* @__PURE__ */ W(zn, {}), /* @__PURE__ */ G(pe, {
813
813
  "data-slot": "sheet-content",
814
- className: x("fixed z-50 flex flex-col gap-4 bg-background text-foreground shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500", i === "right" && "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm", i === "left" && "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm", i === "top" && "inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top", i === "bottom" && "inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom", n),
815
- ...o,
816
- children: [r, a && /* @__PURE__ */ G(_, {
814
+ className: o("fixed z-50 flex flex-col gap-4 bg-background text-foreground shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500", r === "right" && "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm", r === "left" && "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm", r === "top" && "inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top", r === "bottom" && "inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom", e),
815
+ ...a,
816
+ children: [n, i && /* @__PURE__ */ G(M, {
817
817
  className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary",
818
818
  children: [/* @__PURE__ */ W(t, { className: "size-4" }), /* @__PURE__ */ W("span", {
819
819
  className: "sr-only",
@@ -11718,9 +11718,9 @@ function cl(e) {
11718
11718
  return e.timeline ? `${e.timeline.startSec.toFixed(2)}s - ${e.timeline.endSec.toFixed(2)}s` : null;
11719
11719
  }
11720
11720
  var ll = ({ metadata: e, translationPrefix: t, className: n }) => {
11721
- let { t: r } = a(), [i, o] = ke(!1);
11721
+ let { t: r } = v(), [i, a] = ke(!1);
11722
11722
  if (V(() => {
11723
- let e = () => o(!0);
11723
+ let e = () => a(!0);
11724
11724
  return window.addEventListener("mousemove", e, { once: !0 }), () => window.removeEventListener("mousemove", e);
11725
11725
  }, []), !e) return null;
11726
11726
  let s = [
@@ -11754,7 +11754,7 @@ var ll = ({ metadata: e, translationPrefix: t, className: n }) => {
11754
11754
  }
11755
11755
  ].filter((e) => e.value);
11756
11756
  return s.length === 0 ? null : /* @__PURE__ */ W("div", {
11757
- className: x("pointer-events-none absolute left-2 top-2 z-10 max-h-[50%] max-w-[min(16rem,calc(100%-1rem))] overflow-y-auto rounded-md border border-white/10 bg-black/70 px-2.5 py-2 text-[11px] text-white opacity-0 shadow-lg backdrop-blur-sm transition-opacity duration-150", i && "group-hover:opacity-100 group-focus-within:opacity-100", n),
11757
+ className: o("pointer-events-none absolute left-2 top-2 z-10 max-h-[50%] max-w-[min(16rem,calc(100%-1rem))] overflow-y-auto rounded-md border border-white/10 bg-black/70 px-2.5 py-2 text-[11px] text-white opacity-0 shadow-lg backdrop-blur-sm transition-opacity duration-150", i && "group-hover:opacity-100 group-focus-within:opacity-100", n),
11758
11758
  children: /* @__PURE__ */ W("dl", {
11759
11759
  className: "flex flex-col gap-1",
11760
11760
  children: s.map((e) => /* @__PURE__ */ G("div", {
@@ -11770,19 +11770,19 @@ var ll = ({ metadata: e, translationPrefix: t, className: n }) => {
11770
11770
  })
11771
11771
  });
11772
11772
  }, ul = ({ params: e }) => {
11773
- let { t } = a(), { info: n, dataLoader: r, imageService: i, subscribeFrameIndex: o } = ee(), { selectedEpisodeIndex: s } = me(), c = H(() => e?.featureKey ? e.featureKey : Se(n) || "observation.images.cam_high", [e?.featureKey, n]), [l, u] = ke(!1), [d, f] = ke(null), [p, m] = ke(!1), [h, g] = ke(null), _ = U(null), v = U(!0), y = U(s), b = U(c), x = U(r), S = U(i), C = U(n), w = U(0), T = U(!1), E = U(null), D = U(!1);
11774
- y.current = s, b.current = c, x.current = r, S.current = i, C.current = n;
11773
+ let { t } = v(), { info: n, dataLoader: r, imageService: i, subscribeFrameIndex: a } = k(), { selectedEpisodeIndex: o } = me(), s = H(() => e?.featureKey ? e.featureKey : Se(n) || "observation.images.cam_high", [e?.featureKey, n]), [c, l] = ke(!1), [u, d] = ke(null), [f, p] = ke(!1), [m, h] = ke(null), g = U(null), _ = U(!0), y = U(o), b = U(s), x = U(r), S = U(i), C = U(n), w = U(0), T = U(!1), E = U(null), D = U(!1);
11774
+ y.current = o, b.current = s, x.current = r, S.current = i, C.current = n;
11775
11775
  let O = B((e) => {
11776
- let t = _.current;
11776
+ let t = g.current;
11777
11777
  if (!t) return;
11778
11778
  let n = t.getContext("2d");
11779
- n && ((t.width !== e.width || t.height !== e.height) && (t.width = e.width, t.height = e.height, v.current && g({
11779
+ n && ((t.width !== e.width || t.height !== e.height) && (t.width = e.width, t.height = e.height, _.current && h({
11780
11780
  width: e.width,
11781
11781
  height: e.height
11782
- })), n.drawImage(e, 0, 0), !p && v.current && (m(!0), u(!1)));
11783
- }, [p]), k = U(O);
11784
- k.current = O;
11785
- let A = B(() => {
11782
+ })), n.drawImage(e, 0, 0), !f && _.current && (p(!0), l(!1)));
11783
+ }, [f]), A = U(O);
11784
+ A.current = O;
11785
+ let j = B(() => {
11786
11786
  D.current || (D.current = !0, (async () => {
11787
11787
  try {
11788
11788
  for (;;) {
@@ -11795,89 +11795,89 @@ var ll = ({ metadata: e, translationPrefix: t, className: n }) => {
11795
11795
  if (!r || !a) continue;
11796
11796
  let o = r.getEpisodeDataPath(t);
11797
11797
  if (!o) {
11798
- v.current && (f("Cannot determine parquet file path"), u(!1));
11798
+ _.current && (d("Cannot determine parquet file path"), l(!1));
11799
11799
  continue;
11800
11800
  }
11801
11801
  let s = ++w.current;
11802
11802
  try {
11803
11803
  let r = await i.getFrameBitmap(n, e, o.startRow);
11804
11804
  if (r !== null) {
11805
- v.current && s === w.current && y.current === t && b.current === n ? (k.current(r), r.close(), f(null), u(!1)) : r.close();
11805
+ _.current && s === w.current && y.current === t && b.current === n ? (A.current(r), r.close(), d(null), l(!1)) : r.close();
11806
11806
  continue;
11807
11807
  }
11808
11808
  } catch {}
11809
- T.current = !0, !p && v.current && u(!0);
11809
+ T.current = !0, !f && _.current && l(!0);
11810
11810
  try {
11811
11811
  let r = await i.getImageFrame(o.path, n, Math.max(0, e), o.startRow);
11812
- if (v.current && s === w.current && y.current === t && b.current === n) {
11812
+ if (_.current && s === w.current && y.current === t && b.current === n) {
11813
11813
  let e = new Image();
11814
11814
  await new Promise((t, n) => {
11815
11815
  e.onload = () => t(), e.onerror = () => n(/* @__PURE__ */ Error("Image decode failed")), e.src = r;
11816
11816
  });
11817
11817
  let t = await createImageBitmap(e);
11818
- k.current(t), t.close(), f(null), u(!1);
11818
+ A.current(t), t.close(), d(null), l(!1);
11819
11819
  }
11820
11820
  } catch (e) {
11821
- v.current && s === w.current && y.current === t && b.current === n && (f(e instanceof Error ? e.message : "Failed to load image"), u(!1));
11821
+ _.current && s === w.current && y.current === t && b.current === n && (d(e instanceof Error ? e.message : "Failed to load image"), l(!1));
11822
11822
  } finally {
11823
11823
  w.current === s && (T.current = !1);
11824
11824
  }
11825
11825
  }
11826
11826
  } finally {
11827
- D.current = !1, E.current !== null && A();
11827
+ D.current = !1, E.current !== null && j();
11828
11828
  }
11829
11829
  })());
11830
- }, [p]), j = U(A);
11831
- j.current = A;
11832
- let M = B((e) => {
11833
- y.current !== null && (E.current = e, j.current());
11830
+ }, [f]), M = U(j);
11831
+ M.current = j;
11832
+ let N = B((e) => {
11833
+ y.current !== null && (E.current = e, M.current());
11834
11834
  }, []);
11835
- V(() => o((e) => {
11836
- M(e);
11837
- }), [o, M]), V(() => {
11838
- if (s === null) return;
11835
+ V(() => a((e) => {
11836
+ N(e);
11837
+ }), [a, N]), V(() => {
11838
+ if (o === null) return;
11839
11839
  w.current += 1, E.current = null, T.current = !1;
11840
- let e = _.current;
11841
- e && e.getContext("2d")?.clearRect(0, 0, e.width, e.height), m(!1), g(null), u(!1), f(null);
11840
+ let e = g.current;
11841
+ e && e.getContext("2d")?.clearRect(0, 0, e.width, e.height), p(!1), h(null), l(!1), d(null);
11842
11842
  let t = setTimeout(() => {
11843
- M(0);
11843
+ N(0);
11844
11844
  }, 0);
11845
11845
  return () => clearTimeout(t);
11846
11846
  }, [
11847
+ o,
11847
11848
  s,
11848
- c,
11849
- M
11850
- ]), V(() => (v.current = !0, () => {
11851
- v.current = !1, w.current += 1, E.current = null, T.current = !1;
11849
+ N
11850
+ ]), V(() => (_.current = !0, () => {
11851
+ _.current = !1, w.current += 1, E.current = null, T.current = !1;
11852
11852
  }), []);
11853
- let N = H(() => {
11853
+ let P = H(() => {
11854
11854
  if (!n?.features) return !1;
11855
- let e = n.features[c];
11855
+ let e = n.features[s];
11856
11856
  return e && e.dtype === "image";
11857
- }, [n, c]), P = H(() => qn(n, c, { runtimeDimensions: h }), [
11858
- c,
11859
- h,
11857
+ }, [n, s]), ee = H(() => qn(n, s, { runtimeDimensions: m }), [
11858
+ s,
11859
+ m,
11860
11860
  n
11861
11861
  ]);
11862
11862
  return /* @__PURE__ */ G("div", {
11863
11863
  className: "group relative flex h-full w-full items-center justify-center overflow-hidden bg-black",
11864
11864
  children: [
11865
11865
  /* @__PURE__ */ W(ll, {
11866
- metadata: P,
11866
+ metadata: ee,
11867
11867
  translationPrefix: "panels.image.debug"
11868
11868
  }),
11869
11869
  /* @__PURE__ */ W("canvas", {
11870
- ref: _,
11871
- "data-feature-key": c,
11872
- "data-depth-map": ce(n?.features?.[c]) ? "true" : "false",
11870
+ ref: g,
11871
+ "data-feature-key": s,
11872
+ "data-depth-map": se(n?.features?.[s]) ? "true" : "false",
11873
11873
  className: "h-full w-full object-contain",
11874
11874
  style: {
11875
- display: p ? "block" : "none",
11875
+ display: f ? "block" : "none",
11876
11876
  transform: "translateZ(0)",
11877
11877
  imageRendering: "auto"
11878
11878
  }
11879
11879
  }),
11880
- l && !p && /* @__PURE__ */ W("div", {
11880
+ c && !f && /* @__PURE__ */ W("div", {
11881
11881
  className: "absolute inset-0 flex items-center justify-center",
11882
11882
  role: "status",
11883
11883
  "aria-live": "polite",
@@ -11892,17 +11892,17 @@ var ll = ({ metadata: e, translationPrefix: t, className: n }) => {
11892
11892
  })]
11893
11893
  })
11894
11894
  }),
11895
- d && !p && /* @__PURE__ */ W("div", {
11895
+ u && !f && /* @__PURE__ */ W("div", {
11896
11896
  className: "absolute inset-0 flex items-center justify-center",
11897
11897
  children: /* @__PURE__ */ W("div", {
11898
11898
  className: "text-center text-destructive p-4",
11899
11899
  children: /* @__PURE__ */ W("p", {
11900
11900
  className: "text-sm",
11901
- children: d
11901
+ children: u
11902
11902
  })
11903
11903
  })
11904
11904
  }),
11905
- !p && !l && !d && /* @__PURE__ */ W("div", {
11905
+ !f && !c && !u && /* @__PURE__ */ W("div", {
11906
11906
  className: "absolute inset-0 flex items-center justify-center text-center text-muted-foreground",
11907
11907
  children: /* @__PURE__ */ G("div", { children: [
11908
11908
  /* @__PURE__ */ W("p", {
@@ -11911,25 +11911,25 @@ var ll = ({ metadata: e, translationPrefix: t, className: n }) => {
11911
11911
  }),
11912
11912
  /* @__PURE__ */ W("p", {
11913
11913
  className: "text-sm mt-2",
11914
- children: c
11914
+ children: s
11915
11915
  }),
11916
- !N && /* @__PURE__ */ W("p", {
11916
+ !P && /* @__PURE__ */ W("p", {
11917
11917
  className: "text-xs mt-4 text-destructive",
11918
- children: t("panels.image.featureNotFound", { key: c })
11918
+ children: t("panels.image.featureNotFound", { key: s })
11919
11919
  })
11920
11920
  ] })
11921
11921
  })
11922
11922
  ]
11923
11923
  });
11924
11924
  }, dl = ({ params: e }) => {
11925
- let { t } = a(), { info: n, dataLoader: r, subscribeFrameIndex: i } = ee(), { selectedEpisodeIndex: o } = me(), s = U(null), [c, l] = ke(!1), [u, d] = ke(!1), [f, p] = ke(null), [m, h] = ke(null), [g, _] = ke(null), [v, y] = ke(""), b = U(null), x = U(null), S = U(new L(8)), C = U(0), w = U(0), T = U(!0), E = e?.featureKey || "observation.images.up", D = H(() => qn(n, E, {
11926
- runtimeDimensions: m,
11927
- timeline: g
11925
+ let { t } = v(), { info: n, dataLoader: r, subscribeFrameIndex: i } = k(), { selectedEpisodeIndex: a } = me(), o = U(null), [s, c] = ke(!1), [l, u] = ke(!1), [d, f] = ke(null), [p, m] = ke(null), [h, g] = ke(null), [_, y] = ke(""), b = U(null), x = U(null), S = U(new L(8)), C = U(0), w = U(0), T = U(!0), E = e?.featureKey || "observation.images.up", D = H(() => qn(n, E, {
11926
+ runtimeDimensions: p,
11927
+ timeline: h
11928
11928
  }), [
11929
11929
  E,
11930
11930
  n,
11931
- g,
11932
- m
11931
+ h,
11932
+ p
11933
11933
  ]), O = B((e) => {
11934
11934
  if (!r) return null;
11935
11935
  let t = r.getEpisodeVideoPath(e, E);
@@ -11938,32 +11938,32 @@ var ll = ({ metadata: e, translationPrefix: t, className: n }) => {
11938
11938
  start: t.fromSec ?? 0,
11939
11939
  end: t.toSec ?? 0
11940
11940
  } : null;
11941
- }, [r, E]), k = B(async (e, n = !0) => {
11941
+ }, [r, E]), A = B(async (e, n = !0) => {
11942
11942
  let i = w.current;
11943
11943
  if (!r) return !1;
11944
11944
  let a = (n, r) => new Promise((a) => {
11945
- let o = s.current;
11946
- if (!o) {
11945
+ let s = o.current;
11946
+ if (!s) {
11947
11947
  a(!1);
11948
11948
  return;
11949
11949
  }
11950
- let c = !b.current;
11951
- c && T.current && i === w.current && (d(!0), p(null));
11952
- let u = () => {
11950
+ let l = !b.current;
11951
+ l && T.current && i === w.current && (u(!0), f(null));
11952
+ let d = () => {
11953
11953
  !T.current || i !== w.current || (b.current = {
11954
11954
  path: e,
11955
11955
  url: n,
11956
- duration: o.duration
11957
- }, y(e), h({
11958
- width: o.videoWidth,
11959
- height: o.videoHeight
11956
+ duration: s.duration
11957
+ }, y(e), m({
11958
+ width: s.videoWidth,
11959
+ height: s.videoHeight
11960
11960
  }));
11961
- }, f = () => {
11962
- T.current && i === w.current && (l(!0), p(null), c && d(!1)), a(!0);
11963
- }, m = () => {
11964
- o.removeEventListener("loadedmetadata", u), o.removeEventListener("canplay", f), o.removeEventListener("error", m), console.error("Video load error:", e), !r && T.current && i === w.current && (l(!1), p(t("sidebar.errorLoading")), c && d(!1)), a(!1);
11961
+ }, p = () => {
11962
+ T.current && i === w.current && (c(!0), f(null), l && u(!1)), a(!0);
11963
+ }, h = () => {
11964
+ s.removeEventListener("loadedmetadata", d), s.removeEventListener("canplay", p), s.removeEventListener("error", h), console.error("Video load error:", e), !r && T.current && i === w.current && (c(!1), f(t("sidebar.errorLoading")), l && u(!1)), a(!1);
11965
11965
  };
11966
- o.addEventListener("loadedmetadata", u, { once: !0 }), o.addEventListener("canplay", f, { once: !0 }), o.addEventListener("error", m, { once: !0 }), o.src = n, o.preload = "auto", o.load();
11966
+ s.addEventListener("loadedmetadata", d, { once: !0 }), s.addEventListener("canplay", p, { once: !0 }), s.addEventListener("error", h, { once: !0 }), s.src = n, s.preload = "auto", s.load();
11967
11967
  });
11968
11968
  try {
11969
11969
  let o = S.current.get(e);
@@ -11974,65 +11974,65 @@ var ll = ({ metadata: e, translationPrefix: t, className: n }) => {
11974
11974
  let t = await r.getFileUrl(e);
11975
11975
  S.current.getUrl(e, t), s = await a(t, !1);
11976
11976
  } catch (e) {
11977
- return console.error("Failed to recover video after invalidate:", e), T.current && i === w.current && (p(t("sidebar.errorLoading")), d(!1)), !1;
11977
+ return console.error("Failed to recover video after invalidate:", e), T.current && i === w.current && (f(t("sidebar.errorLoading")), u(!1)), !1;
11978
11978
  }
11979
11979
  return s;
11980
11980
  } catch (e) {
11981
- return console.error("Failed to load video:", e), T.current && i === w.current && (p(t("sidebar.errorLoading")), d(!1)), !1;
11981
+ return console.error("Failed to load video:", e), T.current && i === w.current && (f(t("sidebar.errorLoading")), u(!1)), !1;
11982
11982
  }
11983
11983
  }, [r, t]);
11984
11984
  return V(() => {
11985
11985
  (async () => {
11986
11986
  let e = ++w.current;
11987
- if (!n || o === null || !r) {
11988
- T.current && e === w.current && (y(""), _(null));
11987
+ if (!n || a === null || !r) {
11988
+ T.current && e === w.current && (y(""), g(null));
11989
11989
  return;
11990
11990
  }
11991
- let t = O(o);
11991
+ let t = O(a);
11992
11992
  if (!t) {
11993
- T.current && e === w.current && (y(""), _(null));
11993
+ T.current && e === w.current && (y(""), g(null));
11994
11994
  return;
11995
11995
  }
11996
- let { path: i, start: a, end: c } = t, l = s.current;
11997
- if (l && (T.current && e === w.current && h(null), !(b.current?.path !== i && (!await k(i) || e !== w.current)) && b.current)) {
11996
+ let { path: i, start: s, end: c } = t, l = o.current;
11997
+ if (l && (T.current && e === w.current && m(null), !(b.current?.path !== i && (!await A(i) || e !== w.current)) && b.current)) {
11998
11998
  let t = c > 0 ? c : b.current.duration;
11999
11999
  if (x.current = {
12000
- start: a,
12000
+ start: s,
12001
12001
  end: t
12002
- }, T.current && e === w.current && _({
12003
- startSec: a,
12002
+ }, T.current && e === w.current && g({
12003
+ startSec: s,
12004
12004
  endSec: t
12005
- }), l.readyState >= 2) l.currentTime = a;
12005
+ }), l.readyState >= 2) l.currentTime = s;
12006
12006
  else {
12007
12007
  let t = () => {
12008
12008
  if (e !== w.current) {
12009
12009
  l.removeEventListener("canplay", t);
12010
12010
  return;
12011
12011
  }
12012
- l.currentTime = a, l.removeEventListener("canplay", t);
12012
+ l.currentTime = s, l.removeEventListener("canplay", t);
12013
12013
  };
12014
12014
  l.addEventListener("canplay", t, { once: !0 });
12015
12015
  }
12016
12016
  }
12017
12017
  })();
12018
12018
  }, [
12019
- o,
12019
+ a,
12020
12020
  n,
12021
12021
  r,
12022
12022
  E,
12023
12023
  O,
12024
- k
12024
+ A
12025
12025
  ]), V(() => (T.current = !0, () => {
12026
12026
  T.current = !1, w.current += 1;
12027
12027
  }), []), V(() => {
12028
- if (!(!c || !x.current)) return i((e) => {
12029
- let t = s.current, r = x.current;
12028
+ if (!(!s || !x.current)) return i((e) => {
12029
+ let t = o.current, r = x.current;
12030
12030
  if (!t || !r || t.readyState < 2) return;
12031
- let i = n?.fps ?? 30, a = Math.max(r.start, Math.min(r.start + e / i, r.end)), o = Date.now();
12032
- o - C.current < 16 || Math.abs(t.currentTime - a) > .033 && (t.currentTime = a, C.current = o);
12031
+ let i = n?.fps ?? 30, a = Math.max(r.start, Math.min(r.start + e / i, r.end)), s = Date.now();
12032
+ s - C.current < 16 || Math.abs(t.currentTime - a) > .033 && (t.currentTime = a, C.current = s);
12033
12033
  });
12034
12034
  }, [
12035
- c,
12035
+ s,
12036
12036
  n,
12037
12037
  i
12038
12038
  ]), /* @__PURE__ */ G("div", {
@@ -12043,10 +12043,10 @@ var ll = ({ metadata: e, translationPrefix: t, className: n }) => {
12043
12043
  translationPrefix: "panels.video.debug"
12044
12044
  }),
12045
12045
  /* @__PURE__ */ W("video", {
12046
- ref: s,
12046
+ ref: o,
12047
12047
  className: "h-full w-full object-contain",
12048
12048
  style: {
12049
- display: c ? "block" : "none",
12049
+ display: s ? "block" : "none",
12050
12050
  transform: "translateZ(0)",
12051
12051
  backfaceVisibility: "hidden"
12052
12052
  },
@@ -12056,9 +12056,9 @@ var ll = ({ metadata: e, translationPrefix: t, className: n }) => {
12056
12056
  disablePictureInPicture: !0,
12057
12057
  disableRemotePlayback: !0
12058
12058
  }),
12059
- !c && /* @__PURE__ */ W("div", {
12059
+ !s && /* @__PURE__ */ W("div", {
12060
12060
  className: "absolute inset-0 flex items-center justify-center text-center text-muted-foreground",
12061
- children: /* @__PURE__ */ W("div", { children: u ? /* @__PURE__ */ G("div", {
12061
+ children: /* @__PURE__ */ W("div", { children: l ? /* @__PURE__ */ G("div", {
12062
12062
  role: "status",
12063
12063
  "aria-live": "polite",
12064
12064
  children: [/* @__PURE__ */ W("div", {
@@ -12068,7 +12068,7 @@ var ll = ({ metadata: e, translationPrefix: t, className: n }) => {
12068
12068
  className: "text-sm opacity-50",
12069
12069
  children: t("panels.video.placeholder")
12070
12070
  })]
12071
- }) : f ? /* @__PURE__ */ G("div", {
12071
+ }) : d ? /* @__PURE__ */ G("div", {
12072
12072
  className: "text-destructive max-w-xs mx-auto",
12073
12073
  children: [
12074
12074
  /* @__PURE__ */ W("div", {
@@ -12077,11 +12077,11 @@ var ll = ({ metadata: e, translationPrefix: t, className: n }) => {
12077
12077
  }),
12078
12078
  /* @__PURE__ */ W("p", {
12079
12079
  className: "font-medium",
12080
- children: f
12080
+ children: d
12081
12081
  }),
12082
12082
  /* @__PURE__ */ W("p", {
12083
12083
  className: "text-xs mt-2 opacity-70 break-all",
12084
- children: v
12084
+ children: _
12085
12085
  })
12086
12086
  ]
12087
12087
  }) : /* @__PURE__ */ G(je, { children: [
@@ -12102,7 +12102,7 @@ var ll = ({ metadata: e, translationPrefix: t, className: n }) => {
12102
12102
  ]
12103
12103
  });
12104
12104
  }, fl = ({ params: e }) => {
12105
- let { info: t } = ee(), n = H(() => e?.featureKey ? e.featureKey : Se(t) || "observation.images.up", [e?.featureKey, t]), r = H(() => ge(t, n), [t, n]), i = H(() => ({
12105
+ let { info: t } = k(), n = H(() => e?.featureKey ? e.featureKey : Se(t) || "observation.images.up", [e?.featureKey, t]), r = H(() => ge(t, n), [t, n]), i = H(() => ({
12106
12106
  ...e,
12107
12107
  featureKey: n
12108
12108
  }), [e, n]);
@@ -13102,20 +13102,20 @@ function Jp(e) {
13102
13102
  band: null,
13103
13103
  gaps: null,
13104
13104
  flags: Sp
13105
- }, E = T.stroke, D = d.dir * (d.ori == 0 ? 1 : -1), O = C(u[D == 1 ? o : s]), k = S(l[D == 1 ? o : s]), ee = k, A = k;
13106
- i && t == -1 && (A = b, w(E, A, O)), w(E, k, O);
13105
+ }, E = T.stroke, D = d.dir * (d.ori == 0 ? 1 : -1), O = C(u[D == 1 ? o : s]), k = S(l[D == 1 ? o : s]), A = k, j = k;
13106
+ i && t == -1 && (j = b, w(E, j, O)), w(E, k, O);
13107
13107
  for (let e = D == 1 ? o : s; e >= o && e <= s; e += D) {
13108
13108
  let n = u[e];
13109
13109
  if (n == null) continue;
13110
13110
  let r = S(l[e]), i = C(n);
13111
- t == 1 ? w(E, r, O) : w(E, ee, i), w(E, r, i), O = i, ee = r;
13111
+ t == 1 ? w(E, r, O) : w(E, A, i), w(E, r, i), O = i, A = r;
13112
13112
  }
13113
- let j = ee;
13114
- i && t == 1 && (j = b + x, w(E, j, O));
13115
- let [M, N] = Tp(e, a);
13116
- if (c.fill != null || M != 0) {
13117
- let t = T.fill = new Path2D(E), n = C(c.fillTo(e, a, c.min, c.max, M));
13118
- w(t, j, n), w(t, A, n);
13113
+ let M = A;
13114
+ i && t == 1 && (M = b + x, w(E, M, O));
13115
+ let [N, P] = Tp(e, a);
13116
+ if (c.fill != null || N != 0) {
13117
+ let t = T.fill = new Path2D(E), n = C(c.fillTo(e, a, c.min, c.max, N));
13118
+ w(t, M, n), w(t, j, n);
13119
13119
  }
13120
13120
  if (!c.spanGaps) {
13121
13121
  let i = [];
@@ -13125,7 +13125,7 @@ function Jp(e) {
13125
13125
  e[0] += p, e[1] += m;
13126
13126
  }), T.gaps = i = c.gaps(e, a, o, s, i), T.clip = Op(i, d.ori, h, g, _, v);
13127
13127
  }
13128
- return N != 0 && (T.band = N == 2 ? [Dp(e, a, o, s, E, -1), Dp(e, a, o, s, E, 1)] : Dp(e, a, o, s, E, N)), T;
13128
+ return P != 0 && (T.band = P == 2 ? [Dp(e, a, o, s, E, -1), Dp(e, a, o, s, E, 1)] : Dp(e, a, o, s, E, P)), T;
13129
13129
  });
13130
13130
  }
13131
13131
  function Yp(e, t, n, r, i, a, o = $u) {
@@ -13151,11 +13151,11 @@ function Xp(e) {
13151
13151
  i = i == null ? [0, 0] : typeof i == "number" ? [i, 0] : i;
13152
13152
  let a = $(i), o = 1 - t[0], s = Q(t[1], $u), c = Q(t[2], 1), l = Q(e.disp, vd), u = Q(e.each, (e) => {}), { fill: d, stroke: f } = l;
13153
13153
  return (e, t, i, p) => wp(e, t, (m, h, g, _, v, y, b, x, S, C, w) => {
13154
- let T = m.pxRound, E = n, D = r * ru, O = s * ru, k = c * ru, ee, A;
13155
- _.ori == 0 ? [ee, A] = a(e, t) : [A, ee] = a(e, t);
13156
- let j = _.dir * (_.ori == 0 ? 1 : -1), M = _.ori == 0 ? Lp : Rp, N = _.ori == 0 ? u : (e, t, n, r, i, a, o) => {
13154
+ let T = m.pxRound, E = n, D = r * ru, O = s * ru, k = c * ru, A, j;
13155
+ _.ori == 0 ? [A, j] = a(e, t) : [j, A] = a(e, t);
13156
+ let M = _.dir * (_.ori == 0 ? 1 : -1), N = _.ori == 0 ? Lp : Rp, P = _.ori == 0 ? u : (e, t, n, r, i, a, o) => {
13157
13157
  u(e, t, n, i, r, o, a);
13158
- }, P = Q(e.bands, yd).find((e) => e.series[0] == t), te = P == null ? 0 : P.dir, ne = m.fillTo(e, t, m.min, m.max, te), re = T(b(ne, v, w, S)), F, ie, ae, oe = C, se = T(m.width * ru), ce = !1, le = null, ue = null, de = null, fe = null;
13158
+ }, ee = Q(e.bands, yd).find((e) => e.series[0] == t), te = ee == null ? 0 : ee.dir, ne = m.fillTo(e, t, m.min, m.max, te), re = T(b(ne, v, w, S)), F, ie, ae, oe = C, se = T(m.width * ru), ce = !1, le = null, ue = null, de = null, fe = null;
13159
13159
  d != null && (se == 0 || f != null) && (ce = !0, le = d.values(e, t, i, p), ue = /* @__PURE__ */ new Map(), new Set(le).forEach((e) => {
13160
13160
  e != null && ue.set(e, new Path2D());
13161
13161
  }), se > 0 && (de = f.values(e, t, i, p), fe = /* @__PURE__ */ new Map(), new Set(de).forEach((e) => {
@@ -13169,7 +13169,7 @@ function Xp(e) {
13169
13169
  } else oe = Yp(h, g, y, _, C, x, oe), ae = oe * o + D, ie = oe - ae;
13170
13170
  ae < 1 && (ae = 0), se >= ie / 2 && (se = 0), ae < 5 && (T = id);
13171
13171
  let he = ae > 0, ge = oe - ae - (he ? se : 0);
13172
- ie = T(td(ge, k, O)), F = (E == 0 ? ie / 2 : E == j ? 0 : ie) - E * j * ((E == 0 ? D / 2 : 0) + (he ? se / 2 : 0));
13172
+ ie = T(td(ge, k, O)), F = (E == 0 ? ie / 2 : E == M ? 0 : ie) - E * M * ((E == 0 ? D / 2 : 0) + (he ? se / 2 : 0));
13173
13173
  let _e = {
13174
13174
  stroke: null,
13175
13175
  fill: null,
@@ -13178,13 +13178,13 @@ function Xp(e) {
13178
13178
  gaps: null,
13179
13179
  flags: 0
13180
13180
  }, ve = ce ? null : new Path2D(), ye = null;
13181
- if (P != null) ye = e.data[P.series[1]];
13181
+ if (ee != null) ye = e.data[ee.series[1]];
13182
13182
  else {
13183
13183
  let { y0: n, y1: r } = l;
13184
13184
  n != null && r != null && (g = r.values(e, t, i, p), ye = n.values(e, t, i, p));
13185
13185
  }
13186
- let be = ee * ie, xe = A * ie;
13187
- for (let n = j == 1 ? i : p; n >= i && n <= p; n += j) {
13186
+ let be = A * ie, xe = j * ie;
13187
+ for (let n = M == 1 ? i : p; n >= i && n <= p; n += M) {
13188
13188
  let r = g[n];
13189
13189
  if (r == null) continue;
13190
13190
  if (ye != null) {
@@ -13195,7 +13195,7 @@ function Xp(e) {
13195
13195
  let i = y(_.distr != 2 || l != null ? h[n] : n, _, C, x), a = b(Q(r, ne), v, w, S), o = T(i - F), s = T(Ku(a, re)), c = T(Gu(a, re)), u = s - c;
13196
13196
  if (r != null) {
13197
13197
  let i = r < 0 ? xe : be, a = r < 0 ? be : xe;
13198
- ce ? (se > 0 && de[n] != null && M(fe.get(de[n]), o, c + Hu(se / 2), ie, Ku(0, u - se), i, a), le[n] != null && M(ue.get(le[n]), o, c + Hu(se / 2), ie, Ku(0, u - se), i, a)) : M(ve, o, c + Hu(se / 2), ie, Ku(0, u - se), i, a), N(e, t, n, o - se / 2, c, ie + se, u);
13198
+ ce ? (se > 0 && de[n] != null && N(fe.get(de[n]), o, c + Hu(se / 2), ie, Ku(0, u - se), i, a), le[n] != null && N(ue.get(le[n]), o, c + Hu(se / 2), ie, Ku(0, u - se), i, a)) : N(ve, o, c + Hu(se / 2), ie, Ku(0, u - se), i, a), P(e, t, n, o - se / 2, c, ie + se, u);
13199
13199
  }
13200
13200
  }
13201
13201
  return se > 0 ? _e.stroke = ce ? fe : ve : ce || (_e._fill = m.width == 0 ? m._fill : m._stroke ?? m._fill, _e.width = 0), _e.fill = ce ? ue : ve, _e;
@@ -13219,16 +13219,16 @@ function Zp(e, t) {
13219
13219
  band: null,
13220
13220
  gaps: null,
13221
13221
  flags: Sp
13222
- }, k = O.stroke, [ee, A] = Tp(t, r);
13223
- if (o.fill != null || ee != 0) {
13224
- let e = O.fill = new Path2D(k), n = y(o.fillTo(t, r, o.min, o.max, ee));
13222
+ }, k = O.stroke, [A, j] = Tp(t, r);
13223
+ if (o.fill != null || A != 0) {
13224
+ let e = O.fill = new Path2D(k), n = y(o.fillTo(t, r, o.min, o.max, A));
13225
13225
  S(e, T, n), S(e, w, n);
13226
13226
  }
13227
13227
  if (!o.spanGaps) {
13228
13228
  let e = [];
13229
13229
  e.push(...Ap(s, c, i, a, C, v, n)), O.gaps = e = o.gaps(t, r, i, a, e), O.clip = Op(e, l.ori, p, m, h, g);
13230
13230
  }
13231
- return A != 0 && (O.band = A == 2 ? [Dp(t, r, i, a, k, -1), Dp(t, r, i, a, k, 1)] : Dp(t, r, i, a, k, A)), O;
13231
+ return j != 0 && (O.band = j == 2 ? [Dp(t, r, i, a, k, -1), Dp(t, r, i, a, k, 1)] : Dp(t, r, i, a, k, j)), O;
13232
13232
  });
13233
13233
  }
13234
13234
  function Qp(e) {
@@ -13387,17 +13387,17 @@ function _m(e, t, n) {
13387
13387
  E(e.scale);
13388
13388
  });
13389
13389
  for (let t in e.scales) E(t);
13390
- let D = b[S], O = D.distr, k, ee;
13391
- D.ori == 0 ? (ou(l, hl), k = a, ee = o) : (ou(l, gl), k = o, ee = a);
13392
- let A = {};
13390
+ let D = b[S], O = D.distr, k, A;
13391
+ D.ori == 0 ? (ou(l, hl), k = a, A = o) : (ou(l, gl), k = o, A = a);
13392
+ let j = {};
13393
13393
  for (let e in b) {
13394
13394
  let t = b[e];
13395
- (t.min != null || t.max != null) && (A[e] = {
13395
+ (t.min != null || t.max != null) && (j[e] = {
13396
13396
  min: t.min,
13397
13397
  max: t.max
13398
13398
  }, t.min = t.max = null);
13399
13399
  }
13400
- let j = e.tzDate || ((e) => new Date(Uu(e / _))), M = e.fmtDate || Jd, N = _ == 1 ? vf(j) : xf(j), P = Cf(j, Sf(_ == 1 ? _f : bf, M)), te = Of(j, Ef(Df, M)), ne = [], re = r.legend = Ad({}, jf, e.legend), F = r.cursor = Ad({}, Bf, { drag: { y: i == 2 } }, e.cursor), ie = re.show, ae = F.show, oe = re.markers;
13400
+ let M = e.tzDate || ((e) => new Date(Uu(e / _))), N = e.fmtDate || Jd, P = _ == 1 ? vf(M) : xf(M), ee = Cf(M, Sf(_ == 1 ? _f : bf, N)), te = Of(M, Ef(Df, N)), ne = [], re = r.legend = Ad({}, jf, e.legend), F = r.cursor = Ad({}, Bf, { drag: { y: i == 2 } }, e.cursor), ie = re.show, ae = F.show, oe = re.markers;
13401
13401
  re.idxs = ne, oe.width = $(oe.width), oe.dash = $(oe.dash), oe.stroke = $(oe.stroke), oe.fill = $(oe.fill);
13402
13402
  let se, ce, le, ue = [], de = [], fe, pe = !1, me = {};
13403
13403
  if (re.live) {
@@ -13539,7 +13539,7 @@ function _m(e, t, n) {
13539
13539
  function Ke(e, t) {
13540
13540
  if (i == 1 || t > 0) {
13541
13541
  let t = i == 1 && b[e.scale].time, n = e.value;
13542
- e.value = t ? wd(n) ? Of(j, Ef(n, M)) : n || te : n || lp, e.label = e.label || (t ? Xf : Yf);
13542
+ e.value = t ? wd(n) ? Of(M, Ef(n, N)) : n || te : n || lp, e.label = e.label || (t ? Xf : Yf);
13543
13543
  }
13544
13544
  if (Ve || t > 0) {
13545
13545
  e.width = e.width == null ? 1 : e.width, e.paths = e.paths || nm || od, e.fillTo = $(e.fillTo || Ep), e.pxAlign = +Q(e.pxAlign, h), e.pxRound = jp(e.pxAlign), e.stroke = $(e.stroke || null), e.fill = $(e.fill || null), e._stroke = e._fill = e._paths = e._focus = null;
@@ -13591,9 +13591,9 @@ function _m(e, t, n) {
13591
13591
  let a = i.time;
13592
13592
  e.size = $(e.size), e.space = $(e.space), e.rotate = $(e.rotate), xd(e.incrs) && e.incrs.forEach((e) => {
13593
13593
  !hd.has(e) && hd.set(e, gd(e));
13594
- }), e.incrs = $(e.incrs || (i.distr == 2 ? tf : a ? _ == 1 ? gf : yf : nf)), e.splits = $(e.splits || (a && i.distr == 1 ? N : i.distr == 3 ? ep : i.distr == 4 ? tp : $f)), e.stroke = $(e.stroke), e.grid.stroke = $(e.grid.stroke), e.ticks.stroke = $(e.ticks.stroke), e.border.stroke = $(e.border.stroke);
13594
+ }), e.incrs = $(e.incrs || (i.distr == 2 ? tf : a ? _ == 1 ? gf : yf : nf)), e.splits = $(e.splits || (a && i.distr == 1 ? P : i.distr == 3 ? ep : i.distr == 4 ? tp : $f)), e.stroke = $(e.stroke), e.grid.stroke = $(e.grid.stroke), e.ticks.stroke = $(e.ticks.stroke), e.border.stroke = $(e.border.stroke);
13595
13595
  let o = e.values;
13596
- e.values = xd(o) && !xd(o[0]) ? $(o) : a ? xd(o) ? Cf(j, Sf(o, M)) : wd(o) ? wf(j, o) : o || P : o || Qf, e.filter = $(e.filter || (i.distr >= 3 && i.log == 10 ? sp : i.distr == 3 && i.log == 2 ? cp : ad)), e.font = hm(e.font), e.labelFont = hm(e.labelFont), e._size = e.size(r, null, t, 0), e._space = e._rotate = e._incrs = e._found = e._splits = e._values = null, e._size > 0 && (Ye[t] = !0, e._el = uu(xl, f));
13596
+ e.values = xd(o) && !xd(o[0]) ? $(o) : a ? xd(o) ? Cf(M, Sf(o, N)) : wd(o) ? wf(M, o) : o || ee : o || Qf, e.filter = $(e.filter || (i.distr >= 3 && i.log == 10 ? sp : i.distr == 3 && i.log == 2 ? cp : ad)), e.font = hm(e.font), e.labelFont = hm(e.labelFont), e._size = e.size(r, null, t, 0), e._space = e._rotate = e._incrs = e._found = e._splits = e._values = null, e._size > 0 && (Ye[t] = !0, e._el = uu(xl, f));
13597
13597
  }
13598
13598
  }
13599
13599
  function Ze(e, t, n, r) {
@@ -13651,16 +13651,16 @@ function _m(e, t, n) {
13651
13651
  function St() {
13652
13652
  for (let e in b) {
13653
13653
  let t = b[e];
13654
- A[e] == null && (t.min == null || A[S] != null && t.auto(r, at)) && (A[e] = xt);
13654
+ j[e] == null && (t.min == null || j[S] != null && t.auto(r, at)) && (j[e] = xt);
13655
13655
  }
13656
13656
  for (let e in b) {
13657
13657
  let t = b[e];
13658
- A[e] == null && t.from != null && A[t.from] != null && (A[e] = xt);
13658
+ j[e] == null && t.from != null && j[t.from] != null && (j[e] = xt);
13659
13659
  }
13660
- A[S] != null && It(!0);
13660
+ j[S] != null && It(!0);
13661
13661
  let e = {};
13662
- for (let t in A) {
13663
- let n = A[t];
13662
+ for (let t in j) {
13663
+ let n = j[t];
13664
13664
  if (n != null) {
13665
13665
  let a = e[t] = kd(b[t], Ed);
13666
13666
  if (n.min != null) Ad(a, n);
@@ -13675,7 +13675,7 @@ function _m(e, t, n) {
13675
13675
  if (et > 0) {
13676
13676
  v.forEach((n, a) => {
13677
13677
  if (i == 1) {
13678
- let i = n.scale, o = A[i];
13678
+ let i = n.scale, o = j[i];
13679
13679
  if (o == null) return;
13680
13680
  let s = e[i];
13681
13681
  if (a == 0) {
@@ -13685,11 +13685,11 @@ function _m(e, t, n) {
13685
13685
  n.idxs[0] = tt, n.idxs[1] = nt;
13686
13686
  } else if (a > 0 && n.show && n.auto) {
13687
13687
  let [r, i] = n.facets, o = r.scale, s = i.scale, [c, l] = t[a], u = e[o], d = e[s];
13688
- u != null && bt(u, A[o], r, c, r.sorted), d != null && bt(d, A[s], i, l, i.sorted), n.min = i.min, n.max = i.max;
13688
+ u != null && bt(u, j[o], r, c, r.sorted), d != null && bt(d, j[s], i, l, i.sorted), n.min = i.min, n.max = i.max;
13689
13689
  }
13690
13690
  });
13691
13691
  for (let t in e) {
13692
- let n = e[t], i = A[t];
13692
+ let n = e[t], i = j[t];
13693
13693
  if (n.from == null && (i == null || i.min == null)) {
13694
13694
  let e = n.range(r, n.min == $u ? null : n.min, n.max == -Infinity ? null : n.max, t);
13695
13695
  n.min = e[0], n.max = e[1];
@@ -13723,7 +13723,7 @@ function _m(e, t, n) {
13723
13723
  for (let e in n) Ae = !0, Xn("setScale", e);
13724
13724
  ae && F.left >= 0 && (je = G = !0);
13725
13725
  }
13726
- for (let e in A) A[e] = null;
13726
+ for (let e in j) j[e] = null;
13727
13727
  }
13728
13728
  function Ct(e) {
13729
13729
  let t = td(tt - 1, 0, et - 1), n = td(nt + 1, 0, et - 1);
@@ -13850,23 +13850,23 @@ function _m(e, t, n) {
13850
13850
  if (f == 0) continue;
13851
13851
  let p = b[t.scale], m = i == 0 ? V : H, h = i == 0 ? B : Oe, _ = t._splits, v = p.distr == 2 ? _.map((e) => it[e]) : _, x = p.distr == 2 ? it[_[1]] - it[_[0]] : u, S = t.ticks, C = t.border, w = S.show ? S.size : 0, T = Uu(w * ru), E = Uu((t.alignTo == 2 ? t._size - w - t.gap : t.gap) * ru), D = t._rotate * -Bu / 180, O = g(t._pos * ru), k = O + (T + E) * l;
13852
13852
  o = i == 0 ? k : 0, a = i == 1 ? k : 0;
13853
- let ee = t.font[0];
13854
- yt(ee, c, t.align == 1 ? Rl : t.align == 2 ? zl : D > 0 ? Rl : D < 0 ? zl : i == 0 ? "center" : n == 3 ? zl : Rl, D || i == 1 ? "middle" : n == 2 ? Il : Ll);
13855
- let A = t.font[1] * t.lineGap, j = _.map((e) => g(s(e, p, m, h))), M = t._values;
13856
- for (let e = 0; e < M.length; e++) {
13857
- let t = M[e];
13853
+ let A = t.font[0];
13854
+ yt(A, c, t.align == 1 ? Rl : t.align == 2 ? zl : D > 0 ? Rl : D < 0 ? zl : i == 0 ? "center" : n == 3 ? zl : Rl, D || i == 1 ? "middle" : n == 2 ? Il : Ll);
13855
+ let j = t.font[1] * t.lineGap, M = _.map((e) => g(s(e, p, m, h))), N = t._values;
13856
+ for (let e = 0; e < N.length; e++) {
13857
+ let t = N[e];
13858
13858
  if (t != null) {
13859
- i == 0 ? a = j[e] : o = j[e], t = "" + t;
13859
+ i == 0 ? a = M[e] : o = M[e], t = "" + t;
13860
13860
  let n = t.indexOf("\n") == -1 ? [t] : t.split(/\n/gm);
13861
13861
  for (let e = 0; e < n.length; e++) {
13862
13862
  let t = n[e];
13863
- D ? (d.save(), d.translate(a, o + e * A), d.rotate(D), d.fillText(t, 0, 0), d.restore()) : d.fillText(t, a, o + e * A);
13863
+ D ? (d.save(), d.translate(a, o + e * j), d.rotate(D), d.fillText(t, 0, 0), d.restore()) : d.fillText(t, a, o + e * j);
13864
13864
  }
13865
13865
  }
13866
13866
  }
13867
- S.show && Mt(j, S.filter(r, v, e, f, x), i, n, O, T, md(S.width * ru, 3), S.stroke(r, e), S.dash, S.cap);
13868
- let N = t.grid;
13869
- N.show && Mt(j, N.filter(r, v, e, f, x), i, i == 0 ? 2 : 1, i == 0 ? Oe : B, i == 0 ? H : V, md(N.width * ru, 3), N.stroke(r, e), N.dash, N.cap), C.show && Mt([O], [1], +(i == 0), i == 0 ? 1 : 2, i == 1 ? Oe : B, i == 1 ? H : V, md(C.width * ru, 3), C.stroke(r, e), C.dash, C.cap);
13867
+ S.show && Mt(M, S.filter(r, v, e, f, x), i, n, O, T, md(S.width * ru, 3), S.stroke(r, e), S.dash, S.cap);
13868
+ let P = t.grid;
13869
+ P.show && Mt(M, P.filter(r, v, e, f, x), i, i == 0 ? 2 : 1, i == 0 ? Oe : B, i == 0 ? H : V, md(P.width * ru, 3), P.stroke(r, e), P.dash, P.cap), C.show && Mt([O], [1], +(i == 0), i == 0 ? 1 : 2, i == 1 ? Oe : B, i == 1 ? H : V, md(C.width * ru, 3), C.stroke(r, e), C.dash, C.cap);
13870
13870
  }
13871
13871
  Xn("drawAxes");
13872
13872
  }
@@ -13934,7 +13934,7 @@ function _m(e, t, n) {
13934
13934
  n.min = n.max, n.max = e;
13935
13935
  }
13936
13936
  if (et > 1 && n.min != null && n.max != null && n.max - n.min < 1e-16) return;
13937
- e == S && i.distr == 2 && et > 0 && (n.min = xu(n.min, t[0]), n.max = xu(n.max, t[0]), n.min == n.max && n.max++), A[e] = n, U = !0, Vt();
13937
+ e == S && i.distr == 2 && et > 0 && (n.min = xu(n.min, t[0]), n.max = xu(n.max, t[0]), n.min == n.max && n.max++), j[e] = n, U = !0, Vt();
13938
13938
  }
13939
13939
  }
13940
13940
  r.setScale = Wt;
@@ -14063,7 +14063,7 @@ function _m(e, t, n) {
14063
14063
  for (let e = +(i == 2); e < v.length; e++) {
14064
14064
  let g = v[e], _ = ne[e], y = _ == null ? null : i == 1 ? t[e][_] : t[e][1][_], x = F.dataIdx(r, e, o, n), S = x == null ? null : i == 1 ? t[e][x] : t[e][1][x];
14065
14065
  if (G = G || S != y || x != _, ne[e] = x, e > 0 && g.show) {
14066
- let n = x == null ? -10 : x == o ? a : k(i == 1 ? t[0][x] : t[e][0][x], D, c, 0), _ = S == null ? -10 : ee(S, i == 1 ? b[g.scale] : b[g.facets[1].scale], l, 0);
14066
+ let n = x == null ? -10 : x == o ? a : k(i == 1 ? t[0][x] : t[e][0][x], D, c, 0), _ = S == null ? -10 : A(S, i == 1 ? b[g.scale] : b[g.facets[1].scale], l, 0);
14067
14067
  if (Be && S != null) {
14068
14068
  let t = D.ori == 1 ? tn : nn, n = Vu(ze.dist(r, e, x, _, t));
14069
14069
  if (n < vn) {
@@ -14104,7 +14104,7 @@ function _m(e, t, n) {
14104
14104
  let [t, n] = Qn.scales, [r, i] = Qn.match, [a, o] = e.cursor.sync.scales, s = e.cursor.drag;
14105
14105
  if (on = s._x, sn = s._y, on || sn) {
14106
14106
  let { left: s, top: u, width: d, height: f } = e.select, p = e.scales[a].ori, m = e.posToVal, h, g, _, v, y, x = t != null && r(t, a), S = n != null && i(n, o);
14107
- x && on ? (p == 0 ? (h = s, g = d) : (h = u, g = f), _ = b[t], v = k(m(h, a), _, c, 0), y = k(m(h + g, a), _, c, 0), Dn(Gu(v, y), Vu(y - v))) : Dn(0, c), S && sn ? (p == 1 ? (h = s, g = d) : (h = u, g = f), _ = b[n], v = ee(m(h, o), _, l, 0), y = ee(m(h + g, o), _, l, 0), On(Gu(v, y), Vu(y - v))) : On(0, l);
14107
+ x && on ? (p == 0 ? (h = s, g = d) : (h = u, g = f), _ = b[t], v = k(m(h, a), _, c, 0), y = k(m(h + g, a), _, c, 0), Dn(Gu(v, y), Vu(y - v))) : Dn(0, c), S && sn ? (p == 1 ? (h = s, g = d) : (h = u, g = f), _ = b[n], v = A(m(h, o), _, l, 0), y = A(m(h + g, o), _, l, 0), On(Gu(v, y), Vu(y - v))) : On(0, l);
14108
14108
  } else Rn();
14109
14109
  } else {
14110
14110
  let e = Vu($t - Yt), t = Vu(en - Xt);
@@ -14254,7 +14254,7 @@ function _m(e, t, n) {
14254
14254
  }
14255
14255
  r.destroy = rr;
14256
14256
  function ir() {
14257
- Xn("init", e, t), ot(t || e.data, !1), A[S] ? Wt(S, A[S]) : st(), W = cn.show && (cn.width > 0 || cn.height > 0), je = G = !0, Me(e.width, e.height);
14257
+ Xn("init", e, t), ot(t || e.data, !1), j[S] ? Wt(S, j[S]) : st(), W = cn.show && (cn.width > 0 || cn.height > 0), je = G = !0, Me(e.width, e.height);
14258
14258
  }
14259
14259
  return v.forEach(Ke), y.forEach(Xe), n ? n instanceof HTMLElement ? (n.appendChild(l), ir()) : n(r, ir) : ir(), r;
14260
14260
  }
@@ -14342,10 +14342,10 @@ function Nm() {
14342
14342
  var Pm = ({ message: e, className: t }) => /* @__PURE__ */ W("div", {
14343
14343
  role: "status",
14344
14344
  "aria-live": "polite",
14345
- className: x("flex h-full min-h-0 w-full items-center justify-center text-muted-foreground", t),
14345
+ className: o("flex h-full min-h-0 w-full items-center justify-center text-muted-foreground", t),
14346
14346
  children: /* @__PURE__ */ G("div", {
14347
14347
  className: "flex flex-col items-center gap-3 text-center",
14348
- children: [/* @__PURE__ */ W(l, {
14348
+ children: [/* @__PURE__ */ W(d, {
14349
14349
  className: "h-6 w-6 animate-spin motion-reduce:animate-none will-change-transform",
14350
14350
  "aria-hidden": !0
14351
14351
  }), /* @__PURE__ */ W("p", {
@@ -14354,7 +14354,7 @@ var Pm = ({ message: e, className: t }) => /* @__PURE__ */ W("div", {
14354
14354
  })]
14355
14355
  })
14356
14356
  }), Fm = ({ message: e, className: t }) => /* @__PURE__ */ W("div", {
14357
- className: x("flex h-full min-h-0 w-full items-center justify-center text-muted-foreground", t),
14357
+ className: o("flex h-full min-h-0 w-full items-center justify-center text-muted-foreground", t),
14358
14358
  children: /* @__PURE__ */ W("p", {
14359
14359
  className: "text-[10px] font-medium uppercase tracking-widest opacity-50",
14360
14360
  children: e
@@ -14379,10 +14379,10 @@ var Lm = Ee(function({ checked: e, indeterminate: t }) {
14379
14379
  readOnly: !0,
14380
14380
  className: "pointer-events-none h-3.5 w-3.5 shrink-0 rounded border-border accent-primary"
14381
14381
  });
14382
- }), Rm = Ee(function({ featureNodes: e, selectedIds: n, searchValue: r, onSearchChange: i, onSetItemsChecked: a, onToggleItem: o, onSelectAll: s, onClearAll: l, searchPlaceholder: u, emptyLabel: d, selectAllLabel: f, onHoverChange: m, getItemColor: h, className: g }) {
14383
- let _ = H(() => dr(e), [e]), v = H(() => fr(e, r), [e, r]), y = H(() => _.reduce((e, t) => n.has(t) ? e + 1 : e, 0), [_, n]), b = _.length > 0 && y === _.length, S = !b && y !== 0;
14382
+ }), Rm = Ee(function({ featureNodes: e, selectedIds: n, searchValue: r, onSearchChange: i, onSetItemsChecked: a, onToggleItem: s, onSelectAll: c, onClearAll: l, searchPlaceholder: d, emptyLabel: f, selectAllLabel: p, onHoverChange: m, getItemColor: g, className: _ }) {
14383
+ let v = H(() => dr(e), [e]), y = H(() => fr(e, r), [e, r]), b = H(() => v.reduce((e, t) => n.has(t) ? e + 1 : e, 0), [v, n]), x = v.length > 0 && b === v.length, S = !x && b !== 0;
14384
14384
  return /* @__PURE__ */ G("div", {
14385
- className: x("w-full", g),
14385
+ className: o("w-full", _),
14386
14386
  onMouseLeave: () => m?.(null),
14387
14387
  children: [/* @__PURE__ */ W("div", {
14388
14388
  className: "border-b bg-muted/20 px-2 py-2",
@@ -14392,25 +14392,25 @@ var Lm = Ee(function({ checked: e, indeterminate: t }) {
14392
14392
  type: "button",
14393
14393
  className: "flex h-8 shrink-0 items-center rounded-md px-1",
14394
14394
  onClick: (e) => {
14395
- e.preventDefault(), e.stopPropagation(), b ? l() : s();
14395
+ e.preventDefault(), e.stopPropagation(), x ? l() : c();
14396
14396
  },
14397
- title: f,
14398
- "aria-label": f,
14397
+ title: p,
14398
+ "aria-label": p,
14399
14399
  children: /* @__PURE__ */ W(Lm, {
14400
- checked: b,
14400
+ checked: x,
14401
14401
  indeterminate: S
14402
14402
  })
14403
14403
  }), /* @__PURE__ */ G("div", {
14404
14404
  className: "relative min-w-0 flex-1",
14405
14405
  children: [
14406
- /* @__PURE__ */ W(p, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
14406
+ /* @__PURE__ */ W(h, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
14407
14407
  /* @__PURE__ */ W(re, {
14408
14408
  value: r,
14409
14409
  onChange: (e) => i(e.target.value),
14410
- placeholder: u,
14410
+ placeholder: d,
14411
14411
  className: "h-8 bg-background pl-7 pr-7 text-xs"
14412
14412
  }),
14413
- r ? /* @__PURE__ */ W(c, {
14413
+ r ? /* @__PURE__ */ W(u, {
14414
14414
  type: "button",
14415
14415
  variant: "ghost",
14416
14416
  size: "icon",
@@ -14426,10 +14426,10 @@ var Lm = Ee(function({ checked: e, indeterminate: t }) {
14426
14426
  })
14427
14427
  }), /* @__PURE__ */ W("div", {
14428
14428
  className: "max-h-[38vh] overflow-y-auto px-1 py-1",
14429
- children: v.length === 0 ? /* @__PURE__ */ W("div", {
14429
+ children: y.length === 0 ? /* @__PURE__ */ W("div", {
14430
14430
  className: "px-2 py-3 text-xs text-muted-foreground",
14431
- children: d
14432
- }) : v.map((e) => {
14431
+ children: f
14432
+ }) : y.map((e) => {
14433
14433
  let t = ur(e), r = Im(t, n);
14434
14434
  return /* @__PURE__ */ G("div", {
14435
14435
  className: "mb-1 border-b border-border/50 pb-1 last:border-b-0",
@@ -14478,9 +14478,9 @@ var Lm = Ee(function({ checked: e, indeterminate: t }) {
14478
14478
  }), t.items.map((e) => /* @__PURE__ */ G("button", {
14479
14479
  type: "button",
14480
14480
  "data-filter-row": "true",
14481
- className: x("flex w-full items-center gap-2 rounded-md px-2 py-1.5 pl-8 text-left text-[11px] hover:bg-muted/40", n.has(e.id) ? "bg-accent/40" : ""),
14481
+ className: o("flex w-full items-center gap-2 rounded-md px-2 py-1.5 pl-8 text-left text-[11px] hover:bg-muted/40", n.has(e.id) ? "bg-accent/40" : ""),
14482
14482
  onClick: (t) => {
14483
- t.preventDefault(), t.stopPropagation(), o(e.id);
14483
+ t.preventDefault(), t.stopPropagation(), s(e.id);
14484
14484
  },
14485
14485
  onMouseEnter: () => m?.({
14486
14486
  type: "item",
@@ -14492,9 +14492,9 @@ var Lm = Ee(function({ checked: e, indeterminate: t }) {
14492
14492
  checked: n.has(e.id),
14493
14493
  indeterminate: !1
14494
14494
  }),
14495
- h ? /* @__PURE__ */ W("span", {
14495
+ g ? /* @__PURE__ */ W("span", {
14496
14496
  className: "h-0.5 w-5 shrink-0 rounded-full",
14497
- style: { backgroundColor: h(e.id) ?? "transparent" }
14497
+ style: { backgroundColor: g(e.id) ?? "transparent" }
14498
14498
  }) : null,
14499
14499
  /* @__PURE__ */ W("span", {
14500
14500
  className: n.has(e.id) ? "font-medium text-foreground" : "text-muted-foreground",
@@ -14508,16 +14508,16 @@ var Lm = Ee(function({ checked: e, indeterminate: t }) {
14508
14508
  })
14509
14509
  })]
14510
14510
  });
14511
- }), zm = Ee(function({ featureFilterNodes: e, selectedIds: t, jointSearch: n, onSearchChange: r, onSetItemsChecked: i, onToggleItem: a, onSelectAll: o, onClearAll: s, searchPlaceholder: l, emptyLabel: u, selectAllLabel: d, summaryAllLabel: f, summaryNoneLabel: p, summarySelectedCountLabel: m, totalSeriesCount: h, onHoverChange: g, getItemColor: _, onMenuOpenChange: v, triggerClassName: y, contentClassName: b, align: S = "start", side: C = "bottom", sideOffset: w = 4 }) {
14512
- let T = t.size, E = h > 0 && T === h ? f : T === 0 ? p : m(T);
14511
+ }), zm = Ee(function({ featureFilterNodes: e, selectedIds: t, jointSearch: n, onSearchChange: r, onSetItemsChecked: i, onToggleItem: a, onSelectAll: s, onClearAll: c, searchPlaceholder: l, emptyLabel: d, selectAllLabel: f, summaryAllLabel: p, summaryNoneLabel: m, summarySelectedCountLabel: h, totalSeriesCount: g, onHoverChange: _, getItemColor: v, onMenuOpenChange: y, triggerClassName: b, contentClassName: x, align: S = "start", side: C = "bottom", sideOffset: w = 4 }) {
14512
+ let T = t.size, E = g > 0 && T === g ? p : T === 0 ? m : h(T);
14513
14513
  return /* @__PURE__ */ G(An, {
14514
- onOpenChange: v,
14514
+ onOpenChange: y,
14515
14515
  children: [/* @__PURE__ */ G(jn, {
14516
- render: /* @__PURE__ */ W(c, {
14516
+ render: /* @__PURE__ */ W(u, {
14517
14517
  type: "button",
14518
14518
  variant: "ghost",
14519
14519
  size: "sm",
14520
- className: x("h-6 gap-1 px-2 text-xs outline-none hover:bg-muted/50 aria-expanded:bg-muted/30", y)
14520
+ className: o("h-6 gap-1 px-2 text-xs outline-none hover:bg-muted/50 aria-expanded:bg-muted/30", b)
14521
14521
  }),
14522
14522
  children: [
14523
14523
  /* @__PURE__ */ W(wn, { className: "h-3 w-3 shrink-0" }),
@@ -14531,7 +14531,7 @@ var Lm = Ee(function({ checked: e, indeterminate: t }) {
14531
14531
  align: S,
14532
14532
  side: C,
14533
14533
  sideOffset: w,
14534
- className: x("w-80 max-h-[60vh] overflow-hidden", b),
14534
+ className: o("w-80 max-h-[60vh] overflow-hidden", x),
14535
14535
  children: /* @__PURE__ */ W(Rm, {
14536
14536
  featureNodes: e,
14537
14537
  selectedIds: t,
@@ -14539,13 +14539,13 @@ var Lm = Ee(function({ checked: e, indeterminate: t }) {
14539
14539
  onSearchChange: r,
14540
14540
  onSetItemsChecked: i,
14541
14541
  onToggleItem: a,
14542
- onSelectAll: o,
14543
- onClearAll: s,
14542
+ onSelectAll: s,
14543
+ onClearAll: c,
14544
14544
  searchPlaceholder: l,
14545
- emptyLabel: u,
14546
- selectAllLabel: d,
14547
- onHoverChange: g,
14548
- getItemColor: _
14545
+ emptyLabel: d,
14546
+ selectAllLabel: f,
14547
+ onHoverChange: _,
14548
+ getItemColor: v
14549
14549
  })
14550
14550
  })]
14551
14551
  });
@@ -14689,45 +14689,45 @@ function Zm(e, t) {
14689
14689
  var Qm = {
14690
14690
  min: null,
14691
14691
  max: null
14692
- }, $m = z.memo(function({ jointName: e, core: t, chartHeight: n, selectedSeriesIds: i, showAction: o, showState: s, hasAction: c, hasState: l, actionLabel: u, stateLabel: d }) {
14693
- let { t: f } = a(), { subscribeFrameIndex: p } = ee(), { setFrameIndex: m } = F(), { resolvedTheme: h } = r(), g = U(null), _ = U(null), v = U(null), y = U(null), b = U(0), x = U([]), S = U("#ef4444"), C = U(null), w = U(null), T = U(null), E = U(!1), D = t.dimensions.filter((n) => n.jointName === e && i.has(n.id) && t.seriesData[n.id] != null), O = D.some((e) => e.kind === "action" && c && o || e.kind === "state" && l && s);
14694
- return V(() => p((e) => {
14692
+ }, $m = z.memo(function({ jointName: e, core: t, chartHeight: n, selectedSeriesIds: i, showAction: a, showState: o, hasAction: s, hasState: c, actionLabel: l, stateLabel: u }) {
14693
+ let { t: d } = v(), { subscribeFrameIndex: f } = k(), { setFrameIndex: p } = F(), { resolvedTheme: m } = r(), h = U(null), g = U(null), _ = U(null), y = U(null), b = U(0), x = U([]), S = U("#ef4444"), C = U(null), w = U(null), T = U(null), E = U(!1), D = t.dimensions.filter((n) => n.jointName === e && i.has(n.id) && t.seriesData[n.id] != null), O = D.some((e) => e.kind === "action" && s && a || e.kind === "state" && c && o);
14694
+ return V(() => f((e) => {
14695
14695
  b.current = e, y.current?.redraw(!1, !1);
14696
- }), [p]), V(() => {
14696
+ }), [f]), V(() => {
14697
14697
  x.current = t.originalTimestamps;
14698
14698
  }, [t.originalTimestamps]), V(() => {
14699
- let r = _.current;
14699
+ let r = g.current;
14700
14700
  if (!r) return;
14701
- let i = [t.simplifiedTimestamps], a = [{}], p = [], h = t.jointColorMap[e] ?? "#94a3b8";
14701
+ let i = [t.simplifiedTimestamps], f = [{}], m = [], v = t.jointColorMap[e] ?? "#94a3b8";
14702
14702
  for (let e of D) {
14703
- if (e.kind === "action" && !(c && o) || e.kind === "state" && !(l && s)) continue;
14703
+ if (e.kind === "action" && !(s && a) || e.kind === "state" && !(c && o)) continue;
14704
14704
  let n = t.seriesData[e.id];
14705
14705
  if (!n) continue;
14706
14706
  let r = e.kind === "state";
14707
- i.push(n), p.push({
14707
+ i.push(n), m.push({
14708
14708
  kind: e.kind,
14709
14709
  featureKey: e.featureKey
14710
- }), a.push({
14711
- label: `${r ? d : u}: ${e.featureKey}`,
14712
- stroke: h,
14710
+ }), f.push({
14711
+ label: `${r ? u : l}: ${e.featureKey}`,
14712
+ stroke: v,
14713
14713
  width: r ? 1.25 : 1.5,
14714
14714
  dash: r ? [] : Vm,
14715
14715
  points: { show: !1 },
14716
14716
  spanGaps: !0
14717
14717
  });
14718
14718
  }
14719
- let O = (e) => e === void 0 || !Number.isFinite(e) ? "—" : Math.abs(e) >= 1e3 ? e.toFixed(0) : Math.abs(e) >= 10 ? e.toFixed(2) : e.toFixed(3), k = f("chart.legend.actionAbbr"), ee = f("chart.legend.stateAbbr"), A = () => {
14719
+ let O = (e) => e === void 0 || !Number.isFinite(e) ? "—" : Math.abs(e) >= 1e3 ? e.toFixed(0) : Math.abs(e) >= 10 ? e.toFixed(2) : e.toFixed(3), k = d("chart.legend.actionAbbr"), A = d("chart.legend.stateAbbr"), j = () => {
14720
14720
  y.current?.destroy(), y.current = null;
14721
14721
  };
14722
- if (a.length <= 1) {
14723
- A();
14722
+ if (f.length <= 1) {
14723
+ j();
14724
14724
  return;
14725
14725
  }
14726
- A();
14727
- let j = Nm(), { axisStroke: M, gridStroke: N, tickStroke: P } = Am(j);
14728
- S.current = km(j, "--destructive", "#ef4444");
14726
+ j();
14727
+ let M = Nm(), { axisStroke: N, gridStroke: P, tickStroke: ee } = Am(M);
14728
+ S.current = km(M, "--destructive", "#ef4444");
14729
14729
  let te = (e) => {
14730
- let t = v.current;
14730
+ let t = _.current;
14731
14731
  if (!t) return;
14732
14732
  let n = e.cursor.idx;
14733
14733
  if (n == null || n < 0) {
@@ -14736,14 +14736,14 @@ var Qm = {
14736
14736
  }
14737
14737
  let r = [];
14738
14738
  for (let t = 1; t < e.series.length; t++) {
14739
- let i = p[t - 1], a = e.data[t]?.[n], o = a !== void 0 && Number.isFinite(Number(a)) ? Number(a) : void 0, s = i.kind === "action" ? k : ee;
14739
+ let i = m[t - 1], a = e.data[t]?.[n], o = a !== void 0 && Number.isFinite(Number(a)) ? Number(a) : void 0, s = i.kind === "action" ? k : A;
14740
14740
  r.push(`${s} ${i.featureKey}: ${O(o)}`);
14741
14741
  }
14742
14742
  t.textContent = r.join("\n");
14743
14743
  }, ne = () => {
14744
14744
  T.current ??= window.requestAnimationFrame(() => {
14745
14745
  T.current = null;
14746
- let e = y.current, t = v.current, n = g.current;
14746
+ let e = y.current, t = _.current, n = h.current;
14747
14747
  if (!e || !t || !n) return;
14748
14748
  if (!E.current) {
14749
14749
  t.classList.add("opacity-0");
@@ -14756,7 +14756,7 @@ var Qm = {
14756
14756
  }
14757
14757
  let i = e.over, a = (i.offsetLeft || 0) + (e.cursor.left ?? 0), o = (i.offsetTop || 0) + (e.cursor.top ?? 0);
14758
14758
  t.classList.remove("opacity-0");
14759
- let s = t.offsetWidth || 80, c = t.offsetHeight || 22, l = n.clientWidth, u = n.clientHeight, d = w.current, f = d ? a - d.x : 0, p = d ? o - d.y : 0, m = Math.abs(f) + Math.abs(p) < 3, h = Yn({
14759
+ let s = t.offsetWidth || 80, c = t.offsetHeight || 22, l = n.clientWidth, u = n.clientHeight, d = w.current, f = d ? a - d.x : 0, p = d ? o - d.y : 0, m = Math.abs(f) + Math.abs(p) < 3, g = Yn({
14760
14760
  cursorX: a,
14761
14761
  cursorY: o,
14762
14762
  tooltipW: s,
@@ -14772,10 +14772,10 @@ var Qm = {
14772
14772
  switchTolerancePx: 10,
14773
14773
  keepPreviousOnStable: m
14774
14774
  });
14775
- C.current = h, w.current = {
14775
+ C.current = g, w.current = {
14776
14776
  x: a,
14777
14777
  y: o
14778
- }, t.style.left = `${h.left}px`, t.style.top = `${h.top}px`;
14778
+ }, t.style.left = `${g.left}px`, t.style.top = `${g.top}px`;
14779
14779
  });
14780
14780
  }, re = {
14781
14781
  width: r.offsetWidth || 600,
@@ -14785,31 +14785,31 @@ var Qm = {
14785
14785
  drag: { setScale: !0 },
14786
14786
  points: { show: !1 }
14787
14787
  },
14788
- series: a,
14788
+ series: f,
14789
14789
  axes: [{
14790
14790
  label: "",
14791
14791
  labelSize: 0,
14792
14792
  size: 24,
14793
14793
  space: 36,
14794
- stroke: M,
14794
+ stroke: N,
14795
14795
  grid: {
14796
- stroke: N,
14796
+ stroke: P,
14797
14797
  width: 1
14798
14798
  },
14799
14799
  ticks: {
14800
- stroke: P,
14800
+ stroke: ee,
14801
14801
  width: 1
14802
14802
  },
14803
14803
  font: "10px ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif",
14804
- values: (e, t) => t.map((e) => `${e.toFixed(1)}${f("units.second.short")}`)
14804
+ values: (e, t) => t.map((e) => `${e.toFixed(1)}${d("units.second.short")}`)
14805
14805
  }, {
14806
- stroke: M,
14806
+ stroke: N,
14807
14807
  grid: {
14808
- stroke: N,
14808
+ stroke: P,
14809
14809
  width: 1
14810
14810
  },
14811
14811
  ticks: {
14812
- stroke: P,
14812
+ stroke: ee,
14813
14813
  width: 1
14814
14814
  },
14815
14815
  font: "10px ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif",
@@ -14852,13 +14852,13 @@ var Qm = {
14852
14852
  }, t = () => {
14853
14853
  E.current = !0, te(r), ne();
14854
14854
  }, n = () => {
14855
- E.current = !1, T.current != null && (window.cancelAnimationFrame(T.current), T.current = null), C.current = null, w.current = null, v.current?.classList.add("opacity-0");
14855
+ E.current = !1, T.current != null && (window.cancelAnimationFrame(T.current), T.current = null), C.current = null, w.current = null, _.current?.classList.add("opacity-0");
14856
14856
  }, r.over.addEventListener("dblclick", e), r.over.addEventListener("mouseenter", t), r.over.addEventListener("mouseleave", n), r.over.addEventListener("mousedown", (e) => {
14857
14857
  if (e.button !== 0) return;
14858
14858
  let t = r.cursor.left;
14859
14859
  if (t == null) return;
14860
14860
  let n = r.posToVal(t, "x"), i = x.current, a = i.length > 0 ? Gm(i, n) : 0;
14861
- m(a);
14861
+ p(a);
14862
14862
  });
14863
14863
  },
14864
14864
  destroy: (r) => {
@@ -14875,7 +14875,7 @@ var Qm = {
14875
14875
  });
14876
14876
  });
14877
14877
  return F.observe(r), () => {
14878
- E.current = !1, T.current != null && (window.cancelAnimationFrame(T.current), T.current = null), C.current = null, w.current = null, F.disconnect(), A();
14878
+ E.current = !1, T.current != null && (window.cancelAnimationFrame(T.current), T.current = null), C.current = null, w.current = null, F.disconnect(), j();
14879
14879
  };
14880
14880
  }, [
14881
14881
  e,
@@ -14883,25 +14883,25 @@ var Qm = {
14883
14883
  n,
14884
14884
  i,
14885
14885
  D,
14886
+ a,
14886
14887
  o,
14887
14888
  s,
14888
14889
  c,
14889
14890
  l,
14890
14891
  u,
14892
+ p,
14891
14893
  d,
14892
- m,
14893
- f,
14894
- h
14894
+ m
14895
14895
  ]), O ? /* @__PURE__ */ G("div", {
14896
- ref: g,
14896
+ ref: h,
14897
14897
  className: "relative w-full",
14898
14898
  style: { height: n },
14899
14899
  children: [/* @__PURE__ */ W("div", {
14900
- ref: _,
14900
+ ref: g,
14901
14901
  className: "chart-uplot h-full w-full",
14902
14902
  style: { height: n }
14903
14903
  }), /* @__PURE__ */ W("div", {
14904
- ref: v,
14904
+ ref: _,
14905
14905
  className: "pointer-events-none absolute z-[5] max-w-[min(100%,280px)] whitespace-pre-line rounded border border-border/50 bg-background/95 px-1.5 py-1 font-mono text-[10px] leading-snug text-foreground shadow-sm opacity-0 transition-opacity duration-75",
14906
14906
  style: {
14907
14907
  left: 0,
@@ -14912,7 +14912,7 @@ var Qm = {
14912
14912
  }) : /* @__PURE__ */ W("div", {
14913
14913
  className: "flex items-center justify-center rounded border border-dashed border-border/60 bg-muted/20 text-[10px] text-muted-foreground",
14914
14914
  style: { height: n },
14915
- children: f("chart.split.noSeriesForJoint")
14915
+ children: d("chart.split.noSeriesForJoint")
14916
14916
  });
14917
14917
  });
14918
14918
  //#endregion
@@ -14947,8 +14947,8 @@ function eh(e) {
14947
14947
  })]
14948
14948
  });
14949
14949
  }
14950
- function th({ open: e, onOpenChange: t, chartCore: n, allJointNames: r, selectedSeriesIds: i, jointFilterDropdownProps: o, showAction: s, showState: c, hasAction: l, hasState: u }) {
14951
- let { t: d } = a(), f = H(() => r, [r]), p = f.length, m = hr(p), h = gr(p), g = H(() => ({
14950
+ function th({ open: e, onOpenChange: t, chartCore: n, allJointNames: r, selectedSeriesIds: i, jointFilterDropdownProps: a, showAction: s, showState: c, hasAction: l, hasState: u }) {
14951
+ let { t: d } = v(), f = H(() => r, [r]), p = f.length, m = hr(p), h = gr(p), g = H(() => ({
14952
14952
  jointOrder: f,
14953
14953
  chartCore: n,
14954
14954
  chartHeight: m,
@@ -14980,8 +14980,8 @@ function th({ open: e, onOpenChange: t, chartCore: n, allJointNames: r, selected
14980
14980
  children: [/* @__PURE__ */ W("div", {
14981
14981
  className: "flex shrink-0 items-center border-b border-border/60 bg-muted/20 px-3 py-2",
14982
14982
  children: /* @__PURE__ */ W(zm, {
14983
- ...o,
14984
- contentClassName: x("w-80 max-h-[min(55vh,380px)] overflow-hidden", o.contentClassName)
14983
+ ...a,
14984
+ contentClassName: o("w-80 max-h-[min(55vh,380px)] overflow-hidden", a.contentClassName)
14985
14985
  })
14986
14986
  }), /* @__PURE__ */ W("div", {
14987
14987
  className: "min-h-0 flex-1 overflow-hidden px-1 pb-4",
@@ -15050,30 +15050,30 @@ function ah(e, t, n) {
15050
15050
  }), !0;
15051
15051
  }
15052
15052
  var oh = ({ params: e }) => {
15053
- let { t, i18n: n } = a(), { chartData: i, currentFrames: o, setFrameIndex: s, setPlaying: l } = F(), { subscribeFrameIndex: u, info: d, isLoading: f, error: p } = ee(), { selectedEpisodeIndex: m } = me(), { resolvedTheme: h } = r(), g = U(null), _ = U(null), v = U(null), y = U(null), b = U(!1), x = U(null), S = U(null), C = U(null), w = U(null), T = U(null), E = U(null), D = U(null), O = U(null), k = U(null), A = U(!1), j = U(null), M = U(!1), N = U(!1), P = U(null), te = U(null), ne = U(null), re = U(h), ie = U("#ef4444"), ae = U(0), oe = U([]), se = U(void 0), ce = U(!1), [le, ue] = ke(/* @__PURE__ */ new Set()), [de, fe] = ke(""), [pe, he] = ke(!0), [ge, _e] = ke(!0), [ve, ye] = ke(!1), be = H(() => cr(d, e?.featureKey), [d, e?.featureKey]), xe = H(() => be.some((e) => sr(e) === "action" && i[e] != null), [be, i]), Se = H(() => be.some((e) => sr(e) === "state" && i[e] != null), [be, i]), Ce = H(() => Km(be, d?.features, i), [
15053
+ let { t, i18n: n } = v(), { chartData: i, currentFrames: a, setFrameIndex: o, setPlaying: s } = F(), { subscribeFrameIndex: c, info: l, isLoading: d, error: f } = k(), { selectedEpisodeIndex: p } = me(), { resolvedTheme: m } = r(), h = U(null), g = U(null), _ = U(null), y = U(null), b = U(!1), x = U(null), S = U(null), C = U(null), w = U(null), T = U(null), E = U(null), D = U(null), O = U(null), A = U(null), j = U(!1), M = U(null), N = U(!1), P = U(!1), ee = U(null), te = U(null), ne = U(null), re = U(m), ie = U("#ef4444"), ae = U(0), oe = U([]), se = U(void 0), ce = U(!1), [le, ue] = ke(/* @__PURE__ */ new Set()), [de, fe] = ke(""), [pe, he] = ke(!0), [ge, _e] = ke(!0), [ve, ye] = ke(!1), be = H(() => cr(l, e?.featureKey), [l, e?.featureKey]), xe = H(() => be.some((e) => sr(e) === "action" && i[e] != null), [be, i]), Se = H(() => be.some((e) => sr(e) === "state" && i[e] != null), [be, i]), Ce = H(() => Km(be, l?.features, i), [
15054
15054
  be,
15055
- d?.features,
15055
+ l?.features,
15056
15056
  i
15057
15057
  ]), I = H(() => qm(Ce), [Ce]), L = H(() => Ce.map((e) => e.id), [Ce]), R = H(() => Xm({
15058
15058
  chartData: i,
15059
- currentFrames: o,
15059
+ currentFrames: a,
15060
15060
  targetFeatures: be,
15061
- features: d?.features,
15062
- resolvedTheme: h
15061
+ features: l?.features,
15062
+ resolvedTheme: m
15063
15063
  }), [
15064
15064
  i,
15065
- o,
15065
+ a,
15066
15066
  be,
15067
- d?.features,
15068
- h
15069
- ]), z = H(() => Jm(I, h), [I, h]), we = R?.jointColorMap ?? z, Te = U(!1);
15067
+ l?.features,
15068
+ m
15069
+ ]), z = H(() => Jm(I, m), [I, m]), we = R?.jointColorMap ?? z, Te = U(!1);
15070
15070
  V(() => {
15071
15071
  Te.current = !1;
15072
15072
  }, [L]), V(() => {
15073
15073
  le.size === 0 && L.length > 0 && !Te.current && ue(new Set(L));
15074
15074
  }, [L, le.size]);
15075
15075
  let Ee = B((e, t) => {
15076
- let n = P.current;
15076
+ let n = ee.current;
15077
15077
  return !n || n.size === 0 || n.has(e) ? t : nh(t, .22);
15078
15078
  }, []), De = H(() => R ? Zm(R, {
15079
15079
  selectedSeriesIds: le,
@@ -15092,18 +15092,18 @@ var oh = ({ params: e }) => {
15092
15092
  ]);
15093
15093
  V(() => {
15094
15094
  !R && ve && ye(!1);
15095
- }, [R, ve]), V(() => u((e) => {
15096
- ae.current = e, v.current && v.current.redraw(!1, !1);
15097
- }), [u]);
15095
+ }, [R, ve]), V(() => c((e) => {
15096
+ ae.current = e, _.current && _.current.redraw(!1, !1);
15097
+ }), [c]);
15098
15098
  let Oe = (e) => Number.isFinite(e) ? Math.abs(e) >= 1e3 ? e.toFixed(0) : Math.abs(e) >= 10 ? e.toFixed(2) : e.toFixed(4) : "—";
15099
15099
  V(() => {
15100
15100
  oe.current = De?.originalTimestamps ?? [];
15101
15101
  }, [De]), V(() => {
15102
15102
  let e = se.current;
15103
- e !== m && (e !== void 0 && (ce.current = !0), se.current = m);
15104
- }, [m]), V(() => {
15105
- if (!_.current || !De) {
15106
- v.current &&= (v.current.destroy(), null), y.current && y.current.classList.add("hidden"), k.current = null, A.current = !1, j.current = null, M.current = !1;
15103
+ e !== p && (e !== void 0 && (ce.current = !0), se.current = p);
15104
+ }, [p]), V(() => {
15105
+ if (!g.current || !De) {
15106
+ _.current &&= (_.current.destroy(), null), y.current && y.current.classList.add("hidden"), A.current = null, j.current = !1, M.current = null, N.current = !1;
15107
15107
  return;
15108
15108
  }
15109
15109
  let e = y.current, n = () => {
@@ -15111,16 +15111,16 @@ var oh = ({ params: e }) => {
15111
15111
  }, r = () => {
15112
15112
  n(), b.current = !0;
15113
15113
  }, i = (t) => {
15114
- if (b.current = !1, A.current) return;
15114
+ if (b.current = !1, j.current) return;
15115
15115
  let r = t.relatedTarget;
15116
- r && v.current?.over && v.current.over.contains(r) || (n(), x.current = window.setTimeout(() => {
15117
- !A.current && !b.current && e && e.classList.add("hidden"), x.current = null;
15116
+ r && _.current?.over && _.current.over.contains(r) || (n(), x.current = window.setTimeout(() => {
15117
+ !j.current && !b.current && e && e.classList.add("hidden"), x.current = null;
15118
15118
  }, 300));
15119
15119
  };
15120
15120
  e?.addEventListener("mouseenter", r), e?.addEventListener("mouseleave", i);
15121
- let a = Nm(), o = (e, t) => km(a, e, t), { axisStroke: c, gridStroke: l, tickStroke: u } = Am(a);
15122
- ie.current = o("--destructive", "#ef4444"), v.current && re.current !== h && (v.current.destroy(), v.current = null, re.current = h);
15123
- let d = t("units.second.short"), f = t("units.frame"), p = t("chart.tooltip.time"), m = (e, t, n) => {
15121
+ let a = Nm(), s = (e, t) => km(a, e, t), { axisStroke: c, gridStroke: l, tickStroke: u } = Am(a);
15122
+ ie.current = s("--destructive", "#ef4444"), _.current && re.current !== m && (_.current.destroy(), _.current = null, re.current = m);
15123
+ let d = t("units.second.short"), f = t("units.frame"), p = t("chart.tooltip.time"), h = (e, t, n) => {
15124
15124
  let r = ne.current;
15125
15125
  if (r && r.idx === t && Math.abs(r.cursorY - n) < 1.5) return r.focused;
15126
15126
  let i = null;
@@ -15165,10 +15165,10 @@ var oh = ({ params: e }) => {
15165
15165
  cursorY: n,
15166
15166
  focused: i
15167
15167
  }, i;
15168
- }, g = () => {
15169
- C.current = null, j.current = null, w.current = null, T.current = null, te.current = null, ne.current = null, D.current = null, O.current = null, M.current = !1;
15170
- }, ee = (e) => {
15171
- let t = k.current;
15168
+ }, v = () => {
15169
+ C.current = null, M.current = null, w.current = null, T.current = null, te.current = null, ne.current = null, D.current = null, O.current = null, N.current = !1;
15170
+ }, k = (e) => {
15171
+ let t = A.current;
15172
15172
  if (!t) return;
15173
15173
  let n = T.current;
15174
15174
  if (n) {
@@ -15180,7 +15180,7 @@ var oh = ({ params: e }) => {
15180
15180
  n && n.rowEl.classList.add("rounded", "bg-primary/10", "ring-1", "ring-primary/20", "px-1");
15181
15181
  }
15182
15182
  T.current = e;
15183
- }, P = () => {
15183
+ }, ee = () => {
15184
15184
  let e = [];
15185
15185
  for (let t = 1; t < De.seriesMeta.length; t++) {
15186
15186
  let n = De.seriesMeta[t];
@@ -15195,7 +15195,7 @@ var oh = ({ params: e }) => {
15195
15195
  return e;
15196
15196
  }, F = () => {
15197
15197
  if (!e) return;
15198
- let n = P().slice(0, 80), r = document.createElement("div");
15198
+ let n = ee().slice(0, 80), r = document.createElement("div");
15199
15199
  r.className = "flex h-full flex-col gap-1";
15200
15200
  let i = document.createElement("div");
15201
15201
  i.className = "shrink-0 flex flex-col justify-center gap-1 px-2 border-b border-border/40", i.style.height = "48px", i.style.minHeight = "48px";
@@ -15213,7 +15213,7 @@ var oh = ({ params: e }) => {
15213
15213
  u.className = "font-mono text-muted-foreground", u.textContent = "—", c.append(l, u), i.append(a, c);
15214
15214
  let d = document.createElement("div");
15215
15215
  d.className = "mt-1 flex min-h-0 flex-col gap-0.5 overflow-y-auto px-2", d.addEventListener("scroll", () => {
15216
- A.current && (N.current || (M.current = !0));
15216
+ j.current && (P.current || (N.current = !0));
15217
15217
  });
15218
15218
  let m = /* @__PURE__ */ new Map(), h = 0;
15219
15219
  for (let e of n) {
@@ -15233,7 +15233,7 @@ var oh = ({ params: e }) => {
15233
15233
  }
15234
15234
  r.append(i, d);
15235
15235
  let g = De.seriesMeta.length - 1, _;
15236
- g > h && (_ = document.createElement("div"), _.className = "py-1 px-2 shrink-0 text-[10px] text-muted-foreground", _.textContent = t("chart.tooltip.moreSeries", { count: g - h }), r.append(_)), e.innerHTML = "", e.append(r), k.current = {
15236
+ g > h && (_ = document.createElement("div"), _.className = "py-1 px-2 shrink-0 text-[10px] text-muted-foreground", _.textContent = t("chart.tooltip.moreSeries", { count: g - h }), r.append(_)), e.innerHTML = "", e.append(r), A.current = {
15237
15237
  headerContainerEl: i,
15238
15238
  headerTimeValueEl: s,
15239
15239
  headerFrameValueEl: u,
@@ -15244,7 +15244,7 @@ var oh = ({ params: e }) => {
15244
15244
  renderedSeriesCount: h
15245
15245
  }, d.dataset.scrollBound = "true", w.current = null, T.current = null;
15246
15246
  }, se = (e, t, n, r, i) => {
15247
- let a = k.current;
15247
+ let a = A.current;
15248
15248
  if (!a) return;
15249
15249
  a.headerTimeValueEl.textContent = `${Oe(n)} ${d}`, a.headerFrameValueEl.textContent = String(r);
15250
15250
  for (let e of a.jointRows.values()) e.valueEl.textContent = "—";
@@ -15257,13 +15257,13 @@ var oh = ({ params: e }) => {
15257
15257
  i.valueEl.textContent = Oe(s);
15258
15258
  }
15259
15259
  let o = i?.seriesId && a.jointRows.has(i.seriesId) ? i.seriesId : null;
15260
- if (o !== T.current && (ee(o), o && (!A.current || !M.current))) {
15260
+ if (o !== T.current && (k(o), o && (!j.current || !N.current))) {
15261
15261
  let e = a.jointRows.get(o);
15262
15262
  if (e) {
15263
- N.current = !0;
15263
+ P.current = !0;
15264
15264
  let t = a.listContainerEl;
15265
15265
  t.scrollTop = Jn(e.rowEl.getBoundingClientRect().top - t.getBoundingClientRect().top + t.scrollTop - 3, 0, Math.max(0, t.scrollHeight - t.clientHeight)), window.requestAnimationFrame(() => {
15266
- N.current = !1;
15266
+ P.current = !1;
15267
15267
  });
15268
15268
  }
15269
15269
  }
@@ -15271,23 +15271,23 @@ var oh = ({ params: e }) => {
15271
15271
  S.current ??= window.requestAnimationFrame(() => {
15272
15272
  S.current = null;
15273
15273
  let e = C.current, t = y.current;
15274
- if (!e || !t || b.current && !A.current) return;
15275
- let { u: n, idx: r, xVal: i, frameIdx: a, cursorX: o, cursorY: s, containerW: c, containerH: l } = e, u = m(n, r, s), d = te.current, f = (d?.seriesIdx ?? null) !== (u?.seriesIdx ?? null) || (d?.seriesId ?? "") !== (u?.seriesId ?? "");
15276
- if (te.current = u, f && v.current?.redraw(!1, !1), k.current || F(), !k.current) return;
15274
+ if (!e || !t || b.current && !j.current) return;
15275
+ let { u: n, idx: r, xVal: i, frameIdx: a, cursorX: o, cursorY: s, containerW: c, containerH: l } = e, u = h(n, r, s), d = te.current, f = (d?.seriesIdx ?? null) !== (u?.seriesIdx ?? null) || (d?.seriesId ?? "") !== (u?.seriesId ?? "");
15276
+ if (te.current = u, f && _.current?.redraw(!1, !1), A.current || F(), !A.current) return;
15277
15277
  (w.current !== r || T.current !== (u?.seriesId ?? null)) && (se(n, r, i, a, u), w.current = r);
15278
15278
  let p = Math.min(Math.floor(l * .8), 320);
15279
15279
  t.style.maxHeight = `${p}px`, t.style.overflow = "hidden";
15280
- let h = k.current;
15281
- if (h) {
15282
- let e = h.footerEl?.offsetHeight ?? 0, t = Math.max(64, p - 60 - e - 4);
15283
- h.listContainerEl.style.maxHeight = `${t}px`, h.listContainerEl.style.overflowY = "auto";
15280
+ let m = A.current;
15281
+ if (m) {
15282
+ let e = m.footerEl?.offsetHeight ?? 0, t = Math.max(64, p - 60 - e - 4);
15283
+ m.listContainerEl.style.maxHeight = `${t}px`, m.listContainerEl.style.overflowY = "auto";
15284
15284
  }
15285
15285
  t.classList.remove("hidden");
15286
15286
  let g = {
15287
15287
  w: t.offsetWidth || 220,
15288
15288
  h: Math.min(p, t.offsetHeight || 140)
15289
15289
  };
15290
- if (E.current = g, !A.current || !D.current) {
15290
+ if (E.current = g, !j.current || !D.current) {
15291
15291
  let e = O.current, n = e ? o - e.x : 0, r = e ? s - e.y : 0, i = Math.abs(n) + Math.abs(r) < 3, a = Yn({
15292
15292
  cursorX: o,
15293
15293
  cursorY: s,
@@ -15311,21 +15311,21 @@ var oh = ({ params: e }) => {
15311
15311
  }
15312
15312
  });
15313
15313
  };
15314
- k.current = null, F();
15314
+ A.current = null, F();
15315
15315
  let ue = null, de = 0, fe = 0, pe = () => {
15316
15316
  ue = null;
15317
15317
  let e = de;
15318
15318
  if (de = 0, e === 0) return;
15319
- let t = v.current;
15319
+ let t = _.current;
15320
15320
  t && ah(t, e, fe);
15321
15321
  }, me = (e) => {
15322
- e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || v.current && (de += ih(e), fe = e.offsetY, e.preventDefault(), ue ??= window.requestAnimationFrame(pe));
15322
+ e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || _.current && (de += ih(e), fe = e.offsetY, e.preventDefault(), ue ??= window.requestAnimationFrame(pe));
15323
15323
  }, he = () => {
15324
- let e = v.current;
15324
+ let e = _.current;
15325
15325
  e && e.setScale("y", rh);
15326
15326
  }, ge = {
15327
- width: _.current.offsetWidth || 800,
15328
- height: _.current.offsetHeight || 400,
15327
+ width: g.current.offsetWidth || 800,
15328
+ height: g.current.offsetHeight || 400,
15329
15329
  cursor: {
15330
15330
  sync: { key: "lerobot" },
15331
15331
  drag: { setScale: !0 },
@@ -15374,22 +15374,22 @@ var oh = ({ params: e }) => {
15374
15374
  x.current != null && (window.clearTimeout(x.current), x.current = null);
15375
15375
  let n = e.cursor.idx;
15376
15376
  if (n == null || n < 0) {
15377
- if (A.current) return;
15377
+ if (j.current) return;
15378
15378
  x.current = window.setTimeout(() => {
15379
- !A.current && !b.current && t && (t.classList.add("hidden"), g(), v.current?.redraw(!1, !1)), x.current = null;
15379
+ !j.current && !b.current && t && (t.classList.add("hidden"), v(), _.current?.redraw(!1, !1)), x.current = null;
15380
15380
  }, 300);
15381
15381
  return;
15382
15382
  }
15383
15383
  let r = e.data[0]?.[n];
15384
15384
  if (r == null) {
15385
- if (A.current) return;
15385
+ if (j.current) return;
15386
15386
  x.current = window.setTimeout(() => {
15387
- !A.current && !b.current && t && (t.classList.add("hidden"), g(), v.current?.redraw(!1, !1)), x.current = null;
15387
+ !j.current && !b.current && t && (t.classList.add("hidden"), v(), _.current?.redraw(!1, !1)), x.current = null;
15388
15388
  }, 300);
15389
15389
  return;
15390
15390
  }
15391
- if (A.current) return;
15392
- let i = oe.current, a = i.length > 0 ? Gm(i, r) : n, o = e.over, s = o.offsetLeft || 0, c = o.offsetTop || 0, l = e.cursor.left ?? 0, u = e.cursor.top ?? 0, d = s + l, f = c + u, p = _.current?.clientWidth ?? o.clientWidth, m = _.current?.clientHeight ?? o.clientHeight;
15391
+ if (j.current) return;
15392
+ let i = oe.current, a = i.length > 0 ? Gm(i, r) : n, o = e.over, s = o.offsetLeft || 0, c = o.offsetTop || 0, l = e.cursor.left ?? 0, u = e.cursor.top ?? 0, d = s + l, f = c + u, p = g.current?.clientWidth ?? o.clientWidth, m = g.current?.clientHeight ?? o.clientHeight;
15393
15393
  C.current = {
15394
15394
  u: e,
15395
15395
  idx: n,
@@ -15419,27 +15419,27 @@ var oh = ({ params: e }) => {
15419
15419
  e.over.addEventListener("wheel", me, { passive: !1 }), e.over.addEventListener("dblclick", he), e.over.addEventListener("mousedown", (t) => {
15420
15420
  if (t.button === 0) {
15421
15421
  let t = e.posToVal(e.cursor.left, "x"), n = oe.current, r = n.length > 0 ? Gm(n, t) : 0;
15422
- s(r);
15423
- let i = e.over, a = i.offsetLeft || 0, o = i.offsetTop || 0, c = e.cursor.left ?? 0, l = e.cursor.top ?? 0, u = a + c, d = o + l, f = e.data[0], p = f.length > 0 ? Gm(Array.from(f), t) : 0, m = Number(f[p] ?? t), h = {
15422
+ o(r);
15423
+ let i = e.over, a = i.offsetLeft || 0, s = i.offsetTop || 0, c = e.cursor.left ?? 0, l = e.cursor.top ?? 0, u = a + c, d = s + l, f = e.data[0], p = f.length > 0 ? Gm(Array.from(f), t) : 0, m = Number(f[p] ?? t), h = {
15424
15424
  u: e,
15425
15425
  idx: p,
15426
15426
  xVal: m,
15427
15427
  frameIdx: n.length > 0 ? Gm(n, m) : p,
15428
15428
  cursorX: u,
15429
15429
  cursorY: d,
15430
- containerW: _.current?.clientWidth ?? i.clientWidth,
15431
- containerH: _.current?.clientHeight ?? i.clientHeight
15430
+ containerW: g.current?.clientWidth ?? i.clientWidth,
15431
+ containerH: g.current?.clientHeight ?? i.clientHeight
15432
15432
  };
15433
- A.current ? (A.current = !1, j.current = null, M.current = !1) : (A.current = !0, j.current = h, C.current = h, M.current = !1, w.current = null, T.current = null, le());
15433
+ j.current ? (j.current = !1, M.current = null, N.current = !1) : (j.current = !0, M.current = h, C.current = h, N.current = !1, w.current = null, T.current = null, le());
15434
15434
  }
15435
15435
  }), e.over.addEventListener("mouseenter", () => {
15436
15436
  b.current &&= !1;
15437
15437
  }), e.over.addEventListener("mouseleave", (e) => {
15438
15438
  let t = y.current;
15439
- if (!t || A.current) return;
15439
+ if (!t || j.current) return;
15440
15440
  let n = e.relatedTarget;
15441
15441
  n && t.contains(n) || b.current || (x.current != null && window.clearTimeout(x.current), x.current = window.setTimeout(() => {
15442
- !A.current && !b.current && t && (t.classList.add("hidden"), g(), v.current?.redraw(!1, !1)), x.current = null;
15442
+ !j.current && !b.current && t && (t.classList.add("hidden"), v(), _.current?.redraw(!1, !1)), x.current = null;
15443
15443
  }, 300));
15444
15444
  });
15445
15445
  },
@@ -15448,30 +15448,30 @@ var oh = ({ params: e }) => {
15448
15448
  }
15449
15449
  } }]
15450
15450
  };
15451
- v.current ? v.current.batch(() => {
15452
- if (v.current.series.length !== De.configs.length) v.current.destroy(), v.current = new _m(ge, De.data, _.current), ce.current = !1;
15451
+ _.current ? _.current.batch(() => {
15452
+ if (_.current.series.length !== De.configs.length) _.current.destroy(), _.current = new _m(ge, De.data, g.current), ce.current = !1;
15453
15453
  else {
15454
15454
  let e = ce.current;
15455
- v.current.setData(De.data, e), e && (ce.current = !1);
15455
+ _.current.setData(De.data, e), e && (ce.current = !1);
15456
15456
  }
15457
- }) : (v.current = new _m(ge, De.data, _.current), ce.current = !1);
15457
+ }) : (_.current = new _m(ge, De.data, g.current), ce.current = !1);
15458
15458
  let _e = new ResizeObserver(() => {
15459
- v.current && _.current && v.current.setSize({
15460
- width: _.current.offsetWidth,
15461
- height: _.current.offsetHeight
15459
+ _.current && g.current && _.current.setSize({
15460
+ width: g.current.offsetWidth,
15461
+ height: g.current.offsetHeight
15462
15462
  });
15463
15463
  });
15464
- return _e.observe(_.current), () => {
15465
- ue != null && (window.cancelAnimationFrame(ue), ue = null), _e.disconnect(), e?.removeEventListener("mouseenter", r), e?.removeEventListener("mouseleave", i), k.current = null, A.current = !1, j.current = null, M.current = !1, S.current != null && (window.cancelAnimationFrame(S.current), S.current = null), x.current != null && (window.clearTimeout(x.current), x.current = null);
15464
+ return _e.observe(g.current), () => {
15465
+ ue != null && (window.cancelAnimationFrame(ue), ue = null), _e.disconnect(), e?.removeEventListener("mouseenter", r), e?.removeEventListener("mouseleave", i), A.current = null, j.current = !1, M.current = null, N.current = !1, S.current != null && (window.cancelAnimationFrame(S.current), S.current = null), x.current != null && (window.clearTimeout(x.current), x.current = null);
15466
15466
  };
15467
15467
  }, [
15468
15468
  De,
15469
- h,
15470
- s,
15469
+ m,
15470
+ o,
15471
15471
  t,
15472
15472
  n.language
15473
15473
  ]), V(() => () => {
15474
- v.current &&= (v.current.destroy(), null);
15474
+ _.current &&= (_.current.destroy(), null);
15475
15475
  }, []);
15476
15476
  let Ae = H(() => lr(R?.dimensions ?? Ce), [R?.dimensions, Ce]), Me = B((e) => {
15477
15477
  ue((t) => {
@@ -15485,8 +15485,8 @@ var oh = ({ params: e }) => {
15485
15485
  }, []), Pe = B((e, t) => {
15486
15486
  ue((n) => Zn(n, e, t));
15487
15487
  }, []), Fe = B((e) => {
15488
- let t = e ? new Set(e.itemIds) : null, n = P.current;
15489
- !n && !t || n && t && n.size === t.size && Array.from(n).every((e) => t.has(e)) || (P.current = t, v.current?.redraw(!0, !1));
15488
+ let t = e ? new Set(e.itemIds) : null, n = ee.current;
15489
+ !n && !t || n && t && n.size === t.size && Array.from(n).every((e) => t.has(e)) || (ee.current = t, _.current?.redraw(!0, !1));
15490
15490
  }, []), Ie = H(() => {
15491
15491
  let e = /* @__PURE__ */ new Map();
15492
15492
  return (R?.dimensions ?? Ce).forEach((t) => {
@@ -15496,7 +15496,7 @@ var oh = ({ params: e }) => {
15496
15496
  let t = Ie.get(e);
15497
15497
  return t ? we[t.jointName] : void 0;
15498
15498
  }, [Ie, we]), Re = B((e) => {
15499
- e || (P.current = null, v.current?.redraw(!0, !1));
15499
+ e || (ee.current = null, _.current?.redraw(!0, !1));
15500
15500
  }, []), ze = B((e) => t("chart.joints.selectedCount", { count: e }), [t]), Be = H(() => ({
15501
15501
  featureFilterNodes: Ae,
15502
15502
  selectedIds: le,
@@ -15536,14 +15536,14 @@ var oh = ({ params: e }) => {
15536
15536
  le
15537
15537
  ]);
15538
15538
  return /* @__PURE__ */ G("div", {
15539
- ref: g,
15539
+ ref: h,
15540
15540
  className: "w-full h-full flex flex-col bg-background text-foreground overflow-hidden",
15541
15541
  children: [
15542
15542
  /* @__PURE__ */ G("div", {
15543
15543
  className: "flex items-center justify-between px-3 py-1.5 border-b bg-muted/20",
15544
15544
  children: [/* @__PURE__ */ G("div", {
15545
15545
  className: "flex items-center gap-2 overflow-hidden mr-2",
15546
- children: [/* @__PURE__ */ W(zm, { ...Be }), /* @__PURE__ */ G(c, {
15546
+ children: [/* @__PURE__ */ W(zm, { ...Be }), /* @__PURE__ */ G(u, {
15547
15547
  type: "button",
15548
15548
  variant: "ghost",
15549
15549
  size: "sm",
@@ -15551,7 +15551,7 @@ var oh = ({ params: e }) => {
15551
15551
  disabled: !R,
15552
15552
  title: t("chart.split.openTitle"),
15553
15553
  onClick: () => {
15554
- l(!1), ye(!0);
15554
+ s(!1), ye(!0);
15555
15555
  },
15556
15556
  children: [/* @__PURE__ */ W(Tn, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ W("span", {
15557
15557
  className: "max-w-[100px] truncate",
@@ -15641,7 +15641,7 @@ var oh = ({ params: e }) => {
15641
15641
  children: [/* @__PURE__ */ G("div", {
15642
15642
  className: "absolute inset-0",
15643
15643
  children: [/* @__PURE__ */ W("div", {
15644
- ref: _,
15644
+ ref: g,
15645
15645
  className: "chart-uplot w-full h-full"
15646
15646
  }), /* @__PURE__ */ W("div", {
15647
15647
  ref: y,
@@ -15650,13 +15650,13 @@ var oh = ({ params: e }) => {
15650
15650
  })]
15651
15651
  }), !De && /* @__PURE__ */ W("div", {
15652
15652
  className: "absolute inset-0",
15653
- children: p && !f ? /* @__PURE__ */ W(Fm, { message: p }) : m === null && !f ? /* @__PURE__ */ W(Fm, { message: t("playback.noData") }) : /* @__PURE__ */ W(Pm, { message: t("common.loading") })
15653
+ children: f && !d ? /* @__PURE__ */ W(Fm, { message: f }) : p === null && !d ? /* @__PURE__ */ W(Fm, { message: t("playback.noData") }) : /* @__PURE__ */ W(Pm, { message: t("common.loading") })
15654
15654
  })]
15655
15655
  }),
15656
15656
  R ? /* @__PURE__ */ W(th, {
15657
15657
  open: ve,
15658
15658
  onOpenChange: (e) => {
15659
- ye(e), e && l(!1);
15659
+ ye(e), e && s(!1);
15660
15660
  },
15661
15661
  chartCore: R,
15662
15662
  allJointNames: Ve,
@@ -15680,10 +15680,10 @@ var oh = ({ params: e }) => {
15680
15680
  readOnly: !0,
15681
15681
  className: "pointer-events-none h-3.5 w-3.5 shrink-0 rounded border-border accent-primary"
15682
15682
  });
15683
- }), ch = Ee(function({ groups: e, selectedIds: n, searchValue: r, onSearchChange: i, onSetItemsChecked: a, onToggleItem: o, onSelectAll: s, onClearAll: l, searchPlaceholder: u, emptyLabel: d, selectAllLabel: f, onHoverChange: m, getItemColor: h, getGroupColor: g, className: _ }) {
15684
- let v = H(() => e.flatMap((e) => e.items.map((e) => e.id)), [e]), y = H(() => Qn(e, r), [e, r]), b = H(() => v.reduce((e, t) => n.has(t) ? e + 1 : e, 0), [v, n]), S = v.length > 0 && b === v.length, C = !S && b !== 0;
15683
+ }), ch = Ee(function({ groups: e, selectedIds: n, searchValue: r, onSearchChange: i, onSetItemsChecked: a, onToggleItem: s, onSelectAll: c, onClearAll: l, searchPlaceholder: d, emptyLabel: f, selectAllLabel: p, onHoverChange: m, getItemColor: g, getGroupColor: _, className: v }) {
15684
+ let y = H(() => e.flatMap((e) => e.items.map((e) => e.id)), [e]), b = H(() => Qn(e, r), [e, r]), x = H(() => y.reduce((e, t) => n.has(t) ? e + 1 : e, 0), [y, n]), S = y.length > 0 && x === y.length, C = !S && x !== 0;
15685
15685
  return /* @__PURE__ */ G("div", {
15686
- className: x("w-full", _),
15686
+ className: o("w-full", v),
15687
15687
  onMouseLeave: () => m?.(null),
15688
15688
  children: [/* @__PURE__ */ W("div", {
15689
15689
  className: "border-b bg-muted/20 px-2 py-2",
@@ -15693,10 +15693,10 @@ var oh = ({ params: e }) => {
15693
15693
  type: "button",
15694
15694
  className: "flex h-8 shrink-0 items-center rounded-md px-1",
15695
15695
  onClick: (e) => {
15696
- e.preventDefault(), e.stopPropagation(), S ? l() : s();
15696
+ e.preventDefault(), e.stopPropagation(), S ? l() : c();
15697
15697
  },
15698
- title: f,
15699
- "aria-label": f,
15698
+ title: p,
15699
+ "aria-label": p,
15700
15700
  children: /* @__PURE__ */ W(sh, {
15701
15701
  checked: S,
15702
15702
  indeterminate: C
@@ -15704,14 +15704,14 @@ var oh = ({ params: e }) => {
15704
15704
  }), /* @__PURE__ */ G("div", {
15705
15705
  className: "relative min-w-0 flex-1",
15706
15706
  children: [
15707
- /* @__PURE__ */ W(p, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
15707
+ /* @__PURE__ */ W(h, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
15708
15708
  /* @__PURE__ */ W(re, {
15709
15709
  value: r,
15710
15710
  onChange: (e) => i(e.target.value),
15711
- placeholder: u,
15711
+ placeholder: d,
15712
15712
  className: "h-8 bg-background pl-7 pr-7 text-xs"
15713
15713
  }),
15714
- r ? /* @__PURE__ */ W(c, {
15714
+ r ? /* @__PURE__ */ W(u, {
15715
15715
  type: "button",
15716
15716
  variant: "ghost",
15717
15717
  size: "icon",
@@ -15727,10 +15727,10 @@ var oh = ({ params: e }) => {
15727
15727
  })
15728
15728
  }), /* @__PURE__ */ W("div", {
15729
15729
  className: "max-h-[38vh] overflow-y-auto px-1 py-1",
15730
- children: y.length === 0 ? /* @__PURE__ */ W("div", {
15730
+ children: b.length === 0 ? /* @__PURE__ */ W("div", {
15731
15731
  className: "px-2 py-3 text-xs text-muted-foreground",
15732
- children: d
15733
- }) : y.map((e) => {
15732
+ children: f
15733
+ }) : b.map((e) => {
15734
15734
  let t = e.items.map((e) => e.id), r = Xn(e, n);
15735
15735
  return /* @__PURE__ */ G("div", {
15736
15736
  className: "mb-1 border-b border-border/40 pb-1 last:border-b-0",
@@ -15751,9 +15751,9 @@ var oh = ({ params: e }) => {
15751
15751
  checked: r === "all",
15752
15752
  indeterminate: r === "partial"
15753
15753
  }),
15754
- g ? /* @__PURE__ */ W("span", {
15754
+ _ ? /* @__PURE__ */ W("span", {
15755
15755
  className: "h-0.5 w-5 shrink-0 rounded-full",
15756
- style: { backgroundColor: g(e.id, t) ?? "transparent" }
15756
+ style: { backgroundColor: _(e.id, t) ?? "transparent" }
15757
15757
  }) : null,
15758
15758
  /* @__PURE__ */ W("span", {
15759
15759
  className: "font-semibold text-foreground",
@@ -15763,9 +15763,9 @@ var oh = ({ params: e }) => {
15763
15763
  }), e.items.map((e) => /* @__PURE__ */ G("button", {
15764
15764
  type: "button",
15765
15765
  "data-filter-row": "true",
15766
- className: x("flex w-full items-center gap-2 rounded-md px-2 py-1.5 pl-6 text-left text-[11px] hover:bg-muted/40", n.has(e.id) ? "bg-accent/40" : ""),
15766
+ className: o("flex w-full items-center gap-2 rounded-md px-2 py-1.5 pl-6 text-left text-[11px] hover:bg-muted/40", n.has(e.id) ? "bg-accent/40" : ""),
15767
15767
  onClick: (t) => {
15768
- t.preventDefault(), t.stopPropagation(), o(e.id);
15768
+ t.preventDefault(), t.stopPropagation(), s(e.id);
15769
15769
  },
15770
15770
  onMouseEnter: () => m?.({
15771
15771
  type: "item",
@@ -15777,9 +15777,9 @@ var oh = ({ params: e }) => {
15777
15777
  checked: n.has(e.id),
15778
15778
  indeterminate: !1
15779
15779
  }),
15780
- h ? /* @__PURE__ */ W("span", {
15780
+ g ? /* @__PURE__ */ W("span", {
15781
15781
  className: "h-0.5 w-5 shrink-0 rounded-full",
15782
- style: { backgroundColor: h(e.id) ?? "transparent" }
15782
+ style: { backgroundColor: g(e.id) ?? "transparent" }
15783
15783
  }) : null,
15784
15784
  /* @__PURE__ */ W("span", {
15785
15785
  className: n.has(e.id) ? "font-medium text-foreground" : "text-muted-foreground",
@@ -15834,7 +15834,7 @@ var vh = Ee((e) => {
15834
15834
  c,
15835
15835
  t,
15836
15836
  s
15837
- ]), p = c === "copying" ? o.copyingImage : c === "copied" ? o.copiedImage : c === "downloaded" ? o.downloadedImage : o.copyImage, m = t.kind === "image" ? Cn : kn, h = t.kind === "image" ? o.imageDtype : o.videoDtype, g = c === "copied" ? o.copiedImage : h;
15837
+ ]), f = c === "copying" ? o.copyingImage : c === "copied" ? o.copiedImage : c === "downloaded" ? o.downloadedImage : o.copyImage, p = t.kind === "image" ? Cn : kn, h = t.kind === "image" ? o.imageDtype : o.videoDtype, g = c === "copied" ? o.copiedImage : h;
15838
15838
  return /* @__PURE__ */ W("div", {
15839
15839
  style: u,
15840
15840
  className: "font-mono text-xs leading-5",
@@ -15847,9 +15847,9 @@ var vh = Ee((e) => {
15847
15847
  className: "inline-flex h-4 items-center justify-center rounded-md text-sky-700 hover:bg-muted/60 hover:text-sky-900 dark:text-sky-300 dark:hover:text-sky-100 transition-colors",
15848
15848
  onClick: d,
15849
15849
  disabled: !s || c === "copying",
15850
- title: p,
15851
- "aria-label": p,
15852
- children: [c === "copied" ? /* @__PURE__ */ W(n, { className: "w-3 h-3 text-green-500" }) : c === "downloaded" ? /* @__PURE__ */ W(f, { className: "w-3 h-3" }) : /* @__PURE__ */ W(m, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ W("span", {
15850
+ title: f,
15851
+ "aria-label": f,
15852
+ children: [c === "copied" ? /* @__PURE__ */ W(n, { className: "w-3 h-3 text-green-500" }) : c === "downloaded" ? /* @__PURE__ */ W(m, { className: "w-3 h-3" }) : /* @__PURE__ */ W(p, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ W("span", {
15853
15853
  className: "ml-0.5 text-[10px] font-semibold tracking-wide",
15854
15854
  children: g
15855
15855
  })]
@@ -15860,32 +15860,32 @@ var vh = Ee((e) => {
15860
15860
  });
15861
15861
  });
15862
15862
  vh.displayName = "RawMediaTreeNode";
15863
- var yh = Ee(({ data: e, label: t, depth: n = 0, isLast: r = !0, annotations: i, path: a = "", translations: o, mediaActions: s }) => {
15864
- let [c, l] = ke(n < 2), [u, d] = ke(dh), p = B((n) => {
15863
+ var yh = Ee(({ data: e, label: t, depth: n = 0, isLast: r = !0, annotations: i, path: a = "", translations: s, mediaActions: c }) => {
15864
+ let [l, u] = ke(n < 2), [d, f] = ke(dh), p = B((n) => {
15865
15865
  if (n.stopPropagation(), !(e instanceof Uint8Array)) return;
15866
15866
  let r = new Blob([e], { type: "application/octet-stream" }), i = URL.createObjectURL(r), a = document.createElement("a");
15867
15867
  a.href = i, a.download = t ? `${t}.bin` : "data.bin", document.body.appendChild(a), a.click(), document.body.removeChild(a), URL.revokeObjectURL(i);
15868
- }, [e, t]), m = H(() => ({ marginLeft: `${n * 14}px` }), [n]), h = t ? /* @__PURE__ */ W("span", {
15868
+ }, [e, t]), h = H(() => ({ marginLeft: `${n * 14}px` }), [n]), g = t ? /* @__PURE__ */ W("span", {
15869
15869
  className: "text-sky-600 dark:text-sky-400",
15870
15870
  children: `"${t}": `
15871
15871
  }) : null;
15872
15872
  if (e === void 0) return /* @__PURE__ */ G("div", {
15873
- style: m,
15873
+ style: h,
15874
15874
  className: "font-mono text-xs leading-5",
15875
15875
  children: [
15876
- h,
15876
+ g,
15877
15877
  /* @__PURE__ */ W("span", {
15878
15878
  className: "text-muted-foreground",
15879
- children: o.undefined
15879
+ children: s.undefined
15880
15880
  }),
15881
15881
  !r && ","
15882
15882
  ]
15883
15883
  });
15884
15884
  if (e === null) return /* @__PURE__ */ G("div", {
15885
- style: m,
15885
+ style: h,
15886
15886
  className: "font-mono text-xs leading-5",
15887
15887
  children: [
15888
- h,
15888
+ g,
15889
15889
  /* @__PURE__ */ W("span", {
15890
15890
  className: "text-muted-foreground",
15891
15891
  children: "null"
@@ -15894,20 +15894,20 @@ var yh = Ee(({ data: e, label: t, depth: n = 0, isLast: r = !0, annotations: i,
15894
15894
  ]
15895
15895
  });
15896
15896
  if (e instanceof Uint8Array) return /* @__PURE__ */ G("div", {
15897
- style: m,
15897
+ style: h,
15898
15898
  className: "font-mono text-xs leading-5 flex items-center gap-2 group",
15899
15899
  children: [
15900
- h,
15900
+ g,
15901
15901
  /* @__PURE__ */ G("span", {
15902
15902
  className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-md border bg-muted/30 text-sky-700 dark:text-sky-300 cursor-pointer hover:bg-muted/50 transition-colors",
15903
15903
  onClick: p,
15904
- title: o.downloadBinary,
15904
+ title: s.downloadBinary,
15905
15905
  children: [
15906
15906
  /* @__PURE__ */ W(xn, { className: "w-3 h-3" }),
15907
15907
  "<binary> (",
15908
15908
  e.length,
15909
15909
  " bytes)",
15910
- /* @__PURE__ */ W(f, { className: "w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity" })
15910
+ /* @__PURE__ */ W(m, { className: "w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity" })
15911
15911
  ]
15912
15912
  }),
15913
15913
  !r && ","
@@ -15915,45 +15915,45 @@ var yh = Ee(({ data: e, label: t, depth: n = 0, isLast: r = !0, annotations: i,
15915
15915
  });
15916
15916
  if (fh(e)) return /* @__PURE__ */ W(vh, {
15917
15917
  data: e,
15918
- labelNode: h,
15918
+ labelNode: g,
15919
15919
  depth: n,
15920
15920
  isLast: r,
15921
- translations: o,
15922
- mediaActions: s
15921
+ translations: s,
15922
+ mediaActions: c
15923
15923
  });
15924
15924
  if (typeof e == "object" && e) {
15925
- let f = Array.isArray(e), p = f ? e : Object.keys(e), g = f ? e.length > 0 : p.length > 0, _ = a ? t ? `${a}.${t}` : a : t || "";
15926
- if (!g) return /* @__PURE__ */ G("div", {
15927
- style: m,
15925
+ let o = Array.isArray(e), p = o ? e : Object.keys(e), m = o ? e.length > 0 : p.length > 0, _ = a ? t ? `${a}.${t}` : a : t || "";
15926
+ if (!m) return /* @__PURE__ */ G("div", {
15927
+ style: h,
15928
15928
  className: "font-mono text-xs leading-5",
15929
15929
  children: [
15930
- h,
15931
- /* @__PURE__ */ W("span", { children: f ? "[]" : "{}" }),
15930
+ g,
15931
+ /* @__PURE__ */ W("span", { children: o ? "[]" : "{}" }),
15932
15932
  !r && ","
15933
15933
  ]
15934
15934
  });
15935
- let v = f && e.length > uh, y = f ? v ? e.slice(0, u) : e : Object.entries(e), b = f ? e.length - u : 0;
15935
+ let v = o && e.length > uh, y = o ? v ? e.slice(0, d) : e : Object.entries(e), b = o ? e.length - d : 0;
15936
15936
  return /* @__PURE__ */ G("div", {
15937
- style: m,
15937
+ style: h,
15938
15938
  className: "font-mono text-xs leading-5",
15939
15939
  children: [/* @__PURE__ */ G("div", {
15940
15940
  className: "flex items-center cursor-pointer hover:bg-muted/40 rounded-md px-1.5 -ml-1.5",
15941
- onClick: () => l(!c),
15941
+ onClick: () => u(!l),
15942
15942
  children: [
15943
- h,
15943
+ g,
15944
15944
  /* @__PURE__ */ W("span", {
15945
15945
  className: "inline-flex w-4 shrink-0 items-center justify-center",
15946
- children: W(c ? bn : I, { className: "h-4 w-4 text-muted-foreground" })
15946
+ children: W(l ? bn : I, { className: "h-4 w-4 text-muted-foreground" })
15947
15947
  }),
15948
- /* @__PURE__ */ W("span", { children: f ? "[" : "{" }),
15949
- !c && /* @__PURE__ */ W("span", {
15948
+ /* @__PURE__ */ W("span", { children: o ? "[" : "{" }),
15949
+ !l && /* @__PURE__ */ W("span", {
15950
15950
  className: "text-muted-foreground text-xs ml-1 tabular-nums",
15951
- children: f ? o.itemsCount(e.length) : o.keysCount(Object.keys(e).length)
15951
+ children: o ? s.itemsCount(e.length) : s.keysCount(Object.keys(e).length)
15952
15952
  }),
15953
- !c && /* @__PURE__ */ W("span", { children: f ? "]" : "}" }),
15954
- !c && !r && ","
15953
+ !l && /* @__PURE__ */ W("span", { children: o ? "]" : "}" }),
15954
+ !l && !r && ","
15955
15955
  ]
15956
- }), c && /* @__PURE__ */ G("div", { children: [f ? /* @__PURE__ */ G(je, { children: [
15956
+ }), l && /* @__PURE__ */ G("div", { children: [o ? /* @__PURE__ */ G(je, { children: [
15957
15957
  y.map((e, t) => {
15958
15958
  let r = i?.[_]?.[t], a = t;
15959
15959
  return /* @__PURE__ */ G("div", {
@@ -15964,8 +15964,8 @@ var yh = Ee(({ data: e, label: t, depth: n = 0, isLast: r = !0, annotations: i,
15964
15964
  isLast: t === y.length - 1 && b <= 0,
15965
15965
  annotations: i,
15966
15966
  path: _,
15967
- translations: o,
15968
- mediaActions: s
15967
+ translations: s,
15968
+ mediaActions: c
15969
15969
  }), r && /* @__PURE__ */ G("span", {
15970
15970
  className: "ml-2 text-muted-foreground/60 text-[10px] select-none py-0.5",
15971
15971
  children: ["# ", r]
@@ -15976,20 +15976,20 @@ var yh = Ee(({ data: e, label: t, depth: n = 0, isLast: r = !0, annotations: i,
15976
15976
  style: { marginLeft: `${(n + 1) * 14}px` },
15977
15977
  className: "text-xs text-primary cursor-pointer hover:underline py-1",
15978
15978
  onClick: (t) => {
15979
- t.stopPropagation(), d((t) => Math.min(t + dh, e.length));
15979
+ t.stopPropagation(), f((t) => Math.min(t + dh, e.length));
15980
15980
  },
15981
- children: o.showMore(b)
15981
+ children: s.showMore(b)
15982
15982
  }),
15983
- v && u > dh && /* @__PURE__ */ W("div", {
15983
+ v && d > dh && /* @__PURE__ */ W("div", {
15984
15984
  style: { marginLeft: `${(n + 1) * 14}px` },
15985
15985
  className: "text-xs text-muted-foreground cursor-pointer hover:underline py-1",
15986
15986
  onClick: (e) => {
15987
- e.stopPropagation(), d(dh);
15987
+ e.stopPropagation(), f(dh);
15988
15988
  },
15989
- children: o.showLess
15989
+ children: s.showLess
15990
15990
  })
15991
15991
  ] }) : y.map(([e, t], r, a) => {
15992
- let c = fh(t) ? `${e}:${t.kind}:${t.episodeIndex}` : e;
15992
+ let o = fh(t) ? `${e}:${t.kind}:${t.episodeIndex}` : e;
15993
15993
  return /* @__PURE__ */ W(yh, {
15994
15994
  label: e,
15995
15995
  data: t,
@@ -15997,31 +15997,31 @@ var yh = Ee(({ data: e, label: t, depth: n = 0, isLast: r = !0, annotations: i,
15997
15997
  isLast: r === a.length - 1,
15998
15998
  annotations: i,
15999
15999
  path: _,
16000
- translations: o,
16001
- mediaActions: s
16002
- }, c);
16000
+ translations: s,
16001
+ mediaActions: c
16002
+ }, o);
16003
16003
  }), /* @__PURE__ */ G("div", {
16004
16004
  className: "font-mono text-xs leading-5",
16005
- style: m,
16006
- children: [/* @__PURE__ */ W("span", { children: f ? "]" : "}" }), !r && ","]
16005
+ style: h,
16006
+ children: [/* @__PURE__ */ W("span", { children: o ? "]" : "}" }), !r && ","]
16007
16007
  })] })]
16008
16008
  });
16009
16009
  }
16010
- let g = e, _ = "text-foreground";
16011
- if (typeof e == "string") g = `"${e}"`, _ = "text-emerald-600 dark:text-emerald-400", e.length > 100 && (g = `"${e.substring(0, 50)}... (${e.length} chars)"`);
16010
+ let _ = e, v = "text-foreground";
16011
+ if (typeof e == "string") _ = `"${e}"`, v = "text-emerald-600 dark:text-emerald-400", e.length > 100 && (_ = `"${e.substring(0, 50)}... (${e.length} chars)"`);
16012
16012
  else if (typeof e == "number") {
16013
- _ = "text-amber-600 dark:text-amber-400";
16013
+ v = "text-amber-600 dark:text-amber-400";
16014
16014
  let t = Number.isFinite(e) && !Number.isInteger(e) ? e.toFixed(4) : String(e);
16015
- g = (e >= 0 ? " " : "") + t;
16016
- } else typeof e == "boolean" && (_ = "text-violet-600 dark:text-violet-400");
16015
+ _ = (e >= 0 ? " " : "") + t;
16016
+ } else typeof e == "boolean" && (v = "text-violet-600 dark:text-violet-400");
16017
16017
  return /* @__PURE__ */ G("div", {
16018
- style: m,
16018
+ style: h,
16019
16019
  className: "font-mono text-xs leading-5 whitespace-break-spaces",
16020
16020
  children: [
16021
- h,
16021
+ g,
16022
16022
  /* @__PURE__ */ W("span", {
16023
- className: x(_, typeof e == "number" && Number.isFinite(e) ? "tabular-nums" : ""),
16024
- children: String(g)
16023
+ className: o(v, typeof e == "number" && Number.isFinite(e) ? "tabular-nums" : ""),
16024
+ children: String(_)
16025
16025
  }),
16026
16026
  r ? " " : ","
16027
16027
  ]
@@ -16029,13 +16029,13 @@ var yh = Ee(({ data: e, label: t, depth: n = 0, isLast: r = !0, annotations: i,
16029
16029
  }, (e, t) => e.data === t.data && e.label === t.label && e.depth === t.depth && e.isLast === t.isLast && e.path === t.path && e.annotations === t.annotations && e.translations === t.translations && e.mediaActions === t.mediaActions);
16030
16030
  yh.displayName = "JsonTreeView";
16031
16031
  var bh = Ee((e) => {
16032
- let { isPaused: t, copied: r, hasData: a, selectedFeatures: s, allFeaturesCount: l, featureGroups: u, featureSearch: d, onFeatureSearchChange: f, onToggleFeature: p, onSetFeaturesChecked: m, onSelectAll: h, onClearAll: _, onTogglePause: y, onManualRefresh: S, onCopy: C, allFeaturesLabel: w, featuresCountLabel: T, selectAllLabel: E, searchFeaturePlaceholder: D, noSearchResultLabel: O, pauseLabel: k, resumeLabel: ee, refreshLabel: A, copyLabel: j, copiedLabel: M } = e, N = s.size === 1 ? Array.from(s)[0] : null, P = s.size === l ? w : s.size === 1 ? N : T;
16032
+ let { isPaused: t, copied: r, hasData: i, selectedFeatures: s, allFeaturesCount: l, featureGroups: d, featureSearch: f, onFeatureSearchChange: p, onToggleFeature: m, onSetFeaturesChecked: h, onSelectAll: g, onClearAll: _, onTogglePause: v, onManualRefresh: S, onCopy: C, allFeaturesLabel: w, featuresCountLabel: T, selectAllLabel: E, searchFeaturePlaceholder: D, noSearchResultLabel: O, pauseLabel: k, resumeLabel: A, refreshLabel: j, copyLabel: M, copiedLabel: N } = e, P = s.size === 1 ? Array.from(s)[0] : null, ee = s.size === l ? w : s.size === 1 ? P : T;
16033
16033
  return /* @__PURE__ */ G("div", {
16034
16034
  className: "flex items-center justify-between px-3 py-1.5 border-b bg-muted/20",
16035
16035
  children: [/* @__PURE__ */ W("div", {
16036
16036
  className: "flex items-center gap-2 overflow-hidden mr-2",
16037
16037
  children: /* @__PURE__ */ G(An, { children: [/* @__PURE__ */ G(jn, {
16038
- render: /* @__PURE__ */ W(c, {
16038
+ render: /* @__PURE__ */ W(u, {
16039
16039
  variant: "ghost",
16040
16040
  size: "sm",
16041
16041
  className: "h-6 px-2 text-xs gap-1 hover:bg-muted/50 outline-none aria-expanded:bg-muted/30"
@@ -16044,7 +16044,7 @@ var bh = Ee((e) => {
16044
16044
  /* @__PURE__ */ W(wn, { className: "h-3 w-3" }),
16045
16045
  /* @__PURE__ */ W("span", {
16046
16046
  className: "max-w-[120px] truncate",
16047
- children: P
16047
+ children: ee
16048
16048
  }),
16049
16049
  /* @__PURE__ */ W(bn, { className: "h-3 w-3" })
16050
16050
  ]
@@ -16052,13 +16052,13 @@ var bh = Ee((e) => {
16052
16052
  align: "start",
16053
16053
  className: "w-80 max-h-[70vh] overflow-hidden",
16054
16054
  children: /* @__PURE__ */ W(ch, {
16055
- groups: u,
16055
+ groups: d,
16056
16056
  selectedIds: s,
16057
- searchValue: d,
16058
- onSearchChange: f,
16059
- onSetItemsChecked: m,
16060
- onToggleItem: p,
16061
- onSelectAll: h,
16057
+ searchValue: f,
16058
+ onSearchChange: p,
16059
+ onSetItemsChecked: h,
16060
+ onToggleItem: m,
16061
+ onSelectAll: g,
16062
16062
  onClearAll: _,
16063
16063
  searchPlaceholder: D,
16064
16064
  emptyLabel: O,
@@ -16068,46 +16068,46 @@ var bh = Ee((e) => {
16068
16068
  }), /* @__PURE__ */ G("div", {
16069
16069
  className: "flex items-center gap-1 shrink-0",
16070
16070
  children: [
16071
- /* @__PURE__ */ G(ve, { children: [/* @__PURE__ */ W(i, {
16072
- render: /* @__PURE__ */ W(c, {
16071
+ /* @__PURE__ */ G(ve, { children: [/* @__PURE__ */ W(a, {
16072
+ render: /* @__PURE__ */ W(u, {
16073
16073
  variant: "ghost",
16074
16074
  size: "icon",
16075
- className: x("h-6 w-6 hover:bg-accent/50", t && "text-amber-500"),
16076
- onClick: y,
16077
- "aria-label": t ? ee : k
16075
+ className: o("h-6 w-6 hover:bg-accent/50", t && "text-amber-500"),
16076
+ onClick: v,
16077
+ "aria-label": t ? A : k
16078
16078
  }),
16079
- children: W(t ? g : o, { className: "w-3.5 h-3.5" })
16080
- }), /* @__PURE__ */ W(b, { children: t ? ee : k })] }),
16081
- t && /* @__PURE__ */ G(ve, { children: [/* @__PURE__ */ W(i, {
16082
- render: /* @__PURE__ */ W(c, {
16079
+ children: W(t ? y : c, { className: "w-3.5 h-3.5" })
16080
+ }), /* @__PURE__ */ W(x, { children: t ? A : k })] }),
16081
+ t && /* @__PURE__ */ G(ve, { children: [/* @__PURE__ */ W(a, {
16082
+ render: /* @__PURE__ */ W(u, {
16083
16083
  variant: "ghost",
16084
16084
  size: "icon",
16085
16085
  className: "h-6 w-6 hover:bg-accent/50",
16086
16086
  onClick: S,
16087
- "aria-label": A
16087
+ "aria-label": j
16088
16088
  }),
16089
16089
  children: /* @__PURE__ */ W(Dn, { className: "w-3.5 h-3.5" })
16090
- }), /* @__PURE__ */ W(b, { children: A })] }),
16091
- /* @__PURE__ */ G(ve, { children: [/* @__PURE__ */ W(i, {
16092
- render: /* @__PURE__ */ W(c, {
16090
+ }), /* @__PURE__ */ W(x, { children: j })] }),
16091
+ /* @__PURE__ */ G(ve, { children: [/* @__PURE__ */ W(a, {
16092
+ render: /* @__PURE__ */ W(u, {
16093
16093
  variant: "ghost",
16094
16094
  size: "icon",
16095
16095
  className: "h-6 w-6 hover:bg-accent/50",
16096
16096
  onClick: C,
16097
- disabled: !a,
16098
- "aria-label": r ? M : j
16097
+ disabled: !i,
16098
+ "aria-label": r ? N : M
16099
16099
  }),
16100
- children: r ? /* @__PURE__ */ W(n, { className: "w-3.5 h-3.5 text-green-500" }) : /* @__PURE__ */ W(v, { className: "w-3.5 h-3.5" })
16101
- }), /* @__PURE__ */ W(b, { children: r ? M : j })] })
16100
+ children: r ? /* @__PURE__ */ W(n, { className: "w-3.5 h-3.5 text-green-500" }) : /* @__PURE__ */ W(b, { className: "w-3.5 h-3.5" })
16101
+ }), /* @__PURE__ */ W(x, { children: r ? N : M })] })
16102
16102
  ]
16103
16103
  })]
16104
16104
  });
16105
16105
  });
16106
16106
  bh.displayName = "RawPanelHeader";
16107
16107
  var xh = Ee((e) => {
16108
- let { combinedData: t, featureAnnotations: n, translations: r, mediaActions: i, selectedCount: a, loadingLabel: o, noFeatureLabel: s, noEpisodeLabel: c, hasSelectedEpisode: l, isStale: u } = e;
16109
- return l ? !t && a > 0 ? /* @__PURE__ */ W(Pm, { message: o }) : /* @__PURE__ */ W(h, {
16110
- className: x("flex-1 transition-opacity duration-150", u ? "opacity-85" : "opacity-100"),
16108
+ let { combinedData: t, featureAnnotations: n, translations: r, mediaActions: i, selectedCount: a, loadingLabel: s, noFeatureLabel: c, noEpisodeLabel: l, hasSelectedEpisode: u, isStale: d } = e;
16109
+ return u ? !t && a > 0 ? /* @__PURE__ */ W(Pm, { message: s }) : /* @__PURE__ */ W(_, {
16110
+ className: o("flex-1 transition-opacity duration-150", d ? "opacity-85" : "opacity-100"),
16111
16111
  children: /* @__PURE__ */ W("div", {
16112
16112
  className: "p-3 min-w-fit max-w-full",
16113
16113
  children: t ? /* @__PURE__ */ W(yh, {
@@ -16116,16 +16116,16 @@ var xh = Ee((e) => {
16116
16116
  translations: r,
16117
16117
  mediaActions: i
16118
16118
  }) : a === 0 ? /* @__PURE__ */ W(Fm, {
16119
- message: s,
16119
+ message: c,
16120
16120
  className: "py-20"
16121
16121
  }) : null
16122
16122
  })
16123
- }) : /* @__PURE__ */ W(Fm, { message: c });
16123
+ }) : /* @__PURE__ */ W(Fm, { message: l });
16124
16124
  });
16125
16125
  xh.displayName = "RawPanelTreeBody";
16126
16126
  var Sh = ({ params: e }) => {
16127
- let { t } = a(), { info: n, featureData: r, subscribeFeature: i, unsubscribeFeature: o, subscribeFrameIndex: s, getFrameIndex: c, dataLoader: l, imageService: u, episodes: d } = ee(), { selectedEpisodeIndex: f } = me(), [p, m] = ke(null), [h, g] = ke(!1), [_, v] = ke(""), [y, b] = ke(!1), x = U(0), S = U(0), C = U({
16128
- value: c(),
16127
+ let { t } = v(), { info: n, featureData: r, subscribeFeature: i, unsubscribeFeature: a, subscribeFrameIndex: o, getFrameIndex: s, dataLoader: c, imageService: l, episodes: u } = k(), { selectedEpisodeIndex: d } = me(), [f, p] = ke(null), [m, h] = ke(!1), [g, _] = ke(""), [y, b] = ke(!1), x = U(0), S = U(0), C = U({
16128
+ value: s(),
16129
16129
  listeners: /* @__PURE__ */ new Set()
16130
16130
  }), w = B((e) => {
16131
16131
  let t = C.current;
@@ -16149,37 +16149,37 @@ var Sh = ({ params: e }) => {
16149
16149
  showMore: (e) => t("panels.raw.showMore", { count: e }),
16150
16150
  showLess: t("panels.raw.showLess")
16151
16151
  }), [t]);
16152
- V(() => s((e) => {
16152
+ V(() => o((e) => {
16153
16153
  if (S.current = e, y) return;
16154
16154
  let t = Date.now();
16155
16155
  t - x.current >= lh && (x.current = t, De(() => {
16156
16156
  w(e);
16157
16157
  }));
16158
16158
  }), [
16159
- s,
16159
+ o,
16160
16160
  y,
16161
16161
  w
16162
16162
  ]);
16163
- let k = B(() => {
16163
+ let A = B(() => {
16164
16164
  De(() => {
16165
16165
  w(S.current);
16166
16166
  }), x.current = Date.now();
16167
- }, [w]), A = B(() => {
16167
+ }, [w]), j = B(() => {
16168
16168
  b((e) => (e && (De(() => {
16169
16169
  w(S.current);
16170
16170
  }), x.current = Date.now()), !e));
16171
- }, [w]), j = H(() => n ? Object.keys(n.features).sort() : [], [n]), M = H(() => {
16171
+ }, [w]), M = H(() => n ? Object.keys(n.features).sort() : [], [n]), N = H(() => {
16172
16172
  let t = e?.featureKey;
16173
- return t ? /* @__PURE__ */ new Set([t]) : new Set(j);
16174
- }, [j, e?.featureKey]), N = H(() => p ?? M, [p, M]);
16175
- V(() => (N.forEach((e) => i(e)), () => {
16176
- N.forEach((e) => o(e));
16173
+ return t ? /* @__PURE__ */ new Set([t]) : new Set(M);
16174
+ }, [M, e?.featureKey]), P = H(() => f ?? N, [f, N]);
16175
+ V(() => (P.forEach((e) => i(e)), () => {
16176
+ P.forEach((e) => a(e));
16177
16177
  }), [
16178
- N,
16178
+ P,
16179
16179
  i,
16180
- o
16180
+ a
16181
16181
  ]);
16182
- let P = H(() => {
16182
+ let ee = H(() => {
16183
16183
  if (!n) return {};
16184
16184
  let e = {};
16185
16185
  return Object.entries(n.features).forEach(([t, n]) => {
@@ -16187,15 +16187,15 @@ var Sh = ({ params: e }) => {
16187
16187
  }), e;
16188
16188
  }, [n]), te = H(() => {
16189
16189
  let e = {}, t = !1;
16190
- return N.forEach((i) => {
16190
+ return P.forEach((i) => {
16191
16191
  let a = ge(n, i);
16192
- if (f !== null && (a === "image" || a === "video")) {
16192
+ if (d !== null && (a === "image" || a === "video")) {
16193
16193
  e[i] = {
16194
16194
  __rawMedia: !0,
16195
16195
  kind: a,
16196
16196
  featureKey: i,
16197
16197
  frameIndex: D,
16198
- episodeIndex: f,
16198
+ episodeIndex: d,
16199
16199
  fps: n?.fps ?? 30
16200
16200
  }, t = !0;
16201
16201
  return;
@@ -16203,76 +16203,76 @@ var Sh = ({ params: e }) => {
16203
16203
  r[i] && (e[i] = r[i][D], t = !0);
16204
16204
  }), t ? e : null;
16205
16205
  }, [
16206
- N,
16206
+ P,
16207
16207
  r,
16208
16208
  D,
16209
16209
  n,
16210
- f
16211
- ]), ne = Oe(te), re = ne !== te, F = H(() => f === null ? null : d.find((e) => e.episode_index === f) ?? d[f] ?? null, [d, f]), ie = H(() => {
16212
- if (l) return { copyImage: async (e) => {
16210
+ d
16211
+ ]), ne = Oe(te), re = ne !== te, F = H(() => d === null ? null : u.find((e) => e.episode_index === d) ?? u[d] ?? null, [u, d]), ie = H(() => {
16212
+ if (c) return { copyImage: async (e) => {
16213
16213
  let t = ph(e);
16214
16214
  if (e.kind === "image") {
16215
- let n = l.getEpisodeDataPath(e.episodeIndex);
16215
+ let n = c.getEpisodeDataPath(e.episodeIndex);
16216
16216
  if (!n) throw Error(`Episode ${e.episodeIndex} data path not found`);
16217
- return wr(await u.getImageFrameBytes(n.path, e.featureKey, e.frameIndex, n.startRow), t);
16217
+ return wr(await l.getImageFrameBytes(n.path, e.featureKey, e.frameIndex, n.startRow), t);
16218
16218
  }
16219
- return Dr(l, e.episodeIndex, e.featureKey, e.frameIndex, e.fps, t);
16219
+ return Dr(c, e.episodeIndex, e.featureKey, e.frameIndex, e.fps, t);
16220
16220
  } };
16221
- }, [l, u]), ae = B(() => {
16221
+ }, [c, l]), ae = B(() => {
16222
16222
  let e = {}, t = !1;
16223
- N.forEach((i) => {
16223
+ P.forEach((i) => {
16224
16224
  let a = ge(n, i);
16225
- if (f !== null && (a === "image" || a === "video")) {
16226
- let r = a === "video" ? l?.getEpisodeVideoPath(f, i)?.path ?? null : l?.getEpisodeDataPath(f)?.path ?? null;
16225
+ if (d !== null && (a === "image" || a === "video")) {
16226
+ let r = a === "video" ? c?.getEpisodeVideoPath(d, i)?.path ?? null : c?.getEpisodeDataPath(d)?.path ?? null;
16227
16227
  e[i] = _h({
16228
16228
  kind: a,
16229
16229
  featureKey: i,
16230
16230
  info: n,
16231
16231
  episode: F,
16232
- episodeIndex: f,
16232
+ episodeIndex: d,
16233
16233
  frameIndex: D,
16234
16234
  path: r
16235
16235
  }), t = !0;
16236
16236
  return;
16237
16237
  }
16238
16238
  r[i]?.[D] !== void 0 && (e[i] = r[i][D], t = !0);
16239
- }), t && (navigator.clipboard.writeText(JSON.stringify(e, (e, t) => t instanceof Uint8Array ? `<binary (${t.length} bytes)>` : t, 2)), g(!0), setTimeout(() => g(!1), 2e3));
16239
+ }), t && (navigator.clipboard.writeText(JSON.stringify(e, (e, t) => t instanceof Uint8Array ? `<binary (${t.length} bytes)>` : t, 2)), h(!0), setTimeout(() => h(!1), 2e3));
16240
16240
  }, [
16241
16241
  r,
16242
- N,
16242
+ P,
16243
16243
  D,
16244
16244
  n,
16245
- f,
16245
+ d,
16246
16246
  F,
16247
- l
16247
+ c
16248
16248
  ]), oe = B((e) => {
16249
- m((t) => {
16250
- let n = new Set(t ?? M);
16249
+ p((t) => {
16250
+ let n = new Set(t ?? N);
16251
16251
  return n.has(e) ? n.delete(e) : n.add(e), n;
16252
16252
  });
16253
- }, [M]), se = B(() => m(new Set(j)), [j]), ce = B(() => m(/* @__PURE__ */ new Set()), []), le = H(() => ir(j), [j]), ue = B((e, t) => {
16254
- m((n) => Zn(n ?? M, e, t));
16255
- }, [M]), de = B((e) => v(e), []);
16253
+ }, [N]), se = B(() => p(new Set(M)), [M]), ce = B(() => p(/* @__PURE__ */ new Set()), []), le = H(() => ir(M), [M]), ue = B((e, t) => {
16254
+ p((n) => Zn(n ?? N, e, t));
16255
+ }, [N]), de = B((e) => _(e), []);
16256
16256
  return /* @__PURE__ */ G("div", {
16257
16257
  className: "flex flex-col h-full bg-background text-foreground overflow-hidden",
16258
16258
  children: [/* @__PURE__ */ W(bh, {
16259
16259
  isPaused: y,
16260
- copied: h,
16260
+ copied: m,
16261
16261
  hasData: !!te,
16262
- selectedFeatures: N,
16263
- allFeaturesCount: j.length,
16262
+ selectedFeatures: P,
16263
+ allFeaturesCount: M.length,
16264
16264
  featureGroups: le,
16265
- featureSearch: _,
16265
+ featureSearch: g,
16266
16266
  onFeatureSearchChange: de,
16267
16267
  onToggleFeature: oe,
16268
16268
  onSetFeaturesChecked: ue,
16269
16269
  onSelectAll: se,
16270
16270
  onClearAll: ce,
16271
- onTogglePause: A,
16272
- onManualRefresh: k,
16271
+ onTogglePause: j,
16272
+ onManualRefresh: A,
16273
16273
  onCopy: ae,
16274
16274
  allFeaturesLabel: t("panels.raw.allFeatures"),
16275
- featuresCountLabel: N.size > 0 ? t("panels.raw.featuresCount", { count: N.size }) : t("panels.raw.none"),
16275
+ featuresCountLabel: P.size > 0 ? t("panels.raw.featuresCount", { count: P.size }) : t("panels.raw.none"),
16276
16276
  selectAllLabel: t("panels.raw.selectAll"),
16277
16277
  searchFeaturePlaceholder: t("panels.raw.searchFeature"),
16278
16278
  noSearchResultLabel: t("panels.raw.noSearchResult"),
@@ -16283,14 +16283,14 @@ var Sh = ({ params: e }) => {
16283
16283
  copiedLabel: t("common.copied")
16284
16284
  }), /* @__PURE__ */ W(xh, {
16285
16285
  combinedData: ne,
16286
- featureAnnotations: P,
16286
+ featureAnnotations: ee,
16287
16287
  translations: O,
16288
16288
  mediaActions: ie,
16289
- selectedCount: N.size,
16289
+ selectedCount: P.size,
16290
16290
  loadingLabel: t("panels.raw.loading"),
16291
16291
  noFeatureLabel: t("panels.raw.no_feature"),
16292
16292
  noEpisodeLabel: t("playback.noData"),
16293
- hasSelectedEpisode: f !== null,
16293
+ hasSelectedEpisode: d !== null,
16294
16294
  isStale: re
16295
16295
  })]
16296
16296
  });
@@ -16298,7 +16298,7 @@ var Sh = ({ params: e }) => {
16298
16298
  //#endregion
16299
16299
  //#region src/react/components/panels/Common/PanelErrorBoundary.tsx
16300
16300
  function Ch({ error: e, panelName: t, onRetry: n }) {
16301
- let { t: r } = a();
16301
+ let { t: r } = v();
16302
16302
  return /* @__PURE__ */ G("div", {
16303
16303
  className: "flex flex-col items-center justify-center h-full w-full bg-background text-foreground p-4 text-center",
16304
16304
  role: "alert",
@@ -16325,12 +16325,12 @@ function Ch({ error: e, panelName: t, onRetry: n }) {
16325
16325
  children: e?.message || r("errorBoundary.unknownError")
16326
16326
  })
16327
16327
  }),
16328
- /* @__PURE__ */ G(c, {
16328
+ /* @__PURE__ */ G(u, {
16329
16329
  variant: "outline",
16330
16330
  size: "sm",
16331
16331
  onClick: n,
16332
16332
  className: "flex items-center gap-1.5 text-xs",
16333
- children: [/* @__PURE__ */ W(m, {
16333
+ children: [/* @__PURE__ */ W(g, {
16334
16334
  className: "h-3 w-3",
16335
16335
  "aria-hidden": !0
16336
16336
  }), r("common.retry")]
@@ -16405,26 +16405,26 @@ function Oh(e, t) {
16405
16405
  //#endregion
16406
16406
  //#region src/react/components/PanelTitle.tsx
16407
16407
  var kh = (e) => {
16408
- let { api: n, containerApi: r } = e, { t: o } = a(), { info: s } = ee(), l = n.id, u = r.getPanel(l), d = z.useMemo(() => s?.features ? Object.keys(s.features).sort() : [], [s]), f = (e) => {
16409
- let t = s?.features[e];
16408
+ let { api: n, containerApi: r } = e, { t: i } = v(), { info: o } = k(), s = n.id, c = r.getPanel(s), l = z.useMemo(() => o?.features ? Object.keys(o.features).sort() : [], [o]), d = (e) => {
16409
+ let t = o?.features[e];
16410
16410
  return t ? t.dtype === "video" ? "video" : t.dtype === "image" ? "image" : t.dtype.includes("float") || t.dtype.includes("int") ? "chart" : "raw" : "raw";
16411
- }, p = (e) => {
16411
+ }, f = (e) => {
16412
16412
  switch (e) {
16413
16413
  case "video": return /* @__PURE__ */ W(kn, { className: "h-3.5 w-3.5 text-primary" });
16414
16414
  case "image": return /* @__PURE__ */ W(Cn, { className: "h-3.5 w-3.5 text-primary" });
16415
16415
  case "chart": return /* @__PURE__ */ W(On, { className: "h-3.5 w-3.5 text-primary" });
16416
16416
  default: return /* @__PURE__ */ W(Sn, { className: "h-3.5 w-3.5 text-muted-foreground" });
16417
16417
  }
16418
- }, m = (e, t) => {
16419
- if (!u) return;
16420
- let n = f(t), i = t.split(".").pop() || t;
16418
+ }, p = (e, t) => {
16419
+ if (!c) return;
16420
+ let n = d(t), i = t.split(".").pop() || t;
16421
16421
  Oh(r, {
16422
16422
  component: n,
16423
16423
  title: i,
16424
16424
  params: { featureKey: t },
16425
16425
  tabComponent: "default",
16426
16426
  position: {
16427
- referencePanel: u.id,
16427
+ referencePanel: c.id,
16428
16428
  direction: e
16429
16429
  },
16430
16430
  autoId: {
@@ -16432,50 +16432,50 @@ var kh = (e) => {
16432
16432
  featureKey: t
16433
16433
  }
16434
16434
  });
16435
- }, h = () => {
16436
- u && r.removePanel(u);
16437
- }, g = u ? u.title || o("common.appName") : n.title || o("common.appName");
16438
- return u ? /* @__PURE__ */ G("div", {
16435
+ }, m = () => {
16436
+ c && r.removePanel(c);
16437
+ }, h = c ? c.title || i("common.appName") : n.title || i("common.appName");
16438
+ return c ? /* @__PURE__ */ G("div", {
16439
16439
  className: "panel-title-root flex h-full w-full min-w-0 box-border items-center gap-2 px-2",
16440
16440
  children: [/* @__PURE__ */ W("span", {
16441
16441
  className: "panel-title-text min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm",
16442
- title: g,
16443
- children: g
16442
+ title: h,
16443
+ children: h
16444
16444
  }), /* @__PURE__ */ G("div", {
16445
16445
  className: "panel-title-actions ml-auto flex shrink-0 items-center gap-1",
16446
- children: [/* @__PURE__ */ G(An, { children: [/* @__PURE__ */ G(ve, { children: [/* @__PURE__ */ W(i, {
16447
- render: /* @__PURE__ */ W(jn, { render: /* @__PURE__ */ W(c, {
16446
+ children: [/* @__PURE__ */ G(An, { children: [/* @__PURE__ */ G(ve, { children: [/* @__PURE__ */ W(a, {
16447
+ render: /* @__PURE__ */ W(jn, { render: /* @__PURE__ */ W(u, {
16448
16448
  variant: "ghost",
16449
16449
  size: "icon",
16450
16450
  className: "h-6 w-6 rounded-md opacity-70 hover:bg-accent hover:opacity-100",
16451
16451
  onClick: (e) => {
16452
16452
  e.stopPropagation(), e.preventDefault();
16453
16453
  },
16454
- "aria-label": o("common.addPanel")
16454
+ "aria-label": i("common.addPanel")
16455
16455
  }) }),
16456
16456
  children: /* @__PURE__ */ W(En, {
16457
16457
  className: "h-3.5 w-3.5",
16458
16458
  strokeWidth: 2.5
16459
16459
  })
16460
- }), /* @__PURE__ */ W(b, {
16460
+ }), /* @__PURE__ */ W(x, {
16461
16461
  side: "bottom",
16462
- children: o("common.addPanel")
16462
+ children: i("common.addPanel")
16463
16463
  })] }), /* @__PURE__ */ G(Mn, {
16464
16464
  align: "end",
16465
16465
  className: "max-h-[400px] w-64",
16466
16466
  onClick: (e) => e.stopPropagation(),
16467
- children: [/* @__PURE__ */ G(Pn, { children: [/* @__PURE__ */ G(Fn, { children: [/* @__PURE__ */ W(yn, { className: "mr-2 h-3.5 w-3.5" }), o("common.addToRight")] }), /* @__PURE__ */ W(In, {
16467
+ children: [/* @__PURE__ */ G(Pn, { children: [/* @__PURE__ */ G(Fn, { children: [/* @__PURE__ */ W(yn, { className: "mr-2 h-3.5 w-3.5" }), i("common.addToRight")] }), /* @__PURE__ */ W(In, {
16468
16468
  className: "max-h-[300px] w-64 overflow-y-auto",
16469
- children: d.length === 0 ? /* @__PURE__ */ W("div", {
16469
+ children: l.length === 0 ? /* @__PURE__ */ W("div", {
16470
16470
  className: "px-2 py-1.5 text-xs text-muted-foreground",
16471
16471
  children: "No features available"
16472
- }) : d.map((e) => {
16473
- let t = f(e);
16472
+ }) : l.map((e) => {
16473
+ let t = d(e);
16474
16474
  return /* @__PURE__ */ G(Nn, {
16475
- onClick: () => m("right", e),
16475
+ onClick: () => p("right", e),
16476
16476
  className: "gap-2 text-xs",
16477
16477
  children: [
16478
- p(t),
16478
+ f(t),
16479
16479
  /* @__PURE__ */ W("span", {
16480
16480
  className: "truncate",
16481
16481
  title: e,
@@ -16488,18 +16488,18 @@ var kh = (e) => {
16488
16488
  ]
16489
16489
  }, e);
16490
16490
  })
16491
- })] }), /* @__PURE__ */ G(Pn, { children: [/* @__PURE__ */ G(Fn, { children: [/* @__PURE__ */ W(vn, { className: "mr-2 h-3.5 w-3.5" }), o("common.addBelow")] }), /* @__PURE__ */ W(In, {
16491
+ })] }), /* @__PURE__ */ G(Pn, { children: [/* @__PURE__ */ G(Fn, { children: [/* @__PURE__ */ W(vn, { className: "mr-2 h-3.5 w-3.5" }), i("common.addBelow")] }), /* @__PURE__ */ W(In, {
16492
16492
  className: "max-h-[300px] w-64 overflow-y-auto",
16493
- children: d.length === 0 ? /* @__PURE__ */ W("div", {
16493
+ children: l.length === 0 ? /* @__PURE__ */ W("div", {
16494
16494
  className: "px-2 py-1.5 text-xs text-muted-foreground",
16495
16495
  children: "No features available"
16496
- }) : d.map((e) => {
16497
- let t = f(e);
16496
+ }) : l.map((e) => {
16497
+ let t = d(e);
16498
16498
  return /* @__PURE__ */ G(Nn, {
16499
- onClick: () => m("below", e),
16499
+ onClick: () => p("below", e),
16500
16500
  className: "gap-2 text-xs",
16501
16501
  children: [
16502
- p(t),
16502
+ f(t),
16503
16503
  /* @__PURE__ */ W("span", {
16504
16504
  className: "truncate",
16505
16505
  title: e,
@@ -16513,31 +16513,31 @@ var kh = (e) => {
16513
16513
  }, e);
16514
16514
  })
16515
16515
  })] })]
16516
- })] }), /* @__PURE__ */ G(ve, { children: [/* @__PURE__ */ W(i, {
16517
- render: /* @__PURE__ */ W(c, {
16516
+ })] }), /* @__PURE__ */ G(ve, { children: [/* @__PURE__ */ W(a, {
16517
+ render: /* @__PURE__ */ W(u, {
16518
16518
  variant: "ghost",
16519
16519
  size: "icon",
16520
16520
  className: "h-6 w-6 rounded-md opacity-70 hover:bg-destructive/10 hover:text-destructive hover:opacity-100",
16521
16521
  onClick: (e) => {
16522
- e.stopPropagation(), e.preventDefault(), h();
16522
+ e.stopPropagation(), e.preventDefault(), m();
16523
16523
  },
16524
- "aria-label": o("common.deletePanel")
16524
+ "aria-label": i("common.deletePanel")
16525
16525
  }),
16526
16526
  children: /* @__PURE__ */ W(t, {
16527
16527
  className: "h-3.5 w-3.5",
16528
16528
  strokeWidth: 2.5
16529
16529
  })
16530
- }), /* @__PURE__ */ W(b, {
16530
+ }), /* @__PURE__ */ W(x, {
16531
16531
  side: "bottom",
16532
- children: o("common.deletePanel")
16532
+ children: i("common.deletePanel")
16533
16533
  })] })]
16534
16534
  })]
16535
16535
  }) : /* @__PURE__ */ W("div", {
16536
16536
  className: "panel-title-root flex h-full w-full min-w-0 box-border items-center gap-2 px-2",
16537
16537
  children: /* @__PURE__ */ W("span", {
16538
16538
  className: "panel-title-text min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm",
16539
- title: g,
16540
- children: g
16539
+ title: h,
16540
+ children: h
16541
16541
  })
16542
16542
  });
16543
16543
  }, Ah = Te(null), jh = {
@@ -16558,12 +16558,12 @@ var kh = (e) => {
16558
16558
  children: /* @__PURE__ */ W(Sh, { params: e.params })
16559
16559
  })
16560
16560
  }, Mh = { default: kh }, Nh = () => {
16561
- let e = U(null), [t, n] = ke(null), { t: i } = a(), { resolvedTheme: o } = r(), { info: s } = ee(), c = U(null), [l, u] = ke(4);
16561
+ let e = U(null), [t, n] = ke(null), { t: i } = v(), { resolvedTheme: a } = r(), { info: o } = k(), s = U(null), [c, l] = ke(4);
16562
16562
  V(() => {
16563
- let e = c.current;
16563
+ let e = s.current;
16564
16564
  if (!e) return;
16565
16565
  let t = (e) => {
16566
- u(be(e));
16566
+ l(be(e));
16567
16567
  };
16568
16568
  t(e.clientWidth);
16569
16569
  let n = new ResizeObserver((n) => {
@@ -16571,7 +16571,7 @@ var kh = (e) => {
16571
16571
  });
16572
16572
  return n.observe(e), () => n.disconnect();
16573
16573
  }, []);
16574
- let d = (e, t, n) => {
16574
+ let u = (e, t, n) => {
16575
16575
  let r = [...t, ...n];
16576
16576
  if (r.length === 0) return;
16577
16577
  let i = (e, t) => e.type === "leaf" ? e.data.panels.some((e) => t.has(e)) : e.data.some((e) => i(e, t)), a = (e, t) => e.type === "leaf" ? +!!e.data.panels.some((e) => t.has(e)) : e.data.reduce((e, n) => e + a(n, t), 0), o = (e, t) => {
@@ -16627,15 +16627,15 @@ var kh = (e) => {
16627
16627
  } catch {}
16628
16628
  };
16629
16629
  return V(() => {
16630
- if (c.current) {
16631
- let e = c.current.querySelector(".dockview-react");
16632
- e && (e.classList.remove("dockview-theme-light", "dockview-theme-dark"), e.classList.add(o === "dark" ? "dockview-theme-dark" : "dockview-theme-light"));
16630
+ if (s.current) {
16631
+ let e = s.current.querySelector(".dockview-react");
16632
+ e && (e.classList.remove("dockview-theme-light", "dockview-theme-dark"), e.classList.add(a === "dark" ? "dockview-theme-dark" : "dockview-theme-light"));
16633
16633
  }
16634
- }, [o]), V(() => {
16635
- if (!e.current || !s) return;
16634
+ }, [a]), V(() => {
16635
+ if (!e.current || !o) return;
16636
16636
  let t = e.current;
16637
16637
  t.panels.forEach((e) => e.api.close());
16638
- let n = new Map(Object.entries(s.features).filter((e) => {
16638
+ let n = new Map(Object.entries(o.features).filter((e) => {
16639
16639
  let t = e[1];
16640
16640
  return t?.dtype === "video" || t?.dtype === "image";
16641
16641
  }).map(([e, t]) => {
@@ -16646,8 +16646,8 @@ var kh = (e) => {
16646
16646
  title: e.split(".").pop() || e,
16647
16647
  params: { featureKey: e }
16648
16648
  }];
16649
- })), { row1: r, row2: a } = D(Array.from(n.keys()), 6, l), o = r.map((e) => n.get(e)).filter((e) => !!e), c = a.map((e) => n.get(e)).filter((e) => !!e), u = [...o, ...c];
16650
- if (u.length === 0) {
16649
+ })), { row1: r, row2: a } = E(Array.from(n.keys()), 6, c), s = r.map((e) => n.get(e)).filter((e) => !!e), l = a.map((e) => n.get(e)).filter((e) => !!e), d = [...s, ...l];
16650
+ if (d.length === 0) {
16651
16651
  Oh(t, {
16652
16652
  id: "chart-panel",
16653
16653
  component: "chart",
@@ -16667,16 +16667,16 @@ var kh = (e) => {
16667
16667
  });
16668
16668
  return;
16669
16669
  }
16670
- let f = o[0].id;
16670
+ let f = s[0].id;
16671
16671
  Oh(t, {
16672
16672
  id: f,
16673
- component: u[0].component,
16674
- title: u[0].title,
16675
- params: u[0].params,
16673
+ component: d[0].component,
16674
+ title: d[0].title,
16675
+ params: d[0].params,
16676
16676
  tabComponent: "default"
16677
16677
  });
16678
16678
  let p = f;
16679
- for (let e of o.slice(1)) Oh(t, {
16679
+ for (let e of s.slice(1)) Oh(t, {
16680
16680
  id: e.id,
16681
16681
  component: e.component,
16682
16682
  title: e.title,
@@ -16687,8 +16687,8 @@ var kh = (e) => {
16687
16687
  direction: "right"
16688
16688
  }
16689
16689
  }), p = e.id;
16690
- if (c.length > 0) {
16691
- let e = c[0];
16690
+ if (l.length > 0) {
16691
+ let e = l[0];
16692
16692
  Oh(t, {
16693
16693
  id: e.id,
16694
16694
  component: e.component,
@@ -16698,7 +16698,7 @@ var kh = (e) => {
16698
16698
  position: { direction: "below" }
16699
16699
  });
16700
16700
  let n = e.id;
16701
- for (let e of c.slice(1)) Oh(t, {
16701
+ for (let e of l.slice(1)) Oh(t, {
16702
16702
  id: e.id,
16703
16703
  component: e.component,
16704
16704
  title: e.title,
@@ -16727,15 +16727,15 @@ var kh = (e) => {
16727
16727
  referencePanel: "chart-panel",
16728
16728
  direction: "right"
16729
16729
  }
16730
- }), d(t, o.map((e) => e.id), c.map((e) => e.id));
16730
+ }), u(t, s.map((e) => e.id), l.map((e) => e.id));
16731
16731
  }, [
16732
- s,
16732
+ o,
16733
16733
  i,
16734
- l
16734
+ c
16735
16735
  ]), /* @__PURE__ */ W(Ah.Provider, {
16736
16736
  value: t,
16737
16737
  children: /* @__PURE__ */ W("div", {
16738
- ref: c,
16738
+ ref: s,
16739
16739
  className: "w-full h-full",
16740
16740
  children: /* @__PURE__ */ W(Zc, {
16741
16741
  components: jh,
@@ -16749,7 +16749,7 @@ var kh = (e) => {
16749
16749
  e.kind !== "edge" && e.preventDefault();
16750
16750
  });
16751
16751
  },
16752
- className: o === "dark" ? "dockview-theme-dark" : "dockview-theme-light"
16752
+ className: a === "dark" ? "dockview-theme-dark" : "dockview-theme-light"
16753
16753
  })
16754
16754
  })
16755
16755
  });