@wandelbots/wandelbots-js-react-components 6.4.0-pr.revamp.667.5d2eede → 6.4.0-pr.revamp.667.e1da7d4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/3d.cjs +1 -1
- package/dist/3d.js +1 -1
- package/dist/RobotHeader/index.cjs +1 -1
- package/dist/RobotHeader/index.js +1 -1
- package/dist/SafetyBar/index.cjs +1 -1
- package/dist/SafetyBar/index.js +1 -1
- package/dist/chunks/{Robot-B3vKEVXP.cjs → Robot-BeTWgowU.cjs} +1 -1
- package/dist/chunks/{Robot-DXhaz1tq.js → Robot-D4XbngYI.js} +1 -1
- package/dist/chunks/{RobotHeader-DDmDkUoV.js → RobotHeader-BZci9ahT.js} +1 -1
- package/dist/chunks/{RobotHeader-Daft80jq.cjs → RobotHeader-CqK0700U.cjs} +1 -1
- package/dist/chunks/{SafetyBar-BVk-SH_0.cjs → SafetyBar-Bbg-o8h9.cjs} +1 -1
- package/dist/chunks/{SafetyBar-RkN0I1Cb.js → SafetyBar-Cuak4ffd.js} +1 -1
- package/dist/chunks/{TrajectoryExecutionStore-DYVukgCz.js → TrajectoryExecutionStore-BNZzZ1Gx.js} +671 -897
- package/dist/chunks/TrajectoryExecutionStore-CYrVePlx.cjs +3 -0
- package/dist/chunks/converters-C8I_A_tA.cjs +1 -0
- package/dist/chunks/{converters-DAr6IQbG.js → converters-DpNB_WNQ.js} +7 -15
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +0 -2
- package/dist/core.js +38 -41
- package/dist/index.cjs +1 -1
- package/dist/index.js +46 -49
- package/package.json +1 -1
- package/dist/chunks/TrajectoryExecutionStore-CKfEoKo8.cjs +0 -3
- package/dist/chunks/converters-BsXgcxCW.cjs +0 -1
- package/dist/lib/ControllerStateStream.d.ts +0 -125
- package/dist/lib/controllerStateSource.d.ts +0 -35
package/dist/3d.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./chunks/Robot-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./chunks/Robot-BeTWgowU.cjs"),t=require("./chunks/JoggingGizmo-DGbFLWgT.cjs"),i=require("./chunks/JoggingGizmoOrientation-dzned4f4.cjs"),r=require("./chunks/RobotControlPanel-BXtBHEe9.cjs"),e=require("./chunks/Pose3-DIyg-aZA.cjs");exports.CollisionSceneRenderer=o.CollisionSceneRenderer;exports.JointLimitGizmo=o.JointLimitGizmo;exports.LinearAxis=o.LinearAxis;exports.MotionGroupVisualizer=o.MotionGroupVisualizer;exports.MotionGroupVisualizerExact=o.MotionGroupVisualizerExact;exports.PresetEnvironment=o.PresetEnvironment;exports.Robot=o.Robot;exports.SafetyZonesRenderer=o.SafetyZonesRenderer;exports.SupportedLinearAxis=o.SupportedLinearAxis;exports.SupportedLinearAxisExact=o.SupportedLinearAxisExact;exports.SupportedRobot=o.SupportedRobot;exports.SupportedRobotExact=o.SupportedRobotExact;exports.TrajectoryRenderer=o.TrajectoryRenderer;exports.defaultGetModel=o.defaultGetModel;exports.JoggingGizmo=t.JoggingGizmo;exports.JoggingGizmoOrientation=i.JoggingGizmoOrientation;exports.RobotControlPanel=r.RobotControlPanel;exports.Pose3=e.Pose3;exports.ValueInterpolator=e.ValueInterpolator;exports.parseRotationToQuaternion=e.parseRotationToQuaternion;exports.quaternionToRotationVector=e.quaternionToRotationVector;exports.useSmoothedMotionState=e.useSmoothedMotionState;
|
package/dist/3d.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as a, J as t, L as r, M as s, a as i, P as n, R as p, S as u, b as d, c as m, d as x, e as R, T as l, f as S } from "./chunks/Robot-
|
|
1
|
+
import { C as a, J as t, L as r, M as s, a as i, P as n, R as p, S as u, b as d, c as m, d as x, e as R, T as l, f as S } from "./chunks/Robot-D4XbngYI.js";
|
|
2
2
|
import { J as c } from "./chunks/JoggingGizmo-SuS9MmL7.js";
|
|
3
3
|
import { J as G } from "./chunks/JoggingGizmoOrientation-x_crT_64.js";
|
|
4
4
|
import { R as b } from "./chunks/RobotControlPanel-BiLexAWI.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/RobotHeader-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/RobotHeader-CqK0700U.cjs");exports.RobotHeader=e.RobotHeader;exports.default=e.RobotHeader;
|
package/dist/SafetyBar/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/SafetyBar-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/SafetyBar-Bbg-o8h9.cjs");exports.SafetyBar=e.SafetyBar;exports.default=e.SafetyBar;
|
package/dist/SafetyBar/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime"),w=require("three"),C=require("three-stdlib"),S=require("@react-three/drei"),m=require("react"),A=require("./converters-BsXgcxCW.cjs"),O=require("@wandelbots/nova-js/v2"),T=require("./externalizeComponent-BdxGBLIv.cjs"),L=require("./Pose3-DIyg-aZA.cjs"),D=require("react-error-boundary"),$=require("@react-three/fiber");function re(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 R=re(w);function ie(e){switch(e.shape_type){case"convex_hull":return new C.ConvexGeometry(e.vertices.map(t=>new R.Vector3(t[0]/1e3,t[1]/1e3,t[2]/1e3)));case"box":return new R.BoxGeometry(e.size_x/1e3,e.size_y/1e3,e.size_z/1e3);case"sphere":return new R.SphereGeometry(e.radius/1e3);case"capsule":return new R.CapsuleGeometry(e.radius/1e3,e.cylinder_height/1e3);case"cylinder":return new R.CylinderGeometry(e.radius/1e3,e.radius/1e3,e.height/1e3);case"rectangle":return new R.BoxGeometry(e.size_x/1e3,e.size_y/1e3,0);default:return console.warn(`${e.shape_type} is not supported`),new R.BufferGeometry}}function se({name:e,collider:n,children:t}){var c,l;const r=((c=n.pose)==null?void 0:c.position)??[0,0,0],i=((l=n.pose)==null?void 0:l.orientation)??[0,0,0];return n.margin&&console.warn(`${e} margin is not supported`),o.jsx("mesh",{name:e,position:new R.Vector3(r[0],r[1],r[2]).divideScalar(1e3),rotation:new R.Euler(i[0],i[1],i[2],"XYZ"),geometry:ie(n.shape),children:t})}function ae({name:e,colliders:n,meshChildrenProvider:t,...r}){return o.jsx("group",{name:e,...r,children:Object.entries(n).map(([i,c])=>o.jsx(se,{name:i,collider:c,children:t(i,c)},i))})}function ce({scene:e,meshChildrenProvider:n}){const t=e.colliders;return o.jsx("group",{children:t&&o.jsx(ae,{meshChildrenProvider:n,colliders:t})})}function le(e){const n=(e==null?void 0:e.position)??[],t=(e==null?void 0:e.orientation)??[],r=new w.Vector3(t[0]??0,t[1]??0,t[2]??0),i=r.length(),c=i>0?new w.Quaternion().setFromAxisAngle(r.normalize(),i):new w.Quaternion;return new w.Matrix4().compose(new w.Vector3(n[0]??0,n[1]??0,n[2]??0).divideScalar(1e3),c,new w.Vector3(1,1,1))}function ue(e,n=null,t=[]){const r=le(n);return e.map((i,c)=>{const l=r.clone(),s=(i.reverse_rotation_direction?-1:1)*(t[c]??0),a=i.type==="PRISMATIC_JOINT",f=(i.theta??0)+(a?0:s),p=(i.d??0)+(a?s:0);return r.multiply(new w.Matrix4().makeRotationZ(f)).multiply(new w.Matrix4().makeTranslation((i.a??0)/1e3,0,p/1e3)).multiply(new w.Matrix4().makeRotationX(i.alpha??0)),l})}const P="#ff4b4b",q="#2fa8ff",fe="#8a8d9e",pe=96,me=.15,he=new R.Vector3(0,1,0),de=.2,xe=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 k({base:e,direction:n,size:t,color:r,opacity:i}){const c=new R.Quaternion().setFromUnitVectors(he,n.clone().normalize()),l=e.clone().addScaledVector(n.clone().normalize(),t/2);return o.jsxs("mesh",{position:l,quaternion:c,renderOrder:10,children:[o.jsx("coneGeometry",{args:[t*.35,t,16]}),o.jsx("meshBasicMaterial",{color:r,depthTest:!1,transparent:!0,opacity:i})]})}function V({points:e,color:n,width:t,opacity:r}){return o.jsx(S.Line,{points:e,color:n,lineWidth:t,depthTest:!1,transparent:!0,opacity:r,renderOrder:10})}function J(e,n){const t=[...e];let r=n;for(;t.length>1;){const i=t[t.length-1],c=t[t.length-2],l=i.distanceTo(c);if(l>r)return t[t.length-1]=i.clone().lerp(c,r/l),t;r-=l,t.pop()}return t}function ye(e,n,t,r){const i=t*e,c=t*n,l=Math.abs(c-i),s=Math.max(2,Math.ceil(l/(2*Math.PI)*pe));return Array.from({length:s+1},(a,f)=>{const p=i+(c-i)*f/s,u=l*f/s/(2*Math.PI),y=r*(1+me*u);return new R.Vector3(Math.cos(p)*y,Math.sin(p)*y,0)})}function je(e,n,t,r){const i=e.theta??0,c=e.d??0,l=e.type==="PRISMATIC_JOINT",s=e.reverse_rotation_direction?-1:1,{lower_limit:a,upper_limit:f}=n;return m.useMemo(()=>{const p=new R.Matrix4().makeRotationZ(i).multiply(new R.Matrix4().makeTranslation(0,0,l?c/1e3:0)),u=(M,_,v)=>new R.Vector3(M,_,v).applyMatrix4(p),y=new R.Vector3().applyMatrix4(p),j=u(0,0,t),d=(l?[u(t*.25,0,s*a/1e3),u(t*.25,0,s*f/1e3)]:ye(a,f,s,t*.6)).map(M=>l?M:M.applyMatrix4(p)),h=u(l?t*.25:t*.6,0,0),b=d.slice(1).reduce((M,_,v)=>M+_.distanceTo(d[v]),0),x=Math.min(r,b/3),g=J(J(d,x).reverse(),x).reverse();return{axisPoints:[y,j],axisTip:j,origin:y,restPoints:[y,h],range:d,limitPoints:g,rangeStart:g[0],rangeEnd:g[g.length-1]}},[i,c,l,s,t,a,f,r])}function we({frame:e,dh:n,limit:t,size:r,emphasis:i}){const c=i==="highlighted"?xe:1,l=i==="dimmed"?de:1,s=r*.2*(i==="highlighted"?1.4:1),a=2*c,{axisPoints:f,axisTip:p,origin:u,restPoints:y,range:j,limitPoints:d,rangeStart:h,rangeEnd:b}=je(n,t,r,s),{position:x,quaternion:g}=m.useMemo(()=>{const M=new R.Vector3,_=new R.Quaternion;return e.decompose(M,_,new R.Vector3),{position:M,quaternion:_}},[e]);return o.jsxs("group",{position:x,quaternion:g,children:[o.jsx(V,{points:f,color:q,width:a,opacity:l}),o.jsx(k,{base:p,direction:p.clone().sub(u),size:s,color:q,opacity:l}),o.jsx(V,{points:y,color:fe,width:1.5*c,opacity:l}),o.jsx(V,{points:d,color:P,width:a,opacity:l}),o.jsx(k,{base:h,direction:j[0].clone().sub(h),size:h.distanceTo(j[0]),color:P,opacity:l}),o.jsx(k,{base:b,direction:j[j.length-1].clone().sub(b),size:b.distanceTo(j[j.length-1]),color:P,opacity:l})]})}function Re({dhParameters:e,chainOffset:n=null,limits:t,jointPositions:r,size:i=.15,highlightedJoint:c=null}){const l=m.useMemo(()=>ue(e,n,r),[e,n,r]);return o.jsx("group",{children:l.map((s,a)=>{const f=ge(t[a]);return f?o.jsx(we,{frame:s,dh:e[a],limit:f,size:i,emphasis:c===null?"normal":c===a?"highlighted":"dimmed"},a):null})})}function be(){return o.jsx(S.Environment,{frames:1,children:o.jsx(Se,{})})}const Me=[2,0,2,0,2,0,2,0];function Se({positions:e=Me}){return o.jsxs(o.Fragment,{children:[o.jsx(S.Lightformer,{intensity:5,"rotation-x":Math.PI/2,position:[0,5,-9],scale:[10,10,1]}),o.jsx("group",{rotation:[0,.5,0],children:o.jsx("group",{children:e.map((n,t)=>o.jsx(S.Lightformer,{form:"circle",intensity:5,rotation:[Math.PI/2,0,0],position:[n,4,t*4],scale:[3,1,1]},t))})}),o.jsx(S.Lightformer,{intensity:40,"rotation-y":Math.PI/2,position:[-5,1,-1],scale:[20,.1,1]}),o.jsx(S.Lightformer,{intensity:20,"rotation-y":-Math.PI,position:[-5,-2,-1],scale:[20,.1,1]}),o.jsx(S.Lightformer,{"rotation-y":Math.PI/2,position:[-5,-1,-1],scale:[20,.5,1],intensity:5}),o.jsx(S.Lightformer,{"rotation-y":-Math.PI/2,position:[10,1,0],scale:[20,1,1],intensity:10}),o.jsx(S.Lightformer,{form:"ring",color:"white",intensity:5,scale:10,position:[-15,4,-18],target:[0,0,0]})]})}const N={attach:"material",color:"#009f4d",opacity:.2,depthTest:!1,depthWrite:!1,transparent:!0,polygonOffset:!0};function _e({safetyZones:e,dhParameters:n,...t}){const r=m.useMemo(()=>A.dhParametersToPlaneSize(n??[]),[n]),i=(l,s)=>{var y,j;if(!((y=s==null?void 0:s.pose)!=null&&y.position)||!((j=s==null?void 0:s.pose)!=null&&j.orientation))return null;const a=new R.Vector3(s.pose.position[0]/1e3,s.pose.position[1]/1e3,s.pose.position[2]/1e3),f=new R.Vector3(s.pose.orientation[0],s.pose.orientation[1],s.pose.orientation[2]);let p;const u=s.shape.shape_type==="plane"?{...N,side:R.DoubleSide}:{...N,side:R.FrontSide};switch(s.shape.shape_type){case"plane":p=o.jsx("planeGeometry",{args:[r,r]});break;case"sphere":{const d=(s==null?void 0:s.shape).radius/1e3;p=o.jsx("sphereGeometry",{args:[d]});break}case"capsule":{const d=(s==null?void 0:s.shape).radius/1e3,h=(s==null?void 0:s.shape).cylinder_height/1e3;p=o.jsx("capsuleGeometry",{args:[d,h]});break}case"convex_hull":{const d=(s==null?void 0:s.shape).vertices.map(b=>new R.Vector3(b[0]/1e3,b[1]/1e3,b[2]/1e3)),h=A.verticesToCoplanarity(d);if(h.isCoplanar&&h.normal){const x=new R.Vector3().addVectors(d[0],h.normal.multiplyScalar(1e-4));d.push(x)}try{p=o.jsx("primitive",{object:new C.ConvexGeometry(d),attach:"geometry"})}catch(b){return console.log("Error creating ConvexGeometry:",b),null}break}case"rectangular_capsule":{const d=s.shape,h=d.radius/1e3,b=d.sphere_center_distance_x/1e3,x=d.sphere_center_distance_y/1e3,g=h*2;p=o.jsx("primitive",{object:new C.RoundedBoxGeometry(b,x,g,2,h),attach:"geometry"});break}default:console.warn("Unsupported safety zone shape type:",s.shape.shape_type),p=null}return o.jsxs("mesh",{renderOrder:l,position:a,quaternion:A.orientationToQuaternion(f),children:[p,o.jsx("meshStandardMaterial",{...u,polygonOffsetFactor:-l})]},`safety-zone-${s.shape.shape_type}-${l}`)},c=m.useMemo(()=>Object.values(e??{}).map((l,s)=>i(s,l)),[e,r]);return o.jsx("group",{...t,children:c})}function ve({trajectory:e,...n}){const t=(e==null?void 0:e.map(r=>{if(r.position&&r.position.length>=3){const[i,c,l]=r.position;if(Number.isFinite(i)&&Number.isFinite(c)&&Number.isFinite(l))return new R.Vector3(i/1e3,l/1e3,-c/1e3)}return null}).filter(r=>r!==null))||[];return o.jsx("group",{...n,children:t.length>0&&o.jsx(S.Line,{points:t,lineWidth:3,polygonOffset:!0,polygonOffsetFactor:10,polygonOffsetUnits:10})})}const G=new Map;async function E(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=`${Te(t)} ${e}`,i=G.get(r);if(i)return i;const c=(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 G.set(r,c),c.catch(()=>{G.get(r)===c&&G.delete(r)}),c}function Te(e){return typeof e=="string"?e:e.config.instanceUrl}function Q(e){function n(t){return t.children.length===0?[t]:[t,...t.children.flatMap(r=>n(r))]}return n(e).filter(t=>W(t))}function U(e){return e.name.endsWith("_FLG")}function W(e){return/_J[0-9]+$/.test(e.name)}function Le(e,n){let t;function r(i){if(U(i)){if(t)throw Error(`Found multiple flange groups in robot model ${n}; first ${t.name} then ${i.name}. Only one _FLG group is allowed.`);t=i}W(i),i.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 H=m.forwardRef(function({rapidlyChangingMotionState:n,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:i,onTranslationChanged:c,children:l},s){const a=m.useRef(null),f=m.useRef([]),p=m.useRef(n.joint_position.filter(x=>x!==void 0)),{invalidate:u}=$.useThree(),y=m.useRef(n);y.current=n;function j(x){a.current=x,x&&d()}function d(){a.current&&(f.current=Q(a.current),h(),u())}m.useImperativeHandle(s,()=>({recollectJoints:d}));function h(){const x=p.current;if(c)c(f.current,x);else for(const[g,M]of f.current.entries()){const v=t[g].reverse_rotation_direction?-1:1;M.position.y=v*(x[g]||0)/1e3}}function b(x){p.current=x.joint_position.filter(g=>g!==void 0),h(),u()}return L.useAutorun(()=>{b(y.current)}),o.jsx("group",{ref:j,position:r,quaternion:i,children:l})});function B({rapidlyChangingMotionState:e,dhParameters:n,...t}){const r=new w.Matrix4,i=m.useRef(null),c=m.useRef(null);function l(f){const p=new w.Matrix4;for(let d=0;d<n.length;d++){const h=n[d],b=f[d]??0,x=new w.Matrix4().makeRotationY(h.theta).multiply(new w.Matrix4().makeTranslation(h.a/1e3,(h.d+b*(h.reverse_rotation_direction?-1:1))/1e3,0)).multiply(new w.Matrix4().makeRotationX(h.alpha));p.multiply(x)}const u=new w.Vector3,y=new w.Quaternion,j=new w.Vector3;return p.decompose(u,y,j),u}const s=l(e.joint_position);function a(f,p){r.identity();let u=new w.Vector3;for(let h=0;h<n.length;h++){const b=p[h]??0,x=n[h],g=new w.Matrix4().makeRotationY(x.theta).multiply(new w.Matrix4().makeTranslation(x.a/1e3,(x.d+b*(x.reverse_rotation_direction?-1:1))/1e3,0)).multiply(new w.Matrix4().makeRotationX(x.alpha));r.multiply(g)}const y=new w.Vector3,j=new w.Quaternion,d=new w.Vector3;if(r.decompose(y,j,d),u=y,i.current&&i.current.position.set(u.x,u.y,u.z),c.current){const h=c.current.geometry;h!=null&&h.setPositions&&h.setPositions([0,0,0,u.x,u.y,u.z])}}return o.jsx(H,{rapidlyChangingMotionState:e,dhParameters:n,onTranslationChanged:a,children:o.jsxs("group",{...t,name:"Scene",children:[o.jsxs("mesh",{name:"Base",position:[0,0,0],children:[o.jsx("sphereGeometry",{args:[.02,32,32]}),o.jsx("meshStandardMaterial",{color:"green",depthTest:!0})]}),o.jsx(S.Line,{ref:c,points:[new w.Vector3(0,0,0),s],color:"White",lineWidth:5}),o.jsxs("mesh",{ref:i,name:"TCP",position:s,children:[o.jsx("sphereGeometry",{args:[.025,32,32]}),o.jsx("meshStandardMaterial",{color:"red",depthTest:!0})]})]})})}const Ee=console.warn;function X(){return m.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&Ee(e)}},[]),null}function Oe(e){return e.type==="Mesh"}function Ge({url:e,flangeRef:n,postModelRender:t,...r}){const i=S.useGLTF(e),l=Le(i,"robot.glb").gltf;m.useEffect(()=>{t==null||t()},[e,t]);function s(a){try{return Oe(a)?a.geometry?o.jsx("mesh",{name:a.name,geometry:a.geometry,material:a.material,position:a.position,rotation:a.rotation},a.uuid):o.jsx("group",{name:a.name,position:a.position,rotation:a.rotation},a.uuid):o.jsx("group",{name:a.name,position:a.position,rotation:a.rotation,ref:U(a)?n:void 0,children:a.children.map(s)},a.uuid)}catch(f){return console.warn("Error rendering node",a.name,f),null}}return o.jsx("group",{...r,dispose:null,children:s(l.scene)})}function Y({modelURL:e,flangeRef:n,postModelRender:t,...r}){const[i,c]=m.useState(null);return m.useEffect(()=>{let l=!1;return(async()=>{try{const a=typeof e=="string"?e:await e;l||c(f=>f===a?f:a)}catch(a){console.error("Failed to resolve model URL:",a)}})(),()=>{l=!0}},[e]),i?o.jsx(Ge,{url:i,flangeRef:n,postModelRender:t,...r}):null}const Z=(e,n)=>{e.userData.isGhost||(e.traverse(t=>{if(t instanceof R.Mesh){t.material instanceof R.Material&&(t.material.colorWrite=!1);const r=t.clone(),i=t.clone();r.material=new R.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:R.DoubleSide}),r.userData.isGhost=!0,i.material=new R.MeshStandardMaterial({color:n,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:R.DoubleSide}),i.userData.isGhost=!0,t.parent&&(t.parent.add(r),t.parent.add(i))}}),e.userData.isGhost=!0)},K=e=>{if(!e.userData.isGhost)return;const n=[];e.traverse(t=>{var r;t instanceof R.Mesh&&((r=t.userData)!=null&&r.isGhost?n.push(t):t.material instanceof R.Material&&(t.material.colorWrite=!0))}),n.forEach(t=>{t.parent&&t.parent.remove(t)}),e.userData.isGhost=!1},I=T.externalizeComponent(({rapidlyChangingMotionState:e,modelFromController:n,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:i,getModel:c=E,flangeRef:l,postModelRender:s,transparentColor:a,instanceUrl:f,...p})=>{const[u,y]=m.useState(null),j=m.useRef(null),d=m.useCallback(g=>{y(g)},[]),h=m.useCallback(()=>{var g;(g=j.current)==null||g.recollectJoints(),s==null||s()},[s]);m.useEffect(()=>{u&&(a?Z(u,a):K(u))},[u,a]);const b=m.useMemo(()=>{const g=c(n,f);if(!g){const M=new Blob([],{type:"model/gltf-binary"}),_=new File([M],`${n}.glb`,{type:"model/gltf-binary"});return Promise.resolve(URL.createObjectURL(_))}return g},[n,f,c]),x=o.jsx(B,{rapidlyChangingMotionState:e,dhParameters:t,...p});return o.jsxs(D.ErrorBoundary,{fallback:x,onError:g=>{console.warn(g)},children:[o.jsx(m.Suspense,{fallback:x,children:o.jsx("group",{ref:d,children:o.jsx(H,{ref:j,rapidlyChangingMotionState:e,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:i,children:o.jsx(Y,{modelURL:b,postModelRender:h,flangeRef:l,...p})})})}),o.jsx(X,{})]})}),z=T.externalizeComponent(({rapidlyChangingMotionState:e,...n})=>{const t=L.useSmoothedMotionState(e);return o.jsx(I,{rapidlyChangingMotionState:t,...n})});function Ae({connectedMotionGroup:e,getModel:n,flangeRef:t,transparentColor:r,postModelRender:i,...c}){const l=m.useCallback(y=>E(y,e.nova),[e]),s=n??l;if(!e.dhParameters)return null;const a=e.mountingPosition,f=e.mountingQuaternion,p=e.modelFromController||"";return p?o.jsx(z,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:p,dhParameters:e.dhParameters,getModel:s,flangeRef:t,transparentColor:r,postModelRender:i,chainOffsetPosition:a,chainOffsetQuaternion:f,...c}):o.jsx(B,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,dhParameters:e.dhParameters,chainOffsetPosition:a,chainOffsetQuaternion:f,...c})}const ee=m.forwardRef(function({rapidlyChangingMotionState:n,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:i,onRotationChanged:c,children:l},s){const a=m.useRef(null),f=m.useRef([]),p=m.useRef(n.joint_position.filter(x=>x!==void 0)),{invalidate:u}=$.useThree(),y=m.useRef(n);y.current=n;function j(x){a.current=x,x&&d()}function d(){a.current&&(f.current=Q(a.current),h(),u())}m.useImperativeHandle(s,()=>({recollectJoints:d}));function h(){const x=p.current;if(c)c(f.current,x);else for(const[g,M]of f.current.entries()){const _=t[g],v=_.theta||0,oe=_.reverse_rotation_direction?-1:1;M.rotation.y=oe*(x[g]||0)+v}}function b(x){p.current=x.joint_position.filter(g=>g!==void 0),h(),u()}return L.useAutorun(()=>{b(y.current)}),m.useEffect(()=>{b(n)},[n]),o.jsx("group",{ref:j,position:r,quaternion:i,children:l})}),Pe="line",ke="mesh";function Ve({rapidlyChangingMotionState:e,dhParameters:n,...t}){const r=new w.Matrix4,i=m.useRef([]),c=m.useRef([]);m.useEffect(()=>{i.current=new Array(n.length).fill(null),c.current=new Array(n.length).fill(null)},[n.length]);function l(f,p){const u=new w.Vector3,y=new w.Quaternion,j=new w.Vector3;r.decompose(u,y,j);const d=u.clone(),h=new w.Matrix4().makeRotationY(f.theta+p*(f.reverse_rotation_direction?-1:1)).multiply(new w.Matrix4().makeTranslation(0,f.d/1e3,0)).multiply(new w.Matrix4().makeTranslation(f.a/1e3,0,0)).multiply(new w.Matrix4().makeRotationX(f.alpha));return r.multiply(h),r.decompose(u,y,j),{a:d,b:u}}function s(f,p,u,y){if(!n)return;const j=n[f];if(!j)return;const{a:d,b:h}=l(j,y);p.geometry.setPositions([d.toArray(),h.toArray()].flat()),u.position.set(h.x,h.y,h.z)}function a(f,p){r.identity();for(let u=0;u<Math.min(f.length,p.length);u++){const y=i.current[u],j=c.current[u];y&&j&&s(u,y,j,p[u])}}return o.jsx(ee,{rapidlyChangingMotionState:e,dhParameters:n,onRotationChanged:a,children:o.jsxs("group",{...t,name:"Scene",children:[o.jsxs("mesh",{children:[o.jsx("sphereGeometry",{args:[.01,32,32]}),o.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),n==null?void 0:n.map((f,p)=>{const{a:u,b:y}=l(f,e.joint_position[p]??0),j=`dhrobot_J0${p}`;return o.jsxs("group",{name:j,children:[o.jsx(S.Line,{ref:d=>{i.current[p]=d},name:Pe,points:[u,y],color:"white",lineWidth:5}),o.jsxs("mesh",{ref:d=>{c.current[p]=d},name:ke,position:y,children:[o.jsx("sphereGeometry",{args:[.01,32,32]}),o.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},`mesh_${p}`)]},j)})]})})}const F=T.externalizeComponent(({rapidlyChangingMotionState:e,modelFromController:n,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:i,getModel:c=E,flangeRef:l,postModelRender:s,transparentColor:a,instanceUrl:f,...p})=>{const[u,y]=m.useState(null),j=m.useRef(null),d=m.useCallback(g=>{y(g)},[]),h=m.useCallback(()=>{var g;(g=j.current)==null||g.recollectJoints(),s==null||s()},[s]);m.useEffect(()=>{u&&(a?Z(u,a):K(u))},[u,a]);const b=m.useMemo(()=>{const g=c(n,f);if(!g)throw new Error(`No model found for robot "${n}". Ensure the model is available or provide a custom getModel function.`);return g},[n,f,c]),x=o.jsx(Ve,{rapidlyChangingMotionState:e,dhParameters:t,...p});return o.jsxs(D.ErrorBoundary,{fallback:x,onError:g=>{console.warn(g)},children:[o.jsx(m.Suspense,{fallback:x,children:o.jsx("group",{ref:d,children:o.jsx(ee,{ref:j,rapidlyChangingMotionState:e,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:i,children:o.jsx(Y,{modelURL:b,postModelRender:h,flangeRef:l,...p})})})}),o.jsx(X,{})]})}),te=T.externalizeComponent(({rapidlyChangingMotionState:e,...n})=>{const t=L.useSmoothedMotionState(e);return o.jsx(F,{rapidlyChangingMotionState:t,...n})}),ne=T.externalizeComponent(e=>{const{inverseSolver:n,dhParameters:t,...r}=e,[i,c]=m.useState(O.JointTypeEnum.RevoluteJoint);m.useEffect(()=>{t.length&&c(t[0].type??O.JointTypeEnum.RevoluteJoint)},[t]);const l=m.useMemo(()=>n===null&&i===O.JointTypeEnum.RevoluteJoint,[n,i]),s=m.useMemo(()=>n===null&&i===O.JointTypeEnum.PrismaticJoint,[n,i]);return m.useMemo(()=>!!n,[n])||l?o.jsx(F,{dhParameters:t,...r}):s?o.jsx(I,{dhParameters:t,...r}):null}),Ce=T.externalizeComponent(e=>{const n=L.useSmoothedMotionState(e.rapidlyChangingMotionState);return o.jsx(ne,{...e,rapidlyChangingMotionState:n})});function Ie({connectedMotionGroup:e,getModel:n,flangeRef:t,transparentColor:r,postModelRender:i,...c}){const l=m.useCallback(f=>E(f,e.nova),[e]);if(!e.dhParameters)return null;const s=e.mountingPosition,a=e.mountingQuaternion;return o.jsx(te,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:n??l,flangeRef:t,transparentColor:r,postModelRender:i,chainOffsetPosition:s,chainOffsetQuaternion:a,...c})}exports.CollisionSceneRenderer=ce;exports.JointLimitGizmo=Re;exports.LinearAxis=Ae;exports.MotionGroupVisualizer=Ce;exports.MotionGroupVisualizerExact=ne;exports.PresetEnvironment=be;exports.Robot=Ie;exports.SafetyZonesRenderer=_e;exports.SupportedLinearAxis=z;exports.SupportedLinearAxisExact=I;exports.SupportedRobot=te;exports.SupportedRobotExact=F;exports.TrajectoryRenderer=ve;exports.defaultGetModel=E;
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),w=require("three"),C=require("three-stdlib"),S=require("@react-three/drei"),m=require("react"),A=require("./converters-C8I_A_tA.cjs"),O=require("@wandelbots/nova-js/v2"),T=require("./externalizeComponent-BdxGBLIv.cjs"),L=require("./Pose3-DIyg-aZA.cjs"),D=require("react-error-boundary"),$=require("@react-three/fiber");function re(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 R=re(w);function ie(e){switch(e.shape_type){case"convex_hull":return new C.ConvexGeometry(e.vertices.map(t=>new R.Vector3(t[0]/1e3,t[1]/1e3,t[2]/1e3)));case"box":return new R.BoxGeometry(e.size_x/1e3,e.size_y/1e3,e.size_z/1e3);case"sphere":return new R.SphereGeometry(e.radius/1e3);case"capsule":return new R.CapsuleGeometry(e.radius/1e3,e.cylinder_height/1e3);case"cylinder":return new R.CylinderGeometry(e.radius/1e3,e.radius/1e3,e.height/1e3);case"rectangle":return new R.BoxGeometry(e.size_x/1e3,e.size_y/1e3,0);default:return console.warn(`${e.shape_type} is not supported`),new R.BufferGeometry}}function se({name:e,collider:n,children:t}){var c,l;const r=((c=n.pose)==null?void 0:c.position)??[0,0,0],i=((l=n.pose)==null?void 0:l.orientation)??[0,0,0];return n.margin&&console.warn(`${e} margin is not supported`),o.jsx("mesh",{name:e,position:new R.Vector3(r[0],r[1],r[2]).divideScalar(1e3),rotation:new R.Euler(i[0],i[1],i[2],"XYZ"),geometry:ie(n.shape),children:t})}function ae({name:e,colliders:n,meshChildrenProvider:t,...r}){return o.jsx("group",{name:e,...r,children:Object.entries(n).map(([i,c])=>o.jsx(se,{name:i,collider:c,children:t(i,c)},i))})}function ce({scene:e,meshChildrenProvider:n}){const t=e.colliders;return o.jsx("group",{children:t&&o.jsx(ae,{meshChildrenProvider:n,colliders:t})})}function le(e){const n=(e==null?void 0:e.position)??[],t=(e==null?void 0:e.orientation)??[],r=new w.Vector3(t[0]??0,t[1]??0,t[2]??0),i=r.length(),c=i>0?new w.Quaternion().setFromAxisAngle(r.normalize(),i):new w.Quaternion;return new w.Matrix4().compose(new w.Vector3(n[0]??0,n[1]??0,n[2]??0).divideScalar(1e3),c,new w.Vector3(1,1,1))}function ue(e,n=null,t=[]){const r=le(n);return e.map((i,c)=>{const l=r.clone(),s=(i.reverse_rotation_direction?-1:1)*(t[c]??0),a=i.type==="PRISMATIC_JOINT",f=(i.theta??0)+(a?0:s),p=(i.d??0)+(a?s:0);return r.multiply(new w.Matrix4().makeRotationZ(f)).multiply(new w.Matrix4().makeTranslation((i.a??0)/1e3,0,p/1e3)).multiply(new w.Matrix4().makeRotationX(i.alpha??0)),l})}const P="#ff4b4b",q="#2fa8ff",fe="#8a8d9e",pe=96,me=.15,he=new R.Vector3(0,1,0),de=.2,xe=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 k({base:e,direction:n,size:t,color:r,opacity:i}){const c=new R.Quaternion().setFromUnitVectors(he,n.clone().normalize()),l=e.clone().addScaledVector(n.clone().normalize(),t/2);return o.jsxs("mesh",{position:l,quaternion:c,renderOrder:10,children:[o.jsx("coneGeometry",{args:[t*.35,t,16]}),o.jsx("meshBasicMaterial",{color:r,depthTest:!1,transparent:!0,opacity:i})]})}function V({points:e,color:n,width:t,opacity:r}){return o.jsx(S.Line,{points:e,color:n,lineWidth:t,depthTest:!1,transparent:!0,opacity:r,renderOrder:10})}function J(e,n){const t=[...e];let r=n;for(;t.length>1;){const i=t[t.length-1],c=t[t.length-2],l=i.distanceTo(c);if(l>r)return t[t.length-1]=i.clone().lerp(c,r/l),t;r-=l,t.pop()}return t}function ye(e,n,t,r){const i=t*e,c=t*n,l=Math.abs(c-i),s=Math.max(2,Math.ceil(l/(2*Math.PI)*pe));return Array.from({length:s+1},(a,f)=>{const p=i+(c-i)*f/s,u=l*f/s/(2*Math.PI),y=r*(1+me*u);return new R.Vector3(Math.cos(p)*y,Math.sin(p)*y,0)})}function je(e,n,t,r){const i=e.theta??0,c=e.d??0,l=e.type==="PRISMATIC_JOINT",s=e.reverse_rotation_direction?-1:1,{lower_limit:a,upper_limit:f}=n;return m.useMemo(()=>{const p=new R.Matrix4().makeRotationZ(i).multiply(new R.Matrix4().makeTranslation(0,0,l?c/1e3:0)),u=(M,_,v)=>new R.Vector3(M,_,v).applyMatrix4(p),y=new R.Vector3().applyMatrix4(p),j=u(0,0,t),d=(l?[u(t*.25,0,s*a/1e3),u(t*.25,0,s*f/1e3)]:ye(a,f,s,t*.6)).map(M=>l?M:M.applyMatrix4(p)),h=u(l?t*.25:t*.6,0,0),b=d.slice(1).reduce((M,_,v)=>M+_.distanceTo(d[v]),0),x=Math.min(r,b/3),g=J(J(d,x).reverse(),x).reverse();return{axisPoints:[y,j],axisTip:j,origin:y,restPoints:[y,h],range:d,limitPoints:g,rangeStart:g[0],rangeEnd:g[g.length-1]}},[i,c,l,s,t,a,f,r])}function we({frame:e,dh:n,limit:t,size:r,emphasis:i}){const c=i==="highlighted"?xe:1,l=i==="dimmed"?de:1,s=r*.2*(i==="highlighted"?1.4:1),a=2*c,{axisPoints:f,axisTip:p,origin:u,restPoints:y,range:j,limitPoints:d,rangeStart:h,rangeEnd:b}=je(n,t,r,s),{position:x,quaternion:g}=m.useMemo(()=>{const M=new R.Vector3,_=new R.Quaternion;return e.decompose(M,_,new R.Vector3),{position:M,quaternion:_}},[e]);return o.jsxs("group",{position:x,quaternion:g,children:[o.jsx(V,{points:f,color:q,width:a,opacity:l}),o.jsx(k,{base:p,direction:p.clone().sub(u),size:s,color:q,opacity:l}),o.jsx(V,{points:y,color:fe,width:1.5*c,opacity:l}),o.jsx(V,{points:d,color:P,width:a,opacity:l}),o.jsx(k,{base:h,direction:j[0].clone().sub(h),size:h.distanceTo(j[0]),color:P,opacity:l}),o.jsx(k,{base:b,direction:j[j.length-1].clone().sub(b),size:b.distanceTo(j[j.length-1]),color:P,opacity:l})]})}function Re({dhParameters:e,chainOffset:n=null,limits:t,jointPositions:r,size:i=.15,highlightedJoint:c=null}){const l=m.useMemo(()=>ue(e,n,r),[e,n,r]);return o.jsx("group",{children:l.map((s,a)=>{const f=ge(t[a]);return f?o.jsx(we,{frame:s,dh:e[a],limit:f,size:i,emphasis:c===null?"normal":c===a?"highlighted":"dimmed"},a):null})})}function be(){return o.jsx(S.Environment,{frames:1,children:o.jsx(Se,{})})}const Me=[2,0,2,0,2,0,2,0];function Se({positions:e=Me}){return o.jsxs(o.Fragment,{children:[o.jsx(S.Lightformer,{intensity:5,"rotation-x":Math.PI/2,position:[0,5,-9],scale:[10,10,1]}),o.jsx("group",{rotation:[0,.5,0],children:o.jsx("group",{children:e.map((n,t)=>o.jsx(S.Lightformer,{form:"circle",intensity:5,rotation:[Math.PI/2,0,0],position:[n,4,t*4],scale:[3,1,1]},t))})}),o.jsx(S.Lightformer,{intensity:40,"rotation-y":Math.PI/2,position:[-5,1,-1],scale:[20,.1,1]}),o.jsx(S.Lightformer,{intensity:20,"rotation-y":-Math.PI,position:[-5,-2,-1],scale:[20,.1,1]}),o.jsx(S.Lightformer,{"rotation-y":Math.PI/2,position:[-5,-1,-1],scale:[20,.5,1],intensity:5}),o.jsx(S.Lightformer,{"rotation-y":-Math.PI/2,position:[10,1,0],scale:[20,1,1],intensity:10}),o.jsx(S.Lightformer,{form:"ring",color:"white",intensity:5,scale:10,position:[-15,4,-18],target:[0,0,0]})]})}const N={attach:"material",color:"#009f4d",opacity:.2,depthTest:!1,depthWrite:!1,transparent:!0,polygonOffset:!0};function _e({safetyZones:e,dhParameters:n,...t}){const r=m.useMemo(()=>A.dhParametersToPlaneSize(n??[]),[n]),i=(l,s)=>{var y,j;if(!((y=s==null?void 0:s.pose)!=null&&y.position)||!((j=s==null?void 0:s.pose)!=null&&j.orientation))return null;const a=new R.Vector3(s.pose.position[0]/1e3,s.pose.position[1]/1e3,s.pose.position[2]/1e3),f=new R.Vector3(s.pose.orientation[0],s.pose.orientation[1],s.pose.orientation[2]);let p;const u=s.shape.shape_type==="plane"?{...N,side:R.DoubleSide}:{...N,side:R.FrontSide};switch(s.shape.shape_type){case"plane":p=o.jsx("planeGeometry",{args:[r,r]});break;case"sphere":{const d=(s==null?void 0:s.shape).radius/1e3;p=o.jsx("sphereGeometry",{args:[d]});break}case"capsule":{const d=(s==null?void 0:s.shape).radius/1e3,h=(s==null?void 0:s.shape).cylinder_height/1e3;p=o.jsx("capsuleGeometry",{args:[d,h]});break}case"convex_hull":{const d=(s==null?void 0:s.shape).vertices.map(b=>new R.Vector3(b[0]/1e3,b[1]/1e3,b[2]/1e3)),h=A.verticesToCoplanarity(d);if(h.isCoplanar&&h.normal){const x=new R.Vector3().addVectors(d[0],h.normal.multiplyScalar(1e-4));d.push(x)}try{p=o.jsx("primitive",{object:new C.ConvexGeometry(d),attach:"geometry"})}catch(b){return console.log("Error creating ConvexGeometry:",b),null}break}case"rectangular_capsule":{const d=s.shape,h=d.radius/1e3,b=d.sphere_center_distance_x/1e3,x=d.sphere_center_distance_y/1e3,g=h*2;p=o.jsx("primitive",{object:new C.RoundedBoxGeometry(b,x,g,2,h),attach:"geometry"});break}default:console.warn("Unsupported safety zone shape type:",s.shape.shape_type),p=null}return o.jsxs("mesh",{renderOrder:l,position:a,quaternion:A.orientationToQuaternion(f),children:[p,o.jsx("meshStandardMaterial",{...u,polygonOffsetFactor:-l})]},`safety-zone-${s.shape.shape_type}-${l}`)},c=m.useMemo(()=>Object.values(e??{}).map((l,s)=>i(s,l)),[e,r]);return o.jsx("group",{...t,children:c})}function ve({trajectory:e,...n}){const t=(e==null?void 0:e.map(r=>{if(r.position&&r.position.length>=3){const[i,c,l]=r.position;if(Number.isFinite(i)&&Number.isFinite(c)&&Number.isFinite(l))return new R.Vector3(i/1e3,l/1e3,-c/1e3)}return null}).filter(r=>r!==null))||[];return o.jsx("group",{...n,children:t.length>0&&o.jsx(S.Line,{points:t,lineWidth:3,polygonOffset:!0,polygonOffsetFactor:10,polygonOffsetUnits:10})})}const G=new Map;async function E(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=`${Te(t)} ${e}`,i=G.get(r);if(i)return i;const c=(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 G.set(r,c),c.catch(()=>{G.get(r)===c&&G.delete(r)}),c}function Te(e){return typeof e=="string"?e:e.config.instanceUrl}function Q(e){function n(t){return t.children.length===0?[t]:[t,...t.children.flatMap(r=>n(r))]}return n(e).filter(t=>W(t))}function U(e){return e.name.endsWith("_FLG")}function W(e){return/_J[0-9]+$/.test(e.name)}function Le(e,n){let t;function r(i){if(U(i)){if(t)throw Error(`Found multiple flange groups in robot model ${n}; first ${t.name} then ${i.name}. Only one _FLG group is allowed.`);t=i}W(i),i.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 H=m.forwardRef(function({rapidlyChangingMotionState:n,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:i,onTranslationChanged:c,children:l},s){const a=m.useRef(null),f=m.useRef([]),p=m.useRef(n.joint_position.filter(x=>x!==void 0)),{invalidate:u}=$.useThree(),y=m.useRef(n);y.current=n;function j(x){a.current=x,x&&d()}function d(){a.current&&(f.current=Q(a.current),h(),u())}m.useImperativeHandle(s,()=>({recollectJoints:d}));function h(){const x=p.current;if(c)c(f.current,x);else for(const[g,M]of f.current.entries()){const v=t[g].reverse_rotation_direction?-1:1;M.position.y=v*(x[g]||0)/1e3}}function b(x){p.current=x.joint_position.filter(g=>g!==void 0),h(),u()}return L.useAutorun(()=>{b(y.current)}),o.jsx("group",{ref:j,position:r,quaternion:i,children:l})});function B({rapidlyChangingMotionState:e,dhParameters:n,...t}){const r=new w.Matrix4,i=m.useRef(null),c=m.useRef(null);function l(f){const p=new w.Matrix4;for(let d=0;d<n.length;d++){const h=n[d],b=f[d]??0,x=new w.Matrix4().makeRotationY(h.theta).multiply(new w.Matrix4().makeTranslation(h.a/1e3,(h.d+b*(h.reverse_rotation_direction?-1:1))/1e3,0)).multiply(new w.Matrix4().makeRotationX(h.alpha));p.multiply(x)}const u=new w.Vector3,y=new w.Quaternion,j=new w.Vector3;return p.decompose(u,y,j),u}const s=l(e.joint_position);function a(f,p){r.identity();let u=new w.Vector3;for(let h=0;h<n.length;h++){const b=p[h]??0,x=n[h],g=new w.Matrix4().makeRotationY(x.theta).multiply(new w.Matrix4().makeTranslation(x.a/1e3,(x.d+b*(x.reverse_rotation_direction?-1:1))/1e3,0)).multiply(new w.Matrix4().makeRotationX(x.alpha));r.multiply(g)}const y=new w.Vector3,j=new w.Quaternion,d=new w.Vector3;if(r.decompose(y,j,d),u=y,i.current&&i.current.position.set(u.x,u.y,u.z),c.current){const h=c.current.geometry;h!=null&&h.setPositions&&h.setPositions([0,0,0,u.x,u.y,u.z])}}return o.jsx(H,{rapidlyChangingMotionState:e,dhParameters:n,onTranslationChanged:a,children:o.jsxs("group",{...t,name:"Scene",children:[o.jsxs("mesh",{name:"Base",position:[0,0,0],children:[o.jsx("sphereGeometry",{args:[.02,32,32]}),o.jsx("meshStandardMaterial",{color:"green",depthTest:!0})]}),o.jsx(S.Line,{ref:c,points:[new w.Vector3(0,0,0),s],color:"White",lineWidth:5}),o.jsxs("mesh",{ref:i,name:"TCP",position:s,children:[o.jsx("sphereGeometry",{args:[.025,32,32]}),o.jsx("meshStandardMaterial",{color:"red",depthTest:!0})]})]})})}const Ee=console.warn;function X(){return m.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&Ee(e)}},[]),null}function Oe(e){return e.type==="Mesh"}function Ge({url:e,flangeRef:n,postModelRender:t,...r}){const i=S.useGLTF(e),l=Le(i,"robot.glb").gltf;m.useEffect(()=>{t==null||t()},[e,t]);function s(a){try{return Oe(a)?a.geometry?o.jsx("mesh",{name:a.name,geometry:a.geometry,material:a.material,position:a.position,rotation:a.rotation},a.uuid):o.jsx("group",{name:a.name,position:a.position,rotation:a.rotation},a.uuid):o.jsx("group",{name:a.name,position:a.position,rotation:a.rotation,ref:U(a)?n:void 0,children:a.children.map(s)},a.uuid)}catch(f){return console.warn("Error rendering node",a.name,f),null}}return o.jsx("group",{...r,dispose:null,children:s(l.scene)})}function Y({modelURL:e,flangeRef:n,postModelRender:t,...r}){const[i,c]=m.useState(null);return m.useEffect(()=>{let l=!1;return(async()=>{try{const a=typeof e=="string"?e:await e;l||c(f=>f===a?f:a)}catch(a){console.error("Failed to resolve model URL:",a)}})(),()=>{l=!0}},[e]),i?o.jsx(Ge,{url:i,flangeRef:n,postModelRender:t,...r}):null}const Z=(e,n)=>{e.userData.isGhost||(e.traverse(t=>{if(t instanceof R.Mesh){t.material instanceof R.Material&&(t.material.colorWrite=!1);const r=t.clone(),i=t.clone();r.material=new R.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:R.DoubleSide}),r.userData.isGhost=!0,i.material=new R.MeshStandardMaterial({color:n,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:R.DoubleSide}),i.userData.isGhost=!0,t.parent&&(t.parent.add(r),t.parent.add(i))}}),e.userData.isGhost=!0)},K=e=>{if(!e.userData.isGhost)return;const n=[];e.traverse(t=>{var r;t instanceof R.Mesh&&((r=t.userData)!=null&&r.isGhost?n.push(t):t.material instanceof R.Material&&(t.material.colorWrite=!0))}),n.forEach(t=>{t.parent&&t.parent.remove(t)}),e.userData.isGhost=!1},I=T.externalizeComponent(({rapidlyChangingMotionState:e,modelFromController:n,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:i,getModel:c=E,flangeRef:l,postModelRender:s,transparentColor:a,instanceUrl:f,...p})=>{const[u,y]=m.useState(null),j=m.useRef(null),d=m.useCallback(g=>{y(g)},[]),h=m.useCallback(()=>{var g;(g=j.current)==null||g.recollectJoints(),s==null||s()},[s]);m.useEffect(()=>{u&&(a?Z(u,a):K(u))},[u,a]);const b=m.useMemo(()=>{const g=c(n,f);if(!g){const M=new Blob([],{type:"model/gltf-binary"}),_=new File([M],`${n}.glb`,{type:"model/gltf-binary"});return Promise.resolve(URL.createObjectURL(_))}return g},[n,f,c]),x=o.jsx(B,{rapidlyChangingMotionState:e,dhParameters:t,...p});return o.jsxs(D.ErrorBoundary,{fallback:x,onError:g=>{console.warn(g)},children:[o.jsx(m.Suspense,{fallback:x,children:o.jsx("group",{ref:d,children:o.jsx(H,{ref:j,rapidlyChangingMotionState:e,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:i,children:o.jsx(Y,{modelURL:b,postModelRender:h,flangeRef:l,...p})})})}),o.jsx(X,{})]})}),z=T.externalizeComponent(({rapidlyChangingMotionState:e,...n})=>{const t=L.useSmoothedMotionState(e);return o.jsx(I,{rapidlyChangingMotionState:t,...n})});function Ae({connectedMotionGroup:e,getModel:n,flangeRef:t,transparentColor:r,postModelRender:i,...c}){const l=m.useCallback(y=>E(y,e.nova),[e]),s=n??l;if(!e.dhParameters)return null;const a=e.mountingPosition,f=e.mountingQuaternion,p=e.modelFromController||"";return p?o.jsx(z,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:p,dhParameters:e.dhParameters,getModel:s,flangeRef:t,transparentColor:r,postModelRender:i,chainOffsetPosition:a,chainOffsetQuaternion:f,...c}):o.jsx(B,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,dhParameters:e.dhParameters,chainOffsetPosition:a,chainOffsetQuaternion:f,...c})}const ee=m.forwardRef(function({rapidlyChangingMotionState:n,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:i,onRotationChanged:c,children:l},s){const a=m.useRef(null),f=m.useRef([]),p=m.useRef(n.joint_position.filter(x=>x!==void 0)),{invalidate:u}=$.useThree(),y=m.useRef(n);y.current=n;function j(x){a.current=x,x&&d()}function d(){a.current&&(f.current=Q(a.current),h(),u())}m.useImperativeHandle(s,()=>({recollectJoints:d}));function h(){const x=p.current;if(c)c(f.current,x);else for(const[g,M]of f.current.entries()){const _=t[g],v=_.theta||0,oe=_.reverse_rotation_direction?-1:1;M.rotation.y=oe*(x[g]||0)+v}}function b(x){p.current=x.joint_position.filter(g=>g!==void 0),h(),u()}return L.useAutorun(()=>{b(y.current)}),m.useEffect(()=>{b(n)},[n]),o.jsx("group",{ref:j,position:r,quaternion:i,children:l})}),Pe="line",ke="mesh";function Ve({rapidlyChangingMotionState:e,dhParameters:n,...t}){const r=new w.Matrix4,i=m.useRef([]),c=m.useRef([]);m.useEffect(()=>{i.current=new Array(n.length).fill(null),c.current=new Array(n.length).fill(null)},[n.length]);function l(f,p){const u=new w.Vector3,y=new w.Quaternion,j=new w.Vector3;r.decompose(u,y,j);const d=u.clone(),h=new w.Matrix4().makeRotationY(f.theta+p*(f.reverse_rotation_direction?-1:1)).multiply(new w.Matrix4().makeTranslation(0,f.d/1e3,0)).multiply(new w.Matrix4().makeTranslation(f.a/1e3,0,0)).multiply(new w.Matrix4().makeRotationX(f.alpha));return r.multiply(h),r.decompose(u,y,j),{a:d,b:u}}function s(f,p,u,y){if(!n)return;const j=n[f];if(!j)return;const{a:d,b:h}=l(j,y);p.geometry.setPositions([d.toArray(),h.toArray()].flat()),u.position.set(h.x,h.y,h.z)}function a(f,p){r.identity();for(let u=0;u<Math.min(f.length,p.length);u++){const y=i.current[u],j=c.current[u];y&&j&&s(u,y,j,p[u])}}return o.jsx(ee,{rapidlyChangingMotionState:e,dhParameters:n,onRotationChanged:a,children:o.jsxs("group",{...t,name:"Scene",children:[o.jsxs("mesh",{children:[o.jsx("sphereGeometry",{args:[.01,32,32]}),o.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),n==null?void 0:n.map((f,p)=>{const{a:u,b:y}=l(f,e.joint_position[p]??0),j=`dhrobot_J0${p}`;return o.jsxs("group",{name:j,children:[o.jsx(S.Line,{ref:d=>{i.current[p]=d},name:Pe,points:[u,y],color:"white",lineWidth:5}),o.jsxs("mesh",{ref:d=>{c.current[p]=d},name:ke,position:y,children:[o.jsx("sphereGeometry",{args:[.01,32,32]}),o.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},`mesh_${p}`)]},j)})]})})}const F=T.externalizeComponent(({rapidlyChangingMotionState:e,modelFromController:n,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:i,getModel:c=E,flangeRef:l,postModelRender:s,transparentColor:a,instanceUrl:f,...p})=>{const[u,y]=m.useState(null),j=m.useRef(null),d=m.useCallback(g=>{y(g)},[]),h=m.useCallback(()=>{var g;(g=j.current)==null||g.recollectJoints(),s==null||s()},[s]);m.useEffect(()=>{u&&(a?Z(u,a):K(u))},[u,a]);const b=m.useMemo(()=>{const g=c(n,f);if(!g)throw new Error(`No model found for robot "${n}". Ensure the model is available or provide a custom getModel function.`);return g},[n,f,c]),x=o.jsx(Ve,{rapidlyChangingMotionState:e,dhParameters:t,...p});return o.jsxs(D.ErrorBoundary,{fallback:x,onError:g=>{console.warn(g)},children:[o.jsx(m.Suspense,{fallback:x,children:o.jsx("group",{ref:d,children:o.jsx(ee,{ref:j,rapidlyChangingMotionState:e,dhParameters:t,chainOffsetPosition:r,chainOffsetQuaternion:i,children:o.jsx(Y,{modelURL:b,postModelRender:h,flangeRef:l,...p})})})}),o.jsx(X,{})]})}),te=T.externalizeComponent(({rapidlyChangingMotionState:e,...n})=>{const t=L.useSmoothedMotionState(e);return o.jsx(F,{rapidlyChangingMotionState:t,...n})}),ne=T.externalizeComponent(e=>{const{inverseSolver:n,dhParameters:t,...r}=e,[i,c]=m.useState(O.JointTypeEnum.RevoluteJoint);m.useEffect(()=>{t.length&&c(t[0].type??O.JointTypeEnum.RevoluteJoint)},[t]);const l=m.useMemo(()=>n===null&&i===O.JointTypeEnum.RevoluteJoint,[n,i]),s=m.useMemo(()=>n===null&&i===O.JointTypeEnum.PrismaticJoint,[n,i]);return m.useMemo(()=>!!n,[n])||l?o.jsx(F,{dhParameters:t,...r}):s?o.jsx(I,{dhParameters:t,...r}):null}),Ce=T.externalizeComponent(e=>{const n=L.useSmoothedMotionState(e.rapidlyChangingMotionState);return o.jsx(ne,{...e,rapidlyChangingMotionState:n})});function Ie({connectedMotionGroup:e,getModel:n,flangeRef:t,transparentColor:r,postModelRender:i,...c}){const l=m.useCallback(f=>E(f,e.nova),[e]);if(!e.dhParameters)return null;const s=e.mountingPosition,a=e.mountingQuaternion;return o.jsx(te,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:n??l,flangeRef:t,transparentColor:r,postModelRender:i,chainOffsetPosition:s,chainOffsetQuaternion:a,...c})}exports.CollisionSceneRenderer=ce;exports.JointLimitGizmo=Re;exports.LinearAxis=Ae;exports.MotionGroupVisualizer=Ce;exports.MotionGroupVisualizerExact=ne;exports.PresetEnvironment=be;exports.Robot=Ie;exports.SafetyZonesRenderer=_e;exports.SupportedLinearAxis=z;exports.SupportedLinearAxisExact=I;exports.SupportedRobot=te;exports.SupportedRobotExact=F;exports.TrajectoryRenderer=ve;exports.defaultGetModel=E;
|
|
@@ -4,7 +4,7 @@ import { Matrix4 as b, Vector3 as x, Quaternion as k } from "three";
|
|
|
4
4
|
import { ConvexGeometry as H, RoundedBoxGeometry as mt } from "three-stdlib";
|
|
5
5
|
import { Line as V, Environment as ht, Lightformer as G, useGLTF as dt } from "@react-three/drei";
|
|
6
6
|
import gt, { useMemo as L, forwardRef as Q, useRef as S, useImperativeHandle as B, useEffect as P, useState as C, useCallback as A, Suspense as X } from "react";
|
|
7
|
-
import { d as yt, v as wt, o as Rt } from "./converters-
|
|
7
|
+
import { d as yt, v as wt, o as Rt } from "./converters-DpNB_WNQ.js";
|
|
8
8
|
import { JointTypeEnum as I } from "@wandelbots/nova-js/v2";
|
|
9
9
|
import { e as E } from "./externalizeComponent-_w2d1_pz.js";
|
|
10
10
|
import { c as _t, b as Y, a as j } from "./Pose3-pocKPrHN.js";
|
|
@@ -4,7 +4,7 @@ import s from "@mui/material/Stack";
|
|
|
4
4
|
import { useId as v, useState as A } from "react";
|
|
5
5
|
import { useTranslation as h } from "react-i18next";
|
|
6
6
|
import { e as B } from "./externalizeComponent-_w2d1_pz.js";
|
|
7
|
-
import { S as C } from "./SafetyBar-
|
|
7
|
+
import { S as C } from "./SafetyBar-Cuak4ffd.js";
|
|
8
8
|
import { S as k } from "./SmallSelect-BdD9uLKK.js";
|
|
9
9
|
import T from "@mui/material/CircularProgress";
|
|
10
10
|
import R from "@mui/material/Switch";
|
|
@@ -1 +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-
|
|
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;
|
|
@@ -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"),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-BsXgcxCW.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;
|
|
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;
|
|
@@ -11,7 +11,7 @@ import O from "@mui/material/Popover";
|
|
|
11
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-
|
|
14
|
+
import { t as F } from "./converters-DpNB_WNQ.js";
|
|
15
15
|
function Z(e, t) {
|
|
16
16
|
throw new Error(`${t} ${JSON.stringify(e)}`);
|
|
17
17
|
}
|