@wandelbots/wandelbots-js-react-components 5.5.2-pr.fix-performance-issues.594.c24b644 → 5.5.2

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.
@@ -2,7 +2,7 @@ import { jsxs as f, Fragment as B, jsx as t } from "react/jsx-runtime";
2
2
  import h from "@mui/material/Divider";
3
3
  import y from "@mui/material/Stack";
4
4
  import { observer as d, useLocalObservable as M } from "mobx-react-lite";
5
- import { t as v, e as O } from "./externalizeComponent-D6S3WLFc.js";
5
+ import { t as v, e as O } from "./externalizeComponent-BuuzAqKe.js";
6
6
  import { useTheme as E } from "@mui/material/styles";
7
7
  import { useId as T } from "react";
8
8
  import { useTranslation as m, Trans as s } from "react-i18next";
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),x=require("@mui/material/Divider"),T=require("@mui/material/Stack"),d=require("mobx-react-lite"),h=require("./externalizeComponent-BHZdH14U.cjs"),f=require("@mui/material/styles"),E=require("react"),i=require("react-i18next"),c=require("./safety-state-stop-CgPfwC18.cjs"),j=require("@mui/material/Popover"),B=require("@mui/material/SvgIcon"),y=require("@mui/material/Typography"),b=require("axios");function v(a,o){throw new Error(`${o} ${JSON.stringify(a)}`)}function M(a){var o,r,n,t;return a instanceof b.AxiosError&&a.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":a instanceof b.AxiosError&&a.response?`${(o=a.response)==null?void 0:o.status} ${(r=a.response)==null?void 0:r.statusText} from ${(n=a.response)==null?void 0:n.config.url}: ${JSON.stringify((t=a.response)==null?void 0:t.data)}`:a instanceof Error?a.message:`Unexpected error: ${h.tryStringifyJson(a)||a}`}const S=d.observer(({id:a,icon:o,color:r,title:n,name:t,label:l,explanation:s,literalValue:p,anchorOrigin:m,transformOrigin:A})=>{const u=d.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(_){u.anchorEl=_.currentTarget},closePopover(){u.anchorEl=null}}));return e.jsxs(e.Fragment,{children:[e.jsxs(T,{"aria-owns":u.isPopoverOpen?a:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[e.jsx(B,{component:o,sx:{color:r}}),l&&e.jsx("div",{style:{color:r},children:l})]}),e.jsx(j,{id:a,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:m??{vertical:"bottom",horizontal:"left"},transformOrigin:A??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:e.jsxs(T,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[e.jsxs("div",{children:[n&&e.jsx(y,{component:"span",fontSize:"14px",children:`${n}: `}),e.jsx(y,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:t})]}),e.jsx(y,{fontSize:"14px",children:s}),p&&e.jsx(y,{fontSize:"12px",children:p})]})})]})}),O=d.observer(({isVirtual:a,motionGroupId:o,anchorOrigin:r,transformOrigin:n,compact:t})=>{const l=f.useTheme(),s=E.useId(),{t:p}=i.useTranslation();return a?e.jsx(S,{id:`motion-group-virtual-${s}`,icon:c.ForwardRef$1,color:l.palette.tertiary.main,name:p("SafetyBar.ControllerType.Virtual.lb"),label:t?null:p("SafetyBar.ControllerType.Virtual.lb"),explanation:e.jsxs(i.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:o},children:["Motion group ",e.jsx("code",{children:o})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:r,transformOrigin:n}):e.jsx(S,{id:`motion-group-physical-${s}`,icon:c.ForwardRef,color:l.palette.primary.main,name:p("SafetyBar.ControllerType.Physical.lb"),label:t?null:p("SafetyBar.ControllerType.Physical.lb"),explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:o},components:{code:e.jsx("code",{}),strong:e.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),R=d.observer(({operationMode:a,anchorOrigin:o,transformOrigin:r,compact:n})=>{const{t}=i.useTranslation(),l=f.useTheme(),s=E.useId();switch(a){case"OPERATION_MODE_AUTO":return e.jsx(S,{id:`operation-mode-auto-${s}`,icon:c.ForwardRef$2,title:t("SafetyBar.OperationMode.ti"),name:t("SafetyBar.OperationMode.Automatic.ti"),label:n?null:t("SafetyBar.OperationMode.Automatic.ti"),color:l.palette.text.secondary,explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:o,transformOrigin:r});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return e.jsx(S,{id:`operation-mode-manual-${s}`,icon:c.ForwardRef$4,color:l.palette.warning.main,title:t("SafetyBar.OperationMode.ti"),name:t("SafetyBar.OperationMode.Manual.lb"),label:n?null:t("SafetyBar.OperationMode.Manual.lb"),explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully."}),literalValue:a,anchorOrigin:o,transformOrigin:r});default:return e.jsx(S,{id:`operation-mode-error-${s}`,icon:c.ForwardRef$3,color:l.palette.warning.main,title:t("SafetyBar.OperationMode.ti"),name:t("SafetyBar.OperationMode.Error.lb"),label:n?null:t("SafetyBar.OperationMode.Error.lb"),explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:a,anchorOrigin:o,transformOrigin:r})}}),F=d.observer(({safetyState:a,anchorOrigin:o,transformOrigin:r,compact:n})=>{const{t}=i.useTranslation(),l=f.useTheme(),s=E.useId();switch(a){case"SAFETY_STATE_NORMAL":return e.jsx(S,{id:`safety-state-normal-${s}`,title:t("SafetyBar.SafetyState.ti"),name:t("SafetyBar.SafetyState.Normal.lb"),label:n?null:t("SafetyBar.SafetyState.Normal.lb"),icon:c.ForwardRef$8,color:l.palette.text.secondary,explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:o,transformOrigin:r});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return e.jsx(S,{id:`safety-state-estop-${s}`,title:t("SafetyBar.SafetyState.ti"),name:t("SafetyBar.SafetyState.Estop.lb"),label:n?null:t("SafetyBar.SafetyState.Estop.lb"),icon:c.ForwardRef$6,color:l.palette.error.main,explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:a,anchorOrigin:o,transformOrigin:r});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return e.jsx(S,{id:`safety-state-stop-${s}`,icon:c.ForwardRef$9,title:t("SafetyBar.SafetyState.ti"),name:t("SafetyBar.SafetyState.Stop.lb"),label:n?null:t("SafetyBar.SafetyState.Stop.lb"),color:l.palette.warning.main,explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:a,anchorOrigin:o,transformOrigin:r});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return e.jsx(S,{id:`safety-state-manual-action-required-${s}`,icon:c.ForwardRef$7,color:l.palette.warning.main,title:t("SafetyBar.SafetyState.ti"),name:t("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:t("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:a,anchorOrigin:o,transformOrigin:r});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return e.jsx(S,{id:`safety-state-error-${s}`,icon:c.ForwardRef$5,color:l.palette.error.main,title:t("SafetyBar.SafetyState.ti"),name:t("SafetyBar.SafetyState.Error.lb"),label:n?null:t("SafetyBar.SafetyState.Error.lb"),explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:a,anchorOrigin:o,transformOrigin:r});default:v(a,`Unknown safety state ${a}`)}}),w=h.externalizeComponent(d.observer(({isVirtual:a,motionGroupId:o,operationMode:r,safetyState:n,anchorOrigin:t,transformOrigin:l,compact:s=!0})=>{const p=s?1:2;return e.jsxs(T,{direction:"row",gap:p,alignItems:"center",sx:{height:"24px"},children:[e.jsx(F,{safetyState:n,anchorOrigin:t,transformOrigin:l,compact:s}),e.jsx(x,{orientation:"vertical",flexItem:!0}),e.jsx(R,{operationMode:r,anchorOrigin:t,transformOrigin:l,compact:s}),e.jsx(x,{orientation:"vertical",flexItem:!0}),e.jsx(O,{isVirtual:a,motionGroupId:o,anchorOrigin:t,transformOrigin:l,compact:s})]})}));exports.SafetyBar=w;exports.makeErrorMessage=M;
1
+ "use strict";const e=require("react/jsx-runtime"),x=require("@mui/material/Divider"),T=require("@mui/material/Stack"),d=require("mobx-react-lite"),h=require("./externalizeComponent-UnCHtc94.cjs"),f=require("@mui/material/styles"),E=require("react"),i=require("react-i18next"),c=require("./safety-state-stop-CgPfwC18.cjs"),j=require("@mui/material/Popover"),B=require("@mui/material/SvgIcon"),y=require("@mui/material/Typography"),b=require("axios");function v(a,o){throw new Error(`${o} ${JSON.stringify(a)}`)}function M(a){var o,r,n,t;return a instanceof b.AxiosError&&a.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":a instanceof b.AxiosError&&a.response?`${(o=a.response)==null?void 0:o.status} ${(r=a.response)==null?void 0:r.statusText} from ${(n=a.response)==null?void 0:n.config.url}: ${JSON.stringify((t=a.response)==null?void 0:t.data)}`:a instanceof Error?a.message:`Unexpected error: ${h.tryStringifyJson(a)||a}`}const S=d.observer(({id:a,icon:o,color:r,title:n,name:t,label:l,explanation:s,literalValue:p,anchorOrigin:m,transformOrigin:A})=>{const u=d.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(_){u.anchorEl=_.currentTarget},closePopover(){u.anchorEl=null}}));return e.jsxs(e.Fragment,{children:[e.jsxs(T,{"aria-owns":u.isPopoverOpen?a:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[e.jsx(B,{component:o,sx:{color:r}}),l&&e.jsx("div",{style:{color:r},children:l})]}),e.jsx(j,{id:a,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:m??{vertical:"bottom",horizontal:"left"},transformOrigin:A??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:e.jsxs(T,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[e.jsxs("div",{children:[n&&e.jsx(y,{component:"span",fontSize:"14px",children:`${n}: `}),e.jsx(y,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:t})]}),e.jsx(y,{fontSize:"14px",children:s}),p&&e.jsx(y,{fontSize:"12px",children:p})]})})]})}),O=d.observer(({isVirtual:a,motionGroupId:o,anchorOrigin:r,transformOrigin:n,compact:t})=>{const l=f.useTheme(),s=E.useId(),{t:p}=i.useTranslation();return a?e.jsx(S,{id:`motion-group-virtual-${s}`,icon:c.ForwardRef$1,color:l.palette.tertiary.main,name:p("SafetyBar.ControllerType.Virtual.lb"),label:t?null:p("SafetyBar.ControllerType.Virtual.lb"),explanation:e.jsxs(i.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:o},children:["Motion group ",e.jsx("code",{children:o})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:r,transformOrigin:n}):e.jsx(S,{id:`motion-group-physical-${s}`,icon:c.ForwardRef,color:l.palette.primary.main,name:p("SafetyBar.ControllerType.Physical.lb"),label:t?null:p("SafetyBar.ControllerType.Physical.lb"),explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:o},components:{code:e.jsx("code",{}),strong:e.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),R=d.observer(({operationMode:a,anchorOrigin:o,transformOrigin:r,compact:n})=>{const{t}=i.useTranslation(),l=f.useTheme(),s=E.useId();switch(a){case"OPERATION_MODE_AUTO":return e.jsx(S,{id:`operation-mode-auto-${s}`,icon:c.ForwardRef$2,title:t("SafetyBar.OperationMode.ti"),name:t("SafetyBar.OperationMode.Automatic.ti"),label:n?null:t("SafetyBar.OperationMode.Automatic.ti"),color:l.palette.text.secondary,explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:o,transformOrigin:r});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return e.jsx(S,{id:`operation-mode-manual-${s}`,icon:c.ForwardRef$4,color:l.palette.warning.main,title:t("SafetyBar.OperationMode.ti"),name:t("SafetyBar.OperationMode.Manual.lb"),label:n?null:t("SafetyBar.OperationMode.Manual.lb"),explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully."}),literalValue:a,anchorOrigin:o,transformOrigin:r});default:return e.jsx(S,{id:`operation-mode-error-${s}`,icon:c.ForwardRef$3,color:l.palette.warning.main,title:t("SafetyBar.OperationMode.ti"),name:t("SafetyBar.OperationMode.Error.lb"),label:n?null:t("SafetyBar.OperationMode.Error.lb"),explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:a,anchorOrigin:o,transformOrigin:r})}}),F=d.observer(({safetyState:a,anchorOrigin:o,transformOrigin:r,compact:n})=>{const{t}=i.useTranslation(),l=f.useTheme(),s=E.useId();switch(a){case"SAFETY_STATE_NORMAL":return e.jsx(S,{id:`safety-state-normal-${s}`,title:t("SafetyBar.SafetyState.ti"),name:t("SafetyBar.SafetyState.Normal.lb"),label:n?null:t("SafetyBar.SafetyState.Normal.lb"),icon:c.ForwardRef$8,color:l.palette.text.secondary,explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:o,transformOrigin:r});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return e.jsx(S,{id:`safety-state-estop-${s}`,title:t("SafetyBar.SafetyState.ti"),name:t("SafetyBar.SafetyState.Estop.lb"),label:n?null:t("SafetyBar.SafetyState.Estop.lb"),icon:c.ForwardRef$6,color:l.palette.error.main,explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:a,anchorOrigin:o,transformOrigin:r});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return e.jsx(S,{id:`safety-state-stop-${s}`,icon:c.ForwardRef$9,title:t("SafetyBar.SafetyState.ti"),name:t("SafetyBar.SafetyState.Stop.lb"),label:n?null:t("SafetyBar.SafetyState.Stop.lb"),color:l.palette.warning.main,explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:a,anchorOrigin:o,transformOrigin:r});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return e.jsx(S,{id:`safety-state-manual-action-required-${s}`,icon:c.ForwardRef$7,color:l.palette.warning.main,title:t("SafetyBar.SafetyState.ti"),name:t("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:t("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:a,anchorOrigin:o,transformOrigin:r});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return e.jsx(S,{id:`safety-state-error-${s}`,icon:c.ForwardRef$5,color:l.palette.error.main,title:t("SafetyBar.SafetyState.ti"),name:t("SafetyBar.SafetyState.Error.lb"),label:n?null:t("SafetyBar.SafetyState.Error.lb"),explanation:e.jsx(i.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:a,anchorOrigin:o,transformOrigin:r});default:v(a,`Unknown safety state ${a}`)}}),w=h.externalizeComponent(d.observer(({isVirtual:a,motionGroupId:o,operationMode:r,safetyState:n,anchorOrigin:t,transformOrigin:l,compact:s=!0})=>{const p=s?1:2;return e.jsxs(T,{direction:"row",gap:p,alignItems:"center",sx:{height:"24px"},children:[e.jsx(F,{safetyState:n,anchorOrigin:t,transformOrigin:l,compact:s}),e.jsx(x,{orientation:"vertical",flexItem:!0}),e.jsx(R,{operationMode:r,anchorOrigin:t,transformOrigin:l,compact:s}),e.jsx(x,{orientation:"vertical",flexItem:!0}),e.jsx(O,{isVirtual:a,motionGroupId:o,anchorOrigin:t,transformOrigin:l,compact:s})]})}));exports.SafetyBar=w;exports.makeErrorMessage=M;
@@ -1,42 +1,41 @@
1
- import * as a from "three";
1
+ import * as t from "three";
2
2
  import { jsx as g } from "react/jsx-runtime";
3
- import { memo as m } from "react";
4
- import { I18nextProvider as S } from "react-i18next";
5
- import p from "i18next";
6
- import y from "i18next-browser-languagedetector";
7
- function I(e) {
3
+ import { I18nextProvider as m } from "react-i18next";
4
+ import S from "i18next";
5
+ import p from "i18next-browser-languagedetector";
6
+ function T(e) {
8
7
  try {
9
8
  return JSON.stringify(e);
10
9
  } catch {
11
10
  return;
12
11
  }
13
12
  }
14
- function v(e) {
15
- const t = e.length(), n = new a.Quaternion();
16
- if (t > 1e-6) {
17
- const o = e.clone().normalize();
18
- n.setFromAxisAngle(o, t);
13
+ function I(e) {
14
+ const o = e.length(), a = new t.Quaternion();
15
+ if (o > 1e-6) {
16
+ const n = e.clone().normalize();
17
+ a.setFromAxisAngle(n, o);
19
18
  }
20
- return n;
19
+ return a;
21
20
  }
22
- function J(e) {
21
+ function M(e) {
23
22
  if (!e || e.length === 0)
24
23
  return 5;
25
- const o = e.reduce((l, i) => l + Math.abs(i.a ?? 0) / 1e3 + Math.abs(i.d ?? 0) / 1e3, 0) * 2;
26
- return !Number.isFinite(o) || o <= 0 ? 5 : o;
24
+ const n = e.reduce((l, i) => l + Math.abs(i.a ?? 0) / 1e3 + Math.abs(i.d ?? 0) / 1e3, 0) * 2;
25
+ return !Number.isFinite(n) || n <= 0 ? 5 : n;
27
26
  }
28
- function A(e) {
27
+ function v(e) {
29
28
  if (e.length < 3)
30
29
  return console.log("Not enough vertices to define a plane"), { isCoplanar: !1 };
31
- const t = new a.Vector3(e[0].x, e[0].y, e[0].z), n = new a.Vector3(e[1].x, e[1].y, e[1].z), o = new a.Vector3(e[2].x, e[2].y, e[2].z), l = new a.Vector3().subVectors(n, t), i = new a.Vector3().subVectors(o, t), s = new a.Vector3().crossVectors(l, i).normalize();
30
+ const o = new t.Vector3(e[0].x, e[0].y, e[0].z), a = new t.Vector3(e[1].x, e[1].y, e[1].z), n = new t.Vector3(e[2].x, e[2].y, e[2].z), l = new t.Vector3().subVectors(a, o), i = new t.Vector3().subVectors(n, o), s = new t.Vector3().crossVectors(l, i).normalize();
32
31
  for (let r = 3; r < e.length; r++) {
33
- const b = new a.Vector3(e[r].x, e[r].y, e[r].z), d = new a.Vector3().subVectors(b, t), u = s.dot(d);
32
+ const b = new t.Vector3(e[r].x, e[r].y, e[r].z), d = new t.Vector3().subVectors(b, o), u = s.dot(d);
34
33
  if (Math.abs(u) > 1e-6)
35
34
  return console.log("Vertices are not on the same plane"), { isCoplanar: !1 };
36
35
  }
37
36
  return { isCoplanar: !0, normal: s };
38
37
  }
39
- const f = {
38
+ const y = {
40
39
  "Jogging.Cartesian.Translation.velocityMmPerSec.lb": "{{amount}} mm/s",
41
40
  "Jogging.Cartesian.Rotation.velocityDegPerSec.lb": "{{amount}}°/s",
42
41
  "Jogging.Velocity.lb": "Geschwindigkeit",
@@ -125,7 +124,7 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
125
124
  "RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb": "Voraussetzung nicht erfüllt",
126
125
  "RobotCard.Runtime.lb": "Laufzeit",
127
126
  "RobotCard.DriveToHome.bt": "Zur Home-Position fahren"
128
- }, h = {
127
+ }, f = {
129
128
  "Jogging.Cartesian.Translation.velocityMmPerSec.lb": "{{amount}} mm/s",
130
129
  "Jogging.Cartesian.Rotation.velocityDegPerSec.lb": "{{amount}}°/s",
131
130
  "Jogging.Velocity.lb": "Velocity",
@@ -214,15 +213,15 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
214
213
  "RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb": "Precondition not fulfilled",
215
214
  "RobotCard.Runtime.lb": "Runtime",
216
215
  "RobotCard.DriveToHome.bt": "Drive to Home"
217
- }, c = p.createInstance();
218
- c.use(y).init({
216
+ }, c = S.createInstance();
217
+ c.use(p).init({
219
218
  supportedLngs: ["en", "de"],
220
219
  resources: {
221
220
  en: {
222
- translations: h
221
+ translations: f
223
222
  },
224
223
  de: {
225
- translations: f
224
+ translations: y
226
225
  }
227
226
  },
228
227
  ns: ["translations"],
@@ -231,18 +230,17 @@ c.use(y).init({
231
230
  order: ["navigator", "htmlTag"]
232
231
  }
233
232
  });
234
- function E(e) {
235
- const t = m(e);
236
- return ((o) => /* @__PURE__ */ g(R, { children: /* @__PURE__ */ g(t, { ...o }) }));
233
+ function J(e) {
234
+ return ((a) => /* @__PURE__ */ g(h, { children: /* @__PURE__ */ g(e, { ...a }) }));
237
235
  }
238
- const R = ({
236
+ const h = ({
239
237
  children: e
240
- }) => /* @__PURE__ */ g(S, { i18n: c, children: e });
238
+ }) => /* @__PURE__ */ g(m, { i18n: c, children: e });
241
239
  export {
242
- J as d,
243
- E as e,
240
+ M as d,
241
+ J as e,
244
242
  c as i,
245
- v as o,
246
- I as t,
247
- A as v
243
+ I as o,
244
+ T as t,
245
+ v
248
246
  };
@@ -1,2 +1,2 @@
1
- "use strict";const m=require("three"),s=require("react/jsx-runtime"),S=require("react"),y=require("react-i18next"),p=require("i18next"),f=require("i18next-browser-languagedetector");function h(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const n=h(m);function R(e){try{return JSON.stringify(e)}catch{return}}function P(e){const t=e.length(),a=new n.Quaternion;if(t>1e-6){const o=e.clone().normalize();a.setFromAxisAngle(o,t)}return a}function C(e){if(!e||e.length===0)return 5;const o=e.reduce((l,i)=>l+Math.abs(i.a??0)/1e3+Math.abs(i.d??0)/1e3,0)*2;return!Number.isFinite(o)||o<=0?5:o}function T(e){if(e.length<3)return console.log("Not enough vertices to define a plane"),{isCoplanar:!1};const t=new n.Vector3(e[0].x,e[0].y,e[0].z),a=new n.Vector3(e[1].x,e[1].y,e[1].z),o=new n.Vector3(e[2].x,e[2].y,e[2].z),l=new n.Vector3().subVectors(a,t),i=new n.Vector3().subVectors(o,t),c=new n.Vector3().crossVectors(l,i).normalize();for(let r=3;r<e.length;r++){const b=new n.Vector3(e[r].x,e[r].y,e[r].z),u=new n.Vector3().subVectors(b,t),d=c.dot(u);if(Math.abs(d)>1e-6)return console.log("Vertices are not on the same plane"),{isCoplanar:!1}}return{isCoplanar:!0,normal:c}}const B={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Geschwindigkeit","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Blocked.ti":"Verbindung blockiert","Jogging.Blocked.lb":"Ein anderer Client kontrolliert das Jogging.","Jogging.Blocked.Reenable.bt":"Neu verbinden","Jogging.Cartesian.MotionType.lb":"Bewegungstyp","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Gelenkwerte","Jogging.Increment.Continuous.dd":"Fortlaufend","Jogging.Cartesian.Orientation.lb":"Orientierung","Jogging.JointLimitsReached.lb":"Gelenkgrenzen für Gelenk {{jointNumbers}} erreicht","Jogging.Orientation.coordsys":"Roboterbasis","Jogging.Orientation.tool":"Werkzeug","SafetyBar.ActivationToggle.Activate.bt":"Aktivieren","SafetyBar.ActivationToggle.Activated.bt":"Aktiviert","SafetyBar.ActivationToggle.Activating.bt":"Wird aktiviert…","SafetyBar.ActivationToggle.Deactivating.bt":"Wird deaktiviert…","SafetyBar.ControllerType.Physical.lb":"Physisch","SafetyBar.ControllerType.Virtual.lb":"Virtuell","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> ist ein physische Robotersteuerung. Für die Bewegung dieses Roboters sind <strong>Sicherheitsmaßnahmen</strong> aktiv.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> ist eine virtuelle Robotersteuerung ohne physisches Gegenstück. Der Roboter kann ohne Sicherheitsmaßnahmen bewegt werden.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatischer Betriebsmodus der Robotersteuerung aktiv. Automatisierte Bewegung ohne manuelle Bestätigung freigegeben.","SafetyBar.OperationMode.Automatic.ti":"Automatisch","SafetyBar.OperationMode.Error.Explanation.lb":"Fehler beim Abrufen des Betriebsmodus. Originalhandbediengerät des Roboters verwenden, um Fehler zu lösen.","SafetyBar.OperationMode.Error.lb":"Fehler","SafetyBar.OperationMode.Manual.Explanation.lb":`Die Robotersteuerung befindet sich im manuellen Betriebsmodus.
2
- Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabeschalter gedrückt werden muss, damit sich der Roboter erfolgreich bewegen kann.`,"SafetyBar.OperationMode.Manual.lb":"Manuell","SafetyBar.OperationMode.ti":"Betriebsmodus","SafetyBar.SafetyState.Error.Explanation.lb":"Die Robotersteuerung ist in einen unerwarteten Sicherheitszustand eingetreten.","SafetyBar.SafetyState.Error.lb":"Fehler","SafetyBar.SafetyState.Estop.lb":"NOT-AUS","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"Die Robotersteuerung ist in einen Sicherheitszustand eingetreten, der manuelle Maßnahmen zur Behebung erfordert.","SafetyBar.SafetyState.ManualActionRequired.lb":"Aktion erforderlich","SafetyBar.SafetyState.Normal.Explanation.lb":"Die Robotersteuerung befindet sich in einem sicheren Zustand. Roboterbewegungen sind möglich.","SafetyBar.SafetyState.Normal.lb":"Sicher","SafetyBar.SafetyState.Stop.Explanation.lb":"Die Robotersteuerung ist in einen Stoppzustand übergegangen. Bis der Stoppzustand aufgelöst ist, ist keine Bewegung mehr möglich.","SafetyBar.SafetyState.Stop.lb":"Stopp","SafetyBar.SafetyState.ti":"Sicherheitszustand","SafetyBar.StopState.Estop.Explanation.lb":"NOT-AUS aktiviert. NOT-AUS freischalten, um Roboter zu bewegen.","Jogging.Increment.hlb":"Schrittgröße","Jogging.CoordinateSystem.hlb":"Koordinatensystem","Jogging.Cartesian.bt":"Kartesisch","Jogging.Joints.bt":"Gelenke","Jogging.Velocity.bt":"Geschwindigkeit","CycleTimer.RemainingTime.lb":"Verbleibende Zeit","CycleTimer.OfTime.lb":"von {{time}}","CycleTimer.Time.lb":"{{time}}","CycleTimer.Error.lb":"Fehler","CycleTimer.WaitingForCycle.lb":"Warten auf Programmzyklus","CycleTimer.CycleTime.lb":"Zykluszeit","CycleTimer.Measuring.lb":"wird gemessen...","CycleTimer.Determined.lb":"bestimmt","Timer.error":"Fehler","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Weiter","ProgramControl.Retry.bt":"Wiederholen","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stopp","ProgramStateIndicator.Preparing.lb":"Vorbereitung","ProgramStateIndicator.Starting.lb":"Startet","ProgramStateIndicator.Running.lb":"In Betrieb","ProgramStateIndicator.Pausing.lb":"Pausiert","ProgramStateIndicator.Stopping.lb":"Stoppt","ProgramStateIndicator.Completed.lb":"Abgeschlossen","ProgramStateIndicator.Failed.lb":"Fehlgeschlagen","ProgramStateIndicator.Error.lb":"Fehler","ProgramStateIndicator.EStop.lb":"Not-Aus","ProgramStateIndicator.Idle.lb":"Leerlauf","ProgramStateIndicator.Paused.lb":"Pausiert","ProgramStateIndicator.Ready.lb":"Bereit","ProgramStateIndicator.Stopped.lb":"Gestoppt","ProgramStateIndicator.Auto.lb":"Auto","ProgramStateIndicator.Manual.lb":"Manuell","ProgramStateIndicator.ManualT1.lb":"Manuell T1","ProgramStateIndicator.ManualT2.lb":"Manuell T2","RobotSetupReadinessIndicator.Ready.lb":"Bereit","RobotSetupReadinessIndicator.RobotDisconnected.lb":"Roboter getrennt","RobotSetupReadinessIndicator.CellOpen.lb":"Zelle offen","RobotSetupReadinessIndicator.EStop.lb":"Not-Stopp","RobotSetupReadinessIndicator.ManualMode.lb":"Manueller Modus","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Voraussetzung nicht erfüllt","RobotCard.Runtime.lb":"Laufzeit","RobotCard.DriveToHome.bt":"Zur Home-Position fahren"},M={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Velocity","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Blocked.ti":"Connection blocked","Jogging.Blocked.lb":"Another client is currently controlling the jogging.","Jogging.Blocked.Reenable.bt":"Reconnect","Jogging.Cartesian.MotionType.lb":"Motion type","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Joint values","Jogging.Increment.Continuous.dd":"Continuous","Jogging.Cartesian.Orientation.lb":"Orientation","Jogging.Activating.lb":"Activating jogging","Jogging.JointLimitsReached.lb":"Joint limit reached for joint {{jointNumbers}}","Jogging.Orientation.coordsys":"Robot base","Jogging.Orientation.tool":"Tool","SafetyBar.ActivationToggle.Activate.bt":"Activate","SafetyBar.ActivationToggle.Activated.bt":"Activated","SafetyBar.ActivationToggle.Activating.bt":"Activating","SafetyBar.ActivationToggle.Deactivating.bt":"Deactivating","SafetyBar.ControllerType.Physical.lb":"Physical","SafetyBar.ControllerType.Virtual.lb":"Virtual","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> is a physical robot controller. <strong>Safety precautions</strong> are active for the movement of this robot.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> is a virtual robot controller with no physical counterpart. It can be freely manipulated without safety precautions.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatic operation mode active. Automated movement without manual confirmation enabled.","SafetyBar.OperationMode.Automatic.ti":"Automatic","SafetyBar.OperationMode.Error.Explanation.lb":"Failed to get operation mode. Use the original control panel to resolve the error.","SafetyBar.OperationMode.Error.lb":"Error","SafetyBar.OperationMode.Manual.Explanation.lb":"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully.","SafetyBar.OperationMode.Manual.lb":"Manual","SafetyBar.OperationMode.ti":"Operation mode","SafetyBar.SafetyState.Error.Explanation.lb":"The robot controller has entered an unexpected safety state.","SafetyBar.SafetyState.Error.lb":"Error","SafetyBar.SafetyState.Estop.lb":"E-Stop","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"The robot controller has entered a safety state requiring manual action to resolve.","SafetyBar.SafetyState.ManualActionRequired.lb":"Action required","SafetyBar.SafetyState.Normal.Explanation.lb":"The robot controller is in a safe state. Robot movement is enabled.","SafetyBar.SafetyState.Normal.lb":"Safe","SafetyBar.SafetyState.Stop.Explanation.lb":"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved.","SafetyBar.SafetyState.Stop.lb":"Stop","SafetyBar.SafetyState.ti":"Safety state","SafetyBar.StopState.Estop.Explanation.lb":"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released.","Jogging.Increment.hlb":"Increment","Jogging.CoordinateSystem.hlb":"Coordinate system","Jogging.Cartesian.bt":"Cartesian","Jogging.Joints.bt":"Joints","Jogging.Velocity.bt":"Velocity","CycleTimer.RemainingTime.lb":"Time remaining","CycleTimer.OfTime.lb":"of {{time}}","CycleTimer.Time.lb":"{{time}}","CycleTimer.Error.lb":"Error","CycleTimer.WaitingForCycle.lb":"Waiting for program cycle","CycleTimer.CycleTime.lb":"Cycle Time","CycleTimer.Measuring.lb":"measuring...","CycleTimer.Determined.lb":"determined","Timer.error":"Error","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Resume","ProgramControl.Retry.bt":"Retry","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stop","ProgramStateIndicator.Preparing.lb":"Preparing","ProgramStateIndicator.Starting.lb":"Starting","ProgramStateIndicator.Running.lb":"Running","ProgramStateIndicator.Pausing.lb":"Pausing","ProgramStateIndicator.Stopping.lb":"Stopping","ProgramStateIndicator.Completed.lb":"Completed","ProgramStateIndicator.Failed.lb":"Failed","ProgramStateIndicator.Error.lb":"Error","ProgramStateIndicator.EStop.lb":"E-Stop","ProgramStateIndicator.Idle.lb":"Idle","ProgramStateIndicator.Paused.lb":"Paused","ProgramStateIndicator.Ready.lb":"Ready","ProgramStateIndicator.Stopped.lb":"Stopped","ProgramStateIndicator.Auto.lb":"Auto","ProgramStateIndicator.Manual.lb":"Manual","ProgramStateIndicator.ManualT1.lb":"Manual T1","ProgramStateIndicator.ManualT2.lb":"Manual T2","RobotSetupReadinessIndicator.Ready.lb":"Ready","RobotSetupReadinessIndicator.RobotDisconnected.lb":"Robot disconnected","RobotSetupReadinessIndicator.CellOpen.lb":"Cell open","RobotSetupReadinessIndicator.EStop.lb":"E-Stop","RobotSetupReadinessIndicator.ManualMode.lb":"Manual mode","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Precondition not fulfilled","RobotCard.Runtime.lb":"Runtime","RobotCard.DriveToHome.bt":"Drive to Home"},g=p.createInstance();g.use(f).init({supportedLngs:["en","de"],resources:{en:{translations:M},de:{translations:B}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function I(e){const t=S.memo(e);return(o=>s.jsx(v,{children:s.jsx(t,{...o})}))}const v=({children:e})=>s.jsx(y.I18nextProvider,{i18n:g,children:e});exports.dhParametersToPlaneSize=C;exports.externalizeComponent=I;exports.i18n=g;exports.orientationToQuaternion=P;exports.tryStringifyJson=R;exports.verticesToCoplanarity=T;
1
+ "use strict";const m=require("three"),s=require("react/jsx-runtime"),S=require("react-i18next"),y=require("i18next"),p=require("i18next-browser-languagedetector");function f(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,a.get?a:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const n=f(m);function h(e){try{return JSON.stringify(e)}catch{return}}function R(e){const t=e.length(),o=new n.Quaternion;if(t>1e-6){const a=e.clone().normalize();o.setFromAxisAngle(a,t)}return o}function P(e){if(!e||e.length===0)return 5;const a=e.reduce((l,i)=>l+Math.abs(i.a??0)/1e3+Math.abs(i.d??0)/1e3,0)*2;return!Number.isFinite(a)||a<=0?5:a}function C(e){if(e.length<3)return console.log("Not enough vertices to define a plane"),{isCoplanar:!1};const t=new n.Vector3(e[0].x,e[0].y,e[0].z),o=new n.Vector3(e[1].x,e[1].y,e[1].z),a=new n.Vector3(e[2].x,e[2].y,e[2].z),l=new n.Vector3().subVectors(o,t),i=new n.Vector3().subVectors(a,t),c=new n.Vector3().crossVectors(l,i).normalize();for(let r=3;r<e.length;r++){const b=new n.Vector3(e[r].x,e[r].y,e[r].z),u=new n.Vector3().subVectors(b,t),d=c.dot(u);if(Math.abs(d)>1e-6)return console.log("Vertices are not on the same plane"),{isCoplanar:!1}}return{isCoplanar:!0,normal:c}}const T={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Geschwindigkeit","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Blocked.ti":"Verbindung blockiert","Jogging.Blocked.lb":"Ein anderer Client kontrolliert das Jogging.","Jogging.Blocked.Reenable.bt":"Neu verbinden","Jogging.Cartesian.MotionType.lb":"Bewegungstyp","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Gelenkwerte","Jogging.Increment.Continuous.dd":"Fortlaufend","Jogging.Cartesian.Orientation.lb":"Orientierung","Jogging.JointLimitsReached.lb":"Gelenkgrenzen für Gelenk {{jointNumbers}} erreicht","Jogging.Orientation.coordsys":"Roboterbasis","Jogging.Orientation.tool":"Werkzeug","SafetyBar.ActivationToggle.Activate.bt":"Aktivieren","SafetyBar.ActivationToggle.Activated.bt":"Aktiviert","SafetyBar.ActivationToggle.Activating.bt":"Wird aktiviert…","SafetyBar.ActivationToggle.Deactivating.bt":"Wird deaktiviert…","SafetyBar.ControllerType.Physical.lb":"Physisch","SafetyBar.ControllerType.Virtual.lb":"Virtuell","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> ist ein physische Robotersteuerung. Für die Bewegung dieses Roboters sind <strong>Sicherheitsmaßnahmen</strong> aktiv.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> ist eine virtuelle Robotersteuerung ohne physisches Gegenstück. Der Roboter kann ohne Sicherheitsmaßnahmen bewegt werden.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatischer Betriebsmodus der Robotersteuerung aktiv. Automatisierte Bewegung ohne manuelle Bestätigung freigegeben.","SafetyBar.OperationMode.Automatic.ti":"Automatisch","SafetyBar.OperationMode.Error.Explanation.lb":"Fehler beim Abrufen des Betriebsmodus. Originalhandbediengerät des Roboters verwenden, um Fehler zu lösen.","SafetyBar.OperationMode.Error.lb":"Fehler","SafetyBar.OperationMode.Manual.Explanation.lb":`Die Robotersteuerung befindet sich im manuellen Betriebsmodus.
2
+ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabeschalter gedrückt werden muss, damit sich der Roboter erfolgreich bewegen kann.`,"SafetyBar.OperationMode.Manual.lb":"Manuell","SafetyBar.OperationMode.ti":"Betriebsmodus","SafetyBar.SafetyState.Error.Explanation.lb":"Die Robotersteuerung ist in einen unerwarteten Sicherheitszustand eingetreten.","SafetyBar.SafetyState.Error.lb":"Fehler","SafetyBar.SafetyState.Estop.lb":"NOT-AUS","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"Die Robotersteuerung ist in einen Sicherheitszustand eingetreten, der manuelle Maßnahmen zur Behebung erfordert.","SafetyBar.SafetyState.ManualActionRequired.lb":"Aktion erforderlich","SafetyBar.SafetyState.Normal.Explanation.lb":"Die Robotersteuerung befindet sich in einem sicheren Zustand. Roboterbewegungen sind möglich.","SafetyBar.SafetyState.Normal.lb":"Sicher","SafetyBar.SafetyState.Stop.Explanation.lb":"Die Robotersteuerung ist in einen Stoppzustand übergegangen. Bis der Stoppzustand aufgelöst ist, ist keine Bewegung mehr möglich.","SafetyBar.SafetyState.Stop.lb":"Stopp","SafetyBar.SafetyState.ti":"Sicherheitszustand","SafetyBar.StopState.Estop.Explanation.lb":"NOT-AUS aktiviert. NOT-AUS freischalten, um Roboter zu bewegen.","Jogging.Increment.hlb":"Schrittgröße","Jogging.CoordinateSystem.hlb":"Koordinatensystem","Jogging.Cartesian.bt":"Kartesisch","Jogging.Joints.bt":"Gelenke","Jogging.Velocity.bt":"Geschwindigkeit","CycleTimer.RemainingTime.lb":"Verbleibende Zeit","CycleTimer.OfTime.lb":"von {{time}}","CycleTimer.Time.lb":"{{time}}","CycleTimer.Error.lb":"Fehler","CycleTimer.WaitingForCycle.lb":"Warten auf Programmzyklus","CycleTimer.CycleTime.lb":"Zykluszeit","CycleTimer.Measuring.lb":"wird gemessen...","CycleTimer.Determined.lb":"bestimmt","Timer.error":"Fehler","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Weiter","ProgramControl.Retry.bt":"Wiederholen","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stopp","ProgramStateIndicator.Preparing.lb":"Vorbereitung","ProgramStateIndicator.Starting.lb":"Startet","ProgramStateIndicator.Running.lb":"In Betrieb","ProgramStateIndicator.Pausing.lb":"Pausiert","ProgramStateIndicator.Stopping.lb":"Stoppt","ProgramStateIndicator.Completed.lb":"Abgeschlossen","ProgramStateIndicator.Failed.lb":"Fehlgeschlagen","ProgramStateIndicator.Error.lb":"Fehler","ProgramStateIndicator.EStop.lb":"Not-Aus","ProgramStateIndicator.Idle.lb":"Leerlauf","ProgramStateIndicator.Paused.lb":"Pausiert","ProgramStateIndicator.Ready.lb":"Bereit","ProgramStateIndicator.Stopped.lb":"Gestoppt","ProgramStateIndicator.Auto.lb":"Auto","ProgramStateIndicator.Manual.lb":"Manuell","ProgramStateIndicator.ManualT1.lb":"Manuell T1","ProgramStateIndicator.ManualT2.lb":"Manuell T2","RobotSetupReadinessIndicator.Ready.lb":"Bereit","RobotSetupReadinessIndicator.RobotDisconnected.lb":"Roboter getrennt","RobotSetupReadinessIndicator.CellOpen.lb":"Zelle offen","RobotSetupReadinessIndicator.EStop.lb":"Not-Stopp","RobotSetupReadinessIndicator.ManualMode.lb":"Manueller Modus","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Voraussetzung nicht erfüllt","RobotCard.Runtime.lb":"Laufzeit","RobotCard.DriveToHome.bt":"Zur Home-Position fahren"},B={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Velocity","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Blocked.ti":"Connection blocked","Jogging.Blocked.lb":"Another client is currently controlling the jogging.","Jogging.Blocked.Reenable.bt":"Reconnect","Jogging.Cartesian.MotionType.lb":"Motion type","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Joint values","Jogging.Increment.Continuous.dd":"Continuous","Jogging.Cartesian.Orientation.lb":"Orientation","Jogging.Activating.lb":"Activating jogging","Jogging.JointLimitsReached.lb":"Joint limit reached for joint {{jointNumbers}}","Jogging.Orientation.coordsys":"Robot base","Jogging.Orientation.tool":"Tool","SafetyBar.ActivationToggle.Activate.bt":"Activate","SafetyBar.ActivationToggle.Activated.bt":"Activated","SafetyBar.ActivationToggle.Activating.bt":"Activating","SafetyBar.ActivationToggle.Deactivating.bt":"Deactivating","SafetyBar.ControllerType.Physical.lb":"Physical","SafetyBar.ControllerType.Virtual.lb":"Virtual","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> is a physical robot controller. <strong>Safety precautions</strong> are active for the movement of this robot.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> is a virtual robot controller with no physical counterpart. It can be freely manipulated without safety precautions.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatic operation mode active. Automated movement without manual confirmation enabled.","SafetyBar.OperationMode.Automatic.ti":"Automatic","SafetyBar.OperationMode.Error.Explanation.lb":"Failed to get operation mode. Use the original control panel to resolve the error.","SafetyBar.OperationMode.Error.lb":"Error","SafetyBar.OperationMode.Manual.Explanation.lb":"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully.","SafetyBar.OperationMode.Manual.lb":"Manual","SafetyBar.OperationMode.ti":"Operation mode","SafetyBar.SafetyState.Error.Explanation.lb":"The robot controller has entered an unexpected safety state.","SafetyBar.SafetyState.Error.lb":"Error","SafetyBar.SafetyState.Estop.lb":"E-Stop","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"The robot controller has entered a safety state requiring manual action to resolve.","SafetyBar.SafetyState.ManualActionRequired.lb":"Action required","SafetyBar.SafetyState.Normal.Explanation.lb":"The robot controller is in a safe state. Robot movement is enabled.","SafetyBar.SafetyState.Normal.lb":"Safe","SafetyBar.SafetyState.Stop.Explanation.lb":"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved.","SafetyBar.SafetyState.Stop.lb":"Stop","SafetyBar.SafetyState.ti":"Safety state","SafetyBar.StopState.Estop.Explanation.lb":"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released.","Jogging.Increment.hlb":"Increment","Jogging.CoordinateSystem.hlb":"Coordinate system","Jogging.Cartesian.bt":"Cartesian","Jogging.Joints.bt":"Joints","Jogging.Velocity.bt":"Velocity","CycleTimer.RemainingTime.lb":"Time remaining","CycleTimer.OfTime.lb":"of {{time}}","CycleTimer.Time.lb":"{{time}}","CycleTimer.Error.lb":"Error","CycleTimer.WaitingForCycle.lb":"Waiting for program cycle","CycleTimer.CycleTime.lb":"Cycle Time","CycleTimer.Measuring.lb":"measuring...","CycleTimer.Determined.lb":"determined","Timer.error":"Error","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Resume","ProgramControl.Retry.bt":"Retry","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stop","ProgramStateIndicator.Preparing.lb":"Preparing","ProgramStateIndicator.Starting.lb":"Starting","ProgramStateIndicator.Running.lb":"Running","ProgramStateIndicator.Pausing.lb":"Pausing","ProgramStateIndicator.Stopping.lb":"Stopping","ProgramStateIndicator.Completed.lb":"Completed","ProgramStateIndicator.Failed.lb":"Failed","ProgramStateIndicator.Error.lb":"Error","ProgramStateIndicator.EStop.lb":"E-Stop","ProgramStateIndicator.Idle.lb":"Idle","ProgramStateIndicator.Paused.lb":"Paused","ProgramStateIndicator.Ready.lb":"Ready","ProgramStateIndicator.Stopped.lb":"Stopped","ProgramStateIndicator.Auto.lb":"Auto","ProgramStateIndicator.Manual.lb":"Manual","ProgramStateIndicator.ManualT1.lb":"Manual T1","ProgramStateIndicator.ManualT2.lb":"Manual T2","RobotSetupReadinessIndicator.Ready.lb":"Ready","RobotSetupReadinessIndicator.RobotDisconnected.lb":"Robot disconnected","RobotSetupReadinessIndicator.CellOpen.lb":"Cell open","RobotSetupReadinessIndicator.EStop.lb":"E-Stop","RobotSetupReadinessIndicator.ManualMode.lb":"Manual mode","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Precondition not fulfilled","RobotCard.Runtime.lb":"Runtime","RobotCard.DriveToHome.bt":"Drive to Home"},g=y.createInstance();g.use(p).init({supportedLngs:["en","de"],resources:{en:{translations:B},de:{translations:T}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function I(e){return(o=>s.jsx(M,{children:s.jsx(e,{...o})}))}const M=({children:e})=>s.jsx(S.I18nextProvider,{i18n:g,children:e});exports.dhParametersToPlaneSize=P;exports.externalizeComponent=I;exports.i18n=g;exports.orientationToQuaternion=R;exports.tryStringifyJson=h;exports.verticesToCoplanarity=C;
@@ -1 +1 @@
1
- "use strict";const u=require("react/jsx-runtime"),P=require("@mui/material/styles"),V=require("@mui/material/Chip"),_=require("@mui/material/Typography"),C=require("mobx-react-lite"),x=require("react-i18next"),O=require("./externalizeComponent-BHZdH14U.cjs"),N=require("@mui/icons-material/Pause"),I=require("@mui/icons-material/PlayArrow"),S=require("@mui/icons-material/Stop"),b=require("@mui/material/Box"),v=require("@mui/material/Button"),f=require("mobx"),m=require("react");var c=(e=>(e.IDLE="idle",e.PREPARING="preparing",e.STARTING="starting",e.RUNNING="running",e.PAUSING="pausing",e.PAUSED="paused",e.STOPPING="stopping",e.COMPLETED="completed",e.FAILED="failed",e.STOPPED="stopped",e.ERROR="error",e))(c||{});const M=O.externalizeComponent(C.observer(({state:e,onRun:t,onPause:n,onStop:s,onReset:a,requiresManualReset:r=!1,variant:o="with_pause",className:h})=>{const l=P.useTheme(),{t:g}=x.useTranslation(),d=()=>{const i={run:{enabled:e==="idle"||e==="stopped"||e==="paused"||e==="completed"||e==="failed"||e==="error",label:g(e==="paused"?"ProgramControl.Resume.bt":e==="error"||e==="failed"?"ProgramControl.Retry.bt":"ProgramControl.Start.bt"),color:l.palette.success.main,onClick:t},pause:{enabled:e==="running",label:g("ProgramControl.Pause.bt"),color:"#FFFFFF33",onClick:n||(()=>{})},stop:{enabled:e==="preparing"||e==="starting"||e==="running"||e==="pausing"||e==="paused",label:g("ProgramControl.Stop.bt"),color:l.palette.error.main,onClick:s}};return o==="without_pause"?[i.run,i.stop]:[i.run,i.pause,i.stop]},E=i=>{const p={sx:{fontSize:"55px"}};if(o==="without_pause")return i===0?u.jsx(I,{...p}):u.jsx(S,{...p});switch(i){case 0:return u.jsx(I,{...p});case 1:return u.jsx(N,{...p});case 2:return u.jsx(S,{...p});default:return null}},A=d();return u.jsx(b,{className:h,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:u.jsx(b,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:A.map((i,p)=>u.jsxs(b,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[u.jsx(v,{variant:"contained",disabled:!i.enabled||e==="preparing"||e==="starting"||e==="pausing"||e==="stopping"&&!r,onClick:i.onClick,sx:{width:"88px",height:"88px",borderRadius:"88px",backgroundColor:i.color,opacity:i.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!r)?1:.3,"&:hover":{backgroundColor:i.color,opacity:i.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!r)?.8:.3},"&:disabled":{backgroundColor:i.color,opacity:.3},minWidth:"88px",flexShrink:0},children:E(p)}),u.jsx(_,{variant:"body1",sx:{color:i.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!r)?i.color:l.palette.text.disabled,textAlign:"center",opacity:i.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!r)?1:.3},children:i.label})]},i.label))})})})),Y=O.externalizeComponent(C.observer(({programState:e,safetyState:t,operationMode:n,className:s})=>{const a=P.useTheme(),{t:r}=x.useTranslation(),o=()=>{if(t==="SAFETY_STATE_DEVICE_EMERGENCY_STOP"||t==="SAFETY_STATE_ROBOT_EMERGENCY_STOP"||t==="SAFETY_STATE_STOP_0"||t==="SAFETY_STATE_STOP_1"||t==="SAFETY_STATE_STOP_2"||t==="SAFETY_STATE_PROTECTIVE_STOP"||t==="SAFETY_STATE_STOP"||t==="SAFETY_STATE_REDUCED"||t==="SAFETY_STATE_MASTERING"||t==="SAFETY_STATE_CONFIRM_SAFETY"||t==="SAFETY_STATE_OPERATOR_SAFETY"||t==="SAFETY_STATE_RECOVERY"||t==="SAFETY_STATE_VIOLATION")return{label:r("ProgramStateIndicator.EStop.lb"),color:a.palette.error.main};if(t==="SAFETY_STATE_UNKNOWN"||t==="SAFETY_STATE_FAULT")return{label:r("ProgramStateIndicator.Error.lb"),color:a.palette.error.main};if(t==="SAFETY_STATE_NORMAL")switch(e){case c.PREPARING:return{label:r("ProgramStateIndicator.Preparing.lb"),color:a.palette.warning.main};case c.STARTING:return{label:r("ProgramStateIndicator.Starting.lb"),color:a.palette.warning.main};case c.RUNNING:return{label:r("ProgramStateIndicator.Running.lb"),color:a.palette.success.main};case c.PAUSING:return{label:r("ProgramStateIndicator.Pausing.lb"),color:a.palette.warning.main};case c.PAUSED:return{label:r("ProgramStateIndicator.Paused.lb"),color:a.palette.grey[600]};case c.STOPPING:return{label:r("ProgramStateIndicator.Stopping.lb"),color:a.palette.warning.main};case c.COMPLETED:return{label:r("ProgramStateIndicator.Completed.lb"),color:a.palette.success.main};case c.FAILED:return{label:r("ProgramStateIndicator.Failed.lb"),color:a.palette.error.main};case c.STOPPED:return{label:r("ProgramStateIndicator.Stopped.lb"),color:a.palette.warning.main};case c.ERROR:return{label:r("ProgramStateIndicator.Error.lb"),color:a.palette.error.main};default:return{label:r("ProgramStateIndicator.Ready.lb"),color:a.palette.success.main}}return{label:r("ProgramStateIndicator.Idle.lb"),color:a.palette.grey[600]}},{label:h,color:l}=o(),d=`${h} / ${(()=>{switch(n){case"OPERATION_MODE_AUTO":return r("ProgramStateIndicator.Auto.lb");case"OPERATION_MODE_MANUAL":return r("ProgramStateIndicator.Manual.lb");case"OPERATION_MODE_MANUAL_T1":return r("ProgramStateIndicator.ManualT1.lb");case"OPERATION_MODE_MANUAL_T2":return r("ProgramStateIndicator.ManualT2.lb");default:return r("ProgramStateIndicator.Auto.lb")}})()}`;return u.jsx(V,{className:s,label:u.jsx(_,{variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2},children:d}),variant:"filled",sx:{backgroundColor:l,color:a.palette.getContrastText(l),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})}));function T(e){m.useEffect(e,[])}function D(e){T(()=>f.autorun(e))}function U(e,t,n){T(()=>f.reaction(e,t,n))}function w(e){return T(()=>{let t;function n(){e(),t=requestAnimationFrame(n)}return t=requestAnimationFrame(n),()=>{cancelAnimationFrame(t)}})}class F{constructor(t=[],n={}){this.currentValues=[],this.targetValues=[],this.previousTargetValues=[],this.targetUpdateTime=0,this.animationId=null,this.updateCount=0,this.velocities=[],this.animate=()=>{this.update(.016666666666666666)?this.animationId=null:this.animationId=requestAnimationFrame(this.animate)},this.options={tension:120,friction:20,threshold:.001,onChange:()=>{},onComplete:()=>{},...n},this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0}update(t=1/60){let n=!1,s=!0;this.updateCount++;const a=Math.min(t,1/15),r=this.updateCount===1?.7:1;for(let o=0;o<this.currentValues.length;o++){const h=this.currentValues[o],l=this.targetValues[o],g=this.velocities[o],d=l-h,E=d*this.options.tension*r,A=g*this.options.friction,i=E-A,p=g+i*a,R=h+p*a;Math.abs(d)<this.options.threshold&&Math.abs(p)<this.options.threshold*10?this.currentValues[o]!==l&&(this.currentValues[o]=l,this.velocities[o]=0,n=!0):(s=!1,this.currentValues[o]=R,this.velocities[o]=p,n=!0)}return n&&this.options.onChange(this.currentValues),s&&this.options.onComplete(this.currentValues),s}setTarget(t){const n=performance.now(),s=n-this.targetUpdateTime;this.previousTargetValues=[...this.targetValues],this.targetValues=[...t],this.targetUpdateTime=n,this.updateCount=0;const a=this.previousTargetValues.every((r,o)=>r===this.currentValues[o]);if(s<8&&s>0&&this.previousTargetValues.length>0&&!a){const r=Math.min(s/8,1);for(let o=0;o<this.targetValues.length;o++){const h=this.previousTargetValues[o]||0,l=t[o]||0;Math.abs(l-h)>.1&&(this.targetValues[o]=h+(l-h)*r)}}for(;this.currentValues.length<t.length;)this.currentValues.push(t[this.currentValues.length]),this.velocities.push(0);this.currentValues.length>t.length&&(this.currentValues=this.currentValues.slice(0,t.length),this.velocities=this.velocities.slice(0,t.length))}getCurrentValues(){return[...this.currentValues]}getValue(t){return this.currentValues[t]??0}isInterpolating(){return this.animationId!==null}stop(){this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null)}setImmediate(t){this.stop(),this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0,this.options.onChange(this.currentValues)}updateOptions(t){this.options={...this.options,...t}}startAutoInterpolation(){this.startInterpolation()}destroy(){this.stop()}startInterpolation(){this.animationId===null&&this.animate()}}function j(e=[],t={}){const n=m.useRef(null);return n.current||(n.current=new F(e,t)),m.useEffect(()=>{var s;(s=n.current)==null||s.updateOptions(t)},[t]),m.useEffect(()=>()=>{var s;(s=n.current)==null||s.destroy()},[]),[n.current]}exports.ProgramControl=M;exports.ProgramState=c;exports.ProgramStateIndicator=Y;exports.ValueInterpolator=F;exports.useAnimationFrame=w;exports.useAutorun=D;exports.useInterpolation=j;exports.useMounted=T;exports.useReaction=U;
1
+ "use strict";const u=require("react/jsx-runtime"),P=require("@mui/material/styles"),V=require("@mui/material/Chip"),_=require("@mui/material/Typography"),C=require("mobx-react-lite"),x=require("react-i18next"),O=require("./externalizeComponent-UnCHtc94.cjs"),N=require("@mui/icons-material/Pause"),I=require("@mui/icons-material/PlayArrow"),S=require("@mui/icons-material/Stop"),b=require("@mui/material/Box"),v=require("@mui/material/Button"),f=require("mobx"),m=require("react");var c=(e=>(e.IDLE="idle",e.PREPARING="preparing",e.STARTING="starting",e.RUNNING="running",e.PAUSING="pausing",e.PAUSED="paused",e.STOPPING="stopping",e.COMPLETED="completed",e.FAILED="failed",e.STOPPED="stopped",e.ERROR="error",e))(c||{});const M=O.externalizeComponent(C.observer(({state:e,onRun:t,onPause:n,onStop:s,onReset:a,requiresManualReset:r=!1,variant:o="with_pause",className:h})=>{const l=P.useTheme(),{t:g}=x.useTranslation(),d=()=>{const i={run:{enabled:e==="idle"||e==="stopped"||e==="paused"||e==="completed"||e==="failed"||e==="error",label:g(e==="paused"?"ProgramControl.Resume.bt":e==="error"||e==="failed"?"ProgramControl.Retry.bt":"ProgramControl.Start.bt"),color:l.palette.success.main,onClick:t},pause:{enabled:e==="running",label:g("ProgramControl.Pause.bt"),color:"#FFFFFF33",onClick:n||(()=>{})},stop:{enabled:e==="preparing"||e==="starting"||e==="running"||e==="pausing"||e==="paused",label:g("ProgramControl.Stop.bt"),color:l.palette.error.main,onClick:s}};return o==="without_pause"?[i.run,i.stop]:[i.run,i.pause,i.stop]},E=i=>{const p={sx:{fontSize:"55px"}};if(o==="without_pause")return i===0?u.jsx(I,{...p}):u.jsx(S,{...p});switch(i){case 0:return u.jsx(I,{...p});case 1:return u.jsx(N,{...p});case 2:return u.jsx(S,{...p});default:return null}},A=d();return u.jsx(b,{className:h,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:u.jsx(b,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:A.map((i,p)=>u.jsxs(b,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[u.jsx(v,{variant:"contained",disabled:!i.enabled||e==="preparing"||e==="starting"||e==="pausing"||e==="stopping"&&!r,onClick:i.onClick,sx:{width:"88px",height:"88px",borderRadius:"88px",backgroundColor:i.color,opacity:i.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!r)?1:.3,"&:hover":{backgroundColor:i.color,opacity:i.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!r)?.8:.3},"&:disabled":{backgroundColor:i.color,opacity:.3},minWidth:"88px",flexShrink:0},children:E(p)}),u.jsx(_,{variant:"body1",sx:{color:i.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!r)?i.color:l.palette.text.disabled,textAlign:"center",opacity:i.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!r)?1:.3},children:i.label})]},i.label))})})})),Y=O.externalizeComponent(C.observer(({programState:e,safetyState:t,operationMode:n,className:s})=>{const a=P.useTheme(),{t:r}=x.useTranslation(),o=()=>{if(t==="SAFETY_STATE_DEVICE_EMERGENCY_STOP"||t==="SAFETY_STATE_ROBOT_EMERGENCY_STOP"||t==="SAFETY_STATE_STOP_0"||t==="SAFETY_STATE_STOP_1"||t==="SAFETY_STATE_STOP_2"||t==="SAFETY_STATE_PROTECTIVE_STOP"||t==="SAFETY_STATE_STOP"||t==="SAFETY_STATE_REDUCED"||t==="SAFETY_STATE_MASTERING"||t==="SAFETY_STATE_CONFIRM_SAFETY"||t==="SAFETY_STATE_OPERATOR_SAFETY"||t==="SAFETY_STATE_RECOVERY"||t==="SAFETY_STATE_VIOLATION")return{label:r("ProgramStateIndicator.EStop.lb"),color:a.palette.error.main};if(t==="SAFETY_STATE_UNKNOWN"||t==="SAFETY_STATE_FAULT")return{label:r("ProgramStateIndicator.Error.lb"),color:a.palette.error.main};if(t==="SAFETY_STATE_NORMAL")switch(e){case c.PREPARING:return{label:r("ProgramStateIndicator.Preparing.lb"),color:a.palette.warning.main};case c.STARTING:return{label:r("ProgramStateIndicator.Starting.lb"),color:a.palette.warning.main};case c.RUNNING:return{label:r("ProgramStateIndicator.Running.lb"),color:a.palette.success.main};case c.PAUSING:return{label:r("ProgramStateIndicator.Pausing.lb"),color:a.palette.warning.main};case c.PAUSED:return{label:r("ProgramStateIndicator.Paused.lb"),color:a.palette.grey[600]};case c.STOPPING:return{label:r("ProgramStateIndicator.Stopping.lb"),color:a.palette.warning.main};case c.COMPLETED:return{label:r("ProgramStateIndicator.Completed.lb"),color:a.palette.success.main};case c.FAILED:return{label:r("ProgramStateIndicator.Failed.lb"),color:a.palette.error.main};case c.STOPPED:return{label:r("ProgramStateIndicator.Stopped.lb"),color:a.palette.warning.main};case c.ERROR:return{label:r("ProgramStateIndicator.Error.lb"),color:a.palette.error.main};default:return{label:r("ProgramStateIndicator.Ready.lb"),color:a.palette.success.main}}return{label:r("ProgramStateIndicator.Idle.lb"),color:a.palette.grey[600]}},{label:h,color:l}=o(),d=`${h} / ${(()=>{switch(n){case"OPERATION_MODE_AUTO":return r("ProgramStateIndicator.Auto.lb");case"OPERATION_MODE_MANUAL":return r("ProgramStateIndicator.Manual.lb");case"OPERATION_MODE_MANUAL_T1":return r("ProgramStateIndicator.ManualT1.lb");case"OPERATION_MODE_MANUAL_T2":return r("ProgramStateIndicator.ManualT2.lb");default:return r("ProgramStateIndicator.Auto.lb")}})()}`;return u.jsx(V,{className:s,label:u.jsx(_,{variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2},children:d}),variant:"filled",sx:{backgroundColor:l,color:a.palette.getContrastText(l),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})}));function T(e){m.useEffect(e,[])}function D(e){T(()=>f.autorun(e))}function U(e,t,n){T(()=>f.reaction(e,t,n))}function w(e){return T(()=>{let t;function n(){e(),t=requestAnimationFrame(n)}return t=requestAnimationFrame(n),()=>{cancelAnimationFrame(t)}})}class F{constructor(t=[],n={}){this.currentValues=[],this.targetValues=[],this.previousTargetValues=[],this.targetUpdateTime=0,this.animationId=null,this.updateCount=0,this.velocities=[],this.animate=()=>{this.update(.016666666666666666)?this.animationId=null:this.animationId=requestAnimationFrame(this.animate)},this.options={tension:120,friction:20,threshold:.001,onChange:()=>{},onComplete:()=>{},...n},this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0}update(t=1/60){let n=!1,s=!0;this.updateCount++;const a=Math.min(t,1/15),r=this.updateCount===1?.7:1;for(let o=0;o<this.currentValues.length;o++){const h=this.currentValues[o],l=this.targetValues[o],g=this.velocities[o],d=l-h,E=d*this.options.tension*r,A=g*this.options.friction,i=E-A,p=g+i*a,R=h+p*a;Math.abs(d)<this.options.threshold&&Math.abs(p)<this.options.threshold*10?this.currentValues[o]!==l&&(this.currentValues[o]=l,this.velocities[o]=0,n=!0):(s=!1,this.currentValues[o]=R,this.velocities[o]=p,n=!0)}return n&&this.options.onChange(this.currentValues),s&&this.options.onComplete(this.currentValues),s}setTarget(t){const n=performance.now(),s=n-this.targetUpdateTime;this.previousTargetValues=[...this.targetValues],this.targetValues=[...t],this.targetUpdateTime=n,this.updateCount=0;const a=this.previousTargetValues.every((r,o)=>r===this.currentValues[o]);if(s<8&&s>0&&this.previousTargetValues.length>0&&!a){const r=Math.min(s/8,1);for(let o=0;o<this.targetValues.length;o++){const h=this.previousTargetValues[o]||0,l=t[o]||0;Math.abs(l-h)>.1&&(this.targetValues[o]=h+(l-h)*r)}}for(;this.currentValues.length<t.length;)this.currentValues.push(t[this.currentValues.length]),this.velocities.push(0);this.currentValues.length>t.length&&(this.currentValues=this.currentValues.slice(0,t.length),this.velocities=this.velocities.slice(0,t.length))}getCurrentValues(){return[...this.currentValues]}getValue(t){return this.currentValues[t]??0}isInterpolating(){return this.animationId!==null}stop(){this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null)}setImmediate(t){this.stop(),this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0,this.options.onChange(this.currentValues)}updateOptions(t){this.options={...this.options,...t}}startAutoInterpolation(){this.startInterpolation()}destroy(){this.stop()}startInterpolation(){this.animationId===null&&this.animate()}}function j(e=[],t={}){const n=m.useRef(null);return n.current||(n.current=new F(e,t)),m.useEffect(()=>{var s;(s=n.current)==null||s.updateOptions(t)},[t]),m.useEffect(()=>()=>{var s;(s=n.current)==null||s.destroy()},[]),[n.current]}exports.ProgramControl=M;exports.ProgramState=c;exports.ProgramStateIndicator=Y;exports.ValueInterpolator=F;exports.useAnimationFrame=w;exports.useAutorun=D;exports.useInterpolation=j;exports.useMounted=T;exports.useReaction=U;
@@ -4,7 +4,7 @@ import R from "@mui/material/Chip";
4
4
  import _ from "@mui/material/Typography";
5
5
  import { observer as P } from "mobx-react-lite";
6
6
  import { useTranslation as C } from "react-i18next";
7
- import { e as O } from "./externalizeComponent-D6S3WLFc.js";
7
+ import { e as O } from "./externalizeComponent-BuuzAqKe.js";
8
8
  import x from "@mui/icons-material/Pause";
9
9
  import I from "@mui/icons-material/PlayArrow";
10
10
  import S from "@mui/icons-material/Stop";