@wandelbots/wandelbots-js-react-components 6.4.0-pr.revamp.667.9fadf2c → 6.4.0-pr.revamp.667.e1da7d4

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,60 +1,60 @@
1
1
  import { jsxs as y, Fragment as X, jsx as c } from "react/jsx-runtime";
2
- import Wt from "@mui/material/AppBar";
3
- import Tt from "@mui/material/Backdrop";
2
+ import qt from "@mui/material/AppBar";
3
+ import kt from "@mui/material/Backdrop";
4
4
  import L from "@mui/material/Box";
5
- import qt from "@mui/material/Menu";
5
+ import Ht from "@mui/material/Menu";
6
6
  import F from "@mui/material/MenuItem";
7
- import Ht from "@mui/material/Toolbar";
7
+ import Kt from "@mui/material/Toolbar";
8
8
  import j from "@mui/material/Typography";
9
- import { ZeroGravityComponentsBackdropFill as Kt } from "@wandelbots/design-tokens";
10
- import { ExpandMoreFilled as Yt } from "@wandelbots/icons/ExpandMoreFilled";
11
- import { RoundedIconButton as Zt } from "@wandelbots/mui";
12
- import { observer as E, useLocalObservable as kt } from "mobx-react-lite";
9
+ import { ZeroGravityComponentsBackdropFill as Yt } from "@wandelbots/design-tokens";
10
+ import { ExpandMoreFilled as Zt } from "@wandelbots/icons/ExpandMoreFilled";
11
+ import { RoundedIconButton as Qt } from "@wandelbots/mui";
12
+ import { observer as E, useLocalObservable as Rt } from "mobx-react-lite";
13
13
  import * as v from "react";
14
- import { useState as Y, forwardRef as $, useEffect as tt, useRef as rt, useId as Qt } from "react";
14
+ import { useState as Y, forwardRef as $, useEffect as tt, useRef as rt, useId as Xt } from "react";
15
15
  import { e as Z } from "./externalizeComponent-_w2d1_pz.js";
16
- import Xt from "@mui/icons-material/OpenWith";
17
- import te from "@mui/icons-material/Share";
16
+ import te from "@mui/icons-material/OpenWith";
17
+ import ee from "@mui/icons-material/Share";
18
18
  import x from "@mui/material/Stack";
19
- import ee from "@mui/material/Tab";
20
- import oe from "@mui/material/Tabs";
21
- import { runInAction as S, makeAutoObservable as at, computed as ie, when as et, autorun as yt, reaction as ne } from "mobx";
19
+ import oe from "@mui/material/Tab";
20
+ import ie from "@mui/material/Tabs";
21
+ import { runInAction as S, makeAutoObservable as at, computed as ne, when as et, autorun as yt, reaction as re } from "mobx";
22
22
  import { useTranslation as A } from "react-i18next";
23
- import { radiansToDegrees as Rt, tryParseJson as O, XYZ_TO_VECTOR as St, degreesToRadians as re } from "@wandelbots/nova-js";
23
+ import { radiansToDegrees as Ot, tryParseJson as O, XYZ_TO_VECTOR as St, degreesToRadians as ae } from "@wandelbots/nova-js";
24
24
  import { JointTypeEnum as V } from "@wandelbots/nova-js/v2";
25
25
  import * as bt from "three";
26
- import { Vector3 as K, Quaternion as ae } from "three";
27
- import { d as mt, p as Ct, q as se, c as H, e as lt, P } from "./Pose3-pocKPrHN.js";
28
- import Ot from "@mui/material/CircularProgress";
29
- import { capitalize as le } from "@mui/material/utils";
30
- import { lowerFirst as ce, countBy as de } from "lodash-es";
31
- import { m as ge } from "./SafetyBar-Cuak4ffd.js";
32
- import he from "@mui/material/Alert";
33
- import me from "@mui/material/AlertTitle";
26
+ import { Vector3 as K, Quaternion as se } from "three";
27
+ import { d as mt, p as Ct, q as le, c as H, e as lt, P } from "./Pose3-pocKPrHN.js";
28
+ import Jt from "@mui/material/CircularProgress";
29
+ import { capitalize as ce } from "@mui/material/utils";
30
+ import { lowerFirst as de, countBy as ge } from "lodash-es";
31
+ import { m as he } from "./SafetyBar-Cuak4ffd.js";
32
+ import me from "@mui/material/Alert";
33
+ import ue from "@mui/material/AlertTitle";
34
34
  import ct from "@mui/material/Button";
35
- import { useTheme as B, styled as Jt } from "@mui/material/styles";
35
+ import { useTheme as B, styled as Pt } from "@mui/material/styles";
36
36
  import N from "@mui/material/Divider";
37
37
  import vt from "@mui/material/ToggleButton";
38
38
  import ot from "@mui/material/IconButton";
39
- import { e as xt, v as ue, c as st } from "./joggingColors-CuT5u0H8.js";
40
- import pe from "lodash-es/isEqual.js";
41
- import fe from "@mui/material/InputAdornment";
42
- import ye from "@mui/material/FormControl";
43
- import Se from "@mui/material/InputLabel";
44
- import be from "@mui/material/Select";
39
+ import { e as xt, v as pe, c as st } from "./joggingColors-CuT5u0H8.js";
40
+ import fe from "lodash-es/isEqual.js";
41
+ import ye from "@mui/material/InputAdornment";
42
+ import Se from "@mui/material/FormControl";
43
+ import be from "@mui/material/InputLabel";
44
+ import Ce from "@mui/material/Select";
45
45
  import q from "lodash-es/keyBy.js";
46
- import Ce from "lodash-es/uniqueId.js";
47
- import ve from "@mui/material/ToggleButtonGroup";
48
- import Pt from "@mui/material/Slider";
49
- import xe from "lodash-es/isNumber.js";
50
- import _e from "@mui/icons-material/ChevronLeft";
51
- import je from "@mui/icons-material/ChevronRight";
52
- import Ie from "lodash-es/throttle.js";
53
- import we from "@mui/material/Dialog";
54
- import Ee from "@mui/material/DialogActions";
55
- import Me from "@mui/material/DialogContent";
56
- import Te from "@mui/material/DialogTitle";
57
- const xi = Z(
46
+ import ve from "lodash-es/uniqueId.js";
47
+ import xe from "@mui/material/ToggleButtonGroup";
48
+ import At from "@mui/material/Slider";
49
+ import _e from "lodash-es/isNumber.js";
50
+ import je from "@mui/icons-material/ChevronLeft";
51
+ import Ie from "@mui/icons-material/ChevronRight";
52
+ import we from "lodash-es/throttle.js";
53
+ import Ee from "@mui/material/Dialog";
54
+ import Me from "@mui/material/DialogActions";
55
+ import Te from "@mui/material/DialogContent";
56
+ import ke from "@mui/material/DialogTitle";
57
+ const ji = Z(
58
58
  E((e) => {
59
59
  const {
60
60
  appIcon: t,
@@ -63,16 +63,16 @@ const xi = Z(
63
63
  onAppSelect: n,
64
64
  disabled: r = !1,
65
65
  sx: a
66
- } = e, [s, h] = Y(null), m = !!s, g = (l) => {
67
- h(l.currentTarget);
66
+ } = e, [s, g] = Y(null), m = !!s, h = (l) => {
67
+ g(l.currentTarget);
68
68
  }, u = () => {
69
- h(null);
69
+ g(null);
70
70
  }, d = (l) => {
71
71
  u(), l.onClick ? l.onClick() : l.href && (window.location.href = l.href), n == null || n(l);
72
72
  };
73
73
  return /* @__PURE__ */ y(X, { children: [
74
74
  /* @__PURE__ */ c(
75
- Wt,
75
+ qt,
76
76
  {
77
77
  position: "static",
78
78
  sx: {
@@ -84,18 +84,18 @@ const xi = Z(
84
84
  },
85
85
  ...a
86
86
  },
87
- children: /* @__PURE__ */ y(Ht, { sx: { minHeight: "62px !important" }, children: [
87
+ children: /* @__PURE__ */ y(Kt, { sx: { minHeight: "62px !important" }, children: [
88
88
  /* @__PURE__ */ c(L, { sx: { mr: 1, display: "flex", alignItems: "center" }, children: t }),
89
89
  /* @__PURE__ */ y(L, { sx: { display: "flex", alignItems: "center", flexGrow: 1 }, children: [
90
90
  /* @__PURE__ */ c(j, { component: "h1", variant: "subtitle1", children: o }),
91
91
  i.length > 0 && /* @__PURE__ */ c(
92
- Zt,
92
+ Qt,
93
93
  {
94
- icon: /* @__PURE__ */ c(Yt, { size: 20 }),
94
+ icon: /* @__PURE__ */ c(Zt, { size: 20 }),
95
95
  ariaLabel: "switch app",
96
96
  "aria-controls": "app-menu",
97
97
  "aria-haspopup": "true",
98
- onClick: g,
98
+ onClick: h,
99
99
  disabled: r,
100
100
  sx: { ml: 1 }
101
101
  }
@@ -105,19 +105,19 @@ const xi = Z(
105
105
  }
106
106
  ),
107
107
  /* @__PURE__ */ c(
108
- Tt,
108
+ kt,
109
109
  {
110
110
  open: m,
111
111
  onClick: u,
112
112
  sx: {
113
113
  backdropFilter: "blur(4px)",
114
- backgroundColor: Kt,
114
+ backgroundColor: Yt,
115
115
  zIndex: (l) => l.zIndex.modal - 1
116
116
  }
117
117
  }
118
118
  ),
119
119
  /* @__PURE__ */ c(
120
- qt,
120
+ Ht,
121
121
  {
122
122
  id: "app-menu",
123
123
  anchorEl: s,
@@ -146,15 +146,15 @@ const xi = Z(
146
146
  )
147
147
  ] });
148
148
  })
149
- ), ke = ({
149
+ ), Re = ({
150
150
  title: e,
151
151
  titleId: t,
152
152
  ...o
153
- }, i) => /* @__PURE__ */ v.createElement("svg", { width: 21, height: 21, viewBox: "0 0 21 21", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: i, "aria-labelledby": t, ...o }, e ? /* @__PURE__ */ v.createElement("title", { id: t }, e) : null, /* @__PURE__ */ v.createElement("g", { id: "JogMinus" }, /* @__PURE__ */ v.createElement("path", { id: "Minus", d: "M0 13V8H21V13H0Z", fill: "white" }))), Re = $(ke), Oe = ({
153
+ }, i) => /* @__PURE__ */ v.createElement("svg", { width: 21, height: 21, viewBox: "0 0 21 21", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: i, "aria-labelledby": t, ...o }, e ? /* @__PURE__ */ v.createElement("title", { id: t }, e) : null, /* @__PURE__ */ v.createElement("g", { id: "JogMinus" }, /* @__PURE__ */ v.createElement("path", { id: "Minus", d: "M0 13V8H21V13H0Z", fill: "white" }))), Oe = $(Re), Je = ({
154
154
  title: e,
155
155
  titleId: t,
156
156
  ...o
157
- }, i) => /* @__PURE__ */ v.createElement("svg", { width: 21, height: 21, viewBox: "0 0 21 21", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: i, "aria-labelledby": t, ...o }, e ? /* @__PURE__ */ v.createElement("title", { id: t }, e) : null, /* @__PURE__ */ v.createElement("g", { id: "JogPlus" }, /* @__PURE__ */ v.createElement("g", { id: "Plus" }, /* @__PURE__ */ v.createElement("path", { d: "M0 13V8H8V13H0Z", fill: "white" }), /* @__PURE__ */ v.createElement("path", { d: "M8 0L13 2.18557e-07L13 21H8L8 0Z", fill: "white" }), /* @__PURE__ */ v.createElement("path", { d: "M13 13V8H21V13H13Z", fill: "white" })))), Je = $(Oe), _t = Z(
157
+ }, i) => /* @__PURE__ */ v.createElement("svg", { width: 21, height: 21, viewBox: "0 0 21 21", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: i, "aria-labelledby": t, ...o }, e ? /* @__PURE__ */ v.createElement("title", { id: t }, e) : null, /* @__PURE__ */ v.createElement("g", { id: "JogPlus" }, /* @__PURE__ */ v.createElement("g", { id: "Plus" }, /* @__PURE__ */ v.createElement("path", { d: "M0 13V8H8V13H0Z", fill: "white" }), /* @__PURE__ */ v.createElement("path", { d: "M8 0L13 2.18557e-07L13 21H8L8 0Z", fill: "white" }), /* @__PURE__ */ v.createElement("path", { d: "M13 13V8H21V13H13Z", fill: "white" })))), Pe = $(Je), _t = Z(
158
158
  E(
159
159
  ({
160
160
  colors: e,
@@ -171,7 +171,7 @@ const xi = Z(
171
171
  const J = o(), D = d.current;
172
172
  D && (D.textContent = J);
173
173
  });
174
- const h = B(), [m, g] = Y(null);
174
+ const g = B(), [m, h] = Y(null);
175
175
  tt(() => {
176
176
  r && I();
177
177
  }, [r]);
@@ -210,7 +210,7 @@ const xi = Z(
210
210
  },
211
211
  ":disabled": {
212
212
  backgroundColor: (R = e.buttonBackgroundColor) == null ? void 0 : R.disabled,
213
- "svg path": { fill: h.palette.action.disabled }
213
+ "svg path": { fill: g.palette.action.disabled }
214
214
  }
215
215
  }, C = {
216
216
  ...f,
@@ -219,14 +219,14 @@ const xi = Z(
219
219
  path: { fill: e.backgroundColor },
220
220
  ":disabled": {
221
221
  backgroundColor: (U = e.buttonBackgroundColor) == null ? void 0 : U.pressed,
222
- "svg path": { fill: h.palette.action.disabled }
222
+ "svg path": { fill: g.palette.action.disabled }
223
223
  }
224
224
  };
225
225
  function w(J, D) {
226
- r || J.button === 0 && (g(D), i(D));
226
+ r || J.button === 0 && (h(D), i(D));
227
227
  }
228
228
  function I() {
229
- g(null), n();
229
+ h(null), n();
230
230
  }
231
231
  return /* @__PURE__ */ y(x, { height: "64px", direction: "row", justifyContent: "center", ...s, children: [
232
232
  /* @__PURE__ */ c(
@@ -245,7 +245,7 @@ const xi = Z(
245
245
  borderBottom: `2px solid ${l ?? "#fff"}`,
246
246
  borderTop: `2px solid ${l ?? "#fff"}`
247
247
  },
248
- children: /* @__PURE__ */ c(Re, {})
248
+ children: /* @__PURE__ */ c(Oe, {})
249
249
  }
250
250
  ),
251
251
  /* @__PURE__ */ y(
@@ -275,9 +275,9 @@ const xi = Z(
275
275
  color: e.color,
276
276
  ".MuiTypography-root": {
277
277
  fontWeight: 700,
278
- ...r ? { color: h.palette.action.disabled } : {}
278
+ ...r ? { color: g.palette.action.disabled } : {}
279
279
  },
280
- ...r ? { "svg path": { fill: h.palette.action.disabled } } : {}
280
+ ...r ? { "svg path": { fill: g.palette.action.disabled } } : {}
281
281
  },
282
282
  children: t
283
283
  }
@@ -288,7 +288,7 @@ const xi = Z(
288
288
  height: "22px",
289
289
  sx: {
290
290
  fontSize: "15px",
291
- color: r ? h.palette.action.disabled : e.color,
291
+ color: r ? g.palette.action.disabled : e.color,
292
292
  fontWeight: 700,
293
293
  fontVariantNumeric: "tabular-nums",
294
294
  minWidth: "80px",
@@ -317,13 +317,13 @@ const xi = Z(
317
317
  borderBottom: `2px solid ${l ?? "#fff"}`,
318
318
  borderTop: `2px solid ${l ?? "#fff"}`
319
319
  },
320
- children: /* @__PURE__ */ c(Je, {})
320
+ children: /* @__PURE__ */ c(Pe, {})
321
321
  }
322
322
  )
323
323
  ] });
324
324
  }
325
325
  )
326
- ), Pe = Z(
326
+ ), Ae = Z(
327
327
  E(
328
328
  ({
329
329
  startJogging: e,
@@ -336,10 +336,10 @@ const xi = Z(
336
336
  ...s
337
337
  }) => {
338
338
  var _, R, z, U, J, D, ft;
339
- const { t: h } = A(), [m, g] = Y(), u = B(), d = {
339
+ const { t: g } = A(), [m, h] = Y(), u = B(), d = {
340
340
  background: (_ = u.palette.backgroundPaperElevation) == null ? void 0 : _[4],
341
341
  color: (R = u.palette.backgroundPaperElevation) == null ? void 0 : R[11]
342
- }, l = kt(() => ({
342
+ }, l = Rt(() => ({
343
343
  activeJoggingDir: null,
344
344
  startJogging(b) {
345
345
  this.activeJoggingDir = b, e(b);
@@ -347,14 +347,14 @@ const xi = Z(
347
347
  stopJogging() {
348
348
  this.activeJoggingDir = null, t();
349
349
  }
350
- })), f = Ie(() => {
350
+ })), f = we(() => {
351
351
  const b = n ? p(r()) : r();
352
- (b === void 0 || m === void 0 || Math.abs(m - b) > 1e-9) && g(b);
352
+ (b === void 0 || m === void 0 || Math.abs(m - b) > 1e-9) && h(b);
353
353
  }, 50);
354
354
  mt(f);
355
355
  function p(b) {
356
356
  if (b !== void 0)
357
- return Rt(b);
357
+ return Ot(b);
358
358
  }
359
359
  function C(b) {
360
360
  b.button === 0 && l.startJogging("-");
@@ -370,14 +370,14 @@ const xi = Z(
370
370
  }
371
371
  function T(b, G = 1) {
372
372
  if (b === void 0 || Number.isNaN(b)) return "";
373
- const W = h("General.degree.variable", {
373
+ const W = g("General.degree.variable", {
374
374
  amount: b.toFixed(G)
375
375
  });
376
376
  return b > 0 && G === 0 ? `+${W}` : W;
377
377
  }
378
378
  function k(b, G = 1) {
379
379
  if (b === void 0 || Number.isNaN(b)) return "";
380
- const W = h("General.mm.variable", {
380
+ const W = g("General.mm.variable", {
381
381
  amount: b.toFixed(G)
382
382
  });
383
383
  return b > 0 && G === 0 ? `+${W}` : W;
@@ -427,7 +427,7 @@ const xi = Z(
427
427
  ...l.activeJoggingDir === "-" ? d : {}
428
428
  },
429
429
  children: /* @__PURE__ */ c(
430
- _e,
430
+ je,
431
431
  {
432
432
  sx: {
433
433
  pointerEvents: "none",
@@ -471,7 +471,7 @@ const xi = Z(
471
471
  }
472
472
  ),
473
473
  /* @__PURE__ */ c(
474
- Pt,
474
+ At,
475
475
  {
476
476
  disabled: !0,
477
477
  "aria-label": "Joint position",
@@ -527,7 +527,7 @@ const xi = Z(
527
527
  ...l.activeJoggingDir === "+" ? d : {}
528
528
  },
529
529
  children: /* @__PURE__ */ c(
530
- je,
530
+ Ie,
531
531
  {
532
532
  sx: {
533
533
  pointerEvents: "none",
@@ -543,7 +543,7 @@ const xi = Z(
543
543
  }
544
544
  )
545
545
  );
546
- function Ae({
546
+ function De({
547
547
  currentTcpPose: e,
548
548
  axis: t,
549
549
  direction: o,
@@ -581,24 +581,24 @@ function Ae({
581
581
  const s = Ct(
582
582
  e.orientation,
583
583
  "ROTATION_VECTOR"
584
- ), h = new K();
585
- h[t] = 1, !n && r && h.applyQuaternion(r);
586
- const m = new ae().setFromAxisAngle(
587
- h,
584
+ ), g = new K();
585
+ g[t] = 1, !n && r && g.applyQuaternion(r);
586
+ const m = new se().setFromAxisAngle(
587
+ g,
588
588
  i.distanceRads * a
589
- ), g = n ? s.multiply(m) : m.multiply(s);
589
+ ), h = n ? s.multiply(m) : m.multiply(s);
590
590
  return {
591
591
  position: e.position,
592
- orientation: [...se(g)]
592
+ orientation: [...le(h)]
593
593
  };
594
594
  }
595
- function De(e, t, o) {
596
- return t.length !== e.length ? !1 : Dt(e, t, o);
597
- }
598
- function At(e, t, o) {
599
- return t.length !== e.length ? !0 : Dt(e, t, o);
595
+ function Ve(e, t, o) {
596
+ return t.length !== e.length ? !1 : Vt(e, t, o);
600
597
  }
601
598
  function Dt(e, t, o) {
599
+ return t.length !== e.length ? !0 : Vt(e, t, o);
600
+ }
601
+ function Vt(e, t, o) {
602
602
  for (let i = 0; i < t.length; i++)
603
603
  if (Math.abs(
604
604
  (t[i] ?? 0) - (e[i] ?? 0)
@@ -606,7 +606,7 @@ function Dt(e, t, o) {
606
606
  return !1;
607
607
  return !0;
608
608
  }
609
- function Ve(e, t, o) {
609
+ function Le(e, t, o) {
610
610
  if (e === void 0 && t || e && t === void 0 || (e == null ? void 0 : e.orientation) === void 0 || (t == null ? void 0 : t.orientation) === void 0 || (e == null ? void 0 : e.position) === void 0 || (t == null ? void 0 : t.position) === void 0)
611
611
  return !1;
612
612
  if (e === void 0 || t === void 0)
@@ -614,14 +614,14 @@ function Ve(e, t, o) {
614
614
  let i = 0;
615
615
  return i += Math.abs(e.orientation[0] - t.orientation[0]), i += Math.abs(e.orientation[1] - t.orientation[1]), i += Math.abs(e.orientation[2] - t.orientation[2]), i += Math.abs(e.position[0] - t.position[0]), i += Math.abs(e.position[1] - t.position[1]), i += Math.abs(e.position[2] - t.position[2]), i <= o;
616
616
  }
617
- function Vt(e, t, o) {
618
- return e.coordinate_system === t.coordinate_system && e.tcp === t.tcp && Ve(
617
+ function Lt(e, t, o) {
618
+ return e.coordinate_system === t.coordinate_system && e.tcp === t.tcp && Le(
619
619
  e.tcp_pose,
620
620
  t.tcp_pose,
621
621
  o
622
622
  );
623
623
  }
624
- function Le(e, t) {
624
+ function Fe(e, t) {
625
625
  const o = new K(
626
626
  t[0],
627
627
  t[1],
@@ -633,86 +633,86 @@ function Le(e, t) {
633
633
  ), n = o.length(), r = o.normalize();
634
634
  let a = i.length(), s = i.normalize();
635
635
  s.dot(r) < 0 && (a = -a, s = s.multiplyScalar(-1));
636
- let h = a - n;
637
- return h -= 2 * Math.PI * Math.floor((h + Math.PI) / (2 * Math.PI)), a = n + h, [...s.multiplyScalar(a)];
636
+ let g = a - n;
637
+ return g -= 2 * Math.PI * Math.floor((g + Math.PI) / (2 * Math.PI)), a = n + g, [...s.multiplyScalar(a)];
638
638
  }
639
- const Fe = 2e-4;
640
- function Ne(e) {
639
+ const Ne = 2e-4;
640
+ function $e(e) {
641
641
  const { joint_position: t, tcp_pose: o, tcp: i, coordinate_system: n } = e;
642
642
  return { joint_position: t, tcp_pose: o, tcp: i, coordinate_system: n };
643
643
  }
644
- function $e(e, t) {
645
- return e.tcp === t.tcp && e.coordinate_system === t.coordinate_system && e.tcp_pose === void 0 == (t.tcp_pose === void 0) && De(
644
+ function Be(e, t) {
645
+ return e.tcp === t.tcp && e.coordinate_system === t.coordinate_system && e.tcp_pose === void 0 == (t.tcp_pose === void 0) && Ve(
646
646
  e.joint_position,
647
647
  t.joint_position,
648
- Fe
648
+ Ne
649
649
  );
650
650
  }
651
651
  const jt = 1e-4;
652
652
  class ut {
653
- constructor(t, o, i, n, r, a, s = "cell", h = {}) {
654
- this.controller = o, this.motionGroup = i, this.description = n, this.initialMotionState = r, this.motionStateSocket = a, this.cellId = s, this.nova = H(t), this.logger = h.logger ?? console, this.rapidlyChangingMotionState = r, a.addEventListener("message", (m) => {
653
+ constructor(t, o, i, n, r, a, s = "cell", g = {}) {
654
+ this.controller = o, this.motionGroup = i, this.description = n, this.initialMotionState = r, this.motionStateSocket = a, this.cellId = s, this.nova = H(t), this.logger = g.logger ?? console, this.rapidlyChangingMotionState = r, a.addEventListener("message", (m) => {
655
655
  var l;
656
- const g = (l = O(m.data)) == null ? void 0 : l.result;
657
- if (!g)
656
+ const h = (l = O(m.data)) == null ? void 0 : l.result;
657
+ if (!h)
658
658
  throw new Error(
659
659
  `Failed to get motion state for ${this.motionGroupId}: ${m.data}`
660
660
  );
661
- Vt(
661
+ Lt(
662
662
  this.rapidlyChangingMotionState,
663
- g,
663
+ h,
664
664
  jt
665
665
  ) || S(() => {
666
666
  var f, p, C;
667
- this.rapidlyChangingMotionState.tcp_pose == null ? this.rapidlyChangingMotionState.tcp_pose = g.tcp_pose : (f = g.tcp_pose) != null && f.orientation && ((p = g.tcp_pose) != null && p.position) && ((C = this.rapidlyChangingMotionState.tcp_pose) != null && C.orientation) ? this.rapidlyChangingMotionState.tcp_pose = {
668
- position: g.tcp_pose.position,
669
- orientation: Le(
670
- g.tcp_pose.orientation,
667
+ this.rapidlyChangingMotionState.tcp_pose == null ? this.rapidlyChangingMotionState.tcp_pose = h.tcp_pose : (f = h.tcp_pose) != null && f.orientation && ((p = h.tcp_pose) != null && p.position) && ((C = this.rapidlyChangingMotionState.tcp_pose) != null && C.orientation) ? this.rapidlyChangingMotionState.tcp_pose = {
668
+ position: h.tcp_pose.position,
669
+ orientation: Fe(
670
+ h.tcp_pose.orientation,
671
671
  this.rapidlyChangingMotionState.tcp_pose.orientation
672
672
  )
673
673
  } : this.logger.debug("Received incomplete tcp_pose, ignoring", {
674
- tcpPose: g.tcp_pose
674
+ tcpPose: h.tcp_pose
675
675
  });
676
- }), At(
676
+ }), Dt(
677
677
  this.rapidlyChangingMotionState.joint_position,
678
- g.joint_position,
678
+ h.joint_position,
679
679
  jt
680
680
  ) || S(() => {
681
- this.rapidlyChangingMotionState.joint_position = g.joint_position;
682
- }), g.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== g.tcp && S(() => {
683
- this.rapidlyChangingMotionState.tcp = g.tcp;
684
- }), this.rapidlyChangingMotionState.standstill !== g.standstill && S(() => {
685
- this.rapidlyChangingMotionState.standstill = g.standstill;
681
+ this.rapidlyChangingMotionState.joint_position = h.joint_position;
682
+ }), h.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== h.tcp && S(() => {
683
+ this.rapidlyChangingMotionState.tcp = h.tcp;
684
+ }), this.rapidlyChangingMotionState.standstill !== h.standstill && S(() => {
685
+ this.rapidlyChangingMotionState.standstill = h.standstill;
686
686
  });
687
- const u = this.rapidlyChangingMotionState.joint_limit_reached.limit_reached, d = g.joint_limit_reached.limit_reached;
687
+ const u = this.rapidlyChangingMotionState.joint_limit_reached.limit_reached, d = h.joint_limit_reached.limit_reached;
688
688
  u.some((f, p) => f !== d[p]) && S(() => {
689
- this.rapidlyChangingMotionState.joint_limit_reached = g.joint_limit_reached;
690
- }), this.rapidlyChangingMotionState.execute !== g.execute && S(() => {
691
- this.rapidlyChangingMotionState.execute = g.execute;
689
+ this.rapidlyChangingMotionState.joint_limit_reached = h.joint_limit_reached;
690
+ }), this.rapidlyChangingMotionState.execute !== h.execute && S(() => {
691
+ this.rapidlyChangingMotionState.execute = h.execute;
692
692
  });
693
693
  }), at(this, {
694
694
  logger: !1,
695
695
  // keepAlive: pose readouts poll it from requestAnimationFrame, which
696
696
  // MobX does not track, and a computed nobody observes is recomputed on
697
697
  // every read without consulting `equals`
698
- readoutState: ie({ equals: $e, keepAlive: !0 })
698
+ readoutState: ne({ equals: Be, keepAlive: !0 })
699
699
  });
700
700
  }
701
701
  static async open(t, o, i = {}) {
702
702
  var p;
703
- const n = H(t), r = i.cellId ?? lt(t) ?? "cell", [a, s] = o.split("@"), h = await n.api.controller.getCurrentRobotControllerState(
703
+ const n = H(t), r = i.cellId ?? lt(t) ?? "cell", [a, s] = o.split("@"), g = await n.api.controller.getCurrentRobotControllerState(
704
704
  r,
705
705
  s
706
- ), m = h == null ? void 0 : h.motion_groups.find(
706
+ ), m = g == null ? void 0 : g.motion_groups.find(
707
707
  (C) => C.motion_group === o
708
708
  );
709
- if (!h || !m)
709
+ if (!g || !m)
710
710
  throw new Error(
711
711
  `Controller ${s} or motion group ${o} not found`
712
712
  );
713
- const g = n.openReconnectingWebsocket(
713
+ const h = n.openReconnectingWebsocket(
714
714
  `/cells/${r}/controllers/${s}/motion-groups/${o}/state-stream`
715
- ), u = await g.firstMessage(), d = (p = O(u.data)) == null ? void 0 : p.result;
715
+ ), u = await h.firstMessage(), d = (p = O(u.data)) == null ? void 0 : p.result;
716
716
  if (!d)
717
717
  throw new Error(
718
718
  `Unable to parse initial motion state message ${u.data}`
@@ -729,11 +729,11 @@ class ut {
729
729
  );
730
730
  return new ut(
731
731
  n,
732
- h,
732
+ g,
733
733
  m,
734
734
  f,
735
735
  d,
736
- g,
736
+ h,
737
737
  r,
738
738
  { logger: l }
739
739
  );
@@ -744,7 +744,7 @@ class ut {
744
744
  * also holds for untracked reads, e.g. from requestAnimationFrame.
745
745
  */
746
746
  get readoutState() {
747
- return Ne(this.rapidlyChangingMotionState);
747
+ return $e(this.rapidlyChangingMotionState);
748
748
  }
749
749
  get motionGroupId() {
750
750
  return this.motionGroup.motion_group;
@@ -761,10 +761,10 @@ class ut {
761
761
  this.motionStateSocket.close();
762
762
  }
763
763
  }
764
- const It = "Movement request rejected. Another client is currently executing a 'Jogging' motion!", Be = 500, ze = 5e3;
765
- function Ue(e) {
764
+ const It = "Movement request rejected. Another client is currently executing a 'Jogging' motion!", ze = 500, Ue = 5e3;
765
+ function Ge(e) {
766
766
  var o;
767
- return (((o = e.times) == null ? void 0 : o[e.times.length - 1]) ?? 0) * 2e3 + ze;
767
+ return (((o = e.times) == null ? void 0 : o[e.times.length - 1]) ?? 0) * 2e3 + Ue;
768
768
  }
769
769
  class pt {
770
770
  constructor(t, o = {}) {
@@ -899,19 +899,19 @@ class pt {
899
899
  new Error(`Jogging initialization timeout after ${this.timeout} ms`)
900
900
  );
901
901
  }, this.timeout), a = (m) => {
902
- n || (n = !0, clearTimeout(r), i.removeEventListener("close", h), this.endJoggingInit === s && (this.endJoggingInit = void 0), m ? o(m) : t());
903
- }, s = () => a(), h = () => {
902
+ n || (n = !0, clearTimeout(r), i.removeEventListener("close", g), this.endJoggingInit === s && (this.endJoggingInit = void 0), m ? o(m) : t());
903
+ }, s = () => a(), g = () => {
904
904
  i.disposed && a();
905
905
  };
906
- this.endJoggingInit = s, i.addEventListener("close", h), i.addEventListener("message", (m) => {
906
+ this.endJoggingInit = s, i.addEventListener("close", g), i.addEventListener("message", (m) => {
907
907
  var u, d, l;
908
- const g = O(m.data);
909
- if (((u = g == null ? void 0 : g.result) == null ? void 0 : u.kind) === "INITIALIZE_RECEIVED") {
908
+ const h = O(m.data);
909
+ if (((u = h == null ? void 0 : h.result) == null ? void 0 : u.kind) === "INITIALIZE_RECEIVED") {
910
910
  a();
911
911
  return;
912
912
  }
913
- if (((d = g == null ? void 0 : g.result) == null ? void 0 : d.kind) === "MOTION_ERROR")
914
- if (this.onBlocked && ((l = g == null ? void 0 : g.result) != null && l.message.includes(It))) {
913
+ if (((d = h == null ? void 0 : h.result) == null ? void 0 : d.kind) === "MOTION_ERROR")
914
+ if (this.onBlocked && ((l = h == null ? void 0 : h.result) != null && l.message.includes(It))) {
915
915
  a(), i.dispose(), this.onBlocked();
916
916
  return;
917
917
  } else this.onError ? (a(), this.onError(m.data)) : a(new Error(m.data));
@@ -1050,7 +1050,7 @@ class pt {
1050
1050
  motion: a
1051
1051
  }) {
1052
1052
  var p, C, w;
1053
- const s = [], h = Ae({
1053
+ const s = [], g = De({
1054
1054
  currentTcpPose: t,
1055
1055
  axis: n,
1056
1056
  direction: r,
@@ -1063,8 +1063,8 @@ class pt {
1063
1063
  path: {
1064
1064
  path_definition_name: "PathLine",
1065
1065
  target_pose: {
1066
- position: h.position,
1067
- orientation: h.orientation
1066
+ position: g.position,
1067
+ orientation: g.orientation
1068
1068
  }
1069
1069
  }
1070
1070
  });
@@ -1075,7 +1075,7 @@ class pt {
1075
1075
  );
1076
1076
  return;
1077
1077
  }
1078
- const g = this.motionStream.rapidlyChangingMotionState.tcp, u = g ? (C = (p = m.tcps) == null ? void 0 : p[g]) == null ? void 0 : C.pose : void 0, d = {
1078
+ const h = this.motionStream.rapidlyChangingMotionState.tcp, u = h ? (C = (p = m.tcps) == null ? void 0 : p[h]) == null ? void 0 : C.pose : void 0, d = {
1079
1079
  motion_group_model: ((w = this.options) == null ? void 0 : w.motionGroupModel) ?? m.motion_group_model,
1080
1080
  cycle_time: m.cycle_time,
1081
1081
  mounting: m.mounting,
@@ -1125,12 +1125,12 @@ class pt {
1125
1125
  let n, r;
1126
1126
  try {
1127
1127
  await new Promise((a, s) => {
1128
- let h = !1;
1128
+ let g = !1;
1129
1129
  const m = () => {
1130
- h || (h = !0, a());
1131
- }, g = (d) => {
1132
- if (!h) {
1133
- if (h = !0, this.onError) {
1130
+ g || (g = !0, a());
1131
+ }, h = (d) => {
1132
+ if (!g) {
1133
+ if (g = !0, this.onError) {
1134
1134
  this.onError(d), a();
1135
1135
  return;
1136
1136
  }
@@ -1142,16 +1142,16 @@ class pt {
1142
1142
  }
1143
1143
  };
1144
1144
  r = m, this.endIncrementalMotion = m;
1145
- const u = Ue(t);
1145
+ const u = Ge(t);
1146
1146
  n = setTimeout(() => {
1147
- g(
1147
+ h(
1148
1148
  new Error(`Jogging motion did not complete within ${u}ms`)
1149
1149
  );
1150
1150
  }, u), o.addEventListener("message", (d) => {
1151
1151
  var f, p;
1152
1152
  const l = (f = O(d.data)) == null ? void 0 : f.result;
1153
1153
  if (!(l != null && l.kind)) {
1154
- g(
1154
+ h(
1155
1155
  new Error(
1156
1156
  `Failed to execute trajectory: Received invalid message ${d.data}`
1157
1157
  )
@@ -1164,7 +1164,7 @@ class pt {
1164
1164
  }
1165
1165
  if (l.kind === "INITIALIZE_RECEIVED") {
1166
1166
  if (l.add_trajectory_error || l.message) {
1167
- g(l);
1167
+ h(l);
1168
1168
  return;
1169
1169
  }
1170
1170
  o.sendJson({
@@ -1173,11 +1173,11 @@ class pt {
1173
1173
  });
1174
1174
  } else if (l.kind === "START_RECEIVED") {
1175
1175
  if (l.message) {
1176
- g(l);
1176
+ h(l);
1177
1177
  return;
1178
1178
  }
1179
- this.waitForMotionToFinish(i.signal).then(m, g);
1180
- } else l.kind === "PAUSE_RECEIVED" || (l.kind === "MOTION_ERROR" && l.message ? g(l) : g(
1179
+ this.waitForMotionToFinish(i.signal).then(m, h);
1180
+ } else l.kind === "PAUSE_RECEIVED" || (l.kind === "MOTION_ERROR" && l.message ? h(l) : h(
1181
1181
  new Error(
1182
1182
  `Failed to execute trajectory, cannot handle message type "${l.kind}"`
1183
1183
  )
@@ -1208,13 +1208,13 @@ class pt {
1208
1208
  async waitForMotionToFinish(t) {
1209
1209
  const o = () => this.motionStream.rapidlyChangingMotionState.standstill;
1210
1210
  await et(() => !o(), {
1211
- timeout: Be,
1211
+ timeout: ze,
1212
1212
  signal: t
1213
1213
  }).catch(() => {
1214
1214
  }), await et(o, { signal: t });
1215
1215
  }
1216
1216
  }
1217
- const Ge = (e) => {
1217
+ const We = (e) => {
1218
1218
  const t = e.softTimeout || 3e3, [o, i] = Y(!1);
1219
1219
  return tt(() => {
1220
1220
  const n = setTimeout(() => {
@@ -1230,13 +1230,13 @@ const Ge = (e) => {
1230
1230
  justifyContent: "center",
1231
1231
  sx: { color: "text.primary" },
1232
1232
  children: e.error ? /* @__PURE__ */ c(
1233
- We,
1233
+ qe,
1234
1234
  {
1235
1235
  loadingMessage: e.message,
1236
1236
  error: e.error
1237
1237
  }
1238
1238
  ) : /* @__PURE__ */ y(X, { children: [
1239
- /* @__PURE__ */ c(Ot, { sx: { mb: 3 } }),
1239
+ /* @__PURE__ */ c(Jt, { sx: { mb: 3 } }),
1240
1240
  !!e.message && /* @__PURE__ */ c(j, { variant: "body1", children: e.message }),
1241
1241
  /* @__PURE__ */ c(
1242
1242
  j,
@@ -1253,8 +1253,8 @@ const Ge = (e) => {
1253
1253
  ] })
1254
1254
  }
1255
1255
  );
1256
- }, We = (e) => {
1257
- const t = ge(e.error), o = e.error instanceof Error ? e.error.stack : null;
1256
+ }, qe = (e) => {
1257
+ const t = he(e.error), o = e.error instanceof Error ? e.error.stack : null;
1258
1258
  return /* @__PURE__ */ y(
1259
1259
  x,
1260
1260
  {
@@ -1266,7 +1266,7 @@ const Ge = (e) => {
1266
1266
  color: "error.main"
1267
1267
  },
1268
1268
  children: [
1269
- /* @__PURE__ */ c(j, { variant: "body1", children: (e.loadingMessage ? `Error while ${ce(le(e.loadingMessage))} - ` : "") + t }),
1269
+ /* @__PURE__ */ c(j, { variant: "body1", children: (e.loadingMessage ? `Error while ${de(ce(e.loadingMessage))} - ` : "") + t }),
1270
1270
  o && /* @__PURE__ */ c(
1271
1271
  L,
1272
1272
  {
@@ -1285,10 +1285,10 @@ const Ge = (e) => {
1285
1285
  ]
1286
1286
  }
1287
1287
  );
1288
- }, qe = E(({ store: e }) => {
1288
+ }, He = E(({ store: e }) => {
1289
1289
  const { t } = A();
1290
1290
  return /* @__PURE__ */ c(
1291
- Tt,
1291
+ kt,
1292
1292
  {
1293
1293
  "data-testid": "jogging-blocked",
1294
1294
  "aria-label": "jogging-blocked",
@@ -1302,8 +1302,8 @@ const Ge = (e) => {
1302
1302
  alignItems: "flex-start"
1303
1303
  },
1304
1304
  children: /* @__PURE__ */ y(x, { sx: { m: 2, width: "100%" }, children: [
1305
- /* @__PURE__ */ y(he, { severity: "error", sx: { mb: 2 }, children: [
1306
- /* @__PURE__ */ c(me, { children: t("Jogging.Blocked.ti") }),
1305
+ /* @__PURE__ */ y(me, { severity: "error", sx: { mb: 2 }, children: [
1306
+ /* @__PURE__ */ c(ue, { children: t("Jogging.Blocked.ti") }),
1307
1307
  t("Jogging.Blocked.lb")
1308
1308
  ] }),
1309
1309
  /* @__PURE__ */ c(
@@ -1318,30 +1318,30 @@ const Ge = (e) => {
1318
1318
  ] })
1319
1319
  }
1320
1320
  );
1321
- }), He = ({
1321
+ }), Ke = ({
1322
1322
  title: e,
1323
1323
  titleId: t,
1324
1324
  ...o
1325
- }, i) => /* @__PURE__ */ v.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 19, height: 10, fill: "none", ref: i, "aria-labelledby": t, ...o }, e ? /* @__PURE__ */ v.createElement("title", { id: t }, e) : null, /* @__PURE__ */ v.createElement("path", { fill: "#fff", fillRule: "evenodd", d: "M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0", clipRule: "evenodd" })), Ke = $(He), Ye = ({
1325
+ }, i) => /* @__PURE__ */ v.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 19, height: 10, fill: "none", ref: i, "aria-labelledby": t, ...o }, e ? /* @__PURE__ */ v.createElement("title", { id: t }, e) : null, /* @__PURE__ */ v.createElement("path", { fill: "#fff", fillRule: "evenodd", d: "M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0", clipRule: "evenodd" })), Ye = $(Ke), Ze = ({
1326
1326
  title: e,
1327
1327
  titleId: t,
1328
1328
  ...o
1329
- }, i) => /* @__PURE__ */ v.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 19, height: 10, fill: "none", ref: i, "aria-labelledby": t, ...o }, e ? /* @__PURE__ */ v.createElement("title", { id: t }, e) : null, /* @__PURE__ */ v.createElement("path", { fill: "#fff", fillRule: "evenodd", d: "M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0", clipRule: "evenodd" })), Ze = $(Ye), Qe = ({
1329
+ }, i) => /* @__PURE__ */ v.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 19, height: 10, fill: "none", ref: i, "aria-labelledby": t, ...o }, e ? /* @__PURE__ */ v.createElement("title", { id: t }, e) : null, /* @__PURE__ */ v.createElement("path", { fill: "#fff", fillRule: "evenodd", d: "M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0", clipRule: "evenodd" })), Qe = $(Ze), Xe = ({
1330
1330
  title: e,
1331
1331
  titleId: t,
1332
1332
  ...o
1333
- }, i) => /* @__PURE__ */ v.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 10, height: 19, fill: "none", ref: i, "aria-labelledby": t, ...o }, e ? /* @__PURE__ */ v.createElement("title", { id: t }, e) : null, /* @__PURE__ */ v.createElement("path", { fill: "#fff", fillRule: "evenodd", d: "M9.522 14.811A.899.899 0 1 0 8.25 13.54L6.19 15.601V3.16L8.25 5.221A.9.9 0 0 0 9.522 3.95L5.926.354a.9.9 0 0 0-1.272 0L1.058 3.95a.9.9 0 1 0 1.271 1.271L4.391 3.16v12.442L2.329 13.54a.899.899 0 1 0-1.271 1.271l3.596 3.597a.9.9 0 0 0 1.272 0z", clipRule: "evenodd" })), Xe = $(Qe), to = ({
1333
+ }, i) => /* @__PURE__ */ v.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 10, height: 19, fill: "none", ref: i, "aria-labelledby": t, ...o }, e ? /* @__PURE__ */ v.createElement("title", { id: t }, e) : null, /* @__PURE__ */ v.createElement("path", { fill: "#fff", fillRule: "evenodd", d: "M9.522 14.811A.899.899 0 1 0 8.25 13.54L6.19 15.601V3.16L8.25 5.221A.9.9 0 0 0 9.522 3.95L5.926.354a.9.9 0 0 0-1.272 0L1.058 3.95a.9.9 0 1 0 1.271 1.271L4.391 3.16v12.442L2.329 13.54a.899.899 0 1 0-1.271 1.271l3.596 3.597a.9.9 0 0 0 1.272 0z", clipRule: "evenodd" })), to = $(Xe), eo = ({
1334
1334
  title: e,
1335
1335
  titleId: t,
1336
1336
  ...o
1337
- }, i) => /* @__PURE__ */ v.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: i, "aria-labelledby": t, ...o }, e ? /* @__PURE__ */ v.createElement("title", { id: t }, e) : null, /* @__PURE__ */ v.createElement("path", { d: "M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C11.0583 14.1 12.5083 12.1667 11.475 12.9L12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z", fill: "white" })), eo = $(to), Lt = E(
1337
+ }, i) => /* @__PURE__ */ v.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: i, "aria-labelledby": t, ...o }, e ? /* @__PURE__ */ v.createElement("title", { id: t }, e) : null, /* @__PURE__ */ v.createElement("path", { d: "M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C11.0583 14.1 12.5083 12.1667 11.475 12.9L12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z", fill: "white" })), oo = $(eo), Ft = E(
1338
1338
  ({ store: e }) => {
1339
1339
  const { t } = A(), [o, i] = Y(
1340
1340
  e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached
1341
1341
  ), n = rt(o);
1342
1342
  mt(() => {
1343
1343
  const a = e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;
1344
- pe(n.current, a) || (n.current = a, i(a));
1344
+ fe(n.current, a) || (n.current = a, i(a));
1345
1345
  });
1346
1346
  const r = [];
1347
1347
  for (const [a, s] of o.entries())
@@ -1374,7 +1374,7 @@ const Ge = (e) => {
1374
1374
  }
1375
1375
  );
1376
1376
  }
1377
- ), oo = Jt(ye)(({ theme: e }) => ({
1377
+ ), io = Pt(Se)(({ theme: e }) => ({
1378
1378
  "&.MuiFormControl-root": {
1379
1379
  ".MuiSelect-select": {
1380
1380
  paddingTop: "20px",
@@ -1395,16 +1395,16 @@ function Q({
1395
1395
  labelValue: e,
1396
1396
  ...t
1397
1397
  }) {
1398
- return /* @__PURE__ */ y(oo, { fullWidth: !0, variant: "filled", children: [
1399
- /* @__PURE__ */ c(Se, { id: t.labelId, children: e }),
1400
- /* @__PURE__ */ c(be, { ...t })
1398
+ return /* @__PURE__ */ y(io, { fullWidth: !0, variant: "filled", children: [
1399
+ /* @__PURE__ */ c(be, { id: t.labelId, children: e }),
1400
+ /* @__PURE__ */ c(Ce, { ...t })
1401
1401
  ] });
1402
1402
  }
1403
1403
  function wt(e) {
1404
1404
  const t = e.lastIndexOf("On");
1405
1405
  return t > 0 ? e.slice(0, t) : e;
1406
1406
  }
1407
- function Ft(e, t) {
1407
+ function Nt(e, t) {
1408
1408
  const o = e[t];
1409
1409
  if (o)
1410
1410
  return o;
@@ -1419,7 +1419,7 @@ function Ft(e, t) {
1419
1419
  const a = r[0];
1420
1420
  return a ? e[a] : void 0;
1421
1421
  }
1422
- const io = {
1422
+ const no = {
1423
1423
  coordinate_system: "world",
1424
1424
  name: "world",
1425
1425
  reference_coordinate_system: "",
@@ -1427,7 +1427,7 @@ const io = {
1427
1427
  orientation: [0, 0, 0],
1428
1428
  orientation_type: "ROTATION_VECTOR"
1429
1429
  };
1430
- function Nt(e) {
1430
+ function $t(e) {
1431
1431
  const t = q(
1432
1432
  e.map((n) => ({
1433
1433
  ...n,
@@ -1435,41 +1435,41 @@ function Nt(e) {
1435
1435
  })),
1436
1436
  "coordinate_system"
1437
1437
  );
1438
- t.world ?? (t.world = io);
1438
+ t.world ?? (t.world = no);
1439
1439
  const o = {}, i = (n) => {
1440
1440
  const r = o[n];
1441
1441
  if (r)
1442
1442
  return r;
1443
- const a = Ft(t, n);
1443
+ const a = Nt(t, n);
1444
1444
  if (!a)
1445
1445
  throw new Error(
1446
1446
  `Unknown coordinate system ${n}. Known coordinate systems are: ${Object.keys(t).join(", ")}`
1447
1447
  );
1448
1448
  const s = a.reference_coordinate_system || "world";
1449
- let h;
1449
+ let g;
1450
1450
  if (s === "world")
1451
- h = a;
1451
+ g = a;
1452
1452
  else {
1453
- const m = i(s), g = P.fromCoordinateSystem(m).multiply(
1453
+ const m = i(s), h = P.fromCoordinateSystem(m).multiply(
1454
1454
  P.fromCoordinateSystem(a)
1455
1455
  );
1456
- h = {
1456
+ g = {
1457
1457
  ...a,
1458
1458
  position: [
1459
- g.position.x,
1460
- g.position.y,
1461
- g.position.z
1459
+ h.position.x,
1460
+ h.position.y,
1461
+ h.position.z
1462
1462
  ],
1463
1463
  orientation: [
1464
- g.orientation.x,
1465
- g.orientation.y,
1466
- g.orientation.z
1464
+ h.orientation.x,
1465
+ h.orientation.y,
1466
+ h.orientation.z
1467
1467
  ],
1468
1468
  orientation_type: "ROTATION_VECTOR",
1469
1469
  reference_coordinate_system: m.reference_coordinate_system
1470
1470
  };
1471
1471
  }
1472
- return o[n] = h, h;
1472
+ return o[n] = g, g;
1473
1473
  };
1474
1474
  return Object.fromEntries(
1475
1475
  Object.keys(t).map((n) => [
@@ -1479,7 +1479,7 @@ function Nt(e) {
1479
1479
  );
1480
1480
  }
1481
1481
  function dt(e, t) {
1482
- const o = Ft(
1482
+ const o = Nt(
1483
1483
  e,
1484
1484
  t || "world"
1485
1485
  );
@@ -1489,16 +1489,16 @@ function dt(e, t) {
1489
1489
  );
1490
1490
  return o;
1491
1491
  }
1492
- function no(e, t) {
1492
+ function ro(e, t) {
1493
1493
  return dt(
1494
- Nt(t),
1494
+ $t(t),
1495
1495
  e
1496
1496
  );
1497
1497
  }
1498
1498
  function it(e, t, o) {
1499
1499
  if (e.coordinateSystemId === t)
1500
1500
  return e;
1501
- const i = Nt(o), n = dt(
1501
+ const i = $t(o), n = dt(
1502
1502
  i,
1503
1503
  e.coordinateSystemId || "world"
1504
1504
  ), r = dt(
@@ -1532,7 +1532,7 @@ function it(e, t, o) {
1532
1532
  coordinateSystemId: r.coordinate_system
1533
1533
  };
1534
1534
  }
1535
- function $t(e, t, o) {
1535
+ function Bt(e, t, o) {
1536
1536
  const i = P.fromPose(e).multiply(P.fromRobotTcp(t).inverse()).multiply(P.fromRobotTcp(o)), { position: n, orientation: r } = i;
1537
1537
  return {
1538
1538
  position: [n.x, n.y, n.z],
@@ -1551,7 +1551,7 @@ function Et(e, t) {
1551
1551
  orientation_type: "ROTATION_VECTOR"
1552
1552
  };
1553
1553
  }
1554
- function _i({
1554
+ function Ii({
1555
1555
  inputPose: e,
1556
1556
  selectedTcpId: t,
1557
1557
  selectedCoordinateSystemId: o,
@@ -1560,7 +1560,7 @@ function _i({
1560
1560
  }) {
1561
1561
  const r = t && t !== e.tcpId ? {
1562
1562
  ...e,
1563
- pose: $t(
1563
+ pose: Bt(
1564
1564
  e.pose,
1565
1565
  Et(i, e.tcpId),
1566
1566
  Et(i, t)
@@ -1573,11 +1573,11 @@ function _i({
1573
1573
  n
1574
1574
  ) : r;
1575
1575
  }
1576
- function Bt(e) {
1576
+ function zt(e) {
1577
1577
  var t, o, i, n, r;
1578
1578
  if (typeof e == "string") {
1579
1579
  const a = O(e);
1580
- return a ? Bt(a) : e;
1580
+ return a ? zt(a) : e;
1581
1581
  }
1582
1582
  if (e && typeof e == "object") {
1583
1583
  const a = e;
@@ -1590,7 +1590,7 @@ function Bt(e) {
1590
1590
  }
1591
1591
  return "Jogging motion failed";
1592
1592
  }
1593
- const ro = [
1593
+ const ao = [
1594
1594
  // Trajectory-planning failure causes, identified by the error_feedback_name
1595
1595
  // of a PlanTrajectoryFailedResponse (see extractJogErrorMessage)
1596
1596
  {
@@ -1620,12 +1620,12 @@ const ro = [
1620
1620
  translationKey: "Jogging.StreamStateSection.Error.PlanningFailed.lb"
1621
1621
  }
1622
1622
  ];
1623
- function ao(e) {
1623
+ function so(e) {
1624
1624
  var t;
1625
- return ((t = ro.find(({ pattern: o }) => o.test(e))) == null ? void 0 : t.translationKey) ?? null;
1625
+ return ((t = ao.find(({ pattern: o }) => o.test(e))) == null ? void 0 : t.translationKey) ?? null;
1626
1626
  }
1627
- const so = 5, lo = 250;
1628
- function co(e) {
1627
+ const lo = 5, co = 250;
1628
+ function go(e) {
1629
1629
  var i, n, r, a;
1630
1630
  const t = [
1631
1631
  (n = (i = e == null ? void 0 : e.manual_t1_limits) == null ? void 0 : i.tcp) == null ? void 0 : n.velocity,
@@ -1633,69 +1633,77 @@ function co(e) {
1633
1633
  ].filter(
1634
1634
  (s) => typeof s == "number" && Number.isFinite(s) && s > 0
1635
1635
  );
1636
- return Math.min(lo, ...t) / 10;
1636
+ return Math.min(co, ...t) / 10;
1637
1637
  }
1638
1638
  const gt = [
1639
1639
  { id: "0.1", mm: 0.1, degrees: 0.05 },
1640
1640
  { id: "1", mm: 1, degrees: 0.5 },
1641
1641
  { id: "5", mm: 5, degrees: 2.5 },
1642
1642
  { id: "10", mm: 10, degrees: 5 }
1643
- ], go = [
1643
+ ], ho = [
1644
1644
  { id: "continuous" },
1645
1645
  ...gt
1646
- ], ho = ["coordsys", "tool"];
1646
+ ], mo = ["coordsys", "tool"], Mt = "joggingToolStore", uo = () => typeof localStorage > "u" ? void 0 : localStorage;
1647
1647
  class nt {
1648
- constructor(t, o, i, n, r) {
1649
- var s, h, m;
1650
- this.jogger = t, this.coordSystems = o, this.motionGroupDescription = i, this.tcps = n, this.inverseSolverValue = r, this.selectedTabId = "cartesian", this.locks = /* @__PURE__ */ new Set(), this.blocked = !1, this.selectedCoordSystemId = "world", this.jogCoordSystemId = "world", this.selectedTcpId = "", this.tcpChangeInProgress = !1, this.selectedOrientation = "coordsys", this.selectedIncrementId = "continuous", this.selectedCartesianMotionType = "translate", this.incrementJogInProgress = null, this.lastJogError = null, this.onBeforeActivate = null, this.rotationVelocityDegPerSec = so, this.minTranslationVelocityMmPerSec = 1, this.maxTranslationVelocityMmPerSec = 250, this.minRotationVelocityDegPerSec = 1, this.maxRotationVelocityDegPerSec = 60, this.showCoordSystemSelect = !1, this.showTcpSelect = !0, this.showOrientationSelect = !0, this.showIncrementSelect = !0, this.showTabIcons = !1, this.showVelocitySliderLabel = !0, this.showVelocityLegend = !1, this.showJointsLegend = !1, this.disposers = [], this.inverseSolver = void 0, this.jointType = V.RevoluteJoint;
1651
- for (const g of o)
1652
- if (g.coordinate_system === "") {
1653
- g.coordinate_system = "world";
1648
+ constructor(t, o, i, n, r, a = {}) {
1649
+ var g, m, h;
1650
+ this.jogger = t, this.coordSystems = o, this.motionGroupDescription = i, this.tcps = n, this.inverseSolverValue = r, this.selectedTabId = "cartesian", this.locks = /* @__PURE__ */ new Set(), this.blocked = !1, this.selectedCoordSystemId = "world", this.jogCoordSystemId = "world", this.selectedTcpId = "", this.tcpChangeInProgress = !1, this.selectedOrientation = "coordsys", this.selectedIncrementId = "continuous", this.selectedCartesianMotionType = "translate", this.incrementJogInProgress = null, this.lastJogError = null, this.onBeforeActivate = null, this.rotationVelocityDegPerSec = lo, this.minTranslationVelocityMmPerSec = 1, this.maxTranslationVelocityMmPerSec = 250, this.minRotationVelocityDegPerSec = 1, this.maxRotationVelocityDegPerSec = 60, this.showCoordSystemSelect = !1, this.showTcpSelect = !0, this.showOrientationSelect = !0, this.showIncrementSelect = !0, this.showTabIcons = !1, this.showVelocitySliderLabel = !0, this.showVelocityLegend = !1, this.showJointsLegend = !1, this.disposers = [], this.inverseSolver = void 0, this.jointType = V.RevoluteJoint, this.storage = a.storage ?? uo();
1651
+ for (const u of o)
1652
+ if (u.coordinate_system === "") {
1653
+ u.coordinate_system = "world";
1654
1654
  break;
1655
1655
  }
1656
- this.selectedCoordSystemId = ((s = o[0]) == null ? void 0 : s.coordinate_system) || "world", this.jogCoordSystemId = this.selectedCoordSystemId, this.selectedTcpId = t.motionStream.rapidlyChangingMotionState.tcp ?? "", this.tcpChangeInProgress = this.tcps.length > 0 && !this.selectedTcpId, this.inverseSolver = r, this.translationVelocityMmPerSec = co(
1656
+ this.selectedCoordSystemId = ((g = o[0]) == null ? void 0 : g.coordinate_system) || "world", this.jogCoordSystemId = this.selectedCoordSystemId, this.selectedTcpId = t.motionStream.rapidlyChangingMotionState.tcp ?? "", this.tcpChangeInProgress = this.tcps.length > 0 && !this.selectedTcpId, this.inverseSolver = r, this.translationVelocityMmPerSec = go(
1657
1657
  i == null ? void 0 : i.operation_limits
1658
- ), this.jointType = ((m = (h = i == null ? void 0 : i.dh_parameters) == null ? void 0 : h[0]) == null ? void 0 : m.type) ?? V.RevoluteJoint, at(this, {}, { autoBind: !0 }), this.jogger.onBlocked = () => {
1658
+ ), this.jointType = ((h = (m = i == null ? void 0 : i.dh_parameters) == null ? void 0 : m[0]) == null ? void 0 : h.type) ?? V.RevoluteJoint, at(
1659
+ this,
1660
+ { storage: !1 },
1661
+ { autoBind: !0 }
1662
+ ), this.jogger.onBlocked = () => {
1659
1663
  this.block();
1660
1664
  };
1661
- const a = this.jogger.onError;
1662
- this.jogger.onError = (g) => {
1663
- this.setLastJogError(Bt(g)), a == null || a(g);
1665
+ const s = this.jogger.onError;
1666
+ this.jogger.onError = (u) => {
1667
+ this.setLastJogError(zt(u)), s == null || s(u);
1664
1668
  }, this.loadFromLocalStorage(), this.disposers.push(yt(() => this.saveToLocalStorage())), this.disposers.push(
1665
1669
  yt(() => {
1666
- const g = this.jogger.motionStream.rapidlyChangingMotionState.tcp;
1667
- g && g !== this.selectedTcpId && S(() => {
1668
- this.selectedTcpId = g, this.tcpChangeInProgress = !1;
1670
+ const u = this.jogger.motionStream.rapidlyChangingMotionState.tcp;
1671
+ u && u !== this.selectedTcpId && S(() => {
1672
+ this.selectedTcpId = u, this.tcpChangeInProgress = !1;
1669
1673
  });
1670
1674
  })
1671
- ), window.joggingStore = this;
1675
+ );
1672
1676
  }
1673
1677
  /**
1674
1678
  * Load a jogging store with the relevant data it needs
1675
1679
  * from the backend
1676
1680
  */
1677
- static async loadFor(t) {
1678
- const { nova: o, cellId: i } = t, [n, r] = await Promise.all([
1681
+ static async loadFor(t, o = {}) {
1682
+ const { nova: i, cellId: n } = t, [r, a] = await Promise.all([
1679
1683
  // Fetch coord systems so user can select between them
1680
- o.api.controller.listCoordinateSystems(
1681
- i,
1684
+ i.api.controller.listCoordinateSystems(
1685
+ n,
1682
1686
  t.motionStream.controllerId,
1683
1687
  "ROTATION_VECTOR"
1684
1688
  ),
1685
1689
  // Same for TCPs and other info from description
1686
- o.api.motionGroup.getMotionGroupDescription(
1687
- i,
1690
+ i.api.motionGroup.getMotionGroupDescription(
1691
+ n,
1688
1692
  t.motionStream.controllerId,
1689
1693
  t.motionGroupId
1690
1694
  )
1691
- ]), a = await o.api.motionGroupModels.getMotionGroupKinematicModel(
1692
- r.motion_group_model
1695
+ ]), s = await i.api.motionGroupModels.getMotionGroupKinematicModel(
1696
+ a.motion_group_model
1697
+ );
1698
+ return nt.create(
1699
+ t,
1700
+ {
1701
+ coordinateSystems: r || [],
1702
+ description: a,
1703
+ kinematicModel: s
1704
+ },
1705
+ o
1693
1706
  );
1694
- return nt.create(t, {
1695
- coordinateSystems: n || [],
1696
- description: r,
1697
- kinematicModel: a
1698
- });
1699
1707
  }
1700
1708
  /**
1701
1709
  * Make a jogging store from data that was loaded before: the coordinate
@@ -1703,19 +1711,20 @@ class nt {
1703
1711
  * motion group. An app that loads them once for several stores uses this
1704
1712
  * instead of {@link JoggingStore.loadFor}.
1705
1713
  */
1706
- static create(t, o) {
1707
- const { coordinateSystems: i, description: n, kinematicModel: r } = o, a = Object.entries(n.tcps || {}).map(([s, h]) => ({
1708
- id: s,
1709
- readable_name: h.name,
1710
- position: h.pose.position,
1711
- orientation: h.pose.orientation
1714
+ static create(t, o, i = {}) {
1715
+ const { coordinateSystems: n, description: r, kinematicModel: a } = o, s = Object.entries(r.tcps || {}).map(([g, m]) => ({
1716
+ id: g,
1717
+ readable_name: m.name,
1718
+ position: m.pose.position,
1719
+ orientation: m.pose.orientation
1712
1720
  }));
1713
1721
  return new nt(
1714
1722
  t,
1715
- i,
1716
1723
  n,
1717
- a,
1718
- r.inverse_solver
1724
+ r,
1725
+ s,
1726
+ a.inverse_solver,
1727
+ i
1719
1728
  );
1720
1729
  }
1721
1730
  dispose() {
@@ -1724,7 +1733,7 @@ class nt {
1724
1733
  this.jogger.dispose();
1725
1734
  }
1726
1735
  get coordSystemCountByName() {
1727
- return de(this.coordSystems, (t) => t.name);
1736
+ return ge(this.coordSystems, (t) => t.name);
1728
1737
  }
1729
1738
  async deactivate() {
1730
1739
  this.jogger.mode === "jogging" && await this.jogger.setJoggingMode("off");
@@ -1741,15 +1750,22 @@ class nt {
1741
1750
  orientation: this.selectedOrientation
1742
1751
  }), this.jogger.coordinateSystem = this.jogCoordSystem, this.activeDiscreteIncrement ? await this.jogger.setJoggingMode("trajectory") : await this.jogger.setJoggingMode("jogging")) : await this.jogger.setJoggingMode("jogging"), this.jogger;
1743
1752
  }
1753
+ /**
1754
+ * Takes the user's settings from the storage (see
1755
+ * {@link JoggingStoreOptions}), which is `localStorage` only by default
1756
+ */
1744
1757
  loadFromLocalStorage() {
1745
- const t = O(localStorage.getItem("joggingToolStore"));
1746
- t && (this.tabsById[t.selectedTabId] && (this.selectedTabId = t.selectedTabId), this.coordSystemsById[t.selectedCoordSystemId] && (this.selectedCoordSystemId = t.selectedCoordSystemId), this.coordSystemsById[t.jogCoordSystemId] && (this.jogCoordSystemId = t.jogCoordSystemId), this.incrementOptionsById[t.selectedIncrementId] && (this.selectedIncrementId = t.selectedIncrementId), ["translate", "rotate"].includes(t.selectedCartesianMotionType) && (this.selectedCartesianMotionType = t.selectedCartesianMotionType), ["coordsys", "tool"].includes(t.selectedOrientation) && (this.selectedOrientation = t.selectedOrientation));
1758
+ var i;
1759
+ const t = (i = this.storage) == null ? void 0 : i.getItem(Mt), o = t ? O(t) : void 0;
1760
+ o && (this.tabsById[o.selectedTabId] && (this.selectedTabId = o.selectedTabId), this.coordSystemsById[o.selectedCoordSystemId] && (this.selectedCoordSystemId = o.selectedCoordSystemId), this.coordSystemsById[o.jogCoordSystemId] && (this.jogCoordSystemId = o.jogCoordSystemId), this.incrementOptionsById[o.selectedIncrementId] && (this.selectedIncrementId = o.selectedIncrementId), ["translate", "rotate"].includes(o.selectedCartesianMotionType) && (this.selectedCartesianMotionType = o.selectedCartesianMotionType), ["coordsys", "tool"].includes(o.selectedOrientation) && (this.selectedOrientation = o.selectedOrientation));
1747
1761
  }
1762
+ /**
1763
+ * Keeps the user's settings in the storage (see
1764
+ * {@link JoggingStoreOptions}), which is `localStorage` only by default
1765
+ */
1748
1766
  saveToLocalStorage() {
1749
- localStorage.setItem(
1750
- "joggingToolStore",
1751
- JSON.stringify(this.localStorageSave)
1752
- );
1767
+ var t;
1768
+ (t = this.storage) == null || t.setItem(Mt, JSON.stringify(this.localStorageSave));
1753
1769
  }
1754
1770
  get isLocked() {
1755
1771
  return this.locks.size > 0;
@@ -1762,7 +1778,7 @@ class nt {
1762
1778
  * shown as-is).
1763
1779
  */
1764
1780
  get lastJogErrorTranslationKey() {
1765
- return this.lastJogError ? ao(this.lastJogError) : null;
1781
+ return this.lastJogError ? so(this.lastJogError) : null;
1766
1782
  }
1767
1783
  get localStorageSave() {
1768
1784
  return {
@@ -1796,7 +1812,7 @@ class nt {
1796
1812
  }), t;
1797
1813
  }
1798
1814
  get incrementOptions() {
1799
- return go;
1815
+ return ho;
1800
1816
  }
1801
1817
  get discreteIncrementOptions() {
1802
1818
  return gt;
@@ -1826,7 +1842,7 @@ class nt {
1826
1842
  }
1827
1843
  /** The coordinate system to jog along, resolved relative to world */
1828
1844
  get jogCoordSystem() {
1829
- return no(
1845
+ return ro(
1830
1846
  this.jogCoordSystemId,
1831
1847
  this.coordSystems
1832
1848
  );
@@ -1866,7 +1882,7 @@ class nt {
1866
1882
  try {
1867
1883
  return it(
1868
1884
  {
1869
- pose: $t(i, a, s),
1885
+ pose: Bt(i, a, s),
1870
1886
  coordinateSystemId: r || "world"
1871
1887
  },
1872
1888
  o,
@@ -2007,7 +2023,7 @@ class nt {
2007
2023
  }
2008
2024
  /** Lock the UI until the given async callback resolves */
2009
2025
  async withMotionLock(t) {
2010
- const o = Ce();
2026
+ const o = ve();
2011
2027
  this.lock(o);
2012
2028
  try {
2013
2029
  return await t();
@@ -2016,10 +2032,10 @@ class nt {
2016
2032
  }
2017
2033
  }
2018
2034
  }
2019
- const mo = E(
2035
+ const po = E(
2020
2036
  ({ store: e, useDegree: t }) => {
2021
2037
  var a;
2022
- const { t: o } = A(), i = Qt(), n = [];
2038
+ const { t: o } = A(), i = Xt(), n = [];
2023
2039
  function r(s) {
2024
2040
  switch (s) {
2025
2041
  case "coordsys":
@@ -2056,12 +2072,12 @@ const mo = E(
2056
2072
  variant: "filled",
2057
2073
  displayEmpty: e.tcpChangeInProgress,
2058
2074
  onChange: (s) => {
2059
- e.requestTcpChange(s.target.value).catch((h) => {
2060
- console.error("Failed to change TCP:", h);
2075
+ e.requestTcpChange(s.target.value).catch((g) => {
2076
+ console.error("Failed to change TCP:", g);
2061
2077
  });
2062
2078
  },
2063
2079
  disabled: e.tcpChangeInProgress,
2064
- endAdornment: e.tcpChangeInProgress ? /* @__PURE__ */ c(fe, { position: "end", children: /* @__PURE__ */ c(Ot, { size: 16 }) }) : void 0,
2080
+ endAdornment: e.tcpChangeInProgress ? /* @__PURE__ */ c(ye, { position: "end", children: /* @__PURE__ */ c(Jt, { size: 16 }) }) : void 0,
2065
2081
  children: e.tcps.map((s) => /* @__PURE__ */ c(F, { value: s.id, children: s.id }, s.id))
2066
2082
  },
2067
2083
  "tcp"
@@ -2074,7 +2090,7 @@ const mo = E(
2074
2090
  labelId: `orientation-select-${i}`,
2075
2091
  value: e.selectedOrientation,
2076
2092
  onChange: (s) => e.setSelectedOrientation(s.target.value),
2077
- children: ho.map((s) => /* @__PURE__ */ c(F, { value: s, children: r(s) }, s))
2093
+ children: mo.map((s) => /* @__PURE__ */ c(F, { value: s, children: r(s) }, s))
2078
2094
  },
2079
2095
  "orientation"
2080
2096
  )
@@ -2110,20 +2126,20 @@ const mo = E(
2110
2126
  gridAutoRows: "min-content",
2111
2127
  "& label": { opacity: 0.7, fontSize: "12px", marginBottom: "4px" }
2112
2128
  },
2113
- children: n.map((s, h) => /* @__PURE__ */ c(
2129
+ children: n.map((s, g) => /* @__PURE__ */ c(
2114
2130
  L,
2115
2131
  {
2116
2132
  sx: {
2117
- gridColumn: n.length % 2 === 1 && h === n.length - 1 ? "span 2" : "auto"
2133
+ gridColumn: n.length % 2 === 1 && g === n.length - 1 ? "span 2" : "auto"
2118
2134
  },
2119
2135
  children: s
2120
2136
  },
2121
- h
2137
+ g
2122
2138
  ))
2123
2139
  }
2124
2140
  );
2125
2141
  }
2126
- ), uo = Jt(ve)(({ theme: e }) => {
2142
+ ), fo = Pt(xe)(({ theme: e }) => {
2127
2143
  var t;
2128
2144
  return {
2129
2145
  "&.MuiToggleButtonGroup-root": {
@@ -2145,11 +2161,11 @@ const mo = E(
2145
2161
  }
2146
2162
  }
2147
2163
  };
2148
- }), po = Z(
2164
+ }), yo = Z(
2149
2165
  E((e) => {
2150
2166
  const { store: t } = e, { t: o } = A();
2151
2167
  function i(n, r) {
2152
- r === e.velocity || !xe(r) || e.onVelocityChange(r, e.useDegree);
2168
+ r === e.velocity || !_e(r) || e.onVelocityChange(r, e.useDegree);
2153
2169
  }
2154
2170
  return /* @__PURE__ */ y(
2155
2171
  x,
@@ -2164,14 +2180,14 @@ const mo = E(
2164
2180
  j,
2165
2181
  {
2166
2182
  sx: {
2167
- color: ue,
2183
+ color: pe,
2168
2184
  fontSize: "14px"
2169
2185
  },
2170
2186
  children: o("Jogging.Velocity.bt")
2171
2187
  }
2172
2188
  ),
2173
2189
  /* @__PURE__ */ c(
2174
- Pt,
2190
+ At,
2175
2191
  {
2176
2192
  value: e.velocity,
2177
2193
  color: "secondary",
@@ -2189,13 +2205,13 @@ const mo = E(
2189
2205
  }
2190
2206
  }
2191
2207
  ),
2192
- t.showVelocitySliderLabel && (e.renderValue ? e.renderValue(e.velocity) : /* @__PURE__ */ c(zt, { value: e.velocity.toString() }))
2208
+ t.showVelocitySliderLabel && (e.renderValue ? e.renderValue(e.velocity) : /* @__PURE__ */ c(Ut, { value: e.velocity.toString() }))
2193
2209
  ]
2194
2210
  }
2195
2211
  );
2196
2212
  })
2197
2213
  );
2198
- function zt({ value: e, sx: t }) {
2214
+ function Ut({ value: e, sx: t }) {
2199
2215
  var i;
2200
2216
  const o = B();
2201
2217
  return /* @__PURE__ */ c(
@@ -2229,14 +2245,14 @@ function zt({ value: e, sx: t }) {
2229
2245
  }
2230
2246
  );
2231
2247
  }
2232
- const Ut = E(
2248
+ const Gt = E(
2233
2249
  ({ store: e, useDegree: t }) => {
2234
2250
  const { t: o } = A();
2235
2251
  function i(n, r) {
2236
2252
  return r ? `ω = ${o("Jogging.Cartesian.Rotation.velocityDegPerSec.lb", { amount: n })}` : `v = ${o("Jogging.Cartesian.Translation.velocityMmPerSec.lb", { amount: n })}`;
2237
2253
  }
2238
2254
  return /* @__PURE__ */ c(
2239
- po,
2255
+ yo,
2240
2256
  {
2241
2257
  store: e,
2242
2258
  velocity: e.velocityInDisplayUnits(t),
@@ -2246,7 +2262,7 @@ const Ut = E(
2246
2262
  useDegree: t,
2247
2263
  disabled: e.isLocked,
2248
2264
  renderValue: (n) => /* @__PURE__ */ c(
2249
- zt,
2265
+ Ut,
2250
2266
  {
2251
2267
  value: i(n, t),
2252
2268
  sx: {
@@ -2260,9 +2276,9 @@ const Ut = E(
2260
2276
  }
2261
2277
  );
2262
2278
  }
2263
- ), Gt = E(({ store: e }) => {
2264
- var a, s, h;
2265
- const { t } = A(), o = B(), i = ((h = (s = (a = e.jogger.motionStream.rapidlyChangingMotionState.execute) == null ? void 0 : a.details) == null ? void 0 : s.state) == null ? void 0 : h.kind) ?? "KIND_UNKNOWN", n = e.lastJogError, r = e.lastJogErrorTranslationKey;
2279
+ ), Wt = E(({ store: e }) => {
2280
+ var a, s, g;
2281
+ const { t } = A(), o = B(), i = ((g = (s = (a = e.jogger.motionStream.rapidlyChangingMotionState.execute) == null ? void 0 : a.details) == null ? void 0 : s.state) == null ? void 0 : g.kind) ?? "KIND_UNKNOWN", n = e.lastJogError, r = e.lastJogErrorTranslationKey;
2266
2282
  return /* @__PURE__ */ y(
2267
2283
  L,
2268
2284
  {
@@ -2303,7 +2319,7 @@ const Ut = E(
2303
2319
  ]
2304
2320
  }
2305
2321
  );
2306
- }), fo = E(
2322
+ }), So = E(
2307
2323
  ({
2308
2324
  store: e,
2309
2325
  children: t
@@ -2331,7 +2347,7 @@ const Ut = E(
2331
2347
  distanceMm: l.mm
2332
2348
  } : {
2333
2349
  type: "rotate",
2334
- distanceRads: re(l.degrees)
2350
+ distanceRads: ae(l.degrees)
2335
2351
  }
2336
2352
  });
2337
2353
  } finally {
@@ -2362,32 +2378,32 @@ const Ut = E(
2362
2378
  console.error("Jogging failed:", f);
2363
2379
  }
2364
2380
  }
2365
- async function h() {
2381
+ async function g() {
2366
2382
  e.isLocked || e.activeDiscreteIncrement || (n.current++, await e.deactivate());
2367
2383
  }
2368
2384
  const m = [
2369
2385
  {
2370
2386
  id: "x",
2371
- icon: /* @__PURE__ */ c(Ke, {}),
2387
+ icon: /* @__PURE__ */ c(Ye, {}),
2372
2388
  colors: st.X
2373
2389
  },
2374
2390
  {
2375
2391
  id: "y",
2376
- icon: /* @__PURE__ */ c(Ze, {}),
2392
+ icon: /* @__PURE__ */ c(Qe, {}),
2377
2393
  colors: st.Y
2378
2394
  },
2379
2395
  {
2380
2396
  id: "z",
2381
- icon: /* @__PURE__ */ c(Xe, {}),
2397
+ icon: /* @__PURE__ */ c(to, {}),
2382
2398
  colors: st.Z
2383
2399
  }
2384
2400
  ];
2385
- function g(d) {
2401
+ function h(d) {
2386
2402
  return o("General.mm.variable", { amount: d.toFixed(1) });
2387
2403
  }
2388
2404
  function u(d) {
2389
2405
  return o("General.degree.variable", {
2390
- amount: Rt(d).toFixed(1)
2406
+ amount: Ot(d).toFixed(1)
2391
2407
  });
2392
2408
  }
2393
2409
  return /* @__PURE__ */ y(
@@ -2401,14 +2417,14 @@ const Ut = E(
2401
2417
  children: [
2402
2418
  /* @__PURE__ */ y(x, { gap: 2, children: [
2403
2419
  /* @__PURE__ */ c(
2404
- mo,
2420
+ po,
2405
2421
  {
2406
2422
  store: e,
2407
2423
  useDegree: e.selectedCartesianMotionType === "rotate"
2408
2424
  }
2409
2425
  ),
2410
2426
  /* @__PURE__ */ c(
2411
- Ut,
2427
+ Gt,
2412
2428
  {
2413
2429
  store: e,
2414
2430
  useDegree: e.selectedCartesianMotionType === "rotate"
@@ -2433,7 +2449,7 @@ const Ut = E(
2433
2449
  sx: { flexGrow: 1 },
2434
2450
  children: [
2435
2451
  /* @__PURE__ */ y(
2436
- uo,
2452
+ fo,
2437
2453
  {
2438
2454
  value: e.selectedCartesianMotionType,
2439
2455
  onChange: r,
@@ -2471,7 +2487,7 @@ const Ut = E(
2471
2487
  ] }),
2472
2488
  getDisplayedValue: () => {
2473
2489
  var p, C;
2474
- return g(
2490
+ return h(
2475
2491
  ((C = (p = e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : p.position) == null ? void 0 : C[St[d.id]]) || 0
2476
2492
  );
2477
2493
  },
@@ -2480,7 +2496,7 @@ const Ut = E(
2480
2496
  motionType: "translate",
2481
2497
  direction: p
2482
2498
  }),
2483
- stopJogging: h
2499
+ stopJogging: g
2484
2500
  },
2485
2501
  d.id
2486
2502
  );
@@ -2496,7 +2512,7 @@ const Ut = E(
2496
2512
  disabled: e.isLocked,
2497
2513
  activeJoggingDirection: ((l = e.incrementJogInProgress) == null ? void 0 : l.axis) === d.id ? e.incrementJogInProgress.direction : void 0,
2498
2514
  label: /* @__PURE__ */ y(X, { children: [
2499
- /* @__PURE__ */ c(eo, {}),
2515
+ /* @__PURE__ */ c(oo, {}),
2500
2516
  /* @__PURE__ */ c(
2501
2517
  j,
2502
2518
  {
@@ -2519,7 +2535,7 @@ const Ut = E(
2519
2535
  motionType: "rotate",
2520
2536
  direction: p
2521
2537
  }),
2522
- stopJogging: h
2538
+ stopJogging: g
2523
2539
  },
2524
2540
  d.id
2525
2541
  );
@@ -2529,16 +2545,16 @@ const Ut = E(
2529
2545
  )
2530
2546
  }
2531
2547
  ),
2532
- /* @__PURE__ */ c(Lt, { store: e }),
2548
+ /* @__PURE__ */ c(Ft, { store: e }),
2533
2549
  /* @__PURE__ */ c(N, {}),
2534
- /* @__PURE__ */ c(Gt, { store: e }),
2550
+ /* @__PURE__ */ c(Wt, { store: e }),
2535
2551
  t && /* @__PURE__ */ c(N, {}),
2536
2552
  t
2537
2553
  ]
2538
2554
  }
2539
2555
  );
2540
2556
  }
2541
- ), yo = E(
2557
+ ), bo = E(
2542
2558
  ({ store: e, children: t }) => {
2543
2559
  const o = B(), i = rt(0);
2544
2560
  async function n(a) {
@@ -2551,8 +2567,8 @@ const Ut = E(
2551
2567
  velocityUnit: e.jointType === V.PrismaticJoint ? "mm/s" : "rad/s",
2552
2568
  velocityValue: e.jointType === V.PrismaticJoint ? e.translationVelocityMmPerSec : e.rotationVelocityRadsPerSec
2553
2569
  });
2554
- } catch (h) {
2555
- console.error("Jogging failed:", h);
2570
+ } catch (g) {
2571
+ console.error("Jogging failed:", g);
2556
2572
  }
2557
2573
  }
2558
2574
  async function r() {
@@ -2568,7 +2584,7 @@ const Ut = E(
2568
2584
  sx: { padding: "18px 24px" },
2569
2585
  children: [
2570
2586
  /* @__PURE__ */ c(
2571
- Ut,
2587
+ Gt,
2572
2588
  {
2573
2589
  store: e,
2574
2590
  useDegree: e.jointType === V.RevoluteJoint
@@ -2589,8 +2605,8 @@ const Ut = E(
2589
2605
  alignItems: "center",
2590
2606
  gap: "24px",
2591
2607
  children: e.jogger.motionStream.joints.map((a) => {
2592
- var h, m, g;
2593
- const s = (g = (m = (h = e.motionGroupDescription.operation_limits.auto_limits) == null ? void 0 : h.joints) == null ? void 0 : m[a.index]) == null ? void 0 : g.position;
2608
+ var g, m, h;
2609
+ const s = (h = (m = (g = e.motionGroupDescription.operation_limits.auto_limits) == null ? void 0 : g.joints) == null ? void 0 : m[a.index]) == null ? void 0 : h.position;
2594
2610
  return /* @__PURE__ */ y(
2595
2611
  x,
2596
2612
  {
@@ -2610,7 +2626,7 @@ const Ut = E(
2610
2626
  }
2611
2627
  ),
2612
2628
  /* @__PURE__ */ c(
2613
- Pe,
2629
+ Ae,
2614
2630
  {
2615
2631
  disabled: e.isLocked,
2616
2632
  lowerLimit: s == null ? void 0 : s.lower_limit,
@@ -2636,18 +2652,18 @@ const Ut = E(
2636
2652
  )
2637
2653
  }
2638
2654
  ),
2639
- /* @__PURE__ */ c(Lt, { store: e }),
2655
+ /* @__PURE__ */ c(Ft, { store: e }),
2640
2656
  /* @__PURE__ */ c(N, {}),
2641
- /* @__PURE__ */ c(Gt, { store: e }),
2657
+ /* @__PURE__ */ c(Wt, { store: e }),
2642
2658
  t && /* @__PURE__ */ c(N, {}),
2643
2659
  t
2644
2660
  ]
2645
2661
  }
2646
2662
  );
2647
2663
  }
2648
- ), ji = Z(
2664
+ ), wi = Z(
2649
2665
  E((e) => {
2650
- const t = kt(() => ({
2666
+ const t = Rt(() => ({
2651
2667
  joggingStore: null,
2652
2668
  loadingError: null
2653
2669
  }));
@@ -2708,11 +2724,11 @@ const Ut = E(
2708
2724
  position: "relative",
2709
2725
  ...e.sx
2710
2726
  },
2711
- children: t.joggingStore ? /* @__PURE__ */ c(So, { store: t.joggingStore, children: e.children }) : /* @__PURE__ */ c(Ge, { message: "Loading jogging", error: t.loadingError })
2727
+ children: t.joggingStore ? /* @__PURE__ */ c(Co, { store: t.joggingStore, children: e.children }) : /* @__PURE__ */ c(We, { message: "Loading jogging", error: t.loadingError })
2712
2728
  }
2713
2729
  );
2714
2730
  })
2715
- ), So = E(
2731
+ ), Co = E(
2716
2732
  ({
2717
2733
  store: e,
2718
2734
  children: t
@@ -2720,13 +2736,13 @@ const Ut = E(
2720
2736
  const { t: o } = A();
2721
2737
  function i() {
2722
2738
  if (e.currentTab.id === "cartesian")
2723
- return /* @__PURE__ */ c(fo, { store: e, children: t });
2739
+ return /* @__PURE__ */ c(So, { store: e, children: t });
2724
2740
  if (e.currentTab.id === "joint")
2725
- return /* @__PURE__ */ c(yo, { store: e, children: t });
2741
+ return /* @__PURE__ */ c(bo, { store: e, children: t });
2726
2742
  }
2727
2743
  return /* @__PURE__ */ y(x, { flexGrow: 1, sx: { overflow: "hidden" }, children: [
2728
2744
  /* @__PURE__ */ c(
2729
- oe,
2745
+ ie,
2730
2746
  {
2731
2747
  "data-testid": "jogging-tabs",
2732
2748
  "aria-label": "jogging-tabs",
@@ -2734,9 +2750,9 @@ const Ut = E(
2734
2750
  onChange: e.onTabChange,
2735
2751
  variant: "fullWidth",
2736
2752
  children: e.tabs.map((n) => {
2737
- const r = n.label === "Cartesian" ? o("Jogging.Cartesian.bt") : o("Jogging.Joints.bt"), a = n.label === "cartesian" ? /* @__PURE__ */ c(Xt, { fontSize: "small", sx: { mr: 1 } }) : /* @__PURE__ */ c(te, { fontSize: "small", sx: { mr: 1 } });
2753
+ const r = n.label === "Cartesian" ? o("Jogging.Cartesian.bt") : o("Jogging.Joints.bt"), a = n.label === "cartesian" ? /* @__PURE__ */ c(te, { fontSize: "small", sx: { mr: 1 } }) : /* @__PURE__ */ c(ee, { fontSize: "small", sx: { mr: 1 } });
2738
2754
  return /* @__PURE__ */ c(
2739
- ee,
2755
+ oe,
2740
2756
  {
2741
2757
  "data-testid": `jogging-tab-${n.id}`,
2742
2758
  "aria-label": `jogging-tab-${n.id}`,
@@ -2761,23 +2777,23 @@ const Ut = E(
2761
2777
  children: i()
2762
2778
  }
2763
2779
  ),
2764
- e.blocked && /* @__PURE__ */ c(qe, { store: e })
2780
+ e.blocked && /* @__PURE__ */ c(He, { store: e })
2765
2781
  ] });
2766
2782
  }
2767
2783
  );
2768
- function bo() {
2784
+ function vo() {
2769
2785
  const e = window.location.href;
2770
2786
  return e.substring(
2771
2787
  0,
2772
2788
  e.indexOf("/", e.indexOf("//") + 2)
2773
2789
  );
2774
2790
  }
2775
- function Ii({
2776
- baseUrl: e = bo(),
2791
+ function Ei({
2792
+ baseUrl: e = vo(),
2777
2793
  ...t
2778
2794
  }) {
2779
2795
  return /* @__PURE__ */ y(
2780
- we,
2796
+ Ee,
2781
2797
  {
2782
2798
  "aria-labelledby": "no-motion-group-modal-title",
2783
2799
  open: !0,
@@ -2797,9 +2813,9 @@ function Ii({
2797
2813
  }
2798
2814
  },
2799
2815
  children: [
2800
- /* @__PURE__ */ c(Te, { id: "no-motion-group-modal-title", children: "No motion group found" }),
2816
+ /* @__PURE__ */ c(ke, { id: "no-motion-group-modal-title", children: "No motion group found" }),
2801
2817
  /* @__PURE__ */ y(
2802
- Me,
2818
+ Te,
2803
2819
  {
2804
2820
  sx: {
2805
2821
  marginTop: "3rem",
@@ -2812,7 +2828,7 @@ function Ii({
2812
2828
  ]
2813
2829
  }
2814
2830
  ),
2815
- /* @__PURE__ */ c(Ee, { children: /* @__PURE__ */ y(x, { width: "100%", maxWidth: "300px", margin: "auto", marginBottom: "2rem", children: [
2831
+ /* @__PURE__ */ c(Me, { children: /* @__PURE__ */ y(x, { width: "100%", maxWidth: "300px", margin: "auto", marginBottom: "2rem", children: [
2816
2832
  /* @__PURE__ */ c(
2817
2833
  ct,
2818
2834
  {
@@ -2844,7 +2860,7 @@ function Ii({
2844
2860
  }
2845
2861
  );
2846
2862
  }
2847
- const Mt = 1e-4, Co = {
2863
+ const Tt = 1e-4, xo = {
2848
2864
  a: 0,
2849
2865
  d: 0,
2850
2866
  alpha: 0,
@@ -2852,8 +2868,8 @@ const Mt = 1e-4, Co = {
2852
2868
  reverse_rotation_direction: !1
2853
2869
  };
2854
2870
  class ht {
2855
- constructor(t, o, i, n, r, a, s, h, m, g, u = "cell") {
2856
- this.controller = o, this.motionGroup = i, this.initialMotionState = n, this.motionStateSocket = r, this.isVirtual = a, this.tcps = s, this.description = h, this.initialControllerState = m, this.controllerStateSocket = g, this.cellId = u, this.connectedJoggingSocket = null, this.joggingVelocity = 10, this.activationState = "inactive", this.nova = H(t), this.rapidlyChangingMotionState = n, this.controllerState = m, g.addEventListener("message", (d) => {
2871
+ constructor(t, o, i, n, r, a, s, g, m, h, u = "cell") {
2872
+ this.controller = o, this.motionGroup = i, this.initialMotionState = n, this.motionStateSocket = r, this.isVirtual = a, this.tcps = s, this.description = g, this.initialControllerState = m, this.controllerStateSocket = h, this.cellId = u, this.connectedJoggingSocket = null, this.joggingVelocity = 10, this.activationState = "inactive", this.nova = H(t), this.rapidlyChangingMotionState = n, this.controllerState = m, h.addEventListener("message", (d) => {
2857
2873
  var f;
2858
2874
  const l = (f = O(d.data)) == null ? void 0 : f.result;
2859
2875
  l && S(() => {
@@ -2866,16 +2882,16 @@ class ht {
2866
2882
  throw new Error(
2867
2883
  `Failed to get motion state for ${this.motionGroupId}: ${d.data}`
2868
2884
  );
2869
- At(
2885
+ Dt(
2870
2886
  this.rapidlyChangingMotionState.joint_position,
2871
2887
  l.joint_position,
2872
- Mt
2888
+ Tt
2873
2889
  ) || S(() => {
2874
2890
  this.rapidlyChangingMotionState.joint_position = l.joint_position;
2875
- }), Vt(
2891
+ }), Lt(
2876
2892
  this.rapidlyChangingMotionState,
2877
2893
  l,
2878
- Mt
2894
+ Tt
2879
2895
  ) || S(() => {
2880
2896
  this.rapidlyChangingMotionState.tcp_pose = l.tcp_pose;
2881
2897
  }), l.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== l.tcp && S(() => {
@@ -2898,19 +2914,19 @@ class ht {
2898
2914
  }
2899
2915
  static async connect(t, o, i = {}) {
2900
2916
  var T, k;
2901
- const n = H(t), r = i.cellId ?? lt(t) ?? "cell", [a, s] = o.split("@"), h = await n.api.controller.getCurrentRobotControllerState(
2917
+ const n = H(t), r = i.cellId ?? lt(t) ?? "cell", [a, s] = o.split("@"), g = await n.api.controller.getCurrentRobotControllerState(
2902
2918
  r,
2903
2919
  s
2904
- ), m = h == null ? void 0 : h.motion_groups.find(
2920
+ ), m = g == null ? void 0 : g.motion_groups.find(
2905
2921
  (_) => _.motion_group === o
2906
2922
  );
2907
- if (!h || !m)
2923
+ if (!g || !m)
2908
2924
  throw new Error(
2909
2925
  `Controller ${s} or motion group ${o} not found`
2910
2926
  );
2911
- const g = n.openReconnectingWebsocket(
2927
+ const h = n.openReconnectingWebsocket(
2912
2928
  `/cells/${r}/controllers/${s}/motion-groups/${o}/state-stream`
2913
- ), u = await g.firstMessage(), d = (T = O(u.data)) == null ? void 0 : T.result;
2929
+ ), u = await h.firstMessage(), d = (T = O(u.data)) == null ? void 0 : T.result;
2914
2930
  if (!d)
2915
2931
  throw new Error(
2916
2932
  `Unable to parse initial motion state message ${u.data}`
@@ -2922,7 +2938,7 @@ class ht {
2922
2938
  );
2923
2939
  const f = (await n.api.controller.getRobotController(
2924
2940
  r,
2925
- h.controller
2941
+ g.controller
2926
2942
  )).configuration.kind === "VirtualController", p = await n.api.motionGroup.getMotionGroupDescription(
2927
2943
  r,
2928
2944
  s,
@@ -2935,22 +2951,22 @@ class ht {
2935
2951
  orientation: R.pose.orientation
2936
2952
  })
2937
2953
  ), w = n.openReconnectingWebsocket(
2938
- `/cells/${r}/controllers/${h.controller}/state-stream?response_rate=1000`
2954
+ `/cells/${r}/controllers/${g.controller}/state-stream?response_rate=1000`
2939
2955
  ), I = await w.firstMessage(), M = (k = O(I.data)) == null ? void 0 : k.result;
2940
2956
  if (!M)
2941
2957
  throw new Error(
2942
2958
  `Unable to parse initial controller state message ${I.data}`
2943
2959
  );
2944
2960
  return console.log(
2945
- `Connected controller state websocket to controller ${h.controller}. Initial state:
2961
+ `Connected controller state websocket to controller ${g.controller}. Initial state:
2946
2962
  `,
2947
2963
  M
2948
2964
  ), new ht(
2949
2965
  n,
2950
- h,
2966
+ g,
2951
2967
  m,
2952
2968
  d,
2953
- g,
2969
+ h,
2954
2970
  f,
2955
2971
  C,
2956
2972
  p,
@@ -2981,7 +2997,7 @@ class ht {
2981
2997
  get dhParameters() {
2982
2998
  if (this.description.dh_parameters !== void 0)
2983
2999
  return this.description.dh_parameters.map((t) => ({
2984
- ...Co,
3000
+ ...xo,
2985
3001
  ...t
2986
3002
  }));
2987
3003
  }
@@ -2999,11 +3015,11 @@ class ht {
2999
3015
  }
3000
3016
  /** Gets the robot mounting position rotation in 3D viz coordinates */
3001
3017
  get mountingQuaternion() {
3002
- var n, r, a, s, h, m;
3018
+ var n, r, a, s, g, m;
3003
3019
  const t = new bt.Vector3(
3004
3020
  ((r = (n = this.description.mounting) == null ? void 0 : n.orientation) == null ? void 0 : r[0]) || 0,
3005
3021
  ((s = (a = this.description.mounting) == null ? void 0 : a.orientation) == null ? void 0 : s[1]) || 0,
3006
- ((m = (h = this.description.mounting) == null ? void 0 : h.orientation) == null ? void 0 : m[2]) || 0
3022
+ ((m = (g = this.description.mounting) == null ? void 0 : g.orientation) == null ? void 0 : m[2]) || 0
3007
3023
  ), o = t.length(), i = t.normalize();
3008
3024
  return new bt.Quaternion().setFromAxisAngle(i, o);
3009
3025
  }
@@ -3099,23 +3115,23 @@ class ht {
3099
3115
  this.joggingVelocity = t;
3100
3116
  }
3101
3117
  }
3102
- const vo = [
3118
+ const _o = [
3103
3119
  "FeedbackOutOfWorkspace",
3104
3120
  "FeedbackJointLimitExceeded",
3105
3121
  "FeedbackAxisRangeExceeded",
3106
3122
  "FeedbackNoSolutionInCurrentConfiguration"
3107
3123
  ];
3108
- function wi(e) {
3109
- return e === "FeedbackSingularity" ? "Jogging.TargetPose.Error.Singularity.lb" : e === "FeedbackCollision" ? "Jogging.TargetPose.Error.Collision.lb" : vo.includes(e) ? "Jogging.TargetPose.Error.NotReachable.lb" : "Jogging.TargetPose.Error.PlanningFailed.lb";
3124
+ function Mi(e) {
3125
+ return e === "FeedbackSingularity" ? "Jogging.TargetPose.Error.Singularity.lb" : e === "FeedbackCollision" ? "Jogging.TargetPose.Error.Collision.lb" : _o.includes(e) ? "Jogging.TargetPose.Error.NotReachable.lb" : "Jogging.TargetPose.Error.PlanningFailed.lb";
3110
3126
  }
3111
- class Ei {
3127
+ class Ti {
3112
3128
  constructor(t) {
3113
3129
  this.options = t, this.plannedTrajectory = null, this.trajectoryState = "idle", this.lastError = null, this.disposers = [], this.logger = t.logger ?? console, at(
3114
3130
  this,
3115
3131
  { socket: !1, disposers: !1, logger: !1, options: !1 },
3116
3132
  { autoBind: !0 }
3117
3133
  ), this.socket = this.openSocket(), this.disposers.push(
3118
- ne(
3134
+ re(
3119
3135
  () => this.executionState,
3120
3136
  (o) => {
3121
3137
  o === "END_OF_TRAJECTORY" && this.reset();
@@ -3148,15 +3164,15 @@ class Ei {
3148
3164
  if ((I = (w = this.options).isLocked) != null && I.call(w))
3149
3165
  throw this.reset(), new Error("Cannot plan trajectory: the robot is locked");
3150
3166
  await this.ensureMovementOwnership();
3151
- const o = this.motionStream.rapidlyChangingMotionState.joint_position ?? [], { cycle_time: i, mounting: n, motion_group_model: r, tcps: a } = this.motionStream.description, s = this.joggingStore.selectedTcpId, h = s ? (M = a == null ? void 0 : a[s]) == null ? void 0 : M.pose : void 0, m = {
3167
+ const o = this.motionStream.rapidlyChangingMotionState.joint_position ?? [], { cycle_time: i, mounting: n, motion_group_model: r, tcps: a } = this.motionStream.description, s = this.joggingStore.selectedTcpId, g = s ? (M = a == null ? void 0 : a[s]) == null ? void 0 : M.pose : void 0, m = {
3152
3168
  // The model the jogger plans step jogs with: the custom copy that holds
3153
3169
  // this robot's data, if the app gave one
3154
3170
  motion_group_model: ((T = this.jogger.options) == null ? void 0 : T.motionGroupModel) ?? r,
3155
3171
  cycle_time: i ?? 0,
3156
3172
  mounting: n,
3157
- ...h && { tcp_offset: h }
3173
+ ...g && { tcp_offset: g }
3158
3174
  };
3159
- let g;
3175
+ let h;
3160
3176
  if (t.type === "cartesian") {
3161
3177
  let _ = t.pose;
3162
3178
  const R = t.coordinateSystemId || "world";
@@ -3176,7 +3192,7 @@ class Ei {
3176
3192
  } catch {
3177
3193
  return this.reset(), { ok: !1, errorFeedbackName: "FeedbackUnknown" };
3178
3194
  }
3179
- g = {
3195
+ h = {
3180
3196
  limits_override: {
3181
3197
  tcp_velocity_limit: this.joggingStore.translationVelocityMmPerSec
3182
3198
  },
@@ -3186,7 +3202,7 @@ class Ei {
3186
3202
  }
3187
3203
  };
3188
3204
  } else
3189
- g = {
3205
+ h = {
3190
3206
  limits_override: {
3191
3207
  joint_velocity_limits: Array(o.length).fill(
3192
3208
  this.joggingStore.rotationVelocityRadsPerSec
@@ -3207,7 +3223,7 @@ class Ei {
3207
3223
  {
3208
3224
  motion_group_setup: m,
3209
3225
  start_joint_position: o,
3210
- motion_commands: [g]
3226
+ motion_commands: [h]
3211
3227
  }
3212
3228
  );
3213
3229
  } catch (_) {
@@ -3343,29 +3359,29 @@ class Ei {
3343
3359
  }
3344
3360
  }
3345
3361
  export {
3346
- xi as A,
3362
+ ji as A,
3347
3363
  ht as C,
3348
3364
  pt as J,
3349
- Ge as L,
3365
+ We as L,
3350
3366
  ut as M,
3351
- Ii as N,
3352
- Ei as T,
3353
- po as V,
3367
+ Ei as N,
3368
+ Ti as T,
3369
+ yo as V,
3354
3370
  _t as a,
3355
- Pe as b,
3356
- ji as c,
3371
+ Ae as b,
3372
+ wi as c,
3357
3373
  nt as d,
3358
- We as e,
3359
- zt as f,
3360
- _i as g,
3361
- At as h,
3362
- Ve as i,
3363
- De as j,
3364
- $e as k,
3365
- no as l,
3374
+ qe as e,
3375
+ Ut as f,
3376
+ Ii as g,
3377
+ Dt as h,
3378
+ Le as i,
3379
+ Ve as j,
3380
+ Be as k,
3381
+ ro as l,
3366
3382
  it as m,
3367
- wi as p,
3368
- Ne as r,
3369
- Vt as t,
3370
- Le as u
3383
+ Mi as p,
3384
+ $e as r,
3385
+ Lt as t,
3386
+ Fe as u
3371
3387
  };