@wandelbots/wandelbots-js-react-components 5.5.4 → 5.5.5-pr.feat-RB-3582-limits-from-api.605.fd3b200
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/3d.cjs +1 -1
- package/dist/3d.js +1 -1
- package/dist/SafetyBar/index.cjs +1 -1
- package/dist/SafetyBar/index.js +1 -1
- package/dist/chunks/{MotionGroupVisualizer-EN8Nw5xP.cjs → MotionGroupVisualizer-DXWOeeh1.cjs} +1 -1
- package/dist/chunks/{MotionGroupVisualizer-BXDggjVD.js → MotionGroupVisualizer-FslyKR4F.js} +2 -2
- package/dist/chunks/{SafetyBar-C8whliAf.js → SafetyBar-C6Kcqza9.js} +1 -1
- package/dist/chunks/{SafetyBar-CLm3UQRA.cjs → SafetyBar-n6391WIY.cjs} +1 -1
- package/dist/chunks/{externalizeComponent-D6S3WLFc.js → externalizeComponent-BLilFZni.js} +13 -9
- package/dist/chunks/{externalizeComponent-BHZdH14U.cjs → externalizeComponent-CqnB_8q-.cjs} +2 -2
- package/dist/chunks/{interpolation-D9WFd-j_.js → interpolation-BDCy5Kcc.js} +1 -1
- package/dist/chunks/{interpolation-B84QX33C.cjs → interpolation-Cy1f8c4M.cjs} +1 -1
- package/dist/chunks/{theming-U5DTlp9R.js → theming-DW-GUJAo.js} +1011 -951
- package/dist/chunks/theming-kJuzfb6S.cjs +4 -0
- package/dist/components/jogging/JoggingStore.d.ts +32 -7
- package/dist/components/jogging/JoggingVelocitySlider.d.ts +2 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunks/theming-Bshha-6d.cjs +0 -4
|
@@ -1,90 +1,90 @@
|
|
|
1
1
|
import { jsx as a, jsxs as S, Fragment as et } from "react/jsx-runtime";
|
|
2
|
-
import { alpha as Mt, useTheme as F, styled as gt, createTheme as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { alpha as Mt, useTheme as F, styled as gt, createTheme as Bt } from "@mui/material/styles";
|
|
3
|
+
import Kt from "@mui/material/AppBar";
|
|
4
|
+
import Ft from "@mui/material/Backdrop";
|
|
5
5
|
import T from "@mui/material/Box";
|
|
6
6
|
import H from "@mui/material/IconButton";
|
|
7
|
-
import
|
|
7
|
+
import te from "@mui/material/Menu";
|
|
8
8
|
import q from "@mui/material/MenuItem";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { observer as J, useLocalObservable as
|
|
12
|
-
import { useState as B, useRef as
|
|
13
|
-
import { e as
|
|
14
|
-
import
|
|
9
|
+
import ee from "@mui/material/Toolbar";
|
|
10
|
+
import _ from "@mui/material/Typography";
|
|
11
|
+
import { observer as J, useLocalObservable as Lt } from "mobx-react-lite";
|
|
12
|
+
import { useState as B, useRef as O, useCallback as j, useEffect as A, useMemo as rt, useId as oe } from "react";
|
|
13
|
+
import { e as $, r as kt } from "./externalizeComponent-BLilFZni.js";
|
|
14
|
+
import ne from "@mui/material/SvgIcon";
|
|
15
15
|
import U from "@mui/material/Fade";
|
|
16
|
-
import { Gauge as
|
|
16
|
+
import { Gauge as ie } from "@mui/x-charts/Gauge";
|
|
17
17
|
import { useTranslation as V } from "react-i18next";
|
|
18
|
-
import { f as
|
|
19
|
-
import
|
|
20
|
-
import
|
|
18
|
+
import { f as $t, e as pt, d as re } from "./interpolation-BDCy5Kcc.js";
|
|
19
|
+
import ae from "@mui/icons-material/Clear";
|
|
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
|
|
24
|
-
import
|
|
25
|
-
import
|
|
23
|
+
import { useGridApiRef as le, DataGrid as ce, Toolbar as de, FilterPanelTrigger as ue, ToolbarButton as st, QuickFilter as ge, QuickFilterTrigger as pe, QuickFilterControl as me, QuickFilterClear as he } from "@mui/x-data-grid";
|
|
24
|
+
import fe from "@mui/icons-material/OpenWith";
|
|
25
|
+
import be from "@mui/icons-material/Share";
|
|
26
26
|
import P from "@mui/material/Stack";
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import { JointTypeEnum as
|
|
30
|
-
import { lowerFirst as
|
|
31
|
-
import { runInAction as L, makeAutoObservable as mt, when as lt, autorun as
|
|
32
|
-
import { radiansToDegrees as
|
|
27
|
+
import zt from "@mui/material/Tab";
|
|
28
|
+
import Vt from "@mui/material/Tabs";
|
|
29
|
+
import { JointTypeEnum as W, OperationMode as xe, SafetyStateType as ye, NovaClient as Se, poseToWandelscriptString as ve } from "@wandelbots/nova-js/v2";
|
|
30
|
+
import { lowerFirst as we, countBy as Ce, isString as Te } from "lodash-es";
|
|
31
|
+
import { runInAction as L, makeAutoObservable as mt, when as lt, autorun as Me, makeObservable as ke, action as Rt, observable as Ie } from "mobx";
|
|
32
|
+
import { radiansToDegrees as Nt, tryParseJson as G, XYZ_TO_VECTOR as tt, degreesToRadians as Re } from "@wandelbots/nova-js";
|
|
33
33
|
import { Vector3 as ct } from "three/src/math/Vector3.js";
|
|
34
|
-
import
|
|
35
|
-
import { capitalize as
|
|
36
|
-
import { m as
|
|
37
|
-
import
|
|
38
|
-
import
|
|
34
|
+
import _e from "@mui/material/CircularProgress";
|
|
35
|
+
import { capitalize as Ee } from "@mui/material/utils";
|
|
36
|
+
import { m as je } from "./SafetyBar-C6Kcqza9.js";
|
|
37
|
+
import Pe from "@mui/material/Alert";
|
|
38
|
+
import De from "@mui/material/AlertTitle";
|
|
39
39
|
import Z from "@mui/material/Button";
|
|
40
|
-
import
|
|
41
|
-
import { c as
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
40
|
+
import _t from "@mui/material/ToggleButton";
|
|
41
|
+
import { c as Oe, d as Ae, F as Je, a as Be, b as Fe, f as Le, e as $e } from "./robot-Cy9ST5-m.js";
|
|
42
|
+
import ze from "lodash-es/isEqual.js";
|
|
43
|
+
import Ve from "@mui/material/FormControl";
|
|
44
|
+
import Ne from "@mui/material/InputLabel";
|
|
45
|
+
import Ge from "@mui/material/Select";
|
|
46
46
|
import nt from "lodash-es/keyBy.js";
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import
|
|
67
|
-
import
|
|
68
|
-
import { Gauge as
|
|
47
|
+
import We from "lodash-es/uniqueId.js";
|
|
48
|
+
import Ue from "@mui/material/ToggleButtonGroup";
|
|
49
|
+
import Gt from "@mui/material/Slider";
|
|
50
|
+
import He from "lodash-es/isNumber.js";
|
|
51
|
+
import qe from "@mui/icons-material/ChevronLeft";
|
|
52
|
+
import Ye from "@mui/icons-material/ChevronRight";
|
|
53
|
+
import Ze from "lodash-es/throttle.js";
|
|
54
|
+
import Qe from "@mui/material/Tooltip";
|
|
55
|
+
import Xe from "@mui/icons-material/ContentCopy";
|
|
56
|
+
import Ke from "@mui/icons-material/DescriptionOutlined";
|
|
57
|
+
import to from "@mui/icons-material/ExpandLess";
|
|
58
|
+
import eo from "@mui/icons-material/ExpandMore";
|
|
59
|
+
import oo from "@mui/material/Paper";
|
|
60
|
+
import no from "@mui/material/Dialog";
|
|
61
|
+
import io from "@mui/material/DialogActions";
|
|
62
|
+
import ro from "@mui/material/DialogContent";
|
|
63
|
+
import ao from "@mui/material/DialogTitle";
|
|
64
|
+
import so from "@mui/icons-material/Error";
|
|
65
|
+
import lo from "@mui/material/Chip";
|
|
66
|
+
import co from "@mui/material/Fab";
|
|
67
|
+
import uo from "@mui/material/Badge";
|
|
68
|
+
import { Gauge as go } from "@mui/x-charts";
|
|
69
69
|
import * as Et from "three";
|
|
70
70
|
import { Vector3 as jt } from "three";
|
|
71
|
-
const
|
|
71
|
+
const po = (e) => /* @__PURE__ */ a(ne, { ...e, viewBox: "0 0 10 8", children: /* @__PURE__ */ a(
|
|
72
72
|
"path",
|
|
73
73
|
{
|
|
74
74
|
d: "M8.825 0.9125L5 4.72917L1.175 0.9125L0 2.0875L5 7.0875L10 2.0875L8.825 0.9125Z",
|
|
75
75
|
fill: "currentColor",
|
|
76
76
|
fillOpacity: "0.56"
|
|
77
77
|
}
|
|
78
|
-
) }),
|
|
79
|
-
J((
|
|
78
|
+
) }), gi = $(
|
|
79
|
+
J((e) => {
|
|
80
80
|
const {
|
|
81
|
-
appIcon:
|
|
81
|
+
appIcon: t,
|
|
82
82
|
appName: o,
|
|
83
83
|
apps: r = [],
|
|
84
84
|
onAppSelect: i,
|
|
85
85
|
disabled: n = !1,
|
|
86
86
|
sx: c
|
|
87
|
-
} =
|
|
87
|
+
} = e, [s, l] = B(null), g = !!s, m = (p) => {
|
|
88
88
|
l(p.currentTarget);
|
|
89
89
|
}, d = () => {
|
|
90
90
|
l(null);
|
|
@@ -93,7 +93,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
93
93
|
};
|
|
94
94
|
return /* @__PURE__ */ S(et, { children: [
|
|
95
95
|
/* @__PURE__ */ a(
|
|
96
|
-
|
|
96
|
+
Kt,
|
|
97
97
|
{
|
|
98
98
|
position: "static",
|
|
99
99
|
sx: {
|
|
@@ -105,11 +105,11 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
105
105
|
},
|
|
106
106
|
...c
|
|
107
107
|
},
|
|
108
|
-
children: /* @__PURE__ */ S(
|
|
109
|
-
/* @__PURE__ */ a(T, { sx: { mr: 1, display: "flex", alignItems: "center" }, children:
|
|
108
|
+
children: /* @__PURE__ */ S(ee, { sx: { minHeight: "62px !important" }, children: [
|
|
109
|
+
/* @__PURE__ */ a(T, { sx: { mr: 1, display: "flex", alignItems: "center" }, children: t }),
|
|
110
110
|
/* @__PURE__ */ S(T, { sx: { display: "flex", alignItems: "center", flexGrow: 1 }, children: [
|
|
111
111
|
/* @__PURE__ */ a(
|
|
112
|
-
|
|
112
|
+
_,
|
|
113
113
|
{
|
|
114
114
|
component: "h1",
|
|
115
115
|
sx: {
|
|
@@ -145,7 +145,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
145
145
|
height: "6px"
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
|
-
children: /* @__PURE__ */ a(
|
|
148
|
+
children: /* @__PURE__ */ a(po, {})
|
|
149
149
|
}
|
|
150
150
|
)
|
|
151
151
|
] })
|
|
@@ -153,7 +153,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
153
153
|
}
|
|
154
154
|
),
|
|
155
155
|
/* @__PURE__ */ a(
|
|
156
|
-
|
|
156
|
+
Ft,
|
|
157
157
|
{
|
|
158
158
|
open: g,
|
|
159
159
|
onClick: d,
|
|
@@ -165,7 +165,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
165
165
|
}
|
|
166
166
|
),
|
|
167
167
|
/* @__PURE__ */ a(
|
|
168
|
-
|
|
168
|
+
te,
|
|
169
169
|
{
|
|
170
170
|
id: "app-menu",
|
|
171
171
|
anchorEl: s,
|
|
@@ -188,32 +188,32 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
188
188
|
},
|
|
189
189
|
children: r.map((p) => /* @__PURE__ */ S(q, { onClick: () => u(p), children: [
|
|
190
190
|
/* @__PURE__ */ a(T, { sx: { display: "flex", alignItems: "center" }, children: p.icon }),
|
|
191
|
-
/* @__PURE__ */ a(
|
|
191
|
+
/* @__PURE__ */ a(_, { variant: "body1", sx: { ml: 2 }, children: p.name })
|
|
192
192
|
] }, p.id))
|
|
193
193
|
}
|
|
194
194
|
)
|
|
195
195
|
] });
|
|
196
196
|
})
|
|
197
|
-
),
|
|
198
|
-
const
|
|
199
|
-
return
|
|
200
|
-
}, N = (
|
|
201
|
-
const o = Math.floor(
|
|
197
|
+
), mo = (e) => {
|
|
198
|
+
const t = Math.floor(e / 86400), o = Math.floor(e % 86400 / 3600), r = Math.floor(e % 3600 / 60), i = e % 60, n = [];
|
|
199
|
+
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(":");
|
|
200
|
+
}, N = (e, t) => {
|
|
201
|
+
const o = Math.floor(e / 86400), r = Math.floor(e % 86400 / 3600), i = Math.floor(e % 3600 / 60), n = e % 60;
|
|
202
202
|
if (typeof Intl < "u" && "DurationFormat" in Intl)
|
|
203
203
|
try {
|
|
204
204
|
const s = {};
|
|
205
|
-
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(
|
|
205
|
+
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);
|
|
206
206
|
} catch {
|
|
207
207
|
}
|
|
208
208
|
const c = [];
|
|
209
209
|
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(" ");
|
|
210
|
-
},
|
|
211
|
-
timerState:
|
|
212
|
-
animationState:
|
|
210
|
+
}, ho = (e, t, o) => e === "countdown" && o !== null ? Math.min(100, t / o * 100) : e === "measuring" ? t / 60 % 1 * 100 : 0, fo = ({
|
|
211
|
+
timerState: e,
|
|
212
|
+
animationState: t,
|
|
213
213
|
hasError: o,
|
|
214
214
|
className: r
|
|
215
215
|
}) => {
|
|
216
|
-
const { t: i, i18n: n } = V(), c = F(), { currentState: s, remainingTime: l, maxTime: g, currentProgress: m } =
|
|
216
|
+
const { t: i, i18n: n } = V(), c = F(), { currentState: s, remainingTime: l, maxTime: g, currentProgress: m } = e, {
|
|
217
217
|
showErrorAnimation: d,
|
|
218
218
|
showPauseAnimation: u,
|
|
219
219
|
showPulsatingText: p,
|
|
@@ -222,7 +222,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
222
222
|
showMainText: f,
|
|
223
223
|
showIdlePulsating: h,
|
|
224
224
|
idleDotsCount: v
|
|
225
|
-
} =
|
|
225
|
+
} = t;
|
|
226
226
|
return /* @__PURE__ */ S(
|
|
227
227
|
T,
|
|
228
228
|
{
|
|
@@ -237,7 +237,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
237
237
|
},
|
|
238
238
|
children: [
|
|
239
239
|
/* @__PURE__ */ a(
|
|
240
|
-
|
|
240
|
+
ie,
|
|
241
241
|
{
|
|
242
242
|
width: 264,
|
|
243
243
|
height: 264,
|
|
@@ -308,7 +308,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
308
308
|
in: y && !o && s !== "idle" && s !== "success",
|
|
309
309
|
timeout: 300,
|
|
310
310
|
children: /* @__PURE__ */ a(
|
|
311
|
-
|
|
311
|
+
_,
|
|
312
312
|
{
|
|
313
313
|
variant: "body2",
|
|
314
314
|
sx: {
|
|
@@ -350,7 +350,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
350
350
|
in: f && s === "idle" && !o,
|
|
351
351
|
timeout: 200,
|
|
352
352
|
children: /* @__PURE__ */ S(
|
|
353
|
-
|
|
353
|
+
_,
|
|
354
354
|
{
|
|
355
355
|
variant: "body2",
|
|
356
356
|
sx: {
|
|
@@ -400,7 +400,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
400
400
|
}
|
|
401
401
|
),
|
|
402
402
|
/* @__PURE__ */ a(U, { in: f && o, timeout: 200, children: /* @__PURE__ */ a(
|
|
403
|
-
|
|
403
|
+
_,
|
|
404
404
|
{
|
|
405
405
|
variant: "h3",
|
|
406
406
|
sx: {
|
|
@@ -419,7 +419,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
419
419
|
in: f && !o && s !== "idle" && s !== "success",
|
|
420
420
|
timeout: 300,
|
|
421
421
|
children: /* @__PURE__ */ a(
|
|
422
|
-
|
|
422
|
+
_,
|
|
423
423
|
{
|
|
424
424
|
variant: "h1",
|
|
425
425
|
sx: {
|
|
@@ -437,7 +437,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
437
437
|
opacity: 1,
|
|
438
438
|
transition: "opacity 2s ease-in-out"
|
|
439
439
|
},
|
|
440
|
-
children:
|
|
440
|
+
children: mo(l)
|
|
441
441
|
}
|
|
442
442
|
)
|
|
443
443
|
}
|
|
@@ -463,7 +463,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
463
463
|
in: y && !o && s !== "idle" && s !== "success",
|
|
464
464
|
timeout: 300,
|
|
465
465
|
children: /* @__PURE__ */ a(
|
|
466
|
-
|
|
466
|
+
_,
|
|
467
467
|
{
|
|
468
468
|
variant: "body2",
|
|
469
469
|
sx: {
|
|
@@ -495,21 +495,21 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
495
495
|
]
|
|
496
496
|
}
|
|
497
497
|
);
|
|
498
|
-
},
|
|
499
|
-
timerState:
|
|
500
|
-
animationState:
|
|
498
|
+
}, bo = ({
|
|
499
|
+
timerState: e,
|
|
500
|
+
animationState: t,
|
|
501
501
|
hasError: o,
|
|
502
502
|
compact: r,
|
|
503
503
|
className: i
|
|
504
504
|
}) => {
|
|
505
|
-
const { t: n, i18n: c } = V(), s = F(), { currentState: l, remainingTime: g, maxTime: m } =
|
|
505
|
+
const { t: n, i18n: c } = V(), s = F(), { currentState: l, remainingTime: g, maxTime: m } = e, {
|
|
506
506
|
showErrorAnimation: d,
|
|
507
507
|
showPauseAnimation: u,
|
|
508
508
|
showPulsatingText: p,
|
|
509
509
|
pulsatingFinished: x,
|
|
510
510
|
showIdlePulsating: y,
|
|
511
511
|
idleDotsCount: f
|
|
512
|
-
} =
|
|
512
|
+
} = t;
|
|
513
513
|
return r && l === "idle" ? /* @__PURE__ */ a(
|
|
514
514
|
T,
|
|
515
515
|
{
|
|
@@ -520,7 +520,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
520
520
|
m: 0
|
|
521
521
|
},
|
|
522
522
|
children: /* @__PURE__ */ a(
|
|
523
|
-
|
|
523
|
+
_,
|
|
524
524
|
{
|
|
525
525
|
variant: "body2",
|
|
526
526
|
sx: {
|
|
@@ -591,7 +591,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
591
591
|
strokeWidth: "2",
|
|
592
592
|
strokeLinecap: "round",
|
|
593
593
|
strokeDasharray: `${2 * Math.PI * 8}`,
|
|
594
|
-
strokeDashoffset: `${2 * Math.PI * 8 * (1 - (l === "idle" ? 0 :
|
|
594
|
+
strokeDashoffset: `${2 * Math.PI * 8 * (1 - (l === "idle" ? 0 : e.currentProgress) / 100)}`,
|
|
595
595
|
style: {
|
|
596
596
|
opacity: l === "measured" && x ? p ? 1 : 0.6 : 1,
|
|
597
597
|
transition: "stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"
|
|
@@ -604,7 +604,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
604
604
|
}
|
|
605
605
|
),
|
|
606
606
|
/* @__PURE__ */ a(
|
|
607
|
-
|
|
607
|
+
_,
|
|
608
608
|
{
|
|
609
609
|
variant: "body2",
|
|
610
610
|
sx: {
|
|
@@ -634,8 +634,8 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
634
634
|
]
|
|
635
635
|
}
|
|
636
636
|
);
|
|
637
|
-
},
|
|
638
|
-
const [
|
|
637
|
+
}, xo = () => {
|
|
638
|
+
const [e, t] = B({
|
|
639
639
|
showPauseAnimation: !1,
|
|
640
640
|
showErrorAnimation: !1,
|
|
641
641
|
showPulsatingText: !1,
|
|
@@ -644,92 +644,92 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
644
644
|
showMainText: !0,
|
|
645
645
|
showIdlePulsating: !1,
|
|
646
646
|
idleDotsCount: 0
|
|
647
|
-
}), o =
|
|
647
|
+
}), o = O(
|
|
648
648
|
null
|
|
649
|
-
), r =
|
|
649
|
+
), r = O(
|
|
650
650
|
null
|
|
651
|
-
), i =
|
|
651
|
+
), i = O(
|
|
652
652
|
null
|
|
653
|
-
), n =
|
|
653
|
+
), n = O(null), c = O(0), s = O(null), l = O(
|
|
654
654
|
null
|
|
655
|
-
), g =
|
|
656
|
-
|
|
657
|
-
|
|
655
|
+
), g = j(() => {
|
|
656
|
+
t((b) => ({ ...b, showPauseAnimation: !0 })), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
|
|
657
|
+
t((b) => ({ ...b, showPauseAnimation: !1 }));
|
|
658
658
|
}, 800);
|
|
659
|
-
}, []), m =
|
|
660
|
-
|
|
661
|
-
|
|
659
|
+
}, []), m = j(() => {
|
|
660
|
+
t((b) => ({ ...b, showErrorAnimation: !0 })), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
|
|
661
|
+
t((b) => ({ ...b, showErrorAnimation: !1 }));
|
|
662
662
|
}, 600);
|
|
663
|
-
}, []), d =
|
|
664
|
-
|
|
665
|
-
}, []), u =
|
|
666
|
-
c.current = 0,
|
|
667
|
-
...
|
|
663
|
+
}, []), d = j(() => {
|
|
664
|
+
t((b) => ({ ...b, showErrorAnimation: !1 })), r.current && clearTimeout(r.current);
|
|
665
|
+
}, []), u = j((b) => {
|
|
666
|
+
c.current = 0, t((C) => ({
|
|
667
|
+
...C,
|
|
668
668
|
showPulsatingText: !0,
|
|
669
669
|
pulsatingFinished: !1
|
|
670
670
|
})), setTimeout(() => {
|
|
671
|
-
|
|
672
|
-
...
|
|
671
|
+
t((C) => ({
|
|
672
|
+
...C,
|
|
673
673
|
pulsatingFinished: !0
|
|
674
674
|
// This will keep the success color and start slow pulsating
|
|
675
675
|
})), i.current = setInterval(() => {
|
|
676
|
-
|
|
677
|
-
...
|
|
678
|
-
showPulsatingText: !
|
|
676
|
+
t((C) => ({
|
|
677
|
+
...C,
|
|
678
|
+
showPulsatingText: !C.showPulsatingText
|
|
679
679
|
}));
|
|
680
680
|
}, 2e3), b && b();
|
|
681
681
|
}, 800);
|
|
682
|
-
}, []), p =
|
|
683
|
-
i.current && (clearInterval(i.current), i.current = null),
|
|
682
|
+
}, []), p = j(() => {
|
|
683
|
+
i.current && (clearInterval(i.current), i.current = null), t((b) => ({
|
|
684
684
|
...b,
|
|
685
685
|
showPulsatingText: !1,
|
|
686
686
|
pulsatingFinished: !1
|
|
687
687
|
})), c.current = 0;
|
|
688
|
-
}, []), x =
|
|
689
|
-
|
|
688
|
+
}, []), x = j(() => {
|
|
689
|
+
t((b) => ({
|
|
690
690
|
...b,
|
|
691
691
|
showIdlePulsating: !0
|
|
692
692
|
})), s.current = setInterval(() => {
|
|
693
|
-
|
|
693
|
+
t((b) => ({
|
|
694
694
|
...b,
|
|
695
695
|
showIdlePulsating: !b.showIdlePulsating
|
|
696
696
|
}));
|
|
697
697
|
}, 2e3), l.current = setInterval(() => {
|
|
698
|
-
|
|
698
|
+
t((b) => ({
|
|
699
699
|
...b,
|
|
700
700
|
idleDotsCount: (b.idleDotsCount + 1) % 4
|
|
701
701
|
// Cycle through 0, 1, 2, 3
|
|
702
702
|
}));
|
|
703
703
|
}, 800);
|
|
704
|
-
}, []), y =
|
|
705
|
-
s.current && (clearInterval(s.current), s.current = null), l.current && (clearInterval(l.current), l.current = null),
|
|
704
|
+
}, []), y = j(() => {
|
|
705
|
+
s.current && (clearInterval(s.current), s.current = null), l.current && (clearInterval(l.current), l.current = null), t((b) => ({
|
|
706
706
|
...b,
|
|
707
707
|
showIdlePulsating: !1,
|
|
708
708
|
idleDotsCount: 0
|
|
709
709
|
}));
|
|
710
|
-
}, []), f =
|
|
711
|
-
|
|
710
|
+
}, []), f = j(() => {
|
|
711
|
+
t((b) => ({
|
|
712
712
|
...b,
|
|
713
713
|
showLabels: !1,
|
|
714
714
|
showMainText: !1
|
|
715
715
|
})), n.current && clearTimeout(n.current), n.current = setTimeout(() => {
|
|
716
|
-
|
|
716
|
+
t((b) => ({
|
|
717
717
|
...b,
|
|
718
718
|
showLabels: !0,
|
|
719
719
|
showMainText: !0
|
|
720
720
|
}));
|
|
721
721
|
}, 200);
|
|
722
|
-
}, []), h =
|
|
723
|
-
|
|
722
|
+
}, []), h = j(() => {
|
|
723
|
+
t((b) => ({
|
|
724
724
|
...b,
|
|
725
725
|
showLabels: !0,
|
|
726
726
|
showMainText: !0
|
|
727
727
|
}));
|
|
728
|
-
}, []), v =
|
|
728
|
+
}, []), v = j(() => {
|
|
729
729
|
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);
|
|
730
730
|
}, []);
|
|
731
731
|
return {
|
|
732
|
-
animationState:
|
|
732
|
+
animationState: e,
|
|
733
733
|
triggerPauseAnimation: g,
|
|
734
734
|
triggerErrorAnimation: m,
|
|
735
735
|
clearErrorAnimation: d,
|
|
@@ -741,9 +741,9 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
741
741
|
setInitialAnimationState: h,
|
|
742
742
|
cleanup: v
|
|
743
743
|
};
|
|
744
|
-
},
|
|
745
|
-
autoStart:
|
|
746
|
-
onCycleEnd:
|
|
744
|
+
}, yo = ({
|
|
745
|
+
autoStart: e,
|
|
746
|
+
onCycleEnd: t,
|
|
747
747
|
onMeasuringComplete: o,
|
|
748
748
|
hasError: r,
|
|
749
749
|
onPauseAnimation: i,
|
|
@@ -759,15 +759,15 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
759
759
|
isPausedState: !1,
|
|
760
760
|
currentProgress: 0,
|
|
761
761
|
wasRunningBeforeError: !1
|
|
762
|
-
}), m =
|
|
762
|
+
}), m = O(null), d = O(null), u = O(0), [p] = $t([0], {
|
|
763
763
|
tension: 80,
|
|
764
764
|
friction: 18,
|
|
765
|
-
onChange: ([
|
|
766
|
-
g((M) => ({ ...M, currentProgress:
|
|
765
|
+
onChange: ([w]) => {
|
|
766
|
+
g((M) => ({ ...M, currentProgress: w }));
|
|
767
767
|
}
|
|
768
|
-
}), x =
|
|
769
|
-
g((
|
|
770
|
-
...
|
|
768
|
+
}), x = j(() => {
|
|
769
|
+
g((w) => ({
|
|
770
|
+
...w,
|
|
771
771
|
currentState: "idle",
|
|
772
772
|
maxTime: null,
|
|
773
773
|
// Don't reset remainingTime - keep the last value
|
|
@@ -776,60 +776,60 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
776
776
|
currentProgress: 0
|
|
777
777
|
// Reset progress to 0 for gauge
|
|
778
778
|
})), u.current = 0, d.current = null, p.setImmediate([0]);
|
|
779
|
-
}, [p]), y =
|
|
780
|
-
(
|
|
781
|
-
const M =
|
|
782
|
-
g((
|
|
783
|
-
...
|
|
779
|
+
}, [p]), y = j(
|
|
780
|
+
(w = 0) => {
|
|
781
|
+
const M = w / 60 % 1 * 100;
|
|
782
|
+
g((I) => ({
|
|
783
|
+
...I,
|
|
784
784
|
currentState: "measuring",
|
|
785
785
|
maxTime: null,
|
|
786
|
-
remainingTime:
|
|
786
|
+
remainingTime: w,
|
|
787
787
|
isPausedState: !1,
|
|
788
788
|
currentProgress: M
|
|
789
789
|
// Immediately set progress
|
|
790
|
-
})), u.current = 0, p.setImmediate([M]),
|
|
790
|
+
})), u.current = 0, p.setImmediate([M]), e ? (d.current = Date.now() - w * 1e3, g((I) => ({ ...I, isRunning: !0 }))) : d.current = null;
|
|
791
791
|
},
|
|
792
|
-
[
|
|
793
|
-
), f =
|
|
794
|
-
(
|
|
795
|
-
g((
|
|
796
|
-
...
|
|
792
|
+
[e, p]
|
|
793
|
+
), f = j(
|
|
794
|
+
(w, M = 0) => {
|
|
795
|
+
g((k) => ({ ...k, isRunning: !1 })), d.current = null, g((k) => ({
|
|
796
|
+
...k,
|
|
797
797
|
currentState: "countdown",
|
|
798
|
-
maxTime:
|
|
798
|
+
maxTime: w,
|
|
799
799
|
isPausedState: !1
|
|
800
800
|
})), u.current = 0;
|
|
801
|
-
const
|
|
802
|
-
g((
|
|
803
|
-
...
|
|
804
|
-
remainingTime:
|
|
801
|
+
const I = Math.max(0, w - M), R = M > 0 ? M / w * 100 : 0;
|
|
802
|
+
g((k) => ({
|
|
803
|
+
...k,
|
|
804
|
+
remainingTime: I,
|
|
805
805
|
currentProgress: R
|
|
806
806
|
// Immediately set progress
|
|
807
|
-
})), p.setImmediate([R]),
|
|
808
|
-
d.current = Date.now() - M * 1e3, g((
|
|
807
|
+
})), p.setImmediate([R]), I === 0 ? (g((k) => ({ ...k, isRunning: !1 })), d.current = null, t && queueMicrotask(() => t())) : e ? setTimeout(() => {
|
|
808
|
+
d.current = Date.now() - M * 1e3, g((k) => ({ ...k, isRunning: !0 }));
|
|
809
809
|
}, 0) : d.current = null;
|
|
810
810
|
},
|
|
811
|
-
[
|
|
812
|
-
), h =
|
|
813
|
-
g((
|
|
814
|
-
...
|
|
811
|
+
[e, t, p]
|
|
812
|
+
), h = j(() => {
|
|
813
|
+
g((w) => ({
|
|
814
|
+
...w,
|
|
815
815
|
isRunning: !1,
|
|
816
816
|
currentState: "measured"
|
|
817
817
|
})), d.current = null, s(() => {
|
|
818
818
|
o && o();
|
|
819
819
|
});
|
|
820
|
-
}, [s, o]), v =
|
|
820
|
+
}, [s, o]), v = j(() => {
|
|
821
821
|
if (d.current && l.isRunning) {
|
|
822
822
|
const M = Date.now() - d.current;
|
|
823
823
|
u.current += M;
|
|
824
|
-
const
|
|
824
|
+
const I = u.current / 1e3, R = ho(
|
|
825
825
|
l.currentState,
|
|
826
|
-
|
|
826
|
+
I,
|
|
827
827
|
l.maxTime
|
|
828
828
|
);
|
|
829
829
|
p.setTarget([R]);
|
|
830
830
|
}
|
|
831
|
-
g((
|
|
832
|
-
...
|
|
831
|
+
g((w) => ({
|
|
832
|
+
...w,
|
|
833
833
|
isRunning: !1,
|
|
834
834
|
isPausedState: !0
|
|
835
835
|
})), i();
|
|
@@ -839,9 +839,9 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
839
839
|
l.maxTime,
|
|
840
840
|
p,
|
|
841
841
|
i
|
|
842
|
-
]), b =
|
|
843
|
-
l.isPausedState && (l.remainingTime > 0 || l.currentState !== "countdown") && (d.current = Date.now(), g((
|
|
844
|
-
...
|
|
842
|
+
]), b = j(() => {
|
|
843
|
+
l.isPausedState && (l.remainingTime > 0 || l.currentState !== "countdown") && (d.current = Date.now(), g((w) => ({
|
|
844
|
+
...w,
|
|
845
845
|
isRunning: !0,
|
|
846
846
|
isPausedState: !1
|
|
847
847
|
})));
|
|
@@ -849,9 +849,9 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
849
849
|
l.isPausedState,
|
|
850
850
|
l.remainingTime,
|
|
851
851
|
l.currentState
|
|
852
|
-
]),
|
|
852
|
+
]), C = j(() => l.isPausedState, [l.isPausedState]);
|
|
853
853
|
return A(() => {
|
|
854
|
-
r ? (l.isRunning && !l.isPausedState && (g((
|
|
854
|
+
r ? (l.isRunning && !l.isPausedState && (g((w) => ({ ...w, wasRunningBeforeError: !0 })), v()), n()) : (l.wasRunningBeforeError && l.isPausedState && (g((w) => ({ ...w, wasRunningBeforeError: !1 })), b()), c());
|
|
855
855
|
}, [
|
|
856
856
|
r,
|
|
857
857
|
l.isRunning,
|
|
@@ -863,36 +863,36 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
863
863
|
c
|
|
864
864
|
]), A(() => {
|
|
865
865
|
if (l.isRunning) {
|
|
866
|
-
const
|
|
866
|
+
const w = () => {
|
|
867
867
|
if (d.current) {
|
|
868
|
-
const
|
|
868
|
+
const I = (Date.now() - d.current + u.current) / 1e3;
|
|
869
869
|
if (l.currentState === "countdown" && l.maxTime !== null) {
|
|
870
|
-
const R = Math.max(0, l.maxTime -
|
|
871
|
-
g((
|
|
872
|
-
...
|
|
870
|
+
const R = Math.max(0, l.maxTime - I);
|
|
871
|
+
g((E) => ({
|
|
872
|
+
...E,
|
|
873
873
|
remainingTime: Math.ceil(R)
|
|
874
874
|
}));
|
|
875
|
-
const
|
|
876
|
-
if (p.setTarget([
|
|
877
|
-
g((
|
|
878
|
-
...
|
|
875
|
+
const k = Math.min(100, I / l.maxTime * 100);
|
|
876
|
+
if (p.setTarget([k]), R <= 0) {
|
|
877
|
+
g((E) => ({
|
|
878
|
+
...E,
|
|
879
879
|
isRunning: !1,
|
|
880
880
|
remainingTime: 0
|
|
881
|
-
})), d.current = null, p.setTarget([100]),
|
|
881
|
+
})), d.current = null, p.setTarget([100]), t && queueMicrotask(() => t());
|
|
882
882
|
return;
|
|
883
883
|
}
|
|
884
884
|
} else if (l.currentState === "measuring") {
|
|
885
|
-
g((
|
|
886
|
-
...
|
|
887
|
-
remainingTime: Math.floor(
|
|
885
|
+
g((k) => ({
|
|
886
|
+
...k,
|
|
887
|
+
remainingTime: Math.floor(I)
|
|
888
888
|
}));
|
|
889
|
-
const R =
|
|
889
|
+
const R = I / 60 % 1 * 100;
|
|
890
890
|
p.setTarget([R]);
|
|
891
891
|
}
|
|
892
|
-
l.isRunning && (m.current = requestAnimationFrame(
|
|
892
|
+
l.isRunning && (m.current = requestAnimationFrame(w));
|
|
893
893
|
}
|
|
894
894
|
};
|
|
895
|
-
m.current = requestAnimationFrame(
|
|
895
|
+
m.current = requestAnimationFrame(w);
|
|
896
896
|
} else
|
|
897
897
|
m.current && (cancelAnimationFrame(m.current), m.current = null);
|
|
898
898
|
return () => {
|
|
@@ -900,17 +900,17 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
900
900
|
};
|
|
901
901
|
}, [
|
|
902
902
|
l.isRunning,
|
|
903
|
-
|
|
903
|
+
t,
|
|
904
904
|
l.currentState,
|
|
905
905
|
l.maxTime,
|
|
906
906
|
p
|
|
907
907
|
]), A(() => {
|
|
908
|
-
let
|
|
908
|
+
let w = null;
|
|
909
909
|
const M = () => {
|
|
910
|
-
p.update(1 / 60),
|
|
910
|
+
p.update(1 / 60), w = requestAnimationFrame(M);
|
|
911
911
|
};
|
|
912
|
-
return
|
|
913
|
-
|
|
912
|
+
return w = requestAnimationFrame(M), () => {
|
|
913
|
+
w && cancelAnimationFrame(w);
|
|
914
914
|
};
|
|
915
915
|
}, [p]), {
|
|
916
916
|
timerState: l,
|
|
@@ -921,14 +921,14 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
921
921
|
completeMeasuring: h,
|
|
922
922
|
pause: v,
|
|
923
923
|
resume: b,
|
|
924
|
-
isPaused:
|
|
924
|
+
isPaused: C
|
|
925
925
|
}
|
|
926
926
|
};
|
|
927
|
-
},
|
|
927
|
+
}, pi = $(
|
|
928
928
|
J(
|
|
929
929
|
({
|
|
930
|
-
onCycleComplete:
|
|
931
|
-
onCycleEnd:
|
|
930
|
+
onCycleComplete: e,
|
|
931
|
+
onCycleEnd: t,
|
|
932
932
|
onMeasuringComplete: o,
|
|
933
933
|
autoStart: r = !0,
|
|
934
934
|
variant: i = "default",
|
|
@@ -936,7 +936,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
936
936
|
className: c,
|
|
937
937
|
hasError: s = !1
|
|
938
938
|
}) => {
|
|
939
|
-
const l =
|
|
939
|
+
const l = O(void 0), {
|
|
940
940
|
animationState: g,
|
|
941
941
|
triggerPauseAnimation: m,
|
|
942
942
|
triggerErrorAnimation: d,
|
|
@@ -948,9 +948,9 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
948
948
|
triggerFadeTransition: h,
|
|
949
949
|
setInitialAnimationState: v,
|
|
950
950
|
cleanup: b
|
|
951
|
-
} =
|
|
951
|
+
} = xo(), { timerState: C, controls: w } = yo({
|
|
952
952
|
autoStart: r,
|
|
953
|
-
onCycleEnd:
|
|
953
|
+
onCycleEnd: t,
|
|
954
954
|
onMeasuringComplete: o,
|
|
955
955
|
hasError: s,
|
|
956
956
|
onPauseAnimation: m,
|
|
@@ -960,9 +960,9 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
960
960
|
});
|
|
961
961
|
return A(() => {
|
|
962
962
|
const M = l.current;
|
|
963
|
-
l.current !== void 0 && M !==
|
|
963
|
+
l.current !== void 0 && M !== C.currentState ? (M === "measured" && x(), M === "idle" && f(), h()) : v(), C.currentState === "idle" && y(), l.current = C.currentState;
|
|
964
964
|
}, [
|
|
965
|
-
|
|
965
|
+
C.currentState,
|
|
966
966
|
x,
|
|
967
967
|
f,
|
|
968
968
|
y,
|
|
@@ -970,25 +970,25 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
970
970
|
v
|
|
971
971
|
]), A(() => {
|
|
972
972
|
let M = !0;
|
|
973
|
-
const
|
|
974
|
-
M &&
|
|
973
|
+
const I = setTimeout(() => {
|
|
974
|
+
M && e(w);
|
|
975
975
|
}, 0);
|
|
976
976
|
return () => {
|
|
977
|
-
M = !1, clearTimeout(
|
|
977
|
+
M = !1, clearTimeout(I);
|
|
978
978
|
};
|
|
979
|
-
}, [
|
|
980
|
-
|
|
979
|
+
}, [e, w]), A(() => b, [b]), i === "small" ? /* @__PURE__ */ a(
|
|
980
|
+
bo,
|
|
981
981
|
{
|
|
982
|
-
timerState:
|
|
982
|
+
timerState: C,
|
|
983
983
|
animationState: g,
|
|
984
984
|
hasError: s,
|
|
985
985
|
compact: n,
|
|
986
986
|
className: c
|
|
987
987
|
}
|
|
988
988
|
) : /* @__PURE__ */ a(
|
|
989
|
-
|
|
989
|
+
fo,
|
|
990
990
|
{
|
|
991
|
-
timerState:
|
|
991
|
+
timerState: C,
|
|
992
992
|
animationState: g,
|
|
993
993
|
hasError: s,
|
|
994
994
|
className: c
|
|
@@ -996,11 +996,11 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
996
996
|
);
|
|
997
997
|
}
|
|
998
998
|
)
|
|
999
|
-
),
|
|
999
|
+
), So = $(
|
|
1000
1000
|
J(
|
|
1001
1001
|
({
|
|
1002
|
-
data:
|
|
1003
|
-
columns:
|
|
1002
|
+
data: e,
|
|
1003
|
+
columns: t,
|
|
1004
1004
|
getRowData: o,
|
|
1005
1005
|
onRowClick: r,
|
|
1006
1006
|
selectedItem: i,
|
|
@@ -1014,46 +1014,46 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1014
1014
|
sx: u
|
|
1015
1015
|
}) => {
|
|
1016
1016
|
var R;
|
|
1017
|
-
const p = F(), x =
|
|
1017
|
+
const p = F(), x = le(), y = O(null), [f, h] = B(null), v = rt(() => e.map(o), [e, o]);
|
|
1018
1018
|
A(() => {
|
|
1019
1019
|
x.current && v.length > 0 && x.current.autosizeColumns({
|
|
1020
1020
|
includeOutliers: !0,
|
|
1021
1021
|
includeHeaders: !0,
|
|
1022
1022
|
expand: !0,
|
|
1023
|
-
columns:
|
|
1023
|
+
columns: t.map((k) => k.field)
|
|
1024
1024
|
});
|
|
1025
|
-
}, [v,
|
|
1025
|
+
}, [v, t, x]), A(() => {
|
|
1026
1026
|
if (!y.current || !x.current) return;
|
|
1027
|
-
const
|
|
1027
|
+
const k = new ResizeObserver(() => {
|
|
1028
1028
|
setTimeout(() => {
|
|
1029
1029
|
x.current && v.length > 0 && x.current.autosizeColumns({
|
|
1030
1030
|
includeOutliers: !0,
|
|
1031
1031
|
includeHeaders: !0,
|
|
1032
1032
|
expand: !0,
|
|
1033
|
-
columns:
|
|
1033
|
+
columns: t.map((E) => E.field)
|
|
1034
1034
|
});
|
|
1035
1035
|
}, 100);
|
|
1036
1036
|
});
|
|
1037
|
-
return
|
|
1038
|
-
|
|
1037
|
+
return k.observe(y.current), () => {
|
|
1038
|
+
k.disconnect();
|
|
1039
1039
|
};
|
|
1040
|
-
}, [x, v.length,
|
|
1040
|
+
}, [x, v.length, t]);
|
|
1041
1041
|
const b = rt(() => {
|
|
1042
1042
|
if (i !== void 0)
|
|
1043
1043
|
return i;
|
|
1044
1044
|
if (f !== null)
|
|
1045
1045
|
return f;
|
|
1046
|
-
if (d &&
|
|
1047
|
-
const
|
|
1048
|
-
return h(
|
|
1046
|
+
if (d && e.length > 0) {
|
|
1047
|
+
const k = e[0];
|
|
1048
|
+
return h(k), k;
|
|
1049
1049
|
}
|
|
1050
1050
|
return null;
|
|
1051
|
-
}, [d,
|
|
1052
|
-
const
|
|
1053
|
-
|
|
1054
|
-
},
|
|
1051
|
+
}, [d, e, i, f]), C = (k) => {
|
|
1052
|
+
const E = e.find((z) => o(z).id === k.id);
|
|
1053
|
+
E && (i === void 0 && h(E), r && r(E, k));
|
|
1054
|
+
}, w = rt(() => !b || !n ? null : n(b), [b, n]);
|
|
1055
1055
|
function M() {
|
|
1056
|
-
return /* @__PURE__ */ a(
|
|
1056
|
+
return /* @__PURE__ */ a(de, { children: /* @__PURE__ */ S(
|
|
1057
1057
|
T,
|
|
1058
1058
|
{
|
|
1059
1059
|
sx: {
|
|
@@ -1065,7 +1065,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1065
1065
|
},
|
|
1066
1066
|
children: [
|
|
1067
1067
|
c && /* @__PURE__ */ S(
|
|
1068
|
-
|
|
1068
|
+
_,
|
|
1069
1069
|
{
|
|
1070
1070
|
variant: "h6",
|
|
1071
1071
|
sx: {
|
|
@@ -1074,7 +1074,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1074
1074
|
},
|
|
1075
1075
|
children: [
|
|
1076
1076
|
c,
|
|
1077
|
-
s && ` (${
|
|
1077
|
+
s && ` (${e.length})`
|
|
1078
1078
|
]
|
|
1079
1079
|
}
|
|
1080
1080
|
),
|
|
@@ -1090,9 +1090,9 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1090
1090
|
},
|
|
1091
1091
|
children: [
|
|
1092
1092
|
/* @__PURE__ */ a(
|
|
1093
|
-
|
|
1093
|
+
ue,
|
|
1094
1094
|
{
|
|
1095
|
-
render: /* @__PURE__ */ a(st, { "aria-label": "Show filters", children: /* @__PURE__ */ a(
|
|
1095
|
+
render: /* @__PURE__ */ a(st, { "aria-label": "Show filters", children: /* @__PURE__ */ a(se, { fontSize: "small" }) })
|
|
1096
1096
|
}
|
|
1097
1097
|
),
|
|
1098
1098
|
/* @__PURE__ */ a(
|
|
@@ -1107,19 +1107,19 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1107
1107
|
}
|
|
1108
1108
|
),
|
|
1109
1109
|
/* @__PURE__ */ a(
|
|
1110
|
-
|
|
1110
|
+
ge,
|
|
1111
1111
|
{
|
|
1112
|
-
render: (
|
|
1112
|
+
render: (k, E) => /* @__PURE__ */ S(
|
|
1113
1113
|
T,
|
|
1114
1114
|
{
|
|
1115
|
-
...
|
|
1115
|
+
...k,
|
|
1116
1116
|
sx: {
|
|
1117
1117
|
display: "flex",
|
|
1118
1118
|
overflow: "hidden"
|
|
1119
1119
|
},
|
|
1120
1120
|
children: [
|
|
1121
|
-
!
|
|
1122
|
-
|
|
1121
|
+
!E.expanded && /* @__PURE__ */ a(
|
|
1122
|
+
pe,
|
|
1123
1123
|
{
|
|
1124
1124
|
render: /* @__PURE__ */ a(st, { "aria-label": "Search", children: /* @__PURE__ */ a(It, { fontSize: "small" }) })
|
|
1125
1125
|
}
|
|
@@ -1131,7 +1131,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1131
1131
|
display: "flex",
|
|
1132
1132
|
overflow: "hidden",
|
|
1133
1133
|
transition: "all 0.3s ease-in-out",
|
|
1134
|
-
width:
|
|
1134
|
+
width: E.expanded ? "200px" : "0px",
|
|
1135
1135
|
position: "relative"
|
|
1136
1136
|
},
|
|
1137
1137
|
children: [
|
|
@@ -1146,7 +1146,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1146
1146
|
borderRadius: "16px",
|
|
1147
1147
|
backgroundColor: "#171927",
|
|
1148
1148
|
paddingLeft: "40px",
|
|
1149
|
-
paddingRight:
|
|
1149
|
+
paddingRight: E.expanded && E.value !== "" ? "40px" : "12px",
|
|
1150
1150
|
color: "white",
|
|
1151
1151
|
fontSize: "14px",
|
|
1152
1152
|
border: "none !important",
|
|
@@ -1220,7 +1220,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1220
1220
|
}
|
|
1221
1221
|
},
|
|
1222
1222
|
children: [
|
|
1223
|
-
|
|
1223
|
+
E.expanded && /* @__PURE__ */ a(
|
|
1224
1224
|
It,
|
|
1225
1225
|
{
|
|
1226
1226
|
fontSize: "small",
|
|
@@ -1235,12 +1235,12 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
1237
|
),
|
|
1238
|
-
/* @__PURE__ */ a(
|
|
1238
|
+
/* @__PURE__ */ a(me, { placeholder: l })
|
|
1239
1239
|
]
|
|
1240
1240
|
}
|
|
1241
1241
|
),
|
|
1242
|
-
|
|
1243
|
-
|
|
1242
|
+
E.expanded && E.value !== "" && /* @__PURE__ */ a(
|
|
1243
|
+
he,
|
|
1244
1244
|
{
|
|
1245
1245
|
render: /* @__PURE__ */ a(
|
|
1246
1246
|
T,
|
|
@@ -1265,7 +1265,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1265
1265
|
backgroundColor: "rgba(255, 255, 255, 0.1)"
|
|
1266
1266
|
}
|
|
1267
1267
|
},
|
|
1268
|
-
children: /* @__PURE__ */ a(st, { "aria-label": "Clear", children: /* @__PURE__ */ a(
|
|
1268
|
+
children: /* @__PURE__ */ a(st, { "aria-label": "Clear", children: /* @__PURE__ */ a(ae, { fontSize: "small" }) })
|
|
1269
1269
|
}
|
|
1270
1270
|
)
|
|
1271
1271
|
}
|
|
@@ -1287,7 +1287,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1287
1287
|
}
|
|
1288
1288
|
) });
|
|
1289
1289
|
}
|
|
1290
|
-
const
|
|
1290
|
+
const I = m || M;
|
|
1291
1291
|
return /* @__PURE__ */ a(
|
|
1292
1292
|
T,
|
|
1293
1293
|
{
|
|
@@ -1326,12 +1326,12 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1326
1326
|
...u
|
|
1327
1327
|
},
|
|
1328
1328
|
children: /* @__PURE__ */ a(
|
|
1329
|
-
|
|
1329
|
+
ce,
|
|
1330
1330
|
{
|
|
1331
1331
|
apiRef: x,
|
|
1332
1332
|
rows: v,
|
|
1333
|
-
columns:
|
|
1334
|
-
onRowClick:
|
|
1333
|
+
columns: t,
|
|
1334
|
+
onRowClick: C,
|
|
1335
1335
|
disableColumnMenu: !1,
|
|
1336
1336
|
disableRowSelectionOnClick: !0,
|
|
1337
1337
|
disableMultipleRowSelection: !0,
|
|
@@ -1341,7 +1341,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1341
1341
|
hideFooter: !1,
|
|
1342
1342
|
showToolbar: !0,
|
|
1343
1343
|
slots: {
|
|
1344
|
-
toolbar:
|
|
1344
|
+
toolbar: I
|
|
1345
1345
|
},
|
|
1346
1346
|
initialState: {
|
|
1347
1347
|
sorting: {
|
|
@@ -1364,7 +1364,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1364
1364
|
includeHeaders: !0,
|
|
1365
1365
|
expand: !0,
|
|
1366
1366
|
// Auto-size all columns by default (can be overridden by dataGridProps)
|
|
1367
|
-
columns: ((R = g == null ? void 0 : g.autosizeOptions) == null ? void 0 : R.columns) ||
|
|
1367
|
+
columns: ((R = g == null ? void 0 : g.autosizeOptions) == null ? void 0 : R.columns) || t.map((k) => k.field)
|
|
1368
1368
|
},
|
|
1369
1369
|
sx: {
|
|
1370
1370
|
border: "none",
|
|
@@ -1416,8 +1416,8 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1416
1416
|
}
|
|
1417
1417
|
},
|
|
1418
1418
|
// Highlight selected row with a distinct color using data attribute
|
|
1419
|
-
...
|
|
1420
|
-
[`&[data-id="${
|
|
1419
|
+
...w !== null && {
|
|
1420
|
+
[`&[data-id="${w}"]`]: {
|
|
1421
1421
|
backgroundColor: "transparent !important",
|
|
1422
1422
|
"&::before": {
|
|
1423
1423
|
content: '""',
|
|
@@ -1513,12 +1513,12 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
|
|
|
1513
1513
|
}
|
|
1514
1514
|
)
|
|
1515
1515
|
);
|
|
1516
|
-
|
|
1517
|
-
const
|
|
1516
|
+
So.displayName = "WandelbotsDataGrid";
|
|
1517
|
+
const Pt = $(
|
|
1518
1518
|
J(
|
|
1519
1519
|
({
|
|
1520
|
-
colors:
|
|
1521
|
-
label:
|
|
1520
|
+
colors: e,
|
|
1521
|
+
label: t,
|
|
1522
1522
|
getDisplayedValue: o,
|
|
1523
1523
|
startJogging: r,
|
|
1524
1524
|
stopJogging: i,
|
|
@@ -1526,17 +1526,17 @@ const _t = $(
|
|
|
1526
1526
|
activeJoggingDirection: c,
|
|
1527
1527
|
...s
|
|
1528
1528
|
}) => {
|
|
1529
|
-
var b,
|
|
1529
|
+
var b, C, w, M, I, R, k;
|
|
1530
1530
|
pt(() => {
|
|
1531
|
-
const
|
|
1532
|
-
z && (z.textContent =
|
|
1531
|
+
const E = o(), z = u.current;
|
|
1532
|
+
z && (z.textContent = E);
|
|
1533
1533
|
});
|
|
1534
1534
|
const l = F(), [g, m] = B(null);
|
|
1535
1535
|
A(() => {
|
|
1536
1536
|
n && v();
|
|
1537
1537
|
}, [n]);
|
|
1538
|
-
const d = c || g, u =
|
|
1539
|
-
|
|
1538
|
+
const d = c || g, u = O(null);
|
|
1539
|
+
e || (e = {
|
|
1540
1540
|
color: "#fff",
|
|
1541
1541
|
backgroundColor: "#000",
|
|
1542
1542
|
borderColor: "#000",
|
|
@@ -1548,10 +1548,10 @@ const _t = $(
|
|
|
1548
1548
|
},
|
|
1549
1549
|
labelColor: "#000"
|
|
1550
1550
|
});
|
|
1551
|
-
const p = d ? (b =
|
|
1551
|
+
const p = d ? (b = e.buttonBackgroundColor) == null ? void 0 : b.pressed : e.borderColor, x = {
|
|
1552
1552
|
width: "55px",
|
|
1553
|
-
color:
|
|
1554
|
-
path: { fill:
|
|
1553
|
+
color: e.color,
|
|
1554
|
+
path: { fill: e.color },
|
|
1555
1555
|
alignContent: "center",
|
|
1556
1556
|
fontSize: "37px",
|
|
1557
1557
|
svg: {
|
|
@@ -1559,31 +1559,31 @@ const _t = $(
|
|
|
1559
1559
|
}
|
|
1560
1560
|
}, y = {
|
|
1561
1561
|
...x,
|
|
1562
|
-
backgroundColor: (
|
|
1562
|
+
backgroundColor: (C = e.buttonBackgroundColor) == null ? void 0 : C.default,
|
|
1563
1563
|
":hover": {
|
|
1564
|
-
backgroundColor: (
|
|
1564
|
+
backgroundColor: (w = e.buttonBackgroundColor) == null ? void 0 : w.hovered
|
|
1565
1565
|
},
|
|
1566
1566
|
":active": {
|
|
1567
|
-
backgroundColor: (M =
|
|
1568
|
-
color:
|
|
1569
|
-
path: { fill:
|
|
1567
|
+
backgroundColor: (M = e.buttonBackgroundColor) == null ? void 0 : M.pressed,
|
|
1568
|
+
color: e.backgroundColor,
|
|
1569
|
+
path: { fill: e.backgroundColor }
|
|
1570
1570
|
},
|
|
1571
1571
|
":disabled": {
|
|
1572
|
-
backgroundColor: (
|
|
1572
|
+
backgroundColor: (I = e.buttonBackgroundColor) == null ? void 0 : I.disabled,
|
|
1573
1573
|
"svg path": { fill: l.palette.action.disabled }
|
|
1574
1574
|
}
|
|
1575
1575
|
}, f = {
|
|
1576
1576
|
...x,
|
|
1577
|
-
backgroundColor: (R =
|
|
1578
|
-
color:
|
|
1579
|
-
path: { fill:
|
|
1577
|
+
backgroundColor: (R = e.buttonBackgroundColor) == null ? void 0 : R.pressed,
|
|
1578
|
+
color: e.backgroundColor,
|
|
1579
|
+
path: { fill: e.backgroundColor },
|
|
1580
1580
|
":disabled": {
|
|
1581
|
-
backgroundColor: (
|
|
1581
|
+
backgroundColor: (k = e.buttonBackgroundColor) == null ? void 0 : k.pressed,
|
|
1582
1582
|
"svg path": { fill: l.palette.action.disabled }
|
|
1583
1583
|
}
|
|
1584
1584
|
};
|
|
1585
|
-
function h(
|
|
1586
|
-
n ||
|
|
1585
|
+
function h(E, z) {
|
|
1586
|
+
n || E.button === 0 && (m(z), r(z));
|
|
1587
1587
|
}
|
|
1588
1588
|
function v() {
|
|
1589
1589
|
m(null), i();
|
|
@@ -1594,7 +1594,7 @@ const _t = $(
|
|
|
1594
1594
|
{
|
|
1595
1595
|
disabled: n,
|
|
1596
1596
|
disableRipple: !0,
|
|
1597
|
-
onPointerDown: (
|
|
1597
|
+
onPointerDown: (E) => h(E, "-"),
|
|
1598
1598
|
onPointerUp: v,
|
|
1599
1599
|
onPointerOut: v,
|
|
1600
1600
|
size: "large",
|
|
@@ -1605,7 +1605,7 @@ const _t = $(
|
|
|
1605
1605
|
borderBottom: `2px solid ${p ?? "#fff"}`,
|
|
1606
1606
|
borderTop: `2px solid ${p ?? "#fff"}`
|
|
1607
1607
|
},
|
|
1608
|
-
children: /* @__PURE__ */ a(
|
|
1608
|
+
children: /* @__PURE__ */ a(Oe, {})
|
|
1609
1609
|
}
|
|
1610
1610
|
),
|
|
1611
1611
|
/* @__PURE__ */ S(
|
|
@@ -1614,7 +1614,7 @@ const _t = $(
|
|
|
1614
1614
|
spacing: "6px",
|
|
1615
1615
|
sx: {
|
|
1616
1616
|
width: "150px",
|
|
1617
|
-
backgroundColor:
|
|
1617
|
+
backgroundColor: e.backgroundColor,
|
|
1618
1618
|
alignItems: "center",
|
|
1619
1619
|
justifyContent: "center",
|
|
1620
1620
|
opacity: "0.9",
|
|
@@ -1632,23 +1632,23 @@ const _t = $(
|
|
|
1632
1632
|
spacing: 1,
|
|
1633
1633
|
sx: {
|
|
1634
1634
|
userSelect: "none",
|
|
1635
|
-
color:
|
|
1635
|
+
color: e.color,
|
|
1636
1636
|
".MuiTypography-root": {
|
|
1637
1637
|
fontWeight: 700,
|
|
1638
1638
|
...n ? { color: l.palette.action.disabled } : {}
|
|
1639
1639
|
},
|
|
1640
1640
|
...n ? { "svg path": { fill: l.palette.action.disabled } } : {}
|
|
1641
1641
|
},
|
|
1642
|
-
children:
|
|
1642
|
+
children: t
|
|
1643
1643
|
}
|
|
1644
1644
|
),
|
|
1645
1645
|
/* @__PURE__ */ a(
|
|
1646
|
-
|
|
1646
|
+
_,
|
|
1647
1647
|
{
|
|
1648
1648
|
height: "22px",
|
|
1649
1649
|
sx: {
|
|
1650
1650
|
fontSize: "15px",
|
|
1651
|
-
color: n ? l.palette.action.disabled :
|
|
1651
|
+
color: n ? l.palette.action.disabled : e.color,
|
|
1652
1652
|
fontWeight: 700,
|
|
1653
1653
|
fontVariantNumeric: "tabular-nums",
|
|
1654
1654
|
minWidth: "80px",
|
|
@@ -1666,7 +1666,7 @@ const _t = $(
|
|
|
1666
1666
|
{
|
|
1667
1667
|
disableRipple: !0,
|
|
1668
1668
|
disabled: n,
|
|
1669
|
-
onPointerDown: (
|
|
1669
|
+
onPointerDown: (E) => h(E, "+"),
|
|
1670
1670
|
onPointerUp: v,
|
|
1671
1671
|
onPointerOut: v,
|
|
1672
1672
|
size: "large",
|
|
@@ -1677,17 +1677,17 @@ const _t = $(
|
|
|
1677
1677
|
borderBottom: `2px solid ${p ?? "#fff"}`,
|
|
1678
1678
|
borderTop: `2px solid ${p ?? "#fff"}`
|
|
1679
1679
|
},
|
|
1680
|
-
children: /* @__PURE__ */ a(
|
|
1680
|
+
children: /* @__PURE__ */ a(Ae, {})
|
|
1681
1681
|
}
|
|
1682
1682
|
)
|
|
1683
1683
|
] });
|
|
1684
1684
|
}
|
|
1685
1685
|
)
|
|
1686
|
-
),
|
|
1686
|
+
), vo = $(
|
|
1687
1687
|
J(
|
|
1688
1688
|
({
|
|
1689
|
-
startJogging:
|
|
1690
|
-
stopJogging:
|
|
1689
|
+
startJogging: e,
|
|
1690
|
+
stopJogging: t,
|
|
1691
1691
|
lowerLimit: o,
|
|
1692
1692
|
upperLimit: r,
|
|
1693
1693
|
useDegree: i,
|
|
@@ -1695,52 +1695,52 @@ const _t = $(
|
|
|
1695
1695
|
disabled: c,
|
|
1696
1696
|
...s
|
|
1697
1697
|
}) => {
|
|
1698
|
-
var M,
|
|
1698
|
+
var M, I, R, k, E, z, Q, ot, xt, yt, St, vt, wt, Ct, Tt;
|
|
1699
1699
|
const { t: l } = V(), [g, m] = B(), d = F(), u = {
|
|
1700
1700
|
background: (M = d.palette.backgroundPaperElevation) == null ? void 0 : M[4],
|
|
1701
|
-
color: (
|
|
1702
|
-
}, p =
|
|
1701
|
+
color: (I = d.palette.backgroundPaperElevation) == null ? void 0 : I[11]
|
|
1702
|
+
}, p = Lt(() => ({
|
|
1703
1703
|
activeJoggingDir: null,
|
|
1704
|
-
startJogging(
|
|
1705
|
-
this.activeJoggingDir =
|
|
1704
|
+
startJogging(D) {
|
|
1705
|
+
this.activeJoggingDir = D, e(D);
|
|
1706
1706
|
},
|
|
1707
1707
|
stopJogging() {
|
|
1708
|
-
this.activeJoggingDir = null,
|
|
1708
|
+
this.activeJoggingDir = null, t();
|
|
1709
1709
|
}
|
|
1710
|
-
})), x =
|
|
1711
|
-
const
|
|
1712
|
-
(
|
|
1710
|
+
})), x = Ze(() => {
|
|
1711
|
+
const D = i ? y(n()) : n();
|
|
1712
|
+
(D === void 0 || g === void 0 || Math.abs(g - D) > 1e-9) && m(D);
|
|
1713
1713
|
}, 50);
|
|
1714
1714
|
pt(x);
|
|
1715
|
-
function y(
|
|
1716
|
-
if (
|
|
1717
|
-
return
|
|
1715
|
+
function y(D) {
|
|
1716
|
+
if (D !== void 0)
|
|
1717
|
+
return Nt(D);
|
|
1718
1718
|
}
|
|
1719
|
-
function f(
|
|
1720
|
-
|
|
1719
|
+
function f(D) {
|
|
1720
|
+
D.button === 0 && p.startJogging("-");
|
|
1721
1721
|
}
|
|
1722
|
-
function h(
|
|
1723
|
-
|
|
1722
|
+
function h(D) {
|
|
1723
|
+
D.button === 0 && p.startJogging("+");
|
|
1724
1724
|
}
|
|
1725
|
-
function v(
|
|
1725
|
+
function v(D) {
|
|
1726
1726
|
p.stopJogging();
|
|
1727
1727
|
}
|
|
1728
|
-
function b(
|
|
1728
|
+
function b(D) {
|
|
1729
1729
|
p.stopJogging();
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1732
|
-
if (
|
|
1731
|
+
function C(D, X = 1) {
|
|
1732
|
+
if (D === void 0 || Number.isNaN(D)) return "";
|
|
1733
1733
|
const K = l("General.degree.variable", {
|
|
1734
|
-
amount:
|
|
1734
|
+
amount: D.toFixed(X)
|
|
1735
1735
|
});
|
|
1736
|
-
return
|
|
1736
|
+
return D > 0 && X === 0 ? `+${K}` : K;
|
|
1737
1737
|
}
|
|
1738
|
-
function
|
|
1739
|
-
if (
|
|
1738
|
+
function w(D, X = 1) {
|
|
1739
|
+
if (D === void 0 || Number.isNaN(D)) return "";
|
|
1740
1740
|
const K = l("General.mm.variable", {
|
|
1741
|
-
amount:
|
|
1741
|
+
amount: D.toFixed(X)
|
|
1742
1742
|
});
|
|
1743
|
-
return
|
|
1743
|
+
return D > 0 && X === 0 ? `+${K}` : K;
|
|
1744
1744
|
}
|
|
1745
1745
|
return /* @__PURE__ */ S(
|
|
1746
1746
|
P,
|
|
@@ -1761,12 +1761,12 @@ const _t = $(
|
|
|
1761
1761
|
height: "42px"
|
|
1762
1762
|
},
|
|
1763
1763
|
"&.Mui-disabled": {
|
|
1764
|
-
backgroundColor: (
|
|
1764
|
+
backgroundColor: (k = d.palette.backgroundPaperElevation) == null ? void 0 : k[11],
|
|
1765
1765
|
color: d.palette.action.disabled,
|
|
1766
1766
|
opacity: 1
|
|
1767
1767
|
},
|
|
1768
1768
|
"&:hover": {
|
|
1769
|
-
backgroundColor: (
|
|
1769
|
+
backgroundColor: (E = d.palette.backgroundPaperElevation) == null ? void 0 : E[9]
|
|
1770
1770
|
},
|
|
1771
1771
|
"&:active": {
|
|
1772
1772
|
...u
|
|
@@ -1787,7 +1787,7 @@ const _t = $(
|
|
|
1787
1787
|
...p.activeJoggingDir === "-" ? u : {}
|
|
1788
1788
|
},
|
|
1789
1789
|
children: /* @__PURE__ */ a(
|
|
1790
|
-
|
|
1790
|
+
qe,
|
|
1791
1791
|
{
|
|
1792
1792
|
sx: {
|
|
1793
1793
|
pointerEvents: "none",
|
|
@@ -1815,7 +1815,7 @@ const _t = $(
|
|
|
1815
1815
|
},
|
|
1816
1816
|
children: [
|
|
1817
1817
|
/* @__PURE__ */ a(
|
|
1818
|
-
|
|
1818
|
+
_,
|
|
1819
1819
|
{
|
|
1820
1820
|
sx: {
|
|
1821
1821
|
fontSize: "15px",
|
|
@@ -1827,11 +1827,11 @@ const _t = $(
|
|
|
1827
1827
|
textAlign: "center",
|
|
1828
1828
|
color: c ? d.palette.action.disabled : d.palette.text.primary
|
|
1829
1829
|
},
|
|
1830
|
-
children: i ?
|
|
1830
|
+
children: i ? C(g) : w(g)
|
|
1831
1831
|
}
|
|
1832
1832
|
),
|
|
1833
1833
|
/* @__PURE__ */ a(
|
|
1834
|
-
|
|
1834
|
+
Gt,
|
|
1835
1835
|
{
|
|
1836
1836
|
disabled: !0,
|
|
1837
1837
|
"aria-label": "Joint position",
|
|
@@ -1862,11 +1862,11 @@ const _t = $(
|
|
|
1862
1862
|
marks: o !== void 0 && r !== void 0 && [
|
|
1863
1863
|
{
|
|
1864
1864
|
value: i ? y(o) : o,
|
|
1865
|
-
label: i ?
|
|
1865
|
+
label: i ? C(y(o), 0) : w(o)
|
|
1866
1866
|
},
|
|
1867
1867
|
{
|
|
1868
1868
|
value: i ? y(r) : r,
|
|
1869
|
-
label: i ?
|
|
1869
|
+
label: i ? C(y(r), 0) : w(r)
|
|
1870
1870
|
}
|
|
1871
1871
|
]
|
|
1872
1872
|
}
|
|
@@ -1887,11 +1887,11 @@ const _t = $(
|
|
|
1887
1887
|
...p.activeJoggingDir === "+" ? u : {}
|
|
1888
1888
|
},
|
|
1889
1889
|
children: /* @__PURE__ */ a(
|
|
1890
|
-
|
|
1890
|
+
Ye,
|
|
1891
1891
|
{
|
|
1892
1892
|
sx: {
|
|
1893
1893
|
pointerEvents: "none",
|
|
1894
|
-
color: (Tt = (
|
|
1894
|
+
color: (Tt = (Ct = (wt = (vt = d.componentsExt) == null ? void 0 : vt.JoggingPanel) == null ? void 0 : wt.JoggingJoint) == null ? void 0 : Ct.Joint) == null ? void 0 : Tt.arrowColor
|
|
1895
1895
|
}
|
|
1896
1896
|
}
|
|
1897
1897
|
)
|
|
@@ -1903,53 +1903,53 @@ const _t = $(
|
|
|
1903
1903
|
}
|
|
1904
1904
|
)
|
|
1905
1905
|
);
|
|
1906
|
-
function Wt(
|
|
1907
|
-
if (
|
|
1906
|
+
function Wt(e, t, o) {
|
|
1907
|
+
if (t.length !== e.length)
|
|
1908
1908
|
return !0;
|
|
1909
|
-
for (let r = 0; r <
|
|
1909
|
+
for (let r = 0; r < t.length; r++)
|
|
1910
1910
|
if (
|
|
1911
1911
|
// biome-ignore lint/style/noNonNullAssertion: legacy code
|
|
1912
|
-
Math.abs(
|
|
1912
|
+
Math.abs(t[r] - e[r]) > o
|
|
1913
1913
|
)
|
|
1914
1914
|
return !1;
|
|
1915
1915
|
return !0;
|
|
1916
1916
|
}
|
|
1917
|
-
function
|
|
1918
|
-
if (
|
|
1917
|
+
function wo(e, t, o) {
|
|
1918
|
+
if (e === void 0 && t || e && t === void 0 || (e == null ? void 0 : e.orientation) === void 0 || (t == null ? void 0 : t.orientation) === void 0 || (e == null ? void 0 : e.position) === void 0 || (t == null ? void 0 : t.position) === void 0)
|
|
1919
1919
|
return !1;
|
|
1920
|
-
if (
|
|
1920
|
+
if (e === void 0 || t === void 0)
|
|
1921
1921
|
return !0;
|
|
1922
1922
|
let r = 0;
|
|
1923
|
-
return r += Math.abs(
|
|
1923
|
+
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;
|
|
1924
1924
|
}
|
|
1925
|
-
function
|
|
1926
|
-
return
|
|
1927
|
-
t.tcp_pose,
|
|
1925
|
+
function Ut(e, t, o) {
|
|
1926
|
+
return e.coordinate_system === t.coordinate_system && e.tcp === t.tcp && wo(
|
|
1928
1927
|
e.tcp_pose,
|
|
1928
|
+
t.tcp_pose,
|
|
1929
1929
|
o
|
|
1930
1930
|
);
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function Co(e, t) {
|
|
1933
1933
|
const o = new jt(
|
|
1934
|
-
e[0],
|
|
1935
|
-
e[1],
|
|
1936
|
-
e[2]
|
|
1937
|
-
), r = new jt(
|
|
1938
1934
|
t[0],
|
|
1939
1935
|
t[1],
|
|
1940
1936
|
t[2]
|
|
1937
|
+
), r = new jt(
|
|
1938
|
+
e[0],
|
|
1939
|
+
e[1],
|
|
1940
|
+
e[2]
|
|
1941
1941
|
), i = o.length(), n = o.normalize();
|
|
1942
1942
|
let c = r.length(), s = r.normalize();
|
|
1943
1943
|
s.dot(n) < 0 && (c = -c, s = s.multiplyScalar(-1));
|
|
1944
1944
|
let l = c - i;
|
|
1945
1945
|
return l -= 2 * Math.PI * Math.floor((l + Math.PI) / (2 * Math.PI)), c = i + l, [...s.multiplyScalar(c)];
|
|
1946
1946
|
}
|
|
1947
|
-
const
|
|
1947
|
+
const Dt = 1e-4;
|
|
1948
1948
|
class ht {
|
|
1949
|
-
constructor(
|
|
1950
|
-
this.nova =
|
|
1949
|
+
constructor(t, o, r, i, n, c) {
|
|
1950
|
+
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) => {
|
|
1951
1951
|
var g;
|
|
1952
|
-
const l = (g =
|
|
1952
|
+
const l = (g = G(s.data)) == null ? void 0 : g.result;
|
|
1953
1953
|
if (!l)
|
|
1954
1954
|
throw new Error(
|
|
1955
1955
|
`Failed to get motion state for ${this.motionGroupId}: ${s.data}`
|
|
@@ -1957,18 +1957,18 @@ class ht {
|
|
|
1957
1957
|
Wt(
|
|
1958
1958
|
this.rapidlyChangingMotionState.joint_position,
|
|
1959
1959
|
l.joint_position,
|
|
1960
|
-
|
|
1960
|
+
Dt
|
|
1961
1961
|
) || L(() => {
|
|
1962
1962
|
this.rapidlyChangingMotionState.joint_position = l.joint_position;
|
|
1963
|
-
}),
|
|
1963
|
+
}), Ut(
|
|
1964
1964
|
this.rapidlyChangingMotionState,
|
|
1965
1965
|
l,
|
|
1966
|
-
|
|
1966
|
+
Dt
|
|
1967
1967
|
) || L(() => {
|
|
1968
1968
|
var m, d, u;
|
|
1969
1969
|
this.rapidlyChangingMotionState.tcp_pose == null ? this.rapidlyChangingMotionState.tcp_pose = l.tcp_pose : (m = l.tcp_pose) != null && m.orientation && ((d = l.tcp_pose) != null && d.position) && ((u = this.rapidlyChangingMotionState.tcp_pose) != null && u.orientation) ? this.rapidlyChangingMotionState.tcp_pose = {
|
|
1970
1970
|
position: l.tcp_pose.position,
|
|
1971
|
-
orientation:
|
|
1971
|
+
orientation: Co(
|
|
1972
1972
|
l.tcp_pose.orientation,
|
|
1973
1973
|
this.rapidlyChangingMotionState.tcp_pose.orientation
|
|
1974
1974
|
)
|
|
@@ -1981,18 +1981,18 @@ class ht {
|
|
|
1981
1981
|
});
|
|
1982
1982
|
}), mt(this);
|
|
1983
1983
|
}
|
|
1984
|
-
static async open(
|
|
1984
|
+
static async open(t, o) {
|
|
1985
1985
|
var d;
|
|
1986
|
-
const [r, i] = o.split("@"), n = await
|
|
1986
|
+
const [r, i] = o.split("@"), n = await t.api.controller.getCurrentRobotControllerState(i), c = n == null ? void 0 : n.motion_groups.find(
|
|
1987
1987
|
(u) => u.motion_group === o
|
|
1988
1988
|
);
|
|
1989
1989
|
if (!n || !c)
|
|
1990
1990
|
throw new Error(
|
|
1991
1991
|
`Controller ${i} or motion group ${o} not found`
|
|
1992
1992
|
);
|
|
1993
|
-
const s =
|
|
1993
|
+
const s = t.openReconnectingWebsocket(
|
|
1994
1994
|
`/controllers/${i}/motion-groups/${o}/state-stream`
|
|
1995
|
-
), l = await s.firstMessage(), g = (d =
|
|
1995
|
+
), l = await s.firstMessage(), g = (d = G(l.data)) == null ? void 0 : d.result;
|
|
1996
1996
|
if (!g)
|
|
1997
1997
|
throw new Error(
|
|
1998
1998
|
`Unable to parse initial motion state message ${l.data}`
|
|
@@ -2002,12 +2002,12 @@ class ht {
|
|
|
2002
2002
|
`,
|
|
2003
2003
|
g
|
|
2004
2004
|
);
|
|
2005
|
-
const m = await
|
|
2005
|
+
const m = await t.api.motionGroup.getMotionGroupDescription(
|
|
2006
2006
|
i,
|
|
2007
2007
|
c.motion_group
|
|
2008
2008
|
);
|
|
2009
2009
|
return new ht(
|
|
2010
|
-
|
|
2010
|
+
t,
|
|
2011
2011
|
n,
|
|
2012
2012
|
c,
|
|
2013
2013
|
m,
|
|
@@ -2022,7 +2022,7 @@ class ht {
|
|
|
2022
2022
|
return this.controller.controller;
|
|
2023
2023
|
}
|
|
2024
2024
|
get joints() {
|
|
2025
|
-
return this.initialMotionState.joint_position.map((
|
|
2025
|
+
return this.initialMotionState.joint_position.map((t, o) => ({
|
|
2026
2026
|
index: o
|
|
2027
2027
|
}));
|
|
2028
2028
|
}
|
|
@@ -2032,8 +2032,8 @@ class ht {
|
|
|
2032
2032
|
}
|
|
2033
2033
|
const Ot = "Movement request rejected. Another client is currently executing a 'Jogging' motion!";
|
|
2034
2034
|
class ft {
|
|
2035
|
-
constructor(
|
|
2036
|
-
this.motionStream =
|
|
2035
|
+
constructor(t, o = {}) {
|
|
2036
|
+
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;
|
|
2037
2037
|
}
|
|
2038
2038
|
/**
|
|
2039
2039
|
* Initialize the jogging connection using jogging endpoint or trajectory endpoint depending on the selected mode.
|
|
@@ -2052,18 +2052,18 @@ class ft {
|
|
|
2052
2052
|
* @param options.onError - Error handler for websocket errors
|
|
2053
2053
|
* @returns Promise resolving to initialized JoggerConnection instance
|
|
2054
2054
|
*/
|
|
2055
|
-
static async open(
|
|
2056
|
-
const i = await ht.open(
|
|
2055
|
+
static async open(t, o, r = {}) {
|
|
2056
|
+
const i = await ht.open(t, o), n = new ft(i, r);
|
|
2057
2057
|
return await n.setJoggingMode(n.mode), n;
|
|
2058
2058
|
}
|
|
2059
|
-
getDefaultTcp(
|
|
2059
|
+
getDefaultTcp(t) {
|
|
2060
2060
|
var r, i;
|
|
2061
|
-
const o = (i = (r =
|
|
2062
|
-
return
|
|
2061
|
+
const o = (i = (r = t.description.dh_parameters) == null ? void 0 : r[0]) == null ? void 0 : i.type;
|
|
2062
|
+
return t.joints.length < 6 && (o === W.RevoluteJoint || o === W.PrismaticJoint) ? this.NO_TCP : this.DEFAULT_TCP;
|
|
2063
2063
|
}
|
|
2064
2064
|
// Set a new tcp or other options. If current mode is jogging, will reinitialize the jogging websocket
|
|
2065
|
-
async setOptions(
|
|
2066
|
-
|
|
2065
|
+
async setOptions(t) {
|
|
2066
|
+
t.tcp && (this.tcp = t.tcp), t.orientation && (this.orientation = t.orientation), t.timeout && (this.timeout = t.timeout), t.mode && (this.mode = t.mode), t.onError && (this.onError = t.onError), this.setJoggingMode(this.mode, !1);
|
|
2067
2067
|
}
|
|
2068
2068
|
get motionGroupId() {
|
|
2069
2069
|
return this.motionStream.motionGroupId;
|
|
@@ -2083,10 +2083,10 @@ class ft {
|
|
|
2083
2083
|
// Sends stop movement command to robot
|
|
2084
2084
|
async stop() {
|
|
2085
2085
|
if (this.joggingSocket) {
|
|
2086
|
-
const
|
|
2086
|
+
const t = new Array(this.numJoints).fill(0);
|
|
2087
2087
|
this.joggingSocket.sendJson({
|
|
2088
2088
|
message_type: "JointVelocityRequest",
|
|
2089
|
-
velocity:
|
|
2089
|
+
velocity: t
|
|
2090
2090
|
});
|
|
2091
2091
|
}
|
|
2092
2092
|
this.trajectorySocket && this.trajectorySocket.sendJson({
|
|
@@ -2095,23 +2095,23 @@ class ft {
|
|
|
2095
2095
|
}
|
|
2096
2096
|
// Dispose the jogger, closing all open websockets
|
|
2097
2097
|
async dispose() {
|
|
2098
|
-
const
|
|
2098
|
+
const t = [this.joggingSocket, this.trajectorySocket].filter(
|
|
2099
2099
|
(o) => o !== null
|
|
2100
2100
|
);
|
|
2101
|
-
return
|
|
2101
|
+
return t.forEach((o) => {
|
|
2102
2102
|
o.dispose();
|
|
2103
|
-
}), this.joggingSocket = null, this.trajectorySocket = null, Promise.all(
|
|
2103
|
+
}), this.joggingSocket = null, this.trajectorySocket = null, Promise.all(t.map((o) => o.closed()));
|
|
2104
2104
|
}
|
|
2105
2105
|
// Activate jogger in one of the supported modes
|
|
2106
2106
|
// Will iniitialize or close websockets as necessary
|
|
2107
2107
|
// If mode is unchanged, does nothing (unless skipReinitializeIfSameMode is false)
|
|
2108
|
-
async setJoggingMode(
|
|
2109
|
-
if (!(this.mode ===
|
|
2108
|
+
async setJoggingMode(t, o = !0) {
|
|
2109
|
+
if (!(this.mode === t && o) && (this.dispose(), this.mode = t, this.mode === "jogging"))
|
|
2110
2110
|
return this.initializeJoggingWebsocket();
|
|
2111
2111
|
}
|
|
2112
2112
|
// Initializes continuous jogging websocket, called by setJoggingMode("jogging")
|
|
2113
2113
|
async initializeJoggingWebsocket() {
|
|
2114
|
-
return new Promise((
|
|
2114
|
+
return new Promise((t, o) => {
|
|
2115
2115
|
const r = setTimeout(() => {
|
|
2116
2116
|
o(
|
|
2117
2117
|
new Error(
|
|
@@ -2123,9 +2123,9 @@ class ft {
|
|
|
2123
2123
|
`/controllers/${this.motionStream.controllerId}/execution/jogging`
|
|
2124
2124
|
), this.joggingSocket.addEventListener("message", (i) => {
|
|
2125
2125
|
var c, s, l, g;
|
|
2126
|
-
const n =
|
|
2126
|
+
const n = G(i.data);
|
|
2127
2127
|
if (((c = n == null ? void 0 : n.result) == null ? void 0 : c.kind) === "INITIALIZE_RECEIVED") {
|
|
2128
|
-
clearTimeout(r),
|
|
2128
|
+
clearTimeout(r), t();
|
|
2129
2129
|
return;
|
|
2130
2130
|
}
|
|
2131
2131
|
if (((s = n == null ? void 0 : n.result) == null ? void 0 : s.kind) === "MOTION_ERROR")
|
|
@@ -2144,7 +2144,7 @@ class ft {
|
|
|
2144
2144
|
* Jogging: Start rotation of a single robot joint at the specified velocity
|
|
2145
2145
|
*/
|
|
2146
2146
|
async rotateJoints({
|
|
2147
|
-
joint:
|
|
2147
|
+
joint: t,
|
|
2148
2148
|
direction: o,
|
|
2149
2149
|
velocityValue: r,
|
|
2150
2150
|
velocityUnit: i
|
|
@@ -2154,7 +2154,7 @@ class ft {
|
|
|
2154
2154
|
"Joint jogging websocket not connected; create one by setting jogging mode to 'jogging'"
|
|
2155
2155
|
);
|
|
2156
2156
|
const n = new Array(this.numJoints).fill(0);
|
|
2157
|
-
n[
|
|
2157
|
+
n[t] = o === "-" ? -r : r, this.joggingSocket.sendJson({
|
|
2158
2158
|
message_type: "JointVelocityRequest",
|
|
2159
2159
|
velocity: n
|
|
2160
2160
|
});
|
|
@@ -2163,7 +2163,7 @@ class ft {
|
|
|
2163
2163
|
* Jogging: Start the TCP moving along a specified axis at a given velocity
|
|
2164
2164
|
*/
|
|
2165
2165
|
async translateTCP({
|
|
2166
|
-
axis:
|
|
2166
|
+
axis: t,
|
|
2167
2167
|
direction: o,
|
|
2168
2168
|
velocityMmPerSec: r
|
|
2169
2169
|
}) {
|
|
@@ -2172,7 +2172,7 @@ class ft {
|
|
|
2172
2172
|
"Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'"
|
|
2173
2173
|
);
|
|
2174
2174
|
const i = [0, 0, 0], n = [0, 0, 0];
|
|
2175
|
-
n[tt[
|
|
2175
|
+
n[tt[t]] = o === "-" ? -r : r, this.joggingSocket.sendJson({
|
|
2176
2176
|
message_type: "TcpVelocityRequest",
|
|
2177
2177
|
translation: n,
|
|
2178
2178
|
rotation: i,
|
|
@@ -2183,7 +2183,7 @@ class ft {
|
|
|
2183
2183
|
* Jogging: Start the TCP rotating around a specified axis at a given velocity
|
|
2184
2184
|
*/
|
|
2185
2185
|
async rotateTCP({
|
|
2186
|
-
axis:
|
|
2186
|
+
axis: t,
|
|
2187
2187
|
direction: o,
|
|
2188
2188
|
velocityRadsPerSec: r
|
|
2189
2189
|
}) {
|
|
@@ -2192,7 +2192,7 @@ class ft {
|
|
|
2192
2192
|
"Continuous jogging websocket not connected; create one by setting jogging mode to 'jogging'"
|
|
2193
2193
|
);
|
|
2194
2194
|
const i = [0, 0, 0], n = [0, 0, 0];
|
|
2195
|
-
i[tt[
|
|
2195
|
+
i[tt[t]] = o === "-" ? -r : r, this.joggingSocket.sendJson({
|
|
2196
2196
|
message_type: "TcpVelocityRequest",
|
|
2197
2197
|
translation: n,
|
|
2198
2198
|
rotation: i,
|
|
@@ -2207,7 +2207,7 @@ class ft {
|
|
|
2207
2207
|
* Promise resolves only after the motion has completed.
|
|
2208
2208
|
*/
|
|
2209
2209
|
async runIncrementalCartesianMotion({
|
|
2210
|
-
currentTcpPose:
|
|
2210
|
+
currentTcpPose: t,
|
|
2211
2211
|
currentJoints: o,
|
|
2212
2212
|
// coordSystemId,
|
|
2213
2213
|
velocityInRelevantUnits: r,
|
|
@@ -2221,11 +2221,11 @@ class ft {
|
|
|
2221
2221
|
"Set jogging mode to 'trajectory' to run incremental cartesian motions"
|
|
2222
2222
|
);
|
|
2223
2223
|
if (c.type === "translate") {
|
|
2224
|
-
if (!
|
|
2224
|
+
if (!t.position)
|
|
2225
2225
|
throw new Error(
|
|
2226
2226
|
"Current pose has no position, cannot perform translation"
|
|
2227
2227
|
);
|
|
2228
|
-
const f = [...
|
|
2228
|
+
const f = [...t.position];
|
|
2229
2229
|
f[tt[i]] += c.distanceMm * (n === "-" ? -1 : 1), s.push({
|
|
2230
2230
|
limits_override: {
|
|
2231
2231
|
tcp_velocity_limit: r
|
|
@@ -2234,24 +2234,24 @@ class ft {
|
|
|
2234
2234
|
path_definition_name: "PathLine",
|
|
2235
2235
|
target_pose: {
|
|
2236
2236
|
position: f,
|
|
2237
|
-
orientation:
|
|
2237
|
+
orientation: t.orientation
|
|
2238
2238
|
}
|
|
2239
2239
|
}
|
|
2240
2240
|
});
|
|
2241
2241
|
} else if (c.type === "rotate") {
|
|
2242
|
-
if (!
|
|
2242
|
+
if (!t.orientation)
|
|
2243
2243
|
throw new Error(
|
|
2244
2244
|
"Current pose has no orientation, cannot perform rotation"
|
|
2245
2245
|
);
|
|
2246
2246
|
const f = new ct(
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
), h = f.length(), v = f.clone().normalize(), b = c.distanceRads * (n === "-" ? -1 : 1),
|
|
2251
|
-
|
|
2252
|
-
const
|
|
2247
|
+
t.orientation[0],
|
|
2248
|
+
t.orientation[1],
|
|
2249
|
+
t.orientation[2]
|
|
2250
|
+
), h = f.length(), v = f.clone().normalize(), b = c.distanceRads * (n === "-" ? -1 : 1), C = new ct(0, 0, 0);
|
|
2251
|
+
C[i] = 1;
|
|
2252
|
+
const w = Math.cos(0.5 * b) * Math.cos(0.5 * h), M = Math.sin(0.5 * b) * Math.sin(0.5 * h), I = Math.sin(0.5 * b) * Math.cos(0.5 * h), R = Math.cos(0.5 * b) * Math.sin(0.5 * h), k = C.dot(
|
|
2253
2253
|
v
|
|
2254
|
-
),
|
|
2254
|
+
), E = C.clone().cross(v), z = 2 * Math.acos(w - M * k), Q = z / Math.sin(0.5 * z), ot = new ct().addScaledVector(E, M).addScaledVector(C, I).addScaledVector(v, R).multiplyScalar(Q);
|
|
2255
2255
|
s.push({
|
|
2256
2256
|
limits_override: {
|
|
2257
2257
|
tcp_orientation_velocity_limit: r
|
|
@@ -2259,7 +2259,7 @@ class ft {
|
|
|
2259
2259
|
path: {
|
|
2260
2260
|
path_definition_name: "PathLine",
|
|
2261
2261
|
target_pose: {
|
|
2262
|
-
position:
|
|
2262
|
+
position: t.position,
|
|
2263
2263
|
orientation: [...ot]
|
|
2264
2264
|
}
|
|
2265
2265
|
}
|
|
@@ -2329,7 +2329,7 @@ class ft {
|
|
|
2329
2329
|
};
|
|
2330
2330
|
this.trajectorySocket.addEventListener("message", (f) => {
|
|
2331
2331
|
var v, b;
|
|
2332
|
-
const h =
|
|
2332
|
+
const h = G(f.data);
|
|
2333
2333
|
if (!((v = h == null ? void 0 : h.result) != null && v.kind))
|
|
2334
2334
|
throw new Error(
|
|
2335
2335
|
`Failed to execute trajectory: Received invalid message ${f.data}`
|
|
@@ -2363,12 +2363,12 @@ class ft {
|
|
|
2363
2363
|
});
|
|
2364
2364
|
}
|
|
2365
2365
|
}
|
|
2366
|
-
const
|
|
2367
|
-
const
|
|
2366
|
+
const To = (e) => {
|
|
2367
|
+
const t = e.softTimeout || 3e3, [o, r] = B(!1), i = F();
|
|
2368
2368
|
return A(() => {
|
|
2369
2369
|
const n = setTimeout(() => {
|
|
2370
2370
|
r(!0);
|
|
2371
|
-
},
|
|
2371
|
+
}, t);
|
|
2372
2372
|
return () => clearTimeout(n);
|
|
2373
2373
|
}), /* @__PURE__ */ a(
|
|
2374
2374
|
P,
|
|
@@ -2378,15 +2378,15 @@ const vo = (t) => {
|
|
|
2378
2378
|
alignItems: "center",
|
|
2379
2379
|
justifyContent: "center",
|
|
2380
2380
|
sx: { color: i.palette.text.primary },
|
|
2381
|
-
children:
|
|
2382
|
-
|
|
2381
|
+
children: e.error ? /* @__PURE__ */ a(
|
|
2382
|
+
Mo,
|
|
2383
2383
|
{
|
|
2384
|
-
loadingMessage:
|
|
2385
|
-
error:
|
|
2384
|
+
loadingMessage: e.message,
|
|
2385
|
+
error: e.error
|
|
2386
2386
|
}
|
|
2387
2387
|
) : /* @__PURE__ */ S(et, { children: [
|
|
2388
|
-
/* @__PURE__ */ a(
|
|
2389
|
-
!!
|
|
2388
|
+
/* @__PURE__ */ a(_e, { sx: { marginBottom: "24px" } }),
|
|
2389
|
+
!!e.message && /* @__PURE__ */ a("div", { children: e.message }),
|
|
2390
2390
|
/* @__PURE__ */ a(
|
|
2391
2391
|
P,
|
|
2392
2392
|
{
|
|
@@ -2401,8 +2401,8 @@ const vo = (t) => {
|
|
|
2401
2401
|
] })
|
|
2402
2402
|
}
|
|
2403
2403
|
);
|
|
2404
|
-
},
|
|
2405
|
-
const
|
|
2404
|
+
}, Mo = (e) => {
|
|
2405
|
+
const t = je(e.error), o = e.error instanceof Error ? e.error.stack : null, r = F();
|
|
2406
2406
|
return /* @__PURE__ */ S(
|
|
2407
2407
|
P,
|
|
2408
2408
|
{
|
|
@@ -2419,16 +2419,16 @@ const vo = (t) => {
|
|
|
2419
2419
|
}
|
|
2420
2420
|
},
|
|
2421
2421
|
children: [
|
|
2422
|
-
(
|
|
2422
|
+
(e.loadingMessage ? `Error while ${we(Ee(e.loadingMessage))} - ` : "") + t,
|
|
2423
2423
|
/* @__PURE__ */ a("br", {}),
|
|
2424
2424
|
o && /* @__PURE__ */ a("pre", { children: o })
|
|
2425
2425
|
]
|
|
2426
2426
|
}
|
|
2427
2427
|
);
|
|
2428
|
-
},
|
|
2429
|
-
const { t
|
|
2428
|
+
}, ko = J(({ store: e }) => {
|
|
2429
|
+
const { t } = V();
|
|
2430
2430
|
return /* @__PURE__ */ a(
|
|
2431
|
-
|
|
2431
|
+
Ft,
|
|
2432
2432
|
{
|
|
2433
2433
|
"data-testid": "jogging-blocked",
|
|
2434
2434
|
"aria-label": "jogging-blocked",
|
|
@@ -2442,36 +2442,36 @@ const vo = (t) => {
|
|
|
2442
2442
|
alignItems: "flex-start"
|
|
2443
2443
|
},
|
|
2444
2444
|
children: /* @__PURE__ */ S(P, { sx: { m: 2, width: "100%" }, children: [
|
|
2445
|
-
/* @__PURE__ */ S(
|
|
2446
|
-
/* @__PURE__ */ a(
|
|
2447
|
-
|
|
2445
|
+
/* @__PURE__ */ S(Pe, { severity: "error", sx: { mb: 2 }, children: [
|
|
2446
|
+
/* @__PURE__ */ a(De, { children: t("Jogging.Blocked.ti") }),
|
|
2447
|
+
t("Jogging.Blocked.lb")
|
|
2448
2448
|
] }),
|
|
2449
2449
|
/* @__PURE__ */ a(
|
|
2450
2450
|
Z,
|
|
2451
2451
|
{
|
|
2452
2452
|
variant: "contained",
|
|
2453
2453
|
color: "secondary",
|
|
2454
|
-
onClick: () =>
|
|
2455
|
-
children:
|
|
2454
|
+
onClick: () => e.unblock(),
|
|
2455
|
+
children: t("Jogging.Blocked.Reenable.bt")
|
|
2456
2456
|
}
|
|
2457
2457
|
)
|
|
2458
2458
|
] })
|
|
2459
2459
|
}
|
|
2460
2460
|
);
|
|
2461
|
-
}),
|
|
2462
|
-
({ store:
|
|
2463
|
-
const { t
|
|
2464
|
-
|
|
2465
|
-
), i =
|
|
2461
|
+
}), Ht = J(
|
|
2462
|
+
({ store: e }) => {
|
|
2463
|
+
const { t } = V(), [o, r] = B(
|
|
2464
|
+
e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached
|
|
2465
|
+
), i = O(o);
|
|
2466
2466
|
pt(() => {
|
|
2467
|
-
const c =
|
|
2468
|
-
|
|
2467
|
+
const c = e.jogger.motionStream.rapidlyChangingMotionState.joint_limit_reached.limit_reached;
|
|
2468
|
+
ze(i.current, c) || (i.current = c, r(c));
|
|
2469
2469
|
});
|
|
2470
2470
|
const n = [];
|
|
2471
2471
|
for (const [c, s] of o.entries())
|
|
2472
2472
|
s && n.push(c);
|
|
2473
2473
|
return /* @__PURE__ */ a(
|
|
2474
|
-
|
|
2474
|
+
_,
|
|
2475
2475
|
{
|
|
2476
2476
|
"data-testid": "jogging-joint-limit-detector",
|
|
2477
2477
|
"aria-label": "jogging-joint-limit-detector",
|
|
@@ -2482,13 +2482,13 @@ const vo = (t) => {
|
|
|
2482
2482
|
minHeight: "1.5rem",
|
|
2483
2483
|
visibility: n.length ? "visible" : "hidden"
|
|
2484
2484
|
},
|
|
2485
|
-
children:
|
|
2485
|
+
children: t("Jogging.JointLimitsReached.lb", {
|
|
2486
2486
|
jointNumbers: n.map((c) => c + 1).join(", ")
|
|
2487
2487
|
})
|
|
2488
2488
|
}
|
|
2489
2489
|
);
|
|
2490
2490
|
}
|
|
2491
|
-
),
|
|
2491
|
+
), Io = gt(Ve)(({ theme: e }) => ({
|
|
2492
2492
|
"&.MuiFormControl-root": {
|
|
2493
2493
|
".MuiSelect-select": {
|
|
2494
2494
|
paddingTop: "20px",
|
|
@@ -2500,18 +2500,18 @@ const vo = (t) => {
|
|
|
2500
2500
|
},
|
|
2501
2501
|
".MuiInputLabel-root": {
|
|
2502
2502
|
"&.Mui-focused": {
|
|
2503
|
-
color:
|
|
2503
|
+
color: e.palette.text.primary
|
|
2504
2504
|
}
|
|
2505
2505
|
}
|
|
2506
2506
|
}
|
|
2507
2507
|
}));
|
|
2508
2508
|
function it({
|
|
2509
|
-
labelValue:
|
|
2510
|
-
...
|
|
2509
|
+
labelValue: e,
|
|
2510
|
+
...t
|
|
2511
2511
|
}) {
|
|
2512
|
-
return /* @__PURE__ */ S(
|
|
2513
|
-
/* @__PURE__ */ a(
|
|
2514
|
-
/* @__PURE__ */ a(
|
|
2512
|
+
return /* @__PURE__ */ S(Io, { fullWidth: !0, variant: "filled", children: [
|
|
2513
|
+
/* @__PURE__ */ a(Ne, { id: t.labelId, children: e }),
|
|
2514
|
+
/* @__PURE__ */ a(Ge, { ...t })
|
|
2515
2515
|
] });
|
|
2516
2516
|
}
|
|
2517
2517
|
const dt = [
|
|
@@ -2519,38 +2519,38 @@ const dt = [
|
|
|
2519
2519
|
{ id: "1", mm: 1, degrees: 0.5 },
|
|
2520
2520
|
{ id: "5", mm: 5, degrees: 2.5 },
|
|
2521
2521
|
{ id: "10", mm: 10, degrees: 5 }
|
|
2522
|
-
],
|
|
2522
|
+
], Ro = [
|
|
2523
2523
|
{ id: "continuous" },
|
|
2524
2524
|
...dt
|
|
2525
|
-
],
|
|
2525
|
+
], _o = ["coordsys", "tool"];
|
|
2526
2526
|
class bt {
|
|
2527
|
-
constructor(
|
|
2527
|
+
constructor(t, o, r, i, n) {
|
|
2528
2528
|
var c, s, l, g;
|
|
2529
|
-
this.jogger =
|
|
2529
|
+
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.selectedOrientation = "coordsys", this.selectedIncrementId = "continuous", this.selectedCartesianMotionType = "translate", this.incrementJogInProgress = null, this.translationVelocityMmPerSec = 10, this.rotationVelocityDegPerSec = 1, this.minTranslationVelocityMmPerSec = 5, this.minRotationVelocityDegPerSec = 1, 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 = W.RevoluteJoint, this.operationMode = null, this.safetyState = null;
|
|
2530
2530
|
for (const m of o)
|
|
2531
2531
|
if (m.coordinate_system === "") {
|
|
2532
2532
|
m.coordinate_system = "world";
|
|
2533
2533
|
break;
|
|
2534
2534
|
}
|
|
2535
|
-
this.selectedCoordSystemId = ((c = o[0]) == null ? void 0 : c.coordinate_system) || "world", this.selectedTcpId = ((s = i[0]) == null ? void 0 : s.id) || "", this.inverseSolver = n, this.jointType = ((g = (l = r == null ? void 0 : r.dh_parameters) == null ? void 0 : l[0]) == null ? void 0 : g.type) ??
|
|
2535
|
+
this.operationMode = t.motionStream.controller.operation_mode, this.safetyState = t.motionStream.controller.safety_state, this.selectedCoordSystemId = ((c = o[0]) == null ? void 0 : c.coordinate_system) || "world", this.selectedTcpId = ((s = i[0]) == null ? void 0 : s.id) || "", this.inverseSolver = n, this.jointType = ((g = (l = r == null ? void 0 : r.dh_parameters) == null ? void 0 : l[0]) == null ? void 0 : g.type) ?? W.RevoluteJoint, mt(this, {}, { autoBind: !0 }), this.jogger.onBlocked = () => {
|
|
2536
2536
|
this.block();
|
|
2537
|
-
}, this.loadFromLocalStorage(), this.disposers.push(
|
|
2537
|
+
}, this.loadFromLocalStorage(), this.disposers.push(Me(() => this.saveToLocalStorage())), window.joggingStore = this;
|
|
2538
2538
|
}
|
|
2539
2539
|
/**
|
|
2540
2540
|
* Load a jogging store with the relevant data it needs
|
|
2541
2541
|
* from the backend
|
|
2542
2542
|
*/
|
|
2543
|
-
static async loadFor(
|
|
2544
|
-
const { nova: o } =
|
|
2543
|
+
static async loadFor(t) {
|
|
2544
|
+
const { nova: o } = t, [r, i] = await Promise.all([
|
|
2545
2545
|
// Fetch coord systems so user can select between them
|
|
2546
2546
|
o.api.controller.listCoordinateSystems(
|
|
2547
|
-
|
|
2547
|
+
t.motionStream.controllerId,
|
|
2548
2548
|
"ROTATION_VECTOR"
|
|
2549
2549
|
),
|
|
2550
2550
|
// Same for TCPs and other info from description
|
|
2551
2551
|
o.api.motionGroup.getMotionGroupDescription(
|
|
2552
|
-
|
|
2553
|
-
|
|
2552
|
+
t.motionStream.controllerId,
|
|
2553
|
+
t.motionGroupId
|
|
2554
2554
|
)
|
|
2555
2555
|
]), n = await o.api.motionGroupModels.getMotionGroupKinematicModel(
|
|
2556
2556
|
i.motion_group_model
|
|
@@ -2561,7 +2561,7 @@ class bt {
|
|
|
2561
2561
|
orientation: l.pose.orientation
|
|
2562
2562
|
}));
|
|
2563
2563
|
return new bt(
|
|
2564
|
-
|
|
2564
|
+
t,
|
|
2565
2565
|
r || [],
|
|
2566
2566
|
i,
|
|
2567
2567
|
c,
|
|
@@ -2569,16 +2569,15 @@ class bt {
|
|
|
2569
2569
|
);
|
|
2570
2570
|
}
|
|
2571
2571
|
dispose() {
|
|
2572
|
-
for (const
|
|
2573
|
-
|
|
2572
|
+
for (const t of this.disposers)
|
|
2573
|
+
t();
|
|
2574
2574
|
this.jogger.dispose();
|
|
2575
2575
|
}
|
|
2576
2576
|
get coordSystemCountByName() {
|
|
2577
|
-
return
|
|
2577
|
+
return Ce(this.coordSystems, (t) => t.name);
|
|
2578
2578
|
}
|
|
2579
2579
|
async deactivate() {
|
|
2580
|
-
|
|
2581
|
-
return this.jogger.stop();
|
|
2580
|
+
this.jogger.mode === "jogging" && await this.jogger.setJoggingMode("off");
|
|
2582
2581
|
}
|
|
2583
2582
|
/** Activate the jogger with current settings */
|
|
2584
2583
|
async activate() {
|
|
@@ -2588,8 +2587,8 @@ class bt {
|
|
|
2588
2587
|
}), this.activeDiscreteIncrement ? this.jogger.setJoggingMode("trajectory") : this.jogger.setJoggingMode("jogging")) : this.jogger.setJoggingMode("jogging"), this.jogger;
|
|
2589
2588
|
}
|
|
2590
2589
|
loadFromLocalStorage() {
|
|
2591
|
-
const
|
|
2592
|
-
|
|
2590
|
+
const t = G(localStorage.getItem("joggingToolStore"));
|
|
2591
|
+
t && (this.tabsById[t.selectedTabId] && (this.selectedTabId = t.selectedTabId), this.coordSystemsById[t.selectedCoordSystemId] && (this.selectedCoordSystemId = t.selectedCoordSystemId), this.tcpsById[t.selectedTcpId] && (this.selectedTcpId = t.selectedTcpId), this.incrementOptionsById[t.selectedIncrementId] && (this.selectedIncrementId = t.selectedIncrementId), ["translate", "rotate"].includes(t.selectedCartesianMotionType) && (this.selectedCartesianMotionType = t.selectedCartesianMotionType), ["coordsys", "tool"].includes(t.selectedOrientation) && (this.selectedOrientation = t.selectedOrientation));
|
|
2593
2592
|
}
|
|
2594
2593
|
saveToLocalStorage() {
|
|
2595
2594
|
localStorage.setItem(
|
|
@@ -2611,28 +2610,28 @@ class bt {
|
|
|
2611
2610
|
};
|
|
2612
2611
|
}
|
|
2613
2612
|
get tabs() {
|
|
2614
|
-
const
|
|
2613
|
+
const t = [
|
|
2615
2614
|
{
|
|
2616
2615
|
id: "joint",
|
|
2617
2616
|
label: "Joints"
|
|
2618
2617
|
}
|
|
2619
2618
|
];
|
|
2620
|
-
return this.inverseSolver !== null &&
|
|
2619
|
+
return this.inverseSolver !== null && t.unshift({
|
|
2621
2620
|
id: "cartesian",
|
|
2622
2621
|
label: "Cartesian"
|
|
2623
|
-
}),
|
|
2622
|
+
}), t;
|
|
2624
2623
|
}
|
|
2625
2624
|
get incrementOptions() {
|
|
2626
|
-
return
|
|
2625
|
+
return Ro;
|
|
2627
2626
|
}
|
|
2628
2627
|
get discreteIncrementOptions() {
|
|
2629
2628
|
return dt;
|
|
2630
2629
|
}
|
|
2631
2630
|
get incrementOptionsById() {
|
|
2632
|
-
return nt(this.incrementOptions, (
|
|
2631
|
+
return nt(this.incrementOptions, (t) => t.id);
|
|
2633
2632
|
}
|
|
2634
2633
|
get tabsById() {
|
|
2635
|
-
return nt(this.tabs, (
|
|
2634
|
+
return nt(this.tabs, (t) => t.id);
|
|
2636
2635
|
}
|
|
2637
2636
|
get currentTab() {
|
|
2638
2637
|
return this.tabsById[this.selectedTabId] || this.tabs[0];
|
|
@@ -2641,7 +2640,7 @@ class bt {
|
|
|
2641
2640
|
return this.tabs.indexOf(this.currentTab);
|
|
2642
2641
|
}
|
|
2643
2642
|
get coordSystemsById() {
|
|
2644
|
-
return nt(this.coordSystems, (
|
|
2643
|
+
return nt(this.coordSystems, (t) => t.coordinate_system);
|
|
2645
2644
|
}
|
|
2646
2645
|
/**
|
|
2647
2646
|
* The id of the coordinate system to use for jogging.
|
|
@@ -2652,57 +2651,113 @@ class bt {
|
|
|
2652
2651
|
return this.selectedOrientation === "tool" ? "tool" : this.selectedCoordSystemId;
|
|
2653
2652
|
}
|
|
2654
2653
|
get tcpsById() {
|
|
2655
|
-
return nt(this.tcps, (
|
|
2654
|
+
return nt(this.tcps, (t) => t.id);
|
|
2656
2655
|
}
|
|
2657
2656
|
get activeDiscreteIncrement() {
|
|
2658
|
-
return this.selectedOrientation === "tool" ? void 0 : dt.find((
|
|
2657
|
+
return this.selectedOrientation === "tool" ? void 0 : dt.find((t) => t.id === this.selectedIncrementId);
|
|
2659
2658
|
}
|
|
2660
2659
|
/** The selected rotation velocity converted to radians per second */
|
|
2661
2660
|
get rotationVelocityRadsPerSec() {
|
|
2662
2661
|
return this.rotationVelocityDegPerSec * Math.PI / 180;
|
|
2663
2662
|
}
|
|
2664
2663
|
/** Selected velocity in mm/sec or deg/sec */
|
|
2665
|
-
velocityInDisplayUnits(
|
|
2666
|
-
return
|
|
2664
|
+
velocityInDisplayUnits(t) {
|
|
2665
|
+
return t ? this.rotationVelocityDegPerSec : this.translationVelocityMmPerSec;
|
|
2666
|
+
}
|
|
2667
|
+
get isAutoMode() {
|
|
2668
|
+
return this.operationMode === xe.OperationModeAuto;
|
|
2669
|
+
}
|
|
2670
|
+
get isSafetyStateNormal() {
|
|
2671
|
+
return this.safetyState === ye.SafetyStateNormal;
|
|
2672
|
+
}
|
|
2673
|
+
/** Maximum rotation velocity user can choose on the velocity slider in °/s */
|
|
2674
|
+
get maxRotationVelocityDegPerSec() {
|
|
2675
|
+
var o, r, i, n;
|
|
2676
|
+
if (this.operationMode && this.safetyState && this.motionGroupDescription) {
|
|
2677
|
+
const c = this.isAutoMode ? (r = (o = this.motionGroupDescription.operation_limits.auto_limits) == null ? void 0 : o.tcp) == null ? void 0 : r.orientation_velocity : (n = (i = this.motionGroupDescription.operation_limits[this.isSafetyStateNormal ? "manual_t1_limits" : "manual_t2_limits"]) == null ? void 0 : i.tcp) == null ? void 0 : n.orientation_velocity;
|
|
2678
|
+
return c ? kt(c) : 60;
|
|
2679
|
+
}
|
|
2680
|
+
return 60;
|
|
2681
|
+
}
|
|
2682
|
+
/** Maximum translation velocity user can choose on the velocity slider in mm/s */
|
|
2683
|
+
get maxTranslationVelocityMmPerSec() {
|
|
2684
|
+
var o, r, i, n;
|
|
2685
|
+
return this.operationMode && this.safetyState && this.motionGroupDescription ? (this.isAutoMode ? (r = (o = this.motionGroupDescription.operation_limits.auto_limits) == null ? void 0 : o.tcp) == null ? void 0 : r.velocity : (n = (i = this.motionGroupDescription.operation_limits[this.isSafetyStateNormal ? "manual_t1_limits" : "manual_t2_limits"]) == null ? void 0 : i.tcp) == null ? void 0 : n.velocity) ?? 250 : 250;
|
|
2667
2686
|
}
|
|
2668
|
-
/**
|
|
2669
|
-
|
|
2670
|
-
|
|
2687
|
+
/**
|
|
2688
|
+
* Returns joint velocity in °/s
|
|
2689
|
+
* @param joint JointLimits
|
|
2690
|
+
* @param fallback number
|
|
2691
|
+
* @private
|
|
2692
|
+
*/
|
|
2693
|
+
getJointVelocity(t, o) {
|
|
2694
|
+
return t.velocity ? kt(t.velocity) : o;
|
|
2695
|
+
}
|
|
2696
|
+
/**
|
|
2697
|
+
* Maximum joint rotation velocity user can choose on the velocity slider in °/s
|
|
2698
|
+
*/
|
|
2699
|
+
get maxJointVelocityInDisplayUnits() {
|
|
2700
|
+
var o, r, i, n;
|
|
2701
|
+
if (this.operationMode && this.safetyState && this.motionGroupDescription) {
|
|
2702
|
+
const c = ((r = (o = this.motionGroupDescription.operation_limits.auto_limits) == null ? void 0 : o.joints) == null ? void 0 : r.map(
|
|
2703
|
+
(l) => this.getJointVelocity(l, 60)
|
|
2704
|
+
)) ?? [], s = ((n = (i = this.motionGroupDescription.operation_limits[this.isSafetyStateNormal ? "manual_t1_limits" : "manual_t2_limits"]) == null ? void 0 : i.joints) == null ? void 0 : n.map((l) => this.getJointVelocity(l, 60))) ?? [];
|
|
2705
|
+
return Math.floor(
|
|
2706
|
+
this.isAutoMode ? Math.max(...c) : Math.max(...s)
|
|
2707
|
+
);
|
|
2708
|
+
}
|
|
2709
|
+
return 60;
|
|
2671
2710
|
}
|
|
2672
|
-
/**
|
|
2673
|
-
|
|
2674
|
-
return
|
|
2711
|
+
/** Minimum selectable velocity in mm/sec or deg/sec */
|
|
2712
|
+
minVelocityInDisplayUnits(t) {
|
|
2713
|
+
return t ? this.minRotationVelocityDegPerSec : this.minTranslationVelocityMmPerSec;
|
|
2675
2714
|
}
|
|
2676
|
-
|
|
2715
|
+
/**
|
|
2716
|
+
* Maximum selectable velocity in mm/sec or deg/sec
|
|
2717
|
+
*
|
|
2718
|
+
* If data provided by the api is already present - read out the limits from the motionGroupDescription
|
|
2719
|
+
*
|
|
2720
|
+
* Automatic mode -> auto_limits
|
|
2721
|
+
* Manual mode t1 -> manual_t1_limits
|
|
2722
|
+
* Manual mode t2 -> manual_t2_limits
|
|
2723
|
+
*
|
|
2724
|
+
* In other case - return the fallbacks
|
|
2725
|
+
*/
|
|
2726
|
+
maxVelocityInDisplayUnits(t) {
|
|
2727
|
+
return Math.floor(
|
|
2728
|
+
t ? this.maxRotationVelocityDegPerSec : this.maxTranslationVelocityMmPerSec
|
|
2729
|
+
);
|
|
2730
|
+
}
|
|
2731
|
+
onTabChange(t, o) {
|
|
2677
2732
|
const r = this.tabs[o] || this.tabs[0];
|
|
2678
2733
|
this.selectedTabId = r.id;
|
|
2679
2734
|
}
|
|
2680
|
-
setSelectedCoordSystemId(
|
|
2681
|
-
this.selectedCoordSystemId =
|
|
2735
|
+
setSelectedCoordSystemId(t) {
|
|
2736
|
+
this.selectedCoordSystemId = t;
|
|
2682
2737
|
}
|
|
2683
|
-
setSelectedTcpId(
|
|
2684
|
-
this.selectedTcpId =
|
|
2738
|
+
setSelectedTcpId(t) {
|
|
2739
|
+
this.selectedTcpId = t;
|
|
2685
2740
|
}
|
|
2686
|
-
setSelectedOrientation(
|
|
2687
|
-
this.selectedOrientation =
|
|
2741
|
+
setSelectedOrientation(t) {
|
|
2742
|
+
this.selectedOrientation = t;
|
|
2688
2743
|
}
|
|
2689
|
-
setSelectedIncrementId(
|
|
2690
|
-
this.selectedIncrementId =
|
|
2744
|
+
setSelectedIncrementId(t) {
|
|
2745
|
+
this.selectedIncrementId = t;
|
|
2691
2746
|
}
|
|
2692
|
-
setCurrentIncrementJog(
|
|
2693
|
-
this.incrementJogInProgress =
|
|
2747
|
+
setCurrentIncrementJog(t) {
|
|
2748
|
+
this.incrementJogInProgress = t;
|
|
2694
2749
|
}
|
|
2695
|
-
setVelocityFromSlider(
|
|
2696
|
-
o ? this.rotationVelocityDegPerSec =
|
|
2750
|
+
setVelocityFromSlider(t, o) {
|
|
2751
|
+
o ? this.rotationVelocityDegPerSec = t : this.translationVelocityMmPerSec = t;
|
|
2697
2752
|
}
|
|
2698
|
-
setSelectedCartesianMotionType(
|
|
2699
|
-
this.selectedCartesianMotionType =
|
|
2753
|
+
setSelectedCartesianMotionType(t) {
|
|
2754
|
+
this.selectedCartesianMotionType = t;
|
|
2700
2755
|
}
|
|
2701
|
-
lock(
|
|
2702
|
-
this.locks.add(
|
|
2756
|
+
lock(t) {
|
|
2757
|
+
this.locks.add(t);
|
|
2703
2758
|
}
|
|
2704
|
-
unlock(
|
|
2705
|
-
this.locks.delete(
|
|
2759
|
+
unlock(t) {
|
|
2760
|
+
this.locks.delete(t);
|
|
2706
2761
|
}
|
|
2707
2762
|
block() {
|
|
2708
2763
|
this.blocked = !0;
|
|
@@ -2711,20 +2766,20 @@ class bt {
|
|
|
2711
2766
|
this.blocked = !1, this.jogger.mode === "jogging" && this.jogger.initializeJoggingWebsocket();
|
|
2712
2767
|
}
|
|
2713
2768
|
/** Lock the UI until the given async callback resolves */
|
|
2714
|
-
async withMotionLock(
|
|
2715
|
-
const o =
|
|
2769
|
+
async withMotionLock(t) {
|
|
2770
|
+
const o = We();
|
|
2716
2771
|
this.lock(o);
|
|
2717
2772
|
try {
|
|
2718
|
-
return await
|
|
2773
|
+
return await t();
|
|
2719
2774
|
} finally {
|
|
2720
2775
|
this.unlock(o);
|
|
2721
2776
|
}
|
|
2722
2777
|
}
|
|
2723
2778
|
}
|
|
2724
|
-
const
|
|
2725
|
-
({ store:
|
|
2779
|
+
const Eo = J(
|
|
2780
|
+
({ store: e, useDegree: t }) => {
|
|
2726
2781
|
var c;
|
|
2727
|
-
const { t: o } = V(), r =
|
|
2782
|
+
const { t: o } = V(), r = oe(), i = [];
|
|
2728
2783
|
function n(s) {
|
|
2729
2784
|
switch (s) {
|
|
2730
2785
|
case "coordsys":
|
|
@@ -2735,51 +2790,51 @@ const ko = J(
|
|
|
2735
2790
|
return s;
|
|
2736
2791
|
}
|
|
2737
2792
|
}
|
|
2738
|
-
return
|
|
2793
|
+
return e.showCoordSystemSelect && i.push(
|
|
2739
2794
|
/* @__PURE__ */ a(
|
|
2740
2795
|
it,
|
|
2741
2796
|
{
|
|
2742
2797
|
labelId: `jogging-coord-select-${r}`,
|
|
2743
2798
|
labelValue: o("Jogging.CoordinateSystem.hlb"),
|
|
2744
|
-
value:
|
|
2799
|
+
value: e.selectedCoordSystemId,
|
|
2745
2800
|
size: "small",
|
|
2746
2801
|
variant: "filled",
|
|
2747
2802
|
displayEmpty: !0,
|
|
2748
|
-
onChange: (s) =>
|
|
2749
|
-
disabled:
|
|
2750
|
-
children:
|
|
2803
|
+
onChange: (s) => e.setSelectedCoordSystemId(s.target.value),
|
|
2804
|
+
disabled: e.isLocked,
|
|
2805
|
+
children: e.coordSystems.map((s) => /* @__PURE__ */ a(q, { value: s.coordinate_system, children: s.name && e.coordSystemCountByName[s.name] > 1 ? `${s.name} / ${s.coordinate_system}` : s.name || s.coordinate_system }, s.coordinate_system))
|
|
2751
2806
|
},
|
|
2752
2807
|
"coord"
|
|
2753
2808
|
)
|
|
2754
|
-
),
|
|
2809
|
+
), e.showTcpSelect && i.push(
|
|
2755
2810
|
/* @__PURE__ */ a(
|
|
2756
2811
|
it,
|
|
2757
2812
|
{
|
|
2758
2813
|
labelId: `jogging-tcp-select-${r}`,
|
|
2759
2814
|
labelValue: "TCP",
|
|
2760
|
-
value:
|
|
2815
|
+
value: e.selectedTcpId,
|
|
2761
2816
|
size: "small",
|
|
2762
2817
|
variant: "filled",
|
|
2763
|
-
onChange: (s) =>
|
|
2764
|
-
disabled:
|
|
2765
|
-
children:
|
|
2818
|
+
onChange: (s) => e.setSelectedTcpId(s.target.value),
|
|
2819
|
+
disabled: e.isLocked,
|
|
2820
|
+
children: e.tcps.map((s) => /* @__PURE__ */ a(q, { value: s.id, children: s.id }, s.id))
|
|
2766
2821
|
},
|
|
2767
2822
|
"tcp"
|
|
2768
2823
|
)
|
|
2769
|
-
),
|
|
2824
|
+
), e.showOrientationSelect && i.push(
|
|
2770
2825
|
/* @__PURE__ */ a(
|
|
2771
2826
|
it,
|
|
2772
2827
|
{
|
|
2773
2828
|
labelValue: o("Jogging.Cartesian.Orientation.lb"),
|
|
2774
2829
|
labelId: `orientation-select-${r}`,
|
|
2775
|
-
value:
|
|
2776
|
-
onChange: (s) =>
|
|
2777
|
-
disabled:
|
|
2778
|
-
children:
|
|
2830
|
+
value: e.selectedOrientation,
|
|
2831
|
+
onChange: (s) => e.setSelectedOrientation(s.target.value),
|
|
2832
|
+
disabled: e.isLocked,
|
|
2833
|
+
children: _o.map((s) => /* @__PURE__ */ a(q, { value: s, children: n(s) }, s))
|
|
2779
2834
|
},
|
|
2780
2835
|
"orientation"
|
|
2781
2836
|
)
|
|
2782
|
-
),
|
|
2837
|
+
), e.showIncrementSelect && i.push(
|
|
2783
2838
|
/* @__PURE__ */ S(
|
|
2784
2839
|
it,
|
|
2785
2840
|
{
|
|
@@ -2787,14 +2842,14 @@ const ko = J(
|
|
|
2787
2842
|
labelId: `jogging-increment-select-${r}`,
|
|
2788
2843
|
size: "small",
|
|
2789
2844
|
variant: "filled",
|
|
2790
|
-
value: ((c =
|
|
2791
|
-
onChange: (s) =>
|
|
2845
|
+
value: ((c = e.activeDiscreteIncrement) == null ? void 0 : c.id) || "continuous",
|
|
2846
|
+
onChange: (s) => e.setSelectedIncrementId(
|
|
2792
2847
|
s.target.value
|
|
2793
2848
|
),
|
|
2794
|
-
disabled:
|
|
2849
|
+
disabled: e.isLocked,
|
|
2795
2850
|
children: [
|
|
2796
2851
|
/* @__PURE__ */ a(q, { value: "continuous", children: o("Jogging.Increment.Continuous.dd") }, "continuous"),
|
|
2797
|
-
|
|
2852
|
+
e.selectedOrientation === "tool" ? null : e.discreteIncrementOptions.map((s) => /* @__PURE__ */ a(q, { value: s.id, children: t ? `${s.degrees}°` : `${s.mm}mm` }, s.id))
|
|
2798
2853
|
]
|
|
2799
2854
|
},
|
|
2800
2855
|
"increment"
|
|
@@ -2825,11 +2880,11 @@ const ko = J(
|
|
|
2825
2880
|
}
|
|
2826
2881
|
);
|
|
2827
2882
|
}
|
|
2828
|
-
),
|
|
2829
|
-
var
|
|
2883
|
+
), jo = gt(Ue)(({ theme: e }) => {
|
|
2884
|
+
var t;
|
|
2830
2885
|
return {
|
|
2831
2886
|
"&.MuiToggleButtonGroup-root": {
|
|
2832
|
-
background: (
|
|
2887
|
+
background: (t = e.palette.backgroundPaperElevation) == null ? void 0 : t[8],
|
|
2833
2888
|
borderRadius: "8px",
|
|
2834
2889
|
padding: "4px",
|
|
2835
2890
|
gap: "4px",
|
|
@@ -2847,11 +2902,11 @@ const ko = J(
|
|
|
2847
2902
|
}
|
|
2848
2903
|
}
|
|
2849
2904
|
};
|
|
2850
|
-
}),
|
|
2905
|
+
}), Po = J((e) => {
|
|
2851
2906
|
var n, c, s;
|
|
2852
|
-
const
|
|
2907
|
+
const t = F(), { store: o } = e, { t: r } = V();
|
|
2853
2908
|
function i(l, g) {
|
|
2854
|
-
g ===
|
|
2909
|
+
g === e.velocity || !He(g) || e.onVelocityChange(g, e.useDegree);
|
|
2855
2910
|
}
|
|
2856
2911
|
return /* @__PURE__ */ S(
|
|
2857
2912
|
P,
|
|
@@ -2863,25 +2918,25 @@ const ko = J(
|
|
|
2863
2918
|
"aria-label": "velocity-slider",
|
|
2864
2919
|
children: [
|
|
2865
2920
|
o.showVelocityLegend && /* @__PURE__ */ a(
|
|
2866
|
-
|
|
2921
|
+
_,
|
|
2867
2922
|
{
|
|
2868
2923
|
sx: {
|
|
2869
|
-
color: (s = (c = (n =
|
|
2924
|
+
color: (s = (c = (n = t.componentsExt) == null ? void 0 : n.JoggingPanel) == null ? void 0 : c.VelocitySlider) == null ? void 0 : s.sliderLegendColor,
|
|
2870
2925
|
fontSize: "14px"
|
|
2871
2926
|
},
|
|
2872
2927
|
children: r("Jogging.Velocity.bt")
|
|
2873
2928
|
}
|
|
2874
2929
|
),
|
|
2875
2930
|
/* @__PURE__ */ a(
|
|
2876
|
-
|
|
2931
|
+
Gt,
|
|
2877
2932
|
{
|
|
2878
|
-
value:
|
|
2933
|
+
value: e.velocity,
|
|
2879
2934
|
color: "secondary",
|
|
2880
2935
|
onChange: i,
|
|
2881
|
-
min:
|
|
2882
|
-
max:
|
|
2936
|
+
min: e.min,
|
|
2937
|
+
max: e.max,
|
|
2883
2938
|
"aria-labelledby": "input-slider",
|
|
2884
|
-
disabled:
|
|
2939
|
+
disabled: e.disabled,
|
|
2885
2940
|
sx: {
|
|
2886
2941
|
"& .MuiSlider-valueLabelOpen": {
|
|
2887
2942
|
zIndex: 100,
|
|
@@ -2891,12 +2946,12 @@ const ko = J(
|
|
|
2891
2946
|
}
|
|
2892
2947
|
}
|
|
2893
2948
|
),
|
|
2894
|
-
o.showVelocitySliderLabel && (
|
|
2949
|
+
o.showVelocitySliderLabel && (e.renderValue ? e.renderValue(e.velocity) : /* @__PURE__ */ a(qt, { value: e.velocity.toString() }))
|
|
2895
2950
|
]
|
|
2896
2951
|
}
|
|
2897
2952
|
);
|
|
2898
2953
|
});
|
|
2899
|
-
function
|
|
2954
|
+
function qt({ value: e, sx: t }) {
|
|
2900
2955
|
var r;
|
|
2901
2956
|
const o = F();
|
|
2902
2957
|
return /* @__PURE__ */ a(
|
|
@@ -2911,10 +2966,10 @@ function Ht({ value: t, sx: e }) {
|
|
|
2911
2966
|
background: (r = o.palette.backgroundPaperElevation) == null ? void 0 : r[8],
|
|
2912
2967
|
borderRadius: "10px",
|
|
2913
2968
|
minWidth: "111px",
|
|
2914
|
-
...
|
|
2969
|
+
...t
|
|
2915
2970
|
},
|
|
2916
2971
|
children: /* @__PURE__ */ a(
|
|
2917
|
-
|
|
2972
|
+
_,
|
|
2918
2973
|
{
|
|
2919
2974
|
component: "span",
|
|
2920
2975
|
sx: {
|
|
@@ -2924,32 +2979,36 @@ function Ht({ value: t, sx: e }) {
|
|
|
2924
2979
|
color: o.palette.text.primary,
|
|
2925
2980
|
whiteSpace: "nowrap"
|
|
2926
2981
|
},
|
|
2927
|
-
children:
|
|
2982
|
+
children: e
|
|
2928
2983
|
}
|
|
2929
2984
|
)
|
|
2930
2985
|
}
|
|
2931
2986
|
);
|
|
2932
2987
|
}
|
|
2933
|
-
const
|
|
2934
|
-
({
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2988
|
+
const Yt = J(
|
|
2989
|
+
({
|
|
2990
|
+
store: e,
|
|
2991
|
+
useDegree: t,
|
|
2992
|
+
isJointVelocitySlider: o
|
|
2993
|
+
}) => {
|
|
2994
|
+
const { t: r } = V();
|
|
2995
|
+
function i(n, c) {
|
|
2996
|
+
return c ? `ω = ${r("Jogging.Cartesian.Rotation.velocityDegPerSec.lb", { amount: n })}` : `v = ${r("Jogging.Cartesian.Translation.velocityMmPerSec.lb", { amount: n })}`;
|
|
2938
2997
|
}
|
|
2939
2998
|
return /* @__PURE__ */ a(
|
|
2940
|
-
|
|
2999
|
+
Po,
|
|
2941
3000
|
{
|
|
2942
|
-
store:
|
|
2943
|
-
velocity:
|
|
2944
|
-
min:
|
|
2945
|
-
max:
|
|
2946
|
-
onVelocityChange:
|
|
2947
|
-
useDegree:
|
|
2948
|
-
disabled:
|
|
2949
|
-
renderValue: (
|
|
2950
|
-
|
|
3001
|
+
store: e,
|
|
3002
|
+
velocity: e.velocityInDisplayUnits(t),
|
|
3003
|
+
min: e.minVelocityInDisplayUnits(t),
|
|
3004
|
+
max: o ? e.maxJointVelocityInDisplayUnits : e.maxVelocityInDisplayUnits(t),
|
|
3005
|
+
onVelocityChange: e.setVelocityFromSlider,
|
|
3006
|
+
useDegree: t,
|
|
3007
|
+
disabled: e.isLocked,
|
|
3008
|
+
renderValue: (n) => /* @__PURE__ */ a(
|
|
3009
|
+
qt,
|
|
2951
3010
|
{
|
|
2952
|
-
value:
|
|
3011
|
+
value: i(n, t),
|
|
2953
3012
|
sx: {
|
|
2954
3013
|
minWidth: "111px",
|
|
2955
3014
|
span: {
|
|
@@ -2961,21 +3020,21 @@ const qt = J(
|
|
|
2961
3020
|
}
|
|
2962
3021
|
);
|
|
2963
3022
|
}
|
|
2964
|
-
),
|
|
3023
|
+
), Do = J(
|
|
2965
3024
|
({
|
|
2966
|
-
store:
|
|
2967
|
-
children:
|
|
3025
|
+
store: e,
|
|
3026
|
+
children: t
|
|
2968
3027
|
}) => {
|
|
2969
3028
|
const { t: o } = V(), r = F();
|
|
2970
3029
|
function i(u, p) {
|
|
2971
|
-
(p === "translate" || p === "rotate") &&
|
|
3030
|
+
(p === "translate" || p === "rotate") && e.setSelectedCartesianMotionType(p);
|
|
2972
3031
|
}
|
|
2973
|
-
|
|
2974
|
-
() => [
|
|
3032
|
+
re(
|
|
3033
|
+
() => [e.selectedCoordSystemId, e.selectedTcpId],
|
|
2975
3034
|
() => {
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
`/controllers/${
|
|
3035
|
+
e.jogger.motionStream.motionStateSocket.changeUrl(
|
|
3036
|
+
e.jogger.nova.makeWebsocketURL(
|
|
3037
|
+
`/controllers/${e.jogger.motionStream.controllerId}/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}`
|
|
2979
3038
|
)
|
|
2980
3039
|
);
|
|
2981
3040
|
},
|
|
@@ -2983,49 +3042,49 @@ const qt = J(
|
|
|
2983
3042
|
{ fireImmediately: !0 }
|
|
2984
3043
|
);
|
|
2985
3044
|
async function n(u, p) {
|
|
2986
|
-
const x = await
|
|
2987
|
-
y && await
|
|
3045
|
+
const x = await e.activate(), y = x.motionStream.rapidlyChangingMotionState.tcp_pose, f = x.motionStream.rapidlyChangingMotionState.joint_position;
|
|
3046
|
+
y && await e.withMotionLock(async () => {
|
|
2988
3047
|
try {
|
|
2989
|
-
|
|
3048
|
+
e.setCurrentIncrementJog({
|
|
2990
3049
|
axis: u.axis,
|
|
2991
3050
|
direction: u.direction
|
|
2992
|
-
}), await
|
|
3051
|
+
}), await e.jogger.runIncrementalCartesianMotion({
|
|
2993
3052
|
currentTcpPose: y,
|
|
2994
3053
|
currentJoints: f,
|
|
2995
|
-
coordSystemId:
|
|
2996
|
-
velocityInRelevantUnits:
|
|
3054
|
+
coordSystemId: e.activeCoordSystemId,
|
|
3055
|
+
velocityInRelevantUnits: e.selectedCartesianMotionType === "translate" ? e.translationVelocityMmPerSec : e.rotationVelocityRadsPerSec,
|
|
2997
3056
|
axis: u.axis,
|
|
2998
3057
|
direction: u.direction,
|
|
2999
|
-
motion:
|
|
3058
|
+
motion: e.selectedCartesianMotionType === "translate" ? {
|
|
3000
3059
|
type: "translate",
|
|
3001
3060
|
distanceMm: p.mm
|
|
3002
3061
|
} : {
|
|
3003
3062
|
type: "rotate",
|
|
3004
|
-
distanceRads:
|
|
3063
|
+
distanceRads: Re(p.degrees)
|
|
3005
3064
|
}
|
|
3006
3065
|
});
|
|
3007
3066
|
} finally {
|
|
3008
|
-
|
|
3067
|
+
e.setCurrentIncrementJog(null), await e.deactivate();
|
|
3009
3068
|
}
|
|
3010
3069
|
});
|
|
3011
3070
|
}
|
|
3012
3071
|
async function c(u) {
|
|
3013
|
-
if (!
|
|
3014
|
-
if (await
|
|
3015
|
-
return n(u,
|
|
3016
|
-
u.motionType === "translate" ? await
|
|
3072
|
+
if (!e.isLocked) {
|
|
3073
|
+
if (await e.activate(), e.activeDiscreteIncrement)
|
|
3074
|
+
return n(u, e.activeDiscreteIncrement);
|
|
3075
|
+
u.motionType === "translate" ? await e.jogger.translateTCP({
|
|
3017
3076
|
axis: u.axis,
|
|
3018
3077
|
direction: u.direction,
|
|
3019
|
-
velocityMmPerSec:
|
|
3020
|
-
}) : await
|
|
3078
|
+
velocityMmPerSec: e.translationVelocityMmPerSec
|
|
3079
|
+
}) : await e.jogger.rotateTCP({
|
|
3021
3080
|
axis: u.axis,
|
|
3022
3081
|
direction: u.direction,
|
|
3023
|
-
velocityRadsPerSec:
|
|
3082
|
+
velocityRadsPerSec: e.rotationVelocityRadsPerSec
|
|
3024
3083
|
});
|
|
3025
3084
|
}
|
|
3026
3085
|
}
|
|
3027
3086
|
async function s() {
|
|
3028
|
-
|
|
3087
|
+
e.isLocked || e.activeDiscreteIncrement || await e.deactivate();
|
|
3029
3088
|
}
|
|
3030
3089
|
function l(u, p, x) {
|
|
3031
3090
|
var f, h, v;
|
|
@@ -3036,18 +3095,18 @@ const qt = J(
|
|
|
3036
3095
|
const g = [
|
|
3037
3096
|
{
|
|
3038
3097
|
id: "x",
|
|
3039
|
-
icon: /* @__PURE__ */ a(
|
|
3040
|
-
colors: l("X",
|
|
3098
|
+
icon: /* @__PURE__ */ a(Je, {}),
|
|
3099
|
+
colors: l("X", e.selectedCartesianMotionType, r)
|
|
3041
3100
|
},
|
|
3042
3101
|
{
|
|
3043
3102
|
id: "y",
|
|
3044
|
-
icon: /* @__PURE__ */ a(
|
|
3045
|
-
colors: l("Y",
|
|
3103
|
+
icon: /* @__PURE__ */ a(Be, {}),
|
|
3104
|
+
colors: l("Y", e.selectedCartesianMotionType, r)
|
|
3046
3105
|
},
|
|
3047
3106
|
{
|
|
3048
3107
|
id: "z",
|
|
3049
|
-
icon: /* @__PURE__ */ a(
|
|
3050
|
-
colors: l("Z",
|
|
3108
|
+
icon: /* @__PURE__ */ a(Fe, {}),
|
|
3109
|
+
colors: l("Z", e.selectedCartesianMotionType, r)
|
|
3051
3110
|
}
|
|
3052
3111
|
];
|
|
3053
3112
|
function m(u) {
|
|
@@ -3055,7 +3114,7 @@ const qt = J(
|
|
|
3055
3114
|
}
|
|
3056
3115
|
function d(u) {
|
|
3057
3116
|
return o("General.degree.variable", {
|
|
3058
|
-
amount:
|
|
3117
|
+
amount: Nt(u).toFixed(1)
|
|
3059
3118
|
});
|
|
3060
3119
|
}
|
|
3061
3120
|
return /* @__PURE__ */ S(
|
|
@@ -3069,17 +3128,17 @@ const qt = J(
|
|
|
3069
3128
|
children: [
|
|
3070
3129
|
/* @__PURE__ */ S(P, { gap: 2, children: [
|
|
3071
3130
|
/* @__PURE__ */ a(
|
|
3072
|
-
|
|
3131
|
+
Eo,
|
|
3073
3132
|
{
|
|
3074
|
-
store:
|
|
3075
|
-
useDegree:
|
|
3133
|
+
store: e,
|
|
3134
|
+
useDegree: e.selectedCartesianMotionType === "rotate"
|
|
3076
3135
|
}
|
|
3077
3136
|
),
|
|
3078
3137
|
/* @__PURE__ */ a(
|
|
3079
|
-
|
|
3138
|
+
Yt,
|
|
3080
3139
|
{
|
|
3081
|
-
store:
|
|
3082
|
-
useDegree:
|
|
3140
|
+
store: e,
|
|
3141
|
+
useDegree: e.selectedCartesianMotionType === "rotate"
|
|
3083
3142
|
}
|
|
3084
3143
|
),
|
|
3085
3144
|
/* @__PURE__ */ a(Y, {})
|
|
@@ -3101,33 +3160,33 @@ const qt = J(
|
|
|
3101
3160
|
sx: { flexGrow: 1 },
|
|
3102
3161
|
children: [
|
|
3103
3162
|
/* @__PURE__ */ S(
|
|
3104
|
-
|
|
3163
|
+
jo,
|
|
3105
3164
|
{
|
|
3106
|
-
value:
|
|
3165
|
+
value: e.selectedCartesianMotionType,
|
|
3107
3166
|
onChange: i,
|
|
3108
3167
|
exclusive: !0,
|
|
3109
3168
|
"aria-label": o("Jogging.Cartesian.MotionType.lb"),
|
|
3110
3169
|
sx: { justifyContent: "center" },
|
|
3111
3170
|
children: [
|
|
3112
|
-
/* @__PURE__ */ a(
|
|
3113
|
-
/* @__PURE__ */ a(
|
|
3171
|
+
/* @__PURE__ */ a(_t, { value: "translate", children: o("Jogging.Cartesian.Translation.bt") }),
|
|
3172
|
+
/* @__PURE__ */ a(_t, { value: "rotate", children: o("Jogging.Cartesian.Rotation.bt") })
|
|
3114
3173
|
]
|
|
3115
3174
|
}
|
|
3116
3175
|
),
|
|
3117
|
-
|
|
3176
|
+
e.selectedCartesianMotionType === "translate" && g.map((u) => {
|
|
3118
3177
|
var p, x;
|
|
3119
3178
|
return /* @__PURE__ */ a(
|
|
3120
|
-
|
|
3179
|
+
Pt,
|
|
3121
3180
|
{
|
|
3122
3181
|
"data-testid": `jogging-cartesian-axis-control-${u.id}`,
|
|
3123
3182
|
"aria-label": `jogging-cartesian-axis-control-${u.id}`,
|
|
3124
3183
|
colors: u.colors,
|
|
3125
|
-
disabled:
|
|
3126
|
-
activeJoggingDirection: ((p =
|
|
3184
|
+
disabled: e.isLocked,
|
|
3185
|
+
activeJoggingDirection: ((p = e.incrementJogInProgress) == null ? void 0 : p.axis) === u.id ? e.incrementJogInProgress.direction : void 0,
|
|
3127
3186
|
label: /* @__PURE__ */ S(et, { children: [
|
|
3128
3187
|
u.icon,
|
|
3129
3188
|
/* @__PURE__ */ a(
|
|
3130
|
-
|
|
3189
|
+
_,
|
|
3131
3190
|
{
|
|
3132
3191
|
sx: {
|
|
3133
3192
|
fontSize: "24px",
|
|
@@ -3140,7 +3199,7 @@ const qt = J(
|
|
|
3140
3199
|
getDisplayedValue: () => {
|
|
3141
3200
|
var y, f;
|
|
3142
3201
|
return m(
|
|
3143
|
-
((f = (y =
|
|
3202
|
+
((f = (y = e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : y.position) == null ? void 0 : f[tt[u.id]]) || 0
|
|
3144
3203
|
);
|
|
3145
3204
|
},
|
|
3146
3205
|
startJogging: (y) => c({
|
|
@@ -3153,20 +3212,20 @@ const qt = J(
|
|
|
3153
3212
|
u.id
|
|
3154
3213
|
);
|
|
3155
3214
|
}),
|
|
3156
|
-
|
|
3215
|
+
e.selectedCartesianMotionType === "rotate" && g.map((u) => {
|
|
3157
3216
|
var p, x;
|
|
3158
3217
|
return /* @__PURE__ */ a(
|
|
3159
|
-
|
|
3218
|
+
Pt,
|
|
3160
3219
|
{
|
|
3161
3220
|
"data-testid": `jogging-cartesian-axis-control-${u.id}`,
|
|
3162
3221
|
"aria-label": `jogging-cartesian-axis-control-${u.id}`,
|
|
3163
3222
|
colors: u.colors,
|
|
3164
|
-
disabled:
|
|
3165
|
-
activeJoggingDirection: ((p =
|
|
3223
|
+
disabled: e.isLocked,
|
|
3224
|
+
activeJoggingDirection: ((p = e.incrementJogInProgress) == null ? void 0 : p.axis) === u.id ? e.incrementJogInProgress.direction : void 0,
|
|
3166
3225
|
label: /* @__PURE__ */ S(et, { children: [
|
|
3167
|
-
/* @__PURE__ */ a(
|
|
3226
|
+
/* @__PURE__ */ a(Le, {}),
|
|
3168
3227
|
/* @__PURE__ */ a(
|
|
3169
|
-
|
|
3228
|
+
_,
|
|
3170
3229
|
{
|
|
3171
3230
|
sx: {
|
|
3172
3231
|
fontSize: "24px",
|
|
@@ -3179,7 +3238,7 @@ const qt = J(
|
|
|
3179
3238
|
getDisplayedValue: () => {
|
|
3180
3239
|
var y, f;
|
|
3181
3240
|
return d(
|
|
3182
|
-
((f = (y =
|
|
3241
|
+
((f = (y = e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : y.orientation) == null ? void 0 : f[tt[u.id]]) || 0
|
|
3183
3242
|
);
|
|
3184
3243
|
},
|
|
3185
3244
|
startJogging: (y) => c({
|
|
@@ -3197,26 +3256,26 @@ const qt = J(
|
|
|
3197
3256
|
)
|
|
3198
3257
|
}
|
|
3199
3258
|
),
|
|
3200
|
-
/* @__PURE__ */ a(
|
|
3201
|
-
|
|
3202
|
-
|
|
3259
|
+
/* @__PURE__ */ a(Ht, { store: e }),
|
|
3260
|
+
t && /* @__PURE__ */ a(Y, {}),
|
|
3261
|
+
t
|
|
3203
3262
|
]
|
|
3204
3263
|
}
|
|
3205
3264
|
);
|
|
3206
3265
|
}
|
|
3207
|
-
),
|
|
3208
|
-
({ store:
|
|
3266
|
+
), Oo = J(
|
|
3267
|
+
({ store: e, children: t }) => {
|
|
3209
3268
|
const o = F();
|
|
3210
3269
|
async function r(n) {
|
|
3211
|
-
await
|
|
3270
|
+
await e.activate(), await e.jogger.rotateJoints({
|
|
3212
3271
|
joint: n.joint,
|
|
3213
3272
|
direction: n.direction,
|
|
3214
|
-
velocityUnit:
|
|
3215
|
-
velocityValue:
|
|
3273
|
+
velocityUnit: e.jointType === W.PrismaticJoint ? "mm/s" : "rad/s",
|
|
3274
|
+
velocityValue: e.jointType === W.PrismaticJoint ? e.translationVelocityMmPerSec : e.rotationVelocityRadsPerSec
|
|
3216
3275
|
});
|
|
3217
3276
|
}
|
|
3218
3277
|
async function i() {
|
|
3219
|
-
await
|
|
3278
|
+
await e.jogger.stop(), await e.deactivate();
|
|
3220
3279
|
}
|
|
3221
3280
|
return /* @__PURE__ */ S(
|
|
3222
3281
|
P,
|
|
@@ -3228,10 +3287,11 @@ const qt = J(
|
|
|
3228
3287
|
sx: { padding: "18px 24px" },
|
|
3229
3288
|
children: [
|
|
3230
3289
|
/* @__PURE__ */ a(
|
|
3231
|
-
|
|
3290
|
+
Yt,
|
|
3232
3291
|
{
|
|
3233
|
-
store:
|
|
3234
|
-
useDegree:
|
|
3292
|
+
store: e,
|
|
3293
|
+
useDegree: e.jointType === W.RevoluteJoint,
|
|
3294
|
+
isJointVelocitySlider: !0
|
|
3235
3295
|
}
|
|
3236
3296
|
),
|
|
3237
3297
|
/* @__PURE__ */ a(Y, {}),
|
|
@@ -3248,9 +3308,9 @@ const qt = J(
|
|
|
3248
3308
|
"aria-label": "jogging-joint-value-controls-wrapper",
|
|
3249
3309
|
alignItems: "center",
|
|
3250
3310
|
gap: "24px",
|
|
3251
|
-
children:
|
|
3311
|
+
children: e.jogger.motionStream.joints.map((n) => {
|
|
3252
3312
|
var s, l, g;
|
|
3253
|
-
const c = (g = (l = (s =
|
|
3313
|
+
const c = (g = (l = (s = e.motionGroupDescription.operation_limits.auto_limits) == null ? void 0 : s.joints) == null ? void 0 : l[n.index]) == null ? void 0 : g.position;
|
|
3254
3314
|
return /* @__PURE__ */ S(
|
|
3255
3315
|
P,
|
|
3256
3316
|
{
|
|
@@ -3262,22 +3322,22 @@ const qt = J(
|
|
|
3262
3322
|
spacing: 1.5,
|
|
3263
3323
|
width: "100%",
|
|
3264
3324
|
children: [
|
|
3265
|
-
|
|
3266
|
-
|
|
3325
|
+
e.showJointsLegend && /* @__PURE__ */ a(
|
|
3326
|
+
_,
|
|
3267
3327
|
{
|
|
3268
|
-
color:
|
|
3328
|
+
color: e.isLocked ? o.palette.text.disabled : o.palette.text.secondary,
|
|
3269
3329
|
children: `G${n.index + 1}`
|
|
3270
3330
|
}
|
|
3271
3331
|
),
|
|
3272
3332
|
/* @__PURE__ */ a(
|
|
3273
|
-
|
|
3333
|
+
vo,
|
|
3274
3334
|
{
|
|
3275
|
-
disabled:
|
|
3335
|
+
disabled: e.isLocked,
|
|
3276
3336
|
lowerLimit: c == null ? void 0 : c.lower_limit,
|
|
3277
3337
|
upperLimit: c == null ? void 0 : c.upper_limit,
|
|
3278
|
-
useDegree:
|
|
3338
|
+
useDegree: e.jointType === W.RevoluteJoint,
|
|
3279
3339
|
getValue: () => {
|
|
3280
|
-
const m =
|
|
3340
|
+
const m = e.jogger.motionStream.rapidlyChangingMotionState.joint_position[n.index];
|
|
3281
3341
|
return m !== void 0 ? m : void 0;
|
|
3282
3342
|
},
|
|
3283
3343
|
startJogging: (m) => r({
|
|
@@ -3296,16 +3356,16 @@ const qt = J(
|
|
|
3296
3356
|
)
|
|
3297
3357
|
}
|
|
3298
3358
|
),
|
|
3299
|
-
/* @__PURE__ */ a(
|
|
3300
|
-
|
|
3301
|
-
|
|
3359
|
+
/* @__PURE__ */ a(Ht, { store: e }),
|
|
3360
|
+
t && /* @__PURE__ */ a(Y, {}),
|
|
3361
|
+
t
|
|
3302
3362
|
]
|
|
3303
3363
|
}
|
|
3304
3364
|
);
|
|
3305
3365
|
}
|
|
3306
|
-
),
|
|
3307
|
-
J((
|
|
3308
|
-
const
|
|
3366
|
+
), mi = $(
|
|
3367
|
+
J((e) => {
|
|
3368
|
+
const t = Te(e.nova) ? new Se({ instanceUrl: e.nova }) : e.nova, o = Lt(() => ({
|
|
3309
3369
|
joggingStore: null,
|
|
3310
3370
|
loadingError: null
|
|
3311
3371
|
}));
|
|
@@ -3314,25 +3374,25 @@ const qt = J(
|
|
|
3314
3374
|
o.loadingError = null, o.joggingStore = null;
|
|
3315
3375
|
});
|
|
3316
3376
|
try {
|
|
3317
|
-
let i =
|
|
3377
|
+
let i = e.store;
|
|
3318
3378
|
if (!i) {
|
|
3319
|
-
const n = await ft.open(
|
|
3379
|
+
const n = await ft.open(t, e.motionGroupId);
|
|
3320
3380
|
i = await bt.loadFor(n);
|
|
3321
3381
|
}
|
|
3322
3382
|
L(() => {
|
|
3323
3383
|
o.joggingStore = i;
|
|
3324
|
-
}),
|
|
3384
|
+
}), e.onSetup && e.onSetup(i);
|
|
3325
3385
|
} catch (i) {
|
|
3326
3386
|
o.loadingError = i;
|
|
3327
3387
|
}
|
|
3328
3388
|
}
|
|
3329
|
-
return A(() => (r(),
|
|
3389
|
+
return A(() => (r(), e.store ? () => null : () => {
|
|
3330
3390
|
var i;
|
|
3331
3391
|
(i = o.joggingStore) == null || i.dispose();
|
|
3332
|
-
}), [
|
|
3392
|
+
}), [e.store, e.nova, e.motionGroupId]), A(() => {
|
|
3333
3393
|
const i = o.joggingStore;
|
|
3334
|
-
i && (
|
|
3335
|
-
}, [o.joggingStore,
|
|
3394
|
+
i && (e.locked ? i.lock("external") : i.unlock("external"));
|
|
3395
|
+
}, [o.joggingStore, e.locked]), /* @__PURE__ */ a(
|
|
3336
3396
|
P,
|
|
3337
3397
|
{
|
|
3338
3398
|
"data-testid": "jogging-panel",
|
|
@@ -3341,41 +3401,41 @@ const qt = J(
|
|
|
3341
3401
|
maxWidth: "460px",
|
|
3342
3402
|
minWidth: "320px",
|
|
3343
3403
|
position: "relative",
|
|
3344
|
-
...
|
|
3404
|
+
...e.sx
|
|
3345
3405
|
},
|
|
3346
|
-
children: o.joggingStore ? /* @__PURE__ */ a(
|
|
3406
|
+
children: o.joggingStore ? /* @__PURE__ */ a(Ao, { store: o.joggingStore, children: e.children }) : /* @__PURE__ */ a(To, { message: "Loading jogging", error: o.loadingError })
|
|
3347
3407
|
}
|
|
3348
3408
|
);
|
|
3349
3409
|
})
|
|
3350
|
-
),
|
|
3410
|
+
), Ao = J(
|
|
3351
3411
|
({
|
|
3352
|
-
store:
|
|
3353
|
-
children:
|
|
3412
|
+
store: e,
|
|
3413
|
+
children: t
|
|
3354
3414
|
}) => {
|
|
3355
3415
|
const { t: o } = V();
|
|
3356
3416
|
function r() {
|
|
3357
|
-
if (
|
|
3358
|
-
return /* @__PURE__ */ a(
|
|
3359
|
-
if (
|
|
3360
|
-
return /* @__PURE__ */ a(
|
|
3417
|
+
if (e.currentTab.id === "cartesian")
|
|
3418
|
+
return /* @__PURE__ */ a(Do, { store: e, children: t });
|
|
3419
|
+
if (e.currentTab.id === "joint")
|
|
3420
|
+
return /* @__PURE__ */ a(Oo, { store: e, children: t });
|
|
3361
3421
|
}
|
|
3362
3422
|
return /* @__PURE__ */ S(P, { flexGrow: 1, sx: { overflow: "hidden" }, children: [
|
|
3363
3423
|
/* @__PURE__ */ a(
|
|
3364
|
-
|
|
3424
|
+
Vt,
|
|
3365
3425
|
{
|
|
3366
3426
|
"data-testid": "jogging-tabs",
|
|
3367
3427
|
"aria-label": "jogging-tabs",
|
|
3368
|
-
value:
|
|
3369
|
-
onChange:
|
|
3428
|
+
value: e.tabIndex,
|
|
3429
|
+
onChange: e.onTabChange,
|
|
3370
3430
|
variant: "fullWidth",
|
|
3371
|
-
children:
|
|
3372
|
-
const n = i.label === "Cartesian" ? o("Jogging.Cartesian.bt") : o("Jogging.Joints.bt"), c = i.label === "cartesian" ? /* @__PURE__ */ a(
|
|
3431
|
+
children: e.tabs.map((i) => {
|
|
3432
|
+
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 } });
|
|
3373
3433
|
return /* @__PURE__ */ a(
|
|
3374
|
-
|
|
3434
|
+
zt,
|
|
3375
3435
|
{
|
|
3376
3436
|
"data-testid": `jogging-tab-${i.id}`,
|
|
3377
3437
|
"aria-label": `jogging-tab-${i.id}`,
|
|
3378
|
-
label:
|
|
3438
|
+
label: e.showTabIcons ? /* @__PURE__ */ S(P, { direction: "row", alignItems: "center", children: [
|
|
3379
3439
|
c,
|
|
3380
3440
|
n
|
|
3381
3441
|
] }) : n,
|
|
@@ -3396,17 +3456,17 @@ const qt = J(
|
|
|
3396
3456
|
children: r()
|
|
3397
3457
|
}
|
|
3398
3458
|
),
|
|
3399
|
-
|
|
3459
|
+
e.blocked && /* @__PURE__ */ a(ko, { store: e })
|
|
3400
3460
|
] });
|
|
3401
3461
|
}
|
|
3402
|
-
),
|
|
3462
|
+
), Zt = (e) => {
|
|
3403
3463
|
var s;
|
|
3404
|
-
const { value:
|
|
3464
|
+
const { value: t, ref: o } = e, r = F(), [i, n] = B(!1);
|
|
3405
3465
|
async function c() {
|
|
3406
3466
|
if (!o || !("current" in o))
|
|
3407
3467
|
return console.warn("No copy target found"), !1;
|
|
3408
3468
|
try {
|
|
3409
|
-
return await navigator.clipboard.writeText(
|
|
3469
|
+
return await navigator.clipboard.writeText(t), console.log("Copied!"), n(!0), !0;
|
|
3410
3470
|
} catch (l) {
|
|
3411
3471
|
console.error(l);
|
|
3412
3472
|
const g = window.getSelection();
|
|
@@ -3424,7 +3484,7 @@ const qt = J(
|
|
|
3424
3484
|
return () => {
|
|
3425
3485
|
l && clearTimeout(l);
|
|
3426
3486
|
};
|
|
3427
|
-
}, [i]), /* @__PURE__ */ a(
|
|
3487
|
+
}, [i]), /* @__PURE__ */ a(Qe, { open: i, title: "Copied!", children: /* @__PURE__ */ a(
|
|
3428
3488
|
P,
|
|
3429
3489
|
{
|
|
3430
3490
|
justifyContent: "center",
|
|
@@ -3439,7 +3499,7 @@ const qt = J(
|
|
|
3439
3499
|
},
|
|
3440
3500
|
onClick: () => c(),
|
|
3441
3501
|
children: /* @__PURE__ */ a(
|
|
3442
|
-
|
|
3502
|
+
_,
|
|
3443
3503
|
{
|
|
3444
3504
|
ref: o,
|
|
3445
3505
|
align: "center",
|
|
@@ -3453,14 +3513,14 @@ const qt = J(
|
|
|
3453
3513
|
width: "100%",
|
|
3454
3514
|
overflow: "hidden"
|
|
3455
3515
|
},
|
|
3456
|
-
children:
|
|
3516
|
+
children: t
|
|
3457
3517
|
}
|
|
3458
3518
|
)
|
|
3459
3519
|
}
|
|
3460
3520
|
) });
|
|
3461
|
-
},
|
|
3462
|
-
J(({ tcpPose:
|
|
3463
|
-
const [o, r] = B(null), i =
|
|
3521
|
+
}, hi = $(
|
|
3522
|
+
J(({ tcpPose: e, showCopyButton: t = !1 }) => {
|
|
3523
|
+
const [o, r] = B(null), i = ve(e);
|
|
3464
3524
|
return /* @__PURE__ */ S(
|
|
3465
3525
|
P,
|
|
3466
3526
|
{
|
|
@@ -3470,8 +3530,8 @@ const qt = J(
|
|
|
3470
3530
|
sx: { flexGrow: 1, minWidth: 0, overflow: "hidden" },
|
|
3471
3531
|
"data-testid": "pose-cartesian-values",
|
|
3472
3532
|
children: [
|
|
3473
|
-
/* @__PURE__ */ a(
|
|
3474
|
-
|
|
3533
|
+
/* @__PURE__ */ a(Zt, { value: i }),
|
|
3534
|
+
t && /* @__PURE__ */ a(
|
|
3475
3535
|
Z,
|
|
3476
3536
|
{
|
|
3477
3537
|
variant: "contained",
|
|
@@ -3492,9 +3552,9 @@ const qt = J(
|
|
|
3492
3552
|
}
|
|
3493
3553
|
);
|
|
3494
3554
|
})
|
|
3495
|
-
),
|
|
3496
|
-
J(({ joints:
|
|
3497
|
-
const [o, r] = B(null), i = `[${
|
|
3555
|
+
), fi = $(
|
|
3556
|
+
J(({ joints: e, showCopyButton: t = !1 }) => {
|
|
3557
|
+
const [o, r] = B(null), i = `[${e.map((c) => parseFloat(c.toFixed(4))).join(", ")}]`;
|
|
3498
3558
|
return /* @__PURE__ */ S(
|
|
3499
3559
|
P,
|
|
3500
3560
|
{
|
|
@@ -3504,8 +3564,8 @@ const qt = J(
|
|
|
3504
3564
|
sx: { flexGrow: 1, minWidth: 0, overflow: "hidden" },
|
|
3505
3565
|
"data-testid": "pose-joint-values",
|
|
3506
3566
|
children: [
|
|
3507
|
-
/* @__PURE__ */ a(
|
|
3508
|
-
|
|
3567
|
+
/* @__PURE__ */ a(Zt, { value: i }),
|
|
3568
|
+
t && /* @__PURE__ */ a(
|
|
3509
3569
|
Z,
|
|
3510
3570
|
{
|
|
3511
3571
|
variant: "contained",
|
|
@@ -3527,51 +3587,51 @@ const qt = J(
|
|
|
3527
3587
|
);
|
|
3528
3588
|
})
|
|
3529
3589
|
);
|
|
3530
|
-
class
|
|
3590
|
+
class Jo {
|
|
3531
3591
|
constructor() {
|
|
3532
|
-
this.messages = [], this.addMessage = (
|
|
3592
|
+
this.messages = [], this.addMessage = (t, o = "info") => {
|
|
3533
3593
|
const r = {
|
|
3534
3594
|
id: Math.random().toString(36).substring(2, 11),
|
|
3535
3595
|
timestamp: /* @__PURE__ */ new Date(),
|
|
3536
|
-
message:
|
|
3596
|
+
message: t,
|
|
3537
3597
|
level: o
|
|
3538
3598
|
};
|
|
3539
3599
|
this.messages.push(r);
|
|
3540
3600
|
}, this.clearMessages = () => {
|
|
3541
3601
|
this.messages = [];
|
|
3542
|
-
}, this.addInfo = (
|
|
3543
|
-
this.addMessage(
|
|
3544
|
-
}, this.addWarning = (
|
|
3545
|
-
this.addMessage(
|
|
3546
|
-
}, this.addError = (
|
|
3547
|
-
this.addMessage(
|
|
3548
|
-
}, this.addDebug = (
|
|
3549
|
-
this.addMessage(
|
|
3550
|
-
},
|
|
3551
|
-
messages:
|
|
3552
|
-
addMessage:
|
|
3553
|
-
clearMessages:
|
|
3602
|
+
}, this.addInfo = (t) => {
|
|
3603
|
+
this.addMessage(t, "info");
|
|
3604
|
+
}, this.addWarning = (t) => {
|
|
3605
|
+
this.addMessage(t, "warning");
|
|
3606
|
+
}, this.addError = (t) => {
|
|
3607
|
+
this.addMessage(t, "error");
|
|
3608
|
+
}, this.addDebug = (t) => {
|
|
3609
|
+
this.addMessage(t, "debug");
|
|
3610
|
+
}, ke(this, {
|
|
3611
|
+
messages: Ie,
|
|
3612
|
+
addMessage: Rt,
|
|
3613
|
+
clearMessages: Rt
|
|
3554
3614
|
});
|
|
3555
3615
|
}
|
|
3556
3616
|
}
|
|
3557
|
-
const at = (
|
|
3617
|
+
const at = (e, t, o) => ({
|
|
3558
3618
|
id: o || `${Date.now()}-${Math.random().toString(36).substring(2, 11)}`,
|
|
3559
3619
|
timestamp: /* @__PURE__ */ new Date(),
|
|
3560
|
-
message:
|
|
3561
|
-
level:
|
|
3562
|
-
}),
|
|
3563
|
-
J((
|
|
3620
|
+
message: e,
|
|
3621
|
+
level: t
|
|
3622
|
+
}), bi = (e, t) => at(e, "debug", t), xi = (e, t) => at(e, "info", t), yi = (e, t) => at(e, "warning", t), Si = (e, t) => at(e, "error", t), Bo = $(
|
|
3623
|
+
J((e) => {
|
|
3564
3624
|
var m;
|
|
3565
|
-
const { messages:
|
|
3625
|
+
const { messages: t = [], onClear: o, height: r = 400, sx: i } = e, n = F(), c = O(null);
|
|
3566
3626
|
A(() => {
|
|
3567
|
-
if (
|
|
3627
|
+
if (t.length === 0) return;
|
|
3568
3628
|
const d = c.current;
|
|
3569
3629
|
if (!d) return;
|
|
3570
3630
|
const u = setTimeout(() => {
|
|
3571
3631
|
d.scrollTop = d.scrollHeight;
|
|
3572
3632
|
}, 10);
|
|
3573
3633
|
return () => clearTimeout(u);
|
|
3574
|
-
}, [
|
|
3634
|
+
}, [t.length]);
|
|
3575
3635
|
const s = (d) => d.toLocaleTimeString("en-US", {
|
|
3576
3636
|
hour12: !1,
|
|
3577
3637
|
hour: "2-digit",
|
|
@@ -3594,10 +3654,10 @@ const at = (t, e, o) => ({
|
|
|
3594
3654
|
const [u, p] = B(!1), [x, y] = B(!1), [f, h] = B(!1), v = d.message.length > 150, b = async () => {
|
|
3595
3655
|
try {
|
|
3596
3656
|
await navigator.clipboard.writeText(d.message), y(!0), setTimeout(() => y(!1), 2e3);
|
|
3597
|
-
} catch (
|
|
3598
|
-
console.error("Failed to copy message:",
|
|
3657
|
+
} catch (w) {
|
|
3658
|
+
console.error("Failed to copy message:", w);
|
|
3599
3659
|
}
|
|
3600
|
-
},
|
|
3660
|
+
}, C = v && !u ? `${d.message.substring(0, 150)}...` : d.message;
|
|
3601
3661
|
return /* @__PURE__ */ a(
|
|
3602
3662
|
T,
|
|
3603
3663
|
{
|
|
@@ -3617,7 +3677,7 @@ const at = (t, e, o) => ({
|
|
|
3617
3677
|
},
|
|
3618
3678
|
children: /* @__PURE__ */ S(T, { sx: { display: "flex", gap: 1 }, children: [
|
|
3619
3679
|
/* @__PURE__ */ S(
|
|
3620
|
-
|
|
3680
|
+
_,
|
|
3621
3681
|
{
|
|
3622
3682
|
component: "span",
|
|
3623
3683
|
sx: {
|
|
@@ -3637,7 +3697,7 @@ const at = (t, e, o) => ({
|
|
|
3637
3697
|
}
|
|
3638
3698
|
),
|
|
3639
3699
|
/* @__PURE__ */ a(
|
|
3640
|
-
|
|
3700
|
+
_,
|
|
3641
3701
|
{
|
|
3642
3702
|
component: "span",
|
|
3643
3703
|
sx: {
|
|
@@ -3652,7 +3712,7 @@ const at = (t, e, o) => ({
|
|
|
3652
3712
|
flex: 1,
|
|
3653
3713
|
whiteSpace: "pre-wrap"
|
|
3654
3714
|
},
|
|
3655
|
-
children:
|
|
3715
|
+
children: C
|
|
3656
3716
|
}
|
|
3657
3717
|
),
|
|
3658
3718
|
/* @__PURE__ */ S(
|
|
@@ -3680,7 +3740,7 @@ const at = (t, e, o) => ({
|
|
|
3680
3740
|
}
|
|
3681
3741
|
},
|
|
3682
3742
|
title: x ? "Copied!" : "Copy message",
|
|
3683
|
-
children: /* @__PURE__ */ a(
|
|
3743
|
+
children: /* @__PURE__ */ a(Xe, { sx: { fontSize: 12 } })
|
|
3684
3744
|
}
|
|
3685
3745
|
),
|
|
3686
3746
|
v && /* @__PURE__ */ a(
|
|
@@ -3696,7 +3756,7 @@ const at = (t, e, o) => ({
|
|
|
3696
3756
|
}
|
|
3697
3757
|
},
|
|
3698
3758
|
title: u ? "Collapse" : "Expand",
|
|
3699
|
-
children: u ? /* @__PURE__ */ a(
|
|
3759
|
+
children: u ? /* @__PURE__ */ a(to, { sx: { fontSize: 12 } }) : /* @__PURE__ */ a(eo, { sx: { fontSize: 12 } })
|
|
3700
3760
|
}
|
|
3701
3761
|
)
|
|
3702
3762
|
]
|
|
@@ -3708,7 +3768,7 @@ const at = (t, e, o) => ({
|
|
|
3708
3768
|
);
|
|
3709
3769
|
};
|
|
3710
3770
|
return /* @__PURE__ */ S(
|
|
3711
|
-
|
|
3771
|
+
oo,
|
|
3712
3772
|
{
|
|
3713
3773
|
sx: {
|
|
3714
3774
|
backgroundColor: ((m = n.palette.backgroundPaperElevation) == null ? void 0 : m[2]) || "#171927",
|
|
@@ -3733,7 +3793,7 @@ const at = (t, e, o) => ({
|
|
|
3733
3793
|
children: [
|
|
3734
3794
|
/* @__PURE__ */ S(T, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
3735
3795
|
/* @__PURE__ */ a(
|
|
3736
|
-
|
|
3796
|
+
Ke,
|
|
3737
3797
|
{
|
|
3738
3798
|
sx: {
|
|
3739
3799
|
fontSize: 16,
|
|
@@ -3743,7 +3803,7 @@ const at = (t, e, o) => ({
|
|
|
3743
3803
|
}
|
|
3744
3804
|
),
|
|
3745
3805
|
/* @__PURE__ */ a(
|
|
3746
|
-
|
|
3806
|
+
_,
|
|
3747
3807
|
{
|
|
3748
3808
|
sx: {
|
|
3749
3809
|
fontWeight: 500,
|
|
@@ -3809,8 +3869,8 @@ const at = (t, e, o) => ({
|
|
|
3809
3869
|
}
|
|
3810
3870
|
}
|
|
3811
3871
|
},
|
|
3812
|
-
children:
|
|
3813
|
-
|
|
3872
|
+
children: t.length === 0 ? /* @__PURE__ */ a(
|
|
3873
|
+
_,
|
|
3814
3874
|
{
|
|
3815
3875
|
sx: {
|
|
3816
3876
|
color: n.palette.text.disabled,
|
|
@@ -3821,28 +3881,28 @@ const at = (t, e, o) => ({
|
|
|
3821
3881
|
},
|
|
3822
3882
|
children: "No log messages"
|
|
3823
3883
|
}
|
|
3824
|
-
) :
|
|
3884
|
+
) : t.map((d) => /* @__PURE__ */ a(g, { message: d }, d.id))
|
|
3825
3885
|
}
|
|
3826
3886
|
)
|
|
3827
3887
|
]
|
|
3828
3888
|
}
|
|
3829
3889
|
);
|
|
3830
3890
|
})
|
|
3831
|
-
),
|
|
3832
|
-
J((
|
|
3833
|
-
const { store:
|
|
3891
|
+
), vi = $(
|
|
3892
|
+
J((e) => {
|
|
3893
|
+
const { store: t, onStoreReady: o, ...r } = e, i = O(o);
|
|
3834
3894
|
A(() => {
|
|
3835
3895
|
i.current = o;
|
|
3836
3896
|
}, [o]);
|
|
3837
3897
|
const n = rt(() => {
|
|
3838
3898
|
var l;
|
|
3839
|
-
const s =
|
|
3899
|
+
const s = t || new Jo();
|
|
3840
3900
|
return (l = i.current) == null || l.call(i, s), s;
|
|
3841
|
-
}, [
|
|
3901
|
+
}, [t]), c = () => {
|
|
3842
3902
|
n.clearMessages();
|
|
3843
3903
|
};
|
|
3844
3904
|
return /* @__PURE__ */ a(
|
|
3845
|
-
|
|
3905
|
+
Bo,
|
|
3846
3906
|
{
|
|
3847
3907
|
...r,
|
|
3848
3908
|
messages: n.messages,
|
|
@@ -3851,19 +3911,19 @@ const at = (t, e, o) => ({
|
|
|
3851
3911
|
);
|
|
3852
3912
|
})
|
|
3853
3913
|
);
|
|
3854
|
-
function
|
|
3855
|
-
const
|
|
3856
|
-
return
|
|
3914
|
+
function Fo() {
|
|
3915
|
+
const e = window.location.href;
|
|
3916
|
+
return e.substring(
|
|
3857
3917
|
0,
|
|
3858
|
-
|
|
3918
|
+
e.indexOf("/", e.indexOf("//") + 2)
|
|
3859
3919
|
);
|
|
3860
3920
|
}
|
|
3861
|
-
function
|
|
3862
|
-
baseUrl:
|
|
3863
|
-
...
|
|
3921
|
+
function wi({
|
|
3922
|
+
baseUrl: e = Fo(),
|
|
3923
|
+
...t
|
|
3864
3924
|
}) {
|
|
3865
3925
|
return /* @__PURE__ */ S(
|
|
3866
|
-
|
|
3926
|
+
no,
|
|
3867
3927
|
{
|
|
3868
3928
|
"aria-labelledby": "no-motion-group-modal-title",
|
|
3869
3929
|
open: !0,
|
|
@@ -3883,9 +3943,9 @@ function yi({
|
|
|
3883
3943
|
}
|
|
3884
3944
|
},
|
|
3885
3945
|
children: [
|
|
3886
|
-
/* @__PURE__ */ a(
|
|
3946
|
+
/* @__PURE__ */ a(ao, { id: "no-motion-group-modal-title", children: "No motion group found" }),
|
|
3887
3947
|
/* @__PURE__ */ S(
|
|
3888
|
-
|
|
3948
|
+
ro,
|
|
3889
3949
|
{
|
|
3890
3950
|
sx: {
|
|
3891
3951
|
marginTop: "3rem",
|
|
@@ -3893,16 +3953,16 @@ function yi({
|
|
|
3893
3953
|
textAlign: "center"
|
|
3894
3954
|
},
|
|
3895
3955
|
children: [
|
|
3896
|
-
/* @__PURE__ */ a(
|
|
3897
|
-
/* @__PURE__ */ a(
|
|
3956
|
+
/* @__PURE__ */ a(_, { color: "#fff", children: "Found no devices to connect to." }),
|
|
3957
|
+
/* @__PURE__ */ a(_, { color: "#fff", children: "Please ensure a motion group has been created." })
|
|
3898
3958
|
]
|
|
3899
3959
|
}
|
|
3900
3960
|
),
|
|
3901
|
-
/* @__PURE__ */ a(
|
|
3961
|
+
/* @__PURE__ */ a(io, { children: /* @__PURE__ */ S(P, { width: "100%", maxWidth: "300px", margin: "auto", marginBottom: "2rem", children: [
|
|
3902
3962
|
/* @__PURE__ */ a(
|
|
3903
3963
|
Z,
|
|
3904
3964
|
{
|
|
3905
|
-
href: `${
|
|
3965
|
+
href: `${e}/settings`,
|
|
3906
3966
|
variant: "contained",
|
|
3907
3967
|
sx: {
|
|
3908
3968
|
borderRadius: "8px",
|
|
@@ -3914,7 +3974,7 @@ function yi({
|
|
|
3914
3974
|
/* @__PURE__ */ a(
|
|
3915
3975
|
Z,
|
|
3916
3976
|
{
|
|
3917
|
-
href: `${
|
|
3977
|
+
href: `${e}`,
|
|
3918
3978
|
variant: "text",
|
|
3919
3979
|
sx: {
|
|
3920
3980
|
marginTop: "1rem",
|
|
@@ -3930,12 +3990,12 @@ function yi({
|
|
|
3930
3990
|
}
|
|
3931
3991
|
);
|
|
3932
3992
|
}
|
|
3933
|
-
var
|
|
3934
|
-
const
|
|
3935
|
-
J(({ setupState:
|
|
3993
|
+
var Qt = /* @__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))(Qt || {});
|
|
3994
|
+
const Lo = $(
|
|
3995
|
+
J(({ setupState: e, className: t }) => {
|
|
3936
3996
|
const o = F(), { t: r } = V(), i = () => {
|
|
3937
3997
|
var g, m, d, u, p, x, y;
|
|
3938
|
-
switch (
|
|
3998
|
+
switch (e) {
|
|
3939
3999
|
case "READY":
|
|
3940
4000
|
return {
|
|
3941
4001
|
label: r("RobotSetupReadinessIndicator.Ready.lb"),
|
|
@@ -3983,9 +4043,9 @@ const Jo = $(
|
|
|
3983
4043
|
}
|
|
3984
4044
|
}, { label: n, indicatorColor: c, backgroundColor: s, textColor: l } = i();
|
|
3985
4045
|
return /* @__PURE__ */ a(
|
|
3986
|
-
|
|
4046
|
+
lo,
|
|
3987
4047
|
{
|
|
3988
|
-
className:
|
|
4048
|
+
className: t,
|
|
3989
4049
|
label: /* @__PURE__ */ S(
|
|
3990
4050
|
T,
|
|
3991
4051
|
{
|
|
@@ -4008,7 +4068,7 @@ const Jo = $(
|
|
|
4008
4068
|
}
|
|
4009
4069
|
),
|
|
4010
4070
|
/* @__PURE__ */ a(
|
|
4011
|
-
|
|
4071
|
+
_,
|
|
4012
4072
|
{
|
|
4013
4073
|
variant: "body2",
|
|
4014
4074
|
sx: {
|
|
@@ -4037,17 +4097,17 @@ const Jo = $(
|
|
|
4037
4097
|
}
|
|
4038
4098
|
);
|
|
4039
4099
|
})
|
|
4040
|
-
),
|
|
4100
|
+
), Ci = $(
|
|
4041
4101
|
J(
|
|
4042
4102
|
({
|
|
4043
|
-
robotName:
|
|
4044
|
-
robotType:
|
|
4103
|
+
robotName: e,
|
|
4104
|
+
robotType: t,
|
|
4045
4105
|
setupState: o,
|
|
4046
|
-
PreconditionComponent: r =
|
|
4106
|
+
PreconditionComponent: r = Lo,
|
|
4047
4107
|
className: i
|
|
4048
4108
|
}) => {
|
|
4049
4109
|
var l;
|
|
4050
|
-
const n = F(), c =
|
|
4110
|
+
const n = F(), c = t || "Robot", s = o === Qt.READY;
|
|
4051
4111
|
return /* @__PURE__ */ S(
|
|
4052
4112
|
T,
|
|
4053
4113
|
{
|
|
@@ -4090,10 +4150,10 @@ const Jo = $(
|
|
|
4090
4150
|
fill: `${n.palette.primary.main} !important`
|
|
4091
4151
|
}
|
|
4092
4152
|
},
|
|
4093
|
-
children: /* @__PURE__ */ a(
|
|
4153
|
+
children: /* @__PURE__ */ a($e, {})
|
|
4094
4154
|
}
|
|
4095
4155
|
) : /* @__PURE__ */ a(
|
|
4096
|
-
|
|
4156
|
+
so,
|
|
4097
4157
|
{
|
|
4098
4158
|
sx: {
|
|
4099
4159
|
color: n.palette.error.main,
|
|
@@ -4102,14 +4162,14 @@ const Jo = $(
|
|
|
4102
4162
|
}
|
|
4103
4163
|
),
|
|
4104
4164
|
/* @__PURE__ */ a(
|
|
4105
|
-
|
|
4165
|
+
_,
|
|
4106
4166
|
{
|
|
4107
4167
|
variant: "body1",
|
|
4108
4168
|
sx: {
|
|
4109
4169
|
fontWeight: 500,
|
|
4110
4170
|
color: n.palette.text.primary
|
|
4111
4171
|
},
|
|
4112
|
-
children:
|
|
4172
|
+
children: e
|
|
4113
4173
|
}
|
|
4114
4174
|
),
|
|
4115
4175
|
/* @__PURE__ */ a(
|
|
@@ -4125,7 +4185,7 @@ const Jo = $(
|
|
|
4125
4185
|
}
|
|
4126
4186
|
),
|
|
4127
4187
|
/* @__PURE__ */ a(
|
|
4128
|
-
|
|
4188
|
+
_,
|
|
4129
4189
|
{
|
|
4130
4190
|
variant: "body2",
|
|
4131
4191
|
sx: {
|
|
@@ -4143,21 +4203,21 @@ const Jo = $(
|
|
|
4143
4203
|
);
|
|
4144
4204
|
}
|
|
4145
4205
|
)
|
|
4146
|
-
),
|
|
4147
|
-
shouldForwardProp: (
|
|
4148
|
-
})(({ theme:
|
|
4149
|
-
var
|
|
4206
|
+
), $o = gt(co, {
|
|
4207
|
+
shouldForwardProp: (e) => e !== "selected"
|
|
4208
|
+
})(({ theme: e }) => {
|
|
4209
|
+
var t, o, r;
|
|
4150
4210
|
return {
|
|
4151
4211
|
borderRadius: "20px",
|
|
4152
4212
|
"&:hover": {
|
|
4153
|
-
background: (
|
|
4213
|
+
background: (t = e.palette.backgroundPaperElevation) == null ? void 0 : t[7]
|
|
4154
4214
|
},
|
|
4155
4215
|
variants: [
|
|
4156
4216
|
{
|
|
4157
4217
|
props: ({ selected: i }) => !i,
|
|
4158
4218
|
style: {
|
|
4159
|
-
background: (o =
|
|
4160
|
-
color:
|
|
4219
|
+
background: (o = e.palette.backgroundPaperElevation) == null ? void 0 : o[0],
|
|
4220
|
+
color: e.palette.action.disabled,
|
|
4161
4221
|
"> img": {
|
|
4162
4222
|
opacity: 0.4
|
|
4163
4223
|
}
|
|
@@ -4166,28 +4226,28 @@ const Jo = $(
|
|
|
4166
4226
|
{
|
|
4167
4227
|
props: ({ selected: i }) => i,
|
|
4168
4228
|
style: {
|
|
4169
|
-
background: (r =
|
|
4170
|
-
border: `1px solid ${
|
|
4171
|
-
color:
|
|
4229
|
+
background: (r = e.palette.backgroundPaperElevation) == null ? void 0 : r[11],
|
|
4230
|
+
border: `1px solid ${e.palette.divider}`,
|
|
4231
|
+
color: e.palette.primary.contrastText
|
|
4172
4232
|
}
|
|
4173
4233
|
}
|
|
4174
4234
|
]
|
|
4175
4235
|
};
|
|
4176
|
-
}),
|
|
4177
|
-
const { ref:
|
|
4236
|
+
}), Ti = (e) => {
|
|
4237
|
+
const { ref: t, ...o } = e;
|
|
4178
4238
|
return /* @__PURE__ */ a(
|
|
4179
|
-
|
|
4239
|
+
$o,
|
|
4180
4240
|
{
|
|
4181
|
-
ref:
|
|
4182
|
-
selected:
|
|
4241
|
+
ref: t,
|
|
4242
|
+
selected: e.selected,
|
|
4183
4243
|
...o,
|
|
4184
4244
|
color: "secondary",
|
|
4185
4245
|
variant: "circular"
|
|
4186
4246
|
}
|
|
4187
4247
|
);
|
|
4188
4248
|
};
|
|
4189
|
-
function
|
|
4190
|
-
const { children:
|
|
4249
|
+
function zo(e) {
|
|
4250
|
+
const { children: t, value: o, index: r, ...i } = e;
|
|
4191
4251
|
return /* @__PURE__ */ a(
|
|
4192
4252
|
"div",
|
|
4193
4253
|
{
|
|
@@ -4196,11 +4256,11 @@ function Fo(t) {
|
|
|
4196
4256
|
id: `tabpanel-${r}`,
|
|
4197
4257
|
"aria-labelledby": `tab-${r}`,
|
|
4198
4258
|
...i,
|
|
4199
|
-
children: o === r && /* @__PURE__ */ a(T, { children:
|
|
4259
|
+
children: o === r && /* @__PURE__ */ a(T, { children: t })
|
|
4200
4260
|
}
|
|
4201
4261
|
);
|
|
4202
4262
|
}
|
|
4203
|
-
function
|
|
4263
|
+
function Vo({ children: e, ...t }) {
|
|
4204
4264
|
const {
|
|
4205
4265
|
fullWidth: o,
|
|
4206
4266
|
indicator: r,
|
|
@@ -4212,22 +4272,22 @@ function Lo({ children: t, ...e }) {
|
|
|
4212
4272
|
value: g,
|
|
4213
4273
|
variant: m,
|
|
4214
4274
|
...d
|
|
4215
|
-
} =
|
|
4216
|
-
return /* @__PURE__ */ a(T, { ...d, children:
|
|
4275
|
+
} = t;
|
|
4276
|
+
return /* @__PURE__ */ a(T, { ...d, children: e });
|
|
4217
4277
|
}
|
|
4218
|
-
const
|
|
4219
|
-
J((
|
|
4278
|
+
const Mi = $(
|
|
4279
|
+
J((e) => {
|
|
4220
4280
|
const {
|
|
4221
|
-
items:
|
|
4281
|
+
items: t,
|
|
4222
4282
|
activeTab: o,
|
|
4223
4283
|
defaultActiveTab: r = 0,
|
|
4224
4284
|
onTabChange: i,
|
|
4225
4285
|
sx: n,
|
|
4226
4286
|
ref: c
|
|
4227
|
-
} =
|
|
4287
|
+
} = e, s = o !== void 0, [l, g] = B(r), m = s ? o : l;
|
|
4228
4288
|
A(() => {
|
|
4229
|
-
s ||
|
|
4230
|
-
}, [
|
|
4289
|
+
s || t.length !== 0 && (l < 0 || l > t.length - 1) && g(0);
|
|
4290
|
+
}, [t.length, s, l]);
|
|
4231
4291
|
const d = (u, p) => {
|
|
4232
4292
|
s || g(p), i == null || i(p);
|
|
4233
4293
|
};
|
|
@@ -4254,7 +4314,7 @@ const Ci = $(
|
|
|
4254
4314
|
// 20px
|
|
4255
4315
|
},
|
|
4256
4316
|
children: /* @__PURE__ */ a(
|
|
4257
|
-
|
|
4317
|
+
Vt,
|
|
4258
4318
|
{
|
|
4259
4319
|
value: m,
|
|
4260
4320
|
onChange: d,
|
|
@@ -4279,20 +4339,20 @@ const Ci = $(
|
|
|
4279
4339
|
overflow: "visible"
|
|
4280
4340
|
}
|
|
4281
4341
|
},
|
|
4282
|
-
children:
|
|
4283
|
-
var
|
|
4342
|
+
children: t.map((u, p) => {
|
|
4343
|
+
var C, w, M;
|
|
4284
4344
|
const x = () => {
|
|
4285
4345
|
if (!u.badge) return;
|
|
4286
|
-
const
|
|
4287
|
-
return typeof
|
|
4346
|
+
const I = u.badge.content, R = u.badge.max;
|
|
4347
|
+
return typeof I == "number" && R && I > R ? `${R}+` : I;
|
|
4288
4348
|
}, y = () => {
|
|
4289
4349
|
if (!u.badge) return !1;
|
|
4290
|
-
const
|
|
4291
|
-
return !(
|
|
4350
|
+
const I = u.badge.content, R = u.badge.showZero;
|
|
4351
|
+
return !(I === 0 && !R);
|
|
4292
4352
|
}, f = x(), h = y(), v = () => {
|
|
4293
4353
|
s || g(p), i == null || i(p);
|
|
4294
4354
|
}, b = /* @__PURE__ */ a(
|
|
4295
|
-
|
|
4355
|
+
zt,
|
|
4296
4356
|
{
|
|
4297
4357
|
label: u.label,
|
|
4298
4358
|
icon: u.icon,
|
|
@@ -4304,9 +4364,9 @@ const Ci = $(
|
|
|
4304
4364
|
height: "32px",
|
|
4305
4365
|
padding: "0px 10px",
|
|
4306
4366
|
borderRadius: "12px",
|
|
4307
|
-
backgroundColor: (
|
|
4367
|
+
backgroundColor: (I) => {
|
|
4308
4368
|
var R;
|
|
4309
|
-
return ((R =
|
|
4369
|
+
return ((R = I.palette.backgroundPaperElevation) == null ? void 0 : R[11]) || "#32344B";
|
|
4310
4370
|
},
|
|
4311
4371
|
color: "text.primary",
|
|
4312
4372
|
opacity: m === p ? 1 : 0.38,
|
|
@@ -4319,9 +4379,9 @@ const Ci = $(
|
|
|
4319
4379
|
},
|
|
4320
4380
|
"&.Mui-selected": {
|
|
4321
4381
|
opacity: 1,
|
|
4322
|
-
backgroundColor: (
|
|
4382
|
+
backgroundColor: (I) => {
|
|
4323
4383
|
var R;
|
|
4324
|
-
return ((R =
|
|
4384
|
+
return ((R = I.palette.backgroundPaperElevation) == null ? void 0 : R[11]) || "#32344B";
|
|
4325
4385
|
},
|
|
4326
4386
|
color: "text.primary"
|
|
4327
4387
|
},
|
|
@@ -4336,16 +4396,16 @@ const Ci = $(
|
|
|
4336
4396
|
u.id
|
|
4337
4397
|
);
|
|
4338
4398
|
return h ? /* @__PURE__ */ a(
|
|
4339
|
-
|
|
4399
|
+
Vo,
|
|
4340
4400
|
{
|
|
4341
4401
|
component: "span",
|
|
4342
4402
|
sx: { display: "inline-flex" },
|
|
4343
4403
|
children: /* @__PURE__ */ a(
|
|
4344
|
-
|
|
4404
|
+
uo,
|
|
4345
4405
|
{
|
|
4346
4406
|
badgeContent: f,
|
|
4347
|
-
color: ((
|
|
4348
|
-
max: (
|
|
4407
|
+
color: ((C = u.badge) == null ? void 0 : C.color) || "error",
|
|
4408
|
+
max: (w = u.badge) == null ? void 0 : w.max,
|
|
4349
4409
|
showZero: (M = u.badge) == null ? void 0 : M.showZero,
|
|
4350
4410
|
anchorOrigin: {
|
|
4351
4411
|
vertical: "top",
|
|
@@ -4379,31 +4439,31 @@ const Ci = $(
|
|
|
4379
4439
|
}
|
|
4380
4440
|
}
|
|
4381
4441
|
),
|
|
4382
|
-
/* @__PURE__ */ a(T, { sx: { flex: 1, overflow: "auto" }, children:
|
|
4442
|
+
/* @__PURE__ */ a(T, { sx: { flex: 1, overflow: "auto" }, children: t.map((u, p) => /* @__PURE__ */ a(zo, { value: m, index: p, children: u.content }, u.id)) })
|
|
4383
4443
|
]
|
|
4384
4444
|
}
|
|
4385
4445
|
);
|
|
4386
4446
|
})
|
|
4387
|
-
),
|
|
4388
|
-
const
|
|
4389
|
-
return
|
|
4390
|
-
},
|
|
4391
|
-
const o = Math.floor(
|
|
4447
|
+
), No = (e) => {
|
|
4448
|
+
const t = Math.floor(e / 86400), o = Math.floor(e % 86400 / 3600), r = Math.floor(e % 3600 / 60), i = e % 60, n = [];
|
|
4449
|
+
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(":");
|
|
4450
|
+
}, At = (e, t) => {
|
|
4451
|
+
const o = Math.floor(e / 86400), r = Math.floor(e % 86400 / 3600), i = Math.floor(e % 3600 / 60), n = e % 60;
|
|
4392
4452
|
if (typeof Intl < "u" && "DurationFormat" in Intl)
|
|
4393
4453
|
try {
|
|
4394
4454
|
const s = {};
|
|
4395
|
-
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(
|
|
4455
|
+
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);
|
|
4396
4456
|
} catch {
|
|
4397
4457
|
}
|
|
4398
4458
|
const c = [];
|
|
4399
4459
|
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(" ");
|
|
4400
|
-
},
|
|
4401
|
-
timerState:
|
|
4402
|
-
animationState:
|
|
4460
|
+
}, Go = ({
|
|
4461
|
+
timerState: e,
|
|
4462
|
+
animationState: t,
|
|
4403
4463
|
hasError: o,
|
|
4404
4464
|
className: r
|
|
4405
4465
|
}) => {
|
|
4406
|
-
const { t: i } = V(), n = F(), { elapsedTime: c, currentProgress: s } =
|
|
4466
|
+
const { t: i } = V(), n = F(), { elapsedTime: c, currentProgress: s } = e, { showErrorAnimation: l, showPauseAnimation: g, showMainText: m } = t;
|
|
4407
4467
|
return /* @__PURE__ */ S(
|
|
4408
4468
|
T,
|
|
4409
4469
|
{
|
|
@@ -4418,7 +4478,7 @@ const Ci = $(
|
|
|
4418
4478
|
},
|
|
4419
4479
|
children: [
|
|
4420
4480
|
/* @__PURE__ */ a(
|
|
4421
|
-
|
|
4481
|
+
go,
|
|
4422
4482
|
{
|
|
4423
4483
|
width: 264,
|
|
4424
4484
|
height: 264,
|
|
@@ -4485,7 +4545,7 @@ const Ci = $(
|
|
|
4485
4545
|
},
|
|
4486
4546
|
children: [
|
|
4487
4547
|
/* @__PURE__ */ a(U, { in: m && o, timeout: 200, children: /* @__PURE__ */ a(
|
|
4488
|
-
|
|
4548
|
+
_,
|
|
4489
4549
|
{
|
|
4490
4550
|
variant: "h6",
|
|
4491
4551
|
sx: {
|
|
@@ -4498,7 +4558,7 @@ const Ci = $(
|
|
|
4498
4558
|
}
|
|
4499
4559
|
) }),
|
|
4500
4560
|
/* @__PURE__ */ a(U, { in: m && !o, timeout: 300, children: /* @__PURE__ */ a(
|
|
4501
|
-
|
|
4561
|
+
_,
|
|
4502
4562
|
{
|
|
4503
4563
|
variant: "h1",
|
|
4504
4564
|
sx: {
|
|
@@ -4509,7 +4569,7 @@ const Ci = $(
|
|
|
4509
4569
|
lineHeight: 1,
|
|
4510
4570
|
letterSpacing: "-0.5px"
|
|
4511
4571
|
},
|
|
4512
|
-
children:
|
|
4572
|
+
children: No(c)
|
|
4513
4573
|
}
|
|
4514
4574
|
) })
|
|
4515
4575
|
]
|
|
@@ -4520,14 +4580,14 @@ const Ci = $(
|
|
|
4520
4580
|
]
|
|
4521
4581
|
}
|
|
4522
4582
|
);
|
|
4523
|
-
},
|
|
4524
|
-
timerState:
|
|
4525
|
-
animationState:
|
|
4583
|
+
}, Wo = ({
|
|
4584
|
+
timerState: e,
|
|
4585
|
+
animationState: t,
|
|
4526
4586
|
hasError: o,
|
|
4527
4587
|
compact: r,
|
|
4528
4588
|
className: i
|
|
4529
4589
|
}) => {
|
|
4530
|
-
const { t: n, i18n: c } = V(), s = F(), { elapsedTime: l, currentProgress: g } =
|
|
4590
|
+
const { t: n, i18n: c } = V(), s = F(), { elapsedTime: l, currentProgress: g } = e, { showErrorAnimation: m, showPauseAnimation: d } = t;
|
|
4531
4591
|
return r ? /* @__PURE__ */ a(
|
|
4532
4592
|
T,
|
|
4533
4593
|
{
|
|
@@ -4538,7 +4598,7 @@ const Ci = $(
|
|
|
4538
4598
|
m: 0
|
|
4539
4599
|
},
|
|
4540
4600
|
children: /* @__PURE__ */ a(
|
|
4541
|
-
|
|
4601
|
+
_,
|
|
4542
4602
|
{
|
|
4543
4603
|
variant: "body2",
|
|
4544
4604
|
sx: {
|
|
@@ -4546,7 +4606,7 @@ const Ci = $(
|
|
|
4546
4606
|
fontSize: "14px",
|
|
4547
4607
|
transition: "color 0.5s ease-out"
|
|
4548
4608
|
},
|
|
4549
|
-
children: o ? n("timer.error") :
|
|
4609
|
+
children: o ? n("timer.error") : At(l, c.language)
|
|
4550
4610
|
}
|
|
4551
4611
|
)
|
|
4552
4612
|
}
|
|
@@ -4621,7 +4681,7 @@ const Ci = $(
|
|
|
4621
4681
|
}
|
|
4622
4682
|
),
|
|
4623
4683
|
/* @__PURE__ */ a(
|
|
4624
|
-
|
|
4684
|
+
_,
|
|
4625
4685
|
{
|
|
4626
4686
|
variant: "body2",
|
|
4627
4687
|
sx: {
|
|
@@ -4631,51 +4691,51 @@ const Ci = $(
|
|
|
4631
4691
|
letterSpacing: "normal",
|
|
4632
4692
|
transition: "color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"
|
|
4633
4693
|
},
|
|
4634
|
-
children: o ? n("timer.error") :
|
|
4694
|
+
children: o ? n("timer.error") : At(l, c.language)
|
|
4635
4695
|
}
|
|
4636
4696
|
)
|
|
4637
4697
|
]
|
|
4638
4698
|
}
|
|
4639
4699
|
);
|
|
4640
|
-
},
|
|
4641
|
-
const [
|
|
4700
|
+
}, Uo = () => {
|
|
4701
|
+
const [e, t] = B({
|
|
4642
4702
|
showPauseAnimation: !1,
|
|
4643
4703
|
showErrorAnimation: !1,
|
|
4644
4704
|
showMainText: !0
|
|
4645
|
-
}), o =
|
|
4705
|
+
}), o = O(
|
|
4646
4706
|
null
|
|
4647
|
-
), r =
|
|
4707
|
+
), r = O(
|
|
4648
4708
|
null
|
|
4649
|
-
), i =
|
|
4650
|
-
|
|
4651
|
-
|
|
4709
|
+
), i = O(null), n = j(() => {
|
|
4710
|
+
t((d) => ({ ...d, showPauseAnimation: !0 })), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
|
|
4711
|
+
t((d) => ({ ...d, showPauseAnimation: !1 }));
|
|
4652
4712
|
}, 800);
|
|
4653
|
-
}, []), c =
|
|
4654
|
-
|
|
4655
|
-
|
|
4713
|
+
}, []), c = j(() => {
|
|
4714
|
+
t((d) => ({ ...d, showErrorAnimation: !0 })), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
|
|
4715
|
+
t((d) => ({ ...d, showErrorAnimation: !1 }));
|
|
4656
4716
|
}, 600);
|
|
4657
|
-
}, []), s =
|
|
4658
|
-
|
|
4659
|
-
}, []), l =
|
|
4660
|
-
|
|
4717
|
+
}, []), s = j(() => {
|
|
4718
|
+
t((d) => ({ ...d, showErrorAnimation: !1 })), r.current && clearTimeout(r.current);
|
|
4719
|
+
}, []), l = j(() => {
|
|
4720
|
+
t((d) => ({
|
|
4661
4721
|
...d,
|
|
4662
4722
|
showMainText: !1
|
|
4663
4723
|
})), i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
4664
|
-
|
|
4724
|
+
t((d) => ({
|
|
4665
4725
|
...d,
|
|
4666
4726
|
showMainText: !0
|
|
4667
4727
|
}));
|
|
4668
4728
|
}, 200);
|
|
4669
|
-
}, []), g =
|
|
4670
|
-
|
|
4729
|
+
}, []), g = j(() => {
|
|
4730
|
+
t((d) => ({
|
|
4671
4731
|
...d,
|
|
4672
4732
|
showMainText: !0
|
|
4673
4733
|
}));
|
|
4674
|
-
}, []), m =
|
|
4734
|
+
}, []), m = j(() => {
|
|
4675
4735
|
o.current && clearTimeout(o.current), r.current && clearTimeout(r.current), i.current && clearTimeout(i.current);
|
|
4676
4736
|
}, []);
|
|
4677
4737
|
return {
|
|
4678
|
-
animationState:
|
|
4738
|
+
animationState: e,
|
|
4679
4739
|
triggerPauseAnimation: n,
|
|
4680
4740
|
triggerErrorAnimation: c,
|
|
4681
4741
|
clearErrorAnimation: s,
|
|
@@ -4683,9 +4743,9 @@ const Ci = $(
|
|
|
4683
4743
|
setInitialAnimationState: g,
|
|
4684
4744
|
cleanup: m
|
|
4685
4745
|
};
|
|
4686
|
-
},
|
|
4687
|
-
autoStart:
|
|
4688
|
-
hasError:
|
|
4746
|
+
}, Ho = ({
|
|
4747
|
+
autoStart: e,
|
|
4748
|
+
hasError: t,
|
|
4689
4749
|
onPauseAnimation: o,
|
|
4690
4750
|
onErrorAnimation: r,
|
|
4691
4751
|
onClearErrorAnimation: i
|
|
@@ -4696,13 +4756,13 @@ const Ci = $(
|
|
|
4696
4756
|
isPausedState: !1,
|
|
4697
4757
|
currentProgress: 0,
|
|
4698
4758
|
wasRunningBeforeError: !1
|
|
4699
|
-
}), s =
|
|
4759
|
+
}), s = O(null), l = O(null), g = O(0), m = O(0), [d] = $t([0], {
|
|
4700
4760
|
tension: 80,
|
|
4701
4761
|
friction: 18,
|
|
4702
4762
|
onChange: ([h]) => {
|
|
4703
4763
|
c((v) => ({ ...v, currentProgress: h }));
|
|
4704
4764
|
}
|
|
4705
|
-
}), u =
|
|
4765
|
+
}), u = j(
|
|
4706
4766
|
(h = 0) => {
|
|
4707
4767
|
const v = h / 60 % 1 * 100;
|
|
4708
4768
|
c((b) => ({
|
|
@@ -4710,14 +4770,14 @@ const Ci = $(
|
|
|
4710
4770
|
elapsedTime: h,
|
|
4711
4771
|
isPausedState: !1,
|
|
4712
4772
|
currentProgress: v
|
|
4713
|
-
})), g.current = 0, m.current = v, d.setImmediate([v]),
|
|
4773
|
+
})), g.current = 0, m.current = v, d.setImmediate([v]), e ? (l.current = Date.now() - h * 1e3, c((b) => ({ ...b, isRunning: !0 }))) : l.current = null;
|
|
4714
4774
|
},
|
|
4715
|
-
[
|
|
4716
|
-
), p =
|
|
4775
|
+
[e, d]
|
|
4776
|
+
), p = j(() => {
|
|
4717
4777
|
if (l.current && n.isRunning) {
|
|
4718
4778
|
const v = (Date.now() - l.current) / 1e3 + g.current, b = v / 60 % 1 * 100;
|
|
4719
|
-
d.setTarget([b]), c((
|
|
4720
|
-
...
|
|
4779
|
+
d.setTarget([b]), c((C) => ({
|
|
4780
|
+
...C,
|
|
4721
4781
|
elapsedTime: Math.floor(v)
|
|
4722
4782
|
}));
|
|
4723
4783
|
}
|
|
@@ -4726,13 +4786,13 @@ const Ci = $(
|
|
|
4726
4786
|
isRunning: !1,
|
|
4727
4787
|
isPausedState: !0
|
|
4728
4788
|
})), o();
|
|
4729
|
-
}, [n.isRunning, d, o]), x =
|
|
4789
|
+
}, [n.isRunning, d, o]), x = j(() => {
|
|
4730
4790
|
n.isPausedState && (g.current = n.elapsedTime, l.current = Date.now(), c((h) => ({
|
|
4731
4791
|
...h,
|
|
4732
4792
|
isRunning: !0,
|
|
4733
4793
|
isPausedState: !1
|
|
4734
4794
|
})));
|
|
4735
|
-
}, [n.isPausedState, n.elapsedTime]), y =
|
|
4795
|
+
}, [n.isPausedState, n.elapsedTime]), y = j(() => {
|
|
4736
4796
|
c((h) => ({
|
|
4737
4797
|
...h,
|
|
4738
4798
|
elapsedTime: 0,
|
|
@@ -4740,11 +4800,11 @@ const Ci = $(
|
|
|
4740
4800
|
isPausedState: !1,
|
|
4741
4801
|
currentProgress: 0
|
|
4742
4802
|
})), g.current = 0, l.current = null, m.current = 0, d.setImmediate([0]);
|
|
4743
|
-
}, [d]), f =
|
|
4803
|
+
}, [d]), f = j(() => n.isPausedState, [n.isPausedState]);
|
|
4744
4804
|
return A(() => {
|
|
4745
|
-
|
|
4805
|
+
t ? (n.isRunning && (c((h) => ({ ...h, wasRunningBeforeError: !0 })), p()), r()) : (n.wasRunningBeforeError && !n.isRunning && (c((h) => ({ ...h, wasRunningBeforeError: !1 })), x()), i());
|
|
4746
4806
|
}, [
|
|
4747
|
-
|
|
4807
|
+
t,
|
|
4748
4808
|
n.isRunning,
|
|
4749
4809
|
n.wasRunningBeforeError,
|
|
4750
4810
|
p,
|
|
@@ -4755,13 +4815,13 @@ const Ci = $(
|
|
|
4755
4815
|
if (n.isRunning) {
|
|
4756
4816
|
const h = () => {
|
|
4757
4817
|
if (l.current) {
|
|
4758
|
-
const b = (Date.now() - l.current) / 1e3 + g.current,
|
|
4818
|
+
const b = (Date.now() - l.current) / 1e3 + g.current, C = b / 60 % 1 * 100;
|
|
4759
4819
|
c((M) => ({
|
|
4760
4820
|
...M,
|
|
4761
4821
|
elapsedTime: Math.floor(b)
|
|
4762
4822
|
})), Math.abs(
|
|
4763
|
-
|
|
4764
|
-
) > 0.1 && (d.setTarget([
|
|
4823
|
+
C - m.current
|
|
4824
|
+
) > 0.1 && (d.setTarget([C]), m.current = C);
|
|
4765
4825
|
}
|
|
4766
4826
|
s.current = requestAnimationFrame(h);
|
|
4767
4827
|
};
|
|
@@ -4789,11 +4849,11 @@ const Ci = $(
|
|
|
4789
4849
|
isPaused: f
|
|
4790
4850
|
}
|
|
4791
4851
|
};
|
|
4792
|
-
},
|
|
4852
|
+
}, ki = $(
|
|
4793
4853
|
J(
|
|
4794
4854
|
({
|
|
4795
|
-
onTimerReady:
|
|
4796
|
-
autoStart:
|
|
4855
|
+
onTimerReady: e,
|
|
4856
|
+
autoStart: t = !0,
|
|
4797
4857
|
variant: o = "default",
|
|
4798
4858
|
compact: r = !1,
|
|
4799
4859
|
className: i,
|
|
@@ -4806,8 +4866,8 @@ const Ci = $(
|
|
|
4806
4866
|
clearErrorAnimation: g,
|
|
4807
4867
|
setInitialAnimationState: m,
|
|
4808
4868
|
cleanup: d
|
|
4809
|
-
} =
|
|
4810
|
-
autoStart:
|
|
4869
|
+
} = Uo(), { timerState: u, controls: p } = Ho({
|
|
4870
|
+
autoStart: t,
|
|
4811
4871
|
hasError: n,
|
|
4812
4872
|
onPauseAnimation: s,
|
|
4813
4873
|
onErrorAnimation: l,
|
|
@@ -4818,13 +4878,13 @@ const Ci = $(
|
|
|
4818
4878
|
}, [m]), A(() => {
|
|
4819
4879
|
let x = !0;
|
|
4820
4880
|
const y = setTimeout(() => {
|
|
4821
|
-
x &&
|
|
4881
|
+
x && e(p);
|
|
4822
4882
|
}, 0);
|
|
4823
4883
|
return () => {
|
|
4824
4884
|
x = !1, clearTimeout(y);
|
|
4825
4885
|
};
|
|
4826
|
-
}, [
|
|
4827
|
-
|
|
4886
|
+
}, [e, p]), A(() => d, [d]), o === "small" ? /* @__PURE__ */ a(
|
|
4887
|
+
Wo,
|
|
4828
4888
|
{
|
|
4829
4889
|
timerState: u,
|
|
4830
4890
|
animationState: c,
|
|
@@ -4833,7 +4893,7 @@ const Ci = $(
|
|
|
4833
4893
|
className: i
|
|
4834
4894
|
}
|
|
4835
4895
|
) : /* @__PURE__ */ a(
|
|
4836
|
-
|
|
4896
|
+
Go,
|
|
4837
4897
|
{
|
|
4838
4898
|
timerState: u,
|
|
4839
4899
|
animationState: c,
|
|
@@ -4843,7 +4903,7 @@ const Ci = $(
|
|
|
4843
4903
|
);
|
|
4844
4904
|
}
|
|
4845
4905
|
)
|
|
4846
|
-
),
|
|
4906
|
+
), Jt = 1e-4, qo = {
|
|
4847
4907
|
a: 0,
|
|
4848
4908
|
d: 0,
|
|
4849
4909
|
alpha: 0,
|
|
@@ -4851,16 +4911,16 @@ const Ci = $(
|
|
|
4851
4911
|
reverse_rotation_direction: !1
|
|
4852
4912
|
};
|
|
4853
4913
|
class ut {
|
|
4854
|
-
constructor(
|
|
4855
|
-
this.nova =
|
|
4914
|
+
constructor(t, o, r, i, n, c, s, l, g, m) {
|
|
4915
|
+
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 = g, this.controllerStateSocket = m, this.connectedJoggingSocket = null, this.joggingVelocity = 10, this.activationState = "inactive", this.rapidlyChangingMotionState = i, this.controllerState = g, m.addEventListener("message", (d) => {
|
|
4856
4916
|
var p;
|
|
4857
|
-
const u = (p =
|
|
4917
|
+
const u = (p = G(d.data)) == null ? void 0 : p.result;
|
|
4858
4918
|
u && L(() => {
|
|
4859
4919
|
this.controllerState = u;
|
|
4860
4920
|
});
|
|
4861
4921
|
}), n.addEventListener("message", (d) => {
|
|
4862
4922
|
var p;
|
|
4863
|
-
const u = (p =
|
|
4923
|
+
const u = (p = G(d.data)) == null ? void 0 : p.result;
|
|
4864
4924
|
if (!u)
|
|
4865
4925
|
throw new Error(
|
|
4866
4926
|
`Failed to get motion state for ${this.motionGroupId}: ${d.data}`
|
|
@@ -4868,13 +4928,13 @@ class ut {
|
|
|
4868
4928
|
Wt(
|
|
4869
4929
|
this.rapidlyChangingMotionState.joint_position,
|
|
4870
4930
|
u.joint_position,
|
|
4871
|
-
|
|
4931
|
+
Jt
|
|
4872
4932
|
) || L(() => {
|
|
4873
4933
|
this.rapidlyChangingMotionState.joint_position = u.joint_position;
|
|
4874
|
-
}),
|
|
4934
|
+
}), Ut(
|
|
4875
4935
|
this.rapidlyChangingMotionState,
|
|
4876
4936
|
u,
|
|
4877
|
-
|
|
4937
|
+
Jt
|
|
4878
4938
|
) || L(() => {
|
|
4879
4939
|
this.rapidlyChangingMotionState.tcp_pose = u.tcp_pose;
|
|
4880
4940
|
}), this.rapidlyChangingMotionState.standstill !== u.standstill && L(() => {
|
|
@@ -4882,25 +4942,25 @@ class ut {
|
|
|
4882
4942
|
});
|
|
4883
4943
|
}), mt(this);
|
|
4884
4944
|
}
|
|
4885
|
-
static async connectMultiple(
|
|
4945
|
+
static async connectMultiple(t, o) {
|
|
4886
4946
|
return Promise.all(
|
|
4887
4947
|
o.map(
|
|
4888
|
-
(r) => ut.connect(
|
|
4948
|
+
(r) => ut.connect(t, r)
|
|
4889
4949
|
)
|
|
4890
4950
|
);
|
|
4891
4951
|
}
|
|
4892
|
-
static async connect(
|
|
4952
|
+
static async connect(t, o) {
|
|
4893
4953
|
var h, v;
|
|
4894
|
-
const [r, i] = o.split("@"), n = await
|
|
4954
|
+
const [r, i] = o.split("@"), n = await t.api.controller.getCurrentRobotControllerState(i), c = n == null ? void 0 : n.motion_groups.find(
|
|
4895
4955
|
(b) => b.motion_group === o
|
|
4896
4956
|
);
|
|
4897
4957
|
if (!n || !c)
|
|
4898
4958
|
throw new Error(
|
|
4899
4959
|
`Controller ${i} or motion group ${o} not found`
|
|
4900
4960
|
);
|
|
4901
|
-
const s =
|
|
4961
|
+
const s = t.openReconnectingWebsocket(
|
|
4902
4962
|
`/controllers/${i}/motion-groups/${o}/state-stream`
|
|
4903
|
-
), l = await s.firstMessage(), g = (h =
|
|
4963
|
+
), l = await s.firstMessage(), g = (h = G(l.data)) == null ? void 0 : h.result;
|
|
4904
4964
|
if (!g)
|
|
4905
4965
|
throw new Error(
|
|
4906
4966
|
`Unable to parse initial motion state message ${l.data}`
|
|
@@ -4910,21 +4970,21 @@ class ut {
|
|
|
4910
4970
|
`,
|
|
4911
4971
|
g
|
|
4912
4972
|
);
|
|
4913
|
-
const d = (await
|
|
4973
|
+
const d = (await t.api.controller.getRobotController(
|
|
4914
4974
|
n.controller
|
|
4915
|
-
)).configuration.kind === "VirtualController", u = await
|
|
4975
|
+
)).configuration.kind === "VirtualController", u = await t.api.motionGroup.getMotionGroupDescription(
|
|
4916
4976
|
i,
|
|
4917
4977
|
c.motion_group
|
|
4918
4978
|
), p = Object.entries(u.tcps || {}).map(
|
|
4919
|
-
([b,
|
|
4979
|
+
([b, C]) => ({
|
|
4920
4980
|
id: b,
|
|
4921
|
-
readable_name:
|
|
4922
|
-
position:
|
|
4923
|
-
orientation:
|
|
4981
|
+
readable_name: C.name,
|
|
4982
|
+
position: C.pose.position,
|
|
4983
|
+
orientation: C.pose.orientation
|
|
4924
4984
|
})
|
|
4925
|
-
), x =
|
|
4985
|
+
), x = t.openReconnectingWebsocket(
|
|
4926
4986
|
`/controllers/${n.controller}/state-stream?response_rate=1000`
|
|
4927
|
-
), y = await x.firstMessage(), f = (v =
|
|
4987
|
+
), y = await x.firstMessage(), f = (v = G(y.data)) == null ? void 0 : v.result;
|
|
4928
4988
|
if (!f)
|
|
4929
4989
|
throw new Error(
|
|
4930
4990
|
`Unable to parse initial controller state message ${y.data}`
|
|
@@ -4934,7 +4994,7 @@ class ut {
|
|
|
4934
4994
|
`,
|
|
4935
4995
|
f
|
|
4936
4996
|
), new ut(
|
|
4937
|
-
|
|
4997
|
+
t,
|
|
4938
4998
|
n,
|
|
4939
4999
|
c,
|
|
4940
5000
|
g,
|
|
@@ -4960,16 +5020,16 @@ class ut {
|
|
|
4960
5020
|
return this.joggingVelocity * Math.PI / 180;
|
|
4961
5021
|
}
|
|
4962
5022
|
get joints() {
|
|
4963
|
-
return this.initialMotionState.joint_position.map((
|
|
5023
|
+
return this.initialMotionState.joint_position.map((t, o) => ({
|
|
4964
5024
|
index: o
|
|
4965
5025
|
}));
|
|
4966
5026
|
}
|
|
4967
5027
|
// Please note that API v2 omits 0 values
|
|
4968
5028
|
get dhParameters() {
|
|
4969
5029
|
if (this.description.dh_parameters !== void 0)
|
|
4970
|
-
return this.description.dh_parameters.map((
|
|
4971
|
-
...
|
|
4972
|
-
...
|
|
5030
|
+
return this.description.dh_parameters.map((t) => ({
|
|
5031
|
+
...qo,
|
|
5032
|
+
...t
|
|
4973
5033
|
}));
|
|
4974
5034
|
}
|
|
4975
5035
|
get safetyZones() {
|
|
@@ -4977,9 +5037,9 @@ class ut {
|
|
|
4977
5037
|
}
|
|
4978
5038
|
/** Gets the robot mounting position offset in 3D viz coordinates */
|
|
4979
5039
|
get mountingPosition() {
|
|
4980
|
-
var
|
|
5040
|
+
var t, o, r;
|
|
4981
5041
|
return this.description.mounting ? [
|
|
4982
|
-
(((
|
|
5042
|
+
(((t = this.description.mounting.position) == null ? void 0 : t[0]) || 0) / 1e3,
|
|
4983
5043
|
(((o = this.description.mounting.position) == null ? void 0 : o[1]) || 0) / 1e3,
|
|
4984
5044
|
(((r = this.description.mounting.position) == null ? void 0 : r[2]) || 0) / 1e3
|
|
4985
5045
|
] : [0, 0, 0];
|
|
@@ -4987,11 +5047,11 @@ class ut {
|
|
|
4987
5047
|
/** Gets the robot mounting position rotation in 3D viz coordinates */
|
|
4988
5048
|
get mountingQuaternion() {
|
|
4989
5049
|
var i, n, c, s, l, g;
|
|
4990
|
-
const
|
|
5050
|
+
const t = new Et.Vector3(
|
|
4991
5051
|
((n = (i = this.description.mounting) == null ? void 0 : i.orientation) == null ? void 0 : n[0]) || 0,
|
|
4992
5052
|
((s = (c = this.description.mounting) == null ? void 0 : c.orientation) == null ? void 0 : s[1]) || 0,
|
|
4993
5053
|
((g = (l = this.description.mounting) == null ? void 0 : l.orientation) == null ? void 0 : g[2]) || 0
|
|
4994
|
-
), o =
|
|
5054
|
+
), o = t.length(), r = t.normalize();
|
|
4995
5055
|
return new Et.Quaternion().setFromAxisAngle(r, o);
|
|
4996
5056
|
}
|
|
4997
5057
|
/**
|
|
@@ -5047,10 +5107,10 @@ class ut {
|
|
|
5047
5107
|
), L(() => {
|
|
5048
5108
|
this.activationState = "inactive";
|
|
5049
5109
|
});
|
|
5050
|
-
} catch (
|
|
5110
|
+
} catch (t) {
|
|
5051
5111
|
throw L(() => {
|
|
5052
5112
|
this.activationState = "active";
|
|
5053
|
-
}),
|
|
5113
|
+
}), t;
|
|
5054
5114
|
}
|
|
5055
5115
|
}
|
|
5056
5116
|
async activate() {
|
|
@@ -5068,10 +5128,10 @@ class ut {
|
|
|
5068
5128
|
), L(() => {
|
|
5069
5129
|
this.activationState = "active";
|
|
5070
5130
|
});
|
|
5071
|
-
} catch (
|
|
5131
|
+
} catch (t) {
|
|
5072
5132
|
throw L(() => {
|
|
5073
5133
|
this.activationState = "inactive";
|
|
5074
|
-
}),
|
|
5134
|
+
}), t;
|
|
5075
5135
|
}
|
|
5076
5136
|
}
|
|
5077
5137
|
toggleActivation() {
|
|
@@ -5080,13 +5140,13 @@ class ut {
|
|
|
5080
5140
|
dispose() {
|
|
5081
5141
|
this.motionStateSocket.close(), this.connectedJoggingSocket && this.connectedJoggingSocket.close();
|
|
5082
5142
|
}
|
|
5083
|
-
setJoggingVelocity(
|
|
5084
|
-
this.joggingVelocity =
|
|
5143
|
+
setJoggingVelocity(t) {
|
|
5144
|
+
this.joggingVelocity = t;
|
|
5085
5145
|
}
|
|
5086
5146
|
}
|
|
5087
|
-
function
|
|
5088
|
-
var
|
|
5089
|
-
const
|
|
5147
|
+
function Xt() {
|
|
5148
|
+
var t, o, r, i, n, c;
|
|
5149
|
+
const e = Bt({
|
|
5090
5150
|
palette: {
|
|
5091
5151
|
mode: "dark",
|
|
5092
5152
|
text: {
|
|
@@ -5180,7 +5240,7 @@ function Qt() {
|
|
|
5180
5240
|
}
|
|
5181
5241
|
});
|
|
5182
5242
|
return {
|
|
5183
|
-
...
|
|
5243
|
+
...e,
|
|
5184
5244
|
components: {
|
|
5185
5245
|
MuiCssBaseline: {
|
|
5186
5246
|
styleOverrides: {
|
|
@@ -5190,7 +5250,7 @@ function Qt() {
|
|
|
5190
5250
|
},
|
|
5191
5251
|
"html:hover, body:hover, *:hover": {
|
|
5192
5252
|
scrollbarWidth: "thin",
|
|
5193
|
-
scrollbarColor: `${
|
|
5253
|
+
scrollbarColor: `${e.palette.divider} transparent`
|
|
5194
5254
|
},
|
|
5195
5255
|
// Global styles for DataGrid filter popup
|
|
5196
5256
|
".MuiDataGrid-panelContent": {
|
|
@@ -5278,14 +5338,14 @@ function Qt() {
|
|
|
5278
5338
|
{
|
|
5279
5339
|
props: { color: "secondary", variant: "contained" },
|
|
5280
5340
|
style: {
|
|
5281
|
-
border: `1px solid ${
|
|
5282
|
-
background: (r = (o = (
|
|
5341
|
+
border: `1px solid ${e.palette.divider}`,
|
|
5342
|
+
background: (r = (o = (t = e.paletteExt) == null ? void 0 : t.secondary) == null ? void 0 : o.tonal) == null ? void 0 : r.toString()
|
|
5283
5343
|
}
|
|
5284
5344
|
},
|
|
5285
5345
|
{
|
|
5286
5346
|
props: { color: "secondary", variant: "outlined" },
|
|
5287
5347
|
style: {
|
|
5288
|
-
border: `1px solid ${
|
|
5348
|
+
border: `1px solid ${e.palette.divider}`
|
|
5289
5349
|
}
|
|
5290
5350
|
}
|
|
5291
5351
|
]
|
|
@@ -5294,9 +5354,9 @@ function Qt() {
|
|
|
5294
5354
|
styleOverrides: {
|
|
5295
5355
|
root: {
|
|
5296
5356
|
textTransform: "none",
|
|
5297
|
-
color:
|
|
5357
|
+
color: e.palette.text.secondary,
|
|
5298
5358
|
"&.Mui-selected": {
|
|
5299
|
-
color:
|
|
5359
|
+
color: e.palette.text.primary
|
|
5300
5360
|
}
|
|
5301
5361
|
}
|
|
5302
5362
|
}
|
|
@@ -5304,7 +5364,7 @@ function Qt() {
|
|
|
5304
5364
|
MuiTabs: {
|
|
5305
5365
|
styleOverrides: {
|
|
5306
5366
|
root: {
|
|
5307
|
-
background: (i =
|
|
5367
|
+
background: (i = e.palette.backgroundPaperElevation) == null ? void 0 : i[1]
|
|
5308
5368
|
}
|
|
5309
5369
|
}
|
|
5310
5370
|
},
|
|
@@ -5356,14 +5416,14 @@ function Qt() {
|
|
|
5356
5416
|
MuiFab: {
|
|
5357
5417
|
styleOverrides: {
|
|
5358
5418
|
root: {
|
|
5359
|
-
background: (c = (n =
|
|
5419
|
+
background: (c = (n = e.paletteExt) == null ? void 0 : n.secondary) == null ? void 0 : c.tonal
|
|
5360
5420
|
}
|
|
5361
5421
|
},
|
|
5362
5422
|
variants: [
|
|
5363
5423
|
{
|
|
5364
5424
|
props: { color: "primary" },
|
|
5365
5425
|
style: {
|
|
5366
|
-
background:
|
|
5426
|
+
background: e.palette.primary.main
|
|
5367
5427
|
}
|
|
5368
5428
|
}
|
|
5369
5429
|
]
|
|
@@ -5383,7 +5443,7 @@ function Qt() {
|
|
|
5383
5443
|
disabled: "rgba(241, 77, 66, 1)"
|
|
5384
5444
|
},
|
|
5385
5445
|
color: "rgba(255, 198, 198, 1)",
|
|
5386
|
-
labelColor:
|
|
5446
|
+
labelColor: e.palette.text.primary
|
|
5387
5447
|
},
|
|
5388
5448
|
Y: {
|
|
5389
5449
|
backgroundColor: "rgba(20, 151, 108, 1)",
|
|
@@ -5395,7 +5455,7 @@ function Qt() {
|
|
|
5395
5455
|
hovered: "rgba(28, 188, 135, 1)"
|
|
5396
5456
|
},
|
|
5397
5457
|
color: "rgba(215, 255, 242, 1)",
|
|
5398
|
-
labelColor:
|
|
5458
|
+
labelColor: e.palette.text.primary
|
|
5399
5459
|
},
|
|
5400
5460
|
Z: {
|
|
5401
5461
|
backgroundColor: "rgba(1, 87, 155, 1)",
|
|
@@ -5407,68 +5467,68 @@ function Qt() {
|
|
|
5407
5467
|
hovered: "rgba(2, 136, 209, 1)"
|
|
5408
5468
|
},
|
|
5409
5469
|
color: "rgba(210, 239, 255, 1)",
|
|
5410
|
-
labelColor:
|
|
5470
|
+
labelColor: e.palette.text.primary
|
|
5411
5471
|
}
|
|
5412
5472
|
}
|
|
5413
5473
|
},
|
|
5414
5474
|
JoggingJoint: {
|
|
5415
5475
|
Joint: {
|
|
5416
|
-
arrowColor:
|
|
5476
|
+
arrowColor: e.palette.text.primary
|
|
5417
5477
|
}
|
|
5418
5478
|
},
|
|
5419
5479
|
VelocitySlider: {
|
|
5420
|
-
sliderLegendColor:
|
|
5480
|
+
sliderLegendColor: e.palette.text.primary
|
|
5421
5481
|
}
|
|
5422
5482
|
}
|
|
5423
5483
|
}
|
|
5424
5484
|
};
|
|
5425
5485
|
}
|
|
5426
|
-
function
|
|
5427
|
-
const
|
|
5428
|
-
return
|
|
5486
|
+
function Yo() {
|
|
5487
|
+
const e = Xt();
|
|
5488
|
+
return e.palette.mode = "light", e;
|
|
5429
5489
|
}
|
|
5430
|
-
function
|
|
5490
|
+
function Ii(e) {
|
|
5431
5491
|
var r, i, n, c;
|
|
5432
|
-
let
|
|
5433
|
-
((r =
|
|
5434
|
-
const o =
|
|
5435
|
-
return
|
|
5492
|
+
let t = !0;
|
|
5493
|
+
((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)));
|
|
5494
|
+
const o = t ? Xt() : Yo();
|
|
5495
|
+
return Bt(o, e);
|
|
5436
5496
|
}
|
|
5437
5497
|
export {
|
|
5438
|
-
|
|
5439
|
-
|
|
5498
|
+
gi as A,
|
|
5499
|
+
pi as C,
|
|
5440
5500
|
bt as J,
|
|
5441
|
-
|
|
5501
|
+
Jo as L,
|
|
5442
5502
|
ht as M,
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5503
|
+
wi as N,
|
|
5504
|
+
hi as P,
|
|
5505
|
+
Ci as R,
|
|
5506
|
+
Ti as S,
|
|
5507
|
+
Mi as T,
|
|
5508
|
+
Po as V,
|
|
5509
|
+
So as W,
|
|
5510
|
+
Pt as a,
|
|
5511
|
+
vo as b,
|
|
5512
|
+
Ii as c,
|
|
5513
|
+
mi as d,
|
|
5514
|
+
fi as e,
|
|
5515
|
+
To as f,
|
|
5516
|
+
Mo as g,
|
|
5517
|
+
vi as h,
|
|
5458
5518
|
at as i,
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5519
|
+
bi as j,
|
|
5520
|
+
xi as k,
|
|
5521
|
+
yi as l,
|
|
5522
|
+
Si as m,
|
|
5523
|
+
Bo as n,
|
|
5524
|
+
Qt as o,
|
|
5525
|
+
Lo as p,
|
|
5526
|
+
ki as q,
|
|
5527
|
+
qt as r,
|
|
5468
5528
|
ut as s,
|
|
5469
5529
|
ft as t,
|
|
5470
5530
|
Wt as u,
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5531
|
+
wo as v,
|
|
5532
|
+
Ut as w,
|
|
5533
|
+
Co as x
|
|
5474
5534
|
};
|