@wandelbots/wandelbots-js-react-components 5.5.5-pr.fix-select-tcp.609.fb23fba → 5.5.5-pr.fix-select-tcp.609.2c295d2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/theming-CyZjy9Df.cjs +4 -0
- package/dist/chunks/{theming-Cyw7_pwb.js → theming-wFQIyQte.js} +402 -404
- package/dist/components/jogging/JoggingStore.d.ts +0 -5
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/theming-knRUZgmE.cjs +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a, jsxs as S, Fragment as et } from "react/jsx-runtime";
|
|
2
|
-
import { alpha as Mt, useTheme as L, styled as ut, createTheme as
|
|
2
|
+
import { alpha as Mt, useTheme as L, styled as ut, createTheme as Ft } from "@mui/material/styles";
|
|
3
3
|
import te from "@mui/material/AppBar";
|
|
4
|
-
import
|
|
4
|
+
import Bt from "@mui/material/Backdrop";
|
|
5
5
|
import T from "@mui/material/Box";
|
|
6
6
|
import H from "@mui/material/IconButton";
|
|
7
7
|
import ee from "@mui/material/Menu";
|
|
@@ -9,7 +9,7 @@ import q from "@mui/material/MenuItem";
|
|
|
9
9
|
import oe from "@mui/material/Toolbar";
|
|
10
10
|
import j from "@mui/material/Typography";
|
|
11
11
|
import { observer as J, useLocalObservable as Lt } from "mobx-react-lite";
|
|
12
|
-
import { useState as
|
|
12
|
+
import { useState as B, useRef as A, useCallback as P, useEffect as D, useMemo as rt, useId as ne } from "react";
|
|
13
13
|
import { e as $ } from "./externalizeComponent-D6S3WLFc.js";
|
|
14
14
|
import ie from "@mui/material/SvgIcon";
|
|
15
15
|
import U from "@mui/material/Fade";
|
|
@@ -20,7 +20,7 @@ import ae from "@mui/icons-material/Clear";
|
|
|
20
20
|
import se from "@mui/icons-material/FilterList";
|
|
21
21
|
import It from "@mui/icons-material/Search";
|
|
22
22
|
import Y from "@mui/material/Divider";
|
|
23
|
-
import { useGridApiRef as le, DataGrid as ce, Toolbar as de, FilterPanelTrigger as ge, ToolbarButton as
|
|
23
|
+
import { useGridApiRef as le, DataGrid as ce, Toolbar as de, FilterPanelTrigger as ge, ToolbarButton as lt, QuickFilter as ue, QuickFilterTrigger as pe, QuickFilterControl as me, QuickFilterClear as he } from "@mui/x-data-grid";
|
|
24
24
|
import fe from "@mui/icons-material/OpenWith";
|
|
25
25
|
import be from "@mui/icons-material/Share";
|
|
26
26
|
import _ from "@mui/material/Stack";
|
|
@@ -28,7 +28,7 @@ import zt from "@mui/material/Tab";
|
|
|
28
28
|
import Vt from "@mui/material/Tabs";
|
|
29
29
|
import { JointTypeEnum as G, NovaClient as xe, poseToWandelscriptString as ye } from "@wandelbots/nova-js/v2";
|
|
30
30
|
import { lowerFirst as Se, countBy as ve, isString as Ce } from "lodash-es";
|
|
31
|
-
import { runInAction as
|
|
31
|
+
import { runInAction as F, makeAutoObservable as mt, when as at, autorun as kt, makeObservable as we, action as Rt, observable as Te } from "mobx";
|
|
32
32
|
import { radiansToDegrees as Nt, tryParseJson as W, XYZ_TO_VECTOR as tt, degreesToRadians as Me } from "@wandelbots/nova-js";
|
|
33
33
|
import { Vector3 as ct } from "three/src/math/Vector3.js";
|
|
34
34
|
import Wt from "@mui/material/CircularProgress";
|
|
@@ -38,9 +38,9 @@ import Re from "@mui/material/Alert";
|
|
|
38
38
|
import je from "@mui/material/AlertTitle";
|
|
39
39
|
import Z from "@mui/material/Button";
|
|
40
40
|
import jt from "@mui/material/ToggleButton";
|
|
41
|
-
import { c as Ee, d as Pe, F as _e, a as Oe, b as
|
|
42
|
-
import
|
|
43
|
-
import
|
|
41
|
+
import { c as Ee, d as Pe, F as _e, a as Oe, b as Ae, f as De, e as Je } from "./robot-Cy9ST5-m.js";
|
|
42
|
+
import Fe from "lodash-es/isEqual.js";
|
|
43
|
+
import Be from "@mui/material/InputAdornment";
|
|
44
44
|
import Le from "@mui/material/FormControl";
|
|
45
45
|
import $e from "@mui/material/InputLabel";
|
|
46
46
|
import ze from "@mui/material/Select";
|
|
@@ -81,16 +81,16 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
81
81
|
const {
|
|
82
82
|
appIcon: t,
|
|
83
83
|
appName: o,
|
|
84
|
-
apps:
|
|
85
|
-
onAppSelect:
|
|
84
|
+
apps: r = [],
|
|
85
|
+
onAppSelect: i,
|
|
86
86
|
disabled: n = !1,
|
|
87
87
|
sx: c
|
|
88
|
-
} = e, [s, l] =
|
|
88
|
+
} = e, [s, l] = B(null), u = !!s, f = (p) => {
|
|
89
89
|
l(p.currentTarget);
|
|
90
90
|
}, g = () => {
|
|
91
91
|
l(null);
|
|
92
92
|
}, d = (p) => {
|
|
93
|
-
g(), p.onClick ? p.onClick() : p.href && (window.location.href = p.href),
|
|
93
|
+
g(), p.onClick ? p.onClick() : p.href && (window.location.href = p.href), i == null || i(p);
|
|
94
94
|
};
|
|
95
95
|
return /* @__PURE__ */ S(et, { children: [
|
|
96
96
|
/* @__PURE__ */ a(
|
|
@@ -120,7 +120,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
120
120
|
children: o
|
|
121
121
|
}
|
|
122
122
|
),
|
|
123
|
-
|
|
123
|
+
r.length > 0 && /* @__PURE__ */ a(
|
|
124
124
|
H,
|
|
125
125
|
{
|
|
126
126
|
color: "inherit",
|
|
@@ -154,7 +154,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
154
154
|
}
|
|
155
155
|
),
|
|
156
156
|
/* @__PURE__ */ a(
|
|
157
|
-
|
|
157
|
+
Bt,
|
|
158
158
|
{
|
|
159
159
|
open: u,
|
|
160
160
|
onClick: g,
|
|
@@ -187,7 +187,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
187
187
|
mt: 1
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
|
-
children:
|
|
190
|
+
children: r.map((p) => /* @__PURE__ */ S(q, { onClick: () => d(p), children: [
|
|
191
191
|
/* @__PURE__ */ a(T, { sx: { display: "flex", alignItems: "center" }, children: p.icon }),
|
|
192
192
|
/* @__PURE__ */ a(j, { variant: "body1", sx: { ml: 2 }, children: p.name })
|
|
193
193
|
] }, p.id))
|
|
@@ -196,25 +196,25 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
196
196
|
] });
|
|
197
197
|
})
|
|
198
198
|
), go = (e) => {
|
|
199
|
-
const t = Math.floor(e / 86400), o = Math.floor(e % 86400 / 3600),
|
|
200
|
-
return t > 0 ? (n.push(t.toString()), n.push(o.toString().padStart(2, "0")), n.push(
|
|
199
|
+
const t = Math.floor(e / 86400), o = Math.floor(e % 86400 / 3600), r = Math.floor(e % 3600 / 60), i = e % 60, n = [];
|
|
200
|
+
return t > 0 ? (n.push(t.toString()), n.push(o.toString().padStart(2, "0")), n.push(r.toString().padStart(2, "0")), n.push(i.toString().padStart(2, "0"))) : o > 0 ? (n.push(o.toString()), n.push(r.toString().padStart(2, "0")), n.push(i.toString().padStart(2, "0"))) : (n.push(r.toString()), n.push(i.toString().padStart(2, "0"))), n.join(":");
|
|
201
201
|
}, N = (e, t) => {
|
|
202
|
-
const o = Math.floor(e / 86400),
|
|
202
|
+
const o = Math.floor(e / 86400), r = Math.floor(e % 86400 / 3600), i = Math.floor(e % 3600 / 60), n = e % 60;
|
|
203
203
|
if (typeof Intl < "u" && "DurationFormat" in Intl)
|
|
204
204
|
try {
|
|
205
205
|
const s = {};
|
|
206
|
-
return o > 0 && (s.days = o),
|
|
206
|
+
return o > 0 && (s.days = o), r > 0 && (s.hours = r), i > 0 && (s.minutes = i), (n > 0 || Object.keys(s).length === 0) && (s.seconds = n), new Intl.DurationFormat(t, { style: "narrow" }).format(s);
|
|
207
207
|
} catch {
|
|
208
208
|
}
|
|
209
209
|
const c = [];
|
|
210
|
-
return o > 0 && c.push(`${o}d`),
|
|
210
|
+
return o > 0 && c.push(`${o}d`), r > 0 && c.push(`${r}h`), i > 0 && c.push(`${i}m`), (n > 0 || c.length === 0) && c.push(`${n}s`), c.join(" ");
|
|
211
211
|
}, uo = (e, t, o) => e === "countdown" && o !== null ? Math.min(100, t / o * 100) : e === "measuring" ? t / 60 % 1 * 100 : 0, po = ({
|
|
212
212
|
timerState: e,
|
|
213
213
|
animationState: t,
|
|
214
214
|
hasError: o,
|
|
215
|
-
className:
|
|
215
|
+
className: r
|
|
216
216
|
}) => {
|
|
217
|
-
const { t:
|
|
217
|
+
const { t: i, i18n: n } = V(), c = L(), { currentState: s, remainingTime: l, maxTime: u, currentProgress: f } = e, {
|
|
218
218
|
showErrorAnimation: g,
|
|
219
219
|
showPauseAnimation: d,
|
|
220
220
|
showPulsatingText: p,
|
|
@@ -227,7 +227,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
227
227
|
return /* @__PURE__ */ S(
|
|
228
228
|
T,
|
|
229
229
|
{
|
|
230
|
-
className:
|
|
230
|
+
className: r,
|
|
231
231
|
sx: {
|
|
232
232
|
position: "relative",
|
|
233
233
|
width: 264,
|
|
@@ -324,7 +324,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
324
324
|
opacity: s === "measured" && x ? p ? 1 : 0.6 : 1,
|
|
325
325
|
transition: "opacity 2s ease-in-out"
|
|
326
326
|
},
|
|
327
|
-
children: s === "measuring" || s === "measured" ?
|
|
327
|
+
children: s === "measuring" || s === "measured" ? i("CycleTimer.CycleTime.lb", "Cycle Time") : s === "countdown" ? i("CycleTimer.RemainingTime.lb", "Remaining Time") : ""
|
|
328
328
|
}
|
|
329
329
|
)
|
|
330
330
|
}
|
|
@@ -376,7 +376,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
376
376
|
opacity: m ? 1 : 0.6,
|
|
377
377
|
transition: "opacity 2s ease-in-out"
|
|
378
378
|
},
|
|
379
|
-
children:
|
|
379
|
+
children: i(
|
|
380
380
|
"CycleTimer.WaitingForCycle.lb",
|
|
381
381
|
"Waiting for program cycle"
|
|
382
382
|
)
|
|
@@ -411,7 +411,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
411
411
|
color: "#FFFFFF",
|
|
412
412
|
lineHeight: "116.7%"
|
|
413
413
|
},
|
|
414
|
-
children:
|
|
414
|
+
children: i("CycleTimer.Error.lb", "Error")
|
|
415
415
|
}
|
|
416
416
|
) }),
|
|
417
417
|
/* @__PURE__ */ a(
|
|
@@ -479,7 +479,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
479
479
|
opacity: s === "measured" && x ? p ? 1 : 0.6 : 1,
|
|
480
480
|
transition: "opacity 2s ease-in-out"
|
|
481
481
|
},
|
|
482
|
-
children: s === "measuring" ?
|
|
482
|
+
children: s === "measuring" ? i("CycleTimer.Measuring.lb", "measuring...") : s === "measured" ? i("CycleTimer.Determined.lb", "determined") : s === "countdown" && u !== null ? i("CycleTimer.OfTime.lb", {
|
|
483
483
|
time: N(u, n.language)
|
|
484
484
|
}) : ""
|
|
485
485
|
}
|
|
@@ -500,8 +500,8 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
500
500
|
timerState: e,
|
|
501
501
|
animationState: t,
|
|
502
502
|
hasError: o,
|
|
503
|
-
compact:
|
|
504
|
-
className:
|
|
503
|
+
compact: r,
|
|
504
|
+
className: i
|
|
505
505
|
}) => {
|
|
506
506
|
const { t: n, i18n: c } = V(), s = L(), { currentState: l, remainingTime: u, maxTime: f } = e, {
|
|
507
507
|
showErrorAnimation: g,
|
|
@@ -511,10 +511,10 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
511
511
|
showIdlePulsating: y,
|
|
512
512
|
idleDotsCount: h
|
|
513
513
|
} = t;
|
|
514
|
-
return
|
|
514
|
+
return r && l === "idle" ? /* @__PURE__ */ a(
|
|
515
515
|
T,
|
|
516
516
|
{
|
|
517
|
-
className:
|
|
517
|
+
className: i,
|
|
518
518
|
sx: {
|
|
519
519
|
display: "flex",
|
|
520
520
|
alignItems: "center",
|
|
@@ -536,7 +536,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
536
536
|
) : /* @__PURE__ */ S(
|
|
537
537
|
T,
|
|
538
538
|
{
|
|
539
|
-
className:
|
|
539
|
+
className: i,
|
|
540
540
|
sx: {
|
|
541
541
|
display: "flex",
|
|
542
542
|
alignItems: "center",
|
|
@@ -544,7 +544,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
544
544
|
gap: 1
|
|
545
545
|
},
|
|
546
546
|
children: [
|
|
547
|
-
!(l === "idle" &&
|
|
547
|
+
!(l === "idle" && r) && /* @__PURE__ */ a(
|
|
548
548
|
T,
|
|
549
549
|
{
|
|
550
550
|
sx: {
|
|
@@ -629,14 +629,14 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
629
629
|
children: ".".repeat(h)
|
|
630
630
|
}
|
|
631
631
|
)
|
|
632
|
-
] }) : l === "measuring" ?
|
|
632
|
+
] }) : l === "measuring" ? r ? N(u, c.language) : `${N(u, c.language)} / ${n("CycleTimer.Measuring.lb", "measuring...")}` : l === "measured" ? r ? N(u, c.language) : `${N(u, c.language)} / ${n("CycleTimer.Determined.lb", "determined")}` : l === "countdown" && f !== null ? r ? N(u, c.language) : `${N(u, c.language)} / ${n("CycleTimer.Time.lb", { time: N(f, c.language) })}` : N(u, c.language)
|
|
633
633
|
}
|
|
634
634
|
)
|
|
635
635
|
]
|
|
636
636
|
}
|
|
637
637
|
);
|
|
638
638
|
}, ho = () => {
|
|
639
|
-
const [e, t] =
|
|
639
|
+
const [e, t] = B({
|
|
640
640
|
showPauseAnimation: !1,
|
|
641
641
|
showErrorAnimation: !1,
|
|
642
642
|
showPulsatingText: !1,
|
|
@@ -645,24 +645,24 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
645
645
|
showMainText: !0,
|
|
646
646
|
showIdlePulsating: !1,
|
|
647
647
|
idleDotsCount: 0
|
|
648
|
-
}), o =
|
|
648
|
+
}), o = A(
|
|
649
649
|
null
|
|
650
|
-
),
|
|
650
|
+
), r = A(
|
|
651
651
|
null
|
|
652
|
-
),
|
|
652
|
+
), i = A(
|
|
653
653
|
null
|
|
654
|
-
), n =
|
|
654
|
+
), n = A(null), c = A(0), s = A(null), l = A(
|
|
655
655
|
null
|
|
656
656
|
), u = P(() => {
|
|
657
657
|
t((b) => ({ ...b, showPauseAnimation: !0 })), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
|
|
658
658
|
t((b) => ({ ...b, showPauseAnimation: !1 }));
|
|
659
659
|
}, 800);
|
|
660
660
|
}, []), f = P(() => {
|
|
661
|
-
t((b) => ({ ...b, showErrorAnimation: !0 })),
|
|
661
|
+
t((b) => ({ ...b, showErrorAnimation: !0 })), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
|
|
662
662
|
t((b) => ({ ...b, showErrorAnimation: !1 }));
|
|
663
663
|
}, 600);
|
|
664
664
|
}, []), g = P(() => {
|
|
665
|
-
t((b) => ({ ...b, showErrorAnimation: !1 })),
|
|
665
|
+
t((b) => ({ ...b, showErrorAnimation: !1 })), r.current && clearTimeout(r.current);
|
|
666
666
|
}, []), d = P((b) => {
|
|
667
667
|
c.current = 0, t((w) => ({
|
|
668
668
|
...w,
|
|
@@ -673,7 +673,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
673
673
|
...w,
|
|
674
674
|
pulsatingFinished: !0
|
|
675
675
|
// This will keep the success color and start slow pulsating
|
|
676
|
-
})),
|
|
676
|
+
})), i.current = setInterval(() => {
|
|
677
677
|
t((w) => ({
|
|
678
678
|
...w,
|
|
679
679
|
showPulsatingText: !w.showPulsatingText
|
|
@@ -681,7 +681,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
681
681
|
}, 2e3), b && b();
|
|
682
682
|
}, 800);
|
|
683
683
|
}, []), p = P(() => {
|
|
684
|
-
|
|
684
|
+
i.current && (clearInterval(i.current), i.current = null), t((b) => ({
|
|
685
685
|
...b,
|
|
686
686
|
showPulsatingText: !1,
|
|
687
687
|
pulsatingFinished: !1
|
|
@@ -727,7 +727,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
727
727
|
showMainText: !0
|
|
728
728
|
}));
|
|
729
729
|
}, []), v = P(() => {
|
|
730
|
-
o.current && clearTimeout(o.current),
|
|
730
|
+
o.current && clearTimeout(o.current), r.current && clearTimeout(r.current), n.current && clearTimeout(n.current), i.current && clearInterval(i.current), s.current && clearInterval(s.current), l.current && clearInterval(l.current);
|
|
731
731
|
}, []);
|
|
732
732
|
return {
|
|
733
733
|
animationState: e,
|
|
@@ -746,13 +746,13 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
746
746
|
autoStart: e,
|
|
747
747
|
onCycleEnd: t,
|
|
748
748
|
onMeasuringComplete: o,
|
|
749
|
-
hasError:
|
|
750
|
-
onPauseAnimation:
|
|
749
|
+
hasError: r,
|
|
750
|
+
onPauseAnimation: i,
|
|
751
751
|
onErrorAnimation: n,
|
|
752
752
|
onClearErrorAnimation: c,
|
|
753
753
|
onStartPulsating: s
|
|
754
754
|
}) => {
|
|
755
|
-
const [l, u] =
|
|
755
|
+
const [l, u] = B({
|
|
756
756
|
currentState: "idle",
|
|
757
757
|
remainingTime: 0,
|
|
758
758
|
maxTime: null,
|
|
@@ -760,7 +760,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
760
760
|
isPausedState: !1,
|
|
761
761
|
currentProgress: 0,
|
|
762
762
|
wasRunningBeforeError: !1
|
|
763
|
-
}), f =
|
|
763
|
+
}), f = A(null), g = A(null), d = A(0), [p] = $t([0], {
|
|
764
764
|
tension: 80,
|
|
765
765
|
friction: 18,
|
|
766
766
|
onChange: ([C]) => {
|
|
@@ -833,13 +833,13 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
833
833
|
...C,
|
|
834
834
|
isRunning: !1,
|
|
835
835
|
isPausedState: !0
|
|
836
|
-
})),
|
|
836
|
+
})), i();
|
|
837
837
|
}, [
|
|
838
838
|
l.isRunning,
|
|
839
839
|
l.currentState,
|
|
840
840
|
l.maxTime,
|
|
841
841
|
p,
|
|
842
|
-
|
|
842
|
+
i
|
|
843
843
|
]), b = P(() => {
|
|
844
844
|
l.isPausedState && (l.remainingTime > 0 || l.currentState !== "countdown") && (g.current = Date.now(), u((C) => ({
|
|
845
845
|
...C,
|
|
@@ -851,10 +851,10 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
851
851
|
l.remainingTime,
|
|
852
852
|
l.currentState
|
|
853
853
|
]), w = P(() => l.isPausedState, [l.isPausedState]);
|
|
854
|
-
return
|
|
855
|
-
|
|
854
|
+
return D(() => {
|
|
855
|
+
r ? (l.isRunning && !l.isPausedState && (u((C) => ({ ...C, wasRunningBeforeError: !0 })), v()), n()) : (l.wasRunningBeforeError && l.isPausedState && (u((C) => ({ ...C, wasRunningBeforeError: !1 })), b()), c());
|
|
856
856
|
}, [
|
|
857
|
-
|
|
857
|
+
r,
|
|
858
858
|
l.isRunning,
|
|
859
859
|
l.isPausedState,
|
|
860
860
|
l.wasRunningBeforeError,
|
|
@@ -862,7 +862,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
862
862
|
b,
|
|
863
863
|
n,
|
|
864
864
|
c
|
|
865
|
-
]),
|
|
865
|
+
]), D(() => {
|
|
866
866
|
if (l.isRunning) {
|
|
867
867
|
const C = () => {
|
|
868
868
|
if (g.current) {
|
|
@@ -905,7 +905,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
905
905
|
l.currentState,
|
|
906
906
|
l.maxTime,
|
|
907
907
|
p
|
|
908
|
-
]),
|
|
908
|
+
]), D(() => {
|
|
909
909
|
let C = null;
|
|
910
910
|
const M = () => {
|
|
911
911
|
p.update(1 / 60), C = requestAnimationFrame(M);
|
|
@@ -931,13 +931,13 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
931
931
|
onCycleComplete: e,
|
|
932
932
|
onCycleEnd: t,
|
|
933
933
|
onMeasuringComplete: o,
|
|
934
|
-
autoStart:
|
|
935
|
-
variant:
|
|
934
|
+
autoStart: r = !0,
|
|
935
|
+
variant: i = "default",
|
|
936
936
|
compact: n = !1,
|
|
937
937
|
className: c,
|
|
938
938
|
hasError: s = !1
|
|
939
939
|
}) => {
|
|
940
|
-
const l =
|
|
940
|
+
const l = A(void 0), {
|
|
941
941
|
animationState: u,
|
|
942
942
|
triggerPauseAnimation: f,
|
|
943
943
|
triggerErrorAnimation: g,
|
|
@@ -950,7 +950,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
950
950
|
setInitialAnimationState: v,
|
|
951
951
|
cleanup: b
|
|
952
952
|
} = ho(), { timerState: w, controls: C } = fo({
|
|
953
|
-
autoStart:
|
|
953
|
+
autoStart: r,
|
|
954
954
|
onCycleEnd: t,
|
|
955
955
|
onMeasuringComplete: o,
|
|
956
956
|
hasError: s,
|
|
@@ -959,7 +959,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
959
959
|
onClearErrorAnimation: d,
|
|
960
960
|
onStartPulsating: p
|
|
961
961
|
});
|
|
962
|
-
return
|
|
962
|
+
return D(() => {
|
|
963
963
|
const M = l.current;
|
|
964
964
|
l.current !== void 0 && M !== w.currentState ? (M === "measured" && x(), M === "idle" && h(), m()) : v(), w.currentState === "idle" && y(), l.current = w.currentState;
|
|
965
965
|
}, [
|
|
@@ -969,7 +969,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
969
969
|
y,
|
|
970
970
|
m,
|
|
971
971
|
v
|
|
972
|
-
]),
|
|
972
|
+
]), D(() => {
|
|
973
973
|
let M = !0;
|
|
974
974
|
const k = setTimeout(() => {
|
|
975
975
|
M && e(C);
|
|
@@ -977,7 +977,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
977
977
|
return () => {
|
|
978
978
|
M = !1, clearTimeout(k);
|
|
979
979
|
};
|
|
980
|
-
}, [e, C]),
|
|
980
|
+
}, [e, C]), D(() => b, [b]), i === "small" ? /* @__PURE__ */ a(
|
|
981
981
|
mo,
|
|
982
982
|
{
|
|
983
983
|
timerState: w,
|
|
@@ -1003,8 +1003,8 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1003
1003
|
data: e,
|
|
1004
1004
|
columns: t,
|
|
1005
1005
|
getRowData: o,
|
|
1006
|
-
onRowClick:
|
|
1007
|
-
selectedItem:
|
|
1006
|
+
onRowClick: r,
|
|
1007
|
+
selectedItem: i,
|
|
1008
1008
|
getItemId: n,
|
|
1009
1009
|
title: c,
|
|
1010
1010
|
showCount: s = !0,
|
|
@@ -1015,15 +1015,15 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1015
1015
|
sx: d
|
|
1016
1016
|
}) => {
|
|
1017
1017
|
var R;
|
|
1018
|
-
const p = L(), x = le(), y =
|
|
1019
|
-
|
|
1018
|
+
const p = L(), x = le(), y = A(null), [h, m] = B(null), v = rt(() => e.map(o), [e, o]);
|
|
1019
|
+
D(() => {
|
|
1020
1020
|
x.current && v.length > 0 && x.current.autosizeColumns({
|
|
1021
1021
|
includeOutliers: !0,
|
|
1022
1022
|
includeHeaders: !0,
|
|
1023
1023
|
expand: !0,
|
|
1024
1024
|
columns: t.map((I) => I.field)
|
|
1025
1025
|
});
|
|
1026
|
-
}, [v, t, x]),
|
|
1026
|
+
}, [v, t, x]), D(() => {
|
|
1027
1027
|
if (!y.current || !x.current) return;
|
|
1028
1028
|
const I = new ResizeObserver(() => {
|
|
1029
1029
|
setTimeout(() => {
|
|
@@ -1040,8 +1040,8 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1040
1040
|
};
|
|
1041
1041
|
}, [x, v.length, t]);
|
|
1042
1042
|
const b = rt(() => {
|
|
1043
|
-
if (
|
|
1044
|
-
return
|
|
1043
|
+
if (i !== void 0)
|
|
1044
|
+
return i;
|
|
1045
1045
|
if (h !== null)
|
|
1046
1046
|
return h;
|
|
1047
1047
|
if (g && e.length > 0) {
|
|
@@ -1049,9 +1049,9 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1049
1049
|
return m(I), I;
|
|
1050
1050
|
}
|
|
1051
1051
|
return null;
|
|
1052
|
-
}, [g, e,
|
|
1052
|
+
}, [g, e, i, h]), w = (I) => {
|
|
1053
1053
|
const E = e.find((z) => o(z).id === I.id);
|
|
1054
|
-
E && (
|
|
1054
|
+
E && (i === void 0 && m(E), r && r(E, I));
|
|
1055
1055
|
}, C = rt(() => !b || !n ? null : n(b), [b, n]);
|
|
1056
1056
|
function M() {
|
|
1057
1057
|
return /* @__PURE__ */ a(de, { children: /* @__PURE__ */ S(
|
|
@@ -1093,7 +1093,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1093
1093
|
/* @__PURE__ */ a(
|
|
1094
1094
|
ge,
|
|
1095
1095
|
{
|
|
1096
|
-
render: /* @__PURE__ */ a(
|
|
1096
|
+
render: /* @__PURE__ */ a(lt, { "aria-label": "Show filters", children: /* @__PURE__ */ a(se, { fontSize: "small" }) })
|
|
1097
1097
|
}
|
|
1098
1098
|
),
|
|
1099
1099
|
/* @__PURE__ */ a(
|
|
@@ -1122,7 +1122,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1122
1122
|
!E.expanded && /* @__PURE__ */ a(
|
|
1123
1123
|
pe,
|
|
1124
1124
|
{
|
|
1125
|
-
render: /* @__PURE__ */ a(
|
|
1125
|
+
render: /* @__PURE__ */ a(lt, { "aria-label": "Search", children: /* @__PURE__ */ a(It, { fontSize: "small" }) })
|
|
1126
1126
|
}
|
|
1127
1127
|
),
|
|
1128
1128
|
/* @__PURE__ */ S(
|
|
@@ -1266,7 +1266,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1266
1266
|
backgroundColor: "rgba(255, 255, 255, 0.1)"
|
|
1267
1267
|
}
|
|
1268
1268
|
},
|
|
1269
|
-
children: /* @__PURE__ */ a(
|
|
1269
|
+
children: /* @__PURE__ */ a(lt, { "aria-label": "Clear", children: /* @__PURE__ */ a(ae, { fontSize: "small" }) })
|
|
1270
1270
|
}
|
|
1271
1271
|
)
|
|
1272
1272
|
}
|
|
@@ -1389,7 +1389,7 @@ const co = (e) => /* @__PURE__ */ a(ie, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1389
1389
|
borderBottom: "none !important"
|
|
1390
1390
|
},
|
|
1391
1391
|
"& .MuiDataGrid-row": {
|
|
1392
|
-
cursor:
|
|
1392
|
+
cursor: r ? "pointer" : "default",
|
|
1393
1393
|
border: "none",
|
|
1394
1394
|
margin: "1px 0",
|
|
1395
1395
|
position: "relative",
|
|
@@ -1521,8 +1521,8 @@ const _t = $(
|
|
|
1521
1521
|
colors: e,
|
|
1522
1522
|
label: t,
|
|
1523
1523
|
getDisplayedValue: o,
|
|
1524
|
-
startJogging:
|
|
1525
|
-
stopJogging:
|
|
1524
|
+
startJogging: r,
|
|
1525
|
+
stopJogging: i,
|
|
1526
1526
|
disabled: n,
|
|
1527
1527
|
activeJoggingDirection: c,
|
|
1528
1528
|
...s
|
|
@@ -1532,11 +1532,11 @@ const _t = $(
|
|
|
1532
1532
|
const E = o(), z = d.current;
|
|
1533
1533
|
z && (z.textContent = E);
|
|
1534
1534
|
});
|
|
1535
|
-
const l = L(), [u, f] =
|
|
1536
|
-
|
|
1535
|
+
const l = L(), [u, f] = B(null);
|
|
1536
|
+
D(() => {
|
|
1537
1537
|
n && v();
|
|
1538
1538
|
}, [n]);
|
|
1539
|
-
const g = c || u, d =
|
|
1539
|
+
const g = c || u, d = A(null);
|
|
1540
1540
|
e || (e = {
|
|
1541
1541
|
color: "#fff",
|
|
1542
1542
|
backgroundColor: "#000",
|
|
@@ -1584,10 +1584,10 @@ const _t = $(
|
|
|
1584
1584
|
}
|
|
1585
1585
|
};
|
|
1586
1586
|
function m(E, z) {
|
|
1587
|
-
n || E.button === 0 && (f(z),
|
|
1587
|
+
n || E.button === 0 && (f(z), r(z));
|
|
1588
1588
|
}
|
|
1589
1589
|
function v() {
|
|
1590
|
-
f(null),
|
|
1590
|
+
f(null), i();
|
|
1591
1591
|
}
|
|
1592
1592
|
return /* @__PURE__ */ S(_, { height: "64px", direction: "row", justifyContent: "center", ...s, children: [
|
|
1593
1593
|
/* @__PURE__ */ a(
|
|
@@ -1690,14 +1690,14 @@ const _t = $(
|
|
|
1690
1690
|
startJogging: e,
|
|
1691
1691
|
stopJogging: t,
|
|
1692
1692
|
lowerLimit: o,
|
|
1693
|
-
upperLimit:
|
|
1694
|
-
useDegree:
|
|
1693
|
+
upperLimit: r,
|
|
1694
|
+
useDegree: i,
|
|
1695
1695
|
getValue: n,
|
|
1696
1696
|
disabled: c,
|
|
1697
1697
|
...s
|
|
1698
1698
|
}) => {
|
|
1699
1699
|
var M, k, R, I, E, z, Q, ot, xt, yt, St, vt, Ct, wt, Tt;
|
|
1700
|
-
const { t: l } = V(), [u, f] =
|
|
1700
|
+
const { t: l } = V(), [u, f] = B(), g = L(), d = {
|
|
1701
1701
|
background: (M = g.palette.backgroundPaperElevation) == null ? void 0 : M[4],
|
|
1702
1702
|
color: (k = g.palette.backgroundPaperElevation) == null ? void 0 : k[11]
|
|
1703
1703
|
}, p = Lt(() => ({
|
|
@@ -1709,7 +1709,7 @@ const _t = $(
|
|
|
1709
1709
|
this.activeJoggingDir = null, t();
|
|
1710
1710
|
}
|
|
1711
1711
|
})), x = He(() => {
|
|
1712
|
-
const O =
|
|
1712
|
+
const O = i ? y(n()) : n();
|
|
1713
1713
|
(O === void 0 || u === void 0 || Math.abs(u - O) > 1e-9) && f(O);
|
|
1714
1714
|
}, 50);
|
|
1715
1715
|
pt(x);
|
|
@@ -1828,7 +1828,7 @@ const _t = $(
|
|
|
1828
1828
|
textAlign: "center",
|
|
1829
1829
|
color: c ? g.palette.action.disabled : g.palette.text.primary
|
|
1830
1830
|
},
|
|
1831
|
-
children:
|
|
1831
|
+
children: i ? w(u) : C(u)
|
|
1832
1832
|
}
|
|
1833
1833
|
),
|
|
1834
1834
|
/* @__PURE__ */ a(
|
|
@@ -1836,8 +1836,8 @@ const _t = $(
|
|
|
1836
1836
|
{
|
|
1837
1837
|
disabled: !0,
|
|
1838
1838
|
"aria-label": "Joint position",
|
|
1839
|
-
min:
|
|
1840
|
-
max:
|
|
1839
|
+
min: i ? y(o) : o,
|
|
1840
|
+
max: i ? y(r) : r,
|
|
1841
1841
|
value: u || 0,
|
|
1842
1842
|
track: !1,
|
|
1843
1843
|
sx: {
|
|
@@ -1860,14 +1860,14 @@ const _t = $(
|
|
|
1860
1860
|
opacity: 1
|
|
1861
1861
|
}
|
|
1862
1862
|
},
|
|
1863
|
-
marks: o !== void 0 &&
|
|
1863
|
+
marks: o !== void 0 && r !== void 0 && [
|
|
1864
1864
|
{
|
|
1865
|
-
value:
|
|
1866
|
-
label:
|
|
1865
|
+
value: i ? y(o) : o,
|
|
1866
|
+
label: i ? w(y(o), 0) : C(o)
|
|
1867
1867
|
},
|
|
1868
1868
|
{
|
|
1869
|
-
value:
|
|
1870
|
-
label:
|
|
1869
|
+
value: i ? y(r) : r,
|
|
1870
|
+
label: i ? w(y(r), 0) : C(r)
|
|
1871
1871
|
}
|
|
1872
1872
|
]
|
|
1873
1873
|
}
|
|
@@ -1907,10 +1907,10 @@ const _t = $(
|
|
|
1907
1907
|
function Ut(e, t, o) {
|
|
1908
1908
|
if (t.length !== e.length)
|
|
1909
1909
|
return !0;
|
|
1910
|
-
for (let
|
|
1910
|
+
for (let r = 0; r < t.length; r++)
|
|
1911
1911
|
if (
|
|
1912
1912
|
// biome-ignore lint/style/noNonNullAssertion: legacy code
|
|
1913
|
-
Math.abs(t[
|
|
1913
|
+
Math.abs(t[r] - e[r]) > o
|
|
1914
1914
|
)
|
|
1915
1915
|
return !1;
|
|
1916
1916
|
return !0;
|
|
@@ -1920,8 +1920,8 @@ function yo(e, t, o) {
|
|
|
1920
1920
|
return !1;
|
|
1921
1921
|
if (e === void 0 || t === void 0)
|
|
1922
1922
|
return !0;
|
|
1923
|
-
let
|
|
1924
|
-
return
|
|
1923
|
+
let r = 0;
|
|
1924
|
+
return r += Math.abs(e.orientation[0] - t.orientation[0]), r += Math.abs(e.orientation[1] - t.orientation[1]), r += Math.abs(e.orientation[2] - t.orientation[2]), r += Math.abs(e.position[0] - t.position[0]), r += Math.abs(e.position[1] - t.position[1]), r += Math.abs(e.position[2] - t.position[2]), r <= o;
|
|
1925
1925
|
}
|
|
1926
1926
|
function Ht(e, t, o) {
|
|
1927
1927
|
return e.coordinate_system === t.coordinate_system && e.tcp === t.tcp && yo(
|
|
@@ -1935,20 +1935,20 @@ function So(e, t) {
|
|
|
1935
1935
|
t[0],
|
|
1936
1936
|
t[1],
|
|
1937
1937
|
t[2]
|
|
1938
|
-
),
|
|
1938
|
+
), r = new Pt(
|
|
1939
1939
|
e[0],
|
|
1940
1940
|
e[1],
|
|
1941
1941
|
e[2]
|
|
1942
|
-
),
|
|
1943
|
-
let c =
|
|
1942
|
+
), i = o.length(), n = o.normalize();
|
|
1943
|
+
let c = r.length(), s = r.normalize();
|
|
1944
1944
|
s.dot(n) < 0 && (c = -c, s = s.multiplyScalar(-1));
|
|
1945
|
-
let l = c -
|
|
1946
|
-
return l -= 2 * Math.PI * Math.floor((l + Math.PI) / (2 * Math.PI)), c =
|
|
1945
|
+
let l = c - i;
|
|
1946
|
+
return l -= 2 * Math.PI * Math.floor((l + Math.PI) / (2 * Math.PI)), c = i + l, [...s.multiplyScalar(c)];
|
|
1947
1947
|
}
|
|
1948
1948
|
const Ot = 1e-4;
|
|
1949
1949
|
class ht {
|
|
1950
|
-
constructor(t, o,
|
|
1951
|
-
this.nova = t, this.controller = o, this.motionGroup =
|
|
1950
|
+
constructor(t, o, r, i, n, c) {
|
|
1951
|
+
this.nova = t, this.controller = o, this.motionGroup = r, this.description = i, this.initialMotionState = n, this.motionStateSocket = c, this.rapidlyChangingMotionState = n, c.addEventListener("message", (s) => {
|
|
1952
1952
|
var u;
|
|
1953
1953
|
const l = (u = W(s.data)) == null ? void 0 : u.result;
|
|
1954
1954
|
if (!l)
|
|
@@ -1959,13 +1959,13 @@ class ht {
|
|
|
1959
1959
|
this.rapidlyChangingMotionState.joint_position,
|
|
1960
1960
|
l.joint_position,
|
|
1961
1961
|
Ot
|
|
1962
|
-
) ||
|
|
1962
|
+
) || F(() => {
|
|
1963
1963
|
this.rapidlyChangingMotionState.joint_position = l.joint_position;
|
|
1964
1964
|
}), Ht(
|
|
1965
1965
|
this.rapidlyChangingMotionState,
|
|
1966
1966
|
l,
|
|
1967
1967
|
Ot
|
|
1968
|
-
) ||
|
|
1968
|
+
) || F(() => {
|
|
1969
1969
|
var f, g, d;
|
|
1970
1970
|
this.rapidlyChangingMotionState.tcp_pose == null ? this.rapidlyChangingMotionState.tcp_pose = l.tcp_pose : (f = l.tcp_pose) != null && f.orientation && ((g = l.tcp_pose) != null && g.position) && ((d = this.rapidlyChangingMotionState.tcp_pose) != null && d.orientation) ? this.rapidlyChangingMotionState.tcp_pose = {
|
|
1971
1971
|
position: l.tcp_pose.position,
|
|
@@ -1977,24 +1977,24 @@ class ht {
|
|
|
1977
1977
|
"Received incomplete tcp_pose, ignoring",
|
|
1978
1978
|
l.tcp_pose
|
|
1979
1979
|
);
|
|
1980
|
-
}), l.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== l.tcp &&
|
|
1980
|
+
}), l.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== l.tcp && F(() => {
|
|
1981
1981
|
this.rapidlyChangingMotionState.tcp = l.tcp;
|
|
1982
|
-
}), this.rapidlyChangingMotionState.standstill !== l.standstill &&
|
|
1982
|
+
}), this.rapidlyChangingMotionState.standstill !== l.standstill && F(() => {
|
|
1983
1983
|
this.rapidlyChangingMotionState.standstill = l.standstill;
|
|
1984
1984
|
});
|
|
1985
1985
|
}), mt(this);
|
|
1986
1986
|
}
|
|
1987
1987
|
static async open(t, o) {
|
|
1988
1988
|
var g;
|
|
1989
|
-
const [
|
|
1989
|
+
const [r, i] = o.split("@"), n = await t.api.controller.getCurrentRobotControllerState(i), c = n == null ? void 0 : n.motion_groups.find(
|
|
1990
1990
|
(d) => d.motion_group === o
|
|
1991
1991
|
);
|
|
1992
1992
|
if (!n || !c)
|
|
1993
1993
|
throw new Error(
|
|
1994
|
-
`Controller ${
|
|
1994
|
+
`Controller ${i} or motion group ${o} not found`
|
|
1995
1995
|
);
|
|
1996
1996
|
const s = t.openReconnectingWebsocket(
|
|
1997
|
-
`/controllers/${
|
|
1997
|
+
`/controllers/${i}/motion-groups/${o}/state-stream`
|
|
1998
1998
|
), l = await s.firstMessage(), u = (g = W(l.data)) == null ? void 0 : g.result;
|
|
1999
1999
|
if (!u)
|
|
2000
2000
|
throw new Error(
|
|
@@ -2006,7 +2006,7 @@ class ht {
|
|
|
2006
2006
|
u
|
|
2007
2007
|
);
|
|
2008
2008
|
const f = await t.api.motionGroup.getMotionGroupDescription(
|
|
2009
|
-
|
|
2009
|
+
i,
|
|
2010
2010
|
c.motion_group
|
|
2011
2011
|
);
|
|
2012
2012
|
return new ht(
|
|
@@ -2033,7 +2033,7 @@ class ht {
|
|
|
2033
2033
|
this.motionStateSocket.close();
|
|
2034
2034
|
}
|
|
2035
2035
|
}
|
|
2036
|
-
const
|
|
2036
|
+
const At = "Movement request rejected. Another client is currently executing a 'Jogging' motion!";
|
|
2037
2037
|
class ft {
|
|
2038
2038
|
constructor(t, o = {}) {
|
|
2039
2039
|
this.motionStream = t, this.options = o, this.DEFAULT_MODE = "off", this.DEFAULT_TCP = "Flange", this.NO_TCP = void 0, this.DEFAULT_INIT_TIMEOUT = 5e3, this.DEFAULT_ORIENTATION = "coordsys", this.mode = "off", this.joggingSocket = null, this.trajectorySocket = null, this.timeout = this.DEFAULT_INIT_TIMEOUT, this.tcp = (o == null ? void 0 : o.tcp) || t.motionGroup.tcp || this.getDefaultTcp(t), this.orientation = (o == null ? void 0 : o.orientation) || this.DEFAULT_ORIENTATION, this.timeout = (o == null ? void 0 : o.timeout) || this.DEFAULT_INIT_TIMEOUT, this.mode = (o == null ? void 0 : o.mode) || this.DEFAULT_MODE, this.onError = o == null ? void 0 : o.onError;
|
|
@@ -2055,13 +2055,13 @@ class ft {
|
|
|
2055
2055
|
* @param options.onError - Error handler for websocket errors
|
|
2056
2056
|
* @returns Promise resolving to initialized JoggerConnection instance
|
|
2057
2057
|
*/
|
|
2058
|
-
static async open(t, o,
|
|
2059
|
-
const
|
|
2058
|
+
static async open(t, o, r = {}) {
|
|
2059
|
+
const i = await ht.open(t, o), n = new ft(i, r);
|
|
2060
2060
|
return await n.setJoggingMode(n.mode), n;
|
|
2061
2061
|
}
|
|
2062
2062
|
getDefaultTcp(t) {
|
|
2063
|
-
var
|
|
2064
|
-
const o = (
|
|
2063
|
+
var r, i;
|
|
2064
|
+
const o = (i = (r = t.description.dh_parameters) == null ? void 0 : r[0]) == null ? void 0 : i.type;
|
|
2065
2065
|
return t.joints.length < 6 && (o === G.RevoluteJoint || o === G.PrismaticJoint) ? this.NO_TCP : this.DEFAULT_TCP;
|
|
2066
2066
|
}
|
|
2067
2067
|
// Set a new tcp or other options. If current mode is jogging, will reinitialize the jogging websocket
|
|
@@ -2115,7 +2115,7 @@ class ft {
|
|
|
2115
2115
|
// Initializes continuous jogging websocket, called by setJoggingMode("jogging")
|
|
2116
2116
|
async initializeJoggingWebsocket() {
|
|
2117
2117
|
return new Promise((t, o) => {
|
|
2118
|
-
const
|
|
2118
|
+
const r = setTimeout(() => {
|
|
2119
2119
|
o(
|
|
2120
2120
|
new Error(
|
|
2121
2121
|
`Jogging initialization timeout after ${this.timeout} seconds`
|
|
@@ -2124,18 +2124,18 @@ class ft {
|
|
|
2124
2124
|
}, this.timeout);
|
|
2125
2125
|
this.joggingSocket = this.nova.openReconnectingWebsocket(
|
|
2126
2126
|
`/controllers/${this.motionStream.controllerId}/execution/jogging`
|
|
2127
|
-
), this.joggingSocket.addEventListener("message", (
|
|
2127
|
+
), this.joggingSocket.addEventListener("message", (i) => {
|
|
2128
2128
|
var c, s, l, u;
|
|
2129
|
-
const n = W(
|
|
2129
|
+
const n = W(i.data);
|
|
2130
2130
|
if (((c = n == null ? void 0 : n.result) == null ? void 0 : c.kind) === "INITIALIZE_RECEIVED") {
|
|
2131
|
-
clearTimeout(
|
|
2131
|
+
clearTimeout(r), t();
|
|
2132
2132
|
return;
|
|
2133
2133
|
}
|
|
2134
2134
|
if (((s = n == null ? void 0 : n.result) == null ? void 0 : s.kind) === "MOTION_ERROR")
|
|
2135
|
-
if (clearTimeout(
|
|
2135
|
+
if (clearTimeout(r), this.onBlocked && ((l = n == null ? void 0 : n.result) != null && l.message.includes(At))) {
|
|
2136
2136
|
(u = this.joggingSocket) == null || u.dispose(), this.onBlocked();
|
|
2137
2137
|
return;
|
|
2138
|
-
} else this.onError ? this.onError(
|
|
2138
|
+
} else this.onError ? this.onError(i.data) : o(new Error(i.data));
|
|
2139
2139
|
}), this.joggingSocket.sendJson({
|
|
2140
2140
|
message_type: "InitializeJoggingRequest",
|
|
2141
2141
|
motion_group: this.motionGroupId,
|
|
@@ -2149,15 +2149,15 @@ class ft {
|
|
|
2149
2149
|
async rotateJoints({
|
|
2150
2150
|
joint: t,
|
|
2151
2151
|
direction: o,
|
|
2152
|
-
velocityValue:
|
|
2153
|
-
velocityUnit:
|
|
2152
|
+
velocityValue: r,
|
|
2153
|
+
velocityUnit: i
|
|
2154
2154
|
}) {
|
|
2155
2155
|
if (!this.joggingSocket || this.mode !== "jogging")
|
|
2156
2156
|
throw new Error(
|
|
2157
2157
|
"Joint jogging websocket not connected; create one by setting jogging mode to 'jogging'"
|
|
2158
2158
|
);
|
|
2159
2159
|
const n = new Array(this.numJoints).fill(0);
|
|
2160
|
-
n[t] = o === "-" ? -
|
|
2160
|
+
n[t] = o === "-" ? -r : r, this.joggingSocket.sendJson({
|
|
2161
2161
|
message_type: "JointVelocityRequest",
|
|
2162
2162
|
velocity: n
|
|
2163
2163
|
});
|
|
@@ -2168,17 +2168,17 @@ class ft {
|
|
|
2168
2168
|
async translateTCP({
|
|
2169
2169
|
axis: t,
|
|
2170
2170
|
direction: o,
|
|
2171
|
-
velocityMmPerSec:
|
|
2171
|
+
velocityMmPerSec: r
|
|
2172
2172
|
}) {
|
|
2173
2173
|
if (!this.joggingSocket || this.mode !== "jogging")
|
|
2174
2174
|
throw new Error(
|
|
2175
2175
|
"Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'"
|
|
2176
2176
|
);
|
|
2177
|
-
const
|
|
2178
|
-
n[tt[t]] = o === "-" ? -
|
|
2177
|
+
const i = [0, 0, 0], n = [0, 0, 0];
|
|
2178
|
+
n[tt[t]] = o === "-" ? -r : r, this.joggingSocket.sendJson({
|
|
2179
2179
|
message_type: "TcpVelocityRequest",
|
|
2180
2180
|
translation: n,
|
|
2181
|
-
rotation:
|
|
2181
|
+
rotation: i,
|
|
2182
2182
|
use_tool_coordinate_system: this.orientation === "tool"
|
|
2183
2183
|
});
|
|
2184
2184
|
}
|
|
@@ -2188,17 +2188,17 @@ class ft {
|
|
|
2188
2188
|
async rotateTCP({
|
|
2189
2189
|
axis: t,
|
|
2190
2190
|
direction: o,
|
|
2191
|
-
velocityRadsPerSec:
|
|
2191
|
+
velocityRadsPerSec: r
|
|
2192
2192
|
}) {
|
|
2193
2193
|
if (!this.joggingSocket || this.mode !== "jogging")
|
|
2194
2194
|
throw new Error(
|
|
2195
2195
|
"Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'"
|
|
2196
2196
|
);
|
|
2197
|
-
const
|
|
2198
|
-
|
|
2197
|
+
const i = [0, 0, 0], n = [0, 0, 0];
|
|
2198
|
+
i[tt[t]] = o === "-" ? -r : r, this.joggingSocket.sendJson({
|
|
2199
2199
|
message_type: "TcpVelocityRequest",
|
|
2200
2200
|
translation: n,
|
|
2201
|
-
rotation:
|
|
2201
|
+
rotation: i,
|
|
2202
2202
|
use_tool_coordinate_system: this.orientation === "tool"
|
|
2203
2203
|
});
|
|
2204
2204
|
}
|
|
@@ -2213,8 +2213,8 @@ class ft {
|
|
|
2213
2213
|
currentTcpPose: t,
|
|
2214
2214
|
currentJoints: o,
|
|
2215
2215
|
// coordSystemId,
|
|
2216
|
-
velocityInRelevantUnits:
|
|
2217
|
-
axis:
|
|
2216
|
+
velocityInRelevantUnits: r,
|
|
2217
|
+
axis: i,
|
|
2218
2218
|
direction: n,
|
|
2219
2219
|
motion: c
|
|
2220
2220
|
}) {
|
|
@@ -2229,9 +2229,9 @@ class ft {
|
|
|
2229
2229
|
"Current pose has no position, cannot perform translation"
|
|
2230
2230
|
);
|
|
2231
2231
|
const h = [...t.position];
|
|
2232
|
-
h[tt[
|
|
2232
|
+
h[tt[i]] += c.distanceMm * (n === "-" ? -1 : 1), s.push({
|
|
2233
2233
|
limits_override: {
|
|
2234
|
-
tcp_velocity_limit:
|
|
2234
|
+
tcp_velocity_limit: r
|
|
2235
2235
|
},
|
|
2236
2236
|
path: {
|
|
2237
2237
|
path_definition_name: "PathLine",
|
|
@@ -2251,13 +2251,13 @@ class ft {
|
|
|
2251
2251
|
t.orientation[1],
|
|
2252
2252
|
t.orientation[2]
|
|
2253
2253
|
), m = h.length(), v = h.clone().normalize(), b = c.distanceRads * (n === "-" ? -1 : 1), w = new ct(0, 0, 0);
|
|
2254
|
-
w[
|
|
2254
|
+
w[i] = 1;
|
|
2255
2255
|
const C = Math.cos(0.5 * b) * Math.cos(0.5 * m), M = Math.sin(0.5 * b) * Math.sin(0.5 * m), k = Math.sin(0.5 * b) * Math.cos(0.5 * m), R = Math.cos(0.5 * b) * Math.sin(0.5 * m), I = w.dot(
|
|
2256
2256
|
v
|
|
2257
2257
|
), E = w.clone().cross(v), z = 2 * Math.acos(C - M * I), Q = z / Math.sin(0.5 * z), ot = new ct().addScaledVector(E, M).addScaledVector(w, k).addScaledVector(v, R).multiplyScalar(Q);
|
|
2258
2258
|
s.push({
|
|
2259
2259
|
limits_override: {
|
|
2260
|
-
tcp_orientation_velocity_limit:
|
|
2260
|
+
tcp_orientation_velocity_limit: r
|
|
2261
2261
|
},
|
|
2262
2262
|
path: {
|
|
2263
2263
|
path_definition_name: "PathLine",
|
|
@@ -2315,10 +2315,10 @@ class ft {
|
|
|
2315
2315
|
});
|
|
2316
2316
|
}, p = async () => {
|
|
2317
2317
|
var h;
|
|
2318
|
-
await
|
|
2318
|
+
await at(() => !this.motionStream.rapidlyChangingMotionState.standstill), await at(() => this.motionStream.rapidlyChangingMotionState.standstill), (h = this.trajectorySocket) == null || h.dispose(), this.trajectorySocket = null;
|
|
2319
2319
|
}, x = async () => {
|
|
2320
2320
|
var h;
|
|
2321
|
-
await
|
|
2321
|
+
await at(() => this.motionStream.rapidlyChangingMotionState.standstill), (h = this.trajectorySocket) == null || h.dispose(), this.trajectorySocket = null;
|
|
2322
2322
|
}, y = async (h) => {
|
|
2323
2323
|
if (h != null && h.message)
|
|
2324
2324
|
if (this.onError) {
|
|
@@ -2337,7 +2337,7 @@ class ft {
|
|
|
2337
2337
|
throw new Error(
|
|
2338
2338
|
`Failed to execute trajectory: Received invalid message ${h.data}`
|
|
2339
2339
|
);
|
|
2340
|
-
if (this.onBlocked && ((b = m.result.message) != null && b.includes(
|
|
2340
|
+
if (this.onBlocked && ((b = m.result.message) != null && b.includes(At))) {
|
|
2341
2341
|
this.onBlocked();
|
|
2342
2342
|
return;
|
|
2343
2343
|
}
|
|
@@ -2367,10 +2367,10 @@ class ft {
|
|
|
2367
2367
|
}
|
|
2368
2368
|
}
|
|
2369
2369
|
const vo = (e) => {
|
|
2370
|
-
const t = e.softTimeout || 3e3, [o,
|
|
2371
|
-
return
|
|
2370
|
+
const t = e.softTimeout || 3e3, [o, r] = B(!1), i = L();
|
|
2371
|
+
return D(() => {
|
|
2372
2372
|
const n = setTimeout(() => {
|
|
2373
|
-
|
|
2373
|
+
r(!0);
|
|
2374
2374
|
}, t);
|
|
2375
2375
|
return () => clearTimeout(n);
|
|
2376
2376
|
}), /* @__PURE__ */ a(
|
|
@@ -2380,7 +2380,7 @@ const vo = (e) => {
|
|
|
2380
2380
|
height: "100%",
|
|
2381
2381
|
alignItems: "center",
|
|
2382
2382
|
justifyContent: "center",
|
|
2383
|
-
sx: { color:
|
|
2383
|
+
sx: { color: i.palette.text.primary },
|
|
2384
2384
|
children: e.error ? /* @__PURE__ */ a(
|
|
2385
2385
|
Co,
|
|
2386
2386
|
{
|
|
@@ -2396,7 +2396,7 @@ const vo = (e) => {
|
|
|
2396
2396
|
sx: {
|
|
2397
2397
|
visibility: o ? "visible" : "hidden",
|
|
2398
2398
|
marginTop: "1rem",
|
|
2399
|
-
color:
|
|
2399
|
+
color: i.palette.text.secondary
|
|
2400
2400
|
},
|
|
2401
2401
|
children: "This is taking longer than expected..."
|
|
2402
2402
|
}
|
|
@@ -2405,7 +2405,7 @@ const vo = (e) => {
|
|
|
2405
2405
|
}
|
|
2406
2406
|
);
|
|
2407
2407
|
}, Co = (e) => {
|
|
2408
|
-
const t = ke(e.error), o = e.error instanceof Error ? e.error.stack : null,
|
|
2408
|
+
const t = ke(e.error), o = e.error instanceof Error ? e.error.stack : null, r = L();
|
|
2409
2409
|
return /* @__PURE__ */ S(
|
|
2410
2410
|
_,
|
|
2411
2411
|
{
|
|
@@ -2414,7 +2414,7 @@ const vo = (e) => {
|
|
|
2414
2414
|
maxWidth: "min(100%, 800px)",
|
|
2415
2415
|
padding: 2,
|
|
2416
2416
|
overflow: "auto",
|
|
2417
|
-
color:
|
|
2417
|
+
color: r.palette.error.main,
|
|
2418
2418
|
"& pre": {
|
|
2419
2419
|
whiteSpace: "pre-wrap",
|
|
2420
2420
|
wordBreak: "break-word",
|
|
@@ -2431,7 +2431,7 @@ const vo = (e) => {
|
|
|
2431
2431
|
}, wo = J(({ store: e }) => {
|
|
2432
2432
|
const { t } = V();
|
|
2433
2433
|
return /* @__PURE__ */ a(
|
|
2434
|
-
|
|
2434
|
+
Bt,
|
|
2435
2435
|
{
|
|
2436
2436
|
"data-testid": "jogging-blocked",
|
|
2437
2437
|
"aria-label": "jogging-blocked",
|
|
@@ -2463,12 +2463,12 @@ const vo = (e) => {
|
|
|
2463
2463
|
);
|
|
2464
2464
|
}), qt = J(
|
|
2465
2465
|
({ store: e }) => {
|
|
2466
|
-
const { t } = V(), [o,
|
|
2466
|
+
const { t } = V(), [o, r] = B(
|
|
2467
2467
|
e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached
|
|
2468
|
-
),
|
|
2468
|
+
), i = A(o);
|
|
2469
2469
|
pt(() => {
|
|
2470
2470
|
const c = e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;
|
|
2471
|
-
|
|
2471
|
+
Fe(i.current, c) || (i.current = c, r(c));
|
|
2472
2472
|
});
|
|
2473
2473
|
const n = [];
|
|
2474
2474
|
for (const [c, s] of o.entries())
|
|
@@ -2527,21 +2527,21 @@ const dt = [
|
|
|
2527
2527
|
...dt
|
|
2528
2528
|
], Io = ["coordsys", "tool"];
|
|
2529
2529
|
class bt {
|
|
2530
|
-
constructor(t, o,
|
|
2530
|
+
constructor(t, o, r, i, n) {
|
|
2531
2531
|
var c, s, l;
|
|
2532
|
-
this.jogger = t, this.coordSystems = o, this.motionGroupDescription =
|
|
2532
|
+
this.jogger = t, this.coordSystems = o, this.motionGroupDescription = r, this.tcps = i, this.inverseSolverValue = n, this.selectedTabId = "cartesian", this.locks = /* @__PURE__ */ new Set(), this.blocked = !1, this.selectedCoordSystemId = "world", this.selectedTcpId = "", this.tcpChangeInProgress = !1, this.selectedOrientation = "coordsys", this.selectedIncrementId = "continuous", this.selectedCartesianMotionType = "translate", this.incrementJogInProgress = null, this.translationVelocityMmPerSec = 10, this.rotationVelocityDegPerSec = 1, this.minTranslationVelocityMmPerSec = 5, 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 = G.RevoluteJoint;
|
|
2533
2533
|
for (const u of o)
|
|
2534
2534
|
if (u.coordinate_system === "") {
|
|
2535
2535
|
u.coordinate_system = "world";
|
|
2536
2536
|
break;
|
|
2537
2537
|
}
|
|
2538
|
-
this.selectedCoordSystemId = ((c = o[0]) == null ? void 0 : c.coordinate_system) || "world", this.selectedTcpId = t.motionStream.rapidlyChangingMotionState.tcp ?? "", this.inverseSolver = n, this.jointType = ((l = (s =
|
|
2538
|
+
this.selectedCoordSystemId = ((c = o[0]) == null ? void 0 : c.coordinate_system) || "world", this.selectedTcpId = t.motionStream.rapidlyChangingMotionState.tcp ?? "", this.tcpChangeInProgress = this.tcps.length > 0 && !this.selectedTcpId, this.inverseSolver = n, this.jointType = ((l = (s = r == null ? void 0 : r.dh_parameters) == null ? void 0 : s[0]) == null ? void 0 : l.type) ?? G.RevoluteJoint, mt(this, {}, { autoBind: !0 }), this.jogger.onBlocked = () => {
|
|
2539
2539
|
this.block();
|
|
2540
2540
|
}, this.loadFromLocalStorage(), this.disposers.push(kt(() => this.saveToLocalStorage())), this.disposers.push(
|
|
2541
2541
|
kt(() => {
|
|
2542
2542
|
const u = this.jogger.motionStream.rapidlyChangingMotionState.tcp;
|
|
2543
|
-
|
|
2544
|
-
this.selectedTcpId = u;
|
|
2543
|
+
u && u !== this.selectedTcpId && F(() => {
|
|
2544
|
+
this.selectedTcpId = u, this.tcpChangeInProgress = !1;
|
|
2545
2545
|
});
|
|
2546
2546
|
})
|
|
2547
2547
|
), window.joggingStore = this;
|
|
@@ -2551,7 +2551,7 @@ class bt {
|
|
|
2551
2551
|
* from the backend
|
|
2552
2552
|
*/
|
|
2553
2553
|
static async loadFor(t) {
|
|
2554
|
-
const { nova: o } = t, [
|
|
2554
|
+
const { nova: o } = t, [r, i] = await Promise.all([
|
|
2555
2555
|
// Fetch coord systems so user can select between them
|
|
2556
2556
|
o.api.controller.listCoordinateSystems(
|
|
2557
2557
|
t.motionStream.controllerId,
|
|
@@ -2563,8 +2563,8 @@ class bt {
|
|
|
2563
2563
|
t.motionGroupId
|
|
2564
2564
|
)
|
|
2565
2565
|
]), n = await o.api.motionGroupModels.getMotionGroupKinematicModel(
|
|
2566
|
-
|
|
2567
|
-
), c = Object.entries(
|
|
2566
|
+
i.motion_group_model
|
|
2567
|
+
), c = Object.entries(i.tcps || {}).map(([s, l]) => ({
|
|
2568
2568
|
id: s,
|
|
2569
2569
|
readable_name: l.name,
|
|
2570
2570
|
position: l.pose.position,
|
|
@@ -2572,8 +2572,8 @@ class bt {
|
|
|
2572
2572
|
}));
|
|
2573
2573
|
return new bt(
|
|
2574
2574
|
t,
|
|
2575
|
-
|
|
2576
|
-
|
|
2575
|
+
r || [],
|
|
2576
|
+
i,
|
|
2577
2577
|
c,
|
|
2578
2578
|
n.inverse_solver
|
|
2579
2579
|
);
|
|
@@ -2662,13 +2662,6 @@ class bt {
|
|
|
2662
2662
|
get tcpsById() {
|
|
2663
2663
|
return nt(this.tcps, (t) => t.id);
|
|
2664
2664
|
}
|
|
2665
|
-
/**
|
|
2666
|
-
* True when the server has not yet reported an active TCP.
|
|
2667
|
-
* The UI should show a loading/indeterminate state in this case.
|
|
2668
|
-
*/
|
|
2669
|
-
get isTcpUnresolved() {
|
|
2670
|
-
return this.tcps.length > 0 && !this.selectedTcpId;
|
|
2671
|
-
}
|
|
2672
2665
|
get activeDiscreteIncrement() {
|
|
2673
2666
|
return this.selectedOrientation === "tool" ? void 0 : dt.find((t) => t.id === this.selectedIncrementId);
|
|
2674
2667
|
}
|
|
@@ -2689,8 +2682,8 @@ class bt {
|
|
|
2689
2682
|
return t ? this.maxRotationVelocityDegPerSec : this.maxTranslationVelocityMmPerSec;
|
|
2690
2683
|
}
|
|
2691
2684
|
onTabChange(t, o) {
|
|
2692
|
-
const
|
|
2693
|
-
this.selectedTabId =
|
|
2685
|
+
const r = this.tabs[o] || this.tabs[0];
|
|
2686
|
+
this.selectedTabId = r.id;
|
|
2694
2687
|
}
|
|
2695
2688
|
setSelectedCoordSystemId(t) {
|
|
2696
2689
|
this.selectedCoordSystemId = t;
|
|
@@ -2706,28 +2699,33 @@ class bt {
|
|
|
2706
2699
|
async requestTcpChange(t) {
|
|
2707
2700
|
if (t === this.selectedTcpId) return;
|
|
2708
2701
|
this.tcpChangeInProgress = !0;
|
|
2709
|
-
const o = this.jogger.mode !== "jogging";
|
|
2702
|
+
const o = this.jogger.tcp, r = this.jogger.mode !== "jogging";
|
|
2710
2703
|
try {
|
|
2711
|
-
this.jogger.tcp = t,
|
|
2704
|
+
this.jogger.tcp = t, r ? (await this.jogger.setJoggingMode("jogging"), await this.jogger.setJoggingMode("off")) : await this.jogger.setJoggingMode("jogging", !1);
|
|
2712
2705
|
const i = await this.waitForTcpConfirmation(t, 1e4);
|
|
2713
|
-
|
|
2714
|
-
i ? this.selectedTcpId = t : this.selectedTcpId = this.jogger.motionStream.rapidlyChangingMotionState.tcp ?? "";
|
|
2706
|
+
F(() => {
|
|
2707
|
+
i ? this.selectedTcpId = t : (this.jogger.tcp = o, this.selectedTcpId = this.jogger.motionStream.rapidlyChangingMotionState.tcp ?? "");
|
|
2715
2708
|
});
|
|
2716
2709
|
} catch (i) {
|
|
2717
|
-
throw
|
|
2718
|
-
this.selectedTcpId = this.jogger.motionStream.rapidlyChangingMotionState.tcp ?? "";
|
|
2710
|
+
throw F(() => {
|
|
2711
|
+
this.jogger.tcp = o, this.selectedTcpId = this.jogger.motionStream.rapidlyChangingMotionState.tcp ?? "";
|
|
2719
2712
|
}), i;
|
|
2720
2713
|
} finally {
|
|
2721
|
-
|
|
2714
|
+
F(() => {
|
|
2722
2715
|
this.tcpChangeInProgress = !1;
|
|
2723
2716
|
});
|
|
2724
2717
|
}
|
|
2725
2718
|
}
|
|
2726
2719
|
waitForTcpConfirmation(t, o) {
|
|
2727
|
-
return new Promise((
|
|
2728
|
-
const
|
|
2729
|
-
|
|
2730
|
-
},
|
|
2720
|
+
return new Promise((r) => {
|
|
2721
|
+
const i = setTimeout(() => {
|
|
2722
|
+
n(), r(!1);
|
|
2723
|
+
}, o), n = at(
|
|
2724
|
+
() => this.jogger.motionStream.rapidlyChangingMotionState.tcp === t,
|
|
2725
|
+
() => {
|
|
2726
|
+
clearTimeout(i), r(!0);
|
|
2727
|
+
}
|
|
2728
|
+
);
|
|
2731
2729
|
});
|
|
2732
2730
|
}
|
|
2733
2731
|
setSelectedOrientation(t) {
|
|
@@ -2771,7 +2769,7 @@ class bt {
|
|
|
2771
2769
|
const ko = J(
|
|
2772
2770
|
({ store: e, useDegree: t }) => {
|
|
2773
2771
|
var c;
|
|
2774
|
-
const { t: o } = V(),
|
|
2772
|
+
const { t: o } = V(), r = ne(), i = [];
|
|
2775
2773
|
function n(s) {
|
|
2776
2774
|
switch (s) {
|
|
2777
2775
|
case "coordsys":
|
|
@@ -2782,11 +2780,11 @@ const ko = J(
|
|
|
2782
2780
|
return s;
|
|
2783
2781
|
}
|
|
2784
2782
|
}
|
|
2785
|
-
|
|
2783
|
+
return e.showCoordSystemSelect && i.push(
|
|
2786
2784
|
/* @__PURE__ */ a(
|
|
2787
2785
|
it,
|
|
2788
2786
|
{
|
|
2789
|
-
labelId: `jogging-coord-select-${
|
|
2787
|
+
labelId: `jogging-coord-select-${r}`,
|
|
2790
2788
|
labelValue: o("Jogging.CoordinateSystem.hlb"),
|
|
2791
2789
|
value: e.selectedCoordSystemId,
|
|
2792
2790
|
size: "small",
|
|
@@ -2798,33 +2796,33 @@ const ko = J(
|
|
|
2798
2796
|
},
|
|
2799
2797
|
"coord"
|
|
2800
2798
|
)
|
|
2801
|
-
), e.showTcpSelect
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
endAdornment: s ? /* @__PURE__ */ a(Fe, { position: "end", children: /* @__PURE__ */ a(Wt, { size: 16 }) }) : void 0,
|
|
2816
|
-
children: e.tcps.map((l) => /* @__PURE__ */ a(q, { value: l.id, children: l.id }, l.id))
|
|
2799
|
+
), e.showTcpSelect && i.push(
|
|
2800
|
+
/* @__PURE__ */ a(
|
|
2801
|
+
it,
|
|
2802
|
+
{
|
|
2803
|
+
labelId: `jogging-tcp-select-${r}`,
|
|
2804
|
+
labelValue: "TCP",
|
|
2805
|
+
value: e.selectedTcpId,
|
|
2806
|
+
size: "small",
|
|
2807
|
+
variant: "filled",
|
|
2808
|
+
displayEmpty: e.tcpChangeInProgress,
|
|
2809
|
+
onChange: (s) => {
|
|
2810
|
+
e.requestTcpChange(s.target.value).catch((l) => {
|
|
2811
|
+
console.error("Failed to change TCP:", l);
|
|
2812
|
+
});
|
|
2817
2813
|
},
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2814
|
+
disabled: e.isLocked || e.tcpChangeInProgress,
|
|
2815
|
+
endAdornment: e.tcpChangeInProgress ? /* @__PURE__ */ a(Be, { position: "end", children: /* @__PURE__ */ a(Wt, { size: 16 }) }) : void 0,
|
|
2816
|
+
children: e.tcps.map((s) => /* @__PURE__ */ a(q, { value: s.id, children: s.id }, s.id))
|
|
2817
|
+
},
|
|
2818
|
+
"tcp"
|
|
2819
|
+
)
|
|
2820
|
+
), e.showOrientationSelect && i.push(
|
|
2823
2821
|
/* @__PURE__ */ a(
|
|
2824
2822
|
it,
|
|
2825
2823
|
{
|
|
2826
2824
|
labelValue: o("Jogging.Cartesian.Orientation.lb"),
|
|
2827
|
-
labelId: `orientation-select-${
|
|
2825
|
+
labelId: `orientation-select-${r}`,
|
|
2828
2826
|
value: e.selectedOrientation,
|
|
2829
2827
|
onChange: (s) => e.setSelectedOrientation(s.target.value),
|
|
2830
2828
|
disabled: e.isLocked,
|
|
@@ -2832,12 +2830,12 @@ const ko = J(
|
|
|
2832
2830
|
},
|
|
2833
2831
|
"orientation"
|
|
2834
2832
|
)
|
|
2835
|
-
), e.showIncrementSelect &&
|
|
2833
|
+
), e.showIncrementSelect && i.push(
|
|
2836
2834
|
/* @__PURE__ */ S(
|
|
2837
2835
|
it,
|
|
2838
2836
|
{
|
|
2839
2837
|
labelValue: o("Jogging.Increment.hlb"),
|
|
2840
|
-
labelId: `jogging-increment-select-${
|
|
2838
|
+
labelId: `jogging-increment-select-${r}`,
|
|
2841
2839
|
size: "small",
|
|
2842
2840
|
variant: "filled",
|
|
2843
2841
|
value: ((c = e.activeDiscreteIncrement) == null ? void 0 : c.id) || "continuous",
|
|
@@ -2865,11 +2863,11 @@ const ko = J(
|
|
|
2865
2863
|
gridAutoRows: "min-content",
|
|
2866
2864
|
"& label": { opacity: 0.7, fontSize: "12px", marginBottom: "4px" }
|
|
2867
2865
|
},
|
|
2868
|
-
children:
|
|
2866
|
+
children: i.map((s, l) => /* @__PURE__ */ a(
|
|
2869
2867
|
T,
|
|
2870
2868
|
{
|
|
2871
2869
|
sx: {
|
|
2872
|
-
gridColumn:
|
|
2870
|
+
gridColumn: i.length % 2 === 1 && l === i.length - 1 ? "span 2" : "auto"
|
|
2873
2871
|
},
|
|
2874
2872
|
children: s
|
|
2875
2873
|
},
|
|
@@ -2902,8 +2900,8 @@ const ko = J(
|
|
|
2902
2900
|
};
|
|
2903
2901
|
}), jo = J((e) => {
|
|
2904
2902
|
var n, c, s;
|
|
2905
|
-
const t = L(), { store: o } = e, { t:
|
|
2906
|
-
function
|
|
2903
|
+
const t = L(), { store: o } = e, { t: r } = V();
|
|
2904
|
+
function i(l, u) {
|
|
2907
2905
|
u === e.velocity || !We(u) || e.onVelocityChange(u, e.useDegree);
|
|
2908
2906
|
}
|
|
2909
2907
|
return /* @__PURE__ */ S(
|
|
@@ -2922,7 +2920,7 @@ const ko = J(
|
|
|
2922
2920
|
color: (s = (c = (n = t.componentsExt) == null ? void 0 : n.JoggingPanel) == null ? void 0 : c.VelocitySlider) == null ? void 0 : s.sliderLegendColor,
|
|
2923
2921
|
fontSize: "14px"
|
|
2924
2922
|
},
|
|
2925
|
-
children:
|
|
2923
|
+
children: r("Jogging.Velocity.bt")
|
|
2926
2924
|
}
|
|
2927
2925
|
),
|
|
2928
2926
|
/* @__PURE__ */ a(
|
|
@@ -2930,7 +2928,7 @@ const ko = J(
|
|
|
2930
2928
|
{
|
|
2931
2929
|
value: e.velocity,
|
|
2932
2930
|
color: "secondary",
|
|
2933
|
-
onChange:
|
|
2931
|
+
onChange: i,
|
|
2934
2932
|
min: e.min,
|
|
2935
2933
|
max: e.max,
|
|
2936
2934
|
"aria-labelledby": "input-slider",
|
|
@@ -2950,7 +2948,7 @@ const ko = J(
|
|
|
2950
2948
|
);
|
|
2951
2949
|
});
|
|
2952
2950
|
function Yt({ value: e, sx: t }) {
|
|
2953
|
-
var
|
|
2951
|
+
var r;
|
|
2954
2952
|
const o = L();
|
|
2955
2953
|
return /* @__PURE__ */ a(
|
|
2956
2954
|
_,
|
|
@@ -2961,7 +2959,7 @@ function Yt({ value: e, sx: t }) {
|
|
|
2961
2959
|
gap: "5px",
|
|
2962
2960
|
sx: {
|
|
2963
2961
|
padding: "6px 12px",
|
|
2964
|
-
background: (
|
|
2962
|
+
background: (r = o.palette.backgroundPaperElevation) == null ? void 0 : r[8],
|
|
2965
2963
|
borderRadius: "10px",
|
|
2966
2964
|
minWidth: "111px",
|
|
2967
2965
|
...t
|
|
@@ -2986,8 +2984,8 @@ function Yt({ value: e, sx: t }) {
|
|
|
2986
2984
|
const Zt = J(
|
|
2987
2985
|
({ store: e, useDegree: t }) => {
|
|
2988
2986
|
const { t: o } = V();
|
|
2989
|
-
function i
|
|
2990
|
-
return n ? `ω = ${o("Jogging.Cartesian.Rotation.velocityDegPerSec.lb", { amount:
|
|
2987
|
+
function r(i, n) {
|
|
2988
|
+
return n ? `ω = ${o("Jogging.Cartesian.Rotation.velocityDegPerSec.lb", { amount: i })}` : `v = ${o("Jogging.Cartesian.Translation.velocityMmPerSec.lb", { amount: i })}`;
|
|
2991
2989
|
}
|
|
2992
2990
|
return /* @__PURE__ */ a(
|
|
2993
2991
|
jo,
|
|
@@ -2999,10 +2997,10 @@ const Zt = J(
|
|
|
2999
2997
|
onVelocityChange: e.setVelocityFromSlider,
|
|
3000
2998
|
useDegree: t,
|
|
3001
2999
|
disabled: e.isLocked,
|
|
3002
|
-
renderValue: (
|
|
3000
|
+
renderValue: (i) => /* @__PURE__ */ a(
|
|
3003
3001
|
Yt,
|
|
3004
3002
|
{
|
|
3005
|
-
value: i
|
|
3003
|
+
value: r(i, t),
|
|
3006
3004
|
sx: {
|
|
3007
3005
|
minWidth: "111px",
|
|
3008
3006
|
span: {
|
|
@@ -3019,8 +3017,8 @@ const Zt = J(
|
|
|
3019
3017
|
store: e,
|
|
3020
3018
|
children: t
|
|
3021
3019
|
}) => {
|
|
3022
|
-
const { t: o } = V(),
|
|
3023
|
-
function
|
|
3020
|
+
const { t: o } = V(), r = L();
|
|
3021
|
+
function i(d, p) {
|
|
3024
3022
|
(p === "translate" || p === "rotate") && e.setSelectedCartesianMotionType(p);
|
|
3025
3023
|
}
|
|
3026
3024
|
async function n(d, p) {
|
|
@@ -3078,17 +3076,17 @@ const Zt = J(
|
|
|
3078
3076
|
{
|
|
3079
3077
|
id: "x",
|
|
3080
3078
|
icon: /* @__PURE__ */ a(_e, {}),
|
|
3081
|
-
colors: l("X", e.selectedCartesianMotionType,
|
|
3079
|
+
colors: l("X", e.selectedCartesianMotionType, r)
|
|
3082
3080
|
},
|
|
3083
3081
|
{
|
|
3084
3082
|
id: "y",
|
|
3085
3083
|
icon: /* @__PURE__ */ a(Oe, {}),
|
|
3086
|
-
colors: l("Y", e.selectedCartesianMotionType,
|
|
3084
|
+
colors: l("Y", e.selectedCartesianMotionType, r)
|
|
3087
3085
|
},
|
|
3088
3086
|
{
|
|
3089
3087
|
id: "z",
|
|
3090
|
-
icon: /* @__PURE__ */ a(
|
|
3091
|
-
colors: l("Z", e.selectedCartesianMotionType,
|
|
3088
|
+
icon: /* @__PURE__ */ a(Ae, {}),
|
|
3089
|
+
colors: l("Z", e.selectedCartesianMotionType, r)
|
|
3092
3090
|
}
|
|
3093
3091
|
];
|
|
3094
3092
|
function f(d) {
|
|
@@ -3145,7 +3143,7 @@ const Zt = J(
|
|
|
3145
3143
|
Ro,
|
|
3146
3144
|
{
|
|
3147
3145
|
value: e.selectedCartesianMotionType,
|
|
3148
|
-
onChange:
|
|
3146
|
+
onChange: i,
|
|
3149
3147
|
exclusive: !0,
|
|
3150
3148
|
"aria-label": o("Jogging.Cartesian.MotionType.lb"),
|
|
3151
3149
|
sx: { justifyContent: "center" },
|
|
@@ -3172,7 +3170,7 @@ const Zt = J(
|
|
|
3172
3170
|
{
|
|
3173
3171
|
sx: {
|
|
3174
3172
|
fontSize: "24px",
|
|
3175
|
-
color: ((x = d.colors) == null ? void 0 : x.labelColor) ??
|
|
3173
|
+
color: ((x = d.colors) == null ? void 0 : x.labelColor) ?? r.palette.text.primary
|
|
3176
3174
|
},
|
|
3177
3175
|
children: d.id.toUpperCase()
|
|
3178
3176
|
}
|
|
@@ -3205,13 +3203,13 @@ const Zt = J(
|
|
|
3205
3203
|
disabled: e.isLocked,
|
|
3206
3204
|
activeJoggingDirection: ((p = e.incrementJogInProgress) == null ? void 0 : p.axis) === d.id ? e.incrementJogInProgress.direction : void 0,
|
|
3207
3205
|
label: /* @__PURE__ */ S(et, { children: [
|
|
3208
|
-
/* @__PURE__ */ a(
|
|
3206
|
+
/* @__PURE__ */ a(De, {}),
|
|
3209
3207
|
/* @__PURE__ */ a(
|
|
3210
3208
|
j,
|
|
3211
3209
|
{
|
|
3212
3210
|
sx: {
|
|
3213
3211
|
fontSize: "24px",
|
|
3214
|
-
color: ((x = d.colors) == null ? void 0 : x.labelColor) ??
|
|
3212
|
+
color: ((x = d.colors) == null ? void 0 : x.labelColor) ?? r.palette.text.primary
|
|
3215
3213
|
},
|
|
3216
3214
|
children: d.id.toUpperCase()
|
|
3217
3215
|
}
|
|
@@ -3248,7 +3246,7 @@ const Zt = J(
|
|
|
3248
3246
|
), Po = J(
|
|
3249
3247
|
({ store: e, children: t }) => {
|
|
3250
3248
|
const o = L();
|
|
3251
|
-
async function
|
|
3249
|
+
async function r(n) {
|
|
3252
3250
|
await e.activate(), await e.jogger.rotateJoints({
|
|
3253
3251
|
joint: n.joint,
|
|
3254
3252
|
direction: n.direction,
|
|
@@ -3256,7 +3254,7 @@ const Zt = J(
|
|
|
3256
3254
|
velocityValue: e.jointType === G.PrismaticJoint ? e.translationVelocityMmPerSec : e.rotationVelocityRadsPerSec
|
|
3257
3255
|
});
|
|
3258
3256
|
}
|
|
3259
|
-
async function
|
|
3257
|
+
async function i() {
|
|
3260
3258
|
await e.jogger.stop(), await e.deactivate();
|
|
3261
3259
|
}
|
|
3262
3260
|
return /* @__PURE__ */ S(
|
|
@@ -3321,11 +3319,11 @@ const Zt = J(
|
|
|
3321
3319
|
const f = e.jogger.motionStream.rapidlyChangingMotionState.joint_position[n.index];
|
|
3322
3320
|
return f !== void 0 ? f : void 0;
|
|
3323
3321
|
},
|
|
3324
|
-
startJogging: (f) =>
|
|
3322
|
+
startJogging: (f) => r({
|
|
3325
3323
|
joint: n.index,
|
|
3326
3324
|
direction: f
|
|
3327
3325
|
}),
|
|
3328
|
-
stopJogging:
|
|
3326
|
+
stopJogging: i
|
|
3329
3327
|
}
|
|
3330
3328
|
)
|
|
3331
3329
|
]
|
|
@@ -3350,29 +3348,29 @@ const Zt = J(
|
|
|
3350
3348
|
joggingStore: null,
|
|
3351
3349
|
loadingError: null
|
|
3352
3350
|
}));
|
|
3353
|
-
async function
|
|
3354
|
-
|
|
3351
|
+
async function r() {
|
|
3352
|
+
F(() => {
|
|
3355
3353
|
o.loadingError = null, o.joggingStore = null;
|
|
3356
3354
|
});
|
|
3357
3355
|
try {
|
|
3358
|
-
let
|
|
3359
|
-
if (!
|
|
3356
|
+
let i = e.store;
|
|
3357
|
+
if (!i) {
|
|
3360
3358
|
const n = await ft.open(t, e.motionGroupId);
|
|
3361
|
-
|
|
3359
|
+
i = await bt.loadFor(n);
|
|
3362
3360
|
}
|
|
3363
|
-
|
|
3364
|
-
o.joggingStore =
|
|
3365
|
-
}), e.onSetup && e.onSetup(
|
|
3366
|
-
} catch (
|
|
3367
|
-
o.loadingError =
|
|
3361
|
+
F(() => {
|
|
3362
|
+
o.joggingStore = i;
|
|
3363
|
+
}), e.onSetup && e.onSetup(i);
|
|
3364
|
+
} catch (i) {
|
|
3365
|
+
o.loadingError = i;
|
|
3368
3366
|
}
|
|
3369
3367
|
}
|
|
3370
|
-
return
|
|
3371
|
-
var
|
|
3372
|
-
(
|
|
3373
|
-
}), [e.store, e.nova, e.motionGroupId]),
|
|
3374
|
-
const
|
|
3375
|
-
|
|
3368
|
+
return D(() => (r(), e.store ? () => null : () => {
|
|
3369
|
+
var i;
|
|
3370
|
+
(i = o.joggingStore) == null || i.dispose();
|
|
3371
|
+
}), [e.store, e.nova, e.motionGroupId]), D(() => {
|
|
3372
|
+
const i = o.joggingStore;
|
|
3373
|
+
i && (e.locked ? i.lock("external") : i.unlock("external"));
|
|
3376
3374
|
}, [o.joggingStore, e.locked]), /* @__PURE__ */ a(
|
|
3377
3375
|
_,
|
|
3378
3376
|
{
|
|
@@ -3394,7 +3392,7 @@ const Zt = J(
|
|
|
3394
3392
|
children: t
|
|
3395
3393
|
}) => {
|
|
3396
3394
|
const { t: o } = V();
|
|
3397
|
-
function
|
|
3395
|
+
function r() {
|
|
3398
3396
|
if (e.currentTab.id === "cartesian")
|
|
3399
3397
|
return /* @__PURE__ */ a(Eo, { store: e, children: t });
|
|
3400
3398
|
if (e.currentTab.id === "joint")
|
|
@@ -3409,21 +3407,21 @@ const Zt = J(
|
|
|
3409
3407
|
value: e.tabIndex,
|
|
3410
3408
|
onChange: e.onTabChange,
|
|
3411
3409
|
variant: "fullWidth",
|
|
3412
|
-
children: e.tabs.map((
|
|
3413
|
-
const n =
|
|
3410
|
+
children: e.tabs.map((i) => {
|
|
3411
|
+
const n = i.label === "Cartesian" ? o("Jogging.Cartesian.bt") : o("Jogging.Joints.bt"), c = i.label === "cartesian" ? /* @__PURE__ */ a(fe, { fontSize: "small", sx: { mr: 1 } }) : /* @__PURE__ */ a(be, { fontSize: "small", sx: { mr: 1 } });
|
|
3414
3412
|
return /* @__PURE__ */ a(
|
|
3415
3413
|
zt,
|
|
3416
3414
|
{
|
|
3417
|
-
"data-testid": `jogging-tab-${
|
|
3418
|
-
"aria-label": `jogging-tab-${
|
|
3415
|
+
"data-testid": `jogging-tab-${i.id}`,
|
|
3416
|
+
"aria-label": `jogging-tab-${i.id}`,
|
|
3419
3417
|
label: e.showTabIcons ? /* @__PURE__ */ S(_, { direction: "row", alignItems: "center", children: [
|
|
3420
3418
|
c,
|
|
3421
3419
|
n
|
|
3422
3420
|
] }) : n,
|
|
3423
|
-
id: `jogging-tab-${
|
|
3424
|
-
"aria-controls": `jogging-tab-${
|
|
3421
|
+
id: `jogging-tab-${i.id}`,
|
|
3422
|
+
"aria-controls": `jogging-tab-${i.id}`
|
|
3425
3423
|
},
|
|
3426
|
-
|
|
3424
|
+
i.id
|
|
3427
3425
|
);
|
|
3428
3426
|
})
|
|
3429
3427
|
}
|
|
@@ -3434,7 +3432,7 @@ const Zt = J(
|
|
|
3434
3432
|
flexGrow: 1,
|
|
3435
3433
|
position: "relative",
|
|
3436
3434
|
sx: { overflowY: "auto", overflowX: "hidden" },
|
|
3437
|
-
children:
|
|
3435
|
+
children: r()
|
|
3438
3436
|
}
|
|
3439
3437
|
),
|
|
3440
3438
|
e.blocked && /* @__PURE__ */ a(wo, { store: e })
|
|
@@ -3442,7 +3440,7 @@ const Zt = J(
|
|
|
3442
3440
|
}
|
|
3443
3441
|
), Qt = (e) => {
|
|
3444
3442
|
var s;
|
|
3445
|
-
const { value: t, ref: o } = e,
|
|
3443
|
+
const { value: t, ref: o } = e, r = L(), [i, n] = B(!1);
|
|
3446
3444
|
async function c() {
|
|
3447
3445
|
if (!o || !("current" in o))
|
|
3448
3446
|
return console.warn("No copy target found"), !1;
|
|
@@ -3458,14 +3456,14 @@ const Zt = J(
|
|
|
3458
3456
|
}
|
|
3459
3457
|
return !1;
|
|
3460
3458
|
}
|
|
3461
|
-
return
|
|
3462
|
-
if (!
|
|
3459
|
+
return D(() => {
|
|
3460
|
+
if (!i)
|
|
3463
3461
|
return;
|
|
3464
3462
|
const l = setTimeout(() => n(!1), 3e3);
|
|
3465
3463
|
return () => {
|
|
3466
3464
|
l && clearTimeout(l);
|
|
3467
3465
|
};
|
|
3468
|
-
}, [
|
|
3466
|
+
}, [i]), /* @__PURE__ */ a(qe, { open: i, title: "Copied!", children: /* @__PURE__ */ a(
|
|
3469
3467
|
_,
|
|
3470
3468
|
{
|
|
3471
3469
|
justifyContent: "center",
|
|
@@ -3473,7 +3471,7 @@ const Zt = J(
|
|
|
3473
3471
|
height: "100%",
|
|
3474
3472
|
boxSizing: "border-box",
|
|
3475
3473
|
padding: "6px 12px",
|
|
3476
|
-
background: (s =
|
|
3474
|
+
background: (s = r.palette.backgroundPaperElevation) == null ? void 0 : s[8],
|
|
3477
3475
|
borderRadius: "10px",
|
|
3478
3476
|
minWidth: "0",
|
|
3479
3477
|
cursor: "pointer"
|
|
@@ -3487,7 +3485,7 @@ const Zt = J(
|
|
|
3487
3485
|
sx: {
|
|
3488
3486
|
pointerEvents: "none",
|
|
3489
3487
|
fontSize: "12px",
|
|
3490
|
-
color:
|
|
3488
|
+
color: r.palette.text.primary,
|
|
3491
3489
|
whiteSpace: "nowrap",
|
|
3492
3490
|
minWidth: 0,
|
|
3493
3491
|
textOverflow: "ellipsis",
|
|
@@ -3501,7 +3499,7 @@ const Zt = J(
|
|
|
3501
3499
|
) });
|
|
3502
3500
|
}, pi = $(
|
|
3503
3501
|
J(({ tcpPose: e, showCopyButton: t = !1 }) => {
|
|
3504
|
-
const [o,
|
|
3502
|
+
const [o, r] = B(null), i = ye(e);
|
|
3505
3503
|
return /* @__PURE__ */ S(
|
|
3506
3504
|
_,
|
|
3507
3505
|
{
|
|
@@ -3511,7 +3509,7 @@ const Zt = J(
|
|
|
3511
3509
|
sx: { flexGrow: 1, minWidth: 0, overflow: "hidden" },
|
|
3512
3510
|
"data-testid": "pose-cartesian-values",
|
|
3513
3511
|
children: [
|
|
3514
|
-
/* @__PURE__ */ a(Qt, { value:
|
|
3512
|
+
/* @__PURE__ */ a(Qt, { value: i }),
|
|
3515
3513
|
t && /* @__PURE__ */ a(
|
|
3516
3514
|
Z,
|
|
3517
3515
|
{
|
|
@@ -3520,9 +3518,9 @@ const Zt = J(
|
|
|
3520
3518
|
size: "small",
|
|
3521
3519
|
onClick: async () => {
|
|
3522
3520
|
try {
|
|
3523
|
-
await navigator.clipboard.writeText(
|
|
3521
|
+
await navigator.clipboard.writeText(i), r("Copied!"), setTimeout(() => r(null), 2e3);
|
|
3524
3522
|
} catch {
|
|
3525
|
-
|
|
3523
|
+
r("Copy failed"), setTimeout(() => r(null), 2e3);
|
|
3526
3524
|
}
|
|
3527
3525
|
},
|
|
3528
3526
|
sx: { flexShrink: 0 },
|
|
@@ -3535,7 +3533,7 @@ const Zt = J(
|
|
|
3535
3533
|
})
|
|
3536
3534
|
), mi = $(
|
|
3537
3535
|
J(({ joints: e, showCopyButton: t = !1 }) => {
|
|
3538
|
-
const [o,
|
|
3536
|
+
const [o, r] = B(null), i = `[${e.map((c) => parseFloat(c.toFixed(4))).join(", ")}]`;
|
|
3539
3537
|
return /* @__PURE__ */ S(
|
|
3540
3538
|
_,
|
|
3541
3539
|
{
|
|
@@ -3545,7 +3543,7 @@ const Zt = J(
|
|
|
3545
3543
|
sx: { flexGrow: 1, minWidth: 0, overflow: "hidden" },
|
|
3546
3544
|
"data-testid": "pose-joint-values",
|
|
3547
3545
|
children: [
|
|
3548
|
-
/* @__PURE__ */ a(Qt, { value:
|
|
3546
|
+
/* @__PURE__ */ a(Qt, { value: i }),
|
|
3549
3547
|
t && /* @__PURE__ */ a(
|
|
3550
3548
|
Z,
|
|
3551
3549
|
{
|
|
@@ -3554,9 +3552,9 @@ const Zt = J(
|
|
|
3554
3552
|
size: "small",
|
|
3555
3553
|
onClick: async () => {
|
|
3556
3554
|
try {
|
|
3557
|
-
await navigator.clipboard.writeText(
|
|
3555
|
+
await navigator.clipboard.writeText(i), r("Copied!"), setTimeout(() => r(null), 2e3);
|
|
3558
3556
|
} catch {
|
|
3559
|
-
|
|
3557
|
+
r("Copy failed"), setTimeout(() => r(null), 2e3);
|
|
3560
3558
|
}
|
|
3561
3559
|
},
|
|
3562
3560
|
sx: { flexShrink: 0 },
|
|
@@ -3571,13 +3569,13 @@ const Zt = J(
|
|
|
3571
3569
|
class Oo {
|
|
3572
3570
|
constructor() {
|
|
3573
3571
|
this.messages = [], this.addMessage = (t, o = "info") => {
|
|
3574
|
-
const
|
|
3572
|
+
const r = {
|
|
3575
3573
|
id: Math.random().toString(36).substring(2, 11),
|
|
3576
3574
|
timestamp: /* @__PURE__ */ new Date(),
|
|
3577
3575
|
message: t,
|
|
3578
3576
|
level: o
|
|
3579
3577
|
};
|
|
3580
|
-
this.messages.push(
|
|
3578
|
+
this.messages.push(r);
|
|
3581
3579
|
}, this.clearMessages = () => {
|
|
3582
3580
|
this.messages = [];
|
|
3583
3581
|
}, this.addInfo = (t) => {
|
|
@@ -3595,16 +3593,16 @@ class Oo {
|
|
|
3595
3593
|
});
|
|
3596
3594
|
}
|
|
3597
3595
|
}
|
|
3598
|
-
const
|
|
3596
|
+
const st = (e, t, o) => ({
|
|
3599
3597
|
id: o || `${Date.now()}-${Math.random().toString(36).substring(2, 11)}`,
|
|
3600
3598
|
timestamp: /* @__PURE__ */ new Date(),
|
|
3601
3599
|
message: e,
|
|
3602
3600
|
level: t
|
|
3603
|
-
}), hi = (e, t) =>
|
|
3601
|
+
}), hi = (e, t) => st(e, "debug", t), fi = (e, t) => st(e, "info", t), bi = (e, t) => st(e, "warning", t), xi = (e, t) => st(e, "error", t), Ao = $(
|
|
3604
3602
|
J((e) => {
|
|
3605
3603
|
var f;
|
|
3606
|
-
const { messages: t = [], onClear: o, height:
|
|
3607
|
-
|
|
3604
|
+
const { messages: t = [], onClear: o, height: r = 400, sx: i } = e, n = L(), c = A(null);
|
|
3605
|
+
D(() => {
|
|
3608
3606
|
if (t.length === 0) return;
|
|
3609
3607
|
const g = c.current;
|
|
3610
3608
|
if (!g) return;
|
|
@@ -3632,7 +3630,7 @@ const at = (e, t, o) => ({
|
|
|
3632
3630
|
return n.palette.text.secondary;
|
|
3633
3631
|
}
|
|
3634
3632
|
}, u = ({ message: g }) => {
|
|
3635
|
-
const [d, p] =
|
|
3633
|
+
const [d, p] = B(!1), [x, y] = B(!1), [h, m] = B(!1), v = g.message.length > 150, b = async () => {
|
|
3636
3634
|
try {
|
|
3637
3635
|
await navigator.clipboard.writeText(g.message), y(!0), setTimeout(() => y(!1), 2e3);
|
|
3638
3636
|
} catch (C) {
|
|
@@ -3755,11 +3753,11 @@ const at = (e, t, o) => ({
|
|
|
3755
3753
|
backgroundColor: ((f = n.palette.backgroundPaperElevation) == null ? void 0 : f[2]) || "#171927",
|
|
3756
3754
|
backgroundImage: "none",
|
|
3757
3755
|
// Override any gradient from elevation
|
|
3758
|
-
height:
|
|
3756
|
+
height: r,
|
|
3759
3757
|
display: "flex",
|
|
3760
3758
|
flexDirection: "column",
|
|
3761
3759
|
overflow: "hidden",
|
|
3762
|
-
...
|
|
3760
|
+
...i
|
|
3763
3761
|
},
|
|
3764
3762
|
children: [
|
|
3765
3763
|
/* @__PURE__ */ S(
|
|
@@ -3871,28 +3869,28 @@ const at = (e, t, o) => ({
|
|
|
3871
3869
|
})
|
|
3872
3870
|
), yi = $(
|
|
3873
3871
|
J((e) => {
|
|
3874
|
-
const { store: t, onStoreReady: o, ...
|
|
3875
|
-
|
|
3876
|
-
|
|
3872
|
+
const { store: t, onStoreReady: o, ...r } = e, i = A(o);
|
|
3873
|
+
D(() => {
|
|
3874
|
+
i.current = o;
|
|
3877
3875
|
}, [o]);
|
|
3878
3876
|
const n = rt(() => {
|
|
3879
3877
|
var l;
|
|
3880
3878
|
const s = t || new Oo();
|
|
3881
|
-
return (l =
|
|
3879
|
+
return (l = i.current) == null || l.call(i, s), s;
|
|
3882
3880
|
}, [t]), c = () => {
|
|
3883
3881
|
n.clearMessages();
|
|
3884
3882
|
};
|
|
3885
3883
|
return /* @__PURE__ */ a(
|
|
3886
|
-
|
|
3884
|
+
Ao,
|
|
3887
3885
|
{
|
|
3888
|
-
...
|
|
3886
|
+
...r,
|
|
3889
3887
|
messages: n.messages,
|
|
3890
3888
|
onClear: c
|
|
3891
3889
|
}
|
|
3892
3890
|
);
|
|
3893
3891
|
})
|
|
3894
3892
|
);
|
|
3895
|
-
function
|
|
3893
|
+
function Do() {
|
|
3896
3894
|
const e = window.location.href;
|
|
3897
3895
|
return e.substring(
|
|
3898
3896
|
0,
|
|
@@ -3900,7 +3898,7 @@ function Ao() {
|
|
|
3900
3898
|
);
|
|
3901
3899
|
}
|
|
3902
3900
|
function Si({
|
|
3903
|
-
baseUrl: e =
|
|
3901
|
+
baseUrl: e = Do(),
|
|
3904
3902
|
...t
|
|
3905
3903
|
}) {
|
|
3906
3904
|
return /* @__PURE__ */ S(
|
|
@@ -3974,47 +3972,47 @@ function Si({
|
|
|
3974
3972
|
var Xt = /* @__PURE__ */ ((e) => (e.PRECONDITION_NOT_FULFILLED = "PRECONDITION_NOT_FULFILLED", e.ROBOT_DISCONNECTED = "ROBOT_DISCONNECTED", e.CELL_OPEN = "CELL_OPEN", e.E_STOP = "E_STOP", e.MANUAL_MODE = "MANUAL_MODE", e.READY = "READY", e))(Xt || {});
|
|
3975
3973
|
const Jo = $(
|
|
3976
3974
|
J(({ setupState: e, className: t }) => {
|
|
3977
|
-
const o = L(), { t:
|
|
3975
|
+
const o = L(), { t: r } = V(), i = () => {
|
|
3978
3976
|
var u, f, g, d, p, x, y;
|
|
3979
3977
|
switch (e) {
|
|
3980
3978
|
case "READY":
|
|
3981
3979
|
return {
|
|
3982
|
-
label:
|
|
3980
|
+
label: r("RobotSetupReadinessIndicator.Ready.lb"),
|
|
3983
3981
|
indicatorColor: ((u = o.palette.tertiary) == null ? void 0 : u.main) || o.palette.primary.main,
|
|
3984
3982
|
backgroundColor: ((f = o.palette.backgroundPaperElevation) == null ? void 0 : f[11]) || o.palette.background.paper,
|
|
3985
3983
|
textColor: o.palette.secondary.contrastText
|
|
3986
3984
|
};
|
|
3987
3985
|
case "ROBOT_DISCONNECTED":
|
|
3988
3986
|
return {
|
|
3989
|
-
label:
|
|
3987
|
+
label: r("RobotSetupReadinessIndicator.RobotDisconnected.lb"),
|
|
3990
3988
|
indicatorColor: o.palette.error.main,
|
|
3991
3989
|
backgroundColor: ((g = o.palette.backgroundPaperElevation) == null ? void 0 : g[11]) || o.palette.background.paper,
|
|
3992
3990
|
textColor: o.palette.secondary.contrastText
|
|
3993
3991
|
};
|
|
3994
3992
|
case "CELL_OPEN":
|
|
3995
3993
|
return {
|
|
3996
|
-
label:
|
|
3994
|
+
label: r("RobotSetupReadinessIndicator.CellOpen.lb"),
|
|
3997
3995
|
indicatorColor: o.palette.error.main,
|
|
3998
3996
|
backgroundColor: ((d = o.palette.backgroundPaperElevation) == null ? void 0 : d[11]) || o.palette.background.paper,
|
|
3999
3997
|
textColor: o.palette.secondary.contrastText
|
|
4000
3998
|
};
|
|
4001
3999
|
case "E_STOP":
|
|
4002
4000
|
return {
|
|
4003
|
-
label:
|
|
4001
|
+
label: r("RobotSetupReadinessIndicator.EStop.lb"),
|
|
4004
4002
|
indicatorColor: o.palette.error.main,
|
|
4005
4003
|
backgroundColor: ((p = o.palette.backgroundPaperElevation) == null ? void 0 : p[11]) || o.palette.background.paper,
|
|
4006
4004
|
textColor: o.palette.secondary.contrastText
|
|
4007
4005
|
};
|
|
4008
4006
|
case "MANUAL_MODE":
|
|
4009
4007
|
return {
|
|
4010
|
-
label:
|
|
4008
|
+
label: r("RobotSetupReadinessIndicator.ManualMode.lb"),
|
|
4011
4009
|
indicatorColor: o.palette.error.main,
|
|
4012
4010
|
backgroundColor: ((x = o.palette.backgroundPaperElevation) == null ? void 0 : x[11]) || o.palette.background.paper,
|
|
4013
4011
|
textColor: o.palette.secondary.contrastText
|
|
4014
4012
|
};
|
|
4015
4013
|
default:
|
|
4016
4014
|
return {
|
|
4017
|
-
label:
|
|
4015
|
+
label: r(
|
|
4018
4016
|
"RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"
|
|
4019
4017
|
),
|
|
4020
4018
|
indicatorColor: o.palette.error.main,
|
|
@@ -4022,7 +4020,7 @@ const Jo = $(
|
|
|
4022
4020
|
textColor: o.palette.secondary.contrastText
|
|
4023
4021
|
};
|
|
4024
4022
|
}
|
|
4025
|
-
}, { label: n, indicatorColor: c, backgroundColor: s, textColor: l } =
|
|
4023
|
+
}, { label: n, indicatorColor: c, backgroundColor: s, textColor: l } = i();
|
|
4026
4024
|
return /* @__PURE__ */ a(
|
|
4027
4025
|
ro,
|
|
4028
4026
|
{
|
|
@@ -4084,15 +4082,15 @@ const Jo = $(
|
|
|
4084
4082
|
robotName: e,
|
|
4085
4083
|
robotType: t,
|
|
4086
4084
|
setupState: o,
|
|
4087
|
-
PreconditionComponent:
|
|
4088
|
-
className:
|
|
4085
|
+
PreconditionComponent: r = Jo,
|
|
4086
|
+
className: i
|
|
4089
4087
|
}) => {
|
|
4090
4088
|
var l;
|
|
4091
4089
|
const n = L(), c = t || "Robot", s = o === Xt.READY;
|
|
4092
4090
|
return /* @__PURE__ */ S(
|
|
4093
4091
|
T,
|
|
4094
4092
|
{
|
|
4095
|
-
className:
|
|
4093
|
+
className: i,
|
|
4096
4094
|
sx: {
|
|
4097
4095
|
border: `1px solid ${n.palette.divider}`,
|
|
4098
4096
|
background: ((l = n.palette.backgroundPaperElevation) == null ? void 0 : l[8]) || "#292B3F",
|
|
@@ -4178,16 +4176,16 @@ const Jo = $(
|
|
|
4178
4176
|
]
|
|
4179
4177
|
}
|
|
4180
4178
|
),
|
|
4181
|
-
|
|
4179
|
+
r && /* @__PURE__ */ a(r, { setupState: o })
|
|
4182
4180
|
]
|
|
4183
4181
|
}
|
|
4184
4182
|
);
|
|
4185
4183
|
}
|
|
4186
4184
|
)
|
|
4187
|
-
),
|
|
4185
|
+
), Fo = ut(ao, {
|
|
4188
4186
|
shouldForwardProp: (e) => e !== "selected"
|
|
4189
4187
|
})(({ theme: e }) => {
|
|
4190
|
-
var t, o,
|
|
4188
|
+
var t, o, r;
|
|
4191
4189
|
return {
|
|
4192
4190
|
borderRadius: "20px",
|
|
4193
4191
|
"&:hover": {
|
|
@@ -4195,7 +4193,7 @@ const Jo = $(
|
|
|
4195
4193
|
},
|
|
4196
4194
|
variants: [
|
|
4197
4195
|
{
|
|
4198
|
-
props: ({ selected:
|
|
4196
|
+
props: ({ selected: i }) => !i,
|
|
4199
4197
|
style: {
|
|
4200
4198
|
background: (o = e.palette.backgroundPaperElevation) == null ? void 0 : o[0],
|
|
4201
4199
|
color: e.palette.action.disabled,
|
|
@@ -4205,9 +4203,9 @@ const Jo = $(
|
|
|
4205
4203
|
}
|
|
4206
4204
|
},
|
|
4207
4205
|
{
|
|
4208
|
-
props: ({ selected:
|
|
4206
|
+
props: ({ selected: i }) => i,
|
|
4209
4207
|
style: {
|
|
4210
|
-
background: (
|
|
4208
|
+
background: (r = e.palette.backgroundPaperElevation) == null ? void 0 : r[11],
|
|
4211
4209
|
border: `1px solid ${e.palette.divider}`,
|
|
4212
4210
|
color: e.palette.primary.contrastText
|
|
4213
4211
|
}
|
|
@@ -4217,7 +4215,7 @@ const Jo = $(
|
|
|
4217
4215
|
}), Ci = (e) => {
|
|
4218
4216
|
const { ref: t, ...o } = e;
|
|
4219
4217
|
return /* @__PURE__ */ a(
|
|
4220
|
-
|
|
4218
|
+
Fo,
|
|
4221
4219
|
{
|
|
4222
4220
|
ref: t,
|
|
4223
4221
|
selected: e.selected,
|
|
@@ -4227,25 +4225,25 @@ const Jo = $(
|
|
|
4227
4225
|
}
|
|
4228
4226
|
);
|
|
4229
4227
|
};
|
|
4230
|
-
function
|
|
4231
|
-
const { children: t, value: o, index:
|
|
4228
|
+
function Bo(e) {
|
|
4229
|
+
const { children: t, value: o, index: r, ...i } = e;
|
|
4232
4230
|
return /* @__PURE__ */ a(
|
|
4233
4231
|
"div",
|
|
4234
4232
|
{
|
|
4235
4233
|
role: "tabpanel",
|
|
4236
|
-
hidden: o !==
|
|
4237
|
-
id: `tabpanel-${
|
|
4238
|
-
"aria-labelledby": `tab-${
|
|
4239
|
-
...
|
|
4240
|
-
children: o ===
|
|
4234
|
+
hidden: o !== r,
|
|
4235
|
+
id: `tabpanel-${r}`,
|
|
4236
|
+
"aria-labelledby": `tab-${r}`,
|
|
4237
|
+
...i,
|
|
4238
|
+
children: o === r && /* @__PURE__ */ a(T, { children: t })
|
|
4241
4239
|
}
|
|
4242
4240
|
);
|
|
4243
4241
|
}
|
|
4244
4242
|
function Lo({ children: e, ...t }) {
|
|
4245
4243
|
const {
|
|
4246
4244
|
fullWidth: o,
|
|
4247
|
-
indicator:
|
|
4248
|
-
onChange:
|
|
4245
|
+
indicator: r,
|
|
4246
|
+
onChange: i,
|
|
4249
4247
|
orientation: n,
|
|
4250
4248
|
scrollButtons: c,
|
|
4251
4249
|
selectionFollowsFocus: s,
|
|
@@ -4261,16 +4259,16 @@ const wi = $(
|
|
|
4261
4259
|
const {
|
|
4262
4260
|
items: t,
|
|
4263
4261
|
activeTab: o,
|
|
4264
|
-
defaultActiveTab:
|
|
4265
|
-
onTabChange:
|
|
4262
|
+
defaultActiveTab: r = 0,
|
|
4263
|
+
onTabChange: i,
|
|
4266
4264
|
sx: n,
|
|
4267
4265
|
ref: c
|
|
4268
|
-
} = e, s = o !== void 0, [l, u] =
|
|
4269
|
-
|
|
4266
|
+
} = e, s = o !== void 0, [l, u] = B(r), f = s ? o : l;
|
|
4267
|
+
D(() => {
|
|
4270
4268
|
s || t.length !== 0 && (l < 0 || l > t.length - 1) && u(0);
|
|
4271
4269
|
}, [t.length, s, l]);
|
|
4272
4270
|
const g = (d, p) => {
|
|
4273
|
-
s || u(p),
|
|
4271
|
+
s || u(p), i == null || i(p);
|
|
4274
4272
|
};
|
|
4275
4273
|
return /* @__PURE__ */ S(
|
|
4276
4274
|
T,
|
|
@@ -4331,7 +4329,7 @@ const wi = $(
|
|
|
4331
4329
|
const k = d.badge.content, R = d.badge.showZero;
|
|
4332
4330
|
return !(k === 0 && !R);
|
|
4333
4331
|
}, h = x(), m = y(), v = () => {
|
|
4334
|
-
s || u(p),
|
|
4332
|
+
s || u(p), i == null || i(p);
|
|
4335
4333
|
}, b = /* @__PURE__ */ a(
|
|
4336
4334
|
zt,
|
|
4337
4335
|
{
|
|
@@ -4420,35 +4418,35 @@ const wi = $(
|
|
|
4420
4418
|
}
|
|
4421
4419
|
}
|
|
4422
4420
|
),
|
|
4423
|
-
/* @__PURE__ */ a(T, { sx: { flex: 1, overflow: "auto" }, children: t.map((d, p) => /* @__PURE__ */ a(
|
|
4421
|
+
/* @__PURE__ */ a(T, { sx: { flex: 1, overflow: "auto" }, children: t.map((d, p) => /* @__PURE__ */ a(Bo, { value: f, index: p, children: d.content }, d.id)) })
|
|
4424
4422
|
]
|
|
4425
4423
|
}
|
|
4426
4424
|
);
|
|
4427
4425
|
})
|
|
4428
4426
|
), $o = (e) => {
|
|
4429
|
-
const t = Math.floor(e / 86400), o = Math.floor(e % 86400 / 3600),
|
|
4430
|
-
return t > 0 ? (n.push(t.toString()), n.push(o.toString().padStart(2, "0")), n.push(
|
|
4431
|
-
},
|
|
4432
|
-
const o = Math.floor(e / 86400),
|
|
4427
|
+
const t = Math.floor(e / 86400), o = Math.floor(e % 86400 / 3600), r = Math.floor(e % 3600 / 60), i = e % 60, n = [];
|
|
4428
|
+
return t > 0 ? (n.push(t.toString()), n.push(o.toString().padStart(2, "0")), n.push(r.toString().padStart(2, "0")), n.push(i.toString().padStart(2, "0"))) : o > 0 ? (n.push(o.toString()), n.push(r.toString().padStart(2, "0")), n.push(i.toString().padStart(2, "0"))) : (n.push(r.toString()), n.push(i.toString().padStart(2, "0"))), n.join(":");
|
|
4429
|
+
}, Dt = (e, t) => {
|
|
4430
|
+
const o = Math.floor(e / 86400), r = Math.floor(e % 86400 / 3600), i = Math.floor(e % 3600 / 60), n = e % 60;
|
|
4433
4431
|
if (typeof Intl < "u" && "DurationFormat" in Intl)
|
|
4434
4432
|
try {
|
|
4435
4433
|
const s = {};
|
|
4436
|
-
return o > 0 && (s.days = o),
|
|
4434
|
+
return o > 0 && (s.days = o), r > 0 && (s.hours = r), i > 0 && (s.minutes = i), (n > 0 || Object.keys(s).length === 0) && (s.seconds = n), new Intl.DurationFormat(t, { style: "narrow" }).format(s);
|
|
4437
4435
|
} catch {
|
|
4438
4436
|
}
|
|
4439
4437
|
const c = [];
|
|
4440
|
-
return o > 0 && c.push(`${o}d`),
|
|
4438
|
+
return o > 0 && c.push(`${o}d`), r > 0 && c.push(`${r}h`), i > 0 && c.push(`${i}m`), (n > 0 || c.length === 0) && c.push(`${n}s`), c.join(" ");
|
|
4441
4439
|
}, zo = ({
|
|
4442
4440
|
timerState: e,
|
|
4443
4441
|
animationState: t,
|
|
4444
4442
|
hasError: o,
|
|
4445
|
-
className:
|
|
4443
|
+
className: r
|
|
4446
4444
|
}) => {
|
|
4447
|
-
const { t:
|
|
4445
|
+
const { t: i } = V(), n = L(), { elapsedTime: c, currentProgress: s } = e, { showErrorAnimation: l, showPauseAnimation: u, showMainText: f } = t;
|
|
4448
4446
|
return /* @__PURE__ */ S(
|
|
4449
4447
|
T,
|
|
4450
4448
|
{
|
|
4451
|
-
className:
|
|
4449
|
+
className: r,
|
|
4452
4450
|
sx: {
|
|
4453
4451
|
position: "relative",
|
|
4454
4452
|
width: 264,
|
|
@@ -4535,7 +4533,7 @@ const wi = $(
|
|
|
4535
4533
|
fontWeight: 500,
|
|
4536
4534
|
color: n.palette.error.light
|
|
4537
4535
|
},
|
|
4538
|
-
children:
|
|
4536
|
+
children: i("timer.error")
|
|
4539
4537
|
}
|
|
4540
4538
|
) }),
|
|
4541
4539
|
/* @__PURE__ */ a(U, { in: f && !o, timeout: 300, children: /* @__PURE__ */ a(
|
|
@@ -4565,14 +4563,14 @@ const wi = $(
|
|
|
4565
4563
|
timerState: e,
|
|
4566
4564
|
animationState: t,
|
|
4567
4565
|
hasError: o,
|
|
4568
|
-
compact:
|
|
4569
|
-
className:
|
|
4566
|
+
compact: r,
|
|
4567
|
+
className: i
|
|
4570
4568
|
}) => {
|
|
4571
4569
|
const { t: n, i18n: c } = V(), s = L(), { elapsedTime: l, currentProgress: u } = e, { showErrorAnimation: f, showPauseAnimation: g } = t;
|
|
4572
|
-
return
|
|
4570
|
+
return r ? /* @__PURE__ */ a(
|
|
4573
4571
|
T,
|
|
4574
4572
|
{
|
|
4575
|
-
className:
|
|
4573
|
+
className: i,
|
|
4576
4574
|
sx: {
|
|
4577
4575
|
display: "flex",
|
|
4578
4576
|
alignItems: "center",
|
|
@@ -4587,14 +4585,14 @@ const wi = $(
|
|
|
4587
4585
|
fontSize: "14px",
|
|
4588
4586
|
transition: "color 0.5s ease-out"
|
|
4589
4587
|
},
|
|
4590
|
-
children: o ? n("timer.error") :
|
|
4588
|
+
children: o ? n("timer.error") : Dt(l, c.language)
|
|
4591
4589
|
}
|
|
4592
4590
|
)
|
|
4593
4591
|
}
|
|
4594
4592
|
) : /* @__PURE__ */ S(
|
|
4595
4593
|
T,
|
|
4596
4594
|
{
|
|
4597
|
-
className:
|
|
4595
|
+
className: i,
|
|
4598
4596
|
sx: {
|
|
4599
4597
|
display: "flex",
|
|
4600
4598
|
alignItems: "center",
|
|
@@ -4672,36 +4670,36 @@ const wi = $(
|
|
|
4672
4670
|
letterSpacing: "normal",
|
|
4673
4671
|
transition: "color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"
|
|
4674
4672
|
},
|
|
4675
|
-
children: o ? n("timer.error") :
|
|
4673
|
+
children: o ? n("timer.error") : Dt(l, c.language)
|
|
4676
4674
|
}
|
|
4677
4675
|
)
|
|
4678
4676
|
]
|
|
4679
4677
|
}
|
|
4680
4678
|
);
|
|
4681
4679
|
}, No = () => {
|
|
4682
|
-
const [e, t] =
|
|
4680
|
+
const [e, t] = B({
|
|
4683
4681
|
showPauseAnimation: !1,
|
|
4684
4682
|
showErrorAnimation: !1,
|
|
4685
4683
|
showMainText: !0
|
|
4686
|
-
}), o =
|
|
4684
|
+
}), o = A(
|
|
4687
4685
|
null
|
|
4688
|
-
),
|
|
4686
|
+
), r = A(
|
|
4689
4687
|
null
|
|
4690
|
-
),
|
|
4688
|
+
), i = A(null), n = P(() => {
|
|
4691
4689
|
t((g) => ({ ...g, showPauseAnimation: !0 })), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
|
|
4692
4690
|
t((g) => ({ ...g, showPauseAnimation: !1 }));
|
|
4693
4691
|
}, 800);
|
|
4694
4692
|
}, []), c = P(() => {
|
|
4695
|
-
t((g) => ({ ...g, showErrorAnimation: !0 })),
|
|
4693
|
+
t((g) => ({ ...g, showErrorAnimation: !0 })), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
|
|
4696
4694
|
t((g) => ({ ...g, showErrorAnimation: !1 }));
|
|
4697
4695
|
}, 600);
|
|
4698
4696
|
}, []), s = P(() => {
|
|
4699
|
-
t((g) => ({ ...g, showErrorAnimation: !1 })),
|
|
4697
|
+
t((g) => ({ ...g, showErrorAnimation: !1 })), r.current && clearTimeout(r.current);
|
|
4700
4698
|
}, []), l = P(() => {
|
|
4701
4699
|
t((g) => ({
|
|
4702
4700
|
...g,
|
|
4703
4701
|
showMainText: !1
|
|
4704
|
-
})),
|
|
4702
|
+
})), i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
4705
4703
|
t((g) => ({
|
|
4706
4704
|
...g,
|
|
4707
4705
|
showMainText: !0
|
|
@@ -4713,7 +4711,7 @@ const wi = $(
|
|
|
4713
4711
|
showMainText: !0
|
|
4714
4712
|
}));
|
|
4715
4713
|
}, []), f = P(() => {
|
|
4716
|
-
o.current && clearTimeout(o.current),
|
|
4714
|
+
o.current && clearTimeout(o.current), r.current && clearTimeout(r.current), i.current && clearTimeout(i.current);
|
|
4717
4715
|
}, []);
|
|
4718
4716
|
return {
|
|
4719
4717
|
animationState: e,
|
|
@@ -4728,16 +4726,16 @@ const wi = $(
|
|
|
4728
4726
|
autoStart: e,
|
|
4729
4727
|
hasError: t,
|
|
4730
4728
|
onPauseAnimation: o,
|
|
4731
|
-
onErrorAnimation:
|
|
4732
|
-
onClearErrorAnimation:
|
|
4729
|
+
onErrorAnimation: r,
|
|
4730
|
+
onClearErrorAnimation: i
|
|
4733
4731
|
}) => {
|
|
4734
|
-
const [n, c] =
|
|
4732
|
+
const [n, c] = B({
|
|
4735
4733
|
elapsedTime: 0,
|
|
4736
4734
|
isRunning: !1,
|
|
4737
4735
|
isPausedState: !1,
|
|
4738
4736
|
currentProgress: 0,
|
|
4739
4737
|
wasRunningBeforeError: !1
|
|
4740
|
-
}), s =
|
|
4738
|
+
}), s = A(null), l = A(null), u = A(0), f = A(0), [g] = $t([0], {
|
|
4741
4739
|
tension: 80,
|
|
4742
4740
|
friction: 18,
|
|
4743
4741
|
onChange: ([m]) => {
|
|
@@ -4782,17 +4780,17 @@ const wi = $(
|
|
|
4782
4780
|
currentProgress: 0
|
|
4783
4781
|
})), u.current = 0, l.current = null, f.current = 0, g.setImmediate([0]);
|
|
4784
4782
|
}, [g]), h = P(() => n.isPausedState, [n.isPausedState]);
|
|
4785
|
-
return
|
|
4786
|
-
t ? (n.isRunning && (c((m) => ({ ...m, wasRunningBeforeError: !0 })), p()),
|
|
4783
|
+
return D(() => {
|
|
4784
|
+
t ? (n.isRunning && (c((m) => ({ ...m, wasRunningBeforeError: !0 })), p()), r()) : (n.wasRunningBeforeError && !n.isRunning && (c((m) => ({ ...m, wasRunningBeforeError: !1 })), x()), i());
|
|
4787
4785
|
}, [
|
|
4788
4786
|
t,
|
|
4789
4787
|
n.isRunning,
|
|
4790
4788
|
n.wasRunningBeforeError,
|
|
4791
4789
|
p,
|
|
4792
4790
|
x,
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
]),
|
|
4791
|
+
r,
|
|
4792
|
+
i
|
|
4793
|
+
]), D(() => {
|
|
4796
4794
|
if (n.isRunning) {
|
|
4797
4795
|
const m = () => {
|
|
4798
4796
|
if (l.current) {
|
|
@@ -4812,7 +4810,7 @@ const wi = $(
|
|
|
4812
4810
|
return () => {
|
|
4813
4811
|
s.current && (cancelAnimationFrame(s.current), s.current = null);
|
|
4814
4812
|
};
|
|
4815
|
-
}, [n.isRunning, g]),
|
|
4813
|
+
}, [n.isRunning, g]), D(() => {
|
|
4816
4814
|
let m = null;
|
|
4817
4815
|
const v = () => {
|
|
4818
4816
|
g.update(), m = requestAnimationFrame(v);
|
|
@@ -4836,8 +4834,8 @@ const wi = $(
|
|
|
4836
4834
|
onTimerReady: e,
|
|
4837
4835
|
autoStart: t = !0,
|
|
4838
4836
|
variant: o = "default",
|
|
4839
|
-
compact:
|
|
4840
|
-
className:
|
|
4837
|
+
compact: r = !1,
|
|
4838
|
+
className: i,
|
|
4841
4839
|
hasError: n = !1
|
|
4842
4840
|
}) => {
|
|
4843
4841
|
const {
|
|
@@ -4854,9 +4852,9 @@ const wi = $(
|
|
|
4854
4852
|
onErrorAnimation: l,
|
|
4855
4853
|
onClearErrorAnimation: u
|
|
4856
4854
|
});
|
|
4857
|
-
return
|
|
4855
|
+
return D(() => {
|
|
4858
4856
|
f();
|
|
4859
|
-
}, [f]),
|
|
4857
|
+
}, [f]), D(() => {
|
|
4860
4858
|
let x = !0;
|
|
4861
4859
|
const y = setTimeout(() => {
|
|
4862
4860
|
x && e(p);
|
|
@@ -4864,14 +4862,14 @@ const wi = $(
|
|
|
4864
4862
|
return () => {
|
|
4865
4863
|
x = !1, clearTimeout(y);
|
|
4866
4864
|
};
|
|
4867
|
-
}, [e, p]),
|
|
4865
|
+
}, [e, p]), D(() => g, [g]), o === "small" ? /* @__PURE__ */ a(
|
|
4868
4866
|
Vo,
|
|
4869
4867
|
{
|
|
4870
4868
|
timerState: d,
|
|
4871
4869
|
animationState: c,
|
|
4872
4870
|
hasError: n,
|
|
4873
|
-
compact:
|
|
4874
|
-
className:
|
|
4871
|
+
compact: r,
|
|
4872
|
+
className: i
|
|
4875
4873
|
}
|
|
4876
4874
|
) : /* @__PURE__ */ a(
|
|
4877
4875
|
zo,
|
|
@@ -4879,7 +4877,7 @@ const wi = $(
|
|
|
4879
4877
|
timerState: d,
|
|
4880
4878
|
animationState: c,
|
|
4881
4879
|
hasError: n,
|
|
4882
|
-
className:
|
|
4880
|
+
className: i
|
|
4883
4881
|
}
|
|
4884
4882
|
);
|
|
4885
4883
|
}
|
|
@@ -4892,11 +4890,11 @@ const wi = $(
|
|
|
4892
4890
|
reverse_rotation_direction: !1
|
|
4893
4891
|
};
|
|
4894
4892
|
class gt {
|
|
4895
|
-
constructor(t, o,
|
|
4896
|
-
this.nova = t, this.controller = o, this.motionGroup =
|
|
4893
|
+
constructor(t, o, r, i, n, c, s, l, u, f) {
|
|
4894
|
+
this.nova = t, this.controller = o, this.motionGroup = r, this.initialMotionState = i, this.motionStateSocket = n, this.isVirtual = c, this.tcps = s, this.description = l, this.initialControllerState = u, this.controllerStateSocket = f, this.connectedJoggingSocket = null, this.joggingVelocity = 10, this.activationState = "inactive", this.rapidlyChangingMotionState = i, this.controllerState = u, f.addEventListener("message", (g) => {
|
|
4897
4895
|
var p;
|
|
4898
4896
|
const d = (p = W(g.data)) == null ? void 0 : p.result;
|
|
4899
|
-
d &&
|
|
4897
|
+
d && F(() => {
|
|
4900
4898
|
this.controllerState = d;
|
|
4901
4899
|
});
|
|
4902
4900
|
}), n.addEventListener("message", (g) => {
|
|
@@ -4910,17 +4908,17 @@ class gt {
|
|
|
4910
4908
|
this.rapidlyChangingMotionState.joint_position,
|
|
4911
4909
|
d.joint_position,
|
|
4912
4910
|
Jt
|
|
4913
|
-
) ||
|
|
4911
|
+
) || F(() => {
|
|
4914
4912
|
this.rapidlyChangingMotionState.joint_position = d.joint_position;
|
|
4915
4913
|
}), Ht(
|
|
4916
4914
|
this.rapidlyChangingMotionState,
|
|
4917
4915
|
d,
|
|
4918
4916
|
Jt
|
|
4919
|
-
) ||
|
|
4917
|
+
) || F(() => {
|
|
4920
4918
|
this.rapidlyChangingMotionState.tcp_pose = d.tcp_pose;
|
|
4921
|
-
}), d.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== d.tcp &&
|
|
4919
|
+
}), d.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== d.tcp && F(() => {
|
|
4922
4920
|
this.rapidlyChangingMotionState.tcp = d.tcp;
|
|
4923
|
-
}), this.rapidlyChangingMotionState.standstill !== d.standstill &&
|
|
4921
|
+
}), this.rapidlyChangingMotionState.standstill !== d.standstill && F(() => {
|
|
4924
4922
|
this.rapidlyChangingMotionState.standstill = d.standstill;
|
|
4925
4923
|
});
|
|
4926
4924
|
}), mt(this);
|
|
@@ -4928,21 +4926,21 @@ class gt {
|
|
|
4928
4926
|
static async connectMultiple(t, o) {
|
|
4929
4927
|
return Promise.all(
|
|
4930
4928
|
o.map(
|
|
4931
|
-
(
|
|
4929
|
+
(r) => gt.connect(t, r)
|
|
4932
4930
|
)
|
|
4933
4931
|
);
|
|
4934
4932
|
}
|
|
4935
4933
|
static async connect(t, o) {
|
|
4936
4934
|
var m, v;
|
|
4937
|
-
const [
|
|
4935
|
+
const [r, i] = o.split("@"), n = await t.api.controller.getCurrentRobotControllerState(i), c = n == null ? void 0 : n.motion_groups.find(
|
|
4938
4936
|
(b) => b.motion_group === o
|
|
4939
4937
|
);
|
|
4940
4938
|
if (!n || !c)
|
|
4941
4939
|
throw new Error(
|
|
4942
|
-
`Controller ${
|
|
4940
|
+
`Controller ${i} or motion group ${o} not found`
|
|
4943
4941
|
);
|
|
4944
4942
|
const s = t.openReconnectingWebsocket(
|
|
4945
|
-
`/controllers/${
|
|
4943
|
+
`/controllers/${i}/motion-groups/${o}/state-stream`
|
|
4946
4944
|
), l = await s.firstMessage(), u = (m = W(l.data)) == null ? void 0 : m.result;
|
|
4947
4945
|
if (!u)
|
|
4948
4946
|
throw new Error(
|
|
@@ -4956,7 +4954,7 @@ class gt {
|
|
|
4956
4954
|
const g = (await t.api.controller.getRobotController(
|
|
4957
4955
|
n.controller
|
|
4958
4956
|
)).configuration.kind === "VirtualController", d = await t.api.motionGroup.getMotionGroupDescription(
|
|
4959
|
-
|
|
4957
|
+
i,
|
|
4960
4958
|
c.motion_group
|
|
4961
4959
|
), p = Object.entries(d.tcps || {}).map(
|
|
4962
4960
|
([b, w]) => ({
|
|
@@ -5020,22 +5018,22 @@ class gt {
|
|
|
5020
5018
|
}
|
|
5021
5019
|
/** Gets the robot mounting position offset in 3D viz coordinates */
|
|
5022
5020
|
get mountingPosition() {
|
|
5023
|
-
var t, o,
|
|
5021
|
+
var t, o, r;
|
|
5024
5022
|
return this.description.mounting ? [
|
|
5025
5023
|
(((t = this.description.mounting.position) == null ? void 0 : t[0]) || 0) / 1e3,
|
|
5026
5024
|
(((o = this.description.mounting.position) == null ? void 0 : o[1]) || 0) / 1e3,
|
|
5027
|
-
(((
|
|
5025
|
+
(((r = this.description.mounting.position) == null ? void 0 : r[2]) || 0) / 1e3
|
|
5028
5026
|
] : [0, 0, 0];
|
|
5029
5027
|
}
|
|
5030
5028
|
/** Gets the robot mounting position rotation in 3D viz coordinates */
|
|
5031
5029
|
get mountingQuaternion() {
|
|
5032
|
-
var
|
|
5030
|
+
var i, n, c, s, l, u;
|
|
5033
5031
|
const t = new Et.Vector3(
|
|
5034
|
-
((n = (
|
|
5032
|
+
((n = (i = this.description.mounting) == null ? void 0 : i.orientation) == null ? void 0 : n[0]) || 0,
|
|
5035
5033
|
((s = (c = this.description.mounting) == null ? void 0 : c.orientation) == null ? void 0 : s[1]) || 0,
|
|
5036
5034
|
((u = (l = this.description.mounting) == null ? void 0 : l.orientation) == null ? void 0 : u[2]) || 0
|
|
5037
|
-
), o = t.length(),
|
|
5038
|
-
return new Et.Quaternion().setFromAxisAngle(
|
|
5035
|
+
), o = t.length(), r = t.normalize();
|
|
5036
|
+
return new Et.Quaternion().setFromAxisAngle(r, o);
|
|
5039
5037
|
}
|
|
5040
5038
|
/**
|
|
5041
5039
|
* Whether the controller is currently in a safety state
|
|
@@ -5080,18 +5078,18 @@ class gt {
|
|
|
5080
5078
|
console.error("Tried to deactivate while already deactivating");
|
|
5081
5079
|
return;
|
|
5082
5080
|
}
|
|
5083
|
-
|
|
5081
|
+
F(() => {
|
|
5084
5082
|
this.activationState = "deactivating";
|
|
5085
5083
|
});
|
|
5086
5084
|
try {
|
|
5087
5085
|
await this.nova.api.controller.setDefaultMode(
|
|
5088
5086
|
this.controllerId,
|
|
5089
5087
|
"ROBOT_SYSTEM_MODE_MONITOR"
|
|
5090
|
-
),
|
|
5088
|
+
), F(() => {
|
|
5091
5089
|
this.activationState = "inactive";
|
|
5092
5090
|
});
|
|
5093
5091
|
} catch (t) {
|
|
5094
|
-
throw
|
|
5092
|
+
throw F(() => {
|
|
5095
5093
|
this.activationState = "active";
|
|
5096
5094
|
}), t;
|
|
5097
5095
|
}
|
|
@@ -5101,18 +5099,18 @@ class gt {
|
|
|
5101
5099
|
console.error("Tried to activate while already activating");
|
|
5102
5100
|
return;
|
|
5103
5101
|
}
|
|
5104
|
-
|
|
5102
|
+
F(() => {
|
|
5105
5103
|
this.activationState = "activating";
|
|
5106
5104
|
});
|
|
5107
5105
|
try {
|
|
5108
5106
|
await this.nova.api.controller.setDefaultMode(
|
|
5109
5107
|
this.controllerId,
|
|
5110
5108
|
"ROBOT_SYSTEM_MODE_CONTROL"
|
|
5111
|
-
),
|
|
5109
|
+
), F(() => {
|
|
5112
5110
|
this.activationState = "active";
|
|
5113
5111
|
});
|
|
5114
5112
|
} catch (t) {
|
|
5115
|
-
throw
|
|
5113
|
+
throw F(() => {
|
|
5116
5114
|
this.activationState = "inactive";
|
|
5117
5115
|
}), t;
|
|
5118
5116
|
}
|
|
@@ -5128,8 +5126,8 @@ class gt {
|
|
|
5128
5126
|
}
|
|
5129
5127
|
}
|
|
5130
5128
|
function Kt() {
|
|
5131
|
-
var t, o,
|
|
5132
|
-
const e =
|
|
5129
|
+
var t, o, r, i, n, c;
|
|
5130
|
+
const e = Ft({
|
|
5133
5131
|
palette: {
|
|
5134
5132
|
mode: "dark",
|
|
5135
5133
|
text: {
|
|
@@ -5322,7 +5320,7 @@ function Kt() {
|
|
|
5322
5320
|
props: { color: "secondary", variant: "contained" },
|
|
5323
5321
|
style: {
|
|
5324
5322
|
border: `1px solid ${e.palette.divider}`,
|
|
5325
|
-
background: (
|
|
5323
|
+
background: (r = (o = (t = e.paletteExt) == null ? void 0 : t.secondary) == null ? void 0 : o.tonal) == null ? void 0 : r.toString()
|
|
5326
5324
|
}
|
|
5327
5325
|
},
|
|
5328
5326
|
{
|
|
@@ -5347,7 +5345,7 @@ function Kt() {
|
|
|
5347
5345
|
MuiTabs: {
|
|
5348
5346
|
styleOverrides: {
|
|
5349
5347
|
root: {
|
|
5350
|
-
background: (
|
|
5348
|
+
background: (i = e.palette.backgroundPaperElevation) == null ? void 0 : i[1]
|
|
5351
5349
|
}
|
|
5352
5350
|
}
|
|
5353
5351
|
},
|
|
@@ -5471,11 +5469,11 @@ function Uo() {
|
|
|
5471
5469
|
return e.palette.mode = "light", e;
|
|
5472
5470
|
}
|
|
5473
5471
|
function Mi(e) {
|
|
5474
|
-
var
|
|
5472
|
+
var r, i, n, c;
|
|
5475
5473
|
let t = !0;
|
|
5476
|
-
((
|
|
5474
|
+
((r = e.palette) == null ? void 0 : r.mode) === "light" ? t = !1 : ((i = e.palette) == null ? void 0 : i.mode) !== "dark" && (t = !(typeof window < "u" && ((c = (n = window.matchMedia) == null ? void 0 : n.call(window, "(prefers-color-scheme: light)")) == null ? void 0 : c.matches)));
|
|
5477
5475
|
const o = t ? Kt() : Uo();
|
|
5478
|
-
return
|
|
5476
|
+
return Ft(o, e);
|
|
5479
5477
|
}
|
|
5480
5478
|
export {
|
|
5481
5479
|
di as A,
|
|
@@ -5498,12 +5496,12 @@ export {
|
|
|
5498
5496
|
vo as f,
|
|
5499
5497
|
Co as g,
|
|
5500
5498
|
yi as h,
|
|
5501
|
-
|
|
5499
|
+
st as i,
|
|
5502
5500
|
hi as j,
|
|
5503
5501
|
fi as k,
|
|
5504
5502
|
bi as l,
|
|
5505
5503
|
xi as m,
|
|
5506
|
-
|
|
5504
|
+
Ao as n,
|
|
5507
5505
|
Xt as o,
|
|
5508
5506
|
Jo as p,
|
|
5509
5507
|
Ti as q,
|