@wandelbots/wandelbots-js-react-components 4.1.1 → 4.2.0

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 (37) hide show
  1. package/dist/3d.cjs.js +1 -1
  2. package/dist/3d.d.ts +1 -0
  3. package/dist/3d.d.ts.map +1 -1
  4. package/dist/3d.es.js +13 -12
  5. package/dist/MotionGroupVisualizer-C3CB-L2z.cjs +2 -0
  6. package/dist/MotionGroupVisualizer-C3CB-L2z.cjs.map +1 -0
  7. package/dist/{manufacturerHomePositions-DAaWLJKB.js → MotionGroupVisualizer-CrLamHYm.js} +408 -356
  8. package/dist/MotionGroupVisualizer-CrLamHYm.js.map +1 -0
  9. package/dist/components/robots/MotionGroupVisualizer.d.ts +9 -0
  10. package/dist/components/robots/MotionGroupVisualizer.d.ts.map +1 -0
  11. package/dist/components/robots/SupportedLinearAxis.d.ts +3 -2
  12. package/dist/components/robots/SupportedLinearAxis.d.ts.map +1 -1
  13. package/dist/components/robots/SupportedRobot.d.ts +3 -2
  14. package/dist/components/robots/SupportedRobot.d.ts.map +1 -1
  15. package/dist/components/robots/robotModelLogic.d.ts +1 -1
  16. package/dist/components/robots/robotModelLogic.d.ts.map +1 -1
  17. package/dist/core.cjs.js +1 -1
  18. package/dist/core.es.js +2 -2
  19. package/dist/index.cjs.js +1 -1
  20. package/dist/index.es.js +57 -56
  21. package/dist/{interpolation-DZhBKo-u.cjs → interpolation-C5OTEwAm.cjs} +3 -3
  22. package/dist/{interpolation-DZhBKo-u.cjs.map → interpolation-C5OTEwAm.cjs.map} +1 -1
  23. package/dist/{interpolation-baUmFLkh.js → interpolation-Cs2pC1zE.js} +694 -637
  24. package/dist/{interpolation-baUmFLkh.js.map → interpolation-Cs2pC1zE.js.map} +1 -1
  25. package/dist/{theming-BTlS2afw.js → theming-C-zvh022.js} +2 -2
  26. package/dist/{theming-BTlS2afw.js.map → theming-C-zvh022.js.map} +1 -1
  27. package/dist/{theming-DPoEjzxv.cjs → theming-Dk07SE2_.cjs} +2 -2
  28. package/dist/{theming-DPoEjzxv.cjs.map → theming-Dk07SE2_.cjs.map} +1 -1
  29. package/package.json +3 -3
  30. package/src/3d.ts +1 -0
  31. package/src/components/robots/MotionGroupVisualizer.tsx +113 -0
  32. package/src/components/robots/SupportedLinearAxis.tsx +4 -2
  33. package/src/components/robots/SupportedRobot.tsx +4 -2
  34. package/src/components/robots/robotModelLogic.ts +2 -2
  35. package/dist/manufacturerHomePositions-5E6JP4Zd.cjs +0 -2
  36. package/dist/manufacturerHomePositions-5E6JP4Zd.cjs.map +0 -1
  37. package/dist/manufacturerHomePositions-DAaWLJKB.js.map +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";var Xh=Object.defineProperty;var Zh=(e,t,n)=>t in e?Xh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var H=(e,t,n)=>Zh(e,typeof t!="symbol"?t+"":t,n);const g=require("./externalizeComponent-CkVWk2F_.cjs"),M=require("@mui/material"),re=require("mobx-react-lite"),O=require("react"),he=require("react-i18next"),x=require("prop-types"),Ft=require("./interpolation-DZhBKo-u.cjs"),Ze=require("@mui/x-data-grid"),pu=require("lodash-es"),de=require("mobx"),Ee=require("@wandelbots/nova-js"),mu=require("./LoadingCover-CukpS_aj.cjs"),Lr=require("@mui/icons-material"),Qh=require("@emotion/styled"),ef=require("@emotion/react"),tf=require("@mui/x-charts"),hs=require("three");function gu(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _=gu(O),qa=gu(hs);function nf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const rf=e=>g.jsxRuntimeExports.jsx(M.SvgIcon,{...e,viewBox:"0 0 10 8",children:g.jsxRuntimeExports.jsx("path",{d:"M8.825 0.9125L5 4.72917L1.175 0.9125L0 2.0875L5 7.0875L10 2.0875L8.825 0.9125Z",fill:"currentColor",fillOpacity:"0.56"})}),of=g.externalizeComponent(re.observer(e=>{const{appIcon:t,appName:n,apps:r=[],onAppSelect:i,disabled:o=!1,sx:s}=e,[a,l]=O.useState(null),c=!!a,u=f=>{l(f.currentTarget)},d=()=>{l(null)},h=f=>{d(),f.onClick?f.onClick():f.href&&(window.location.href=f.href),i==null||i(f)};return g.jsxRuntimeExports.jsxs(g.jsxRuntimeExports.Fragment,{children:[g.jsxRuntimeExports.jsx(M.AppBar,{position:"static",sx:{boxShadow:"none",backgroundImage:"none","& .MuiAppBar-root":{backgroundImage:"none",backgroundColor:"transparent"},...s},children:g.jsxRuntimeExports.jsxs(M.Toolbar,{sx:{minHeight:"62px !important"},children:[g.jsxRuntimeExports.jsx(M.Box,{sx:{mr:1,display:"flex",alignItems:"center"},children:t}),g.jsxRuntimeExports.jsxs(M.Box,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[g.jsxRuntimeExports.jsx(M.Typography,{component:"h1",sx:{fontWeight:"bold",fontSize:"1rem"},children:n}),r.length>0&&g.jsxRuntimeExports.jsx(M.IconButton,{color:"inherit","aria-label":"switch app","aria-controls":"app-menu","aria-haspopup":"true",onClick:u,disabled:o,sx:{ml:1,width:28,height:28,borderRadius:"6px",padding:0,backgroundColor:f=>M.alpha(f.palette.common.white,.1),opacity:1,"&:hover":{backgroundColor:f=>M.alpha(f.palette.common.white,.16)},"& .MuiSvgIcon-root":{fontSize:"8px",width:"8px",height:"6px"}},children:g.jsxRuntimeExports.jsx(rf,{})})]})]})}),g.jsxRuntimeExports.jsx(M.Backdrop,{open:c,onClick:d,sx:{backdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.3)",zIndex:f=>f.zIndex.modal-1}}),g.jsxRuntimeExports.jsx(M.Menu,{id:"app-menu",anchorEl:a,open:c,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:f=>f.zIndex.modal,"& .MuiPaper-root":{minWidth:200,mt:1}},children:r.map(f=>g.jsxRuntimeExports.jsxs(M.MenuItem,{onClick:()=>h(f),children:[g.jsxRuntimeExports.jsx(M.Box,{sx:{display:"flex",alignItems:"center"},children:f.icon}),g.jsxRuntimeExports.jsx(M.Typography,{variant:"body1",sx:{ml:2},children:f.name})]},f.id))})]})}));function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(null,arguments)}function ht(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Sr(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let s="",a=!0;for(let l=0;l<o.length;l+=1){const c=o[l];c&&(s+=(a===!0?"":" ")+t(c),a=!1,n&&n[c]&&(s+=" "+n[c]))}r[i]=s}return r}function yu(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=yu(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Pe(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=yu(e))&&(r&&(r+=" "),r+=t);return r}function Lt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Ls="$$material";function sf(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var af={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function lf(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var cf=/[A-Z]|^ms/g,uf=/_EMO_([^_]+?)_([^]*?)_EMO_/g,xu=function(t){return t.charCodeAt(1)===45},Ka=function(t){return t!=null&&typeof t!="boolean"},No=lf(function(e){return xu(e)?e:e.replace(cf,"-$&").toLowerCase()}),Ja=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(uf,function(r,i,o){return $t={name:i,styles:o,next:$t},i})}return af[t]!==1&&!xu(t)&&typeof n=="number"&&n!==0?n+"px":n};function hi(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return $t={name:i.name,styles:i.styles,next:$t},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)$t={name:s.name,styles:s.styles,next:$t},s=s.next;var a=o.styles+";";return a}return df(e,t,n)}}var l=n;return l}function df(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=hi(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;Ka(a)&&(r+=No(o)+":"+Ja(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)Ka(s[l])&&(r+=No(o)+":"+Ja(o,s[l])+";");else{var c=hi(e,t,s);switch(o){case"animation":case"animationName":{r+=No(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}return r}var Xa=/label:\s*([^\s;{]+)\s*(;|$)/g,$t;function hf(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";$t=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=hi(n,t,o);else{var s=o;i+=s[0]}for(var a=1;a<e.length;a++)if(i+=hi(n,t,e[a]),r){var l=o;i+=l[a]}Xa.lastIndex=0;for(var c="",u;(u=Xa.exec(i))!==null;)c+="-"+u[1];var d=sf(i)+c;return{name:d,styles:i,next:$t}}/**
1
+ "use strict";var Xh=Object.defineProperty;var Zh=(e,t,n)=>t in e?Xh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var H=(e,t,n)=>Zh(e,typeof t!="symbol"?t+"":t,n);const g=require("./externalizeComponent-CkVWk2F_.cjs"),M=require("@mui/material"),re=require("mobx-react-lite"),O=require("react"),he=require("react-i18next"),x=require("prop-types"),Ft=require("./interpolation-C5OTEwAm.cjs"),Ze=require("@mui/x-data-grid"),pu=require("lodash-es"),de=require("mobx"),Ee=require("@wandelbots/nova-js"),mu=require("./LoadingCover-CukpS_aj.cjs"),Lr=require("@mui/icons-material"),Qh=require("@emotion/styled"),ef=require("@emotion/react"),tf=require("@mui/x-charts"),hs=require("three");function gu(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _=gu(O),qa=gu(hs);function nf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const rf=e=>g.jsxRuntimeExports.jsx(M.SvgIcon,{...e,viewBox:"0 0 10 8",children:g.jsxRuntimeExports.jsx("path",{d:"M8.825 0.9125L5 4.72917L1.175 0.9125L0 2.0875L5 7.0875L10 2.0875L8.825 0.9125Z",fill:"currentColor",fillOpacity:"0.56"})}),of=g.externalizeComponent(re.observer(e=>{const{appIcon:t,appName:n,apps:r=[],onAppSelect:i,disabled:o=!1,sx:s}=e,[a,l]=O.useState(null),c=!!a,u=f=>{l(f.currentTarget)},d=()=>{l(null)},h=f=>{d(),f.onClick?f.onClick():f.href&&(window.location.href=f.href),i==null||i(f)};return g.jsxRuntimeExports.jsxs(g.jsxRuntimeExports.Fragment,{children:[g.jsxRuntimeExports.jsx(M.AppBar,{position:"static",sx:{boxShadow:"none",backgroundImage:"none","& .MuiAppBar-root":{backgroundImage:"none",backgroundColor:"transparent"},...s},children:g.jsxRuntimeExports.jsxs(M.Toolbar,{sx:{minHeight:"62px !important"},children:[g.jsxRuntimeExports.jsx(M.Box,{sx:{mr:1,display:"flex",alignItems:"center"},children:t}),g.jsxRuntimeExports.jsxs(M.Box,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[g.jsxRuntimeExports.jsx(M.Typography,{component:"h1",sx:{fontWeight:"bold",fontSize:"1rem"},children:n}),r.length>0&&g.jsxRuntimeExports.jsx(M.IconButton,{color:"inherit","aria-label":"switch app","aria-controls":"app-menu","aria-haspopup":"true",onClick:u,disabled:o,sx:{ml:1,width:28,height:28,borderRadius:"6px",padding:0,backgroundColor:f=>M.alpha(f.palette.common.white,.1),opacity:1,"&:hover":{backgroundColor:f=>M.alpha(f.palette.common.white,.16)},"& .MuiSvgIcon-root":{fontSize:"8px",width:"8px",height:"6px"}},children:g.jsxRuntimeExports.jsx(rf,{})})]})]})}),g.jsxRuntimeExports.jsx(M.Backdrop,{open:c,onClick:d,sx:{backdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.3)",zIndex:f=>f.zIndex.modal-1}}),g.jsxRuntimeExports.jsx(M.Menu,{id:"app-menu",anchorEl:a,open:c,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:f=>f.zIndex.modal,"& .MuiPaper-root":{minWidth:200,mt:1}},children:r.map(f=>g.jsxRuntimeExports.jsxs(M.MenuItem,{onClick:()=>h(f),children:[g.jsxRuntimeExports.jsx(M.Box,{sx:{display:"flex",alignItems:"center"},children:f.icon}),g.jsxRuntimeExports.jsx(M.Typography,{variant:"body1",sx:{ml:2},children:f.name})]},f.id))})]})}));function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(null,arguments)}function ht(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Sr(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let s="",a=!0;for(let l=0;l<o.length;l+=1){const c=o[l];c&&(s+=(a===!0?"":" ")+t(c),a=!1,n&&n[c]&&(s+=" "+n[c]))}r[i]=s}return r}function yu(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=yu(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Pe(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=yu(e))&&(r&&(r+=" "),r+=t);return r}function Lt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Ls="$$material";function sf(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var af={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function lf(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var cf=/[A-Z]|^ms/g,uf=/_EMO_([^_]+?)_([^]*?)_EMO_/g,xu=function(t){return t.charCodeAt(1)===45},Ka=function(t){return t!=null&&typeof t!="boolean"},No=lf(function(e){return xu(e)?e:e.replace(cf,"-$&").toLowerCase()}),Ja=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(uf,function(r,i,o){return $t={name:i,styles:o,next:$t},i})}return af[t]!==1&&!xu(t)&&typeof n=="number"&&n!==0?n+"px":n};function hi(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return $t={name:i.name,styles:i.styles,next:$t},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)$t={name:s.name,styles:s.styles,next:$t},s=s.next;var a=o.styles+";";return a}return df(e,t,n)}}var l=n;return l}function df(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=hi(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;Ka(a)&&(r+=No(o)+":"+Ja(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)Ka(s[l])&&(r+=No(o)+":"+Ja(o,s[l])+";");else{var c=hi(e,t,s);switch(o){case"animation":case"animationName":{r+=No(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}return r}var Xa=/label:\s*([^\s;{]+)\s*(;|$)/g,$t;function hf(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";$t=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=hi(n,t,o);else{var s=o;i+=s[0]}for(var a=1;a<e.length;a++)if(i+=hi(n,t,e[a]),r){var l=o;i+=l[a]}Xa.lastIndex=0;for(var c="",u;(u=Xa.exec(i))!==null;)c+="-"+u[1];var d=sf(i)+c;return{name:d,styles:i,next:$t}}/**
2
2
  * @mui/styled-engine v7.3.7
3
3
  *
4
4
  * @license MIT
@@ -112,4 +112,4 @@ Avoid returning a new reference inside your input selector, e.g.
112
112
  `))}return!1}const GT={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function VT(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const UT=2;function _n(e,t,n,r,i){return n===1?Math.min(e+t,i):Math.max(e-t,r)}function Lh(e,t){return e-t}function lu(e,t){const{index:n}=e.reduce((r,i,o)=>{const s=Math.abs(t-i);return r===null||s<r.distance||s===r.distance?{distance:s,index:o}:r},null)??{};return n}function ii(e,t){if(t.current!==void 0&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const i=n.changedTouches[r];if(i.identifier===t.current)return{x:i.clientX,y:i.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Li(e,t,n){return(e-t)*100/(n-t)}function HT(e,t,n){return(n-t)*e+t}function YT(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function WT(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(YT(t)))}function cu({values:e,newValue:t,index:n}){const r=e.slice();return r[n]=t,r.sort(Lh)}function oi({sliderRef:e,activeIndex:t,setActive:n}){var i,o,s;const r=sr(e.current);(!((i=e.current)!=null&&i.contains(r.activeElement))||Number((o=r==null?void 0:r.activeElement)==null?void 0:o.getAttribute("data-index"))!==t)&&((s=e.current)==null||s.querySelector(`[type="range"][data-index="${t}"]`).focus()),n&&n(t)}function si(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?VT(e,t):!1}const qT={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},KT=e=>e;let ai;function uu(){return ai===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?ai=CSS.supports("touch-action","none"):ai=!0),ai}function JT(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:a=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:f,scale:m=KT,step:p=1,shiftStep:y=10,tabIndex:v,value:E}=e,w=_.useRef(void 0),[T,C]=_.useState(-1),[S,R]=_.useState(-1),[j,P]=_.useState(!1),N=_.useRef(0),B=_.useRef(null),[b,I]=IS({controlled:E,default:n??l,name:"Slider"}),A=u&&(($,G,Y)=>{const ee=$.nativeEvent||$,ue=new ee.constructor(ee.type,ee);Object.defineProperty(ue,"target",{writable:!0,value:{value:G,name:c}}),B.current=G,u(ue,G,Y)}),z=Array.isArray(b);let V=z?b.slice().sort(Lh):[b];V=V.map($=>$==null?l:In($,l,a));const X=s===!0&&p!==null?[...Array(Math.floor((a-l)/p)+1)].map(($,G)=>({value:l+p*G})):s||[],U=X.map($=>$.value),[se,ae]=_.useState(-1),Z=_.useRef(null),Le=eo(f,Z),gt=$=>G=>{var ee;const Y=Number(G.currentTarget.getAttribute("data-index"));au(G.target)&&ae(Y),R(Y),(ee=$==null?void 0:$.onFocus)==null||ee.call($,G)},yt=$=>G=>{var Y;au(G.target)||ae(-1),R(-1),(Y=$==null?void 0:$.onBlur)==null||Y.call($,G)},Ie=($,G)=>{const Y=Number($.currentTarget.getAttribute("data-index")),ee=V[Y],ue=U.indexOf(ee);let q=G;if(X&&p==null){const Me=U[U.length-1];q>=Me?q=Me:q<=U[0]?q=U[0]:q=q<ee?U[ue-1]:U[ue+1]}if(q=In(q,l,a),z){i&&(q=In(q,V[Y-1]||-1/0,V[Y+1]||1/0));const Me=q;q=cu({values:V,newValue:q,index:Y});let ke=Y;i||(ke=q.indexOf(Me)),oi({sliderRef:Z,activeIndex:ke})}I(q),ae(Y),A&&!si(q,b)&&A($,q,Y),d&&d($,B.current??q)},xt=$=>G=>{var Y;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(G.key)){G.preventDefault();const ee=Number(G.currentTarget.getAttribute("data-index")),ue=V[ee];let q=null;if(p!=null){const Me=G.shiftKey?y:p;switch(G.key){case"ArrowUp":q=_n(ue,Me,1,l,a);break;case"ArrowRight":q=_n(ue,Me,o?-1:1,l,a);break;case"ArrowDown":q=_n(ue,Me,-1,l,a);break;case"ArrowLeft":q=_n(ue,Me,o?1:-1,l,a);break;case"PageUp":q=_n(ue,y,1,l,a);break;case"PageDown":q=_n(ue,y,-1,l,a);break;case"Home":q=l;break;case"End":q=a;break}}else if(X){const Me=U[U.length-1],ke=U.indexOf(ue),ve=[o?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],He=[o?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];ve.includes(G.key)?ke===0?q=U[0]:q=U[ke-1]:He.includes(G.key)&&(ke===U.length-1?q=Me:q=U[ke+1])}q!=null&&Ie(G,q)}(Y=$==null?void 0:$.onKeyDown)==null||Y.call($,G)};rt(()=>{var $;r&&Z.current.contains(document.activeElement)&&(($=document.activeElement)==null||$.blur())},[r]),r&&T!==-1&&C(-1),r&&se!==-1&&ae(-1);const it=$=>G=>{var Y;(Y=$.onChange)==null||Y.call($,G),Ie(G,G.target.valueAsNumber)},Be=_.useRef(void 0);let F=h;o&&h==="horizontal"&&(F+="-reverse");const W=({finger:$,move:G=!1})=>{const{current:Y}=Z,{width:ee,height:ue,bottom:q,left:Me}=Y.getBoundingClientRect();let ke;F.startsWith("vertical")?ke=(q-$.y)/ue:ke=($.x-Me)/ee,F.includes("-reverse")&&(ke=1-ke);let ve;if(ve=HT(ke,l,a),p)ve=WT(ve,p,l);else{const qn=lu(U,ve);ve=U[qn]}ve=In(ve,l,a);let He=0;if(z){G?He=Be.current:He=lu(V,ve),i&&(ve=In(ve,V[He-1]||-1/0,V[He+1]||1/0));const qn=ve;ve=cu({values:V,newValue:ve,index:He}),i&&G||(He=ve.indexOf(qn),Be.current=He)}return{newValue:ve,activeIndex:He}},J=Ve($=>{const G=ii($,w);if(!G)return;if(N.current+=1,$.type==="mousemove"&&$.buttons===0){D($);return}const{newValue:Y,activeIndex:ee}=W({finger:G,move:!0});oi({sliderRef:Z,activeIndex:ee,setActive:C}),I(Y),!j&&N.current>UT&&P(!0),A&&!si(Y,b)&&A($,Y,ee)}),D=Ve($=>{const G=ii($,w);if(P(!1),!G)return;const{newValue:Y}=W({finger:G,move:!0});C(-1),$.type==="touchend"&&R(-1),d&&d($,B.current??Y),w.current=void 0,Q()}),ne=Ve($=>{if(r)return;uu()||$.preventDefault();const G=$.changedTouches[0];G!=null&&(w.current=G.identifier);const Y=ii($,w);if(Y!==!1){const{newValue:ue,activeIndex:q}=W({finger:Y});oi({sliderRef:Z,activeIndex:q,setActive:C}),I(ue),A&&!si(ue,b)&&A($,ue,q)}N.current=0;const ee=sr(Z.current);ee.addEventListener("touchmove",J,{passive:!0}),ee.addEventListener("touchend",D,{passive:!0})}),Q=_.useCallback(()=>{const $=sr(Z.current);$.removeEventListener("mousemove",J),$.removeEventListener("mouseup",D),$.removeEventListener("touchmove",J),$.removeEventListener("touchend",D)},[D,J]);_.useEffect(()=>{const{current:$}=Z;return $.addEventListener("touchstart",ne,{passive:uu()}),()=>{$.removeEventListener("touchstart",ne),Q()}},[Q,ne]),_.useEffect(()=>{r&&Q()},[r,Q]);const Ae=$=>G=>{var ue;if((ue=$.onMouseDown)==null||ue.call($,G),r||G.defaultPrevented||G.button!==0)return;G.preventDefault();const Y=ii(G,w);if(Y!==!1){const{newValue:q,activeIndex:Me}=W({finger:Y});oi({sliderRef:Z,activeIndex:Me,setActive:C}),I(q),A&&!si(q,b)&&A(G,q,Me)}N.current=0;const ee=sr(Z.current);ee.addEventListener("mousemove",J,{passive:!0}),ee.addEventListener("mouseup",D)},Ce=Li(z?V[0]:l,l,a),me=Li(V[V.length-1],l,a)-Ce,jt=($={})=>{const G=di($),Y={onMouseDown:Ae(G||{})},ee={...G,...Y};return{...$,ref:Le,...ee}},jr=$=>G=>{var ee;(ee=$.onMouseOver)==null||ee.call($,G);const Y=Number(G.currentTarget.getAttribute("data-index"));R(Y)},kr=$=>G=>{var Y;(Y=$.onMouseLeave)==null||Y.call($,G),R(-1)},Or=($={})=>{const G=di($),Y={onMouseOver:jr(G||{}),onMouseLeave:kr(G||{})};return{...$,...G,...Y}},Pr=$=>({pointerEvents:T!==-1&&T!==$?"none":void 0});let vn;return h==="vertical"&&(vn=o?"vertical-rl":"vertical-lr"),{active:T,axis:F,axisProps:qT,dragging:j,focusedThumbIndex:se,getHiddenInputProps:($={})=>{const G=di($),Y={onChange:it(G||{}),onFocus:gt(G||{}),onBlur:yt(G||{}),onKeyDown:xt(G||{})},ee={...G,...Y};return{tabIndex:v,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":m(a),"aria-valuemin":m(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:r,...$,...ee,style:{...GT,direction:o?"rtl":"ltr",width:"100%",height:"100%",writingMode:vn}}},getRootProps:jt,getThumbProps:Or,marks:X,open:S,range:z,rootRef:Le,trackLeap:me,trackOffset:Ce,values:V,getThumbStyle:Pr}}const XT=e=>!e||!cr(e);function ZT(e){return typeof e.main=="string"}function QT(e,t=[]){if(!ZT(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Ha(e=[]){return([,t])=>t&&QT(t,e)}function eC(e){return hn("MuiSlider",e)}const Ke=Ji("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),tC=e=>{const{open:t}=e;return{offset:Pe(t&&Ke.valueLabelOpen),circle:Ke.valueLabelCircle,label:Ke.valueLabelLabel}};function Nh(e){const{children:t,className:n,value:r}=e,i=tC(e);return t?_.cloneElement(t,{className:t.props.className},g.jsxRuntimeExports.jsxs(_.Fragment,{children:[t.props.children,g.jsxRuntimeExports.jsx("span",{className:Pe(i.offset,n),"aria-hidden":!0,children:g.jsxRuntimeExports.jsx("span",{className:i.circle,children:g.jsxRuntimeExports.jsx("span",{className:i.label,children:r})})})]})):null}process.env.NODE_ENV!=="production"&&(Nh.propTypes={children:x.element.isRequired,className:x.string,value:x.node});function du(e){return e}const nC=Ue("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Oe(n.color)}`],n.size!=="medium"&&t[`size${Oe(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(gn(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Ke.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Ke.dragging}`]:{[`& .${Ke.thumb}, & .${Ke.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Ha()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),rC=Ue("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),iC=Ue("span",{name:"MuiSlider",slot:"Track"})(gn(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Ha()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:e.lighten(e.palette[t].main,.62),borderColor:e.lighten(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:e.darken(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:e.darken(e.palette[t].main,.5)})}}}))]}))),oC=Ue("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Oe(n.color)}`],n.size!=="medium"&&t[`thumbSize${Oe(n.size)}`]]}})(gn(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${Ke.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(Ha()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${Ke.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Ke.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),zh=Ue(Nh,{name:"MuiSlider",slot:"ValueLabel"})(gn(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${Ke.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${Ke.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(zh.propTypes={children:x.element.isRequired,index:x.number.isRequired,open:x.bool.isRequired,value:x.node});const sC=Ue("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Gs(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(gn(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),aC=Ue("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Gs(e)&&e!=="markLabelActive"})(gn(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),lC=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:s,color:a,size:l}=e,c={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",a&&`color${Oe(a)}`,l&&`size${Oe(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${Oe(l)}`,a&&`thumbColor${Oe(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Sr(c,eC,s)},cC=({children:e})=>e,Fh=_.forwardRef(function(t,n){const r=Na({props:t,name:"MuiSlider"}),i=$p(),{"aria-label":o,"aria-valuetext":s,"aria-labelledby":a,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:f,disableSwap:m=!1,disabled:p=!1,getAriaLabel:y,getAriaValueText:v,marks:E=!1,max:w=100,min:T=0,name:C,onChange:S,onChangeCommitted:R,orientation:j="horizontal",shiftStep:P=10,size:N="medium",step:B=1,scale:b=du,slotProps:I,slots:A,tabIndex:z,track:V="normal",value:X,valueLabelDisplay:U="off",valueLabelFormat:se=du,...ae}=r,Z={...r,isRtl:i,max:w,min:T,classes:h,disabled:p,disableSwap:m,orientation:j,marks:E,color:d,size:N,step:B,shiftStep:P,scale:b,track:V,valueLabelDisplay:U,valueLabelFormat:se},{axisProps:Le,getRootProps:gt,getHiddenInputProps:yt,getThumbProps:Ie,open:xt,active:it,axis:Be,focusedThumbIndex:F,range:W,dragging:J,marks:D,values:ne,trackOffset:Q,trackLeap:Ae,getThumbStyle:Ce}=JT({...Z,rootRef:n});Z.marked=D.length>0&&D.some(be=>be.label),Z.dragging=J,Z.focusedThumbIndex=F;const me=lC(Z),jt=(A==null?void 0:A.root)??c.Root??nC,jr=(A==null?void 0:A.rail)??c.Rail??rC,kr=(A==null?void 0:A.track)??c.Track??iC,Or=(A==null?void 0:A.thumb)??c.Thumb??oC,Pr=(A==null?void 0:A.valueLabel)??c.ValueLabel??zh,vn=(A==null?void 0:A.mark)??c.Mark??sC,Dr=(A==null?void 0:A.markLabel)??c.MarkLabel??aC,$=(A==null?void 0:A.input)??c.Input??"input",G=(I==null?void 0:I.root)??u.root,Y=(I==null?void 0:I.rail)??u.rail,ee=(I==null?void 0:I.track)??u.track,ue=(I==null?void 0:I.thumb)??u.thumb,q=(I==null?void 0:I.valueLabel)??u.valueLabel,Me=(I==null?void 0:I.mark)??u.mark,ke=(I==null?void 0:I.markLabel)??u.markLabel,ve=(I==null?void 0:I.input)??u.input,He=Ot({elementType:jt,getSlotProps:gt,externalSlotProps:G,externalForwardedProps:ae,additionalProps:{...XT(jt)&&{as:l}},ownerState:{...Z,...G==null?void 0:G.ownerState},className:[me.root,f]}),qn=Ot({elementType:jr,externalSlotProps:Y,ownerState:Z,className:me.rail}),qh=Ot({elementType:kr,externalSlotProps:ee,additionalProps:{style:{...Le[Be].offset(Q),...Le[Be].leap(Ae)}},ownerState:{...Z,...ee==null?void 0:ee.ownerState},className:me.track}),Po=Ot({elementType:Or,getSlotProps:Ie,externalSlotProps:ue,ownerState:{...Z,...ue==null?void 0:ue.ownerState},className:me.thumb}),Kh=Ot({elementType:Pr,externalSlotProps:q,ownerState:{...Z,...q==null?void 0:q.ownerState},className:me.valueLabel}),Do=Ot({elementType:vn,externalSlotProps:Me,ownerState:Z,className:me.mark}),$o=Ot({elementType:Dr,externalSlotProps:ke,ownerState:Z,className:me.markLabel}),Jh=Ot({elementType:$,getSlotProps:yt,externalSlotProps:ve,ownerState:Z});return g.jsxRuntimeExports.jsxs(jt,{...He,children:[g.jsxRuntimeExports.jsx(jr,{...qn}),g.jsxRuntimeExports.jsx(kr,{...qh}),D.filter(be=>be.value>=T&&be.value<=w).map((be,_e)=>{const Lo=Li(be.value,T,w),$r=Le[Be].offset(Lo);let bt;return V===!1?bt=ne.includes(be.value):bt=V==="normal"&&(W?be.value>=ne[0]&&be.value<=ne[ne.length-1]:be.value<=ne[0])||V==="inverted"&&(W?be.value<=ne[0]||be.value>=ne[ne.length-1]:be.value>=ne[0]),g.jsxRuntimeExports.jsxs(_.Fragment,{children:[g.jsxRuntimeExports.jsx(vn,{"data-index":_e,...Do,...!cr(vn)&&{markActive:bt},style:{...$r,...Do.style},className:Pe(Do.className,bt&&me.markActive)}),be.label!=null?g.jsxRuntimeExports.jsx(Dr,{"aria-hidden":!0,"data-index":_e,...$o,...!cr(Dr)&&{markLabelActive:bt},style:{...$r,...$o.style},className:Pe(me.markLabel,$o.className,bt&&me.markLabelActive),children:be.label}):null]},_e)}),ne.map((be,_e)=>{const Lo=Li(be,T,w),$r=Le[Be].offset(Lo),bt=U==="off"?cC:Pr;return g.jsxRuntimeExports.jsx(bt,{...!cr(bt)&&{valueLabelFormat:se,valueLabelDisplay:U,value:typeof se=="function"?se(b(be),_e):se,index:_e,open:xt===_e||it===_e||U==="on",disabled:p},...Kh,children:g.jsxRuntimeExports.jsx(Or,{"data-index":_e,...Po,className:Pe(me.thumb,Po.className,it===_e&&me.active,F===_e&&me.focusVisible),style:{...$r,...Ce(_e),...Po.style},children:g.jsxRuntimeExports.jsx($,{"data-index":_e,"aria-label":y?y(_e):o,"aria-valuenow":b(be),"aria-labelledby":a,"aria-valuetext":v?v(b(be),_e):s,value:ne[_e],...Jh})})},_e)})]})});process.env.NODE_ENV!=="production"&&(Fh.propTypes={"aria-label":ou(x.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-label"]!=null?new Error("MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider."):null),"aria-labelledby":x.string,"aria-valuetext":ou(x.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-valuetext"]!=null?new Error("MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider."):null),children:x.node,classes:x.object,className:x.string,color:x.oneOfType([x.oneOf(["primary","secondary","error","info","success","warning"]),x.string]),components:x.shape({Input:x.elementType,Mark:x.elementType,MarkLabel:x.elementType,Rail:x.elementType,Root:x.elementType,Thumb:x.elementType,Track:x.elementType,ValueLabel:x.elementType}),componentsProps:x.shape({input:x.oneOfType([x.func,x.object]),mark:x.oneOfType([x.func,x.object]),markLabel:x.oneOfType([x.func,x.object]),rail:x.oneOfType([x.func,x.object]),root:x.oneOfType([x.func,x.object]),thumb:x.oneOfType([x.func,x.object]),track:x.oneOfType([x.func,x.object]),valueLabel:x.oneOfType([x.func,x.shape({children:x.element,className:x.string,open:x.bool,style:x.object,value:x.node,valueLabelDisplay:x.oneOf(["auto","off","on"])})])}),defaultValue:x.oneOfType([x.arrayOf(x.number),x.number]),disabled:x.bool,disableSwap:x.bool,getAriaLabel:x.func,getAriaValueText:x.func,marks:x.oneOfType([x.arrayOf(x.shape({label:x.node,value:x.number.isRequired})),x.bool]),max:x.number,min:x.number,name:x.string,onChange:x.func,onChangeCommitted:x.func,orientation:x.oneOf(["horizontal","vertical"]),scale:x.func,shiftStep:x.number,size:x.oneOfType([x.oneOf(["small","medium"]),x.string]),slotProps:x.shape({input:x.oneOfType([x.func,x.object]),mark:x.oneOfType([x.func,x.object]),markLabel:x.oneOfType([x.func,x.object]),rail:x.oneOfType([x.func,x.object]),root:x.oneOfType([x.func,x.object]),thumb:x.oneOfType([x.func,x.object]),track:x.oneOfType([x.func,x.object]),valueLabel:x.oneOfType([x.func,x.shape({children:x.element,className:x.string,open:x.bool,style:x.object,value:x.node,valueLabelDisplay:x.oneOf(["auto","off","on"])})])}),slots:x.shape({input:x.elementType,mark:x.elementType,markLabel:x.elementType,rail:x.elementType,root:x.elementType,thumb:x.elementType,track:x.elementType,valueLabel:x.elementType}),step:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),tabIndex:x.number,track:x.oneOf(["inverted","normal",!1]),value:x.oneOfType([x.arrayOf(x.number),x.number]),valueLabelDisplay:x.oneOf(["auto","off","on"]),valueLabelFormat:x.oneOfType([x.func,x.string])});var uC="[object Number]";function dC(e){return typeof e=="number"||un(e)&&yn(e)==uC}const Bh=re.observer(e=>{var o,s,a;const t=M.useTheme(),{store:n}=e,{t:r}=he.useTranslation();function i(l,c){c===e.velocity||!dC(c)||e.onVelocityChange(c)}return g.jsxRuntimeExports.jsxs(M.Stack,{direction:"row",gap:2,alignItems:"center",children:[n.showVelocityLegend&&g.jsxRuntimeExports.jsx(M.Typography,{sx:{color:(a=(s=(o=t.componentsExt)==null?void 0:o.JoggingPanel)==null?void 0:s.VelocitySlider)==null?void 0:a.sliderLegendColor,fontSize:"14px"},children:r("Jogging.Velocity.bt")}),g.jsxRuntimeExports.jsx(Fh,{value:e.velocity,color:"secondary",onChange:i,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),n.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):g.jsxRuntimeExports.jsx(Ya,{value:e.velocity.toString()}))]})});function Ya({value:e,sx:t}){var r;const n=M.useTheme();return g.jsxRuntimeExports.jsx(M.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(r=n.palette.backgroundPaperElevation)==null?void 0:r[8],borderRadius:"10px",minWidth:"111px",...t},children:g.jsxRuntimeExports.jsx(M.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:n.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Gh=re.observer(({store:e})=>{const{t}=he.useTranslation(),n=re.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?r=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:r})}`:r=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:r})}`}}));return g.jsxRuntimeExports.jsx(Bh,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:r=>g.jsxRuntimeExports.jsx(Ya,{value:n.valueLabelFormat(r),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),hC=re.observer(({store:e,children:t})=>{const{t:n}=he.useTranslation(),r=M.useTheme();function i(h,f){(f==="translate"||f==="rotate")&&e.setSelectedCartesianMotionType(f)}Ft.useReaction(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/controllers/${e.jogger.motionStream.controllerId}/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}`))},{fireImmediately:!0});async function o(h,f){const m=await e.activate(),p=m.motionStream.rapidlyChangingMotionState.tcp_pose,y=m.motionStream.rapidlyChangingMotionState.joint_position;p&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:p,currentJoints:y,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:f.mm}:{type:"rotate",distanceRads:Ee.degreesToRadians(f.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function s(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return o(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.translateTCP({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.rotateTCP({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function a(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(h,f,m){var y,v,E;const p=(E=(v=(y=m.componentsExt)==null?void 0:y.JoggingPanel)==null?void 0:v.JoggingCartesian)==null?void 0:E.Axis;if(p)return f==="translate"?p[h]:p.CustomRotation??p[h]}const c=[{id:"x",icon:g.jsxRuntimeExports.jsx(AT,{}),colors:l("X",e.selectedCartesianMotionType,r)},{id:"y",icon:g.jsxRuntimeExports.jsx(IT,{}),colors:l("Y",e.selectedCartesianMotionType,r)},{id:"z",icon:g.jsxRuntimeExports.jsx(kT,{}),colors:l("Z",e.selectedCartesianMotionType,r)}];function u(h){return n("General.mm.variable",{amount:h.toFixed(1)})}function d(h){return n("General.degree.variable",{amount:Ee.radiansToDegrees(h).toFixed(1)})}return g.jsxRuntimeExports.jsxs(M.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxRuntimeExports.jsxs(M.Stack,{gap:2,children:[g.jsxRuntimeExports.jsx(LT,{store:e}),g.jsxRuntimeExports.jsx(Gh,{store:e}),g.jsxRuntimeExports.jsx(M.Divider,{})]}),g.jsxRuntimeExports.jsx(M.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxRuntimeExports.jsxs(M.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxRuntimeExports.jsxs(NT,{value:e.selectedCartesianMotionType,onChange:i,exclusive:!0,"aria-label":n("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsxRuntimeExports.jsx(M.ToggleButton,{value:"translate",children:n("Jogging.Cartesian.Translation.bt")}),g.jsxRuntimeExports.jsx(M.ToggleButton,{value:"rotate",children:n("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var f,m;return g.jsxRuntimeExports.jsx(Is,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((f=e.incrementJogInProgress)==null?void 0:f.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxRuntimeExports.jsxs(g.jsxRuntimeExports.Fragment,{children:[h.icon,g.jsxRuntimeExports.jsx(M.Typography,{sx:{fontSize:"24px",color:((m=h.colors)==null?void 0:m.labelColor)??r.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var p,y;return u(((y=(p=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:p.position)==null?void 0:y[Ee.XYZ_TO_VECTOR[h.id]])||0)},startJogging:p=>s({axis:h.id,motionType:"translate",direction:p}),stopJogging:a},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var f,m;return g.jsxRuntimeExports.jsx(Is,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((f=e.incrementJogInProgress)==null?void 0:f.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxRuntimeExports.jsxs(g.jsxRuntimeExports.Fragment,{children:[g.jsxRuntimeExports.jsx(PT,{}),g.jsxRuntimeExports.jsx(M.Typography,{sx:{fontSize:"24px",color:((m=h.colors)==null?void 0:m.labelColor)??r.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var p,y;return d(((y=(p=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:p.orientation)==null?void 0:y[Ee.XYZ_TO_VECTOR[h.id]])||0)},startJogging:p=>s({axis:h.id,motionType:"rotate",direction:p}),stopJogging:a},h.id)})]})}),g.jsxRuntimeExports.jsx($h,{store:e}),t&&g.jsxRuntimeExports.jsx(M.Divider,{}),t]})}),fC=re.observer(({store:e,children:t})=>{const n=M.useTheme();async function r(o){await e.activate(),await e.jogger.rotateJoints({joint:o.joint,direction:o.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function i(){await e.jogger.stop(),await e.deactivate()}return g.jsxRuntimeExports.jsxs(M.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxRuntimeExports.jsx(Gh,{store:e}),g.jsxRuntimeExports.jsx(M.Divider,{}),g.jsxRuntimeExports.jsx(M.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},children:g.jsxRuntimeExports.jsx(M.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(o=>{var c,u,d;const s=(d=(u=(c=e.motionGroupDescription.operation_limits.auto_limits)==null?void 0:c.joints)==null?void 0:u[o.index])==null?void 0:d.position,a=(s==null?void 0:s.lower_limit)!==void 0?Ee.radiansToDegrees(s.lower_limit):void 0,l=(s==null?void 0:s.upper_limit)!==void 0?Ee.radiansToDegrees(s.upper_limit):void 0;return g.jsxRuntimeExports.jsxs(M.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsxRuntimeExports.jsx(M.Typography,{color:e.isLocked?n.palette.text.disabled:n.palette.text.secondary,children:`G${o.index+1}`}),g.jsxRuntimeExports.jsx(yh,{disabled:e.isLocked,lowerLimitDegs:a,upperLimitDegs:l,getValueDegs:()=>{const h=e.jogger.motionStream.rapidlyChangingMotionState.joint_position[o.index];return h!==void 0?Ee.radiansToDegrees(h):void 0},startJogging:h=>r({joint:o.index,direction:h}),stopJogging:i})]},`joint-${o.index}`)})})}),g.jsxRuntimeExports.jsx($h,{store:e}),t&&g.jsxRuntimeExports.jsx(M.Divider,{}),t]})}),pC=g.externalizeComponent(re.observer(e=>{const t=pu.isString(e.nova)?new Ft.NovaClient({instanceUrl:e.nova}):e.nova,n=re.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function r(){de.runInAction(()=>{n.loadingError=null,n.joggingStore=null});try{let i=e.store;if(!i){const o=await Ao.open(t,e.motionGroupId);i=await Oo.loadFor(o)}de.runInAction(()=>{n.joggingStore=i}),e.onSetup&&e.onSetup(i)}catch(i){n.loadingError=i}}return O.useEffect(()=>(r(),e.store?()=>null:()=>{var i;(i=n.joggingStore)==null||i.dispose()}),[e.store,e.nova,e.motionGroupId]),O.useEffect(()=>{const i=n.joggingStore;i&&(e.locked?i.lock("external"):i.unlock("external"))},[n.joggingStore,e.locked]),g.jsxRuntimeExports.jsx(M.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:n.joggingStore?g.jsxRuntimeExports.jsx(mC,{store:n.joggingStore,children:e.children}):g.jsxRuntimeExports.jsx(mu.LoadingCover,{message:"Loading jogging",error:n.loadingError})})})),mC=re.observer(({store:e,children:t})=>{const{t:n}=he.useTranslation();function r(){if(e.currentTab.id==="cartesian")return g.jsxRuntimeExports.jsx(g.jsxRuntimeExports.Fragment,{children:g.jsxRuntimeExports.jsx(hC,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsxRuntimeExports.jsx(g.jsxRuntimeExports.Fragment,{children:g.jsxRuntimeExports.jsx(fC,{store:e,children:t})})}return g.jsxRuntimeExports.jsxs(M.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsxRuntimeExports.jsx(M.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(i=>{const o=i.label==="cartesian"?n("Jogging.Cartesian.bt"):n("Jogging.Joints.bt"),s=i.label==="cartesian"?g.jsxRuntimeExports.jsx(cE,{fontSize:"small",sx:{mr:1}}):g.jsxRuntimeExports.jsx(uE,{fontSize:"small",sx:{mr:1}});return g.jsxRuntimeExports.jsx(M.Tab,{label:e.showTabIcons?g.jsxRuntimeExports.jsxs(M.Stack,{direction:"row",alignItems:"center",children:[s,o]}):o,id:`jogging-tab-${i.id}`,"aria-controls":`jogging-tab-${i.id}`},i.id)})}),g.jsxRuntimeExports.jsx(M.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:r()}),e.blocked&&g.jsxRuntimeExports.jsx(MT,{store:e})]})}),Vh=e=>{var a;const{value:t,ref:n}=e,r=M.useTheme(),[i,o]=O.useState(!1);async function s(){if(!n||!("current"in n))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),o(!0),!0}catch(l){console.error(l);const c=window.getSelection();if(c&&n&&"current"in n&&n.current){const u=document.createRange();u.selectNodeContents(n.current),c.removeAllRanges(),c.addRange(u)}}return!1}return O.useEffect(()=>{if(!i)return;const l=setTimeout(()=>o(!1),3e3);return()=>{l&&clearTimeout(l)}},[i]),g.jsxRuntimeExports.jsx(M.Tooltip,{open:i,title:"Copied!",children:g.jsxRuntimeExports.jsx(M.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(a=r.palette.backgroundPaperElevation)==null?void 0:a[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>s(),children:g.jsxRuntimeExports.jsx(M.Typography,{ref:n,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:r.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})},gC=g.externalizeComponent(re.observer(({tcpPose:e,showCopyButton:t=!1})=>{const[n,r]=O.useState(null),i=Ft.poseToWandelscriptString(e),o=async()=>{try{await navigator.clipboard.writeText(i),r("Copied!"),setTimeout(()=>r(null),2e3)}catch{r("Copy failed"),setTimeout(()=>r(null),2e3)}};return g.jsxRuntimeExports.jsxs(M.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-cartesian-values",children:[g.jsxRuntimeExports.jsx(Vh,{value:i}),t&&g.jsxRuntimeExports.jsx(M.Button,{variant:"contained",color:"secondary",size:"small",onClick:o,sx:{flexShrink:0},children:n||"Copy"})]})})),yC=g.externalizeComponent(re.observer(({joints:e,showCopyButton:t=!1})=>{const[n,r]=O.useState(null),i=`[${e.map(s=>parseFloat(s.toFixed(4))).join(", ")}]`,o=async()=>{try{await navigator.clipboard.writeText(i),r("Copied!"),setTimeout(()=>r(null),2e3)}catch{r("Copy failed"),setTimeout(()=>r(null),2e3)}};return g.jsxRuntimeExports.jsxs(M.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-joint-values",children:[g.jsxRuntimeExports.jsx(Vh,{value:i}),t&&g.jsxRuntimeExports.jsx(M.Button,{variant:"contained",color:"secondary",size:"small",onClick:o,sx:{flexShrink:0},children:n||"Copy"})]})}));class Uh{constructor(){this.messages=[],this.addMessage=(t,n="info")=>{const r={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:t,level:n};this.messages.push(r)},this.clearMessages=()=>{this.messages=[]},this.addInfo=t=>{this.addMessage(t,"info")},this.addWarning=t=>{this.addMessage(t,"warning")},this.addError=t=>{this.addMessage(t,"error")},this.addDebug=t=>{this.addMessage(t,"debug")},de.makeObservable(this,{messages:de.observable,addMessage:de.action,clearMessages:de.action})}}const Ir=(e,t,n)=>({id:n||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:e,level:t}),xC=(e,t)=>Ir(e,"debug",t),bC=(e,t)=>Ir(e,"info",t),vC=(e,t)=>Ir(e,"warning",t),SC=(e,t)=>Ir(e,"error",t),Hh=g.externalizeComponent(re.observer(e=>{var u;const{messages:t=[],onClear:n,height:r=400,sx:i}=e,o=M.useTheme(),s=O.useRef(null);O.useEffect(()=>{if(t.length===0)return;const d=s.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const a=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return o.palette.error.main;case"warning":return o.palette.warning.main;case"info":return o.palette.info.main;case"debug":return o.palette.text.disabled;default:return o.palette.text.secondary}},c=({message:d})=>{const[h,f]=O.useState(!1),[m,p]=O.useState(!1),[y,v]=O.useState(!1),E=d.message.length>150,w=async()=>{try{await navigator.clipboard.writeText(d.message),p(!0),setTimeout(()=>p(!1),2e3)}catch(C){console.error("Failed to copy message:",C)}},T=E&&!h?d.message.substring(0,150)+"...":d.message;return g.jsxRuntimeExports.jsx(M.Box,{onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:o.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:g.jsxRuntimeExports.jsxs(M.Box,{sx:{display:"flex",gap:1},children:[g.jsxRuntimeExports.jsxs(M.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:o.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",a(d.timestamp),"]"]}),g.jsxRuntimeExports.jsx(M.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:l(d.level),wordBreak:"break-word",overflowWrap:"anywhere",hyphens:"auto",flex:1,whiteSpace:"pre-wrap"},children:T}),g.jsxRuntimeExports.jsxs(M.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:y?1:0,transition:"opacity 0.2s ease-in-out",visibility:y?"visible":"hidden"},children:[g.jsxRuntimeExports.jsx(M.IconButton,{size:"small",onClick:w,sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:m?"Copied!":"Copy message",children:g.jsxRuntimeExports.jsx(Lr.ContentCopy,{sx:{fontSize:12}})}),E&&g.jsxRuntimeExports.jsx(M.IconButton,{size:"small",onClick:()=>f(!h),sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:h?"Collapse":"Expand",children:h?g.jsxRuntimeExports.jsx(Lr.ExpandLess,{sx:{fontSize:12}}):g.jsxRuntimeExports.jsx(Lr.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxRuntimeExports.jsxs(M.Paper,{sx:{backgroundColor:((u=o.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:r,display:"flex",flexDirection:"column",overflow:"hidden",...i},children:[g.jsxRuntimeExports.jsxs(M.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxRuntimeExports.jsxs(M.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsxRuntimeExports.jsx(Lr.DescriptionOutlined,{sx:{fontSize:16,color:o.palette.action.active,opacity:.56}}),g.jsxRuntimeExports.jsx(M.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:o.palette.text.primary},children:"Log"})]}),g.jsxRuntimeExports.jsx(M.Button,{onClick:n,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:o.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:o.palette.primary.main+"14"}},children:"Clear"})]}),g.jsxRuntimeExports.jsx(M.Box,{ref:s,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${o.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:o.palette.divider}}},children:t.length===0?g.jsxRuntimeExports.jsx(M.Typography,{sx:{color:o.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):t.map(d=>g.jsxRuntimeExports.jsx(c,{message:d},d.id))})]})})),EC=g.externalizeComponent(re.observer(e=>{const{store:t,onStoreReady:n,...r}=e,i=O.useRef(n);O.useEffect(()=>{i.current=n},[n]);const o=O.useMemo(()=>{var l;const a=t||new Uh;return(l=i.current)==null||l.call(i,a),a},[t]),s=()=>{o.clearMessages()};return g.jsxRuntimeExports.jsx(Hh,{...r,messages:o.messages,onClear:s})}));function wC(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function TC({baseUrl:e=wC(),...t}){return g.jsxRuntimeExports.jsxs(M.Dialog,{"aria-labelledby":"no-motion-group-modal-title",open:!0,fullWidth:!0,sx:{"& .MuiModal-backdrop":{backdropFilter:"blur(10px)"},"& .MuiDialog-paper":{"::before":{content:'""',height:"8px",width:"100%",background:"linear-gradient(90deg, #FF0E65 0%, #47D3FF 100%)"},background:"#101629"}},children:[g.jsxRuntimeExports.jsx(M.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxRuntimeExports.jsxs(M.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsxRuntimeExports.jsx(M.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsxRuntimeExports.jsx(M.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsxRuntimeExports.jsx(M.DialogActions,{children:g.jsxRuntimeExports.jsxs(M.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsxRuntimeExports.jsx(M.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsxRuntimeExports.jsx(M.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const CC=Kt(g.jsxRuntimeExports.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),MC=({title:e,titleId:t,...n},r)=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:r,"aria-labelledby":t,...n},e?_.createElement("title",{id:t},e):null,_.createElement("path",{fill:"#38C6F4",fillRule:"evenodd",d:"M6.359 14.25v2.934h7.63v-3.521L10.196 9.87 9 8.674l.859-.859.337-.337.858-.858.565.565.631.63.565.565 1.196-1.195.543-.544 1.196-1.195-1.196-1.196-2.304-2.304L11.054.75 9.86 1.946 3.446 8.359 2.25 9.554l1.196 1.196 2.913 2.913zm1.69 0v1.244h4.249v-1.13L7.804 9.87 6.608 8.674l1.196-1.196L9.86 5.424l.007-.008-.543-.543-4.681 4.681 2.912 2.913.496.496v.113h2.124l1.174 1.174zm3.005-10.022-.294.294-.543-.543.837-.837 2.304 2.304-.543.543-.565-.565z",clipRule:"evenodd"})),RC=O.forwardRef(MC);var Wa=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.CELL_OPEN="CELL_OPEN",e.E_STOP="E_STOP",e.MANUAL_MODE="MANUAL_MODE",e.READY="READY",e))(Wa||{});const Yh=g.externalizeComponent(re.observer(({setupState:e,className:t})=>{const n=M.useTheme(),{t:r}=he.useTranslation(),i=()=>{var c,u,d,h,f,m,p;switch(e){case"READY":return{label:r("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((c=n.palette.tertiary)==null?void 0:c.main)||n.palette.primary.main,backgroundColor:((u=n.palette.backgroundPaperElevation)==null?void 0:u[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"ROBOT_DISCONNECTED":return{label:r("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:n.palette.error.main,backgroundColor:((d=n.palette.backgroundPaperElevation)==null?void 0:d[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"CELL_OPEN":return{label:r("RobotSetupReadinessIndicator.CellOpen.lb"),indicatorColor:n.palette.error.main,backgroundColor:((h=n.palette.backgroundPaperElevation)==null?void 0:h[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"E_STOP":return{label:r("RobotSetupReadinessIndicator.EStop.lb"),indicatorColor:n.palette.error.main,backgroundColor:((f=n.palette.backgroundPaperElevation)==null?void 0:f[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"MANUAL_MODE":return{label:r("RobotSetupReadinessIndicator.ManualMode.lb"),indicatorColor:n.palette.error.main,backgroundColor:((m=n.palette.backgroundPaperElevation)==null?void 0:m[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText};case"PRECONDITION_NOT_FULFILLED":default:return{label:r("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:n.palette.error.main,backgroundColor:((p=n.palette.backgroundPaperElevation)==null?void 0:p[11])||n.palette.background.paper,textColor:n.palette.secondary.contrastText}}},{label:o,indicatorColor:s,backgroundColor:a,textColor:l}=i();return g.jsxRuntimeExports.jsx(M.Chip,{className:t,label:g.jsxRuntimeExports.jsxs(M.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsxRuntimeExports.jsx(M.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:s,flexShrink:0}}),g.jsxRuntimeExports.jsx(M.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:o})]}),variant:"filled",sx:{backgroundColor:a,color:n.palette.getContrastText(a),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),AC=g.externalizeComponent(re.observer(({robotName:e,robotType:t,setupState:n,PreconditionComponent:r=Yh,className:i})=>{var l;const o=M.useTheme(),s=t||"Robot",a=n===Wa.READY;return g.jsxRuntimeExports.jsxs(M.Box,{className:i,sx:{border:`1px solid ${o.palette.divider}`,background:((l=o.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxRuntimeExports.jsxs(M.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[a?g.jsxRuntimeExports.jsx(M.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${o.palette.primary.main} !important`},"& svg path":{fill:`${o.palette.primary.main} !important`}},children:g.jsxRuntimeExports.jsx(RC,{})}):g.jsxRuntimeExports.jsx(CC,{sx:{color:o.palette.error.main,fontSize:24}}),g.jsxRuntimeExports.jsx(M.Typography,{variant:"body1",sx:{fontWeight:500,color:o.palette.text.primary},children:e}),g.jsxRuntimeExports.jsx(M.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:o.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsxRuntimeExports.jsx(M.Typography,{variant:"body2",sx:{color:o.palette.text.secondary},children:s})]}),r&&g.jsxRuntimeExports.jsx(r,{setupState:n})]})})),_C=({title:e,titleId:t,...n},r)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?_.createElement("title",{id:t},e):null,_.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"})),IC=O.forwardRef(_C),jC=({title:e,titleId:t,...n},r)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?_.createElement("title",{id:t},e):null,_.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"})),kC=O.forwardRef(jC),ut=re.observer(({id:e,icon:t,color:n,title:r,name:i,label:o,explanation:s,literalValue:a,anchorOrigin:l,transformOrigin:c})=>{const u=re.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(d){u.anchorEl=d.currentTarget},closePopover(){u.anchorEl=null}}));return g.jsxRuntimeExports.jsxs(g.jsxRuntimeExports.Fragment,{children:[g.jsxRuntimeExports.jsxs(M.Stack,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[g.jsxRuntimeExports.jsx(M.SvgIcon,{component:t,sx:{color:n}}),o&&g.jsxRuntimeExports.jsx("div",{style:{color:n},children:o})]}),g.jsxRuntimeExports.jsx(M.Popover,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:l??{vertical:"bottom",horizontal:"left"},transformOrigin:c??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:g.jsxRuntimeExports.jsxs(M.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxRuntimeExports.jsxs("div",{children:[r&&g.jsxRuntimeExports.jsx(M.Typography,{component:"span",fontSize:"14px",children:`${r}: `}),g.jsxRuntimeExports.jsx(M.Typography,{component:"span",color:n,fontWeight:"bold",fontSize:"14px",children:i})]}),g.jsxRuntimeExports.jsx(M.Typography,{fontSize:"14px",children:s}),a&&g.jsxRuntimeExports.jsx(M.Typography,{fontSize:"12px",children:a})]})})]})}),OC=re.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:n,transformOrigin:r,compact:i})=>{const o=M.useTheme(),s=O.useId(),{t:a}=he.useTranslation();return e?g.jsxRuntimeExports.jsx(ut,{id:`motion-group-virtual-${s}`,icon:kC,color:o.palette.tertiary.main,name:a("SafetyBar.ControllerType.Virtual.lb"),label:i?null:a("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxRuntimeExports.jsxs(he.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",g.jsxRuntimeExports.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:n,transformOrigin:r}):g.jsxRuntimeExports.jsx(ut,{id:`motion-group-physical-${s}`,icon:IC,color:o.palette.primary.main,name:a("SafetyBar.ControllerType.Physical.lb"),label:i?null:a("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsxRuntimeExports.jsx(he.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsxRuntimeExports.jsx("code",{}),strong:g.jsxRuntimeExports.jsx("strong",{})}}),anchorOrigin:n,transformOrigin:r})}),PC=({title:e,titleId:t,...n},r)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?_.createElement("title",{id:t},e):null,_.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"})),DC=O.forwardRef(PC),$C=({title:e,titleId:t,...n},r)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?_.createElement("title",{id:t},e):null,_.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})),LC=O.forwardRef($C),NC=({title:e,titleId:t,...n},r)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?_.createElement("title",{id:t},e):null,_.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"})),zC=O.forwardRef(NC),FC=re.observer(({operationMode:e,anchorOrigin:t,transformOrigin:n,compact:r})=>{const{t:i}=he.useTranslation(),o=M.useTheme(),s=O.useId();switch(e){case"OPERATION_MODE_AUTO":return g.jsxRuntimeExports.jsx(ut,{id:`operation-mode-auto-${s}`,icon:DC,title:i("SafetyBar.OperationMode.ti"),name:i("SafetyBar.OperationMode.Automatic.ti"),label:r?null:i("SafetyBar.OperationMode.Automatic.ti"),color:o.palette.text.secondary,explanation:g.jsxRuntimeExports.jsx(he.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:n});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return g.jsxRuntimeExports.jsx(ut,{id:`operation-mode-manual-${s}`,icon:zC,color:o.palette.warning.main,title:i("SafetyBar.OperationMode.ti"),name:i("SafetyBar.OperationMode.Manual.lb"),label:r?null:i("SafetyBar.OperationMode.Manual.lb"),explanation:g.jsxRuntimeExports.jsx(he.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:n});default:return g.jsxRuntimeExports.jsx(ut,{id:`operation-mode-error-${s}`,icon:LC,color:o.palette.warning.main,title:i("SafetyBar.OperationMode.ti"),name:i("SafetyBar.OperationMode.Error.lb"),label:r?null:i("SafetyBar.OperationMode.Error.lb"),explanation:g.jsxRuntimeExports.jsx(he.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:n})}}),BC=({title:e,titleId:t,...n},r)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?_.createElement("title",{id:t},e):null,_.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"})),GC=O.forwardRef(BC),VC=({title:e,titleId:t,...n},r)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?_.createElement("title",{id:t},e):null,_.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),_.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"}),_.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"})),UC=O.forwardRef(VC),HC=({title:e,titleId:t,...n},r)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?_.createElement("title",{id:t},e):null,_.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})),YC=O.forwardRef(HC),WC=({title:e,titleId:t,...n},r)=>_.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?_.createElement("title",{id:t},e):null,_.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"})),qC=O.forwardRef(WC),KC=({title:e,titleId:t,...n},r)=>_.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t,...n},e?_.createElement("title",{id:t},e):null,_.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"})),JC=O.forwardRef(KC),XC=re.observer(({safetyState:e,anchorOrigin:t,transformOrigin:n,compact:r})=>{const{t:i}=he.useTranslation(),o=M.useTheme(),s=O.useId();switch(e){case"SAFETY_STATE_NORMAL":return g.jsxRuntimeExports.jsx(ut,{id:`safety-state-normal-${s}`,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Normal.lb"),label:r?null:i("SafetyBar.SafetyState.Normal.lb"),icon:qC,color:o.palette.text.secondary,explanation:g.jsxRuntimeExports.jsx(he.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:n});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return g.jsxRuntimeExports.jsx(ut,{id:`safety-state-estop-${s}`,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Estop.lb"),label:r?null:i("SafetyBar.SafetyState.Estop.lb"),icon:UC,color:o.palette.error.main,explanation:g.jsxRuntimeExports.jsx(he.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:n});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 g.jsxRuntimeExports.jsx(ut,{id:`safety-state-stop-${s}`,icon:JC,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Stop.lb"),label:r?null:i("SafetyBar.SafetyState.Stop.lb"),color:o.palette.warning.main,explanation:g.jsxRuntimeExports.jsx(he.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:n});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 g.jsxRuntimeExports.jsx(ut,{id:`safety-state-manual-action-required-${s}`,icon:YC,color:o.palette.warning.main,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.ManualActionRequired.lb"),label:r?null:i("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:g.jsxRuntimeExports.jsx(he.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:n});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return g.jsxRuntimeExports.jsx(ut,{id:`safety-state-error-${s}`,icon:GC,color:o.palette.error.main,title:i("SafetyBar.SafetyState.ti"),name:i("SafetyBar.SafetyState.Error.lb"),label:r?null:i("SafetyBar.SafetyState.Error.lb"),explanation:g.jsxRuntimeExports.jsx(he.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:n});default:mu.assertUnreachable(e,`Unknown safety state ${e}`)}}),ZC=g.externalizeComponent(re.observer(({isVirtual:e,motionGroupId:t,operationMode:n,safetyState:r,anchorOrigin:i,transformOrigin:o,compact:s=!0})=>{const a=s?1:2;return g.jsxRuntimeExports.jsxs(M.Stack,{direction:"row",gap:a,alignItems:"center",sx:{height:"24px"},children:[g.jsxRuntimeExports.jsx(XC,{safetyState:r,anchorOrigin:i,transformOrigin:o,compact:s}),g.jsxRuntimeExports.jsx(M.Divider,{orientation:"vertical",flexItem:!0}),g.jsxRuntimeExports.jsx(FC,{operationMode:n,anchorOrigin:i,transformOrigin:o,compact:s}),g.jsxRuntimeExports.jsx(M.Divider,{orientation:"vertical",flexItem:!0}),g.jsxRuntimeExports.jsx(OC,{isVirtual:e,motionGroupId:t,anchorOrigin:i,transformOrigin:o,compact:s})]})})),QC=M.styled(M.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,n,r;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:i})=>!i,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:i})=>i,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),eM=e=>{const{ref:t,...n}=e;return g.jsxRuntimeExports.jsx(QC,{ref:t,selected:e.selected,...n,color:"secondary",variant:"circular"})};function tM(e){const{children:t,value:n,index:r,...i}=e;return g.jsxRuntimeExports.jsx("div",{role:"tabpanel",hidden:n!==r,id:`tabpanel-${r}`,"aria-labelledby":`tab-${r}`,...i,children:n===r&&g.jsxRuntimeExports.jsx(M.Box,{children:t})})}function nM({children:e,...t}){const{fullWidth:n,indicator:r,onChange:i,orientation:o,scrollButtons:s,selectionFollowsFocus:a,textColor:l,value:c,variant:u,...d}=t;return g.jsxRuntimeExports.jsx(M.Box,{...d,children:e})}const rM=g.externalizeComponent(re.observer(e=>{const{items:t,activeTab:n,defaultActiveTab:r=0,onTabChange:i,sx:o,ref:s}=e,a=n!==void 0,[l,c]=O.useState(r),u=a?n:l;O.useEffect(()=>{a||t.length!==0&&(l<0||l>t.length-1)&&c(0)},[t.length,a,l]);const d=(h,f)=>{a||c(f),i==null||i(f)};return g.jsxRuntimeExports.jsxs(M.Box,{ref:s,sx:{height:"100%",display:"flex",flexDirection:"column",...o},children:[g.jsxRuntimeExports.jsx(M.Box,{sx:{px:0,py:0,overflow:"visible",position:"relative",paddingTop:h=>h.spacing(2),paddingRight:h=>h.spacing(2.5)},children:g.jsxRuntimeExports.jsx(M.Tabs,{value:u,onChange:d,sx:{minHeight:"32px",backgroundColor:"transparent",overflow:"visible","& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:2,overflow:"visible",paddingTop:0,paddingBottom:0},"& .MuiTabs-scroller":{overflow:"visible !important"},"& .MuiTab-root":{overflow:"visible"}},children:t.map((h,f)=>{var T,C,S;const m=()=>{if(!h.badge)return;const R=h.badge.content,j=h.badge.max;return typeof R=="number"&&j&&R>j?`${j}+`:R},p=()=>{if(!h.badge)return!1;const R=h.badge.content,j=h.badge.showZero;return!(R===0&&!j)},y=m(),v=p(),E=()=>{a||c(f),i==null||i(f)},w=g.jsxRuntimeExports.jsx(M.Tab,{label:h.label,icon:h.icon,iconPosition:"start",disableRipple:!0,onClick:E,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:R=>{var j;return((j=R.palette.backgroundPaperElevation)==null?void 0:j[11])||"#32344B"},color:"text.primary",opacity:u===f?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out",position:"relative",overflow:"visible","&:hover":{opacity:u===f?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:R=>{var j;return((j=R.palette.backgroundPaperElevation)==null?void 0:j[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},h.id);return v?g.jsxRuntimeExports.jsx(nM,{component:"span",sx:{display:"inline-flex"},children:g.jsxRuntimeExports.jsx(M.Badge,{badgeContent:y,color:((T=h.badge)==null?void 0:T.color)||"error",max:(C=h.badge)==null?void 0:C.max,showZero:(S=h.badge)==null?void 0:S.showZero,anchorOrigin:{vertical:"top",horizontal:"right"},overlap:"rectangular",sx:{"& .MuiBadge-badge":{opacity:"1 !important"}},children:w})},h.id):w})})}),g.jsxRuntimeExports.jsx(M.Box,{sx:{mt:h=>h.spacing(2),borderBottom:1,borderColor:"divider"}}),g.jsxRuntimeExports.jsx(M.Box,{sx:{flex:1,overflow:"auto"},children:t.map((h,f)=>g.jsxRuntimeExports.jsx(tM,{value:u,index:f,children:h.content},h.id))})]})})),iM=e=>{const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=e%60,o=[];return t>0?(o.push(t.toString()),o.push(n.toString().padStart(2,"0")),o.push(r.toString().padStart(2,"0")),o.push(i.toString().padStart(2,"0"))):n>0?(o.push(n.toString()),o.push(r.toString().padStart(2,"0")),o.push(i.toString().padStart(2,"0"))):(o.push(r.toString()),o.push(i.toString().padStart(2,"0"))),o.join(":")},hu=(e,t)=>{const n=Math.floor(e/86400),r=Math.floor(e%86400/3600),i=Math.floor(e%3600/60),o=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const a={};return n>0&&(a.days=n),r>0&&(a.hours=r),i>0&&(a.minutes=i),(o>0||Object.keys(a).length===0)&&(a.seconds=o),new Intl.DurationFormat(t,{style:"narrow"}).format(a)}catch{}const s=[];return n>0&&s.push(`${n}d`),r>0&&s.push(`${r}h`),i>0&&s.push(`${i}m`),(o>0||s.length===0)&&s.push(`${o}s`),s.join(" ")},oM=({timerState:e,animationState:t,hasError:n,className:r})=>{const{t:i}=he.useTranslation(),o=zu(),{elapsedTime:s,currentProgress:a}=e,{showErrorAnimation:l,showPauseAnimation:c,showMainText:u}=t;return g.jsxRuntimeExports.jsxs(M.Box,{className:r,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsxRuntimeExports.jsx(tf.Gauge,{width:264,height:264,value:a,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:c||l?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:n?o.palette.error.light:o.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),g.jsxRuntimeExports.jsx(M.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:g.jsxRuntimeExports.jsxs(M.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsxRuntimeExports.jsx(M.Fade,{in:u&&n,timeout:200,children:g.jsxRuntimeExports.jsx(M.Typography,{variant:"h6",sx:{position:"absolute",fontSize:"16px",fontWeight:500,color:o.palette.error.light},children:i("timer.error")})}),g.jsxRuntimeExports.jsx(M.Fade,{in:u&&!n,timeout:300,children:g.jsxRuntimeExports.jsx(M.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:o.palette.text.primary,lineHeight:1,letterSpacing:"-0.5px"},children:iM(s)})})]})})]})},sM=({timerState:e,animationState:t,hasError:n,compact:r,className:i})=>{const{t:o,i18n:s}=he.useTranslation(),a=zu(),{elapsedTime:l,currentProgress:c}=e,{showErrorAnimation:u,showPauseAnimation:d}=t;return r?g.jsxRuntimeExports.jsx(M.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0},children:g.jsxRuntimeExports.jsx(M.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:a.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:n?o("timer.error"):hu(l,s.language)})}):g.jsxRuntimeExports.jsxs(M.Box,{className:i,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsxRuntimeExports.jsx(M.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:d||u?.6:1,transition:"opacity 0.5s ease-out"},children:g.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:a.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsxRuntimeExports.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:n?a.palette.error.light:a.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-c/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsxRuntimeExports.jsx(M.Typography,{variant:"body2",sx:{color:n?a.palette.error.light:a.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:n?o("timer.error"):hu(l,s.language)})]})},aM=()=>{const[e,t]=O.useState({showPauseAnimation:!1,showErrorAnimation:!1,showMainText:!0}),n=O.useRef(null),r=O.useRef(null),i=O.useRef(null),o=O.useCallback(()=>{t(d=>({...d,showPauseAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(d=>({...d,showPauseAnimation:!1}))},800)},[]),s=O.useCallback(()=>{t(d=>({...d,showErrorAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(d=>({...d,showErrorAnimation:!1}))},600)},[]),a=O.useCallback(()=>{t(d=>({...d,showErrorAnimation:!1})),r.current&&clearTimeout(r.current)},[]),l=O.useCallback(()=>{t(d=>({...d,showMainText:!1})),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{t(d=>({...d,showMainText:!0}))},200)},[]),c=O.useCallback(()=>{t(d=>({...d,showMainText:!0}))},[]),u=O.useCallback(()=>{n.current&&clearTimeout(n.current),r.current&&clearTimeout(r.current),i.current&&clearTimeout(i.current)},[]);return{animationState:e,triggerPauseAnimation:o,triggerErrorAnimation:s,clearErrorAnimation:a,triggerFadeTransition:l,setInitialAnimationState:c,cleanup:u}},lM=({autoStart:e,hasError:t,onPauseAnimation:n,onErrorAnimation:r,onClearErrorAnimation:i})=>{const[o,s]=O.useState({elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),a=O.useRef(null),l=O.useRef(null),c=O.useRef(0),u=O.useRef(0),[d]=Ft.useInterpolation([0],{tension:80,friction:18,onChange:([v])=>{s(E=>({...E,currentProgress:v}))}}),h=O.useCallback((v=0)=>{const E=v/60%1*100;s(w=>({...w,elapsedTime:v,isPausedState:!1,currentProgress:E})),c.current=0,u.current=E,d.setImmediate([E]),e?(l.current=Date.now()-v*1e3,s(w=>({...w,isRunning:!0}))):l.current=null},[e,d]),f=O.useCallback(()=>{if(l.current&&o.isRunning){const E=(Date.now()-l.current)/1e3+c.current,w=E/60%1*100;d.setTarget([w]),s(T=>({...T,elapsedTime:Math.floor(E)}))}s(v=>({...v,isRunning:!1,isPausedState:!0})),n()},[o.isRunning,d,n]),m=O.useCallback(()=>{o.isPausedState&&(c.current=o.elapsedTime,l.current=Date.now(),s(v=>({...v,isRunning:!0,isPausedState:!1})))},[o.isPausedState,o.elapsedTime]),p=O.useCallback(()=>{s(v=>({...v,elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0})),c.current=0,l.current=null,u.current=0,d.setImmediate([0])},[d]),y=O.useCallback(()=>o.isPausedState,[o.isPausedState]);return O.useEffect(()=>{t?(o.isRunning&&(s(v=>({...v,wasRunningBeforeError:!0})),f()),r()):(o.wasRunningBeforeError&&!o.isRunning&&(s(v=>({...v,wasRunningBeforeError:!1})),m()),i())},[t,o.isRunning,o.wasRunningBeforeError,f,m,r,i]),O.useEffect(()=>{if(o.isRunning){const v=()=>{if(l.current){const w=(Date.now()-l.current)/1e3+c.current,T=w/60%1*100;s(S=>({...S,elapsedTime:Math.floor(w)})),Math.abs(T-u.current)>.1&&(d.setTarget([T]),u.current=T)}a.current=requestAnimationFrame(v)};a.current=requestAnimationFrame(v)}else a.current&&(cancelAnimationFrame(a.current),a.current=null);return()=>{a.current&&(cancelAnimationFrame(a.current),a.current=null)}},[o.isRunning,d]),O.useEffect(()=>{let v=null;const E=()=>{d.update(),v=requestAnimationFrame(E)};return v=requestAnimationFrame(E),()=>{v&&cancelAnimationFrame(v)}},[d]),{timerState:o,controls:{start:h,pause:f,resume:m,reset:p,isPaused:y}}},cM=g.externalizeComponent(re.observer(({onTimerReady:e,autoStart:t=!0,variant:n="default",compact:r=!1,className:i,hasError:o=!1})=>{const{animationState:s,triggerPauseAnimation:a,triggerErrorAnimation:l,clearErrorAnimation:c,setInitialAnimationState:u,cleanup:d}=aM(),{timerState:h,controls:f}=lM({autoStart:t,hasError:o,onPauseAnimation:a,onErrorAnimation:l,onClearErrorAnimation:c});return O.useEffect(()=>{u()},[u]),O.useEffect(()=>{let m=!0;const p=setTimeout(()=>{m&&e(f)},0);return()=>{m=!1,clearTimeout(p)}},[e,f]),O.useEffect(()=>d,[d]),n==="small"?g.jsxRuntimeExports.jsx(sM,{timerState:h,animationState:s,hasError:o,compact:r,className:i}):g.jsxRuntimeExports.jsx(oM,{timerState:h,animationState:s,hasError:o,className:i})})),fu=1e-4,uM={a:0,d:0,alpha:0,theta:0,reverse_rotation_direction:!1};class Ni{constructor(t,n,r,i,o,s,a,l,c,u){this.nova=t,this.controller=n,this.motionGroup=r,this.initialMotionState=i,this.motionStateSocket=o,this.isVirtual=s,this.tcps=a,this.description=l,this.initialControllerState=c,this.controllerStateSocket=u,this.connectedJoggingSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.rapidlyChangingMotionState=i,this.controllerState=c,u.addEventListener("message",d=>{var f;const h=(f=Ee.tryParseJson(d.data))==null?void 0:f.result;h&&de.runInAction(()=>{this.controllerState=h})}),o.addEventListener("message",d=>{var f;const h=(f=Ee.tryParseJson(d.data))==null?void 0:f.result;if(!h)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${d.data}`);za(this.rapidlyChangingMotionState.joint_position,h.joint_position,fu)||de.runInAction(()=>{this.rapidlyChangingMotionState.joint_position=h.joint_position}),Fa(this.rapidlyChangingMotionState,h,fu)||de.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=h.tcp_pose}),this.rapidlyChangingMotionState.standstill!==h.standstill&&de.runInAction(()=>{this.rapidlyChangingMotionState.standstill=h.standstill})}),de.makeAutoObservable(this)}static async connectMultiple(t,n){return Promise.all(n.map(r=>Ni.connect(t,r)))}static async connect(t,n){var v,E;const[r,i]=n.split("@"),o=await t.api.controller.getCurrentRobotControllerState(i),s=o==null?void 0:o.motion_groups.find(w=>w.motion_group===n);if(!o||!s)throw new Error(`Controller ${i} or motion group ${n} not found`);const a=t.openReconnectingWebsocket(`/controllers/${i}/motion-groups/${n}/state-stream`),l=await a.firstMessage(),c=(v=Ee.tryParseJson(l.data))==null?void 0:v.result;if(!c)throw new Error(`Unable to parse initial motion state message ${l.data}`);console.log(`Connected motion state websocket to motion group ${s.motion_group}. Initial state:
113
113
  `,c);const d=(await t.api.controller.getRobotController(o.controller)).configuration.kind==="VirtualController",h=await t.api.motionGroup.getMotionGroupDescription(i,s.motion_group),f=Object.entries(h.tcps||{}).map(([w,T])=>({id:w,readable_name:T.name,position:T.pose.position,orientation:T.pose.orientation})),m=t.openReconnectingWebsocket(`/controllers/${o.controller}/state-stream?response_rate=1000`),p=await m.firstMessage(),y=(E=Ee.tryParseJson(p.data))==null?void 0:E.result;if(!y)throw new Error(`Unable to parse initial controller state message ${p.data}`);return console.log(`Connected controller state websocket to controller ${o.controller}. Initial state:
114
114
  `,y),new Ni(t,o,s,c,a,d,f,h,y,m)}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.description.motion_group_model}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replace(/-/g,"_")}_${t}`}get joggingVelocityRads(){return this.joggingVelocity*Math.PI/180}get joints(){return this.initialMotionState.joint_position.map((t,n)=>({index:n}))}get dhParameters(){if(this.description.dh_parameters!==void 0)return this.description.dh_parameters.map(t=>({...uM,...t}))}get safetyZones(){return this.description.safety_zones}get mountingPosition(){var t,n,r;return this.description.mounting?[(((t=this.description.mounting.position)==null?void 0:t[0])||0)/1e3,(((n=this.description.mounting.position)==null?void 0:n[1])||0)/1e3,(((r=this.description.mounting.position)==null?void 0:r[2])||0)/1e3]:[0,0,0]}get mountingQuaternion(){var i,o,s,a,l,c;const t=new qa.Vector3(((o=(i=this.description.mounting)==null?void 0:i.orientation)==null?void 0:o[0])||0,((a=(s=this.description.mounting)==null?void 0:s.orientation)==null?void 0:a[1])||0,((c=(l=this.description.mounting)==null?void 0:l.orientation)==null?void 0:c[2])||0),n=t.length(),r=t.normalize();return new qa.Quaternion().setFromAxisAngle(r,n)}get isEstopActive(){return["SAFETY_STATE_ROBOT_EMERGENCY_STOP","SAFETY_STATE_DEVICE_EMERGENCY_STOP"].includes(this.controllerState.safety_state)}get isMoveableSafetyState(){return["SAFETY_STATE_NORMAL","SAFETY_STATE_REDUCED"].includes(this.controllerState.safety_state)}get isMoveableOperationMode(){return["OPERATION_MODE_AUTO","OPERATION_MODE_MANUAL","OPERATION_MODE_MANUAL_T1","OPERATION_MODE_MANUAL_T2"].includes(this.controllerState.operation_mode)}get canBeMoved(){return this.isMoveableSafetyState&&this.isMoveableOperationMode&&this.activationState==="active"}async deactivate(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}de.runInAction(()=>{this.activationState="deactivating"});try{await this.nova.api.controller.setDefaultMode(this.controllerId,"ROBOT_SYSTEM_MODE_MONITOR"),de.runInAction(()=>{this.activationState="inactive"})}catch(t){throw de.runInAction(()=>{this.activationState="active"}),t}}async activate(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}de.runInAction(()=>{this.activationState="activating"});try{await this.nova.api.controller.setDefaultMode(this.controllerId,"ROBOT_SYSTEM_MODE_CONTROL"),de.runInAction(()=>{this.activationState="active"})}catch(t){throw de.runInAction(()=>{this.activationState="inactive"}),t}}toggleActivation(){this.activationState==="inactive"?this.activate():this.activationState==="active"&&this.deactivate()}dispose(){this.motionStateSocket.close(),this.connectedJoggingSocket&&this.connectedJoggingSocket.close()}setJoggingVelocity(t){this.joggingVelocity=t}}function Wh(){var t,n,r,i,o,s,a;const e=M.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`},".MuiDataGrid-panelContent":{borderRadius:"16px !important","& .MuiPaper-root":{borderRadius:"16px !important"}},".MuiDataGrid-filterForm":{borderRadius:"16px !important","& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}},"& .MuiTextField-root":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}},".MuiDataGrid-filterFormValueInput":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}}},MuiDataGrid:{styleOverrides:{root:{},panelContent:{borderRadius:"16px !important"},filterForm:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}},filterFormValueInput:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",borderRadius:"10px"}},variants:[{props:{color:"secondary",variant:"contained"},style:{border:`1px solid ${e.palette.divider}`,background:(r=(n=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:n.tonal)==null?void 0:r.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(i=e.palette.backgroundPaperElevation)==null?void 0:i[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(s=(o=e.paletteExt)==null?void 0:o.secondary)==null?void 0:s.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":M.rgbToHex(((a=e.palette.backgroundPaperElevation)==null?void 0:a[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function dM(){const e=Wh();return e.palette.mode="light",e}function hM(e){var r,i,o,s;let t=!0;((r=e.palette)==null?void 0:r.mode)==="light"?t=!1:((i=e.palette)==null?void 0:i.mode)!=="dark"&&(t=!(typeof window<"u"&&((s=(o=window.matchMedia)==null?void 0:o.call(window,"(prefers-color-scheme: light)"))==null?void 0:s.matches)));const n=t?Wh():dM();return Nu(n,e)}exports.AppHeader=of;exports.ConnectedMotionGroup=Ni;exports.CycleTimer=MS;exports.JoggerConnection=Ao;exports.JoggingCartesianAxisControl=Is;exports.JoggingJointRotationControl=yh;exports.JoggingPanel=pC;exports.JoggingStore=Oo;exports.LogPanel=EC;exports.LogStore=Uh;exports.LogViewer=Hh;exports.MotionStreamConnection=Ro;exports.NoMotionGroupModal=TC;exports.PoseCartesianValues=gC;exports.PoseJointValues=yC;exports.RobotListItem=AC;exports.RobotSetupReadinessIndicator=Yh;exports.RobotSetupReadinessState=Wa;exports.SafetyBar=ZC;exports.SelectableFab=eM;exports.TabBar=rM;exports.Timer=cM;exports.VelocitySlider=Bh;exports.VelocitySliderLabel=Ya;exports.WandelbotsDataGrid=ph;exports.createDebugMessage=xC;exports.createErrorMessage=SC;exports.createInfoMessage=bC;exports.createLogMessage=Ir;exports.createNovaMuiTheme=hM;exports.createWarningMessage=vC;exports.jointValuesEqual=za;exports.poseEqual=xh;exports.tcpMotionEqual=Fa;exports.unwrapRotationVector=bh;
115
- //# sourceMappingURL=theming-DPoEjzxv.cjs.map
115
+ //# sourceMappingURL=theming-Dk07SE2_.cjs.map