@wandelbots/wandelbots-js-react-components 6.3.0 → 6.4.0-pr.feat-jogging-gizmo.649.8c3cbf8

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.
Files changed (99) hide show
  1. package/README.md +202 -120
  2. package/dist/3d.cjs +1 -1
  3. package/dist/3d.d.ts +3 -3
  4. package/dist/3d.js +19 -22
  5. package/dist/SafetyBar/index.cjs +1 -1
  6. package/dist/SafetyBar/index.js +1 -1
  7. package/dist/chunks/ConnectedMotionGroup-_YUOhOLL.cjs +4 -0
  8. package/dist/chunks/ConnectedMotionGroup-neDeA3uW.js +2617 -0
  9. package/dist/chunks/Robot-CvviE5MR.js +1684 -0
  10. package/dist/chunks/Robot-VZaqKPxi.cjs +1 -0
  11. package/dist/chunks/{SafetyBar-Cy9DiXp9.js → SafetyBar-B9OQgerp.js} +1 -1
  12. package/dist/chunks/{SafetyBar-DPrv_OQA.cjs → SafetyBar-D7QT6J0m.cjs} +1 -1
  13. package/dist/chunks/{externalizeComponent-EDymnaGR.js → externalizeComponent-CZu38L-d.js} +29 -105
  14. package/dist/chunks/externalizeComponent-CdX5L_lW.cjs +2 -0
  15. package/dist/chunks/useSmoothedMotionState-BidFV3kQ.js +255 -0
  16. package/dist/chunks/useSmoothedMotionState-CdhkBCqt.cjs +1 -0
  17. package/dist/components/AppHeader.d.ts +1 -1
  18. package/dist/components/jogging/JoggingCartesianAxisControl.d.ts +1 -1
  19. package/dist/components/jogging/JoggingJointTab.d.ts +1 -1
  20. package/dist/components/jogging/JoggingPanel.d.ts +6 -3
  21. package/dist/components/jogging/JoggingStore.d.ts +5 -1
  22. package/dist/components/jogging/gizmo/JoggingGizmo.d.ts +42 -0
  23. package/dist/components/jogging/gizmo/JoggingGizmoOrientation.d.ts +31 -0
  24. package/dist/components/jogging/gizmo/gizmoShared.d.ts +60 -0
  25. package/dist/components/jogging/gizmo/gizmoTranslation.d.ts +11 -0
  26. package/dist/components/jogging/gizmo/jogGizmoProjection.d.ts +65 -0
  27. package/dist/components/jogging/jogHandle.d.ts +26 -0
  28. package/dist/components/jogging/joggingColors.d.ts +18 -0
  29. package/dist/components/jogging/useHold.d.ts +33 -0
  30. package/dist/components/jogging/useHoldToJog.d.ts +23 -0
  31. package/dist/components/robots/GenericRobot.d.ts +2 -1
  32. package/dist/components/robots/LinearAxis.d.ts +1 -1
  33. package/dist/components/robots/LinearAxisAnimator.d.ts +11 -2
  34. package/dist/components/robots/Robot.d.ts +1 -1
  35. package/dist/components/robots/robotModelLogic.d.ts +11 -9
  36. package/dist/components/utils/hooks.d.ts +1 -6
  37. package/dist/core.cjs +1 -1
  38. package/dist/core.d.ts +3 -18
  39. package/dist/core.js +27 -54
  40. package/dist/index.cjs +1 -1
  41. package/dist/index.js +42 -72
  42. package/dist/lib/ConnectedMotionGroup.d.ts +5 -7
  43. package/dist/lib/JoggerConnection.d.ts +29 -5
  44. package/dist/lib/MotionStreamConnection.d.ts +4 -6
  45. package/dist/lib/novaConnection.d.ts +23 -0
  46. package/package.json +31 -66
  47. package/dist/Setup.d.ts +0 -11
  48. package/dist/chunks/MotionGroupVisualizer-DshWR1wY.js +0 -1653
  49. package/dist/chunks/MotionGroupVisualizer-eD7yFEcF.cjs +0 -1
  50. package/dist/chunks/externalizeComponent-OO4jcrz5.cjs +0 -2
  51. package/dist/chunks/theming-DfSy4-Ic.cjs +0 -4
  52. package/dist/chunks/theming-mF9Rt8SS.js +0 -5542
  53. package/dist/chunks/useSmoothedMotionState-DyDgSVYX.js +0 -478
  54. package/dist/chunks/useSmoothedMotionState-VYxEIyfr.cjs +0 -1
  55. package/dist/components/3d-viewport/CoordinateSystemTransform.d.ts +0 -11
  56. package/dist/components/AdornedTextField.d.ts +0 -7
  57. package/dist/components/CopyableText.d.ts +0 -6
  58. package/dist/components/CycleTimer/CycleTimer.d.ts +0 -3
  59. package/dist/components/CycleTimer/DefaultVariant.d.ts +0 -9
  60. package/dist/components/CycleTimer/SmallVariant.d.ts +0 -10
  61. package/dist/components/CycleTimer/index.d.ts +0 -27
  62. package/dist/components/CycleTimer/types.d.ts +0 -49
  63. package/dist/components/CycleTimer/useAnimations.d.ts +0 -14
  64. package/dist/components/CycleTimer/useTimerLogic.d.ts +0 -24
  65. package/dist/components/CycleTimer/utils.d.ts +0 -21
  66. package/dist/components/CycleTimer.d.ts +0 -3
  67. package/dist/components/DataGrid.d.ts +0 -66
  68. package/dist/components/LogPanel.d.ts +0 -38
  69. package/dist/components/LogStore.d.ts +0 -12
  70. package/dist/components/LogViewer.d.ts +0 -46
  71. package/dist/components/ProgramControl.d.ts +0 -55
  72. package/dist/components/ProgramStateIndicator.d.ts +0 -26
  73. package/dist/components/RobotCard.d.ts +0 -98
  74. package/dist/components/RobotListItem.d.ts +0 -34
  75. package/dist/components/RobotSetupReadinessIndicator.d.ts +0 -37
  76. package/dist/components/SelectableFab.d.ts +0 -7
  77. package/dist/components/TabBar.d.ts +0 -45
  78. package/dist/components/ThemeSelect.d.ts +0 -6
  79. package/dist/components/Timer/Timer.d.ts +0 -3
  80. package/dist/components/Timer/TimerDefaultVariant.d.ts +0 -9
  81. package/dist/components/Timer/TimerSmallVariant.d.ts +0 -10
  82. package/dist/components/Timer/index.d.ts +0 -19
  83. package/dist/components/Timer/types.d.ts +0 -35
  84. package/dist/components/Timer/useTimerAnimations.d.ts +0 -10
  85. package/dist/components/Timer/useTimerLogic.d.ts +0 -19
  86. package/dist/components/Timer/utils.d.ts +0 -17
  87. package/dist/components/Timer.d.ts +0 -3
  88. package/dist/components/TransparentOverlay.d.ts +0 -4
  89. package/dist/components/jogging/JoggingFreedriveTab.d.ts +0 -1
  90. package/dist/components/jogging/PoseCartesianValues.d.ts +0 -9
  91. package/dist/components/jogging/PoseJointValues.d.ts +0 -8
  92. package/dist/components/robots/AxisConfig.d.ts +0 -2
  93. package/dist/components/robots/manufacturerHomePositions.d.ts +0 -20
  94. package/dist/icons/DropdownArrowIcon.d.ts +0 -2
  95. package/dist/icons/index.d.ts +0 -12
  96. package/dist/lib/novaCompat.d.ts +0 -16
  97. package/dist/themes/createDarkTheme.d.ts +0 -7
  98. package/dist/themes/themeTypes.d.ts +0 -40
  99. package/dist/themes/theming.d.ts +0 -24
@@ -0,0 +1 @@
1
+ "use strict";const i=require("react/jsx-runtime"),y=require("three"),J=require("three-stdlib"),S=require("@react-three/drei"),d=require("react"),T=require("./externalizeComponent-CdX5L_lW.cjs"),N=require("@mui/material/Box"),v=require("@react-three/fiber"),we=require("react-i18next"),L=require("./useSmoothedMotionState-CdhkBCqt.cjs"),G=require("@mui/material/styles"),A=require("@wandelbots/nova-js/v2"),re=require("react-error-boundary");function be(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const b=be(y);function Re(e){switch(e.shape_type){case"convex_hull":return new J.ConvexGeometry(e.vertices.map(t=>new b.Vector3(t[0]/1e3,t[1]/1e3,t[2]/1e3)));case"box":return new b.BoxGeometry(e.size_x/1e3,e.size_y/1e3,e.size_z/1e3);case"sphere":return new b.SphereGeometry(e.radius/1e3);case"capsule":return new b.CapsuleGeometry(e.radius/1e3,e.cylinder_height/1e3);case"cylinder":return new b.CylinderGeometry(e.radius/1e3,e.radius/1e3,e.height/1e3);case"rectangle":return new b.BoxGeometry(e.size_x/1e3,e.size_y/1e3,0);default:return console.warn(`${e.shape_type} is not supported`),new b.BufferGeometry}}function Me({name:e,collider:n,children:t}){var a,l;const r=((a=n.pose)==null?void 0:a.position)??[0,0,0],o=((l=n.pose)==null?void 0:l.orientation)??[0,0,0];return n.margin&&console.warn(`${e} margin is not supported`),i.jsx("mesh",{name:e,position:new b.Vector3(r[0],r[1],r[2]).divideScalar(1e3),rotation:new b.Euler(o[0],o[1],o[2],"XYZ"),geometry:Re(n.shape),children:t})}function Se({name:e,colliders:n,meshChildrenProvider:t,...r}){return i.jsx("group",{name:e,...r,children:Object.entries(n).map(([o,a])=>i.jsx(Me,{name:o,collider:a,children:t(o,a)},o))})}function _e({scene:e,meshChildrenProvider:n}){const t=e.colliders;return i.jsx("group",{children:t&&i.jsx(Se,{meshChildrenProvider:n,colliders:t})})}function Te(e){const n=(e==null?void 0:e.position)??[],t=(e==null?void 0:e.orientation)??[],r=new y.Vector3(t[0]??0,t[1]??0,t[2]??0),o=r.length(),a=o>0?new y.Quaternion().setFromAxisAngle(r.normalize(),o):new y.Quaternion;return new y.Matrix4().compose(new y.Vector3(n[0]??0,n[1]??0,n[2]??0).divideScalar(1e3),a,new y.Vector3(1,1,1))}function Ee(e,n=null,t=[]){const r=Te(n);return e.map((o,a)=>{const l=r.clone(),s=(o.reverse_rotation_direction?-1:1)*(t[a]??0),c=o.type==="PRISMATIC_JOINT",u=(o.theta??0)+(c?0:s),f=(o.d??0)+(c?s:0);return r.multiply(new y.Matrix4().makeRotationZ(u)).multiply(new y.Matrix4().makeTranslation((o.a??0)/1e3,0,f/1e3)).multiply(new y.Matrix4().makeRotationX(o.alpha??0)),l})}const k="#ff4b4b",W="#2fa8ff",ve="#8a8d9e",Le=96,Pe=.15,Ae=new b.Vector3(0,1,0),Oe=.2,Ce=2;function Ge(e){const{lower_limit:n,upper_limit:t}=e??{};return typeof n!="number"||typeof t!="number"||!Number.isFinite(n)||!Number.isFinite(t)||!(n<t)?null:{lower_limit:n,upper_limit:t}}function I({base:e,direction:n,size:t,color:r,opacity:o}){const a=new b.Quaternion().setFromUnitVectors(Ae,n.clone().normalize()),l=e.clone().addScaledVector(n.clone().normalize(),t/2);return i.jsxs("mesh",{position:l,quaternion:a,renderOrder:10,children:[i.jsx("coneGeometry",{args:[t*.35,t,16]}),i.jsx("meshBasicMaterial",{color:r,depthTest:!1,transparent:!0,opacity:o})]})}function V({points:e,color:n,width:t,opacity:r}){return i.jsx(S.Line,{points:e,color:n,lineWidth:t,depthTest:!1,transparent:!0,opacity:r,renderOrder:10})}function X(e,n){const t=[...e];let r=n;for(;t.length>1;){const o=t[t.length-1],a=t[t.length-2],l=o.distanceTo(a);if(l>r)return t[t.length-1]=o.clone().lerp(a,r/l),t;r-=l,t.pop()}return t}function ke(e,n,t,r){const o=t*e,a=t*n,l=Math.abs(a-o),s=Math.max(2,Math.ceil(l/(2*Math.PI)*Le));return Array.from({length:s+1},(c,u)=>{const f=o+(a-o)*u/s,p=l*u/s/(2*Math.PI),g=r*(1+Pe*p);return new b.Vector3(Math.cos(f)*g,Math.sin(f)*g,0)})}function Ie(e,n,t,r){const o=e.theta??0,a=e.d??0,l=e.type==="PRISMATIC_JOINT",s=e.reverse_rotation_direction?-1:1,{lower_limit:c,upper_limit:u}=n;return d.useMemo(()=>{const f=new b.Matrix4().makeRotationZ(o).multiply(new b.Matrix4().makeTranslation(0,0,l?a/1e3:0)),p=(M,_,E)=>new b.Vector3(M,_,E).applyMatrix4(f),g=new b.Vector3().applyMatrix4(f),m=p(0,0,t),h=(l?[p(t*.25,0,s*c/1e3),p(t*.25,0,s*u/1e3)]:ke(c,u,s,t*.6)).map(M=>l?M:M.applyMatrix4(f)),x=p(l?t*.25:t*.6,0,0),R=h.slice(1).reduce((M,_,E)=>M+_.distanceTo(h[E]),0),j=Math.min(r,R/3),w=X(X(h,j).reverse(),j).reverse();return{axisPoints:[g,m],axisTip:m,origin:g,restPoints:[g,x],range:h,limitPoints:w,rangeStart:w[0],rangeEnd:w[w.length-1]}},[o,a,l,s,t,c,u,r])}function Ve({frame:e,dh:n,limit:t,size:r,emphasis:o}){const a=o==="highlighted"?Ce:1,l=o==="dimmed"?Oe:1,s=r*.2*(o==="highlighted"?1.4:1),c=2*a,{axisPoints:u,axisTip:f,origin:p,restPoints:g,range:m,limitPoints:h,rangeStart:x,rangeEnd:R}=Ie(n,t,r,s),{position:j,quaternion:w}=d.useMemo(()=>{const M=new b.Vector3,_=new b.Quaternion;return e.decompose(M,_,new b.Vector3),{position:M,quaternion:_}},[e]);return i.jsxs("group",{position:j,quaternion:w,children:[i.jsx(V,{points:u,color:W,width:c,opacity:l}),i.jsx(I,{base:f,direction:f.clone().sub(p),size:s,color:W,opacity:l}),i.jsx(V,{points:g,color:ve,width:1.5*a,opacity:l}),i.jsx(V,{points:h,color:k,width:c,opacity:l}),i.jsx(I,{base:x,direction:m[0].clone().sub(x),size:x.distanceTo(m[0]),color:k,opacity:l}),i.jsx(I,{base:R,direction:m[m.length-1].clone().sub(R),size:R.distanceTo(m[m.length-1]),color:k,opacity:l})]})}function Fe({dhParameters:e,chainOffset:n=null,limits:t,jointPositions:r,size:o=.15,highlightedJoint:a=null}){const l=d.useMemo(()=>Ee(e,n,r),[e,n,r]);return i.jsx("group",{children:l.map((s,c)=>{const u=Ge(t[c]);return u?i.jsx(Ve,{frame:s,dh:e[c],limit:u,size:o,emphasis:a===null?"normal":a===c?"highlighted":"dimmed"},c):null})})}function Je(){return i.jsx(S.Environment,{frames:1,children:i.jsx(qe,{})})}const Ne=[2,0,2,0,2,0,2,0];function qe({positions:e=Ne}){return i.jsxs(i.Fragment,{children:[i.jsx(S.Lightformer,{intensity:5,"rotation-x":Math.PI/2,position:[0,5,-9],scale:[10,10,1]}),i.jsx("group",{rotation:[0,.5,0],children:i.jsx("group",{children:e.map((n,t)=>i.jsx(S.Lightformer,{form:"circle",intensity:5,rotation:[Math.PI/2,0,0],position:[n,4,t*4],scale:[3,1,1]},t))})}),i.jsx(S.Lightformer,{intensity:40,"rotation-y":Math.PI/2,position:[-5,1,-1],scale:[20,.1,1]}),i.jsx(S.Lightformer,{intensity:20,"rotation-y":-Math.PI,position:[-5,-2,-1],scale:[20,.1,1]}),i.jsx(S.Lightformer,{"rotation-y":Math.PI/2,position:[-5,-1,-1],scale:[20,.5,1],intensity:5}),i.jsx(S.Lightformer,{"rotation-y":-Math.PI/2,position:[10,1,0],scale:[20,1,1],intensity:10}),i.jsx(S.Lightformer,{form:"ring",color:"white",intensity:5,scale:10,position:[-15,4,-18],target:[0,0,0]})]})}const Y={attach:"material",color:"#009f4d",opacity:.2,depthTest:!1,depthWrite:!1,transparent:!0,polygonOffset:!0};function He({safetyZones:e,dhParameters:n,...t}){const r=d.useMemo(()=>T.dhParametersToPlaneSize(n??[]),[n]),o=(l,s)=>{var g,m;if(!((g=s==null?void 0:s.pose)!=null&&g.position)||!((m=s==null?void 0:s.pose)!=null&&m.orientation))return null;const c=new b.Vector3(s.pose.position[0]/1e3,s.pose.position[1]/1e3,s.pose.position[2]/1e3),u=new b.Vector3(s.pose.orientation[0],s.pose.orientation[1],s.pose.orientation[2]);let f;const p=s.shape.shape_type==="plane"?{...Y,side:b.DoubleSide}:{...Y,side:b.FrontSide};switch(s.shape.shape_type){case"plane":f=i.jsx("planeGeometry",{args:[r,r]});break;case"sphere":{const h=(s==null?void 0:s.shape).radius/1e3;f=i.jsx("sphereGeometry",{args:[h]});break}case"capsule":{const h=(s==null?void 0:s.shape).radius/1e3,x=(s==null?void 0:s.shape).cylinder_height/1e3;f=i.jsx("capsuleGeometry",{args:[h,x]});break}case"convex_hull":{const h=(s==null?void 0:s.shape).vertices.map(R=>new b.Vector3(R[0]/1e3,R[1]/1e3,R[2]/1e3)),x=T.verticesToCoplanarity(h);if(x.isCoplanar&&x.normal){const j=new b.Vector3().addVectors(h[0],x.normal.multiplyScalar(1e-4));h.push(j)}try{f=i.jsx("primitive",{object:new J.ConvexGeometry(h),attach:"geometry"})}catch(R){return console.log("Error creating ConvexGeometry:",R),null}break}case"rectangular_capsule":{const h=s.shape,x=h.radius/1e3,R=h.sphere_center_distance_x/1e3,j=h.sphere_center_distance_y/1e3,w=x*2;f=i.jsx("primitive",{object:new J.RoundedBoxGeometry(R,j,w,2,x),attach:"geometry"});break}default:console.warn("Unsupported safety zone shape type:",s.shape.shape_type),f=null}return i.jsxs("mesh",{renderOrder:l,position:c,quaternion:T.orientationToQuaternion(u),children:[f,i.jsx("meshStandardMaterial",{...p,polygonOffsetFactor:-l})]},`safety-zone-${s.shape.shape_type}-${l}`)},a=d.useMemo(()=>Object.values(e??{}).map((l,s)=>o(s,l)),[e,r]);return i.jsx("group",{...t,children:a})}function De({trajectory:e,...n}){const t=(e==null?void 0:e.map(r=>{if(r.position&&r.position.length>=3){const[o,a,l]=r.position;if(Number.isFinite(o)&&Number.isFinite(a)&&Number.isFinite(l))return new b.Vector3(o/1e3,l/1e3,-a/1e3)}return null}).filter(r=>r!==null))||[];return i.jsx("group",{...n,children:t.length>0&&i.jsx(S.Line,{points:t,lineWidth:3,polygonOffset:!0,polygonOffsetFactor:10,polygonOffsetUnits:10})})}const C=["x","y","z"],$=["-","+"];function q(e,n){return!!e&&!!n&&e.axis===n.axis&&e.direction===n.direction}function $e(e){return`${e.axis.toUpperCase()}${e.direction}`}const Z=e=>e===" "||e==="Enter";function Ue({onStart:e,onStop:n,disabled:t=!1,isSame:r}){const o=d.useRef(null),[a,l]=d.useState(null),s=d.useRef({onStop:n,isSame:r});s.current={onStop:n,isSame:r};const c=d.useCallback(m=>t||o.current!==null?!1:(o.current=m,l(m),e(m),!0),[t,e]),u=d.useCallback(m=>{const h=o.current;h!==null&&(m!==void 0&&!s.current.isSame(h,m)||(o.current=null,l(null),s.current.onStop()))},[]);d.useEffect(()=>{t&&u()},[t,u]),d.useEffect(()=>()=>u(),[u]);const f=a!==null;d.useEffect(()=>{if(!f)return;const m=()=>u(),h=()=>{document.visibilityState==="hidden"&&u()};return window.addEventListener("blur",m),document.addEventListener("visibilitychange",h),()=>{window.removeEventListener("blur",m),document.removeEventListener("visibilitychange",h)}},[f,u]);const p=d.useCallback(m=>({onPointerDown:h=>{var x,R;h.button===0&&c(m)&&((R=(x=h.currentTarget).setPointerCapture)==null||R.call(x,h.pointerId))},onPointerUp:()=>u(m),onPointerCancel:()=>u(m),onLostPointerCapture:()=>u(m),onKeyDown:h=>{Z(h.key)&&(h.preventDefault(),h.repeat||c(m))},onKeyUp:h=>{Z(h.key)&&u(m)},onBlur:h=>u(m)}),[c,u]),g=d.useCallback(()=>u(),[u]);return{held:a,handlersFor:p,stop:g}}function Qe({onJogStart:e,onJogStop:n,disabled:t=!1}){const r=d.useCallback(o=>e(o.axis,o.direction),[e]);return Ue({onStart:r,onStop:n,disabled:t,isSame:q})}const Be=new y.Vector3(0,1,0),H=e=>`${e.axis}${e.direction}`,We={x:"X",y:"Y",z:"Z"};function D(e){var n;return((n=L.cartesianAxisColors[We[e]].buttonBackgroundColor)==null?void 0:n.default)??"currentColor"}const Xe=200;function U(e){const n=e/Xe;return{marginPx:30*n,gripPx:30*n,grab:{innerPx:10*n,beyondTipPx:10*n,minLengthPx:32*n},labelFontPx:Math.max(10,13*n)}}function K(e,n){return t=>{t?e.current.set(n,t):e.current.delete(n)}}const oe={x:new y.Vector3(1,0,0),y:new y.Vector3(0,1,0),z:new y.Vector3(0,0,1)};function Ye(e,n,t=new y.Quaternion){return t.copy(e).invert().multiply(n)}function Ze(e){const n=[];for(const t of C)for(const r of $){const o=oe[t].clone().multiplyScalar(r==="+"?1:-1).applyQuaternion(e);n.push({axis:t,direction:r,x:o.x+0,y:-o.y+0,depth:o.z})}return n}function Ke(e,n,t){return Math.max(1,Math.min(e,n)/2-t)}function ze(e,n){const{radiusPx:t,innerPx:r,beyondTipPx:o,minLengthPx:a}=n,l=Math.hypot(e.x,e.y),s=l>1e-6?Math.atan2(e.y,e.x):0,c=Math.cos(s),u=Math.sin(s),f=l*t+o;if(f-r>=a)return{x:c*r,y:u*r,length:f-r,angle:s};const p=e.x*t,g=e.y*t;return{x:p-c*a/2,y:g-u*a/2,length:a,angle:s}}const et=1e-8;function z(e,n){return e?Math.abs(e.dot(n))<1-et:!0}const ee=.035,F=.26,tt=.1,te=1.28,ie=e=>`label:${e}`;function nt({orientation:e,lit:n,disabled:t,size:r,radius:o,overlay:a}){const l=d.useRef(null),s=d.useRef(null),c=r/2,u=v.useThree(f=>f.invalidate);return d.useEffect(()=>{s.current=null,u()},[r,o,u]),d.useEffect(()=>{let f=requestAnimationFrame(function p(){const g=e.current;g&&z(s.current,g)&&u(),f=requestAnimationFrame(p)});return()=>cancelAnimationFrame(f)},[e,u]),v.useFrame(()=>{const f=e.current;if(!f||!l.current||!z(s.current,f))return;l.current.quaternion.copy(f);let p=!0;for(const g of Ze(f)){const m=a.current.get(H(g));if(m){const x=ze(g,{radiusPx:o,...U(r).grab});m.style.left=`${c+x.x}px`,m.style.top=`${c+x.y}px`,m.style.width=`${x.length}px`,m.style.transform=`translateY(-50%) rotate(${x.angle}rad)`,m.style.zIndex=String(10+Math.round(g.depth*5))}else p=!1;if(g.direction!=="+")continue;const h=a.current.get(ie(g.axis));h?(h.style.left=`${c+g.x*o*te}px`,h.style.top=`${c+g.y*o*te}px`):p=!1}p&&(s.current=f.clone())}),i.jsxs("group",{ref:l,children:[i.jsxs("mesh",{children:[i.jsx("sphereGeometry",{args:[.07,16,16]}),i.jsx("meshBasicMaterial",{color:"#c4c8d0"})]}),C.map(f=>i.jsx(rt,{axis:f,color:D(f),lit:(n==null?void 0:n.axis)===f?n.direction:null,disabled:t},f))]})}function rt({axis:e,color:n,lit:t,disabled:r}){const o=d.useMemo(()=>new y.Quaternion().setFromUnitVectors(Be,oe[e]),[e]),a=1-F;return i.jsx("group",{quaternion:o,children:$.map(l=>{const s=t===l,c=s?1:r?.35:.8,u=s?ee*1.5:ee;return i.jsxs("group",{rotation:[l==="+"?0:Math.PI,0,0],children:[i.jsxs("mesh",{position:[0,a/2,0],children:[i.jsx("cylinderGeometry",{args:[u,u,a,12]}),i.jsx("meshBasicMaterial",{color:n,transparent:!0,opacity:c})]}),i.jsxs("mesh",{position:[0,1-F/2,0],scale:s?1.2:1,children:[i.jsx("coneGeometry",{args:[tt,F,20]}),i.jsx("meshBasicMaterial",{color:n,transparent:!0,opacity:c})]})]},l)})})}function ot({held:e,activeHandle:n,disabled:t,onHover:r,handlersFor:o,label:a,overlay:l,size:s}){const c=G.useTheme(),{gripPx:u,labelFontPx:f}=U(s);return i.jsxs(i.Fragment,{children:[C.map(p=>i.jsx(N,{component:"span","aria-hidden":!0,ref:K(l,ie(p)),sx:{position:"absolute",transform:"translate(-50%, -50%)",pointerEvents:"none",fontSize:f,color:D(p),opacity:t?.4:1},children:p.toUpperCase()},p)),C.flatMap(p=>$.map(g=>{const m={axis:p,direction:g},h=D(p),x=q(e,m)||q(n,m);return i.jsx(N,{component:"button",type:"button",ref:K(l,H(m)),disabled:t,"aria-label":a(m),"aria-pressed":x,onPointerEnter:()=>r(m),onPointerLeave:()=>r(null),...o(m),sx:{position:"absolute",height:u,transformOrigin:"0 50%",padding:0,borderRadius:`${u/2}px`,border:"none",background:"transparent",cursor:t?"default":"pointer",touchAction:"none",userSelect:"none","&:hover:not(:disabled)":{background:G.alpha(h,.12)},"&:focus-visible":{outline:`2px solid ${c.palette.primary.main}`},...x&&{background:G.alpha(h,.25)}}},H(m))}))]})}const it=3e3;function st(e){const[n,t]=d.useState(()=>e.current!==null);return d.useEffect(()=>{if(n)return;let r=requestAnimationFrame(function a(){e.current!==null?t(!0):r=requestAnimationFrame(a)});const o=setTimeout(()=>{e.current===null&&console.warn("JoggingGizmo has no orientation, so it stays disabled. Put a JoggingGizmoOrientation with the same ref into the app's 3D scene.")},it);return()=>{cancelAnimationFrame(r),clearTimeout(o)}},[n,e]),n}const at=T.externalizeComponent(({orientation:e,onJogStart:n,onJogStop:t,activeHandle:r,disabled:o=!1,size:a=200})=>{const{t:l}=we.useTranslation(),s=st(e),c=o||!s,{held:u,handlersFor:f}=Qe({onJogStart:n,onJogStop:t,disabled:c}),[p,g]=d.useState(null),m=d.useRef(new Map),h=Ke(a,a,U(a).marginPx);return i.jsxs(N,{"data-testid":"jogging-gizmo",sx:{position:"relative",width:a,height:a,flexShrink:0},children:[i.jsx(v.Canvas,{orthographic:!0,flat:!0,frameloop:"demand",camera:{position:[0,0,10],zoom:h,near:.1,far:100},gl:{alpha:!0,antialias:!0},style:{position:"absolute",inset:0,pointerEvents:"none"},children:i.jsx(nt,{orientation:e,lit:u??r??p,disabled:c,size:a,radius:h,overlay:m})}),i.jsx(ot,{held:u,activeHandle:r,disabled:c,size:a,onHover:g,handlersFor:f,label:x=>l("Jogging.Handle.lb",{handle:$e(x)}),overlay:m})]})}),ct=new y.Quaternion,ne=new y.Quaternion;function ut({target:e,frameQuaternion:n=ct}){const t=v.useThree(r=>r.camera);return v.useFrame(()=>{const r=typeof n=="function"?n():n;t.getWorldQuaternion(ne),e.current=Ye(ne,r,e.current??new y.Quaternion)}),null}const O=new Map;async function P(e,n){const t=n||"";if(!t)throw new Error(`Cannot download the model "${e}": no NOVA instance. Give defaultGetModel the URL of the instance or a NOVA client, or give the component its instanceUrl or getModel.`);const r=`${lt(t)} ${e}`,o=O.get(r);if(o)return o;const a=(async()=>{const l=L.createNovaClient(t);try{const s=await l.api.motionGroupModels.getMotionGroupGlbModel(e,{responseType:"blob"});return URL.createObjectURL(s)}catch(s){throw console.error("Failed to fetch model:",s),s}})();return O.set(r,a),a.catch(()=>{O.get(r)===a&&O.delete(r)}),a}function lt(e){return typeof e=="string"?e:e.config.instanceUrl}function se(e){function n(t){return t.children.length===0?[t]:[t,...t.children.flatMap(r=>n(r))]}return n(e).filter(t=>ce(t))}function ae(e){return e.name.endsWith("_FLG")}function ce(e){return/_J[0-9]+$/.test(e.name)}function ft(e,n){let t;function r(o){if(ae(o)){if(t)throw Error(`Found multiple flange groups in robot model ${n}; first ${t.name} then ${o.name}. Only one _FLG group is allowed.`);t=o}ce(o),o.children.map(r)}if(r(e.scene),!t)throw Error(`No flange group found in robot model ${n}. Flange must be identified with a name ending in _FLG.`);return{gltf:e}}const ue=d.forwardRef(function({rapidlyChangingMotionState:n,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:o,onTranslationChanged:a,children:l},s){const c=d.useRef(null),u=d.useRef([]),f=d.useRef(n.joint_position.filter(j=>j!==void 0)),{invalidate:p}=v.useThree(),g=d.useRef(n);g.current=n;function m(j){c.current=j,j&&h()}function h(){c.current&&(u.current=se(c.current),x(),p())}d.useImperativeHandle(s,()=>({recollectJoints:h}));function x(){const j=f.current;if(a)a(u.current,j);else for(const[w,M]of u.current.entries()){const E=t[w].reverse_rotation_direction?-1:1;M.position.y=E*(j[w]||0)/1e3}}function R(j){f.current=j.joint_position.filter(w=>w!==void 0),x(),p()}return L.useAutorun(()=>{R(g.current)}),i.jsx("group",{ref:m,position:r,quaternion:o,children:l})});function le({rapidlyChangingMotionState:e,dhParameters:n,...t}){const r=new y.Matrix4,o=d.useRef(null),a=d.useRef(null);function l(u){const f=new y.Matrix4;for(let h=0;h<n.length;h++){const x=n[h],R=u[h]??0,j=new y.Matrix4().makeRotationY(x.theta).multiply(new y.Matrix4().makeTranslation(x.a/1e3,(x.d+R*(x.reverse_rotation_direction?-1:1))/1e3,0)).multiply(new y.Matrix4().makeRotationX(x.alpha));f.multiply(j)}const p=new y.Vector3,g=new y.Quaternion,m=new y.Vector3;return f.decompose(p,g,m),p}const s=l(e.joint_position);function c(u,f){r.identity();let p=new y.Vector3;for(let x=0;x<n.length;x++){const R=f[x]??0,j=n[x],w=new y.Matrix4().makeRotationY(j.theta).multiply(new y.Matrix4().makeTranslation(j.a/1e3,(j.d+R*(j.reverse_rotation_direction?-1:1))/1e3,0)).multiply(new y.Matrix4().makeRotationX(j.alpha));r.multiply(w)}const g=new y.Vector3,m=new y.Quaternion,h=new y.Vector3;if(r.decompose(g,m,h),p=g,o.current&&o.current.position.set(p.x,p.y,p.z),a.current){const x=a.current.geometry;x!=null&&x.setPositions&&x.setPositions([0,0,0,p.x,p.y,p.z])}}return i.jsx(ue,{rapidlyChangingMotionState:e,dhParameters:n,onTranslationChanged:c,children:i.jsxs("group",{...t,name:"Scene",children:[i.jsxs("mesh",{name:"Base",position:[0,0,0],children:[i.jsx("sphereGeometry",{args:[.02,32,32]}),i.jsx("meshStandardMaterial",{color:"green",depthTest:!0})]}),i.jsx(S.Line,{ref:a,points:[new y.Vector3(0,0,0),s],color:"White",lineWidth:5}),i.jsxs("mesh",{ref:o,name:"TCP",position:s,children:[i.jsx("sphereGeometry",{args:[.025,32,32]}),i.jsx("meshStandardMaterial",{color:"red",depthTest:!0})]})]})})}const pt=console.warn;function fe(){return d.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&pt(e)}},[]),null}function mt(e){return e.type==="Mesh"}function ht({url:e,flangeRef:n,postModelRender:t,...r}){const o=S.useGLTF(e),l=ft(o,"robot.glb").gltf;d.useEffect(()=>{t==null||t()},[e,t]);function s(c){try{return mt(c)?c.geometry?i.jsx("mesh",{name:c.name,geometry:c.geometry,material:c.material,position:c.position,rotation:c.rotation},c.uuid):i.jsx("group",{name:c.name,position:c.position,rotation:c.rotation},c.uuid):i.jsx("group",{name:c.name,position:c.position,rotation:c.rotation,ref:ae(c)?n:void 0,children:c.children.map(s)},c.uuid)}catch(u){return console.warn("Error rendering node",c.name,u),null}}return i.jsx("group",{...r,dispose:null,children:s(l.scene)})}function pe({modelURL:e,flangeRef:n,postModelRender:t,...r}){const[o,a]=d.useState(null);return d.useEffect(()=>{let l=!1;return(async()=>{try{const c=typeof e=="string"?e:await e;l||a(u=>u===c?u:c)}catch(c){console.error("Failed to resolve model URL:",c)}})(),()=>{l=!0}},[e]),o?i.jsx(ht,{url:o,flangeRef:n,postModelRender:t,...r}):null}const me=(e,n)=>{e.userData.isGhost||(e.traverse(t=>{if(t instanceof b.Mesh){t.material instanceof b.Material&&(t.material.colorWrite=!1);const r=t.clone(),o=t.clone();r.material=new b.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:b.DoubleSide}),r.userData.isGhost=!0,o.material=new b.MeshStandardMaterial({color:n,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:b.DoubleSide}),o.userData.isGhost=!0,t.parent&&(t.parent.add(r),t.parent.add(o))}}),e.userData.isGhost=!0)},he=e=>{if(!e.userData.isGhost)return;const n=[];e.traverse(t=>{var r;t instanceof b.Mesh&&((r=t.userData)!=null&&r.isGhost?n.push(t):t.material instanceof b.Material&&(t.material.colorWrite=!0))}),n.forEach(t=>{t.parent&&t.parent.remove(t)}),e.userData.isGhost=!1},Q=T.externalizeComponent(({rapidlyChangingMotionState:e,modelFromController:n,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:o,getModel:a=P,flangeRef:l,postModelRender:s,transparentColor:c,instanceUrl:u,...f})=>{const[p,g]=d.useState(null),m=d.useRef(null),h=d.useCallback(w=>{g(w)},[]),x=d.useCallback(()=>{var w;(w=m.current)==null||w.recollectJoints(),s==null||s()},[s]);d.useEffect(()=>{p&&(c?me(p,c):he(p))},[p,c]);const R=d.useMemo(()=>{const w=a(n,u);if(!w){const M=new Blob([],{type:"model/gltf-binary"}),_=new File([M],`${n}.glb`,{type:"model/gltf-binary"});return Promise.resolve(URL.createObjectURL(_))}return w},[n,u,a]),j=i.jsx(le,{rapidlyChangingMotionState:e,dhParameters:t,...f});return i.jsxs(re.ErrorBoundary,{fallback:j,onError:w=>{console.warn(w)},children:[i.jsx(d.Suspense,{fallback:j,children:i.jsx("group",{ref:h,children:i.jsx(ue,{ref:m,rapidlyChangingMotionState:e,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:o,children:i.jsx(pe,{modelURL:R,postModelRender:x,flangeRef:l,...f})})})}),i.jsx(fe,{})]})}),de=T.externalizeComponent(({rapidlyChangingMotionState:e,...n})=>{const t=L.useSmoothedMotionState(e);return i.jsx(Q,{rapidlyChangingMotionState:t,...n})});function dt({connectedMotionGroup:e,getModel:n,flangeRef:t,transparentColor:r,postModelRender:o,...a}){const l=d.useCallback(g=>P(g,e.nova),[e]),s=n??l;if(!e.dhParameters)return null;const c=e.mountingPosition,u=e.mountingQuaternion,f=e.modelFromController||"";return f?i.jsx(de,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:f,dhParameters:e.dhParameters,getModel:s,flangeRef:t,transparentColor:r,postModelRender:o,chainOffsetPosition:c,chainOffsetQuaternion:u,...a}):i.jsx(le,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,dhParameters:e.dhParameters,chainOffsetPosition:c,chainOffsetQuaternion:u,...a})}const xe=d.forwardRef(function({rapidlyChangingMotionState:n,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:o,onRotationChanged:a,children:l},s){const c=d.useRef(null),u=d.useRef([]),f=d.useRef(n.joint_position.filter(j=>j!==void 0)),{invalidate:p}=v.useThree(),g=d.useRef(n);g.current=n;function m(j){c.current=j,j&&h()}function h(){c.current&&(u.current=se(c.current),x(),p())}d.useImperativeHandle(s,()=>({recollectJoints:h}));function x(){const j=f.current;if(a)a(u.current,j);else for(const[w,M]of u.current.entries()){const _=t[w],E=_.theta||0,je=_.reverse_rotation_direction?-1:1;M.rotation.y=je*(j[w]||0)+E}}function R(j){f.current=j.joint_position.filter(w=>w!==void 0),x(),p()}return L.useAutorun(()=>{R(g.current)}),d.useEffect(()=>{R(n)},[n]),i.jsx("group",{ref:m,position:r,quaternion:o,children:l})}),xt="line",gt="mesh";function yt({rapidlyChangingMotionState:e,dhParameters:n,...t}){const r=new y.Matrix4,o=d.useRef([]),a=d.useRef([]);d.useEffect(()=>{o.current=new Array(n.length).fill(null),a.current=new Array(n.length).fill(null)},[n.length]);function l(u,f){const p=new y.Vector3,g=new y.Quaternion,m=new y.Vector3;r.decompose(p,g,m);const h=p.clone(),x=new y.Matrix4().makeRotationY(u.theta+f*(u.reverse_rotation_direction?-1:1)).multiply(new y.Matrix4().makeTranslation(0,u.d/1e3,0)).multiply(new y.Matrix4().makeTranslation(u.a/1e3,0,0)).multiply(new y.Matrix4().makeRotationX(u.alpha));return r.multiply(x),r.decompose(p,g,m),{a:h,b:p}}function s(u,f,p,g){if(!n)return;const m=n[u];if(!m)return;const{a:h,b:x}=l(m,g);f.geometry.setPositions([h.toArray(),x.toArray()].flat()),p.position.set(x.x,x.y,x.z)}function c(u,f){r.identity();for(let p=0;p<Math.min(u.length,f.length);p++){const g=o.current[p],m=a.current[p];g&&m&&s(p,g,m,f[p])}}return i.jsx(xe,{rapidlyChangingMotionState:e,dhParameters:n,onRotationChanged:c,children:i.jsxs("group",{...t,name:"Scene",children:[i.jsxs("mesh",{children:[i.jsx("sphereGeometry",{args:[.01,32,32]}),i.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),n==null?void 0:n.map((u,f)=>{const{a:p,b:g}=l(u,e.joint_position[f]??0),m=`dhrobot_J0${f}`;return i.jsxs("group",{name:m,children:[i.jsx(S.Line,{ref:h=>{o.current[f]=h},name:xt,points:[p,g],color:"white",lineWidth:5}),i.jsxs("mesh",{ref:h=>{a.current[f]=h},name:gt,position:g,children:[i.jsx("sphereGeometry",{args:[.01,32,32]}),i.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},`mesh_${f}`)]},m)})]})})}const B=T.externalizeComponent(({rapidlyChangingMotionState:e,modelFromController:n,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:o,getModel:a=P,flangeRef:l,postModelRender:s,transparentColor:c,instanceUrl:u,...f})=>{const[p,g]=d.useState(null),m=d.useRef(null),h=d.useCallback(w=>{g(w)},[]),x=d.useCallback(()=>{var w;(w=m.current)==null||w.recollectJoints(),s==null||s()},[s]);d.useEffect(()=>{p&&(c?me(p,c):he(p))},[p,c]);const R=d.useMemo(()=>{const w=a(n,u);if(!w)throw new Error(`No model found for robot "${n}". Ensure the model is available or provide a custom getModel function.`);return w},[n,u,a]),j=i.jsx(yt,{rapidlyChangingMotionState:e,dhParameters:t,...f});return i.jsxs(re.ErrorBoundary,{fallback:j,onError:w=>{console.warn(w)},children:[i.jsx(d.Suspense,{fallback:j,children:i.jsx("group",{ref:h,children:i.jsx(xe,{ref:m,rapidlyChangingMotionState:e,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:o,children:i.jsx(pe,{modelURL:R,postModelRender:x,flangeRef:l,...f})})})}),i.jsx(fe,{})]})}),ge=T.externalizeComponent(({rapidlyChangingMotionState:e,...n})=>{const t=L.useSmoothedMotionState(e);return i.jsx(B,{rapidlyChangingMotionState:t,...n})}),ye=T.externalizeComponent(e=>{const{inverseSolver:n,dhParameters:t,...r}=e,[o,a]=d.useState(A.JointTypeEnum.RevoluteJoint);d.useEffect(()=>{t.length&&a(t[0].type??A.JointTypeEnum.RevoluteJoint)},[t]);const l=d.useMemo(()=>n===null&&o===A.JointTypeEnum.RevoluteJoint,[n,o]),s=d.useMemo(()=>n===null&&o===A.JointTypeEnum.PrismaticJoint,[n,o]);return d.useMemo(()=>!!n,[n])||l?i.jsx(B,{dhParameters:t,...r}):s?i.jsx(Q,{dhParameters:t,...r}):null}),jt=T.externalizeComponent(e=>{const n=L.useSmoothedMotionState(e.rapidlyChangingMotionState);return i.jsx(ye,{...e,rapidlyChangingMotionState:n})});function wt({connectedMotionGroup:e,getModel:n,flangeRef:t,transparentColor:r,postModelRender:o,...a}){const l=d.useCallback(u=>P(u,e.nova),[e]);if(!e.dhParameters)return null;const s=e.mountingPosition,c=e.mountingQuaternion;return i.jsx(ge,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:n??l,flangeRef:t,transparentColor:r,postModelRender:o,chainOffsetPosition:s,chainOffsetQuaternion:c,...a})}exports.CollisionSceneRenderer=_e;exports.JoggingGizmo=at;exports.JoggingGizmoOrientation=ut;exports.JointLimitGizmo=Fe;exports.LinearAxis=dt;exports.MotionGroupVisualizer=jt;exports.MotionGroupVisualizerExact=ye;exports.PresetEnvironment=Je;exports.Robot=wt;exports.SafetyZonesRenderer=He;exports.SupportedLinearAxis=de;exports.SupportedLinearAxisExact=Q;exports.SupportedRobot=ge;exports.SupportedRobotExact=B;exports.TrajectoryRenderer=De;exports.defaultGetModel=P;
@@ -2,7 +2,7 @@ import { jsxs as m, Fragment as x, jsx as n } from "react/jsx-runtime";
2
2
  import b from "@mui/material/Divider";
3
3
  import u from "@mui/material/Stack";
4
4
  import { observer as f, useLocalObservable as _ } from "mobx-react-lite";
5
- import { t as R, e as O } from "./externalizeComponent-EDymnaGR.js";
5
+ import { t as R, e as O } from "./externalizeComponent-CZu38L-d.js";
6
6
  import { useTheme as y } from "@mui/material/styles";
7
7
  import * as r from "react";
8
8
  import { forwardRef as d, useId as v } from "react";
@@ -1 +1 @@
1
- "use strict";const r=require("react/jsx-runtime"),m=require("@mui/material/Divider"),E=require("@mui/material/Stack"),f=require("mobx-react-lite"),x=require("./externalizeComponent-OO4jcrz5.cjs"),y=require("@mui/material/styles"),c=require("react"),d=require("react-i18next"),A=require("@mui/material/Popover"),g=require("@mui/material/SvgIcon"),h=require("@mui/material/Typography"),T=require("axios");function M(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const l=M(c);function _(e,t){throw new Error(`${t} ${JSON.stringify(e)}`)}function R(e){var t,a,n,o;return e instanceof T.AxiosError&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof T.AxiosError&&e.response?`${(t=e.response)==null?void 0:t.status} ${(a=e.response)==null?void 0:a.statusText} from ${(n=e.response)==null?void 0:n.config.url}: ${JSON.stringify((o=e.response)==null?void 0:o.data)}`:e instanceof Error?e.message:`Unexpected error: ${x.tryStringifyJson(e)||e}`}const O=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M5.248 21c-.334 0-.619-.116-.853-.35a1.153 1.153 0 0 1-.351-.848c0-.333.117-.616.351-.85.234-.233.519-.35.853-.35H7.24L4.558 9.87a2.881 2.881 0 0 1-1.126-1.042A2.77 2.77 0 0 1 3 7.317c0-.793.28-1.467.838-2.023a2.774 2.774 0 0 1 2.033-.834 2.71 2.71 0 0 1 1.728.585c.494.389.832.887 1.014 1.493h3.58V5.239c0-.22.076-.406.226-.555a.76.76 0 0 1 .558-.224c.136 0 .263.035.381.104.118.07.209.167.273.292v.14l1.835-1.702a.979.979 0 0 1 .52-.279.881.881 0 0 1 .58.091l4.01 1.85a.74.74 0 0 1 .36.364.537.537 0 0 1-.002.474.592.592 0 0 1-.366.323.657.657 0 0 1-.477-.039l-3.858-1.774L13.76 6.59v1.454l2.473 2.233 3.858-1.774a.648.648 0 0 1 .485-.03.571.571 0 0 1 .358.314.513.513 0 0 1 .01.482.79.79 0 0 1-.367.357l-4.011 1.882a.881.881 0 0 1-.58.09.979.979 0 0 1-.52-.278L13.63 9.638v.14a.92.92 0 0 1-.273.275.665.665 0 0 1-.381.12.76.76 0 0 1-.558-.224.752.752 0 0 1-.225-.555V8.096h-3.58a2.82 2.82 0 0 1-.215.54 2.552 2.552 0 0 1-.323.479l5.139 9.488h2.673c.335 0 .62.116.854.35.234.233.35.516.35.849 0 .332-.116.615-.35.849a1.167 1.167 0 0 1-.854.349H5.248Zm.623-12.385c.362 0 .67-.126.924-.378a1.25 1.25 0 0 0 .38-.92 1.25 1.25 0 0 0-.38-.92 1.261 1.261 0 0 0-.924-.379 1.26 1.26 0 0 0-.925.379 1.25 1.25 0 0 0-.38.92c0 .36.127.667.38.92.254.252.562.378.925.378Z"})),j=c.forwardRef(O),B=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z"})),F=c.forwardRef(B),p=f.observer(({id:e,icon:t,color:a,title:n,name:o,label:s,explanation:i,literalValue:S,anchorOrigin:b,transformOrigin:v})=>{const u=f.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(w){u.anchorEl=w.currentTarget},closePopover(){u.anchorEl=null}}));return r.jsxs(r.Fragment,{children:[r.jsxs(E,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[r.jsx(g,{component:t,sx:{color:a}}),s&&r.jsx("div",{style:{color:a},children:s})]}),r.jsx(A,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:b??{vertical:"bottom",horizontal:"left"},transformOrigin:v??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:r.jsxs(E,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[r.jsxs("div",{children:[n&&r.jsx(h,{component:"span",fontSize:"14px",children:`${n}: `}),r.jsx(h,{component:"span",color:a,fontWeight:"bold",fontSize:"14px",children:o})]}),r.jsx(h,{fontSize:"14px",children:i}),S&&r.jsx(h,{fontSize:"12px",children:S})]})})]})}),Z=f.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:n,compact:o})=>{const s=y.useTheme(),i=c.useId(),{t:S}=d.useTranslation();return e?r.jsx(p,{id:`motion-group-virtual-${i}`,icon:F,color:s.palette.tertiary.main,name:S("SafetyBar.ControllerType.Virtual.lb"),label:o?null:S("SafetyBar.ControllerType.Virtual.lb"),explanation:r.jsxs(d.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",r.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:a,transformOrigin:n}):r.jsx(p,{id:`motion-group-physical-${i}`,icon:j,color:s.palette.primary.main,name:S("SafetyBar.ControllerType.Physical.lb"),label:o?null:S("SafetyBar.ControllerType.Physical.lb"),explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:r.jsx("code",{}),strong:r.jsx("strong",{})}}),anchorOrigin:a,transformOrigin:n})}),C=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z"})),P=c.forwardRef(C),$=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z",fill:"#fff",fillOpacity:.56})),N=c.forwardRef($),Y=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z"})),V=c.forwardRef(Y),q=f.observer(({operationMode:e,anchorOrigin:t,transformOrigin:a,compact:n})=>{const{t:o}=d.useTranslation(),s=y.useTheme(),i=c.useId();switch(e){case"OPERATION_MODE_AUTO":return r.jsx(p,{id:`operation-mode-auto-${i}`,icon:P,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Automatic.ti"),label:n?null:o("SafetyBar.OperationMode.Automatic.ti"),color:s.palette.text.secondary,explanation:r.jsx(d.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:t,transformOrigin:a});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return r.jsx(p,{id:`operation-mode-manual-${i}`,icon:V,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Manual.lb"),label:n?null:o("SafetyBar.OperationMode.Manual.lb"),explanation:r.jsx(d.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:e,anchorOrigin:t,transformOrigin:a});default:return r.jsx(p,{id:`operation-mode-error-${i}`,icon:N,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Error.lb"),label:n?null:o("SafetyBar.OperationMode.Error.lb"),explanation:r.jsx(d.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:e,anchorOrigin:t,transformOrigin:a})}}),L=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z"})),I=c.forwardRef(L),K=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z"}),l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z"})),D=c.forwardRef(K),H=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z",fill:"#fff",fillOpacity:.56})),U=c.forwardRef(H),z=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),k=c.forwardRef(z),W=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),G=c.forwardRef(W),J=f.observer(({safetyState:e,anchorOrigin:t,transformOrigin:a,compact:n})=>{const{t:o}=d.useTranslation(),s=y.useTheme(),i=c.useId();switch(e){case"SAFETY_STATE_NORMAL":return r.jsx(p,{id:`safety-state-normal-${i}`,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Normal.lb"),label:n?null:o("SafetyBar.SafetyState.Normal.lb"),icon:k,color:s.palette.text.secondary,explanation:r.jsx(d.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:t,transformOrigin:a});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return r.jsx(p,{id:`safety-state-estop-${i}`,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Estop.lb"),label:n?null:o("SafetyBar.SafetyState.Estop.lb"),icon:D,color:s.palette.error.main,explanation:r.jsx(d.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:e,anchorOrigin:t,transformOrigin:a});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 r.jsx(p,{id:`safety-state-stop-${i}`,icon:G,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Stop.lb"),label:n?null:o("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:r.jsx(d.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:e,anchorOrigin:t,transformOrigin:a});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 r.jsx(p,{id:`safety-state-manual-action-required-${i}`,icon:U,color:s.palette.warning.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:o("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:a});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return r.jsx(p,{id:`safety-state-error-${i}`,icon:I,color:s.palette.error.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Error.lb"),label:n?null:o("SafetyBar.SafetyState.Error.lb"),explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:a});default:_(e,`Unknown safety state ${e}`)}}),Q=x.externalizeComponent(f.observer(({isVirtual:e,motionGroupId:t,operationMode:a,safetyState:n,anchorOrigin:o,transformOrigin:s,compact:i=!0})=>{const S=i?1:2;return r.jsxs(E,{direction:"row",gap:S,alignItems:"center",sx:{height:"24px"},children:[r.jsx(J,{safetyState:n,anchorOrigin:o,transformOrigin:s,compact:i}),r.jsx(m,{orientation:"vertical",flexItem:!0}),r.jsx(q,{operationMode:a,anchorOrigin:o,transformOrigin:s,compact:i}),r.jsx(m,{orientation:"vertical",flexItem:!0}),r.jsx(Z,{isVirtual:e,motionGroupId:t,anchorOrigin:o,transformOrigin:s,compact:i})]})}));exports.SafetyBar=Q;exports.makeErrorMessage=R;
1
+ "use strict";const r=require("react/jsx-runtime"),m=require("@mui/material/Divider"),E=require("@mui/material/Stack"),f=require("mobx-react-lite"),x=require("./externalizeComponent-CdX5L_lW.cjs"),y=require("@mui/material/styles"),c=require("react"),d=require("react-i18next"),A=require("@mui/material/Popover"),g=require("@mui/material/SvgIcon"),h=require("@mui/material/Typography"),T=require("axios");function M(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const l=M(c);function _(e,t){throw new Error(`${t} ${JSON.stringify(e)}`)}function R(e){var t,a,n,o;return e instanceof T.AxiosError&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof T.AxiosError&&e.response?`${(t=e.response)==null?void 0:t.status} ${(a=e.response)==null?void 0:a.statusText} from ${(n=e.response)==null?void 0:n.config.url}: ${JSON.stringify((o=e.response)==null?void 0:o.data)}`:e instanceof Error?e.message:`Unexpected error: ${x.tryStringifyJson(e)||e}`}const O=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M5.248 21c-.334 0-.619-.116-.853-.35a1.153 1.153 0 0 1-.351-.848c0-.333.117-.616.351-.85.234-.233.519-.35.853-.35H7.24L4.558 9.87a2.881 2.881 0 0 1-1.126-1.042A2.77 2.77 0 0 1 3 7.317c0-.793.28-1.467.838-2.023a2.774 2.774 0 0 1 2.033-.834 2.71 2.71 0 0 1 1.728.585c.494.389.832.887 1.014 1.493h3.58V5.239c0-.22.076-.406.226-.555a.76.76 0 0 1 .558-.224c.136 0 .263.035.381.104.118.07.209.167.273.292v.14l1.835-1.702a.979.979 0 0 1 .52-.279.881.881 0 0 1 .58.091l4.01 1.85a.74.74 0 0 1 .36.364.537.537 0 0 1-.002.474.592.592 0 0 1-.366.323.657.657 0 0 1-.477-.039l-3.858-1.774L13.76 6.59v1.454l2.473 2.233 3.858-1.774a.648.648 0 0 1 .485-.03.571.571 0 0 1 .358.314.513.513 0 0 1 .01.482.79.79 0 0 1-.367.357l-4.011 1.882a.881.881 0 0 1-.58.09.979.979 0 0 1-.52-.278L13.63 9.638v.14a.92.92 0 0 1-.273.275.665.665 0 0 1-.381.12.76.76 0 0 1-.558-.224.752.752 0 0 1-.225-.555V8.096h-3.58a2.82 2.82 0 0 1-.215.54 2.552 2.552 0 0 1-.323.479l5.139 9.488h2.673c.335 0 .62.116.854.35.234.233.35.516.35.849 0 .332-.116.615-.35.849a1.167 1.167 0 0 1-.854.349H5.248Zm.623-12.385c.362 0 .67-.126.924-.378a1.25 1.25 0 0 0 .38-.92 1.25 1.25 0 0 0-.38-.92 1.261 1.261 0 0 0-.924-.379 1.26 1.26 0 0 0-.925.379 1.25 1.25 0 0 0-.38.92c0 .36.127.667.38.92.254.252.562.378.925.378Z"})),j=c.forwardRef(O),B=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z"})),F=c.forwardRef(B),p=f.observer(({id:e,icon:t,color:a,title:n,name:o,label:s,explanation:i,literalValue:S,anchorOrigin:b,transformOrigin:v})=>{const u=f.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(w){u.anchorEl=w.currentTarget},closePopover(){u.anchorEl=null}}));return r.jsxs(r.Fragment,{children:[r.jsxs(E,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[r.jsx(g,{component:t,sx:{color:a}}),s&&r.jsx("div",{style:{color:a},children:s})]}),r.jsx(A,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:b??{vertical:"bottom",horizontal:"left"},transformOrigin:v??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:r.jsxs(E,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[r.jsxs("div",{children:[n&&r.jsx(h,{component:"span",fontSize:"14px",children:`${n}: `}),r.jsx(h,{component:"span",color:a,fontWeight:"bold",fontSize:"14px",children:o})]}),r.jsx(h,{fontSize:"14px",children:i}),S&&r.jsx(h,{fontSize:"12px",children:S})]})})]})}),Z=f.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:n,compact:o})=>{const s=y.useTheme(),i=c.useId(),{t:S}=d.useTranslation();return e?r.jsx(p,{id:`motion-group-virtual-${i}`,icon:F,color:s.palette.tertiary.main,name:S("SafetyBar.ControllerType.Virtual.lb"),label:o?null:S("SafetyBar.ControllerType.Virtual.lb"),explanation:r.jsxs(d.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",r.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:a,transformOrigin:n}):r.jsx(p,{id:`motion-group-physical-${i}`,icon:j,color:s.palette.primary.main,name:S("SafetyBar.ControllerType.Physical.lb"),label:o?null:S("SafetyBar.ControllerType.Physical.lb"),explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:r.jsx("code",{}),strong:r.jsx("strong",{})}}),anchorOrigin:a,transformOrigin:n})}),C=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z"})),P=c.forwardRef(C),$=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z",fill:"#fff",fillOpacity:.56})),N=c.forwardRef($),Y=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z"})),V=c.forwardRef(Y),q=f.observer(({operationMode:e,anchorOrigin:t,transformOrigin:a,compact:n})=>{const{t:o}=d.useTranslation(),s=y.useTheme(),i=c.useId();switch(e){case"OPERATION_MODE_AUTO":return r.jsx(p,{id:`operation-mode-auto-${i}`,icon:P,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Automatic.ti"),label:n?null:o("SafetyBar.OperationMode.Automatic.ti"),color:s.palette.text.secondary,explanation:r.jsx(d.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:t,transformOrigin:a});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return r.jsx(p,{id:`operation-mode-manual-${i}`,icon:V,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Manual.lb"),label:n?null:o("SafetyBar.OperationMode.Manual.lb"),explanation:r.jsx(d.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:e,anchorOrigin:t,transformOrigin:a});default:return r.jsx(p,{id:`operation-mode-error-${i}`,icon:N,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Error.lb"),label:n?null:o("SafetyBar.OperationMode.Error.lb"),explanation:r.jsx(d.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:e,anchorOrigin:t,transformOrigin:a})}}),L=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z"})),I=c.forwardRef(L),K=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z"}),l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z"})),D=c.forwardRef(K),H=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z",fill:"#fff",fillOpacity:.56})),U=c.forwardRef(H),z=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),k=c.forwardRef(z),W=({title:e,titleId:t,...a},n)=>l.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...a},e?l.createElement("title",{id:t},e):null,l.createElement("path",{d:"M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),G=c.forwardRef(W),J=f.observer(({safetyState:e,anchorOrigin:t,transformOrigin:a,compact:n})=>{const{t:o}=d.useTranslation(),s=y.useTheme(),i=c.useId();switch(e){case"SAFETY_STATE_NORMAL":return r.jsx(p,{id:`safety-state-normal-${i}`,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Normal.lb"),label:n?null:o("SafetyBar.SafetyState.Normal.lb"),icon:k,color:s.palette.text.secondary,explanation:r.jsx(d.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:t,transformOrigin:a});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return r.jsx(p,{id:`safety-state-estop-${i}`,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Estop.lb"),label:n?null:o("SafetyBar.SafetyState.Estop.lb"),icon:D,color:s.palette.error.main,explanation:r.jsx(d.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:e,anchorOrigin:t,transformOrigin:a});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 r.jsx(p,{id:`safety-state-stop-${i}`,icon:G,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Stop.lb"),label:n?null:o("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:r.jsx(d.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:e,anchorOrigin:t,transformOrigin:a});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 r.jsx(p,{id:`safety-state-manual-action-required-${i}`,icon:U,color:s.palette.warning.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:o("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:a});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return r.jsx(p,{id:`safety-state-error-${i}`,icon:I,color:s.palette.error.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Error.lb"),label:n?null:o("SafetyBar.SafetyState.Error.lb"),explanation:r.jsx(d.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:a});default:_(e,`Unknown safety state ${e}`)}}),Q=x.externalizeComponent(f.observer(({isVirtual:e,motionGroupId:t,operationMode:a,safetyState:n,anchorOrigin:o,transformOrigin:s,compact:i=!0})=>{const S=i?1:2;return r.jsxs(E,{direction:"row",gap:S,alignItems:"center",sx:{height:"24px"},children:[r.jsx(J,{safetyState:n,anchorOrigin:o,transformOrigin:s,compact:i}),r.jsx(m,{orientation:"vertical",flexItem:!0}),r.jsx(q,{operationMode:a,anchorOrigin:o,transformOrigin:s,compact:i}),r.jsx(m,{orientation:"vertical",flexItem:!0}),r.jsx(Z,{isVirtual:e,motionGroupId:t,anchorOrigin:o,transformOrigin:s,compact:i})]})}));exports.SafetyBar=Q;exports.makeErrorMessage=R;
@@ -1,42 +1,42 @@
1
- import * as a from "three";
1
+ import * as o from "three";
2
2
  import { jsx as g } from "react/jsx-runtime";
3
3
  import { memo as d } from "react";
4
4
  import { I18nextProvider as m } from "react-i18next";
5
- import p from "i18next";
6
- import y from "i18next-browser-languagedetector";
7
- function B(e) {
5
+ import y from "i18next";
6
+ import f from "i18next-browser-languagedetector";
7
+ function O(e) {
8
8
  try {
9
9
  return JSON.stringify(e);
10
10
  } catch {
11
11
  return;
12
12
  }
13
13
  }
14
- function E(e) {
15
- const t = e.length(), n = new a.Quaternion();
14
+ function N(e) {
15
+ const t = e.length(), a = new o.Quaternion();
16
16
  if (t > 1e-6) {
17
- const o = e.clone().normalize();
18
- n.setFromAxisAngle(o, t);
17
+ const n = e.clone().normalize();
18
+ a.setFromAxisAngle(n, t);
19
19
  }
20
- return n;
20
+ return a;
21
21
  }
22
- function A(e) {
22
+ function T(e) {
23
23
  if (!e || e.length === 0)
24
24
  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;
25
+ const n = e.reduce((l, r) => l + Math.abs(r.a ?? 0) / 1e3 + Math.abs(r.d ?? 0) / 1e3, 0) * 2;
26
+ return !Number.isFinite(n) || n <= 0 ? 5 : n;
27
27
  }
28
28
  function M(e) {
29
29
  if (e.length < 3)
30
30
  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();
32
- for (let r = 3; r < e.length; r++) {
33
- const c = new a.Vector3(e[r].x, e[r].y, e[r].z), b = new a.Vector3().subVectors(c, t), u = s.dot(b);
34
- if (Math.abs(u) > 1e-6)
31
+ const t = new o.Vector3(e[0].x, e[0].y, e[0].z), a = new o.Vector3(e[1].x, e[1].y, e[1].z), n = new o.Vector3(e[2].x, e[2].y, e[2].z), l = new o.Vector3().subVectors(a, t), r = new o.Vector3().subVectors(n, t), s = new o.Vector3().crossVectors(l, r).normalize();
32
+ for (let i = 3; i < e.length; i++) {
33
+ const c = new o.Vector3(e[i].x, e[i].y, e[i].z), u = new o.Vector3().subVectors(c, t), b = s.dot(u);
34
+ if (Math.abs(b) > 1e-6)
35
35
  return console.log("Vertices are not on the same plane"), { isCoplanar: !1 };
36
36
  }
37
37
  return { isCoplanar: !0, normal: s };
38
38
  }
39
- const f = {
39
+ const p = {
40
40
  "Jogging.Cartesian.Translation.velocityMmPerSec.lb": "{{amount}} mm/s",
41
41
  "Jogging.Cartesian.Rotation.velocityDegPerSec.lb": "{{amount}}°/s",
42
42
  "Jogging.Velocity.lb": "Geschwindigkeit",
@@ -96,45 +96,7 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
96
96
  "Jogging.Cartesian.bt": "Kartesisch",
97
97
  "Jogging.Joints.bt": "Gelenke",
98
98
  "Jogging.Velocity.bt": "Geschwindigkeit",
99
- "CycleTimer.RemainingTime.lb": "Verbleibende Zeit",
100
- "CycleTimer.OfTime.lb": "von {{time}}",
101
- "CycleTimer.Time.lb": "{{time}}",
102
- "CycleTimer.Error.lb": "Fehler",
103
- "CycleTimer.WaitingForCycle.lb": "Warten auf Programmzyklus",
104
- "CycleTimer.CycleTime.lb": "Zykluszeit",
105
- "CycleTimer.Measuring.lb": "wird gemessen...",
106
- "CycleTimer.Determined.lb": "bestimmt",
107
- "Timer.error": "Fehler",
108
- "ProgramControl.Start.bt": "Start",
109
- "ProgramControl.Resume.bt": "Weiter",
110
- "ProgramControl.Retry.bt": "Wiederholen",
111
- "ProgramControl.Pause.bt": "Pause",
112
- "ProgramControl.Stop.bt": "Stopp",
113
- "ProgramStateIndicator.Preparing.lb": "Vorbereitung",
114
- "ProgramStateIndicator.Starting.lb": "Startet",
115
- "ProgramStateIndicator.Running.lb": "In Betrieb",
116
- "ProgramStateIndicator.Pausing.lb": "Pausiert",
117
- "ProgramStateIndicator.Stopping.lb": "Stoppt",
118
- "ProgramStateIndicator.Completed.lb": "Abgeschlossen",
119
- "ProgramStateIndicator.Failed.lb": "Fehlgeschlagen",
120
- "ProgramStateIndicator.Error.lb": "Fehler",
121
- "ProgramStateIndicator.EStop.lb": "Not-Aus",
122
- "ProgramStateIndicator.Idle.lb": "Leerlauf",
123
- "ProgramStateIndicator.Paused.lb": "Pausiert",
124
- "ProgramStateIndicator.Ready.lb": "Bereit",
125
- "ProgramStateIndicator.Stopped.lb": "Gestoppt",
126
- "ProgramStateIndicator.Auto.lb": "Auto",
127
- "ProgramStateIndicator.Manual.lb": "Manuell",
128
- "ProgramStateIndicator.ManualT1.lb": "Manuell T1",
129
- "ProgramStateIndicator.ManualT2.lb": "Manuell T2",
130
- "RobotSetupReadinessIndicator.Ready.lb": "Bereit",
131
- "RobotSetupReadinessIndicator.RobotDisconnected.lb": "Roboter getrennt",
132
- "RobotSetupReadinessIndicator.CellOpen.lb": "Zelle offen",
133
- "RobotSetupReadinessIndicator.EStop.lb": "Not-Stopp",
134
- "RobotSetupReadinessIndicator.ManualMode.lb": "Manueller Modus",
135
- "RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb": "Voraussetzung nicht erfüllt",
136
- "RobotCard.Runtime.lb": "Laufzeit",
137
- "RobotCard.DriveToHome.bt": "Zur Home-Position fahren"
99
+ "Jogging.Handle.lb": "{{handle}} verfahren"
138
100
  }, h = {
139
101
  "Jogging.Cartesian.Translation.velocityMmPerSec.lb": "{{amount}} mm/s",
140
102
  "Jogging.Cartesian.Rotation.velocityDegPerSec.lb": "{{amount}}°/s",
@@ -195,54 +157,16 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
195
157
  "Jogging.Cartesian.bt": "Cartesian",
196
158
  "Jogging.Joints.bt": "Joints",
197
159
  "Jogging.Velocity.bt": "Velocity",
198
- "CycleTimer.RemainingTime.lb": "Time remaining",
199
- "CycleTimer.OfTime.lb": "of {{time}}",
200
- "CycleTimer.Time.lb": "{{time}}",
201
- "CycleTimer.Error.lb": "Error",
202
- "CycleTimer.WaitingForCycle.lb": "Waiting for program cycle",
203
- "CycleTimer.CycleTime.lb": "Cycle Time",
204
- "CycleTimer.Measuring.lb": "measuring...",
205
- "CycleTimer.Determined.lb": "determined",
206
- "Timer.error": "Error",
207
- "ProgramControl.Start.bt": "Start",
208
- "ProgramControl.Resume.bt": "Resume",
209
- "ProgramControl.Retry.bt": "Retry",
210
- "ProgramControl.Pause.bt": "Pause",
211
- "ProgramControl.Stop.bt": "Stop",
212
- "ProgramStateIndicator.Preparing.lb": "Preparing",
213
- "ProgramStateIndicator.Starting.lb": "Starting",
214
- "ProgramStateIndicator.Running.lb": "Running",
215
- "ProgramStateIndicator.Pausing.lb": "Pausing",
216
- "ProgramStateIndicator.Stopping.lb": "Stopping",
217
- "ProgramStateIndicator.Completed.lb": "Completed",
218
- "ProgramStateIndicator.Failed.lb": "Failed",
219
- "ProgramStateIndicator.Error.lb": "Error",
220
- "ProgramStateIndicator.EStop.lb": "E-Stop",
221
- "ProgramStateIndicator.Idle.lb": "Idle",
222
- "ProgramStateIndicator.Paused.lb": "Paused",
223
- "ProgramStateIndicator.Ready.lb": "Ready",
224
- "ProgramStateIndicator.Stopped.lb": "Stopped",
225
- "ProgramStateIndicator.Auto.lb": "Auto",
226
- "ProgramStateIndicator.Manual.lb": "Manual",
227
- "ProgramStateIndicator.ManualT1.lb": "Manual T1",
228
- "ProgramStateIndicator.ManualT2.lb": "Manual T2",
229
- "RobotSetupReadinessIndicator.Ready.lb": "Ready",
230
- "RobotSetupReadinessIndicator.RobotDisconnected.lb": "Robot disconnected",
231
- "RobotSetupReadinessIndicator.CellOpen.lb": "Cell open",
232
- "RobotSetupReadinessIndicator.EStop.lb": "E-Stop",
233
- "RobotSetupReadinessIndicator.ManualMode.lb": "Manual mode",
234
- "RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb": "Precondition not fulfilled",
235
- "RobotCard.Runtime.lb": "Runtime",
236
- "RobotCard.DriveToHome.bt": "Drive to Home"
237
- }, S = p.createInstance();
238
- S.use(y).init({
160
+ "Jogging.Handle.lb": "Jog {{handle}}"
161
+ }, S = y.createInstance();
162
+ S.use(f).init({
239
163
  supportedLngs: ["en", "de"],
240
164
  resources: {
241
165
  en: {
242
166
  translations: h
243
167
  },
244
168
  de: {
245
- translations: f
169
+ translations: p
246
170
  }
247
171
  },
248
172
  ns: ["translations"],
@@ -251,18 +175,18 @@ S.use(y).init({
251
175
  order: ["navigator", "htmlTag"]
252
176
  }
253
177
  });
254
- function v(e) {
178
+ function I(e) {
255
179
  const t = d(e);
256
- return ((o) => /* @__PURE__ */ g(R, { children: /* @__PURE__ */ g(t, { ...o }) }));
180
+ return ((n) => /* @__PURE__ */ g(J, { children: /* @__PURE__ */ g(t, { ...n }) }));
257
181
  }
258
- const R = ({
182
+ const J = ({
259
183
  children: e
260
184
  }) => /* @__PURE__ */ g(m, { i18n: S, children: e });
261
185
  export {
262
- A as d,
263
- v as e,
186
+ T as d,
187
+ I as e,
264
188
  S as i,
265
- E as o,
266
- B as t,
189
+ N as o,
190
+ O as t,
267
191
  M as v
268
192
  };
@@ -0,0 +1,2 @@
1
+ "use strict";const d=require("three"),g=require("react/jsx-runtime"),m=require("react"),y=require("react-i18next"),f=require("i18next"),p=require("i18next-browser-languagedetector");function h(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const a=h(d);function J(e){try{return JSON.stringify(e)}catch{return}}function B(e){const t=e.length(),o=new a.Quaternion;if(t>1e-6){const n=e.clone().normalize();o.setFromAxisAngle(n,t)}return o}function A(e){if(!e||e.length===0)return 5;const n=e.reduce((l,r)=>l+Math.abs(r.a??0)/1e3+Math.abs(r.d??0)/1e3,0)*2;return!Number.isFinite(n)||n<=0?5:n}function E(e){if(e.length<3)return console.log("Not enough vertices to define a plane"),{isCoplanar:!1};const t=new a.Vector3(e[0].x,e[0].y,e[0].z),o=new a.Vector3(e[1].x,e[1].y,e[1].z),n=new a.Vector3(e[2].x,e[2].y,e[2].z),l=new a.Vector3().subVectors(o,t),r=new a.Vector3().subVectors(n,t),c=new a.Vector3().crossVectors(l,r).normalize();for(let i=3;i<e.length;i++){const S=new a.Vector3(e[i].x,e[i].y,e[i].z),u=new a.Vector3().subVectors(S,t),b=c.dot(u);if(Math.abs(b)>1e-6)return console.log("Vertices are not on the same plane"),{isCoplanar:!1}}return{isCoplanar:!0,normal:c}}const O={"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","Jogging.StreamStateSection.lb":"Status Stream:","Jogging.StreamStateSection.RUNNING.lb":"In Bewegung","Jogging.StreamStateSection.PAUSED_BY_USER.lb":"Pausiert (Nutzer)","Jogging.StreamStateSection.PAUSED_NEAR_COLLISION.lb":"Pausiert (Kollisionsnähe)","Jogging.StreamStateSection.PAUSED_NEAR_JOINT_LIMIT.lb":"Pausiert (nahe Gelenkgrenze)","Jogging.StreamStateSection.PAUSED_NEAR_SINGULARITY.lb":"Pausiert (nahe Singularität)","Jogging.StreamStateSection.PAUSED_ON_IO.lb":"Pausiert (I/O-Ereignis)","Jogging.StreamStateSection.END_OF_TRAJECTORY.lb":"Trajektorie beendet","Jogging.StreamStateSection.WAIT_FOR_IO.lb":"Warte auf I/O","Jogging.StreamStateSection.KIND_UNKNOWN.lb":"Bereit","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","Jogging.Handle.lb":"{{handle}} verfahren"},R={"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","Jogging.StreamStateSection.lb":"State stream:","Jogging.StreamStateSection.RUNNING.lb":"Running","Jogging.StreamStateSection.PAUSED_BY_USER.lb":"Paused (by user)","Jogging.StreamStateSection.PAUSED_NEAR_COLLISION.lb":"Paused (collision proximity)","Jogging.StreamStateSection.PAUSED_NEAR_JOINT_LIMIT.lb":"Paused (near joint limit)","Jogging.StreamStateSection.PAUSED_NEAR_SINGULARITY.lb":"Paused (near singularity)","Jogging.StreamStateSection.PAUSED_ON_IO.lb":"Paused (I/O event)","Jogging.StreamStateSection.END_OF_TRAJECTORY.lb":"End of trajectory","Jogging.StreamStateSection.WAIT_FOR_IO.lb":"Waiting for I/O","Jogging.StreamStateSection.KIND_UNKNOWN.lb":"Ready","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","Jogging.Handle.lb":"Jog {{handle}}"},s=f.createInstance();s.use(p).init({supportedLngs:["en","de"],resources:{en:{translations:R},de:{translations:O}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function v(e){const t=m.memo(e);return(n=>g.jsx(T,{children:g.jsx(t,{...n})}))}const T=({children:e})=>g.jsx(y.I18nextProvider,{i18n:s,children:e});exports.dhParametersToPlaneSize=A;exports.externalizeComponent=v;exports.i18n=s;exports.orientationToQuaternion=B;exports.tryStringifyJson=J;exports.verticesToCoplanarity=E;