@wandelbots/wandelbots-js-react-components 1.36.4 → 1.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs
CHANGED
|
@@ -80,5 +80,5 @@ const theme2 = createTheme({ palette: {
|
|
|
80
80
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[Vs]=this[Vs]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Fr(s);n[a]||(Gh(o,s),n[a]=!0)}return x.isArray(t)?t.forEach(i):i(t),this}};De.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(De.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});x.freezeMethods(De);function Vo(e,t){const r=this||ln,n=t||r,o=De.from(n.headers);let i=n.data;return x.forEach(e,function(a){i=a.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Il(e){return!!(e&&e.__CANCEL__)}function Or(e,t,r){J.call(this,e??"canceled",J.ERR_CANCELED,t,r),this.name="CanceledError"}x.inherits(Or,J,{__CANCEL__:!0});function Ll(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new J("Request failed with status code "+r.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function qh(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Kh(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[i];s||(s=c),r[o]=l,n[o]=c;let d=i,f=0;for(;d!==o;)f+=r[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-s<t)return;const v=u&&c-u;return v?Math.round(f*1e3/v):void 0}}function Yh(e,t){let r=0,n=1e3/t,o,i;const s=(c,u=Date.now())=>{r=u,o=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?s(c,u):(o=c,i||(i=setTimeout(()=>{i=null,s(o)},n-d)))},()=>o&&s(o)]}const zn=(e,t,r=3)=>{let n=0;const o=Kh(50,250);return Yh(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,l=s-n,c=o(l),u=s<=a;n=s;const d={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-s)/c:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},r)},Bs=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Us=e=>(...t)=>x.asap(()=>e(...t)),Xh=Me.hasStandardBrowserEnv?function(){const t=Me.navigator&&/(msie|trident)/i.test(Me.navigator.userAgent),r=document.createElement("a");let n;function o(i){let s=i;return t&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(s){const a=x.isString(s)?o(s):s;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}(),Zh=Me.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];x.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),x.isString(n)&&s.push("path="+n),x.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Qh(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function em(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Nl(e,t){return e&&!Qh(t)?em(e,t):t}const zs=e=>e instanceof De?{...e}:e;function qt(e,t){t=t||{};const r={};function n(c,u,d){return x.isPlainObject(c)&&x.isPlainObject(u)?x.merge.call({caseless:d},c,u):x.isPlainObject(u)?x.merge({},u):x.isArray(u)?u.slice():u}function o(c,u,d){if(x.isUndefined(u)){if(!x.isUndefined(c))return n(void 0,c,d)}else return n(c,u,d)}function i(c,u){if(!x.isUndefined(u))return n(void 0,u)}function s(c,u){if(x.isUndefined(u)){if(!x.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function a(c,u,d){if(d in t)return n(c,u);if(d in e)return n(void 0,c)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,u)=>o(zs(c),zs(u),!0)};return x.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||o,f=d(e[u],t[u],u);x.isUndefined(f)&&d!==a||(r[u]=f)}),r}const Ml=e=>{const t=qt({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=De.from(s),t.url=kl(Nl(t.baseURL,t.url),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(x.isFormData(r)){if(Me.hasStandardBrowserEnv||Me.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Me.hasStandardBrowserEnv&&(n&&x.isFunction(n)&&(n=n(t)),n||n!==!1&&Xh(t.url))){const c=o&&i&&Zh.read(i);c&&s.set(o,c)}return t},tm=typeof XMLHttpRequest<"u",rm=tm&&function(e){return new Promise(function(r,n){const o=Ml(e);let i=o.data;const s=De.from(o.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=o,u,d,f,v,y;function m(){v&&v(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function S(){if(!h)return;const k=De.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),w={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:k,config:e,request:h};Ll(function(R){r(R),m()},function(R){n(R),m()},w),h=null}"onloadend"in h?h.onloadend=S:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(S)},h.onabort=function(){h&&(n(new J("Request aborted",J.ECONNABORTED,e,h)),h=null)},h.onerror=function(){n(new J("Network Error",J.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let O=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const w=o.transitional||jl;o.timeoutErrorMessage&&(O=o.timeoutErrorMessage),n(new J(O,w.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,h)),h=null},i===void 0&&s.setContentType(null),"setRequestHeader"in h&&x.forEach(s.toJSON(),function(O,w){h.setRequestHeader(w,O)}),x.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),a&&a!=="json"&&(h.responseType=o.responseType),c&&([f,y]=zn(c,!0),h.addEventListener("progress",f)),l&&h.upload&&([d,v]=zn(l),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(u=k=>{h&&(n(!k||k.type?new Or(null,e,h):k),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const T=qh(o.url);if(T&&Me.protocols.indexOf(T)===-1){n(new J("Unsupported protocol "+T+":",J.ERR_BAD_REQUEST,e));return}h.send(i||null)})},nm=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const i=function(c){if(!o){o=!0,a();const u=c instanceof Error?c:this.reason;n.abort(u instanceof J?u:new Or(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,i(new J(`timeout ${t} of ms exceeded`,J.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=n;return l.unsubscribe=()=>x.asap(a),l}},om=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},im=async function*(e,t){for await(const r of sm(e))yield*om(r,t)},sm=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Js=(e,t,r,n)=>{const o=im(e,t);let i=0,s,a=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){a(),l.close();return}let d=u.byteLength;if(r){let f=i+=d;r(f)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),o.return()}},{highWaterMark:2})},ho=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Dl=ho&&typeof ReadableStream=="function",am=ho&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Fl=(e,...t)=>{try{return!!e(...t)}catch{return!1}},lm=Dl&&Fl(()=>{let e=!1;const t=new Request(Me.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Hs=64*1024,si=Dl&&Fl(()=>x.isReadableStream(new Response("").body)),Jn={stream:si&&(e=>e.body)};ho&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Jn[t]&&(Jn[t]=x.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new J(`Response type '${t}' is not supported`,J.ERR_NOT_SUPPORT,n)})})})(new Response);const cm=async e=>{if(e==null)return 0;if(x.isBlob(e))return e.size;if(x.isSpecCompliantForm(e))return(await new Request(Me.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(x.isArrayBufferView(e)||x.isArrayBuffer(e))return e.byteLength;if(x.isURLSearchParams(e)&&(e=e+""),x.isString(e))return(await am(e)).byteLength},um=async(e,t)=>{const r=x.toFiniteNumber(e.getContentLength());return r??cm(t)},fm=ho&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Ml(e);c=c?(c+"").toLowerCase():"text";let v=nm([o,i&&i.toAbortSignal()],s),y;const m=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let h;try{if(l&&lm&&r!=="get"&&r!=="head"&&(h=await um(u,n))!==0){let w=new Request(t,{method:"POST",body:n,duplex:"half"}),C;if(x.isFormData(n)&&(C=w.headers.get("content-type"))&&u.setContentType(C),w.body){const[R,z]=Bs(h,zn(Us(l)));n=Js(w.body,Hs,R,z)}}x.isString(d)||(d=d?"include":"omit");const S="credentials"in Request.prototype;y=new Request(t,{...f,signal:v,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:S?d:void 0});let T=await fetch(y);const k=si&&(c==="stream"||c==="response");if(si&&(a||k&&m)){const w={};["status","statusText","headers"].forEach(se=>{w[se]=T[se]});const C=x.toFiniteNumber(T.headers.get("content-length")),[R,z]=a&&Bs(C,zn(Us(a),!0))||[];T=new Response(Js(T.body,Hs,R,()=>{z&&z(),m&&m()}),w)}c=c||"text";let O=await Jn[x.findKey(Jn,c)||"text"](T,e);return!k&&m&&m(),await new Promise((w,C)=>{Ll(w,C,{data:O,headers:De.from(T.headers),status:T.status,statusText:T.statusText,config:e,request:y})})}catch(S){throw m&&m(),S&&S.name==="TypeError"&&/fetch/i.test(S.message)?Object.assign(new J("Network Error",J.ERR_NETWORK,e,y),{cause:S.cause||S}):J.from(S,S&&S.code,e,y)}}),ai={http:Ch,xhr:rm,fetch:fm};x.forEach(ai,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ws=e=>`- ${e}`,dm=e=>x.isFunction(e)||e===null||e===!1,Vl={getAdapter:e=>{e=x.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){r=e[i];let s;if(n=r,!dm(r)&&(n=ai[(s=String(r)).toLowerCase()],n===void 0))throw new J(`Unknown adapter '${s}'`);if(n)break;o[s||"#"+i]=n}if(!n){const i=Object.entries(o).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
|
|
81
81
|
`+i.map(Ws).join(`
|
|
82
82
|
`):" "+Ws(i[0]):"as no adapter specified";throw new J("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:ai};function Bo(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Or(null,e)}function Gs(e){return Bo(e),e.headers=De.from(e.headers),e.data=Vo.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vl.getAdapter(e.adapter||ln.adapter)(e).then(function(n){return Bo(e),n.data=Vo.call(e,e.transformResponse,n),n.headers=De.from(n.headers),n},function(n){return Il(n)||(Bo(e),n&&n.response&&(n.response.data=Vo.call(e,e.transformResponse,n.response),n.response.headers=De.from(n.response.headers))),Promise.reject(n)})}const Bl="1.7.7",Ni={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ni[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const qs={};Ni.transitional=function(t,r,n){function o(i,s){return"[Axios v"+Bl+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(t===!1)throw new J(o(s," has been removed"+(r?" in "+r:"")),J.ERR_DEPRECATED);return r&&!qs[s]&&(qs[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,a):!0}};function pm(e,t,r){if(typeof e!="object")throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const a=e[i],l=a===void 0||s(a,i,e);if(l!==!0)throw new J("option "+i+" must be "+l,J.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new J("Unknown option "+i,J.ERR_BAD_OPTION)}}const li={assertOptions:pm,validators:Ni},At=li.validators;let Jt=class{constructor(t){this.defaults=t,this.interceptors={request:new Fs,response:new Fs}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
83
|
-
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=qt(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&li.assertOptions(n,{silentJSONParsing:At.transitional(At.boolean),forcedJSONParsing:At.transitional(At.boolean),clarifyTimeoutError:At.transitional(At.boolean)},!1),o!=null&&(x.isFunction(o)?r.paramsSerializer={serialize:o}:li.assertOptions(o,{encode:At.function,serialize:At.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&x.merge(i.common,i[r.method]);i&&x.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),r.headers=De.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,f;if(!l){const y=[Gs.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,c),f=y.length,u=Promise.resolve(r);d<f;)u=u.then(y[d++],y[d++]);return u}f=a.length;let v=r;for(d=0;d<f;){const y=a[d++],m=a[d++];try{v=y(v)}catch(h){m.call(this,h);break}}try{u=Gs.call(this,v)}catch(y){return Promise.reject(y)}for(d=0,f=c.length;d<f;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=qt(this.defaults,t);const r=Nl(t.baseURL,t.url);return kl(r,t.params,t.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(t){Jt.prototype[t]=function(r,n){return this.request(qt(n||{},{method:t,url:r,data:(n||{}).data}))}});x.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,a){return this.request(qt(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Jt.prototype[t]=r(),Jt.prototype[t+"Form"]=r(!0)});let gm=class Ul{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,a){n.reason||(n.reason=new Or(i,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Ul(function(o){t=o}),cancel:t}}};function hm(e){return function(r){return e.apply(null,r)}}function mm(e){return x.isObject(e)&&e.isAxiosError===!0}const ci={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ci).forEach(([e,t])=>{ci[t]=e});function zl(e){const t=new Jt(e),r=vl(Jt.prototype.request,t);return x.extend(r,Jt.prototype,t,{allOwnKeys:!0}),x.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return zl(qt(e,o))},r}const xe=zl(ln);xe.Axios=Jt;xe.CanceledError=Or;xe.CancelToken=gm;xe.isCancel=Il;xe.VERSION=Bl;xe.toFormData=go;xe.AxiosError=J;xe.Cancel=xe.CanceledError;xe.all=function(t){return Promise.all(t)};xe.spread=hm;xe.isAxiosError=mm;xe.mergeConfig=qt;xe.AxiosHeaders=De;xe.formToJSON=e=>Al(x.isHTMLForm(e)?new FormData(e):e);xe.getAdapter=Vl.getAdapter;xe.HttpStatusCode=ci;xe.default=xe;const{Axios:J1,AxiosError:Ks,CanceledError:H1,isCancel:W1,CancelToken:G1,VERSION:q1,all:K1,Cancel:Y1,isAxiosError:X1,spread:Z1,toFormData:Q1,AxiosHeaders:ev,HttpStatusCode:tv,formToJSON:rv,getAdapter:nv,mergeConfig:ov}=xe;function ym(e){try{return JSON.stringify(e)}catch{return}}function bm(e){var t,r,n,o;return e instanceof Ks&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof Ks&&e.response?`${(t=e.response)==null?void 0:t.status} ${(r=e.response)==null?void 0:r.statusText} from ${(n=e.response)==null?void 0:n.config.url}: ${JSON.stringify((o=e.response)==null?void 0:o.data)}`:e instanceof Error?e.message:`Unexpected error: ${ym(e)||e}`}const mo=e=>{const t=e.softTimeout||3e3,[r,n]=W.useState(!1),o=$.useTheme();return W.useEffect(()=>{const i=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(i)}),b.jsx($.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:o.palette.text.primary},children:e.error?b.jsx(Jl,{loadingMessage:e.message,error:e.error}):b.jsxs(b.Fragment,{children:[b.jsx($.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&b.jsx("div",{children:e.message}),b.jsx($.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:o.palette.text.secondary},children:"This is taking longer than expected..."})]})})},Jl=e=>{const t=bm(e.error),r=e.error instanceof Error?e.error.stack:null,n=$.useTheme();return b.jsxs($.Stack,{sx:{maxHeight:"100%",maxWidth:"min(100%, 800px)",padding:2,overflow:"auto",color:n.palette.error.main,"& pre":{whiteSpace:"pre-wrap",wordBreak:"break-word",paddingBottom:"3rem"}},children:[(e.loadingMessage?`Error while ${Gn.lowerFirst($.capitalize(e.loadingMessage))} - `:"")+t,b.jsx("br",{}),r&&b.jsx("pre",{children:r})]})},vm=({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"})),xm=W.forwardRef(vm),Sm=({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"})),wm=W.forwardRef(Sm),Tm=({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"})),Om=W.forwardRef(Tm),Em=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C11.0583 14.1 12.5083 12.1667 11.475 12.9L12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z",fill:"white"})),Cm=W.forwardRef(Em),Ys=e=>b.jsx($.Stack,{position:"absolute",left:0,top:0,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{backgroundColor:"rgba(0, 0, 0, 0.6)",backdropFilter:"blur(2px)",zIndex:100,...e.sx||{}},...Gn.omit(e,"sx")}),Hl=ke.observer(({store:e,children:t})=>{const{t:r}=Yt.useTranslation(),n=$.useTheme();function o(){var i,s;if(e.activationState==="inactive"&&!e.activationError)return b.jsx(Ys,{sx:{borderRadius:"6px",backgroundColor:`color-mix(in srgb, ${(i=n.palette.backgroundPaperElevation)==null?void 0:i[5]}, transparent)`},children:b.jsx($.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 b.jsx(Ys,{sx:{backgroundColor:`color-mix(in srgb, ${(s=n.palette.backgroundPaperElevation)==null?void 0:s[5]}, transparent)`},children:b.jsx(mo,{message:r("Jogging.Activating.lb"),error:e.activationError})})}return b.jsxs($.Stack,{sx:{position:"relative",padding:"6px"},children:[o(),t]})});function Rm(){this.__data__=[],this.size=0}function Wl(e,t){return e===t||e!==e&&t!==t}function yo(e,t){for(var r=e.length;r--;)if(Wl(e[r][0],t))return r;return-1}var _m=Array.prototype,Pm=_m.splice;function $m(e){var t=this.__data__,r=yo(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Pm.call(t,r,1),--this.size,!0}function km(e){var t=this.__data__,r=yo(t,e);return r<0?void 0:t[r][1]}function jm(e){return yo(this.__data__,e)>-1}function Am(e,t){var r=this.__data__,n=yo(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ct(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])}}Ct.prototype.clear=Rm;Ct.prototype.delete=$m;Ct.prototype.get=km;Ct.prototype.has=jm;Ct.prototype.set=Am;function Im(){this.__data__=new Ct,this.size=0}function Lm(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Nm(e){return this.__data__.get(e)}function Mm(e){return this.__data__.has(e)}var Dm="[object AsyncFunction]",Fm="[object Function]",Vm="[object GeneratorFunction]",Bm="[object Proxy]";function Gl(e){if(!Wt(e))return!1;var t=Xt(e);return t==Fm||t==Vm||t==Dm||t==Bm}var Uo=bt["__core-js_shared__"],Xs=function(){var e=/[^.]+$/.exec(Uo&&Uo.keys&&Uo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Um(e){return!!Xs&&Xs in e}var zm=Function.prototype,Jm=zm.toString;function Zt(e){if(e!=null){try{return Jm.call(e)}catch{}try{return e+""}catch{}}return""}var Hm=/[\\^$.*+?()[\]{}|]/g,Wm=/^\[object .+?Constructor\]$/,Gm=Function.prototype,qm=Object.prototype,Km=Gm.toString,Ym=qm.hasOwnProperty,Xm=RegExp("^"+Km.call(Ym).replace(Hm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zm(e){if(!Wt(e)||Um(e))return!1;var t=Gl(e)?Xm:Wm;return t.test(Zt(e))}function Qm(e,t){return e==null?void 0:e[t]}function Qt(e,t){var r=Qm(e,t);return Zm(r)?r:void 0}var Yr=Qt(bt,"Map"),Xr=Qt(Object,"create");function ey(){this.__data__=Xr?Xr(null):{},this.size=0}function ty(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ry="__lodash_hash_undefined__",ny=Object.prototype,oy=ny.hasOwnProperty;function iy(e){var t=this.__data__;if(Xr){var r=t[e];return r===ry?void 0:r}return oy.call(t,e)?t[e]:void 0}var sy=Object.prototype,ay=sy.hasOwnProperty;function ly(e){var t=this.__data__;return Xr?t[e]!==void 0:ay.call(t,e)}var cy="__lodash_hash_undefined__";function uy(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Xr&&t===void 0?cy:t,this}function Kt(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])}}Kt.prototype.clear=ey;Kt.prototype.delete=ty;Kt.prototype.get=iy;Kt.prototype.has=ly;Kt.prototype.set=uy;function fy(){this.size=0,this.__data__={hash:new Kt,map:new(Yr||Ct),string:new Kt}}function dy(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function bo(e,t){var r=e.__data__;return dy(t)?r[typeof t=="string"?"string":"hash"]:r.map}function py(e){var t=bo(this,e).delete(e);return this.size-=t?1:0,t}function gy(e){return bo(this,e).get(e)}function hy(e){return bo(this,e).has(e)}function my(e,t){var r=bo(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Rt(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])}}Rt.prototype.clear=fy;Rt.prototype.delete=py;Rt.prototype.get=gy;Rt.prototype.has=hy;Rt.prototype.set=my;var yy=200;function by(e,t){var r=this.__data__;if(r instanceof Ct){var n=r.__data__;if(!Yr||n.length<yy-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Rt(n)}return r.set(e,t),this.size=r.size,this}function Tt(e){var t=this.__data__=new Ct(e);this.size=t.size}Tt.prototype.clear=Im;Tt.prototype.delete=Lm;Tt.prototype.get=Nm;Tt.prototype.has=Mm;Tt.prototype.set=by;var vy="__lodash_hash_undefined__";function xy(e){return this.__data__.set(e,vy),this}function Sy(e){return this.__data__.has(e)}function Hn(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Rt;++t<r;)this.add(e[t])}Hn.prototype.add=Hn.prototype.push=xy;Hn.prototype.has=Sy;function wy(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 Ty(e,t){return e.has(t)}var Oy=1,Ey=2;function ql(e,t,r,n,o,i){var s=r&Oy,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,v=r&Ey?new Hn:void 0;for(i.set(e,t),i.set(t,e);++d<a;){var y=e[d],m=t[d];if(n)var h=s?n(m,y,d,t,e,i):n(y,m,d,e,t,i);if(h!==void 0){if(h)continue;f=!1;break}if(v){if(!wy(t,function(S,T){if(!Ty(v,T)&&(y===S||o(y,S,r,n,i)))return v.push(T)})){f=!1;break}}else if(!(y===m||o(y,m,r,n,i))){f=!1;break}}return i.delete(e),i.delete(t),f}var Zs=bt.Uint8Array;function Cy(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function Ry(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var _y=1,Py=2,$y="[object Boolean]",ky="[object Date]",jy="[object Error]",Ay="[object Map]",Iy="[object Number]",Ly="[object RegExp]",Ny="[object Set]",My="[object String]",Dy="[object Symbol]",Fy="[object ArrayBuffer]",Vy="[object DataView]",Qs=Nt?Nt.prototype:void 0,zo=Qs?Qs.valueOf:void 0;function By(e,t,r,n,o,i,s){switch(r){case Vy:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Fy:return!(e.byteLength!=t.byteLength||!i(new Zs(e),new Zs(t)));case $y:case ky:case Iy:return Wl(+e,+t);case jy:return e.name==t.name&&e.message==t.message;case Ly:case My:return e==t+"";case Ay:var a=Cy;case Ny:var l=n&_y;if(a||(a=Ry),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=Py,s.set(e,t);var u=ql(a(e),a(t),n,o,i,s);return s.delete(e),u;case Dy:if(zo)return zo.call(e)==zo.call(t)}return!1}function Uy(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var yt=Array.isArray;function zy(e,t,r){var n=t(e);return yt(e)?n:Uy(n,r(e))}function Jy(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}function Hy(){return[]}var Wy=Object.prototype,Gy=Wy.propertyIsEnumerable,ea=Object.getOwnPropertySymbols,qy=ea?function(e){return e==null?[]:(e=Object(e),Jy(ea(e),function(t){return Gy.call(e,t)}))}:Hy;function Ky(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Yy="[object Arguments]";function ta(e){return Gt(e)&&Xt(e)==Yy}var Kl=Object.prototype,Xy=Kl.hasOwnProperty,Zy=Kl.propertyIsEnumerable,Yl=ta(function(){return arguments}())?ta:function(e){return Gt(e)&&Xy.call(e,"callee")&&!Zy.call(e,"callee")};function Qy(){return!1}var Xl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ra=Xl&&typeof module=="object"&&module&&!module.nodeType&&module,eb=ra&&ra.exports===Xl,na=eb?bt.Buffer:void 0,tb=na?na.isBuffer:void 0,ui=tb||Qy,rb=9007199254740991,nb=/^(?:0|[1-9]\d*)$/;function Zl(e,t){var r=typeof e;return t=t??rb,!!t&&(r=="number"||r!="symbol"&&nb.test(e))&&e>-1&&e%1==0&&e<t}var ob=9007199254740991;function Mi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ob}var ib="[object Arguments]",sb="[object Array]",ab="[object Boolean]",lb="[object Date]",cb="[object Error]",ub="[object Function]",fb="[object Map]",db="[object Number]",pb="[object Object]",gb="[object RegExp]",hb="[object Set]",mb="[object String]",yb="[object WeakMap]",bb="[object ArrayBuffer]",vb="[object DataView]",xb="[object Float32Array]",Sb="[object Float64Array]",wb="[object Int8Array]",Tb="[object Int16Array]",Ob="[object Int32Array]",Eb="[object Uint8Array]",Cb="[object Uint8ClampedArray]",Rb="[object Uint16Array]",_b="[object Uint32Array]",ue={};ue[xb]=ue[Sb]=ue[wb]=ue[Tb]=ue[Ob]=ue[Eb]=ue[Cb]=ue[Rb]=ue[_b]=!0;ue[ib]=ue[sb]=ue[bb]=ue[ab]=ue[vb]=ue[lb]=ue[cb]=ue[ub]=ue[fb]=ue[db]=ue[pb]=ue[gb]=ue[hb]=ue[mb]=ue[yb]=!1;function Pb(e){return Gt(e)&&Mi(e.length)&&!!ue[Xt(e)]}function $b(e){return function(t){return e(t)}}var Ql=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zr=Ql&&typeof module=="object"&&module&&!module.nodeType&&module,kb=zr&&zr.exports===Ql,Jo=kb&&ml.process,oa=function(){try{var e=zr&&zr.require&&zr.require("util").types;return e||Jo&&Jo.binding&&Jo.binding("util")}catch{}}(),ia=oa&&oa.isTypedArray,ec=ia?$b(ia):Pb,jb=Object.prototype,Ab=jb.hasOwnProperty;function Ib(e,t){var r=yt(e),n=!r&&Yl(e),o=!r&&!n&&ui(e),i=!r&&!n&&!o&&ec(e),s=r||n||o||i,a=s?Ky(e.length,String):[],l=a.length;for(var c in e)Ab.call(e,c)&&!(s&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Zl(c,l)))&&a.push(c);return a}var Lb=Object.prototype;function Nb(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Lb;return e===r}function Mb(e,t){return function(r){return e(t(r))}}var Db=Mb(Object.keys,Object),Fb=Object.prototype,Vb=Fb.hasOwnProperty;function Bb(e){if(!Nb(e))return Db(e);var t=[];for(var r in Object(e))Vb.call(e,r)&&r!="constructor"&&t.push(r);return t}function tc(e){return e!=null&&Mi(e.length)&&!Gl(e)}function Di(e){return tc(e)?Ib(e):Bb(e)}function sa(e){return zy(e,Di,qy)}var Ub=1,zb=Object.prototype,Jb=zb.hasOwnProperty;function Hb(e,t,r,n,o,i){var s=r&Ub,a=sa(e),l=a.length,c=sa(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var f=a[d];if(!(s?f in t:Jb.call(t,f)))return!1}var v=i.get(e),y=i.get(t);if(v&&y)return v==t&&y==e;var m=!0;i.set(e,t),i.set(t,e);for(var h=s;++d<l;){f=a[d];var S=e[f],T=t[f];if(n)var k=s?n(T,S,f,t,e,i):n(S,T,f,e,t,i);if(!(k===void 0?S===T||o(S,T,r,n,i):k)){m=!1;break}h||(h=f=="constructor")}if(m&&!h){var O=e.constructor,w=t.constructor;O!=w&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof w=="function"&&w instanceof w)&&(m=!1)}return i.delete(e),i.delete(t),m}var fi=Qt(bt,"DataView"),di=Qt(bt,"Promise"),pi=Qt(bt,"Set"),gi=Qt(bt,"WeakMap"),aa="[object Map]",Wb="[object Object]",la="[object Promise]",ca="[object Set]",ua="[object WeakMap]",fa="[object DataView]",Gb=Zt(fi),qb=Zt(Yr),Kb=Zt(di),Yb=Zt(pi),Xb=Zt(gi),It=Xt;(fi&&It(new fi(new ArrayBuffer(1)))!=fa||Yr&&It(new Yr)!=aa||di&&It(di.resolve())!=la||pi&&It(new pi)!=ca||gi&&It(new gi)!=ua)&&(It=function(e){var t=Xt(e),r=t==Wb?e.constructor:void 0,n=r?Zt(r):"";if(n)switch(n){case Gb:return fa;case qb:return aa;case Kb:return la;case Yb:return ca;case Xb:return ua}return t});var Zb=1,da="[object Arguments]",pa="[object Array]",mn="[object Object]",Qb=Object.prototype,ga=Qb.hasOwnProperty;function e0(e,t,r,n,o,i){var s=yt(e),a=yt(t),l=s?pa:It(e),c=a?pa:It(t);l=l==da?mn:l,c=c==da?mn:c;var u=l==mn,d=c==mn,f=l==c;if(f&&ui(e)){if(!ui(t))return!1;s=!0,u=!1}if(f&&!u)return i||(i=new Tt),s||ec(e)?ql(e,t,r,n,o,i):By(e,t,l,r,n,o,i);if(!(r&Zb)){var v=u&&ga.call(e,"__wrapped__"),y=d&&ga.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,h=y?t.value():t;return i||(i=new Tt),o(m,h,r,n,i)}}return f?(i||(i=new Tt),Hb(e,t,r,n,o,i)):!1}function vo(e,t,r,n,o){return e===t?!0:e==null||t==null||!Gt(e)&&!Gt(t)?e!==e&&t!==t:e0(e,t,r,n,vo,o)}function t0(e,t){return vo(e,t)}const rc=({store:e})=>{const{t}=Yt.useTranslation(),[r,n]=W.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),o=W.useRef(r);wr(()=>{const s=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;t0(o.current,s)||(o.current=s,n(s))});const i=[];for(const[s,a]of r.entries())a&&i.push(s);return i.length===0?null:b.jsx($.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",visibility:i.length?"visible":"collapse"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:i.map(s=>s+1).join(", ")})})},r0=$.styled($.FormControl)(({theme:e})=>({"&.MuiFormControl-root":{".MuiSelect-select":{paddingTop:"20px",paddingLeft:"12px"},label:{pointerEvents:"none",fontSize:"16px"},".MuiInputLabel-root":{"&.Mui-focused":{color:e.palette.text.primary}}}}));function yn({labelValue:e,...t}){return b.jsxs(r0,{fullWidth:!0,variant:"filled",children:[b.jsx($.InputLabel,{id:t.labelId,children:e}),b.jsx($.Select,{...t})]})}var ha=function(){try{var e=Qt(Object,"defineProperty");return e({},"",{}),e}catch{}}();function n0(e,t,r){t=="__proto__"&&ha?ha(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function o0(e,t,r,n){for(var o=-1,i=e==null?0:e.length;++o<i;){var s=e[o];t(n,s,r(s),e)}return n}function i0(e){return function(t,r,n){for(var o=-1,i=Object(t),s=n(t),a=s.length;a--;){var l=s[++o];if(r(i[l],l,i)===!1)break}return t}}var s0=i0();function a0(e,t){return e&&s0(e,t,Di)}function l0(e,t){return function(r,n){if(r==null)return r;if(!tc(r))return e(r,n);for(var o=r.length,i=-1,s=Object(r);++i<o&&n(s[i],i,s)!==!1;);return r}}var c0=l0(a0);function u0(e,t,r,n){return c0(e,function(o,i,s){t(n,o,r(o),s)}),n}var f0=1,d0=2;function p0(e,t,r,n){var o=r.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var s=r[o];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){s=r[o];var a=s[0],l=e[a],c=s[1];if(s[2]){if(l===void 0&&!(a in e))return!1}else{var u=new Tt,d;if(!(d===void 0?vo(c,l,f0|d0,n,u):d))return!1}}return!0}function nc(e){return e===e&&!Wt(e)}function g0(e){for(var t=Di(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,nc(o)]}return t}function oc(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function h0(e){var t=g0(e);return t.length==1&&t[0][2]?oc(t[0][0],t[0][1]):function(r){return r===e||p0(r,e,t)}}var m0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,y0=/^\w*$/;function Fi(e,t){if(yt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||co(e)?!0:y0.test(e)||!m0.test(e)||t!=null&&e in Object(t)}var b0="Expected a function";function Vi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(b0);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(Vi.Cache||Rt),r}Vi.Cache=Rt;var v0=500;function x0(e){var t=Vi(e,function(n){return r.size===v0&&r.clear(),n}),r=t.cache;return t}var S0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w0=/\\(\\)?/g,T0=x0(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(S0,function(r,n,o,i){t.push(o?i.replace(w0,"$1"):n||r)}),t});function O0(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var E0=1/0,ma=Nt?Nt.prototype:void 0,ya=ma?ma.toString:void 0;function ic(e){if(typeof e=="string")return e;if(yt(e))return O0(e,ic)+"";if(co(e))return ya?ya.call(e):"";var t=e+"";return t=="0"&&1/e==-E0?"-0":t}function sc(e){return e==null?"":ic(e)}function ac(e,t){return yt(e)?e:Fi(e,t)?[e]:T0(sc(e))}var C0=1/0;function xo(e){if(typeof e=="string"||co(e))return e;var t=e+"";return t=="0"&&1/e==-C0?"-0":t}function lc(e,t){t=ac(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[xo(t[r++])];return r&&r==n?e:void 0}function R0(e,t,r){var n=e==null?void 0:lc(e,t);return n===void 0?r:n}function _0(e,t){return e!=null&&t in Object(e)}function P0(e,t,r){t=ac(t,e);for(var n=-1,o=t.length,i=!1;++n<o;){var s=xo(t[n]);if(!(i=e!=null&&r(e,s)))break;e=e[s]}return i||++n!=o?i:(o=e==null?0:e.length,!!o&&Mi(o)&&Zl(s,o)&&(yt(e)||Yl(e)))}function $0(e,t){return e!=null&&P0(e,t,_0)}var k0=1,j0=2;function A0(e,t){return Fi(e)&&nc(t)?oc(xo(e),t):function(r){var n=R0(r,e);return n===void 0&&n===t?$0(r,e):vo(t,n,k0|j0)}}function I0(e){return e}function L0(e){return function(t){return t==null?void 0:t[e]}}function N0(e){return function(t){return lc(t,e)}}function M0(e){return Fi(e)?L0(xo(e)):N0(e)}function D0(e){return typeof e=="function"?e:e==null?I0:typeof e=="object"?yt(e)?A0(e[0],e[1]):h0(e):M0(e)}function F0(e,t){return function(r,n){var o=yt(r)?o0:u0,i={};return o(r,e,D0(n),i)}}var bn=F0(function(e,t,r){n0(e,r,t)}),V0=0;function B0(e){var t=++V0;return sc(e)+t}const hi=[{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}],U0=[{id:"continuous"},...hi],z0=["coordsys","tool"];class Bi{constructor(t,r,n,o){var i,s;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=n,this.tcps=o,this.selectedTabId="cartesian",this.manualActivationRequired=!0,this.activationState="inactive",this.activationError=null,this.activationCounter=0,this.locks=new Set,this.selectedCoordSystemId="world",this.selectedTcpId="",this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJogInProgress=null,this.translationVelocityMmPerSec=10,this.rotationVelocityDegPerSec=1,this.minTranslationVelocityMmPerSec=5,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.disposers=[];for(const a of n)if(a.coordinate_system===""){a.coordinate_system="world";break}this.selectedCoordSystemId=((i=n[0])==null?void 0:i.coordinate_system)||"world",this.selectedTcpId=((s=o[0])==null?void 0:s.id)||"",dt.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(dt.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,{coordinatesystems:o},{tcps:i}]=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 Bi(t,n,o||[],i||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return Gn.countBy(this.coordSystems,t=>t.name)}async deactivate(t={}){if(this.activationState==="inactive")return;const r=this.jogger.activeWebsocket;this.activationState="inactive",this.jogger.setJoggingMode("increment"),r&&await r.closed();try{await this.jogger.nova.api.motionGroupJogging.stopJogging(this.jogger.motionGroupId)}catch(n){console.error(n)}t.requireManualReactivation&&dt.runInAction(()=>{this.manualActivationRequired=!0})}async activate(t={}){if(!(this.manualActivationRequired&&!t.manual)){dt.runInAction(()=>{this.activationState="loading",this.activationError=null});try{await this.jogger.nova.api.controller.setDefaultMode(this.jogger.motionStream.controllerId,"MODE_CONTROL")}catch(r){console.error(r)}if(this.currentTab.id==="cartesian"){const r={tcpId:this.selectedTcpId,coordSystemId:this.activeCoordSystemId};this.activeDiscreteIncrement?this.jogger.setJoggingMode("increment",r):this.jogger.setJoggingMode("cartesian",r)}else this.jogger.setJoggingMode("joint");if(this.jogger.activeWebsocket)try{this.jogger.stop(),await this.jogger.activeWebsocket.nextMessage()}catch(r){dt.runInAction(()=>{this.activationState="inactive",this.activationError=r});return}dt.runInAction(()=>{this.activationState="active",t.manual&&(this.manualActivationRequired=!1)})}}loadFromLocalStorage(){const t=Lt.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 U0}get discreteIncrementOptions(){return hi}get incrementOptionsById(){return bn(this.incrementOptions,t=>t.id)}get tabsById(){return bn(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 bn(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 bn(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:hi.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}setCurrentIncrementJog(t){this.incrementJogInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}async withMotionLock(t){const r=B0();this.locks.add(r);try{return await t()}finally{this.locks.delete(r)}}}const J0=ke.observer(({store:e})=>{var n;const{t}=Yt.useTranslation();function r(o){switch(o){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return o}}return b.jsxs($.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"min-height min-height","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:[b.jsx(yn,{labelId:"jogging-coord-select",labelValue:"Coordinate Sys.",value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:o=>{e.setSelectedCoordSystemId(o.target.value)},disabled:e.isLocked,children:e.coordSystems.map(o=>b.jsx($.MenuItem,{value:o.coordinate_system,children:o.name&&e.coordSystemCountByName[o.name]>1?`${o.name} / ${o.coordinate_system}`:o.name||o.coordinate_system},o.coordinate_system))}),b.jsx(yn,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:o=>{e.setSelectedTcpId(o.target.value)},disabled:e.isLocked,children:e.tcps.map(o=>b.jsx($.MenuItem,{value:o.id,children:o.id},o.id))}),b.jsx(yn,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:o=>{e.setSelectedOrientation(o.target.value)},disabled:e.isLocked,children:z0.map(o=>b.jsx($.MenuItem,{value:o,children:r(o)},o))}),b.jsxs(yn,{labelValue:"Increment",labelId:"jogging-increment-select",size:"small",variant:"filled",value:((n=e.activeDiscreteIncrement)==null?void 0:n.id)||"continuous",onChange:o=>{e.setSelectedIncrementId(o.target.value)},disabled:e.isLocked,children:[b.jsx($.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(o=>b.jsx($.MenuItem,{value:o.id,children:e.currentMotionType==="translate"?`${o.mm}mm`:`${o.degrees}°`},o.id))]})]})}),H0=$.styled($.ToggleButtonGroup)(({theme:e})=>{var t;return{"&.MuiToggleButtonGroup-root":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[8],borderRadius:"8px",padding:"4px",gap:"4px",button:{border:"none",borderRadius:"4px",flex:"1 1 0px",minWidth:0,"&.MuiToggleButtonGroup-firstButton":{borderRadius:"8px 4px 4px 8px"},"&.MuiToggleButtonGroup-lastButton":{borderRadius:"4px 8px 8px 4px"}}}}});function W0(e,t,r=(n,o)=>n===o){return e.length===t.length&&e.every((n,o)=>r(n,t[o]))}const G0=2;function cc(e,t){return e-t}function ba(e,t){var r;const{index:n}=(r=e.reduce((o,i,s)=>{const a=Math.abs(t-i);return o===null||a<o.distance||a===o.distance?{distance:a,index:s}:o},null))!=null?r:{};return n}function vn(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const o=r.changedTouches[n];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Wn(e,t,r){return(e-t)*100/(r-t)}function q0(e,t,r){return(r-t)*e+t}function K0(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 Y0(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(K0(t)))}function va({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(cc)}function xn({sliderRef:e,activeIndex:t,setActive:r}){var n,o;const i=mr(e.current);if(!((n=e.current)!=null&&n.contains(i.activeElement))||Number(i==null||(o=i.activeElement)==null?void 0:o.getAttribute("data-index"))!==t){var s;(s=e.current)==null||s.querySelector(`[type="range"][data-index="${t}"]`).focus()}r&&r(t)}function Sn(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?W0(e,t):!1}const X0={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}%`})}},Z0=e=>e;let wn;function xa(){return wn===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?wn=CSS.supports("touch-action","none"):wn=!0),wn}function Q0(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:o=!1,isRtl:i=!1,marks:s=!1,max:a=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:f="horizontal",rootRef:v,scale:y=Z0,step:m=1,shiftStep:h=10,tabIndex:S,value:T}=e,k=N.useRef(),[O,w]=N.useState(-1),[C,R]=N.useState(-1),[z,se]=N.useState(!1),V=N.useRef(0),[M,G]=Za({controlled:T,default:r??l,name:"Slider"}),q=u&&((P,I,D)=>{const K=P.nativeEvent||P,Q=new K.constructor(K.type,K);Object.defineProperty(Q,"target",{writable:!0,value:{value:I,name:c}}),u(Q,I,D)}),Z=Array.isArray(M);let X=Z?M.slice().sort(cc):[M];X=X.map(P=>P==null?l:dr(P,l,a));const Se=s===!0&&m!==null?[...Array(Math.floor((a-l)/m)+1)].map((P,I)=>({value:l+m*I})):s||[],ce=Se.map(P=>P.value),{isFocusVisibleRef:ee,onBlur:Oe,onFocus:je,ref:nt}=Qa(),[vt,Ge]=N.useState(-1),we=N.useRef(),_t=Nn(nt,we),at=Nn(v,_t),qe=P=>I=>{var D;const K=Number(I.currentTarget.getAttribute("data-index"));je(I),ee.current===!0&&Ge(K),R(K),P==null||(D=P.onFocus)==null||D.call(P,I)},Be=P=>I=>{var D;Oe(I),ee.current===!1&&Ge(-1),R(-1),P==null||(D=P.onBlur)==null||D.call(P,I)},lt=(P,I)=>{const D=Number(P.currentTarget.getAttribute("data-index")),K=X[D],Q=ce.indexOf(K);let Y=I;if(Se&&m==null){const ze=ce[ce.length-1];Y>ze?Y=ze:Y<ce[0]?Y=ce[0]:Y=Y<K?ce[Q-1]:ce[Q+1]}if(Y=dr(Y,l,a),Z){o&&(Y=dr(Y,X[D-1]||-1/0,X[D+1]||1/0));const ze=Y;Y=va({values:X,newValue:Y,index:D});let Ke=D;o||(Ke=Y.indexOf(ze)),xn({sliderRef:we,activeIndex:Ke})}G(Y),Ge(D),q&&!Sn(Y,M)&&q(P,Y,D),d&&d(P,Y)},ct=P=>I=>{var D;if(m!==null){const K=Number(I.currentTarget.getAttribute("data-index")),Q=X[K];let Y=null;(I.key==="ArrowLeft"||I.key==="ArrowDown")&&I.shiftKey||I.key==="PageDown"?Y=Math.max(Q-h,l):((I.key==="ArrowRight"||I.key==="ArrowUp")&&I.shiftKey||I.key==="PageUp")&&(Y=Math.min(Q+h,a)),Y!==null&&(lt(I,Y),I.preventDefault())}P==null||(D=P.onKeyDown)==null||D.call(P,I)};wi(()=>{if(n&&we.current.contains(document.activeElement)){var P;(P=document.activeElement)==null||P.blur()}},[n]),n&&O!==-1&&w(-1),n&&vt!==-1&&Ge(-1);const Dt=P=>I=>{var D;(D=P.onChange)==null||D.call(P,I),lt(I,I.target.valueAsNumber)},xt=N.useRef();let Ue=f;i&&f==="horizontal"&&(Ue+="-reverse");const j=({finger:P,move:I=!1})=>{const{current:D}=we,{width:K,height:Q,bottom:Y,left:ze}=D.getBoundingClientRect();let Ke;Ue.indexOf("vertical")===0?Ke=(Y-P.y)/Q:Ke=(P.x-ze)/K,Ue.indexOf("-reverse")!==-1&&(Ke=1-Ke);let re;if(re=q0(Ke,l,a),m)re=Y0(re,m,l);else{const kt=ba(ce,re);re=ce[kt]}re=dr(re,l,a);let Le=0;if(Z){I?Le=xt.current:Le=ba(X,re),o&&(re=dr(re,X[Le-1]||-1/0,X[Le+1]||1/0));const kt=re;re=va({values:X,newValue:re,index:Le}),o&&I||(Le=re.indexOf(kt),xt.current=Le)}return{newValue:re,activeIndex:Le}},te=Rn(P=>{const I=vn(P,k);if(!I)return;if(V.current+=1,P.type==="mousemove"&&P.buttons===0){de(P);return}const{newValue:D,activeIndex:K}=j({finger:I,move:!0});xn({sliderRef:we,activeIndex:K,setActive:w}),G(D),!z&&V.current>G0&&se(!0),q&&!Sn(D,M)&&q(P,D,K)}),de=Rn(P=>{const I=vn(P,k);if(se(!1),!I)return;const{newValue:D}=j({finger:I,move:!0});w(-1),P.type==="touchend"&&R(-1),d&&d(P,D),k.current=void 0,Ie()}),Ae=Rn(P=>{if(n)return;xa()||P.preventDefault();const I=P.changedTouches[0];I!=null&&(k.current=I.identifier);const D=vn(P,k);if(D!==!1){const{newValue:Q,activeIndex:Y}=j({finger:D});xn({sliderRef:we,activeIndex:Y,setActive:w}),G(Q),q&&!Sn(Q,M)&&q(P,Q,Y)}V.current=0;const K=mr(we.current);K.addEventListener("touchmove",te,{passive:!0}),K.addEventListener("touchend",de,{passive:!0})}),Ie=N.useCallback(()=>{const P=mr(we.current);P.removeEventListener("mousemove",te),P.removeEventListener("mouseup",de),P.removeEventListener("touchmove",te),P.removeEventListener("touchend",de)},[de,te]);N.useEffect(()=>{const{current:P}=we;return P.addEventListener("touchstart",Ae,{passive:xa()}),()=>{P.removeEventListener("touchstart",Ae),Ie()}},[Ie,Ae]),N.useEffect(()=>{n&&Ie()},[n,Ie]);const Pt=P=>I=>{var D;if((D=P.onMouseDown)==null||D.call(P,I),n||I.defaultPrevented||I.button!==0)return;I.preventDefault();const K=vn(I,k);if(K!==!1){const{newValue:Y,activeIndex:ze}=j({finger:K});xn({sliderRef:we,activeIndex:ze,setActive:w}),G(Y),q&&!Sn(Y,M)&&q(I,Y,ze)}V.current=0;const Q=mr(we.current);Q.addEventListener("mousemove",te,{passive:!0}),Q.addEventListener("mouseup",de)},Te=Wn(Z?X[0]:l,l,a),$t=Wn(X[X.length-1],l,a)-Te,Ft=(P={})=>{const I=_n(P),D={onMouseDown:Pt(I||{})},K=_({},I,D);return _({},P,{ref:at},K)},Er=P=>I=>{var D;(D=P.onMouseOver)==null||D.call(P,I);const K=Number(I.currentTarget.getAttribute("data-index"));R(K)},Cr=P=>I=>{var D;(D=P.onMouseLeave)==null||D.call(P,I),R(-1)};return{active:O,axis:Ue,axisProps:X0,dragging:z,focusedThumbIndex:vt,getHiddenInputProps:(P={})=>{var I;const D=_n(P),K={onChange:Dt(D||{}),onFocus:qe(D||{}),onBlur:Be(D||{}),onKeyDown:ct(D||{})},Q=_({},D,K);return _({tabIndex:S,"aria-labelledby":t,"aria-orientation":f,"aria-valuemax":y(a),"aria-valuemin":y(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(I=e.step)!=null?I:void 0,disabled:n},P,Q,{style:_({},td,{direction:i?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Ft,getThumbProps:(P={})=>{const I=_n(P),D={onMouseOver:Er(I||{}),onMouseLeave:Cr(I||{})};return _({},P,I,D)},marks:Se,open:C,range:Z,rootRef:at,trackLeap:$t,trackOffset:Te,values:X,getThumbStyle:P=>({pointerEvents:O!==-1&&O!==P?"none":void 0})}}const e1=e=>!e||!Br(e);function t1(e){return nn("MuiSlider",e)}const Qe=Ga("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"]),r1=e=>{const{open:t}=e;return{offset:mt(t&&Qe.valueLabelOpen),circle:Qe.valueLabelCircle,label:Qe.valueLabelLabel}};function uc(e){const{children:t,className:r,value:n}=e,o=r1(e);return t?N.cloneElement(t,{className:mt(t.props.className)},b.jsxs(N.Fragment,{children:[t.props.children,b.jsx("span",{className:mt(o.offset,r),"aria-hidden":!0,children:b.jsx("span",{className:o.circle,children:b.jsx("span",{className:o.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(uc.propTypes={children:p.element.isRequired,className:p.string,value:p.node});const n1=["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 Sa(e){return e}const o1=Et("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${Ce(r.color)}`],r.size!=="medium"&&t[`size${Ce(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"},[`&.${Qe.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Qe.dragging}`]:{[`& .${Qe.thumb}, & .${Qe.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}}]}}),i1=Et("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}}]}),s1=Et("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:_({},e.vars?{backgroundColor:e.vars.palette.Slider[`${r}Track`],borderColor:e.vars.palette.Slider[`${r}Track`]}:_({backgroundColor:ei(e.palette[r].main,.62),borderColor:ei(e.palette[r].main,.62)},e.applyStyles("dark",{backgroundColor:Qo(e.palette[r].main,.5)}),e.applyStyles("dark",{borderColor:Qo(e.palette[r].main,.5)})))}))]}}),a1=Et("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${Ce(r.color)}`],r.size!=="medium"&&t[`thumbSize${Ce(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%)"},[`&.${Qe.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, &.${Qe.focusVisible}`]:_({},e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[r].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${ds(e.palette[r].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${Qe.active}`]:_({},e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[r].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${ds(e.palette[r].main,.16)}`})}}))]}}),l1=Et(uc,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e})=>_({zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${Qe.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%"},[`&.${Qe.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"}}]})),c1=Et("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>_i(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}}]})),u1=Et("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>_i(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e})=>_({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]})),f1=e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:i,classes:s,color:a,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",o==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",a&&`color${Ce(a)}`,l&&`size${Ce(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${Ce(l)}`,a&&`thumbColor${Ce(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Oi(c,t1,s)},d1=({children:e})=>e,fc=N.forwardRef(function(t,r){var n,o,i,s,a,l,c,u,d,f,v,y,m,h,S,T,k,O,w,C,R,z,se,V;const M=Pi({props:t,name:"MuiSlider"}),G=ad(),{"aria-label":q,"aria-valuetext":Z,"aria-labelledby":X,component:Se="span",components:ce={},componentsProps:ee={},color:Oe="primary",classes:je,className:nt,disableSwap:vt=!1,disabled:Ge=!1,getAriaLabel:we,getAriaValueText:_t,marks:at=!1,max:qe=100,min:Be=0,orientation:lt="horizontal",shiftStep:ct=10,size:Dt="medium",step:xt=1,scale:Ue=Sa,slotProps:j,slots:te,track:de="normal",valueLabelDisplay:Ae="off",valueLabelFormat:Ie=Sa}=M,Pt=Ve(M,n1),Te=_({},M,{isRtl:G,max:qe,min:Be,classes:je,disabled:Ge,disableSwap:vt,orientation:lt,marks:at,color:Oe,size:Dt,step:xt,shiftStep:ct,scale:Ue,track:de,valueLabelDisplay:Ae,valueLabelFormat:Ie}),{axisProps:$t,getRootProps:Ft,getHiddenInputProps:Er,getThumbProps:Cr,open:Rr,active:er,axis:ot,focusedThumbIndex:P,range:I,dragging:D,marks:K,values:Q,trackOffset:Y,trackLeap:ze,getThumbStyle:Ke}=Q0(_({},Te,{rootRef:r}));Te.marked=K.length>0&&K.some(L=>L.label),Te.dragging=D,Te.focusedThumbIndex=P;const re=f1(Te),Le=(n=(o=te==null?void 0:te.root)!=null?o:ce.Root)!=null?n:o1,kt=(i=(s=te==null?void 0:te.rail)!=null?s:ce.Rail)!=null?i:i1,tr=(a=(l=te==null?void 0:te.track)!=null?l:ce.Track)!=null?a:s1,_r=(c=(u=te==null?void 0:te.thumb)!=null?u:ce.Thumb)!=null?c:a1,St=(d=(f=te==null?void 0:te.valueLabel)!=null?f:ce.ValueLabel)!=null?d:l1,Vt=(v=(y=te==null?void 0:te.mark)!=null?y:ce.Mark)!=null?v:c1,Bt=(m=(h=te==null?void 0:te.markLabel)!=null?h:ce.MarkLabel)!=null?m:u1,Pr=(S=(T=te==null?void 0:te.input)!=null?T:ce.Input)!=null?S:"input",$r=(k=j==null?void 0:j.root)!=null?k:ee.root,cn=(O=j==null?void 0:j.rail)!=null?O:ee.rail,kr=(w=j==null?void 0:j.track)!=null?w:ee.track,rr=(C=j==null?void 0:j.thumb)!=null?C:ee.thumb,nr=(R=j==null?void 0:j.valueLabel)!=null?R:ee.valueLabel,So=(z=j==null?void 0:j.mark)!=null?z:ee.mark,wo=(se=j==null?void 0:j.markLabel)!=null?se:ee.markLabel,un=(V=j==null?void 0:j.input)!=null?V:ee.input,fn=jt({elementType:Le,getSlotProps:Ft,externalSlotProps:$r,externalForwardedProps:Pt,additionalProps:_({},e1(Le)&&{as:Se}),ownerState:_({},Te,$r==null?void 0:$r.ownerState),className:[re.root,nt]}),To=jt({elementType:kt,externalSlotProps:cn,ownerState:Te,className:re.rail}),Oo=jt({elementType:tr,externalSlotProps:kr,additionalProps:{style:_({},$t[ot].offset(Y),$t[ot].leap(ze))},ownerState:_({},Te,kr==null?void 0:kr.ownerState),className:re.track}),jr=jt({elementType:_r,getSlotProps:Cr,externalSlotProps:rr,ownerState:_({},Te,rr==null?void 0:rr.ownerState),className:re.thumb}),Eo=jt({elementType:St,externalSlotProps:nr,ownerState:_({},Te,nr==null?void 0:nr.ownerState),className:re.valueLabel}),g=jt({elementType:Vt,externalSlotProps:So,ownerState:Te,className:re.mark}),E=jt({elementType:Bt,externalSlotProps:wo,ownerState:Te,className:re.markLabel}),A=jt({elementType:Pr,getSlotProps:Er,externalSlotProps:un,ownerState:Te});return b.jsxs(Le,_({},fn,{children:[b.jsx(kt,_({},To)),b.jsx(tr,_({},Oo)),K.filter(L=>L.value>=Be&&L.value<=qe).map((L,F)=>{const ne=Wn(L.value,Be,qe),H=$t[ot].offset(ne);let B;return de===!1?B=Q.indexOf(L.value)!==-1:B=de==="normal"&&(I?L.value>=Q[0]&&L.value<=Q[Q.length-1]:L.value<=Q[0])||de==="inverted"&&(I?L.value<=Q[0]||L.value>=Q[Q.length-1]:L.value>=Q[0]),b.jsxs(N.Fragment,{children:[b.jsx(Vt,_({"data-index":F},g,!Br(Vt)&&{markActive:B},{style:_({},H,g.style),className:mt(g.className,B&&re.markActive)})),L.label!=null?b.jsx(Bt,_({"aria-hidden":!0,"data-index":F},E,!Br(Bt)&&{markLabelActive:B},{style:_({},H,E.style),className:mt(re.markLabel,E.className,B&&re.markLabelActive),children:L.label})):null]},F)}),Q.map((L,F)=>{const ne=Wn(L,Be,qe),H=$t[ot].offset(ne),B=Ae==="off"?d1:St;return b.jsx(B,_({},!Br(B)&&{valueLabelFormat:Ie,valueLabelDisplay:Ae,value:typeof Ie=="function"?Ie(Ue(L),F):Ie,index:F,open:Rr===F||er===F||Ae==="on",disabled:Ge},Eo,{children:b.jsx(_r,_({"data-index":F},jr,{className:mt(re.thumb,jr.className,er===F&&re.active,P===F&&re.focusVisible),style:_({},H,Ke(F),jr.style),children:b.jsx(Pr,_({"data-index":F,"aria-label":we?we(F):q,"aria-valuenow":Ue(L),"aria-labelledby":X,"aria-valuetext":_t?_t(Ue(L),F):Z,value:Q[F]},A))}))}),F)})]}))});process.env.NODE_ENV!=="production"&&(fc.propTypes={"aria-label":os(p.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":p.string,"aria-valuetext":os(p.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:p.node,classes:p.object,className:p.string,color:p.oneOfType([p.oneOf(["primary","secondary","error","info","success","warning"]),p.string]),components:p.shape({Input:p.elementType,Mark:p.elementType,MarkLabel:p.elementType,Rail:p.elementType,Root:p.elementType,Thumb:p.elementType,Track:p.elementType,ValueLabel:p.elementType}),componentsProps:p.shape({input:p.oneOfType([p.func,p.object]),mark:p.oneOfType([p.func,p.object]),markLabel:p.oneOfType([p.func,p.object]),rail:p.oneOfType([p.func,p.object]),root:p.oneOfType([p.func,p.object]),thumb:p.oneOfType([p.func,p.object]),track:p.oneOfType([p.func,p.object]),valueLabel:p.oneOfType([p.func,p.shape({children:p.element,className:p.string,open:p.bool,style:p.object,value:p.number,valueLabelDisplay:p.oneOf(["auto","off","on"])})])}),defaultValue:p.oneOfType([p.arrayOf(p.number),p.number]),disabled:p.bool,disableSwap:p.bool,getAriaLabel:p.func,getAriaValueText:p.func,marks:p.oneOfType([p.arrayOf(p.shape({label:p.node,value:p.number.isRequired})),p.bool]),max:p.number,min:p.number,name:p.string,onChange:p.func,onChangeCommitted:p.func,orientation:p.oneOf(["horizontal","vertical"]),scale:p.func,shiftStep:p.number,size:p.oneOfType([p.oneOf(["small","medium"]),p.string]),slotProps:p.shape({input:p.oneOfType([p.func,p.object]),mark:p.oneOfType([p.func,p.object]),markLabel:p.oneOfType([p.func,p.object]),rail:p.oneOfType([p.func,p.object]),root:p.oneOfType([p.func,p.object]),thumb:p.oneOfType([p.func,p.object]),track:p.oneOfType([p.func,p.object]),valueLabel:p.oneOfType([p.func,p.shape({children:p.element,className:p.string,open:p.bool,style:p.object,value:p.number,valueLabelDisplay:p.oneOf(["auto","off","on"])})])}),slots:p.shape({input:p.elementType,mark:p.elementType,markLabel:p.elementType,rail:p.elementType,root:p.elementType,thumb:p.elementType,track:p.elementType,valueLabel:p.elementType}),step:p.number,sx:p.oneOfType([p.arrayOf(p.oneOfType([p.func,p.object,p.bool])),p.func,p.object]),tabIndex:p.number,track:p.oneOf(["inverted","normal",!1]),value:p.oneOfType([p.arrayOf(p.number),p.number]),valueLabelDisplay:p.oneOf(["auto","off","on"]),valueLabelFormat:p.oneOfType([p.func,p.string])});var p1="[object Number]";function g1(e){return typeof e=="number"||Gt(e)&&Xt(e)==p1}const dc=ke.observer(e=>{$.useTheme();function t(r,n){n===e.velocity||!g1(n)||e.onVelocityChange(n)}return b.jsxs($.Stack,{direction:"row",gap:2,children:[b.jsx(fc,{value:e.velocity,color:"secondary",onChange:t,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),e.renderValue?e.renderValue(e.velocity):b.jsx(Ui,{value:e.velocity.toString()})]})});function Ui({value:e,sx:t}){var n;const r=$.useTheme();return b.jsx($.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(n=r.palette.backgroundPaperElevation)==null?void 0:n[8],borderRadius:"10px",minWidth:"111px",...t},children:b.jsx($.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const pc=ke.observer(({store:e})=>{const{t}=Yt.useTranslation(),r=ke.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?n=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:n})}`:n=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:n})}`}}));return b.jsx(dc,{velocity:e.velocityInCurrentUnits,min:e.minVelocityInCurrentUnits,max:e.maxVelocityInCurrentUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>b.jsx(Ui,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),h1=ke.observer(({store:e,children:t})=>{var d,f,v,y,m,h,S,T,k;const{t:r}=Yt.useTranslation(),n=$.useTheme();function o(O,w){(w==="translate"||w==="rotate")&&e.setSelectedCartesianMotionType(w)}$i(()=>[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 i(O,w){const C=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose,R=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position;C&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:O.axis,direction:O.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:C,currentJoints:R,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.velocityInCurrentUnits,axis:O.axis,direction:O.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:w.mm}:{type:"rotate",distanceRads:Lt.degreesToRadians(w.degrees)}})}finally{e.setCurrentIncrementJog(null)}})}async function s(O){if(!e.isLocked){if(e.activeDiscreteIncrement)return i(O,e.activeDiscreteIncrement);O.motionType==="translate"?await e.jogger.startTCPTranslation({axis:O.axis,direction:O.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:O.axis,direction:O.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function a(){e.isLocked||e.activeDiscreteIncrement||await e.jogger.stop()}const l=[{id:"x",colors:(v=(f=(d=n.componentsExt)==null?void 0:d.JoggingCartesian)==null?void 0:f.Axis)==null?void 0:v.X,icon:b.jsx(xm,{})},{id:"y",colors:(h=(m=(y=n.componentsExt)==null?void 0:y.JoggingCartesian)==null?void 0:m.Axis)==null?void 0:h.Y,icon:b.jsx(wm,{})},{id:"z",colors:(k=(T=(S=n.componentsExt)==null?void 0:S.JoggingCartesian)==null?void 0:T.Axis)==null?void 0:k.Z,icon:b.jsx(Om,{})}];function c(O){return r("General.mm.variable",{amount:O.toFixed(1)})}function u(O){return r("General.degree.variable",{amount:Lt.radiansToDegrees(O).toFixed(1)})}return b.jsxs($.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[b.jsxs($.Stack,{gap:2,children:[b.jsx(J0,{store:e}),b.jsx(pc,{store:e}),b.jsx($.Divider,{})]}),b.jsxs($.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:[b.jsxs(H0,{value:e.selectedCartesianMotionType,onChange:o,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[b.jsx($.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),b.jsx($.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),b.jsx(Hl,{store:e,children:b.jsxs($.Stack,{alignItems:"center",gap:"24px",sx:{flexGrow:1},children:[e.selectedCartesianMotionType==="translate"&&l.map(O=>{var w;return b.jsx(ri,{colors:O.colors,disabled:e.isLocked,activeJoggingDirection:((w=e.incrementJogInProgress)==null?void 0:w.axis)===O.id?e.incrementJogInProgress.direction:void 0,label:b.jsxs(b.Fragment,{children:[O.icon,b.jsx($.Typography,{sx:{fontSize:"24px",color:n.palette.text.primary},children:O.id.toUpperCase()})]}),getDisplayedValue:()=>{var C;return c(((C=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:C.position[O.id])||0)},startJogging:C=>s({axis:O.id,motionType:"translate",direction:C}),stopJogging:a},O.id)}),e.selectedCartesianMotionType==="rotate"&&l.map(O=>{var w;return b.jsx(ri,{colors:O.colors,disabled:e.isLocked,activeJoggingDirection:((w=e.incrementJogInProgress)==null?void 0:w.axis)===O.id?e.incrementJogInProgress.direction:void 0,label:b.jsxs(b.Fragment,{children:[b.jsx(Cm,{}),b.jsx($.Typography,{sx:{fontSize:"24px",color:n.palette.text.primary},children:O.id.toUpperCase()})]}),getDisplayedValue:()=>{var C,R;return u(((R=(C=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:C.orientation)==null?void 0:R[O.id])||0)},startJogging:C=>s({axis:O.id,motionType:"rotate",direction:C}),stopJogging:a},O.id)})]})})]}),b.jsx(rc,{store:e}),t&&b.jsx($.Divider,{}),t]})}),m1=ke.observer(({store:e,children:t})=>{async function r(o){await e.jogger.startJointRotation({joint:o.joint,direction:o.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function n(){await e.jogger.stop()}return b.jsxs($.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[b.jsx(pc,{store:e}),b.jsx($.Divider,{}),b.jsx($.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:b.jsx(Hl,{store:e,children:b.jsx($.Stack,{alignItems:"center",gap:"24px",sx:{flexGrow:1},children:e.jogger.motionStream.joints.map(o=>{var l;const i=(l=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:l[o.index],s=(i==null?void 0:i.lower_limit)!==void 0?Lt.radiansToDegrees(i.lower_limit):void 0,a=(i==null?void 0:i.upper_limit)!==void 0?Lt.radiansToDegrees(i.upper_limit):void 0;return b.jsx(bl,{disabled:e.isLocked,lowerLimitDegs:s,upperLimitDegs:a,getValueDegs:()=>{const c=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[o.index];return c!==void 0?Lt.radiansToDegrees(c):void 0},startJogging:c=>r({joint:o.index,direction:c}),stopJogging:n},`joint-${o.index}`)})})})}),b.jsx(rc,{store:e}),t&&b.jsx($.Divider,{}),t]})}),y1=sn(ke.observer(e=>{const t=Gn.isString(e.nova)?new Lt.NovaClient({instanceUrl:e.nova}):e.nova,r=ke.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){dt.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{const o=await t.connectJogger(e.motionGroupId),i=await Bi.loadFor(o);dt.runInAction(()=>{r.joggingStore=i}),e.onSetup&&e.onSetup(i)}catch(o){r.loadingError=o}}return W.useEffect(()=>(n(),()=>{var o;(o=r.joggingStore)==null||o.dispose()}),[e.nova,e.motionGroupId]),W.useEffect(()=>{const o=r.joggingStore;o&&(e.locked?o.locks.add("external"):o.locks.delete("external"))},[e.locked]),b.jsx($.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?b.jsx(b1,{store:r.joggingStore,children:e.children}):b.jsx(mo,{message:"Loading jogging",error:r.loadingError})})})),b1=ke.observer(({store:e,children:t})=>{W.useEffect(()=>{function n(){e.deactivate()}function o(){e.activate()}return window.addEventListener("blur",n),window.addEventListener("focus",o),()=>{window.removeEventListener("blur",n),window.removeEventListener("focus",o)}}),$i(()=>[e.currentTab.id,e.selectedTcpId,e.activeCoordSystemId,e.activeDiscreteIncrement],()=>{e.activationState!=="inactive"&&e.activate()});function r(){if(e.currentTab.id==="cartesian")return b.jsx(b.Fragment,{children:b.jsx(h1,{store:e,children:t})});if(e.currentTab.id==="joint")return b.jsx(b.Fragment,{children:b.jsx(m1,{store:e,children:t})})}return b.jsxs($.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[b.jsx($.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(n=>b.jsx($.Tab,{label:n.label,id:`jogging-tab-${n.id}`,"aria-controls":`jogging-tab-${n.id}`},n.id))}),b.jsx($.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:r()})]})}),gc=W.forwardRef(({label:e,value:t},r)=>{var a;const n=$.useTheme(),[o,i]=W.useState(!1);async function s(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),i(!0),!0}catch(l){console.error(l);const c=window.getSelection(),u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}return!1}return W.useEffect(()=>{if(!o)return;const l=setTimeout(()=>i(!1),3e3);return()=>{l&&clearTimeout(l)}},[o]),b.jsx($.Tooltip,{open:o,title:"Copied!",children:b.jsx($.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(a=n.palette.backgroundPaperElevation)==null?void 0:a[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>s(),children:b.jsx($.Typography,{ref:r,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:n.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})}),v1=ke.observer(({motionStream:e})=>{const t=W.useRef(null);function r(){const n=e.rapidlyChangingMotionState.tcp_pose;return n?Lt.poseToWandelscriptString(n):""}return wr(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),b.jsx($.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:b.jsx(gc,{value:r(),ref:t})})}),x1=ke.observer(({motionStream:e})=>{const t=W.useRef(null);function r(){const{joints:n}=e.rapidlyChangingMotionState.state.joint_position;return`[${n.map(o=>parseFloat(o.toFixed(4))).join(", ")}]`}return wr(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),b.jsx($.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:b.jsx(gc,{value:r(),ref:t})})});function S1(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function w1({baseUrl:e=S1(),...t}){return b.jsxs($.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:[b.jsx($.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),b.jsxs($.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[b.jsx($.Typography,{color:"#fff",children:"Found no devices to connect to."}),b.jsx($.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),b.jsx($.DialogActions,{children:b.jsxs($.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[b.jsx($.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),b.jsx($.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const T1=Array(6).fill(2*Math.PI),wa="0.0.0-semantically-released";function zi(e){let t=wa;return wa.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function O1(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>mc(r))}function hc(e){return e.name.endsWith("_FLG")}function mc(e){return/_J[0-9]+$/.test(e.name)}function E1(e,t){let r;const n=[];function o(s){return s.length===6}function i(s){if(hc(s)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${s.name}. Only one _FLG group is allowed.`);r=s}mc(s)&&n.push(s),s.children.map(i)}if(i(e.scene),!o(n))throw Error(`Expected to find 6 joint groups in robot model ${t} with names _J01, _J02 etc, found ${n.length}. Only 6-joint robot models are currently supported.`);if(!r)throw Error(`No flange group found in robot model ${t}. Flange must be identified with a name ending in _FLG.`);return{gltf:e}}function yc({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){Ho.Globals.assign({frameLoop:"always"});const o=W.useRef([]),i=W.useRef([]),{invalidate:s}=Pc.useThree();function a(f){f&&(i.current=O1(f),c(),s())}function l(f){o.current=f,d.start(Object.assign({},o.current))}function c(){const f=i.current.map((v,y)=>u[y].get());if(r)r(i.current,f);else for(const[v,y]of i.current.entries()){const m=t[v],h=m.theta||0,S=m.reverse_rotation_direction?-1:1;y.rotation.y=S*f[v]+h}}dl(()=>{const f=e.state.joint_position.joints.filter(v=>v!==void 0);requestAnimationFrame(()=>l(f))});const[u,d]=Ho.useSpring(()=>({...Object.assign({},e.state.joint_position.joints),onChange:()=>{c(),s()},onResolve:()=>{c()}}));return b.jsx("group",{ref:a,children:n})}const Ta="line",Oa="mesh";function C1({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new $e.Matrix4;function o(a,l){const c=new $e.Vector3,u=new $e.Quaternion,d=new $e.Vector3;n.decompose(c,u,d);const f=c.clone(),v=new $e.Matrix4().makeRotationY(a.theta+l*(a.reverse_rotation_direction?-1:1)).multiply(new $e.Matrix4().makeTranslation(0,a.d/1e3,0)).multiply(new $e.Matrix4().makeTranslation(a.a/1e3,0,0)).multiply(new $e.Matrix4().makeRotationX(a.alpha));return n.multiply(v),n.decompose(c,u,d),{a:f,b:c}}function i(a,l,c,u){if(!t)return;const d=t[a];if(!d)return;const{a:f,b:v}=o(d,u);l.geometry.setPositions([f.toArray(),v.toArray()].flat()),c.position.set(v.x,v.y,v.z)}function s(a,l){n.identity(),a.forEach((c,u)=>{i(u,c.getObjectByName(Ta),c.getObjectByName(Oa),l[u])})}return b.jsx(b.Fragment,{children:b.jsx(yc,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:s,children:b.jsxs("group",{...r,name:"Scene",children:[b.jsxs("mesh",{children:[b.jsx("sphereGeometry",{args:[.01,32,32]}),b.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((a,l)=>{const{a:c,b:u}=o(a,e.state.joint_position.joints[l]??0),d=`dhrobot_J0${l}`;return b.jsxs("group",{name:d,children:[b.jsx(ft.Line,{name:Ta,points:[c,u],color:"white",lineWidth:5}),b.jsxs("mesh",{name:Oa,position:u,children:[b.jsx("sphereGeometry",{args:[.01,32,32]}),b.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+l)]},d)})]})})})}const R1=console.warn;function _1(){return W.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&R1(e)}},[]),b.jsx(b.Fragment,{})}function P1(e){return e.type==="Mesh"}function $1({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:o}=E1(ft.useGLTF(e),e.split("/").pop()||e),i=W.useCallback(a=>{a&&r&&r()},[e]);function s(a){return P1(a)?b.jsx("mesh",{name:a.name,geometry:a.geometry,material:a.material,position:a.position,rotation:a.rotation},a.uuid):b.jsx(Ho.animated.group,{name:a.name,position:a.position,rotation:a.rotation,ref:hc(a)?t:void 0,children:a.children.map(s)},a.uuid)}return b.jsx("group",{...n,dispose:null,ref:i,children:s(o.scene)})}const k1=e=>{e.userData.isGhost||(e.traverse(t=>{if(t instanceof $e.Mesh){t.material instanceof $e.Material&&(t.material.colorWrite=!0);const r=t.clone(),n=t.clone();r.material=new $e.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:1}),r.userData.isGhost=!0,n.material=new $e.MeshStandardMaterial({color:"#D91433",opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-1}),n.userData.isGhost=!0,t.parent&&(t.parent.add(r),t.parent.add(n))}}),e.userData.isGhost=!0)},j1=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof $e.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof $e.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!0},bc=sn(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=zi,isGhost:o=!1,flangeRef:i,postModelRender:s,...a})=>{const[l,c]=W.useState(null),u=W.useCallback(f=>{c(f)},[]);W.useEffect(()=>{l&&(o?k1(l):j1(l))},[l,o]);const d=b.jsx(C1,{rapidlyChangingMotionState:e,dhParameters:r,...a});return b.jsxs(jc.ErrorBoundary,{fallback:d,onError:f=>{if(f.message.includes("404: Not Found"))console.error(f);else throw f},children:[b.jsx(W.Suspense,{fallback:d,children:b.jsx("group",{ref:u,children:b.jsx(yc,{rapidlyChangingMotionState:e,dhParameters:r,children:b.jsx($1,{modelURL:n(t),postModelRender:s,flangeRef:i,...a})})})}),b.jsx(_1,{})]})});function A1({connectedMotionGroup:e,getModel:t=zi,isGhost:r=!1,flangeRef:n,...o}){return e.dhParameters?b.jsx(bc,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,isGhost:r,flangeRef:n,...o}):null}const I1=$.styled($.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,r,n;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:o})=>!o,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:o})=>o,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),L1=W.forwardRef((e,t)=>b.jsx(I1,{ref:t,selected:e.selected,...e,color:"secondary",variant:"circular"})),N1={$schema:"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",name:"wandelscript",patterns:[{include:"#keywords"},{include:"#strings"},{include:"#comments"},{include:"#functions"}],repository:{keywords:{patterns:[{name:"keyword.control.flow.wandelscript",match:"\\b(move|via|to|interrupt|def|False|True|for|if|else|elif|while|return|switch|activate|deactivate|print)\\b"}]},strings:{name:"string.quoted.double.wandelscript",begin:'"',end:'"',patterns:[{name:"constant.character.escape.wandelscript",match:"\\\\."}]},comments:{patterns:[{begin:"#",beginCaptures:{0:{name:"punctuation.definition.comment.wandelscript"}},end:"$",name:"comment.line.number-sign.wandelscript"}]},functions:{patterns:[{match:"[a-zA-Z_-]+\\(",name:"entity.name.function.wandelscript"}]}},scopeName:"source.wandelscript"},M1=W.lazy(()=>import("@monaco-editor/react")),D1=sn(e=>{const t=$.useTheme(),r=W.useRef(null),[n,o]=W.useState("dark-plus"),i=t.palette.mode==="dark"?"dark-plus":"light-plus";async function s(a){const[{createHighlighter:l},{shikiToMonaco:c}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);a.languages.register({id:"wandelscript"}),a.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]}),r.current||(r.current=await l({langs:[N1],themes:["dark-plus","light-plus"]})),c(r.current,a),a.editor.defineTheme(i,{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:t.palette.mode==="dark"?{"editor.background":"#262F42","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#494949"}:{}}),e.monacoSetup&&e.monacoSetup(a),o(i)}return b.jsx(W.Suspense,{fallback:b.jsx(mo,{}),children:b.jsx(M1,{value:e.code,onMount:(a,l)=>{s(l)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:n,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function vc(){var t,r,n,o,i,s;const e=$.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiButton:{styleOverrides:{root:{textTransform:"none",borderRadius:"10px"}},variants:[{props:{color:"secondary",variant:"contained"},style:{border:`1px solid ${e.palette.divider}`,background:(n=(r=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:r.tonal)==null?void 0:n.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(o=e.palette.backgroundPaperElevation)==null?void 0:o[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiFab:{styleOverrides:{root:{background:(s=(i=e.paletteExt)==null?void 0:i.secondary)==null?void 0:s.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)"},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)"},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)"}}}}}}function F1(){const e=vc();return e.palette.mode="light",e}function V1(e){var n,o,i,s;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((o=e.palette)==null?void 0:o.mode)!=="dark"&&(t=!(typeof window<"u"&&((s=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-color-scheme: light)"))==null?void 0:s.matches)));const r=t?vc():F1();return ll(r,e)}exports.JoggingCartesianAxisControl=ri;exports.JoggingJointRotationControl=bl;exports.JoggingPanel=y1;exports.LoadingCover=mo;exports.LoadingErrorMessage=Jl;exports.NoMotionGroupModal=w1;exports.PoseCartesianValues=v1;exports.PoseJointValues=x1;exports.PresetEnvironment=Lc;exports.Robot=A1;exports.SafetyZonesRenderer=Dc;exports.SelectableFab=L1;exports.SupportedRobot=bc;exports.VelocitySlider=dc;exports.VelocitySliderLabel=Ui;exports.WandelscriptEditor=D1;exports.createNovaMuiTheme=V1;exports.defaultAxisConfig=T1;exports.defaultGetModel=zi;exports.useAnimationFrame=wr;exports.useAutorun=dl;exports.useMounted=lo;exports.useReaction=$i;
|
|
83
|
+
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=qt(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&li.assertOptions(n,{silentJSONParsing:At.transitional(At.boolean),forcedJSONParsing:At.transitional(At.boolean),clarifyTimeoutError:At.transitional(At.boolean)},!1),o!=null&&(x.isFunction(o)?r.paramsSerializer={serialize:o}:li.assertOptions(o,{encode:At.function,serialize:At.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&x.merge(i.common,i[r.method]);i&&x.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),r.headers=De.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,f;if(!l){const y=[Gs.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,c),f=y.length,u=Promise.resolve(r);d<f;)u=u.then(y[d++],y[d++]);return u}f=a.length;let v=r;for(d=0;d<f;){const y=a[d++],m=a[d++];try{v=y(v)}catch(h){m.call(this,h);break}}try{u=Gs.call(this,v)}catch(y){return Promise.reject(y)}for(d=0,f=c.length;d<f;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=qt(this.defaults,t);const r=Nl(t.baseURL,t.url);return kl(r,t.params,t.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(t){Jt.prototype[t]=function(r,n){return this.request(qt(n||{},{method:t,url:r,data:(n||{}).data}))}});x.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,a){return this.request(qt(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Jt.prototype[t]=r(),Jt.prototype[t+"Form"]=r(!0)});let gm=class Ul{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,a){n.reason||(n.reason=new Or(i,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Ul(function(o){t=o}),cancel:t}}};function hm(e){return function(r){return e.apply(null,r)}}function mm(e){return x.isObject(e)&&e.isAxiosError===!0}const ci={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ci).forEach(([e,t])=>{ci[t]=e});function zl(e){const t=new Jt(e),r=vl(Jt.prototype.request,t);return x.extend(r,Jt.prototype,t,{allOwnKeys:!0}),x.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return zl(qt(e,o))},r}const xe=zl(ln);xe.Axios=Jt;xe.CanceledError=Or;xe.CancelToken=gm;xe.isCancel=Il;xe.VERSION=Bl;xe.toFormData=go;xe.AxiosError=J;xe.Cancel=xe.CanceledError;xe.all=function(t){return Promise.all(t)};xe.spread=hm;xe.isAxiosError=mm;xe.mergeConfig=qt;xe.AxiosHeaders=De;xe.formToJSON=e=>Al(x.isHTMLForm(e)?new FormData(e):e);xe.getAdapter=Vl.getAdapter;xe.HttpStatusCode=ci;xe.default=xe;const{Axios:J1,AxiosError:Ks,CanceledError:H1,isCancel:W1,CancelToken:G1,VERSION:q1,all:K1,Cancel:Y1,isAxiosError:X1,spread:Z1,toFormData:Q1,AxiosHeaders:ev,HttpStatusCode:tv,formToJSON:rv,getAdapter:nv,mergeConfig:ov}=xe;function ym(e){try{return JSON.stringify(e)}catch{return}}function bm(e){var t,r,n,o;return e instanceof Ks&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof Ks&&e.response?`${(t=e.response)==null?void 0:t.status} ${(r=e.response)==null?void 0:r.statusText} from ${(n=e.response)==null?void 0:n.config.url}: ${JSON.stringify((o=e.response)==null?void 0:o.data)}`:e instanceof Error?e.message:`Unexpected error: ${ym(e)||e}`}const mo=e=>{const t=e.softTimeout||3e3,[r,n]=W.useState(!1),o=$.useTheme();return W.useEffect(()=>{const i=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(i)}),b.jsx($.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:o.palette.text.primary},children:e.error?b.jsx(Jl,{loadingMessage:e.message,error:e.error}):b.jsxs(b.Fragment,{children:[b.jsx($.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&b.jsx("div",{children:e.message}),b.jsx($.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:o.palette.text.secondary},children:"This is taking longer than expected..."})]})})},Jl=e=>{const t=bm(e.error),r=e.error instanceof Error?e.error.stack:null,n=$.useTheme();return b.jsxs($.Stack,{sx:{maxHeight:"100%",maxWidth:"min(100%, 800px)",padding:2,overflow:"auto",color:n.palette.error.main,"& pre":{whiteSpace:"pre-wrap",wordBreak:"break-word",paddingBottom:"3rem"}},children:[(e.loadingMessage?`Error while ${Gn.lowerFirst($.capitalize(e.loadingMessage))} - `:"")+t,b.jsx("br",{}),r&&b.jsx("pre",{children:r})]})},vm=({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"})),xm=W.forwardRef(vm),Sm=({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"})),wm=W.forwardRef(Sm),Tm=({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"})),Om=W.forwardRef(Tm),Em=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C11.0583 14.1 12.5083 12.1667 11.475 12.9L12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z",fill:"white"})),Cm=W.forwardRef(Em),Ys=e=>b.jsx($.Stack,{position:"absolute",left:0,top:0,width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{backgroundColor:"rgba(0, 0, 0, 0.6)",backdropFilter:"blur(2px)",zIndex:100,...e.sx||{}},...Gn.omit(e,"sx")}),Hl=ke.observer(({store:e,children:t})=>{const{t:r}=Yt.useTranslation(),n=$.useTheme();function o(){var i,s;if(e.activationState==="inactive"&&!e.activationError)return b.jsx(Ys,{sx:{borderRadius:"6px",backgroundColor:`color-mix(in srgb, ${(i=n.palette.backgroundPaperElevation)==null?void 0:i[5]}, transparent)`},children:b.jsx($.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 b.jsx(Ys,{sx:{backgroundColor:`color-mix(in srgb, ${(s=n.palette.backgroundPaperElevation)==null?void 0:s[5]}, transparent)`},children:b.jsx(mo,{message:r("Jogging.Activating.lb"),error:e.activationError})})}return b.jsxs($.Stack,{sx:{position:"relative",padding:"6px"},children:[o(),t]})});function Rm(){this.__data__=[],this.size=0}function Wl(e,t){return e===t||e!==e&&t!==t}function yo(e,t){for(var r=e.length;r--;)if(Wl(e[r][0],t))return r;return-1}var _m=Array.prototype,Pm=_m.splice;function $m(e){var t=this.__data__,r=yo(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Pm.call(t,r,1),--this.size,!0}function km(e){var t=this.__data__,r=yo(t,e);return r<0?void 0:t[r][1]}function jm(e){return yo(this.__data__,e)>-1}function Am(e,t){var r=this.__data__,n=yo(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ct(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])}}Ct.prototype.clear=Rm;Ct.prototype.delete=$m;Ct.prototype.get=km;Ct.prototype.has=jm;Ct.prototype.set=Am;function Im(){this.__data__=new Ct,this.size=0}function Lm(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Nm(e){return this.__data__.get(e)}function Mm(e){return this.__data__.has(e)}var Dm="[object AsyncFunction]",Fm="[object Function]",Vm="[object GeneratorFunction]",Bm="[object Proxy]";function Gl(e){if(!Wt(e))return!1;var t=Xt(e);return t==Fm||t==Vm||t==Dm||t==Bm}var Uo=bt["__core-js_shared__"],Xs=function(){var e=/[^.]+$/.exec(Uo&&Uo.keys&&Uo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Um(e){return!!Xs&&Xs in e}var zm=Function.prototype,Jm=zm.toString;function Zt(e){if(e!=null){try{return Jm.call(e)}catch{}try{return e+""}catch{}}return""}var Hm=/[\\^$.*+?()[\]{}|]/g,Wm=/^\[object .+?Constructor\]$/,Gm=Function.prototype,qm=Object.prototype,Km=Gm.toString,Ym=qm.hasOwnProperty,Xm=RegExp("^"+Km.call(Ym).replace(Hm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zm(e){if(!Wt(e)||Um(e))return!1;var t=Gl(e)?Xm:Wm;return t.test(Zt(e))}function Qm(e,t){return e==null?void 0:e[t]}function Qt(e,t){var r=Qm(e,t);return Zm(r)?r:void 0}var Yr=Qt(bt,"Map"),Xr=Qt(Object,"create");function ey(){this.__data__=Xr?Xr(null):{},this.size=0}function ty(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ry="__lodash_hash_undefined__",ny=Object.prototype,oy=ny.hasOwnProperty;function iy(e){var t=this.__data__;if(Xr){var r=t[e];return r===ry?void 0:r}return oy.call(t,e)?t[e]:void 0}var sy=Object.prototype,ay=sy.hasOwnProperty;function ly(e){var t=this.__data__;return Xr?t[e]!==void 0:ay.call(t,e)}var cy="__lodash_hash_undefined__";function uy(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Xr&&t===void 0?cy:t,this}function Kt(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])}}Kt.prototype.clear=ey;Kt.prototype.delete=ty;Kt.prototype.get=iy;Kt.prototype.has=ly;Kt.prototype.set=uy;function fy(){this.size=0,this.__data__={hash:new Kt,map:new(Yr||Ct),string:new Kt}}function dy(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function bo(e,t){var r=e.__data__;return dy(t)?r[typeof t=="string"?"string":"hash"]:r.map}function py(e){var t=bo(this,e).delete(e);return this.size-=t?1:0,t}function gy(e){return bo(this,e).get(e)}function hy(e){return bo(this,e).has(e)}function my(e,t){var r=bo(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Rt(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])}}Rt.prototype.clear=fy;Rt.prototype.delete=py;Rt.prototype.get=gy;Rt.prototype.has=hy;Rt.prototype.set=my;var yy=200;function by(e,t){var r=this.__data__;if(r instanceof Ct){var n=r.__data__;if(!Yr||n.length<yy-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Rt(n)}return r.set(e,t),this.size=r.size,this}function Tt(e){var t=this.__data__=new Ct(e);this.size=t.size}Tt.prototype.clear=Im;Tt.prototype.delete=Lm;Tt.prototype.get=Nm;Tt.prototype.has=Mm;Tt.prototype.set=by;var vy="__lodash_hash_undefined__";function xy(e){return this.__data__.set(e,vy),this}function Sy(e){return this.__data__.has(e)}function Hn(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Rt;++t<r;)this.add(e[t])}Hn.prototype.add=Hn.prototype.push=xy;Hn.prototype.has=Sy;function wy(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 Ty(e,t){return e.has(t)}var Oy=1,Ey=2;function ql(e,t,r,n,o,i){var s=r&Oy,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,v=r&Ey?new Hn:void 0;for(i.set(e,t),i.set(t,e);++d<a;){var y=e[d],m=t[d];if(n)var h=s?n(m,y,d,t,e,i):n(y,m,d,e,t,i);if(h!==void 0){if(h)continue;f=!1;break}if(v){if(!wy(t,function(S,T){if(!Ty(v,T)&&(y===S||o(y,S,r,n,i)))return v.push(T)})){f=!1;break}}else if(!(y===m||o(y,m,r,n,i))){f=!1;break}}return i.delete(e),i.delete(t),f}var Zs=bt.Uint8Array;function Cy(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function Ry(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var _y=1,Py=2,$y="[object Boolean]",ky="[object Date]",jy="[object Error]",Ay="[object Map]",Iy="[object Number]",Ly="[object RegExp]",Ny="[object Set]",My="[object String]",Dy="[object Symbol]",Fy="[object ArrayBuffer]",Vy="[object DataView]",Qs=Nt?Nt.prototype:void 0,zo=Qs?Qs.valueOf:void 0;function By(e,t,r,n,o,i,s){switch(r){case Vy:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Fy:return!(e.byteLength!=t.byteLength||!i(new Zs(e),new Zs(t)));case $y:case ky:case Iy:return Wl(+e,+t);case jy:return e.name==t.name&&e.message==t.message;case Ly:case My:return e==t+"";case Ay:var a=Cy;case Ny:var l=n&_y;if(a||(a=Ry),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=Py,s.set(e,t);var u=ql(a(e),a(t),n,o,i,s);return s.delete(e),u;case Dy:if(zo)return zo.call(e)==zo.call(t)}return!1}function Uy(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var yt=Array.isArray;function zy(e,t,r){var n=t(e);return yt(e)?n:Uy(n,r(e))}function Jy(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}function Hy(){return[]}var Wy=Object.prototype,Gy=Wy.propertyIsEnumerable,ea=Object.getOwnPropertySymbols,qy=ea?function(e){return e==null?[]:(e=Object(e),Jy(ea(e),function(t){return Gy.call(e,t)}))}:Hy;function Ky(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Yy="[object Arguments]";function ta(e){return Gt(e)&&Xt(e)==Yy}var Kl=Object.prototype,Xy=Kl.hasOwnProperty,Zy=Kl.propertyIsEnumerable,Yl=ta(function(){return arguments}())?ta:function(e){return Gt(e)&&Xy.call(e,"callee")&&!Zy.call(e,"callee")};function Qy(){return!1}var Xl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ra=Xl&&typeof module=="object"&&module&&!module.nodeType&&module,eb=ra&&ra.exports===Xl,na=eb?bt.Buffer:void 0,tb=na?na.isBuffer:void 0,ui=tb||Qy,rb=9007199254740991,nb=/^(?:0|[1-9]\d*)$/;function Zl(e,t){var r=typeof e;return t=t??rb,!!t&&(r=="number"||r!="symbol"&&nb.test(e))&&e>-1&&e%1==0&&e<t}var ob=9007199254740991;function Mi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ob}var ib="[object Arguments]",sb="[object Array]",ab="[object Boolean]",lb="[object Date]",cb="[object Error]",ub="[object Function]",fb="[object Map]",db="[object Number]",pb="[object Object]",gb="[object RegExp]",hb="[object Set]",mb="[object String]",yb="[object WeakMap]",bb="[object ArrayBuffer]",vb="[object DataView]",xb="[object Float32Array]",Sb="[object Float64Array]",wb="[object Int8Array]",Tb="[object Int16Array]",Ob="[object Int32Array]",Eb="[object Uint8Array]",Cb="[object Uint8ClampedArray]",Rb="[object Uint16Array]",_b="[object Uint32Array]",ue={};ue[xb]=ue[Sb]=ue[wb]=ue[Tb]=ue[Ob]=ue[Eb]=ue[Cb]=ue[Rb]=ue[_b]=!0;ue[ib]=ue[sb]=ue[bb]=ue[ab]=ue[vb]=ue[lb]=ue[cb]=ue[ub]=ue[fb]=ue[db]=ue[pb]=ue[gb]=ue[hb]=ue[mb]=ue[yb]=!1;function Pb(e){return Gt(e)&&Mi(e.length)&&!!ue[Xt(e)]}function $b(e){return function(t){return e(t)}}var Ql=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zr=Ql&&typeof module=="object"&&module&&!module.nodeType&&module,kb=zr&&zr.exports===Ql,Jo=kb&&ml.process,oa=function(){try{var e=zr&&zr.require&&zr.require("util").types;return e||Jo&&Jo.binding&&Jo.binding("util")}catch{}}(),ia=oa&&oa.isTypedArray,ec=ia?$b(ia):Pb,jb=Object.prototype,Ab=jb.hasOwnProperty;function Ib(e,t){var r=yt(e),n=!r&&Yl(e),o=!r&&!n&&ui(e),i=!r&&!n&&!o&&ec(e),s=r||n||o||i,a=s?Ky(e.length,String):[],l=a.length;for(var c in e)Ab.call(e,c)&&!(s&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Zl(c,l)))&&a.push(c);return a}var Lb=Object.prototype;function Nb(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Lb;return e===r}function Mb(e,t){return function(r){return e(t(r))}}var Db=Mb(Object.keys,Object),Fb=Object.prototype,Vb=Fb.hasOwnProperty;function Bb(e){if(!Nb(e))return Db(e);var t=[];for(var r in Object(e))Vb.call(e,r)&&r!="constructor"&&t.push(r);return t}function tc(e){return e!=null&&Mi(e.length)&&!Gl(e)}function Di(e){return tc(e)?Ib(e):Bb(e)}function sa(e){return zy(e,Di,qy)}var Ub=1,zb=Object.prototype,Jb=zb.hasOwnProperty;function Hb(e,t,r,n,o,i){var s=r&Ub,a=sa(e),l=a.length,c=sa(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var f=a[d];if(!(s?f in t:Jb.call(t,f)))return!1}var v=i.get(e),y=i.get(t);if(v&&y)return v==t&&y==e;var m=!0;i.set(e,t),i.set(t,e);for(var h=s;++d<l;){f=a[d];var S=e[f],T=t[f];if(n)var k=s?n(T,S,f,t,e,i):n(S,T,f,e,t,i);if(!(k===void 0?S===T||o(S,T,r,n,i):k)){m=!1;break}h||(h=f=="constructor")}if(m&&!h){var O=e.constructor,w=t.constructor;O!=w&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof w=="function"&&w instanceof w)&&(m=!1)}return i.delete(e),i.delete(t),m}var fi=Qt(bt,"DataView"),di=Qt(bt,"Promise"),pi=Qt(bt,"Set"),gi=Qt(bt,"WeakMap"),aa="[object Map]",Wb="[object Object]",la="[object Promise]",ca="[object Set]",ua="[object WeakMap]",fa="[object DataView]",Gb=Zt(fi),qb=Zt(Yr),Kb=Zt(di),Yb=Zt(pi),Xb=Zt(gi),It=Xt;(fi&&It(new fi(new ArrayBuffer(1)))!=fa||Yr&&It(new Yr)!=aa||di&&It(di.resolve())!=la||pi&&It(new pi)!=ca||gi&&It(new gi)!=ua)&&(It=function(e){var t=Xt(e),r=t==Wb?e.constructor:void 0,n=r?Zt(r):"";if(n)switch(n){case Gb:return fa;case qb:return aa;case Kb:return la;case Yb:return ca;case Xb:return ua}return t});var Zb=1,da="[object Arguments]",pa="[object Array]",mn="[object Object]",Qb=Object.prototype,ga=Qb.hasOwnProperty;function e0(e,t,r,n,o,i){var s=yt(e),a=yt(t),l=s?pa:It(e),c=a?pa:It(t);l=l==da?mn:l,c=c==da?mn:c;var u=l==mn,d=c==mn,f=l==c;if(f&&ui(e)){if(!ui(t))return!1;s=!0,u=!1}if(f&&!u)return i||(i=new Tt),s||ec(e)?ql(e,t,r,n,o,i):By(e,t,l,r,n,o,i);if(!(r&Zb)){var v=u&&ga.call(e,"__wrapped__"),y=d&&ga.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,h=y?t.value():t;return i||(i=new Tt),o(m,h,r,n,i)}}return f?(i||(i=new Tt),Hb(e,t,r,n,o,i)):!1}function vo(e,t,r,n,o){return e===t?!0:e==null||t==null||!Gt(e)&&!Gt(t)?e!==e&&t!==t:e0(e,t,r,n,vo,o)}function t0(e,t){return vo(e,t)}const rc=({store:e})=>{const{t}=Yt.useTranslation(),[r,n]=W.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),o=W.useRef(r);wr(()=>{const s=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;t0(o.current,s)||(o.current=s,n(s))});const i=[];for(const[s,a]of r.entries())a&&i.push(s);return i.length===0?null:b.jsx($.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",visibility:i.length?"visible":"collapse"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:i.map(s=>s+1).join(", ")})})},r0=$.styled($.FormControl)(({theme:e})=>({"&.MuiFormControl-root":{".MuiSelect-select":{paddingTop:"20px",paddingLeft:"12px"},label:{pointerEvents:"none",fontSize:"16px"},".MuiInputLabel-root":{"&.Mui-focused":{color:e.palette.text.primary}}}}));function yn({labelValue:e,...t}){return b.jsxs(r0,{fullWidth:!0,variant:"filled",children:[b.jsx($.InputLabel,{id:t.labelId,children:e}),b.jsx($.Select,{...t})]})}var ha=function(){try{var e=Qt(Object,"defineProperty");return e({},"",{}),e}catch{}}();function n0(e,t,r){t=="__proto__"&&ha?ha(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function o0(e,t,r,n){for(var o=-1,i=e==null?0:e.length;++o<i;){var s=e[o];t(n,s,r(s),e)}return n}function i0(e){return function(t,r,n){for(var o=-1,i=Object(t),s=n(t),a=s.length;a--;){var l=s[++o];if(r(i[l],l,i)===!1)break}return t}}var s0=i0();function a0(e,t){return e&&s0(e,t,Di)}function l0(e,t){return function(r,n){if(r==null)return r;if(!tc(r))return e(r,n);for(var o=r.length,i=-1,s=Object(r);++i<o&&n(s[i],i,s)!==!1;);return r}}var c0=l0(a0);function u0(e,t,r,n){return c0(e,function(o,i,s){t(n,o,r(o),s)}),n}var f0=1,d0=2;function p0(e,t,r,n){var o=r.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var s=r[o];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){s=r[o];var a=s[0],l=e[a],c=s[1];if(s[2]){if(l===void 0&&!(a in e))return!1}else{var u=new Tt,d;if(!(d===void 0?vo(c,l,f0|d0,n,u):d))return!1}}return!0}function nc(e){return e===e&&!Wt(e)}function g0(e){for(var t=Di(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,nc(o)]}return t}function oc(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function h0(e){var t=g0(e);return t.length==1&&t[0][2]?oc(t[0][0],t[0][1]):function(r){return r===e||p0(r,e,t)}}var m0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,y0=/^\w*$/;function Fi(e,t){if(yt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||co(e)?!0:y0.test(e)||!m0.test(e)||t!=null&&e in Object(t)}var b0="Expected a function";function Vi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(b0);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(Vi.Cache||Rt),r}Vi.Cache=Rt;var v0=500;function x0(e){var t=Vi(e,function(n){return r.size===v0&&r.clear(),n}),r=t.cache;return t}var S0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w0=/\\(\\)?/g,T0=x0(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(S0,function(r,n,o,i){t.push(o?i.replace(w0,"$1"):n||r)}),t});function O0(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var E0=1/0,ma=Nt?Nt.prototype:void 0,ya=ma?ma.toString:void 0;function ic(e){if(typeof e=="string")return e;if(yt(e))return O0(e,ic)+"";if(co(e))return ya?ya.call(e):"";var t=e+"";return t=="0"&&1/e==-E0?"-0":t}function sc(e){return e==null?"":ic(e)}function ac(e,t){return yt(e)?e:Fi(e,t)?[e]:T0(sc(e))}var C0=1/0;function xo(e){if(typeof e=="string"||co(e))return e;var t=e+"";return t=="0"&&1/e==-C0?"-0":t}function lc(e,t){t=ac(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[xo(t[r++])];return r&&r==n?e:void 0}function R0(e,t,r){var n=e==null?void 0:lc(e,t);return n===void 0?r:n}function _0(e,t){return e!=null&&t in Object(e)}function P0(e,t,r){t=ac(t,e);for(var n=-1,o=t.length,i=!1;++n<o;){var s=xo(t[n]);if(!(i=e!=null&&r(e,s)))break;e=e[s]}return i||++n!=o?i:(o=e==null?0:e.length,!!o&&Mi(o)&&Zl(s,o)&&(yt(e)||Yl(e)))}function $0(e,t){return e!=null&&P0(e,t,_0)}var k0=1,j0=2;function A0(e,t){return Fi(e)&&nc(t)?oc(xo(e),t):function(r){var n=R0(r,e);return n===void 0&&n===t?$0(r,e):vo(t,n,k0|j0)}}function I0(e){return e}function L0(e){return function(t){return t==null?void 0:t[e]}}function N0(e){return function(t){return lc(t,e)}}function M0(e){return Fi(e)?L0(xo(e)):N0(e)}function D0(e){return typeof e=="function"?e:e==null?I0:typeof e=="object"?yt(e)?A0(e[0],e[1]):h0(e):M0(e)}function F0(e,t){return function(r,n){var o=yt(r)?o0:u0,i={};return o(r,e,D0(n),i)}}var bn=F0(function(e,t,r){n0(e,r,t)}),V0=0;function B0(e){var t=++V0;return sc(e)+t}const hi=[{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}],U0=[{id:"continuous"},...hi],z0=["coordsys","tool"];class Bi{constructor(t,r,n,o){var i,s;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=n,this.tcps=o,this.selectedTabId="cartesian",this.manualActivationRequired=!0,this.activationState="inactive",this.activationError=null,this.activationCounter=0,this.locks=new Set,this.selectedCoordSystemId="world",this.selectedTcpId="",this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJogInProgress=null,this.translationVelocityMmPerSec=10,this.rotationVelocityDegPerSec=1,this.minTranslationVelocityMmPerSec=5,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.disposers=[];for(const a of n)if(a.coordinate_system===""){a.coordinate_system="world";break}this.selectedCoordSystemId=((i=n[0])==null?void 0:i.coordinate_system)||"world",this.selectedTcpId=((s=o[0])==null?void 0:s.id)||"",dt.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(dt.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,{coordinatesystems:o},{tcps:i}]=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 Bi(t,n,o||[],i||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return Gn.countBy(this.coordSystems,t=>t.name)}async deactivate(t={}){if(this.activationState==="inactive")return;const r=this.jogger.activeWebsocket;this.activationState="inactive",this.jogger.setJoggingMode("increment"),r&&await r.closed();try{await this.jogger.nova.api.motionGroupJogging.stopJogging(this.jogger.motionGroupId)}catch(n){console.error(n)}t.requireManualReactivation&&dt.runInAction(()=>{this.manualActivationRequired=!0})}async activate(t={}){if(!(this.manualActivationRequired&&!t.manual)){dt.runInAction(()=>{this.activationState="loading",this.activationError=null});try{await this.jogger.nova.api.controller.setDefaultMode(this.jogger.motionStream.controllerId,"MODE_CONTROL")}catch(r){console.error(r)}if(this.currentTab.id==="cartesian"){const r={tcpId:this.selectedTcpId,coordSystemId:this.activeCoordSystemId};this.activeDiscreteIncrement?this.jogger.setJoggingMode("increment",r):this.jogger.setJoggingMode("cartesian",r)}else this.jogger.setJoggingMode("joint");if(this.jogger.activeWebsocket)try{this.jogger.stop(),await this.jogger.activeWebsocket.nextMessage()}catch(r){dt.runInAction(()=>{this.activationState="inactive",this.activationError=r});return}dt.runInAction(()=>{this.activationState="active",t.manual&&(this.manualActivationRequired=!1)})}}loadFromLocalStorage(){const t=Lt.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 U0}get discreteIncrementOptions(){return hi}get incrementOptionsById(){return bn(this.incrementOptions,t=>t.id)}get tabsById(){return bn(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 bn(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 bn(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:hi.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}setCurrentIncrementJog(t){this.incrementJogInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}async withMotionLock(t){const r=B0();this.locks.add(r);try{return await t()}finally{this.locks.delete(r)}}}const J0=ke.observer(({store:e})=>{var n;const{t}=Yt.useTranslation();function r(o){switch(o){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return o}}return b.jsxs($.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"min-height min-height","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:[b.jsx(yn,{labelId:"jogging-coord-select",labelValue:"Coordinate Sys.",value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:o=>{e.setSelectedCoordSystemId(o.target.value)},disabled:e.isLocked,children:e.coordSystems.map(o=>b.jsx($.MenuItem,{value:o.coordinate_system,children:o.name&&e.coordSystemCountByName[o.name]>1?`${o.name} / ${o.coordinate_system}`:o.name||o.coordinate_system},o.coordinate_system))}),b.jsx(yn,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:o=>{e.setSelectedTcpId(o.target.value)},disabled:e.isLocked,children:e.tcps.map(o=>b.jsx($.MenuItem,{value:o.id,children:o.id},o.id))}),b.jsx(yn,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:o=>{e.setSelectedOrientation(o.target.value)},disabled:e.isLocked,children:z0.map(o=>b.jsx($.MenuItem,{value:o,children:r(o)},o))}),b.jsxs(yn,{labelValue:"Increment",labelId:"jogging-increment-select",size:"small",variant:"filled",value:((n=e.activeDiscreteIncrement)==null?void 0:n.id)||"continuous",onChange:o=>{e.setSelectedIncrementId(o.target.value)},disabled:e.isLocked,children:[b.jsx($.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(o=>b.jsx($.MenuItem,{value:o.id,children:e.currentMotionType==="translate"?`${o.mm}mm`:`${o.degrees}°`},o.id))]})]})}),H0=$.styled($.ToggleButtonGroup)(({theme:e})=>{var t;return{"&.MuiToggleButtonGroup-root":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[8],borderRadius:"8px",padding:"4px",gap:"4px",button:{border:"none",borderRadius:"4px",flex:"1 1 0px",minWidth:0,"&.MuiToggleButtonGroup-firstButton":{borderRadius:"8px 4px 4px 8px"},"&.MuiToggleButtonGroup-lastButton":{borderRadius:"4px 8px 8px 4px"}}}}});function W0(e,t,r=(n,o)=>n===o){return e.length===t.length&&e.every((n,o)=>r(n,t[o]))}const G0=2;function cc(e,t){return e-t}function ba(e,t){var r;const{index:n}=(r=e.reduce((o,i,s)=>{const a=Math.abs(t-i);return o===null||a<o.distance||a===o.distance?{distance:a,index:s}:o},null))!=null?r:{};return n}function vn(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const o=r.changedTouches[n];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Wn(e,t,r){return(e-t)*100/(r-t)}function q0(e,t,r){return(r-t)*e+t}function K0(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 Y0(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(K0(t)))}function va({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(cc)}function xn({sliderRef:e,activeIndex:t,setActive:r}){var n,o;const i=mr(e.current);if(!((n=e.current)!=null&&n.contains(i.activeElement))||Number(i==null||(o=i.activeElement)==null?void 0:o.getAttribute("data-index"))!==t){var s;(s=e.current)==null||s.querySelector(`[type="range"][data-index="${t}"]`).focus()}r&&r(t)}function Sn(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?W0(e,t):!1}const X0={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}%`})}},Z0=e=>e;let wn;function xa(){return wn===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?wn=CSS.supports("touch-action","none"):wn=!0),wn}function Q0(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:o=!1,isRtl:i=!1,marks:s=!1,max:a=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:f="horizontal",rootRef:v,scale:y=Z0,step:m=1,shiftStep:h=10,tabIndex:S,value:T}=e,k=N.useRef(),[O,w]=N.useState(-1),[C,R]=N.useState(-1),[z,se]=N.useState(!1),V=N.useRef(0),[M,G]=Za({controlled:T,default:r??l,name:"Slider"}),q=u&&((P,I,D)=>{const K=P.nativeEvent||P,Q=new K.constructor(K.type,K);Object.defineProperty(Q,"target",{writable:!0,value:{value:I,name:c}}),u(Q,I,D)}),Z=Array.isArray(M);let X=Z?M.slice().sort(cc):[M];X=X.map(P=>P==null?l:dr(P,l,a));const Se=s===!0&&m!==null?[...Array(Math.floor((a-l)/m)+1)].map((P,I)=>({value:l+m*I})):s||[],ce=Se.map(P=>P.value),{isFocusVisibleRef:ee,onBlur:Oe,onFocus:je,ref:nt}=Qa(),[vt,Ge]=N.useState(-1),we=N.useRef(),_t=Nn(nt,we),at=Nn(v,_t),qe=P=>I=>{var D;const K=Number(I.currentTarget.getAttribute("data-index"));je(I),ee.current===!0&&Ge(K),R(K),P==null||(D=P.onFocus)==null||D.call(P,I)},Be=P=>I=>{var D;Oe(I),ee.current===!1&&Ge(-1),R(-1),P==null||(D=P.onBlur)==null||D.call(P,I)},lt=(P,I)=>{const D=Number(P.currentTarget.getAttribute("data-index")),K=X[D],Q=ce.indexOf(K);let Y=I;if(Se&&m==null){const ze=ce[ce.length-1];Y>ze?Y=ze:Y<ce[0]?Y=ce[0]:Y=Y<K?ce[Q-1]:ce[Q+1]}if(Y=dr(Y,l,a),Z){o&&(Y=dr(Y,X[D-1]||-1/0,X[D+1]||1/0));const ze=Y;Y=va({values:X,newValue:Y,index:D});let Ke=D;o||(Ke=Y.indexOf(ze)),xn({sliderRef:we,activeIndex:Ke})}G(Y),Ge(D),q&&!Sn(Y,M)&&q(P,Y,D),d&&d(P,Y)},ct=P=>I=>{var D;if(m!==null){const K=Number(I.currentTarget.getAttribute("data-index")),Q=X[K];let Y=null;(I.key==="ArrowLeft"||I.key==="ArrowDown")&&I.shiftKey||I.key==="PageDown"?Y=Math.max(Q-h,l):((I.key==="ArrowRight"||I.key==="ArrowUp")&&I.shiftKey||I.key==="PageUp")&&(Y=Math.min(Q+h,a)),Y!==null&&(lt(I,Y),I.preventDefault())}P==null||(D=P.onKeyDown)==null||D.call(P,I)};wi(()=>{if(n&&we.current.contains(document.activeElement)){var P;(P=document.activeElement)==null||P.blur()}},[n]),n&&O!==-1&&w(-1),n&&vt!==-1&&Ge(-1);const Dt=P=>I=>{var D;(D=P.onChange)==null||D.call(P,I),lt(I,I.target.valueAsNumber)},xt=N.useRef();let Ue=f;i&&f==="horizontal"&&(Ue+="-reverse");const j=({finger:P,move:I=!1})=>{const{current:D}=we,{width:K,height:Q,bottom:Y,left:ze}=D.getBoundingClientRect();let Ke;Ue.indexOf("vertical")===0?Ke=(Y-P.y)/Q:Ke=(P.x-ze)/K,Ue.indexOf("-reverse")!==-1&&(Ke=1-Ke);let re;if(re=q0(Ke,l,a),m)re=Y0(re,m,l);else{const kt=ba(ce,re);re=ce[kt]}re=dr(re,l,a);let Le=0;if(Z){I?Le=xt.current:Le=ba(X,re),o&&(re=dr(re,X[Le-1]||-1/0,X[Le+1]||1/0));const kt=re;re=va({values:X,newValue:re,index:Le}),o&&I||(Le=re.indexOf(kt),xt.current=Le)}return{newValue:re,activeIndex:Le}},te=Rn(P=>{const I=vn(P,k);if(!I)return;if(V.current+=1,P.type==="mousemove"&&P.buttons===0){de(P);return}const{newValue:D,activeIndex:K}=j({finger:I,move:!0});xn({sliderRef:we,activeIndex:K,setActive:w}),G(D),!z&&V.current>G0&&se(!0),q&&!Sn(D,M)&&q(P,D,K)}),de=Rn(P=>{const I=vn(P,k);if(se(!1),!I)return;const{newValue:D}=j({finger:I,move:!0});w(-1),P.type==="touchend"&&R(-1),d&&d(P,D),k.current=void 0,Ie()}),Ae=Rn(P=>{if(n)return;xa()||P.preventDefault();const I=P.changedTouches[0];I!=null&&(k.current=I.identifier);const D=vn(P,k);if(D!==!1){const{newValue:Q,activeIndex:Y}=j({finger:D});xn({sliderRef:we,activeIndex:Y,setActive:w}),G(Q),q&&!Sn(Q,M)&&q(P,Q,Y)}V.current=0;const K=mr(we.current);K.addEventListener("touchmove",te,{passive:!0}),K.addEventListener("touchend",de,{passive:!0})}),Ie=N.useCallback(()=>{const P=mr(we.current);P.removeEventListener("mousemove",te),P.removeEventListener("mouseup",de),P.removeEventListener("touchmove",te),P.removeEventListener("touchend",de)},[de,te]);N.useEffect(()=>{const{current:P}=we;return P.addEventListener("touchstart",Ae,{passive:xa()}),()=>{P.removeEventListener("touchstart",Ae),Ie()}},[Ie,Ae]),N.useEffect(()=>{n&&Ie()},[n,Ie]);const Pt=P=>I=>{var D;if((D=P.onMouseDown)==null||D.call(P,I),n||I.defaultPrevented||I.button!==0)return;I.preventDefault();const K=vn(I,k);if(K!==!1){const{newValue:Y,activeIndex:ze}=j({finger:K});xn({sliderRef:we,activeIndex:ze,setActive:w}),G(Y),q&&!Sn(Y,M)&&q(I,Y,ze)}V.current=0;const Q=mr(we.current);Q.addEventListener("mousemove",te,{passive:!0}),Q.addEventListener("mouseup",de)},Te=Wn(Z?X[0]:l,l,a),$t=Wn(X[X.length-1],l,a)-Te,Ft=(P={})=>{const I=_n(P),D={onMouseDown:Pt(I||{})},K=_({},I,D);return _({},P,{ref:at},K)},Er=P=>I=>{var D;(D=P.onMouseOver)==null||D.call(P,I);const K=Number(I.currentTarget.getAttribute("data-index"));R(K)},Cr=P=>I=>{var D;(D=P.onMouseLeave)==null||D.call(P,I),R(-1)};return{active:O,axis:Ue,axisProps:X0,dragging:z,focusedThumbIndex:vt,getHiddenInputProps:(P={})=>{var I;const D=_n(P),K={onChange:Dt(D||{}),onFocus:qe(D||{}),onBlur:Be(D||{}),onKeyDown:ct(D||{})},Q=_({},D,K);return _({tabIndex:S,"aria-labelledby":t,"aria-orientation":f,"aria-valuemax":y(a),"aria-valuemin":y(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(I=e.step)!=null?I:void 0,disabled:n},P,Q,{style:_({},td,{direction:i?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Ft,getThumbProps:(P={})=>{const I=_n(P),D={onMouseOver:Er(I||{}),onMouseLeave:Cr(I||{})};return _({},P,I,D)},marks:Se,open:C,range:Z,rootRef:at,trackLeap:$t,trackOffset:Te,values:X,getThumbStyle:P=>({pointerEvents:O!==-1&&O!==P?"none":void 0})}}const e1=e=>!e||!Br(e);function t1(e){return nn("MuiSlider",e)}const Qe=Ga("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"]),r1=e=>{const{open:t}=e;return{offset:mt(t&&Qe.valueLabelOpen),circle:Qe.valueLabelCircle,label:Qe.valueLabelLabel}};function uc(e){const{children:t,className:r,value:n}=e,o=r1(e);return t?N.cloneElement(t,{className:mt(t.props.className)},b.jsxs(N.Fragment,{children:[t.props.children,b.jsx("span",{className:mt(o.offset,r),"aria-hidden":!0,children:b.jsx("span",{className:o.circle,children:b.jsx("span",{className:o.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(uc.propTypes={children:p.element.isRequired,className:p.string,value:p.node});const n1=["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 Sa(e){return e}const o1=Et("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${Ce(r.color)}`],r.size!=="medium"&&t[`size${Ce(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"},[`&.${Qe.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Qe.dragging}`]:{[`& .${Qe.thumb}, & .${Qe.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}}]}}),i1=Et("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}}]}),s1=Et("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:_({},e.vars?{backgroundColor:e.vars.palette.Slider[`${r}Track`],borderColor:e.vars.palette.Slider[`${r}Track`]}:_({backgroundColor:ei(e.palette[r].main,.62),borderColor:ei(e.palette[r].main,.62)},e.applyStyles("dark",{backgroundColor:Qo(e.palette[r].main,.5)}),e.applyStyles("dark",{borderColor:Qo(e.palette[r].main,.5)})))}))]}}),a1=Et("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${Ce(r.color)}`],r.size!=="medium"&&t[`thumbSize${Ce(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%)"},[`&.${Qe.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, &.${Qe.focusVisible}`]:_({},e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[r].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${ds(e.palette[r].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${Qe.active}`]:_({},e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[r].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${ds(e.palette[r].main,.16)}`})}}))]}}),l1=Et(uc,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e})=>_({zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${Qe.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%"},[`&.${Qe.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"}}]})),c1=Et("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>_i(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}}]})),u1=Et("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>_i(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e})=>_({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]})),f1=e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:i,classes:s,color:a,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",o==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",a&&`color${Ce(a)}`,l&&`size${Ce(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${Ce(l)}`,a&&`thumbColor${Ce(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Oi(c,t1,s)},d1=({children:e})=>e,fc=N.forwardRef(function(t,r){var n,o,i,s,a,l,c,u,d,f,v,y,m,h,S,T,k,O,w,C,R,z,se,V;const M=Pi({props:t,name:"MuiSlider"}),G=ad(),{"aria-label":q,"aria-valuetext":Z,"aria-labelledby":X,component:Se="span",components:ce={},componentsProps:ee={},color:Oe="primary",classes:je,className:nt,disableSwap:vt=!1,disabled:Ge=!1,getAriaLabel:we,getAriaValueText:_t,marks:at=!1,max:qe=100,min:Be=0,orientation:lt="horizontal",shiftStep:ct=10,size:Dt="medium",step:xt=1,scale:Ue=Sa,slotProps:j,slots:te,track:de="normal",valueLabelDisplay:Ae="off",valueLabelFormat:Ie=Sa}=M,Pt=Ve(M,n1),Te=_({},M,{isRtl:G,max:qe,min:Be,classes:je,disabled:Ge,disableSwap:vt,orientation:lt,marks:at,color:Oe,size:Dt,step:xt,shiftStep:ct,scale:Ue,track:de,valueLabelDisplay:Ae,valueLabelFormat:Ie}),{axisProps:$t,getRootProps:Ft,getHiddenInputProps:Er,getThumbProps:Cr,open:Rr,active:er,axis:ot,focusedThumbIndex:P,range:I,dragging:D,marks:K,values:Q,trackOffset:Y,trackLeap:ze,getThumbStyle:Ke}=Q0(_({},Te,{rootRef:r}));Te.marked=K.length>0&&K.some(L=>L.label),Te.dragging=D,Te.focusedThumbIndex=P;const re=f1(Te),Le=(n=(o=te==null?void 0:te.root)!=null?o:ce.Root)!=null?n:o1,kt=(i=(s=te==null?void 0:te.rail)!=null?s:ce.Rail)!=null?i:i1,tr=(a=(l=te==null?void 0:te.track)!=null?l:ce.Track)!=null?a:s1,_r=(c=(u=te==null?void 0:te.thumb)!=null?u:ce.Thumb)!=null?c:a1,St=(d=(f=te==null?void 0:te.valueLabel)!=null?f:ce.ValueLabel)!=null?d:l1,Vt=(v=(y=te==null?void 0:te.mark)!=null?y:ce.Mark)!=null?v:c1,Bt=(m=(h=te==null?void 0:te.markLabel)!=null?h:ce.MarkLabel)!=null?m:u1,Pr=(S=(T=te==null?void 0:te.input)!=null?T:ce.Input)!=null?S:"input",$r=(k=j==null?void 0:j.root)!=null?k:ee.root,cn=(O=j==null?void 0:j.rail)!=null?O:ee.rail,kr=(w=j==null?void 0:j.track)!=null?w:ee.track,rr=(C=j==null?void 0:j.thumb)!=null?C:ee.thumb,nr=(R=j==null?void 0:j.valueLabel)!=null?R:ee.valueLabel,So=(z=j==null?void 0:j.mark)!=null?z:ee.mark,wo=(se=j==null?void 0:j.markLabel)!=null?se:ee.markLabel,un=(V=j==null?void 0:j.input)!=null?V:ee.input,fn=jt({elementType:Le,getSlotProps:Ft,externalSlotProps:$r,externalForwardedProps:Pt,additionalProps:_({},e1(Le)&&{as:Se}),ownerState:_({},Te,$r==null?void 0:$r.ownerState),className:[re.root,nt]}),To=jt({elementType:kt,externalSlotProps:cn,ownerState:Te,className:re.rail}),Oo=jt({elementType:tr,externalSlotProps:kr,additionalProps:{style:_({},$t[ot].offset(Y),$t[ot].leap(ze))},ownerState:_({},Te,kr==null?void 0:kr.ownerState),className:re.track}),jr=jt({elementType:_r,getSlotProps:Cr,externalSlotProps:rr,ownerState:_({},Te,rr==null?void 0:rr.ownerState),className:re.thumb}),Eo=jt({elementType:St,externalSlotProps:nr,ownerState:_({},Te,nr==null?void 0:nr.ownerState),className:re.valueLabel}),g=jt({elementType:Vt,externalSlotProps:So,ownerState:Te,className:re.mark}),E=jt({elementType:Bt,externalSlotProps:wo,ownerState:Te,className:re.markLabel}),A=jt({elementType:Pr,getSlotProps:Er,externalSlotProps:un,ownerState:Te});return b.jsxs(Le,_({},fn,{children:[b.jsx(kt,_({},To)),b.jsx(tr,_({},Oo)),K.filter(L=>L.value>=Be&&L.value<=qe).map((L,F)=>{const ne=Wn(L.value,Be,qe),H=$t[ot].offset(ne);let B;return de===!1?B=Q.indexOf(L.value)!==-1:B=de==="normal"&&(I?L.value>=Q[0]&&L.value<=Q[Q.length-1]:L.value<=Q[0])||de==="inverted"&&(I?L.value<=Q[0]||L.value>=Q[Q.length-1]:L.value>=Q[0]),b.jsxs(N.Fragment,{children:[b.jsx(Vt,_({"data-index":F},g,!Br(Vt)&&{markActive:B},{style:_({},H,g.style),className:mt(g.className,B&&re.markActive)})),L.label!=null?b.jsx(Bt,_({"aria-hidden":!0,"data-index":F},E,!Br(Bt)&&{markLabelActive:B},{style:_({},H,E.style),className:mt(re.markLabel,E.className,B&&re.markLabelActive),children:L.label})):null]},F)}),Q.map((L,F)=>{const ne=Wn(L,Be,qe),H=$t[ot].offset(ne),B=Ae==="off"?d1:St;return b.jsx(B,_({},!Br(B)&&{valueLabelFormat:Ie,valueLabelDisplay:Ae,value:typeof Ie=="function"?Ie(Ue(L),F):Ie,index:F,open:Rr===F||er===F||Ae==="on",disabled:Ge},Eo,{children:b.jsx(_r,_({"data-index":F},jr,{className:mt(re.thumb,jr.className,er===F&&re.active,P===F&&re.focusVisible),style:_({},H,Ke(F),jr.style),children:b.jsx(Pr,_({"data-index":F,"aria-label":we?we(F):q,"aria-valuenow":Ue(L),"aria-labelledby":X,"aria-valuetext":_t?_t(Ue(L),F):Z,value:Q[F]},A))}))}),F)})]}))});process.env.NODE_ENV!=="production"&&(fc.propTypes={"aria-label":os(p.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":p.string,"aria-valuetext":os(p.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:p.node,classes:p.object,className:p.string,color:p.oneOfType([p.oneOf(["primary","secondary","error","info","success","warning"]),p.string]),components:p.shape({Input:p.elementType,Mark:p.elementType,MarkLabel:p.elementType,Rail:p.elementType,Root:p.elementType,Thumb:p.elementType,Track:p.elementType,ValueLabel:p.elementType}),componentsProps:p.shape({input:p.oneOfType([p.func,p.object]),mark:p.oneOfType([p.func,p.object]),markLabel:p.oneOfType([p.func,p.object]),rail:p.oneOfType([p.func,p.object]),root:p.oneOfType([p.func,p.object]),thumb:p.oneOfType([p.func,p.object]),track:p.oneOfType([p.func,p.object]),valueLabel:p.oneOfType([p.func,p.shape({children:p.element,className:p.string,open:p.bool,style:p.object,value:p.number,valueLabelDisplay:p.oneOf(["auto","off","on"])})])}),defaultValue:p.oneOfType([p.arrayOf(p.number),p.number]),disabled:p.bool,disableSwap:p.bool,getAriaLabel:p.func,getAriaValueText:p.func,marks:p.oneOfType([p.arrayOf(p.shape({label:p.node,value:p.number.isRequired})),p.bool]),max:p.number,min:p.number,name:p.string,onChange:p.func,onChangeCommitted:p.func,orientation:p.oneOf(["horizontal","vertical"]),scale:p.func,shiftStep:p.number,size:p.oneOfType([p.oneOf(["small","medium"]),p.string]),slotProps:p.shape({input:p.oneOfType([p.func,p.object]),mark:p.oneOfType([p.func,p.object]),markLabel:p.oneOfType([p.func,p.object]),rail:p.oneOfType([p.func,p.object]),root:p.oneOfType([p.func,p.object]),thumb:p.oneOfType([p.func,p.object]),track:p.oneOfType([p.func,p.object]),valueLabel:p.oneOfType([p.func,p.shape({children:p.element,className:p.string,open:p.bool,style:p.object,value:p.number,valueLabelDisplay:p.oneOf(["auto","off","on"])})])}),slots:p.shape({input:p.elementType,mark:p.elementType,markLabel:p.elementType,rail:p.elementType,root:p.elementType,thumb:p.elementType,track:p.elementType,valueLabel:p.elementType}),step:p.number,sx:p.oneOfType([p.arrayOf(p.oneOfType([p.func,p.object,p.bool])),p.func,p.object]),tabIndex:p.number,track:p.oneOf(["inverted","normal",!1]),value:p.oneOfType([p.arrayOf(p.number),p.number]),valueLabelDisplay:p.oneOf(["auto","off","on"]),valueLabelFormat:p.oneOfType([p.func,p.string])});var p1="[object Number]";function g1(e){return typeof e=="number"||Gt(e)&&Xt(e)==p1}const dc=ke.observer(e=>{$.useTheme();function t(r,n){n===e.velocity||!g1(n)||e.onVelocityChange(n)}return b.jsxs($.Stack,{direction:"row",gap:2,children:[b.jsx(fc,{value:e.velocity,color:"secondary",onChange:t,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),e.renderValue?e.renderValue(e.velocity):b.jsx(Ui,{value:e.velocity.toString()})]})});function Ui({value:e,sx:t}){var n;const r=$.useTheme();return b.jsx($.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(n=r.palette.backgroundPaperElevation)==null?void 0:n[8],borderRadius:"10px",minWidth:"111px",...t},children:b.jsx($.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const pc=ke.observer(({store:e})=>{const{t}=Yt.useTranslation(),r=ke.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?n=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:n})}`:n=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:n})}`}}));return b.jsx(dc,{velocity:e.velocityInCurrentUnits,min:e.minVelocityInCurrentUnits,max:e.maxVelocityInCurrentUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>b.jsx(Ui,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),h1=ke.observer(({store:e,children:t})=>{var d,f,v,y,m,h,S,T,k;const{t:r}=Yt.useTranslation(),n=$.useTheme();function o(O,w){(w==="translate"||w==="rotate")&&e.setSelectedCartesianMotionType(w)}$i(()=>[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 i(O,w){const C=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose,R=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position;C&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:O.axis,direction:O.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:C,currentJoints:R,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.velocityInCurrentUnits,axis:O.axis,direction:O.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:w.mm}:{type:"rotate",distanceRads:Lt.degreesToRadians(w.degrees)}})}finally{e.setCurrentIncrementJog(null)}})}async function s(O){if(!e.isLocked){if(e.activeDiscreteIncrement)return i(O,e.activeDiscreteIncrement);O.motionType==="translate"?await e.jogger.startTCPTranslation({axis:O.axis,direction:O.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:O.axis,direction:O.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function a(){e.isLocked||e.activeDiscreteIncrement||await e.jogger.stop()}const l=[{id:"x",colors:(v=(f=(d=n.componentsExt)==null?void 0:d.JoggingCartesian)==null?void 0:f.Axis)==null?void 0:v.X,icon:b.jsx(xm,{})},{id:"y",colors:(h=(m=(y=n.componentsExt)==null?void 0:y.JoggingCartesian)==null?void 0:m.Axis)==null?void 0:h.Y,icon:b.jsx(wm,{})},{id:"z",colors:(k=(T=(S=n.componentsExt)==null?void 0:S.JoggingCartesian)==null?void 0:T.Axis)==null?void 0:k.Z,icon:b.jsx(Om,{})}];function c(O){return r("General.mm.variable",{amount:O.toFixed(1)})}function u(O){return r("General.degree.variable",{amount:Lt.radiansToDegrees(O).toFixed(1)})}return b.jsxs($.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[b.jsxs($.Stack,{gap:2,children:[b.jsx(J0,{store:e}),b.jsx(pc,{store:e}),b.jsx($.Divider,{})]}),b.jsxs($.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:[b.jsxs(H0,{value:e.selectedCartesianMotionType,onChange:o,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[b.jsx($.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),b.jsx($.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),b.jsx(Hl,{store:e,children:b.jsxs($.Stack,{alignItems:"center",gap:"24px",sx:{flexGrow:1},children:[e.selectedCartesianMotionType==="translate"&&l.map(O=>{var w;return b.jsx(ri,{colors:O.colors,disabled:e.isLocked,activeJoggingDirection:((w=e.incrementJogInProgress)==null?void 0:w.axis)===O.id?e.incrementJogInProgress.direction:void 0,label:b.jsxs(b.Fragment,{children:[O.icon,b.jsx($.Typography,{sx:{fontSize:"24px",color:n.palette.text.primary},children:O.id.toUpperCase()})]}),getDisplayedValue:()=>{var C;return c(((C=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:C.position[O.id])||0)},startJogging:C=>s({axis:O.id,motionType:"translate",direction:C}),stopJogging:a},O.id)}),e.selectedCartesianMotionType==="rotate"&&l.map(O=>{var w;return b.jsx(ri,{colors:O.colors,disabled:e.isLocked,activeJoggingDirection:((w=e.incrementJogInProgress)==null?void 0:w.axis)===O.id?e.incrementJogInProgress.direction:void 0,label:b.jsxs(b.Fragment,{children:[b.jsx(Cm,{}),b.jsx($.Typography,{sx:{fontSize:"24px",color:n.palette.text.primary},children:O.id.toUpperCase()})]}),getDisplayedValue:()=>{var C,R;return u(((R=(C=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:C.orientation)==null?void 0:R[O.id])||0)},startJogging:C=>s({axis:O.id,motionType:"rotate",direction:C}),stopJogging:a},O.id)})]})})]}),b.jsx(rc,{store:e}),t&&b.jsx($.Divider,{}),t]})}),m1=ke.observer(({store:e,children:t})=>{async function r(o){await e.jogger.startJointRotation({joint:o.joint,direction:o.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function n(){await e.jogger.stop()}return b.jsxs($.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[b.jsx(pc,{store:e}),b.jsx($.Divider,{}),b.jsx($.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:b.jsx(Hl,{store:e,children:b.jsx($.Stack,{alignItems:"center",gap:"24px",sx:{flexGrow:1},children:e.jogger.motionStream.joints.map(o=>{var l;const i=(l=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:l[o.index],s=(i==null?void 0:i.lower_limit)!==void 0?Lt.radiansToDegrees(i.lower_limit):void 0,a=(i==null?void 0:i.upper_limit)!==void 0?Lt.radiansToDegrees(i.upper_limit):void 0;return b.jsx(bl,{disabled:e.isLocked,lowerLimitDegs:s,upperLimitDegs:a,getValueDegs:()=>{const c=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[o.index];return c!==void 0?Lt.radiansToDegrees(c):void 0},startJogging:c=>r({joint:o.index,direction:c}),stopJogging:n},`joint-${o.index}`)})})})}),b.jsx(rc,{store:e}),t&&b.jsx($.Divider,{}),t]})}),y1=sn(ke.observer(e=>{const t=Gn.isString(e.nova)?new Lt.NovaClient({instanceUrl:e.nova}):e.nova,r=ke.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){dt.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{const o=await t.connectJogger(e.motionGroupId),i=await Bi.loadFor(o);dt.runInAction(()=>{r.joggingStore=i}),e.onSetup&&e.onSetup(i)}catch(o){r.loadingError=o}}return W.useEffect(()=>(n(),()=>{var o;(o=r.joggingStore)==null||o.dispose()}),[e.nova,e.motionGroupId]),W.useEffect(()=>{const o=r.joggingStore;o&&(e.locked?o.locks.add("external"):o.locks.delete("external"))},[e.locked]),b.jsx($.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?b.jsx(b1,{store:r.joggingStore,children:e.children}):b.jsx(mo,{message:"Loading jogging",error:r.loadingError})})})),b1=ke.observer(({store:e,children:t})=>{W.useEffect(()=>{function n(){e.deactivate()}function o(){e.activate()}return window.addEventListener("blur",n),window.addEventListener("focus",o),()=>{window.removeEventListener("blur",n),window.removeEventListener("focus",o)}}),$i(()=>[e.currentTab.id,e.selectedTcpId,e.activeCoordSystemId,e.activeDiscreteIncrement],()=>{e.activationState!=="inactive"&&e.activate()});function r(){if(e.currentTab.id==="cartesian")return b.jsx(b.Fragment,{children:b.jsx(h1,{store:e,children:t})});if(e.currentTab.id==="joint")return b.jsx(b.Fragment,{children:b.jsx(m1,{store:e,children:t})})}return b.jsxs($.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[b.jsx($.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(n=>b.jsx($.Tab,{label:n.label,id:`jogging-tab-${n.id}`,"aria-controls":`jogging-tab-${n.id}`},n.id))}),b.jsx($.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:r()})]})}),gc=W.forwardRef(({label:e,value:t},r)=>{var a;const n=$.useTheme(),[o,i]=W.useState(!1);async function s(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),i(!0),!0}catch(l){console.error(l);const c=window.getSelection(),u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}return!1}return W.useEffect(()=>{if(!o)return;const l=setTimeout(()=>i(!1),3e3);return()=>{l&&clearTimeout(l)}},[o]),b.jsx($.Tooltip,{open:o,title:"Copied!",children:b.jsx($.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(a=n.palette.backgroundPaperElevation)==null?void 0:a[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>s(),children:b.jsx($.Typography,{ref:r,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:n.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})}),v1=ke.observer(({motionStream:e})=>{const t=W.useRef(null);function r(){const n=e.rapidlyChangingMotionState.tcp_pose;return n?Lt.poseToWandelscriptString(n):""}return wr(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),b.jsx($.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:b.jsx(gc,{value:r(),ref:t})})}),x1=ke.observer(({motionStream:e})=>{const t=W.useRef(null);function r(){const{joints:n}=e.rapidlyChangingMotionState.state.joint_position;return`[${n.map(o=>parseFloat(o.toFixed(4))).join(", ")}]`}return wr(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),b.jsx($.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:b.jsx(gc,{value:r(),ref:t})})});function S1(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function w1({baseUrl:e=S1(),...t}){return b.jsxs($.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:[b.jsx($.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),b.jsxs($.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[b.jsx($.Typography,{color:"#fff",children:"Found no devices to connect to."}),b.jsx($.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),b.jsx($.DialogActions,{children:b.jsxs($.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[b.jsx($.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),b.jsx($.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const T1=Array(6).fill(2*Math.PI),wa="0.0.0-semantically-released";function zi(e){let t=wa;return wa.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function O1(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>mc(r))}function hc(e){return e.name.endsWith("_FLG")}function mc(e){return/_J[0-9]+$/.test(e.name)}function E1(e,t){let r;const n=[];function o(s){return s.length===6}function i(s){if(hc(s)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${s.name}. Only one _FLG group is allowed.`);r=s}mc(s)&&n.push(s),s.children.map(i)}if(i(e.scene),!o(n))throw Error(`Expected to find 6 joint groups in robot model ${t} with names _J01, _J02 etc, found ${n.length}. Only 6-joint robot models are currently supported.`);if(!r)throw Error(`No flange group found in robot model ${t}. Flange must be identified with a name ending in _FLG.`);return{gltf:e}}function yc({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){Ho.Globals.assign({frameLoop:"always"});const o=W.useRef([]),i=W.useRef([]),{invalidate:s}=Pc.useThree();function a(f){f&&(i.current=O1(f),c(),s())}function l(f){o.current=f,d.start(Object.assign({},o.current))}function c(){const f=i.current.map((v,y)=>u[y].get());if(r)r(i.current,f);else for(const[v,y]of i.current.entries()){const m=t[v],h=m.theta||0,S=m.reverse_rotation_direction?-1:1;y.rotation.y=S*f[v]+h}}dl(()=>{const f=e.state.joint_position.joints.filter(v=>v!==void 0);requestAnimationFrame(()=>l(f))});const[u,d]=Ho.useSpring(()=>({...Object.assign({},e.state.joint_position.joints),onChange:()=>{c(),s()},onResolve:()=>{c()}}));return b.jsx("group",{ref:a,children:n})}const Ta="line",Oa="mesh";function C1({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new $e.Matrix4;function o(a,l){const c=new $e.Vector3,u=new $e.Quaternion,d=new $e.Vector3;n.decompose(c,u,d);const f=c.clone(),v=new $e.Matrix4().makeRotationY(a.theta+l*(a.reverse_rotation_direction?-1:1)).multiply(new $e.Matrix4().makeTranslation(0,a.d/1e3,0)).multiply(new $e.Matrix4().makeTranslation(a.a/1e3,0,0)).multiply(new $e.Matrix4().makeRotationX(a.alpha));return n.multiply(v),n.decompose(c,u,d),{a:f,b:c}}function i(a,l,c,u){if(!t)return;const d=t[a];if(!d)return;const{a:f,b:v}=o(d,u);l.geometry.setPositions([f.toArray(),v.toArray()].flat()),c.position.set(v.x,v.y,v.z)}function s(a,l){n.identity(),a.forEach((c,u)=>{i(u,c.getObjectByName(Ta),c.getObjectByName(Oa),l[u])})}return b.jsx(b.Fragment,{children:b.jsx(yc,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:s,children:b.jsxs("group",{...r,name:"Scene",children:[b.jsxs("mesh",{children:[b.jsx("sphereGeometry",{args:[.01,32,32]}),b.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((a,l)=>{const{a:c,b:u}=o(a,e.state.joint_position.joints[l]??0),d=`dhrobot_J0${l}`;return b.jsxs("group",{name:d,children:[b.jsx(ft.Line,{name:Ta,points:[c,u],color:"white",lineWidth:5}),b.jsxs("mesh",{name:Oa,position:u,children:[b.jsx("sphereGeometry",{args:[.01,32,32]}),b.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+l)]},d)})]})})})}const R1=console.warn;function _1(){return W.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&R1(e)}},[]),b.jsx(b.Fragment,{})}function P1(e){return e.type==="Mesh"}function $1({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:o}=E1(ft.useGLTF(e),e.split("/").pop()||e),i=W.useCallback(a=>{a&&r&&r()},[e]);function s(a){return P1(a)?b.jsx("mesh",{name:a.name,geometry:a.geometry,material:a.material,position:a.position,rotation:a.rotation},a.uuid):b.jsx(Ho.animated.group,{name:a.name,position:a.position,rotation:a.rotation,ref:hc(a)?t:void 0,children:a.children.map(s)},a.uuid)}return b.jsx("group",{...n,dispose:null,ref:i,children:s(o.scene)})}const k1=e=>{e.userData.isGhost||(e.traverse(t=>{if(t instanceof $e.Mesh){t.material instanceof $e.Material&&(t.material.colorWrite=!0);const r=t.clone(),n=t.clone();r.material=new $e.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:1}),r.userData.isGhost=!0,n.material=new $e.MeshStandardMaterial({color:"#D91433",opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-1}),n.userData.isGhost=!0,t.parent&&(t.parent.add(r),t.parent.add(n))}}),e.userData.isGhost=!0)},j1=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof $e.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof $e.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!0},bc=sn(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=zi,isGhost:o=!1,flangeRef:i,postModelRender:s,...a})=>{const[l,c]=W.useState(null),u=W.useCallback(f=>{c(f)},[]);W.useEffect(()=>{l&&(o?k1(l):j1(l))},[l,o]);const d=b.jsx(C1,{rapidlyChangingMotionState:e,dhParameters:r,...a});return b.jsxs(jc.ErrorBoundary,{fallback:d,onError:f=>{if(f.message.includes("404: Not Found"))console.error(f);else throw f},children:[b.jsx(W.Suspense,{fallback:d,children:b.jsx("group",{ref:u,children:b.jsx(yc,{rapidlyChangingMotionState:e,dhParameters:r,children:b.jsx($1,{modelURL:n(t),postModelRender:s,flangeRef:i,...a})})})}),b.jsx(_1,{})]})});function A1({connectedMotionGroup:e,getModel:t=zi,isGhost:r=!1,flangeRef:n,...o}){return e.dhParameters?b.jsx(bc,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,isGhost:r,flangeRef:n,...o}):null}const I1=$.styled($.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,r,n;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:o})=>!o,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:o})=>o,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),L1=W.forwardRef((e,t)=>b.jsx(I1,{ref:t,selected:e.selected,...e,color:"secondary",variant:"circular"})),N1={$schema:"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",name:"wandelscript",patterns:[{include:"#keywords"},{include:"#strings"},{include:"#comments"},{include:"#functions"}],repository:{keywords:{patterns:[{name:"keyword.control.flow.wandelscript",match:"\\b(move|via|to|interrupt|def|False|True|for|if|else|elif|while|return|switch|activate|deactivate|print|and|or|not)\\b"}]},strings:{name:"string.quoted.double.wandelscript",begin:'"',end:'"',patterns:[{name:"constant.character.escape.wandelscript",match:"\\\\."}]},comments:{patterns:[{begin:"#",beginCaptures:{0:{name:"punctuation.definition.comment.wandelscript"}},end:"$",name:"comment.line.number-sign.wandelscript"}]},functions:{patterns:[{match:"[a-zA-Z_-]+\\(",name:"entity.name.function.wandelscript"}]}},scopeName:"source.wandelscript"},M1=W.lazy(()=>import("@monaco-editor/react")),D1=sn(e=>{const t=$.useTheme(),r=W.useRef(null),[n,o]=W.useState("dark-plus"),i=t.palette.mode==="dark"?"dark-plus":"light-plus";async function s(a){const[{createHighlighter:l},{shikiToMonaco:c}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);a.languages.register({id:"wandelscript"}),a.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]}),r.current||(r.current=await l({langs:[N1],themes:["dark-plus","light-plus"]})),c(r.current,a),a.editor.defineTheme(i,{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:t.palette.mode==="dark"?{"editor.background":"#262F42","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#494949"}:{}}),e.monacoSetup&&e.monacoSetup(a),o(i)}return b.jsx(W.Suspense,{fallback:b.jsx(mo,{}),children:b.jsx(M1,{value:e.code,onMount:(a,l)=>{s(l)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:n,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function vc(){var t,r,n,o,i,s;const e=$.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiButton:{styleOverrides:{root:{textTransform:"none",borderRadius:"10px"}},variants:[{props:{color:"secondary",variant:"contained"},style:{border:`1px solid ${e.palette.divider}`,background:(n=(r=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:r.tonal)==null?void 0:n.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(o=e.palette.backgroundPaperElevation)==null?void 0:o[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiFab:{styleOverrides:{root:{background:(s=(i=e.paletteExt)==null?void 0:i.secondary)==null?void 0:s.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)"},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)"},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)"}}}}}}function F1(){const e=vc();return e.palette.mode="light",e}function V1(e){var n,o,i,s;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((o=e.palette)==null?void 0:o.mode)!=="dark"&&(t=!(typeof window<"u"&&((s=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-color-scheme: light)"))==null?void 0:s.matches)));const r=t?vc():F1();return ll(r,e)}exports.JoggingCartesianAxisControl=ri;exports.JoggingJointRotationControl=bl;exports.JoggingPanel=y1;exports.LoadingCover=mo;exports.LoadingErrorMessage=Jl;exports.NoMotionGroupModal=w1;exports.PoseCartesianValues=v1;exports.PoseJointValues=x1;exports.PresetEnvironment=Lc;exports.Robot=A1;exports.SafetyZonesRenderer=Dc;exports.SelectableFab=L1;exports.SupportedRobot=bc;exports.VelocitySlider=dc;exports.VelocitySliderLabel=Ui;exports.WandelscriptEditor=D1;exports.createNovaMuiTheme=V1;exports.defaultAxisConfig=T1;exports.defaultGetModel=zi;exports.useAnimationFrame=wr;exports.useAutorun=dl;exports.useMounted=lo;exports.useReaction=$i;
|
|
84
84
|
//# sourceMappingURL=index.cjs.map
|