@wandelbots/wandelbots-js-react-components 5.6.0-pr.fix-select-tcp.613.f02eb48 → 5.6.1-pr.dev-new-nova-js-client.614.87ed9a2
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/README.md +1 -1
- package/dist/3d.cjs +1 -1
- package/dist/3d.js +1 -1
- package/dist/chunks/{MotionGroupVisualizer-Q7ifc7Kd.js → MotionGroupVisualizer-CrJO299j.js} +53 -50
- package/dist/chunks/MotionGroupVisualizer-OZwEAMLA.cjs +1 -0
- package/dist/chunks/{theming-BU4-W3Wy.js → theming-CDIQLLiN.js} +663 -632
- package/dist/chunks/theming-CDWrELt_.cjs +4 -0
- package/dist/components/jogging/JoggingPanel.d.ts +5 -3
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/lib/ConnectedMotionGroup.d.ts +10 -5
- package/dist/lib/JoggerConnection.d.ts +6 -3
- package/dist/lib/MotionStreamConnection.d.ts +9 -4
- package/package.json +2 -2
- package/dist/chunks/MotionGroupVisualizer-MKZ2-1oY.cjs +0 -1
- package/dist/chunks/theming-DTS9g0aC.cjs +0 -4
|
@@ -26,7 +26,7 @@ import xe from "@mui/icons-material/Share";
|
|
|
26
26
|
import P from "@mui/material/Stack";
|
|
27
27
|
import zt from "@mui/material/Tab";
|
|
28
28
|
import Vt from "@mui/material/Tabs";
|
|
29
|
-
import { JointTypeEnum as G,
|
|
29
|
+
import { JointTypeEnum as G, Nova as ye, poseToWandelscriptString as Se } from "@wandelbots/nova-js/v2";
|
|
30
30
|
import { lowerFirst as ve, countBy as Ce, isString as we } from "lodash-es";
|
|
31
31
|
import { runInAction as D, makeAutoObservable as mt, when as at, autorun as kt, makeObservable as Te, action as Rt, observable as Me } from "mobx";
|
|
32
32
|
import { radiansToDegrees as Nt, tryParseJson as W, XYZ_TO_VECTOR as tt, degreesToRadians as Ie } from "@wandelbots/nova-js";
|
|
@@ -85,12 +85,12 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
85
85
|
onAppSelect: i,
|
|
86
86
|
disabled: n = !1,
|
|
87
87
|
sx: c
|
|
88
|
-
} = e, [s, l] = L(null),
|
|
89
|
-
l(
|
|
90
|
-
},
|
|
88
|
+
} = e, [s, l] = L(null), d = !!s, m = (g) => {
|
|
89
|
+
l(g.currentTarget);
|
|
90
|
+
}, u = () => {
|
|
91
91
|
l(null);
|
|
92
|
-
},
|
|
93
|
-
|
|
92
|
+
}, p = (g) => {
|
|
93
|
+
u(), g.onClick ? g.onClick() : g.href && (window.location.href = g.href), i == null || i(g);
|
|
94
94
|
};
|
|
95
95
|
return /* @__PURE__ */ S(et, { children: [
|
|
96
96
|
/* @__PURE__ */ a(
|
|
@@ -127,7 +127,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
127
127
|
"aria-label": "switch app",
|
|
128
128
|
"aria-controls": "app-menu",
|
|
129
129
|
"aria-haspopup": "true",
|
|
130
|
-
onClick:
|
|
130
|
+
onClick: m,
|
|
131
131
|
disabled: n,
|
|
132
132
|
sx: {
|
|
133
133
|
ml: 1,
|
|
@@ -135,10 +135,10 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
135
135
|
height: 28,
|
|
136
136
|
borderRadius: "6px",
|
|
137
137
|
padding: 0,
|
|
138
|
-
backgroundColor: (
|
|
138
|
+
backgroundColor: (g) => Mt(g.palette.common.white, 0.1),
|
|
139
139
|
opacity: 1,
|
|
140
140
|
"&:hover": {
|
|
141
|
-
backgroundColor: (
|
|
141
|
+
backgroundColor: (g) => Mt(g.palette.common.white, 0.16)
|
|
142
142
|
},
|
|
143
143
|
"& .MuiSvgIcon-root": {
|
|
144
144
|
fontSize: "8px",
|
|
@@ -156,12 +156,12 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
156
156
|
/* @__PURE__ */ a(
|
|
157
157
|
Bt,
|
|
158
158
|
{
|
|
159
|
-
open:
|
|
160
|
-
onClick:
|
|
159
|
+
open: d,
|
|
160
|
+
onClick: u,
|
|
161
161
|
sx: {
|
|
162
162
|
backdropFilter: "blur(4px)",
|
|
163
163
|
backgroundColor: "rgba(0, 0, 0, 0.3)",
|
|
164
|
-
zIndex: (
|
|
164
|
+
zIndex: (g) => g.zIndex.modal - 1
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
),
|
|
@@ -170,8 +170,8 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
170
170
|
{
|
|
171
171
|
id: "app-menu",
|
|
172
172
|
anchorEl: s,
|
|
173
|
-
open:
|
|
174
|
-
onClose:
|
|
173
|
+
open: d,
|
|
174
|
+
onClose: u,
|
|
175
175
|
anchorOrigin: {
|
|
176
176
|
vertical: "bottom",
|
|
177
177
|
horizontal: "left"
|
|
@@ -181,16 +181,16 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
181
181
|
horizontal: "left"
|
|
182
182
|
},
|
|
183
183
|
sx: {
|
|
184
|
-
zIndex: (
|
|
184
|
+
zIndex: (g) => g.zIndex.modal,
|
|
185
185
|
"& .MuiPaper-root": {
|
|
186
186
|
minWidth: 200,
|
|
187
187
|
mt: 1
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
|
-
children: r.map((
|
|
191
|
-
/* @__PURE__ */ a(w, { sx: { display: "flex", alignItems: "center" }, children:
|
|
192
|
-
/* @__PURE__ */ a(R, { variant: "body1", sx: { ml: 2 }, children:
|
|
193
|
-
] },
|
|
190
|
+
children: r.map((g) => /* @__PURE__ */ S(Y, { onClick: () => p(g), children: [
|
|
191
|
+
/* @__PURE__ */ a(w, { sx: { display: "flex", alignItems: "center" }, children: g.icon }),
|
|
192
|
+
/* @__PURE__ */ a(R, { variant: "body1", sx: { ml: 2 }, children: g.name })
|
|
193
|
+
] }, g.id))
|
|
194
194
|
}
|
|
195
195
|
)
|
|
196
196
|
] });
|
|
@@ -214,14 +214,14 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
214
214
|
hasError: o,
|
|
215
215
|
className: r
|
|
216
216
|
}) => {
|
|
217
|
-
const { t: i, i18n: n } = z(), c = B(), { currentState: s, remainingTime: l, maxTime:
|
|
218
|
-
showErrorAnimation:
|
|
219
|
-
showPauseAnimation:
|
|
220
|
-
showPulsatingText:
|
|
221
|
-
pulsatingFinished:
|
|
217
|
+
const { t: i, i18n: n } = z(), c = B(), { currentState: s, remainingTime: l, maxTime: d, currentProgress: m } = e, {
|
|
218
|
+
showErrorAnimation: u,
|
|
219
|
+
showPauseAnimation: p,
|
|
220
|
+
showPulsatingText: g,
|
|
221
|
+
pulsatingFinished: f,
|
|
222
222
|
showLabels: y,
|
|
223
|
-
showMainText:
|
|
224
|
-
showIdlePulsating:
|
|
223
|
+
showMainText: b,
|
|
224
|
+
showIdlePulsating: h,
|
|
225
225
|
idleDotsCount: v
|
|
226
226
|
} = t;
|
|
227
227
|
return /* @__PURE__ */ S(
|
|
@@ -242,7 +242,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
242
242
|
{
|
|
243
243
|
width: 264,
|
|
244
244
|
height: 264,
|
|
245
|
-
value: s === "idle" ? 0 :
|
|
245
|
+
value: s === "idle" ? 0 : m,
|
|
246
246
|
valueMin: 0,
|
|
247
247
|
valueMax: 100,
|
|
248
248
|
innerRadius: "85%",
|
|
@@ -251,7 +251,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
251
251
|
skipAnimation: !0,
|
|
252
252
|
text: () => "",
|
|
253
253
|
sx: {
|
|
254
|
-
opacity:
|
|
254
|
+
opacity: p || u ? 0.6 : 1,
|
|
255
255
|
transition: "opacity 0.5s ease-out",
|
|
256
256
|
"& .MuiGauge-valueArc": {
|
|
257
257
|
fill: o ? c.palette.error.light : c.palette.success.main,
|
|
@@ -314,14 +314,14 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
314
314
|
variant: "body2",
|
|
315
315
|
sx: {
|
|
316
316
|
fontSize: "12px",
|
|
317
|
-
color: s === "measured" && (
|
|
317
|
+
color: s === "measured" && (g || f) ? c.palette.success.main : c.palette.text.secondary,
|
|
318
318
|
transition: "color 0.8s ease-in-out"
|
|
319
319
|
},
|
|
320
320
|
children: /* @__PURE__ */ a(
|
|
321
321
|
"span",
|
|
322
322
|
{
|
|
323
323
|
style: {
|
|
324
|
-
opacity: s === "measured" &&
|
|
324
|
+
opacity: s === "measured" && f ? g ? 1 : 0.6 : 1,
|
|
325
325
|
transition: "opacity 2s ease-in-out"
|
|
326
326
|
},
|
|
327
327
|
children: s === "measuring" || s === "measured" ? i("CycleTimer.CycleTime.lb", "Cycle Time") : s === "countdown" ? i("CycleTimer.RemainingTime.lb", "Remaining Time") : ""
|
|
@@ -348,7 +348,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
348
348
|
/* @__PURE__ */ a(
|
|
349
349
|
H,
|
|
350
350
|
{
|
|
351
|
-
in:
|
|
351
|
+
in: b && s === "idle" && !o,
|
|
352
352
|
timeout: 200,
|
|
353
353
|
children: /* @__PURE__ */ S(
|
|
354
354
|
R,
|
|
@@ -373,7 +373,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
373
373
|
"span",
|
|
374
374
|
{
|
|
375
375
|
style: {
|
|
376
|
-
opacity:
|
|
376
|
+
opacity: h ? 1 : 0.6,
|
|
377
377
|
transition: "opacity 2s ease-in-out"
|
|
378
378
|
},
|
|
379
379
|
children: i(
|
|
@@ -389,7 +389,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
389
389
|
display: "inline-block",
|
|
390
390
|
width: "18px",
|
|
391
391
|
textAlign: "left",
|
|
392
|
-
opacity:
|
|
392
|
+
opacity: h ? 1 : 0.6,
|
|
393
393
|
transition: "opacity 2s ease-in-out"
|
|
394
394
|
},
|
|
395
395
|
children: ".".repeat(v)
|
|
@@ -400,7 +400,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
400
400
|
)
|
|
401
401
|
}
|
|
402
402
|
),
|
|
403
|
-
/* @__PURE__ */ a(H, { in:
|
|
403
|
+
/* @__PURE__ */ a(H, { in: b && o, timeout: 200, children: /* @__PURE__ */ a(
|
|
404
404
|
R,
|
|
405
405
|
{
|
|
406
406
|
variant: "h3",
|
|
@@ -417,7 +417,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
417
417
|
/* @__PURE__ */ a(
|
|
418
418
|
H,
|
|
419
419
|
{
|
|
420
|
-
in:
|
|
420
|
+
in: b && !o && s !== "idle" && s !== "success",
|
|
421
421
|
timeout: 300,
|
|
422
422
|
children: /* @__PURE__ */ a(
|
|
423
423
|
R,
|
|
@@ -469,18 +469,18 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
469
469
|
variant: "body2",
|
|
470
470
|
sx: {
|
|
471
471
|
fontSize: "12px",
|
|
472
|
-
color: s === "measured" && (
|
|
472
|
+
color: s === "measured" && (g || f) ? c.palette.success.main : c.palette.text.secondary,
|
|
473
473
|
transition: "color 0.8s ease-in-out"
|
|
474
474
|
},
|
|
475
475
|
children: /* @__PURE__ */ a(
|
|
476
476
|
"span",
|
|
477
477
|
{
|
|
478
478
|
style: {
|
|
479
|
-
opacity: s === "measured" &&
|
|
479
|
+
opacity: s === "measured" && f ? g ? 1 : 0.6 : 1,
|
|
480
480
|
transition: "opacity 2s ease-in-out"
|
|
481
481
|
},
|
|
482
|
-
children: s === "measuring" ? i("CycleTimer.Measuring.lb", "measuring...") : s === "measured" ? i("CycleTimer.Determined.lb", "determined") : s === "countdown" &&
|
|
483
|
-
time: N(
|
|
482
|
+
children: s === "measuring" ? i("CycleTimer.Measuring.lb", "measuring...") : s === "measured" ? i("CycleTimer.Determined.lb", "determined") : s === "countdown" && d !== null ? i("CycleTimer.OfTime.lb", {
|
|
483
|
+
time: N(d, n.language)
|
|
484
484
|
}) : ""
|
|
485
485
|
}
|
|
486
486
|
)
|
|
@@ -503,13 +503,13 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
503
503
|
compact: r,
|
|
504
504
|
className: i
|
|
505
505
|
}) => {
|
|
506
|
-
const { t: n, i18n: c } = z(), s = B(), { currentState: l, remainingTime:
|
|
507
|
-
showErrorAnimation:
|
|
508
|
-
showPauseAnimation:
|
|
509
|
-
showPulsatingText:
|
|
510
|
-
pulsatingFinished:
|
|
506
|
+
const { t: n, i18n: c } = z(), s = B(), { currentState: l, remainingTime: d, maxTime: m } = e, {
|
|
507
|
+
showErrorAnimation: u,
|
|
508
|
+
showPauseAnimation: p,
|
|
509
|
+
showPulsatingText: g,
|
|
510
|
+
pulsatingFinished: f,
|
|
511
511
|
showIdlePulsating: y,
|
|
512
|
-
idleDotsCount:
|
|
512
|
+
idleDotsCount: b
|
|
513
513
|
} = t;
|
|
514
514
|
return r && l === "idle" ? /* @__PURE__ */ a(
|
|
515
515
|
w,
|
|
@@ -529,7 +529,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
529
529
|
fontSize: "14px",
|
|
530
530
|
transition: "color 0.5s ease-out"
|
|
531
531
|
},
|
|
532
|
-
children: o ? n("CycleTimer.Error.lb", "Error") : l === "idle" ? "0s" : N(
|
|
532
|
+
children: o ? n("CycleTimer.Error.lb", "Error") : l === "idle" ? "0s" : N(d, c.language)
|
|
533
533
|
}
|
|
534
534
|
)
|
|
535
535
|
}
|
|
@@ -553,7 +553,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
553
553
|
display: "flex",
|
|
554
554
|
alignItems: "center",
|
|
555
555
|
justifyContent: "center",
|
|
556
|
-
opacity:
|
|
556
|
+
opacity: p || u ? 0.6 : 1,
|
|
557
557
|
transition: "opacity 0.5s ease-out"
|
|
558
558
|
},
|
|
559
559
|
children: /* @__PURE__ */ S(
|
|
@@ -573,9 +573,9 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
573
573
|
cy: "10",
|
|
574
574
|
r: "8",
|
|
575
575
|
fill: "none",
|
|
576
|
-
stroke: o ? s.palette.error.light : l === "measured" ?
|
|
576
|
+
stroke: o ? s.palette.error.light : l === "measured" ? g || f ? s.palette.success.main : s.palette.text.secondary : s.palette.success.main,
|
|
577
577
|
strokeWidth: "2",
|
|
578
|
-
opacity: l === "measured" &&
|
|
578
|
+
opacity: l === "measured" && f ? g ? 1 : 0.6 : 0.3,
|
|
579
579
|
style: {
|
|
580
580
|
transition: "stroke 0.8s ease-in-out, opacity 2s ease-in-out"
|
|
581
581
|
}
|
|
@@ -588,13 +588,13 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
588
588
|
cy: "10",
|
|
589
589
|
r: "8",
|
|
590
590
|
fill: "none",
|
|
591
|
-
stroke: o ? s.palette.error.light : l === "measured" ?
|
|
591
|
+
stroke: o ? s.palette.error.light : l === "measured" ? g || f ? s.palette.success.main : s.palette.text.secondary : s.palette.success.main,
|
|
592
592
|
strokeWidth: "2",
|
|
593
593
|
strokeLinecap: "round",
|
|
594
594
|
strokeDasharray: `${2 * Math.PI * 8}`,
|
|
595
595
|
strokeDashoffset: `${2 * Math.PI * 8 * (1 - (l === "idle" ? 0 : e.currentProgress) / 100)}`,
|
|
596
596
|
style: {
|
|
597
|
-
opacity: l === "measured" &&
|
|
597
|
+
opacity: l === "measured" && f ? g ? 1 : 0.6 : 1,
|
|
598
598
|
transition: "stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"
|
|
599
599
|
}
|
|
600
600
|
}
|
|
@@ -609,11 +609,11 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
609
609
|
{
|
|
610
610
|
variant: "body2",
|
|
611
611
|
sx: {
|
|
612
|
-
color: o ? s.palette.error.light : l === "idle" ? "rgba(255, 255, 255, 0.7)" : l === "measured" ?
|
|
612
|
+
color: o ? s.palette.error.light : l === "idle" ? "rgba(255, 255, 255, 0.7)" : l === "measured" ? g || f ? s.palette.success.main : s.palette.text.secondary : s.palette.text.primary,
|
|
613
613
|
fontSize: "14px",
|
|
614
614
|
lineHeight: "normal",
|
|
615
615
|
letterSpacing: "normal",
|
|
616
|
-
opacity: l === "idle" ? y ? 1 : 0.6 : l === "measured" &&
|
|
616
|
+
opacity: l === "idle" ? y ? 1 : 0.6 : l === "measured" && f ? g ? 1 : 0.6 : 1,
|
|
617
617
|
transition: "color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"
|
|
618
618
|
},
|
|
619
619
|
children: o ? n("CycleTimer.Error.lb", "Error") : l === "idle" ? /* @__PURE__ */ S(et, { children: [
|
|
@@ -626,10 +626,10 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
626
626
|
width: "18px",
|
|
627
627
|
textAlign: "left"
|
|
628
628
|
},
|
|
629
|
-
children: ".".repeat(
|
|
629
|
+
children: ".".repeat(b)
|
|
630
630
|
}
|
|
631
631
|
)
|
|
632
|
-
] }) : l === "measuring" ? r ? N(
|
|
632
|
+
] }) : l === "measuring" ? r ? N(d, c.language) : `${N(d, c.language)} / ${n("CycleTimer.Measuring.lb", "measuring...")}` : l === "measured" ? r ? N(d, c.language) : `${N(d, c.language)} / ${n("CycleTimer.Determined.lb", "determined")}` : l === "countdown" && m !== null ? r ? N(d, c.language) : `${N(d, c.language)} / ${n("CycleTimer.Time.lb", { time: N(m, c.language) })}` : N(d, c.language)
|
|
633
633
|
}
|
|
634
634
|
)
|
|
635
635
|
]
|
|
@@ -653,17 +653,17 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
653
653
|
null
|
|
654
654
|
), n = A(null), c = A(0), s = A(null), l = A(
|
|
655
655
|
null
|
|
656
|
-
),
|
|
657
|
-
t((
|
|
658
|
-
t((
|
|
656
|
+
), d = _(() => {
|
|
657
|
+
t((x) => ({ ...x, showPauseAnimation: !0 })), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
|
|
658
|
+
t((x) => ({ ...x, showPauseAnimation: !1 }));
|
|
659
659
|
}, 800);
|
|
660
|
-
}, []),
|
|
661
|
-
t((
|
|
662
|
-
t((
|
|
660
|
+
}, []), m = _(() => {
|
|
661
|
+
t((x) => ({ ...x, showErrorAnimation: !0 })), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
|
|
662
|
+
t((x) => ({ ...x, showErrorAnimation: !1 }));
|
|
663
663
|
}, 600);
|
|
664
|
-
}, []),
|
|
665
|
-
t((
|
|
666
|
-
}, []),
|
|
664
|
+
}, []), u = _(() => {
|
|
665
|
+
t((x) => ({ ...x, showErrorAnimation: !1 })), r.current && clearTimeout(r.current);
|
|
666
|
+
}, []), p = _((x) => {
|
|
667
667
|
c.current = 0, t((T) => ({
|
|
668
668
|
...T,
|
|
669
669
|
showPulsatingText: !0,
|
|
@@ -678,51 +678,51 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
678
678
|
...T,
|
|
679
679
|
showPulsatingText: !T.showPulsatingText
|
|
680
680
|
}));
|
|
681
|
-
}, 2e3),
|
|
681
|
+
}, 2e3), x && x();
|
|
682
682
|
}, 800);
|
|
683
|
-
}, []),
|
|
684
|
-
i.current && (clearInterval(i.current), i.current = null), t((
|
|
685
|
-
...
|
|
683
|
+
}, []), g = _(() => {
|
|
684
|
+
i.current && (clearInterval(i.current), i.current = null), t((x) => ({
|
|
685
|
+
...x,
|
|
686
686
|
showPulsatingText: !1,
|
|
687
687
|
pulsatingFinished: !1
|
|
688
688
|
})), c.current = 0;
|
|
689
|
-
}, []),
|
|
690
|
-
t((
|
|
691
|
-
...
|
|
689
|
+
}, []), f = _(() => {
|
|
690
|
+
t((x) => ({
|
|
691
|
+
...x,
|
|
692
692
|
showIdlePulsating: !0
|
|
693
693
|
})), s.current = setInterval(() => {
|
|
694
|
-
t((
|
|
695
|
-
...
|
|
696
|
-
showIdlePulsating: !
|
|
694
|
+
t((x) => ({
|
|
695
|
+
...x,
|
|
696
|
+
showIdlePulsating: !x.showIdlePulsating
|
|
697
697
|
}));
|
|
698
698
|
}, 2e3), l.current = setInterval(() => {
|
|
699
|
-
t((
|
|
700
|
-
...
|
|
701
|
-
idleDotsCount: (
|
|
699
|
+
t((x) => ({
|
|
700
|
+
...x,
|
|
701
|
+
idleDotsCount: (x.idleDotsCount + 1) % 4
|
|
702
702
|
// Cycle through 0, 1, 2, 3
|
|
703
703
|
}));
|
|
704
704
|
}, 800);
|
|
705
705
|
}, []), y = _(() => {
|
|
706
|
-
s.current && (clearInterval(s.current), s.current = null), l.current && (clearInterval(l.current), l.current = null), t((
|
|
707
|
-
...
|
|
706
|
+
s.current && (clearInterval(s.current), s.current = null), l.current && (clearInterval(l.current), l.current = null), t((x) => ({
|
|
707
|
+
...x,
|
|
708
708
|
showIdlePulsating: !1,
|
|
709
709
|
idleDotsCount: 0
|
|
710
710
|
}));
|
|
711
|
-
}, []),
|
|
712
|
-
t((
|
|
713
|
-
...
|
|
711
|
+
}, []), b = _(() => {
|
|
712
|
+
t((x) => ({
|
|
713
|
+
...x,
|
|
714
714
|
showLabels: !1,
|
|
715
715
|
showMainText: !1
|
|
716
716
|
})), n.current && clearTimeout(n.current), n.current = setTimeout(() => {
|
|
717
|
-
t((
|
|
718
|
-
...
|
|
717
|
+
t((x) => ({
|
|
718
|
+
...x,
|
|
719
719
|
showLabels: !0,
|
|
720
720
|
showMainText: !0
|
|
721
721
|
}));
|
|
722
722
|
}, 200);
|
|
723
|
-
}, []),
|
|
724
|
-
t((
|
|
725
|
-
...
|
|
723
|
+
}, []), h = _(() => {
|
|
724
|
+
t((x) => ({
|
|
725
|
+
...x,
|
|
726
726
|
showLabels: !0,
|
|
727
727
|
showMainText: !0
|
|
728
728
|
}));
|
|
@@ -731,15 +731,15 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
731
731
|
}, []);
|
|
732
732
|
return {
|
|
733
733
|
animationState: e,
|
|
734
|
-
triggerPauseAnimation:
|
|
735
|
-
triggerErrorAnimation:
|
|
736
|
-
clearErrorAnimation:
|
|
737
|
-
startPulsatingAnimation:
|
|
738
|
-
stopPulsatingAnimation:
|
|
739
|
-
startIdleAnimations:
|
|
734
|
+
triggerPauseAnimation: d,
|
|
735
|
+
triggerErrorAnimation: m,
|
|
736
|
+
clearErrorAnimation: u,
|
|
737
|
+
startPulsatingAnimation: p,
|
|
738
|
+
stopPulsatingAnimation: g,
|
|
739
|
+
startIdleAnimations: f,
|
|
740
740
|
stopIdleAnimations: y,
|
|
741
|
-
triggerFadeTransition:
|
|
742
|
-
setInitialAnimationState:
|
|
741
|
+
triggerFadeTransition: b,
|
|
742
|
+
setInitialAnimationState: h,
|
|
743
743
|
cleanup: v
|
|
744
744
|
};
|
|
745
745
|
}, bo = ({
|
|
@@ -752,7 +752,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
752
752
|
onClearErrorAnimation: c,
|
|
753
753
|
onStartPulsating: s
|
|
754
754
|
}) => {
|
|
755
|
-
const [l,
|
|
755
|
+
const [l, d] = L({
|
|
756
756
|
currentState: "idle",
|
|
757
757
|
remainingTime: 0,
|
|
758
758
|
maxTime: null,
|
|
@@ -760,14 +760,14 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
760
760
|
isPausedState: !1,
|
|
761
761
|
currentProgress: 0,
|
|
762
762
|
wasRunningBeforeError: !1
|
|
763
|
-
}),
|
|
763
|
+
}), m = A(null), u = A(null), p = A(0), [g] = $t([0], {
|
|
764
764
|
tension: 80,
|
|
765
765
|
friction: 18,
|
|
766
766
|
onChange: ([C]) => {
|
|
767
|
-
|
|
767
|
+
d((M) => ({ ...M, currentProgress: C }));
|
|
768
768
|
}
|
|
769
|
-
}),
|
|
770
|
-
|
|
769
|
+
}), f = _(() => {
|
|
770
|
+
d((C) => ({
|
|
771
771
|
...C,
|
|
772
772
|
currentState: "idle",
|
|
773
773
|
maxTime: null,
|
|
@@ -776,11 +776,11 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
776
776
|
isPausedState: !1,
|
|
777
777
|
currentProgress: 0
|
|
778
778
|
// Reset progress to 0 for gauge
|
|
779
|
-
})),
|
|
780
|
-
}, [
|
|
779
|
+
})), p.current = 0, u.current = null, g.setImmediate([0]);
|
|
780
|
+
}, [g]), y = _(
|
|
781
781
|
(C = 0) => {
|
|
782
782
|
const M = C / 60 % 1 * 100;
|
|
783
|
-
|
|
783
|
+
d((k) => ({
|
|
784
784
|
...k,
|
|
785
785
|
currentState: "measuring",
|
|
786
786
|
maxTime: null,
|
|
@@ -788,48 +788,48 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
788
788
|
isPausedState: !1,
|
|
789
789
|
currentProgress: M
|
|
790
790
|
// Immediately set progress
|
|
791
|
-
})),
|
|
791
|
+
})), p.current = 0, g.setImmediate([M]), e ? (u.current = Date.now() - C * 1e3, d((k) => ({ ...k, isRunning: !0 }))) : u.current = null;
|
|
792
792
|
},
|
|
793
|
-
[e,
|
|
794
|
-
),
|
|
793
|
+
[e, g]
|
|
794
|
+
), b = _(
|
|
795
795
|
(C, M = 0) => {
|
|
796
|
-
|
|
796
|
+
d((I) => ({ ...I, isRunning: !1 })), u.current = null, d((I) => ({
|
|
797
797
|
...I,
|
|
798
798
|
currentState: "countdown",
|
|
799
799
|
maxTime: C,
|
|
800
800
|
isPausedState: !1
|
|
801
|
-
})),
|
|
801
|
+
})), p.current = 0;
|
|
802
802
|
const k = Math.max(0, C - M), j = M > 0 ? M / C * 100 : 0;
|
|
803
|
-
|
|
803
|
+
d((I) => ({
|
|
804
804
|
...I,
|
|
805
805
|
remainingTime: k,
|
|
806
806
|
currentProgress: j
|
|
807
807
|
// Immediately set progress
|
|
808
|
-
})),
|
|
809
|
-
|
|
810
|
-
}, 0) :
|
|
808
|
+
})), g.setImmediate([j]), k === 0 ? (d((I) => ({ ...I, isRunning: !1 })), u.current = null, t && queueMicrotask(() => t())) : e ? setTimeout(() => {
|
|
809
|
+
u.current = Date.now() - M * 1e3, d((I) => ({ ...I, isRunning: !0 }));
|
|
810
|
+
}, 0) : u.current = null;
|
|
811
811
|
},
|
|
812
|
-
[e, t,
|
|
813
|
-
),
|
|
814
|
-
|
|
812
|
+
[e, t, g]
|
|
813
|
+
), h = _(() => {
|
|
814
|
+
d((C) => ({
|
|
815
815
|
...C,
|
|
816
816
|
isRunning: !1,
|
|
817
817
|
currentState: "measured"
|
|
818
|
-
})),
|
|
818
|
+
})), u.current = null, s(() => {
|
|
819
819
|
o && o();
|
|
820
820
|
});
|
|
821
821
|
}, [s, o]), v = _(() => {
|
|
822
|
-
if (
|
|
823
|
-
const M = Date.now() -
|
|
824
|
-
|
|
825
|
-
const k =
|
|
822
|
+
if (u.current && l.isRunning) {
|
|
823
|
+
const M = Date.now() - u.current;
|
|
824
|
+
p.current += M;
|
|
825
|
+
const k = p.current / 1e3, j = po(
|
|
826
826
|
l.currentState,
|
|
827
827
|
k,
|
|
828
828
|
l.maxTime
|
|
829
829
|
);
|
|
830
|
-
|
|
830
|
+
g.setTarget([j]);
|
|
831
831
|
}
|
|
832
|
-
|
|
832
|
+
d((C) => ({
|
|
833
833
|
...C,
|
|
834
834
|
isRunning: !1,
|
|
835
835
|
isPausedState: !0
|
|
@@ -838,10 +838,10 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
838
838
|
l.isRunning,
|
|
839
839
|
l.currentState,
|
|
840
840
|
l.maxTime,
|
|
841
|
-
|
|
841
|
+
g,
|
|
842
842
|
i
|
|
843
|
-
]),
|
|
844
|
-
l.isPausedState && (l.remainingTime > 0 || l.currentState !== "countdown") && (
|
|
843
|
+
]), x = _(() => {
|
|
844
|
+
l.isPausedState && (l.remainingTime > 0 || l.currentState !== "countdown") && (u.current = Date.now(), d((C) => ({
|
|
845
845
|
...C,
|
|
846
846
|
isRunning: !0,
|
|
847
847
|
isPausedState: !1
|
|
@@ -852,76 +852,76 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
852
852
|
l.currentState
|
|
853
853
|
]), T = _(() => l.isPausedState, [l.isPausedState]);
|
|
854
854
|
return F(() => {
|
|
855
|
-
r ? (l.isRunning && !l.isPausedState && (
|
|
855
|
+
r ? (l.isRunning && !l.isPausedState && (d((C) => ({ ...C, wasRunningBeforeError: !0 })), v()), n()) : (l.wasRunningBeforeError && l.isPausedState && (d((C) => ({ ...C, wasRunningBeforeError: !1 })), x()), c());
|
|
856
856
|
}, [
|
|
857
857
|
r,
|
|
858
858
|
l.isRunning,
|
|
859
859
|
l.isPausedState,
|
|
860
860
|
l.wasRunningBeforeError,
|
|
861
861
|
v,
|
|
862
|
-
|
|
862
|
+
x,
|
|
863
863
|
n,
|
|
864
864
|
c
|
|
865
865
|
]), F(() => {
|
|
866
866
|
if (l.isRunning) {
|
|
867
867
|
const C = () => {
|
|
868
|
-
if (
|
|
869
|
-
const k = (Date.now() -
|
|
868
|
+
if (u.current) {
|
|
869
|
+
const k = (Date.now() - u.current + p.current) / 1e3;
|
|
870
870
|
if (l.currentState === "countdown" && l.maxTime !== null) {
|
|
871
871
|
const j = Math.max(0, l.maxTime - k);
|
|
872
|
-
|
|
872
|
+
d((E) => ({
|
|
873
873
|
...E,
|
|
874
874
|
remainingTime: Math.ceil(j)
|
|
875
875
|
}));
|
|
876
876
|
const I = Math.min(100, k / l.maxTime * 100);
|
|
877
|
-
if (
|
|
878
|
-
|
|
877
|
+
if (g.setTarget([I]), j <= 0) {
|
|
878
|
+
d((E) => ({
|
|
879
879
|
...E,
|
|
880
880
|
isRunning: !1,
|
|
881
881
|
remainingTime: 0
|
|
882
|
-
})),
|
|
882
|
+
})), u.current = null, g.setTarget([100]), t && queueMicrotask(() => t());
|
|
883
883
|
return;
|
|
884
884
|
}
|
|
885
885
|
} else if (l.currentState === "measuring") {
|
|
886
|
-
|
|
886
|
+
d((I) => ({
|
|
887
887
|
...I,
|
|
888
888
|
remainingTime: Math.floor(k)
|
|
889
889
|
}));
|
|
890
890
|
const j = k / 60 % 1 * 100;
|
|
891
|
-
|
|
891
|
+
g.setTarget([j]);
|
|
892
892
|
}
|
|
893
|
-
l.isRunning && (
|
|
893
|
+
l.isRunning && (m.current = requestAnimationFrame(C));
|
|
894
894
|
}
|
|
895
895
|
};
|
|
896
|
-
|
|
896
|
+
m.current = requestAnimationFrame(C);
|
|
897
897
|
} else
|
|
898
|
-
|
|
898
|
+
m.current && (cancelAnimationFrame(m.current), m.current = null);
|
|
899
899
|
return () => {
|
|
900
|
-
|
|
900
|
+
m.current && cancelAnimationFrame(m.current);
|
|
901
901
|
};
|
|
902
902
|
}, [
|
|
903
903
|
l.isRunning,
|
|
904
904
|
t,
|
|
905
905
|
l.currentState,
|
|
906
906
|
l.maxTime,
|
|
907
|
-
|
|
907
|
+
g
|
|
908
908
|
]), F(() => {
|
|
909
909
|
let C = null;
|
|
910
910
|
const M = () => {
|
|
911
|
-
|
|
911
|
+
g.update(1 / 60), C = requestAnimationFrame(M);
|
|
912
912
|
};
|
|
913
913
|
return C = requestAnimationFrame(M), () => {
|
|
914
914
|
C && cancelAnimationFrame(C);
|
|
915
915
|
};
|
|
916
|
-
}, [
|
|
916
|
+
}, [g]), {
|
|
917
917
|
timerState: l,
|
|
918
918
|
controls: {
|
|
919
|
-
startNewCycle:
|
|
919
|
+
startNewCycle: b,
|
|
920
920
|
startMeasuring: y,
|
|
921
|
-
setIdle:
|
|
922
|
-
completeMeasuring:
|
|
921
|
+
setIdle: f,
|
|
922
|
+
completeMeasuring: h,
|
|
923
923
|
pause: v,
|
|
924
|
-
resume:
|
|
924
|
+
resume: x,
|
|
925
925
|
isPaused: T
|
|
926
926
|
}
|
|
927
927
|
};
|
|
@@ -938,36 +938,36 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
938
938
|
hasError: s = !1
|
|
939
939
|
}) => {
|
|
940
940
|
const l = A(void 0), {
|
|
941
|
-
animationState:
|
|
942
|
-
triggerPauseAnimation:
|
|
943
|
-
triggerErrorAnimation:
|
|
944
|
-
clearErrorAnimation:
|
|
945
|
-
startPulsatingAnimation:
|
|
946
|
-
stopPulsatingAnimation:
|
|
941
|
+
animationState: d,
|
|
942
|
+
triggerPauseAnimation: m,
|
|
943
|
+
triggerErrorAnimation: u,
|
|
944
|
+
clearErrorAnimation: p,
|
|
945
|
+
startPulsatingAnimation: g,
|
|
946
|
+
stopPulsatingAnimation: f,
|
|
947
947
|
startIdleAnimations: y,
|
|
948
|
-
stopIdleAnimations:
|
|
949
|
-
triggerFadeTransition:
|
|
948
|
+
stopIdleAnimations: b,
|
|
949
|
+
triggerFadeTransition: h,
|
|
950
950
|
setInitialAnimationState: v,
|
|
951
|
-
cleanup:
|
|
951
|
+
cleanup: x
|
|
952
952
|
} = fo(), { timerState: T, controls: C } = bo({
|
|
953
953
|
autoStart: r,
|
|
954
954
|
onCycleEnd: t,
|
|
955
955
|
onMeasuringComplete: o,
|
|
956
956
|
hasError: s,
|
|
957
|
-
onPauseAnimation:
|
|
958
|
-
onErrorAnimation:
|
|
959
|
-
onClearErrorAnimation:
|
|
960
|
-
onStartPulsating:
|
|
957
|
+
onPauseAnimation: m,
|
|
958
|
+
onErrorAnimation: u,
|
|
959
|
+
onClearErrorAnimation: p,
|
|
960
|
+
onStartPulsating: g
|
|
961
961
|
});
|
|
962
962
|
return F(() => {
|
|
963
963
|
const M = l.current;
|
|
964
|
-
l.current !== void 0 && M !== T.currentState ? (M === "measured" &&
|
|
964
|
+
l.current !== void 0 && M !== T.currentState ? (M === "measured" && f(), M === "idle" && b(), h()) : v(), T.currentState === "idle" && y(), l.current = T.currentState;
|
|
965
965
|
}, [
|
|
966
966
|
T.currentState,
|
|
967
|
-
|
|
968
|
-
|
|
967
|
+
f,
|
|
968
|
+
b,
|
|
969
969
|
y,
|
|
970
|
-
|
|
970
|
+
h,
|
|
971
971
|
v
|
|
972
972
|
]), F(() => {
|
|
973
973
|
let M = !0;
|
|
@@ -977,11 +977,11 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
977
977
|
return () => {
|
|
978
978
|
M = !1, clearTimeout(k);
|
|
979
979
|
};
|
|
980
|
-
}, [e, C]), F(() =>
|
|
980
|
+
}, [e, C]), F(() => x, [x]), i === "small" ? /* @__PURE__ */ a(
|
|
981
981
|
ho,
|
|
982
982
|
{
|
|
983
983
|
timerState: T,
|
|
984
|
-
animationState:
|
|
984
|
+
animationState: d,
|
|
985
985
|
hasError: s,
|
|
986
986
|
compact: n,
|
|
987
987
|
className: c
|
|
@@ -990,7 +990,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
990
990
|
mo,
|
|
991
991
|
{
|
|
992
992
|
timerState: T,
|
|
993
|
-
animationState:
|
|
993
|
+
animationState: d,
|
|
994
994
|
hasError: s,
|
|
995
995
|
className: c
|
|
996
996
|
}
|
|
@@ -1009,25 +1009,25 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1009
1009
|
title: c,
|
|
1010
1010
|
showCount: s = !0,
|
|
1011
1011
|
searchPlaceholder: l = "Search programs",
|
|
1012
|
-
dataGridProps:
|
|
1013
|
-
CustomToolbar:
|
|
1014
|
-
selectFirstByDefault:
|
|
1015
|
-
sx:
|
|
1012
|
+
dataGridProps: d,
|
|
1013
|
+
CustomToolbar: m,
|
|
1014
|
+
selectFirstByDefault: u = !1,
|
|
1015
|
+
sx: p
|
|
1016
1016
|
}) => {
|
|
1017
1017
|
var j;
|
|
1018
|
-
const
|
|
1018
|
+
const g = B(), f = ce(), y = A(null), [b, h] = L(null), v = rt(() => e.map(o), [e, o]);
|
|
1019
1019
|
F(() => {
|
|
1020
|
-
|
|
1020
|
+
f.current && v.length > 0 && f.current.autosizeColumns({
|
|
1021
1021
|
includeOutliers: !0,
|
|
1022
1022
|
includeHeaders: !0,
|
|
1023
1023
|
expand: !0,
|
|
1024
1024
|
columns: t.map((I) => I.field)
|
|
1025
1025
|
});
|
|
1026
|
-
}, [v, t,
|
|
1027
|
-
if (!y.current || !
|
|
1026
|
+
}, [v, t, f]), F(() => {
|
|
1027
|
+
if (!y.current || !f.current) return;
|
|
1028
1028
|
const I = new ResizeObserver(() => {
|
|
1029
1029
|
setTimeout(() => {
|
|
1030
|
-
|
|
1030
|
+
f.current && v.length > 0 && f.current.autosizeColumns({
|
|
1031
1031
|
includeOutliers: !0,
|
|
1032
1032
|
includeHeaders: !0,
|
|
1033
1033
|
expand: !0,
|
|
@@ -1038,21 +1038,21 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1038
1038
|
return I.observe(y.current), () => {
|
|
1039
1039
|
I.disconnect();
|
|
1040
1040
|
};
|
|
1041
|
-
}, [
|
|
1042
|
-
const
|
|
1041
|
+
}, [f, v.length, t]);
|
|
1042
|
+
const x = rt(() => {
|
|
1043
1043
|
if (i !== void 0)
|
|
1044
1044
|
return i;
|
|
1045
|
-
if (
|
|
1046
|
-
return
|
|
1047
|
-
if (
|
|
1045
|
+
if (b !== null)
|
|
1046
|
+
return b;
|
|
1047
|
+
if (u && e.length > 0) {
|
|
1048
1048
|
const I = e[0];
|
|
1049
|
-
return
|
|
1049
|
+
return h(I), I;
|
|
1050
1050
|
}
|
|
1051
1051
|
return null;
|
|
1052
|
-
}, [
|
|
1052
|
+
}, [u, e, i, b]), T = (I) => {
|
|
1053
1053
|
const E = e.find((V) => o(V).id === I.id);
|
|
1054
|
-
E && (i === void 0 &&
|
|
1055
|
-
}, C = rt(() => !
|
|
1054
|
+
E && (i === void 0 && h(E), r && r(E, I));
|
|
1055
|
+
}, C = rt(() => !x || !n ? null : n(x), [x, n]);
|
|
1056
1056
|
function M() {
|
|
1057
1057
|
return /* @__PURE__ */ a(ge, { children: /* @__PURE__ */ S(
|
|
1058
1058
|
w,
|
|
@@ -1288,7 +1288,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1288
1288
|
}
|
|
1289
1289
|
) });
|
|
1290
1290
|
}
|
|
1291
|
-
const k =
|
|
1291
|
+
const k = m || M;
|
|
1292
1292
|
return /* @__PURE__ */ a(
|
|
1293
1293
|
w,
|
|
1294
1294
|
{
|
|
@@ -1307,7 +1307,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1307
1307
|
},
|
|
1308
1308
|
"&:hover *": {
|
|
1309
1309
|
scrollbarWidth: "thin",
|
|
1310
|
-
scrollbarColor: `${
|
|
1310
|
+
scrollbarColor: `${g.palette.divider} transparent`,
|
|
1311
1311
|
"&::-webkit-scrollbar": {
|
|
1312
1312
|
display: "block",
|
|
1313
1313
|
width: "8px",
|
|
@@ -1317,19 +1317,19 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1317
1317
|
background: "transparent"
|
|
1318
1318
|
},
|
|
1319
1319
|
"&::-webkit-scrollbar-thumb": {
|
|
1320
|
-
background:
|
|
1320
|
+
background: g.palette.divider,
|
|
1321
1321
|
borderRadius: "4px"
|
|
1322
1322
|
},
|
|
1323
1323
|
"&::-webkit-scrollbar-thumb:hover": {
|
|
1324
|
-
background:
|
|
1324
|
+
background: g.palette.action.hover
|
|
1325
1325
|
}
|
|
1326
1326
|
},
|
|
1327
|
-
...
|
|
1327
|
+
...p
|
|
1328
1328
|
},
|
|
1329
1329
|
children: /* @__PURE__ */ a(
|
|
1330
1330
|
de,
|
|
1331
1331
|
{
|
|
1332
|
-
apiRef:
|
|
1332
|
+
apiRef: f,
|
|
1333
1333
|
rows: v,
|
|
1334
1334
|
columns: t,
|
|
1335
1335
|
onRowClick: T,
|
|
@@ -1353,19 +1353,19 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1353
1353
|
items: []
|
|
1354
1354
|
}
|
|
1355
1355
|
},
|
|
1356
|
-
...
|
|
1356
|
+
...d == null ? void 0 : d.initialState
|
|
1357
1357
|
},
|
|
1358
|
-
...
|
|
1358
|
+
...d,
|
|
1359
1359
|
autosizeOnMount: !0,
|
|
1360
1360
|
autosizeOptions: {
|
|
1361
1361
|
// Merge any custom autosize options first
|
|
1362
|
-
...(
|
|
1362
|
+
...(d == null ? void 0 : d.autosizeOptions) || {},
|
|
1363
1363
|
// Force these key properties to always be true to maintain autosize behavior
|
|
1364
1364
|
includeOutliers: !0,
|
|
1365
1365
|
includeHeaders: !0,
|
|
1366
1366
|
expand: !0,
|
|
1367
1367
|
// Auto-size all columns by default (can be overridden by dataGridProps)
|
|
1368
|
-
columns: ((j =
|
|
1368
|
+
columns: ((j = d == null ? void 0 : d.autosizeOptions) == null ? void 0 : j.columns) || t.map((I) => I.field)
|
|
1369
1369
|
},
|
|
1370
1370
|
sx: {
|
|
1371
1371
|
border: "none",
|
|
@@ -1505,7 +1505,7 @@ const go = (e) => /* @__PURE__ */ a(re, { ...e, viewBox: "0 0 10 8", children: /
|
|
|
1505
1505
|
// Remove any remaining MUI background overlays
|
|
1506
1506
|
"& .MuiBackdrop-root": {},
|
|
1507
1507
|
"& .MuiModal-backdrop": {},
|
|
1508
|
-
...
|
|
1508
|
+
...d == null ? void 0 : d.sx
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
1511
|
)
|
|
@@ -1527,16 +1527,16 @@ const Pt = $(
|
|
|
1527
1527
|
activeJoggingDirection: c,
|
|
1528
1528
|
...s
|
|
1529
1529
|
}) => {
|
|
1530
|
-
var
|
|
1530
|
+
var x, T, C, M, k, j, I;
|
|
1531
1531
|
pt(() => {
|
|
1532
|
-
const E = o(), V =
|
|
1532
|
+
const E = o(), V = p.current;
|
|
1533
1533
|
V && (V.textContent = E);
|
|
1534
1534
|
});
|
|
1535
|
-
const l = B(), [
|
|
1535
|
+
const l = B(), [d, m] = L(null);
|
|
1536
1536
|
F(() => {
|
|
1537
1537
|
n && v();
|
|
1538
1538
|
}, [n]);
|
|
1539
|
-
const
|
|
1539
|
+
const u = c || d, p = A(null);
|
|
1540
1540
|
e || (e = {
|
|
1541
1541
|
color: "#fff",
|
|
1542
1542
|
backgroundColor: "#000",
|
|
@@ -1549,7 +1549,7 @@ const Pt = $(
|
|
|
1549
1549
|
},
|
|
1550
1550
|
labelColor: "#000"
|
|
1551
1551
|
});
|
|
1552
|
-
const
|
|
1552
|
+
const g = u ? (x = e.buttonBackgroundColor) == null ? void 0 : x.pressed : e.borderColor, f = {
|
|
1553
1553
|
width: "55px",
|
|
1554
1554
|
color: e.color,
|
|
1555
1555
|
path: { fill: e.color },
|
|
@@ -1559,7 +1559,7 @@ const Pt = $(
|
|
|
1559
1559
|
pointerEvents: "none"
|
|
1560
1560
|
}
|
|
1561
1561
|
}, y = {
|
|
1562
|
-
...
|
|
1562
|
+
...f,
|
|
1563
1563
|
backgroundColor: (T = e.buttonBackgroundColor) == null ? void 0 : T.default,
|
|
1564
1564
|
":hover": {
|
|
1565
1565
|
backgroundColor: (C = e.buttonBackgroundColor) == null ? void 0 : C.hovered
|
|
@@ -1573,8 +1573,8 @@ const Pt = $(
|
|
|
1573
1573
|
backgroundColor: (k = e.buttonBackgroundColor) == null ? void 0 : k.disabled,
|
|
1574
1574
|
"svg path": { fill: l.palette.action.disabled }
|
|
1575
1575
|
}
|
|
1576
|
-
},
|
|
1577
|
-
...
|
|
1576
|
+
}, b = {
|
|
1577
|
+
...f,
|
|
1578
1578
|
backgroundColor: (j = e.buttonBackgroundColor) == null ? void 0 : j.pressed,
|
|
1579
1579
|
color: e.backgroundColor,
|
|
1580
1580
|
path: { fill: e.backgroundColor },
|
|
@@ -1583,11 +1583,11 @@ const Pt = $(
|
|
|
1583
1583
|
"svg path": { fill: l.palette.action.disabled }
|
|
1584
1584
|
}
|
|
1585
1585
|
};
|
|
1586
|
-
function
|
|
1587
|
-
n || E.button === 0 && (
|
|
1586
|
+
function h(E, V) {
|
|
1587
|
+
n || E.button === 0 && (m(V), r(V));
|
|
1588
1588
|
}
|
|
1589
1589
|
function v() {
|
|
1590
|
-
|
|
1590
|
+
m(null), i();
|
|
1591
1591
|
}
|
|
1592
1592
|
return /* @__PURE__ */ S(P, { height: "64px", direction: "row", justifyContent: "center", ...s, children: [
|
|
1593
1593
|
/* @__PURE__ */ a(
|
|
@@ -1595,16 +1595,16 @@ const Pt = $(
|
|
|
1595
1595
|
{
|
|
1596
1596
|
disabled: n,
|
|
1597
1597
|
disableRipple: !0,
|
|
1598
|
-
onPointerDown: (E) =>
|
|
1598
|
+
onPointerDown: (E) => h(E, "-"),
|
|
1599
1599
|
onPointerUp: v,
|
|
1600
1600
|
onPointerOut: v,
|
|
1601
1601
|
size: "large",
|
|
1602
1602
|
sx: {
|
|
1603
|
-
...
|
|
1603
|
+
...u === "-" ? b : y,
|
|
1604
1604
|
borderRadius: "16px 0px 0px 16px",
|
|
1605
|
-
borderLeft: `2px solid ${
|
|
1606
|
-
borderBottom: `2px solid ${
|
|
1607
|
-
borderTop: `2px solid ${
|
|
1605
|
+
borderLeft: `2px solid ${g ?? "#fff"}`,
|
|
1606
|
+
borderBottom: `2px solid ${g ?? "#fff"}`,
|
|
1607
|
+
borderTop: `2px solid ${g ?? "#fff"}`
|
|
1608
1608
|
},
|
|
1609
1609
|
children: /* @__PURE__ */ a(_e, {})
|
|
1610
1610
|
}
|
|
@@ -1619,8 +1619,8 @@ const Pt = $(
|
|
|
1619
1619
|
alignItems: "center",
|
|
1620
1620
|
justifyContent: "center",
|
|
1621
1621
|
opacity: "0.9",
|
|
1622
|
-
borderBottom: `2px solid ${
|
|
1623
|
-
borderTop: `2px solid ${
|
|
1622
|
+
borderBottom: `2px solid ${g ?? "#fff"}`,
|
|
1623
|
+
borderTop: `2px solid ${g ?? "#fff"}`
|
|
1624
1624
|
},
|
|
1625
1625
|
children: [
|
|
1626
1626
|
/* @__PURE__ */ a(
|
|
@@ -1655,7 +1655,7 @@ const Pt = $(
|
|
|
1655
1655
|
minWidth: "80px",
|
|
1656
1656
|
textAlign: "center"
|
|
1657
1657
|
},
|
|
1658
|
-
ref:
|
|
1658
|
+
ref: p,
|
|
1659
1659
|
children: o()
|
|
1660
1660
|
}
|
|
1661
1661
|
)
|
|
@@ -1667,16 +1667,16 @@ const Pt = $(
|
|
|
1667
1667
|
{
|
|
1668
1668
|
disableRipple: !0,
|
|
1669
1669
|
disabled: n,
|
|
1670
|
-
onPointerDown: (E) =>
|
|
1670
|
+
onPointerDown: (E) => h(E, "+"),
|
|
1671
1671
|
onPointerUp: v,
|
|
1672
1672
|
onPointerOut: v,
|
|
1673
1673
|
size: "large",
|
|
1674
1674
|
sx: {
|
|
1675
|
-
...
|
|
1675
|
+
...u === "+" ? b : y,
|
|
1676
1676
|
borderRadius: "0px 16px 16px 0px",
|
|
1677
|
-
borderRight: `2px solid ${
|
|
1678
|
-
borderBottom: `2px solid ${
|
|
1679
|
-
borderTop: `2px solid ${
|
|
1677
|
+
borderRight: `2px solid ${g ?? "#fff"}`,
|
|
1678
|
+
borderBottom: `2px solid ${g ?? "#fff"}`,
|
|
1679
|
+
borderTop: `2px solid ${g ?? "#fff"}`
|
|
1680
1680
|
},
|
|
1681
1681
|
children: /* @__PURE__ */ a(Pe, {})
|
|
1682
1682
|
}
|
|
@@ -1697,10 +1697,10 @@ const Pt = $(
|
|
|
1697
1697
|
...s
|
|
1698
1698
|
}) => {
|
|
1699
1699
|
var M, k, j, I, E, V, Q, ot, xt, yt, St, vt, Ct, wt, Tt;
|
|
1700
|
-
const { t: l } = z(), [
|
|
1701
|
-
background: (M =
|
|
1702
|
-
color: (k =
|
|
1703
|
-
},
|
|
1700
|
+
const { t: l } = z(), [d, m] = L(), u = B(), p = {
|
|
1701
|
+
background: (M = u.palette.backgroundPaperElevation) == null ? void 0 : M[4],
|
|
1702
|
+
color: (k = u.palette.backgroundPaperElevation) == null ? void 0 : k[11]
|
|
1703
|
+
}, g = Lt(() => ({
|
|
1704
1704
|
activeJoggingDir: null,
|
|
1705
1705
|
startJogging(O) {
|
|
1706
1706
|
this.activeJoggingDir = O, e(O);
|
|
@@ -1708,26 +1708,26 @@ const Pt = $(
|
|
|
1708
1708
|
stopJogging() {
|
|
1709
1709
|
this.activeJoggingDir = null, t();
|
|
1710
1710
|
}
|
|
1711
|
-
})),
|
|
1711
|
+
})), f = qe(() => {
|
|
1712
1712
|
const O = i ? y(n()) : n();
|
|
1713
|
-
(O === void 0 ||
|
|
1713
|
+
(O === void 0 || d === void 0 || Math.abs(d - O) > 1e-9) && m(O);
|
|
1714
1714
|
}, 50);
|
|
1715
|
-
pt(
|
|
1715
|
+
pt(f);
|
|
1716
1716
|
function y(O) {
|
|
1717
1717
|
if (O !== void 0)
|
|
1718
1718
|
return Nt(O);
|
|
1719
1719
|
}
|
|
1720
|
-
function
|
|
1721
|
-
O.button === 0 &&
|
|
1720
|
+
function b(O) {
|
|
1721
|
+
O.button === 0 && g.startJogging("-");
|
|
1722
1722
|
}
|
|
1723
|
-
function
|
|
1724
|
-
O.button === 0 &&
|
|
1723
|
+
function h(O) {
|
|
1724
|
+
O.button === 0 && g.startJogging("+");
|
|
1725
1725
|
}
|
|
1726
1726
|
function v(O) {
|
|
1727
|
-
|
|
1727
|
+
g.stopJogging();
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1730
|
-
|
|
1729
|
+
function x(O) {
|
|
1730
|
+
g.stopJogging();
|
|
1731
1731
|
}
|
|
1732
1732
|
function T(O, X = 1) {
|
|
1733
1733
|
if (O === void 0 || Number.isNaN(O)) return "";
|
|
@@ -1754,23 +1754,23 @@ const Pt = $(
|
|
|
1754
1754
|
sx: {
|
|
1755
1755
|
"& .MuiIconButton-root": {
|
|
1756
1756
|
width: "52px",
|
|
1757
|
-
color:
|
|
1757
|
+
color: u.palette.text.primary,
|
|
1758
1758
|
alignContent: "center",
|
|
1759
|
-
backgroundColor: (j =
|
|
1759
|
+
backgroundColor: (j = u.palette.backgroundPaperElevation) == null ? void 0 : j[11],
|
|
1760
1760
|
"& svg": {
|
|
1761
1761
|
width: "42px",
|
|
1762
1762
|
height: "42px"
|
|
1763
1763
|
},
|
|
1764
1764
|
"&.Mui-disabled": {
|
|
1765
|
-
backgroundColor: (I =
|
|
1766
|
-
color:
|
|
1765
|
+
backgroundColor: (I = u.palette.backgroundPaperElevation) == null ? void 0 : I[11],
|
|
1766
|
+
color: u.palette.action.disabled,
|
|
1767
1767
|
opacity: 1
|
|
1768
1768
|
},
|
|
1769
1769
|
"&:hover": {
|
|
1770
|
-
backgroundColor: (E =
|
|
1770
|
+
backgroundColor: (E = u.palette.backgroundPaperElevation) == null ? void 0 : E[9]
|
|
1771
1771
|
},
|
|
1772
1772
|
"&:active": {
|
|
1773
|
-
...
|
|
1773
|
+
...p
|
|
1774
1774
|
}
|
|
1775
1775
|
}
|
|
1776
1776
|
},
|
|
@@ -1778,21 +1778,21 @@ const Pt = $(
|
|
|
1778
1778
|
/* @__PURE__ */ a(
|
|
1779
1779
|
q,
|
|
1780
1780
|
{
|
|
1781
|
-
onPointerDown:
|
|
1781
|
+
onPointerDown: b,
|
|
1782
1782
|
onPointerUp: v,
|
|
1783
|
-
onPointerOut:
|
|
1783
|
+
onPointerOut: x,
|
|
1784
1784
|
disabled: c,
|
|
1785
1785
|
disableRipple: !0,
|
|
1786
1786
|
sx: {
|
|
1787
1787
|
borderRadius: "16px 0px 0px 16px",
|
|
1788
|
-
...
|
|
1788
|
+
...g.activeJoggingDir === "-" ? p : {}
|
|
1789
1789
|
},
|
|
1790
1790
|
children: /* @__PURE__ */ a(
|
|
1791
1791
|
Ue,
|
|
1792
1792
|
{
|
|
1793
1793
|
sx: {
|
|
1794
1794
|
pointerEvents: "none",
|
|
1795
|
-
color: (xt = (ot = (Q = (V =
|
|
1795
|
+
color: (xt = (ot = (Q = (V = u.componentsExt) == null ? void 0 : V.JoggingPanel) == null ? void 0 : Q.JoggingJoint) == null ? void 0 : ot.Joint) == null ? void 0 : xt.arrowColor
|
|
1796
1796
|
}
|
|
1797
1797
|
}
|
|
1798
1798
|
)
|
|
@@ -1809,7 +1809,7 @@ const Pt = $(
|
|
|
1809
1809
|
borderLeftWidth: 0,
|
|
1810
1810
|
borderRightWidth: 0,
|
|
1811
1811
|
border: "none",
|
|
1812
|
-
backgroundColor: (yt =
|
|
1812
|
+
backgroundColor: (yt = u.palette.backgroundPaperElevation) == null ? void 0 : yt[11],
|
|
1813
1813
|
paddingLeft: "20px",
|
|
1814
1814
|
paddingRight: "20px",
|
|
1815
1815
|
zIndex: 1
|
|
@@ -1826,9 +1826,9 @@ const Pt = $(
|
|
|
1826
1826
|
fontVariantNumeric: "tabular-nums",
|
|
1827
1827
|
minWidth: "80px",
|
|
1828
1828
|
textAlign: "center",
|
|
1829
|
-
color: c ?
|
|
1829
|
+
color: c ? u.palette.action.disabled : u.palette.text.primary
|
|
1830
1830
|
},
|
|
1831
|
-
children: i ? T(
|
|
1831
|
+
children: i ? T(d) : C(d)
|
|
1832
1832
|
}
|
|
1833
1833
|
),
|
|
1834
1834
|
/* @__PURE__ */ a(
|
|
@@ -1838,7 +1838,7 @@ const Pt = $(
|
|
|
1838
1838
|
"aria-label": "Joint position",
|
|
1839
1839
|
min: i ? y(o) : o,
|
|
1840
1840
|
max: i ? y(r) : r,
|
|
1841
|
-
value:
|
|
1841
|
+
value: d || 0,
|
|
1842
1842
|
track: !1,
|
|
1843
1843
|
sx: {
|
|
1844
1844
|
"& .MuiSlider-mark": {
|
|
@@ -1848,15 +1848,15 @@ const Pt = $(
|
|
|
1848
1848
|
width: "5px",
|
|
1849
1849
|
height: "12px",
|
|
1850
1850
|
borderRadius: "2px",
|
|
1851
|
-
color: c ?
|
|
1851
|
+
color: c ? u.palette.action.disabled : u.palette.text.primary
|
|
1852
1852
|
},
|
|
1853
1853
|
"& .MuiSlider-markLabel": {
|
|
1854
1854
|
top: "20px",
|
|
1855
1855
|
fontSize: "12px",
|
|
1856
|
-
color: c ?
|
|
1856
|
+
color: c ? u.palette.action.disabled : u.palette.text.secondary
|
|
1857
1857
|
},
|
|
1858
1858
|
"& .MuiSlider-rail": {
|
|
1859
|
-
backgroundColor: (St =
|
|
1859
|
+
backgroundColor: (St = u.palette.backgroundPaperElevation) == null ? void 0 : St[5],
|
|
1860
1860
|
opacity: 1
|
|
1861
1861
|
}
|
|
1862
1862
|
},
|
|
@@ -1878,21 +1878,21 @@ const Pt = $(
|
|
|
1878
1878
|
/* @__PURE__ */ a(
|
|
1879
1879
|
q,
|
|
1880
1880
|
{
|
|
1881
|
-
onPointerDown:
|
|
1881
|
+
onPointerDown: h,
|
|
1882
1882
|
onPointerUp: v,
|
|
1883
|
-
onPointerOut:
|
|
1883
|
+
onPointerOut: x,
|
|
1884
1884
|
disabled: c,
|
|
1885
1885
|
disableRipple: !0,
|
|
1886
1886
|
sx: {
|
|
1887
1887
|
borderRadius: "0px 16px 16px 0px",
|
|
1888
|
-
...
|
|
1888
|
+
...g.activeJoggingDir === "+" ? p : {}
|
|
1889
1889
|
},
|
|
1890
1890
|
children: /* @__PURE__ */ a(
|
|
1891
1891
|
He,
|
|
1892
1892
|
{
|
|
1893
1893
|
sx: {
|
|
1894
1894
|
pointerEvents: "none",
|
|
1895
|
-
color: (Tt = (wt = (Ct = (vt =
|
|
1895
|
+
color: (Tt = (wt = (Ct = (vt = u.componentsExt) == null ? void 0 : vt.JoggingPanel) == null ? void 0 : Ct.JoggingJoint) == null ? void 0 : wt.Joint) == null ? void 0 : Tt.arrowColor
|
|
1896
1896
|
}
|
|
1897
1897
|
}
|
|
1898
1898
|
)
|
|
@@ -1947,81 +1947,86 @@ function vo(e, t) {
|
|
|
1947
1947
|
}
|
|
1948
1948
|
const Ot = 1e-4;
|
|
1949
1949
|
class ht {
|
|
1950
|
-
constructor(t, o, r, i, n, c) {
|
|
1951
|
-
this.nova = t, this.
|
|
1952
|
-
var
|
|
1953
|
-
const
|
|
1954
|
-
if (!
|
|
1950
|
+
constructor(t, o, r, i, n, c, s) {
|
|
1951
|
+
this.nova = t, this.cellId = o, this.controller = r, this.motionGroup = i, this.description = n, this.initialMotionState = c, this.motionStateSocket = s, this.rapidlyChangingMotionState = c, s.addEventListener("message", (l) => {
|
|
1952
|
+
var p;
|
|
1953
|
+
const d = (p = W(l.data)) == null ? void 0 : p.result;
|
|
1954
|
+
if (!d)
|
|
1955
1955
|
throw new Error(
|
|
1956
|
-
`Failed to get motion state for ${this.motionGroupId}: ${
|
|
1956
|
+
`Failed to get motion state for ${this.motionGroupId}: ${l.data}`
|
|
1957
1957
|
);
|
|
1958
1958
|
Ut(
|
|
1959
1959
|
this.rapidlyChangingMotionState.joint_position,
|
|
1960
|
-
|
|
1960
|
+
d.joint_position,
|
|
1961
1961
|
Ot
|
|
1962
1962
|
) || D(() => {
|
|
1963
|
-
this.rapidlyChangingMotionState.joint_position =
|
|
1963
|
+
this.rapidlyChangingMotionState.joint_position = d.joint_position;
|
|
1964
1964
|
}), Ht(
|
|
1965
1965
|
this.rapidlyChangingMotionState,
|
|
1966
|
-
|
|
1966
|
+
d,
|
|
1967
1967
|
Ot
|
|
1968
1968
|
) || D(() => {
|
|
1969
|
-
var
|
|
1970
|
-
this.rapidlyChangingMotionState.tcp_pose == null ? this.rapidlyChangingMotionState.tcp_pose =
|
|
1971
|
-
position:
|
|
1969
|
+
var g, f, y;
|
|
1970
|
+
this.rapidlyChangingMotionState.tcp_pose == null ? this.rapidlyChangingMotionState.tcp_pose = d.tcp_pose : (g = d.tcp_pose) != null && g.orientation && ((f = d.tcp_pose) != null && f.position) && ((y = this.rapidlyChangingMotionState.tcp_pose) != null && y.orientation) ? this.rapidlyChangingMotionState.tcp_pose = {
|
|
1971
|
+
position: d.tcp_pose.position,
|
|
1972
1972
|
orientation: vo(
|
|
1973
|
-
|
|
1973
|
+
d.tcp_pose.orientation,
|
|
1974
1974
|
this.rapidlyChangingMotionState.tcp_pose.orientation
|
|
1975
1975
|
)
|
|
1976
1976
|
} : console.warn(
|
|
1977
1977
|
"Received incomplete tcp_pose, ignoring",
|
|
1978
|
-
|
|
1978
|
+
d.tcp_pose
|
|
1979
1979
|
);
|
|
1980
|
-
}),
|
|
1981
|
-
this.rapidlyChangingMotionState.tcp =
|
|
1982
|
-
}), this.rapidlyChangingMotionState.standstill !==
|
|
1983
|
-
this.rapidlyChangingMotionState.standstill =
|
|
1980
|
+
}), d.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== d.tcp && D(() => {
|
|
1981
|
+
this.rapidlyChangingMotionState.tcp = d.tcp;
|
|
1982
|
+
}), this.rapidlyChangingMotionState.standstill !== d.standstill && D(() => {
|
|
1983
|
+
this.rapidlyChangingMotionState.standstill = d.standstill;
|
|
1984
1984
|
});
|
|
1985
|
-
const
|
|
1986
|
-
|
|
1987
|
-
this.rapidlyChangingMotionState.joint_limit_reached =
|
|
1988
|
-
}), this.rapidlyChangingMotionState.execute !==
|
|
1989
|
-
this.rapidlyChangingMotionState.execute =
|
|
1985
|
+
const m = this.rapidlyChangingMotionState.joint_limit_reached.limit_reached, u = d.joint_limit_reached.limit_reached;
|
|
1986
|
+
m.some((g, f) => g !== u[f]) && D(() => {
|
|
1987
|
+
this.rapidlyChangingMotionState.joint_limit_reached = d.joint_limit_reached;
|
|
1988
|
+
}), this.rapidlyChangingMotionState.execute !== d.execute && D(() => {
|
|
1989
|
+
this.rapidlyChangingMotionState.execute = d.execute;
|
|
1990
1990
|
});
|
|
1991
1991
|
}), mt(this);
|
|
1992
1992
|
}
|
|
1993
|
-
static async open(t, o) {
|
|
1993
|
+
static async open(t, o, r = {}) {
|
|
1994
1994
|
var g;
|
|
1995
|
-
const
|
|
1996
|
-
|
|
1995
|
+
const i = r.cellId ?? "cell", [n, c] = o.split("@"), s = await t.api.controller.getCurrentRobotControllerState(
|
|
1996
|
+
i,
|
|
1997
|
+
c
|
|
1998
|
+
), l = s == null ? void 0 : s.motion_groups.find(
|
|
1999
|
+
(f) => f.motion_group === o
|
|
1997
2000
|
);
|
|
1998
|
-
if (!
|
|
2001
|
+
if (!s || !l)
|
|
1999
2002
|
throw new Error(
|
|
2000
|
-
`Controller ${
|
|
2003
|
+
`Controller ${c} or motion group ${o} not found`
|
|
2001
2004
|
);
|
|
2002
|
-
const
|
|
2003
|
-
`/
|
|
2004
|
-
),
|
|
2005
|
+
const d = t.openReconnectingWebsocket(
|
|
2006
|
+
`/cells/${i}/controllers/${c}/motion-groups/${o}/state-stream`
|
|
2007
|
+
), m = await d.firstMessage(), u = (g = W(m.data)) == null ? void 0 : g.result;
|
|
2005
2008
|
if (!u)
|
|
2006
2009
|
throw new Error(
|
|
2007
|
-
`Unable to parse initial motion state message ${
|
|
2010
|
+
`Unable to parse initial motion state message ${m.data}`
|
|
2008
2011
|
);
|
|
2009
2012
|
console.log(
|
|
2010
|
-
`Connected motion state websocket to motion group ${
|
|
2013
|
+
`Connected motion state websocket to motion group ${l.motion_group}. Initial state:
|
|
2011
2014
|
`,
|
|
2012
2015
|
u
|
|
2013
2016
|
);
|
|
2014
|
-
const
|
|
2017
|
+
const p = await t.api.motionGroup.getMotionGroupDescription(
|
|
2015
2018
|
i,
|
|
2016
|
-
c
|
|
2019
|
+
c,
|
|
2020
|
+
l.motion_group
|
|
2017
2021
|
);
|
|
2018
2022
|
return new ht(
|
|
2019
2023
|
t,
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2024
|
+
i,
|
|
2025
|
+
s,
|
|
2026
|
+
l,
|
|
2027
|
+
p,
|
|
2023
2028
|
u,
|
|
2024
|
-
|
|
2029
|
+
d
|
|
2025
2030
|
);
|
|
2026
2031
|
}
|
|
2027
2032
|
get motionGroupId() {
|
|
@@ -2062,7 +2067,13 @@ class ft {
|
|
|
2062
2067
|
* @returns Promise resolving to initialized JoggerConnection instance
|
|
2063
2068
|
*/
|
|
2064
2069
|
static async open(t, o, r = {}) {
|
|
2065
|
-
const i = await ht.open(
|
|
2070
|
+
const i = await ht.open(
|
|
2071
|
+
t,
|
|
2072
|
+
o,
|
|
2073
|
+
{
|
|
2074
|
+
cellId: r.cellId
|
|
2075
|
+
}
|
|
2076
|
+
), n = new ft(i, r);
|
|
2066
2077
|
return await n.setJoggingMode(n.mode), n;
|
|
2067
2078
|
}
|
|
2068
2079
|
getDefaultTcp(t) {
|
|
@@ -2080,6 +2091,9 @@ class ft {
|
|
|
2080
2091
|
get nova() {
|
|
2081
2092
|
return this.motionStream.nova;
|
|
2082
2093
|
}
|
|
2094
|
+
get cellId() {
|
|
2095
|
+
return this.motionStream.cellId;
|
|
2096
|
+
}
|
|
2083
2097
|
get numJoints() {
|
|
2084
2098
|
return this.motionStream.joints.length;
|
|
2085
2099
|
}
|
|
@@ -2129,9 +2143,9 @@ class ft {
|
|
|
2129
2143
|
);
|
|
2130
2144
|
}, this.timeout);
|
|
2131
2145
|
this.joggingSocket = this.nova.openReconnectingWebsocket(
|
|
2132
|
-
`/controllers/${this.motionStream.controllerId}/execution/jogging`
|
|
2146
|
+
`/cells/${this.cellId}/controllers/${this.motionStream.controllerId}/execution/jogging`
|
|
2133
2147
|
), this.joggingSocket.addEventListener("message", (i) => {
|
|
2134
|
-
var c, s, l,
|
|
2148
|
+
var c, s, l, d;
|
|
2135
2149
|
const n = W(i.data);
|
|
2136
2150
|
if (((c = n == null ? void 0 : n.result) == null ? void 0 : c.kind) === "INITIALIZE_RECEIVED") {
|
|
2137
2151
|
clearTimeout(r), t();
|
|
@@ -2139,7 +2153,7 @@ class ft {
|
|
|
2139
2153
|
}
|
|
2140
2154
|
if (((s = n == null ? void 0 : n.result) == null ? void 0 : s.kind) === "MOTION_ERROR")
|
|
2141
2155
|
if (clearTimeout(r), this.onBlocked && ((l = n == null ? void 0 : n.result) != null && l.message.includes(Dt))) {
|
|
2142
|
-
(
|
|
2156
|
+
(d = this.joggingSocket) == null || d.dispose(), this.onBlocked();
|
|
2143
2157
|
return;
|
|
2144
2158
|
} else this.onError ? this.onError(i.data) : o(new Error(i.data));
|
|
2145
2159
|
}), this.joggingSocket.sendJson({
|
|
@@ -2234,15 +2248,15 @@ class ft {
|
|
|
2234
2248
|
throw new Error(
|
|
2235
2249
|
"Current pose has no position, cannot perform translation"
|
|
2236
2250
|
);
|
|
2237
|
-
const
|
|
2238
|
-
|
|
2251
|
+
const b = [...t.position];
|
|
2252
|
+
b[tt[i]] += c.distanceMm * (n === "-" ? -1 : 1), s.push({
|
|
2239
2253
|
limits_override: {
|
|
2240
2254
|
tcp_velocity_limit: r
|
|
2241
2255
|
},
|
|
2242
2256
|
path: {
|
|
2243
2257
|
path_definition_name: "PathLine",
|
|
2244
2258
|
target_pose: {
|
|
2245
|
-
position:
|
|
2259
|
+
position: b,
|
|
2246
2260
|
orientation: t.orientation
|
|
2247
2261
|
}
|
|
2248
2262
|
}
|
|
@@ -2252,13 +2266,13 @@ class ft {
|
|
|
2252
2266
|
throw new Error(
|
|
2253
2267
|
"Current pose has no orientation, cannot perform rotation"
|
|
2254
2268
|
);
|
|
2255
|
-
const
|
|
2269
|
+
const b = new ct(
|
|
2256
2270
|
t.orientation[0],
|
|
2257
2271
|
t.orientation[1],
|
|
2258
2272
|
t.orientation[2]
|
|
2259
|
-
),
|
|
2273
|
+
), h = b.length(), v = b.clone().normalize(), x = c.distanceRads * (n === "-" ? -1 : 1), T = new ct(0, 0, 0);
|
|
2260
2274
|
T[i] = 1;
|
|
2261
|
-
const C = Math.cos(0.5 *
|
|
2275
|
+
const C = Math.cos(0.5 * x) * Math.cos(0.5 * h), M = Math.sin(0.5 * x) * Math.sin(0.5 * h), k = Math.sin(0.5 * x) * Math.cos(0.5 * h), j = Math.cos(0.5 * x) * Math.sin(0.5 * h), I = T.dot(
|
|
2262
2276
|
v
|
|
2263
2277
|
), E = T.clone().cross(v), V = 2 * Math.acos(C - M * I), Q = V / Math.sin(0.5 * V), ot = new ct().addScaledVector(E, M).addScaledVector(T, k).addScaledVector(v, j).multiplyScalar(Q);
|
|
2264
2278
|
s.push({
|
|
@@ -2281,35 +2295,36 @@ class ft {
|
|
|
2281
2295
|
);
|
|
2282
2296
|
return;
|
|
2283
2297
|
}
|
|
2284
|
-
const
|
|
2298
|
+
const d = {
|
|
2285
2299
|
motion_group_model: l.motion_group_model,
|
|
2286
2300
|
cycle_time: l.cycle_time,
|
|
2287
2301
|
mounting: l.mounting,
|
|
2288
2302
|
// tcp_offset: description.tcp_offset, TODO: implement tcp_offset handling
|
|
2289
2303
|
// FIXME use proper mode's limits if set
|
|
2290
2304
|
global: l.operation_limits.auto_limits
|
|
2291
|
-
},
|
|
2305
|
+
}, m = await this.nova.api.trajectoryPlanning.planTrajectory(
|
|
2306
|
+
this.cellId,
|
|
2292
2307
|
{
|
|
2293
|
-
motion_group_setup:
|
|
2308
|
+
motion_group_setup: d,
|
|
2294
2309
|
start_joint_position: o,
|
|
2295
2310
|
motion_commands: s
|
|
2296
2311
|
}
|
|
2297
|
-
),
|
|
2298
|
-
if (!
|
|
2312
|
+
), u = m.response;
|
|
2313
|
+
if (!u)
|
|
2299
2314
|
throw new Error(
|
|
2300
|
-
`Failed to plan jogging increment motion ${JSON.stringify(
|
|
2315
|
+
`Failed to plan jogging increment motion ${JSON.stringify(m)}`
|
|
2301
2316
|
);
|
|
2302
2317
|
this.trajectorySocket && (console.warn("Trajectory jogging websocket already open; will close"), this.trajectorySocket.dispose()), this.trajectorySocket = this.nova.openReconnectingWebsocket(
|
|
2303
|
-
`/controllers/${this.motionStream.controllerId}/execution/trajectory`
|
|
2318
|
+
`/cells/${this.cellId}/controllers/${this.motionStream.controllerId}/execution/trajectory`
|
|
2304
2319
|
);
|
|
2305
|
-
const
|
|
2306
|
-
var
|
|
2307
|
-
if (!
|
|
2320
|
+
const p = (b) => {
|
|
2321
|
+
var h;
|
|
2322
|
+
if (!b || b.add_trajectory_error || b.message)
|
|
2308
2323
|
if (this.onError)
|
|
2309
|
-
this.onError(
|
|
2324
|
+
this.onError(b);
|
|
2310
2325
|
else
|
|
2311
2326
|
throw new Error(
|
|
2312
|
-
((
|
|
2327
|
+
((h = b == null ? void 0 : b.add_trajectory_error) == null ? void 0 : h.message) || (b == null ? void 0 : b.message) || "Failed to execute trajectory, unknown error"
|
|
2313
2328
|
);
|
|
2314
2329
|
if (!this.trajectorySocket)
|
|
2315
2330
|
throw new Error(
|
|
@@ -2319,54 +2334,54 @@ class ft {
|
|
|
2319
2334
|
message_type: "StartMovementRequest",
|
|
2320
2335
|
direction: "DIRECTION_FORWARD"
|
|
2321
2336
|
});
|
|
2322
|
-
},
|
|
2323
|
-
var
|
|
2324
|
-
await at(() => !this.motionStream.rapidlyChangingMotionState.standstill), await at(() => this.motionStream.rapidlyChangingMotionState.standstill), (
|
|
2325
|
-
},
|
|
2326
|
-
var
|
|
2327
|
-
await at(() => this.motionStream.rapidlyChangingMotionState.standstill), (
|
|
2328
|
-
}, y = async (
|
|
2329
|
-
if (
|
|
2337
|
+
}, g = async () => {
|
|
2338
|
+
var b;
|
|
2339
|
+
await at(() => !this.motionStream.rapidlyChangingMotionState.standstill), await at(() => this.motionStream.rapidlyChangingMotionState.standstill), (b = this.trajectorySocket) == null || b.dispose(), this.trajectorySocket = null;
|
|
2340
|
+
}, f = async () => {
|
|
2341
|
+
var b;
|
|
2342
|
+
await at(() => this.motionStream.rapidlyChangingMotionState.standstill), (b = this.trajectorySocket) == null || b.dispose(), this.trajectorySocket = null;
|
|
2343
|
+
}, y = async (b) => {
|
|
2344
|
+
if (b != null && b.message)
|
|
2330
2345
|
if (this.onError) {
|
|
2331
|
-
this.onError(
|
|
2346
|
+
this.onError(b);
|
|
2332
2347
|
return;
|
|
2333
2348
|
} else
|
|
2334
2349
|
throw new Error(
|
|
2335
|
-
|
|
2350
|
+
b.message || "Failed to execute trajectory, unknown error"
|
|
2336
2351
|
);
|
|
2337
|
-
this.motionStream.rapidlyChangingMotionState.standstill ? await
|
|
2352
|
+
this.motionStream.rapidlyChangingMotionState.standstill ? await g() : await f();
|
|
2338
2353
|
};
|
|
2339
|
-
this.trajectorySocket.addEventListener("message", (
|
|
2340
|
-
var v,
|
|
2341
|
-
const
|
|
2342
|
-
if (!((v =
|
|
2354
|
+
this.trajectorySocket.addEventListener("message", (b) => {
|
|
2355
|
+
var v, x;
|
|
2356
|
+
const h = W(b.data);
|
|
2357
|
+
if (!((v = h == null ? void 0 : h.result) != null && v.kind))
|
|
2343
2358
|
throw new Error(
|
|
2344
|
-
`Failed to execute trajectory: Received invalid message ${
|
|
2359
|
+
`Failed to execute trajectory: Received invalid message ${b.data}`
|
|
2345
2360
|
);
|
|
2346
|
-
if (this.onBlocked && ((
|
|
2361
|
+
if (this.onBlocked && ((x = h.result.message) != null && x.includes(Dt))) {
|
|
2347
2362
|
this.onBlocked();
|
|
2348
2363
|
return;
|
|
2349
2364
|
}
|
|
2350
|
-
if (
|
|
2351
|
-
|
|
2352
|
-
else if (
|
|
2353
|
-
y(
|
|
2354
|
-
else if (
|
|
2365
|
+
if (h.result.kind === "INITIALIZE_RECEIVED")
|
|
2366
|
+
p(h.result);
|
|
2367
|
+
else if (h.result.kind === "START_RECEIVED")
|
|
2368
|
+
y(h);
|
|
2369
|
+
else if (h.result.kind !== "PAUSE_RECEIVED") if (h.result.kind === "MOTION_ERROR" && h.result.message)
|
|
2355
2370
|
if (this.onError) {
|
|
2356
|
-
this.onError(
|
|
2371
|
+
this.onError(h);
|
|
2357
2372
|
return;
|
|
2358
2373
|
} else
|
|
2359
|
-
throw new Error(
|
|
2374
|
+
throw new Error(h.result.message);
|
|
2360
2375
|
else
|
|
2361
2376
|
throw new Error(
|
|
2362
|
-
`Failed to execute trajectory, cannot handle message type "${
|
|
2377
|
+
`Failed to execute trajectory, cannot handle message type "${h.result.kind}"`
|
|
2363
2378
|
);
|
|
2364
2379
|
}), this.trajectorySocket.sendJson({
|
|
2365
2380
|
message_type: "InitializeMovementRequest",
|
|
2366
2381
|
trajectory: {
|
|
2367
2382
|
message_type: "TrajectoryData",
|
|
2368
2383
|
motion_group: this.motionGroupId,
|
|
2369
|
-
data:
|
|
2384
|
+
data: u,
|
|
2370
2385
|
tcp: this.tcp
|
|
2371
2386
|
}
|
|
2372
2387
|
});
|
|
@@ -2546,18 +2561,18 @@ class bt {
|
|
|
2546
2561
|
constructor(t, o, r, i, n) {
|
|
2547
2562
|
var c, s, l;
|
|
2548
2563
|
this.jogger = t, this.coordSystems = o, this.motionGroupDescription = r, this.tcps = i, this.inverseSolverValue = n, this.selectedTabId = "cartesian", this.locks = /* @__PURE__ */ new Set(), this.blocked = !1, this.selectedCoordSystemId = "world", this.selectedTcpId = "", this.tcpChangeInProgress = !1, this.selectedOrientation = "coordsys", this.selectedIncrementId = "continuous", this.selectedCartesianMotionType = "translate", this.incrementJogInProgress = null, this.translationVelocityMmPerSec = 10, this.rotationVelocityDegPerSec = 1, this.minTranslationVelocityMmPerSec = 5, this.maxTranslationVelocityMmPerSec = 250, this.minRotationVelocityDegPerSec = 1, this.maxRotationVelocityDegPerSec = 60, this.showCoordSystemSelect = !1, this.showTcpSelect = !0, this.showOrientationSelect = !0, this.showIncrementSelect = !0, this.showTabIcons = !1, this.showVelocitySliderLabel = !0, this.showVelocityLegend = !1, this.showJointsLegend = !1, this.disposers = [], this.inverseSolver = void 0, this.jointType = G.RevoluteJoint;
|
|
2549
|
-
for (const
|
|
2550
|
-
if (
|
|
2551
|
-
|
|
2564
|
+
for (const d of o)
|
|
2565
|
+
if (d.coordinate_system === "") {
|
|
2566
|
+
d.coordinate_system = "world";
|
|
2552
2567
|
break;
|
|
2553
2568
|
}
|
|
2554
2569
|
this.selectedCoordSystemId = ((c = o[0]) == null ? void 0 : c.coordinate_system) || "world", this.selectedTcpId = t.motionStream.rapidlyChangingMotionState.tcp ?? "", this.tcpChangeInProgress = this.tcps.length > 0 && !this.selectedTcpId, this.inverseSolver = n, this.jointType = ((l = (s = r == null ? void 0 : r.dh_parameters) == null ? void 0 : s[0]) == null ? void 0 : l.type) ?? G.RevoluteJoint, mt(this, {}, { autoBind: !0 }), this.jogger.onBlocked = () => {
|
|
2555
2570
|
this.block();
|
|
2556
2571
|
}, this.loadFromLocalStorage(), this.disposers.push(kt(() => this.saveToLocalStorage())), this.disposers.push(
|
|
2557
2572
|
kt(() => {
|
|
2558
|
-
const
|
|
2559
|
-
|
|
2560
|
-
this.selectedTcpId =
|
|
2573
|
+
const d = this.jogger.motionStream.rapidlyChangingMotionState.tcp;
|
|
2574
|
+
d && d !== this.selectedTcpId && D(() => {
|
|
2575
|
+
this.selectedTcpId = d, this.tcpChangeInProgress = !1;
|
|
2561
2576
|
});
|
|
2562
2577
|
})
|
|
2563
2578
|
), window.joggingStore = this;
|
|
@@ -2567,31 +2582,33 @@ class bt {
|
|
|
2567
2582
|
* from the backend
|
|
2568
2583
|
*/
|
|
2569
2584
|
static async loadFor(t) {
|
|
2570
|
-
const { nova: o } = t, [
|
|
2585
|
+
const { nova: o, cellId: r } = t, [i, n] = await Promise.all([
|
|
2571
2586
|
// Fetch coord systems so user can select between them
|
|
2572
2587
|
o.api.controller.listCoordinateSystems(
|
|
2588
|
+
r,
|
|
2573
2589
|
t.motionStream.controllerId,
|
|
2574
2590
|
"ROTATION_VECTOR"
|
|
2575
2591
|
),
|
|
2576
2592
|
// Same for TCPs and other info from description
|
|
2577
2593
|
o.api.motionGroup.getMotionGroupDescription(
|
|
2594
|
+
r,
|
|
2578
2595
|
t.motionStream.controllerId,
|
|
2579
2596
|
t.motionGroupId
|
|
2580
2597
|
)
|
|
2581
|
-
]),
|
|
2582
|
-
|
|
2583
|
-
),
|
|
2584
|
-
id:
|
|
2585
|
-
readable_name:
|
|
2586
|
-
position:
|
|
2587
|
-
orientation:
|
|
2598
|
+
]), c = await o.api.motionGroupModels.getMotionGroupKinematicModel(
|
|
2599
|
+
n.motion_group_model
|
|
2600
|
+
), s = Object.entries(n.tcps || {}).map(([l, d]) => ({
|
|
2601
|
+
id: l,
|
|
2602
|
+
readable_name: d.name,
|
|
2603
|
+
position: d.pose.position,
|
|
2604
|
+
orientation: d.pose.orientation
|
|
2588
2605
|
}));
|
|
2589
2606
|
return new bt(
|
|
2590
2607
|
t,
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2608
|
+
i || [],
|
|
2609
|
+
n,
|
|
2610
|
+
s,
|
|
2611
|
+
c.inverse_solver
|
|
2595
2612
|
);
|
|
2596
2613
|
}
|
|
2597
2614
|
dispose() {
|
|
@@ -2928,8 +2945,8 @@ const Ro = J(
|
|
|
2928
2945
|
}), Eo = J((e) => {
|
|
2929
2946
|
var n, c, s;
|
|
2930
2947
|
const t = B(), { store: o } = e, { t: r } = z();
|
|
2931
|
-
function i(l,
|
|
2932
|
-
|
|
2948
|
+
function i(l, d) {
|
|
2949
|
+
d === e.velocity || !Ge(d) || e.onVelocityChange(d, e.useDegree);
|
|
2933
2950
|
}
|
|
2934
2951
|
return /* @__PURE__ */ S(
|
|
2935
2952
|
P,
|
|
@@ -3086,29 +3103,29 @@ const Zt = J(
|
|
|
3086
3103
|
children: t
|
|
3087
3104
|
}) => {
|
|
3088
3105
|
const { t: o } = z(), r = B();
|
|
3089
|
-
function i(
|
|
3090
|
-
(
|
|
3106
|
+
function i(p, g) {
|
|
3107
|
+
(g === "translate" || g === "rotate") && e.setSelectedCartesianMotionType(g);
|
|
3091
3108
|
}
|
|
3092
|
-
async function n(
|
|
3093
|
-
const
|
|
3109
|
+
async function n(p, g) {
|
|
3110
|
+
const f = await e.activate(), y = f.motionStream.rapidlyChangingMotionState.tcp_pose, b = f.motionStream.rapidlyChangingMotionState.joint_position;
|
|
3094
3111
|
y && await e.withMotionLock(async () => {
|
|
3095
3112
|
try {
|
|
3096
3113
|
e.setCurrentIncrementJog({
|
|
3097
|
-
axis:
|
|
3098
|
-
direction:
|
|
3114
|
+
axis: p.axis,
|
|
3115
|
+
direction: p.direction
|
|
3099
3116
|
}), await e.jogger.runIncrementalCartesianMotion({
|
|
3100
3117
|
currentTcpPose: y,
|
|
3101
|
-
currentJoints:
|
|
3118
|
+
currentJoints: b,
|
|
3102
3119
|
coordSystemId: e.activeCoordSystemId,
|
|
3103
3120
|
velocityInRelevantUnits: e.selectedCartesianMotionType === "translate" ? e.translationVelocityMmPerSec : e.rotationVelocityRadsPerSec,
|
|
3104
|
-
axis:
|
|
3105
|
-
direction:
|
|
3121
|
+
axis: p.axis,
|
|
3122
|
+
direction: p.direction,
|
|
3106
3123
|
motion: e.selectedCartesianMotionType === "translate" ? {
|
|
3107
3124
|
type: "translate",
|
|
3108
|
-
distanceMm:
|
|
3125
|
+
distanceMm: g.mm
|
|
3109
3126
|
} : {
|
|
3110
3127
|
type: "rotate",
|
|
3111
|
-
distanceRads: Ie(
|
|
3128
|
+
distanceRads: Ie(g.degrees)
|
|
3112
3129
|
}
|
|
3113
3130
|
});
|
|
3114
3131
|
} finally {
|
|
@@ -3116,17 +3133,17 @@ const Zt = J(
|
|
|
3116
3133
|
}
|
|
3117
3134
|
});
|
|
3118
3135
|
}
|
|
3119
|
-
async function c(
|
|
3136
|
+
async function c(p) {
|
|
3120
3137
|
if (!e.isLocked) {
|
|
3121
3138
|
if (await e.activate(), e.activeDiscreteIncrement)
|
|
3122
|
-
return n(
|
|
3123
|
-
|
|
3124
|
-
axis:
|
|
3125
|
-
direction:
|
|
3139
|
+
return n(p, e.activeDiscreteIncrement);
|
|
3140
|
+
p.motionType === "translate" ? await e.jogger.translateTCP({
|
|
3141
|
+
axis: p.axis,
|
|
3142
|
+
direction: p.direction,
|
|
3126
3143
|
velocityMmPerSec: e.translationVelocityMmPerSec
|
|
3127
3144
|
}) : await e.jogger.rotateTCP({
|
|
3128
|
-
axis:
|
|
3129
|
-
direction:
|
|
3145
|
+
axis: p.axis,
|
|
3146
|
+
direction: p.direction,
|
|
3130
3147
|
velocityRadsPerSec: e.rotationVelocityRadsPerSec
|
|
3131
3148
|
});
|
|
3132
3149
|
}
|
|
@@ -3134,13 +3151,13 @@ const Zt = J(
|
|
|
3134
3151
|
async function s() {
|
|
3135
3152
|
e.isLocked || e.activeDiscreteIncrement || await e.deactivate();
|
|
3136
3153
|
}
|
|
3137
|
-
function l(
|
|
3138
|
-
var
|
|
3139
|
-
const y = (v = (
|
|
3154
|
+
function l(p, g, f) {
|
|
3155
|
+
var b, h, v;
|
|
3156
|
+
const y = (v = (h = (b = f.componentsExt) == null ? void 0 : b.JoggingPanel) == null ? void 0 : h.JoggingCartesian) == null ? void 0 : v.Axis;
|
|
3140
3157
|
if (y)
|
|
3141
|
-
return
|
|
3158
|
+
return g === "translate" ? y[p] : y.CustomRotation ?? y[p];
|
|
3142
3159
|
}
|
|
3143
|
-
const
|
|
3160
|
+
const d = [
|
|
3144
3161
|
{
|
|
3145
3162
|
id: "x",
|
|
3146
3163
|
icon: /* @__PURE__ */ a(Oe, {}),
|
|
@@ -3157,12 +3174,12 @@ const Zt = J(
|
|
|
3157
3174
|
colors: l("Z", e.selectedCartesianMotionType, r)
|
|
3158
3175
|
}
|
|
3159
3176
|
];
|
|
3160
|
-
function
|
|
3161
|
-
return o("General.mm.variable", { amount:
|
|
3177
|
+
function m(p) {
|
|
3178
|
+
return o("General.mm.variable", { amount: p.toFixed(1) });
|
|
3162
3179
|
}
|
|
3163
|
-
function
|
|
3180
|
+
function u(p) {
|
|
3164
3181
|
return o("General.degree.variable", {
|
|
3165
|
-
amount: Nt(
|
|
3182
|
+
amount: Nt(p).toFixed(1)
|
|
3166
3183
|
});
|
|
3167
3184
|
}
|
|
3168
3185
|
return /* @__PURE__ */ S(
|
|
@@ -3221,55 +3238,55 @@ const Zt = J(
|
|
|
3221
3238
|
]
|
|
3222
3239
|
}
|
|
3223
3240
|
),
|
|
3224
|
-
e.selectedCartesianMotionType === "translate" &&
|
|
3225
|
-
var
|
|
3241
|
+
e.selectedCartesianMotionType === "translate" && d.map((p) => {
|
|
3242
|
+
var g, f;
|
|
3226
3243
|
return /* @__PURE__ */ a(
|
|
3227
3244
|
Pt,
|
|
3228
3245
|
{
|
|
3229
|
-
"data-testid": `jogging-cartesian-axis-control-${
|
|
3230
|
-
"aria-label": `jogging-cartesian-axis-control-${
|
|
3231
|
-
colors:
|
|
3246
|
+
"data-testid": `jogging-cartesian-axis-control-${p.id}`,
|
|
3247
|
+
"aria-label": `jogging-cartesian-axis-control-${p.id}`,
|
|
3248
|
+
colors: p.colors,
|
|
3232
3249
|
disabled: e.isLocked,
|
|
3233
|
-
activeJoggingDirection: ((
|
|
3250
|
+
activeJoggingDirection: ((g = e.incrementJogInProgress) == null ? void 0 : g.axis) === p.id ? e.incrementJogInProgress.direction : void 0,
|
|
3234
3251
|
label: /* @__PURE__ */ S(et, { children: [
|
|
3235
|
-
|
|
3252
|
+
p.icon,
|
|
3236
3253
|
/* @__PURE__ */ a(
|
|
3237
3254
|
R,
|
|
3238
3255
|
{
|
|
3239
3256
|
sx: {
|
|
3240
3257
|
fontSize: "24px",
|
|
3241
|
-
color: ((
|
|
3258
|
+
color: ((f = p.colors) == null ? void 0 : f.labelColor) ?? r.palette.text.primary
|
|
3242
3259
|
},
|
|
3243
|
-
children:
|
|
3260
|
+
children: p.id.toUpperCase()
|
|
3244
3261
|
}
|
|
3245
3262
|
)
|
|
3246
3263
|
] }),
|
|
3247
3264
|
getDisplayedValue: () => {
|
|
3248
|
-
var y,
|
|
3249
|
-
return
|
|
3250
|
-
((
|
|
3265
|
+
var y, b;
|
|
3266
|
+
return m(
|
|
3267
|
+
((b = (y = e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : y.position) == null ? void 0 : b[tt[p.id]]) || 0
|
|
3251
3268
|
);
|
|
3252
3269
|
},
|
|
3253
3270
|
startJogging: (y) => c({
|
|
3254
|
-
axis:
|
|
3271
|
+
axis: p.id,
|
|
3255
3272
|
motionType: "translate",
|
|
3256
3273
|
direction: y
|
|
3257
3274
|
}),
|
|
3258
3275
|
stopJogging: s
|
|
3259
3276
|
},
|
|
3260
|
-
|
|
3277
|
+
p.id
|
|
3261
3278
|
);
|
|
3262
3279
|
}),
|
|
3263
|
-
e.selectedCartesianMotionType === "rotate" &&
|
|
3264
|
-
var
|
|
3280
|
+
e.selectedCartesianMotionType === "rotate" && d.map((p) => {
|
|
3281
|
+
var g, f;
|
|
3265
3282
|
return /* @__PURE__ */ a(
|
|
3266
3283
|
Pt,
|
|
3267
3284
|
{
|
|
3268
|
-
"data-testid": `jogging-cartesian-axis-control-${
|
|
3269
|
-
"aria-label": `jogging-cartesian-axis-control-${
|
|
3270
|
-
colors:
|
|
3285
|
+
"data-testid": `jogging-cartesian-axis-control-${p.id}`,
|
|
3286
|
+
"aria-label": `jogging-cartesian-axis-control-${p.id}`,
|
|
3287
|
+
colors: p.colors,
|
|
3271
3288
|
disabled: e.isLocked,
|
|
3272
|
-
activeJoggingDirection: ((
|
|
3289
|
+
activeJoggingDirection: ((g = e.incrementJogInProgress) == null ? void 0 : g.axis) === p.id ? e.incrementJogInProgress.direction : void 0,
|
|
3273
3290
|
label: /* @__PURE__ */ S(et, { children: [
|
|
3274
3291
|
/* @__PURE__ */ a(Je, {}),
|
|
3275
3292
|
/* @__PURE__ */ a(
|
|
@@ -3277,26 +3294,26 @@ const Zt = J(
|
|
|
3277
3294
|
{
|
|
3278
3295
|
sx: {
|
|
3279
3296
|
fontSize: "24px",
|
|
3280
|
-
color: ((
|
|
3297
|
+
color: ((f = p.colors) == null ? void 0 : f.labelColor) ?? r.palette.text.primary
|
|
3281
3298
|
},
|
|
3282
|
-
children:
|
|
3299
|
+
children: p.id.toUpperCase()
|
|
3283
3300
|
}
|
|
3284
3301
|
)
|
|
3285
3302
|
] }),
|
|
3286
3303
|
getDisplayedValue: () => {
|
|
3287
|
-
var y,
|
|
3288
|
-
return
|
|
3289
|
-
((
|
|
3304
|
+
var y, b;
|
|
3305
|
+
return u(
|
|
3306
|
+
((b = (y = e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : y.orientation) == null ? void 0 : b[tt[p.id]]) || 0
|
|
3290
3307
|
);
|
|
3291
3308
|
},
|
|
3292
3309
|
startJogging: (y) => c({
|
|
3293
|
-
axis:
|
|
3310
|
+
axis: p.id,
|
|
3294
3311
|
motionType: "rotate",
|
|
3295
3312
|
direction: y
|
|
3296
3313
|
}),
|
|
3297
3314
|
stopJogging: s
|
|
3298
3315
|
},
|
|
3299
|
-
|
|
3316
|
+
p.id
|
|
3300
3317
|
);
|
|
3301
3318
|
})
|
|
3302
3319
|
]
|
|
@@ -3358,8 +3375,8 @@ const Zt = J(
|
|
|
3358
3375
|
alignItems: "center",
|
|
3359
3376
|
gap: "24px",
|
|
3360
3377
|
children: e.jogger.motionStream.joints.map((n) => {
|
|
3361
|
-
var s, l,
|
|
3362
|
-
const c = (
|
|
3378
|
+
var s, l, d;
|
|
3379
|
+
const c = (d = (l = (s = e.motionGroupDescription.operation_limits.auto_limits) == null ? void 0 : s.joints) == null ? void 0 : l[n.index]) == null ? void 0 : d.position;
|
|
3363
3380
|
return /* @__PURE__ */ S(
|
|
3364
3381
|
P,
|
|
3365
3382
|
{
|
|
@@ -3386,12 +3403,12 @@ const Zt = J(
|
|
|
3386
3403
|
upperLimit: c == null ? void 0 : c.upper_limit,
|
|
3387
3404
|
useDegree: e.jointType === G.RevoluteJoint,
|
|
3388
3405
|
getValue: () => {
|
|
3389
|
-
const
|
|
3390
|
-
return
|
|
3406
|
+
const m = e.jogger.motionStream.rapidlyChangingMotionState.joint_position[n.index];
|
|
3407
|
+
return m !== void 0 ? m : void 0;
|
|
3391
3408
|
},
|
|
3392
|
-
startJogging: (
|
|
3409
|
+
startJogging: (m) => r({
|
|
3393
3410
|
joint: n.index,
|
|
3394
|
-
direction:
|
|
3411
|
+
direction: m
|
|
3395
3412
|
}),
|
|
3396
3413
|
stopJogging: i
|
|
3397
3414
|
}
|
|
@@ -3427,7 +3444,13 @@ const Zt = J(
|
|
|
3427
3444
|
try {
|
|
3428
3445
|
let i = e.store;
|
|
3429
3446
|
if (!i) {
|
|
3430
|
-
const n = await ft.open(
|
|
3447
|
+
const n = await ft.open(
|
|
3448
|
+
t,
|
|
3449
|
+
e.motionGroupId,
|
|
3450
|
+
{
|
|
3451
|
+
cellId: e.cellId
|
|
3452
|
+
}
|
|
3453
|
+
);
|
|
3431
3454
|
i = await bt.loadFor(n);
|
|
3432
3455
|
}
|
|
3433
3456
|
D(() => {
|
|
@@ -3440,7 +3463,7 @@ const Zt = J(
|
|
|
3440
3463
|
return F(() => (r(), e.store ? () => null : () => {
|
|
3441
3464
|
var i;
|
|
3442
3465
|
(i = o.joggingStore) == null || i.dispose();
|
|
3443
|
-
}), [e.store, e.nova, e.motionGroupId]), F(() => {
|
|
3466
|
+
}), [e.store, e.nova, e.motionGroupId, e.cellId]), F(() => {
|
|
3444
3467
|
const i = o.joggingStore;
|
|
3445
3468
|
i && (e.locked ? i.lock("external") : i.unlock("external"));
|
|
3446
3469
|
}, [o.joggingStore, e.locked]), /* @__PURE__ */ a(
|
|
@@ -3520,10 +3543,10 @@ const Zt = J(
|
|
|
3520
3543
|
return await navigator.clipboard.writeText(t), console.log("Copied!"), n(!0), !0;
|
|
3521
3544
|
} catch (l) {
|
|
3522
3545
|
console.error(l);
|
|
3523
|
-
const
|
|
3524
|
-
if (
|
|
3525
|
-
const
|
|
3526
|
-
|
|
3546
|
+
const d = window.getSelection();
|
|
3547
|
+
if (d && o && "current" in o && o.current) {
|
|
3548
|
+
const m = document.createRange();
|
|
3549
|
+
m.selectNodeContents(o.current), d.removeAllRanges(), d.addRange(m);
|
|
3527
3550
|
}
|
|
3528
3551
|
}
|
|
3529
3552
|
return !1;
|
|
@@ -3672,24 +3695,24 @@ const st = (e, t, o) => ({
|
|
|
3672
3695
|
level: t
|
|
3673
3696
|
}), fi = (e, t) => st(e, "debug", t), bi = (e, t) => st(e, "info", t), xi = (e, t) => st(e, "warning", t), yi = (e, t) => st(e, "error", t), Ao = $(
|
|
3674
3697
|
J((e) => {
|
|
3675
|
-
var
|
|
3698
|
+
var m;
|
|
3676
3699
|
const { messages: t = [], onClear: o, height: r = 400, sx: i } = e, n = B(), c = A(null);
|
|
3677
3700
|
F(() => {
|
|
3678
3701
|
if (t.length === 0) return;
|
|
3679
|
-
const
|
|
3680
|
-
if (!
|
|
3681
|
-
const
|
|
3682
|
-
|
|
3702
|
+
const u = c.current;
|
|
3703
|
+
if (!u) return;
|
|
3704
|
+
const p = setTimeout(() => {
|
|
3705
|
+
u.scrollTop = u.scrollHeight;
|
|
3683
3706
|
}, 10);
|
|
3684
|
-
return () => clearTimeout(
|
|
3707
|
+
return () => clearTimeout(p);
|
|
3685
3708
|
}, [t.length]);
|
|
3686
|
-
const s = (
|
|
3709
|
+
const s = (u) => u.toLocaleTimeString("en-US", {
|
|
3687
3710
|
hour12: !1,
|
|
3688
3711
|
hour: "2-digit",
|
|
3689
3712
|
minute: "2-digit",
|
|
3690
3713
|
second: "2-digit"
|
|
3691
|
-
}), l = (
|
|
3692
|
-
switch (
|
|
3714
|
+
}), l = (u) => {
|
|
3715
|
+
switch (u) {
|
|
3693
3716
|
case "error":
|
|
3694
3717
|
return n.palette.error.main;
|
|
3695
3718
|
case "warning":
|
|
@@ -3701,19 +3724,19 @@ const st = (e, t, o) => ({
|
|
|
3701
3724
|
default:
|
|
3702
3725
|
return n.palette.text.secondary;
|
|
3703
3726
|
}
|
|
3704
|
-
},
|
|
3705
|
-
const [
|
|
3727
|
+
}, d = ({ message: u }) => {
|
|
3728
|
+
const [p, g] = L(!1), [f, y] = L(!1), [b, h] = L(!1), v = u.message.length > 150, x = async () => {
|
|
3706
3729
|
try {
|
|
3707
|
-
await navigator.clipboard.writeText(
|
|
3730
|
+
await navigator.clipboard.writeText(u.message), y(!0), setTimeout(() => y(!1), 2e3);
|
|
3708
3731
|
} catch (C) {
|
|
3709
3732
|
console.error("Failed to copy message:", C);
|
|
3710
3733
|
}
|
|
3711
|
-
}, T = v && !
|
|
3734
|
+
}, T = v && !p ? `${u.message.substring(0, 150)}...` : u.message;
|
|
3712
3735
|
return /* @__PURE__ */ a(
|
|
3713
3736
|
w,
|
|
3714
3737
|
{
|
|
3715
|
-
onMouseEnter: () =>
|
|
3716
|
-
onMouseLeave: () =>
|
|
3738
|
+
onMouseEnter: () => h(!0),
|
|
3739
|
+
onMouseLeave: () => h(!1),
|
|
3717
3740
|
sx: {
|
|
3718
3741
|
display: "flex",
|
|
3719
3742
|
gap: 1,
|
|
@@ -3742,7 +3765,7 @@ const st = (e, t, o) => ({
|
|
|
3742
3765
|
},
|
|
3743
3766
|
children: [
|
|
3744
3767
|
"[",
|
|
3745
|
-
s(
|
|
3768
|
+
s(u.timestamp),
|
|
3746
3769
|
"]"
|
|
3747
3770
|
]
|
|
3748
3771
|
}
|
|
@@ -3756,7 +3779,7 @@ const st = (e, t, o) => ({
|
|
|
3756
3779
|
fontSize: "12px",
|
|
3757
3780
|
lineHeight: "18px",
|
|
3758
3781
|
letterSpacing: "0.4px",
|
|
3759
|
-
color: l(
|
|
3782
|
+
color: l(u.level),
|
|
3760
3783
|
wordBreak: "break-word",
|
|
3761
3784
|
overflowWrap: "anywhere",
|
|
3762
3785
|
hyphens: "auto",
|
|
@@ -3773,16 +3796,16 @@ const st = (e, t, o) => ({
|
|
|
3773
3796
|
display: "flex",
|
|
3774
3797
|
alignItems: "flex-start",
|
|
3775
3798
|
gap: 0.5,
|
|
3776
|
-
opacity:
|
|
3799
|
+
opacity: b ? 1 : 0,
|
|
3777
3800
|
transition: "opacity 0.2s ease-in-out",
|
|
3778
|
-
visibility:
|
|
3801
|
+
visibility: b ? "visible" : "hidden"
|
|
3779
3802
|
},
|
|
3780
3803
|
children: [
|
|
3781
3804
|
/* @__PURE__ */ a(
|
|
3782
3805
|
q,
|
|
3783
3806
|
{
|
|
3784
3807
|
size: "small",
|
|
3785
|
-
onClick:
|
|
3808
|
+
onClick: x,
|
|
3786
3809
|
sx: {
|
|
3787
3810
|
padding: "2px",
|
|
3788
3811
|
color: n.palette.text.secondary,
|
|
@@ -3790,7 +3813,7 @@ const st = (e, t, o) => ({
|
|
|
3790
3813
|
backgroundColor: n.palette.action.hover
|
|
3791
3814
|
}
|
|
3792
3815
|
},
|
|
3793
|
-
title:
|
|
3816
|
+
title: f ? "Copied!" : "Copy message",
|
|
3794
3817
|
children: /* @__PURE__ */ a(Ze, { sx: { fontSize: 12 } })
|
|
3795
3818
|
}
|
|
3796
3819
|
),
|
|
@@ -3798,7 +3821,7 @@ const st = (e, t, o) => ({
|
|
|
3798
3821
|
q,
|
|
3799
3822
|
{
|
|
3800
3823
|
size: "small",
|
|
3801
|
-
onClick: () =>
|
|
3824
|
+
onClick: () => g(!p),
|
|
3802
3825
|
sx: {
|
|
3803
3826
|
padding: "2px",
|
|
3804
3827
|
color: n.palette.text.secondary,
|
|
@@ -3806,8 +3829,8 @@ const st = (e, t, o) => ({
|
|
|
3806
3829
|
backgroundColor: n.palette.action.hover
|
|
3807
3830
|
}
|
|
3808
3831
|
},
|
|
3809
|
-
title:
|
|
3810
|
-
children:
|
|
3832
|
+
title: p ? "Collapse" : "Expand",
|
|
3833
|
+
children: p ? /* @__PURE__ */ a(Xe, { sx: { fontSize: 12 } }) : /* @__PURE__ */ a(Ke, { sx: { fontSize: 12 } })
|
|
3811
3834
|
}
|
|
3812
3835
|
)
|
|
3813
3836
|
]
|
|
@@ -3815,14 +3838,14 @@ const st = (e, t, o) => ({
|
|
|
3815
3838
|
)
|
|
3816
3839
|
] })
|
|
3817
3840
|
},
|
|
3818
|
-
|
|
3841
|
+
u.id
|
|
3819
3842
|
);
|
|
3820
3843
|
};
|
|
3821
3844
|
return /* @__PURE__ */ S(
|
|
3822
3845
|
to,
|
|
3823
3846
|
{
|
|
3824
3847
|
sx: {
|
|
3825
|
-
backgroundColor: ((
|
|
3848
|
+
backgroundColor: ((m = n.palette.backgroundPaperElevation) == null ? void 0 : m[2]) || "#171927",
|
|
3826
3849
|
backgroundImage: "none",
|
|
3827
3850
|
// Override any gradient from elevation
|
|
3828
3851
|
height: r,
|
|
@@ -3932,7 +3955,7 @@ const st = (e, t, o) => ({
|
|
|
3932
3955
|
},
|
|
3933
3956
|
children: "No log messages"
|
|
3934
3957
|
}
|
|
3935
|
-
) : t.map((
|
|
3958
|
+
) : t.map((u) => /* @__PURE__ */ a(d, { message: u }, u.id))
|
|
3936
3959
|
}
|
|
3937
3960
|
)
|
|
3938
3961
|
]
|
|
@@ -4045,41 +4068,41 @@ var Kt = /* @__PURE__ */ ((e) => (e.PRECONDITION_NOT_FULFILLED = "PRECONDITION_N
|
|
|
4045
4068
|
const Fo = $(
|
|
4046
4069
|
J(({ setupState: e, className: t }) => {
|
|
4047
4070
|
const o = B(), { t: r } = z(), i = () => {
|
|
4048
|
-
var
|
|
4071
|
+
var d, m, u, p, g, f, y;
|
|
4049
4072
|
switch (e) {
|
|
4050
4073
|
case "READY":
|
|
4051
4074
|
return {
|
|
4052
4075
|
label: r("RobotSetupReadinessIndicator.Ready.lb"),
|
|
4053
|
-
indicatorColor: ((
|
|
4054
|
-
backgroundColor: ((
|
|
4076
|
+
indicatorColor: ((d = o.palette.tertiary) == null ? void 0 : d.main) || o.palette.primary.main,
|
|
4077
|
+
backgroundColor: ((m = o.palette.backgroundPaperElevation) == null ? void 0 : m[11]) || o.palette.background.paper,
|
|
4055
4078
|
textColor: o.palette.secondary.contrastText
|
|
4056
4079
|
};
|
|
4057
4080
|
case "ROBOT_DISCONNECTED":
|
|
4058
4081
|
return {
|
|
4059
4082
|
label: r("RobotSetupReadinessIndicator.RobotDisconnected.lb"),
|
|
4060
4083
|
indicatorColor: o.palette.error.main,
|
|
4061
|
-
backgroundColor: ((
|
|
4084
|
+
backgroundColor: ((u = o.palette.backgroundPaperElevation) == null ? void 0 : u[11]) || o.palette.background.paper,
|
|
4062
4085
|
textColor: o.palette.secondary.contrastText
|
|
4063
4086
|
};
|
|
4064
4087
|
case "CELL_OPEN":
|
|
4065
4088
|
return {
|
|
4066
4089
|
label: r("RobotSetupReadinessIndicator.CellOpen.lb"),
|
|
4067
4090
|
indicatorColor: o.palette.error.main,
|
|
4068
|
-
backgroundColor: ((
|
|
4091
|
+
backgroundColor: ((p = o.palette.backgroundPaperElevation) == null ? void 0 : p[11]) || o.palette.background.paper,
|
|
4069
4092
|
textColor: o.palette.secondary.contrastText
|
|
4070
4093
|
};
|
|
4071
4094
|
case "E_STOP":
|
|
4072
4095
|
return {
|
|
4073
4096
|
label: r("RobotSetupReadinessIndicator.EStop.lb"),
|
|
4074
4097
|
indicatorColor: o.palette.error.main,
|
|
4075
|
-
backgroundColor: ((
|
|
4098
|
+
backgroundColor: ((g = o.palette.backgroundPaperElevation) == null ? void 0 : g[11]) || o.palette.background.paper,
|
|
4076
4099
|
textColor: o.palette.secondary.contrastText
|
|
4077
4100
|
};
|
|
4078
4101
|
case "MANUAL_MODE":
|
|
4079
4102
|
return {
|
|
4080
4103
|
label: r("RobotSetupReadinessIndicator.ManualMode.lb"),
|
|
4081
4104
|
indicatorColor: o.palette.error.main,
|
|
4082
|
-
backgroundColor: ((
|
|
4105
|
+
backgroundColor: ((f = o.palette.backgroundPaperElevation) == null ? void 0 : f[11]) || o.palette.background.paper,
|
|
4083
4106
|
textColor: o.palette.secondary.contrastText
|
|
4084
4107
|
};
|
|
4085
4108
|
default:
|
|
@@ -4320,11 +4343,11 @@ function $o({ children: e, ...t }) {
|
|
|
4320
4343
|
scrollButtons: c,
|
|
4321
4344
|
selectionFollowsFocus: s,
|
|
4322
4345
|
textColor: l,
|
|
4323
|
-
value:
|
|
4324
|
-
variant:
|
|
4325
|
-
...
|
|
4346
|
+
value: d,
|
|
4347
|
+
variant: m,
|
|
4348
|
+
...u
|
|
4326
4349
|
} = t;
|
|
4327
|
-
return /* @__PURE__ */ a(w, { ...
|
|
4350
|
+
return /* @__PURE__ */ a(w, { ...u, children: e });
|
|
4328
4351
|
}
|
|
4329
4352
|
const Ti = $(
|
|
4330
4353
|
J((e) => {
|
|
@@ -4335,12 +4358,12 @@ const Ti = $(
|
|
|
4335
4358
|
onTabChange: i,
|
|
4336
4359
|
sx: n,
|
|
4337
4360
|
ref: c
|
|
4338
|
-
} = e, s = o !== void 0, [l,
|
|
4361
|
+
} = e, s = o !== void 0, [l, d] = L(r), m = s ? o : l;
|
|
4339
4362
|
F(() => {
|
|
4340
|
-
s || t.length !== 0 && (l < 0 || l > t.length - 1) &&
|
|
4363
|
+
s || t.length !== 0 && (l < 0 || l > t.length - 1) && d(0);
|
|
4341
4364
|
}, [t.length, s, l]);
|
|
4342
|
-
const
|
|
4343
|
-
s ||
|
|
4365
|
+
const u = (p, g) => {
|
|
4366
|
+
s || d(g), i == null || i(g);
|
|
4344
4367
|
};
|
|
4345
4368
|
return /* @__PURE__ */ S(
|
|
4346
4369
|
w,
|
|
@@ -4359,16 +4382,16 @@ const Ti = $(
|
|
|
4359
4382
|
// Extra padding to prevent badge clipping
|
|
4360
4383
|
// Top: accommodates badge positioned at top: -6px with 20px height
|
|
4361
4384
|
// Right: accommodates badge positioned at right: -8px with 20px width
|
|
4362
|
-
paddingTop: (
|
|
4385
|
+
paddingTop: (p) => p.spacing(2),
|
|
4363
4386
|
// 16px
|
|
4364
|
-
paddingRight: (
|
|
4387
|
+
paddingRight: (p) => p.spacing(2.5)
|
|
4365
4388
|
// 20px
|
|
4366
4389
|
},
|
|
4367
4390
|
children: /* @__PURE__ */ a(
|
|
4368
4391
|
Vt,
|
|
4369
4392
|
{
|
|
4370
|
-
value:
|
|
4371
|
-
onChange:
|
|
4393
|
+
value: m,
|
|
4394
|
+
onChange: u,
|
|
4372
4395
|
sx: {
|
|
4373
4396
|
minHeight: "32px",
|
|
4374
4397
|
backgroundColor: "transparent",
|
|
@@ -4390,23 +4413,23 @@ const Ti = $(
|
|
|
4390
4413
|
overflow: "visible"
|
|
4391
4414
|
}
|
|
4392
4415
|
},
|
|
4393
|
-
children: t.map((
|
|
4416
|
+
children: t.map((p, g) => {
|
|
4394
4417
|
var T, C, M;
|
|
4395
|
-
const
|
|
4396
|
-
if (!
|
|
4397
|
-
const k =
|
|
4418
|
+
const f = () => {
|
|
4419
|
+
if (!p.badge) return;
|
|
4420
|
+
const k = p.badge.content, j = p.badge.max;
|
|
4398
4421
|
return typeof k == "number" && j && k > j ? `${j}+` : k;
|
|
4399
4422
|
}, y = () => {
|
|
4400
|
-
if (!
|
|
4401
|
-
const k =
|
|
4423
|
+
if (!p.badge) return !1;
|
|
4424
|
+
const k = p.badge.content, j = p.badge.showZero;
|
|
4402
4425
|
return !(k === 0 && !j);
|
|
4403
|
-
},
|
|
4404
|
-
s ||
|
|
4405
|
-
},
|
|
4426
|
+
}, b = f(), h = y(), v = () => {
|
|
4427
|
+
s || d(g), i == null || i(g);
|
|
4428
|
+
}, x = /* @__PURE__ */ a(
|
|
4406
4429
|
zt,
|
|
4407
4430
|
{
|
|
4408
|
-
label:
|
|
4409
|
-
icon:
|
|
4431
|
+
label: p.label,
|
|
4432
|
+
icon: p.icon,
|
|
4410
4433
|
iconPosition: "start",
|
|
4411
4434
|
disableRipple: !0,
|
|
4412
4435
|
onClick: v,
|
|
@@ -4420,13 +4443,13 @@ const Ti = $(
|
|
|
4420
4443
|
return ((j = k.palette.backgroundPaperElevation) == null ? void 0 : j[11]) || "#32344B";
|
|
4421
4444
|
},
|
|
4422
4445
|
color: "text.primary",
|
|
4423
|
-
opacity:
|
|
4446
|
+
opacity: m === g ? 1 : 0.38,
|
|
4424
4447
|
fontSize: "13px",
|
|
4425
4448
|
transition: "all 0.2s ease-in-out",
|
|
4426
4449
|
position: "relative",
|
|
4427
4450
|
overflow: "visible",
|
|
4428
4451
|
"&:hover": {
|
|
4429
|
-
opacity:
|
|
4452
|
+
opacity: m === g ? 1 : 0.6
|
|
4430
4453
|
},
|
|
4431
4454
|
"&.Mui-selected": {
|
|
4432
4455
|
opacity: 1,
|
|
@@ -4444,9 +4467,9 @@ const Ti = $(
|
|
|
4444
4467
|
}
|
|
4445
4468
|
}
|
|
4446
4469
|
},
|
|
4447
|
-
|
|
4470
|
+
p.id
|
|
4448
4471
|
);
|
|
4449
|
-
return
|
|
4472
|
+
return h ? /* @__PURE__ */ a(
|
|
4450
4473
|
$o,
|
|
4451
4474
|
{
|
|
4452
4475
|
component: "span",
|
|
@@ -4454,10 +4477,10 @@ const Ti = $(
|
|
|
4454
4477
|
children: /* @__PURE__ */ a(
|
|
4455
4478
|
lo,
|
|
4456
4479
|
{
|
|
4457
|
-
badgeContent:
|
|
4458
|
-
color: ((T =
|
|
4459
|
-
max: (C =
|
|
4460
|
-
showZero: (M =
|
|
4480
|
+
badgeContent: b,
|
|
4481
|
+
color: ((T = p.badge) == null ? void 0 : T.color) || "error",
|
|
4482
|
+
max: (C = p.badge) == null ? void 0 : C.max,
|
|
4483
|
+
showZero: (M = p.badge) == null ? void 0 : M.showZero,
|
|
4461
4484
|
anchorOrigin: {
|
|
4462
4485
|
vertical: "top",
|
|
4463
4486
|
horizontal: "right"
|
|
@@ -4469,12 +4492,12 @@ const Ti = $(
|
|
|
4469
4492
|
opacity: "1 !important"
|
|
4470
4493
|
}
|
|
4471
4494
|
},
|
|
4472
|
-
children:
|
|
4495
|
+
children: x
|
|
4473
4496
|
}
|
|
4474
4497
|
)
|
|
4475
4498
|
},
|
|
4476
|
-
|
|
4477
|
-
) :
|
|
4499
|
+
p.id
|
|
4500
|
+
) : x;
|
|
4478
4501
|
})
|
|
4479
4502
|
}
|
|
4480
4503
|
)
|
|
@@ -4484,13 +4507,13 @@ const Ti = $(
|
|
|
4484
4507
|
w,
|
|
4485
4508
|
{
|
|
4486
4509
|
sx: {
|
|
4487
|
-
mt: (
|
|
4510
|
+
mt: (p) => p.spacing(2),
|
|
4488
4511
|
borderBottom: 1,
|
|
4489
4512
|
borderColor: "divider"
|
|
4490
4513
|
}
|
|
4491
4514
|
}
|
|
4492
4515
|
),
|
|
4493
|
-
/* @__PURE__ */ a(w, { sx: { flex: 1, overflow: "auto" }, children: t.map((
|
|
4516
|
+
/* @__PURE__ */ a(w, { sx: { flex: 1, overflow: "auto" }, children: t.map((p, g) => /* @__PURE__ */ a(Lo, { value: m, index: g, children: p.content }, p.id)) })
|
|
4494
4517
|
]
|
|
4495
4518
|
}
|
|
4496
4519
|
);
|
|
@@ -4514,7 +4537,7 @@ const Ti = $(
|
|
|
4514
4537
|
hasError: o,
|
|
4515
4538
|
className: r
|
|
4516
4539
|
}) => {
|
|
4517
|
-
const { t: i } = z(), n = B(), { elapsedTime: c, currentProgress: s } = e, { showErrorAnimation: l, showPauseAnimation:
|
|
4540
|
+
const { t: i } = z(), n = B(), { elapsedTime: c, currentProgress: s } = e, { showErrorAnimation: l, showPauseAnimation: d, showMainText: m } = t;
|
|
4518
4541
|
return /* @__PURE__ */ S(
|
|
4519
4542
|
w,
|
|
4520
4543
|
{
|
|
@@ -4542,7 +4565,7 @@ const Ti = $(
|
|
|
4542
4565
|
skipAnimation: !0,
|
|
4543
4566
|
text: () => "",
|
|
4544
4567
|
sx: {
|
|
4545
|
-
opacity:
|
|
4568
|
+
opacity: d || l ? 0.6 : 1,
|
|
4546
4569
|
transition: "opacity 0.5s ease-out",
|
|
4547
4570
|
"& .MuiGauge-valueArc": {
|
|
4548
4571
|
fill: o ? n.palette.error.light : n.palette.success.main,
|
|
@@ -4595,7 +4618,7 @@ const Ti = $(
|
|
|
4595
4618
|
marginBottom: 0.5
|
|
4596
4619
|
},
|
|
4597
4620
|
children: [
|
|
4598
|
-
/* @__PURE__ */ a(H, { in:
|
|
4621
|
+
/* @__PURE__ */ a(H, { in: m && o, timeout: 200, children: /* @__PURE__ */ a(
|
|
4599
4622
|
R,
|
|
4600
4623
|
{
|
|
4601
4624
|
variant: "h6",
|
|
@@ -4608,7 +4631,7 @@ const Ti = $(
|
|
|
4608
4631
|
children: i("timer.error")
|
|
4609
4632
|
}
|
|
4610
4633
|
) }),
|
|
4611
|
-
/* @__PURE__ */ a(H, { in:
|
|
4634
|
+
/* @__PURE__ */ a(H, { in: m && !o, timeout: 300, children: /* @__PURE__ */ a(
|
|
4612
4635
|
R,
|
|
4613
4636
|
{
|
|
4614
4637
|
variant: "h1",
|
|
@@ -4638,7 +4661,7 @@ const Ti = $(
|
|
|
4638
4661
|
compact: r,
|
|
4639
4662
|
className: i
|
|
4640
4663
|
}) => {
|
|
4641
|
-
const { t: n, i18n: c } = z(), s = B(), { elapsedTime: l, currentProgress:
|
|
4664
|
+
const { t: n, i18n: c } = z(), s = B(), { elapsedTime: l, currentProgress: d } = e, { showErrorAnimation: m, showPauseAnimation: u } = t;
|
|
4642
4665
|
return r ? /* @__PURE__ */ a(
|
|
4643
4666
|
w,
|
|
4644
4667
|
{
|
|
@@ -4681,7 +4704,7 @@ const Ti = $(
|
|
|
4681
4704
|
display: "flex",
|
|
4682
4705
|
alignItems: "center",
|
|
4683
4706
|
justifyContent: "center",
|
|
4684
|
-
opacity:
|
|
4707
|
+
opacity: u || m ? 0.6 : 1,
|
|
4685
4708
|
transition: "opacity 0.5s ease-out"
|
|
4686
4709
|
},
|
|
4687
4710
|
children: /* @__PURE__ */ S(
|
|
@@ -4720,7 +4743,7 @@ const Ti = $(
|
|
|
4720
4743
|
strokeWidth: "2",
|
|
4721
4744
|
strokeLinecap: "round",
|
|
4722
4745
|
strokeDasharray: `${2 * Math.PI * 8}`,
|
|
4723
|
-
strokeDashoffset: `${2 * Math.PI * 8 * (1 -
|
|
4746
|
+
strokeDashoffset: `${2 * Math.PI * 8 * (1 - d / 100)}`,
|
|
4724
4747
|
style: {
|
|
4725
4748
|
transition: "stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"
|
|
4726
4749
|
}
|
|
@@ -4758,31 +4781,31 @@ const Ti = $(
|
|
|
4758
4781
|
), r = A(
|
|
4759
4782
|
null
|
|
4760
4783
|
), i = A(null), n = _(() => {
|
|
4761
|
-
t((
|
|
4762
|
-
t((
|
|
4784
|
+
t((u) => ({ ...u, showPauseAnimation: !0 })), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
|
|
4785
|
+
t((u) => ({ ...u, showPauseAnimation: !1 }));
|
|
4763
4786
|
}, 800);
|
|
4764
4787
|
}, []), c = _(() => {
|
|
4765
|
-
t((
|
|
4766
|
-
t((
|
|
4788
|
+
t((u) => ({ ...u, showErrorAnimation: !0 })), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
|
|
4789
|
+
t((u) => ({ ...u, showErrorAnimation: !1 }));
|
|
4767
4790
|
}, 600);
|
|
4768
4791
|
}, []), s = _(() => {
|
|
4769
|
-
t((
|
|
4792
|
+
t((u) => ({ ...u, showErrorAnimation: !1 })), r.current && clearTimeout(r.current);
|
|
4770
4793
|
}, []), l = _(() => {
|
|
4771
|
-
t((
|
|
4772
|
-
...
|
|
4794
|
+
t((u) => ({
|
|
4795
|
+
...u,
|
|
4773
4796
|
showMainText: !1
|
|
4774
4797
|
})), i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
4775
|
-
t((
|
|
4776
|
-
...
|
|
4798
|
+
t((u) => ({
|
|
4799
|
+
...u,
|
|
4777
4800
|
showMainText: !0
|
|
4778
4801
|
}));
|
|
4779
4802
|
}, 200);
|
|
4780
|
-
}, []),
|
|
4781
|
-
t((
|
|
4782
|
-
...
|
|
4803
|
+
}, []), d = _(() => {
|
|
4804
|
+
t((u) => ({
|
|
4805
|
+
...u,
|
|
4783
4806
|
showMainText: !0
|
|
4784
4807
|
}));
|
|
4785
|
-
}, []),
|
|
4808
|
+
}, []), m = _(() => {
|
|
4786
4809
|
o.current && clearTimeout(o.current), r.current && clearTimeout(r.current), i.current && clearTimeout(i.current);
|
|
4787
4810
|
}, []);
|
|
4788
4811
|
return {
|
|
@@ -4791,8 +4814,8 @@ const Ti = $(
|
|
|
4791
4814
|
triggerErrorAnimation: c,
|
|
4792
4815
|
clearErrorAnimation: s,
|
|
4793
4816
|
triggerFadeTransition: l,
|
|
4794
|
-
setInitialAnimationState:
|
|
4795
|
-
cleanup:
|
|
4817
|
+
setInitialAnimationState: d,
|
|
4818
|
+
cleanup: m
|
|
4796
4819
|
};
|
|
4797
4820
|
}, Go = ({
|
|
4798
4821
|
autoStart: e,
|
|
@@ -4807,97 +4830,97 @@ const Ti = $(
|
|
|
4807
4830
|
isPausedState: !1,
|
|
4808
4831
|
currentProgress: 0,
|
|
4809
4832
|
wasRunningBeforeError: !1
|
|
4810
|
-
}), s = A(null), l = A(null),
|
|
4833
|
+
}), s = A(null), l = A(null), d = A(0), m = A(0), [u] = $t([0], {
|
|
4811
4834
|
tension: 80,
|
|
4812
4835
|
friction: 18,
|
|
4813
|
-
onChange: ([
|
|
4814
|
-
c((v) => ({ ...v, currentProgress:
|
|
4836
|
+
onChange: ([h]) => {
|
|
4837
|
+
c((v) => ({ ...v, currentProgress: h }));
|
|
4815
4838
|
}
|
|
4816
|
-
}),
|
|
4817
|
-
(
|
|
4818
|
-
const v =
|
|
4819
|
-
c((
|
|
4820
|
-
...
|
|
4821
|
-
elapsedTime:
|
|
4839
|
+
}), p = _(
|
|
4840
|
+
(h = 0) => {
|
|
4841
|
+
const v = h / 60 % 1 * 100;
|
|
4842
|
+
c((x) => ({
|
|
4843
|
+
...x,
|
|
4844
|
+
elapsedTime: h,
|
|
4822
4845
|
isPausedState: !1,
|
|
4823
4846
|
currentProgress: v
|
|
4824
|
-
})),
|
|
4847
|
+
})), d.current = 0, m.current = v, u.setImmediate([v]), e ? (l.current = Date.now() - h * 1e3, c((x) => ({ ...x, isRunning: !0 }))) : l.current = null;
|
|
4825
4848
|
},
|
|
4826
|
-
[e,
|
|
4827
|
-
),
|
|
4849
|
+
[e, u]
|
|
4850
|
+
), g = _(() => {
|
|
4828
4851
|
if (l.current && n.isRunning) {
|
|
4829
|
-
const v = (Date.now() - l.current) / 1e3 +
|
|
4830
|
-
|
|
4852
|
+
const v = (Date.now() - l.current) / 1e3 + d.current, x = v / 60 % 1 * 100;
|
|
4853
|
+
u.setTarget([x]), c((T) => ({
|
|
4831
4854
|
...T,
|
|
4832
4855
|
elapsedTime: Math.floor(v)
|
|
4833
4856
|
}));
|
|
4834
4857
|
}
|
|
4835
|
-
c((
|
|
4836
|
-
...
|
|
4858
|
+
c((h) => ({
|
|
4859
|
+
...h,
|
|
4837
4860
|
isRunning: !1,
|
|
4838
4861
|
isPausedState: !0
|
|
4839
4862
|
})), o();
|
|
4840
|
-
}, [n.isRunning,
|
|
4841
|
-
n.isPausedState && (
|
|
4842
|
-
...
|
|
4863
|
+
}, [n.isRunning, u, o]), f = _(() => {
|
|
4864
|
+
n.isPausedState && (d.current = n.elapsedTime, l.current = Date.now(), c((h) => ({
|
|
4865
|
+
...h,
|
|
4843
4866
|
isRunning: !0,
|
|
4844
4867
|
isPausedState: !1
|
|
4845
4868
|
})));
|
|
4846
4869
|
}, [n.isPausedState, n.elapsedTime]), y = _(() => {
|
|
4847
|
-
c((
|
|
4848
|
-
...
|
|
4870
|
+
c((h) => ({
|
|
4871
|
+
...h,
|
|
4849
4872
|
elapsedTime: 0,
|
|
4850
4873
|
isRunning: !1,
|
|
4851
4874
|
isPausedState: !1,
|
|
4852
4875
|
currentProgress: 0
|
|
4853
|
-
})),
|
|
4854
|
-
}, [
|
|
4876
|
+
})), d.current = 0, l.current = null, m.current = 0, u.setImmediate([0]);
|
|
4877
|
+
}, [u]), b = _(() => n.isPausedState, [n.isPausedState]);
|
|
4855
4878
|
return F(() => {
|
|
4856
|
-
t ? (n.isRunning && (c((
|
|
4879
|
+
t ? (n.isRunning && (c((h) => ({ ...h, wasRunningBeforeError: !0 })), g()), r()) : (n.wasRunningBeforeError && !n.isRunning && (c((h) => ({ ...h, wasRunningBeforeError: !1 })), f()), i());
|
|
4857
4880
|
}, [
|
|
4858
4881
|
t,
|
|
4859
4882
|
n.isRunning,
|
|
4860
4883
|
n.wasRunningBeforeError,
|
|
4861
|
-
|
|
4862
|
-
|
|
4884
|
+
g,
|
|
4885
|
+
f,
|
|
4863
4886
|
r,
|
|
4864
4887
|
i
|
|
4865
4888
|
]), F(() => {
|
|
4866
4889
|
if (n.isRunning) {
|
|
4867
|
-
const
|
|
4890
|
+
const h = () => {
|
|
4868
4891
|
if (l.current) {
|
|
4869
|
-
const
|
|
4892
|
+
const x = (Date.now() - l.current) / 1e3 + d.current, T = x / 60 % 1 * 100;
|
|
4870
4893
|
c((M) => ({
|
|
4871
4894
|
...M,
|
|
4872
|
-
elapsedTime: Math.floor(
|
|
4895
|
+
elapsedTime: Math.floor(x)
|
|
4873
4896
|
})), Math.abs(
|
|
4874
|
-
T -
|
|
4875
|
-
) > 0.1 && (
|
|
4897
|
+
T - m.current
|
|
4898
|
+
) > 0.1 && (u.setTarget([T]), m.current = T);
|
|
4876
4899
|
}
|
|
4877
|
-
s.current = requestAnimationFrame(
|
|
4900
|
+
s.current = requestAnimationFrame(h);
|
|
4878
4901
|
};
|
|
4879
|
-
s.current = requestAnimationFrame(
|
|
4902
|
+
s.current = requestAnimationFrame(h);
|
|
4880
4903
|
} else
|
|
4881
4904
|
s.current && (cancelAnimationFrame(s.current), s.current = null);
|
|
4882
4905
|
return () => {
|
|
4883
4906
|
s.current && (cancelAnimationFrame(s.current), s.current = null);
|
|
4884
4907
|
};
|
|
4885
|
-
}, [n.isRunning,
|
|
4886
|
-
let
|
|
4908
|
+
}, [n.isRunning, u]), F(() => {
|
|
4909
|
+
let h = null;
|
|
4887
4910
|
const v = () => {
|
|
4888
|
-
|
|
4911
|
+
u.update(), h = requestAnimationFrame(v);
|
|
4889
4912
|
};
|
|
4890
|
-
return
|
|
4891
|
-
|
|
4913
|
+
return h = requestAnimationFrame(v), () => {
|
|
4914
|
+
h && cancelAnimationFrame(h);
|
|
4892
4915
|
};
|
|
4893
|
-
}, [
|
|
4916
|
+
}, [u]), {
|
|
4894
4917
|
timerState: n,
|
|
4895
4918
|
controls: {
|
|
4896
|
-
start:
|
|
4897
|
-
pause:
|
|
4898
|
-
resume:
|
|
4919
|
+
start: p,
|
|
4920
|
+
pause: g,
|
|
4921
|
+
resume: f,
|
|
4899
4922
|
reset: y,
|
|
4900
|
-
isPaused:
|
|
4923
|
+
isPaused: b
|
|
4901
4924
|
}
|
|
4902
4925
|
};
|
|
4903
4926
|
}, Mi = $(
|
|
@@ -4914,30 +4937,30 @@ const Ti = $(
|
|
|
4914
4937
|
animationState: c,
|
|
4915
4938
|
triggerPauseAnimation: s,
|
|
4916
4939
|
triggerErrorAnimation: l,
|
|
4917
|
-
clearErrorAnimation:
|
|
4918
|
-
setInitialAnimationState:
|
|
4919
|
-
cleanup:
|
|
4920
|
-
} = Wo(), { timerState:
|
|
4940
|
+
clearErrorAnimation: d,
|
|
4941
|
+
setInitialAnimationState: m,
|
|
4942
|
+
cleanup: u
|
|
4943
|
+
} = Wo(), { timerState: p, controls: g } = Go({
|
|
4921
4944
|
autoStart: t,
|
|
4922
4945
|
hasError: n,
|
|
4923
4946
|
onPauseAnimation: s,
|
|
4924
4947
|
onErrorAnimation: l,
|
|
4925
|
-
onClearErrorAnimation:
|
|
4948
|
+
onClearErrorAnimation: d
|
|
4926
4949
|
});
|
|
4927
4950
|
return F(() => {
|
|
4928
|
-
|
|
4929
|
-
}, [
|
|
4930
|
-
let
|
|
4951
|
+
m();
|
|
4952
|
+
}, [m]), F(() => {
|
|
4953
|
+
let f = !0;
|
|
4931
4954
|
const y = setTimeout(() => {
|
|
4932
|
-
|
|
4955
|
+
f && e(g);
|
|
4933
4956
|
}, 0);
|
|
4934
4957
|
return () => {
|
|
4935
|
-
|
|
4958
|
+
f = !1, clearTimeout(y);
|
|
4936
4959
|
};
|
|
4937
|
-
}, [e,
|
|
4960
|
+
}, [e, g]), F(() => u, [u]), o === "small" ? /* @__PURE__ */ a(
|
|
4938
4961
|
No,
|
|
4939
4962
|
{
|
|
4940
|
-
timerState:
|
|
4963
|
+
timerState: p,
|
|
4941
4964
|
animationState: c,
|
|
4942
4965
|
hasError: n,
|
|
4943
4966
|
compact: r,
|
|
@@ -4946,7 +4969,7 @@ const Ti = $(
|
|
|
4946
4969
|
) : /* @__PURE__ */ a(
|
|
4947
4970
|
Vo,
|
|
4948
4971
|
{
|
|
4949
|
-
timerState:
|
|
4972
|
+
timerState: p,
|
|
4950
4973
|
animationState: c,
|
|
4951
4974
|
hasError: n,
|
|
4952
4975
|
className: i
|
|
@@ -4962,101 +4985,107 @@ const Ti = $(
|
|
|
4962
4985
|
reverse_rotation_direction: !1
|
|
4963
4986
|
};
|
|
4964
4987
|
class gt {
|
|
4965
|
-
constructor(t, o, r, i, n, c, s, l,
|
|
4966
|
-
this.nova = t, this.
|
|
4967
|
-
var
|
|
4968
|
-
const
|
|
4969
|
-
|
|
4970
|
-
this.controllerState =
|
|
4988
|
+
constructor(t, o, r, i, n, c, s, l, d, m, u) {
|
|
4989
|
+
this.nova = t, this.cellId = o, this.controller = r, this.motionGroup = i, this.initialMotionState = n, this.motionStateSocket = c, this.isVirtual = s, this.tcps = l, this.description = d, this.initialControllerState = m, this.controllerStateSocket = u, this.connectedJoggingSocket = null, this.joggingVelocity = 10, this.activationState = "inactive", this.rapidlyChangingMotionState = n, this.controllerState = m, u.addEventListener("message", (p) => {
|
|
4990
|
+
var f;
|
|
4991
|
+
const g = (f = W(p.data)) == null ? void 0 : f.result;
|
|
4992
|
+
g && D(() => {
|
|
4993
|
+
this.controllerState = g;
|
|
4971
4994
|
});
|
|
4972
|
-
}),
|
|
4973
|
-
var
|
|
4974
|
-
const
|
|
4975
|
-
if (!
|
|
4995
|
+
}), c.addEventListener("message", (p) => {
|
|
4996
|
+
var f;
|
|
4997
|
+
const g = (f = W(p.data)) == null ? void 0 : f.result;
|
|
4998
|
+
if (!g)
|
|
4976
4999
|
throw new Error(
|
|
4977
|
-
`Failed to get motion state for ${this.motionGroupId}: ${
|
|
5000
|
+
`Failed to get motion state for ${this.motionGroupId}: ${p.data}`
|
|
4978
5001
|
);
|
|
4979
5002
|
Ut(
|
|
4980
5003
|
this.rapidlyChangingMotionState.joint_position,
|
|
4981
|
-
|
|
5004
|
+
g.joint_position,
|
|
4982
5005
|
Jt
|
|
4983
5006
|
) || D(() => {
|
|
4984
|
-
this.rapidlyChangingMotionState.joint_position =
|
|
5007
|
+
this.rapidlyChangingMotionState.joint_position = g.joint_position;
|
|
4985
5008
|
}), Ht(
|
|
4986
5009
|
this.rapidlyChangingMotionState,
|
|
4987
|
-
|
|
5010
|
+
g,
|
|
4988
5011
|
Jt
|
|
4989
5012
|
) || D(() => {
|
|
4990
|
-
this.rapidlyChangingMotionState.tcp_pose =
|
|
4991
|
-
}),
|
|
4992
|
-
this.rapidlyChangingMotionState.tcp =
|
|
4993
|
-
}), this.rapidlyChangingMotionState.standstill !==
|
|
4994
|
-
this.rapidlyChangingMotionState.standstill =
|
|
5013
|
+
this.rapidlyChangingMotionState.tcp_pose = g.tcp_pose;
|
|
5014
|
+
}), g.tcp !== void 0 && this.rapidlyChangingMotionState.tcp !== g.tcp && D(() => {
|
|
5015
|
+
this.rapidlyChangingMotionState.tcp = g.tcp;
|
|
5016
|
+
}), this.rapidlyChangingMotionState.standstill !== g.standstill && D(() => {
|
|
5017
|
+
this.rapidlyChangingMotionState.standstill = g.standstill;
|
|
4995
5018
|
});
|
|
4996
5019
|
}), mt(this);
|
|
4997
5020
|
}
|
|
4998
|
-
static async connectMultiple(t, o) {
|
|
5021
|
+
static async connectMultiple(t, o, r = {}) {
|
|
4999
5022
|
return Promise.all(
|
|
5000
5023
|
o.map(
|
|
5001
|
-
(
|
|
5024
|
+
(i) => gt.connect(t, i, r)
|
|
5002
5025
|
)
|
|
5003
5026
|
);
|
|
5004
5027
|
}
|
|
5005
|
-
static async connect(t, o) {
|
|
5006
|
-
var
|
|
5007
|
-
const
|
|
5008
|
-
|
|
5028
|
+
static async connect(t, o, r = {}) {
|
|
5029
|
+
var x, T;
|
|
5030
|
+
const i = r.cellId ?? "cell", [n, c] = o.split("@"), s = await t.api.controller.getCurrentRobotControllerState(
|
|
5031
|
+
i,
|
|
5032
|
+
c
|
|
5033
|
+
), l = s == null ? void 0 : s.motion_groups.find(
|
|
5034
|
+
(C) => C.motion_group === o
|
|
5009
5035
|
);
|
|
5010
|
-
if (!
|
|
5036
|
+
if (!s || !l)
|
|
5011
5037
|
throw new Error(
|
|
5012
|
-
`Controller ${
|
|
5038
|
+
`Controller ${c} or motion group ${o} not found`
|
|
5013
5039
|
);
|
|
5014
|
-
const
|
|
5015
|
-
`/
|
|
5016
|
-
),
|
|
5040
|
+
const d = t.openReconnectingWebsocket(
|
|
5041
|
+
`/cells/${i}/controllers/${c}/motion-groups/${o}/state-stream`
|
|
5042
|
+
), m = await d.firstMessage(), u = (x = W(m.data)) == null ? void 0 : x.result;
|
|
5017
5043
|
if (!u)
|
|
5018
5044
|
throw new Error(
|
|
5019
|
-
`Unable to parse initial motion state message ${
|
|
5045
|
+
`Unable to parse initial motion state message ${m.data}`
|
|
5020
5046
|
);
|
|
5021
5047
|
console.log(
|
|
5022
|
-
`Connected motion state websocket to motion group ${
|
|
5048
|
+
`Connected motion state websocket to motion group ${l.motion_group}. Initial state:
|
|
5023
5049
|
`,
|
|
5024
5050
|
u
|
|
5025
5051
|
);
|
|
5026
5052
|
const g = (await t.api.controller.getRobotController(
|
|
5027
|
-
n.controller
|
|
5028
|
-
)).configuration.kind === "VirtualController", d = await t.api.motionGroup.getMotionGroupDescription(
|
|
5029
5053
|
i,
|
|
5030
|
-
|
|
5031
|
-
),
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5054
|
+
s.controller
|
|
5055
|
+
)).configuration.kind === "VirtualController", f = await t.api.motionGroup.getMotionGroupDescription(
|
|
5056
|
+
i,
|
|
5057
|
+
c,
|
|
5058
|
+
l.motion_group
|
|
5059
|
+
), y = Object.entries(f.tcps || {}).map(
|
|
5060
|
+
([C, M]) => ({
|
|
5061
|
+
id: C,
|
|
5062
|
+
readable_name: M.name,
|
|
5063
|
+
position: M.pose.position,
|
|
5064
|
+
orientation: M.pose.orientation
|
|
5037
5065
|
})
|
|
5038
|
-
),
|
|
5039
|
-
`/controllers/${
|
|
5040
|
-
),
|
|
5041
|
-
if (!
|
|
5066
|
+
), b = t.openReconnectingWebsocket(
|
|
5067
|
+
`/cells/${i}/controllers/${s.controller}/state-stream?response_rate=1000`
|
|
5068
|
+
), h = await b.firstMessage(), v = (T = W(h.data)) == null ? void 0 : T.result;
|
|
5069
|
+
if (!v)
|
|
5042
5070
|
throw new Error(
|
|
5043
|
-
`Unable to parse initial controller state message ${
|
|
5071
|
+
`Unable to parse initial controller state message ${h.data}`
|
|
5044
5072
|
);
|
|
5045
5073
|
return console.log(
|
|
5046
|
-
`Connected controller state websocket to controller ${
|
|
5074
|
+
`Connected controller state websocket to controller ${s.controller}. Initial state:
|
|
5047
5075
|
`,
|
|
5048
|
-
|
|
5076
|
+
v
|
|
5049
5077
|
), new gt(
|
|
5050
5078
|
t,
|
|
5051
|
-
|
|
5052
|
-
c,
|
|
5053
|
-
u,
|
|
5079
|
+
i,
|
|
5054
5080
|
s,
|
|
5055
|
-
|
|
5056
|
-
|
|
5081
|
+
l,
|
|
5082
|
+
u,
|
|
5057
5083
|
d,
|
|
5058
|
-
|
|
5059
|
-
|
|
5084
|
+
g,
|
|
5085
|
+
y,
|
|
5086
|
+
f,
|
|
5087
|
+
v,
|
|
5088
|
+
b
|
|
5060
5089
|
);
|
|
5061
5090
|
}
|
|
5062
5091
|
get motionGroupId() {
|
|
@@ -5099,11 +5128,11 @@ class gt {
|
|
|
5099
5128
|
}
|
|
5100
5129
|
/** Gets the robot mounting position rotation in 3D viz coordinates */
|
|
5101
5130
|
get mountingQuaternion() {
|
|
5102
|
-
var i, n, c, s, l,
|
|
5131
|
+
var i, n, c, s, l, d;
|
|
5103
5132
|
const t = new Et.Vector3(
|
|
5104
5133
|
((n = (i = this.description.mounting) == null ? void 0 : i.orientation) == null ? void 0 : n[0]) || 0,
|
|
5105
5134
|
((s = (c = this.description.mounting) == null ? void 0 : c.orientation) == null ? void 0 : s[1]) || 0,
|
|
5106
|
-
((
|
|
5135
|
+
((d = (l = this.description.mounting) == null ? void 0 : l.orientation) == null ? void 0 : d[2]) || 0
|
|
5107
5136
|
), o = t.length(), r = t.normalize();
|
|
5108
5137
|
return new Et.Quaternion().setFromAxisAngle(r, o);
|
|
5109
5138
|
}
|
|
@@ -5155,6 +5184,7 @@ class gt {
|
|
|
5155
5184
|
});
|
|
5156
5185
|
try {
|
|
5157
5186
|
await this.nova.api.controller.setDefaultMode(
|
|
5187
|
+
this.cellId,
|
|
5158
5188
|
this.controllerId,
|
|
5159
5189
|
"ROBOT_SYSTEM_MODE_MONITOR"
|
|
5160
5190
|
), D(() => {
|
|
@@ -5176,6 +5206,7 @@ class gt {
|
|
|
5176
5206
|
});
|
|
5177
5207
|
try {
|
|
5178
5208
|
await this.nova.api.controller.setDefaultMode(
|
|
5209
|
+
this.cellId,
|
|
5179
5210
|
this.controllerId,
|
|
5180
5211
|
"ROBOT_SYSTEM_MODE_CONTROL"
|
|
5181
5212
|
), D(() => {
|