quantum-component-library 1.4.50-dev.3 → 1.4.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  import { j as e } from "./react-jsx-runtime-vendor-OVHDjVDe.js";
2
- import { Flex as ye, InputGroup as rt, InputLeftElement as Pt, Icon as xt, Input as Se, FormLabel as jt, Box as re, TableContainer as ft, Table as bt, Thead as yt, Tr as We, Th as be, Tbody as vt, Td as we, ButtonGroup as Me, Tooltip as et, Button as ee, RangeSlider as $t, RangeSliderMark as Ve, Text as b, RangeSliderTrack as Et, RangeSliderFilledTrack as _t, RangeSliderThumb as ot, Select as it, NumberInput as at, NumberInputField as lt, HStack as oe, Tag as Re, Image as Gt, useToast as Ct, VStack as le, FormControl as X, RadioGroup as wt, Radio as Qe, Alert as qe, AlertIcon as Ke, Spinner as St, useDisclosure as zt, Modal as Bt, ModalOverlay as Ut, ModalContent as Wt, ModalHeader as Qt, ModalCloseButton as qt, ModalBody as Kt, ModalFooter as Yt, Badge as Lt, IconButton as Ht, Tabs as Jt, TabList as Xt, Tab as ct, TabPanels as Zt, TabPanel as dt, Textarea as Ee } from "@chakra-ui/react";
2
+ import { Flex as ye, InputGroup as rt, InputLeftElement as $t, Icon as xt, Input as we, FormLabel as jt, Box as re, TableContainer as ft, Table as bt, Thead as yt, Tr as We, Th as be, Tbody as vt, Td as Ce, ButtonGroup as Le, Tooltip as et, Button as ee, RangeSlider as Dt, RangeSliderMark as Ve, Text as b, RangeSliderTrack as Et, RangeSliderFilledTrack as _t, RangeSliderThumb as ot, Select as it, NumberInput as at, NumberInputField as lt, HStack as oe, Tag as Re, Image as Gt, useToast as Ct, VStack as le, FormControl as X, RadioGroup as wt, Radio as Qe, Alert as qe, AlertIcon as Ke, Spinner as St, useDisclosure as zt, Modal as Bt, ModalOverlay as Ut, ModalContent as Wt, ModalHeader as Qt, ModalCloseButton as qt, ModalBody as Kt, ModalFooter as Yt, Badge as Lt, IconButton as Ht, Tabs as Jt, TabList as Xt, Tab as ct, TabPanels as Zt, TabPanel as dt, Textarea as Ee } from "@chakra-ui/react";
3
3
  import "./moment-vendor-DMLRxgRE.js";
4
- import { useMemo as T, useState as z, useCallback as P, useRef as Vt, useEffect as ce, createContext as en, useContext as tn, memo as Je } from "react";
5
- import { c as ve } from "./utils-cn-CgdSr4hO.js";
4
+ import { useMemo as T, useState as z, useCallback as $, useRef as Vt, useEffect as ce, createContext as en, useContext as tn, memo as Je } from "react";
5
+ import { c as Ne } from "./utils-cn-CgdSr4hO.js";
6
6
  import "./lodash-vendor-B-xpwrnm.js";
7
7
  import { useQuery as je, useMutation as me, useClient as nn } from "urql";
8
8
  import { useUiLabelContext as xe, useAllPartParameters as sn } from "./hooks.js";
@@ -10,7 +10,7 @@ import { u as rn } from "./ufuzzy-vendor-Dl0ZI6Av.js";
10
10
  import { F as on, a as an, b as ln, c as cn } from "./react-icons-vendor-CMsTQrA0.js";
11
11
  import { s as ge } from "./react-select-vendor-_26lPW2Z.js";
12
12
  import { getFragmentData as R } from "./generated.js";
13
- import { G as Mt, a as dn, C as tt, b as It, R as nt, M as ke, c as Ye, T as Le, A as fe, d as He, e as Ot, f as un, g as At, U as Tt, h as Be, i as Nt, j as hn, k as mn, l as pn, m as gn, n as xn, o as jn, p as fn } from "./graphql-BIKiRJ8I.js";
13
+ import { G as Mt, a as dn, C as tt, b as It, R as nt, M as ke, c as Ye, T as Se, A as fe, d as He, e as Ot, f as un, g as At, U as Tt, h as Be, i as Nt, j as hn, k as mn, l as pn, m as gn, n as xn, o as jn, p as fn } from "./graphql-BIKiRJ8I.js";
14
14
  import { D as bn, H as yn, u as vn, a as Cn } from "./react-dnd-vendor-BYAS_HOo.js";
15
15
  import { g as Rt, a as kt, b as wn, c as Sn, d as Ln, e as ut, f as ht } from "./services-human-BIz3wOu_.js";
16
16
  import { ThresholdKind as Ue, ReportKind as se, ActionLaterality as Mn, SensorLocation as ae } from "./generated-graphql.js";
@@ -30,9 +30,9 @@ const In = ({
30
30
  );
31
31
  return /* @__PURE__ */ e.jsxs(ye, { width: "100%", alignContent: "space-evenly", gap: 4, children: [
32
32
  /* @__PURE__ */ e.jsxs(rt, { size: "md", flex: 1, children: [
33
- /* @__PURE__ */ e.jsx(Pt, { children: /* @__PURE__ */ e.jsx(xt, { as: on, color: "gray.300" }) }),
33
+ /* @__PURE__ */ e.jsx($t, { children: /* @__PURE__ */ e.jsx(xt, { as: on, color: "gray.300" }) }),
34
34
  /* @__PURE__ */ e.jsx(
35
- Se,
35
+ we,
36
36
  {
37
37
  placeholder: "Search by name...",
38
38
  width: "100%",
@@ -64,7 +64,7 @@ const In = ({
64
64
  }) => /* @__PURE__ */ e.jsx(jt, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: n }), On = ({ value: n, onChange: t, disabled: o }) => {
65
65
  const h = z(
66
66
  () => Math.random().toString(36).substring(2, 15)
67
- )[0], g = P(
67
+ )[0], g = $(
68
68
  (d, u) => {
69
69
  o || t((C) => {
70
70
  const s = [...C], [c] = s.splice(d, 1);
@@ -86,7 +86,7 @@ const In = ({
86
86
  id: d.id,
87
87
  name: d.name,
88
88
  move: g,
89
- className: ve(o && "!cursor-default")
89
+ className: Ne(o && "!cursor-default")
90
90
  },
91
91
  d.id
92
92
  )) })
@@ -128,8 +128,8 @@ const In = ({
128
128
  "data-handler-id": C,
129
129
  className: d,
130
130
  children: [
131
- /* @__PURE__ */ e.jsx(we, { children: t + 1 }),
132
- /* @__PURE__ */ e.jsx(we, { children: h })
131
+ /* @__PURE__ */ e.jsx(Ce, { children: t + 1 }),
132
+ /* @__PURE__ */ e.jsx(Ce, { children: h })
133
133
  ]
134
134
  }
135
135
  );
@@ -142,7 +142,7 @@ const In = ({
142
142
  buttonProps: d
143
143
  }) => {
144
144
  const u = (s) => s === o || s.value === o, C = (s) => u(s) ? { ...d, ...g } : d;
145
- return /* @__PURE__ */ e.jsx(Me, { isAttached: !0, isDisabled: h, children: n.map((s, c) => /* @__PURE__ */ e.jsx(
145
+ return /* @__PURE__ */ e.jsx(Le, { isAttached: !0, isDisabled: h, children: n.map((s, c) => /* @__PURE__ */ e.jsx(
146
146
  et,
147
147
  {
148
148
  label: s.tooltip,
@@ -182,28 +182,28 @@ const In = ({
182
182
  ce(() => {
183
183
  _ !== void 0 && B !== void 0 && I([_.toFixed(0), B.toFixed(0)]);
184
184
  }, [_, B, I]);
185
- const W = P(
185
+ const W = $(
186
186
  ([M, E]) => {
187
187
  M < E && I([M.toFixed(0), E.toFixed(0)]);
188
188
  },
189
189
  [I]
190
- ), N = P(
190
+ ), N = $(
191
191
  ([M, E]) => {
192
192
  M < E && g([M, E]);
193
193
  },
194
194
  [g]
195
- ), Z = P(() => {
195
+ ), Z = $(() => {
196
196
  I(([M, E]) => {
197
197
  const te = isNaN(Number(M)) ? t : Number(M), Q = isNaN(Number(E)) ? o : Number(E), ie = Ge(Number(te), a), i = Ge(Number(Q), v), r = a < 0 ? Math.max(ie, t) : Math.min(ie, o), f = v < 0 ? Math.max(i, t) : Math.min(i, o);
198
198
  return r > f ? (g([f, r]), [f.toFixed(0), r.toFixed(0)]) : (g([r, f]), [r.toFixed(0), f.toFixed(0)]);
199
199
  });
200
- }, [g, I, a, v, t, o]), J = P(
200
+ }, [g, I, a, v, t, o]), J = $(
201
201
  (M) => {
202
202
  const E = M === "" || isNaN(Number(M)) ? M : Ge(Number(M), a);
203
203
  I(([te, Q]) => [E.toString(), Q]);
204
204
  },
205
205
  [I, a]
206
- ), $ = P(
206
+ ), D = $(
207
207
  (M) => {
208
208
  const E = M === "" || isNaN(Number(M)) ? M : Ge(Number(M), v);
209
209
  I(([te, Q]) => [te, E.toString()]);
@@ -212,7 +212,7 @@ const In = ({
212
212
  ), S = T(
213
213
  () => u === "xs" ? "0.75rem" : void 0,
214
214
  [u]
215
- ), O = P(
215
+ ), O = $(
216
216
  (M, E) => {
217
217
  const te = Number(E.target.value);
218
218
  if (!j || !m || ![-1, 1].includes(te))
@@ -224,7 +224,7 @@ const In = ({
224
224
  );
225
225
  return /* @__PURE__ */ e.jsxs(ye, { direction: "column", ...L, children: [
226
226
  /* @__PURE__ */ e.jsx(re, { pt: "1em", mb: "-0.5em", children: /* @__PURE__ */ e.jsxs(
227
- $t,
227
+ Dt,
228
228
  {
229
229
  "aria-label": ["min", "max"],
230
230
  isReversed: n,
@@ -359,7 +359,7 @@ const In = ({
359
359
  max: v < 0 ? Math.abs(_ ?? t) : o,
360
360
  precision: 0,
361
361
  value: m === "" ? "" : Math.abs(Number(m ?? o)),
362
- onChange: $,
362
+ onChange: D,
363
363
  onBlur: Z,
364
364
  borderWidth: 1,
365
365
  borderRadius: 3,
@@ -428,17 +428,17 @@ const In = ({
428
428
  )
429
429
  }
430
430
  ) : null;
431
- }, Dn = (n, t) => {
431
+ }, Pn = (n, t) => {
432
432
  if (!t || !t.trim().length)
433
433
  return n;
434
434
  const o = n.map((g) => g.name ?? "");
435
435
  return kn.filter(o, t)?.map((g) => n[g]) ?? [];
436
- }, Pn = (n) => !n || n.length === 0 ? "None" : n.map(
436
+ }, $n = (n) => !n || n.length === 0 ? "None" : n.map(
437
437
  (t) => (
438
438
  // Convert camelCase to separate words (e.g., 'LeftFoot' -> 'Left Foot')
439
439
  t.replace(/([A-Z])/g, " $1").trim()
440
440
  )
441
- ).join(", "), $n = (n, t) => !t || t.length == 0 ? n : n.filter(
441
+ ).join(", "), Dn = (n, t) => !t || t.length == 0 ? n : n.filter(
442
442
  (o) => o.useCases?.some((h) => t.includes(h.id)) ?? !1
443
443
  ), En = ({
444
444
  actions: n,
@@ -466,24 +466,24 @@ const In = ({
466
466
  }), [w]), B = T(() => {
467
467
  if (!n)
468
468
  return;
469
- const S = Dn(n, m);
470
- return L ? S : $n(S, a);
471
- }, [n, m, a, L]), W = P(() => {
469
+ const S = Pn(n, m);
470
+ return L ? S : Dn(S, a);
471
+ }, [n, m, a, L]), W = $(() => {
472
472
  if (!h)
473
473
  return;
474
474
  const O = n.filter(
475
475
  (M) => M.selected && !M.quantumOwned
476
476
  ).map((M) => M.id);
477
477
  h(O);
478
- }, [n, h]), N = P(() => {
478
+ }, [n, h]), N = $(() => {
479
479
  if (!C)
480
480
  return;
481
481
  const S = n.filter((O) => O.selected);
482
482
  C(S.map((O) => O.id)), u && S.forEach((O) => u(O, !1));
483
- }, [n, C, u]), Z = T(() => n.some((S) => S.selected && !S.quantumOwned), [n]), J = T(() => n.some((S) => S.selected), [n]), $ = T(() => n.some((S) => S.selected && S.quantumOwned), [n]);
483
+ }, [n, C, u]), Z = T(() => n.some((S) => S.selected && !S.quantumOwned), [n]), J = T(() => n.some((S) => S.selected), [n]), D = T(() => n.some((S) => S.selected && S.quantumOwned), [n]);
484
484
  return /* @__PURE__ */ e.jsxs(re, { ...I, children: [
485
485
  /* @__PURE__ */ e.jsxs(ye, { alignContent: "space-between", gap: 4, children: [
486
- (o || h || C) && /* @__PURE__ */ e.jsxs(Me, { mb: "1rem", gap: 4, children: [
486
+ (o || h || C) && /* @__PURE__ */ e.jsxs(Le, { mb: "1rem", gap: 4, children: [
487
487
  o && /* @__PURE__ */ e.jsxs(
488
488
  ee,
489
489
  {
@@ -500,7 +500,7 @@ const In = ({
500
500
  h && !s && /* @__PURE__ */ e.jsx(
501
501
  et,
502
502
  {
503
- label: $ ? Z ? `Quantum-owned ${_.actionPluralLowerCase} are selected and will be skipped` : `Selected ${_.actionPluralLowerCase} are quantum-owned and cannot be deleted` : void 0,
503
+ label: D ? Z ? `Quantum-owned ${_.actionPluralLowerCase} are selected and will be skipped` : `Selected ${_.actionPluralLowerCase} are quantum-owned and cannot be deleted` : void 0,
504
504
  shouldWrapChildren: !0,
505
505
  children: /* @__PURE__ */ e.jsx(
506
506
  ee,
@@ -551,7 +551,7 @@ const In = ({
551
551
  /* @__PURE__ */ e.jsx(vt, { children: B?.map((S) => /* @__PURE__ */ e.jsxs(
552
552
  We,
553
553
  {
554
- className: ve(
554
+ className: Ne(
555
555
  "hover:bg-[#f7f7f7]",
556
556
  !s && "cursor-pointer",
557
557
  S.selected && "bg-gray-200"
@@ -560,7 +560,7 @@ const In = ({
560
560
  s || u?.(S, !S.selected);
561
561
  },
562
562
  children: [
563
- /* @__PURE__ */ e.jsx(we, { children: /* @__PURE__ */ e.jsxs(ye, { children: [
563
+ /* @__PURE__ */ e.jsx(Ce, { children: /* @__PURE__ */ e.jsxs(ye, { children: [
564
564
  !s && /* @__PURE__ */ e.jsx(e.Fragment, { children: S.selected ? /* @__PURE__ */ e.jsx(an, { className: "text-blue-500" }) : /* @__PURE__ */ e.jsx(ln, { className: "text-gray-400" }) }),
565
565
  (S.quantumOwned || !g) && d && /* @__PURE__ */ e.jsx(
566
566
  ee,
@@ -590,7 +590,7 @@ const In = ({
590
590
  }
591
591
  )
592
592
  ] }) }),
593
- /* @__PURE__ */ e.jsx(we, { whiteSpace: "break-spaces", children: /* @__PURE__ */ e.jsxs(ye, { align: "center", gap: 2, children: [
593
+ /* @__PURE__ */ e.jsx(Ce, { whiteSpace: "break-spaces", children: /* @__PURE__ */ e.jsxs(ye, { align: "center", gap: 2, children: [
594
594
  /* @__PURE__ */ e.jsx(
595
595
  Fn,
596
596
  {
@@ -600,8 +600,8 @@ const In = ({
600
600
  ),
601
601
  S.name
602
602
  ] }) }),
603
- /* @__PURE__ */ e.jsx(we, { maxW: "20rem", whiteSpace: "break-spaces", children: Pn(S.sensorLocations) }),
604
- !L && /* @__PURE__ */ e.jsx(we, { maxW: "20rem", children: /* @__PURE__ */ e.jsx(
603
+ /* @__PURE__ */ e.jsx(Ce, { maxW: "20rem", whiteSpace: "break-spaces", children: $n(S.sensorLocations) }),
604
+ !L && /* @__PURE__ */ e.jsx(Ce, { maxW: "20rem", children: /* @__PURE__ */ e.jsx(
605
605
  Rn,
606
606
  {
607
607
  containerProps: { flexWrap: "wrap" },
@@ -655,29 +655,29 @@ const In = ({
655
655
  }));
656
656
  return {
657
657
  ...f,
658
- thresholds: R(Le, f.thresholds),
658
+ thresholds: R(Se, f.thresholds),
659
659
  reports: A.map((Y) => ({
660
660
  ...Y,
661
- thresholds: R(Le, Y.thresholds)
661
+ thresholds: R(Se, Y.thresholds)
662
662
  })),
663
663
  categories: U,
664
664
  metadataGroups: q
665
665
  };
666
666
  }) : [], [v.data]), N = T(() => W.filter(
667
667
  (i) => I.includes(i.id)
668
- ), [W, I]), Z = P(
668
+ ), [W, I]), Z = $(
669
669
  (i) => {
670
670
  const r = i?.value || "";
671
671
  y(r), j([]);
672
672
  },
673
673
  []
674
- ), J = P(
674
+ ), J = $(
675
675
  (i) => {
676
676
  const r = i.map((f) => f.value);
677
677
  j(r);
678
678
  },
679
679
  []
680
- ), $ = P(
680
+ ), D = $(
681
681
  async (i) => {
682
682
  const r = {
683
683
  ...i,
@@ -712,7 +712,7 @@ const In = ({
712
712
  throw new Error("No action data returned");
713
713
  },
714
714
  [w, u]
715
- ), S = P(
715
+ ), S = $(
716
716
  async (i) => {
717
717
  const r = await _({ id: i.id });
718
718
  if (r.error)
@@ -725,7 +725,7 @@ const In = ({
725
725
  throw new Error("No action data returned");
726
726
  },
727
727
  [_]
728
- ), O = P(async () => {
728
+ ), O = $(async () => {
729
729
  if (l(!0), !N.length) {
730
730
  const i = new Error(
731
731
  `No ${c.pluralLowerCase} selected for ${x === "copy" ? "copying" : "converting"}`
@@ -736,7 +736,7 @@ const In = ({
736
736
  try {
737
737
  const i = [];
738
738
  let r = 0;
739
- const f = x === "copy" ? $ : S, A = x === "copy" ? "copy" : "convert";
739
+ const f = x === "copy" ? D : S, A = x === "copy" ? "copy" : "convert";
740
740
  for (const U of N)
741
741
  try {
742
742
  const ne = await f(U);
@@ -775,13 +775,13 @@ const In = ({
775
775
  }, [
776
776
  N,
777
777
  x,
778
- $,
778
+ D,
779
779
  S,
780
780
  C,
781
781
  n,
782
782
  o,
783
783
  c
784
- ]), M = P(() => {
784
+ ]), M = $(() => {
785
785
  y(""), j([]), F("copy"), t?.();
786
786
  }, [t]);
787
787
  ce(() => {
@@ -1008,7 +1008,7 @@ const In = ({
1008
1008
  )
1009
1009
  ] })
1010
1010
  ] }),
1011
- !h && /* @__PURE__ */ e.jsxs(Me, { spacing: 4, justifyContent: "flex-end", children: [
1011
+ !h && /* @__PURE__ */ e.jsxs(Le, { spacing: 4, justifyContent: "flex-end", children: [
1012
1012
  /* @__PURE__ */ e.jsx(
1013
1013
  ee,
1014
1014
  {
@@ -1084,22 +1084,22 @@ const In = ({
1084
1084
  f.categories
1085
1085
  )
1086
1086
  };
1087
- }) : [], [w.data]), $ = T(() => J.filter(
1087
+ }) : [], [w.data]), D = T(() => J.filter(
1088
1088
  (r) => y.includes(r.id)
1089
- ), [J, y]), S = P(
1089
+ ), [J, y]), S = $(
1090
1090
  (r) => {
1091
1091
  const f = r?.value || "";
1092
1092
  L(f), I([]);
1093
1093
  },
1094
1094
  []
1095
- ), O = P(
1095
+ ), O = $(
1096
1096
  (r) => {
1097
1097
  const f = r.map((A) => A.value);
1098
1098
  I(f);
1099
1099
  },
1100
1100
  []
1101
- ), M = P(async () => {
1102
- if (m(!0), !$.length) {
1101
+ ), M = $(async () => {
1102
+ if (m(!0), !D.length) {
1103
1103
  m(!1);
1104
1104
  const r = new Error(
1105
1105
  `No modules selected for ${l === "convert" ? "converting" : "copying"}`
@@ -1110,62 +1110,62 @@ const In = ({
1110
1110
  try {
1111
1111
  const r = [];
1112
1112
  let f = 0;
1113
- for (const A of $)
1113
+ for (const A of D)
1114
1114
  try {
1115
1115
  let U = A.moduleActions.map((ne) => ne.actionId);
1116
1116
  if (u) {
1117
1117
  const ne = A.moduleActions.map((K) => K.action), q = async (K) => {
1118
1118
  if (l === "copy") {
1119
1119
  if (K.quantumOwned) return K;
1120
- const Ce = R(
1120
+ const ve = R(
1121
1121
  ke,
1122
1122
  K.categories
1123
- ), De = R(
1123
+ ), Pe = R(
1124
1124
  Ye,
1125
1125
  K.metadataGroups
1126
1126
  ).map((he) => R(
1127
1127
  He,
1128
1128
  he.data
1129
- ).map((Ne) => Ne.id)).flat(), Oe = R(
1129
+ ).map((Te) => Te.id)).flat(), Ie = R(
1130
1130
  nt,
1131
1131
  K.reports
1132
1132
  ).map((he) => ({
1133
1133
  ...he,
1134
1134
  id: void 0,
1135
1135
  thresholds: R(
1136
- Le,
1136
+ Se,
1137
1137
  he.thresholds
1138
- ).map((Ne) => ({
1139
- ...Ne,
1138
+ ).map((Te) => ({
1139
+ ...Te,
1140
1140
  id: void 0
1141
1141
  }))
1142
- })), Ae = R(
1143
- Le,
1142
+ })), Oe = R(
1143
+ Se,
1144
1144
  K.thresholds
1145
1145
  ).map((he) => ({
1146
1146
  ...he,
1147
1147
  id: void 0
1148
- })), Pe = {
1148
+ })), $e = {
1149
1149
  ...K,
1150
1150
  quantumOwned: !0,
1151
- thresholds: Ae,
1152
- categories: Ce?.map((he) => he.id),
1153
- reports: Oe,
1154
- metadataIds: De,
1151
+ thresholds: Oe,
1152
+ categories: ve?.map((he) => he.id),
1153
+ reports: Ie,
1154
+ metadataIds: Pe,
1155
1155
  id: void 0
1156
- }, Te = await W({ fields: Pe });
1157
- return Te.error || !Te.data?.createAction ? null : R(
1156
+ }, Ae = await W({ fields: $e });
1157
+ return Ae.error || !Ae.data?.createAction ? null : R(
1158
1158
  fe,
1159
- Te.data.createAction
1159
+ Ae.data.createAction
1160
1160
  );
1161
1161
  }
1162
1162
  if (K.quantumOwned) return K;
1163
- const Ie = await N({
1163
+ const Me = await N({
1164
1164
  id: K.id
1165
1165
  });
1166
- return Ie.error || !Ie.data?.convertActionToQuantumOwned ? null : R(
1166
+ return Me.error || !Me.data?.convertActionToQuantumOwned ? null : R(
1167
1167
  fe,
1168
- Ie.data.convertActionToQuantumOwned
1168
+ Me.data.convertActionToQuantumOwned
1169
1169
  );
1170
1170
  };
1171
1171
  U = (await Promise.all(
@@ -1215,7 +1215,7 @@ const In = ({
1215
1215
  ), f++;
1216
1216
  }
1217
1217
  if (r.length > 0) {
1218
- const A = r.length, U = $.length;
1218
+ const A = r.length, U = D.length;
1219
1219
  C({
1220
1220
  title: f > 0 ? `Partial ${l === "convert" ? "convert" : "copy"} completed` : `${c.plural} ${l === "convert" ? "converted" : "copied"} successfully`,
1221
1221
  description: f > 0 ? `${A} of ${U} ${c.plural} ${l === "convert" ? "converted" : "copied"} successfully` : `${A} ${A > 1 ? c.plural : c.singular} ${l === "convert" ? "converted" : "copied"} successfully`,
@@ -1240,7 +1240,7 @@ const In = ({
1240
1240
  m(!1);
1241
1241
  }
1242
1242
  }, [
1243
- $,
1243
+ D,
1244
1244
  _,
1245
1245
  B,
1246
1246
  C,
@@ -1251,15 +1251,15 @@ const In = ({
1251
1251
  N,
1252
1252
  l,
1253
1253
  c
1254
- ]), E = P(() => {
1254
+ ]), E = $(() => {
1255
1255
  L(""), I([]), a("copy"), t?.();
1256
1256
  }, [t]);
1257
1257
  ce(() => {
1258
1258
  g && g({
1259
1259
  cancelButton: !1,
1260
- saveButton: $.length === 0 || j
1260
+ saveButton: D.length === 0 || j
1261
1261
  });
1262
- }, [$.length, j, g]), ce(() => {
1262
+ }, [D.length, j, g]), ce(() => {
1263
1263
  d && d({
1264
1264
  cancelButton: E,
1265
1265
  saveButton: M
@@ -1379,10 +1379,10 @@ const In = ({
1379
1379
  ] })
1380
1380
  ] })
1381
1381
  ] }),
1382
- $.length > 0 && /* @__PURE__ */ e.jsxs(re, { p: 4, bg: "gray.50", borderRadius: "md", children: [
1383
- /* @__PURE__ */ e.jsx(b, { fontWeight: "semibold", mb: 3, children: $.length === 1 ? `${c.singular} to ${l === "copy" ? "Copy" : "Convert"}` : `${$.length} ${c.plural} to ${l === "copy" ? "Copy" : "Convert"}` }),
1382
+ D.length > 0 && /* @__PURE__ */ e.jsxs(re, { p: 4, bg: "gray.50", borderRadius: "md", children: [
1383
+ /* @__PURE__ */ e.jsx(b, { fontWeight: "semibold", mb: 3, children: D.length === 1 ? `${c.singular} to ${l === "copy" ? "Copy" : "Convert"}` : `${D.length} ${c.plural} to ${l === "copy" ? "Copy" : "Convert"}` }),
1384
1384
  /* @__PURE__ */ e.jsxs(le, { align: "start", spacing: 3, children: [
1385
- $.map((r, f) => /* @__PURE__ */ e.jsxs(
1385
+ D.map((r, f) => /* @__PURE__ */ e.jsxs(
1386
1386
  re,
1387
1387
  {
1388
1388
  w: "100%",
@@ -1430,7 +1430,7 @@ const In = ({
1430
1430
  },
1431
1431
  r.id
1432
1432
  )),
1433
- $.length > 1 && /* @__PURE__ */ e.jsx(
1433
+ D.length > 1 && /* @__PURE__ */ e.jsx(
1434
1434
  re,
1435
1435
  {
1436
1436
  w: "100%",
@@ -1441,7 +1441,7 @@ const In = ({
1441
1441
  borderColor: "blue.200",
1442
1442
  children: /* @__PURE__ */ e.jsxs(b, { fontSize: "sm", fontWeight: "medium", color: "blue.800", children: [
1443
1443
  "Total: ",
1444
- $.length,
1444
+ D.length,
1445
1445
  " ",
1446
1446
  c.pluralLowerCase,
1447
1447
  " will be",
@@ -1450,7 +1450,7 @@ const In = ({
1450
1450
  ] })
1451
1451
  }
1452
1452
  ),
1453
- u && $.filter((r) => r.moduleActions.some((f) => !f.action.quantumOwned)).length > 0 && /* @__PURE__ */ e.jsx(
1453
+ u && D.filter((r) => r.moduleActions.some((f) => !f.action.quantumOwned)).length > 0 && /* @__PURE__ */ e.jsx(
1454
1454
  re,
1455
1455
  {
1456
1456
  p: 2,
@@ -1463,7 +1463,7 @@ const In = ({
1463
1463
  )
1464
1464
  ] })
1465
1465
  ] }),
1466
- !h && /* @__PURE__ */ e.jsxs(Me, { spacing: 4, justifyContent: "flex-end", children: [
1466
+ !h && /* @__PURE__ */ e.jsxs(Le, { spacing: 4, justifyContent: "flex-end", children: [
1467
1467
  /* @__PURE__ */ e.jsx(
1468
1468
  ee,
1469
1469
  {
@@ -1478,13 +1478,13 @@ const In = ({
1478
1478
  {
1479
1479
  colorScheme: l === "copy" ? "blue" : "green",
1480
1480
  onClick: M,
1481
- isDisabled: $.length === 0 || j,
1481
+ isDisabled: D.length === 0 || j,
1482
1482
  isLoading: j,
1483
1483
  loadingText: `${l === "copy" ? "Copying" : "Converting"}...`,
1484
1484
  children: [
1485
1485
  l === "copy" ? "Copy" : "Convert",
1486
1486
  " ",
1487
- $.length === 1 ? c.singular : `${$.length} ${c.plural}`
1487
+ D.length === 1 ? c.singular : `${D.length} ${c.plural}`
1488
1488
  ]
1489
1489
  }
1490
1490
  )
@@ -1516,17 +1516,17 @@ const In = ({
1516
1516
  })), [o, h]), y = T(() => o.reduce((a, v) => (a[v.id] = v, a), {}), [o]), I = T(
1517
1517
  () => h.map((a) => y[a]),
1518
1518
  [h, y]
1519
- ), j = P(
1519
+ ), j = $(
1520
1520
  (a, v) => {
1521
1521
  g(v ? [...h, a.id] : h.filter((w) => w !== a.id));
1522
1522
  },
1523
1523
  [h, g]
1524
- ), m = P(
1524
+ ), m = $(
1525
1525
  (a) => {
1526
1526
  t(a.target.value);
1527
1527
  },
1528
1528
  [t]
1529
- ), l = P(
1529
+ ), l = $(
1530
1530
  (a) => {
1531
1531
  c?.(a.target.value);
1532
1532
  },
@@ -1609,7 +1609,7 @@ const In = ({
1609
1609
  " Name"
1610
1610
  ] }),
1611
1611
  /* @__PURE__ */ e.jsx(
1612
- Se,
1612
+ we,
1613
1613
  {
1614
1614
  placeholder: "i.e. ACL RTP Test Battery",
1615
1615
  value: n,
@@ -1673,7 +1673,7 @@ const In = ({
1673
1673
  ] })
1674
1674
  ] }) }),
1675
1675
  /* @__PURE__ */ e.jsx(
1676
- Se,
1676
+ we,
1677
1677
  {
1678
1678
  placeholder: "i.e. Assess readiness to return to play post-ACL reconstruction",
1679
1679
  value: n,
@@ -1703,47 +1703,39 @@ const In = ({
1703
1703
  [n]
1704
1704
  );
1705
1705
  return /* @__PURE__ */ e.jsxs(X, { mb: 4, children: [
1706
- /* @__PURE__ */ e.jsxs(
1707
- oe,
1708
- {
1709
- justifyContent: "space-between",
1710
- className: ve(g && "hidden"),
1711
- children: [
1712
- /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs("span", { children: [
1713
- d.actionPlural,
1714
- /* @__PURE__ */ e.jsxs(b, { fontSize: "sm", color: "gray.500", children: [
1715
- "Drag and drop to reorder the ",
1716
- d.actionPluralLowerCase,
1717
- " in this ",
1718
- d.moduleLowerCase,
1719
- "."
1720
- ] })
1721
- ] }) }),
1722
- /* @__PURE__ */ e.jsxs(
1723
- ee,
1724
- {
1725
- size: "sm",
1726
- variant: "solid",
1727
- colorScheme: "blue",
1728
- onClick: o,
1729
- isDisabled: g,
1730
- children: [
1731
- "Add / Remove ",
1732
- d.actionPlural
1733
- ]
1734
- }
1735
- )
1736
- ]
1737
- }
1738
- ),
1739
- u.length === 0 ? /* @__PURE__ */ e.jsx(le, { className: ve(g && "hidden"), children: /* @__PURE__ */ e.jsxs(b, { color: "gray.500", fontSize: "lg", mb: "4rem", mt: "4rem", children: [
1706
+ /* @__PURE__ */ e.jsxs(oe, { justifyContent: "space-between", children: [
1707
+ /* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs("span", { children: [
1708
+ d.actionPlural,
1709
+ /* @__PURE__ */ e.jsxs(b, { fontSize: "sm", color: "gray.500", children: [
1710
+ "Drag and drop to reorder the ",
1711
+ d.actionPluralLowerCase,
1712
+ " in this ",
1713
+ d.moduleLowerCase,
1714
+ "."
1715
+ ] })
1716
+ ] }) }),
1717
+ !g && /* @__PURE__ */ e.jsxs(
1718
+ ee,
1719
+ {
1720
+ size: "sm",
1721
+ variant: "solid",
1722
+ colorScheme: "blue",
1723
+ onClick: o,
1724
+ children: [
1725
+ "Add / Remove ",
1726
+ d.actionPlural
1727
+ ]
1728
+ }
1729
+ )
1730
+ ] }),
1731
+ u.length === 0 ? /* @__PURE__ */ e.jsx(le, { children: /* @__PURE__ */ e.jsxs(b, { color: "gray.500", fontSize: "lg", mb: "4rem", mt: "4rem", children: [
1740
1732
  "No ",
1741
1733
  d.actionPluralLowerCase,
1742
1734
  " selected for this",
1743
1735
  " ",
1744
1736
  d.moduleLowerCase,
1745
1737
  ".",
1746
- /* @__PURE__ */ e.jsxs(
1738
+ !g && /* @__PURE__ */ e.jsxs(
1747
1739
  ee,
1748
1740
  {
1749
1741
  ml: "0.5em",
@@ -1784,7 +1776,7 @@ const In = ({
1784
1776
  const s = T(() => [...n].sort((L, y) => {
1785
1777
  const I = mt.indexOf(L.plane), j = mt.indexOf(y.plane);
1786
1778
  return I - j;
1787
- }), [n]), c = P((L) => "segment" in L.id ? Rt(L.id.segment, L.plane, !0) ?? "Unknown" : kt(L.id.joint, L.plane, !0) ?? "Unknown", []), x = P(
1779
+ }), [n]), c = $((L) => "segment" in L.id ? Rt(L.id.segment, L.plane, !0) ?? "Unknown" : kt(L.id.joint, L.plane, !0) ?? "Unknown", []), x = $(
1788
1780
  (L, y) => {
1789
1781
  const I = s.findIndex(
1790
1782
  (m) => m.id === y.id && m.plane === y.plane
@@ -1797,7 +1789,7 @@ const In = ({
1797
1789
  }))), t(j);
1798
1790
  },
1799
1791
  [t, s, o, u]
1800
- ), F = P(
1792
+ ), F = $(
1801
1793
  (L) => {
1802
1794
  const y = s.filter(
1803
1795
  (I) => I.id !== L.id || I.plane !== L.plane
@@ -1828,7 +1820,7 @@ const In = ({
1828
1820
  disableKind: d,
1829
1821
  isDisabled: u
1830
1822
  }) => {
1831
- const C = P(
1823
+ const C = $(
1832
1824
  (x) => "joint" in t.id ? wn(
1833
1825
  t.id.joint,
1834
1826
  t.plane,
@@ -1966,13 +1958,13 @@ const In = ({
1966
1958
  })).filter((l) => l.options.length > 0);
1967
1959
  }, [F, t, d]), y = T(() => F.flatMap((l) => l.options).filter(
1968
1960
  (l) => t.some((a) => ze(a.id, l.value) && a.plane === l.plane)
1969
- ), [F, t]), I = P((m, l) => {
1961
+ ), [F, t]), I = $((m, l) => {
1970
1962
  if (!l) return !0;
1971
1963
  const a = l.toLowerCase().replace(/\s+|_/g, ""), v = m.data;
1972
1964
  return !v || !v.searchTokens ? !1 : v.searchTokens.some(
1973
1965
  (w) => w.includes(a)
1974
1966
  );
1975
- }, []), j = P(
1967
+ }, []), j = $(
1976
1968
  (m) => {
1977
1969
  const l = m.map((a) => {
1978
1970
  const v = t.find(
@@ -2097,11 +2089,11 @@ const In = ({
2097
2089
  if (!p) return null;
2098
2090
  const k = R(nt, p.reports).map((G) => ({
2099
2091
  ...G,
2100
- thresholds: R(Le, G.thresholds)
2092
+ thresholds: R(Se, G.thresholds)
2101
2093
  }));
2102
2094
  return {
2103
2095
  ...p,
2104
- thresholds: R(Le, p.thresholds),
2096
+ thresholds: R(Se, p.thresholds),
2105
2097
  reports: k
2106
2098
  };
2107
2099
  }, [I]), m = x || L, l = !!j && !!n, { getLabel: a } = xe(), v = T(() => ({
@@ -2112,7 +2104,7 @@ const In = ({
2112
2104
  { key: "session_type", label: "Session Type", multi: !0 },
2113
2105
  { key: "body_region", label: "Body Region", multi: !0 },
2114
2106
  { key: "sport", label: "Sport", multi: !0 }
2115
- ], [v.action]), [_, B] = z(""), [W, N] = z(""), [Z, J] = z(""), [$, S] = z(""), [O, M] = z([]), [E, te] = z({}), [Q, ie] = z(null), [i, r] = z([]), [f, A] = z([]), [U, ne] = z(""), [q, Y] = z([]), K = sn(), Ie = T(() => K.filter((p) => p.sensorOnly), [K]), Ce = T(() => {
2107
+ ], [v.action]), [_, B] = z(""), [W, N] = z(""), [Z, J] = z(""), [D, S] = z(""), [O, M] = z([]), [E, te] = z({}), [Q, ie] = z(null), [i, r] = z([]), [f, A] = z([]), [U, ne] = z(""), [q, Y] = z([]), K = sn(), Me = T(() => K.filter((p) => p.sensorOnly), [K]), ve = T(() => {
2116
2108
  const p = [
2117
2109
  { label: "General Activity", value: se.GeneralActivity },
2118
2110
  {
@@ -2122,18 +2114,18 @@ const In = ({
2122
2114
  { label: "Point of Interest", value: se.PointOfInterest },
2123
2115
  { label: "Range", value: se.Range },
2124
2116
  { label: "Stability Balance", value: se.StabilityBalance }
2125
- ], D = q.map((k) => k.kind);
2117
+ ], P = q.map((k) => k.kind);
2126
2118
  return p.filter(
2127
- (k) => !D.includes(k.value)
2119
+ (k) => !P.includes(k.value)
2128
2120
  );
2129
- }, [q]), Fe = _.length > 0, [De, st] = z({});
2121
+ }, [q]), Fe = _.length > 0, [Pe, st] = z({});
2130
2122
  ce(() => {
2131
2123
  const p = w.map(
2132
- (D) => c.query(pn, { key: D.key })
2124
+ (P) => c.query(pn, { key: P.key })
2133
2125
  );
2134
- Promise.all(p).then((D) => {
2126
+ Promise.all(p).then((P) => {
2135
2127
  const k = {};
2136
- D.forEach((G) => {
2128
+ P.forEach((G) => {
2137
2129
  if (G.error || !G.data) return;
2138
2130
  const H = R(
2139
2131
  Ye,
@@ -2151,7 +2143,7 @@ const In = ({
2151
2143
  });
2152
2144
  }, [c, w]), ce(() => {
2153
2145
  if (j) {
2154
- const D = R(
2146
+ const P = R(
2155
2147
  Ye,
2156
2148
  j.metadataGroups
2157
2149
  ).map(
@@ -2169,7 +2161,7 @@ const In = ({
2169
2161
  max: V.max,
2170
2162
  plane: V.partDimension,
2171
2163
  oldId: V.id,
2172
- sensorOnly: Ie.some((ue) => {
2164
+ sensorOnly: Me.some((ue) => {
2173
2165
  const Ze = ue.id[V.partKind];
2174
2166
  return Ze ? Ze === V.partId && ue.plane === V.partDimension : !1;
2175
2167
  })
@@ -2180,36 +2172,36 @@ const In = ({
2180
2172
  description: j.description || "",
2181
2173
  cameraPlacement: j.cameraPlacement || "",
2182
2174
  videoLink: j.videoLink || "",
2183
- metadataIds: D.flat(),
2175
+ metadataIds: P.flat(),
2184
2176
  reports: k
2185
2177
  };
2186
2178
  B(G.name), N(G.description), J(G.cameraPlacement), S(G.videoLink), M(G.metadataIds), Y(k), st(G);
2187
2179
  }
2188
2180
  }, [j]);
2189
- const Oe = T(
2190
- () => JSON.stringify(De) !== JSON.stringify({
2181
+ const Ie = T(
2182
+ () => JSON.stringify(Pe) !== JSON.stringify({
2191
2183
  name: _,
2192
2184
  description: W,
2193
2185
  cameraPlacement: Z,
2194
- videoLink: $,
2186
+ videoLink: D,
2195
2187
  metadataIds: O,
2196
2188
  reports: q
2197
2189
  }),
2198
2190
  [
2199
- De,
2191
+ Pe,
2200
2192
  _,
2201
2193
  W,
2202
2194
  Z,
2203
- $,
2195
+ D,
2204
2196
  O,
2205
2197
  q
2206
2198
  ]
2207
- ), Ae = P(() => {
2199
+ ), Oe = $(() => {
2208
2200
  const p = {
2209
2201
  name: _,
2210
2202
  description: W,
2211
2203
  cameraPlacement: Z,
2212
- videoLink: $,
2204
+ videoLink: D,
2213
2205
  metadataItemIds: O,
2214
2206
  // Backend requires laterality; keep existing default since UI no longer edits it
2215
2207
  laterality: Mn.Either,
@@ -2235,13 +2227,13 @@ const In = ({
2235
2227
  }))
2236
2228
  }))
2237
2229
  };
2238
- let D;
2239
- l && n ? D = y({
2230
+ let P;
2231
+ l && n ? P = y({
2240
2232
  id: n,
2241
2233
  fields: p
2242
- }) : D = F({
2234
+ }) : P = F({
2243
2235
  fields: p
2244
- }), D.then(({ error: k }) => {
2236
+ }), P.then(({ error: k }) => {
2245
2237
  k ? t(k) : h();
2246
2238
  });
2247
2239
  }, [
@@ -2252,7 +2244,7 @@ const In = ({
2252
2244
  _,
2253
2245
  W,
2254
2246
  Z,
2255
- $,
2247
+ D,
2256
2248
  O,
2257
2249
  q,
2258
2250
  l,
@@ -2262,33 +2254,33 @@ const In = ({
2262
2254
  ce(() => {
2263
2255
  u && u({
2264
2256
  cancelButton: m,
2265
- saveButton: s ? !0 : m || !Fe || !Oe
2257
+ saveButton: s ? !0 : m || !Fe || !Ie
2266
2258
  });
2267
- }, [m, u, Fe, Oe, s]), ce(() => {
2259
+ }, [m, u, Fe, Ie, s]), ce(() => {
2268
2260
  d && d({
2269
2261
  cancelButton: o,
2270
2262
  saveButton: s ? () => {
2271
- } : Ae
2263
+ } : Oe
2272
2264
  });
2273
- }, [d, o, Ae, s]);
2274
- const Pe = P(
2265
+ }, [d, o, Oe, s]);
2266
+ const $e = $(
2275
2267
  (p) => {
2276
- const D = ht(
2268
+ const P = ht(
2277
2269
  p.map(
2278
2270
  (k) => "joint" in k.id ? k.id.joint : k.id.segment
2279
2271
  )
2280
2272
  );
2281
- A(D);
2273
+ A(P);
2282
2274
  },
2283
2275
  []
2284
2276
  );
2285
2277
  ce(() => {
2286
- Pe(i);
2287
- }, [i, Pe]);
2288
- const Te = P(() => {
2278
+ $e(i);
2279
+ }, [i, $e]);
2280
+ const Ae = $(() => {
2289
2281
  if (!Q)
2290
2282
  return;
2291
- const p = Q === se.PointOfInterest, D = {
2283
+ const p = Q === se.PointOfInterest, P = {
2292
2284
  id: Date.now().toString(),
2293
2285
  // Temporary ID
2294
2286
  kind: Q,
@@ -2297,23 +2289,23 @@ const In = ({
2297
2289
  instructions: p ? U : "",
2298
2290
  isNew: !0
2299
2291
  };
2300
- Y((k) => [...k, D]), ie(null), r([]), A([]), ne("");
2292
+ Y((k) => [...k, P]), ie(null), r([]), A([]), ne("");
2301
2293
  }, [
2302
2294
  Q,
2303
2295
  i,
2304
2296
  f,
2305
2297
  U
2306
- ]), he = P((p) => {
2307
- Y((D) => D.filter((k) => k.id !== p));
2308
- }, []), Ne = (p, D) => {
2298
+ ]), he = $((p) => {
2299
+ Y((P) => P.filter((k) => k.id !== p));
2300
+ }, []), Te = (p, P) => {
2309
2301
  const k = w.find((H) => H.key === p);
2310
2302
  if (!k) return;
2311
- const G = k.multi ? (D ?? []).map(
2303
+ const G = k.multi ? (P ?? []).map(
2312
2304
  (H) => H.id
2313
- ) : D ? [D.id] : [];
2314
- M((H) => [...H.filter((ue) => Object.values(E).flat().find(($e) => $e.id === ue) && !Object.keys(E).find(
2315
- ($e) => E[$e]?.some(
2316
- (Dt) => Dt.id === ue && $e === p
2305
+ ) : P ? [P.id] : [];
2306
+ M((H) => [...H.filter((ue) => Object.values(E).flat().find((De) => De.id === ue) && !Object.keys(E).find(
2307
+ (De) => E[De]?.some(
2308
+ (Pt) => Pt.id === ue && De === p
2317
2309
  )
2318
2310
  )), ...G]);
2319
2311
  };
@@ -2329,7 +2321,7 @@ const In = ({
2329
2321
  /* @__PURE__ */ e.jsxs(X, { children: [
2330
2322
  /* @__PURE__ */ e.jsx(de, { children: "Name" }),
2331
2323
  /* @__PURE__ */ e.jsx(
2332
- Se,
2324
+ we,
2333
2325
  {
2334
2326
  value: _,
2335
2327
  onChange: (p) => B(p.target.value),
@@ -2355,9 +2347,9 @@ const In = ({
2355
2347
  /* @__PURE__ */ e.jsxs(X, { children: [
2356
2348
  /* @__PURE__ */ e.jsx(de, { children: "Video Link" }),
2357
2349
  /* @__PURE__ */ e.jsx(
2358
- Se,
2350
+ we,
2359
2351
  {
2360
- value: $,
2352
+ value: D,
2361
2353
  onChange: (p) => S(p.target.value),
2362
2354
  type: "url",
2363
2355
  placeholder: "(optional) https://...",
@@ -2388,10 +2380,10 @@ const In = ({
2388
2380
  {
2389
2381
  isMulti: p.multi,
2390
2382
  value: E[p.key]?.filter(
2391
- (D) => O.includes(D.id)
2383
+ (P) => O.includes(P.id)
2392
2384
  ),
2393
- onChange: (D) => {
2394
- Ne(p.key, D);
2385
+ onChange: (P) => {
2386
+ Te(p.key, P);
2395
2387
  },
2396
2388
  options: E[p.key],
2397
2389
  placeholder: `Select ${p.multi ? "one or more" : "one"} ${p.label.toLowerCase()}`,
@@ -2405,23 +2397,23 @@ const In = ({
2405
2397
  /* @__PURE__ */ e.jsx(dt, { px: 0, children: /* @__PURE__ */ e.jsxs(
2406
2398
  "div",
2407
2399
  {
2408
- className: ve(
2400
+ className: Ne(
2409
2401
  "grid grid-cols-1 gap-6",
2410
2402
  !s && "md:grid-cols-2"
2411
2403
  ),
2412
2404
  children: [
2413
- /* @__PURE__ */ e.jsxs("div", { className: ve("space-y-4", s && "hidden"), children: [
2405
+ /* @__PURE__ */ e.jsxs("div", { className: Ne("space-y-4", s && "hidden"), children: [
2414
2406
  /* @__PURE__ */ e.jsx(de, { children: "Add New Report" }),
2415
2407
  /* @__PURE__ */ e.jsxs(X, { children: [
2416
2408
  /* @__PURE__ */ e.jsx(de, { children: "Report Kind" }),
2417
- Ce.length === 0 ? /* @__PURE__ */ e.jsx(b, { fontSize: "sm", color: "gray.500", p: 2, children: "All report kinds have been used. Remove an existing report to add a new one." }) : /* @__PURE__ */ e.jsx(
2409
+ ve.length === 0 ? /* @__PURE__ */ e.jsx(b, { fontSize: "sm", color: "gray.500", p: 2, children: "All report kinds have been used. Remove an existing report to add a new one." }) : /* @__PURE__ */ e.jsx(
2418
2410
  ge,
2419
2411
  {
2420
- value: Q ? Ce.find(
2412
+ value: Q ? ve.find(
2421
2413
  (p) => p.value === Q
2422
2414
  ) : null,
2423
2415
  onChange: (p) => ie(p?.value || null),
2424
- options: Ce,
2416
+ options: ve,
2425
2417
  placeholder: "Select report kind...",
2426
2418
  isDisabled: s,
2427
2419
  isClearable: !0
@@ -2444,7 +2436,7 @@ const In = ({
2444
2436
  /* @__PURE__ */ e.jsxs(X, { children: [
2445
2437
  /* @__PURE__ */ e.jsx(de, { children: "Suggested Sensor Locations" }),
2446
2438
  /* @__PURE__ */ e.jsx(
2447
- Se,
2439
+ we,
2448
2440
  {
2449
2441
  value: f.map(
2450
2442
  (p) => gt(p)
@@ -2472,8 +2464,8 @@ const In = ({
2472
2464
  ee,
2473
2465
  {
2474
2466
  colorScheme: "blue",
2475
- onClick: Te,
2476
- isDisabled: !Q || s || Ce.length === 0 || Q !== se.PointOfInterest && i.length === 0,
2467
+ onClick: Ae,
2468
+ isDisabled: !Q || s || ve.length === 0 || Q !== se.PointOfInterest && i.length === 0,
2477
2469
  children: "Add Report"
2478
2470
  }
2479
2471
  ) })
@@ -2504,9 +2496,9 @@ const In = ({
2504
2496
  Ee,
2505
2497
  {
2506
2498
  value: p.instructions,
2507
- onChange: (D) => Y(
2499
+ onChange: (P) => Y(
2508
2500
  (k) => k.map(
2509
- (G) => G.id === p.id ? { ...G, instructions: D.target.value } : G
2501
+ (G) => G.id === p.id ? { ...G, instructions: P.target.value } : G
2510
2502
  )
2511
2503
  ),
2512
2504
  rows: 3,
@@ -2520,13 +2512,13 @@ const In = ({
2520
2512
  {
2521
2513
  options: K,
2522
2514
  value: p.parameters,
2523
- onChange: (D) => {
2524
- const k = D.map(
2515
+ onChange: (P) => {
2516
+ const k = P.map(
2525
2517
  (H) => H.id.joint ?? H.id.segment
2526
2518
  ), G = ht(k);
2527
2519
  Y(
2528
2520
  (H) => H.map(
2529
- (V) => V.id === p.id ? { ...V, parameters: D, sensorLocations: G } : V
2521
+ (V) => V.id === p.id ? { ...V, parameters: P, sensorLocations: G } : V
2530
2522
  )
2531
2523
  );
2532
2524
  },
@@ -2537,7 +2529,7 @@ const In = ({
2537
2529
  "Sensors:",
2538
2530
  " ",
2539
2531
  p.sensorLocations.map(
2540
- (D) => gt(D)
2532
+ (P) => gt(P)
2541
2533
  ).join(", ")
2542
2534
  ] })
2543
2535
  ]
@@ -2554,16 +2546,16 @@ const In = ({
2554
2546
  oe,
2555
2547
  {
2556
2548
  justify: "end",
2557
- className: ve((g || s) && "!hidden"),
2558
- children: /* @__PURE__ */ e.jsxs(Me, { gap: 4, children: [
2549
+ className: Ne((g || s) && "!hidden"),
2550
+ children: /* @__PURE__ */ e.jsxs(Le, { gap: 4, children: [
2559
2551
  /* @__PURE__ */ e.jsx(ee, { colorScheme: "gray", isDisabled: m, onClick: o, children: "Cancel" }),
2560
2552
  /* @__PURE__ */ e.jsx(
2561
2553
  ee,
2562
2554
  {
2563
2555
  colorScheme: "blue",
2564
- isDisabled: m || !Fe || !Oe,
2556
+ isDisabled: m || !Fe || !Ie,
2565
2557
  isLoading: m,
2566
- onClick: Ae,
2558
+ onClick: Oe,
2567
2559
  children: "Save changes"
2568
2560
  }
2569
2561
  )
@@ -2601,15 +2593,15 @@ const In = ({
2601
2593
  d ? c?.quantumOwnedActions : c?.actions
2602
2594
  ) ?? [], a = R(Be, x?.module), v = T(() => R(Nt, a?.moduleActions) ?? [], [a?.moduleActions]), [w, _] = z([
2603
2595
  ...v.map((O) => O.actionId) ?? []
2604
- ]), [B, W] = z(a?.name ?? ""), [N, Z] = z([]), [J, $] = z(a?.description ?? "");
2596
+ ]), [B, W] = z(a?.name ?? ""), [N, Z] = z([]), [J, D] = z(a?.description ?? "");
2605
2597
  ce(() => {
2606
- a && (_(v.map((O) => O.actionId)), W(a.name), $(a.description ?? ""), Z(
2598
+ a && (_(v.map((O) => O.actionId)), W(a.name), D(a.description ?? ""), Z(
2607
2599
  a.categories.map(
2608
2600
  (O) => R(ke, O).id
2609
2601
  ) ?? []
2610
2602
  ));
2611
2603
  }, [a, v]);
2612
- const S = P(() => {
2604
+ const S = $(() => {
2613
2605
  let O;
2614
2606
  const M = {
2615
2607
  actions: w,
@@ -2661,10 +2653,10 @@ const In = ({
2661
2653
  selectedCategoryIds: N,
2662
2654
  setSelectedCategoryIds: Z,
2663
2655
  description: J,
2664
- setDescription: $
2656
+ setDescription: D
2665
2657
  }
2666
2658
  ),
2667
- !g && !s && /* @__PURE__ */ e.jsx(oe, { justifyContent: "flex-start", children: /* @__PURE__ */ e.jsxs(Me, { mt: 16, gap: 4, children: [
2659
+ !g && !s && /* @__PURE__ */ e.jsx(oe, { justifyContent: "flex-start", children: /* @__PURE__ */ e.jsxs(Le, { mt: 16, gap: 4, children: [
2668
2660
  /* @__PURE__ */ e.jsx(
2669
2661
  ee,
2670
2662
  {