@camstack/addon-training 0.1.97 → 0.1.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{MotionZonesSettings-iA_Nrx3J.mjs → MotionZonesSettings-DBC9oNEy.mjs} +2 -2
  3. package/dist/{PrivacyMaskSettings-BJLED0Hb.mjs → PrivacyMaskSettings-MPmxoEGa.mjs} +2 -2
  4. package/dist/{SceneMonitorEditor-CEjUG1-V.mjs → SceneMonitorEditor-q8rm9EAO.mjs} +2 -2
  5. package/dist/_stub.js +883 -877
  6. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-D787_KZE.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-DgVZ6skW.mjs} +3 -3
  7. package/dist/{_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CZqyUznl.mjs → _virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-4mdhpGoW.mjs} +2 -2
  8. package/dist/{dist-e6MHQz3v.js → dist-D0sqORzx.js} +26 -5
  9. package/dist/{dist-DGkGciMs.mjs → dist-DNGtQV92.mjs} +26 -5
  10. package/dist/{hostInit-CvxSzqr0.mjs → hostInit-DA4zjIvT.mjs} +2 -2
  11. package/dist/index.js +1 -1
  12. package/dist/orchestrator/training.addon.js +1 -1
  13. package/dist/orchestrator/training.addon.mjs +1 -1
  14. package/dist/{player-overlays-DUpkeoN0.mjs → player-overlays-aX4eEmgd.mjs} +1 -1
  15. package/dist/providers/modal/training-modal.addon.js +1 -1
  16. package/dist/providers/modal/training-modal.addon.mjs +1 -1
  17. package/dist/remoteEntry.js +1 -1
  18. package/dist/{responsive-BMmksqWC.mjs → responsive-D9ViDal5.mjs} +1 -1
  19. package/dist/{scene-monitor-copy-DI_VlaFk.mjs → scene-monitor-copy-B7FtvYkD.mjs} +1 -1
  20. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-CUYOexzU.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-aLdhRRQr.mjs} +1 -1
  21. package/package.json +1 -1
package/dist/_stub.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import "./virtualExposes-0m8NqEDE.mjs";
2
- import { a as e, i as t, o as n, r } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-CUYOexzU.mjs";
2
+ import { a as e, i as t, o as n, r } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-aLdhRRQr.mjs";
3
3
  import { C as i, S as a, _ as o, a as s, b as c, d as l, f as u, g as d, h as f, i as p, l as m, m as h, n as g, p as _, r as v, t as y, u as b, v as x, w as S, x as C, y as w } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-CEvdvp1T.mjs";
4
4
  import { i as T, n as E, r as D, t as O } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DnrbBvrw.mjs";
5
- import { n as k, r as A, t as ee } from "./ui-text-CqJgUCKX.mjs";
6
- import { $ as j, A as M, B as N, C as P, D as F, E as te, F as I, G as L, H as ne, I as re, J as ie, K as ae, L as oe, M as R, N as se, O as ce, P as le, Q as ue, R as de, S as fe, U as pe, V as me, W as he, X as ge, Y as _e, Z as ve, _ as ye, a as be, at as xe, b as Se, c as Ce, ct as we, d as Te, et as Ee, f as De, g as Oe, h as ke, i as Ae, it as je, j as Me, k as Ne, l as Pe, lt as Fe, m as Ie, n as Le, nt as Re, o as ze, ot as Be, p as Ve, q as He, r as Ue, rt as z, s as We, t as Ge, tt as Ke, u as qe, ut as Je, v as Ye, w as Xe, x as Ze, y as Qe, z as $e } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CZqyUznl.mjs";
5
+ import { n as k, r as A, t as j } from "./ui-text-CqJgUCKX.mjs";
6
+ import { $ as M, A as N, B as P, C as F, D as I, E as ee, F as L, G as R, H as te, I as ne, J as re, K as ie, L as ae, M as oe, N as se, O as ce, P as le, Q as ue, R as de, S as fe, U as pe, V as me, W as he, X as ge, Y as _e, Z as ve, _ as ye, a as be, at as xe, b as Se, c as Ce, ct as we, d as Te, et as Ee, f as De, g as Oe, h as ke, i as Ae, it as je, j as Me, k as Ne, l as Pe, lt as Fe, m as Ie, n as Le, nt as Re, o as ze, ot as Be, p as Ve, q as He, r as Ue, rt as z, s as We, t as Ge, tt as Ke, u as qe, ut as Je, v as Ye, w as Xe, x as Ze, y as Qe, z as $e } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-4mdhpGoW.mjs";
7
7
  import { $ as et, $n as tt, $t as nt, A as rt, An as it, At as at, B as ot, Bn as st, Bt as ct, C as lt, Cn as ut, Ct as dt, D as ft, Dn as pt, Dt as mt, E as ht, En as gt, Et as _t, F as vt, Fn as yt, Ft as bt, G as xt, Gn as St, Gt as Ct, H as wt, Hn as Tt, Ht as Et, I as Dt, In as Ot, It as kt, J as At, Jn as jt, Jt as Mt, K as Nt, Kn as Pt, Kt as Ft, L as It, Ln as Lt, Lt as Rt, M as zt, Mn as Bt, Mt as Vt, Nn as Ht, Nt as Ut, O as Wt, On as Gt, Ot as Kt, P as qt, Pn as Jt, Pt as Yt, Q as Xt, Qn as Zt, Qt, R as $t, Rn as en, Rt as tn, S as nn, Sn as rn, St as an, T as on, Tn as sn, Tt as cn, U as ln, Un as un, Ut as dn, V as fn, Vn as pn, Vt as mn, W as hn, Wn as gn, Wt as _n, X as vn, Xn as yn, Xt as bn, Y as xn, Yn as Sn, Yt as Cn, Z as wn, Zn as Tn, Zt as En, _ as Dn, _n as On, _t as kn, a as An, an as jn, ar as Mn, at as Nn, b as Pn, bn as Fn, bt as In, c as Ln, cn as Rn, cr as zn, ct as Bn, d as Vn, dn as Hn, dr as Un, dt as Wn, en as Gn, er as Kn, f as qn, fn as Jn, fr as Yn, ft as Xn, g as Zn, gn as Qn, gt as $n, h as er, hn as tr, hr as nr, ht as rr, i as ir, in as ar, ir as or, it as sr, j as cr, jn as lr, jt as ur, k as dr, kn as fr, kt as pr, l as mr, ln as hr, lr as gr, lt as _r, m as vr, mn as yr, mr as br, mt as xr, n as Sr, nn as Cr, nr as wr, nt as Tr, o as Er, on as Dr, or as Or, ot as kr, p as Ar, pn as jr, pr as Mr, pt as Nr, q as Pr, qn as Fr, qt as Ir, r as Lr, rn as Rr, rr as zr, rt as Br, s as Vr, sn as Hr, sr as Ur, st as Wr, t as Gr, tn as Kr, tr as qr, tt as Jr, u as Yr, un as Xr, ur as Zr, ut as Qr, v as $r, vn as ei, vt as ti, w as ni, wn as ri, wt as ii, x as ai, xn as oi, xt as si, y as ci, yn as li, yt as ui, z as di, zn as fi, zt as pi } from "./zoom-out-YWRm0VbK.mjs";
8
8
  import { n as mi, r as hi, t as gi } from "./rotate-ccw-Cu6tGrgG.mjs";
9
9
  import { n as _i, t as vi } from "./chevron-right-cA8Hucbi.mjs";
@@ -11,13 +11,13 @@ import { r as yi, t as bi } from "./square-ZPUterXM.mjs";
11
11
  import { t as xi } from "./grid-2x2-CHuMzRxF.mjs";
12
12
  import { t as Si } from "./trash-2-BKfuhsgY.mjs";
13
13
  import { n as Ci, t as wi } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-BkvDudqY.mjs";
14
- import { a as Ti, c as Ei, d as Di, f as Oi, g as ki, h as Ai, i as ji, l as Mi, m as Ni, n as Pi, o as Fi, p as Ii, r as Li, s as Ri, t as zi, u as Bi } from "./responsive-BMmksqWC.mjs";
14
+ import { a as Ti, c as Ei, d as Di, f as Oi, g as ki, h as Ai, i as ji, l as Mi, m as Ni, n as Pi, o as Fi, p as Ii, r as Li, s as Ri, t as zi, u as Bi } from "./responsive-D9ViDal5.mjs";
15
15
  import { n as Vi, t as Hi } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_2_dom__loadShare__.js-DAZkHxxU.mjs";
16
- import { c as Ui, l as Wi, s as Gi, u as Ki } from "./scene-monitor-copy-DI_VlaFk.mjs";
16
+ import { c as Ui, l as Wi, s as Gi, u as Ki } from "./scene-monitor-copy-B7FtvYkD.mjs";
17
17
  import { n as qi, r as Ji, t as Yi } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DpjirGmB.mjs";
18
18
  import { t as Xi } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-CHqN9NLt.mjs";
19
19
  import { t as Zi } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-CFCVuRAs.mjs";
20
- import { n as Qi, r as $i } from "./player-overlays-DUpkeoN0.mjs";
20
+ import { n as Qi, r as $i } from "./player-overlays-aX4eEmgd.mjs";
21
21
  import "./_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.js-ZeT4eUYy.mjs";
22
22
  //#region ../ui-library/src/trpc-react.ts
23
23
  S();
@@ -1013,14 +1013,14 @@ var Aa = (e, t) => {
1013
1013
  "baseline",
1014
1014
  "center-safe",
1015
1015
  "end-safe"
1016
- ], ee = () => [
1016
+ ], j = () => [
1017
1017
  "start",
1018
1018
  "end",
1019
1019
  "center",
1020
1020
  "stretch",
1021
1021
  "center-safe",
1022
1022
  "end-safe"
1023
- ], j = () => ["auto", ...w()], M = () => [
1023
+ ], M = () => ["auto", ...w()], N = () => [
1024
1024
  yo,
1025
1025
  "auto",
1026
1026
  "full",
@@ -1034,7 +1034,7 @@ var Aa = (e, t) => {
1034
1034
  "max",
1035
1035
  "fit",
1036
1036
  ...w()
1037
- ], N = () => [
1037
+ ], P = () => [
1038
1038
  yo,
1039
1039
  "screen",
1040
1040
  "full",
@@ -1045,7 +1045,7 @@ var Aa = (e, t) => {
1045
1045
  "max",
1046
1046
  "fit",
1047
1047
  ...w()
1048
- ], P = () => [
1048
+ ], F = () => [
1049
1049
  yo,
1050
1050
  "screen",
1051
1051
  "full",
@@ -1057,50 +1057,50 @@ var Aa = (e, t) => {
1057
1057
  "max",
1058
1058
  "fit",
1059
1059
  ...w()
1060
- ], F = () => [
1060
+ ], I = () => [
1061
1061
  e,
1062
1062
  H,
1063
1063
  V
1064
- ], te = () => [
1064
+ ], ee = () => [
1065
1065
  ...b(),
1066
1066
  Vo,
1067
1067
  Io,
1068
1068
  { position: [H, V] }
1069
- ], I = () => ["no-repeat", { repeat: [
1069
+ ], L = () => ["no-repeat", { repeat: [
1070
1070
  "",
1071
1071
  "x",
1072
1072
  "y",
1073
1073
  "space",
1074
1074
  "round"
1075
- ] }], L = () => [
1075
+ ] }], R = () => [
1076
1076
  "auto",
1077
1077
  "cover",
1078
1078
  "contain",
1079
1079
  Ho,
1080
1080
  jo,
1081
1081
  { size: [H, V] }
1082
- ], ne = () => [
1082
+ ], te = () => [
1083
1083
  So,
1084
1084
  zo,
1085
1085
  Mo
1086
- ], re = () => [
1086
+ ], ne = () => [
1087
1087
  "",
1088
1088
  "none",
1089
1089
  "full",
1090
1090
  l,
1091
1091
  H,
1092
1092
  V
1093
- ], ie = () => [
1093
+ ], re = () => [
1094
1094
  "",
1095
1095
  bo,
1096
1096
  zo,
1097
1097
  Mo
1098
- ], ae = () => [
1098
+ ], ie = () => [
1099
1099
  "solid",
1100
1100
  "dashed",
1101
1101
  "dotted",
1102
1102
  "double"
1103
- ], oe = () => [
1103
+ ], ae = () => [
1104
1104
  "normal",
1105
1105
  "multiply",
1106
1106
  "screen",
@@ -1117,7 +1117,7 @@ var Aa = (e, t) => {
1117
1117
  "saturation",
1118
1118
  "color",
1119
1119
  "luminosity"
1120
- ], R = () => [
1120
+ ], oe = () => [
1121
1121
  bo,
1122
1122
  So,
1123
1123
  Vo,
@@ -1400,18 +1400,18 @@ var Aa = (e, t) => {
1400
1400
  "gap-x": [{ "gap-x": w() }],
1401
1401
  "gap-y": [{ "gap-y": w() }],
1402
1402
  "justify-content": [{ justify: [...A(), "normal"] }],
1403
- "justify-items": [{ "justify-items": [...ee(), "normal"] }],
1404
- "justify-self": [{ "justify-self": ["auto", ...ee()] }],
1403
+ "justify-items": [{ "justify-items": [...j(), "normal"] }],
1404
+ "justify-self": [{ "justify-self": ["auto", ...j()] }],
1405
1405
  "align-content": [{ content: ["normal", ...A()] }],
1406
- "align-items": [{ items: [...ee(), { baseline: ["", "last"] }] }],
1406
+ "align-items": [{ items: [...j(), { baseline: ["", "last"] }] }],
1407
1407
  "align-self": [{ self: [
1408
1408
  "auto",
1409
- ...ee(),
1409
+ ...j(),
1410
1410
  { baseline: ["", "last"] }
1411
1411
  ] }],
1412
1412
  "place-content": [{ "place-content": A() }],
1413
- "place-items": [{ "place-items": [...ee(), "baseline"] }],
1414
- "place-self": [{ "place-self": ["auto", ...ee()] }],
1413
+ "place-items": [{ "place-items": [...j(), "baseline"] }],
1414
+ "place-self": [{ "place-self": ["auto", ...j()] }],
1415
1415
  p: [{ p: w() }],
1416
1416
  px: [{ px: w() }],
1417
1417
  py: [{ py: w() }],
@@ -1423,38 +1423,38 @@ var Aa = (e, t) => {
1423
1423
  pr: [{ pr: w() }],
1424
1424
  pb: [{ pb: w() }],
1425
1425
  pl: [{ pl: w() }],
1426
- m: [{ m: j() }],
1427
- mx: [{ mx: j() }],
1428
- my: [{ my: j() }],
1429
- ms: [{ ms: j() }],
1430
- me: [{ me: j() }],
1431
- mbs: [{ mbs: j() }],
1432
- mbe: [{ mbe: j() }],
1433
- mt: [{ mt: j() }],
1434
- mr: [{ mr: j() }],
1435
- mb: [{ mb: j() }],
1436
- ml: [{ ml: j() }],
1426
+ m: [{ m: M() }],
1427
+ mx: [{ mx: M() }],
1428
+ my: [{ my: M() }],
1429
+ ms: [{ ms: M() }],
1430
+ me: [{ me: M() }],
1431
+ mbs: [{ mbs: M() }],
1432
+ mbe: [{ mbe: M() }],
1433
+ mt: [{ mt: M() }],
1434
+ mr: [{ mr: M() }],
1435
+ mb: [{ mb: M() }],
1436
+ ml: [{ ml: M() }],
1437
1437
  "space-x": [{ "space-x": w() }],
1438
1438
  "space-x-reverse": ["space-x-reverse"],
1439
1439
  "space-y": [{ "space-y": w() }],
1440
1440
  "space-y-reverse": ["space-y-reverse"],
1441
- size: [{ size: M() }],
1442
- "inline-size": [{ inline: ["auto", ...N()] }],
1443
- "min-inline-size": [{ "min-inline": ["auto", ...N()] }],
1444
- "max-inline-size": [{ "max-inline": ["none", ...N()] }],
1445
- "block-size": [{ block: ["auto", ...P()] }],
1446
- "min-block-size": [{ "min-block": ["auto", ...P()] }],
1447
- "max-block-size": [{ "max-block": ["none", ...P()] }],
1441
+ size: [{ size: N() }],
1442
+ "inline-size": [{ inline: ["auto", ...P()] }],
1443
+ "min-inline-size": [{ "min-inline": ["auto", ...P()] }],
1444
+ "max-inline-size": [{ "max-inline": ["none", ...P()] }],
1445
+ "block-size": [{ block: ["auto", ...F()] }],
1446
+ "min-block-size": [{ "min-block": ["auto", ...F()] }],
1447
+ "max-block-size": [{ "max-block": ["none", ...F()] }],
1448
1448
  w: [{ w: [
1449
1449
  s,
1450
1450
  "screen",
1451
- ...M()
1451
+ ...N()
1452
1452
  ] }],
1453
1453
  "min-w": [{ "min-w": [
1454
1454
  s,
1455
1455
  "screen",
1456
1456
  "none",
1457
- ...M()
1457
+ ...N()
1458
1458
  ] }],
1459
1459
  "max-w": [{ "max-w": [
1460
1460
  s,
@@ -1462,23 +1462,23 @@ var Aa = (e, t) => {
1462
1462
  "none",
1463
1463
  "prose",
1464
1464
  { screen: [o] },
1465
- ...M()
1465
+ ...N()
1466
1466
  ] }],
1467
1467
  h: [{ h: [
1468
1468
  "screen",
1469
1469
  "lh",
1470
- ...M()
1470
+ ...N()
1471
1471
  ] }],
1472
1472
  "min-h": [{ "min-h": [
1473
1473
  "screen",
1474
1474
  "lh",
1475
1475
  "none",
1476
- ...M()
1476
+ ...N()
1477
1477
  ] }],
1478
1478
  "max-h": [{ "max-h": [
1479
1479
  "screen",
1480
1480
  "lh",
1481
- ...M()
1481
+ ...N()
1482
1482
  ] }],
1483
1483
  "font-size": [{ text: [
1484
1484
  "base",
@@ -1551,15 +1551,15 @@ var Aa = (e, t) => {
1551
1551
  "start",
1552
1552
  "end"
1553
1553
  ] }],
1554
- "placeholder-color": [{ placeholder: F() }],
1555
- "text-color": [{ text: F() }],
1554
+ "placeholder-color": [{ placeholder: I() }],
1555
+ "text-color": [{ text: I() }],
1556
1556
  "text-decoration": [
1557
1557
  "underline",
1558
1558
  "overline",
1559
1559
  "line-through",
1560
1560
  "no-underline"
1561
1561
  ],
1562
- "text-decoration-style": [{ decoration: [...ae(), "wavy"] }],
1562
+ "text-decoration-style": [{ decoration: [...ie(), "wavy"] }],
1563
1563
  "text-decoration-thickness": [{ decoration: [
1564
1564
  bo,
1565
1565
  "from-font",
@@ -1567,7 +1567,7 @@ var Aa = (e, t) => {
1567
1567
  H,
1568
1568
  Mo
1569
1569
  ] }],
1570
- "text-decoration-color": [{ decoration: F() }],
1570
+ "text-decoration-color": [{ decoration: I() }],
1571
1571
  "underline-offset": [{ "underline-offset": [
1572
1572
  bo,
1573
1573
  "auto",
@@ -1654,9 +1654,9 @@ var Aa = (e, t) => {
1654
1654
  "padding",
1655
1655
  "content"
1656
1656
  ] }],
1657
- "bg-position": [{ bg: te() }],
1658
- "bg-repeat": [{ bg: I() }],
1659
- "bg-size": [{ bg: L() }],
1657
+ "bg-position": [{ bg: ee() }],
1658
+ "bg-repeat": [{ bg: L() }],
1659
+ "bg-size": [{ bg: R() }],
1660
1660
  "bg-image": [{ bg: [
1661
1661
  "none",
1662
1662
  {
@@ -1689,67 +1689,67 @@ var Aa = (e, t) => {
1689
1689
  Uo,
1690
1690
  Lo
1691
1691
  ] }],
1692
- "bg-color": [{ bg: F() }],
1693
- "gradient-from-pos": [{ from: ne() }],
1694
- "gradient-via-pos": [{ via: ne() }],
1695
- "gradient-to-pos": [{ to: ne() }],
1696
- "gradient-from": [{ from: F() }],
1697
- "gradient-via": [{ via: F() }],
1698
- "gradient-to": [{ to: F() }],
1699
- rounded: [{ rounded: re() }],
1700
- "rounded-s": [{ "rounded-s": re() }],
1701
- "rounded-e": [{ "rounded-e": re() }],
1702
- "rounded-t": [{ "rounded-t": re() }],
1703
- "rounded-r": [{ "rounded-r": re() }],
1704
- "rounded-b": [{ "rounded-b": re() }],
1705
- "rounded-l": [{ "rounded-l": re() }],
1706
- "rounded-ss": [{ "rounded-ss": re() }],
1707
- "rounded-se": [{ "rounded-se": re() }],
1708
- "rounded-ee": [{ "rounded-ee": re() }],
1709
- "rounded-es": [{ "rounded-es": re() }],
1710
- "rounded-tl": [{ "rounded-tl": re() }],
1711
- "rounded-tr": [{ "rounded-tr": re() }],
1712
- "rounded-br": [{ "rounded-br": re() }],
1713
- "rounded-bl": [{ "rounded-bl": re() }],
1714
- "border-w": [{ border: ie() }],
1715
- "border-w-x": [{ "border-x": ie() }],
1716
- "border-w-y": [{ "border-y": ie() }],
1717
- "border-w-s": [{ "border-s": ie() }],
1718
- "border-w-e": [{ "border-e": ie() }],
1719
- "border-w-bs": [{ "border-bs": ie() }],
1720
- "border-w-be": [{ "border-be": ie() }],
1721
- "border-w-t": [{ "border-t": ie() }],
1722
- "border-w-r": [{ "border-r": ie() }],
1723
- "border-w-b": [{ "border-b": ie() }],
1724
- "border-w-l": [{ "border-l": ie() }],
1725
- "divide-x": [{ "divide-x": ie() }],
1692
+ "bg-color": [{ bg: I() }],
1693
+ "gradient-from-pos": [{ from: te() }],
1694
+ "gradient-via-pos": [{ via: te() }],
1695
+ "gradient-to-pos": [{ to: te() }],
1696
+ "gradient-from": [{ from: I() }],
1697
+ "gradient-via": [{ via: I() }],
1698
+ "gradient-to": [{ to: I() }],
1699
+ rounded: [{ rounded: ne() }],
1700
+ "rounded-s": [{ "rounded-s": ne() }],
1701
+ "rounded-e": [{ "rounded-e": ne() }],
1702
+ "rounded-t": [{ "rounded-t": ne() }],
1703
+ "rounded-r": [{ "rounded-r": ne() }],
1704
+ "rounded-b": [{ "rounded-b": ne() }],
1705
+ "rounded-l": [{ "rounded-l": ne() }],
1706
+ "rounded-ss": [{ "rounded-ss": ne() }],
1707
+ "rounded-se": [{ "rounded-se": ne() }],
1708
+ "rounded-ee": [{ "rounded-ee": ne() }],
1709
+ "rounded-es": [{ "rounded-es": ne() }],
1710
+ "rounded-tl": [{ "rounded-tl": ne() }],
1711
+ "rounded-tr": [{ "rounded-tr": ne() }],
1712
+ "rounded-br": [{ "rounded-br": ne() }],
1713
+ "rounded-bl": [{ "rounded-bl": ne() }],
1714
+ "border-w": [{ border: re() }],
1715
+ "border-w-x": [{ "border-x": re() }],
1716
+ "border-w-y": [{ "border-y": re() }],
1717
+ "border-w-s": [{ "border-s": re() }],
1718
+ "border-w-e": [{ "border-e": re() }],
1719
+ "border-w-bs": [{ "border-bs": re() }],
1720
+ "border-w-be": [{ "border-be": re() }],
1721
+ "border-w-t": [{ "border-t": re() }],
1722
+ "border-w-r": [{ "border-r": re() }],
1723
+ "border-w-b": [{ "border-b": re() }],
1724
+ "border-w-l": [{ "border-l": re() }],
1725
+ "divide-x": [{ "divide-x": re() }],
1726
1726
  "divide-x-reverse": ["divide-x-reverse"],
1727
- "divide-y": [{ "divide-y": ie() }],
1727
+ "divide-y": [{ "divide-y": re() }],
1728
1728
  "divide-y-reverse": ["divide-y-reverse"],
1729
1729
  "border-style": [{ border: [
1730
- ...ae(),
1730
+ ...ie(),
1731
1731
  "hidden",
1732
1732
  "none"
1733
1733
  ] }],
1734
1734
  "divide-style": [{ divide: [
1735
- ...ae(),
1735
+ ...ie(),
1736
1736
  "hidden",
1737
1737
  "none"
1738
1738
  ] }],
1739
- "border-color": [{ border: F() }],
1740
- "border-color-x": [{ "border-x": F() }],
1741
- "border-color-y": [{ "border-y": F() }],
1742
- "border-color-s": [{ "border-s": F() }],
1743
- "border-color-e": [{ "border-e": F() }],
1744
- "border-color-bs": [{ "border-bs": F() }],
1745
- "border-color-be": [{ "border-be": F() }],
1746
- "border-color-t": [{ "border-t": F() }],
1747
- "border-color-r": [{ "border-r": F() }],
1748
- "border-color-b": [{ "border-b": F() }],
1749
- "border-color-l": [{ "border-l": F() }],
1750
- "divide-color": [{ divide: F() }],
1739
+ "border-color": [{ border: I() }],
1740
+ "border-color-x": [{ "border-x": I() }],
1741
+ "border-color-y": [{ "border-y": I() }],
1742
+ "border-color-s": [{ "border-s": I() }],
1743
+ "border-color-e": [{ "border-e": I() }],
1744
+ "border-color-bs": [{ "border-bs": I() }],
1745
+ "border-color-be": [{ "border-be": I() }],
1746
+ "border-color-t": [{ "border-t": I() }],
1747
+ "border-color-r": [{ "border-r": I() }],
1748
+ "border-color-b": [{ "border-b": I() }],
1749
+ "border-color-l": [{ "border-l": I() }],
1750
+ "divide-color": [{ divide: I() }],
1751
1751
  "outline-style": [{ outline: [
1752
- ...ae(),
1752
+ ...ie(),
1753
1753
  "none",
1754
1754
  "hidden"
1755
1755
  ] }],
@@ -1764,7 +1764,7 @@ var Aa = (e, t) => {
1764
1764
  zo,
1765
1765
  Mo
1766
1766
  ] }],
1767
- "outline-color": [{ outline: F() }],
1767
+ "outline-color": [{ outline: I() }],
1768
1768
  shadow: [{ shadow: [
1769
1769
  "",
1770
1770
  "none",
@@ -1772,39 +1772,39 @@ var Aa = (e, t) => {
1772
1772
  Wo,
1773
1773
  Ro
1774
1774
  ] }],
1775
- "shadow-color": [{ shadow: F() }],
1775
+ "shadow-color": [{ shadow: I() }],
1776
1776
  "inset-shadow": [{ "inset-shadow": [
1777
1777
  "none",
1778
1778
  d,
1779
1779
  Wo,
1780
1780
  Ro
1781
1781
  ] }],
1782
- "inset-shadow-color": [{ "inset-shadow": F() }],
1783
- "ring-w": [{ ring: ie() }],
1782
+ "inset-shadow-color": [{ "inset-shadow": I() }],
1783
+ "ring-w": [{ ring: re() }],
1784
1784
  "ring-w-inset": ["ring-inset"],
1785
- "ring-color": [{ ring: F() }],
1785
+ "ring-color": [{ ring: I() }],
1786
1786
  "ring-offset-w": [{ "ring-offset": [bo, Mo] }],
1787
- "ring-offset-color": [{ "ring-offset": F() }],
1788
- "inset-ring-w": [{ "inset-ring": ie() }],
1789
- "inset-ring-color": [{ "inset-ring": F() }],
1787
+ "ring-offset-color": [{ "ring-offset": I() }],
1788
+ "inset-ring-w": [{ "inset-ring": re() }],
1789
+ "inset-ring-color": [{ "inset-ring": I() }],
1790
1790
  "text-shadow": [{ "text-shadow": [
1791
1791
  "none",
1792
1792
  f,
1793
1793
  Wo,
1794
1794
  Ro
1795
1795
  ] }],
1796
- "text-shadow-color": [{ "text-shadow": F() }],
1796
+ "text-shadow-color": [{ "text-shadow": I() }],
1797
1797
  opacity: [{ opacity: [
1798
1798
  bo,
1799
1799
  H,
1800
1800
  V
1801
1801
  ] }],
1802
1802
  "mix-blend": [{ "mix-blend": [
1803
- ...oe(),
1803
+ ...ae(),
1804
1804
  "plus-darker",
1805
1805
  "plus-lighter"
1806
1806
  ] }],
1807
- "bg-blend": [{ "bg-blend": oe() }],
1807
+ "bg-blend": [{ "bg-blend": ae() }],
1808
1808
  "mask-clip": [{ "mask-clip": [
1809
1809
  "border",
1810
1810
  "padding",
@@ -1820,39 +1820,39 @@ var Aa = (e, t) => {
1820
1820
  "exclude"
1821
1821
  ] }],
1822
1822
  "mask-image-linear-pos": [{ "mask-linear": [bo] }],
1823
- "mask-image-linear-from-pos": [{ "mask-linear-from": R() }],
1824
- "mask-image-linear-to-pos": [{ "mask-linear-to": R() }],
1825
- "mask-image-linear-from-color": [{ "mask-linear-from": F() }],
1826
- "mask-image-linear-to-color": [{ "mask-linear-to": F() }],
1827
- "mask-image-t-from-pos": [{ "mask-t-from": R() }],
1828
- "mask-image-t-to-pos": [{ "mask-t-to": R() }],
1829
- "mask-image-t-from-color": [{ "mask-t-from": F() }],
1830
- "mask-image-t-to-color": [{ "mask-t-to": F() }],
1831
- "mask-image-r-from-pos": [{ "mask-r-from": R() }],
1832
- "mask-image-r-to-pos": [{ "mask-r-to": R() }],
1833
- "mask-image-r-from-color": [{ "mask-r-from": F() }],
1834
- "mask-image-r-to-color": [{ "mask-r-to": F() }],
1835
- "mask-image-b-from-pos": [{ "mask-b-from": R() }],
1836
- "mask-image-b-to-pos": [{ "mask-b-to": R() }],
1837
- "mask-image-b-from-color": [{ "mask-b-from": F() }],
1838
- "mask-image-b-to-color": [{ "mask-b-to": F() }],
1839
- "mask-image-l-from-pos": [{ "mask-l-from": R() }],
1840
- "mask-image-l-to-pos": [{ "mask-l-to": R() }],
1841
- "mask-image-l-from-color": [{ "mask-l-from": F() }],
1842
- "mask-image-l-to-color": [{ "mask-l-to": F() }],
1843
- "mask-image-x-from-pos": [{ "mask-x-from": R() }],
1844
- "mask-image-x-to-pos": [{ "mask-x-to": R() }],
1845
- "mask-image-x-from-color": [{ "mask-x-from": F() }],
1846
- "mask-image-x-to-color": [{ "mask-x-to": F() }],
1847
- "mask-image-y-from-pos": [{ "mask-y-from": R() }],
1848
- "mask-image-y-to-pos": [{ "mask-y-to": R() }],
1849
- "mask-image-y-from-color": [{ "mask-y-from": F() }],
1850
- "mask-image-y-to-color": [{ "mask-y-to": F() }],
1823
+ "mask-image-linear-from-pos": [{ "mask-linear-from": oe() }],
1824
+ "mask-image-linear-to-pos": [{ "mask-linear-to": oe() }],
1825
+ "mask-image-linear-from-color": [{ "mask-linear-from": I() }],
1826
+ "mask-image-linear-to-color": [{ "mask-linear-to": I() }],
1827
+ "mask-image-t-from-pos": [{ "mask-t-from": oe() }],
1828
+ "mask-image-t-to-pos": [{ "mask-t-to": oe() }],
1829
+ "mask-image-t-from-color": [{ "mask-t-from": I() }],
1830
+ "mask-image-t-to-color": [{ "mask-t-to": I() }],
1831
+ "mask-image-r-from-pos": [{ "mask-r-from": oe() }],
1832
+ "mask-image-r-to-pos": [{ "mask-r-to": oe() }],
1833
+ "mask-image-r-from-color": [{ "mask-r-from": I() }],
1834
+ "mask-image-r-to-color": [{ "mask-r-to": I() }],
1835
+ "mask-image-b-from-pos": [{ "mask-b-from": oe() }],
1836
+ "mask-image-b-to-pos": [{ "mask-b-to": oe() }],
1837
+ "mask-image-b-from-color": [{ "mask-b-from": I() }],
1838
+ "mask-image-b-to-color": [{ "mask-b-to": I() }],
1839
+ "mask-image-l-from-pos": [{ "mask-l-from": oe() }],
1840
+ "mask-image-l-to-pos": [{ "mask-l-to": oe() }],
1841
+ "mask-image-l-from-color": [{ "mask-l-from": I() }],
1842
+ "mask-image-l-to-color": [{ "mask-l-to": I() }],
1843
+ "mask-image-x-from-pos": [{ "mask-x-from": oe() }],
1844
+ "mask-image-x-to-pos": [{ "mask-x-to": oe() }],
1845
+ "mask-image-x-from-color": [{ "mask-x-from": I() }],
1846
+ "mask-image-x-to-color": [{ "mask-x-to": I() }],
1847
+ "mask-image-y-from-pos": [{ "mask-y-from": oe() }],
1848
+ "mask-image-y-to-pos": [{ "mask-y-to": oe() }],
1849
+ "mask-image-y-from-color": [{ "mask-y-from": I() }],
1850
+ "mask-image-y-to-color": [{ "mask-y-to": I() }],
1851
1851
  "mask-image-radial": [{ "mask-radial": [H, V] }],
1852
- "mask-image-radial-from-pos": [{ "mask-radial-from": R() }],
1853
- "mask-image-radial-to-pos": [{ "mask-radial-to": R() }],
1854
- "mask-image-radial-from-color": [{ "mask-radial-from": F() }],
1855
- "mask-image-radial-to-color": [{ "mask-radial-to": F() }],
1852
+ "mask-image-radial-from-pos": [{ "mask-radial-from": oe() }],
1853
+ "mask-image-radial-to-pos": [{ "mask-radial-to": oe() }],
1854
+ "mask-image-radial-from-color": [{ "mask-radial-from": I() }],
1855
+ "mask-image-radial-to-color": [{ "mask-radial-to": I() }],
1856
1856
  "mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
1857
1857
  "mask-image-radial-size": [{ "mask-radial": [{
1858
1858
  closest: ["side", "corner"],
@@ -1860,10 +1860,10 @@ var Aa = (e, t) => {
1860
1860
  }] }],
1861
1861
  "mask-image-radial-pos": [{ "mask-radial-at": b() }],
1862
1862
  "mask-image-conic-pos": [{ "mask-conic": [bo] }],
1863
- "mask-image-conic-from-pos": [{ "mask-conic-from": R() }],
1864
- "mask-image-conic-to-pos": [{ "mask-conic-to": R() }],
1865
- "mask-image-conic-from-color": [{ "mask-conic-from": F() }],
1866
- "mask-image-conic-to-color": [{ "mask-conic-to": F() }],
1863
+ "mask-image-conic-from-pos": [{ "mask-conic-from": oe() }],
1864
+ "mask-image-conic-to-pos": [{ "mask-conic-to": oe() }],
1865
+ "mask-image-conic-from-color": [{ "mask-conic-from": I() }],
1866
+ "mask-image-conic-to-color": [{ "mask-conic-to": I() }],
1867
1867
  "mask-mode": [{ mask: [
1868
1868
  "alpha",
1869
1869
  "luminance",
@@ -1877,9 +1877,9 @@ var Aa = (e, t) => {
1877
1877
  "stroke",
1878
1878
  "view"
1879
1879
  ] }],
1880
- "mask-position": [{ mask: te() }],
1881
- "mask-repeat": [{ mask: I() }],
1882
- "mask-size": [{ mask: L() }],
1880
+ "mask-position": [{ mask: ee() }],
1881
+ "mask-repeat": [{ mask: L() }],
1882
+ "mask-size": [{ mask: R() }],
1883
1883
  "mask-type": [{ "mask-type": ["alpha", "luminance"] }],
1884
1884
  "mask-image": [{ mask: [
1885
1885
  "none",
@@ -1910,7 +1910,7 @@ var Aa = (e, t) => {
1910
1910
  Wo,
1911
1911
  Ro
1912
1912
  ] }],
1913
- "drop-shadow-color": [{ "drop-shadow": F() }],
1913
+ "drop-shadow-color": [{ "drop-shadow": I() }],
1914
1914
  grayscale: [{ grayscale: [
1915
1915
  "",
1916
1916
  bo,
@@ -2070,9 +2070,9 @@ var Aa = (e, t) => {
2070
2070
  H,
2071
2071
  V
2072
2072
  ] }],
2073
- accent: [{ accent: F() }],
2073
+ accent: [{ accent: I() }],
2074
2074
  appearance: [{ appearance: ["none", "auto"] }],
2075
- "caret-color": [{ caret: F() }],
2075
+ "caret-color": [{ caret: I() }],
2076
2076
  "color-scheme": [{ scheme: [
2077
2077
  "normal",
2078
2078
  "dark",
@@ -2130,8 +2130,8 @@ var Aa = (e, t) => {
2130
2130
  "x"
2131
2131
  ] }],
2132
2132
  "scroll-behavior": [{ scroll: ["auto", "smooth"] }],
2133
- "scrollbar-thumb-color": [{ "scrollbar-thumb": F() }],
2134
- "scrollbar-track-color": [{ "scrollbar-track": F() }],
2133
+ "scrollbar-thumb-color": [{ "scrollbar-thumb": I() }],
2134
+ "scrollbar-track-color": [{ "scrollbar-track": I() }],
2135
2135
  "scrollbar-gutter": [{ "scrollbar-gutter": [
2136
2136
  "auto",
2137
2137
  "stable",
@@ -2208,14 +2208,14 @@ var Aa = (e, t) => {
2208
2208
  H,
2209
2209
  V
2210
2210
  ] }],
2211
- fill: [{ fill: ["none", ...F()] }],
2211
+ fill: [{ fill: ["none", ...I()] }],
2212
2212
  "stroke-w": [{ stroke: [
2213
2213
  bo,
2214
2214
  zo,
2215
2215
  Mo,
2216
2216
  No
2217
2217
  ] }],
2218
- stroke: [{ stroke: ["none", ...F()] }],
2218
+ stroke: [{ stroke: ["none", ...I()] }],
2219
2219
  "forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
2220
2220
  },
2221
2221
  conflictingClassGroups: {
@@ -2612,12 +2612,12 @@ function Cs(e) {
2612
2612
  return e.kind === "header" ? vs : ys;
2613
2613
  }
2614
2614
  function ws(e, t) {
2615
- return e.trim().length > 0 ? Ss(ie(e, t).map((e) => e.entry.key)).map((e, t) => ({
2615
+ return e.trim().length > 0 ? Ss(re(e, t).map((e) => e.entry.key)).map((e, t) => ({
2616
2616
  kind: "tiles",
2617
2617
  id: `r${t}`,
2618
2618
  keys: e
2619
2619
  })) : Fe.flatMap((e) => {
2620
- let t = le(e).map((e) => e.key);
2620
+ let t = L(e).map((e) => e.key);
2621
2621
  return [{
2622
2622
  kind: "header",
2623
2623
  id: `h-${e}`,
@@ -2659,14 +2659,14 @@ function Es({ value: e, onPick: t, fallbackGlyph: n, labels: r, extraWords: i, c
2659
2659
  h
2660
2660
  ]), O = (e === null ? void 0 : v(e)) ?? n, k = a ?? n, A = (e) => {
2661
2661
  m(e), g(0), _.current !== null && (_.current.scrollTop = 0);
2662
- }, ee = async (e) => {
2663
- j(!1), await t(e);
2664
- }, j = (e) => {
2662
+ }, j = async (e) => {
2663
+ M(!1), await t(e);
2664
+ }, M = (e) => {
2665
2665
  f(e), e || A("");
2666
2666
  };
2667
2667
  return /* @__PURE__ */ D(fs, {
2668
2668
  open: u,
2669
- onOpenChange: j,
2669
+ onOpenChange: M,
2670
2670
  children: [/* @__PURE__ */ E(ps, {
2671
2671
  disabled: c,
2672
2672
  "aria-label": r.trigger,
@@ -2691,7 +2691,7 @@ function Es({ value: e, onPick: t, fallbackGlyph: n, labels: r, extraWords: i, c
2691
2691
  }),
2692
2692
  /* @__PURE__ */ D("button", {
2693
2693
  type: "button",
2694
- onClick: () => void ee(null),
2694
+ onClick: () => void j(null),
2695
2695
  "aria-pressed": e === null,
2696
2696
  className: "mb-2 flex w-full items-center gap-1.5 rounded px-1.5 py-1 text-[11px] text-foreground-subtle hover:bg-surface-hover",
2697
2697
  children: [/* @__PURE__ */ E(k, { className: "h-3.5 w-3.5" }), r.clear]
@@ -2719,7 +2719,7 @@ function Es({ value: e, onPick: t, fallbackGlyph: n, labels: r, extraWords: i, c
2719
2719
  let n = y === e;
2720
2720
  return /* @__PURE__ */ E("button", {
2721
2721
  type: "button",
2722
- onClick: () => void ee(e),
2722
+ onClick: () => void j(e),
2723
2723
  "aria-pressed": n,
2724
2724
  "aria-label": o?.(e) ?? e,
2725
2725
  title: o?.(e) ?? e,
@@ -2747,7 +2747,7 @@ function Ds(e) {
2747
2747
  };
2748
2748
  }
2749
2749
  function Os({ label: e, value: t, defaultKey: n, disabled: r, onChange: i }) {
2750
- let a = Da(), o = ae(t, n), s = a(n) ?? At;
2750
+ let a = Da(), o = ie(t, n), s = a(n) ?? At;
2751
2751
  return /* @__PURE__ */ D("div", {
2752
2752
  className: "flex items-center gap-2",
2753
2753
  children: [/* @__PURE__ */ E(Es, {
@@ -3143,15 +3143,17 @@ function Wc() {
3143
3143
  if (!e) throw Error("Dropdown compound components must be used within <Dropdown>");
3144
3144
  return e;
3145
3145
  }
3146
- function Gc({ children: e }) {
3147
- let [t, n] = w(!1), r = _(), i = _(), a = x(null);
3146
+ function Gc({ children: e, open: t, onOpenChange: n }) {
3147
+ let [r, i] = w(!1), a = t !== void 0 && n !== void 0, o = a ? t : r, s = m((e) => {
3148
+ a ? n(e) : i(e);
3149
+ }, [a, n]), c = _(), l = _(), u = x(null);
3148
3150
  return /* @__PURE__ */ E(Uc.Provider, {
3149
3151
  value: {
3150
- open: t,
3151
- setOpen: n,
3152
- triggerId: r,
3153
- contentId: i,
3154
- triggerRef: a
3152
+ open: o,
3153
+ setOpen: s,
3154
+ triggerId: c,
3155
+ contentId: l,
3156
+ triggerRef: u
3155
3157
  },
3156
3158
  children: /* @__PURE__ */ E("div", {
3157
3159
  className: "relative inline-block",
@@ -3281,7 +3283,7 @@ function rl(e, t) {
3281
3283
  return e.location === t;
3282
3284
  }
3283
3285
  function il(e, t) {
3284
- let n = L(t.map((e) => ({
3286
+ let n = R(t.map((e) => ({
3285
3287
  id: e.id,
3286
3288
  stableId: e.stableId,
3287
3289
  type: e.type,
@@ -3461,35 +3463,35 @@ function bl({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
3461
3463
  u,
3462
3464
  c,
3463
3465
  s
3464
- ]), m = d(() => Qc(p, e.deviceFilter), [p, e.deviceFilter]), h = Array.isArray(t) ? t.map(String) : [], g = r === !0 || e.disabled === !0, _ = e.maxItems !== void 0 && h.length >= e.maxItems, [v, y] = w(""), [b, S] = w(!1), [C, T] = w(0), O = x(null), k = x(null), ee = d(() => sl(m, h), [m, h]), j = d(() => ol(m, v), [m, v]), M = d(() => al(u, s ? e.suggestLocation : null), [
3466
+ ]), m = d(() => Qc(p, e.deviceFilter), [p, e.deviceFilter]), h = Array.isArray(t) ? t.map(String) : [], g = r === !0 || e.disabled === !0, _ = e.maxItems !== void 0 && h.length >= e.maxItems, [v, y] = w(""), [b, S] = w(!1), [C, T] = w(0), O = x(null), k = x(null), j = d(() => sl(m, h), [m, h]), M = d(() => ol(m, v), [m, v]), N = d(() => al(u, s ? e.suggestLocation : null), [
3465
3467
  u,
3466
3468
  s,
3467
3469
  e.suggestLocation
3468
- ]), N = d(() => nl(j, M, (e) => Number(e.value)), [j, M]), P = d(() => [...N.suggested, ...N.others], [N]), F = (t) => {
3470
+ ]), P = d(() => nl(M, N, (e) => Number(e.value)), [M, N]), F = d(() => [...P.suggested, ...P.others], [P]), I = (t) => {
3469
3471
  if (!g) if (h.includes(t)) n(h.filter((e) => e !== t));
3470
3472
  else {
3471
3473
  if (e.maxItems !== void 0 && h.length >= e.maxItems) return;
3472
3474
  n([...h, t]);
3473
3475
  }
3474
- }, te = (e) => {
3475
- if (e.key === "ArrowDown") e.preventDefault(), S(!0), T((e) => P.length === 0 ? 0 : (e + 1) % P.length);
3476
- else if (e.key === "ArrowUp") e.preventDefault(), S(!0), T((e) => P.length === 0 ? 0 : (e - 1 + P.length) % P.length);
3476
+ }, ee = (e) => {
3477
+ if (e.key === "ArrowDown") e.preventDefault(), S(!0), T((e) => F.length === 0 ? 0 : (e + 1) % F.length);
3478
+ else if (e.key === "ArrowUp") e.preventDefault(), S(!0), T((e) => F.length === 0 ? 0 : (e - 1 + F.length) % F.length);
3477
3479
  else if (e.key === "Enter") {
3478
3480
  e.preventDefault();
3479
- let t = P[C];
3480
- t && F(t.value);
3481
+ let t = F[C];
3482
+ t && I(t.value);
3481
3483
  } else e.key === "Escape" ? S(!1) : e.key === "Backspace" && v === "" && h.length > 0 && n(h.slice(0, -1));
3482
- }, I = ij(e.label, i), L = ij(e.description, i);
3484
+ }, L = ij(e.label, i), R = ij(e.description, i);
3483
3485
  return /* @__PURE__ */ D("div", {
3484
3486
  className: "min-w-0",
3485
3487
  children: [
3486
- I !== void 0 && I !== "" && /* @__PURE__ */ E("label", {
3488
+ L !== void 0 && L !== "" && /* @__PURE__ */ E("label", {
3487
3489
  className: ul,
3488
- children: I
3490
+ children: L
3489
3491
  }),
3490
- ee.length > 0 && /* @__PURE__ */ E("div", {
3492
+ j.length > 0 && /* @__PURE__ */ E("div", {
3491
3493
  className: "flex flex-wrap gap-1 mb-1.5",
3492
- children: ee.map((e) => /* @__PURE__ */ D("span", {
3494
+ children: j.map((e) => /* @__PURE__ */ D("span", {
3493
3495
  className: "inline-flex items-center gap-1 rounded-md bg-primary/10 px-1.5 py-0.5 text-[11px] text-primary max-w-full",
3494
3496
  children: [/* @__PURE__ */ E("span", {
3495
3497
  className: "truncate",
@@ -3498,7 +3500,7 @@ function bl({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
3498
3500
  type: "button",
3499
3501
  className: "shrink-0 hover:text-danger",
3500
3502
  "aria-label": a("uiLibrary.deviceSelectField.remove", "Remove {{label}}", { label: e.label }),
3501
- onClick: () => F(e.value),
3503
+ onClick: () => I(e.value),
3502
3504
  children: /* @__PURE__ */ E(ir, { className: "h-2.5 w-2.5" })
3503
3505
  })]
3504
3506
  }, e.value))
@@ -3545,7 +3547,7 @@ function bl({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
3545
3547
  onBlur: () => {
3546
3548
  k.current = setTimeout(() => S(!1), 120);
3547
3549
  },
3548
- onKeyDown: te
3550
+ onKeyDown: ee
3549
3551
  }),
3550
3552
  /* @__PURE__ */ E(_i, {
3551
3553
  className: "h-3.5 w-3.5 shrink-0 cursor-pointer text-foreground-subtle",
@@ -3562,11 +3564,11 @@ function bl({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
3562
3564
  onMouseDown: (e) => {
3563
3565
  e.preventDefault();
3564
3566
  },
3565
- children: P.length === 0 ? /* @__PURE__ */ E("div", {
3567
+ children: F.length === 0 ? /* @__PURE__ */ E("div", {
3566
3568
  className: "px-2.5 py-2 text-[11px] text-foreground-subtle italic",
3567
3569
  children: m.length === 0 ? a("uiLibrary.deviceSelectField.noDevices", "No matching devices") : a("uiLibrary.deviceSelectField.noMatches", "No matches for “{{query}}”", { query: v })
3568
- }) : P.map((t, n) => {
3569
- let r = h.includes(t.value), i = !r && _, a = N.suggested.length, o = s ? n === 0 && a > 0 ? `Suggested · ${e.suggestLocation ?? ""}` : n === a && a > 0 ? "Other devices" : null : null;
3570
+ }) : F.map((t, n) => {
3571
+ let r = h.includes(t.value), i = !r && _, a = P.suggested.length, o = s ? n === 0 && a > 0 ? `Suggested · ${e.suggestLocation ?? ""}` : n === a && a > 0 ? "Other devices" : null : null;
3570
3572
  return /* @__PURE__ */ D("div", { children: [o !== null && /* @__PURE__ */ E("div", {
3571
3573
  className: ml,
3572
3574
  children: o
@@ -3581,7 +3583,7 @@ function bl({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
3581
3583
  i ? "opacity-40 cursor-not-allowed" : "cursor-pointer"
3582
3584
  ].join(" "),
3583
3585
  onMouseEnter: () => T(n),
3584
- onClick: () => F(t.value),
3586
+ onClick: () => I(t.value),
3585
3587
  children: [/* @__PURE__ */ E("span", {
3586
3588
  className: ["flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded border", r ? "border-primary bg-primary text-white" : "border-border"].join(" "),
3587
3589
  children: r && /* @__PURE__ */ E(gn, { className: "h-2.5 w-2.5" })
@@ -3598,9 +3600,9 @@ function bl({ field: e, value: t, onChange: n, disabled: r, translationFn: i })
3598
3600
  })] }, t.value);
3599
3601
  })
3600
3602
  }),
3601
- L && /* @__PURE__ */ E("p", {
3603
+ R && /* @__PURE__ */ E("p", {
3602
3604
  className: dl,
3603
- children: L
3605
+ children: R
3604
3606
  })
3605
3607
  ]
3606
3608
  });
@@ -3862,8 +3864,8 @@ function Vl({ opt: e }) {
3862
3864
  });
3863
3865
  }
3864
3866
  function Hl(e) {
3865
- let t = A(), { mode: n, options: r, placeholder: i = "Select…", disabled: a = !1, emptyMessage: o = "No options available.", creatable: s = !1, createLabel: c = "Add new…", onCreateRequest: u, label: p, description: m, testId: h, optionTestIdPrefix: g, listboxId: _ } = e, v = a, y = jl(r.length, s, e.searchable), b = _ ?? h ?? "option-select-listbox", S = n === "single" ? e.value.length > 0 ? [e.value] : [] : e.value, C = n === "multi" ? e.maxItems : void 0, T = n === "multi" && C !== void 0 && S.length >= C, [k, ee] = w(""), [j, M] = w(!1), [N, P] = w(0), [F, te] = w(null), I = x(null), L = x(null), ne = x(null), re = x(null), ie = () => {
3866
- let e = L.current;
3867
+ let t = A(), { mode: n, options: r, placeholder: i = "Select…", disabled: a = !1, emptyMessage: o = "No options available.", creatable: s = !1, createLabel: c = "Add new…", onCreateRequest: p, label: m, description: h, testId: g, optionTestIdPrefix: _, listboxId: v } = e, y = a, b = jl(r.length, s, e.searchable), S = v ?? g ?? "option-select-listbox", C = n === "single" ? e.value.length > 0 ? [e.value] : [] : e.value, T = n === "multi" ? e.maxItems : void 0, k = n === "multi" && T !== void 0 && C.length >= T, [j, M] = w(""), [N, P] = w(!1), [F, I] = w(0), [ee, L] = w(null), R = x(null), te = x(null), ne = x(null), re = x(null), ie = () => {
3868
+ let e = te.current;
3867
3869
  if (e === null) return null;
3868
3870
  let t = e.getBoundingClientRect(), n = window.innerHeight - t.bottom - Rl, r = t.top - Rl, i = n >= Math.min(Ll, r) || n >= 120, a = Math.max(96, Math.min(Ll, i ? n : r)), o = Math.max(Rl, Math.min(t.left, window.innerWidth - t.width - Rl));
3869
3871
  return i ? {
@@ -3879,14 +3881,14 @@ function Hl(e) {
3879
3881
  maxHeight: a,
3880
3882
  placement: "above"
3881
3883
  };
3882
- }, { selectedOptions: ae } = d(() => Al(r, S), [r, S]), oe = d(() => kl(r, k), [r, k]), R = Fl(s, k, r), se = Pl(s, u !== void 0), ce = d(() => {
3884
+ }, { selectedOptions: ae } = d(() => Al(r, C), [r, C]), oe = d(() => kl(r, j), [r, j]), se = Fl(s, j, r), ce = Pl(s, p !== void 0), le = d(() => {
3883
3885
  let e = oe.map((e, t) => ({
3884
3886
  kind: "option",
3885
3887
  opt: e,
3886
3888
  index: t
3887
3889
  }));
3888
- if (R) {
3889
- let t = Ml(k);
3890
+ if (se) {
3891
+ let t = Ml(j);
3890
3892
  t !== null && e.push({
3891
3893
  kind: "use-query",
3892
3894
  draft: t
@@ -3895,125 +3897,129 @@ function Hl(e) {
3895
3897
  return e;
3896
3898
  }, [
3897
3899
  oe,
3898
- R,
3899
- k
3900
+ se,
3901
+ j
3900
3902
  ]);
3901
3903
  f(() => {
3902
- if (!j || v) {
3903
- te(null);
3904
+ if (!N || y) {
3905
+ L(null);
3904
3906
  return;
3905
3907
  }
3906
3908
  let e = () => {
3907
- te(ie());
3909
+ L(ie());
3908
3910
  };
3909
3911
  return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
3910
3912
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
3911
3913
  };
3912
3914
  }, [
3915
+ N,
3916
+ y,
3917
+ C.length,
3913
3918
  j,
3914
- v,
3915
- S.length,
3916
- k,
3917
- ce.length
3919
+ le.length
3918
3920
  ]), l(() => {
3919
- if (!j) return;
3921
+ if (!N) return;
3920
3922
  let e = (e) => {
3921
3923
  let t = e.target;
3922
- ne.current?.contains(t) || L.current?.contains(t) || M(!1);
3924
+ ne.current?.contains(t) || te.current?.contains(t) || P(!1);
3923
3925
  };
3924
3926
  return document.addEventListener("mousedown", e), () => {
3925
3927
  document.removeEventListener("mousedown", e);
3926
3928
  };
3927
- }, [j]);
3928
- let le = (t) => {
3929
+ }, [N]);
3930
+ let ue = (t) => {
3929
3931
  let r = t.trim();
3930
3932
  if (r.length !== 0) {
3931
- if (u !== void 0) {
3932
- u(r), ee(""), M(!1);
3933
+ if (p !== void 0) {
3934
+ p(r), M(""), P(!1);
3933
3935
  return;
3934
3936
  }
3935
3937
  if (n === "single") {
3936
- e.onChange(r), ee(""), M(!1);
3938
+ e.onChange(r), M(""), P(!1);
3937
3939
  return;
3938
3940
  }
3939
- e.value.includes(r) || C !== void 0 && e.value.length >= C || (e.onChange([...e.value, r]), ee(""));
3941
+ e.value.includes(r) || T !== void 0 && e.value.length >= T || (e.onChange([...e.value, r]), M(""));
3940
3942
  }
3941
- }, ue = (t) => {
3942
- if (!(n !== "multi" || v)) if (e.value.includes(t)) e.onChange(e.value.filter((e) => e !== t));
3943
+ }, de = (t) => {
3944
+ if (!(n !== "multi" || y)) if (e.value.includes(t)) e.onChange(e.value.filter((e) => e !== t));
3943
3945
  else {
3944
- if (C !== void 0 && e.value.length >= C) return;
3946
+ if (T !== void 0 && e.value.length >= T) return;
3945
3947
  e.onChange([...e.value, t]);
3946
3948
  }
3947
- }, de = (t) => {
3948
- n !== "single" || v || (e.onChange(t), ee(""), M(!1));
3949
- }, fe = (e) => {
3949
+ }, fe = (t) => {
3950
+ n !== "single" || y || (e.onChange(t), M(""), P(!1));
3951
+ }, pe = (e) => {
3950
3952
  if (e.kind === "option") {
3951
3953
  if (e.opt.disabled === !0) return;
3952
- n === "single" ? de(e.opt.value) : ue(e.opt.value);
3953
- } else e.kind === "use-query" && le(e.draft);
3954
- }, pe = ce.length + (se && !R ? 1 : 0), me = (t) => {
3955
- if (t.key === "ArrowDown") t.preventDefault(), M(!0), P((e) => pe === 0 ? 0 : (e + 1) % pe);
3956
- else if (t.key === "ArrowUp") t.preventDefault(), M(!0), P((e) => pe === 0 ? 0 : (e - 1 + pe) % pe);
3954
+ n === "single" ? fe(e.opt.value) : de(e.opt.value);
3955
+ } else e.kind === "use-query" && ue(e.draft);
3956
+ }, me = le.length + (ce && !se ? 1 : 0), he = (t) => {
3957
+ if (t.key === "ArrowDown") t.preventDefault(), P(!0), I((e) => me === 0 ? 0 : (e + 1) % me);
3958
+ else if (t.key === "ArrowUp") t.preventDefault(), P(!0), I((e) => me === 0 ? 0 : (e - 1 + me) % me);
3957
3959
  else if (t.key === "Enter") {
3958
- if (t.preventDefault(), R && N === ce.length) {
3959
- let e = Ml(k);
3960
- e !== null && le(e);
3960
+ if (t.preventDefault(), se && F === le.length) {
3961
+ let e = Ml(j);
3962
+ e !== null && ue(e);
3961
3963
  return;
3962
3964
  }
3963
- if (se && !R && N === ce.length) {
3964
- I.current?.focus();
3965
+ if (ce && !se && F === le.length) {
3966
+ R.current?.focus();
3965
3967
  return;
3966
3968
  }
3967
- let e = ce[N];
3968
- if (e) fe(e);
3969
+ let e = le[F];
3970
+ if (e) pe(e);
3969
3971
  else if (s) {
3970
- let e = Ml(k);
3971
- e !== null && le(e);
3972
+ let e = Ml(j);
3973
+ e !== null && ue(e);
3972
3974
  }
3973
- } else t.key === "Escape" ? M(!1) : t.key === "Backspace" && k === "" && n === "multi" && e.value.length > 0 && e.onChange(e.value.slice(0, -1));
3974
- }, he = (e) => {
3975
- e.key === "Enter" || e.key === " " ? (e.preventDefault(), M((e) => !e)) : e.key === "Escape" && M(!1);
3976
- }, ge = (t) => {
3975
+ } else t.key === "Escape" ? P(!1) : t.key === "Backspace" && j === "" && n === "multi" && e.value.length > 0 && e.onChange(e.value.slice(0, -1));
3976
+ }, ge = (e) => {
3977
+ e.key === "Enter" || e.key === " " ? (e.preventDefault(), P((e) => !e)) : e.key === "Escape" && P(!1);
3978
+ }, _e = (t) => {
3977
3979
  n === "single" ? e.onChange("") : e.onChange(e.value.filter((e) => e !== t));
3978
- }, _e = T === !0 ? `Max ${C} selected` : i, ve = r.length === 0 && !R && ce.length === 0 && j, ye;
3979
- ye = ve ? /* @__PURE__ */ E("div", {
3980
+ }, ve = k === !0 ? `Max ${T} selected` : i, ye = r.length === 0 && !se && le.length === 0 && N, be;
3981
+ be = ye ? /* @__PURE__ */ E("div", {
3980
3982
  className: "px-2.5 py-2 text-[11px] text-foreground-subtle",
3981
3983
  children: o
3982
- }) : ce.length === 0 && !s ? /* @__PURE__ */ E("div", {
3984
+ }) : le.length === 0 && !s ? /* @__PURE__ */ E("div", {
3983
3985
  className: "px-2.5 py-2 text-[11px] text-foreground-subtle italic",
3984
- children: t("uiLibrary.optionSelect.noMatches", "No matches for “{{query}}”", { query: k })
3985
- }) : /* @__PURE__ */ E(O, { children: ce.map((r, i) => {
3986
+ children: t("uiLibrary.optionSelect.noMatches", "No matches for “{{query}}”", { query: j })
3987
+ }) : /* @__PURE__ */ E(O, { children: le.map((r, i) => {
3986
3988
  if (r.kind === "use-query") return /* @__PURE__ */ D("button", {
3987
3989
  type: "button",
3988
3990
  role: "option",
3989
3991
  "aria-selected": !1,
3990
3992
  className: [
3991
3993
  "flex w-full items-center gap-2 px-2.5 py-1.5 text-left text-xs transition-colors",
3992
- i === N ? "bg-primary/10" : "hover:bg-surface-hover",
3994
+ i === F ? "bg-primary/10" : "hover:bg-surface-hover",
3993
3995
  "cursor-pointer"
3994
3996
  ].join(" "),
3995
- onMouseEnter: () => P(i),
3996
- onClick: () => le(r.draft),
3997
+ onMouseEnter: () => I(i),
3998
+ onClick: () => ue(r.draft),
3997
3999
  children: [/* @__PURE__ */ E(xr, { className: "h-3.5 w-3.5 shrink-0 text-primary" }), /* @__PURE__ */ E("span", {
3998
4000
  className: "truncate text-foreground",
3999
4001
  children: t("uiLibrary.optionSelect.use", "Use “{{value}}”", { value: r.draft })
4000
4002
  })]
4001
4003
  }, "__use-query__");
4002
4004
  if (r.kind !== "option") return null;
4003
- let { opt: a } = r, o = n === "single" ? e.value === a.value : e.value.includes(a.value), s = n === "multi" && !o && T === !0, c = a.disabled === !0 || s;
4004
- return /* @__PURE__ */ D("button", {
4005
+ let { opt: a } = r, o = n === "single" ? e.value === a.value : e.value.includes(a.value), s = n === "multi" && !o && k === !0, c = a.disabled === !0 || s, l = le[i - 1], d = l !== void 0 && l.kind === "option" ? l.opt.group : void 0;
4006
+ return /* @__PURE__ */ D(u, { children: [a.group !== void 0 && a.group !== d ? /* @__PURE__ */ E("div", {
4007
+ role: "presentation",
4008
+ className: "px-2.5 pb-0.5 pt-1.5 text-[10px] font-medium uppercase tracking-wide text-foreground-subtle",
4009
+ children: a.group
4010
+ }) : null, /* @__PURE__ */ D("button", {
4005
4011
  type: "button",
4006
4012
  role: "option",
4007
4013
  "aria-selected": o,
4008
4014
  disabled: c,
4009
- "data-testid": g === void 0 ? void 0 : `${g}-${a.value}`,
4015
+ "data-testid": _ === void 0 ? void 0 : `${_}-${a.value}`,
4010
4016
  className: [
4011
4017
  "flex w-full items-center gap-2 px-2.5 py-1.5 text-left text-xs transition-colors",
4012
- i === N ? "bg-primary/10" : "hover:bg-surface-hover",
4018
+ i === F ? "bg-primary/10" : "hover:bg-surface-hover",
4013
4019
  c ? "opacity-40 cursor-not-allowed" : "cursor-pointer"
4014
4020
  ].join(" "),
4015
- onMouseEnter: () => P(i),
4016
- onClick: () => fe(r),
4021
+ onMouseEnter: () => I(i),
4022
+ onClick: () => pe(r),
4017
4023
  children: [
4018
4024
  /* @__PURE__ */ E("span", {
4019
4025
  className: ["flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded border", o ? "border-primary bg-primary text-white" : "border-border"].join(" "),
@@ -4029,16 +4035,16 @@ function Hl(e) {
4029
4035
  children: a.badge
4030
4036
  }) : null
4031
4037
  ]
4032
- }, a.value);
4038
+ })] }, a.value);
4033
4039
  }) });
4034
- let be = ce.length, xe = n === "single" && e.singleDisplay === "field" && ae.length > 0;
4040
+ let xe = le.length, Se = n === "single" && e.singleDisplay === "field" && ae.length > 0;
4035
4041
  return /* @__PURE__ */ D("div", {
4036
4042
  className: "min-w-0 space-y-1",
4037
- "data-testid": h,
4043
+ "data-testid": g,
4038
4044
  children: [
4039
- p !== void 0 && p.length > 0 && /* @__PURE__ */ E("label", {
4045
+ m !== void 0 && m.length > 0 && /* @__PURE__ */ E("label", {
4040
4046
  className: zl,
4041
- children: p
4047
+ children: m
4042
4048
  }),
4043
4049
  n === "multi" && ae.length > 0 && /* @__PURE__ */ E("div", {
4044
4050
  className: "flex flex-wrap gap-1 mb-1.5",
@@ -4046,8 +4052,8 @@ function Hl(e) {
4046
4052
  label: e.label,
4047
4053
  ...e.iconUrl === void 0 ? {} : { iconUrl: e.iconUrl },
4048
4054
  ...e.iconId === void 0 ? {} : { iconId: e.iconId },
4049
- ...v ? {} : { onRemove: () => ge(e.value) },
4050
- ...g === void 0 ? {} : { testId: `${g}-chip-${e.value}` }
4055
+ ...y ? {} : { onRemove: () => _e(e.value) },
4056
+ ..._ === void 0 ? {} : { testId: `${_}-chip-${e.value}` }
4051
4057
  }, e.value))
4052
4058
  }),
4053
4059
  n === "single" && e.singleDisplay !== "field" && ae.length > 0 && /* @__PURE__ */ E("div", {
@@ -4056,104 +4062,104 @@ function Hl(e) {
4056
4062
  label: e.label,
4057
4063
  ...e.iconUrl === void 0 ? {} : { iconUrl: e.iconUrl },
4058
4064
  ...e.iconId === void 0 ? {} : { iconId: e.iconId },
4059
- ...v ? {} : { onRemove: () => ge(e.value) }
4065
+ ...y ? {} : { onRemove: () => _e(e.value) }
4060
4066
  }, e.value))
4061
4067
  }),
4062
- y ? /* @__PURE__ */ D("div", {
4068
+ b ? /* @__PURE__ */ D("div", {
4063
4069
  ref: (e) => {
4064
- L.current = e;
4070
+ te.current = e;
4065
4071
  },
4066
- className: El + (v ? " opacity-50" : ""),
4072
+ className: El + (y ? " opacity-50" : ""),
4067
4073
  children: [
4068
4074
  /* @__PURE__ */ E(Xt, { className: "h-3.5 w-3.5 shrink-0 text-foreground-subtle" }),
4069
4075
  /* @__PURE__ */ E("input", {
4070
- ref: I,
4076
+ ref: R,
4071
4077
  type: "text",
4072
4078
  role: "combobox",
4073
- "aria-expanded": j,
4074
- "aria-controls": b,
4079
+ "aria-expanded": N,
4080
+ "aria-controls": S,
4075
4081
  className: "min-w-0 flex-1 bg-transparent text-xs text-foreground outline-none placeholder:text-foreground-disabled",
4076
- value: xe && !j && k === "" ? ae[0]?.label ?? "" : k,
4077
- placeholder: xe ? ae[0]?.label ?? "" : _e,
4078
- disabled: v,
4082
+ value: Se && !N && j === "" ? ae[0]?.label ?? "" : j,
4083
+ placeholder: Se ? ae[0]?.label ?? "" : ve,
4084
+ disabled: y,
4079
4085
  onChange: (e) => {
4080
- ee(e.target.value), M(!0), P(0);
4086
+ M(e.target.value), P(!0), I(0);
4081
4087
  },
4082
- onFocus: () => M(!0),
4088
+ onFocus: () => P(!0),
4083
4089
  onBlur: () => {
4084
4090
  re.current = setTimeout(() => {
4085
4091
  let e = document.activeElement;
4086
- ne.current?.contains(e) || M(!1);
4092
+ ne.current?.contains(e) || P(!1);
4087
4093
  }, 120);
4088
4094
  },
4089
- onKeyDown: me
4095
+ onKeyDown: he
4090
4096
  }),
4091
4097
  /* @__PURE__ */ E(_i, {
4092
4098
  className: "h-3.5 w-3.5 shrink-0 cursor-pointer text-foreground-subtle",
4093
4099
  onMouseDown: (e) => {
4094
- e.preventDefault(), re.current && clearTimeout(re.current), M((e) => !e), I.current?.focus();
4100
+ e.preventDefault(), re.current && clearTimeout(re.current), P((e) => !e), R.current?.focus();
4095
4101
  }
4096
4102
  })
4097
4103
  ]
4098
4104
  }) : /* @__PURE__ */ D("button", {
4099
4105
  ref: (e) => {
4100
- L.current = e;
4106
+ te.current = e;
4101
4107
  },
4102
4108
  type: "button",
4103
4109
  role: "combobox",
4104
- "aria-expanded": j,
4105
- "aria-controls": b,
4106
- disabled: v,
4110
+ "aria-expanded": N,
4111
+ "aria-controls": S,
4112
+ disabled: y,
4107
4113
  className: [
4108
4114
  El,
4109
4115
  "w-full justify-between text-xs text-foreground",
4110
- v ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
4116
+ y ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
4111
4117
  ].join(" "),
4112
- onClick: () => !v && M((e) => !e),
4113
- onKeyDown: he,
4118
+ onClick: () => !y && P((e) => !e),
4119
+ onKeyDown: ge,
4114
4120
  children: [/* @__PURE__ */ E("span", {
4115
4121
  className: "truncate text-foreground-subtle",
4116
- children: ae[0]?.label ?? _e
4122
+ children: ae[0]?.label ?? ve
4117
4123
  }), /* @__PURE__ */ E(_i, { className: "h-3.5 w-3.5 shrink-0 text-foreground-subtle" })]
4118
4124
  }),
4119
- j && !v && F !== null && typeof document < "u" && Hi(/* @__PURE__ */ D("div", {
4125
+ N && !y && ee !== null && typeof document < "u" && Hi(/* @__PURE__ */ D("div", {
4120
4126
  ref: ne,
4121
- id: b,
4127
+ id: S,
4122
4128
  role: "listbox",
4123
4129
  style: {
4124
4130
  position: "fixed",
4125
- top: F.top,
4126
- left: F.left,
4127
- width: F.width,
4128
- maxHeight: F.maxHeight,
4131
+ top: ee.top,
4132
+ left: ee.left,
4133
+ width: ee.width,
4134
+ maxHeight: ee.maxHeight,
4129
4135
  zIndex: 9999
4130
4136
  },
4131
4137
  className: "overflow-y-auto rounded-md border border-border bg-surface shadow-lg",
4132
4138
  onMouseDown: (e) => {
4133
4139
  e.preventDefault(), re.current && clearTimeout(re.current);
4134
4140
  },
4135
- children: [ye, se && /* @__PURE__ */ D("button", {
4141
+ children: [be, ce && /* @__PURE__ */ D("button", {
4136
4142
  type: "button",
4137
4143
  className: [
4138
4144
  "flex w-full items-center gap-2 border-t border-border px-2.5 py-1.5 text-left text-xs transition-colors",
4139
- be === N ? "bg-primary/10" : "hover:bg-surface-hover",
4145
+ xe === F ? "bg-primary/10" : "hover:bg-surface-hover",
4140
4146
  "cursor-pointer text-primary"
4141
4147
  ].join(" "),
4142
- onMouseEnter: () => P(be),
4148
+ onMouseEnter: () => I(xe),
4143
4149
  onClick: () => {
4144
- let e = Ml(k);
4150
+ let e = Ml(j);
4145
4151
  if (e !== null) {
4146
- u?.(e), ee(""), M(!1);
4152
+ p?.(e), M(""), P(!1);
4147
4153
  return;
4148
4154
  }
4149
- I.current?.focus();
4155
+ R.current?.focus();
4150
4156
  },
4151
4157
  children: [/* @__PURE__ */ E(xr, { className: "h-3.5 w-3.5 shrink-0" }), c]
4152
4158
  })]
4153
4159
  }), document.body),
4154
- m !== void 0 && m.length > 0 && /* @__PURE__ */ E("p", {
4160
+ h !== void 0 && h.length > 0 && /* @__PURE__ */ E("p", {
4155
4161
  className: Bl,
4156
- children: m
4162
+ children: h
4157
4163
  })
4158
4164
  ]
4159
4165
  });
@@ -4380,7 +4386,7 @@ function iu(e) {
4380
4386
  return typeof e == "object" && !!e && !Array.isArray(e);
4381
4387
  }
4382
4388
  function au(e) {
4383
- return typeof e == "string" ? e.trim().length > 0 : !!($e(e) || N(e));
4389
+ return typeof e == "string" ? e.trim().length > 0 : !!($e(e) || P(e));
4384
4390
  }
4385
4391
  function ou(e) {
4386
4392
  return typeof e == "string" && e.trim().length > 0 ? e.trim() : "";
@@ -4421,7 +4427,7 @@ function fu(e) {
4421
4427
  return t.length === 0 ? !1 : t.includes("code=") || t.includes("://") || t.includes("error=") ? !0 : ru.test(t);
4422
4428
  }
4423
4429
  function pu({ field: e, values: t, disabled: n, onAction: r, onChangeMany: i }) {
4424
- let a = A(), [o, s] = w("idle"), [c, u] = w(null), [d, f] = w(null), [p, m] = w(""), [h, g] = w(null), [_, v] = w(!1), [y, b] = w([]), S = x(!1), C = ou(t[e.accountKey]), T = e.secretKeys.some((e) => au(t[e])), O = C.length > 0 || T, k = (e.countKey === void 0 ? null : su(t[e.countKey])) ?? (e.countFromKey === void 0 ? null : su(t[e.countFromKey])), ee = o === "pasting" || !O && c !== null, j = (t) => {
4430
+ let a = A(), [o, s] = w("idle"), [c, u] = w(null), [d, f] = w(null), [p, m] = w(""), [h, g] = w(null), [_, v] = w(!1), [y, b] = w([]), S = x(!1), C = ou(t[e.accountKey]), T = e.secretKeys.some((e) => au(t[e])), O = C.length > 0 || T, k = (e.countKey === void 0 ? null : su(t[e.countKey])) ?? (e.countFromKey === void 0 ? null : su(t[e.countFromKey])), j = o === "pasting" || !O && c !== null, M = (t) => {
4425
4431
  let n = {};
4426
4432
  for (let [r, i] of Object.entries(e.assignResult ?? {})) {
4427
4433
  let e = t[i];
@@ -4432,12 +4438,12 @@ function pu({ field: e, values: t, disabled: n, onAction: r, onChangeMany: i })
4432
4438
  b(r.length > 1 ? r : []);
4433
4439
  let a = typeof t.gatewayId == "string" && t.gatewayId.length > 0, o = typeof t.summary == "string" ? t.summary : null;
4434
4440
  o !== null && !a && r.length < 2 && g(o), s("idle"), m(""), u(null), f(null);
4435
- }, M = e.claimAction;
4441
+ }, N = e.claimAction;
4436
4442
  l(() => {
4437
- if (M === void 0 || c === null || o !== "pasting" || !r) return;
4443
+ if (N === void 0 || c === null || o !== "pasting" || !r) return;
4438
4444
  let t = !1, n = setInterval(() => {
4439
- S.current || r(M, e.key, { attemptId: c }).then((e) => {
4440
- t || !iu(e) || e.pending === !0 || (t = !0, j(e));
4445
+ S.current || r(N, e.key, { attemptId: c }).then((e) => {
4446
+ t || !iu(e) || e.pending === !0 || (t = !0, M(e));
4441
4447
  }).catch((e) => {
4442
4448
  t || (t = !0, g(e instanceof Error ? e.message : String(e)));
4443
4449
  });
@@ -4446,13 +4452,13 @@ function pu({ field: e, values: t, disabled: n, onAction: r, onChangeMany: i })
4446
4452
  t = !0, clearInterval(n);
4447
4453
  };
4448
4454
  }, [
4449
- M,
4455
+ N,
4450
4456
  c,
4451
4457
  o,
4452
4458
  r,
4453
4459
  e.key
4454
4460
  ]);
4455
- let N = async () => {
4461
+ let P = async () => {
4456
4462
  if (!(!r || _)) {
4457
4463
  v(!0), g(null);
4458
4464
  try {
@@ -4472,7 +4478,7 @@ function pu({ field: e, values: t, disabled: n, onAction: r, onChangeMany: i })
4472
4478
  v(!1);
4473
4479
  }
4474
4480
  }
4475
- }, P = async (t) => {
4481
+ }, F = async (t) => {
4476
4482
  if (!(!r || c === null || S.current)) {
4477
4483
  S.current = !0, v(!0), g(null);
4478
4484
  try {
@@ -4484,14 +4490,14 @@ function pu({ field: e, values: t, disabled: n, onAction: r, onChangeMany: i })
4484
4490
  g(a("uiLibrary.accountSignIn.rejected", "The sign-in was not accepted. Start again."));
4485
4491
  return;
4486
4492
  }
4487
- j(n);
4493
+ M(n);
4488
4494
  } catch (e) {
4489
4495
  g(e instanceof Error ? e.message : String(e));
4490
4496
  } finally {
4491
4497
  S.current = !1, v(!1);
4492
4498
  }
4493
4499
  }
4494
- }, F = async () => {
4500
+ }, I = async () => {
4495
4501
  if (!(!r || _)) {
4496
4502
  v(!0), g(null);
4497
4503
  try {
@@ -4506,13 +4512,13 @@ function pu({ field: e, values: t, disabled: n, onAction: r, onChangeMany: i })
4506
4512
  v(!1);
4507
4513
  }
4508
4514
  }
4509
- }, te = (t) => {
4515
+ }, ee = (t) => {
4510
4516
  let n = y.find((e) => e.value === t);
4511
4517
  if (n === void 0 || e.choiceKey === void 0) return;
4512
4518
  let r = { [e.choiceKey]: n.value };
4513
4519
  n.brand !== void 0 && (r.brand = n.brand), n.region !== void 0 && (r.region = n.region), i?.(r);
4514
- }, I = C.length > 0 ? C : a("uiLibrary.accountSignIn.yourAccount", "your account"), L = k === null ? a("uiLibrary.accountSignIn.signedIn", "Signed in as {{account}}", { account: I }) : a("uiLibrary.accountSignIn.signedInCount", "Signed in as {{account}} · {{detail}}", {
4515
- account: I,
4520
+ }, L = C.length > 0 ? C : a("uiLibrary.accountSignIn.yourAccount", "your account"), R = k === null ? a("uiLibrary.accountSignIn.signedIn", "Signed in as {{account}}", { account: L }) : a("uiLibrary.accountSignIn.signedInCount", "Signed in as {{account}} · {{detail}}", {
4521
+ account: L,
4516
4522
  detail: e.countNoun === void 0 ? String(k) : `${k} ${cu(k, e.countNoun)}`
4517
4523
  });
4518
4524
  return /* @__PURE__ */ D("div", {
@@ -4523,7 +4529,7 @@ function pu({ field: e, values: t, disabled: n, onAction: r, onChangeMany: i })
4523
4529
  children: [
4524
4530
  /* @__PURE__ */ E("p", {
4525
4531
  className: "text-xs text-foreground",
4526
- children: L
4532
+ children: R
4527
4533
  }),
4528
4534
  y.length > 1 && e.choiceKey !== void 0 && /* @__PURE__ */ E(Gs, {
4529
4535
  "aria-label": e.choiceLabel ?? a("uiLibrary.accountSignIn.choose", "Choose"),
@@ -4532,7 +4538,7 @@ function pu({ field: e, values: t, disabled: n, onAction: r, onChangeMany: i })
4532
4538
  label: e.label
4533
4539
  })),
4534
4540
  value: uu(t[e.choiceKey]),
4535
- onChange: (e) => te(e.target.value),
4541
+ onChange: (e) => ee(e.target.value),
4536
4542
  disabled: n || _
4537
4543
  }),
4538
4544
  /* @__PURE__ */ D("div", {
@@ -4542,14 +4548,14 @@ function pu({ field: e, values: t, disabled: n, onAction: r, onChangeMany: i })
4542
4548
  variant: "outline",
4543
4549
  size: "sm",
4544
4550
  disabled: n || _,
4545
- onClick: () => void N(),
4551
+ onClick: () => void P(),
4546
4552
  children: a("uiLibrary.accountSignIn.again", "Sign in again")
4547
4553
  }), /* @__PURE__ */ E(W, {
4548
4554
  type: "button",
4549
4555
  variant: "ghost",
4550
4556
  size: "sm",
4551
4557
  disabled: n || _,
4552
- onClick: () => void F(),
4558
+ onClick: () => void I(),
4553
4559
  children: a("uiLibrary.accountSignIn.signOut", "Sign out")
4554
4560
  })]
4555
4561
  })
@@ -4559,10 +4565,10 @@ function pu({ field: e, values: t, disabled: n, onAction: r, onChangeMany: i })
4559
4565
  variant: "primary",
4560
4566
  size: "sm",
4561
4567
  disabled: n || _,
4562
- onClick: () => void N(),
4568
+ onClick: () => void P(),
4563
4569
  children: _ && o !== "pasting" ? a("uiLibrary.accountSignIn.working", "Working…") : a("uiLibrary.accountSignIn.signInWith", "Sign in with {{provider}}", { provider: e.providerLabel })
4564
4570
  }),
4565
- ee && /* @__PURE__ */ D("div", {
4571
+ j && /* @__PURE__ */ D("div", {
4566
4572
  className: "flex flex-col gap-1.5",
4567
4573
  children: [
4568
4574
  d !== null && /* @__PURE__ */ E("a", {
@@ -4572,7 +4578,7 @@ function pu({ field: e, values: t, disabled: n, onAction: r, onChangeMany: i })
4572
4578
  rel: "noopener noreferrer",
4573
4579
  children: a("uiLibrary.accountSignIn.open", "Open the sign-in page")
4574
4580
  }),
4575
- M !== void 0 && /* @__PURE__ */ E("p", {
4581
+ N !== void 0 && /* @__PURE__ */ E("p", {
4576
4582
  className: "text-[11px] text-muted-foreground",
4577
4583
  children: a("uiLibrary.accountSignIn.pasteFallback", "If the page does not finish, paste the address it stops on here.")
4578
4584
  }),
@@ -4584,7 +4590,7 @@ function pu({ field: e, values: t, disabled: n, onAction: r, onChangeMany: i })
4584
4590
  disabled: n || _,
4585
4591
  onChange: (e) => {
4586
4592
  let t = e.target.value;
4587
- m(t), fu(t) && P(t);
4593
+ m(t), fu(t) && F(t);
4588
4594
  }
4589
4595
  })
4590
4596
  ]
@@ -30120,7 +30126,7 @@ function yw(e, t) {
30120
30126
  one: "{{count}} cycle",
30121
30127
  other: "{{count}} cycles"
30122
30128
  }, { count: t.value });
30123
- let n = R({
30129
+ let n = oe({
30124
30130
  value: t.value,
30125
30131
  quantity: "duration",
30126
30132
  precision: 0
@@ -30146,7 +30152,7 @@ function Sw(e) {
30146
30152
  }
30147
30153
  function Cw({ item: e, warn: t, children: n }) {
30148
30154
  return /* @__PURE__ */ E("div", {
30149
- "data-form": P(e),
30155
+ "data-form": F(e),
30150
30156
  className: `flex gap-2.5 rounded-md border p-3 ${t ? "border-warning/40 bg-warning/5" : "border-border-subtle"}`,
30151
30157
  children: n
30152
30158
  });
@@ -30282,7 +30288,7 @@ function Aw({ item: e }) {
30282
30288
  });
30283
30289
  }
30284
30290
  function jw(e) {
30285
- switch (P(e.item)) {
30291
+ switch (F(e.item)) {
30286
30292
  case "part": return /* @__PURE__ */ E(Tw, { ...e });
30287
30293
  case "tank":
30288
30294
  case "bin": return /* @__PURE__ */ E(Ew, { item: e.item });
@@ -31273,7 +31279,7 @@ function mE(e, t) {
31273
31279
  function hE(e) {
31274
31280
  if (e == null || e.length === 0) return;
31275
31281
  let t;
31276
- for (let n of Object.keys(We)) if (!(!oe(n) || tE.has(n)) && We[n] === e) {
31282
+ for (let n of Object.keys(We)) if (!(!ae(n) || tE.has(n)) && We[n] === e) {
31277
31283
  if (t !== void 0) return;
31278
31284
  t = n;
31279
31285
  }
@@ -31287,7 +31293,7 @@ function _E(e) {
31287
31293
  if (e.value === null || !Number.isFinite(e.value)) return t;
31288
31294
  let n = e.quantity === "device" ? void 0 : e.quantity ?? hE(e.unit);
31289
31295
  if (n === void 0) return YT(e.value, e.unit ?? null);
31290
- let r = R({
31296
+ let r = oe({
31291
31297
  value: e.value,
31292
31298
  quantity: n,
31293
31299
  preference: e.preference,
@@ -31702,12 +31708,12 @@ function LE({ optionsKey: e, buildOptions: t, data: n, height: r, onInstance: i,
31702
31708
  //#endregion
31703
31709
  //#region ../ui-library/src/composites/charts/BarSeries.tsx
31704
31710
  S();
31705
- function RE({ title: e, layers: t, buckets: n, bucketMs: r, range: i, unit: a = null, formatValue: o, displayPreference: s, height: c, stacked: l, showTotal: u = !1, syncKey: f, pending: p = !1, emptyMessage: h, actions: g, footer: _, windowToggle: v, compact: y = !1, minBarFraction: b = 0, selectedIndex: S = null, onSelect: C, bucketLabel: T, bucketTestId: k, className: ee }) {
31706
- let j = A(), M = c ?? (y ? 24 : 100), N = l ?? t.length > 1, P = m((e) => (o ?? YT)(e, a), [o, a]), F = d(() => N ? ZT(n, t.length) : t.map((e, t) => n.map((e) => e.values[t] ?? null)), [
31711
+ function RE({ title: e, layers: t, buckets: n, bucketMs: r, range: i, unit: a = null, formatValue: o, displayPreference: s, height: c, stacked: l, showTotal: u = !1, syncKey: f, pending: p = !1, emptyMessage: h, actions: g, footer: _, windowToggle: v, compact: y = !1, minBarFraction: b = 0, selectedIndex: S = null, onSelect: C, bucketLabel: T, bucketTestId: k, className: j }) {
31712
+ let M = A(), N = c ?? (y ? 24 : 100), P = l ?? t.length > 1, F = m((e) => (o ?? YT)(e, a), [o, a]), I = d(() => P ? ZT(n, t.length) : t.map((e, t) => n.map((e) => e.values[t] ?? null)), [
31707
31713
  n,
31708
31714
  t,
31709
- N
31710
- ]), te = d(() => QT(n, t.length), [n, t.length]), [I, L] = w(null), ne = d(() => ({
31715
+ P
31716
+ ]), ee = d(() => QT(n, t.length), [n, t.length]), [L, R] = w(null), te = d(() => ({
31711
31717
  xMin: i.from,
31712
31718
  xMax: i.to,
31713
31719
  stops: n.map((e) => e.t),
@@ -31727,7 +31733,7 @@ function RE({ title: e, layers: t, buckets: n, bucketMs: r, range: i, unit: a =
31727
31733
  });
31728
31734
  },
31729
31735
  onDataX: (e) => {
31730
- L(e === null ? null : oE(n, r, e));
31736
+ R(e === null ? null : oE(n, r, e));
31731
31737
  }
31732
31738
  }), [
31733
31739
  n,
@@ -31736,33 +31742,33 @@ function RE({ title: e, layers: t, buckets: n, bucketMs: r, range: i, unit: a =
31736
31742
  t,
31737
31743
  a,
31738
31744
  s
31739
- ]), re = x({
31745
+ ]), ne = x({
31740
31746
  buckets: n,
31741
- tops: F,
31747
+ tops: I,
31742
31748
  range: i,
31743
31749
  selectedIndex: S,
31744
31750
  onSelect: C,
31745
31751
  bucketLabel: T,
31746
- fmt: P
31752
+ fmt: F
31747
31753
  });
31748
- re.current = {
31754
+ ne.current = {
31749
31755
  buckets: n,
31750
- tops: F,
31756
+ tops: I,
31751
31757
  range: i,
31752
31758
  selectedIndex: S,
31753
31759
  onSelect: C,
31754
31760
  bucketLabel: T,
31755
- fmt: P
31761
+ fmt: F
31756
31762
  };
31757
- let ie = `${t.map((e) => `${e.id}:${e.colorIndex}`).join(",")}#${y ? "C" : ""}#${N ? "S" : ""}#${f ?? ""}#${String(r)}`, ae = d(() => {
31758
- let e = F.at(-1) ?? [], t = N ? e : n.map((e, t) => Math.max(...F.map((e) => e[t] ?? 0)));
31763
+ let re = `${t.map((e) => `${e.id}:${e.colorIndex}`).join(",")}#${y ? "C" : ""}#${P ? "S" : ""}#${f ?? ""}#${String(r)}`, ie = d(() => {
31764
+ let e = I.at(-1) ?? [], t = P ? e : n.map((e, t) => Math.max(...I.map((e) => e[t] ?? 0)));
31759
31765
  return [n.map((e) => e.t), t.map((e) => e ?? null)];
31760
31766
  }, [
31761
31767
  n,
31762
- F,
31763
- N,
31768
+ I,
31769
+ P,
31764
31770
  S
31765
- ]), oe = m(() => {
31771
+ ]), ae = m(() => {
31766
31772
  let e = { floor: 0 };
31767
31773
  return {
31768
31774
  ms: 1,
@@ -31781,7 +31787,7 @@ function RE({ title: e, layers: t, buckets: n, bucketMs: r, range: i, unit: a =
31781
31787
  scales: {
31782
31788
  x: {
31783
31789
  time: !0,
31784
- range: () => [re.current.range.from, re.current.range.to]
31790
+ range: () => [ne.current.range.from, ne.current.range.to]
31785
31791
  },
31786
31792
  y: { range: (t) => {
31787
31793
  let n = zT([...t.data[1] ?? []], e);
@@ -31794,8 +31800,8 @@ function RE({ title: e, layers: t, buckets: n, bucketMs: r, range: i, unit: a =
31794
31800
  }, {
31795
31801
  show: !1,
31796
31802
  scale: "y"
31797
- }] : [RT(() => re.current.range.to - re.current.range.from), {
31798
- ...HT("y", 3, (e) => re.current.fmt(e), !0),
31803
+ }] : [RT(() => ne.current.range.to - ne.current.range.from), {
31804
+ ...HT("y", 3, (e) => ne.current.fmt(e), !0),
31799
31805
  splits: (t, n, r, i) => VT([r, i], e)
31800
31806
  }],
31801
31807
  series: [{}, {
@@ -31810,48 +31816,48 @@ function RE({ title: e, layers: t, buckets: n, bucketMs: r, range: i, unit: a =
31810
31816
  },
31811
31817
  hooks: {
31812
31818
  draw: [(e) => {
31813
- let { buckets: n, tops: i, selectedIndex: a } = re.current, o = e.ctx, s = e.valToPos(0, "y", !0), c = b * e.bbox.height, l = Math.max(1, Math.round(devicePixelRatio));
31819
+ let { buckets: n, tops: i, selectedIndex: a } = ne.current, o = e.ctx, s = e.valToPos(0, "y", !0), c = b * e.bbox.height, l = Math.max(1, Math.round(devicePixelRatio));
31814
31820
  o.save(), n.forEach((n, u) => {
31815
31821
  let d = e.valToPos(n.t, "x", !0), f = e.valToPos(n.t + r, "x", !0), p = Math.max(1, f - d - l), m = s;
31816
31822
  t.forEach((n, r) => {
31817
31823
  let a = i[r]?.[u];
31818
- if (a == null || !(a > (N && r > 0 ? i[r - 1]?.[u] ?? 0 : 0))) return;
31819
- let f = e.valToPos(a, "y", !0), h = N ? m : s;
31824
+ if (a == null || !(a > (P && r > 0 ? i[r - 1]?.[u] ?? 0 : 0))) return;
31825
+ let f = e.valToPos(a, "y", !0), h = P ? m : s;
31820
31826
  r === t.length - 1 && s - f < c && (f = s - c), o.fillStyle = dT(oT(n.colorIndex).token);
31821
- let g = Math.max(1, h - f - (N && r > 0 ? l : 0));
31827
+ let g = Math.max(1, h - f - (P && r > 0 ? l : 0));
31822
31828
  o.fillRect(d, f, p, g), m = f;
31823
31829
  }), a === u && (o.strokeStyle = dT("primary"), o.lineWidth = l * 1.5, o.strokeRect(d, e.bbox.top + l, p, e.bbox.height - 2 * l));
31824
31830
  }), o.restore();
31825
31831
  }],
31826
31832
  setCursor: [(e) => {
31827
- let t = e.cursor.left ?? -1, n = t < 0 ? null : $T(re.current.buckets, r, e.posToVal(t, "x"));
31828
- L(n);
31829
- let i = n === null ? void 0 : re.current.buckets[n], a = i === void 0 || n === null ? "" : re.current.bucketLabel?.(i, n) ?? "";
31833
+ let t = e.cursor.left ?? -1, n = t < 0 ? null : $T(ne.current.buckets, r, e.posToVal(t, "x"));
31834
+ R(n);
31835
+ let i = n === null ? void 0 : ne.current.buckets[n], a = i === void 0 || n === null ? "" : ne.current.bucketLabel?.(i, n) ?? "";
31830
31836
  e.over.title = a;
31831
31837
  }],
31832
31838
  ready: [(e) => {
31833
31839
  e.over.addEventListener("click", () => {
31834
31840
  let t = e.cursor.left ?? -1;
31835
31841
  if (t < 0) return;
31836
- let n = $T(re.current.buckets, r, e.posToVal(t, "x"));
31837
- n !== null && re.current.onSelect?.(n);
31842
+ let n = $T(ne.current.buckets, r, e.posToVal(t, "x"));
31843
+ n !== null && ne.current.onSelect?.(n);
31838
31844
  });
31839
31845
  }]
31840
31846
  }
31841
31847
  };
31842
- }, [ie, b]), R = i.to - i.from, se = I === null ? void 0 : n[I], ce = t.map((e, t) => {
31843
- let n = se ? se.values[t] : te.known ? te.perLayer[t] : void 0;
31848
+ }, [re, b]), oe = i.to - i.from, se = L === null ? void 0 : n[L], ce = t.map((e, t) => {
31849
+ let n = se ? se.values[t] : ee.known ? ee.perLayer[t] : void 0;
31844
31850
  return {
31845
31851
  id: e.id,
31846
31852
  label: e.label,
31847
31853
  token: oT(e.colorIndex).token,
31848
- value: n == null ? se ? "—" : void 0 : P(n)
31854
+ value: n == null ? se ? "—" : void 0 : F(n)
31849
31855
  };
31850
- }), le = j("uiLibrary.charts.barSummary", "{{title}}, {{from}} to {{to}}: total {{total}}", {
31856
+ }), le = M("uiLibrary.charts.barSummary", "{{title}}, {{from}} to {{to}}: total {{total}}", {
31851
31857
  title: e,
31852
- from: TT(i.from, R),
31853
- to: TT(i.to, R),
31854
- total: te.known ? P(te.total) : j("uiLibrary.charts.unknown", "unknown")
31858
+ from: TT(i.from, oe),
31859
+ to: TT(i.to, oe),
31860
+ total: ee.known ? F(ee.total) : M("uiLibrary.charts.unknown", "unknown")
31855
31861
  }), ue = C === void 0 ? null : /* @__PURE__ */ E("div", {
31856
31862
  className: "sr-only",
31857
31863
  children: n.map((e, t) => {
@@ -31861,27 +31867,27 @@ function RE({ title: e, layers: t, buckets: n, bucketMs: r, range: i, unit: a =
31861
31867
  "data-testid": k,
31862
31868
  "aria-pressed": S === t,
31863
31869
  onClick: () => C(t),
31864
- children: T?.(e, t) ?? `${TT(e.t, R)} ${P(n)}`
31870
+ children: T?.(e, t) ?? `${TT(e.t, oe)} ${F(n)}`
31865
31871
  }, e.t);
31866
31872
  })
31867
31873
  }), de = /* @__PURE__ */ E(LE, {
31868
- optionsKey: ie,
31869
- buildOptions: oe,
31870
- data: ae,
31871
- height: M,
31872
- tooltip: ne,
31874
+ optionsKey: re,
31875
+ buildOptions: ae,
31876
+ data: ie,
31877
+ height: N,
31878
+ tooltip: te,
31873
31879
  kind: "bars",
31874
31880
  label: e
31875
31881
  });
31876
31882
  if (y) return /* @__PURE__ */ D("div", {
31877
- className: U("relative min-w-0", ee),
31883
+ className: U("relative min-w-0", j),
31878
31884
  children: [/* @__PURE__ */ E("div", {
31879
31885
  role: "img",
31880
31886
  "aria-label": le,
31881
31887
  children: de
31882
31888
  }), ue]
31883
31889
  });
31884
- let fe = u && te.known ? j("uiLibrary.charts.total", "Total {{value}}", { value: P(te.total) }) : null, pe = !te.known, me = M <= 64 ? "sm" : M <= 120 ? "md" : "lg";
31890
+ let fe = u && ee.known ? M("uiLibrary.charts.total", "Total {{value}}", { value: F(ee.total) }) : null, pe = !ee.known, me = N <= 64 ? "sm" : N <= 120 ? "md" : "lg";
31885
31891
  return /* @__PURE__ */ E(mT, {
31886
31892
  title: e,
31887
31893
  actions: /* @__PURE__ */ D(O, { children: [
@@ -31892,19 +31898,19 @@ function RE({ title: e, layers: t, buckets: n, bucketMs: r, range: i, unit: a =
31892
31898
  v && /* @__PURE__ */ E(XT, { ...v }),
31893
31899
  g
31894
31900
  ] }),
31895
- readoutTime: se ? ET(se.t, R) : null,
31901
+ readoutTime: se ? ET(se.t, oe) : null,
31896
31902
  legend: t.length > 1 || se ? ce : [],
31897
31903
  summary: le,
31898
31904
  footer: _,
31899
31905
  placeholder: p ? /* @__PURE__ */ E(vT, {
31900
- message: j("uiLibrary.charts.loading", "Loading…"),
31906
+ message: M("uiLibrary.charts.loading", "Loading…"),
31901
31907
  height: me
31902
31908
  }) : pe ? /* @__PURE__ */ E(vT, {
31903
- message: h ?? j("uiLibrary.charts.empty", "Nothing was recorded in this window."),
31909
+ message: h ?? M("uiLibrary.charts.empty", "Nothing was recorded in this window."),
31904
31910
  height: me
31905
31911
  }) : void 0,
31906
31912
  controls: ue,
31907
- className: ee,
31913
+ className: j,
31908
31914
  children: de
31909
31915
  });
31910
31916
  }
@@ -32193,7 +32199,7 @@ function eD({ deviceId: e, clip: t, profile: n, onProfileChange: r }) {
32193
32199
  className: "space-y-2",
32194
32200
  children: [s.served === void 0 || s.served === n ? null : /* @__PURE__ */ E(rT, {
32195
32201
  variant: "warning",
32196
- message: /* @__PURE__ */ E(ee, {
32202
+ message: /* @__PURE__ */ E(j, {
32197
32203
  uiKey: "uiLibrary.clipPanel.servedFallback",
32198
32204
  fallback: "Served the <0>{{served}}</0> stream — this clip has no {{profile}} twin.",
32199
32205
  components: [/* @__PURE__ */ E("strong", {}, "served")],
@@ -32293,8 +32299,8 @@ function cD(e, t) {
32293
32299
  let n = e.headers.get("retry-after"), r = n === null ? NaN : Number(n);
32294
32300
  return {
32295
32301
  code: e.headers.get(ce) ?? void 0,
32296
- reason: e.headers.get(M) ?? t("uiLibrary.clipThumbnail.noReason", "no reason given"),
32297
- disposition: e.headers.get(F) ?? void 0,
32302
+ reason: e.headers.get(N) ?? t("uiLibrary.clipThumbnail.noReason", "no reason given"),
32303
+ disposition: e.headers.get(I) ?? void 0,
32298
32304
  retryAfterMs: Number.isFinite(r) && r > 0 ? r * 1e3 : null
32299
32305
  };
32300
32306
  }
@@ -32622,24 +32628,24 @@ function PD({ deviceId: e }) {
32622
32628
  ]), C = o === null ? void 0 : S.find((e) => e.index === o), T = d(() => TD(i, C === void 0 ? null : {
32623
32629
  startMs: C.startMs,
32624
32630
  endMs: C.endMs
32625
- }), [i, C]), k = wD(T), ee = Vc({ deviceId: e }), j = ee.data ?? [], M = d(() => c === "" ? j.find((e) => e.addonId !== void 0)?.addonId ?? "" : c, [c, j]), N = Bc({
32631
+ }), [i, C]), k = wD(T), j = Vc({ deviceId: e }), M = j.data ?? [], N = d(() => c === "" ? M.find((e) => e.addonId !== void 0)?.addonId ?? "" : c, [c, M]), P = Bc({
32626
32632
  deviceId: e,
32627
32633
  since: T.fromMs,
32628
32634
  until: T.toMs,
32629
32635
  limit: jD,
32630
- provider: M
32631
- }, { enabled: k.kind === "askable" && M !== "" }), P = AD({
32636
+ provider: N
32637
+ }, { enabled: k.kind === "askable" && N !== "" }), F = AD({
32632
32638
  plan: k,
32633
- provider: M === "" ? null : M,
32634
- clipsStatus: N.status,
32635
- clips: N.data ?? [],
32636
- sourcesStatus: ee.status,
32637
- sources: j,
32638
- ...N.error ? { clipsError: N.error.message } : {},
32639
- ...ee.error ? { sourcesError: ee.error.message } : {}
32640
- }, t), F = d(() => {
32639
+ provider: N === "" ? null : N,
32640
+ clipsStatus: P.status,
32641
+ clips: P.data ?? [],
32642
+ sourcesStatus: j.status,
32643
+ sources: M,
32644
+ ...P.error ? { clipsError: P.error.message } : {},
32645
+ ...j.error ? { sourcesError: j.error.message } : {}
32646
+ }, t), I = d(() => {
32641
32647
  let e = /* @__PURE__ */ new Map();
32642
- for (let t of j) {
32648
+ for (let t of M) {
32643
32649
  let n = t.addonId;
32644
32650
  if (n === void 0) continue;
32645
32651
  let r = e.get(n);
@@ -32649,17 +32655,17 @@ function PD({ deviceId: e }) {
32649
32655
  value: e,
32650
32656
  label: t.join(" · ")
32651
32657
  }));
32652
- }, [j]);
32658
+ }, [M]);
32653
32659
  l(() => {
32654
32660
  p(1);
32655
32661
  }, [T.fromMs, T.toMs]);
32656
- let te = (e) => {
32662
+ let ee = (e) => {
32657
32663
  r(e), a(Gw(e, Date.now())), s(null);
32658
- }, I = (e) => {
32659
- a(e), s(null);
32660
32664
  }, L = (e) => {
32665
+ a(e), s(null);
32666
+ }, R = (e) => {
32661
32667
  s((t) => t === e ? null : e);
32662
- }, ne = (e) => {
32668
+ }, te = (e) => {
32663
32669
  u(e), p(1);
32664
32670
  };
32665
32671
  if (v === "pending") return /* @__PURE__ */ D("div", {
@@ -32683,7 +32689,7 @@ function PD({ deviceId: e }) {
32683
32689
  description: t("uiLibrary.clipsSection.absentDescription", "Nothing is installed that could list a camera's stored clips.")
32684
32690
  })
32685
32691
  });
32686
- let re = P.kind === "listed" ? P.clips : [], ie = re.slice((f - 1) * MD, f * MD);
32692
+ let ne = F.kind === "listed" ? F.clips : [], re = ne.slice((f - 1) * MD, f * MD);
32687
32693
  return /* @__PURE__ */ D("div", {
32688
32694
  className: "space-y-3",
32689
32695
  children: [
@@ -32713,13 +32719,13 @@ function PD({ deviceId: e }) {
32713
32719
  className: "w-60",
32714
32720
  children: /* @__PURE__ */ E(Gs, {
32715
32721
  id: "clips-provider",
32716
- options: F,
32717
- value: M,
32718
- disabled: F.length < 2,
32719
- onChange: (e) => ne(e.target.value)
32722
+ options: I,
32723
+ value: N,
32724
+ disabled: I.length < 2,
32725
+ onChange: (e) => te(e.target.value)
32720
32726
  })
32721
32727
  }),
32722
- F.length < 2 ? /* @__PURE__ */ E("span", {
32728
+ I.length < 2 ? /* @__PURE__ */ E("span", {
32723
32729
  className: "text-[11px] text-foreground-subtle",
32724
32730
  children: t("uiLibrary.clipsSection.oneProvider", "This camera is bound to one clip provider today.")
32725
32731
  }) : null,
@@ -32738,45 +32744,45 @@ function PD({ deviceId: e }) {
32738
32744
  }),
32739
32745
  /* @__PURE__ */ E(JE, {
32740
32746
  day: n,
32741
- onDayChange: te,
32747
+ onDayChange: ee,
32742
32748
  view: i,
32743
32749
  dayBounds: y,
32744
- onViewChange: I,
32750
+ onViewChange: L,
32745
32751
  buckets: S,
32746
32752
  selectedBucketIndex: o,
32747
- onSelectBucket: L,
32753
+ onSelectBucket: R,
32748
32754
  densityLoading: x.status === "pending"
32749
32755
  }),
32750
32756
  /* @__PURE__ */ E("section", {
32751
32757
  "aria-label": t("uiLibrary.clipsSection.clips", "Clips"),
32752
32758
  className: "space-y-2",
32753
- children: P.kind === "refused" ? /* @__PURE__ */ E(rT, {
32759
+ children: F.kind === "refused" ? /* @__PURE__ */ E(rT, {
32754
32760
  variant: "warning",
32755
32761
  title: t("uiLibrary.clipsSection.tooWideTitle", "That period is too wide to list"),
32756
32762
  message: t("uiLibrary.clipsSection.tooWideMessage", "{{band}} covers {{days}} local days, and a clip listing is asked one local day at a time — at most {{max}}. Nothing was asked for; narrow the band and the list follows it.", {
32757
- band: DD(P.band),
32758
- days: P.localDays,
32759
- max: P.maxLocalDays
32763
+ band: DD(F.band),
32764
+ days: F.localDays,
32765
+ max: F.maxLocalDays
32760
32766
  })
32761
- }) : P.kind === "loading" ? /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("div", {
32767
+ }) : F.kind === "loading" ? /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("div", {
32762
32768
  role: "status",
32763
32769
  className: "text-xs text-foreground-subtle",
32764
32770
  children: t("uiLibrary.clipsSection.loadingFor", "Loading clips for {{band}}…", { band: DD(T) })
32765
- }), /* @__PURE__ */ E(vw, { className: "h-24 w-full" })] }) : P.kind === "failed" ? /* @__PURE__ */ E(rT, {
32771
+ }), /* @__PURE__ */ E(vw, { className: "h-24 w-full" })] }) : F.kind === "failed" ? /* @__PURE__ */ E(rT, {
32766
32772
  title: t("uiLibrary.clipsSection.listFailed", "The clip list could not be read"),
32767
- message: P.message
32768
- }) : P.kind === "empty" ? /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("div", {
32773
+ message: F.message
32774
+ }) : F.kind === "empty" ? /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("div", {
32769
32775
  role: "status",
32770
32776
  children: /* @__PURE__ */ E(tT, {
32771
32777
  icon: jr,
32772
- title: P.nobodyAnswered ? t("uiLibrary.clipsSection.noSourceAnswered", "No source could answer for {{band}}", { band: DD(P.band) }) : t("uiLibrary.clipsSection.noClips", "No clips in {{band}}", { band: DD(P.band) }),
32773
- ...P.nobodyAnswered ? {} : { description: t("uiLibrary.clipsSection.asked", "Asked {{sources}}.", { sources: P.answered.map((e) => e.label).join(", ") }) }
32778
+ title: F.nobodyAnswered ? t("uiLibrary.clipsSection.noSourceAnswered", "No source could answer for {{band}}", { band: DD(F.band) }) : t("uiLibrary.clipsSection.noClips", "No clips in {{band}}", { band: DD(F.band) }),
32779
+ ...F.nobodyAnswered ? {} : { description: t("uiLibrary.clipsSection.asked", "Asked {{sources}}.", { sources: F.answered.map((e) => e.label).join(", ") }) }
32774
32780
  })
32775
- }), /* @__PURE__ */ E(ND, { silent: P.silent })] }) : /* @__PURE__ */ D(O, { children: [
32776
- /* @__PURE__ */ E(ND, { silent: P.silent }),
32781
+ }), /* @__PURE__ */ E(ND, { silent: F.silent })] }) : /* @__PURE__ */ D(O, { children: [
32782
+ /* @__PURE__ */ E(ND, { silent: F.silent }),
32777
32783
  /* @__PURE__ */ E("ul", {
32778
32784
  className: "grid grid-cols-1 gap-2 sm:grid-cols-2 xl:grid-cols-3",
32779
- children: ie.map((e) => /* @__PURE__ */ E(gD, {
32785
+ children: re.map((e) => /* @__PURE__ */ E(gD, {
32780
32786
  clip: e,
32781
32787
  selected: m?.id === e.id,
32782
32788
  onSelect: h
@@ -32784,7 +32790,7 @@ function PD({ deviceId: e }) {
32784
32790
  }),
32785
32791
  /* @__PURE__ */ E(eT, {
32786
32792
  currentPage: f,
32787
- totalItems: re.length,
32793
+ totalItems: ne.length,
32788
32794
  pageSize: MD,
32789
32795
  onPageChange: p,
32790
32796
  itemNoun: t("uiLibrary.clipsSection.itemNoun", "clips")
@@ -33003,7 +33009,7 @@ function eO({ deviceId: e, row: t, onSaved: n, readOnly: r = !1 }) {
33003
33009
  m(LD(p, e, a.cardinality)), g(GD(h, e, l));
33004
33010
  }, k = () => {
33005
33011
  m(o), g(s ?? []), b(null), f(!0);
33006
- }, ee = async () => {
33012
+ }, j = async () => {
33007
33013
  b(null);
33008
33014
  try {
33009
33015
  await S.mutateAsync({
@@ -33158,7 +33164,7 @@ function eO({ deviceId: e, row: t, onSaved: n, readOnly: r = !1 }) {
33158
33164
  }), /* @__PURE__ */ E(W, {
33159
33165
  size: "sm",
33160
33166
  disabled: !(BD(o, p) || s !== void 0 && UD(s, h)) || S.isPending,
33161
- onClick: () => void ee(),
33167
+ onClick: () => void j(),
33162
33168
  children: i("uiLibrary.associationSlotCard.save", "Save")
33163
33169
  })]
33164
33170
  })
@@ -33910,13 +33916,13 @@ function _O({ direction: e, icon: t, disabled: n, className: r, variant: i, onMo
33910
33916
  });
33911
33917
  }
33912
33918
  function vO({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0, showHome: i = !0, className: a }) {
33913
- let o = A(), { move: s, startContinuous: c, stopContinuous: u, zoom: d, goHome: p, homePreset: h, goToPreset: g, savePreset: _, updatePreset: v, deletePreset: y, presets: b, options: S, busy: C, error: T } = e, k = Wi(), [ee, j] = w(!1), [M, N] = w(""), P = x(null), F = x(null), [te, I] = w(null), L = t === "panel", ne = r && (S?.hasZoom ?? !0), re = S?.supportsPresets ?? b.length > 0, ie = (n ?? re) && re, ae = L && (S?.supportsPresets ?? !1), oe = S?.maxPresets !== void 0 && b.length >= S.maxPresets, R = m(async () => {
33914
- let e = M.trim();
33915
- !e || C || oe || await _(e) !== void 0 && N("");
33919
+ let o = A(), { move: s, startContinuous: c, stopContinuous: u, zoom: d, goHome: p, homePreset: h, goToPreset: g, savePreset: _, updatePreset: v, deletePreset: y, presets: b, options: S, busy: C, error: T } = e, k = Wi(), [j, M] = w(!1), [N, P] = w(""), F = x(null), I = x(null), [ee, L] = w(null), R = t === "panel", te = r && (S?.hasZoom ?? !0), ne = S?.supportsPresets ?? b.length > 0, re = (n ?? ne) && ne, ie = R && (S?.supportsPresets ?? !1), ae = S?.maxPresets !== void 0 && b.length >= S.maxPresets, oe = m(async () => {
33920
+ let e = N.trim();
33921
+ !e || C || ae || await _(e) !== void 0 && P("");
33916
33922
  }, [
33917
- M,
33923
+ N,
33918
33924
  C,
33919
- oe,
33925
+ ae,
33920
33926
  _
33921
33927
  ]), se = m(async (e, t) => {
33922
33928
  await k({
@@ -33941,13 +33947,13 @@ function vO({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
33941
33947
  o
33942
33948
  ]);
33943
33949
  f(() => {
33944
- if (!ee) {
33945
- I(null);
33950
+ if (!j) {
33951
+ L(null);
33946
33952
  return;
33947
33953
  }
33948
33954
  let e = () => {
33949
- let e = P.current?.getBoundingClientRect();
33950
- e && I({
33955
+ let e = F.current?.getBoundingClientRect();
33956
+ e && L({
33951
33957
  top: e.bottom + 4,
33952
33958
  right: window.innerWidth - e.right
33953
33959
  });
@@ -33955,33 +33961,33 @@ function vO({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
33955
33961
  return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
33956
33962
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
33957
33963
  };
33958
- }, [ee]), l(() => {
33959
- if (!ee) return;
33964
+ }, [j]), l(() => {
33965
+ if (!j) return;
33960
33966
  let e = (e) => {
33961
33967
  let t = e.target;
33962
- F.current?.contains(t) || P.current?.contains(t) || j(!1);
33968
+ I.current?.contains(t) || F.current?.contains(t) || M(!1);
33963
33969
  }, t = (e) => {
33964
- e.key === "Escape" && j(!1);
33970
+ e.key === "Escape" && M(!1);
33965
33971
  };
33966
33972
  return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
33967
33973
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
33968
33974
  };
33969
- }, [ee]);
33970
- let le = L ? "flex flex-col items-stretch gap-2 w-full h-full p-3" : "pointer-events-auto absolute top-3 right-3 z-10 flex flex-col items-end gap-2", ue = U(L ? "flex items-center gap-3 rounded-lg p-2" : "flex items-center gap-2 rounded-lg border border-white/30 bg-zinc-900/90 backdrop-blur-md p-2 shadow-lg shadow-black/40", C && "ring-1 ring-primary/40"), de = L ? "h-9 w-9" : "h-7 w-7", fe = L ? "h-4 w-4" : "h-3.5 w-3.5", pe = L ? "text-foreground hover:bg-surface-hover" : "text-white hover:bg-white/15", me = L ? "h-12 w-px bg-border mx-1" : "h-12 w-px bg-white/15 mx-1";
33975
+ }, [j]);
33976
+ let le = R ? "flex flex-col items-stretch gap-2 w-full h-full p-3" : "pointer-events-auto absolute top-3 right-3 z-10 flex flex-col items-end gap-2", ue = U(R ? "flex items-center gap-3 rounded-lg p-2" : "flex items-center gap-2 rounded-lg border border-white/30 bg-zinc-900/90 backdrop-blur-md p-2 shadow-lg shadow-black/40", C && "ring-1 ring-primary/40"), de = R ? "h-9 w-9" : "h-7 w-7", fe = R ? "h-4 w-4" : "h-3.5 w-3.5", pe = R ? "text-foreground hover:bg-surface-hover" : "text-white hover:bg-white/15", me = R ? "h-12 w-px bg-border mx-1" : "h-12 w-px bg-white/15 mx-1";
33971
33977
  return /* @__PURE__ */ D("div", {
33972
33978
  className: U(le, a),
33973
33979
  children: [T && /* @__PURE__ */ E("div", {
33974
33980
  className: "rounded bg-danger/90 px-2 py-1 text-[10px] font-medium text-white shadow-lg max-w-[200px] self-center",
33975
33981
  children: o("uiLibrary.ptzOverlay.error", "PTZ: {{error}}", { error: T })
33976
33982
  }), /* @__PURE__ */ D("div", {
33977
- className: U(ue, L && "justify-center"),
33983
+ className: U(ue, R && "justify-center"),
33978
33984
  children: [
33979
33985
  /* @__PURE__ */ D("div", {
33980
33986
  className: "grid grid-cols-3 gap-0.5",
33981
33987
  children: [
33982
33988
  /* @__PURE__ */ E("span", {
33983
33989
  "aria-hidden": !0,
33984
- className: L ? "h-9 w-9" : "h-7 w-7"
33990
+ className: R ? "h-9 w-9" : "h-7 w-7"
33985
33991
  }),
33986
33992
  /* @__PURE__ */ E(_O, {
33987
33993
  direction: "up",
@@ -33993,7 +33999,7 @@ function vO({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
33993
33999
  }),
33994
34000
  /* @__PURE__ */ E("span", {
33995
34001
  "aria-hidden": !0,
33996
- className: L ? "h-9 w-9" : "h-7 w-7"
34002
+ className: R ? "h-9 w-9" : "h-7 w-7"
33997
34003
  }),
33998
34004
  /* @__PURE__ */ E(_O, {
33999
34005
  direction: "left",
@@ -34005,7 +34011,7 @@ function vO({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
34005
34011
  }),
34006
34012
  /* @__PURE__ */ E("span", {
34007
34013
  "aria-hidden": !0,
34008
- className: L ? "h-9 w-9" : "h-7 w-7"
34014
+ className: R ? "h-9 w-9" : "h-7 w-7"
34009
34015
  }),
34010
34016
  /* @__PURE__ */ E(_O, {
34011
34017
  direction: "right",
@@ -34017,7 +34023,7 @@ function vO({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
34017
34023
  }),
34018
34024
  /* @__PURE__ */ E("span", {
34019
34025
  "aria-hidden": !0,
34020
- className: L ? "h-9 w-9" : "h-7 w-7"
34026
+ className: R ? "h-9 w-9" : "h-7 w-7"
34021
34027
  }),
34022
34028
  /* @__PURE__ */ E(_O, {
34023
34029
  direction: "down",
@@ -34029,14 +34035,14 @@ function vO({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
34029
34035
  }),
34030
34036
  /* @__PURE__ */ E("span", {
34031
34037
  "aria-hidden": !0,
34032
- className: L ? "h-9 w-9" : "h-7 w-7"
34038
+ className: R ? "h-9 w-9" : "h-7 w-7"
34033
34039
  })
34034
34040
  ]
34035
34041
  }),
34036
- (ne || i) && /* @__PURE__ */ E("div", { className: me }),
34042
+ (te || i) && /* @__PURE__ */ E("div", { className: me }),
34037
34043
  /* @__PURE__ */ D("div", {
34038
34044
  className: "flex flex-col gap-0.5",
34039
- children: [ne && /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("button", {
34045
+ children: [te && /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("button", {
34040
34046
  type: "button",
34041
34047
  onClick: () => d("in"),
34042
34048
  disabled: C,
@@ -34059,41 +34065,41 @@ function vO({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
34059
34065
  children: /* @__PURE__ */ E(Kr, { className: fe })
34060
34066
  })]
34061
34067
  }),
34062
- ie && /* @__PURE__ */ D("div", {
34068
+ re && /* @__PURE__ */ D("div", {
34063
34069
  className: "relative",
34064
34070
  children: [/* @__PURE__ */ D("button", {
34065
- ref: P,
34071
+ ref: F,
34066
34072
  type: "button",
34067
- onClick: () => j((e) => !e),
34073
+ onClick: () => M((e) => !e),
34068
34074
  disabled: C,
34069
- className: U("flex items-center gap-1 rounded px-2 text-[10px] disabled:opacity-40", L ? "h-9 text-foreground hover:bg-surface-hover" : "h-7 text-white hover:bg-white/15"),
34075
+ className: U("flex items-center gap-1 rounded px-2 text-[10px] disabled:opacity-40", R ? "h-9 text-foreground hover:bg-surface-hover" : "h-7 text-white hover:bg-white/15"),
34070
34076
  title: o("uiLibrary.ptzOverlay.presets", "Presets"),
34071
- children: [o("uiLibrary.ptzOverlay.presets", "Presets"), /* @__PURE__ */ E(_i, { className: U("h-3 w-3 transition-transform", ee && "rotate-180") })]
34072
- }), ee && te && Hi(/* @__PURE__ */ D("div", {
34073
- ref: F,
34077
+ children: [o("uiLibrary.ptzOverlay.presets", "Presets"), /* @__PURE__ */ E(_i, { className: U("h-3 w-3 transition-transform", j && "rotate-180") })]
34078
+ }), j && ee && Hi(/* @__PURE__ */ D("div", {
34079
+ ref: I,
34074
34080
  style: {
34075
34081
  position: "fixed",
34076
- top: te.top,
34077
- right: te.right,
34082
+ top: ee.top,
34083
+ right: ee.right,
34078
34084
  zIndex: 60
34079
34085
  },
34080
- className: U("rounded-lg shadow-xl py-1", ae ? "min-w-[220px]" : "min-w-[140px]", L ? "bg-surface border border-border" : "border border-white/30 bg-zinc-900/95 backdrop-blur-md"),
34086
+ className: U("rounded-lg shadow-xl py-1", ie ? "min-w-[220px]" : "min-w-[140px]", R ? "bg-surface border border-border" : "border border-white/30 bg-zinc-900/95 backdrop-blur-md"),
34081
34087
  children: [
34082
34088
  b.length === 0 && /* @__PURE__ */ E("div", {
34083
- className: U("px-3 py-1.5 text-[10px]", L ? "text-foreground-subtle" : "text-white/60"),
34089
+ className: U("px-3 py-1.5 text-[10px]", R ? "text-foreground-subtle" : "text-white/60"),
34084
34090
  children: o("uiLibrary.ptzOverlay.noPresets", "No presets yet")
34085
34091
  }),
34086
34092
  b.map((e) => /* @__PURE__ */ D("div", {
34087
- className: U("group flex items-center", L ? "hover:bg-surface-hover" : "hover:bg-white/15"),
34093
+ className: U("group flex items-center", R ? "hover:bg-surface-hover" : "hover:bg-white/15"),
34088
34094
  children: [/* @__PURE__ */ E("button", {
34089
34095
  type: "button",
34090
34096
  onClick: () => {
34091
- g(e.id), j(!1);
34097
+ g(e.id), M(!1);
34092
34098
  },
34093
34099
  disabled: C,
34094
- className: U("flex-1 px-3 py-1.5 text-left text-[10px] disabled:opacity-40", L ? "text-foreground" : "text-white"),
34100
+ className: U("flex-1 px-3 py-1.5 text-left text-[10px] disabled:opacity-40", R ? "text-foreground" : "text-white"),
34095
34101
  children: e.name || e.id
34096
- }), ae && e.writable && /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("button", {
34102
+ }), ie && e.writable && /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("button", {
34097
34103
  type: "button",
34098
34104
  onClick: () => void ce(e.id, e.name || e.id),
34099
34105
  disabled: C,
@@ -34109,32 +34115,32 @@ function vO({ controls: e, mode: t = "overlay", showPresets: n, showZoom: r = !0
34109
34115
  children: /* @__PURE__ */ E(ir, { className: "h-3 w-3" })
34110
34116
  })] })]
34111
34117
  }, e.id)),
34112
- ae && /* @__PURE__ */ D(O, { children: [
34113
- b.length > 0 && /* @__PURE__ */ E("div", { className: U("my-1 h-px", L ? "bg-border" : "bg-white/15") }),
34118
+ ie && /* @__PURE__ */ D(O, { children: [
34119
+ b.length > 0 && /* @__PURE__ */ E("div", { className: U("my-1 h-px", R ? "bg-border" : "bg-white/15") }),
34114
34120
  /* @__PURE__ */ D("div", {
34115
34121
  className: "flex items-center gap-1 px-2 py-1",
34116
34122
  children: [/* @__PURE__ */ E("input", {
34117
34123
  type: "text",
34118
- value: M,
34119
- onChange: (e) => N(e.target.value),
34124
+ value: N,
34125
+ onChange: (e) => P(e.target.value),
34120
34126
  onKeyDown: (e) => {
34121
- e.key === "Enter" && R();
34127
+ e.key === "Enter" && oe();
34122
34128
  },
34123
- disabled: C || oe,
34129
+ disabled: C || ae,
34124
34130
  placeholder: o("uiLibrary.ptzOverlay.newPreset", "New preset name"),
34125
34131
  maxLength: 64,
34126
- className: U("min-w-0 flex-1 rounded border px-2 py-1 text-[11px]", "focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-40", L ? "border-border bg-surface text-foreground placeholder:text-foreground-subtle" : "border-white/30 bg-zinc-800 text-white placeholder:text-white/40")
34132
+ className: U("min-w-0 flex-1 rounded border px-2 py-1 text-[11px]", "focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-40", R ? "border-border bg-surface text-foreground placeholder:text-foreground-subtle" : "border-white/30 bg-zinc-800 text-white placeholder:text-white/40")
34127
34133
  }), /* @__PURE__ */ E("button", {
34128
34134
  type: "button",
34129
- onClick: () => void R(),
34130
- disabled: C || oe || M.trim().length === 0,
34131
- title: oe ? o("uiLibrary.ptzOverlay.limitTitle", "Camera preset limit reached ({{max}})", { max: S?.maxPresets }) : o("uiLibrary.ptzOverlay.saveTitle", "Save current position as a new preset"),
34135
+ onClick: () => void oe(),
34136
+ disabled: C || ae || N.trim().length === 0,
34137
+ title: ae ? o("uiLibrary.ptzOverlay.limitTitle", "Camera preset limit reached ({{max}})", { max: S?.maxPresets }) : o("uiLibrary.ptzOverlay.saveTitle", "Save current position as a new preset"),
34132
34138
  className: U("flex h-7 w-7 shrink-0 items-center justify-center rounded", "bg-primary/15 text-primary hover:bg-primary/25 disabled:opacity-40"),
34133
34139
  children: /* @__PURE__ */ E(xr, { className: "h-3.5 w-3.5" })
34134
34140
  })]
34135
34141
  }),
34136
- oe && /* @__PURE__ */ E("span", {
34137
- className: U("block px-2 pb-1 text-[10px]", L ? "text-foreground-subtle" : "text-white/60"),
34142
+ ae && /* @__PURE__ */ E("span", {
34143
+ className: U("block px-2 pb-1 text-[10px]", R ? "text-foreground-subtle" : "text-white/60"),
34138
34144
  children: o("uiLibrary.ptzOverlay.limit", "Preset limit reached ({{max}}).", { max: S?.maxPresets })
34139
34145
  })
34140
34146
  ] })
@@ -34462,7 +34468,7 @@ function IO({ band: e, onChange: t, onRemove: n, sensorContext: r }) {
34462
34468
  type: "number",
34463
34469
  min: 0,
34464
34470
  value: e.postBufferSec ?? "",
34465
- placeholder: String(j.postBufferSec),
34471
+ placeholder: String(M.postBufferSec),
34466
34472
  onChange: (e) => t({ postBufferSec: FO(e.target.value) }),
34467
34473
  className: "w-16 rounded-md border border-border bg-background px-1 py-1 text-xs"
34468
34474
  }),
@@ -34514,7 +34520,7 @@ function zO({ initial: e, availableProfiles: t, saving: n, onSave: r, sensorCont
34514
34520
  ...f,
34515
34521
  ...e
34516
34522
  }
34517
- }), m = (e) => e === "" ? void 0 : Number(e), h = te({
34523
+ }), m = (e) => e === "" ? void 0 : Number(e), h = ee({
34518
34524
  enabled: c || o.length > 0,
34519
34525
  bands: o,
34520
34526
  deviceDecision: c
@@ -35337,35 +35343,35 @@ function wk({ deviceId: e }) {
35337
35343
  }
35338
35344
  }), [g]), O = x(_);
35339
35345
  O.current = _;
35340
- let { state: k, beginScrub: ee, updateScrub: j, endScrub: M, seek: N, setPlayhead: P, reset: F } = JO(T, m(() => O.current === "live", []));
35346
+ let { state: k, beginScrub: j, updateScrub: M, endScrub: N, seek: P, setPlayhead: F, reset: I } = JO(T, m(() => O.current === "live", []));
35341
35347
  l(() => {
35342
- v !== null && P(v);
35343
- }, [v, P]), l(() => {
35344
- (!h.channelOpen || _ === "live") && F();
35348
+ v !== null && F(v);
35349
+ }, [v, F]), l(() => {
35350
+ (!h.channelOpen || _ === "live") && I();
35345
35351
  }, [
35346
35352
  h.channelOpen,
35347
35353
  _,
35348
- F
35354
+ I
35349
35355
  ]);
35350
- let te = m(() => {
35351
- g({ t: "goLive" }), F();
35352
- }, [g, F]), I = m(() => {
35356
+ let ee = m(() => {
35357
+ g({ t: "goLive" }), I();
35358
+ }, [g, I]), L = m(() => {
35353
35359
  g({
35354
35360
  t: "setRate",
35355
35361
  rate: +(O.current === "paused")
35356
35362
  });
35357
- }, [g]), [L, ne] = w(() => new Set(_k)), re = m((e) => {
35358
- ne((t) => {
35363
+ }, [g]), [R, te] = w(() => new Set(_k)), ne = m((e) => {
35364
+ te((t) => {
35359
35365
  let n = new Set(t);
35360
35366
  return n.has(e) ? n.delete(e) : n.add(e), n;
35361
35367
  });
35362
- }, []), [ie, ae] = w(vk), oe = m(() => {
35363
- ae((e) => e + vk);
35368
+ }, []), [re, ie] = w(vk), ae = m(() => {
35369
+ ie((e) => e + vk);
35364
35370
  }, []);
35365
35371
  l(() => {
35366
- ae(vk);
35372
+ ie(vk);
35367
35373
  }, [i]);
35368
- let [R, se] = w(() => /* @__PURE__ */ new Date()), [ce, le] = w(() => Gw(/* @__PURE__ */ new Date(), Date.now())), ue = d(() => Gw(R, Date.now()), [R]), de = m((e) => {
35374
+ let [oe, se] = w(() => /* @__PURE__ */ new Date()), [ce, le] = w(() => Gw(/* @__PURE__ */ new Date(), Date.now())), ue = d(() => Gw(oe, Date.now()), [oe]), de = m((e) => {
35369
35375
  se(e), le(Gw(e, Date.now())), a(null);
35370
35376
  }, []), fe = m((e) => {
35371
35377
  le(e), a(null);
@@ -35393,38 +35399,38 @@ function wk({ deviceId: e }) {
35393
35399
  deviceId: e,
35394
35400
  since: we,
35395
35401
  until: Te,
35396
- limit: ie,
35402
+ limit: re,
35397
35403
  projection: "slim"
35398
- }, { enabled: Ce && L.has("object") }), De = uc({
35404
+ }, { enabled: Ce && R.has("object") }), De = uc({
35399
35405
  deviceId: e,
35400
35406
  since: we,
35401
35407
  until: Te,
35402
- limit: ie,
35408
+ limit: re,
35403
35409
  projection: "slim"
35404
- }, { enabled: Ce && L.has("motion") }), Oe = fc({
35410
+ }, { enabled: Ce && R.has("motion") }), Oe = fc({
35405
35411
  deviceId: e,
35406
35412
  since: we,
35407
35413
  until: Te,
35408
- limit: ie,
35414
+ limit: re,
35409
35415
  projection: "slim"
35410
- }, { enabled: Ce && L.has("audio") }), ke = d(() => {
35416
+ }, { enabled: Ce && R.has("audio") }), ke = d(() => {
35411
35417
  if (!Se) return [];
35412
35418
  let e = [];
35413
- if (L.has("object")) for (let t of Ee.data ?? []) e.push({
35419
+ if (R.has("object")) for (let t of Ee.data ?? []) e.push({
35414
35420
  id: String(t.id),
35415
35421
  timestamp: t.timestamp,
35416
35422
  kind: "object",
35417
35423
  label: t.label ?? t.className,
35418
35424
  mediaUrl: t.mediaUrl
35419
35425
  });
35420
- if (L.has("motion")) for (let n of De.data ?? []) e.push({
35426
+ if (R.has("motion")) for (let n of De.data ?? []) e.push({
35421
35427
  id: String(n.id),
35422
35428
  timestamp: n.timestamp,
35423
35429
  kind: "motion",
35424
35430
  label: t("uiLibrary.recordingTimeline.motionClip", "Motion ({{count}})", { count: n.regionCount }),
35425
35431
  mediaUrl: n.mediaUrl
35426
35432
  });
35427
- if (L.has("audio")) for (let n of Oe.data ?? []) e.push({
35433
+ if (R.has("audio")) for (let n of Oe.data ?? []) e.push({
35428
35434
  id: String(n.id),
35429
35435
  timestamp: n.timestamp,
35430
35436
  kind: "audio",
@@ -35434,17 +35440,17 @@ function wk({ deviceId: e }) {
35434
35440
  return e.toSorted((e, t) => t.timestamp - e.timestamp);
35435
35441
  }, [
35436
35442
  Se,
35437
- L,
35443
+ R,
35438
35444
  Ee.data,
35439
35445
  De.data,
35440
35446
  Oe.data,
35441
35447
  t
35442
- ]), Ae = d(() => !!(L.has("object") && (Ee.data?.length ?? 0) === ie || L.has("motion") && (De.data?.length ?? 0) === ie || L.has("audio") && (Oe.data?.length ?? 0) === ie), [
35443
- L,
35448
+ ]), Ae = d(() => !!(R.has("object") && (Ee.data?.length ?? 0) === re || R.has("motion") && (De.data?.length ?? 0) === re || R.has("audio") && (Oe.data?.length ?? 0) === re), [
35449
+ R,
35444
35450
  Ee.data,
35445
35451
  De.data,
35446
35452
  Oe.data,
35447
- ie
35453
+ re
35448
35454
  ]), je = m(async (t, i, a, o, c) => {
35449
35455
  u(t), p(null);
35450
35456
  try {
@@ -35471,7 +35477,7 @@ function wk({ deviceId: e }) {
35471
35477
  let t = Uw(e, be);
35472
35478
  if (!t) return;
35473
35479
  if (C.current) {
35474
- N(t.fromMs, "timeline");
35480
+ P(t.fromMs, "timeline");
35475
35481
  return;
35476
35482
  }
35477
35483
  let n = `Recording · ${new Date(t.fromMs).toLocaleString(void 0, {
@@ -35484,16 +35490,16 @@ function wk({ deviceId: e }) {
35484
35490
  }, [
35485
35491
  be,
35486
35492
  je,
35487
- N
35493
+ P
35488
35494
  ]), Ne = m(() => {
35489
- ee("timeline");
35490
- }, [ee]), Fe = m((e) => {
35491
- j(e, "timeline");
35492
- }, [j]), Ie = m((e) => {
35493
- M(Uw(e, be)?.fromMs ?? e, "timeline");
35494
- }, [be, M]), Le = m((e) => {
35495
+ j("timeline");
35496
+ }, [j]), Fe = m((e) => {
35497
+ M(e, "timeline");
35498
+ }, [M]), Ie = m((e) => {
35499
+ N(Uw(e, be)?.fromMs ?? e, "timeline");
35500
+ }, [be, N]), Le = m((e) => {
35495
35501
  if (C.current) {
35496
- N(e.timestamp - bk, "timeline");
35502
+ P(e.timestamp - bk, "timeline");
35497
35503
  return;
35498
35504
  }
35499
35505
  let t = `${e.label} · ${new Date(e.timestamp).toLocaleTimeString(void 0, {
@@ -35501,7 +35507,7 @@ function wk({ deviceId: e }) {
35501
35507
  minute: "2-digit"
35502
35508
  })}`;
35503
35509
  je(`${e.kind}:${e.id}`, e.timestamp - bk, e.timestamp + xk, t, e.timestamp);
35504
- }, [je, N]), Re = m((e) => {
35510
+ }, [je, P]), Re = m((e) => {
35505
35511
  a((t) => t === e ? null : e);
35506
35512
  }, []), ze = ge.isLoading, Be = _e.isLoading, Ve = (Ee.isLoading || De.isLoading || Oe.isLoading) && Ce, He = d(() => Zw(ce.fromMs, ce.toMs, 5), [ce.fromMs, ce.toMs]), Ue = S ? k.scrubbing ? k.scrubEpoch : k.playheadEpoch : o, z = S && (_ === "playing" || _ === "paused");
35507
35513
  return /* @__PURE__ */ D("div", {
@@ -35520,7 +35526,7 @@ function wk({ deviceId: e }) {
35520
35526
  message: f
35521
35527
  }) : null,
35522
35528
  /* @__PURE__ */ E(GE, {
35523
- day: R,
35529
+ day: oe,
35524
35530
  onDayChange: de,
35525
35531
  view: ce,
35526
35532
  dayBounds: ue,
@@ -35549,7 +35555,7 @@ function wk({ deviceId: e }) {
35549
35555
  z ? /* @__PURE__ */ D("button", {
35550
35556
  type: "button",
35551
35557
  "data-testid": "frame-push-rate-toggle",
35552
- onClick: I,
35558
+ onClick: L,
35553
35559
  className: "inline-flex items-center gap-1 rounded px-1.5 py-0.5 font-medium text-foreground-subtle transition-colors hover:bg-surface-hover hover:text-foreground",
35554
35560
  title: _ === "paused" ? t("uiLibrary.recordingTimeline.resumeTitle", "Resume playback") : t("uiLibrary.recordingTimeline.pauseTitle", "Pause playback"),
35555
35561
  children: [E(_ === "paused" ? rr : ii, { className: "h-3 w-3" }), _ === "paused" ? t("uiLibrary.recordingTimeline.resume", "Resume") : t("uiLibrary.recordingTimeline.pause", "Pause")]
@@ -35557,7 +35563,7 @@ function wk({ deviceId: e }) {
35557
35563
  S && _ !== "live" ? /* @__PURE__ */ D("button", {
35558
35564
  type: "button",
35559
35565
  "data-testid": "frame-push-go-live",
35560
- onClick: te,
35566
+ onClick: ee,
35561
35567
  className: "inline-flex items-center gap-1 rounded bg-danger/10 px-1.5 py-0.5 font-medium text-danger transition-colors hover:bg-danger/20",
35562
35568
  title: t("uiLibrary.recordingTimeline.liveTitle", "Return to the live stream"),
35563
35569
  children: [/* @__PURE__ */ E(_r, { className: "h-3 w-3" }), t("uiLibrary.recordingTimeline.goLive", "Go live")]
@@ -35626,10 +35632,10 @@ function wk({ deviceId: e }) {
35626
35632
  loading: Ve,
35627
35633
  busyKey: c,
35628
35634
  onPlay: Le,
35629
- enabledKinds: L,
35630
- onToggleKind: re,
35635
+ enabledKinds: R,
35636
+ onToggleKind: ne,
35631
35637
  hasMore: Ae,
35632
- onLoadMore: oe
35638
+ onLoadMore: ae
35633
35639
  }) : /* @__PURE__ */ E("p", {
35634
35640
  className: "text-[11px] text-foreground-subtle",
35635
35641
  children: S ? t("uiLibrary.recordingTimeline.helpFramePush", "Click or drag the coverage bar to play from any point (frames play in the main player above), or click a density bar to browse that window’s events.") : t("uiLibrary.recordingTimeline.helpHls", "Click the coverage bar to play from any point, or a density bar to browse that window’s events.")
@@ -35749,8 +35755,8 @@ function Ek({ deviceId: e }) {
35749
35755
  //#region ../ui-library/src/widgets/host-widgets.ts
35750
35756
  S();
35751
35757
  var Dk = {
35752
- "host/motion-zones-grid": s(() => import("./MotionZonesSettings-iA_Nrx3J.mjs").then((e) => ({ default: e.MotionZonesSettings }))),
35753
- "host/privacy-mask-grid": s(() => import("./PrivacyMaskSettings-BJLED0Hb.mjs").then((e) => ({ default: e.PrivacyMaskSettings }))),
35758
+ "host/motion-zones-grid": s(() => import("./MotionZonesSettings-DBC9oNEy.mjs").then((e) => ({ default: e.MotionZonesSettings }))),
35759
+ "host/privacy-mask-grid": s(() => import("./PrivacyMaskSettings-MPmxoEGa.mjs").then((e) => ({ default: e.PrivacyMaskSettings }))),
35754
35760
  "host/ptz-panel": bO,
35755
35761
  "host/navigation-panel": fO,
35756
35762
  "host/consumables-panel": Lw,
@@ -36841,7 +36847,7 @@ function pA({ label: e, description: t, required: n, span: r, htmlFor: i, childr
36841
36847
  });
36842
36848
  }
36843
36849
  function mA({ field: e, value: t, onChange: n, disabled: r, translationFn: i, multiline: a, children: o }) {
36844
- let s = re(e), [c, l] = w(() => s && Ys(t)), u = s && $e(t);
36850
+ let s = ne(e), [c, l] = w(() => s && Ys(t)), u = s && $e(t);
36845
36851
  return u && !c && l(!0), !c && !u ? /* @__PURE__ */ E(O, { children: o }) : /* @__PURE__ */ E(pA, {
36846
36852
  label: "label" in e ? e.label : void 0,
36847
36853
  description: "description" in e ? e.description : void 0,
@@ -38974,46 +38980,46 @@ var Kj = "max-h-[60vh]", qj = {
38974
38980
  center: "text-center"
38975
38981
  };
38976
38982
  function Jj({ columns: e, rows: t, rowKey: n, onRowClick: r, minWidthPx: i = 480, emptyMessage: a, className: o, bordered: s = !0, rowClassName: c, maxBodyHeight: l, fill: f = !1, defaultSort: p, sort: m, onSortChange: h, pageSize: g, page: _, onPageChange: v, paginationLabels: y = Fj, selection: b, renderExpanded: x, isExpanded: S }) {
38977
- let [C, T] = w(p ?? null), [O, k] = w(0), A = m === void 0 ? C : m, ee = (e) => {
38983
+ let [C, T] = w(p ?? null), [O, k] = w(0), A = m === void 0 ? C : m, j = (e) => {
38978
38984
  m === void 0 && T(e), h?.(e);
38979
- }, j = (e) => {
38985
+ }, M = (e) => {
38980
38986
  _ === void 0 && k(e), v?.(e);
38981
- }, M = f || l !== void 0, N = f ? "h-full min-h-0" : l ?? "", P = d(() => A === null ? void 0 : e.find((e) => e.key === A.columnKey && e.sortValue !== void 0), [e, A]), F = P?.sortValue, te = d(() => F === void 0 ? t : Wj(t, A, F), [
38987
+ }, N = f || l !== void 0, P = f ? "h-full min-h-0" : l ?? "", F = d(() => A === null ? void 0 : e.find((e) => e.key === A.columnKey && e.sortValue !== void 0), [e, A]), I = F?.sortValue, ee = d(() => I === void 0 ? t : Wj(t, A, I), [
38982
38988
  t,
38983
38989
  A,
38984
- F
38985
- ]), I = P === void 0 ? null : A, L = g === void 0 ? null : Pj(te, _ ?? O, g), ne = L === null ? te : L.pageRows, re = L !== null && L.pageCount > 1 ? /* @__PURE__ */ E(Nj, {
38986
- page: L,
38990
+ I
38991
+ ]), L = F === void 0 ? null : A, R = g === void 0 ? null : Pj(ee, _ ?? O, g), te = R === null ? ee : R.pageRows, ne = R !== null && R.pageCount > 1 ? /* @__PURE__ */ E(Nj, {
38992
+ page: R,
38987
38993
  labels: y,
38988
- onPageChange: j
38989
- }) : null, ie = b === void 0 ? e : [zj(b, ne, (e) => String(n ? n(e, t.indexOf(e)) : t.indexOf(e))), ...e];
38994
+ onPageChange: M
38995
+ }) : null, re = b === void 0 ? e : [zj(b, te, (e) => String(n ? n(e, t.indexOf(e)) : t.indexOf(e))), ...e];
38990
38996
  if (t.length === 0 && a) return /* @__PURE__ */ E("div", {
38991
38997
  className: `rounded-lg ${s ? "border border-border" : ""} bg-surface px-3 py-4 text-xs text-foreground-subtle text-center ${o ?? ""}`,
38992
38998
  children: a
38993
38999
  });
38994
39000
  if (t.length === 0) return null;
38995
- let ae = /* @__PURE__ */ E("div", {
39001
+ let ie = /* @__PURE__ */ E("div", {
38996
39002
  className: [
38997
39003
  "rounded-lg",
38998
39004
  s ? "border border-border" : "",
38999
39005
  "bg-surface overflow-x-auto",
39000
- M ? `${N} overflow-y-auto` : "",
39006
+ N ? `${P} overflow-y-auto` : "",
39001
39007
  f ? "min-h-0 flex-1" : "",
39002
- !f && re === null ? o ?? "" : ""
39008
+ !f && ne === null ? o ?? "" : ""
39003
39009
  ].filter(Boolean).join(" "),
39004
39010
  children: /* @__PURE__ */ D("table", {
39005
- className: `w-full text-xs ${M ? "border-separate border-spacing-0" : ""}`,
39011
+ className: `w-full text-xs ${N ? "border-separate border-spacing-0" : ""}`,
39006
39012
  style: { minWidth: `${i}px` },
39007
39013
  children: [/* @__PURE__ */ E("thead", {
39008
39014
  className: "bg-surface",
39009
- children: /* @__PURE__ */ E("tr", { children: ie.map((e) => {
39010
- let t = e.align ?? "left", n = e.nowrap ?? !0, r = e.sortValue !== void 0, i = I !== null && I.columnKey === e.key;
39015
+ children: /* @__PURE__ */ E("tr", { children: re.map((e) => {
39016
+ let t = e.align ?? "left", n = e.nowrap ?? !0, r = e.sortValue !== void 0, i = L !== null && L.columnKey === e.key;
39011
39017
  return /* @__PURE__ */ E("th", {
39012
- "aria-sort": r ? Gj(I, e.key) : void 0,
39018
+ "aria-sort": r ? Gj(L, e.key) : void 0,
39013
39019
  title: r ? void 0 : e.notSortableReason,
39014
39020
  className: [
39015
39021
  "px-3 py-2 text-foreground-subtle font-medium bg-surface border-b border-border",
39016
- M ? "sticky top-0 z-10" : "",
39022
+ N ? "sticky top-0 z-10" : "",
39017
39023
  qj[t],
39018
39024
  n ? "whitespace-nowrap" : "",
39019
39025
  e.width ?? ""
@@ -39021,17 +39027,17 @@ function Jj({ columns: e, rows: t, rowKey: n, onRowClick: r, minWidthPx: i = 480
39021
39027
  children: r ? /* @__PURE__ */ E(Bj, {
39022
39028
  label: e.headerRender ? e.headerRender() : e.header,
39023
39029
  active: i,
39024
- dir: i && I !== null ? I.dir : "asc",
39025
- onSort: () => ee(Hj(A, e.key))
39030
+ dir: i && L !== null ? L.dir : "asc",
39031
+ onSort: () => j(Hj(A, e.key))
39026
39032
  }) : e.headerRender ? e.headerRender() : e.header
39027
39033
  }, e.key);
39028
39034
  }) })
39029
- }), /* @__PURE__ */ E("tbody", { children: ne.map((e, t) => {
39035
+ }), /* @__PURE__ */ E("tbody", { children: te.map((e, t) => {
39030
39036
  let i = n ? n(e, t) : t, a = c?.(e, t) ?? "", o = r !== void 0, s = x !== void 0 && S?.(e) === !0 ? x(e, t) : null;
39031
39037
  return /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E("tr", {
39032
39038
  onClick: o ? () => r(e, t) : void 0,
39033
39039
  className: [o ? "cursor-pointer hover:bg-primary/5" : "hover:bg-primary/5", a].filter(Boolean).join(" "),
39034
- children: ie.map((n) => {
39040
+ children: re.map((n) => {
39035
39041
  let r = n.align ?? "left", i = n.nowrap ?? !0;
39036
39042
  return /* @__PURE__ */ E("td", {
39037
39043
  "data-cell": n.key,
@@ -39047,7 +39053,7 @@ function Jj({ columns: e, rows: t, rowKey: n, onRowClick: r, minWidthPx: i = 480
39047
39053
  "data-expanded-row": "",
39048
39054
  className: "bg-surface",
39049
39055
  children: /* @__PURE__ */ E("td", {
39050
- colSpan: ie.length,
39056
+ colSpan: re.length,
39051
39057
  className: "border-b border-border px-3 py-2",
39052
39058
  children: s
39053
39059
  })
@@ -39055,12 +39061,12 @@ function Jj({ columns: e, rows: t, rowKey: n, onRowClick: r, minWidthPx: i = 480
39055
39061
  }) })]
39056
39062
  })
39057
39063
  });
39058
- return re === null ? f ? /* @__PURE__ */ E("div", {
39064
+ return ne === null ? f ? /* @__PURE__ */ E("div", {
39059
39065
  className: `flex min-h-0 flex-1 flex-col ${o ?? ""}`,
39060
- children: ae
39061
- }) : ae : /* @__PURE__ */ D("div", {
39066
+ children: ie
39067
+ }) : ie : /* @__PURE__ */ D("div", {
39062
39068
  className: f ? `flex min-h-0 flex-1 flex-col ${o ?? ""}` : o,
39063
- children: [ae, re]
39069
+ children: [ie, ne]
39064
39070
  });
39065
39071
  }
39066
39072
  //#endregion
@@ -39607,7 +39613,7 @@ var DM = Ye(), OM = new Set([
39607
39613
  "recording",
39608
39614
  "heatmapScrub"
39609
39615
  ]);
39610
- Object.freeze(Object.fromEntries(Ae.filter((e) => !OM.has(e)).map((e) => [e, ne(DM.swatches, DM.fallbacks, e)])));
39616
+ Object.freeze(Object.fromEntries(Ae.filter((e) => !OM.has(e)).map((e) => [e, te(DM.swatches, DM.fallbacks, e)])));
39611
39617
  function kM(e) {
39612
39618
  let t = e[0];
39613
39619
  if (t === void 0) throw Error("display palette has no fallback colour");
@@ -40409,7 +40415,7 @@ function uP({ trpc: e, deviceId: t, layout: n, optimistic: r, features: i }) {
40409
40415
  }
40410
40416
  }, k = () => {
40411
40417
  p || f(null);
40412
- }, ee = async () => {
40418
+ }, j = async () => {
40413
40419
  if (!(p || d === null)) {
40414
40420
  g(null), m(!0);
40415
40421
  try {
@@ -40420,14 +40426,14 @@ function uP({ trpc: e, deviceId: t, layout: n, optimistic: r, features: i }) {
40420
40426
  m(!1);
40421
40427
  }
40422
40428
  }
40423
- }, j = _ ? a("uiLibrary.lockPanel.unlock", "Unlock") : a("uiLibrary.lockPanel.lock", "Lock"), M = d === "open" ? a("uiLibrary.lockPanel.openDoorTitle", "Open door?") : a("uiLibrary.lockPanel.unlockTitle", "Unlock device?"), N = d === "open" ? a("uiLibrary.lockPanel.openDoorBody", "This will release the latch and open the door.") : a("uiLibrary.lockPanel.unlockBody", "This will unlock the device."), P = d === "open" ? a("uiLibrary.lockPanel.confirmOpen", "Confirm open") : a("uiLibrary.lockPanel.confirmUnlock", "Confirm unlock"), F = E(d === "open" ? oi : dn, { className: "h-4 w-4 text-amber-400" });
40429
+ }, M = _ ? a("uiLibrary.lockPanel.unlock", "Unlock") : a("uiLibrary.lockPanel.lock", "Lock"), N = d === "open" ? a("uiLibrary.lockPanel.openDoorTitle", "Open door?") : a("uiLibrary.lockPanel.unlockTitle", "Unlock device?"), P = d === "open" ? a("uiLibrary.lockPanel.openDoorBody", "This will release the latch and open the door.") : a("uiLibrary.lockPanel.unlockBody", "This will unlock the device."), F = d === "open" ? a("uiLibrary.lockPanel.confirmOpen", "Confirm open") : a("uiLibrary.lockPanel.confirmUnlock", "Confirm unlock"), I = E(d === "open" ? oi : dn, { className: "h-4 w-4 text-amber-400" });
40424
40430
  return /* @__PURE__ */ D("div", {
40425
40431
  className: U("inline-flex items-center", n === "full" ? "gap-2" : "gap-1"),
40426
40432
  children: [
40427
40433
  /* @__PURE__ */ D("button", {
40428
40434
  type: "button",
40429
- "aria-label": j,
40430
- title: l.state === "jammed" ? a("uiLibrary.lockPanel.jammed", "Jammed") : j,
40435
+ "aria-label": M,
40436
+ title: l.state === "jammed" ? a("uiLibrary.lockPanel.jammed", "Jammed") : M,
40431
40437
  disabled: v,
40432
40438
  onClick: (e) => {
40433
40439
  e.stopPropagation(), T();
@@ -40457,8 +40463,8 @@ function uP({ trpc: e, deviceId: t, layout: n, optimistic: r, features: i }) {
40457
40463
  children: [
40458
40464
  /* @__PURE__ */ D(ek, { children: [/* @__PURE__ */ D(rk, {
40459
40465
  className: "flex items-center gap-2",
40460
- children: [F, M]
40461
- }), /* @__PURE__ */ E(ik, { children: N })] }),
40466
+ children: [I, N]
40467
+ }), /* @__PURE__ */ E(ik, { children: P })] }),
40462
40468
  h !== null && /* @__PURE__ */ E("div", {
40463
40469
  className: "mt-2 px-3 py-2 rounded border border-danger/40 bg-danger/10 text-xs text-danger",
40464
40470
  children: h
@@ -40474,12 +40480,12 @@ function uP({ trpc: e, deviceId: t, layout: n, optimistic: r, features: i }) {
40474
40480
  type: "button",
40475
40481
  variant: "danger",
40476
40482
  size: "sm",
40477
- "aria-label": P,
40483
+ "aria-label": F,
40478
40484
  disabled: p,
40479
40485
  onClick: () => {
40480
- ee();
40486
+ j();
40481
40487
  },
40482
- children: [p && /* @__PURE__ */ E(_n, { className: "h-3.5 w-3.5 animate-spin" }), P]
40488
+ children: [p && /* @__PURE__ */ E(_n, { className: "h-3.5 w-3.5 animate-spin" }), F]
40483
40489
  })] })
40484
40490
  ]
40485
40491
  })
@@ -41091,7 +41097,7 @@ function AP(e) {
41091
41097
  fromDisplayValue: (e) => u || a === void 0 || l.length === 0 || l === a ? e : ge(e, l, a) ?? e,
41092
41098
  format: (e) => {
41093
41099
  if (r !== void 0 && !c) {
41094
- let t = R({
41100
+ let t = oe({
41095
41101
  value: e,
41096
41102
  quantity: r,
41097
41103
  preference: i,
@@ -41342,7 +41348,7 @@ function WP({ trpc: e, deviceId: t, features: n, layout: r, optimistic: i }) {
41342
41348
  slice: (e) => e.state.control
41343
41349
  }), { display: l, applyOptimistic: u } = cP(s, { enabled: i ?? !0 });
41344
41350
  if (l === void 0) return null;
41345
- let d = !c, f = a?.sourceInfo?.quantity, p = oe(f) && f !== "device" && f !== "none" ? f : void 0;
41351
+ let d = !c, f = a?.sourceInfo?.quantity, p = ae(f) && f !== "device" && f !== "none" ? f : void 0;
41346
41352
  return /* @__PURE__ */ E("div", {
41347
41353
  "data-kind": l.kind,
41348
41354
  className: "inline-flex min-w-0 max-w-full items-center gap-1 rounded border border-border px-2 py-1 transition-colors",
@@ -42080,7 +42086,7 @@ function xF(e) {
42080
42086
  return t !== void 0 && _F(t, n) ? {
42081
42087
  kind: "value",
42082
42088
  slice: n
42083
- } : e.addonId === I && e.snapshotStatus === "success" ? { kind: "quiet" } : { kind: "awaiting" };
42089
+ } : e.addonId === le && e.snapshotStatus === "success" ? { kind: "quiet" } : { kind: "awaiting" };
42084
42090
  }
42085
42091
  //#endregion
42086
42092
  //#region ../ui-library/src/composites/device-controls/sensor-hero-card.tsx
@@ -44220,7 +44226,7 @@ function OI(e, t) {
44220
44226
  }
44221
44227
  function kI(e, t) {
44222
44228
  if (e === null) return "—";
44223
- let n = R({
44229
+ let n = oe({
44224
44230
  value: e,
44225
44231
  quantity: t,
44226
44232
  precision: 0
@@ -44530,7 +44536,7 @@ function PI({ icon: e, label: t, value: n }) {
44530
44536
  function FI({ trpc: e, deviceId: t }) {
44531
44537
  let n = A(), { slice: r } = OI(e, t);
44532
44538
  if (r === void 0) return null;
44533
- let i = TI(r.condition, n), a = EI(r.condition), o = r.temperature === null ? void 0 : R({
44539
+ let i = TI(r.condition, n), a = EI(r.condition), o = r.temperature === null ? void 0 : oe({
44534
44540
  value: r.temperature,
44535
44541
  quantity: "temperature",
44536
44542
  precision: 0
@@ -44553,7 +44559,7 @@ function FI({ trpc: e, deviceId: t }) {
44553
44559
  }),
44554
44560
  /* @__PURE__ */ E("span", {
44555
44561
  className: "text-base text-foreground-subtle",
44556
- children: o === void 0 ? R({
44562
+ children: o === void 0 ? oe({
44557
44563
  value: 0,
44558
44564
  quantity: "temperature"
44559
44565
  }).unit : o.unit
@@ -48100,27 +48106,27 @@ var zz = p(function({ tree: e, agents: t, getCellState: n, onCellClick: r, onSte
48100
48106
  o,
48101
48107
  g,
48102
48108
  t
48103
- ]), [k, ee] = w({
48109
+ ]), [k, j] = w({
48104
48110
  r: 0,
48105
48111
  c: 0
48106
48112
  });
48107
48113
  l(() => {
48108
- O !== null && ee(O);
48114
+ O !== null && j(O);
48109
48115
  }, [O]);
48110
- let j = k.r < g.length && k.c < S ? k : {
48116
+ let M = k.r < g.length && k.c < S ? k : {
48111
48117
  r: 0,
48112
48118
  c: 0
48113
- }, M = (e, t) => {
48119
+ }, N = (e, t) => {
48114
48120
  v.current?.querySelector(`[data-r="${e}"][data-c="${t}"]`)?.focus();
48115
48121
  };
48116
48122
  return h(p, () => ({ focusCell: (e, n) => {
48117
48123
  let r = g.findIndex((t) => t.node.addonId === e);
48118
48124
  if (r < 0) return;
48119
48125
  let i = n === null ? -1 : t.findIndex((e) => bz(e) === n), a = i < 0 ? 0 : i + 1;
48120
- ee({
48126
+ j({
48121
48127
  r,
48122
48128
  c: a
48123
- }), M(r, a);
48129
+ }), N(r, a);
48124
48130
  } }), [g, t]), f(() => {
48125
48131
  if (O === null) return;
48126
48132
  let e = v.current, t = e?.querySelector(`[data-r="${O.r}"][data-c="${O.c}"]`);
@@ -48151,7 +48157,7 @@ var zz = p(function({ tree: e, agents: t, getCellState: n, onCellClick: r, onSte
48151
48157
  r: Number(e.target.dataset.r),
48152
48158
  c: Number(e.target.dataset.c)
48153
48159
  }, n = Iz(e.key, t, g.length, S);
48154
- n !== null && (e.preventDefault(), ee(n), M(n.r, n.c));
48160
+ n !== null && (e.preventDefault(), j(n), N(n.r, n.c));
48155
48161
  },
48156
48162
  children: [/* @__PURE__ */ D("div", {
48157
48163
  role: "row",
@@ -48175,7 +48181,7 @@ var zz = p(function({ tree: e, agents: t, getCellState: n, onCellClick: r, onSte
48175
48181
  node: e,
48176
48182
  depth: s,
48177
48183
  r: c,
48178
- tabbable: j.r === c && j.c === 0,
48184
+ tabbable: M.r === c && M.c === 0,
48179
48185
  selected: o?.addonId === e.addonId,
48180
48186
  badge: a?.(e.addonId),
48181
48187
  onClick: i ? (t) => i(e.addonId, t) : void 0,
@@ -48191,7 +48197,7 @@ var zz = p(function({ tree: e, agents: t, getCellState: n, onCellClick: r, onSte
48191
48197
  "data-c": i + 1,
48192
48198
  "data-step": e.addonId,
48193
48199
  "data-col": bz(t),
48194
- tabIndex: j.r === c && j.c === i + 1 ? 0 : -1,
48200
+ tabIndex: M.r === c && M.c === i + 1 ? 0 : -1,
48195
48201
  "aria-disabled": !l,
48196
48202
  "aria-selected": s,
48197
48203
  onClick: (n) => {
@@ -49270,56 +49276,56 @@ function AV({ devices: e, listState: t, fleet: n, value: r, onChange: i, selecti
49270
49276
  let y = A(), b = u ?? ((e) => CV(e, y)), x = v ?? y("uiLibrary.devicePicker.alreadyAdded", "Already added"), S = d(() => wV(l) ? e : tV(e), [e, l]), C = n ?? {
49271
49277
  state: t,
49272
49278
  devices: t === "answered" ? S : void 0
49273
- }, T = d(() => new Set(_ ?? []), [_]), O = (e) => i(T.size === 0 ? e : e.filter((e) => !T.has(e))), [k, ee] = w(!1), [j, M] = w(!1), [N, P] = w(c || r.length > 0);
49274
- r.length > 0 && !N && P(!0);
49275
- let F = OV(r, S, C, l, y), te = dB(F, j || g), I = k || g, L = pV(s, r.length, N), ne = mV[l];
49279
+ }, T = d(() => new Set(_ ?? []), [_]), O = (e) => i(T.size === 0 ? e : e.filter((e) => !T.has(e))), [k, j] = w(!1), [M, N] = w(!1), [P, F] = w(c || r.length > 0);
49280
+ r.length > 0 && !P && F(!0);
49281
+ let I = OV(r, S, C, l, y), ee = dB(I, M || g), L = k || g, R = pV(s, r.length, P), te = mV[l];
49276
49282
  return t === "answered" && fV(t, S.length, r.length) ? /* @__PURE__ */ D("div", {
49277
49283
  "data-testid": h,
49278
49284
  children: [/* @__PURE__ */ E("p", {
49279
49285
  className: "text-[10px] text-foreground-subtle mt-0.5",
49280
49286
  children: kV(l, s, y)
49281
- }), L && /* @__PURE__ */ E(yV, { noun: l })]
49287
+ }), R && /* @__PURE__ */ E(yV, { noun: l })]
49282
49288
  }) : /* @__PURE__ */ D("div", {
49283
49289
  className: "mt-1 space-y-1.5",
49284
49290
  "data-testid": h,
49285
49291
  children: [
49286
- t === "pending" && /* @__PURE__ */ E(bV, { noun: ne }),
49287
- t === "failed" && /* @__PURE__ */ E(xV, { noun: l === "camera" ? "devices" : ne }),
49288
- !(a === "single" && F.length === 0) && /* @__PURE__ */ D("div", {
49292
+ t === "pending" && /* @__PURE__ */ E(bV, { noun: te }),
49293
+ t === "failed" && /* @__PURE__ */ E(xV, { noun: l === "camera" ? "devices" : te }),
49294
+ !(a === "single" && I.length === 0) && /* @__PURE__ */ D("div", {
49289
49295
  className: "flex flex-wrap items-center gap-1",
49290
49296
  children: [
49291
- F.length === 0 ? /* @__PURE__ */ E("span", {
49297
+ I.length === 0 ? /* @__PURE__ */ E("span", {
49292
49298
  className: "text-[11px] text-foreground-subtle",
49293
49299
  children: f ?? (s ? y("uiLibrary.devicePicker.everyNoRestriction", "Every {{noun}} — no restriction", { noun: hV(l, y) }) : y("uiLibrary.devicePicker.noneSelected", "None selected"))
49294
- }) : te.shown.map((e) => /* @__PURE__ */ E(DV, {
49300
+ }) : ee.shown.map((e) => /* @__PURE__ */ E(DV, {
49295
49301
  id: e.id,
49296
49302
  stored: e.label,
49297
49303
  removed: e.removed,
49298
49304
  ...m ? {} : { onRemove: () => i(r.filter((t) => t !== e.id)) }
49299
49305
  }, e.id)),
49300
- te.hidden > 0 && /* @__PURE__ */ E("button", {
49306
+ ee.hidden > 0 && /* @__PURE__ */ E("button", {
49301
49307
  type: "button",
49302
49308
  className: "rounded-md border border-border px-1.5 py-0.5 text-[11px] text-foreground-subtle hover:bg-surface-hover",
49303
- onClick: () => M(!0),
49304
- children: y("uiLibrary.devicePicker.moreChips", "+{{count}} more", { count: te.hidden })
49309
+ onClick: () => N(!0),
49310
+ children: y("uiLibrary.devicePicker.moreChips", "+{{count}} more", { count: ee.hidden })
49305
49311
  }),
49306
- j && F.length > 6 && /* @__PURE__ */ E("button", {
49312
+ M && I.length > 6 && /* @__PURE__ */ E("button", {
49307
49313
  type: "button",
49308
49314
  className: "text-[11px] text-foreground-subtle underline",
49309
- onClick: () => M(!1),
49315
+ onClick: () => N(!1),
49310
49316
  children: y("uiLibrary.devicePicker.showFewer", "Show fewer")
49311
49317
  }),
49312
49318
  t !== "pending" && !g && /* @__PURE__ */ E("button", {
49313
49319
  type: "button",
49314
49320
  disabled: m,
49315
49321
  "aria-expanded": k,
49316
- onClick: () => ee((e) => !e),
49322
+ onClick: () => j((e) => !e),
49317
49323
  className: "rounded-md border border-dashed border-border px-1.5 py-0.5 text-[11px] text-foreground hover:bg-surface-hover disabled:opacity-50",
49318
49324
  children: k ? y("uiLibrary.devicePicker.done", "Done") : r.length === 0 ? y("uiLibrary.devicePicker.addPlural", "Add {{plural}}…", { plural: gV(l, y) }) : y("uiLibrary.devicePicker.edit", "Edit…")
49319
49325
  })
49320
49326
  ]
49321
49327
  }),
49322
- I && t === "answered" && (wV(l) ? /* @__PURE__ */ E(jV, {
49328
+ L && t === "answered" && (wV(l) ? /* @__PURE__ */ E(jV, {
49323
49329
  devices: S,
49324
49330
  value: r,
49325
49331
  onChange: O,
@@ -49345,7 +49351,7 @@ function AV({ devices: e, listState: t, fleet: n, value: r, onChange: i, selecti
49345
49351
  showAll: g,
49346
49352
  selection: a
49347
49353
  })),
49348
- L && /* @__PURE__ */ E(yV, { noun: l })
49354
+ R && /* @__PURE__ */ E(yV, { noun: l })
49349
49355
  ]
49350
49356
  });
49351
49357
  }
@@ -49383,30 +49389,30 @@ function PV({ devices: e, value: t, onChange: n, annotate: r, groupTitle: i, nou
49383
49389
  t,
49384
49390
  C,
49385
49391
  T
49386
- ]), ee = d(() => k === null ? sB(aB(O, t), t, v, S) : DB(k, t, v, S), [
49392
+ ]), j = d(() => k === null ? sB(aB(O, t), t, v, S) : DB(k, t, v, S), [
49387
49393
  k,
49388
49394
  O,
49389
49395
  t,
49390
49396
  v,
49391
49397
  S
49392
- ]), j = k?.groupBy ?? null, M = d(() => FB(e, "type", h.types, T), [
49398
+ ]), M = k?.groupBy ?? null, N = d(() => FB(e, "type", h.types, T), [
49393
49399
  e,
49394
49400
  h.types,
49395
49401
  T
49396
- ]), N = d(() => FB(e, "zone", h.zones, T), [
49402
+ ]), P = d(() => FB(e, "zone", h.zones, T), [
49397
49403
  e,
49398
49404
  h.zones,
49399
49405
  T
49400
- ]), P = d(() => f === void 0 ? [] : FB(e, "location", h.locations, T), [
49406
+ ]), F = d(() => f === void 0 ? [] : FB(e, "location", h.locations, T), [
49401
49407
  e,
49402
49408
  h.locations,
49403
49409
  T,
49404
49410
  f
49405
- ]), F = d(() => HB(t, e, O), [
49411
+ ]), I = d(() => HB(t, e, O), [
49406
49412
  e,
49407
49413
  t,
49408
49414
  O
49409
- ]), te = fB(ee, l ? ee.length : b), I = (e, t) => y((n) => new Map([...n, [e.key, !t]]));
49415
+ ]), ee = fB(j, l ? j.length : b), L = (e, t) => y((n) => new Map([...n, [e.key, !t]]));
49410
49416
  return /* @__PURE__ */ D("div", {
49411
49417
  className: "rounded-md border border-border bg-surface p-2",
49412
49418
  "data-testid": "device-picker-panel",
@@ -49416,9 +49422,9 @@ function PV({ devices: e, value: t, onChange: n, annotate: r, groupTitle: i, nou
49416
49422
  onFiltersChange: (e) => {
49417
49423
  g(e), x(60);
49418
49424
  },
49419
- typeOptions: M,
49420
- zoneOptions: N,
49421
- locationOptions: P,
49425
+ typeOptions: N,
49426
+ zoneOptions: P,
49427
+ locationOptions: F,
49422
49428
  zones: T,
49423
49429
  ...f === void 0 ? {} : { grouping: {
49424
49430
  groupBy: f.groupBy,
@@ -49440,39 +49446,39 @@ function PV({ devices: e, value: t, onChange: n, annotate: r, groupTitle: i, nou
49440
49446
  selected: t.length
49441
49447
  })
49442
49448
  }),
49443
- ee.length === 0 ? /* @__PURE__ */ E("p", {
49449
+ j.length === 0 ? /* @__PURE__ */ E("p", {
49444
49450
  className: "py-2 text-[11px] text-foreground-subtle italic",
49445
49451
  children: a === "camera" || a === "device" ? p("uiLibrary.devicePicker.noDeviceMatches", "No device matches.") : p("uiLibrary.devicePicker.noNounMatches", "No {{noun}} matches.", { noun: hV(a, p) })
49446
49452
  }) : /* @__PURE__ */ D("div", {
49447
49453
  className: l ? "mt-1" : "mt-1 max-h-72 overflow-y-auto",
49448
49454
  "data-testid": "device-picker-rows",
49449
- children: [te.rows.map((e) => /* @__PURE__ */ E(IV, {
49455
+ children: [ee.rows.map((e) => /* @__PURE__ */ E(IV, {
49450
49456
  row: e,
49451
49457
  value: t,
49452
49458
  onChange: n,
49453
- onToggleGroup: I,
49459
+ onToggleGroup: L,
49454
49460
  annotate: r,
49455
49461
  groupTitle: i,
49456
- groupBy: j,
49462
+ groupBy: M,
49457
49463
  disabled: o,
49458
49464
  locked: s,
49459
49465
  lockedNote: c,
49460
49466
  selection: u,
49461
49467
  radioName: m
49462
- }, e.key)), te.remaining > 0 && /* @__PURE__ */ E("button", {
49468
+ }, e.key)), ee.remaining > 0 && /* @__PURE__ */ E("button", {
49463
49469
  type: "button",
49464
49470
  className: "mt-1 w-full rounded border border-border py-1 text-[11px] text-foreground-subtle hover:bg-surface-hover",
49465
49471
  onClick: () => x((e) => e + 60),
49466
49472
  children: p("uiLibrary.devicePicker.showMore", "Show {{count}} more ({{left}} left)", {
49467
- count: Math.min(te.remaining, 60),
49468
- left: te.remaining
49473
+ count: Math.min(ee.remaining, 60),
49474
+ left: ee.remaining
49469
49475
  })
49470
49476
  })]
49471
49477
  }),
49472
- F > 0 && /* @__PURE__ */ E("p", {
49478
+ I > 0 && /* @__PURE__ */ E("p", {
49473
49479
  className: "mt-1 text-[10px] text-foreground-subtle",
49474
49480
  "data-testid": "picker-hidden-selected",
49475
- children: p("uiLibrary.devicePicker.hiddenSelected", "{{count}} selected hidden by filters", { count: F })
49481
+ children: p("uiLibrary.devicePicker.hiddenSelected", "{{count}} selected hidden by filters", { count: I })
49476
49482
  })
49477
49483
  ]
49478
49484
  });
@@ -49880,7 +49886,7 @@ function fH(e, t) {
49880
49886
  translate: (t, n) => oH(e, ZV(), t, n)
49881
49887
  };
49882
49888
  }
49883
- S(), s(() => import("./MaskShapeCanvas-HNL0xNpy.mjs").then((e) => ({ default: e.MaskShapeCanvas }))), s(() => import("./MotionZonesSettings-iA_Nrx3J.mjs").then((e) => ({ default: e.MotionZonesSettings }))), s(() => import("./SceneMonitorEditor-CEjUG1-V.mjs").then((e) => ({ default: e.SceneMonitorEditor }))), s(() => import("./PrivacyMaskSettings-BJLED0Hb.mjs").then((e) => ({ default: e.PrivacyMaskSettings })));
49889
+ S(), s(() => import("./MaskShapeCanvas-HNL0xNpy.mjs").then((e) => ({ default: e.MaskShapeCanvas }))), s(() => import("./MotionZonesSettings-DBC9oNEy.mjs").then((e) => ({ default: e.MotionZonesSettings }))), s(() => import("./SceneMonitorEditor-q8rm9EAO.mjs").then((e) => ({ default: e.SceneMonitorEditor }))), s(() => import("./PrivacyMaskSettings-MPmxoEGa.mjs").then((e) => ({ default: e.PrivacyMaskSettings })));
49884
49890
  //#endregion
49885
49891
  //#region src/i18n/index.ts
49886
49892
  var { useT: pH, Trans: mH, translate: hH } = fH("training", {
@@ -51542,7 +51548,7 @@ function AU({ box: e, diff: t, selected: n, hover: r, vocabulary: i, onHover: a,
51542
51548
  }, [b]), l(() => {
51543
51549
  n && v.current?.scrollIntoView?.({ block: "nearest" });
51544
51550
  }, [n]);
51545
- let S = DU(e.label), C = DU(e.subLabel), w = kU(e, h), T = CU(t, e.macroClass, e.label), k = TU.includes(e.macroClass) ? TU : [...TU, e.macroClass], A = n ? pU(i, e.label ?? "", e.macroClass) : [], ee = `retrain-labels-${e.key}`, j = (t) => ({
51551
+ let S = DU(e.label), C = DU(e.subLabel), w = kU(e, h), T = CU(t, e.macroClass, e.label), k = TU.includes(e.macroClass) ? TU : [...TU, e.macroClass], A = n ? pU(i, e.label ?? "", e.macroClass) : [], j = `retrain-labels-${e.key}`, M = (t) => ({
51546
51552
  onFocus: c,
51547
51553
  onBlur: d,
51548
51554
  onKeyDown: (e) => {
@@ -51673,15 +51679,15 @@ function AU({ box: e, diff: t, selected: n, hover: r, vocabulary: i, onHover: a,
51673
51679
  className: "min-w-0 flex-1",
51674
51680
  children: /* @__PURE__ */ E(Is, {
51675
51681
  "aria-label": h("subject.label"),
51676
- list: ee,
51682
+ list: j,
51677
51683
  autoComplete: "off",
51678
51684
  placeholder: h("subject.labelPlaceholder"),
51679
51685
  value: e.label ?? "",
51680
- ...j("label")
51686
+ ...M("label")
51681
51687
  })
51682
51688
  }),
51683
51689
  /* @__PURE__ */ E("datalist", {
51684
- id: ee,
51690
+ id: j,
51685
51691
  children: A.map((e) => /* @__PURE__ */ E("option", { value: e }, e))
51686
51692
  })
51687
51693
  ]
@@ -51691,7 +51697,7 @@ function AU({ box: e, diff: t, selected: n, hover: r, vocabulary: i, onHover: a,
51691
51697
  autoComplete: "off",
51692
51698
  placeholder: h("subject.subLabelPlaceholder"),
51693
51699
  value: e.subLabel ?? "",
51694
- ...j("subLabel")
51700
+ ...M("subLabel")
51695
51701
  }),
51696
51702
  S !== null && /* @__PURE__ */ E("p", {
51697
51703
  className: "text-[11px] text-danger",
@@ -51883,9 +51889,9 @@ function VU(e, t) {
51883
51889
  }
51884
51890
  }
51885
51891
  function HU({ frame: e, history: t, detector: n, schema: r, setNotice: i }) {
51886
- let { t: a } = pH(), o = xc({}, { retry: !1 }), s = gc(), c = Sc(), [l, u] = w("teacher"), f = d(() => LU(r, n.kind === "resolved" ? n.modelId : void 0), [r, n]), [p, m] = w(null), h = f.find((e) => e.modelId === p) ?? f[0], [g, _] = w(IU), [v, y] = w(null), b = (o.data ?? []).find((e) => e.id === v) ?? o.data?.[0], [S, C] = w(zU), [T, O] = w(!1), [k, A] = w(!1), ee = x(t.editor);
51887
- ee.current = t.editor;
51888
- let j = l !== "llm", M = l !== "teacher", N = n.kind === "resolved" && h !== void 0, P = b !== void 0 && S.length > 0, F = (!j || N) && (!M || P), te = async () => {
51892
+ let { t: a } = pH(), o = xc({}, { retry: !1 }), s = gc(), c = Sc(), [l, u] = w("teacher"), f = d(() => LU(r, n.kind === "resolved" ? n.modelId : void 0), [r, n]), [p, m] = w(null), h = f.find((e) => e.modelId === p) ?? f[0], [g, _] = w(IU), [v, y] = w(null), b = (o.data ?? []).find((e) => e.id === v) ?? o.data?.[0], [S, C] = w(zU), [T, O] = w(!1), [k, A] = w(!1), j = x(t.editor);
51893
+ j.current = t.editor;
51894
+ let M = l !== "llm", N = l !== "teacher", P = n.kind === "resolved" && h !== void 0, F = b !== void 0 && S.length > 0, I = (!M || P) && (!N || F), ee = async () => {
51889
51895
  if (n.kind !== "resolved" || h === void 0) return "";
51890
51896
  let r = await s.mutateAsync({
51891
51897
  ...gH(e),
@@ -51904,7 +51910,7 @@ function HU({ frame: e, history: t, detector: n, schema: r, setNotice: i }) {
51904
51910
  reason: r.reason,
51905
51911
  detail: r.detail
51906
51912
  });
51907
- let i = OH(ee.current, r.proposals.map((e) => ({
51913
+ let i = OH(j.current, r.proposals.map((e) => ({
51908
51914
  bbox: e.bbox,
51909
51915
  macroClass: e.macroClass,
51910
51916
  ...e.label === void 0 ? {} : { label: e.label },
@@ -51919,7 +51925,7 @@ function HU({ frame: e, history: t, detector: n, schema: r, setNotice: i }) {
51919
51925
  node: n.nodeId
51920
51926
  })
51921
51927
  })));
51922
- ee.current = i.state, t.setEditor(i.state);
51928
+ j.current = i.state, t.setEditor(i.state);
51923
51929
  let o = r.proposals.length - i.skipped;
51924
51930
  return i.skipped > 0 ? a("assist.teacherResultSkipped", {
51925
51931
  name: h.name,
@@ -51929,9 +51935,9 @@ function HU({ frame: e, history: t, detector: n, schema: r, setNotice: i }) {
51929
51935
  name: h.name,
51930
51936
  count: o
51931
51937
  });
51932
- }, I = async (n) => {
51938
+ }, L = async (n) => {
51933
51939
  if (b === void 0) return "";
51934
- let r = ee.current, i = await c.mutateAsync({
51940
+ let r = j.current, i = await c.mutateAsync({
51935
51941
  ...gH(e),
51936
51942
  profileId: b.id,
51937
51943
  classes: [...S],
@@ -51958,7 +51964,7 @@ function HU({ frame: e, history: t, detector: n, schema: r, setNotice: i }) {
51958
51964
  model: i.model,
51959
51965
  reason: e.reason
51960
51966
  })
51961
- })), s = RH(i.reviews, i.model), l = OH(ee.current, o);
51967
+ })), s = RH(i.reviews, i.model), l = OH(j.current, o);
51962
51968
  t.setEditor((e) => LH(OH(e, o).state, s));
51963
51969
  let u = i.proposals.length - l.skipped, d = i.reviews.filter((e) => e.verdict !== "confirmed").length, f = [
51964
51970
  a("assist.llmDrafts", { count: u }),
@@ -51966,11 +51972,11 @@ function HU({ frame: e, history: t, detector: n, schema: r, setNotice: i }) {
51966
51972
  ...i.rejected > 0 ? [a("assist.llmDropped", { count: i.rejected })] : []
51967
51973
  ].join(", ");
51968
51974
  return `${b.name}: ${f}.`;
51969
- }, L = async (e) => {
51975
+ }, R = async (e) => {
51970
51976
  O(!1), A(!0), i(null);
51971
51977
  try {
51972
51978
  let t = [];
51973
- j && t.push(await te()), M && t.push(await I(e)), i(`${t.filter((e) => e !== "").join(" ")} ${a("assist.draftsNotSaved")}`);
51979
+ M && t.push(await ee()), N && t.push(await L(e)), i(`${t.filter((e) => e !== "").join(" ")} ${a("assist.draftsNotSaved")}`);
51974
51980
  } catch (e) {
51975
51981
  i(a("assist.failed", { error: e instanceof Error ? e.message : String(e) }));
51976
51982
  } finally {
@@ -52005,13 +52011,13 @@ function HU({ frame: e, history: t, detector: n, schema: r, setNotice: i }) {
52005
52011
  /* @__PURE__ */ D(W, {
52006
52012
  size: "sm",
52007
52013
  variant: "secondary",
52008
- disabled: !F || k,
52014
+ disabled: !I || k,
52009
52015
  onClick: () => {
52010
- if (M && b?.leavesHouse === !0) {
52016
+ if (N && b?.leavesHouse === !0) {
52011
52017
  O(!0);
52012
52018
  return;
52013
52019
  }
52014
- L(!1);
52020
+ R(!1);
52015
52021
  },
52016
52022
  children: [k ? /* @__PURE__ */ E(_n, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ E(qn, { className: "h-3 w-3" }), /* @__PURE__ */ E("span", {
52017
52023
  className: "ml-1",
@@ -52020,7 +52026,7 @@ function HU({ frame: e, history: t, detector: n, schema: r, setNotice: i }) {
52020
52026
  })
52021
52027
  ]
52022
52028
  }),
52023
- j && (f.length === 0 || n.kind !== "resolved" ? /* @__PURE__ */ E("p", {
52029
+ M && (f.length === 0 || n.kind !== "resolved" ? /* @__PURE__ */ E("p", {
52024
52030
  className: "text-foreground-subtle",
52025
52031
  children: n.kind === "resolved" ? a("assist.noLarger") : a("assist.noNode")
52026
52032
  }) : /* @__PURE__ */ D("div", {
@@ -52060,7 +52066,7 @@ function HU({ frame: e, history: t, detector: n, schema: r, setNotice: i }) {
52060
52066
  })
52061
52067
  ]
52062
52068
  })),
52063
- M && ((o.data ?? []).length === 0 ? /* @__PURE__ */ E("p", {
52069
+ N && ((o.data ?? []).length === 0 ? /* @__PURE__ */ E("p", {
52064
52070
  className: "text-foreground-subtle",
52065
52071
  children: o.isError ? a("assist.profilesUnreadable") : a("assist.noProfile")
52066
52072
  }) : /* @__PURE__ */ D("div", {
@@ -52118,7 +52124,7 @@ function HU({ frame: e, history: t, detector: n, schema: r, setNotice: i }) {
52118
52124
  children: a("common.cancel")
52119
52125
  }), /* @__PURE__ */ E(W, {
52120
52126
  size: "sm",
52121
- onClick: () => void L(!0),
52127
+ onClick: () => void R(!0),
52122
52128
  children: a("assist.confirm.send")
52123
52129
  })] })] })
52124
52130
  })
@@ -52285,7 +52291,7 @@ function dW({ imageSrc: e, imageWidth: t, imageHeight: n, boxes: r, selectedKey:
52285
52291
  let { t: b } = pH(), S = x(null), [C, T] = w({
52286
52292
  w: 0,
52287
52293
  h: 0
52288
- }), [O, k] = w(null), [A, ee] = w(!1), j = x(/* @__PURE__ */ new Map()), M = x({ mode: "none" });
52294
+ }), [O, k] = w(null), [A, j] = w(!1), M = x(/* @__PURE__ */ new Map()), N = x({ mode: "none" });
52289
52295
  f(() => {
52290
52296
  let e = S.current;
52291
52297
  if (e === null) return;
@@ -52299,31 +52305,31 @@ function dW({ imageSrc: e, imageWidth: t, imageHeight: n, boxes: r, selectedKey:
52299
52305
  n.disconnect();
52300
52306
  };
52301
52307
  }, []);
52302
- let N = KH(C.w, C.h, t, n);
52308
+ let P = KH(C.w, C.h, t, n);
52303
52309
  l(() => {
52304
52310
  let e = (e) => {
52305
- e.key !== " " || aW(e.target) || (e.preventDefault(), ee(!0));
52311
+ e.key !== " " || aW(e.target) || (e.preventDefault(), j(!0));
52306
52312
  }, t = (e) => {
52307
- e.key === " " && ee(!1);
52313
+ e.key === " " && j(!1);
52308
52314
  };
52309
52315
  return window.addEventListener("keydown", e), window.addEventListener("keyup", t), () => {
52310
52316
  window.removeEventListener("keydown", e), window.removeEventListener("keyup", t);
52311
52317
  };
52312
52318
  }, []);
52313
- let P = x({
52314
- image: N,
52319
+ let F = x({
52320
+ image: P,
52315
52321
  viewport: a,
52316
52322
  onViewportChange: o
52317
52323
  });
52318
- P.current = {
52319
- image: N,
52324
+ F.current = {
52325
+ image: P,
52320
52326
  viewport: a,
52321
52327
  onViewportChange: o
52322
52328
  }, l(() => {
52323
52329
  let e = S.current;
52324
52330
  if (e === null) return;
52325
52331
  let t = (t) => {
52326
- let { image: n, viewport: r, onViewportChange: i } = P.current;
52332
+ let { image: n, viewport: r, onViewportChange: i } = F.current;
52327
52333
  if (n === null) return;
52328
52334
  t.preventDefault();
52329
52335
  let a = e.getBoundingClientRect();
@@ -52333,34 +52339,34 @@ function dW({ imageSrc: e, imageWidth: t, imageHeight: n, boxes: r, selectedKey:
52333
52339
  e.removeEventListener("wheel", t);
52334
52340
  };
52335
52341
  }, []);
52336
- let F = m((e) => {
52342
+ let I = m((e) => {
52337
52343
  let t = S.current?.getBoundingClientRect();
52338
52344
  return {
52339
52345
  x: e.clientX - (t?.left ?? 0),
52340
52346
  y: e.clientY - (t?.top ?? 0)
52341
52347
  };
52342
- }, []), te = m((e) => N === null ? null : ZU(e.x, e.y, N, a), [N, a]), I = m(() => {
52343
- let e = M.current;
52344
- (e.mode === "move" || e.mode === "resize") && h(), e.mode === "draw" && k(null), M.current = { mode: "none" };
52345
- }, [h]), L = (e) => {
52346
- if (N === null) return;
52347
- let t = F(e);
52348
- if (j.current.set(e.pointerId, t), e.currentTarget.setPointerCapture?.(e.pointerId), j.current.size === 2) {
52349
- I();
52350
- let [e, t] = [...j.current.values()];
52348
+ }, []), ee = m((e) => P === null ? null : ZU(e.x, e.y, P, a), [P, a]), L = m(() => {
52349
+ let e = N.current;
52350
+ (e.mode === "move" || e.mode === "resize") && h(), e.mode === "draw" && k(null), N.current = { mode: "none" };
52351
+ }, [h]), R = (e) => {
52352
+ if (P === null) return;
52353
+ let t = I(e);
52354
+ if (M.current.set(e.pointerId, t), e.currentTarget.setPointerCapture?.(e.pointerId), M.current.size === 2) {
52355
+ L();
52356
+ let [e, t] = [...M.current.values()];
52351
52357
  if (e === void 0 || t === void 0) return;
52352
52358
  let n = uW(e, t);
52353
- M.current = {
52359
+ N.current = {
52354
52360
  mode: "pinch",
52355
52361
  startDistance: Math.max(1, lW(e, t)),
52356
- anchor: ZU(n.x, n.y, N, a),
52362
+ anchor: ZU(n.x, n.y, P, a),
52357
52363
  from: a
52358
52364
  };
52359
52365
  return;
52360
52366
  }
52361
- if (j.current.size > 2) return;
52367
+ if (M.current.size > 2) return;
52362
52368
  if (e.button === 1 || A || s) {
52363
- e.preventDefault(), M.current = {
52369
+ e.preventDefault(), N.current = {
52364
52370
  mode: "pan",
52365
52371
  startPx: t,
52366
52372
  from: a
@@ -52368,14 +52374,14 @@ function dW({ imageSrc: e, imageWidth: t, imageHeight: n, boxes: r, selectedKey:
52368
52374
  return;
52369
52375
  }
52370
52376
  if (e.button !== 0) return;
52371
- let n = ZU(t.x, t.y, N, a), o = {
52372
- x: 12 / N.width * a.w,
52373
- y: 12 / N.height * a.h
52377
+ let n = ZU(t.x, t.y, P, a), o = {
52378
+ x: 12 / P.width * a.w,
52379
+ y: 12 / P.height * a.h
52374
52380
  }, l = r.find((e) => e.key === i);
52375
52381
  if (l !== void 0) {
52376
52382
  let e = nU(l.bbox, n, o);
52377
52383
  if (e !== null && e !== "body") {
52378
- d(), M.current = {
52384
+ d(), N.current = {
52379
52385
  mode: "resize",
52380
52386
  key: l.key,
52381
52387
  handle: e,
@@ -52386,7 +52392,7 @@ function dW({ imageSrc: e, imageWidth: t, imageHeight: n, boxes: r, selectedKey:
52386
52392
  }
52387
52393
  let u = r[XH(r.map((e) => e.bbox), n)];
52388
52394
  if (u !== void 0) {
52389
- u.key !== i && c(u.key), d(), M.current = {
52395
+ u.key !== i && c(u.key), d(), N.current = {
52390
52396
  mode: "move",
52391
52397
  key: u.key,
52392
52398
  start: n,
@@ -52394,112 +52400,112 @@ function dW({ imageSrc: e, imageWidth: t, imageHeight: n, boxes: r, selectedKey:
52394
52400
  };
52395
52401
  return;
52396
52402
  }
52397
- M.current = {
52403
+ N.current = {
52398
52404
  mode: "draw",
52399
52405
  start: n
52400
52406
  }, k(qH(n, n));
52401
- }, ne = (e) => {
52402
- if (N === null) return;
52403
- if (!j.current.has(e.pointerId)) {
52407
+ }, te = (e) => {
52408
+ if (P === null) return;
52409
+ if (!M.current.has(e.pointerId)) {
52404
52410
  if (e.pointerType === "touch" || y === void 0) return;
52405
- let t = F(e), n = rU(r, ZU(t.x, t.y, N, a));
52411
+ let t = I(e), n = rU(r, ZU(t.x, t.y, P, a));
52406
52412
  aU(n, v) || y(n);
52407
52413
  return;
52408
52414
  }
52409
- let t = F(e);
52410
- j.current.set(e.pointerId, t);
52411
- let n = M.current;
52415
+ let t = I(e);
52416
+ M.current.set(e.pointerId, t);
52417
+ let n = N.current;
52412
52418
  switch (n.mode) {
52413
52419
  case "pinch": {
52414
- let [e, t] = [...j.current.values()];
52420
+ let [e, t] = [...M.current.values()];
52415
52421
  if (e === void 0 || t === void 0) return;
52416
- let r = tW(n.from, n.anchor, lW(e, t) / n.startDistance), i = uW(e, t), a = ZU(i.x, i.y, N, r);
52422
+ let r = tW(n.from, n.anchor, lW(e, t) / n.startDistance), i = uW(e, t), a = ZU(i.x, i.y, P, r);
52417
52423
  o(nW(r, n.anchor.x - a.x, n.anchor.y - a.y));
52418
52424
  return;
52419
52425
  }
52420
52426
  case "pan": {
52421
- let e = (t.x - n.startPx.x) / N.width * n.from.w, r = (t.y - n.startPx.y) / N.height * n.from.h;
52427
+ let e = (t.x - n.startPx.x) / P.width * n.from.w, r = (t.y - n.startPx.y) / P.height * n.from.h;
52422
52428
  o(nW(n.from, -e, -r));
52423
52429
  return;
52424
52430
  }
52425
52431
  case "move": {
52426
- let e = ZU(t.x, t.y, N, a);
52432
+ let e = ZU(t.x, t.y, P, a);
52427
52433
  p(n.key, QH(n.from, e.x - n.start.x, e.y - n.start.y));
52428
52434
  return;
52429
52435
  }
52430
52436
  case "resize": {
52431
- let e = ZU(t.x, t.y, N, a);
52437
+ let e = ZU(t.x, t.y, P, a);
52432
52438
  p(n.key, eU(n.from, n.handle, e));
52433
52439
  return;
52434
52440
  }
52435
52441
  case "draw": {
52436
- let e = ZU(t.x, t.y, N, a);
52442
+ let e = ZU(t.x, t.y, P, a);
52437
52443
  k(qH(n.start, e));
52438
52444
  return;
52439
52445
  }
52440
52446
  default: return;
52441
52447
  }
52442
- }, re = (e) => {
52443
- if (!j.current.has(e.pointerId)) return;
52444
- j.current.delete(e.pointerId);
52445
- let t = M.current;
52448
+ }, ne = (e) => {
52449
+ if (!M.current.has(e.pointerId)) return;
52450
+ M.current.delete(e.pointerId);
52451
+ let t = N.current;
52446
52452
  if (t.mode === "pinch") {
52447
- j.current.size < 2 && (M.current = { mode: "none" });
52453
+ M.current.size < 2 && (N.current = { mode: "none" });
52448
52454
  return;
52449
52455
  }
52450
52456
  if (t.mode === "draw") {
52451
- let n = te(F(e)), r = n === null ? null : qH(t.start, n);
52452
- k(null), M.current = { mode: "none" }, r !== null && YH(r) ? u(r) : c(null);
52457
+ let n = ee(I(e)), r = n === null ? null : qH(t.start, n);
52458
+ k(null), N.current = { mode: "none" }, r !== null && YH(r) ? u(r) : c(null);
52453
52459
  return;
52454
52460
  }
52455
- I();
52456
- }, ie = r.find((e) => e.key === i), ae = A || s, oe = x(/* @__PURE__ */ new Map());
52461
+ L();
52462
+ }, re = r.find((e) => e.key === i), ie = A || s, ae = x(/* @__PURE__ */ new Map());
52457
52463
  l(() => {
52458
52464
  if (i === null) return;
52459
52465
  let e = document.activeElement;
52460
- (e === null || e === document.body || S.current?.contains(e)) === !0 && oe.current.get(i)?.focus({ preventScroll: !0 });
52466
+ (e === null || e === document.body || S.current?.contains(e)) === !0 && ae.current.get(i)?.focus({ preventScroll: !0 });
52461
52467
  }, [i]);
52462
- let R = N === null ? null : eW(N, a);
52468
+ let oe = P === null ? null : eW(P, a);
52463
52469
  return /* @__PURE__ */ D("div", {
52464
52470
  ref: S,
52465
52471
  "data-testid": "retrain-canvas",
52466
52472
  className: "relative min-h-0 w-full flex-1 bg-background select-none touch-none overflow-hidden",
52467
- style: { cursor: ae ? "grab" : v === null ? "crosshair" : "move" },
52468
- onPointerDown: L,
52469
- onPointerMove: ne,
52473
+ style: { cursor: ie ? "grab" : v === null ? "crosshair" : "move" },
52474
+ onPointerDown: R,
52475
+ onPointerMove: te,
52470
52476
  onPointerLeave: () => {
52471
52477
  v?.source === "canvas" && y?.(null);
52472
52478
  },
52473
- onPointerUp: re,
52474
- onPointerCancel: re,
52479
+ onPointerUp: ne,
52480
+ onPointerCancel: ne,
52475
52481
  children: [
52476
- R !== null && /* @__PURE__ */ E("img", {
52482
+ oe !== null && /* @__PURE__ */ E("img", {
52477
52483
  src: e,
52478
52484
  alt: b("canvas.frameAlt"),
52479
52485
  draggable: !1,
52480
52486
  className: "absolute max-w-none pointer-events-none",
52481
- style: R
52487
+ style: oe
52482
52488
  }),
52483
- N !== null && _ && (g?.removed ?? []).map((e) => /* @__PURE__ */ E(fW, {
52489
+ P !== null && _ && (g?.removed ?? []).map((e) => /* @__PURE__ */ E(fW, {
52484
52490
  ghost: e,
52485
- rect: $U(e.bbox, N, a),
52486
- bounds: N,
52491
+ rect: $U(e.bbox, P, a),
52492
+ bounds: P,
52487
52493
  dimmed: v !== null
52488
52494
  }, `removed-${e.ref}`)),
52489
- N !== null && r.map((e) => {
52490
- let t = $U(e.bbox, N, a), n = g?.byKey.get(e.key), r = n?.kind ?? uU(e), o = yU(r), s = e.key === i, l = iU(e.key, v), u = o.strokeWidth + (s || l === "hovered" ? 1.5 : 0), d = e.label ?? e.macroClass, f = KU(t, GU(`${d}${e.kind === "model_error" ? " ✕" : ""}${e.flag !== void 0 && e.flag.verdict !== "confirmed" ? " !" : ""}`), N);
52495
+ P !== null && r.map((e) => {
52496
+ let t = $U(e.bbox, P, a), n = g?.byKey.get(e.key), r = n?.kind ?? uU(e), o = yU(r), s = e.key === i, l = iU(e.key, v), u = o.strokeWidth + (s || l === "hovered" ? 1.5 : 0), d = e.label ?? e.macroClass, f = KU(t, GU(`${d}${e.kind === "model_error" ? " ✕" : ""}${e.flag !== void 0 && e.flag.verdict !== "confirmed" ? " !" : ""}`), P);
52491
52497
  return /* @__PURE__ */ D("div", { children: [l === "hovered" && n?.originBbox !== void 0 && /* @__PURE__ */ E("div", {
52492
52498
  "data-testid": `retrain-origin-${e.key}`,
52493
52499
  "aria-hidden": "true",
52494
52500
  className: "absolute pointer-events-none",
52495
52501
  style: {
52496
- ...$U(n.originBbox, N, a),
52502
+ ...$U(n.originBbox, P, a),
52497
52503
  border: `1px dashed ${o.stroke}`,
52498
52504
  opacity: .55
52499
52505
  }
52500
52506
  }), /* @__PURE__ */ E("div", {
52501
52507
  ref: (t) => {
52502
- t === null ? oe.current.delete(e.key) : oe.current.set(e.key, t);
52508
+ t === null ? ae.current.delete(e.key) : ae.current.set(e.key, t);
52503
52509
  },
52504
52510
  role: "button",
52505
52511
  tabIndex: 0,
@@ -52542,8 +52548,8 @@ function dW({ imageSrc: e, imageWidth: t, imageHeight: n, boxes: r, selectedKey:
52542
52548
  })
52543
52549
  })] }, e.key);
52544
52550
  }),
52545
- N !== null && ie !== void 0 && ZH.map((e) => {
52546
- let t = QU(tU(ie.bbox, e), N, a);
52551
+ P !== null && re !== void 0 && ZH.map((e) => {
52552
+ let t = QU(tU(re.bbox, e), P, a);
52547
52553
  return /* @__PURE__ */ E("div", {
52548
52554
  "data-testid": `retrain-handle-${e}`,
52549
52555
  className: "absolute h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 rounded-sm border border-background bg-primary pointer-events-none",
@@ -52553,9 +52559,9 @@ function dW({ imageSrc: e, imageWidth: t, imageHeight: n, boxes: r, selectedKey:
52553
52559
  }
52554
52560
  }, e);
52555
52561
  }),
52556
- O !== null && N !== null && /* @__PURE__ */ E("div", {
52562
+ O !== null && P !== null && /* @__PURE__ */ E("div", {
52557
52563
  className: "absolute border border-dashed border-primary pointer-events-none",
52558
- style: $U(O, N, a)
52564
+ style: $U(O, P, a)
52559
52565
  })
52560
52566
  ]
52561
52567
  });
@@ -52998,15 +53004,15 @@ function FW(e) {
52998
53004
  S();
52999
53005
  var IW = "person";
53000
53006
  function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep: i, onFramesChanged: a, onSaved: o, onDirtyChange: s, setNotice: c }) {
53001
- let { t: u } = pH(), f = x(null), p = e.find((e) => e.frameId === t), h = p?.deviceId ?? null, g = AW(() => DH([], [])), { editor: _, setEditor: v, resetEditor: y, selectOnly: b } = g, S = pW(), [C, T] = w(null), [k, A] = w(!0), [ee, j] = w(!1), [M, N] = w(!1), [P, F] = w(null), te = _c({ frameIds: [t] }), I = d(() => e.map((e) => e.frameId), [e]), L = _c({ frameIds: I }, {
53002
- enabled: I.length > 0,
53007
+ let { t: u } = pH(), f = x(null), p = e.find((e) => e.frameId === t), h = p?.deviceId ?? null, g = AW(() => DH([], [])), { editor: _, setEditor: v, resetEditor: y, selectOnly: b } = g, S = pW(), [C, T] = w(null), [k, A] = w(!0), [j, M] = w(!1), [N, P] = w(!1), [F, I] = w(null), ee = _c({ frameIds: [t] }), L = d(() => e.map((e) => e.frameId), [e]), R = _c({ frameIds: L }, {
53008
+ enabled: L.length > 0,
53003
53009
  staleTime: 6e4
53004
- }), ne = d(() => fU(L.data ?? []), [L.data]), re = yH(p?.imageUrl === void 0 ? void 0 : Ui(p.imageUrl)), ie = gc(), ae = vc(), oe = bc(), { detector: R, schema: se } = _W(h), ce = x({
53005
- stored: te.data,
53010
+ }), te = d(() => fU(R.data ?? []), [R.data]), ne = yH(p?.imageUrl === void 0 ? void 0 : Ui(p.imageUrl)), re = gc(), ie = vc(), ae = bc(), { detector: oe, schema: se } = _W(h), ce = x({
53011
+ stored: ee.data,
53006
53012
  copy: p
53007
53013
  });
53008
53014
  ce.current = {
53009
- stored: te.data,
53015
+ stored: ee.data,
53010
53016
  copy: p
53011
53017
  };
53012
53018
  let le = x(UH(DH([], []))), ue = WH(_, le.current), de = x(ue);
@@ -53015,12 +53021,12 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53015
53021
  l(() => {
53016
53022
  let e = fe.current === t;
53017
53023
  if (e && de.current && !me.current) return;
53018
- me.current = !1, fe.current = t, e || (S.fit(), T(null), F(null));
53024
+ me.current = !1, fe.current = t, e || (S.fit(), T(null), I(null));
53019
53025
  let { stored: n, copy: r } = ce.current, i = DH((n ?? []).filter((e) => e.mediaKey === t), r?.pipelineBoxes ?? [], r?.dismissed ?? []);
53020
53026
  le.current = UH(i), y(i);
53021
53027
  }, [
53022
53028
  t,
53023
- te.dataUpdatedAt,
53029
+ ee.dataUpdatedAt,
53024
53030
  he,
53025
53031
  y,
53026
53032
  S.fit
@@ -53032,28 +53038,28 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53032
53038
  T((e) => oU(e, _.boxes.map((e) => e.key)));
53033
53039
  }, [_.boxes]);
53034
53040
  let _e = FW(ue), ve = m(async (e) => {
53035
- p !== void 0 && (await oe.mutateAsync({
53041
+ p !== void 0 && (await ae.mutateAsync({
53036
53042
  ...gH(p),
53037
53043
  complete: e
53038
53044
  }), await a());
53039
53045
  }, [
53040
53046
  p,
53041
- oe,
53047
+ ae,
53042
53048
  a
53043
53049
  ]), ye = m(async (e) => {
53044
53050
  if (p === void 0) return;
53045
- if (c(null), R.kind !== "resolved") {
53046
- c(u(`assistGap.${R.gap}`));
53051
+ if (c(null), oe.kind !== "resolved") {
53052
+ c(u(`assistGap.${oe.gap}`));
53047
53053
  return;
53048
53054
  }
53049
- let t = await ie.mutateAsync({
53055
+ let t = await re.mutateAsync({
53050
53056
  ...gH(p),
53051
53057
  subject: e === "package" ? { kind: "package" } : {
53052
53058
  kind: "objects",
53053
- modelId: R.modelId,
53054
- minScore: R.minScore
53059
+ modelId: oe.modelId,
53060
+ minScore: oe.minScore
53055
53061
  },
53056
- nodeId: R.nodeId
53062
+ nodeId: oe.nodeId
53057
53063
  });
53058
53064
  if (t.kind === "refused") {
53059
53065
  c(t.reason === "no-zone" ? u("workbench.noZone") : t.detail === void 0 ? u("workbench.refused", { reason: t.reason }) : u("workbench.refusedDetail", {
@@ -53086,8 +53092,8 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53086
53092
  ].join(" — ")}. ${u("workbench.proposalsTail")}`);
53087
53093
  }, [
53088
53094
  p,
53089
- ie,
53090
- R,
53095
+ re,
53096
+ oe,
53091
53097
  _,
53092
53098
  v,
53093
53099
  c,
@@ -53099,16 +53105,16 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53099
53105
  let e = zH(_);
53100
53106
  Se(!0);
53101
53107
  try {
53102
- await ae.mutateAsync({
53108
+ await ie.mutateAsync({
53103
53109
  ...gH(p),
53104
53110
  annotations: [...VH(_)],
53105
53111
  dismissed: [...HH(_)],
53106
53112
  ...p.revision === void 0 ? {} : { expectedRevision: p.revision }
53107
- }), me.current = !0, F(null), await te.refetch(), L.refetch();
53113
+ }), me.current = !0, I(null), await ee.refetch(), R.refetch();
53108
53114
  } catch (e) {
53109
53115
  let t = pe(e instanceof Error ? e.message : "");
53110
53116
  if (t === null) throw e;
53111
- F(t.currentRevision);
53117
+ I(t.currentRevision);
53112
53118
  return;
53113
53119
  } finally {
53114
53120
  Se(!1);
@@ -53117,22 +53123,22 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53117
53123
  }, [
53118
53124
  p,
53119
53125
  _,
53120
- ae,
53121
- te,
53122
- L,
53126
+ ie,
53127
+ ee,
53128
+ R,
53123
53129
  o,
53124
53130
  c,
53125
53131
  u
53126
53132
  ]), we = m(async () => {
53127
- me.current = !0, F(null), await Promise.all([te.refetch(), o?.()]);
53128
- }, [te, o]), Te = re.src, Ee = OU(_.boxes) && p !== void 0, De = zH(_), Oe = (e) => r(e) ? (_e(() => {
53133
+ me.current = !0, I(null), await Promise.all([ee.refetch(), o?.()]);
53134
+ }, [ee, o]), Te = ne.src, Ee = OU(_.boxes) && p !== void 0, De = zH(_), Oe = (e) => r(e) ? (_e(() => {
53129
53135
  i(e);
53130
53136
  }), !0) : !1;
53131
53137
  PW(!xe, {
53132
53138
  history: g,
53133
53139
  onNextFrame: () => Oe(1),
53134
53140
  onPrevFrame: () => Oe(-1),
53135
- onToggleComplete: () => p === void 0 || oe.isPending ? !1 : (ve(!p.complete), !0),
53141
+ onToggleComplete: () => p === void 0 || ae.isPending ? !1 : (ve(!p.complete), !0),
53136
53142
  onSave: () => !Ee || xe || !ue ? !1 : (Ce(), !0),
53137
53143
  onZoomIn: S.zoomIn,
53138
53144
  onZoomOut: S.zoomOut,
@@ -53141,7 +53147,7 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53141
53147
  let ke = /* @__PURE__ */ D("div", {
53142
53148
  id: "retrain-subjects-panel",
53143
53149
  "data-testid": "retrain-subjects-panel",
53144
- className: `${ee ? "flex" : "hidden"} absolute inset-x-0 bottom-0 z-20 max-h-[70%] min-h-0 flex-col overflow-hidden rounded-md border border-border bg-background-elevated shadow-lg lg:static lg:z-auto lg:flex lg:max-h-none lg:w-[380px] lg:shrink-0 lg:bg-surface lg:shadow-none`,
53150
+ className: `${j ? "flex" : "hidden"} absolute inset-x-0 bottom-0 z-20 max-h-[70%] min-h-0 flex-col overflow-hidden rounded-md border border-border bg-background-elevated shadow-lg lg:static lg:z-auto lg:flex lg:max-h-none lg:w-[380px] lg:shrink-0 lg:bg-surface lg:shadow-none`,
53145
53151
  children: [
53146
53152
  /* @__PURE__ */ D("div", {
53147
53153
  className: "flex shrink-0 flex-wrap items-center gap-2 border-b border-border px-3 py-2",
@@ -53157,7 +53163,7 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53157
53163
  "aria-label": u("workbench.closeList"),
53158
53164
  className: "lg:hidden",
53159
53165
  onClick: () => {
53160
- j(!1);
53166
+ M(!1);
53161
53167
  }
53162
53168
  }),
53163
53169
  p?.origin === "recording" && /* @__PURE__ */ E(Sl, {
@@ -53167,7 +53173,7 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53167
53173
  /* @__PURE__ */ D(W, {
53168
53174
  variant: "secondary",
53169
53175
  size: "sm",
53170
- disabled: ie.isPending || R.kind !== "resolved",
53176
+ disabled: re.isPending || oe.kind !== "resolved",
53171
53177
  onClick: () => void ye("objects"),
53172
53178
  children: [/* @__PURE__ */ E(di, { className: "h-3 w-3" }), /* @__PURE__ */ E("span", {
53173
53179
  className: "ml-1",
@@ -53177,7 +53183,7 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53177
53183
  /* @__PURE__ */ D(W, {
53178
53184
  variant: "secondary",
53179
53185
  size: "sm",
53180
- disabled: ie.isPending || R.kind !== "resolved",
53186
+ disabled: re.isPending || oe.kind !== "resolved",
53181
53187
  onClick: () => void ye("package"),
53182
53188
  children: [/* @__PURE__ */ E(di, { className: "h-3 w-3" }), /* @__PURE__ */ E("span", {
53183
53189
  className: "ml-1",
@@ -53188,11 +53194,11 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53188
53194
  }),
53189
53195
  /* @__PURE__ */ E("p", {
53190
53196
  className: "shrink-0 border-b border-border px-3 py-1 text-[11px] text-foreground-subtle",
53191
- children: R.kind === "resolved" ? u("workbench.proposalsFrom", {
53192
- model: R.modelId,
53193
- score: R.minScore.toFixed(2),
53194
- node: R.nodeId
53195
- }) : u(`assistGap.${R.gap}`)
53197
+ children: oe.kind === "resolved" ? u("workbench.proposalsFrom", {
53198
+ model: oe.modelId,
53199
+ score: oe.minScore.toFixed(2),
53200
+ node: oe.nodeId
53201
+ }) : u(`assistGap.${oe.gap}`)
53196
53202
  }),
53197
53203
  p !== void 0 && /* @__PURE__ */ D("div", {
53198
53204
  className: "shrink-0 border-b border-border",
@@ -53200,20 +53206,20 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53200
53206
  variant: "ghost",
53201
53207
  size: "sm",
53202
53208
  className: "w-full justify-start",
53203
- "aria-expanded": M,
53209
+ "aria-expanded": N,
53204
53210
  onClick: () => {
53205
- N((e) => !e);
53211
+ P((e) => !e);
53206
53212
  },
53207
- children: [E(M ? _i : vi, { className: "h-3 w-3" }), /* @__PURE__ */ E("span", {
53213
+ children: [E(N ? _i : vi, { className: "h-3 w-3" }), /* @__PURE__ */ E("span", {
53208
53214
  className: "ml-1 text-[11px]",
53209
53215
  children: u("workbench.assist")
53210
53216
  })]
53211
- }), M && /* @__PURE__ */ E("div", {
53217
+ }), N && /* @__PURE__ */ E("div", {
53212
53218
  className: "max-h-64 overflow-y-auto",
53213
53219
  children: /* @__PURE__ */ E(HU, {
53214
53220
  frame: p,
53215
53221
  history: g,
53216
- detector: R,
53222
+ detector: oe,
53217
53223
  schema: se,
53218
53224
  setNotice: c
53219
53225
  })
@@ -53227,7 +53233,7 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53227
53233
  review: ge,
53228
53234
  showRemoved: k,
53229
53235
  hover: C,
53230
- vocabulary: ne,
53236
+ vocabulary: te,
53231
53237
  onHover: T,
53232
53238
  onSelect: (e) => {
53233
53239
  b((t) => IH(t, e));
@@ -53267,13 +53273,13 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53267
53273
  showRemoved: k,
53268
53274
  onShowRemovedChange: A
53269
53275
  }),
53270
- P !== null && /* @__PURE__ */ D("div", {
53276
+ F !== null && /* @__PURE__ */ D("div", {
53271
53277
  role: "alert",
53272
53278
  "data-testid": "retrain-conflict",
53273
53279
  className: "flex shrink-0 flex-wrap items-center gap-2 rounded-md border border-danger bg-danger/10 px-3 py-1.5 text-[11px] text-foreground",
53274
53280
  children: [/* @__PURE__ */ E("span", {
53275
53281
  className: "min-w-0 flex-1",
53276
- children: u("workbench.conflict", { revision: String(P) })
53282
+ children: u("workbench.conflict", { revision: String(F) })
53277
53283
  }), /* @__PURE__ */ E(W, {
53278
53284
  variant: "secondary",
53279
53285
  size: "sm",
@@ -53302,7 +53308,7 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53302
53308
  }),
53303
53309
  Te === null || p === void 0 ? /* @__PURE__ */ E("div", {
53304
53310
  className: "flex flex-1 items-center justify-center gap-2 p-6 text-xs text-foreground-subtle",
53305
- children: re.failed ? u("workbench.couldNotLoad") : /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E(_n, { className: "h-3.5 w-3.5 animate-spin" }), u("workbench.loading")] })
53311
+ children: ne.failed ? u("workbench.couldNotLoad") : /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E(_n, { className: "h-3.5 w-3.5 animate-spin" }), u("workbench.loading")] })
53306
53312
  }) : /* @__PURE__ */ E(dW, {
53307
53313
  imageSrc: Te,
53308
53314
  imageWidth: p.width,
@@ -53328,16 +53334,16 @@ function LW({ frames: e, activeFrameId: t, framePosition: n, canStep: r, onStep:
53328
53334
  }),
53329
53335
  /* @__PURE__ */ E(mU, {
53330
53336
  subjectCount: _.boxes.length,
53331
- drawerOpen: ee,
53337
+ drawerOpen: j,
53332
53338
  onToggleDrawer: () => {
53333
- j((e) => !e);
53339
+ M((e) => !e);
53334
53340
  },
53335
53341
  drafts: De,
53336
53342
  onAcceptAll: () => {
53337
53343
  v((e) => NH(e));
53338
53344
  },
53339
53345
  complete: p?.complete === !0,
53340
- completeDisabled: p === void 0 || oe.isPending,
53346
+ completeDisabled: p === void 0 || ae.isPending,
53341
53347
  onCompleteChange: (e) => void ve(e),
53342
53348
  canSave: Ee,
53343
53349
  saving: xe,
@@ -54232,19 +54238,19 @@ function jG() {
54232
54238
  u
54233
54239
  ]), A = m((e) => {
54234
54240
  o(e), fG(e);
54235
- }, []), ee = m((e) => {
54241
+ }, []), j = m((e) => {
54236
54242
  A(e);
54237
- }, [A]), j = m(() => {
54243
+ }, [A]), M = m(() => {
54238
54244
  c(null), A(null);
54239
- }, [A]), M = v.data?.frames ?? [], N = m(async () => {
54245
+ }, [A]), N = v.data?.frames ?? [], P = m(async () => {
54240
54246
  await Promise.all([v.refetch(), _.refetch()]);
54241
- }, [v, _]), P = d(() => M.map((e) => e.frameId), [M]), F = v.data?.total, te = pG(F ?? 0, r), I = m((e) => a === null ? { kind: "none" } : mG(P, a, e, t.page, te), [
54242
- P,
54247
+ }, [v, _]), F = d(() => N.map((e) => e.frameId), [N]), I = v.data?.total, ee = pG(I ?? 0, r), L = m((e) => a === null ? { kind: "none" } : mG(F, a, e, t.page, ee), [
54248
+ F,
54243
54249
  a,
54244
54250
  t.page,
54245
- te
54246
- ]), L = m((e) => I(e).kind !== "none", [I]), ne = m((e) => {
54247
- let n = I(e);
54251
+ ee
54252
+ ]), R = m((e) => L(e).kind !== "none", [L]), te = m((e) => {
54253
+ let n = L(e);
54248
54254
  n.kind === "frame" ? A(n.frameId) : n.kind === "page" && (c({
54249
54255
  page: n.page,
54250
54256
  edge: n.edge
@@ -54253,7 +54259,7 @@ function jG() {
54253
54259
  page: n.page
54254
54260
  }));
54255
54261
  }, [
54256
- I,
54262
+ L,
54257
54263
  A,
54258
54264
  u,
54259
54265
  t
@@ -54266,20 +54272,20 @@ function jG() {
54266
54272
  v.data,
54267
54273
  A
54268
54274
  ]), l(() => {
54269
- a === null || s !== null || v.isFetching || v.data === void 0 || P.includes(a) || A(null);
54275
+ a === null || s !== null || v.isFetching || v.data === void 0 || F.includes(a) || A(null);
54270
54276
  }, [
54271
54277
  a,
54272
54278
  s,
54273
54279
  v.isFetching,
54274
54280
  v.data,
54275
- P,
54281
+ F,
54276
54282
  A
54277
54283
  ]);
54278
- let re = (() => {
54279
- let n = a === null ? -1 : P.indexOf(a);
54280
- return n < 0 || F === void 0 ? "…" : e("frames.position", {
54284
+ let ne = (() => {
54285
+ let n = a === null ? -1 : F.indexOf(a);
54286
+ return n < 0 || I === void 0 ? "…" : e("frames.position", {
54281
54287
  index: (t.page - 1) * r + n + 1,
54282
- total: F
54288
+ total: I
54283
54289
  });
54284
54290
  })();
54285
54291
  return /* @__PURE__ */ D("div", {
@@ -54336,18 +54342,18 @@ function jG() {
54336
54342
  page: 1
54337
54343
  });
54338
54344
  },
54339
- onOpenFrame: ee
54345
+ onOpenFrame: j
54340
54346
  }),
54341
54347
  a === null ? null : /* @__PURE__ */ E(zW, {
54342
54348
  open: !0,
54343
- frames: M,
54349
+ frames: N,
54344
54350
  activeFrameId: a,
54345
- framePosition: re,
54346
- canStep: L,
54347
- onStep: ne,
54348
- onClose: j,
54349
- onFramesChanged: N,
54350
- onSaved: N
54351
+ framePosition: ne,
54352
+ canStep: R,
54353
+ onStep: te,
54354
+ onClose: M,
54355
+ onFramesChanged: P,
54356
+ onSaved: P
54351
54357
  })
54352
54358
  ]
54353
54359
  });
@@ -55353,7 +55359,7 @@ function EK(e) {
55353
55359
  return t;
55354
55360
  }
55355
55361
  function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName: i, onStarted: a, onClose: o }) {
55356
- let { t: s } = pH(), c = Wi(), { nodes: u } = aa(), f = d(() => u.filter((e) => e.isOnline).map((e) => e.id), [u]), p = f.join("\0"), [m, h] = w(SK), [g, _] = w(""), [v, y] = w(""), [b, x] = w(""), [S, C] = w(null), [T, k] = w(!1), [A, ee] = w(!1), [j, M] = w(!1), N = $G(async () => {
55362
+ let { t: s } = pH(), c = Wi(), { nodes: u } = aa(), f = d(() => u.filter((e) => e.isOnline).map((e) => e.id), [u]), p = f.join("\0"), [m, h] = w(SK), [g, _] = w(""), [v, y] = w(""), [b, x] = w(""), [S, C] = w(null), [T, k] = w(!1), [A, j] = w(!1), [M, N] = w(!1), P = $G(async () => {
55357
55363
  if (n.length === 0) return {
55358
55364
  models: [],
55359
55365
  clusterRootModelIds: []
@@ -55370,12 +55376,12 @@ function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName:
55370
55376
  });
55371
55377
  } catch {}
55372
55378
  })), gK(n, t);
55373
- }, [p, n.map((e) => e.modelId).join("\0")]), P = N.state.status === "ok" ? N.state.data.models : n.map((e) => ({
55379
+ }, [p, n.map((e) => e.modelId).join("\0")]), F = P.state.status === "ok" ? P.state.data.models : n.map((e) => ({
55374
55380
  modelId: e.modelId,
55375
55381
  label: e.label,
55376
55382
  ...e.recommended ? { recommended: !0 } : {},
55377
55383
  placements: []
55378
- })), F = N.state.status === "ok" ? N.state.data.clusterRootModelIds : [];
55384
+ })), I = P.state.status === "ok" ? P.state.data.clusterRootModelIds : [];
55379
55385
  l(() => {
55380
55386
  h((e) => {
55381
55387
  let n = {
@@ -55385,46 +55391,46 @@ function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName:
55385
55391
  return n.entryId === "" && r !== void 0 && (n = xK(n, r)), n;
55386
55392
  });
55387
55393
  }, [t]), l(() => {
55388
- if (A || N.state.status !== "ok") return;
55389
- let e = P.map((e) => e.modelId);
55390
- if (j) {
55391
- let t = oM(e, N.state.data.clusterRootModelIds);
55394
+ if (A || P.state.status !== "ok") return;
55395
+ let e = F.map((e) => e.modelId);
55396
+ if (M) {
55397
+ let t = oM(e, P.state.data.clusterRootModelIds);
55392
55398
  if (t.length === 0) return;
55393
55399
  h((e) => e.baseModelIds.length === 0 ? {
55394
55400
  ...e,
55395
55401
  baseModelIds: t
55396
55402
  } : e);
55397
55403
  } else {
55398
- let t = uM(e, N.state.data.clusterRootModelIds, P);
55404
+ let t = uM(e, P.state.data.clusterRootModelIds, F);
55399
55405
  if (t === void 0) return;
55400
55406
  h((e) => e.baseModelIds.length === 0 ? {
55401
55407
  ...e,
55402
55408
  baseModelIds: [t]
55403
55409
  } : e);
55404
55410
  }
55405
- ee(!0);
55411
+ j(!0);
55406
55412
  }, [
55407
- N.state,
55408
- P,
55413
+ P.state,
55414
+ F,
55409
55415
  A,
55410
- j
55416
+ M
55411
55417
  ]);
55412
- let te = bK(m), I = $G(async () => te === null ? null : e.training.planJob.query(te), [JSON.stringify(te)]), L = I.state.status === "ok" ? I.state.data : null;
55418
+ let ee = bK(m), L = $G(async () => ee === null ? null : e.training.planJob.query(ee), [JSON.stringify(ee)]), R = L.state.status === "ok" ? L.state.data : null;
55413
55419
  l(() => {
55414
- L?.defaults != null && (y(L.defaults.maxCostUsd.toFixed(2)), x((L.defaults.maxRuntimeSec / 3600).toFixed(1)));
55415
- }, [L?.defaults?.maxCostUsd, L?.defaults?.maxRuntimeSec]);
55416
- let ne = t.find((e) => e.entryId === m.entryId), re = Number(v), ie = Number(b), ae = te !== null && m.baseModelIds.length > 0 && L !== null && L.refusal === null && re > 0 && ie > 0 && g.trim() !== "" && !T, oe = async () => {
55417
- if (te === null || L === null || m.baseModelIds.length === 0) return;
55420
+ R?.defaults != null && (y(R.defaults.maxCostUsd.toFixed(2)), x((R.defaults.maxRuntimeSec / 3600).toFixed(1)));
55421
+ }, [R?.defaults?.maxCostUsd, R?.defaults?.maxRuntimeSec]);
55422
+ let te = t.find((e) => e.entryId === m.entryId), ne = Number(v), re = Number(b), ie = ee !== null && m.baseModelIds.length > 0 && R !== null && R.refusal === null && ne > 0 && re > 0 && g.trim() !== "" && !T, ae = async () => {
55423
+ if (ee === null || R === null || m.baseModelIds.length === 0) return;
55418
55424
  let t = m.baseModelIds.length;
55419
55425
  if (await c({
55420
55426
  title: s(t > 1 ? "newJob.confirm.batchTitle" : "newJob.confirm.title"),
55421
- message: t > 1 ? `${L.dataNotice}\n\n${s("newJob.confirm.batchMessage", {
55427
+ message: t > 1 ? `${R.dataNotice}\n\n${s("newJob.confirm.batchMessage", {
55422
55428
  jobs: t,
55423
- cap: re.toFixed(2),
55424
- hours: ie
55425
- })}` : `${L.dataNotice}\n\n${s("newJob.confirm.message", {
55426
- cap: re.toFixed(2),
55427
- hours: ie
55429
+ cap: ne.toFixed(2),
55430
+ hours: re
55431
+ })}` : `${R.dataNotice}\n\n${s("newJob.confirm.message", {
55432
+ cap: ne.toFixed(2),
55433
+ hours: re
55428
55434
  })}`,
55429
55435
  confirmLabel: s("newJob.confirm.confirm"),
55430
55436
  variant: "warning"
@@ -55435,11 +55441,11 @@ function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName:
55435
55441
  let t = m.baseModelIds[0];
55436
55442
  if (t === void 0) return;
55437
55443
  let n = await e.training.startJob.mutate({
55438
- ...te,
55444
+ ...ee,
55439
55445
  baseModelId: t,
55440
55446
  name: g.trim(),
55441
- maxCostUsd: re,
55442
- maxRuntimeSec: Math.round(ie * 3600),
55447
+ maxCostUsd: ne,
55448
+ maxRuntimeSec: Math.round(re * 3600),
55443
55449
  idempotencyKey: crypto.randomUUID()
55444
55450
  });
55445
55451
  n.kind === "refused" ? C(s("newJob.refused", {
@@ -55448,17 +55454,17 @@ function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName:
55448
55454
  })) : (a(), o?.());
55449
55455
  } else {
55450
55456
  let t = await e.training.startJobBatch.mutate({
55451
- selection: te.selection,
55452
- entryId: te.entryId,
55453
- gpuType: te.gpuType,
55454
- region: te.region,
55455
- preset: te.preset,
55456
- freeze: te.freeze,
55457
- holdoutCameras: te.holdoutCameras,
55457
+ selection: ee.selection,
55458
+ entryId: ee.entryId,
55459
+ gpuType: ee.gpuType,
55460
+ region: ee.region,
55461
+ preset: ee.preset,
55462
+ freeze: ee.freeze,
55463
+ holdoutCameras: ee.holdoutCameras,
55458
55464
  baseModelIds: [...m.baseModelIds],
55459
55465
  name: g.trim(),
55460
- maxCostUsd: re,
55461
- maxRuntimeSec: Math.round(ie * 3600),
55466
+ maxCostUsd: ne,
55467
+ maxRuntimeSec: Math.round(re * 3600),
55462
55468
  idempotencyKey: crypto.randomUUID()
55463
55469
  });
55464
55470
  t.kind === "refused" ? C(`Refused (${t.reason}): ${t.detail}`) : (a(), o?.());
@@ -55469,11 +55475,11 @@ function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName:
55469
55475
  k(!1);
55470
55476
  }
55471
55477
  }
55472
- }, R = (e) => h((t) => ({
55478
+ }, oe = (e) => h((t) => ({
55473
55479
  ...t,
55474
55480
  ...e
55475
- })), se = L?.split?.holdoutCameras ?? [], ce = (e) => {
55476
- M(e), e || h((e) => ({
55481
+ })), se = R?.split?.holdoutCameras ?? [], ce = (e) => {
55482
+ N(e), e || h((e) => ({
55477
55483
  ...e,
55478
55484
  baseModelIds: e.baseModelIds[0] === void 0 ? [] : [e.baseModelIds[0]]
55479
55485
  }));
@@ -55515,7 +55521,7 @@ function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName:
55515
55521
  children: [
55516
55522
  /* @__PURE__ */ E(bj, {
55517
55523
  checked: m.collectionIds.includes(e.id),
55518
- onChange: (t) => R({ collectionIds: t.target.checked ? [...m.collectionIds, e.id] : m.collectionIds.filter((t) => t !== e.id) })
55524
+ onChange: (t) => oe({ collectionIds: t.target.checked ? [...m.collectionIds, e.id] : m.collectionIds.filter((t) => t !== e.id) })
55519
55525
  }),
55520
55526
  e.name,
55521
55527
  /* @__PURE__ */ D("span", {
@@ -55536,7 +55542,7 @@ function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName:
55536
55542
  value: m.workState,
55537
55543
  onChange: (e) => {
55538
55544
  let t = e.target.value;
55539
- (t === "complete" || t === "annotated_or_complete" || t === "any_annotated") && R({ workState: t });
55545
+ (t === "complete" || t === "annotated_or_complete" || t === "any_annotated") && oe({ workState: t });
55540
55546
  },
55541
55547
  options: yK.map((e) => ({
55542
55548
  value: e,
@@ -55550,23 +55556,23 @@ function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName:
55550
55556
  children: [
55551
55557
  /* @__PURE__ */ E("span", {
55552
55558
  className: "text-sm text-foreground",
55553
- children: s(j ? "newJob.baseModels" : "newJob.baseModel")
55559
+ children: s(M ? "newJob.baseModels" : "newJob.baseModel")
55554
55560
  }),
55555
55561
  /* @__PURE__ */ E("p", {
55556
55562
  className: "text-xs text-foreground-muted",
55557
55563
  children: s("newJob.baseModelHint")
55558
55564
  }),
55559
55565
  /* @__PURE__ */ E(dM, {
55560
- models: P,
55561
- clusterRootModelIds: F,
55566
+ models: F,
55567
+ clusterRootModelIds: I,
55562
55568
  value: m.baseModelIds,
55563
- onChange: (e) => R({ baseModelIds: e }),
55564
- multiple: j
55569
+ onChange: (e) => oe({ baseModelIds: e }),
55570
+ multiple: M
55565
55571
  }),
55566
55572
  /* @__PURE__ */ D("label", {
55567
55573
  className: "flex items-center gap-1.5 text-sm text-foreground-muted",
55568
55574
  children: [/* @__PURE__ */ E(bj, {
55569
- checked: j,
55575
+ checked: M,
55570
55576
  onChange: (e) => ce(e.target.checked),
55571
55577
  "data-testid": "new-job-advanced-multi"
55572
55578
  }), s("newJob.advancedMulti")]
@@ -55580,7 +55586,7 @@ function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName:
55580
55586
  className: "space-y-1",
55581
55587
  children: [/* @__PURE__ */ E("span", { children: s("newJob.preset.label") }), /* @__PURE__ */ E(Gs, {
55582
55588
  value: m.preset,
55583
- onChange: (e) => R({ preset: e.target.value === "quick" ? "quick" : e.target.value === "thorough" ? "thorough" : "standard" }),
55589
+ onChange: (e) => oe({ preset: e.target.value === "quick" ? "quick" : e.target.value === "thorough" ? "thorough" : "standard" }),
55584
55590
  options: vK.map((e) => ({
55585
55591
  value: e,
55586
55592
  label: s(`newJob.preset.${e}`)
@@ -55592,7 +55598,7 @@ function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName:
55592
55598
  children: [/* @__PURE__ */ E("span", { children: s("newJob.freeze") }), /* @__PURE__ */ E(Is, {
55593
55599
  inputMode: "numeric",
55594
55600
  value: m.freeze,
55595
- onChange: (e) => R({ freeze: e.target.value }),
55601
+ onChange: (e) => oe({ freeze: e.target.value }),
55596
55602
  placeholder: s("newJob.freezePlaceholder")
55597
55603
  })]
55598
55604
  }),
@@ -55600,8 +55606,8 @@ function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName:
55600
55606
  className: "space-y-1",
55601
55607
  children: [/* @__PURE__ */ E("span", { children: "GPU" }), /* @__PURE__ */ E(Gs, {
55602
55608
  value: m.gpuType,
55603
- onChange: (e) => R({ gpuType: e.target.value }),
55604
- options: (ne?.gpuTypes ?? []).map((e) => ({
55609
+ onChange: (e) => oe({ gpuType: e.target.value }),
55610
+ options: (te?.gpuTypes ?? []).map((e) => ({
55605
55611
  value: e.id,
55606
55612
  label: `${e.label} — $${e.usdPerHour.toFixed(2)}/h`
55607
55613
  }))
@@ -55611,8 +55617,8 @@ function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName:
55611
55617
  className: "space-y-1",
55612
55618
  children: [/* @__PURE__ */ E("span", { children: s("newJob.region") }), /* @__PURE__ */ E(Gs, {
55613
55619
  value: m.region,
55614
- onChange: (e) => R({ region: e.target.value }),
55615
- options: (ne?.regions ?? []).map((e) => ({
55620
+ onChange: (e) => oe({ region: e.target.value }),
55621
+ options: (te?.regions ?? []).map((e) => ({
55616
55622
  value: e.id,
55617
55623
  label: e.priceMultiplier === 1 ? e.label : `${e.label} (×${String(e.priceMultiplier)})`
55618
55624
  }))
@@ -55624,20 +55630,20 @@ function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName:
55624
55630
  className: "text-sm text-foreground-muted",
55625
55631
  children: s("newJob.holdoutCameras", { cameras: se.map((e) => i(e)).join(", ") })
55626
55632
  }) : null,
55627
- I.state.status === "pending" && te !== null && /* @__PURE__ */ E("p", {
55633
+ L.state.status === "pending" && ee !== null && /* @__PURE__ */ E("p", {
55628
55634
  className: "text-sm text-foreground-subtle",
55629
55635
  children: s("newJob.planning")
55630
55636
  }),
55631
- I.state.status === "error" && /* @__PURE__ */ D("p", {
55637
+ L.state.status === "error" && /* @__PURE__ */ D("p", {
55632
55638
  className: "text-sm text-danger",
55633
55639
  children: [
55634
55640
  s("newJob.couldNotPlan"),
55635
55641
  " ",
55636
- I.state.error
55642
+ L.state.error
55637
55643
  ]
55638
55644
  }),
55639
- L !== null && /* @__PURE__ */ E(_K, {
55640
- plan: L,
55645
+ R !== null && /* @__PURE__ */ E(_K, {
55646
+ plan: R,
55641
55647
  cameraName: i
55642
55648
  }),
55643
55649
  /* @__PURE__ */ D("div", {
@@ -55678,8 +55684,8 @@ function DK({ trpc: e, providers: t, baseModels: n, collections: r, cameraName:
55678
55684
  className: "flex justify-end pt-1",
55679
55685
  children: /* @__PURE__ */ E(W, {
55680
55686
  size: "md",
55681
- disabled: !ae,
55682
- onClick: () => void oe(),
55687
+ disabled: !ie,
55688
+ onClick: () => void ae(),
55683
55689
  children: s(T ? "newJob.starting" : "newJob.reviewAndStart")
55684
55690
  })
55685
55691
  })
@@ -55913,17 +55919,17 @@ function RK({ trpc: e, navigate: t, createRequested: n = !1, onCreateConsumed: r
55913
55919
  let { t: i } = pH(), a = zw("training-provider"), o = Wi(), s = Yz({
55914
55920
  editKey: "edit",
55915
55921
  newKey: "new"
55916
- }), [c, u] = w(!1), [f, p] = w(null), [h, g] = w(""), [_, v] = w(""), [y, b] = w({}), [S, C] = w({ kind: "idle" }), T = x(null), k = $G(() => e.trainingProvider.describe.query({}), []), A = $G(() => e.trainingProvider.describeTypes.query({}), []), ee = A.state.status === "ok" ? A.state.data : null, j = ee === null ? "" : NK(ee), M = x(ee);
55917
- M.current = ee;
55918
- let N = d(() => {
55919
- let e = /* @__PURE__ */ new Map(), t = M.current;
55922
+ }), [c, u] = w(!1), [f, p] = w(null), [h, g] = w(""), [_, v] = w(""), [y, b] = w({}), [S, C] = w({ kind: "idle" }), T = x(null), k = $G(() => e.trainingProvider.describe.query({}), []), A = $G(() => e.trainingProvider.describeTypes.query({}), []), j = A.state.status === "ok" ? A.state.data : null, M = j === null ? "" : NK(j), N = x(j);
55923
+ N.current = j;
55924
+ let P = d(() => {
55925
+ let e = /* @__PURE__ */ new Map(), t = N.current;
55920
55926
  if (t !== null) for (let n of t) {
55921
55927
  let t = PK(n);
55922
55928
  e.set(t.typeId, t);
55923
55929
  }
55924
55930
  return e;
55925
- }, [j]), P = d(() => {
55926
- let e = M.current;
55931
+ }, [M]), F = d(() => {
55932
+ let e = N.current;
55927
55933
  return e === null ? [] : e.map((e) => {
55928
55934
  let t = PK(e);
55929
55935
  return {
@@ -55931,44 +55937,44 @@ function RK({ trpc: e, navigate: t, createRequested: n = !1, onCreateConsumed: r
55931
55937
  label: t.label
55932
55938
  };
55933
55939
  });
55934
- }, [j]), F = k.state.status === "ok" ? k.state.data : [];
55940
+ }, [M]), I = k.state.status === "ok" ? k.state.data : [];
55935
55941
  l(() => {
55936
55942
  if (!n || A.state.status !== "ok") return;
55937
- let e = P[0]?.value ?? "";
55943
+ let e = F[0]?.value ?? "";
55938
55944
  p(null), C({ kind: "idle" }), g(e), v(""), b(IK(e)), T.current = "new", s.openNew(), r?.();
55939
55945
  }, [n, A.state.status]);
55940
- let te = s.state, I = te.mode === "edit" ? F.find((e) => e.entryId === te.id) ?? null : null;
55946
+ let ee = s.state, L = ee.mode === "edit" ? I.find((e) => e.entryId === ee.id) ?? null : null;
55941
55947
  l(() => {
55942
- if (s.state.mode === "edit" && I !== null) {
55943
- let e = `edit:${I.entryId}`;
55948
+ if (s.state.mode === "edit" && L !== null) {
55949
+ let e = `edit:${L.entryId}`;
55944
55950
  if (T.current === e) return;
55945
- T.current = e, p(null), C({ kind: "idle" }), g(I.typeId), v(I.name), b(I.formValues === void 0 ? {} : { ...I.formValues });
55951
+ T.current = e, p(null), C({ kind: "idle" }), g(L.typeId), v(L.name), b(L.formValues === void 0 ? {} : { ...L.formValues });
55946
55952
  return;
55947
55953
  }
55948
55954
  if (s.state.mode === "new") {
55949
55955
  if (T.current === "new") return;
55950
55956
  T.current = "new";
55951
- let e = P[0]?.value ?? "";
55957
+ let e = F[0]?.value ?? "";
55952
55958
  p(null), C({ kind: "idle" }), g(e), v(""), b(IK(e));
55953
55959
  return;
55954
55960
  }
55955
55961
  T.current = null;
55956
55962
  }, [
55957
- I,
55963
+ L,
55958
55964
  s.state.mode,
55959
- P
55965
+ F
55960
55966
  ]);
55961
- let L = (N.get(h) ?? (I === null ? void 0 : N.get(I.typeId)))?.configSchema, ne = s.state.mode === "edit" && I !== null && T.current !== `edit:${I.entryId}` ? I.formValues === void 0 ? {} : { ...I.formValues } : y, re = s.state.mode === "edit" && I !== null ? `edit:${I.entryId}` : `new:${h}`, ie = m((e) => {
55967
+ let R = (P.get(h) ?? (L === null ? void 0 : P.get(L.typeId)))?.configSchema, te = s.state.mode === "edit" && L !== null && T.current !== `edit:${L.entryId}` ? L.formValues === void 0 ? {} : { ...L.formValues } : y, ne = s.state.mode === "edit" && L !== null ? `edit:${L.entryId}` : `new:${h}`, re = m((e) => {
55962
55968
  g(e), b(IK(e));
55963
- }, []), ae = m(async () => {
55964
- if (I !== null) {
55969
+ }, []), ie = m(async () => {
55970
+ if (L !== null) {
55965
55971
  C({ kind: "running" });
55966
55972
  try {
55967
55973
  C({
55968
55974
  kind: "done",
55969
55975
  check: await e.trainingProvider.validateCredentials.mutate({
55970
- entryId: I.entryId,
55971
- addonId: I.addonId
55976
+ entryId: L.entryId,
55977
+ addonId: L.addonId
55972
55978
  })
55973
55979
  });
55974
55980
  } catch (e) {
@@ -55978,13 +55984,13 @@ function RK({ trpc: e, navigate: t, createRequested: n = !1, onCreateConsumed: r
55978
55984
  });
55979
55985
  }
55980
55986
  }
55981
- }, [I, e]), oe = m(() => {
55987
+ }, [L, e]), ae = m(() => {
55982
55988
  let e = _.trim();
55983
55989
  if (e === "") return {
55984
55990
  ok: !1,
55985
55991
  message: i("providers.validation.nameRequired")
55986
55992
  };
55987
- if (h === "modal" || I?.typeId === "modal") {
55993
+ if (h === "modal" || L?.typeId === "modal") {
55988
55994
  let t = Number(y.costCapUsd), n = Number(y.maxRuntimeHours), r = Number(y.failedDatasetGraceHours);
55989
55995
  if (!Number.isFinite(t) || t < 0) return {
55990
55996
  ok: !1,
@@ -56019,14 +56025,14 @@ function RK({ trpc: e, navigate: t, createRequested: n = !1, onCreateConsumed: r
56019
56025
  fields: { name: e }
56020
56026
  };
56021
56027
  }, [
56022
- I?.typeId,
56028
+ L?.typeId,
56023
56029
  s.state.mode,
56024
56030
  y,
56025
56031
  _,
56026
56032
  i,
56027
56033
  h
56028
- ]), R = m(async () => {
56029
- let t = oe();
56034
+ ]), oe = m(async () => {
56035
+ let t = ae();
56030
56036
  if (!t.ok) {
56031
56037
  p(t.message);
56032
56038
  return;
@@ -56034,7 +56040,7 @@ function RK({ trpc: e, navigate: t, createRequested: n = !1, onCreateConsumed: r
56034
56040
  u(!0), p(null);
56035
56041
  try {
56036
56042
  if (s.state.mode === "new") {
56037
- let n = N.get(h);
56043
+ let n = P.get(h);
56038
56044
  if (n === void 0) {
56039
56045
  p(i("providers.typeGone"));
56040
56046
  return;
@@ -56049,9 +56055,9 @@ function RK({ trpc: e, navigate: t, createRequested: n = !1, onCreateConsumed: r
56049
56055
  addonId: n.addonId,
56050
56056
  ...t.fields
56051
56057
  });
56052
- } else if (I !== null) await e.trainingProvider.updateEntry.mutate({
56053
- entryId: I.entryId,
56054
- addonId: I.addonId,
56058
+ } else if (L !== null) await e.trainingProvider.updateEntry.mutate({
56059
+ entryId: L.entryId,
56060
+ addonId: L.addonId,
56055
56061
  ...t.fields
56056
56062
  });
56057
56063
  else {
@@ -56066,12 +56072,12 @@ function RK({ trpc: e, navigate: t, createRequested: n = !1, onCreateConsumed: r
56066
56072
  }
56067
56073
  }, [
56068
56074
  k,
56069
- I,
56075
+ L,
56070
56076
  s,
56071
- oe,
56077
+ ae,
56072
56078
  i,
56073
56079
  e,
56074
- N,
56080
+ P,
56075
56081
  h,
56076
56082
  A
56077
56083
  ]), se = m(async (t) => {
@@ -56181,7 +56187,7 @@ function RK({ trpc: e, navigate: t, createRequested: n = !1, onCreateConsumed: r
56181
56187
  children: i("providers.absent.addons")
56182
56188
  })
56183
56189
  });
56184
- let le = A.state.status === "ok", ue = s.state.mode === "new", de = ue || I !== null;
56190
+ let le = A.state.status === "ok", ue = s.state.mode === "new", de = ue || L !== null;
56185
56191
  return /* @__PURE__ */ D("div", {
56186
56192
  className: "flex min-h-0 flex-1 flex-col gap-3",
56187
56193
  "data-testid": "training-providers",
@@ -56204,7 +56210,7 @@ function RK({ trpc: e, navigate: t, createRequested: n = !1, onCreateConsumed: r
56204
56210
  }) : null,
56205
56211
  k.state.status === "pending" ? /* @__PURE__ */ E(vw, { className: "h-32 w-full" }) : /* @__PURE__ */ E(Jj, {
56206
56212
  columns: ce,
56207
- rows: F,
56213
+ rows: I,
56208
56214
  rowKey: (e) => e.entryId,
56209
56215
  pageSize: 25,
56210
56216
  fill: !0,
@@ -56220,7 +56226,7 @@ function RK({ trpc: e, navigate: t, createRequested: n = !1, onCreateConsumed: r
56220
56226
  onClose: () => {
56221
56227
  s.close(), p(null), C({ kind: "idle" }), T.current = null;
56222
56228
  },
56223
- title: ue ? i("page.addProvider") : i("providers.editTitle", { name: I?.name ?? i("providers.fallbackName") }),
56229
+ title: ue ? i("page.addProvider") : i("providers.editTitle", { name: L?.name ?? i("providers.fallbackName") }),
56224
56230
  icon: pt,
56225
56231
  width: "xl",
56226
56232
  testId: "provider-entry-editor",
@@ -56229,7 +56235,7 @@ function RK({ trpc: e, navigate: t, createRequested: n = !1, onCreateConsumed: r
56229
56235
  type: "button",
56230
56236
  size: "sm",
56231
56237
  disabled: c || ue && (!le || h === ""),
56232
- onClick: () => void R(),
56238
+ onClick: () => void oe(),
56233
56239
  children: i(c ? "common.saving" : "common.save")
56234
56240
  }),
56235
56241
  children: de ? /* @__PURE__ */ D(O, { children: [
@@ -56243,12 +56249,12 @@ function RK({ trpc: e, navigate: t, createRequested: n = !1, onCreateConsumed: r
56243
56249
  options: [{
56244
56250
  value: "",
56245
56251
  label: i("providers.selectType")
56246
- }, ...P],
56247
- onChange: (e) => ie(e.target.value),
56252
+ }, ...F],
56253
+ onChange: (e) => re(e.target.value),
56248
56254
  disabled: !le
56249
56255
  })] }) : /* @__PURE__ */ E("p", {
56250
56256
  className: "text-sm text-foreground-muted",
56251
- children: i("providers.typeLine", { type: I?.label ?? h })
56257
+ children: i("providers.typeLine", { type: L?.label ?? h })
56252
56258
  }),
56253
56259
  /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E(_j, {
56254
56260
  htmlFor: "training-provider-name",
@@ -56259,30 +56265,30 @@ function RK({ trpc: e, navigate: t, createRequested: n = !1, onCreateConsumed: r
56259
56265
  onChange: (e) => v(e.target.value),
56260
56266
  placeholder: i("providers.namePlaceholder")
56261
56267
  })] }),
56262
- L === void 0 ? h === "" ? null : /* @__PURE__ */ E("p", {
56268
+ R === void 0 ? h === "" ? null : /* @__PURE__ */ E("p", {
56263
56269
  className: "text-xs text-foreground-muted",
56264
56270
  children: i("providers.nameOnlyHint")
56265
56271
  }) : /* @__PURE__ */ D(O, { children: [
56266
56272
  /* @__PURE__ */ E(sj, {
56267
- schema: L,
56268
- values: ne,
56273
+ schema: R,
56274
+ values: te,
56269
56275
  onChange: b,
56270
56276
  bare: !0
56271
- }, re),
56272
- I === null ? null : /* @__PURE__ */ D("div", {
56277
+ }, ne),
56278
+ L === null ? null : /* @__PURE__ */ D("div", {
56273
56279
  className: "flex flex-wrap items-center gap-2 pt-1",
56274
56280
  children: [/* @__PURE__ */ E(W, {
56275
56281
  type: "button",
56276
56282
  variant: "secondary",
56277
56283
  size: "sm",
56278
- disabled: !I.configured || S.kind === "running",
56279
- onClick: () => void ae(),
56284
+ disabled: !L.configured || S.kind === "running",
56285
+ onClick: () => void ie(),
56280
56286
  children: i("providers.testCredentials")
56281
56287
  }), /* @__PURE__ */ E(FK, { state: S })]
56282
56288
  }),
56283
- I === null ? null : /* @__PURE__ */ E("p", {
56289
+ L === null ? null : /* @__PURE__ */ E("p", {
56284
56290
  className: "text-xs text-foreground-muted",
56285
- children: I.dataResidencyNote
56291
+ children: L.dataResidencyNote
56286
56292
  })
56287
56293
  ] })
56288
56294
  ] }) : null