@wandelbots/wandelbots-js-react-components 1.17.0 → 1.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JoggingStore.d.ts","sourceRoot":"","sources":["../../../src/components/jogging/JoggingStore.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,QAAQ,EACT,MAAM,2BAA2B,CAAA;AAGlC,QAAA,MAAM,wBAAwB;;;;GAK7B,CAAA;AAED,QAAA,MAAM,gBAAgB;;;;;;IAGZ,CAAA;AAEV,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC/E,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC/D,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,IAAI,CAAC,CAAA;AAErD,qBAAa,YAAY;IAuGrB,QAAQ,CAAC,MAAM,EAAE,gBAAgB;IACjC,QAAQ,CAAC,eAAe,EAAE,wBAAwB;IAClD,QAAQ,CAAC,YAAY,EAAE,gBAAgB,EAAE;IACzC,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE;IAzG3B,aAAa,EAAE,WAAW,GAAG,OAAO,GAAG,OAAO,CAAc;IAE5D;;;OAGG;IACH,wBAAwB,EAAE,OAAO,CAAO;IAExC;;OAEG;IACH,eAAe,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAa;IAE/D;;OAEG;IACH,eAAe,EAAE,OAAO,GAAG,IAAI,CAAO;IAEtC,iEAAiE;IACjE,KAAK,cAAoB;IAEzB;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAU;IAEvC,qFAAqF;IACrF,aAAa,EAAE,MAAM,CAAK;IAE1B;;;;OAIG;IACH,mBAAmB,EAAE,UAAU,GAAG,MAAM,CAAa;IAErD;;;;OAIG;IACH,mBAAmB,EAAE,iBAAiB,CAAe;IAErD;;;OAGG;IACH,2BAA2B,EAAE,WAAW,GAAG,QAAQ,CAAc;IAEjE,qEAAqE;IACrE,0BAA0B,UAAQ;IAElC,6EAA6E;IAC7E,2BAA2B,EAAE,MAAM,CAAK;IACxC,oFAAoF;IACpF,yBAAyB,EAAE,MAAM,CAAI;IAErC,iFAAiF;IACjF,8BAA8B,EAAE,MAAM,CAAI;IAC1C,iFAAiF;IACjF,8BAA8B,EAAE,MAAM,CAAM;IAE5C,8EAA8E;IAC9E,4BAA4B,EAAE,MAAM,CAAI;IACxC,8EAA8E;IAC9E,4BAA4B,EAAE,MAAM,CAAK;IAEzC,SAAS,EAAE,iBAAiB,EAAE,CAAK;IAEnC;;;OAGG;WACU,OAAO,CAAC,MAAM,EAAE,gBAAgB;gBA6BlC,MAAM,EAAE,gBAAgB,EACxB,eAAe,EAAE,wBAAwB,EACzC,YAAY,EAAE,gBAAgB,EAAE,EAChC,IAAI,EAAE,QAAQ,EAAE;IAuB3B,OAAO;IAOD,UAAU,CAAC,IAAI,GAAE;QAAE,yBAAyB,CAAC,EAAE,OAAO,CAAA;KAAO;IAkBnE,gDAAgD;IAC1C,QAAQ,CAAC,IAAI,GAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAO;
|
|
1
|
+
{"version":3,"file":"JoggingStore.d.ts","sourceRoot":"","sources":["../../../src/components/jogging/JoggingStore.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACxB,QAAQ,EACT,MAAM,2BAA2B,CAAA;AAGlC,QAAA,MAAM,wBAAwB;;;;GAK7B,CAAA;AAED,QAAA,MAAM,gBAAgB;;;;;;IAGZ,CAAA;AAEV,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC/E,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC/D,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,IAAI,CAAC,CAAA;AAErD,qBAAa,YAAY;IAuGrB,QAAQ,CAAC,MAAM,EAAE,gBAAgB;IACjC,QAAQ,CAAC,eAAe,EAAE,wBAAwB;IAClD,QAAQ,CAAC,YAAY,EAAE,gBAAgB,EAAE;IACzC,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE;IAzG3B,aAAa,EAAE,WAAW,GAAG,OAAO,GAAG,OAAO,CAAc;IAE5D;;;OAGG;IACH,wBAAwB,EAAE,OAAO,CAAO;IAExC;;OAEG;IACH,eAAe,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAa;IAE/D;;OAEG;IACH,eAAe,EAAE,OAAO,GAAG,IAAI,CAAO;IAEtC,iEAAiE;IACjE,KAAK,cAAoB;IAEzB;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAU;IAEvC,qFAAqF;IACrF,aAAa,EAAE,MAAM,CAAK;IAE1B;;;;OAIG;IACH,mBAAmB,EAAE,UAAU,GAAG,MAAM,CAAa;IAErD;;;;OAIG;IACH,mBAAmB,EAAE,iBAAiB,CAAe;IAErD;;;OAGG;IACH,2BAA2B,EAAE,WAAW,GAAG,QAAQ,CAAc;IAEjE,qEAAqE;IACrE,0BAA0B,UAAQ;IAElC,6EAA6E;IAC7E,2BAA2B,EAAE,MAAM,CAAK;IACxC,oFAAoF;IACpF,yBAAyB,EAAE,MAAM,CAAI;IAErC,iFAAiF;IACjF,8BAA8B,EAAE,MAAM,CAAI;IAC1C,iFAAiF;IACjF,8BAA8B,EAAE,MAAM,CAAM;IAE5C,8EAA8E;IAC9E,4BAA4B,EAAE,MAAM,CAAI;IACxC,8EAA8E;IAC9E,4BAA4B,EAAE,MAAM,CAAK;IAEzC,SAAS,EAAE,iBAAiB,EAAE,CAAK;IAEnC;;;OAGG;WACU,OAAO,CAAC,MAAM,EAAE,gBAAgB;gBA6BlC,MAAM,EAAE,gBAAgB,EACxB,eAAe,EAAE,wBAAwB,EACzC,YAAY,EAAE,gBAAgB,EAAE,EAChC,IAAI,EAAE,QAAQ,EAAE;IAuB3B,OAAO;IAOD,UAAU,CAAC,IAAI,GAAE;QAAE,yBAAyB,CAAC,EAAE,OAAO,CAAA;KAAO;IAkBnE,gDAAgD;IAC1C,QAAQ,CAAC,IAAI,GAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAO;IAkE9C,oBAAoB;IA6BpB,kBAAkB;IAOlB,IAAI,QAAQ,YAEX;IAED,IAAI,gBAAgB;;;;;;;MASnB;IAED,IAAI,IAAI;;;;;;OAWP;IAED,IAAI,gBAAgB;;;;;;SAEnB;IAED,IAAI,wBAAwB;;;;QAE3B;IAED,IAAI,oBAAoB;;;;;;OAEvB;IAED,IAAI,QAAQ;;;;;;OAEX;IAED,IAAI,UAAU;;;;;;MAEb;IAED,IAAI,QAAQ,WAEX;IAED,IAAI,gBAAgB,kDAEnB;IAED,IAAI,mBAAmB,qBAEtB;IAED;;;;OAIG;IACH,IAAI,mBAAmB,WAItB;IAED,IAAI,QAAQ,0CAEX;IAED,IAAI,uBAAuB;;;;kBAI1B;IAED,qEAAqE;IACrE,IAAI,0BAA0B,WAE7B;IAED,IAAI,sBAAsB,WAIzB;IAED,IAAI,yBAAyB,WAI5B;IAED,IAAI,yBAAyB,WAI5B;IAED;;;OAGG;IACH,IAAI,iBAAiB,2BASpB;IAED,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,EAAE,QAAQ,EAAE,MAAM;IAK1D,wBAAwB,CAAC,EAAE,EAAE,MAAM;IAInC,gBAAgB,CAAC,EAAE,EAAE,MAAM;IAI3B,sBAAsB,CAAC,WAAW,EAAE,UAAU,GAAG,MAAM;IAIvD,sBAAsB,CAAC,EAAE,EAAE,iBAAiB;IAI5C,6BAA6B,CAAC,UAAU,EAAE,OAAO;IAIjD,qBAAqB,CAAC,QAAQ,EAAE,MAAM;IAQtC,8BAA8B,CAAC,IAAI,EAAE,WAAW,GAAG,QAAQ;IAI3D,0DAA0D;IACpD,cAAc,CAAC,EAAE,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC;CAU7C"}
|
package/dist/index.cjs
CHANGED
|
@@ -80,5 +80,5 @@ const theme2 = createTheme({ palette: {
|
|
|
80
80
|
} });`:Hr(12,g?` (${g})`:"",JSON.stringify(_.main)));return Ws(_,"light",j,n),Ws(_,"dark",C,n),_.contrastText||(_.contrastText=h(_.main)),_},v={dark:Da,light:zs};return process.env.NODE_ENV!=="production"&&(v[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),tt(A({common:A({},Yr),mode:t,primary:m({color:o,name:"primary"}),secondary:m({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:l,name:"error"}),warning:m({color:d,name:"warning"}),info:m({color:u,name:"info"}),success:m({color:c,name:"success"}),grey:P0,contrastThreshold:r,getContrastText:h,augmentColor:m,tonalOffset:n},v[t]),a)}const N0=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function F0(e){return Math.round(e*1e5)/1e5}const Ks={textTransform:"uppercase"},Hs='"Roboto", "Helvetica", "Arial", sans-serif';function D0(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=Hs,fontSize:a=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:l=500,fontWeightBold:u=700,htmlFontSize:c=16,allVariants:d,pxToRem:h}=r,m=Ue(r,N0);process.env.NODE_ENV!=="production"&&(typeof a!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const v=a/14,y=h||(x=>`${x/c*v}rem`),_=(x,j,C,L,R)=>A({fontFamily:n,fontWeight:x,fontSize:y(j),lineHeight:C},n===Hs?{letterSpacing:`${F0(L/j)}em`}:{},R,d),g={h1:_(o,96,1.167,-1.5),h2:_(o,60,1.2,-.5),h3:_(i,48,1.167,0),h4:_(i,34,1.235,.25),h5:_(i,24,1.334,0),h6:_(l,20,1.6,.15),subtitle1:_(i,16,1.75,.15),subtitle2:_(l,14,1.57,.1),body1:_(i,16,1.5,.15),body2:_(i,14,1.43,.15),button:_(l,14,1.75,.4,Ks),caption:_(i,12,1.66,.4),overline:_(i,12,2.66,1,Ks),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return tt(A({htmlFontSize:c,pxToRem:y,fontFamily:n,fontSize:a,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:l,fontWeightBold:u},g),m,{clone:!1})}const B0=.2,U0=.14,J0=.12;function me(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${B0})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${U0})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${J0})`].join(",")}const V0=["none",me(0,2,1,-1,0,1,1,0,0,1,3,0),me(0,3,1,-2,0,2,2,0,0,1,5,0),me(0,3,3,-2,0,3,4,0,0,1,8,0),me(0,2,4,-1,0,4,5,0,0,1,10,0),me(0,3,5,-1,0,5,8,0,0,1,14,0),me(0,3,5,-1,0,6,10,0,0,1,18,0),me(0,4,5,-2,0,7,10,1,0,2,16,1),me(0,5,5,-3,0,8,10,1,0,3,14,2),me(0,5,6,-3,0,9,12,1,0,3,16,2),me(0,6,6,-3,0,10,14,1,0,4,18,3),me(0,6,7,-4,0,11,15,1,0,4,20,3),me(0,7,8,-4,0,12,17,2,0,5,22,4),me(0,7,8,-4,0,13,19,2,0,5,24,4),me(0,7,9,-4,0,14,21,2,0,5,26,4),me(0,8,9,-5,0,15,22,2,0,6,28,5),me(0,8,10,-5,0,16,24,2,0,6,30,5),me(0,8,11,-5,0,17,26,2,0,6,32,5),me(0,9,11,-5,0,18,28,2,0,7,34,6),me(0,9,12,-6,0,19,29,2,0,7,36,6),me(0,10,13,-6,0,20,31,3,0,8,38,7),me(0,10,13,-6,0,21,33,3,0,8,40,7),me(0,10,14,-6,0,22,35,3,0,8,42,7),me(0,11,14,-7,0,23,36,3,0,9,44,8),me(0,11,15,-7,0,24,38,3,0,9,46,8)],G0=["duration","easing","delay"],z0={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},W0={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function qs(e){return`${Math.round(e)}ms`}function K0(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function H0(e){const t=A({},z0,e.easing),r=A({},W0,e.duration);return A({getAutoHeightDuration:K0,create:(a=["all"],o={})=>{const{duration:i=r.standard,easing:l=t.easeInOut,delay:u=0}=o,c=Ue(o,G0);if(process.env.NODE_ENV!=="production"){const d=m=>typeof m=="string",h=m=>!isNaN(parseFloat(m));!d(a)&&!Array.isArray(a)&&console.error('MUI: Argument "props" must be a string or Array.'),!h(i)&&!d(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),d(l)||console.error('MUI: Argument "easing" must be a string.'),!h(u)&&!d(u)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof o!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
81
81
|
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(a)?a:[a]).map(d=>`${d} ${typeof i=="string"?i:qs(i)} ${l} ${typeof u=="string"?u:qs(u)}`).join(",")}},e,{easing:t,duration:r})}const q0={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},X0=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function lo(e={},...t){const{mixins:r={},palette:n={},transitions:a={},typography:o={}}=e,i=Ue(e,X0);if(e.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":Hr(18));const l=$0(n),u=ln(e);let c=tt(u,{mixins:p0(u.breakpoints,r),palette:l,shadows:V0.slice(),typography:D0(l,o),transitions:H0(a),zIndex:A({},q0)});if(c=tt(c,i),c=t.reduce((d,h)=>tt(d,h),c),process.env.NODE_ENV!=="production"){const d=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],h=(m,v)=>{let y;for(y in m){const _=m[y];if(d.indexOf(y)!==-1&&Object.keys(_).length>0){if(process.env.NODE_ENV!=="production"){const g=un("",y);console.error([`MUI: The \`${v}\` component increases the CSS specificity of the \`${y}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${g}' syntax:`,JSON.stringify({root:{[`&.${g}`]:_}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
82
82
|
`))}m[y]={}}}};Object.keys(c.components).forEach(m=>{const v=c.components[m].styleOverrides;v&&m.indexOf("Mui")===0&&h(v,m)})}return c.unstable_sxConfig=A({},on,i==null?void 0:i.unstable_sxConfig),c.unstable_sx=function(h){return sn({sx:h,theme:this})},c}const Y0=lo(),Z0="$$material";function Lo(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Q0=e=>Lo(e)&&e!=="classes",Pt=e0({themeId:Z0,defaultTheme:Y0,rootShouldForwardProp:Q0});process.env.NODE_ENV!=="production"&&(f.node,f.object.isRequired);function $o(e){return Nf(e)}const vr=zf({createStyledComponent:Pt("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>$o({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(vr.propTypes={children:f.node,component:f.elementType,direction:f.oneOfType([f.oneOf(["column-reverse","column","row-reverse","row"]),f.arrayOf(f.oneOf(["column-reverse","column","row-reverse","row"])),f.object]),divider:f.node,spacing:f.oneOfType([f.arrayOf(f.oneOfType([f.number,f.string])),f.number,f.object,f.string]),sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object]),useFlexGap:f.bool});const uo=en(De.observer(({color:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:a,disabled:o,...i})=>{wr(()=>{const d=r(),h=l.current;h&&(h.textContent=d)});const l=Z.useRef(null);e=e||"#F14D42";function u(d){d.button===0&&n("-")}function c(d){d.button===0&&n("+")}return s.jsxs(vr,{height:"72px",direction:"row",...i,children:[s.jsx(E.Button,{onPointerDown:u,onPointerUp:a,onPointerOut:a,disabled:o,sx:{width:"105px",backgroundColor:e,color:"white",alignContent:"center",fontSize:"37px",borderRadius:"16px 0px 0px 16px",":hover":{color:"white",backgroundColor:e}},children:"-"}),s.jsxs(vr,{spacing:"6px",sx:{width:"184px",backgroundColor:e,alignItems:"center",justifyContent:"center",opacity:"0.9"},children:[s.jsx(vr,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:"white"},children:t}),s.jsx(E.Typography,{height:"22px",sx:{fontSize:"15px",color:"white"},ref:l,children:r()})]}),s.jsx(E.Button,{onPointerDown:c,onPointerUp:a,onPointerOut:a,disabled:o,sx:{width:"105px",backgroundColor:e,color:"white",alignContent:"center",fontSize:"37px",borderRadius:"0px 16px 16px 0px",":hover":{color:"white",backgroundColor:e}},children:"+"})]})}));var No={},Ba={};function ep(e){return un("MuiSvgIcon",e)}Pl("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const tp=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],rp=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${Oe(t)}`,`fontSize${Oe(r)}`]};return Mo(a,ep,n)},np=Pt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Oe(r.color)}`],t[`fontSize${Oe(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,a,o,i,l,u,c,d,h,m,v,y;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(n=r.create)==null?void 0:n.call(r,"fill",{duration:(a=e.transitions)==null||(a=a.duration)==null?void 0:a.shorter}),fontSize:{inherit:"inherit",small:((o=e.typography)==null||(i=o.pxToRem)==null?void 0:i.call(o,20))||"1.25rem",medium:((l=e.typography)==null||(u=l.pxToRem)==null?void 0:u.call(l,24))||"1.5rem",large:((c=e.typography)==null||(d=c.pxToRem)==null?void 0:d.call(c,35))||"2.1875rem"}[t.fontSize],color:(h=(m=(e.vars||e).palette)==null||(m=m[t.color])==null?void 0:m.main)!=null?h:{action:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.active,disabled:(y=(e.vars||e).palette)==null||(y=y.action)==null?void 0:y.disabled,inherit:void 0}[t.color]}}),zn=N.forwardRef(function(t,r){const n=$o({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:i="inherit",component:l="svg",fontSize:u="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:h,viewBox:m="0 0 24 24"}=n,v=Ue(n,tp),y=N.isValidElement(a)&&a.type==="svg",_=A({},n,{color:i,component:l,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:m,hasSvgAsChild:y}),g={};d||(g.viewBox=m);const x=rp(_);return s.jsxs(np,A({as:l,className:yt(x.root,o),focusable:"false",color:c,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:r},g,v,y&&a.props,{ownerState:_,children:[y?a.props.children:a,h?s.jsx("title",{children:h}):null]}))});process.env.NODE_ENV!=="production"&&(zn.propTypes={children:f.node,classes:f.object,className:f.string,color:f.oneOfType([f.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),f.string]),component:f.elementType,fontSize:f.oneOfType([f.oneOf(["inherit","large","medium","small"]),f.string]),htmlColor:f.string,inheritViewBox:f.bool,shapeRendering:f.string,sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object]),titleAccess:f.string,viewBox:f.string});zn.muiName="SvgIcon";function ap(e,t){function r(n,a){return s.jsx(zn,A({"data-testid":`${t}Icon`,ref:a},n,{children:e}))}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=zn.muiName,N.memo(N.forwardRef(r))}const op={configure:e=>{process.env.NODE_ENV!=="production"&&console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join(`
|
|
83
|
-
`)),Cl.configure(e)}},sp=Object.freeze(Object.defineProperty({__proto__:null,capitalize:Oe,createChainedFunction:mf,createSvgIcon:ap,debounce:hf,deprecatedPropType:ff,isMuiElement:pf,ownerDocument:_r,ownerWindow:gf,requirePropFactory:yf,setRef:Il,unstable_ClassNameGenerator:op,unstable_useEnhancedEffect:Oo,unstable_useId:vf,unsupportedProp:bf,useControlled:El,useEventCallback:Tn,useForkRef:Vn,useIsFocusVisible:kl},Symbol.toStringTag,{value:"Module"})),ip=At(sp);var Xs;function Vl(){return Xs||(Xs=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=ip}(Ba)),Ba}var lp=fa;Object.defineProperty(No,"__esModule",{value:!0});var Gl=No.default=void 0,up=lp(Vl()),cp=s;Gl=No.default=(0,up.default)((0,cp.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");var Fo={},dp=fa;Object.defineProperty(Fo,"__esModule",{value:!0});var zl=Fo.default=void 0,mp=dp(Vl()),hp=s;zl=Fo.default=(0,mp.default)((0,hp.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function Xt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Wl=typeof global=="object"&&global&&global.Object===Object&&global,fp=typeof self=="object"&&self&&self.Object===Object&&self,bt=Wl||fp||Function("return this")(),Ua=function(){return bt.Date.now()},pp=/\s/;function gp(e){for(var t=e.length;t--&&pp.test(e.charAt(t)););return t}var yp=/^\s+/;function _p(e){return e&&e.slice(0,gp(e)+1).replace(yp,"")}var Dt=bt.Symbol,Kl=Object.prototype,vp=Kl.hasOwnProperty,bp=Kl.toString,Ur=Dt?Dt.toStringTag:void 0;function Sp(e){var t=vp.call(e,Ur),r=e[Ur];try{e[Ur]=void 0;var n=!0}catch{}var a=bp.call(e);return n&&(t?e[Ur]=r:delete e[Ur]),a}var xp=Object.prototype,wp=xp.toString;function jp(e){return wp.call(e)}var Rp="[object Null]",Cp="[object Undefined]",Ys=Dt?Dt.toStringTag:void 0;function Qt(e){return e==null?e===void 0?Cp:Rp:Ys&&Ys in Object(e)?Sp(e):jp(e)}function Yt(e){return e!=null&&typeof e=="object"}var Ap="[object Symbol]";function pa(e){return typeof e=="symbol"||Yt(e)&&Qt(e)==Ap}var Zs=NaN,Pp=/^[-+]0x[0-9a-f]+$/i,Op=/^0b[01]+$/i,Tp=/^0o[0-7]+$/i,Mp=parseInt;function Qs(e){if(typeof e=="number")return e;if(pa(e))return Zs;if(Xt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Xt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=_p(e);var r=Op.test(e);return r||Tp.test(e)?Mp(e.slice(2),r?2:8):Pp.test(e)?Zs:+e}var Ip="Expected a function",Ep=Math.max,kp=Math.min;function Lp(e,t,r){var n,a,o,i,l,u,c=0,d=!1,h=!1,m=!0;if(typeof e!="function")throw new TypeError(Ip);t=Qs(t)||0,Xt(r)&&(d=!!r.leading,h="maxWait"in r,o=h?Ep(Qs(r.maxWait)||0,t):o,m="trailing"in r?!!r.trailing:m);function v(P){var O=n,z=a;return n=a=void 0,c=P,i=e.apply(z,O),i}function y(P){return c=P,l=setTimeout(x,t),d?v(P):i}function _(P){var O=P-u,z=P-c,le=t-O;return h?kp(le,o-z):le}function g(P){var O=P-u,z=P-c;return u===void 0||O>=t||O<0||h&&z>=o}function x(){var P=Ua();if(g(P))return j(P);l=setTimeout(x,_(P))}function j(P){return l=void 0,m&&n?v(P):(n=a=void 0,i)}function C(){l!==void 0&&clearTimeout(l),c=0,n=u=a=l=void 0}function L(){return l===void 0?i:j(Ua())}function R(){var P=Ua(),O=g(P);if(n=arguments,a=this,u=P,O){if(l===void 0)return y(u);if(h)return clearTimeout(l),l=setTimeout(x,t),v(u)}return l===void 0&&(l=setTimeout(x,t)),i}return R.cancel=C,R.flush=L,R}var $p="Expected a function";function Np(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError($p);return Xt(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),Lp(e,t,{leading:n,maxWait:t,trailing:a})}const Hl=en(De.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:a,disabled:o,...i})=>{const{t:l}=vt.useTranslation(),[u,c]=Z.useState(),d=De.useLocalObservable(()=>({activeJoggingDir:null,startJogging(x){this.activeJoggingDir=x,e(x)},stopJogging(){this.activeJoggingDir=null,t()}})),h=Np(()=>{c(a())},50);wr(h);function m(x){x.button===0&&d.startJogging("-")}function v(x){x.button===0&&d.startJogging("+")}function y(x){d.stopJogging()}function _(x){x.target===x.currentTarget&&d.stopJogging()}function g(x,j=1){if(x===void 0||isNaN(x))return"";const C=l("General.degree.variable",{amount:x.toFixed(j)});return x>0&&j===0?`+${C}`:C}return s.jsxs(vr,{height:"64px",width:"100%",maxWidth:"300px",direction:"row",...i,sx:{"& .MuiIconButton-root":{width:"52px",color:"white",alignContent:"center",backgroundColor:"#38445A","&:disabled":{opacity:.5,backgroundColor:"#38445A"},"& svg":{width:"42px",height:"42px"}}},children:[s.jsx(E.IconButton,{onPointerDown:m,onPointerUp:y,onPointerOut:_,disabled:o,sx:{borderRadius:"16px 0px 0px 16px",backgroundColor:d.activeJoggingDir==="-"?"#495975":void 0},children:s.jsx(Gl,{})}),s.jsxs(vr,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:"4px",borderBottomWidth:"4px",backgroundColor:"#38445A",borderColor:"#38445A",paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[s.jsx(E.Typography,{sx:{fontSize:"15px",position:"relative",top:"5px",color:"white"},children:g(u)}),s.jsx(E.Slider,{disabled:!0,"aria-label":"Joint position",min:r,max:n,value:u||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"10px",borderRadius:"2px"},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:"white"},"& .MuiSlider-rail":{backgroundColor:"#1F283A",opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:g(r,0)},{value:n,label:g(n,0)}]})]}),s.jsx(E.IconButton,{onPointerDown:v,onPointerUp:y,onPointerOut:_,disabled:o,sx:{borderRadius:"0px 16px 16px 0px",backgroundColor:d.activeJoggingDir==="+"?"#495975 !important":"#38445A"},children:s.jsx(zl,{})})]})})),Fp=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:25,height:24,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeWidth:1.5,d:"M18.5 12a6 6 0 1 0-6 6"}),N.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m16.5 11 2 2.5 2-2.5"})),Dp=Z.forwardRef(Fp),Bp=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),Up=Z.forwardRef(Bp),Jp=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),Vp=Z.forwardRef(Jp),Gp=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M9.522 14.811A.899.899 0 1 0 8.25 13.54L6.19 15.601V3.16L8.25 5.221A.9.9 0 0 0 9.522 3.95L5.926.354a.9.9 0 0 0-1.272 0L1.058 3.95a.9.9 0 1 0 1.271 1.271L4.391 3.16v12.442L2.329 13.54a.899.899 0 1 0-1.271 1.271l3.596 3.597a.9.9 0 0 0 1.272 0z",clipRule:"evenodd"})),zp=Z.forwardRef(Gp),Wp=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:21,height:21,fill:"none",viewBox:"0 0 23 22",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"currentColor",d:"m21.71 16.262-1.09.346.66 2.071-2.923-1.461V9.857l-6.285-3.143V2.893L13.38 4.21l.812-.806-2.674-2.69-2.706 2.687.805.812L10.93 2.91v3.803L4.643 9.857v7.36l-2.914 1.458.657-2.067-1.09-.346-1.225 3.88 3.826 1.144.346-1.09-1.836-.583 2.874-1.436 6.22 3.109 6.217-3.11 2.877 1.439-1.831.581.345 1.09 3.82-1.143zM11.5 12.646l-4.94-2.47 4.94-2.47 4.94 2.47zm.572.993 5.143-2.572v6.083l-5.143 2.572zm-6.286-2.572 5.143 2.572v6.083L5.786 17.15z"})),Kp=Z.forwardRef(Wp),Hp=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:17,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"currentColor",d:"M12.9 7.667c-.133-.534-.533-1-1-1.134L10.367 6l-.4 1.267L11.5 7.8c.067 0 .133.067.133.2l1.067 4.867a.32.32 0 0 1-.133.4l-2.267 1.8c-.267.2-.333.666-.133.933s.666.333.933.133l2.267-1.8c.533-.4.733-1.133.6-1.733zM12.5 0H1.833A1.65 1.65 0 0 0 .167 1.667v1.4c0 .866.733 1.6 1.666 1.6h10.734c.866 0 1.6-.734 1.6-1.667V1.667A1.65 1.65 0 0 0 12.5 0M1.633 12.8 2.7 8c0-.067.067-.133.133-.2l1.534-.533-.4-1.2-1.534.466c-.533.2-.933.6-1 1.134L.367 12.533c-.134.667.066 1.334.6 1.734l2.266 1.8c.267.266.734.2.934-.067s.2-.733-.134-.933l-2.266-1.8c-.134-.134-.2-.267-.134-.467"})),qp=Z.forwardRef(Hp),Xp=De.observer(({store:e})=>{var n;const{t}=vt.useTranslation();function r(a,o){(o==="coordsys"||o==="tool")&&e.setSelectedOrientation(o)}return s.jsxs(s.Fragment,{children:[s.jsxs(E.Stack,{direction:"row",alignItems:"center",spacing:2,sx:{padding:"8px 16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:[s.jsxs(E.Stack,{width:"50%",children:[s.jsx(E.InputLabel,{id:"jogging-coord-select",children:"Coordinate Sys."}),s.jsx(E.Select,{labelId:"jogging-coord-select",value:e.selectedCoordSystemId,displayEmpty:!0,onChange:a=>{e.setSelectedCoordSystemId(a.target.value)},disabled:e.isLocked,children:e.coordSystems.map(a=>s.jsx(E.MenuItem,{value:a.coordinate_system,children:a.name||a.coordinate_system},a.coordinate_system))})]}),s.jsxs(E.Stack,{width:"50%",children:[s.jsx(E.InputLabel,{id:"jogging-tcp-select",children:"TCP"}),s.jsx(E.Select,{labelId:"jogging-tcp-select",value:e.selectedTcpId,onChange:a=>{e.setSelectedTcpId(a.target.value)},disabled:e.isLocked,children:e.tcps.map(a=>s.jsx(E.MenuItem,{value:a.id,children:a.id},a.id))})]})]}),s.jsxs(E.Stack,{direction:"row",alignItems:"center",spacing:2,sx:{padding:"8px 16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:[s.jsxs(E.Stack,{width:"35%",children:[s.jsx(E.InputLabel,{id:"orientation-select",children:t("Jogging.Cartesian.Orientation.lb")}),s.jsxs(E.ToggleButtonGroup,{value:e.selectedOrientation,onChange:r,exclusive:!0,"aria-labelledby":"orientation-select",disabled:e.isLocked,children:[s.jsx(E.ToggleButton,{value:"coordsys",children:s.jsx(Kp,{})}),s.jsx(E.ToggleButton,{value:"tool",children:s.jsx(qp,{})})]})]}),s.jsxs(E.Stack,{width:"65%",children:[s.jsx(E.InputLabel,{id:"jogging-increment-select",children:"Increment"}),s.jsxs(E.Select,{labelId:"jogging-increment-select",value:((n=e.activeDiscreteIncrement)==null?void 0:n.id)||"continuous",onChange:a=>{e.setSelectedIncrementId(a.target.value)},disabled:e.isLocked,children:[s.jsx(E.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(a=>s.jsx(E.MenuItem,{value:a.id,children:e.currentMotionType==="translate"?`${a.mm}mm`:`${a.degrees}°`},a.id))]})]})]})]})});function Yp(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const Zp=2;function ql(e,t){return e-t}function ei(e,t){var r;const{index:n}=(r=e.reduce((a,o,i)=>{const l=Math.abs(t-o);return a===null||l<a.distance||l===a.distance?{distance:l,index:i}:a},null))!=null?r:{};return n}function _n(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const a=r.changedTouches[n];if(a.identifier===t.current)return{x:a.clientX,y:a.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Wn(e,t,r){return(e-t)*100/(r-t)}function Qp(e,t,r){return(r-t)*e+t}function eg(e){if(Math.abs(e)<1){const r=e.toExponential().split("e-"),n=r[0].split(".")[1];return(n?n.length:0)+parseInt(r[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function tg(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(eg(t)))}function ti({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(ql)}function vn({sliderRef:e,activeIndex:t,setActive:r}){var n,a;const o=_r(e.current);if(!((n=e.current)!=null&&n.contains(o.activeElement))||Number(o==null||(a=o.activeElement)==null?void 0:a.getAttribute("data-index"))!==t){var i;(i=e.current)==null||i.querySelector(`[type="range"][data-index="${t}"]`).focus()}r&&r(t)}function bn(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?Yp(e,t):!1}const rg={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}%`})}},ng=e=>e;let Sn;function ri(){return Sn===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Sn=CSS.supports("touch-action","none"):Sn=!0),Sn}function ag(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:o=!1,marks:i=!1,max:l=100,min:u=0,name:c,onChange:d,onChangeCommitted:h,orientation:m="horizontal",rootRef:v,scale:y=ng,step:_=1,shiftStep:g=10,tabIndex:x,value:j}=e,C=N.useRef(),[L,R]=N.useState(-1),[P,O]=N.useState(-1),[z,le]=N.useState(!1),ce=N.useRef(0),[D,q]=El({controlled:j,default:r??u,name:"Slider"}),G=d&&((T,k,F)=>{const W=T.nativeEvent||T,Y=new W.constructor(W.type,W);Object.defineProperty(Y,"target",{writable:!0,value:{value:k,name:c}}),d(Y,k,F)}),X=Array.isArray(D);let H=X?D.slice().sort(ql):[D];H=H.map(T=>T==null?u:fr(T,u,l));const we=i===!0&&_!==null?[...Array(Math.floor((l-u)/_)+1)].map((T,k)=>({value:u+_*k})):i||[],ue=we.map(T=>T.value),{isFocusVisibleRef:Q,onBlur:Ae,onFocus:Ee,ref:at}=kl(),[St,He]=N.useState(-1),je=N.useRef(),Mt=Vn(at,je),ut=Vn(v,Mt),qe=T=>k=>{var F;const W=Number(k.currentTarget.getAttribute("data-index"));Ee(k),Q.current===!0&&He(W),O(W),T==null||(F=T.onFocus)==null||F.call(T,k)},Je=T=>k=>{var F;Ae(k),Q.current===!1&&He(-1),O(-1),T==null||(F=T.onBlur)==null||F.call(T,k)},ct=(T,k)=>{const F=Number(T.currentTarget.getAttribute("data-index")),W=H[F],Y=ue.indexOf(W);let K=k;if(we&&_==null){const Ge=ue[ue.length-1];K>Ge?K=Ge:K<ue[0]?K=ue[0]:K=K<W?ue[Y-1]:ue[Y+1]}if(K=fr(K,u,l),X){a&&(K=fr(K,H[F-1]||-1/0,H[F+1]||1/0));const Ge=K;K=ti({values:H,newValue:K,index:F});let Xe=F;a||(Xe=K.indexOf(Ge)),vn({sliderRef:je,activeIndex:Xe})}q(K),He(F),G&&!bn(K,D)&&G(T,K,F),h&&h(T,K)},dt=T=>k=>{var F;if(_!==null){const W=Number(k.currentTarget.getAttribute("data-index")),Y=H[W];let K=null;(k.key==="ArrowLeft"||k.key==="ArrowDown")&&k.shiftKey||k.key==="PageDown"?K=Math.max(Y-g,u):((k.key==="ArrowRight"||k.key==="ArrowUp")&&k.shiftKey||k.key==="PageUp")&&(K=Math.min(Y+g,l)),K!==null&&(ct(k,K),k.preventDefault())}T==null||(F=T.onKeyDown)==null||F.call(T,k)};Oo(()=>{if(n&&je.current.contains(document.activeElement)){var T;(T=document.activeElement)==null||T.blur()}},[n]),n&&L!==-1&&R(-1),n&&St!==-1&&He(-1);const Ut=T=>k=>{var F;(F=T.onChange)==null||F.call(T,k),ct(k,k.target.valueAsNumber)},xt=N.useRef();let Ve=m;o&&m==="horizontal"&&(Ve+="-reverse");const M=({finger:T,move:k=!1})=>{const{current:F}=je,{width:W,height:Y,bottom:K,left:Ge}=F.getBoundingClientRect();let Xe;Ve.indexOf("vertical")===0?Xe=(K-T.y)/Y:Xe=(T.x-Ge)/W,Ve.indexOf("-reverse")!==-1&&(Xe=1-Xe);let te;if(te=Qp(Xe,u,l),_)te=tg(te,_,u);else{const kt=ei(ue,te);te=ue[kt]}te=fr(te,u,l);let $e=0;if(X){k?$e=xt.current:$e=ei(H,te),a&&(te=fr(te,H[$e-1]||-1/0,H[$e+1]||1/0));const kt=te;te=ti({values:H,newValue:te,index:$e}),a&&k||($e=te.indexOf(kt),xt.current=$e)}return{newValue:te,activeIndex:$e}},ee=Tn(T=>{const k=_n(T,C);if(!k)return;if(ce.current+=1,T.type==="mousemove"&&T.buttons===0){fe(T);return}const{newValue:F,activeIndex:W}=M({finger:k,move:!0});vn({sliderRef:je,activeIndex:W,setActive:R}),q(F),!z&&ce.current>Zp&&le(!0),G&&!bn(F,D)&&G(T,F,W)}),fe=Tn(T=>{const k=_n(T,C);if(le(!1),!k)return;const{newValue:F}=M({finger:k,move:!0});R(-1),T.type==="touchend"&&O(-1),h&&h(T,F),C.current=void 0,Le()}),ke=Tn(T=>{if(n)return;ri()||T.preventDefault();const k=T.changedTouches[0];k!=null&&(C.current=k.identifier);const F=_n(T,C);if(F!==!1){const{newValue:Y,activeIndex:K}=M({finger:F});vn({sliderRef:je,activeIndex:K,setActive:R}),q(Y),G&&!bn(Y,D)&&G(T,Y,K)}ce.current=0;const W=_r(je.current);W.addEventListener("touchmove",ee,{passive:!0}),W.addEventListener("touchend",fe,{passive:!0})}),Le=N.useCallback(()=>{const T=_r(je.current);T.removeEventListener("mousemove",ee),T.removeEventListener("mouseup",fe),T.removeEventListener("touchmove",ee),T.removeEventListener("touchend",fe)},[fe,ee]);N.useEffect(()=>{const{current:T}=je;return T.addEventListener("touchstart",ke,{passive:ri()}),()=>{T.removeEventListener("touchstart",ke),Le()}},[Le,ke]),N.useEffect(()=>{n&&Le()},[n,Le]);const It=T=>k=>{var F;if((F=T.onMouseDown)==null||F.call(T,k),n||k.defaultPrevented||k.button!==0)return;k.preventDefault();const W=_n(k,C);if(W!==!1){const{newValue:K,activeIndex:Ge}=M({finger:W});vn({sliderRef:je,activeIndex:Ge,setActive:R}),q(K),G&&!bn(K,D)&&G(k,K,Ge)}ce.current=0;const Y=_r(je.current);Y.addEventListener("mousemove",ee,{passive:!0}),Y.addEventListener("mouseup",fe)},Re=Wn(X?H[0]:u,u,l),Et=Wn(H[H.length-1],u,l)-Re,Jt=(T={})=>{const k=Mn(T),F={onMouseDown:It(k||{})},W=A({},k,F);return A({},T,{ref:ut},W)},Ar=T=>k=>{var F;(F=T.onMouseOver)==null||F.call(T,k);const W=Number(k.currentTarget.getAttribute("data-index"));O(W)},Pr=T=>k=>{var F;(F=T.onMouseLeave)==null||F.call(T,k),O(-1)};return{active:L,axis:Ve,axisProps:rg,dragging:z,focusedThumbIndex:St,getHiddenInputProps:(T={})=>{var k;const F=Mn(T),W={onChange:Ut(F||{}),onFocus:qe(F||{}),onBlur:Je(F||{}),onKeyDown:dt(F||{})},Y=A({},F,W);return A({tabIndex:x,"aria-labelledby":t,"aria-orientation":m,"aria-valuemax":y(l),"aria-valuemin":y(u),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(k=e.step)!=null?k:void 0,disabled:n},T,Y,{style:A({},Pf,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Jt,getThumbProps:(T={})=>{const k=Mn(T),F={onMouseOver:Ar(k||{}),onMouseLeave:Pr(k||{})};return A({},T,k,F)},marks:we,open:P,range:X,rootRef:ut,trackLeap:Et,trackOffset:Re,values:H,getThumbStyle:T=>({pointerEvents:L!==-1&&L!==T?"none":void 0})}}const og=e=>!e||!Gr(e);function sg(e){return un("MuiSlider",e)}const et=Pl("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"]),ig=e=>{const{open:t}=e;return{offset:yt(t&&et.valueLabelOpen),circle:et.valueLabelCircle,label:et.valueLabelLabel}};function Xl(e){const{children:t,className:r,value:n}=e,a=ig(e);return t?N.cloneElement(t,{className:yt(t.props.className)},s.jsxs(N.Fragment,{children:[t.props.children,s.jsx("span",{className:yt(a.offset,r),"aria-hidden":!0,children:s.jsx("span",{className:a.circle,children:s.jsx("span",{className:a.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(Xl.propTypes={children:f.element.isRequired,className:f.string,value:f.node});const lg=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function ni(e){return e}const ug=Pt("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${Oe(r.color)}`],r.size!=="medium"&&t[`size${Oe(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(({theme:e})=>{var t;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${et.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${et.dragging}`]:{[`& .${et.thumb}, & .${et.track}`]:{transition:"none"}},variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(r=>{var n;return((n=e.vars)!=null?n:e).palette[r].main}).map(r=>({props:{color:r},style:{color:(e.vars||e).palette[r].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}}]}}),cg=Pt("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.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}}]}),dg=Pt("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>{var t;return{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.keys(((t=e.vars)!=null?t:e).palette).filter(r=>{var n;return((n=e.vars)!=null?n:e).palette[r].main}).map(r=>({props:{color:r,track:"inverted"},style:A({},e.vars?{backgroundColor:e.vars.palette.Slider[`${r}Track`],borderColor:e.vars.palette.Slider[`${r}Track`]}:A({backgroundColor:io(e.palette[r].main,.62),borderColor:io(e.palette[r].main,.62)},e.applyStyles("dark",{backgroundColor:so(e.palette[r].main,.5)}),e.applyStyles("dark",{borderColor:so(e.palette[r].main,.5)})))}))]}}),mg=Pt("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${Oe(r.color)}`],r.size!=="medium"&&t[`thumbSize${Oe(r.size)}`]]}})(({theme:e})=>{var t;return{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%)"},[`&.${et.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.keys(((t=e.vars)!=null?t:e).palette).filter(r=>{var n;return((n=e.vars)!=null?n:e).palette[r].main}).map(r=>({props:{color:r},style:{[`&:hover, &.${et.focusVisible}`]:A({},e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[r].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Js(e.palette[r].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${et.active}`]:A({},e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[r].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Js(e.palette[r].main,.16)}`})}}))]}}),hg=Pt(Xl,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e})=>A({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%"},[`&.${et.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%"},[`&.${et.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"}}]})),fg=Pt("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Lo(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(({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}}]})),pg=Pt("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Lo(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e})=>A({},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}}]})),gg=e=>{const{disabled:t,dragging:r,marked:n,orientation:a,track:o,classes:i,color:l,size:u}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",a==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",l&&`color${Oe(l)}`,u&&`size${Oe(u)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",u&&`thumbSize${Oe(u)}`,l&&`thumbColor${Oe(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Mo(c,sg,i)},yg=({children:e})=>e,Yl=N.forwardRef(function(t,r){var n,a,o,i,l,u,c,d,h,m,v,y,_,g,x,j,C,L,R,P,O,z,le,ce;const D=$o({props:t,name:"MuiSlider"}),q=kf(),{"aria-label":G,"aria-valuetext":X,"aria-labelledby":H,component:we="span",components:ue={},componentsProps:Q={},color:Ae="primary",classes:Ee,className:at,disableSwap:St=!1,disabled:He=!1,getAriaLabel:je,getAriaValueText:Mt,marks:ut=!1,max:qe=100,min:Je=0,orientation:ct="horizontal",shiftStep:dt=10,size:Ut="medium",step:xt=1,scale:Ve=ni,slotProps:M,slots:ee,track:fe="normal",valueLabelDisplay:ke="off",valueLabelFormat:Le=ni}=D,It=Ue(D,lg),Re=A({},D,{isRtl:q,max:qe,min:Je,classes:Ee,disabled:He,disableSwap:St,orientation:ct,marks:ut,color:Ae,size:Ut,step:xt,shiftStep:dt,scale:Ve,track:fe,valueLabelDisplay:ke,valueLabelFormat:Le}),{axisProps:Et,getRootProps:Jt,getHiddenInputProps:Ar,getThumbProps:Pr,open:Or,active:rr,axis:ot,focusedThumbIndex:T,range:k,dragging:F,marks:W,values:Y,trackOffset:K,trackLeap:Ge,getThumbStyle:Xe}=ag(A({},Re,{rootRef:r}));Re.marked=W.length>0&&W.some($=>$.label),Re.dragging=F,Re.focusedThumbIndex=T;const te=gg(Re),$e=(n=(a=ee==null?void 0:ee.root)!=null?a:ue.Root)!=null?n:ug,kt=(o=(i=ee==null?void 0:ee.rail)!=null?i:ue.Rail)!=null?o:cg,nr=(l=(u=ee==null?void 0:ee.track)!=null?u:ue.Track)!=null?l:dg,Tr=(c=(d=ee==null?void 0:ee.thumb)!=null?d:ue.Thumb)!=null?c:mg,wt=(h=(m=ee==null?void 0:ee.valueLabel)!=null?m:ue.ValueLabel)!=null?h:hg,Vt=(v=(y=ee==null?void 0:ee.mark)!=null?y:ue.Mark)!=null?v:fg,Gt=(_=(g=ee==null?void 0:ee.markLabel)!=null?g:ue.MarkLabel)!=null?_:pg,Mr=(x=(j=ee==null?void 0:ee.input)!=null?j:ue.Input)!=null?x:"input",Ir=(C=M==null?void 0:M.root)!=null?C:Q.root,dn=(L=M==null?void 0:M.rail)!=null?L:Q.rail,Er=(R=M==null?void 0:M.track)!=null?R:Q.track,ar=(P=M==null?void 0:M.thumb)!=null?P:Q.thumb,or=(O=M==null?void 0:M.valueLabel)!=null?O:Q.valueLabel,ba=(z=M==null?void 0:M.mark)!=null?z:Q.mark,Sa=(le=M==null?void 0:M.markLabel)!=null?le:Q.markLabel,mn=(ce=M==null?void 0:M.input)!=null?ce:Q.input,hn=$t({elementType:$e,getSlotProps:Jt,externalSlotProps:Ir,externalForwardedProps:It,additionalProps:A({},og($e)&&{as:we}),ownerState:A({},Re,Ir==null?void 0:Ir.ownerState),className:[te.root,at]}),xa=$t({elementType:kt,externalSlotProps:dn,ownerState:Re,className:te.rail}),wa=$t({elementType:nr,externalSlotProps:Er,additionalProps:{style:A({},Et[ot].offset(K),Et[ot].leap(Ge))},ownerState:A({},Re,Er==null?void 0:Er.ownerState),className:te.track}),kr=$t({elementType:Tr,getSlotProps:Pr,externalSlotProps:ar,ownerState:A({},Re,ar==null?void 0:ar.ownerState),className:te.thumb}),ja=$t({elementType:wt,externalSlotProps:or,ownerState:A({},Re,or==null?void 0:or.ownerState),className:te.valueLabel}),p=$t({elementType:Vt,externalSlotProps:ba,ownerState:Re,className:te.mark}),w=$t({elementType:Gt,externalSlotProps:Sa,ownerState:Re,className:te.markLabel}),I=$t({elementType:Mr,getSlotProps:Ar,externalSlotProps:mn,ownerState:Re});return s.jsxs($e,A({},hn,{children:[s.jsx(kt,A({},xa)),s.jsx(nr,A({},wa)),W.filter($=>$.value>=Je&&$.value<=qe).map(($,B)=>{const re=Wn($.value,Je,qe),V=Et[ot].offset(re);let U;return fe===!1?U=Y.indexOf($.value)!==-1:U=fe==="normal"&&(k?$.value>=Y[0]&&$.value<=Y[Y.length-1]:$.value<=Y[0])||fe==="inverted"&&(k?$.value<=Y[0]||$.value>=Y[Y.length-1]:$.value>=Y[0]),s.jsxs(N.Fragment,{children:[s.jsx(Vt,A({"data-index":B},p,!Gr(Vt)&&{markActive:U},{style:A({},V,p.style),className:yt(p.className,U&&te.markActive)})),$.label!=null?s.jsx(Gt,A({"aria-hidden":!0,"data-index":B},w,!Gr(Gt)&&{markLabelActive:U},{style:A({},V,w.style),className:yt(te.markLabel,w.className,U&&te.markLabelActive),children:$.label})):null]},B)}),Y.map(($,B)=>{const re=Wn($,Je,qe),V=Et[ot].offset(re),U=ke==="off"?yg:wt;return s.jsx(U,A({},!Gr(U)&&{valueLabelFormat:Le,valueLabelDisplay:ke,value:typeof Le=="function"?Le(Ve($),B):Le,index:B,open:Or===B||rr===B||ke==="on",disabled:He},ja,{children:s.jsx(Tr,A({"data-index":B},kr,{className:yt(te.thumb,kr.className,rr===B&&te.active,T===B&&te.focusVisible),style:A({},V,Xe(B),kr.style),children:s.jsx(Mr,A({"data-index":B,"aria-label":je?je(B):G,"aria-valuenow":Ve($),"aria-labelledby":H,"aria-valuetext":Mt?Mt(Ve($),B):X,value:Y[B]},I))}))}),B)})]}))});process.env.NODE_ENV!=="production"&&(Yl.propTypes={"aria-label":ks(f.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":f.string,"aria-valuetext":ks(f.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:f.node,classes:f.object,className:f.string,color:f.oneOfType([f.oneOf(["primary","secondary","error","info","success","warning"]),f.string]),components:f.shape({Input:f.elementType,Mark:f.elementType,MarkLabel:f.elementType,Rail:f.elementType,Root:f.elementType,Thumb:f.elementType,Track:f.elementType,ValueLabel:f.elementType}),componentsProps:f.shape({input:f.oneOfType([f.func,f.object]),mark:f.oneOfType([f.func,f.object]),markLabel:f.oneOfType([f.func,f.object]),rail:f.oneOfType([f.func,f.object]),root:f.oneOfType([f.func,f.object]),thumb:f.oneOfType([f.func,f.object]),track:f.oneOfType([f.func,f.object]),valueLabel:f.oneOfType([f.func,f.shape({children:f.element,className:f.string,open:f.bool,style:f.object,value:f.number,valueLabelDisplay:f.oneOf(["auto","off","on"])})])}),defaultValue:f.oneOfType([f.arrayOf(f.number),f.number]),disabled:f.bool,disableSwap:f.bool,getAriaLabel:f.func,getAriaValueText:f.func,marks:f.oneOfType([f.arrayOf(f.shape({label:f.node,value:f.number.isRequired})),f.bool]),max:f.number,min:f.number,name:f.string,onChange:f.func,onChangeCommitted:f.func,orientation:f.oneOf(["horizontal","vertical"]),scale:f.func,shiftStep:f.number,size:f.oneOfType([f.oneOf(["small","medium"]),f.string]),slotProps:f.shape({input:f.oneOfType([f.func,f.object]),mark:f.oneOfType([f.func,f.object]),markLabel:f.oneOfType([f.func,f.object]),rail:f.oneOfType([f.func,f.object]),root:f.oneOfType([f.func,f.object]),thumb:f.oneOfType([f.func,f.object]),track:f.oneOfType([f.func,f.object]),valueLabel:f.oneOfType([f.func,f.shape({children:f.element,className:f.string,open:f.bool,style:f.object,value:f.number,valueLabelDisplay:f.oneOf(["auto","off","on"])})])}),slots:f.shape({input:f.elementType,mark:f.elementType,markLabel:f.elementType,rail:f.elementType,root:f.elementType,thumb:f.elementType,track:f.elementType,valueLabel:f.elementType}),step:f.number,sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object]),tabIndex:f.number,track:f.oneOf(["inverted","normal",!1]),value:f.oneOfType([f.arrayOf(f.number),f.number]),valueLabelDisplay:f.oneOf(["auto","off","on"]),valueLabelFormat:f.oneOfType([f.func,f.string])});var _g="[object Number]";function vg(e){return typeof e=="number"||Yt(e)&&Qt(e)==_g}const Zl=De.observer(e=>{const t=E.useTheme(),r=e.valueLabelFormat||(a=>`${a}`);function n(a,o){o===e.velocity||!vg(o)||e.onVelocityChange(o)}return s.jsxs(s.Fragment,{children:[s.jsx(E.Typography,{sx:{textAlign:"center",fontSize:"14px",opacity:.8,color:t.palette.text.primary},children:r(e.velocity)}),s.jsx(Yl,{value:e.velocity,onChange:n,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}})]})}),Ql=De.observer(({store:e})=>{const{t}=vt.useTranslation(),r=De.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?n=>`v=${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:n})}`:n=>`v=${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:n})}`}}));return s.jsx(E.Stack,{sx:{margin:"0px 20px",marginTop:"24px",marginBottom:"24px"},children:s.jsx(E.Stack,{sx:{width:"380px",maxWidth:"90%",margin:"auto"},children:s.jsx(Zl,{velocity:e.velocityInCurrentUnits,min:e.minVelocityInCurrentUnits,max:e.maxVelocityInCurrentUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,valueLabelFormat:r.valueLabelFormat})})})}),eu=Z.forwardRef(({label:e,value:t},r)=>s.jsxs(s.Fragment,{children:[e&&s.jsx(E.InputLabel,{children:e}),s.jsx(E.Chip,{ref:r,sx:{fontSize:"14px",opacity:.8,marginTop:"4px !important"},value:t})]})),bg=De.observer(({store:e})=>{const t=Z.useRef(null);function r(){const n=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose;return n?Ft.poseToWandelscriptString(n):""}return wr(()=>{t.current&&(t.current.textContent=r())}),s.jsx(E.Stack,{alignItems:"left",spacing:2,sx:{padding:"8px 16px",paddingTop:"16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:s.jsx(eu,{label:"Pose",value:r(),ref:t})})});function Sg(){this.__data__=[],this.size=0}function tu(e,t){return e===t||e!==e&&t!==t}function ga(e,t){for(var r=e.length;r--;)if(tu(e[r][0],t))return r;return-1}var xg=Array.prototype,wg=xg.splice;function jg(e){var t=this.__data__,r=ga(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():wg.call(t,r,1),--this.size,!0}function Rg(e){var t=this.__data__,r=ga(t,e);return r<0?void 0:t[r][1]}function Cg(e){return ga(this.__data__,e)>-1}function Ag(e,t){var r=this.__data__,n=ga(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ot(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ot.prototype.clear=Sg;Ot.prototype.delete=jg;Ot.prototype.get=Rg;Ot.prototype.has=Cg;Ot.prototype.set=Ag;function Pg(){this.__data__=new Ot,this.size=0}function Og(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Tg(e){return this.__data__.get(e)}function Mg(e){return this.__data__.has(e)}var Ig="[object AsyncFunction]",Eg="[object Function]",kg="[object GeneratorFunction]",Lg="[object Proxy]";function ru(e){if(!Xt(e))return!1;var t=Qt(e);return t==Eg||t==kg||t==Ig||t==Lg}var Ja=bt["__core-js_shared__"],ai=function(){var e=/[^.]+$/.exec(Ja&&Ja.keys&&Ja.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function $g(e){return!!ai&&ai in e}var Ng=Function.prototype,Fg=Ng.toString;function er(e){if(e!=null){try{return Fg.call(e)}catch{}try{return e+""}catch{}}return""}var Dg=/[\\^$.*+?()[\]{}|]/g,Bg=/^\[object .+?Constructor\]$/,Ug=Function.prototype,Jg=Object.prototype,Vg=Ug.toString,Gg=Jg.hasOwnProperty,zg=RegExp("^"+Vg.call(Gg).replace(Dg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Wg(e){if(!Xt(e)||$g(e))return!1;var t=ru(e)?zg:Bg;return t.test(er(e))}function Kg(e,t){return e==null?void 0:e[t]}function tr(e,t){var r=Kg(e,t);return Wg(r)?r:void 0}var Zr=tr(bt,"Map"),Qr=tr(Object,"create");function Hg(){this.__data__=Qr?Qr(null):{},this.size=0}function qg(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Xg="__lodash_hash_undefined__",Yg=Object.prototype,Zg=Yg.hasOwnProperty;function Qg(e){var t=this.__data__;if(Qr){var r=t[e];return r===Xg?void 0:r}return Zg.call(t,e)?t[e]:void 0}var ey=Object.prototype,ty=ey.hasOwnProperty;function ry(e){var t=this.__data__;return Qr?t[e]!==void 0:ty.call(t,e)}var ny="__lodash_hash_undefined__";function ay(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Qr&&t===void 0?ny:t,this}function Zt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Zt.prototype.clear=Hg;Zt.prototype.delete=qg;Zt.prototype.get=Qg;Zt.prototype.has=ry;Zt.prototype.set=ay;function oy(){this.size=0,this.__data__={hash:new Zt,map:new(Zr||Ot),string:new Zt}}function sy(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ya(e,t){var r=e.__data__;return sy(t)?r[typeof t=="string"?"string":"hash"]:r.map}function iy(e){var t=ya(this,e).delete(e);return this.size-=t?1:0,t}function ly(e){return ya(this,e).get(e)}function uy(e){return ya(this,e).has(e)}function cy(e,t){var r=ya(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Tt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Tt.prototype.clear=oy;Tt.prototype.delete=iy;Tt.prototype.get=ly;Tt.prototype.has=uy;Tt.prototype.set=cy;var dy=200;function my(e,t){var r=this.__data__;if(r instanceof Ot){var n=r.__data__;if(!Zr||n.length<dy-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Tt(n)}return r.set(e,t),this.size=r.size,this}function Ct(e){var t=this.__data__=new Ot(e);this.size=t.size}Ct.prototype.clear=Pg;Ct.prototype.delete=Og;Ct.prototype.get=Tg;Ct.prototype.has=Mg;Ct.prototype.set=my;var hy="__lodash_hash_undefined__";function fy(e){return this.__data__.set(e,hy),this}function py(e){return this.__data__.has(e)}function Kn(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Tt;++t<r;)this.add(e[t])}Kn.prototype.add=Kn.prototype.push=fy;Kn.prototype.has=py;function gy(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function yy(e,t){return e.has(t)}var _y=1,vy=2;function nu(e,t,r,n,a,o){var i=r&_y,l=e.length,u=t.length;if(l!=u&&!(i&&u>l))return!1;var c=o.get(e),d=o.get(t);if(c&&d)return c==t&&d==e;var h=-1,m=!0,v=r&vy?new Kn:void 0;for(o.set(e,t),o.set(t,e);++h<l;){var y=e[h],_=t[h];if(n)var g=i?n(_,y,h,t,e,o):n(y,_,h,e,t,o);if(g!==void 0){if(g)continue;m=!1;break}if(v){if(!gy(t,function(x,j){if(!yy(v,j)&&(y===x||a(y,x,r,n,o)))return v.push(j)})){m=!1;break}}else if(!(y===_||a(y,_,r,n,o))){m=!1;break}}return o.delete(e),o.delete(t),m}var oi=bt.Uint8Array;function by(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function Sy(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var xy=1,wy=2,jy="[object Boolean]",Ry="[object Date]",Cy="[object Error]",Ay="[object Map]",Py="[object Number]",Oy="[object RegExp]",Ty="[object Set]",My="[object String]",Iy="[object Symbol]",Ey="[object ArrayBuffer]",ky="[object DataView]",si=Dt?Dt.prototype:void 0,Va=si?si.valueOf:void 0;function Ly(e,t,r,n,a,o,i){switch(r){case ky:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ey:return!(e.byteLength!=t.byteLength||!o(new oi(e),new oi(t)));case jy:case Ry:case Py:return tu(+e,+t);case Cy:return e.name==t.name&&e.message==t.message;case Oy:case My:return e==t+"";case Ay:var l=by;case Ty:var u=n&xy;if(l||(l=Sy),e.size!=t.size&&!u)return!1;var c=i.get(e);if(c)return c==t;n|=wy,i.set(e,t);var d=nu(l(e),l(t),n,a,o,i);return i.delete(e),d;case Iy:if(Va)return Va.call(e)==Va.call(t)}return!1}function $y(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var _t=Array.isArray;function Ny(e,t,r){var n=t(e);return _t(e)?n:$y(n,r(e))}function Fy(e,t){for(var r=-1,n=e==null?0:e.length,a=0,o=[];++r<n;){var i=e[r];t(i,r,e)&&(o[a++]=i)}return o}function Dy(){return[]}var By=Object.prototype,Uy=By.propertyIsEnumerable,ii=Object.getOwnPropertySymbols,Jy=ii?function(e){return e==null?[]:(e=Object(e),Fy(ii(e),function(t){return Uy.call(e,t)}))}:Dy;function Vy(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Gy="[object Arguments]";function li(e){return Yt(e)&&Qt(e)==Gy}var au=Object.prototype,zy=au.hasOwnProperty,Wy=au.propertyIsEnumerable,ou=li(function(){return arguments}())?li:function(e){return Yt(e)&&zy.call(e,"callee")&&!Wy.call(e,"callee")};function Ky(){return!1}var su=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ui=su&&typeof module=="object"&&module&&!module.nodeType&&module,Hy=ui&&ui.exports===su,ci=Hy?bt.Buffer:void 0,qy=ci?ci.isBuffer:void 0,co=qy||Ky,Xy=9007199254740991,Yy=/^(?:0|[1-9]\d*)$/;function iu(e,t){var r=typeof e;return t=t??Xy,!!t&&(r=="number"||r!="symbol"&&Yy.test(e))&&e>-1&&e%1==0&&e<t}var Zy=9007199254740991;function Do(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Zy}var Qy="[object Arguments]",e1="[object Array]",t1="[object Boolean]",r1="[object Date]",n1="[object Error]",a1="[object Function]",o1="[object Map]",s1="[object Number]",i1="[object Object]",l1="[object RegExp]",u1="[object Set]",c1="[object String]",d1="[object WeakMap]",m1="[object ArrayBuffer]",h1="[object DataView]",f1="[object Float32Array]",p1="[object Float64Array]",g1="[object Int8Array]",y1="[object Int16Array]",_1="[object Int32Array]",v1="[object Uint8Array]",b1="[object Uint8ClampedArray]",S1="[object Uint16Array]",x1="[object Uint32Array]",de={};de[f1]=de[p1]=de[g1]=de[y1]=de[_1]=de[v1]=de[b1]=de[S1]=de[x1]=!0;de[Qy]=de[e1]=de[m1]=de[t1]=de[h1]=de[r1]=de[n1]=de[a1]=de[o1]=de[s1]=de[i1]=de[l1]=de[u1]=de[c1]=de[d1]=!1;function w1(e){return Yt(e)&&Do(e.length)&&!!de[Qt(e)]}function j1(e){return function(t){return e(t)}}var lu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zr=lu&&typeof module=="object"&&module&&!module.nodeType&&module,R1=zr&&zr.exports===lu,Ga=R1&&Wl.process,di=function(){try{var e=zr&&zr.require&&zr.require("util").types;return e||Ga&&Ga.binding&&Ga.binding("util")}catch{}}(),mi=di&&di.isTypedArray,uu=mi?j1(mi):w1,C1=Object.prototype,A1=C1.hasOwnProperty;function P1(e,t){var r=_t(e),n=!r&&ou(e),a=!r&&!n&&co(e),o=!r&&!n&&!a&&uu(e),i=r||n||a||o,l=i?Vy(e.length,String):[],u=l.length;for(var c in e)A1.call(e,c)&&!(i&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||iu(c,u)))&&l.push(c);return l}var O1=Object.prototype;function T1(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||O1;return e===r}function M1(e,t){return function(r){return e(t(r))}}var I1=M1(Object.keys,Object),E1=Object.prototype,k1=E1.hasOwnProperty;function L1(e){if(!T1(e))return I1(e);var t=[];for(var r in Object(e))k1.call(e,r)&&r!="constructor"&&t.push(r);return t}function cu(e){return e!=null&&Do(e.length)&&!ru(e)}function Bo(e){return cu(e)?P1(e):L1(e)}function hi(e){return Ny(e,Bo,Jy)}var $1=1,N1=Object.prototype,F1=N1.hasOwnProperty;function D1(e,t,r,n,a,o){var i=r&$1,l=hi(e),u=l.length,c=hi(t),d=c.length;if(u!=d&&!i)return!1;for(var h=u;h--;){var m=l[h];if(!(i?m in t:F1.call(t,m)))return!1}var v=o.get(e),y=o.get(t);if(v&&y)return v==t&&y==e;var _=!0;o.set(e,t),o.set(t,e);for(var g=i;++h<u;){m=l[h];var x=e[m],j=t[m];if(n)var C=i?n(j,x,m,t,e,o):n(x,j,m,e,t,o);if(!(C===void 0?x===j||a(x,j,r,n,o):C)){_=!1;break}g||(g=m=="constructor")}if(_&&!g){var L=e.constructor,R=t.constructor;L!=R&&"constructor"in e&&"constructor"in t&&!(typeof L=="function"&&L instanceof L&&typeof R=="function"&&R instanceof R)&&(_=!1)}return o.delete(e),o.delete(t),_}var mo=tr(bt,"DataView"),ho=tr(bt,"Promise"),fo=tr(bt,"Set"),po=tr(bt,"WeakMap"),fi="[object Map]",B1="[object Object]",pi="[object Promise]",gi="[object Set]",yi="[object WeakMap]",_i="[object DataView]",U1=er(mo),J1=er(Zr),V1=er(ho),G1=er(fo),z1=er(po),Nt=Qt;(mo&&Nt(new mo(new ArrayBuffer(1)))!=_i||Zr&&Nt(new Zr)!=fi||ho&&Nt(ho.resolve())!=pi||fo&&Nt(new fo)!=gi||po&&Nt(new po)!=yi)&&(Nt=function(e){var t=Qt(e),r=t==B1?e.constructor:void 0,n=r?er(r):"";if(n)switch(n){case U1:return _i;case J1:return fi;case V1:return pi;case G1:return gi;case z1:return yi}return t});var W1=1,vi="[object Arguments]",bi="[object Array]",xn="[object Object]",K1=Object.prototype,Si=K1.hasOwnProperty;function H1(e,t,r,n,a,o){var i=_t(e),l=_t(t),u=i?bi:Nt(e),c=l?bi:Nt(t);u=u==vi?xn:u,c=c==vi?xn:c;var d=u==xn,h=c==xn,m=u==c;if(m&&co(e)){if(!co(t))return!1;i=!0,d=!1}if(m&&!d)return o||(o=new Ct),i||uu(e)?nu(e,t,r,n,a,o):Ly(e,t,u,r,n,a,o);if(!(r&W1)){var v=d&&Si.call(e,"__wrapped__"),y=h&&Si.call(t,"__wrapped__");if(v||y){var _=v?e.value():e,g=y?t.value():t;return o||(o=new Ct),a(_,g,r,n,o)}}return m?(o||(o=new Ct),D1(e,t,r,n,a,o)):!1}function _a(e,t,r,n,a){return e===t?!0:e==null||t==null||!Yt(e)&&!Yt(t)?e!==e&&t!==t:H1(e,t,r,n,_a,a)}function q1(e,t){return _a(e,t)}const X1=({store:e})=>{const{t}=vt.useTranslation(),[r,n]=Z.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached);wr(()=>{const o=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;q1(r,o)||n(o)});const a=[];return r.forEach((o,i)=>{o&&a.push(i)}),a.length?s.jsx(E.Typography,{color:"error",sx:{padding:"1rem",textAlign:"center"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:a.map(o=>o+1).join(", ")})}):null},Y1=De.observer(({store:e})=>{const{t}=vt.useTranslation();function r(c,d){(d==="translate"||d==="rotate")&&e.setSelectedCartesianMotionType(d)}So(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}&response_coordinate_system=${e.selectedCoordSystemId}`))},{fireImmediately:!0});async function n(c,d){const h=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose,m=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position;h&&await e.withMotionLock(async()=>{await e.jogger.runIncrementalCartesianMotion({currentTcpPose:h,currentJoints:m,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.velocityInCurrentUnits,axis:c.axis,direction:c.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:d.mm}:{type:"rotate",distanceRads:Ft.degreesToRadians(d.degrees)}})})}async function a(c){if(!e.isLocked){if(e.activeDiscreteIncrement)return n(c,e.activeDiscreteIncrement);c.motionType==="translate"?await e.jogger.startTCPTranslation({axis:c.axis,direction:c.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:c.axis,direction:c.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function o(){e.isLocked||e.activeDiscreteIncrement||await e.jogger.stop()}const i=[{id:"x",color:"#F14D42",icon:s.jsx(Up,{})},{id:"y",color:"#42A705",icon:s.jsx(Vp,{})},{id:"z",color:"#0075FF",icon:s.jsx(zp,{})}];function l(c){return t("General.mm.variable",{amount:c.toFixed(1)})}function u(c){return t("General.degree.variable",{amount:Ft.radiansToDegrees(c).toFixed(1)})}return s.jsxs(E.Stack,{children:[s.jsx(bg,{store:e}),s.jsx(Xp,{store:e}),s.jsxs(E.Stack,{width:"80%",maxWidth:"296px",margin:"auto",marginTop:"16px",children:[s.jsxs(E.ToggleButtonGroup,{value:e.selectedCartesianMotionType,onChange:r,exclusive:!0,"aria-label":t("Jogging.Cartesian.MotionType.lb"),children:[s.jsx(E.ToggleButton,{value:"translate",children:t("Jogging.Cartesian.Translation.bt")}),s.jsx(E.ToggleButton,{value:"rotate",children:t("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&i.map(c=>s.jsx(uo,{color:c.color,disabled:e.isLocked,sx:{marginTop:"12px"},label:s.jsxs(s.Fragment,{children:[c.icon,s.jsx(E.Typography,{sx:{fontSize:"24px",color:"white"},children:c.id.toUpperCase()})]}),getDisplayedValue:()=>{var d;return l(((d=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:d.position[c.id])||0)},startJogging:d=>a({axis:c.id,motionType:"translate",direction:d}),stopJogging:o},c.id)),e.selectedCartesianMotionType==="rotate"&&i.map(c=>s.jsx(uo,{color:c.color,disabled:e.isLocked,sx:{marginTop:"12px"},label:s.jsxs(s.Fragment,{children:[s.jsx(Dp,{}),s.jsx(E.Typography,{sx:{fontSize:"24px",color:"white"},children:c.id.toUpperCase()})]}),getDisplayedValue:()=>{var d,h;return u(((h=(d=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:d.orientation)==null?void 0:h[c.id])||0)},startJogging:d=>a({axis:c.id,motionType:"rotate",direction:d}),stopJogging:o},c.id))]}),s.jsx(Ql,{store:e}),s.jsx(X1,{store:e})]})}),Z1=De.observer(({store:e})=>{const t=Z.useRef(null);vt.useTranslation();function r(){const{joints:n}=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position;return`[${n.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`}return wr(()=>{t.current&&(t.current.textContent=r())}),s.jsx(E.Stack,{alignItems:"left",spacing:2,sx:{padding:"16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:s.jsx(eu,{label:"Pose",value:r(),ref:t})})}),Q1=De.observer(({store:e})=>{async function t(n){await e.jogger.startJointRotation({joint:n.joint,direction:n.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function r(){await e.jogger.stop()}return s.jsxs(E.Stack,{children:[s.jsx(Z1,{store:e}),s.jsx(E.Stack,{children:e.jogger.motionStream.joints.map(n=>{var l;const a=(l=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:l[n.index],o=(a==null?void 0:a.lower_limit)!==void 0?Ft.radiansToDegrees(a.lower_limit):void 0,i=(a==null?void 0:a.upper_limit)!==void 0?Ft.radiansToDegrees(a.upper_limit):void 0;return s.jsxs(E.Stack,{direction:"row",alignItems:"center",gap:2,marginTop:"0.8rem",children:[s.jsx(E.Typography,{sx:{flexGrow:1,textAlign:"right"},children:`J${n.index+1}`}),s.jsx(Hl,{disabled:e.isLocked,lowerLimitDegs:o,upperLimitDegs:i,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[n.index];return u!==void 0?Ft.radiansToDegrees(u):void 0},startJogging:u=>t({joint:n.index,direction:u}),stopJogging:r},n.index),s.jsx(E.Typography,{sx:{flexGrow:1}})]},`joint-${n.index}`)})}),s.jsx(Ql,{store:e})]})});var xi=function(){try{var e=tr(Object,"defineProperty");return e({},"",{}),e}catch{}}();function e_(e,t,r){t=="__proto__"&&xi?xi(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function t_(e,t,r,n){for(var a=-1,o=e==null?0:e.length;++a<o;){var i=e[a];t(n,i,r(i),e)}return n}function r_(e){return function(t,r,n){for(var a=-1,o=Object(t),i=n(t),l=i.length;l--;){var u=i[++a];if(r(o[u],u,o)===!1)break}return t}}var n_=r_();function a_(e,t){return e&&n_(e,t,Bo)}function o_(e,t){return function(r,n){if(r==null)return r;if(!cu(r))return e(r,n);for(var a=r.length,o=-1,i=Object(r);++o<a&&n(i[o],o,i)!==!1;);return r}}var s_=o_(a_);function i_(e,t,r,n){return s_(e,function(a,o,i){t(n,a,r(a),i)}),n}var l_=1,u_=2;function c_(e,t,r,n){var a=r.length,o=a;if(e==null)return!o;for(e=Object(e);a--;){var i=r[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){i=r[a];var l=i[0],u=e[l],c=i[1];if(i[2]){if(u===void 0&&!(l in e))return!1}else{var d=new Ct,h;if(!(h===void 0?_a(c,u,l_|u_,n,d):h))return!1}}return!0}function du(e){return e===e&&!Xt(e)}function d_(e){for(var t=Bo(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,du(a)]}return t}function mu(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function m_(e){var t=d_(e);return t.length==1&&t[0][2]?mu(t[0][0],t[0][1]):function(r){return r===e||c_(r,e,t)}}var h_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,f_=/^\w*$/;function Uo(e,t){if(_t(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||pa(e)?!0:f_.test(e)||!h_.test(e)||t!=null&&e in Object(t)}var p_="Expected a function";function Jo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(p_);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var i=e.apply(this,n);return r.cache=o.set(a,i)||o,i};return r.cache=new(Jo.Cache||Tt),r}Jo.Cache=Tt;var g_=500;function y_(e){var t=Jo(e,function(n){return r.size===g_&&r.clear(),n}),r=t.cache;return t}var __=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,v_=/\\(\\)?/g,b_=y_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(__,function(r,n,a,o){t.push(a?o.replace(v_,"$1"):n||r)}),t});function S_(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var x_=1/0,wi=Dt?Dt.prototype:void 0,ji=wi?wi.toString:void 0;function hu(e){if(typeof e=="string")return e;if(_t(e))return S_(e,hu)+"";if(pa(e))return ji?ji.call(e):"";var t=e+"";return t=="0"&&1/e==-x_?"-0":t}function fu(e){return e==null?"":hu(e)}function pu(e,t){return _t(e)?e:Uo(e,t)?[e]:b_(fu(e))}var w_=1/0;function va(e){if(typeof e=="string"||pa(e))return e;var t=e+"";return t=="0"&&1/e==-w_?"-0":t}function gu(e,t){t=pu(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[va(t[r++])];return r&&r==n?e:void 0}function j_(e,t,r){var n=e==null?void 0:gu(e,t);return n===void 0?r:n}function R_(e,t){return e!=null&&t in Object(e)}function C_(e,t,r){t=pu(t,e);for(var n=-1,a=t.length,o=!1;++n<a;){var i=va(t[n]);if(!(o=e!=null&&r(e,i)))break;e=e[i]}return o||++n!=a?o:(a=e==null?0:e.length,!!a&&Do(a)&&iu(i,a)&&(_t(e)||ou(e)))}function A_(e,t){return e!=null&&C_(e,t,R_)}var P_=1,O_=2;function T_(e,t){return Uo(e)&&du(t)?mu(va(e),t):function(r){var n=j_(r,e);return n===void 0&&n===t?A_(r,e):_a(t,n,P_|O_)}}function M_(e){return e}function I_(e){return function(t){return t==null?void 0:t[e]}}function E_(e){return function(t){return gu(t,e)}}function k_(e){return Uo(e)?I_(va(e)):E_(e)}function L_(e){return typeof e=="function"?e:e==null?M_:typeof e=="object"?_t(e)?T_(e[0],e[1]):m_(e):k_(e)}function $_(e,t){return function(r,n){var a=_t(r)?t_:i_,o={};return a(r,e,L_(n),o)}}var wn=$_(function(e,t,r){e_(e,r,t)}),N_=0;function F_(e){var t=++N_;return fu(e)+t}const go=[{id:"0.1",mm:.1,degrees:.05},{id:"1",mm:1,degrees:.5},{id:"5",mm:5,degrees:2.5},{id:"10",mm:10,degrees:5}],D_=[{id:"continuous"},...go];class Vo{constructor(t,r,n,a){var o,i;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=n,this.tcps=a,this.selectedTabId="cartesian",this.manualActivationRequired=!0,this.activationState="inactive",this.activationError=null,this.locks=new Set,this.selectedCoordSystemId="world",this.selectedTcpId="",this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJoggingInProgress=!1,this.translationVelocityMmPerSec=10,this.rotationVelocityDegPerSec=1,this.minTranslationVelocityMmPerSec=5,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.disposers=[];for(const l of n)if(l.coordinate_system===""){l.coordinate_system="world";break}this.selectedCoordSystemId=((o=n[0])==null?void 0:o.coordinate_system)||"world",this.selectedTcpId=((i=a[0])==null?void 0:i.id)||"",mt.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(mt.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,{coordinatesystems:a},{tcps:o}]=await Promise.all([r.api.motionGroupInfos.getMotionGroupSpecification(t.motionGroupId),r.api.coordinateSystems.listCoordinateSystems("ROTATION_VECTOR"),r.api.motionGroupInfos.listTcps(t.motionGroupId,"ROTATION_VECTOR")]);return new Vo(t,n,a||[],o||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}async deactivate(t={}){if(this.activationState==="inactive")return;const r=this.jogger.activeWebsocket;this.activationState="inactive",this.jogger.setJoggingMode("increment"),r&&await r.closed(),t.requireManualReactivation&&mt.runInAction(()=>{this.manualActivationRequired=!0})}async activate(t={}){const{currentTab:r,selectedTcpId:n,activeCoordSystemId:a,activeDiscreteIncrement:o,jogger:i}=this;if(this.activationState!=="loading"&&!(this.manualActivationRequired&&!t.manual)){if(mt.runInAction(()=>{this.activationState="loading",this.activationError=null}),r.id==="cartesian"){const l={tcpId:n,coordSystemId:a};o?i.setJoggingMode("increment",l):i.setJoggingMode("cartesian",l)}else i.setJoggingMode("joint");if(i.activeWebsocket)try{i.stop(),await i.activeWebsocket.nextMessage()}catch(l){mt.runInAction(()=>{this.activationState="inactive",this.activationError=l});return}mt.runInAction(()=>{this.activationState="active",t.manual&&(this.manualActivationRequired=!1)})}}loadFromLocalStorage(){const t=Ft.tryParseJson(localStorage.getItem("joggingToolStore"));t&&(this.tabsById[t.selectedTabId]&&(this.selectedTabId=t.selectedTabId),this.coordSystemsById[t.selectedCoordSystemId]&&(this.selectedCoordSystemId=t.selectedCoordSystemId),this.tcpsById[t.selectedTcpId]&&(this.selectedTcpId=t.selectedTcpId),this.incrementOptionsById[t.selectedIncrementId]&&(this.selectedIncrementId=t.selectedIncrementId),["translate","rotate"].includes(t.selectedCartesianMotionType)&&(this.selectedCartesianMotionType=t.selectedCartesianMotionType),["coordsys","tool"].includes(t.selectedOrientation)&&(this.selectedOrientation=t.selectedOrientation))}saveToLocalStorage(){localStorage.setItem("joggingToolStore",JSON.stringify(this.localStorageSave))}get isLocked(){return this.locks.size>0}get localStorageSave(){return{selectedTabId:this.selectedTabId,selectedCoordSystemId:this.selectedCoordSystemId,selectedTcpId:this.selectedTcpId,selectedOrientation:this.selectedOrientation,selectedIncrementId:this.selectedIncrementId,selectedCartesianMotionType:this.selectedCartesianMotionType}}get tabs(){return[{id:"cartesian",label:"Cartesian"},{id:"joint",label:"Joint"}]}get incrementOptions(){return D_}get discreteIncrementOptions(){return go}get incrementOptionsById(){return wn(this.incrementOptions,t=>t.id)}get tabsById(){return wn(this.tabs,t=>t.id)}get currentTab(){return this.tabsById[this.selectedTabId]||this.tabs[0]}get tabIndex(){return this.tabs.indexOf(this.currentTab)}get coordSystemsById(){return wn(this.coordSystems,t=>t.coordinate_system)}get selectedCoordSystem(){return this.coordSystemsById[this.selectedCoordSystemId]}get activeCoordSystemId(){return this.selectedOrientation==="tool"?"tool":this.selectedCoordSystemId}get tcpsById(){return wn(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:go.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}get velocityInCurrentUnits(){return this.currentMotionType==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityDegPerSec}get minVelocityInCurrentUnits(){return this.currentMotionType==="translate"?this.minTranslationVelocityMmPerSec:this.minRotationVelocityDegPerSec}get maxVelocityInCurrentUnits(){return this.currentMotionType==="translate"?this.maxTranslationVelocityMmPerSec:this.maxRotationVelocityDegPerSec}get currentMotionType(){return this.selectedTabId==="cartesian"&&this.selectedCartesianMotionType==="translate"?"translate":"rotate"}onTabChange(t,r){const n=this.tabs[r]||this.tabs[0];this.selectedTabId=n.id}setSelectedCoordSystemId(t){this.selectedCoordSystemId=t}setSelectedTcpId(t){this.selectedTcpId=t}setSelectedOrientation(t){this.selectedOrientation=t}setSelectedIncrementId(t){this.selectedIncrementId=t}setIncrementJoggingInProgress(t){this.incrementJoggingInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}async withMotionLock(t){const r=F_();this.locks.add(r);try{return await t()}finally{this.locks.delete(r)}}}const Ri=e=>s.jsx(E.Stack,{position:"absolute",left:0,top:0,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{backgroundColor:"rgba(0, 0, 0, 0.5)",backdropFilter:"blur(10px)",zIndex:100},...e}),B_=en(De.observer(e=>{vt.useTranslation();const t=Ci.isString(e.nova)?new Ft.NovaClient({instanceUrl:e.nova}):e.nova,r=De.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){mt.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{const a=await t.connectJogger(e.motionGroupId),o=await Vo.loadFor(a);mt.runInAction(()=>{r.joggingStore=o}),e.onSetup&&e.onSetup(o)}catch(a){r.loadingError=a}}return Z.useEffect(()=>(n(),()=>{var a;(a=r.joggingStore)==null||a.dispose()}),[e.nova]),Z.useEffect(()=>{const a=r.joggingStore;a&&(e.locked?a.locks.add("external"):a.locks.delete("external"))},[e.locked]),s.jsx(E.Stack,{sx:{maxWidth:"460px",minWidth:"350px",overflowY:"auto",position:"relative",height:"100%"},children:s.jsx(E.Paper,{sx:{height:"100%"},children:r.joggingStore?s.jsx(U_,{store:r.joggingStore,children:e.children}):s.jsx(ea,{message:"Loading jogging",error:r.loadingError})})})})),U_=De.observer(({store:e,children:t})=>{const{t:r}=vt.useTranslation();Z.useEffect(()=>{function o(){e.deactivate()}function i(){e.activate()}return window.addEventListener("blur",o),window.addEventListener("focus",i),()=>{window.removeEventListener("blur",o),window.removeEventListener("focus",i)}}),So(()=>[e.currentTab,e.selectedTcpId,e.activeCoordSystemId,e.activeDiscreteIncrement],()=>{e.activationState==="active"&&e.activate()});function n(){if(e.activationState==="inactive"&&!e.activationError)return s.jsx(Ri,{children:s.jsx(E.Button,{color:"primary",variant:"contained",onClick:()=>e.activate({manual:!0}),disabled:e.isLocked,children:r("Jogging.Activate.bt")})});if(e.activationState==="loading"||e.activationError)return s.jsx(Ri,{children:s.jsx(ea,{message:r("Jogging.Activating.lb"),error:e.activationError})})}function a(){if(e.currentTab.id==="cartesian")return s.jsxs(s.Fragment,{children:[s.jsx(Y1,{store:e}),t]});if(e.currentTab.id==="joint")return s.jsxs(s.Fragment,{children:[s.jsx(Q1,{store:e}),t]})}return s.jsxs(E.Stack,{flexGrow:1,height:"100%",children:[s.jsx(E.Tabs,{value:e.tabIndex,onChange:e.onTabChange,children:e.tabs.map(o=>s.jsx(E.Tab,{label:o.label,id:`jogging-tab-${o.id}`,"aria-controls":`jogging-tab-${o.id}`},o.id))}),s.jsxs(E.Stack,{flexGrow:1,position:"relative",children:[n(),a()]})]})});function J_(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function V_({baseUrl:e=J_(),...t}){return s.jsxs(E.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:[s.jsx(E.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),s.jsxs(E.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[s.jsx(E.Typography,{color:"#fff",children:"Found no devices to connect to."}),s.jsx(E.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),s.jsx(E.DialogActions,{children:s.jsxs(E.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[s.jsx(E.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),s.jsx(E.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const G_=Array(6).fill(2*Math.PI),ft={white:"#FFFFFF",midnightblue:"#001337",lightbuttonblue:"#47D3FF",midnightgray:"#DDE0E4",midnightgray500:"#828B9B",skyblue500:"#06B8F1",skyblue600:"#0094CE",darkishblue:"#262F42",darkestblue:"#101629",grayishblue:"#505968",darkgrayishblue:"#363c4b",scaryred:"#FF0E65",tealGreen:"#1AC0B2",magenta:"#EA3785"},z_={mode:"dark",colors:{primary:ft.skyblue500,textDefault:ft.white,textSubtle:ft.midnightgray,background:{default:ft.darkishblue,panel:ft.darkestblue}}},W_={mode:"light",colors:{primary:ft.skyblue500,textDefault:ft.darkishblue,textSubtle:ft.midnightgray,background:{default:ft.skyblue500,panel:ft.white}}};function K_(e){var a,o,i,l;let t=!0;((a=e.palette)==null?void 0:a.mode)==="light"?t=!1:((o=e.palette)==null?void 0:o.mode)!=="dark"&&(t=!(typeof window<"u"&&((l=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-color-scheme: light)"))==null?void 0:l.matches)));const r=t?z_:W_,n=lo({palette:{mode:r.mode,primary:{main:r.colors.primary},background:{default:r.colors.background.default,paper:r.colors.background.panel}},typography:{allVariants:{color:r.colors.textDefault}},components:{MuiSelect:{styleOverrides:{root:{backgroundColor:t?"#505968":void 0,borderRadius:"10px",color:"currentColor","& > div":{padding:"4px 16px"},"& fieldset":{border:t?"none":void 0}}}},MuiChip:{styleOverrides:{root:{backgroundColor:t?"#505968":void 0,borderRadius:"10px",color:"currentColor"}}},MuiToggleButtonGroup:{styleOverrides:{root:{"& > button":{borderRadius:"8px",textTransform:"none",paddingTop:"4px",paddingBottom:"4px",width:"100%",borderWidth:0,backgroundColor:t?"#3d4455":void 0,color:t?"rgba(255, 255, 255, 0.8)":void 0,"&.Mui-selected":t?{color:"white",backgroundColor:"#505968"}:void 0}}}},MuiTabs:{styleOverrides:{root:{backgroundColor:t?"#101629":void 0,minHeight:"42px"}}},MuiTab:{styleOverrides:{root:{minHeight:"42px",textTransform:"none","&.Mui-selected":t?{color:"white",backgroundColor:"#404554"}:void 0}}}},nova:r});return e?lo(n,e):n}exports.JoggingCartesianAxisControl=uo;exports.JoggingJointRotationControl=Hl;exports.JoggingPanel=B_;exports.LoadingCover=ea;exports.LoadingErrorMessage=rl;exports.NoMotionGroupModal=V_;exports.PresetEnvironment=lm;exports.Robot=im;exports.SafetyZonesRenderer=dm;exports.SupportedRobot=sl;exports.VelocitySlider=Zl;exports.WandelscriptEditor=$d;exports.createNovaMuiTheme=K_;exports.defaultAxisConfig=G_;exports.defaultGetModel=xo;exports.useAnimationFrame=wr;exports.useAutorun=ol;exports.useMounted=ta;exports.useReaction=So;
|
|
83
|
+
`)),Cl.configure(e)}},sp=Object.freeze(Object.defineProperty({__proto__:null,capitalize:Oe,createChainedFunction:mf,createSvgIcon:ap,debounce:hf,deprecatedPropType:ff,isMuiElement:pf,ownerDocument:_r,ownerWindow:gf,requirePropFactory:yf,setRef:Il,unstable_ClassNameGenerator:op,unstable_useEnhancedEffect:Oo,unstable_useId:vf,unsupportedProp:bf,useControlled:El,useEventCallback:Tn,useForkRef:Vn,useIsFocusVisible:kl},Symbol.toStringTag,{value:"Module"})),ip=At(sp);var Xs;function Vl(){return Xs||(Xs=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=ip}(Ba)),Ba}var lp=fa;Object.defineProperty(No,"__esModule",{value:!0});var Gl=No.default=void 0,up=lp(Vl()),cp=s;Gl=No.default=(0,up.default)((0,cp.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");var Fo={},dp=fa;Object.defineProperty(Fo,"__esModule",{value:!0});var zl=Fo.default=void 0,mp=dp(Vl()),hp=s;zl=Fo.default=(0,mp.default)((0,hp.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function Xt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Wl=typeof global=="object"&&global&&global.Object===Object&&global,fp=typeof self=="object"&&self&&self.Object===Object&&self,bt=Wl||fp||Function("return this")(),Ua=function(){return bt.Date.now()},pp=/\s/;function gp(e){for(var t=e.length;t--&&pp.test(e.charAt(t)););return t}var yp=/^\s+/;function _p(e){return e&&e.slice(0,gp(e)+1).replace(yp,"")}var Dt=bt.Symbol,Kl=Object.prototype,vp=Kl.hasOwnProperty,bp=Kl.toString,Ur=Dt?Dt.toStringTag:void 0;function Sp(e){var t=vp.call(e,Ur),r=e[Ur];try{e[Ur]=void 0;var n=!0}catch{}var a=bp.call(e);return n&&(t?e[Ur]=r:delete e[Ur]),a}var xp=Object.prototype,wp=xp.toString;function jp(e){return wp.call(e)}var Rp="[object Null]",Cp="[object Undefined]",Ys=Dt?Dt.toStringTag:void 0;function Qt(e){return e==null?e===void 0?Cp:Rp:Ys&&Ys in Object(e)?Sp(e):jp(e)}function Yt(e){return e!=null&&typeof e=="object"}var Ap="[object Symbol]";function pa(e){return typeof e=="symbol"||Yt(e)&&Qt(e)==Ap}var Zs=NaN,Pp=/^[-+]0x[0-9a-f]+$/i,Op=/^0b[01]+$/i,Tp=/^0o[0-7]+$/i,Mp=parseInt;function Qs(e){if(typeof e=="number")return e;if(pa(e))return Zs;if(Xt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Xt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=_p(e);var r=Op.test(e);return r||Tp.test(e)?Mp(e.slice(2),r?2:8):Pp.test(e)?Zs:+e}var Ip="Expected a function",Ep=Math.max,kp=Math.min;function Lp(e,t,r){var n,a,o,i,l,u,c=0,d=!1,h=!1,m=!0;if(typeof e!="function")throw new TypeError(Ip);t=Qs(t)||0,Xt(r)&&(d=!!r.leading,h="maxWait"in r,o=h?Ep(Qs(r.maxWait)||0,t):o,m="trailing"in r?!!r.trailing:m);function v(P){var O=n,z=a;return n=a=void 0,c=P,i=e.apply(z,O),i}function y(P){return c=P,l=setTimeout(x,t),d?v(P):i}function _(P){var O=P-u,z=P-c,le=t-O;return h?kp(le,o-z):le}function g(P){var O=P-u,z=P-c;return u===void 0||O>=t||O<0||h&&z>=o}function x(){var P=Ua();if(g(P))return j(P);l=setTimeout(x,_(P))}function j(P){return l=void 0,m&&n?v(P):(n=a=void 0,i)}function C(){l!==void 0&&clearTimeout(l),c=0,n=u=a=l=void 0}function L(){return l===void 0?i:j(Ua())}function R(){var P=Ua(),O=g(P);if(n=arguments,a=this,u=P,O){if(l===void 0)return y(u);if(h)return clearTimeout(l),l=setTimeout(x,t),v(u)}return l===void 0&&(l=setTimeout(x,t)),i}return R.cancel=C,R.flush=L,R}var $p="Expected a function";function Np(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError($p);return Xt(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),Lp(e,t,{leading:n,maxWait:t,trailing:a})}const Hl=en(De.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:a,disabled:o,...i})=>{const{t:l}=vt.useTranslation(),[u,c]=Z.useState(),d=De.useLocalObservable(()=>({activeJoggingDir:null,startJogging(x){this.activeJoggingDir=x,e(x)},stopJogging(){this.activeJoggingDir=null,t()}})),h=Np(()=>{c(a())},50);wr(h);function m(x){x.button===0&&d.startJogging("-")}function v(x){x.button===0&&d.startJogging("+")}function y(x){d.stopJogging()}function _(x){x.target===x.currentTarget&&d.stopJogging()}function g(x,j=1){if(x===void 0||isNaN(x))return"";const C=l("General.degree.variable",{amount:x.toFixed(j)});return x>0&&j===0?`+${C}`:C}return s.jsxs(vr,{height:"64px",width:"100%",maxWidth:"300px",direction:"row",...i,sx:{"& .MuiIconButton-root":{width:"52px",color:"white",alignContent:"center",backgroundColor:"#38445A","&:disabled":{opacity:.5,backgroundColor:"#38445A"},"& svg":{width:"42px",height:"42px"}}},children:[s.jsx(E.IconButton,{onPointerDown:m,onPointerUp:y,onPointerOut:_,disabled:o,sx:{borderRadius:"16px 0px 0px 16px",backgroundColor:d.activeJoggingDir==="-"?"#495975":void 0},children:s.jsx(Gl,{})}),s.jsxs(vr,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:"4px",borderBottomWidth:"4px",backgroundColor:"#38445A",borderColor:"#38445A",paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[s.jsx(E.Typography,{sx:{fontSize:"15px",position:"relative",top:"5px",color:"white"},children:g(u)}),s.jsx(E.Slider,{disabled:!0,"aria-label":"Joint position",min:r,max:n,value:u||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"10px",borderRadius:"2px"},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:"white"},"& .MuiSlider-rail":{backgroundColor:"#1F283A",opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:g(r,0)},{value:n,label:g(n,0)}]})]}),s.jsx(E.IconButton,{onPointerDown:v,onPointerUp:y,onPointerOut:_,disabled:o,sx:{borderRadius:"0px 16px 16px 0px",backgroundColor:d.activeJoggingDir==="+"?"#495975 !important":"#38445A"},children:s.jsx(zl,{})})]})})),Fp=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:25,height:24,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeWidth:1.5,d:"M18.5 12a6 6 0 1 0-6 6"}),N.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m16.5 11 2 2.5 2-2.5"})),Dp=Z.forwardRef(Fp),Bp=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),Up=Z.forwardRef(Bp),Jp=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),Vp=Z.forwardRef(Jp),Gp=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M9.522 14.811A.899.899 0 1 0 8.25 13.54L6.19 15.601V3.16L8.25 5.221A.9.9 0 0 0 9.522 3.95L5.926.354a.9.9 0 0 0-1.272 0L1.058 3.95a.9.9 0 1 0 1.271 1.271L4.391 3.16v12.442L2.329 13.54a.899.899 0 1 0-1.271 1.271l3.596 3.597a.9.9 0 0 0 1.272 0z",clipRule:"evenodd"})),zp=Z.forwardRef(Gp),Wp=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:21,height:21,fill:"none",viewBox:"0 0 23 22",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"currentColor",d:"m21.71 16.262-1.09.346.66 2.071-2.923-1.461V9.857l-6.285-3.143V2.893L13.38 4.21l.812-.806-2.674-2.69-2.706 2.687.805.812L10.93 2.91v3.803L4.643 9.857v7.36l-2.914 1.458.657-2.067-1.09-.346-1.225 3.88 3.826 1.144.346-1.09-1.836-.583 2.874-1.436 6.22 3.109 6.217-3.11 2.877 1.439-1.831.581.345 1.09 3.82-1.143zM11.5 12.646l-4.94-2.47 4.94-2.47 4.94 2.47zm.572.993 5.143-2.572v6.083l-5.143 2.572zm-6.286-2.572 5.143 2.572v6.083L5.786 17.15z"})),Kp=Z.forwardRef(Wp),Hp=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:17,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"currentColor",d:"M12.9 7.667c-.133-.534-.533-1-1-1.134L10.367 6l-.4 1.267L11.5 7.8c.067 0 .133.067.133.2l1.067 4.867a.32.32 0 0 1-.133.4l-2.267 1.8c-.267.2-.333.666-.133.933s.666.333.933.133l2.267-1.8c.533-.4.733-1.133.6-1.733zM12.5 0H1.833A1.65 1.65 0 0 0 .167 1.667v1.4c0 .866.733 1.6 1.666 1.6h10.734c.866 0 1.6-.734 1.6-1.667V1.667A1.65 1.65 0 0 0 12.5 0M1.633 12.8 2.7 8c0-.067.067-.133.133-.2l1.534-.533-.4-1.2-1.534.466c-.533.2-.933.6-1 1.134L.367 12.533c-.134.667.066 1.334.6 1.734l2.266 1.8c.267.266.734.2.934-.067s.2-.733-.134-.933l-2.266-1.8c-.134-.134-.2-.267-.134-.467"})),qp=Z.forwardRef(Hp),Xp=De.observer(({store:e})=>{var n;const{t}=vt.useTranslation();function r(a,o){(o==="coordsys"||o==="tool")&&e.setSelectedOrientation(o)}return s.jsxs(s.Fragment,{children:[s.jsxs(E.Stack,{direction:"row",alignItems:"center",spacing:2,sx:{padding:"8px 16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:[s.jsxs(E.Stack,{width:"50%",children:[s.jsx(E.InputLabel,{id:"jogging-coord-select",children:"Coordinate Sys."}),s.jsx(E.Select,{labelId:"jogging-coord-select",value:e.selectedCoordSystemId,displayEmpty:!0,onChange:a=>{e.setSelectedCoordSystemId(a.target.value)},disabled:e.isLocked,children:e.coordSystems.map(a=>s.jsx(E.MenuItem,{value:a.coordinate_system,children:a.name||a.coordinate_system},a.coordinate_system))})]}),s.jsxs(E.Stack,{width:"50%",children:[s.jsx(E.InputLabel,{id:"jogging-tcp-select",children:"TCP"}),s.jsx(E.Select,{labelId:"jogging-tcp-select",value:e.selectedTcpId,onChange:a=>{e.setSelectedTcpId(a.target.value)},disabled:e.isLocked,children:e.tcps.map(a=>s.jsx(E.MenuItem,{value:a.id,children:a.id},a.id))})]})]}),s.jsxs(E.Stack,{direction:"row",alignItems:"center",spacing:2,sx:{padding:"8px 16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:[s.jsxs(E.Stack,{width:"35%",children:[s.jsx(E.InputLabel,{id:"orientation-select",children:t("Jogging.Cartesian.Orientation.lb")}),s.jsxs(E.ToggleButtonGroup,{value:e.selectedOrientation,onChange:r,exclusive:!0,"aria-labelledby":"orientation-select",disabled:e.isLocked,children:[s.jsx(E.ToggleButton,{value:"coordsys",children:s.jsx(Kp,{})}),s.jsx(E.ToggleButton,{value:"tool",children:s.jsx(qp,{})})]})]}),s.jsxs(E.Stack,{width:"65%",children:[s.jsx(E.InputLabel,{id:"jogging-increment-select",children:"Increment"}),s.jsxs(E.Select,{labelId:"jogging-increment-select",value:((n=e.activeDiscreteIncrement)==null?void 0:n.id)||"continuous",onChange:a=>{e.setSelectedIncrementId(a.target.value)},disabled:e.isLocked,children:[s.jsx(E.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(a=>s.jsx(E.MenuItem,{value:a.id,children:e.currentMotionType==="translate"?`${a.mm}mm`:`${a.degrees}°`},a.id))]})]})]})]})});function Yp(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const Zp=2;function ql(e,t){return e-t}function ei(e,t){var r;const{index:n}=(r=e.reduce((a,o,i)=>{const l=Math.abs(t-o);return a===null||l<a.distance||l===a.distance?{distance:l,index:i}:a},null))!=null?r:{};return n}function _n(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const a=r.changedTouches[n];if(a.identifier===t.current)return{x:a.clientX,y:a.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Wn(e,t,r){return(e-t)*100/(r-t)}function Qp(e,t,r){return(r-t)*e+t}function eg(e){if(Math.abs(e)<1){const r=e.toExponential().split("e-"),n=r[0].split(".")[1];return(n?n.length:0)+parseInt(r[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function tg(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(eg(t)))}function ti({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(ql)}function vn({sliderRef:e,activeIndex:t,setActive:r}){var n,a;const o=_r(e.current);if(!((n=e.current)!=null&&n.contains(o.activeElement))||Number(o==null||(a=o.activeElement)==null?void 0:a.getAttribute("data-index"))!==t){var i;(i=e.current)==null||i.querySelector(`[type="range"][data-index="${t}"]`).focus()}r&&r(t)}function bn(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?Yp(e,t):!1}const rg={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}%`})}},ng=e=>e;let Sn;function ri(){return Sn===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Sn=CSS.supports("touch-action","none"):Sn=!0),Sn}function ag(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:o=!1,marks:i=!1,max:l=100,min:u=0,name:c,onChange:d,onChangeCommitted:h,orientation:m="horizontal",rootRef:v,scale:y=ng,step:_=1,shiftStep:g=10,tabIndex:x,value:j}=e,C=N.useRef(),[L,R]=N.useState(-1),[P,O]=N.useState(-1),[z,le]=N.useState(!1),ce=N.useRef(0),[D,q]=El({controlled:j,default:r??u,name:"Slider"}),G=d&&((T,k,F)=>{const W=T.nativeEvent||T,Y=new W.constructor(W.type,W);Object.defineProperty(Y,"target",{writable:!0,value:{value:k,name:c}}),d(Y,k,F)}),X=Array.isArray(D);let H=X?D.slice().sort(ql):[D];H=H.map(T=>T==null?u:fr(T,u,l));const we=i===!0&&_!==null?[...Array(Math.floor((l-u)/_)+1)].map((T,k)=>({value:u+_*k})):i||[],ue=we.map(T=>T.value),{isFocusVisibleRef:Q,onBlur:Ae,onFocus:Ee,ref:at}=kl(),[St,He]=N.useState(-1),je=N.useRef(),Mt=Vn(at,je),ut=Vn(v,Mt),qe=T=>k=>{var F;const W=Number(k.currentTarget.getAttribute("data-index"));Ee(k),Q.current===!0&&He(W),O(W),T==null||(F=T.onFocus)==null||F.call(T,k)},Je=T=>k=>{var F;Ae(k),Q.current===!1&&He(-1),O(-1),T==null||(F=T.onBlur)==null||F.call(T,k)},ct=(T,k)=>{const F=Number(T.currentTarget.getAttribute("data-index")),W=H[F],Y=ue.indexOf(W);let K=k;if(we&&_==null){const Ge=ue[ue.length-1];K>Ge?K=Ge:K<ue[0]?K=ue[0]:K=K<W?ue[Y-1]:ue[Y+1]}if(K=fr(K,u,l),X){a&&(K=fr(K,H[F-1]||-1/0,H[F+1]||1/0));const Ge=K;K=ti({values:H,newValue:K,index:F});let Xe=F;a||(Xe=K.indexOf(Ge)),vn({sliderRef:je,activeIndex:Xe})}q(K),He(F),G&&!bn(K,D)&&G(T,K,F),h&&h(T,K)},dt=T=>k=>{var F;if(_!==null){const W=Number(k.currentTarget.getAttribute("data-index")),Y=H[W];let K=null;(k.key==="ArrowLeft"||k.key==="ArrowDown")&&k.shiftKey||k.key==="PageDown"?K=Math.max(Y-g,u):((k.key==="ArrowRight"||k.key==="ArrowUp")&&k.shiftKey||k.key==="PageUp")&&(K=Math.min(Y+g,l)),K!==null&&(ct(k,K),k.preventDefault())}T==null||(F=T.onKeyDown)==null||F.call(T,k)};Oo(()=>{if(n&&je.current.contains(document.activeElement)){var T;(T=document.activeElement)==null||T.blur()}},[n]),n&&L!==-1&&R(-1),n&&St!==-1&&He(-1);const Ut=T=>k=>{var F;(F=T.onChange)==null||F.call(T,k),ct(k,k.target.valueAsNumber)},xt=N.useRef();let Ve=m;o&&m==="horizontal"&&(Ve+="-reverse");const M=({finger:T,move:k=!1})=>{const{current:F}=je,{width:W,height:Y,bottom:K,left:Ge}=F.getBoundingClientRect();let Xe;Ve.indexOf("vertical")===0?Xe=(K-T.y)/Y:Xe=(T.x-Ge)/W,Ve.indexOf("-reverse")!==-1&&(Xe=1-Xe);let te;if(te=Qp(Xe,u,l),_)te=tg(te,_,u);else{const kt=ei(ue,te);te=ue[kt]}te=fr(te,u,l);let $e=0;if(X){k?$e=xt.current:$e=ei(H,te),a&&(te=fr(te,H[$e-1]||-1/0,H[$e+1]||1/0));const kt=te;te=ti({values:H,newValue:te,index:$e}),a&&k||($e=te.indexOf(kt),xt.current=$e)}return{newValue:te,activeIndex:$e}},ee=Tn(T=>{const k=_n(T,C);if(!k)return;if(ce.current+=1,T.type==="mousemove"&&T.buttons===0){fe(T);return}const{newValue:F,activeIndex:W}=M({finger:k,move:!0});vn({sliderRef:je,activeIndex:W,setActive:R}),q(F),!z&&ce.current>Zp&&le(!0),G&&!bn(F,D)&&G(T,F,W)}),fe=Tn(T=>{const k=_n(T,C);if(le(!1),!k)return;const{newValue:F}=M({finger:k,move:!0});R(-1),T.type==="touchend"&&O(-1),h&&h(T,F),C.current=void 0,Le()}),ke=Tn(T=>{if(n)return;ri()||T.preventDefault();const k=T.changedTouches[0];k!=null&&(C.current=k.identifier);const F=_n(T,C);if(F!==!1){const{newValue:Y,activeIndex:K}=M({finger:F});vn({sliderRef:je,activeIndex:K,setActive:R}),q(Y),G&&!bn(Y,D)&&G(T,Y,K)}ce.current=0;const W=_r(je.current);W.addEventListener("touchmove",ee,{passive:!0}),W.addEventListener("touchend",fe,{passive:!0})}),Le=N.useCallback(()=>{const T=_r(je.current);T.removeEventListener("mousemove",ee),T.removeEventListener("mouseup",fe),T.removeEventListener("touchmove",ee),T.removeEventListener("touchend",fe)},[fe,ee]);N.useEffect(()=>{const{current:T}=je;return T.addEventListener("touchstart",ke,{passive:ri()}),()=>{T.removeEventListener("touchstart",ke),Le()}},[Le,ke]),N.useEffect(()=>{n&&Le()},[n,Le]);const It=T=>k=>{var F;if((F=T.onMouseDown)==null||F.call(T,k),n||k.defaultPrevented||k.button!==0)return;k.preventDefault();const W=_n(k,C);if(W!==!1){const{newValue:K,activeIndex:Ge}=M({finger:W});vn({sliderRef:je,activeIndex:Ge,setActive:R}),q(K),G&&!bn(K,D)&&G(k,K,Ge)}ce.current=0;const Y=_r(je.current);Y.addEventListener("mousemove",ee,{passive:!0}),Y.addEventListener("mouseup",fe)},Re=Wn(X?H[0]:u,u,l),Et=Wn(H[H.length-1],u,l)-Re,Jt=(T={})=>{const k=Mn(T),F={onMouseDown:It(k||{})},W=A({},k,F);return A({},T,{ref:ut},W)},Ar=T=>k=>{var F;(F=T.onMouseOver)==null||F.call(T,k);const W=Number(k.currentTarget.getAttribute("data-index"));O(W)},Pr=T=>k=>{var F;(F=T.onMouseLeave)==null||F.call(T,k),O(-1)};return{active:L,axis:Ve,axisProps:rg,dragging:z,focusedThumbIndex:St,getHiddenInputProps:(T={})=>{var k;const F=Mn(T),W={onChange:Ut(F||{}),onFocus:qe(F||{}),onBlur:Je(F||{}),onKeyDown:dt(F||{})},Y=A({},F,W);return A({tabIndex:x,"aria-labelledby":t,"aria-orientation":m,"aria-valuemax":y(l),"aria-valuemin":y(u),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(k=e.step)!=null?k:void 0,disabled:n},T,Y,{style:A({},Pf,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Jt,getThumbProps:(T={})=>{const k=Mn(T),F={onMouseOver:Ar(k||{}),onMouseLeave:Pr(k||{})};return A({},T,k,F)},marks:we,open:P,range:X,rootRef:ut,trackLeap:Et,trackOffset:Re,values:H,getThumbStyle:T=>({pointerEvents:L!==-1&&L!==T?"none":void 0})}}const og=e=>!e||!Gr(e);function sg(e){return un("MuiSlider",e)}const et=Pl("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"]),ig=e=>{const{open:t}=e;return{offset:yt(t&&et.valueLabelOpen),circle:et.valueLabelCircle,label:et.valueLabelLabel}};function Xl(e){const{children:t,className:r,value:n}=e,a=ig(e);return t?N.cloneElement(t,{className:yt(t.props.className)},s.jsxs(N.Fragment,{children:[t.props.children,s.jsx("span",{className:yt(a.offset,r),"aria-hidden":!0,children:s.jsx("span",{className:a.circle,children:s.jsx("span",{className:a.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(Xl.propTypes={children:f.element.isRequired,className:f.string,value:f.node});const lg=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function ni(e){return e}const ug=Pt("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${Oe(r.color)}`],r.size!=="medium"&&t[`size${Oe(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(({theme:e})=>{var t;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${et.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${et.dragging}`]:{[`& .${et.thumb}, & .${et.track}`]:{transition:"none"}},variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(r=>{var n;return((n=e.vars)!=null?n:e).palette[r].main}).map(r=>({props:{color:r},style:{color:(e.vars||e).palette[r].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}}]}}),cg=Pt("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.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}}]}),dg=Pt("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>{var t;return{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.keys(((t=e.vars)!=null?t:e).palette).filter(r=>{var n;return((n=e.vars)!=null?n:e).palette[r].main}).map(r=>({props:{color:r,track:"inverted"},style:A({},e.vars?{backgroundColor:e.vars.palette.Slider[`${r}Track`],borderColor:e.vars.palette.Slider[`${r}Track`]}:A({backgroundColor:io(e.palette[r].main,.62),borderColor:io(e.palette[r].main,.62)},e.applyStyles("dark",{backgroundColor:so(e.palette[r].main,.5)}),e.applyStyles("dark",{borderColor:so(e.palette[r].main,.5)})))}))]}}),mg=Pt("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${Oe(r.color)}`],r.size!=="medium"&&t[`thumbSize${Oe(r.size)}`]]}})(({theme:e})=>{var t;return{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%)"},[`&.${et.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.keys(((t=e.vars)!=null?t:e).palette).filter(r=>{var n;return((n=e.vars)!=null?n:e).palette[r].main}).map(r=>({props:{color:r},style:{[`&:hover, &.${et.focusVisible}`]:A({},e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[r].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Js(e.palette[r].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${et.active}`]:A({},e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[r].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Js(e.palette[r].main,.16)}`})}}))]}}),hg=Pt(Xl,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e})=>A({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%"},[`&.${et.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%"},[`&.${et.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"}}]})),fg=Pt("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Lo(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(({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}}]})),pg=Pt("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Lo(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e})=>A({},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}}]})),gg=e=>{const{disabled:t,dragging:r,marked:n,orientation:a,track:o,classes:i,color:l,size:u}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",a==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",l&&`color${Oe(l)}`,u&&`size${Oe(u)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",u&&`thumbSize${Oe(u)}`,l&&`thumbColor${Oe(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Mo(c,sg,i)},yg=({children:e})=>e,Yl=N.forwardRef(function(t,r){var n,a,o,i,l,u,c,d,h,m,v,y,_,g,x,j,C,L,R,P,O,z,le,ce;const D=$o({props:t,name:"MuiSlider"}),q=kf(),{"aria-label":G,"aria-valuetext":X,"aria-labelledby":H,component:we="span",components:ue={},componentsProps:Q={},color:Ae="primary",classes:Ee,className:at,disableSwap:St=!1,disabled:He=!1,getAriaLabel:je,getAriaValueText:Mt,marks:ut=!1,max:qe=100,min:Je=0,orientation:ct="horizontal",shiftStep:dt=10,size:Ut="medium",step:xt=1,scale:Ve=ni,slotProps:M,slots:ee,track:fe="normal",valueLabelDisplay:ke="off",valueLabelFormat:Le=ni}=D,It=Ue(D,lg),Re=A({},D,{isRtl:q,max:qe,min:Je,classes:Ee,disabled:He,disableSwap:St,orientation:ct,marks:ut,color:Ae,size:Ut,step:xt,shiftStep:dt,scale:Ve,track:fe,valueLabelDisplay:ke,valueLabelFormat:Le}),{axisProps:Et,getRootProps:Jt,getHiddenInputProps:Ar,getThumbProps:Pr,open:Or,active:rr,axis:ot,focusedThumbIndex:T,range:k,dragging:F,marks:W,values:Y,trackOffset:K,trackLeap:Ge,getThumbStyle:Xe}=ag(A({},Re,{rootRef:r}));Re.marked=W.length>0&&W.some($=>$.label),Re.dragging=F,Re.focusedThumbIndex=T;const te=gg(Re),$e=(n=(a=ee==null?void 0:ee.root)!=null?a:ue.Root)!=null?n:ug,kt=(o=(i=ee==null?void 0:ee.rail)!=null?i:ue.Rail)!=null?o:cg,nr=(l=(u=ee==null?void 0:ee.track)!=null?u:ue.Track)!=null?l:dg,Tr=(c=(d=ee==null?void 0:ee.thumb)!=null?d:ue.Thumb)!=null?c:mg,wt=(h=(m=ee==null?void 0:ee.valueLabel)!=null?m:ue.ValueLabel)!=null?h:hg,Vt=(v=(y=ee==null?void 0:ee.mark)!=null?y:ue.Mark)!=null?v:fg,Gt=(_=(g=ee==null?void 0:ee.markLabel)!=null?g:ue.MarkLabel)!=null?_:pg,Mr=(x=(j=ee==null?void 0:ee.input)!=null?j:ue.Input)!=null?x:"input",Ir=(C=M==null?void 0:M.root)!=null?C:Q.root,dn=(L=M==null?void 0:M.rail)!=null?L:Q.rail,Er=(R=M==null?void 0:M.track)!=null?R:Q.track,ar=(P=M==null?void 0:M.thumb)!=null?P:Q.thumb,or=(O=M==null?void 0:M.valueLabel)!=null?O:Q.valueLabel,ba=(z=M==null?void 0:M.mark)!=null?z:Q.mark,Sa=(le=M==null?void 0:M.markLabel)!=null?le:Q.markLabel,mn=(ce=M==null?void 0:M.input)!=null?ce:Q.input,hn=$t({elementType:$e,getSlotProps:Jt,externalSlotProps:Ir,externalForwardedProps:It,additionalProps:A({},og($e)&&{as:we}),ownerState:A({},Re,Ir==null?void 0:Ir.ownerState),className:[te.root,at]}),xa=$t({elementType:kt,externalSlotProps:dn,ownerState:Re,className:te.rail}),wa=$t({elementType:nr,externalSlotProps:Er,additionalProps:{style:A({},Et[ot].offset(K),Et[ot].leap(Ge))},ownerState:A({},Re,Er==null?void 0:Er.ownerState),className:te.track}),kr=$t({elementType:Tr,getSlotProps:Pr,externalSlotProps:ar,ownerState:A({},Re,ar==null?void 0:ar.ownerState),className:te.thumb}),ja=$t({elementType:wt,externalSlotProps:or,ownerState:A({},Re,or==null?void 0:or.ownerState),className:te.valueLabel}),p=$t({elementType:Vt,externalSlotProps:ba,ownerState:Re,className:te.mark}),w=$t({elementType:Gt,externalSlotProps:Sa,ownerState:Re,className:te.markLabel}),I=$t({elementType:Mr,getSlotProps:Ar,externalSlotProps:mn,ownerState:Re});return s.jsxs($e,A({},hn,{children:[s.jsx(kt,A({},xa)),s.jsx(nr,A({},wa)),W.filter($=>$.value>=Je&&$.value<=qe).map(($,B)=>{const re=Wn($.value,Je,qe),V=Et[ot].offset(re);let U;return fe===!1?U=Y.indexOf($.value)!==-1:U=fe==="normal"&&(k?$.value>=Y[0]&&$.value<=Y[Y.length-1]:$.value<=Y[0])||fe==="inverted"&&(k?$.value<=Y[0]||$.value>=Y[Y.length-1]:$.value>=Y[0]),s.jsxs(N.Fragment,{children:[s.jsx(Vt,A({"data-index":B},p,!Gr(Vt)&&{markActive:U},{style:A({},V,p.style),className:yt(p.className,U&&te.markActive)})),$.label!=null?s.jsx(Gt,A({"aria-hidden":!0,"data-index":B},w,!Gr(Gt)&&{markLabelActive:U},{style:A({},V,w.style),className:yt(te.markLabel,w.className,U&&te.markLabelActive),children:$.label})):null]},B)}),Y.map(($,B)=>{const re=Wn($,Je,qe),V=Et[ot].offset(re),U=ke==="off"?yg:wt;return s.jsx(U,A({},!Gr(U)&&{valueLabelFormat:Le,valueLabelDisplay:ke,value:typeof Le=="function"?Le(Ve($),B):Le,index:B,open:Or===B||rr===B||ke==="on",disabled:He},ja,{children:s.jsx(Tr,A({"data-index":B},kr,{className:yt(te.thumb,kr.className,rr===B&&te.active,T===B&&te.focusVisible),style:A({},V,Xe(B),kr.style),children:s.jsx(Mr,A({"data-index":B,"aria-label":je?je(B):G,"aria-valuenow":Ve($),"aria-labelledby":H,"aria-valuetext":Mt?Mt(Ve($),B):X,value:Y[B]},I))}))}),B)})]}))});process.env.NODE_ENV!=="production"&&(Yl.propTypes={"aria-label":ks(f.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":f.string,"aria-valuetext":ks(f.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:f.node,classes:f.object,className:f.string,color:f.oneOfType([f.oneOf(["primary","secondary","error","info","success","warning"]),f.string]),components:f.shape({Input:f.elementType,Mark:f.elementType,MarkLabel:f.elementType,Rail:f.elementType,Root:f.elementType,Thumb:f.elementType,Track:f.elementType,ValueLabel:f.elementType}),componentsProps:f.shape({input:f.oneOfType([f.func,f.object]),mark:f.oneOfType([f.func,f.object]),markLabel:f.oneOfType([f.func,f.object]),rail:f.oneOfType([f.func,f.object]),root:f.oneOfType([f.func,f.object]),thumb:f.oneOfType([f.func,f.object]),track:f.oneOfType([f.func,f.object]),valueLabel:f.oneOfType([f.func,f.shape({children:f.element,className:f.string,open:f.bool,style:f.object,value:f.number,valueLabelDisplay:f.oneOf(["auto","off","on"])})])}),defaultValue:f.oneOfType([f.arrayOf(f.number),f.number]),disabled:f.bool,disableSwap:f.bool,getAriaLabel:f.func,getAriaValueText:f.func,marks:f.oneOfType([f.arrayOf(f.shape({label:f.node,value:f.number.isRequired})),f.bool]),max:f.number,min:f.number,name:f.string,onChange:f.func,onChangeCommitted:f.func,orientation:f.oneOf(["horizontal","vertical"]),scale:f.func,shiftStep:f.number,size:f.oneOfType([f.oneOf(["small","medium"]),f.string]),slotProps:f.shape({input:f.oneOfType([f.func,f.object]),mark:f.oneOfType([f.func,f.object]),markLabel:f.oneOfType([f.func,f.object]),rail:f.oneOfType([f.func,f.object]),root:f.oneOfType([f.func,f.object]),thumb:f.oneOfType([f.func,f.object]),track:f.oneOfType([f.func,f.object]),valueLabel:f.oneOfType([f.func,f.shape({children:f.element,className:f.string,open:f.bool,style:f.object,value:f.number,valueLabelDisplay:f.oneOf(["auto","off","on"])})])}),slots:f.shape({input:f.elementType,mark:f.elementType,markLabel:f.elementType,rail:f.elementType,root:f.elementType,thumb:f.elementType,track:f.elementType,valueLabel:f.elementType}),step:f.number,sx:f.oneOfType([f.arrayOf(f.oneOfType([f.func,f.object,f.bool])),f.func,f.object]),tabIndex:f.number,track:f.oneOf(["inverted","normal",!1]),value:f.oneOfType([f.arrayOf(f.number),f.number]),valueLabelDisplay:f.oneOf(["auto","off","on"]),valueLabelFormat:f.oneOfType([f.func,f.string])});var _g="[object Number]";function vg(e){return typeof e=="number"||Yt(e)&&Qt(e)==_g}const Zl=De.observer(e=>{const t=E.useTheme(),r=e.valueLabelFormat||(a=>`${a}`);function n(a,o){o===e.velocity||!vg(o)||e.onVelocityChange(o)}return s.jsxs(s.Fragment,{children:[s.jsx(E.Typography,{sx:{textAlign:"center",fontSize:"14px",opacity:.8,color:t.palette.text.primary},children:r(e.velocity)}),s.jsx(Yl,{value:e.velocity,onChange:n,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}})]})}),Ql=De.observer(({store:e})=>{const{t}=vt.useTranslation(),r=De.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?n=>`v=${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:n})}`:n=>`v=${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:n})}`}}));return s.jsx(E.Stack,{sx:{margin:"0px 20px",marginTop:"24px",marginBottom:"24px"},children:s.jsx(E.Stack,{sx:{width:"380px",maxWidth:"90%",margin:"auto"},children:s.jsx(Zl,{velocity:e.velocityInCurrentUnits,min:e.minVelocityInCurrentUnits,max:e.maxVelocityInCurrentUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,valueLabelFormat:r.valueLabelFormat})})})}),eu=Z.forwardRef(({label:e,value:t},r)=>s.jsxs(s.Fragment,{children:[e&&s.jsx(E.InputLabel,{children:e}),s.jsx(E.Chip,{ref:r,sx:{fontSize:"14px",opacity:.8,marginTop:"4px !important"},value:t})]})),bg=De.observer(({store:e})=>{const t=Z.useRef(null);function r(){const n=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose;return n?Ft.poseToWandelscriptString(n):""}return wr(()=>{t.current&&(t.current.textContent=r())}),s.jsx(E.Stack,{alignItems:"left",spacing:2,sx:{padding:"8px 16px",paddingTop:"16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:s.jsx(eu,{label:"Pose",value:r(),ref:t})})});function Sg(){this.__data__=[],this.size=0}function tu(e,t){return e===t||e!==e&&t!==t}function ga(e,t){for(var r=e.length;r--;)if(tu(e[r][0],t))return r;return-1}var xg=Array.prototype,wg=xg.splice;function jg(e){var t=this.__data__,r=ga(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():wg.call(t,r,1),--this.size,!0}function Rg(e){var t=this.__data__,r=ga(t,e);return r<0?void 0:t[r][1]}function Cg(e){return ga(this.__data__,e)>-1}function Ag(e,t){var r=this.__data__,n=ga(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ot(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ot.prototype.clear=Sg;Ot.prototype.delete=jg;Ot.prototype.get=Rg;Ot.prototype.has=Cg;Ot.prototype.set=Ag;function Pg(){this.__data__=new Ot,this.size=0}function Og(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Tg(e){return this.__data__.get(e)}function Mg(e){return this.__data__.has(e)}var Ig="[object AsyncFunction]",Eg="[object Function]",kg="[object GeneratorFunction]",Lg="[object Proxy]";function ru(e){if(!Xt(e))return!1;var t=Qt(e);return t==Eg||t==kg||t==Ig||t==Lg}var Ja=bt["__core-js_shared__"],ai=function(){var e=/[^.]+$/.exec(Ja&&Ja.keys&&Ja.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function $g(e){return!!ai&&ai in e}var Ng=Function.prototype,Fg=Ng.toString;function er(e){if(e!=null){try{return Fg.call(e)}catch{}try{return e+""}catch{}}return""}var Dg=/[\\^$.*+?()[\]{}|]/g,Bg=/^\[object .+?Constructor\]$/,Ug=Function.prototype,Jg=Object.prototype,Vg=Ug.toString,Gg=Jg.hasOwnProperty,zg=RegExp("^"+Vg.call(Gg).replace(Dg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Wg(e){if(!Xt(e)||$g(e))return!1;var t=ru(e)?zg:Bg;return t.test(er(e))}function Kg(e,t){return e==null?void 0:e[t]}function tr(e,t){var r=Kg(e,t);return Wg(r)?r:void 0}var Zr=tr(bt,"Map"),Qr=tr(Object,"create");function Hg(){this.__data__=Qr?Qr(null):{},this.size=0}function qg(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Xg="__lodash_hash_undefined__",Yg=Object.prototype,Zg=Yg.hasOwnProperty;function Qg(e){var t=this.__data__;if(Qr){var r=t[e];return r===Xg?void 0:r}return Zg.call(t,e)?t[e]:void 0}var ey=Object.prototype,ty=ey.hasOwnProperty;function ry(e){var t=this.__data__;return Qr?t[e]!==void 0:ty.call(t,e)}var ny="__lodash_hash_undefined__";function ay(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Qr&&t===void 0?ny:t,this}function Zt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Zt.prototype.clear=Hg;Zt.prototype.delete=qg;Zt.prototype.get=Qg;Zt.prototype.has=ry;Zt.prototype.set=ay;function oy(){this.size=0,this.__data__={hash:new Zt,map:new(Zr||Ot),string:new Zt}}function sy(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ya(e,t){var r=e.__data__;return sy(t)?r[typeof t=="string"?"string":"hash"]:r.map}function iy(e){var t=ya(this,e).delete(e);return this.size-=t?1:0,t}function ly(e){return ya(this,e).get(e)}function uy(e){return ya(this,e).has(e)}function cy(e,t){var r=ya(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Tt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Tt.prototype.clear=oy;Tt.prototype.delete=iy;Tt.prototype.get=ly;Tt.prototype.has=uy;Tt.prototype.set=cy;var dy=200;function my(e,t){var r=this.__data__;if(r instanceof Ot){var n=r.__data__;if(!Zr||n.length<dy-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Tt(n)}return r.set(e,t),this.size=r.size,this}function Ct(e){var t=this.__data__=new Ot(e);this.size=t.size}Ct.prototype.clear=Pg;Ct.prototype.delete=Og;Ct.prototype.get=Tg;Ct.prototype.has=Mg;Ct.prototype.set=my;var hy="__lodash_hash_undefined__";function fy(e){return this.__data__.set(e,hy),this}function py(e){return this.__data__.has(e)}function Kn(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Tt;++t<r;)this.add(e[t])}Kn.prototype.add=Kn.prototype.push=fy;Kn.prototype.has=py;function gy(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function yy(e,t){return e.has(t)}var _y=1,vy=2;function nu(e,t,r,n,a,o){var i=r&_y,l=e.length,u=t.length;if(l!=u&&!(i&&u>l))return!1;var c=o.get(e),d=o.get(t);if(c&&d)return c==t&&d==e;var h=-1,m=!0,v=r&vy?new Kn:void 0;for(o.set(e,t),o.set(t,e);++h<l;){var y=e[h],_=t[h];if(n)var g=i?n(_,y,h,t,e,o):n(y,_,h,e,t,o);if(g!==void 0){if(g)continue;m=!1;break}if(v){if(!gy(t,function(x,j){if(!yy(v,j)&&(y===x||a(y,x,r,n,o)))return v.push(j)})){m=!1;break}}else if(!(y===_||a(y,_,r,n,o))){m=!1;break}}return o.delete(e),o.delete(t),m}var oi=bt.Uint8Array;function by(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function Sy(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var xy=1,wy=2,jy="[object Boolean]",Ry="[object Date]",Cy="[object Error]",Ay="[object Map]",Py="[object Number]",Oy="[object RegExp]",Ty="[object Set]",My="[object String]",Iy="[object Symbol]",Ey="[object ArrayBuffer]",ky="[object DataView]",si=Dt?Dt.prototype:void 0,Va=si?si.valueOf:void 0;function Ly(e,t,r,n,a,o,i){switch(r){case ky:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ey:return!(e.byteLength!=t.byteLength||!o(new oi(e),new oi(t)));case jy:case Ry:case Py:return tu(+e,+t);case Cy:return e.name==t.name&&e.message==t.message;case Oy:case My:return e==t+"";case Ay:var l=by;case Ty:var u=n&xy;if(l||(l=Sy),e.size!=t.size&&!u)return!1;var c=i.get(e);if(c)return c==t;n|=wy,i.set(e,t);var d=nu(l(e),l(t),n,a,o,i);return i.delete(e),d;case Iy:if(Va)return Va.call(e)==Va.call(t)}return!1}function $y(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var _t=Array.isArray;function Ny(e,t,r){var n=t(e);return _t(e)?n:$y(n,r(e))}function Fy(e,t){for(var r=-1,n=e==null?0:e.length,a=0,o=[];++r<n;){var i=e[r];t(i,r,e)&&(o[a++]=i)}return o}function Dy(){return[]}var By=Object.prototype,Uy=By.propertyIsEnumerable,ii=Object.getOwnPropertySymbols,Jy=ii?function(e){return e==null?[]:(e=Object(e),Fy(ii(e),function(t){return Uy.call(e,t)}))}:Dy;function Vy(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Gy="[object Arguments]";function li(e){return Yt(e)&&Qt(e)==Gy}var au=Object.prototype,zy=au.hasOwnProperty,Wy=au.propertyIsEnumerable,ou=li(function(){return arguments}())?li:function(e){return Yt(e)&&zy.call(e,"callee")&&!Wy.call(e,"callee")};function Ky(){return!1}var su=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ui=su&&typeof module=="object"&&module&&!module.nodeType&&module,Hy=ui&&ui.exports===su,ci=Hy?bt.Buffer:void 0,qy=ci?ci.isBuffer:void 0,co=qy||Ky,Xy=9007199254740991,Yy=/^(?:0|[1-9]\d*)$/;function iu(e,t){var r=typeof e;return t=t??Xy,!!t&&(r=="number"||r!="symbol"&&Yy.test(e))&&e>-1&&e%1==0&&e<t}var Zy=9007199254740991;function Do(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Zy}var Qy="[object Arguments]",e1="[object Array]",t1="[object Boolean]",r1="[object Date]",n1="[object Error]",a1="[object Function]",o1="[object Map]",s1="[object Number]",i1="[object Object]",l1="[object RegExp]",u1="[object Set]",c1="[object String]",d1="[object WeakMap]",m1="[object ArrayBuffer]",h1="[object DataView]",f1="[object Float32Array]",p1="[object Float64Array]",g1="[object Int8Array]",y1="[object Int16Array]",_1="[object Int32Array]",v1="[object Uint8Array]",b1="[object Uint8ClampedArray]",S1="[object Uint16Array]",x1="[object Uint32Array]",de={};de[f1]=de[p1]=de[g1]=de[y1]=de[_1]=de[v1]=de[b1]=de[S1]=de[x1]=!0;de[Qy]=de[e1]=de[m1]=de[t1]=de[h1]=de[r1]=de[n1]=de[a1]=de[o1]=de[s1]=de[i1]=de[l1]=de[u1]=de[c1]=de[d1]=!1;function w1(e){return Yt(e)&&Do(e.length)&&!!de[Qt(e)]}function j1(e){return function(t){return e(t)}}var lu=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zr=lu&&typeof module=="object"&&module&&!module.nodeType&&module,R1=zr&&zr.exports===lu,Ga=R1&&Wl.process,di=function(){try{var e=zr&&zr.require&&zr.require("util").types;return e||Ga&&Ga.binding&&Ga.binding("util")}catch{}}(),mi=di&&di.isTypedArray,uu=mi?j1(mi):w1,C1=Object.prototype,A1=C1.hasOwnProperty;function P1(e,t){var r=_t(e),n=!r&&ou(e),a=!r&&!n&&co(e),o=!r&&!n&&!a&&uu(e),i=r||n||a||o,l=i?Vy(e.length,String):[],u=l.length;for(var c in e)A1.call(e,c)&&!(i&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||iu(c,u)))&&l.push(c);return l}var O1=Object.prototype;function T1(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||O1;return e===r}function M1(e,t){return function(r){return e(t(r))}}var I1=M1(Object.keys,Object),E1=Object.prototype,k1=E1.hasOwnProperty;function L1(e){if(!T1(e))return I1(e);var t=[];for(var r in Object(e))k1.call(e,r)&&r!="constructor"&&t.push(r);return t}function cu(e){return e!=null&&Do(e.length)&&!ru(e)}function Bo(e){return cu(e)?P1(e):L1(e)}function hi(e){return Ny(e,Bo,Jy)}var $1=1,N1=Object.prototype,F1=N1.hasOwnProperty;function D1(e,t,r,n,a,o){var i=r&$1,l=hi(e),u=l.length,c=hi(t),d=c.length;if(u!=d&&!i)return!1;for(var h=u;h--;){var m=l[h];if(!(i?m in t:F1.call(t,m)))return!1}var v=o.get(e),y=o.get(t);if(v&&y)return v==t&&y==e;var _=!0;o.set(e,t),o.set(t,e);for(var g=i;++h<u;){m=l[h];var x=e[m],j=t[m];if(n)var C=i?n(j,x,m,t,e,o):n(x,j,m,e,t,o);if(!(C===void 0?x===j||a(x,j,r,n,o):C)){_=!1;break}g||(g=m=="constructor")}if(_&&!g){var L=e.constructor,R=t.constructor;L!=R&&"constructor"in e&&"constructor"in t&&!(typeof L=="function"&&L instanceof L&&typeof R=="function"&&R instanceof R)&&(_=!1)}return o.delete(e),o.delete(t),_}var mo=tr(bt,"DataView"),ho=tr(bt,"Promise"),fo=tr(bt,"Set"),po=tr(bt,"WeakMap"),fi="[object Map]",B1="[object Object]",pi="[object Promise]",gi="[object Set]",yi="[object WeakMap]",_i="[object DataView]",U1=er(mo),J1=er(Zr),V1=er(ho),G1=er(fo),z1=er(po),Nt=Qt;(mo&&Nt(new mo(new ArrayBuffer(1)))!=_i||Zr&&Nt(new Zr)!=fi||ho&&Nt(ho.resolve())!=pi||fo&&Nt(new fo)!=gi||po&&Nt(new po)!=yi)&&(Nt=function(e){var t=Qt(e),r=t==B1?e.constructor:void 0,n=r?er(r):"";if(n)switch(n){case U1:return _i;case J1:return fi;case V1:return pi;case G1:return gi;case z1:return yi}return t});var W1=1,vi="[object Arguments]",bi="[object Array]",xn="[object Object]",K1=Object.prototype,Si=K1.hasOwnProperty;function H1(e,t,r,n,a,o){var i=_t(e),l=_t(t),u=i?bi:Nt(e),c=l?bi:Nt(t);u=u==vi?xn:u,c=c==vi?xn:c;var d=u==xn,h=c==xn,m=u==c;if(m&&co(e)){if(!co(t))return!1;i=!0,d=!1}if(m&&!d)return o||(o=new Ct),i||uu(e)?nu(e,t,r,n,a,o):Ly(e,t,u,r,n,a,o);if(!(r&W1)){var v=d&&Si.call(e,"__wrapped__"),y=h&&Si.call(t,"__wrapped__");if(v||y){var _=v?e.value():e,g=y?t.value():t;return o||(o=new Ct),a(_,g,r,n,o)}}return m?(o||(o=new Ct),D1(e,t,r,n,a,o)):!1}function _a(e,t,r,n,a){return e===t?!0:e==null||t==null||!Yt(e)&&!Yt(t)?e!==e&&t!==t:H1(e,t,r,n,_a,a)}function q1(e,t){return _a(e,t)}const X1=({store:e})=>{const{t}=vt.useTranslation(),[r,n]=Z.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached);wr(()=>{const o=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;q1(r,o)||n(o)});const a=[];return r.forEach((o,i)=>{o&&a.push(i)}),a.length?s.jsx(E.Typography,{color:"error",sx:{padding:"1rem",textAlign:"center"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:a.map(o=>o+1).join(", ")})}):null},Y1=De.observer(({store:e})=>{const{t}=vt.useTranslation();function r(c,d){(d==="translate"||d==="rotate")&&e.setSelectedCartesianMotionType(d)}So(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}&response_coordinate_system=${e.selectedCoordSystemId}`))},{fireImmediately:!0});async function n(c,d){const h=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose,m=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position;h&&await e.withMotionLock(async()=>{await e.jogger.runIncrementalCartesianMotion({currentTcpPose:h,currentJoints:m,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.velocityInCurrentUnits,axis:c.axis,direction:c.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:d.mm}:{type:"rotate",distanceRads:Ft.degreesToRadians(d.degrees)}})})}async function a(c){if(!e.isLocked){if(e.activeDiscreteIncrement)return n(c,e.activeDiscreteIncrement);c.motionType==="translate"?await e.jogger.startTCPTranslation({axis:c.axis,direction:c.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:c.axis,direction:c.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function o(){e.isLocked||e.activeDiscreteIncrement||await e.jogger.stop()}const i=[{id:"x",color:"#F14D42",icon:s.jsx(Up,{})},{id:"y",color:"#42A705",icon:s.jsx(Vp,{})},{id:"z",color:"#0075FF",icon:s.jsx(zp,{})}];function l(c){return t("General.mm.variable",{amount:c.toFixed(1)})}function u(c){return t("General.degree.variable",{amount:Ft.radiansToDegrees(c).toFixed(1)})}return s.jsxs(E.Stack,{children:[s.jsx(bg,{store:e}),s.jsx(Xp,{store:e}),s.jsxs(E.Stack,{width:"80%",maxWidth:"296px",margin:"auto",marginTop:"16px",children:[s.jsxs(E.ToggleButtonGroup,{value:e.selectedCartesianMotionType,onChange:r,exclusive:!0,"aria-label":t("Jogging.Cartesian.MotionType.lb"),children:[s.jsx(E.ToggleButton,{value:"translate",children:t("Jogging.Cartesian.Translation.bt")}),s.jsx(E.ToggleButton,{value:"rotate",children:t("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&i.map(c=>s.jsx(uo,{color:c.color,disabled:e.isLocked,sx:{marginTop:"12px"},label:s.jsxs(s.Fragment,{children:[c.icon,s.jsx(E.Typography,{sx:{fontSize:"24px",color:"white"},children:c.id.toUpperCase()})]}),getDisplayedValue:()=>{var d;return l(((d=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:d.position[c.id])||0)},startJogging:d=>a({axis:c.id,motionType:"translate",direction:d}),stopJogging:o},c.id)),e.selectedCartesianMotionType==="rotate"&&i.map(c=>s.jsx(uo,{color:c.color,disabled:e.isLocked,sx:{marginTop:"12px"},label:s.jsxs(s.Fragment,{children:[s.jsx(Dp,{}),s.jsx(E.Typography,{sx:{fontSize:"24px",color:"white"},children:c.id.toUpperCase()})]}),getDisplayedValue:()=>{var d,h;return u(((h=(d=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:d.orientation)==null?void 0:h[c.id])||0)},startJogging:d=>a({axis:c.id,motionType:"rotate",direction:d}),stopJogging:o},c.id))]}),s.jsx(Ql,{store:e}),s.jsx(X1,{store:e})]})}),Z1=De.observer(({store:e})=>{const t=Z.useRef(null);vt.useTranslation();function r(){const{joints:n}=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position;return`[${n.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`}return wr(()=>{t.current&&(t.current.textContent=r())}),s.jsx(E.Stack,{alignItems:"left",spacing:2,sx:{padding:"16px","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:s.jsx(eu,{label:"Pose",value:r(),ref:t})})}),Q1=De.observer(({store:e})=>{async function t(n){await e.jogger.startJointRotation({joint:n.joint,direction:n.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function r(){await e.jogger.stop()}return s.jsxs(E.Stack,{children:[s.jsx(Z1,{store:e}),s.jsx(E.Stack,{children:e.jogger.motionStream.joints.map(n=>{var l;const a=(l=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:l[n.index],o=(a==null?void 0:a.lower_limit)!==void 0?Ft.radiansToDegrees(a.lower_limit):void 0,i=(a==null?void 0:a.upper_limit)!==void 0?Ft.radiansToDegrees(a.upper_limit):void 0;return s.jsxs(E.Stack,{direction:"row",alignItems:"center",gap:2,marginTop:"0.8rem",children:[s.jsx(E.Typography,{sx:{flexGrow:1,textAlign:"right"},children:`J${n.index+1}`}),s.jsx(Hl,{disabled:e.isLocked,lowerLimitDegs:o,upperLimitDegs:i,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[n.index];return u!==void 0?Ft.radiansToDegrees(u):void 0},startJogging:u=>t({joint:n.index,direction:u}),stopJogging:r},n.index),s.jsx(E.Typography,{sx:{flexGrow:1}})]},`joint-${n.index}`)})}),s.jsx(Ql,{store:e})]})});var xi=function(){try{var e=tr(Object,"defineProperty");return e({},"",{}),e}catch{}}();function e_(e,t,r){t=="__proto__"&&xi?xi(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function t_(e,t,r,n){for(var a=-1,o=e==null?0:e.length;++a<o;){var i=e[a];t(n,i,r(i),e)}return n}function r_(e){return function(t,r,n){for(var a=-1,o=Object(t),i=n(t),l=i.length;l--;){var u=i[++a];if(r(o[u],u,o)===!1)break}return t}}var n_=r_();function a_(e,t){return e&&n_(e,t,Bo)}function o_(e,t){return function(r,n){if(r==null)return r;if(!cu(r))return e(r,n);for(var a=r.length,o=-1,i=Object(r);++o<a&&n(i[o],o,i)!==!1;);return r}}var s_=o_(a_);function i_(e,t,r,n){return s_(e,function(a,o,i){t(n,a,r(a),i)}),n}var l_=1,u_=2;function c_(e,t,r,n){var a=r.length,o=a;if(e==null)return!o;for(e=Object(e);a--;){var i=r[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){i=r[a];var l=i[0],u=e[l],c=i[1];if(i[2]){if(u===void 0&&!(l in e))return!1}else{var d=new Ct,h;if(!(h===void 0?_a(c,u,l_|u_,n,d):h))return!1}}return!0}function du(e){return e===e&&!Xt(e)}function d_(e){for(var t=Bo(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,du(a)]}return t}function mu(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function m_(e){var t=d_(e);return t.length==1&&t[0][2]?mu(t[0][0],t[0][1]):function(r){return r===e||c_(r,e,t)}}var h_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,f_=/^\w*$/;function Uo(e,t){if(_t(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||pa(e)?!0:f_.test(e)||!h_.test(e)||t!=null&&e in Object(t)}var p_="Expected a function";function Jo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(p_);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var i=e.apply(this,n);return r.cache=o.set(a,i)||o,i};return r.cache=new(Jo.Cache||Tt),r}Jo.Cache=Tt;var g_=500;function y_(e){var t=Jo(e,function(n){return r.size===g_&&r.clear(),n}),r=t.cache;return t}var __=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,v_=/\\(\\)?/g,b_=y_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(__,function(r,n,a,o){t.push(a?o.replace(v_,"$1"):n||r)}),t});function S_(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var x_=1/0,wi=Dt?Dt.prototype:void 0,ji=wi?wi.toString:void 0;function hu(e){if(typeof e=="string")return e;if(_t(e))return S_(e,hu)+"";if(pa(e))return ji?ji.call(e):"";var t=e+"";return t=="0"&&1/e==-x_?"-0":t}function fu(e){return e==null?"":hu(e)}function pu(e,t){return _t(e)?e:Uo(e,t)?[e]:b_(fu(e))}var w_=1/0;function va(e){if(typeof e=="string"||pa(e))return e;var t=e+"";return t=="0"&&1/e==-w_?"-0":t}function gu(e,t){t=pu(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[va(t[r++])];return r&&r==n?e:void 0}function j_(e,t,r){var n=e==null?void 0:gu(e,t);return n===void 0?r:n}function R_(e,t){return e!=null&&t in Object(e)}function C_(e,t,r){t=pu(t,e);for(var n=-1,a=t.length,o=!1;++n<a;){var i=va(t[n]);if(!(o=e!=null&&r(e,i)))break;e=e[i]}return o||++n!=a?o:(a=e==null?0:e.length,!!a&&Do(a)&&iu(i,a)&&(_t(e)||ou(e)))}function A_(e,t){return e!=null&&C_(e,t,R_)}var P_=1,O_=2;function T_(e,t){return Uo(e)&&du(t)?mu(va(e),t):function(r){var n=j_(r,e);return n===void 0&&n===t?A_(r,e):_a(t,n,P_|O_)}}function M_(e){return e}function I_(e){return function(t){return t==null?void 0:t[e]}}function E_(e){return function(t){return gu(t,e)}}function k_(e){return Uo(e)?I_(va(e)):E_(e)}function L_(e){return typeof e=="function"?e:e==null?M_:typeof e=="object"?_t(e)?T_(e[0],e[1]):m_(e):k_(e)}function $_(e,t){return function(r,n){var a=_t(r)?t_:i_,o={};return a(r,e,L_(n),o)}}var wn=$_(function(e,t,r){e_(e,r,t)}),N_=0;function F_(e){var t=++N_;return fu(e)+t}const go=[{id:"0.1",mm:.1,degrees:.05},{id:"1",mm:1,degrees:.5},{id:"5",mm:5,degrees:2.5},{id:"10",mm:10,degrees:5}],D_=[{id:"continuous"},...go];class Vo{constructor(t,r,n,a){var o,i;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=n,this.tcps=a,this.selectedTabId="cartesian",this.manualActivationRequired=!0,this.activationState="inactive",this.activationError=null,this.locks=new Set,this.selectedCoordSystemId="world",this.selectedTcpId="",this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJoggingInProgress=!1,this.translationVelocityMmPerSec=10,this.rotationVelocityDegPerSec=1,this.minTranslationVelocityMmPerSec=5,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.disposers=[];for(const l of n)if(l.coordinate_system===""){l.coordinate_system="world";break}this.selectedCoordSystemId=((o=n[0])==null?void 0:o.coordinate_system)||"world",this.selectedTcpId=((i=a[0])==null?void 0:i.id)||"",mt.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(mt.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,{coordinatesystems:a},{tcps:o}]=await Promise.all([r.api.motionGroupInfos.getMotionGroupSpecification(t.motionGroupId),r.api.coordinateSystems.listCoordinateSystems("ROTATION_VECTOR"),r.api.motionGroupInfos.listTcps(t.motionGroupId,"ROTATION_VECTOR")]);return new Vo(t,n,a||[],o||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}async deactivate(t={}){if(this.activationState==="inactive")return;const r=this.jogger.activeWebsocket;this.activationState="inactive",this.jogger.setJoggingMode("increment"),r&&await r.closed(),t.requireManualReactivation&&mt.runInAction(()=>{this.manualActivationRequired=!0})}async activate(t={}){const{currentTab:r,selectedTcpId:n,activeCoordSystemId:a,activeDiscreteIncrement:o,jogger:i}=this;if(this.activationState!=="loading"&&!(this.manualActivationRequired&&!t.manual)){mt.runInAction(()=>{this.activationState="loading",this.activationError=null});try{await this.jogger.nova.api.controller.setDefaultMode(this.jogger.motionStream.controllerId,"MODE_CONTROL")}catch(l){console.error(l)}if(r.id==="cartesian"){const l={tcpId:n,coordSystemId:a};o?i.setJoggingMode("increment",l):i.setJoggingMode("cartesian",l)}else i.setJoggingMode("joint");if(i.activeWebsocket)try{i.stop(),await i.activeWebsocket.nextMessage()}catch(l){mt.runInAction(()=>{this.activationState="inactive",this.activationError=l});return}mt.runInAction(()=>{this.activationState="active",t.manual&&(this.manualActivationRequired=!1)})}}loadFromLocalStorage(){const t=Ft.tryParseJson(localStorage.getItem("joggingToolStore"));t&&(this.tabsById[t.selectedTabId]&&(this.selectedTabId=t.selectedTabId),this.coordSystemsById[t.selectedCoordSystemId]&&(this.selectedCoordSystemId=t.selectedCoordSystemId),this.tcpsById[t.selectedTcpId]&&(this.selectedTcpId=t.selectedTcpId),this.incrementOptionsById[t.selectedIncrementId]&&(this.selectedIncrementId=t.selectedIncrementId),["translate","rotate"].includes(t.selectedCartesianMotionType)&&(this.selectedCartesianMotionType=t.selectedCartesianMotionType),["coordsys","tool"].includes(t.selectedOrientation)&&(this.selectedOrientation=t.selectedOrientation))}saveToLocalStorage(){localStorage.setItem("joggingToolStore",JSON.stringify(this.localStorageSave))}get isLocked(){return this.locks.size>0}get localStorageSave(){return{selectedTabId:this.selectedTabId,selectedCoordSystemId:this.selectedCoordSystemId,selectedTcpId:this.selectedTcpId,selectedOrientation:this.selectedOrientation,selectedIncrementId:this.selectedIncrementId,selectedCartesianMotionType:this.selectedCartesianMotionType}}get tabs(){return[{id:"cartesian",label:"Cartesian"},{id:"joint",label:"Joint"}]}get incrementOptions(){return D_}get discreteIncrementOptions(){return go}get incrementOptionsById(){return wn(this.incrementOptions,t=>t.id)}get tabsById(){return wn(this.tabs,t=>t.id)}get currentTab(){return this.tabsById[this.selectedTabId]||this.tabs[0]}get tabIndex(){return this.tabs.indexOf(this.currentTab)}get coordSystemsById(){return wn(this.coordSystems,t=>t.coordinate_system)}get selectedCoordSystem(){return this.coordSystemsById[this.selectedCoordSystemId]}get activeCoordSystemId(){return this.selectedOrientation==="tool"?"tool":this.selectedCoordSystemId}get tcpsById(){return wn(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:go.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}get velocityInCurrentUnits(){return this.currentMotionType==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityDegPerSec}get minVelocityInCurrentUnits(){return this.currentMotionType==="translate"?this.minTranslationVelocityMmPerSec:this.minRotationVelocityDegPerSec}get maxVelocityInCurrentUnits(){return this.currentMotionType==="translate"?this.maxTranslationVelocityMmPerSec:this.maxRotationVelocityDegPerSec}get currentMotionType(){return this.selectedTabId==="cartesian"&&this.selectedCartesianMotionType==="translate"?"translate":"rotate"}onTabChange(t,r){const n=this.tabs[r]||this.tabs[0];this.selectedTabId=n.id}setSelectedCoordSystemId(t){this.selectedCoordSystemId=t}setSelectedTcpId(t){this.selectedTcpId=t}setSelectedOrientation(t){this.selectedOrientation=t}setSelectedIncrementId(t){this.selectedIncrementId=t}setIncrementJoggingInProgress(t){this.incrementJoggingInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}async withMotionLock(t){const r=F_();this.locks.add(r);try{return await t()}finally{this.locks.delete(r)}}}const Ri=e=>s.jsx(E.Stack,{position:"absolute",left:0,top:0,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{backgroundColor:"rgba(0, 0, 0, 0.5)",backdropFilter:"blur(10px)",zIndex:100},...e}),B_=en(De.observer(e=>{vt.useTranslation();const t=Ci.isString(e.nova)?new Ft.NovaClient({instanceUrl:e.nova}):e.nova,r=De.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){mt.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{const a=await t.connectJogger(e.motionGroupId),o=await Vo.loadFor(a);mt.runInAction(()=>{r.joggingStore=o}),e.onSetup&&e.onSetup(o)}catch(a){r.loadingError=a}}return Z.useEffect(()=>(n(),()=>{var a;(a=r.joggingStore)==null||a.dispose()}),[e.nova]),Z.useEffect(()=>{const a=r.joggingStore;a&&(e.locked?a.locks.add("external"):a.locks.delete("external"))},[e.locked]),s.jsx(E.Stack,{sx:{maxWidth:"460px",minWidth:"350px",overflowY:"auto",position:"relative",height:"100%"},children:s.jsx(E.Paper,{sx:{height:"100%"},children:r.joggingStore?s.jsx(U_,{store:r.joggingStore,children:e.children}):s.jsx(ea,{message:"Loading jogging",error:r.loadingError})})})})),U_=De.observer(({store:e,children:t})=>{const{t:r}=vt.useTranslation();Z.useEffect(()=>{function o(){e.deactivate()}function i(){e.activate()}return window.addEventListener("blur",o),window.addEventListener("focus",i),()=>{window.removeEventListener("blur",o),window.removeEventListener("focus",i)}}),So(()=>[e.currentTab,e.selectedTcpId,e.activeCoordSystemId,e.activeDiscreteIncrement],()=>{e.activationState==="active"&&e.activate()});function n(){if(e.activationState==="inactive"&&!e.activationError)return s.jsx(Ri,{children:s.jsx(E.Button,{color:"primary",variant:"contained",onClick:()=>e.activate({manual:!0}),disabled:e.isLocked,children:r("Jogging.Activate.bt")})});if(e.activationState==="loading"||e.activationError)return s.jsx(Ri,{children:s.jsx(ea,{message:r("Jogging.Activating.lb"),error:e.activationError})})}function a(){if(e.currentTab.id==="cartesian")return s.jsxs(s.Fragment,{children:[s.jsx(Y1,{store:e}),t]});if(e.currentTab.id==="joint")return s.jsxs(s.Fragment,{children:[s.jsx(Q1,{store:e}),t]})}return s.jsxs(E.Stack,{flexGrow:1,height:"100%",children:[s.jsx(E.Tabs,{value:e.tabIndex,onChange:e.onTabChange,children:e.tabs.map(o=>s.jsx(E.Tab,{label:o.label,id:`jogging-tab-${o.id}`,"aria-controls":`jogging-tab-${o.id}`},o.id))}),s.jsxs(E.Stack,{flexGrow:1,position:"relative",children:[n(),a()]})]})});function J_(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function V_({baseUrl:e=J_(),...t}){return s.jsxs(E.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:[s.jsx(E.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),s.jsxs(E.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[s.jsx(E.Typography,{color:"#fff",children:"Found no devices to connect to."}),s.jsx(E.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),s.jsx(E.DialogActions,{children:s.jsxs(E.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[s.jsx(E.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),s.jsx(E.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const G_=Array(6).fill(2*Math.PI),ft={white:"#FFFFFF",midnightblue:"#001337",lightbuttonblue:"#47D3FF",midnightgray:"#DDE0E4",midnightgray500:"#828B9B",skyblue500:"#06B8F1",skyblue600:"#0094CE",darkishblue:"#262F42",darkestblue:"#101629",grayishblue:"#505968",darkgrayishblue:"#363c4b",scaryred:"#FF0E65",tealGreen:"#1AC0B2",magenta:"#EA3785"},z_={mode:"dark",colors:{primary:ft.skyblue500,textDefault:ft.white,textSubtle:ft.midnightgray,background:{default:ft.darkishblue,panel:ft.darkestblue}}},W_={mode:"light",colors:{primary:ft.skyblue500,textDefault:ft.darkishblue,textSubtle:ft.midnightgray,background:{default:ft.skyblue500,panel:ft.white}}};function K_(e){var a,o,i,l;let t=!0;((a=e.palette)==null?void 0:a.mode)==="light"?t=!1:((o=e.palette)==null?void 0:o.mode)!=="dark"&&(t=!(typeof window<"u"&&((l=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-color-scheme: light)"))==null?void 0:l.matches)));const r=t?z_:W_,n=lo({palette:{mode:r.mode,primary:{main:r.colors.primary},background:{default:r.colors.background.default,paper:r.colors.background.panel}},typography:{allVariants:{color:r.colors.textDefault}},components:{MuiSelect:{styleOverrides:{root:{backgroundColor:t?"#505968":void 0,borderRadius:"10px",color:"currentColor","& > div":{padding:"4px 16px"},"& fieldset":{border:t?"none":void 0}}}},MuiChip:{styleOverrides:{root:{backgroundColor:t?"#505968":void 0,borderRadius:"10px",color:"currentColor"}}},MuiToggleButtonGroup:{styleOverrides:{root:{"& > button":{borderRadius:"8px",textTransform:"none",paddingTop:"4px",paddingBottom:"4px",width:"100%",borderWidth:0,backgroundColor:t?"#3d4455":void 0,color:t?"rgba(255, 255, 255, 0.8)":void 0,"&.Mui-selected":t?{color:"white",backgroundColor:"#505968"}:void 0}}}},MuiTabs:{styleOverrides:{root:{backgroundColor:t?"#101629":void 0,minHeight:"42px"}}},MuiTab:{styleOverrides:{root:{minHeight:"42px",textTransform:"none","&.Mui-selected":t?{color:"white",backgroundColor:"#404554"}:void 0}}}},nova:r});return e?lo(n,e):n}exports.JoggingCartesianAxisControl=uo;exports.JoggingJointRotationControl=Hl;exports.JoggingPanel=B_;exports.LoadingCover=ea;exports.LoadingErrorMessage=rl;exports.NoMotionGroupModal=V_;exports.PresetEnvironment=lm;exports.Robot=im;exports.SafetyZonesRenderer=dm;exports.SupportedRobot=sl;exports.VelocitySlider=Zl;exports.WandelscriptEditor=$d;exports.createNovaMuiTheme=K_;exports.defaultAxisConfig=G_;exports.defaultGetModel=xo;exports.useAnimationFrame=wr;exports.useAutorun=ol;exports.useMounted=ta;exports.useReaction=So;
|
|
84
84
|
//# sourceMappingURL=index.cjs.map
|