@wandelbots/wandelbots-js-react-components 6.3.0 → 6.4.0-pr.chore-playground-tool-steps.664.4537d63

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 (191) hide show
  1. package/README.md +323 -120
  2. package/dist/3d.cjs +1 -1
  3. package/dist/3d.d.ts +5 -3
  4. package/dist/3d.js +24 -23
  5. package/dist/CurrentPoseBar/index.cjs +1 -0
  6. package/dist/CurrentPoseBar/index.d.ts +2 -0
  7. package/dist/CurrentPoseBar/index.js +5 -0
  8. package/dist/JoggingButtons/index.cjs +1 -0
  9. package/dist/JoggingButtons/index.d.ts +3 -0
  10. package/dist/JoggingButtons/index.js +5 -0
  11. package/dist/JoggingGizmo/index.cjs +1 -0
  12. package/dist/JoggingGizmo/index.d.ts +4 -0
  13. package/dist/JoggingGizmo/index.js +7 -0
  14. package/dist/JoggingJointSlider/index.cjs +1 -0
  15. package/dist/JoggingJointSlider/index.d.ts +2 -0
  16. package/dist/JoggingJointSlider/index.js +5 -0
  17. package/dist/RobotControlPanel/index.cjs +1 -0
  18. package/dist/RobotControlPanel/index.d.ts +2 -0
  19. package/dist/RobotControlPanel/index.js +5 -0
  20. package/dist/RobotHeader/index.cjs +1 -0
  21. package/dist/RobotHeader/index.d.ts +4 -0
  22. package/dist/RobotHeader/index.js +5 -0
  23. package/dist/SafetyBar/index.cjs +1 -1
  24. package/dist/SafetyBar/index.js +1 -1
  25. package/dist/chunks/CurrentPoseBar-CyHUWmjM.cjs +1 -0
  26. package/dist/chunks/CurrentPoseBar-zTZi68tY.js +505 -0
  27. package/dist/chunks/JoggingButtons-CXaozFVz.js +108 -0
  28. package/dist/chunks/JoggingButtons-CbL-5LMK.cjs +1 -0
  29. package/dist/chunks/JoggingGizmo-DGbFLWgT.cjs +1 -0
  30. package/dist/chunks/JoggingGizmo-SuS9MmL7.js +810 -0
  31. package/dist/chunks/JoggingGizmoOrientation-dzned4f4.cjs +1 -0
  32. package/dist/chunks/JoggingGizmoOrientation-x_crT_64.js +14 -0
  33. package/dist/chunks/JoggingJointSlider-CZ-k6XCa.js +406 -0
  34. package/dist/chunks/JoggingJointSlider-R3_A9Ppj.cjs +1 -0
  35. package/dist/chunks/Robot-D0ZqUCn3.cjs +1 -0
  36. package/dist/chunks/Robot-UoykZeYH.js +1272 -0
  37. package/dist/chunks/RobotControlPanel-BnMfmO41.js +822 -0
  38. package/dist/chunks/RobotControlPanel-BuDGcxPR.cjs +1 -0
  39. package/dist/chunks/RobotHeader-BZci9ahT.js +244 -0
  40. package/dist/chunks/RobotHeader-CqK0700U.cjs +1 -0
  41. package/dist/chunks/SafetyBar-Bbg-o8h9.cjs +1 -0
  42. package/dist/chunks/{SafetyBar-Cy9DiXp9.js → SafetyBar-Cuak4ffd.js} +11 -10
  43. package/dist/chunks/SmallSelect-BdD9uLKK.js +52 -0
  44. package/dist/chunks/SmallSelect-Dcsd7_6_.cjs +1 -0
  45. package/dist/chunks/TrajectoryExecutionStore-DPqfDcfn.js +3398 -0
  46. package/dist/chunks/TrajectoryExecutionStore-DV6mLEx9.cjs +3 -0
  47. package/dist/chunks/converters-C8I_A_tA.cjs +1 -0
  48. package/dist/chunks/converters-DpNB_WNQ.js +39 -0
  49. package/dist/chunks/externalizeComponent-BdxGBLIv.cjs +2 -0
  50. package/dist/chunks/externalizeComponent-_w2d1_pz.js +283 -0
  51. package/dist/chunks/holdSafety-BtoZ5We3.cjs +1 -0
  52. package/dist/chunks/holdSafety-Di1GZAWg.js +37 -0
  53. package/dist/chunks/joggingColors-CuT5u0H8.js +135 -0
  54. package/dist/chunks/joggingColors-ZDc_2UCp.cjs +1 -0
  55. package/dist/chunks/useEveryFrame-G_-ma1nC.js +142 -0
  56. package/dist/chunks/useEveryFrame-dmPPTKtT.cjs +1 -0
  57. package/dist/chunks/useSmoothedMotionState-COMJRcOt.js +214 -0
  58. package/dist/chunks/useSmoothedMotionState-Con0E5Bx.cjs +1 -0
  59. package/dist/components/AppHeader.d.ts +1 -1
  60. package/dist/components/currentPoseBar/CurrentPoseBar.d.ts +48 -0
  61. package/dist/components/currentPoseBar/OrientationFormatPopover.d.ts +19 -0
  62. package/dist/components/currentPoseBar/StreamStatus.d.ts +10 -0
  63. package/dist/components/currentPoseBar/orientation.d.ts +34 -0
  64. package/dist/components/currentPoseBar/poseValues.d.ts +15 -0
  65. package/dist/components/jogging/JoggingButtons.d.ts +16 -0
  66. package/dist/components/jogging/JoggingCartesianAxisControl.d.ts +1 -1
  67. package/dist/components/jogging/JoggingJointTab.d.ts +1 -1
  68. package/dist/components/jogging/JoggingPanel.d.ts +6 -3
  69. package/dist/components/jogging/JoggingStore.d.ts +96 -19
  70. package/dist/components/jogging/gizmo/JoggingGizmo.d.ts +43 -0
  71. package/dist/components/jogging/gizmo/JoggingGizmoOrientation.d.ts +26 -0
  72. package/dist/components/jogging/gizmo/RotationHandles.d.ts +7 -0
  73. package/dist/components/jogging/gizmo/RotationScene.d.ts +6 -0
  74. package/dist/components/jogging/gizmo/TranslationHandles.d.ts +6 -0
  75. package/dist/components/jogging/gizmo/TranslationScene.d.ts +6 -0
  76. package/dist/components/jogging/gizmo/arcGrabAreas.d.ts +58 -0
  77. package/dist/components/jogging/gizmo/arcs.d.ts +54 -0
  78. package/dist/components/jogging/gizmo/arrows.d.ts +63 -0
  79. package/dist/components/jogging/gizmo/gizmoShared.d.ts +125 -0
  80. package/dist/components/jogging/gizmo/gizmoView.d.ts +42 -0
  81. package/dist/components/jogging/gizmo/useGizmoTurn.d.ts +11 -0
  82. package/dist/components/jogging/holdSafety.d.ts +44 -0
  83. package/dist/components/jogging/jogError.d.ts +9 -0
  84. package/dist/components/jogging/jogHandle.d.ts +23 -0
  85. package/dist/components/jogging/joggingColors.d.ts +24 -0
  86. package/dist/components/jogging/joggingVelocity.d.ts +21 -0
  87. package/dist/components/jogging/joint/JoggingJointSlider.d.ts +52 -0
  88. package/dist/components/jogging/joint/JointSliderTrack.d.ts +27 -0
  89. package/dist/components/jogging/joint/jointJog.d.ts +55 -0
  90. package/dist/components/jogging/joint/useJointJogHold.d.ts +48 -0
  91. package/dist/components/jogging/useHold.d.ts +38 -0
  92. package/dist/components/jogging/useJogControls.d.ts +45 -0
  93. package/dist/components/robotControl/CartesianJogTab.d.ts +21 -0
  94. package/dist/components/robotControl/HoldToMoveButton.d.ts +25 -0
  95. package/dist/components/robotControl/JogArea.d.ts +22 -0
  96. package/dist/components/robotControl/JogModeToggle.d.ts +8 -0
  97. package/dist/components/robotControl/JointJogTab.d.ts +11 -0
  98. package/dist/components/robotControl/MoveToTab.d.ts +18 -0
  99. package/dist/components/robotControl/PanelSelect.d.ts +13 -0
  100. package/dist/components/robotControl/PoseField.d.ts +21 -0
  101. package/dist/components/robotControl/RobotControlPanel.d.ts +212 -0
  102. package/dist/components/robotControl/Section.d.ts +5 -0
  103. package/dist/components/robotControl/SmallSelect.d.ts +15 -0
  104. package/dist/components/robotControl/VelocityRow.d.ts +14 -0
  105. package/dist/components/robotControl/atPose.d.ts +8 -0
  106. package/dist/components/robotControl/poseText.d.ts +15 -0
  107. package/dist/components/robotControl/units.d.ts +16 -0
  108. package/dist/components/robotControl/useCopyText.d.ts +12 -0
  109. package/dist/components/robotControl/useEveryFrame.d.ts +6 -0
  110. package/dist/components/robotHeader/ActivationSwitch.d.ts +7 -0
  111. package/dist/components/robotHeader/AppNavigation.d.ts +15 -0
  112. package/dist/components/robotHeader/RobotHeader.d.ts +42 -0
  113. package/dist/components/robots/GenericRobot.d.ts +2 -1
  114. package/dist/components/robots/LinearAxis.d.ts +1 -1
  115. package/dist/components/robots/LinearAxisAnimator.d.ts +11 -2
  116. package/dist/components/robots/Robot.d.ts +1 -1
  117. package/dist/components/robots/robotModelLogic.d.ts +11 -9
  118. package/dist/components/utils/hooks.d.ts +1 -6
  119. package/dist/core.cjs +1 -1
  120. package/dist/core.d.ts +13 -18
  121. package/dist/core.js +37 -51
  122. package/dist/index.cjs +1 -1
  123. package/dist/index.js +58 -71
  124. package/dist/lib/ConnectedMotionGroup.d.ts +5 -7
  125. package/dist/lib/JoggerConnection.d.ts +137 -27
  126. package/dist/lib/MotionStreamConnection.d.ts +15 -6
  127. package/dist/lib/Pose3.d.ts +22 -0
  128. package/dist/lib/PoseTransformer.d.ts +25 -0
  129. package/dist/lib/TrajectoryExecutionStore.d.ts +129 -0
  130. package/dist/lib/connectionLogger.d.ts +9 -0
  131. package/dist/lib/incrementalCartesianMotion.d.ts +40 -0
  132. package/dist/lib/motionStateUpdate.d.ts +27 -0
  133. package/dist/lib/novaConnection.d.ts +23 -0
  134. package/dist/lib/planErrorTranslation.d.ts +8 -0
  135. package/dist/lib/rotation.d.ts +12 -0
  136. package/package.json +31 -66
  137. package/dist/Setup.d.ts +0 -11
  138. package/dist/chunks/MotionGroupVisualizer-DshWR1wY.js +0 -1653
  139. package/dist/chunks/MotionGroupVisualizer-eD7yFEcF.cjs +0 -1
  140. package/dist/chunks/SafetyBar-DPrv_OQA.cjs +0 -1
  141. package/dist/chunks/externalizeComponent-EDymnaGR.js +0 -268
  142. package/dist/chunks/externalizeComponent-OO4jcrz5.cjs +0 -2
  143. package/dist/chunks/theming-DfSy4-Ic.cjs +0 -4
  144. package/dist/chunks/theming-mF9Rt8SS.js +0 -5542
  145. package/dist/chunks/useSmoothedMotionState-DyDgSVYX.js +0 -478
  146. package/dist/chunks/useSmoothedMotionState-VYxEIyfr.cjs +0 -1
  147. package/dist/components/3d-viewport/CoordinateSystemTransform.d.ts +0 -11
  148. package/dist/components/AdornedTextField.d.ts +0 -7
  149. package/dist/components/CopyableText.d.ts +0 -6
  150. package/dist/components/CycleTimer/CycleTimer.d.ts +0 -3
  151. package/dist/components/CycleTimer/DefaultVariant.d.ts +0 -9
  152. package/dist/components/CycleTimer/SmallVariant.d.ts +0 -10
  153. package/dist/components/CycleTimer/index.d.ts +0 -27
  154. package/dist/components/CycleTimer/types.d.ts +0 -49
  155. package/dist/components/CycleTimer/useAnimations.d.ts +0 -14
  156. package/dist/components/CycleTimer/useTimerLogic.d.ts +0 -24
  157. package/dist/components/CycleTimer/utils.d.ts +0 -21
  158. package/dist/components/CycleTimer.d.ts +0 -3
  159. package/dist/components/DataGrid.d.ts +0 -66
  160. package/dist/components/LogPanel.d.ts +0 -38
  161. package/dist/components/LogStore.d.ts +0 -12
  162. package/dist/components/LogViewer.d.ts +0 -46
  163. package/dist/components/ProgramControl.d.ts +0 -55
  164. package/dist/components/ProgramStateIndicator.d.ts +0 -26
  165. package/dist/components/RobotCard.d.ts +0 -98
  166. package/dist/components/RobotListItem.d.ts +0 -34
  167. package/dist/components/RobotSetupReadinessIndicator.d.ts +0 -37
  168. package/dist/components/SelectableFab.d.ts +0 -7
  169. package/dist/components/TabBar.d.ts +0 -45
  170. package/dist/components/ThemeSelect.d.ts +0 -6
  171. package/dist/components/Timer/Timer.d.ts +0 -3
  172. package/dist/components/Timer/TimerDefaultVariant.d.ts +0 -9
  173. package/dist/components/Timer/TimerSmallVariant.d.ts +0 -10
  174. package/dist/components/Timer/index.d.ts +0 -19
  175. package/dist/components/Timer/types.d.ts +0 -35
  176. package/dist/components/Timer/useTimerAnimations.d.ts +0 -10
  177. package/dist/components/Timer/useTimerLogic.d.ts +0 -19
  178. package/dist/components/Timer/utils.d.ts +0 -17
  179. package/dist/components/Timer.d.ts +0 -3
  180. package/dist/components/TransparentOverlay.d.ts +0 -4
  181. package/dist/components/jogging/JoggingFreedriveTab.d.ts +0 -1
  182. package/dist/components/jogging/PoseCartesianValues.d.ts +0 -9
  183. package/dist/components/jogging/PoseJointValues.d.ts +0 -8
  184. package/dist/components/robots/AxisConfig.d.ts +0 -2
  185. package/dist/components/robots/manufacturerHomePositions.d.ts +0 -20
  186. package/dist/icons/DropdownArrowIcon.d.ts +0 -2
  187. package/dist/icons/index.d.ts +0 -12
  188. package/dist/lib/novaCompat.d.ts +0 -16
  189. package/dist/themes/createDarkTheme.d.ts +0 -7
  190. package/dist/themes/themeTypes.d.ts +0 -40
  191. package/dist/themes/theming.d.ts +0 -24
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),_=require("@mui/material/IconButton"),m=require("@mui/material/Stack"),B=require("@mui/material/Tab"),$=require("@mui/material/Tabs"),F=require("@mui/material/Typography"),G=require("@wandelbots/icons/CloseFilled"),p=require("react"),w=require("react-i18next"),D=require("./externalizeComponent-BdxGBLIv.cjs"),A=require("@mui/material/Divider"),P=require("@mui/material/Tooltip"),W=require("@wandelbots/icons/Jog"),K=require("@wandelbots/icons/ViewModuleFilled"),Q=require("./JoggingGizmo-DGbFLWgT.cjs"),U=require("./JoggingButtons-CbL-5LMK.cjs"),Y=require("@mui/material/styles"),N=require("@mui/material/ToggleButton"),Z=require("@mui/material/ToggleButtonGroup"),S=require("./useEveryFrame-dmPPTKtT.cjs"),tt=require("@mui/material/Slider"),et=require("./JoggingJointSlider-R3_A9Ppj.cjs"),ot=require("@wandelbots/icons/Undo"),E=require("@wandelbots/mui"),nt=require("@wandelbots/icons/NorthEastFilled"),rt=require("./joggingColors-ZDc_2UCp.cjs"),O=require("@wandelbots/icons/CheckFilled"),lt=require("@wandelbots/icons/ContentCopyFilled"),st=require("@wandelbots/icons/EditFilled");function at({view:t,onViewChange:o,mode:n,controls:s,gizmoOrientation:a,gizmoFrameQuaternion:x}){const{t:r}=w.useTranslation(),l=t==="gizmo"&&a!==void 0,i=r(l?n==="increment"?"RobotControl.JogArea.Hint.ClickHandle.lb":"RobotControl.JogArea.Hint.HoldHandle.lb":n==="increment"?"RobotControl.JogArea.Hint.ClickButton.lb":"RobotControl.JogArea.Hint.HoldButton.lb"),u=r(l?"RobotControl.JogArea.ShowButtons.bt":"RobotControl.JogArea.ShowGizmo.bt");return e.jsxs(m,{"data-testid":"jog-area",sx:{position:"relative",alignItems:"center",gap:"16px"},children:[a&&e.jsx(P,{title:u,placement:"left",children:e.jsx(_,{"aria-label":u,onClick:()=>o(l?"buttons":"gizmo"),size:"small",sx:d=>{var b;return{position:"absolute",top:0,right:0,zIndex:1,borderRadius:"8px",border:`1px solid ${d.palette.divider}`,background:(b=d.palette.backgroundPaperElevation)==null?void 0:b[11]}},children:l?e.jsx(K.ViewModuleFilled,{}):e.jsx(W.Jog,{})})}),l?e.jsx(Q.JoggingGizmo,{...s,orientation:a,frameQuaternion:x,size:180}):e.jsx(U.JoggingButtons,{...s}),e.jsx(F,{variant:"body2",color:"text.secondary",textAlign:"center",children:i})]})}const it=Y.styled(Z)(({theme:t})=>{var o;return{gap:"4px","& .MuiToggleButton-root":{border:"none",borderRadius:"8px",padding:"6px 16px",textTransform:"none",fontSize:"14px",color:t.palette.text.secondary},"& .MuiToggleButton-root.Mui-selected":{color:t.palette.text.primary,background:(o=t.palette.backgroundPaperElevation)==null?void 0:o[11]}}});function ct({value:t,onChange:o,disabled:n}){const{t:s}=w.useTranslation();return e.jsxs(it,{exclusive:!0,value:t,disabled:n,"aria-label":s("RobotControl.JogMode.lb"),onChange:(a,x)=>{x!==null&&o(x)},children:[e.jsx(N,{value:"continuous",children:s("RobotControl.JogMode.Continuous.bt")}),e.jsx(N,{value:"increment",children:s("RobotControl.JogMode.Increment.bt")})]})}function I({children:t}){return e.jsx(m,{sx:{padding:"16px 20px",gap:"16px"},children:t})}function ut(t){return t*180/Math.PI}function dt(t){return t*Math.PI/180}function z(t,o){return t==="rotate"?ut(o):o}function xt(t,o){return t==="rotate"?dt(o):o}function pt(t,o){const n=String(Number(z(t,o).toFixed(2)));return t==="rotate"?`${n}°`:`${n} mm`}function gt(t,o){const n=Math.round(z(t,o));return t==="rotate"?`${n}°/s`:`${n} mm/s`}function V({motion:t,velocity:o,onChange:n,disabled:s}){const{t:a}=w.useTranslation(),x=p.useId(),r=l=>z(t,l);return e.jsxs(m,{gap:"4px",children:[e.jsxs(m,{direction:"row",sx:{justifyContent:"space-between"},children:[e.jsx(F,{id:x,variant:"body2",color:"text.secondary",children:a("RobotControl.Velocity.lb")}),e.jsx(F,{variant:"body2",color:"text.primary",sx:{fontVariantNumeric:"tabular-nums"},children:gt(t,o.value)})]}),e.jsx(tt,{"aria-labelledby":x,size:"small",value:Math.round(r(o.value)),min:Math.ceil(r(o.min)),max:Math.floor(r(o.max)),disabled:s,onChange:(l,i)=>{typeof i=="number"&&n(xt(t,i))},sx:l=>{var i;return{height:4,"& .MuiSlider-rail":{opacity:.38},"& .MuiSlider-thumb":{width:16,height:16,border:`3px solid ${l.palette.primary.main}`,backgroundColor:(i=l.palette.backgroundPaperElevation)==null?void 0:i[5]}}}})]})}function bt({motion:t,settings:o,onSettingsChange:n,disabled:s=!1,tcp:a,jogFrame:x,velocity:r,onVelocityChange:l,onJogStart:i,onJogStop:u,increments:d,gizmoOrientation:b,gizmoFrameQuaternion:j}){const{t:C}=w.useTranslation(),c=d?o.mode:"continuous",T=(d==null?void 0:d.steps[t])??[],v=Math.min(o.step[t],T.length-1),f=T[v],M=p.useRef(!1);function q(h,g){if(c==="increment"){d&&f!==void 0&&d.onStep(t,h,g,f);return}M.current=!0,i(t,h,g)}function J(){M.current&&(M.current=!1,u())}return e.jsxs(e.Fragment,{children:[(a||x)&&e.jsxs(e.Fragment,{children:[e.jsx(I,{children:e.jsxs(m,{direction:"row",sx:{gap:"12px"},children:[a&&e.jsx(S.PanelSelect,{label:C("RobotControl.Tcp.lb"),...a,disabled:s}),x&&e.jsx(S.PanelSelect,{label:C("RobotControl.JogFrame.lb"),...x,disabled:s})]})}),e.jsx(A,{sx:{marginX:"20px"}})]}),e.jsxs(I,{children:[d&&e.jsx(ct,{value:c,onChange:h=>n({...o,mode:h}),disabled:s}),e.jsx(V,{motion:t,velocity:r[t],onChange:h=>l(t,h),disabled:s}),c==="increment"&&f!==void 0&&e.jsx(S.InlineSelect,{label:C("RobotControl.StepSize.lb"),value:String(v),options:T.map((h,g)=>({id:String(g),label:pt(t,h)})),onChange:h=>n({...o,step:{...o.step,[t]:Number(h)}}),disabled:s})]}),e.jsx(A,{sx:{marginX:"20px"}}),e.jsx(I,{children:e.jsx(at,{view:o.view,onViewChange:h=>n({...o,view:h}),mode:c,controls:{motion:t,onJogStart:q,onJogStop:J,activeHandle:c==="increment"?d==null?void 0:d.running:null,disabled:s},gizmoOrientation:b,gizmoFrameQuaternion:j},c)})]})}function ft({joints:t,disabled:o}){const n=p.useRef(null),[s,a]=p.useState(null);function x(l,i){n.current!==null&&n.current!==l||(n.current=l,a(l),t.onJogStart(l,i))}function r(l){n.current===l&&(n.current=null,a(null),t.onJogStop())}return e.jsxs(e.Fragment,{children:[e.jsx(I,{children:e.jsx(m,{sx:{gap:"8px",paddingX:"4px"},children:t.joints.map((l,i)=>e.jsx(et.JoggingJointSlider,{label:`J${i+1}`,name:l.name,value:l.value,min:l.min,max:l.max,linear:t.linear,onJogStart:u=>x(i,u),onJogStop:()=>r(i),disabled:o||s!==null&&s!==i},i))})}),e.jsx(A,{sx:{marginX:"20px"}}),e.jsx(I,{children:e.jsx(V,{motion:t.linear?"translate":"rotate",velocity:t.velocity,onChange:t.onVelocityChange,disabled:o})})]})}const ht=.5,Ct=.01;function jt(t,o){return t?Math.hypot(t.position[0]-o.position[0],t.position[1]-o.position[1],t.position[2]-o.position[2])<=ht&&vt(t.orientation,o.orientation)<=Ct:!1}function X(t){const o=Math.hypot(...t);if(o<1e-12)return[1,0,0,0];const n=Math.sin(o/2)/o;return[Math.cos(o/2),t[0]*n,t[1]*n,t[2]*n]}function vt(t,o){const n=X(t),s=X(o),a=Math.abs(n[0]*s[0]+n[1]*s[1]+n[2]*s[2]+n[3]*s[3]);return 2*Math.acos(Math.min(1,a))}const Rt="move",mt=200;function Tt({state:t,ready:o,atPose:n,disabled:s,onMoveStart:a,onMoveStop:x,stopRef:r}){const{t:l}=w.useTranslation(),[i,u]=p.useState(!1),d=p.useRef(void 0),b=p.useRef(!1),j=p.useRef({onMoveStart:a,onMoveStop:x});j.current={onMoveStart:a,onMoveStop:x};const C=t==="planned",c=C||t==="moving",{handlersFor:T,stop:v}=rt.useHold({onStart:()=>{u(!0),d.current=setTimeout(()=>{d.current=void 0,b.current=!0,j.current.onMoveStart()},mt)},onStop:()=>{u(!1),clearTimeout(d.current),d.current=void 0,b.current&&(b.current=!1,j.current.onMoveStop())},disabled:i?s||!o||!c:s||!o||n||!C,isSame:()=>!0});r&&(r.current=v),p.useEffect(()=>()=>clearTimeout(d.current),[]);const f=l(t==="moving"?"RobotControl.MoveTo.Moving.bt":t==="stopping"?"RobotControl.MoveTo.Stopping.bt":"RobotControl.MoveTo.MoveTo.bt");return e.jsx(P,{title:l(n?"RobotControl.MoveTo.AtPose.lb":"RobotControl.MoveTo.HoldToMove.lb"),placement:"top",children:e.jsx("span",{...T(Rt),style:{display:"block",flexGrow:1,touchAction:"none",userSelect:"none"},children:e.jsx(E.PrimaryButton,{fullWidth:!0,disabled:s||!o||n||!c,loading:t==="planning"||t==="stopping",loadingPosition:"start",startIcon:e.jsx(nt.NorthEastFilled,{}),"aria-pressed":i,children:f})})})}function Mt({text:t,editing:o,onEdit:n,onDraftChange:s,onCancel:a,onConfirm:x,canConfirm:r,error:l,disabled:i}){const{t:u}=w.useTranslation(),d=p.useRef(null),{copied:b,copy:j}=S.useCopyText();p.useEffect(()=>{const c=d.current;c&&(o?(c.focus(),c.setSelectionRange(c.value.length,c.value.length)):document.activeElement===c&&(c.blur(),c.scrollLeft=0))},[o]);function C(){return j(t,()=>{var c;return(c=d.current)==null?void 0:c.select()})}return e.jsxs(m,{direction:"row",sx:{gap:"8px",alignItems:"flex-start"},children:[e.jsx(E.AdornedTextField,{label:u("RobotControl.MoveTo.Coordinates.lb"),value:t,inputRef:d,onChange:c=>s(c.target.value),onClick:()=>{!o&&!i&&n()},onKeyDown:c=>{o&&(c.key==="Enter"&&r?x():c.key==="Escape"&&a())},error:!!l,helperText:l??void 0,fullWidth:!0,autoComplete:"off",slotProps:{htmlInput:{readOnly:!o,spellCheck:!1}},sx:{"& input":{fontVariantNumeric:"tabular-nums",cursor:o||i?void 0:"text"}}}),e.jsx(m,{direction:"row",sx:{gap:"8px",height:"56px",alignItems:"center"},children:o?e.jsxs(e.Fragment,{children:[e.jsx(E.RoundedIconButton,{icon:e.jsx(G.CloseFilled,{}),ariaLabel:u("RobotControl.MoveTo.Cancel.bt"),onClick:a}),e.jsx(P,{title:u("RobotControl.MoveTo.ConfirmEdit.lb"),placement:"left",children:e.jsx("span",{children:e.jsx(E.RoundedIconButton,{icon:e.jsx(O.CheckFilled,{}),ariaLabel:u("RobotControl.MoveTo.ConfirmEdit.lb"),onClick:x,disabled:!r,sx:{color:"primary.main"}})})})]}):e.jsxs(e.Fragment,{children:[e.jsx(P,{title:u("RobotControl.MoveTo.Copied.lb"),open:b,disableHoverListener:!0,placement:"left",children:e.jsx(E.RoundedIconButton,{icon:b?e.jsx(O.CheckFilled,{}):e.jsx(lt.ContentCopyFilled,{}),ariaLabel:u("RobotControl.MoveTo.Copy.bt"),onClick:()=>void C()})}),e.jsx(E.RoundedIconButton,{icon:e.jsx(st.EditFilled,{}),ariaLabel:u("RobotControl.MoveTo.Edit.bt"),onClick:n,disabled:i})]})})]})}function St({moveTo:t,tcp:o,velocity:n,onVelocityChange:s,disabled:a}){var y;const{t:x}=w.useTranslation(),[r,l]=p.useState(null),[i,u]=p.useState(null),d=S.useEveryFrame(()=>{const R=t.getCurrentPose();return R?S.poseToText(R):""},r===null&&i===null),b=(r==null?void 0:r.text)??d,j=i!==null,C=i===null?null:S.parsePoseText(i),c=r!==null&&!t.error&&!j,T=S.useEveryFrame(()=>r!==null&&jt(t.getCurrentPose(),r.pose),c)&&c,v=p.useRef(!1),f=p.useRef(null);function M(){var R;(R=f.current)==null||R.call(f),v.current=!1,l(null),u(null),t.onTargetChange(null)}function q(){C===null||a||(v.current=!1,l({pose:C,text:S.poseToText(C)}),u(null),t.onTargetChange(C))}p.useEffect(()=>{if(c){if(t.state==="moving"){v.current=!0;return}v.current&&T&&t.state!=="stopping"&&M()}},[c,t.state,T]);const J=[o==null?void 0:o.value,(y=t.frame)==null?void 0:y.value].join("\0");p.useEffect(()=>{r&&M()},[J]);const h=p.useRef({target:r,onTargetChange:t.onTargetChange});h.current={target:r,onTargetChange:t.onTargetChange},p.useEffect(()=>()=>{var R;(R=f.current)==null||R.call(f),h.current.target&&h.current.onTargetChange(null)},[]);const g=i!==null?C===null?x("RobotControl.MoveTo.InvalidPose.lb"):null:r?t.error??null:null;return e.jsxs(I,{children:[o&&e.jsx(S.PanelSelect,{label:x("RobotControl.Tcp.lb"),...o,disabled:a}),e.jsx(F,{variant:"body1",color:"text.primary",children:x("RobotControl.MoveTo.TargetPose.lb")}),e.jsxs(m,{sx:{gap:"8px"},children:[t.frame&&e.jsx(S.PanelSelect,{label:x("RobotControl.MoveTo.RelativeTo.lb"),...t.frame,disabled:a}),e.jsx(Mt,{text:i??b,editing:j,onEdit:()=>{a||u(b)},onDraftChange:u,onCancel:()=>u(null),onConfirm:q,canConfirm:C!==null&&!a&&t.state!=="planning",error:g,disabled:a})]}),e.jsx(V,{motion:"translate",velocity:n,onChange:s,disabled:a}),e.jsxs(m,{direction:"row",sx:{gap:"12px",alignItems:"center"},children:[r&&!j&&e.jsx(P,{title:x("RobotControl.MoveTo.Reset.lb"),placement:"top",children:e.jsx("span",{children:e.jsx(E.RoundedIconButton,{icon:e.jsx(ot.Undo,{}),ariaLabel:x("RobotControl.MoveTo.Reset.lb"),onClick:M})})}),e.jsx(Tt,{state:r?t.state:"idle",ready:c,atPose:T,disabled:a,onMoveStart:()=>{r&&t.onMoveStart(r.pose)},onMoveStop:t.onMoveStop,stopRef:f})]})]})}const yt=D.externalizeComponent(({onClose:t,sx:o,joints:n,moveTo:s,jogDisabled:a=!1,tab:x,onTabChange:r,jogMode:l,onJogModeChange:i,...u})=>{const{t:d}=w.useTranslation(),b=u.disabled??!1,[j,C]=p.useState("translate"),[c,T]=p.useState({mode:"continuous",view:"gizmo",step:{translate:0,rotate:0}}),v=x??j,f=v==="joint"&&!n||v==="moveTo"&&!s?"translate":v,M=wt(c,l,u.increments),q=d("RobotControl.Title.ti");function J(g){C(g),r==null||r(g)}function h(g){var y,R,H;T(g),g.mode!==M.mode&&(i==null||i(g.mode));for(const k of["translate","rotate"]){const L=(y=u.increments)==null?void 0:y.steps[k][g.step[k]];g.step[k]!==M.step[k]&&L!==void 0&&((H=(R=u.increments)==null?void 0:R.onStepChange)==null||H.call(R,k,L))}}return e.jsxs(m,{"data-testid":"robot-control-panel",sx:[g=>{var y;return{minHeight:0,overflow:"hidden",borderRadius:"16px",background:(y=g.palette.backgroundPaperElevation)==null?void 0:y[5]}},...Array.isArray(o)?o:[o]],children:[e.jsxs(m,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",padding:"20px 20px 8px"},children:[e.jsx(F,{component:"h2",color:"text.primary",sx:{fontSize:"20px"},children:q}),t&&e.jsx(_,{"aria-label":d("RobotControl.Close.bt"),onClick:t,size:"small",children:e.jsx(G.CloseFilled,{})})]}),e.jsxs($,{value:f,onChange:(g,y)=>J(y),"aria-label":q,variant:"scrollable",scrollButtons:!1,sx:{marginX:"20px",borderBottom:1,borderColor:"divider",background:"transparent"},children:[e.jsx(B,{value:"translate",label:d("RobotControl.Tab.Translate.bt"),sx:{minWidth:0,paddingX:"12px",textTransform:"none"}}),e.jsx(B,{value:"rotate",label:d("RobotControl.Tab.Rotate.bt"),sx:{minWidth:0,paddingX:"12px",textTransform:"none"}}),n&&e.jsx(B,{value:"joint",label:d("RobotControl.Tab.Joint.bt"),sx:{minWidth:0,paddingX:"12px",textTransform:"none"}}),s&&e.jsx(B,{value:"moveTo",label:d("RobotControl.Tab.MoveTo.bt"),sx:{minWidth:0,paddingX:"12px",textTransform:"none"}})]}),e.jsx(m,{sx:{flexGrow:1,overflowY:"auto",overflowX:"hidden"},children:f==="joint"&&n?e.jsx(ft,{joints:n,disabled:b||a}):f==="moveTo"&&s?e.jsx(St,{moveTo:s,tcp:u.tcp,velocity:u.velocity.translate,onVelocityChange:g=>u.onVelocityChange("translate",g),disabled:b}):e.jsx(bt,{...u,disabled:b||a,motion:f==="rotate"?"rotate":"translate",settings:M,onSettingsChange:h})})]})});function wt(t,o,n){const s=a=>{var l;const x=(l=n==null?void 0:n.step)==null?void 0:l[a];if(x===void 0)return t.step[a];const r=n==null?void 0:n.steps[a].findIndex(i=>Math.abs(i-x)<=1e-9*Math.max(1,Math.abs(i)));return r===void 0||r<0?t.step[a]:r};return{...t,mode:o??t.mode,step:{translate:s("translate"),rotate:s("rotate")}}}exports.RobotControlPanel=yt;
@@ -0,0 +1,244 @@
1
+ import { jsxs as a, jsx as i, Fragment as I } from "react/jsx-runtime";
2
+ import g from "@mui/material/Box";
3
+ import s from "@mui/material/Stack";
4
+ import { useId as v, useState as A } from "react";
5
+ import { useTranslation as h } from "react-i18next";
6
+ import { e as B } from "./externalizeComponent-_w2d1_pz.js";
7
+ import { S as C } from "./SafetyBar-Cuak4ffd.js";
8
+ import { S as k } from "./SmallSelect-BdD9uLKK.js";
9
+ import T from "@mui/material/CircularProgress";
10
+ import R from "@mui/material/Switch";
11
+ import w from "@mui/material/Typography";
12
+ import H from "@mui/icons-material/Apps";
13
+ import f from "@mui/material/Button";
14
+ import M from "@mui/material/ButtonGroup";
15
+ import z from "@mui/material/Menu";
16
+ import F from "@mui/material/MenuItem";
17
+ import { FontFamilyBrand as P } from "@wandelbots/design-tokens";
18
+ import { SearchFilled as W } from "@wandelbots/icons/SearchFilled";
19
+ function G({
20
+ state: e,
21
+ disabled: p = !1,
22
+ onToggle: l
23
+ }) {
24
+ const { t: r } = h(), c = v(), o = e === "activating" || e === "deactivating", n = {
25
+ inactive: r("SafetyBar.ActivationToggle.Activate.bt"),
26
+ activating: r("SafetyBar.ActivationToggle.Activating.bt"),
27
+ active: r("SafetyBar.ActivationToggle.Activated.bt"),
28
+ deactivating: r("SafetyBar.ActivationToggle.Deactivating.bt")
29
+ }[e];
30
+ return /* @__PURE__ */ a(
31
+ s,
32
+ {
33
+ direction: "row",
34
+ "data-testid": "robot-activation",
35
+ sx: { gap: "4px", alignItems: "center" },
36
+ children: [
37
+ /* @__PURE__ */ i(
38
+ R,
39
+ {
40
+ size: "small",
41
+ checked: e === "active" || e === "deactivating",
42
+ disabled: o || p,
43
+ onChange: () => l(),
44
+ slotProps: { input: { role: "switch", "aria-labelledby": c } }
45
+ }
46
+ ),
47
+ /* @__PURE__ */ i(
48
+ w,
49
+ {
50
+ id: c,
51
+ variant: "body2",
52
+ color: "text.secondary",
53
+ noWrap: !0,
54
+ sx: { letterSpacing: "0.17px" },
55
+ children: n
56
+ }
57
+ ),
58
+ o && /* @__PURE__ */ i(T, { size: 16 })
59
+ ]
60
+ }
61
+ );
62
+ }
63
+ const b = {
64
+ minWidth: 0,
65
+ padding: "4px 10px",
66
+ color: "text.primary",
67
+ "& svg": { width: "16px", height: "16px" }
68
+ };
69
+ function j({
70
+ appIcon: e,
71
+ appName: p,
72
+ apps: l,
73
+ onAppSelect: r,
74
+ onSearch: c
75
+ }) {
76
+ const { t: o } = h(), [n, d] = A(null);
77
+ function m(t) {
78
+ d(null), t.onClick ? t.onClick() : t.href && (window.location.href = t.href), r == null || r(t);
79
+ }
80
+ return /* @__PURE__ */ a(s, { direction: "row", sx: { gap: "8px", alignItems: "center" }, children: [
81
+ /* @__PURE__ */ a(
82
+ M,
83
+ {
84
+ variant: "outlined",
85
+ color: "secondary",
86
+ sx: (t) => ({
87
+ borderRadius: "10px",
88
+ boxShadow: t.shadows[2],
89
+ "& .MuiButtonGroup-grouped": { borderColor: t.palette.divider }
90
+ }),
91
+ children: [
92
+ /* @__PURE__ */ i(
93
+ f,
94
+ {
95
+ "aria-label": o("RobotHeader.Apps.bt"),
96
+ "aria-haspopup": "menu",
97
+ "aria-expanded": n !== null,
98
+ disabled: l.length === 0,
99
+ onClick: (t) => d(t.currentTarget),
100
+ sx: b,
101
+ children: /* @__PURE__ */ i(H, {})
102
+ }
103
+ ),
104
+ c && /* @__PURE__ */ i(
105
+ f,
106
+ {
107
+ "aria-label": o("RobotHeader.Search.bt"),
108
+ onClick: c,
109
+ sx: b,
110
+ children: /* @__PURE__ */ i(W, {})
111
+ }
112
+ )
113
+ ]
114
+ }
115
+ ),
116
+ /* @__PURE__ */ a(s, { direction: "row", sx: { gap: "4px", alignItems: "center" }, children: [
117
+ e && /* @__PURE__ */ i(
118
+ g,
119
+ {
120
+ sx: {
121
+ display: "flex",
122
+ "& svg": { width: "25px", height: "25px" }
123
+ },
124
+ children: e
125
+ }
126
+ ),
127
+ /* @__PURE__ */ i(
128
+ w,
129
+ {
130
+ component: "h1",
131
+ noWrap: !0,
132
+ sx: {
133
+ fontFamily: P,
134
+ fontWeight: 700,
135
+ fontSize: "16px",
136
+ letterSpacing: "0.24px"
137
+ },
138
+ children: p
139
+ }
140
+ )
141
+ ] }),
142
+ /* @__PURE__ */ i(
143
+ z,
144
+ {
145
+ anchorEl: n,
146
+ open: n !== null,
147
+ onClose: () => d(null),
148
+ sx: { "& .MuiPaper-root": { minWidth: 200, mt: 1 } },
149
+ children: l.map((t) => /* @__PURE__ */ a(F, { onClick: () => m(t), children: [
150
+ t.icon && /* @__PURE__ */ i(g, { sx: { display: "flex", alignItems: "center", mr: 2 }, children: t.icon }),
151
+ t.name
152
+ ] }, t.id))
153
+ }
154
+ )
155
+ ] });
156
+ }
157
+ const D = {
158
+ position: "absolute",
159
+ width: "1px",
160
+ height: "1px",
161
+ margin: "-1px",
162
+ padding: 0,
163
+ overflow: "hidden",
164
+ clip: "rect(0 0 0 0)",
165
+ whiteSpace: "nowrap",
166
+ border: 0
167
+ }, rt = B(
168
+ ({
169
+ appIcon: e,
170
+ appName: p,
171
+ apps: l = [],
172
+ onAppSelect: r,
173
+ onSearch: c,
174
+ motionGroup: o,
175
+ safety: n,
176
+ activation: d,
177
+ actions: m,
178
+ sx: t
179
+ }) => {
180
+ const { t: y } = h(), x = v();
181
+ return /* @__PURE__ */ a(
182
+ s,
183
+ {
184
+ component: "header",
185
+ direction: "row",
186
+ "data-testid": "robot-header",
187
+ sx: [
188
+ (S) => {
189
+ var u;
190
+ return {
191
+ alignItems: "center",
192
+ justifyContent: "space-between",
193
+ gap: "24px",
194
+ padding: "8px 24px",
195
+ minHeight: "52px",
196
+ boxSizing: "border-box",
197
+ background: (u = S.palette.backgroundPaperElevation) == null ? void 0 : u[1]
198
+ };
199
+ },
200
+ ...Array.isArray(t) ? t : [t]
201
+ ],
202
+ children: [
203
+ /* @__PURE__ */ i(
204
+ j,
205
+ {
206
+ appIcon: e,
207
+ appName: p,
208
+ apps: l,
209
+ onAppSelect: r,
210
+ onSearch: c
211
+ }
212
+ ),
213
+ /* @__PURE__ */ a(s, { direction: "row", sx: { gap: "20px", alignItems: "center" }, children: [
214
+ o && /* @__PURE__ */ a(I, { children: [
215
+ /* @__PURE__ */ i(
216
+ g,
217
+ {
218
+ component: "span",
219
+ id: x,
220
+ sx: D,
221
+ children: y("RobotHeader.MotionGroup.lb")
222
+ }
223
+ ),
224
+ /* @__PURE__ */ i(
225
+ k,
226
+ {
227
+ labelId: x,
228
+ width: "240px",
229
+ ...o
230
+ }
231
+ )
232
+ ] }),
233
+ n && /* @__PURE__ */ i(C, { ...n }),
234
+ d && /* @__PURE__ */ i(G, { ...d })
235
+ ] }),
236
+ /* @__PURE__ */ i(s, { direction: "row", sx: { gap: "24px", alignItems: "center" }, children: m })
237
+ ]
238
+ }
239
+ );
240
+ }
241
+ );
242
+ export {
243
+ rt as R
244
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),u=require("@mui/material/Box"),l=require("@mui/material/Stack"),g=require("react"),h=require("react-i18next"),y=require("./externalizeComponent-BdxGBLIv.cjs"),S=require("./SafetyBar-Bbg-o8h9.cjs"),q=require("./SmallSelect-Dcsd7_6_.cjs"),I=require("@mui/material/CircularProgress"),A=require("@mui/material/Switch"),v=require("@mui/material/Typography"),B=require("@mui/icons-material/Apps"),m=require("@mui/material/Button"),C=require("@mui/material/ButtonGroup"),T=require("@mui/material/Menu"),k=require("@mui/material/MenuItem"),R=require("@wandelbots/design-tokens"),H=require("@wandelbots/icons/SearchFilled");function z({state:i,disabled:d=!1,onToggle:s}){const{t:n}=h.useTranslation(),a=g.useId(),r=i==="activating"||i==="deactivating",o={inactive:n("SafetyBar.ActivationToggle.Activate.bt"),activating:n("SafetyBar.ActivationToggle.Activating.bt"),active:n("SafetyBar.ActivationToggle.Activated.bt"),deactivating:n("SafetyBar.ActivationToggle.Deactivating.bt")}[i];return e.jsxs(l,{direction:"row","data-testid":"robot-activation",sx:{gap:"4px",alignItems:"center"},children:[e.jsx(A,{size:"small",checked:i==="active"||i==="deactivating",disabled:r||d,onChange:()=>s(),slotProps:{input:{role:"switch","aria-labelledby":a}}}),e.jsx(v,{id:a,variant:"body2",color:"text.secondary",noWrap:!0,sx:{letterSpacing:"0.17px"},children:o}),r&&e.jsx(I,{size:16})]})}const j={minWidth:0,padding:"4px 10px",color:"text.primary","& svg":{width:"16px",height:"16px"}};function F({appIcon:i,appName:d,apps:s,onAppSelect:n,onSearch:a}){const{t:r}=h.useTranslation(),[o,c]=g.useState(null);function x(t){c(null),t.onClick?t.onClick():t.href&&(window.location.href=t.href),n==null||n(t)}return e.jsxs(l,{direction:"row",sx:{gap:"8px",alignItems:"center"},children:[e.jsxs(C,{variant:"outlined",color:"secondary",sx:t=>({borderRadius:"10px",boxShadow:t.shadows[2],"& .MuiButtonGroup-grouped":{borderColor:t.palette.divider}}),children:[e.jsx(m,{"aria-label":r("RobotHeader.Apps.bt"),"aria-haspopup":"menu","aria-expanded":o!==null,disabled:s.length===0,onClick:t=>c(t.currentTarget),sx:j,children:e.jsx(B,{})}),a&&e.jsx(m,{"aria-label":r("RobotHeader.Search.bt"),onClick:a,sx:j,children:e.jsx(H.SearchFilled,{})})]}),e.jsxs(l,{direction:"row",sx:{gap:"4px",alignItems:"center"},children:[i&&e.jsx(u,{sx:{display:"flex","& svg":{width:"25px",height:"25px"}},children:i}),e.jsx(v,{component:"h1",noWrap:!0,sx:{fontFamily:R.FontFamilyBrand,fontWeight:700,fontSize:"16px",letterSpacing:"0.24px"},children:d})]}),e.jsx(T,{anchorEl:o,open:o!==null,onClose:()=>c(null),sx:{"& .MuiPaper-root":{minWidth:200,mt:1}},children:s.map(t=>e.jsxs(k,{onClick:()=>x(t),children:[t.icon&&e.jsx(u,{sx:{display:"flex",alignItems:"center",mr:2},children:t.icon}),t.name]},t.id))})]})}const M={position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0},P=y.externalizeComponent(({appIcon:i,appName:d,apps:s=[],onAppSelect:n,onSearch:a,motionGroup:r,safety:o,activation:c,actions:x,sx:t})=>{const{t:f}=h.useTranslation(),p=g.useId();return e.jsxs(l,{component:"header",direction:"row","data-testid":"robot-header",sx:[w=>{var b;return{alignItems:"center",justifyContent:"space-between",gap:"24px",padding:"8px 24px",minHeight:"52px",boxSizing:"border-box",background:(b=w.palette.backgroundPaperElevation)==null?void 0:b[1]}},...Array.isArray(t)?t:[t]],children:[e.jsx(F,{appIcon:i,appName:d,apps:s,onAppSelect:n,onSearch:a}),e.jsxs(l,{direction:"row",sx:{gap:"20px",alignItems:"center"},children:[r&&e.jsxs(e.Fragment,{children:[e.jsx(u,{component:"span",id:p,sx:M,children:f("RobotHeader.MotionGroup.lb")}),e.jsx(q.SmallSelect,{labelId:p,width:"240px",...r})]}),o&&e.jsx(S.SafetyBar,{...o}),c&&e.jsx(z,{...c})]}),e.jsx(l,{direction:"row",sx:{gap:"24px",alignItems:"center"},children:x})]})});exports.RobotHeader=P;
@@ -0,0 +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"),w=require("./externalizeComponent-BdxGBLIv.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"),M=require("./converters-C8I_A_tA.cjs");function _(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=_(c);function R(e,t){throw new Error(`${t} ${JSON.stringify(e)}`)}function O(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: ${M.tryStringifyJson(e)||e}`}const j=({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"})),B=c.forwardRef(j),F=({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"})),Z=c.forwardRef(F),p=f.observer(({id:e,icon:t,color:a,title:n,name:o,label:s,explanation:i,literalValue:u,anchorOrigin:v,transformOrigin:x})=>{const S=f.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!S.anchorEl},openPopover(b){S.anchorEl=b.currentTarget},closePopover(){S.anchorEl=null}}));return r.jsxs(r.Fragment,{children:[r.jsxs(E,{"aria-owns":S.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:S.openPopover,onMouseLeave:S.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:S.isPopoverOpen,anchorEl:S.anchorEl,anchorOrigin:v??{vertical:"bottom",horizontal:"left"},transformOrigin:x??{vertical:"top",horizontal:"left"},onClose:S.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}),u&&r.jsx(h,{fontSize:"12px",children:u})]})})]})}),C=f.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:n,compact:o})=>{const s=y.useTheme(),i=c.useId(),{t:u}=d.useTranslation();return e?r.jsx(p,{id:`motion-group-virtual-${i}`,icon:Z,color:s.palette.tertiary.main,name:u("SafetyBar.ControllerType.Virtual.lb"),label:o?null:u("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:B,color:s.palette.primary.main,name:u("SafetyBar.ControllerType.Physical.lb"),label:o?null:u("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})}),P=({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"})),$=c.forwardRef(P),N=({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})),Y=c.forwardRef(N),V=({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"})),q=c.forwardRef(V),L=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:$,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:q,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:Y,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})}}),I=({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"})),K=c.forwardRef(I),D=({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"})),H=c.forwardRef(D),U=({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})),z=c.forwardRef(U),k=({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"})),W=c.forwardRef(k),G=({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"})),J=c.forwardRef(G),Q=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:W,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:H,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:J,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:z,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:K,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:R(e,`Unknown safety state ${e}`)}}),X=w.externalizeComponent(f.observer(({isVirtual:e,motionGroupId:t,operationMode:a,safetyState:n,anchorOrigin:o,transformOrigin:s,compact:i=!0})=>{const u=i?1:2;return r.jsxs(E,{direction:"row",gap:u,alignItems:"center",sx:{height:"24px"},children:[r.jsx(Q,{safetyState:n,anchorOrigin:o,transformOrigin:s,compact:i}),r.jsx(m,{orientation:"vertical",flexItem:!0}),r.jsx(L,{operationMode:a,anchorOrigin:o,transformOrigin:s,compact:i}),r.jsx(m,{orientation:"vertical",flexItem:!0}),r.jsx(C,{isVirtual:e,motionGroupId:t,anchorOrigin:o,transformOrigin:s,compact:i})]})}));exports.SafetyBar=X;exports.makeErrorMessage=O;
@@ -2,21 +2,22 @@ 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 { e as R } from "./externalizeComponent-_w2d1_pz.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";
9
9
  import { useTranslation as T, Trans as s } from "react-i18next";
10
- import B from "@mui/material/Popover";
11
- import F from "@mui/material/SvgIcon";
10
+ import O from "@mui/material/Popover";
11
+ import B from "@mui/material/SvgIcon";
12
12
  import E from "@mui/material/Typography";
13
13
  import { AxiosError as w } from "axios";
14
+ import { t as F } from "./converters-DpNB_WNQ.js";
14
15
  function Z(e, t) {
15
16
  throw new Error(`${t} ${JSON.stringify(e)}`);
16
17
  }
17
- function me(e) {
18
+ function fe(e) {
18
19
  var t, a, o, l;
19
- return e instanceof w && e.code === "ERR_NETWORK" ? "Failed to connect to the server. Please check your internet connection." : e instanceof w && e.response ? `${(t = e.response) == null ? void 0 : t.status} ${(a = e.response) == null ? void 0 : a.statusText} from ${(o = e.response) == null ? void 0 : o.config.url}: ${JSON.stringify((l = e.response) == null ? void 0 : l.data)}` : e instanceof Error ? e.message : `Unexpected error: ${R(e) || e}`;
20
+ return e instanceof w && e.code === "ERR_NETWORK" ? "Failed to connect to the server. Please check your internet connection." : e instanceof w && e.response ? `${(t = e.response) == null ? void 0 : t.status} ${(a = e.response) == null ? void 0 : a.statusText} from ${(o = e.response) == null ? void 0 : o.config.url}: ${JSON.stringify((l = e.response) == null ? void 0 : l.data)}` : e instanceof Error ? e.message : `Unexpected error: ${F(e) || e}`;
20
21
  }
21
22
  const C = ({
22
23
  title: e,
@@ -66,7 +67,7 @@ const C = ({
66
67
  },
67
68
  children: [
68
69
  /* @__PURE__ */ n(
69
- F,
70
+ B,
70
71
  {
71
72
  component: t,
72
73
  sx: {
@@ -87,7 +88,7 @@ const C = ({
87
88
  }
88
89
  ),
89
90
  /* @__PURE__ */ n(
90
- B,
91
+ O,
91
92
  {
92
93
  id: e,
93
94
  sx: {
@@ -394,7 +395,7 @@ const C = ({
394
395
  Z(e, `Unknown safety state ${e}`);
395
396
  }
396
397
  }
397
- ), fe = O(
398
+ ), Ee = R(
398
399
  f(
399
400
  ({
400
401
  isVirtual: e,
@@ -448,6 +449,6 @@ const C = ({
448
449
  )
449
450
  );
450
451
  export {
451
- fe as S,
452
- me as m
452
+ Ee as S,
453
+ fe as m
453
454
  };
@@ -0,0 +1,52 @@
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import p from "@mui/material/Box";
3
+ import u from "@mui/material/MenuItem";
4
+ import { AdornedSelect as h } from "@wandelbots/mui";
5
+ import { memo as S } from "react";
6
+ function c(l, e) {
7
+ return l.length === e.length && l.every(
8
+ (i, t) => {
9
+ var r, a;
10
+ return i.id === ((r = e[t]) == null ? void 0 : r.id) && i.label === ((a = e[t]) == null ? void 0 : a.label);
11
+ }
12
+ );
13
+ }
14
+ const I = S(
15
+ function({
16
+ labelId: e,
17
+ width: i,
18
+ options: t,
19
+ value: r,
20
+ onChange: a
21
+ }) {
22
+ return /* @__PURE__ */ d(p, { sx: { width: i, flexShrink: 0 }, children: /* @__PURE__ */ d(
23
+ h,
24
+ {
25
+ labelId: e,
26
+ adornedSize: "small",
27
+ sx: {
28
+ // Two classes: the small select sets its padding with two too
29
+ "& .MuiInputBase-input.MuiSelect-select": {
30
+ // 36 px with the 1 px border of the select
31
+ paddingY: "5px",
32
+ fontSize: "14px",
33
+ lineHeight: "24px",
34
+ letterSpacing: "0.15px",
35
+ minHeight: "24px"
36
+ }
37
+ },
38
+ value: r,
39
+ renderValue: (n) => {
40
+ var m;
41
+ return ((m = t.find((o) => o.id === n)) == null ? void 0 : m.label) ?? String(n);
42
+ },
43
+ onChange: (n) => a(String(n.target.value)),
44
+ children: t.map((n) => /* @__PURE__ */ d(u, { value: n.id, children: n.label }, n.id))
45
+ }
46
+ ) });
47
+ },
48
+ (l, e) => l.labelId === e.labelId && l.width === e.width && l.value === e.value && l.onChange === e.onChange && c(l.options, e.options)
49
+ );
50
+ export {
51
+ I as S
52
+ };
@@ -0,0 +1 @@
1
+ "use strict";const a=require("react/jsx-runtime"),d=require("@mui/material/Box"),S=require("@mui/material/MenuItem"),h=require("@wandelbots/mui"),o=require("react");function x(l,e){return l.length===e.length&&l.every((i,t)=>{var r,u;return i.id===((r=e[t])==null?void 0:r.id)&&i.label===((u=e[t])==null?void 0:u.label)})}const g=o.memo(function({labelId:e,width:i,options:t,value:r,onChange:u}){return a.jsx(d,{sx:{width:i,flexShrink:0},children:a.jsx(h.AdornedSelect,{labelId:e,adornedSize:"small",sx:{"& .MuiInputBase-input.MuiSelect-select":{paddingY:"5px",fontSize:"14px",lineHeight:"24px",letterSpacing:"0.15px",minHeight:"24px"}},value:r,renderValue:n=>{var c;return((c=t.find(s=>s.id===n))==null?void 0:c.label)??String(n)},onChange:n=>u(String(n.target.value)),children:t.map(n=>a.jsx(S,{value:n.id,children:n.label},n.id))})})},(l,e)=>l.labelId===e.labelId&&l.width===e.width&&l.value===e.value&&l.onChange===e.onChange&&x(l.options,e.options));exports.SmallSelect=g;