@wandelbots/wandelbots-js-react-components 2.13.1 → 2.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"SupportedRobot.d.ts","sourceRoot":"","sources":["../../../src/components/robots/SupportedRobot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACzB,MAAM,mCAAmC,CAAA;AAK1C,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAQnC,MAAM,MAAM,YAAY,GAAG;IACzB,0BAA0B,EAAE,wBAAwB,CAAA;IACpD,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;CACjC,GAAG,UAAU,CAAA;AAEd,MAAM,MAAM,mBAAmB,GAAG;IAChC,0BAA0B,EAAE,wBAAwB,CAAA;IACpD,mBAAmB,EAAE,MAAM,CAAA;IAC3B,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAClC,QAAQ,CAAC,EAAE,CAAC,mBAAmB,EAAE,MAAM,KAAK,MAAM,CAAA;IAClD,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,UAAU,CAAA;AAEd,eAAO,MAAM,cAAc,wIAUtB,mBAAmB,4CAwDvB,CAAA"}
1
+ {"version":3,"file":"SupportedRobot.d.ts","sourceRoot":"","sources":["../../../src/components/robots/SupportedRobot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACzB,MAAM,mCAAmC,CAAA;AAK1C,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAQnC,MAAM,MAAM,YAAY,GAAG;IACzB,0BAA0B,EAAE,wBAAwB,CAAA;IACpD,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;CACjC,GAAG,UAAU,CAAA;AAEd,MAAM,MAAM,mBAAmB,GAAG;IAChC,0BAA0B,EAAE,wBAAwB,CAAA;IACpD,mBAAmB,EAAE,MAAM,CAAA;IAC3B,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAClC,QAAQ,CAAC,EAAE,CAAC,mBAAmB,EAAE,MAAM,KAAK,MAAM,CAAA;IAClD,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,UAAU,CAAA;AAEd,eAAO,MAAM,cAAc,wIAUtB,mBAAmB,4CAoDvB,CAAA"}
package/dist/index.cjs CHANGED
@@ -90,5 +90,5 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
90
90
  `)}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[Hi]=this[Hi]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=Cr(a);n[s]||(Rp(o,a),n[s]=!0)}return x.isArray(t)?t.forEach(i):i(t),this}};Me.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(Me.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});x.freezeMethods(Me);function ao(e,t){const r=this||Ur,n=t||r,o=Me.from(n.headers);let i=n.data;return x.forEach(e,function(s){i=s.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Ts(e){return!!(e&&e.__CANCEL__)}function gr(e,t,r){W.call(this,e??"canceled",W.ERR_CANCELED,t,r),this.name="CanceledError"}x.inherits(gr,W,{__CANCEL__:!0});function Es(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new W("Request failed with status code "+r.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ap(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function kp(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[i];a||(a=c),r[o]=l,n[o]=c;let d=i,p=0;for(;d!==o;)p+=r[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a<t)return;const S=u&&c-u;return S?Math.round(p*1e3/S):void 0}}function Pp(e,t){let r=0,n=1e3/t,o,i;const a=(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?a(c,u):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},n-d)))},()=>o&&a(o)]}const bn=(e,t,r=3)=>{let n=0;const o=kp(50,250);return Pp(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=a-n,c=o(l),u=a<=s;n=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},r)},Ki=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},qi=e=>(...t)=>x.asap(()=>e(...t)),jp=ke.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ke.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ke.origin),ke.navigator&&/(msie|trident)/i.test(ke.navigator.userAgent)):()=>!0,_p=ke.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];x.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),x.isString(n)&&a.push("path="+n),x.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.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 $p(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Lp(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Cs(e,t,r){let n=!$p(t);return e&&n||r==!1?Lp(e,t):t}const Yi=e=>e instanceof Me?{...e}:e;function Bt(e,t){t=t||{};const r={};function n(c,u,d,p){return x.isPlainObject(c)&&x.isPlainObject(u)?x.merge.call({caseless:p},c,u):x.isPlainObject(u)?x.merge({},u):x.isArray(u)?u.slice():u}function o(c,u,d,p){if(x.isUndefined(u)){if(!x.isUndefined(c))return n(void 0,c,d,p)}else return n(c,u,d,p)}function i(c,u){if(!x.isUndefined(u))return n(void 0,u)}function a(c,u){if(x.isUndefined(u)){if(!x.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function s(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:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,u,d)=>o(Yi(c),Yi(u),d,!0)};return x.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||o,p=d(e[u],t[u],u);x.isUndefined(p)&&d!==s||(r[u]=p)}),r}const Os=e=>{const t=Bt({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=Me.from(a),t.url=vs(Cs(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(x.isFormData(r)){if(ke.hasStandardBrowserEnv||ke.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(ke.hasStandardBrowserEnv&&(n&&x.isFunction(n)&&(n=n(t)),n||n!==!1&&jp(t.url))){const c=o&&i&&_p.read(i);c&&a.set(o,c)}return t},Ip=typeof XMLHttpRequest<"u",Mp=Ip&&function(e){return new Promise(function(r,n){const o=Os(e);let i=o.data;const a=Me.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=o,u,d,p,S,b;function f(){S&&S(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function E(){if(!v)return;const k=Me.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),P={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:k,config:e,request:v};Es(function(I){r(I),f()},function(I){n(I),f()},P),v=null}"onloadend"in v?v.onloadend=E:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(E)},v.onabort=function(){v&&(n(new W("Request aborted",W.ECONNABORTED,e,v)),v=null)},v.onerror=function(){n(new W("Network Error",W.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let T=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const P=o.transitional||xs;o.timeoutErrorMessage&&(T=o.timeoutErrorMessage),n(new W(T,P.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,e,v)),v=null},i===void 0&&a.setContentType(null),"setRequestHeader"in v&&x.forEach(a.toJSON(),function(T,P){v.setRequestHeader(P,T)}),x.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),s&&s!=="json"&&(v.responseType=o.responseType),c&&([p,b]=bn(c,!0),v.addEventListener("progress",p)),l&&v.upload&&([d,S]=bn(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",S)),(o.cancelToken||o.signal)&&(u=k=>{v&&(n(!k||k.type?new gr(null,e,v):k),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const O=Ap(o.url);if(O&&ke.protocols.indexOf(O)===-1){n(new W("Unsupported protocol "+O+":",W.ERR_BAD_REQUEST,e));return}v.send(i||null)})},Np=(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,s();const u=c instanceof Error?c:this.reason;n.abort(u instanceof W?u:new gr(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,i(new W(`timeout ${t} of ms exceeded`,W.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=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(s),l}},Dp=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},Fp=async function*(e,t){for await(const r of Bp(e))yield*Dp(r,t)},Bp=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()}},Zi=(e,t,r,n)=>{const o=Fp(e,t);let i=0,a,s=l=>{a||(a=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){s(),l.close();return}let d=u.byteLength;if(r){let p=i+=d;r(p)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),o.return()}},{highWaterMark:2})},Vn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Rs=Vn&&typeof ReadableStream=="function",Vp=Vn&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),As=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Up=Rs&&As(()=>{let e=!1;const t=new Request(ke.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Xi=64*1024,wo=Rs&&As(()=>x.isReadableStream(new Response("").body)),Sn={stream:wo&&(e=>e.body)};Vn&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Sn[t]&&(Sn[t]=x.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new W(`Response type '${t}' is not supported`,W.ERR_NOT_SUPPORT,n)})})})(new Response);const zp=async e=>{if(e==null)return 0;if(x.isBlob(e))return e.size;if(x.isSpecCompliantForm(e))return(await new Request(ke.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 Vp(e)).byteLength},Jp=async(e,t)=>{const r=x.toFiniteNumber(e.getContentLength());return r??zp(t)},Gp=Vn&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:p}=Os(e);c=c?(c+"").toLowerCase():"text";let S=Np([o,i&&i.toAbortSignal()],a),b;const f=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let v;try{if(l&&Up&&r!=="get"&&r!=="head"&&(v=await Jp(u,n))!==0){let P=new Request(t,{method:"POST",body:n,duplex:"half"}),$;if(x.isFormData(n)&&($=P.headers.get("content-type"))&&u.setContentType($),P.body){const[I,B]=Ki(v,bn(qi(l)));n=Zi(P.body,Xi,I,B)}}x.isString(d)||(d=d?"include":"omit");const E="credentials"in Request.prototype;b=new Request(t,{...p,signal:S,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:E?d:void 0});let O=await fetch(b);const k=wo&&(c==="stream"||c==="response");if(wo&&(s||k&&f)){const P={};["status","statusText","headers"].forEach(H=>{P[H]=O[H]});const $=x.toFiniteNumber(O.headers.get("content-length")),[I,B]=s&&Ki($,bn(qi(s),!0))||[];O=new Response(Zi(O.body,Xi,I,()=>{B&&B(),f&&f()}),P)}c=c||"text";let T=await Sn[x.findKey(Sn,c)||"text"](O,e);return!k&&f&&f(),await new Promise((P,$)=>{Es(P,$,{data:T,headers:Me.from(O.headers),status:O.status,statusText:O.statusText,config:e,request:b})})}catch(E){throw f&&f(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new W("Network Error",W.ERR_NETWORK,e,b),{cause:E.cause||E}):W.from(E,E&&E.code,e,b)}}),To={http:ap,xhr:Mp,fetch:Gp};x.forEach(To,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Qi=e=>`- ${e}`,Wp=e=>x.isFunction(e)||e===null||e===!1,ks={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 a;if(n=r,!Wp(r)&&(n=To[(a=String(r)).toLowerCase()],n===void 0))throw new W(`Unknown adapter '${a}'`);if(n)break;o[a||"#"+i]=n}if(!n){const i=Object.entries(o).map(([s,l])=>`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
91
91
  `+i.map(Qi).join(`
92
92
  `):" "+Qi(i[0]):"as no adapter specified";throw new W("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:To};function so(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gr(null,e)}function ea(e){return so(e),e.headers=Me.from(e.headers),e.data=ao.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ks.getAdapter(e.adapter||Ur.adapter)(e).then(function(n){return so(e),n.data=ao.call(e,e.transformResponse,n),n.headers=Me.from(n.headers),n},function(n){return Ts(n)||(so(e),n&&n.response&&(n.response.data=ao.call(e,e.transformResponse,n.response),n.response.headers=Me.from(n.response.headers))),Promise.reject(n)})}const Ps="1.8.1",Un={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Un[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ta={};Un.transitional=function(t,r,n){function o(i,a){return"[Axios v"+Ps+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return(i,a,s)=>{if(t===!1)throw new W(o(a," has been removed"+(r?" in "+r:"")),W.ERR_DEPRECATED);return r&&!ta[a]&&(ta[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,a,s):!0}};Un.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Hp(e,t,r){if(typeof e!="object")throw new W("options must be an object",W.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new W("option "+i+" must be "+l,W.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new W("Unknown option "+i,W.ERR_BAD_OPTION)}}const sn={assertOptions:Hp,validators:Un},tt=sn.validators;let Mt=class{constructor(t){this.defaults=t,this.interceptors={request:new Wi,response:new Wi}}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+=`
93
- `+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Bt(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&sn.assertOptions(n,{silentJSONParsing:tt.transitional(tt.boolean),forcedJSONParsing:tt.transitional(tt.boolean),clarifyTimeoutError:tt.transitional(tt.boolean)},!1),o!=null&&(x.isFunction(o)?r.paramsSerializer={serialize:o}:sn.assertOptions(o,{encode:tt.function,serialize:tt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),sn.assertOptions(r,{baseUrl:tt.spelling("baseURL"),withXsrfToken:tt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&x.merge(i.common,i[r.method]);i&&x.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),r.headers=Me.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(r)===!1||(l=l&&f.synchronous,s.unshift(f.fulfilled,f.rejected))});const c=[];this.interceptors.response.forEach(function(f){c.push(f.fulfilled,f.rejected)});let u,d=0,p;if(!l){const b=[ea.bind(this),void 0];for(b.unshift.apply(b,s),b.push.apply(b,c),p=b.length,u=Promise.resolve(r);d<p;)u=u.then(b[d++],b[d++]);return u}p=s.length;let S=r;for(d=0;d<p;){const b=s[d++],f=s[d++];try{S=b(S)}catch(v){f.call(this,v);break}}try{u=ea.call(this,S)}catch(b){return Promise.reject(b)}for(d=0,p=c.length;d<p;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Bt(this.defaults,t);const r=Cs(t.baseURL,t.url,t.allowAbsoluteUrls);return vs(r,t.params,t.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(t){Mt.prototype[t]=function(r,n){return this.request(Bt(n||{},{method:t,url:r,data:(n||{}).data}))}});x.forEach(["post","put","patch"],function(t){function r(n){return function(i,a,s){return this.request(Bt(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Mt.prototype[t]=r(),Mt.prototype[t+"Form"]=r(!0)});let Kp=class js{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 a=new Promise(s=>{n.subscribe(s),i=s}).then(o);return a.cancel=function(){n.unsubscribe(i)},a},t(function(i,a,s){n.reason||(n.reason=new gr(i,a,s),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 js(function(o){t=o}),cancel:t}}};function qp(e){return function(r){return e.apply(null,r)}}function Yp(e){return x.isObject(e)&&e.isAxiosError===!0}const Eo={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(Eo).forEach(([e,t])=>{Eo[t]=e});function _s(e){const t=new Mt(e),r=cs(Mt.prototype.request,t);return x.extend(r,Mt.prototype,t,{allOwnKeys:!0}),x.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return _s(Bt(e,o))},r}const xe=_s(Ur);xe.Axios=Mt;xe.CanceledError=gr;xe.CancelToken=Kp;xe.isCancel=Ts;xe.VERSION=Ps;xe.toFormData=Bn;xe.AxiosError=W;xe.Cancel=xe.CanceledError;xe.all=function(t){return Promise.all(t)};xe.spread=qp;xe.isAxiosError=Yp;xe.mergeConfig=Bt;xe.AxiosHeaders=Me;xe.formToJSON=e=>ws(x.isHTMLForm(e)?new FormData(e):e);xe.getAdapter=ks.getAdapter;xe.HttpStatusCode=Eo;xe.default=xe;const{Axios:K0,AxiosError:ra,CanceledError:q0,isCancel:Y0,CancelToken:Z0,VERSION:X0,all:Q0,Cancel:eb,isAxiosError:tb,spread:rb,toFormData:nb,AxiosHeaders:ob,HttpStatusCode:ib,formToJSON:ab,getAdapter:sb,mergeConfig:lb}=xe;function Zp(e){try{return JSON.stringify(e)}catch{return}}function Xp(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function Qp(e){var t,r,n,o;return e instanceof ra&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof ra&&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: ${Zp(e)||e}`}const Vo=e=>{const t=e.softTimeout||3e3,[r,n]=z.useState(!1),o=j.useTheme();return z.useEffect(()=>{const i=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(i)}),m.jsx(j.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:o.palette.text.primary},children:e.error?m.jsx($s,{loadingMessage:e.message,error:e.error}):m.jsxs(m.Fragment,{children:[m.jsx(j.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&m.jsx("div",{children:e.message}),m.jsx(j.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:o.palette.text.secondary},children:"This is taking longer than expected..."})]})})},$s=e=>{const t=Qp(e.error),r=e.error instanceof Error?e.error.stack:null,n=j.useTheme();return m.jsxs(j.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 ${jo.lowerFirst(j.capitalize(e.loadingMessage))} - `:"")+t,m.jsx("br",{}),r&&m.jsx("pre",{children:r})]})},eg=({title:e,titleId:t,...r},n)=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.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"})),tg=z.forwardRef(eg),rg=({title:e,titleId:t,...r},n)=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.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"})),ng=z.forwardRef(rg),og=({title:e,titleId:t,...r},n)=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.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"})),ig=z.forwardRef(og),ag=({title:e,titleId:t,...r},n)=>C.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?C.createElement("title",{id:t},e):null,C.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"})),sg=z.forwardRef(ag);function lg(){this.__data__=[],this.size=0}function Ls(e,t){return e===t||e!==e&&t!==t}function zn(e,t){for(var r=e.length;r--;)if(Ls(e[r][0],t))return r;return-1}var cg=Array.prototype,ug=cg.splice;function fg(e){var t=this.__data__,r=zn(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():ug.call(t,r,1),--this.size,!0}function dg(e){var t=this.__data__,r=zn(t,e);return r<0?void 0:t[r][1]}function pg(e){return zn(this.__data__,e)>-1}function gg(e,t){var r=this.__data__,n=zn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function mt(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])}}mt.prototype.clear=lg;mt.prototype.delete=fg;mt.prototype.get=dg;mt.prototype.has=pg;mt.prototype.set=gg;function hg(){this.__data__=new mt,this.size=0}function mg(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function yg(e){return this.__data__.get(e)}function bg(e){return this.__data__.has(e)}var Sg="[object AsyncFunction]",vg="[object Function]",xg="[object GeneratorFunction]",wg="[object Proxy]";function Is(e){if(!Dt(e))return!1;var t=zt(e);return t==vg||t==xg||t==Sg||t==wg}var lo=st["__core-js_shared__"],na=function(){var e=/[^.]+$/.exec(lo&&lo.keys&&lo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Tg(e){return!!na&&na in e}var Eg=Function.prototype,Cg=Eg.toString;function Jt(e){if(e!=null){try{return Cg.call(e)}catch{}try{return e+""}catch{}}return""}var Og=/[\\^$.*+?()[\]{}|]/g,Rg=/^\[object .+?Constructor\]$/,Ag=Function.prototype,kg=Object.prototype,Pg=Ag.toString,jg=kg.hasOwnProperty,_g=RegExp("^"+Pg.call(jg).replace(Og,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $g(e){if(!Dt(e)||Tg(e))return!1;var t=Is(e)?_g:Rg;return t.test(Jt(e))}function Lg(e,t){return e==null?void 0:e[t]}function Gt(e,t){var r=Lg(e,t);return $g(r)?r:void 0}var Mr=Gt(st,"Map"),Nr=Gt(Object,"create");function Ig(){this.__data__=Nr?Nr(null):{},this.size=0}function Mg(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ng="__lodash_hash_undefined__",Dg=Object.prototype,Fg=Dg.hasOwnProperty;function Bg(e){var t=this.__data__;if(Nr){var r=t[e];return r===Ng?void 0:r}return Fg.call(t,e)?t[e]:void 0}var Vg=Object.prototype,Ug=Vg.hasOwnProperty;function zg(e){var t=this.__data__;return Nr?t[e]!==void 0:Ug.call(t,e)}var Jg="__lodash_hash_undefined__";function Gg(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Nr&&t===void 0?Jg:t,this}function Vt(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])}}Vt.prototype.clear=Ig;Vt.prototype.delete=Mg;Vt.prototype.get=Bg;Vt.prototype.has=zg;Vt.prototype.set=Gg;function Wg(){this.size=0,this.__data__={hash:new Vt,map:new(Mr||mt),string:new Vt}}function Hg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Jn(e,t){var r=e.__data__;return Hg(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Kg(e){var t=Jn(this,e).delete(e);return this.size-=t?1:0,t}function qg(e){return Jn(this,e).get(e)}function Yg(e){return Jn(this,e).has(e)}function Zg(e,t){var r=Jn(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function yt(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])}}yt.prototype.clear=Wg;yt.prototype.delete=Kg;yt.prototype.get=qg;yt.prototype.has=Yg;yt.prototype.set=Zg;var Xg=200;function Qg(e,t){var r=this.__data__;if(r instanceof mt){var n=r.__data__;if(!Mr||n.length<Xg-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new yt(n)}return r.set(e,t),this.size=r.size,this}function gt(e){var t=this.__data__=new mt(e);this.size=t.size}gt.prototype.clear=hg;gt.prototype.delete=mg;gt.prototype.get=yg;gt.prototype.has=bg;gt.prototype.set=Qg;var eh="__lodash_hash_undefined__";function th(e){return this.__data__.set(e,eh),this}function rh(e){return this.__data__.has(e)}function vn(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new yt;++t<r;)this.add(e[t])}vn.prototype.add=vn.prototype.push=th;vn.prototype.has=rh;function nh(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 oh(e,t){return e.has(t)}var ih=1,ah=2;function Ms(e,t,r,n,o,i){var a=r&ih,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,p=!0,S=r&ah?new vn:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var b=e[d],f=t[d];if(n)var v=a?n(f,b,d,t,e,i):n(b,f,d,e,t,i);if(v!==void 0){if(v)continue;p=!1;break}if(S){if(!nh(t,function(E,O){if(!oh(S,O)&&(b===E||o(b,E,r,n,i)))return S.push(O)})){p=!1;break}}else if(!(b===f||o(b,f,r,n,i))){p=!1;break}}return i.delete(e),i.delete(t),p}var oa=st.Uint8Array;function sh(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function lh(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var ch=1,uh=2,fh="[object Boolean]",dh="[object Date]",ph="[object Error]",gh="[object Map]",hh="[object Number]",mh="[object RegExp]",yh="[object Set]",bh="[object String]",Sh="[object Symbol]",vh="[object ArrayBuffer]",xh="[object DataView]",ia=kt?kt.prototype:void 0,co=ia?ia.valueOf:void 0;function wh(e,t,r,n,o,i,a){switch(r){case xh:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case vh:return!(e.byteLength!=t.byteLength||!i(new oa(e),new oa(t)));case fh:case dh:case hh:return Ls(+e,+t);case ph:return e.name==t.name&&e.message==t.message;case mh:case bh:return e==t+"";case gh:var s=sh;case yh:var l=n&ch;if(s||(s=lh),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=uh,a.set(e,t);var u=Ms(s(e),s(t),n,o,i,a);return a.delete(e),u;case Sh:if(co)return co.call(e)==co.call(t)}return!1}function Th(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var at=Array.isArray;function Eh(e,t,r){var n=t(e);return at(e)?n:Th(n,r(e))}function Ch(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}function Oh(){return[]}var Rh=Object.prototype,Ah=Rh.propertyIsEnumerable,aa=Object.getOwnPropertySymbols,kh=aa?function(e){return e==null?[]:(e=Object(e),Ch(aa(e),function(t){return Ah.call(e,t)}))}:Oh;function Ph(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var jh="[object Arguments]";function sa(e){return Ft(e)&&zt(e)==jh}var Ns=Object.prototype,_h=Ns.hasOwnProperty,$h=Ns.propertyIsEnumerable,Ds=sa(function(){return arguments}())?sa:function(e){return Ft(e)&&_h.call(e,"callee")&&!$h.call(e,"callee")};function Lh(){return!1}var Fs=typeof exports=="object"&&exports&&!exports.nodeType&&exports,la=Fs&&typeof module=="object"&&module&&!module.nodeType&&module,Ih=la&&la.exports===Fs,ca=Ih?st.Buffer:void 0,Mh=ca?ca.isBuffer:void 0,Co=Mh||Lh,Nh=9007199254740991,Dh=/^(?:0|[1-9]\d*)$/;function Bs(e,t){var r=typeof e;return t=t??Nh,!!t&&(r=="number"||r!="symbol"&&Dh.test(e))&&e>-1&&e%1==0&&e<t}var Fh=9007199254740991;function Uo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Fh}var Bh="[object Arguments]",Vh="[object Array]",Uh="[object Boolean]",zh="[object Date]",Jh="[object Error]",Gh="[object Function]",Wh="[object Map]",Hh="[object Number]",Kh="[object Object]",qh="[object RegExp]",Yh="[object Set]",Zh="[object String]",Xh="[object WeakMap]",Qh="[object ArrayBuffer]",em="[object DataView]",tm="[object Float32Array]",rm="[object Float64Array]",nm="[object Int8Array]",om="[object Int16Array]",im="[object Int32Array]",am="[object Uint8Array]",sm="[object Uint8ClampedArray]",lm="[object Uint16Array]",cm="[object Uint32Array]",ce={};ce[tm]=ce[rm]=ce[nm]=ce[om]=ce[im]=ce[am]=ce[sm]=ce[lm]=ce[cm]=!0;ce[Bh]=ce[Vh]=ce[Qh]=ce[Uh]=ce[em]=ce[zh]=ce[Jh]=ce[Gh]=ce[Wh]=ce[Hh]=ce[Kh]=ce[qh]=ce[Yh]=ce[Zh]=ce[Xh]=!1;function um(e){return Ft(e)&&Uo(e.length)&&!!ce[zt(e)]}function fm(e){return function(t){return e(t)}}var Vs=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Pr=Vs&&typeof module=="object"&&module&&!module.nodeType&&module,dm=Pr&&Pr.exports===Vs,uo=dm&&as.process,ua=function(){try{var e=Pr&&Pr.require&&Pr.require("util").types;return e||uo&&uo.binding&&uo.binding("util")}catch{}}(),fa=ua&&ua.isTypedArray,Us=fa?fm(fa):um,pm=Object.prototype,gm=pm.hasOwnProperty;function hm(e,t){var r=at(e),n=!r&&Ds(e),o=!r&&!n&&Co(e),i=!r&&!n&&!o&&Us(e),a=r||n||o||i,s=a?Ph(e.length,String):[],l=s.length;for(var c in e)gm.call(e,c)&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Bs(c,l)))&&s.push(c);return s}var mm=Object.prototype;function ym(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||mm;return e===r}function bm(e,t){return function(r){return e(t(r))}}var Sm=bm(Object.keys,Object),vm=Object.prototype,xm=vm.hasOwnProperty;function wm(e){if(!ym(e))return Sm(e);var t=[];for(var r in Object(e))xm.call(e,r)&&r!="constructor"&&t.push(r);return t}function zs(e){return e!=null&&Uo(e.length)&&!Is(e)}function zo(e){return zs(e)?hm(e):wm(e)}function da(e){return Eh(e,zo,kh)}var Tm=1,Em=Object.prototype,Cm=Em.hasOwnProperty;function Om(e,t,r,n,o,i){var a=r&Tm,s=da(e),l=s.length,c=da(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var p=s[d];if(!(a?p in t:Cm.call(t,p)))return!1}var S=i.get(e),b=i.get(t);if(S&&b)return S==t&&b==e;var f=!0;i.set(e,t),i.set(t,e);for(var v=a;++d<l;){p=s[d];var E=e[p],O=t[p];if(n)var k=a?n(O,E,p,t,e,i):n(E,O,p,e,t,i);if(!(k===void 0?E===O||o(E,O,r,n,i):k)){f=!1;break}v||(v=p=="constructor")}if(f&&!v){var T=e.constructor,P=t.constructor;T!=P&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof P=="function"&&P instanceof P)&&(f=!1)}return i.delete(e),i.delete(t),f}var Oo=Gt(st,"DataView"),Ro=Gt(st,"Promise"),Ao=Gt(st,"Set"),ko=Gt(st,"WeakMap"),pa="[object Map]",Rm="[object Object]",ga="[object Promise]",ha="[object Set]",ma="[object WeakMap]",ya="[object DataView]",Am=Jt(Oo),km=Jt(Mr),Pm=Jt(Ro),jm=Jt(Ao),_m=Jt(ko),Et=zt;(Oo&&Et(new Oo(new ArrayBuffer(1)))!=ya||Mr&&Et(new Mr)!=pa||Ro&&Et(Ro.resolve())!=ga||Ao&&Et(new Ao)!=ha||ko&&Et(new ko)!=ma)&&(Et=function(e){var t=zt(e),r=t==Rm?e.constructor:void 0,n=r?Jt(r):"";if(n)switch(n){case Am:return ya;case km:return pa;case Pm:return ga;case jm:return ha;case _m:return ma}return t});var $m=1,ba="[object Arguments]",Sa="[object Array]",Kr="[object Object]",Lm=Object.prototype,va=Lm.hasOwnProperty;function Im(e,t,r,n,o,i){var a=at(e),s=at(t),l=a?Sa:Et(e),c=s?Sa:Et(t);l=l==ba?Kr:l,c=c==ba?Kr:c;var u=l==Kr,d=c==Kr,p=l==c;if(p&&Co(e)){if(!Co(t))return!1;a=!0,u=!1}if(p&&!u)return i||(i=new gt),a||Us(e)?Ms(e,t,r,n,o,i):wh(e,t,l,r,n,o,i);if(!(r&$m)){var S=u&&va.call(e,"__wrapped__"),b=d&&va.call(t,"__wrapped__");if(S||b){var f=S?e.value():e,v=b?t.value():t;return i||(i=new gt),o(f,v,r,n,i)}}return p?(i||(i=new gt),Om(e,t,r,n,o,i)):!1}function Gn(e,t,r,n,o){return e===t?!0:e==null||t==null||!Ft(e)&&!Ft(t)?e!==e&&t!==t:Im(e,t,r,n,Gn,o)}function Mm(e,t){return Gn(e,t)}const Js=({store:e})=>{const{t}=Te.useTranslation(),[r,n]=z.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),o=z.useRef(r);dr(()=>{const a=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;Mm(o.current,a)||(o.current=a,n(a))});const i=[];for(const[a,s]of r.entries())s&&i.push(a);return m.jsx(j.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:i.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:i.map(a=>a+1).join(", ")})})},Nm=j.styled(j.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 qr({labelValue:e,...t}){return m.jsxs(Nm,{fullWidth:!0,variant:"filled",children:[m.jsx(j.InputLabel,{id:t.labelId,children:e}),m.jsx(j.Select,{...t})]})}var xa=function(){try{var e=Gt(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Dm(e,t,r){t=="__proto__"&&xa?xa(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Fm(e,t,r,n){for(var o=-1,i=e==null?0:e.length;++o<i;){var a=e[o];t(n,a,r(a),e)}return n}function Bm(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var l=a[++o];if(r(i[l],l,i)===!1)break}return t}}var Vm=Bm();function Um(e,t){return e&&Vm(e,t,zo)}function zm(e,t){return function(r,n){if(r==null)return r;if(!zs(r))return e(r,n);for(var o=r.length,i=-1,a=Object(r);++i<o&&n(a[i],i,a)!==!1;);return r}}var Jm=zm(Um);function Gm(e,t,r,n){return Jm(e,function(o,i,a){t(n,o,r(o),a)}),n}var Wm=1,Hm=2;function Km(e,t,r,n){var o=r.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var a=r[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){a=r[o];var s=a[0],l=e[s],c=a[1];if(a[2]){if(l===void 0&&!(s in e))return!1}else{var u=new gt,d;if(!(d===void 0?Gn(c,l,Wm|Hm,n,u):d))return!1}}return!0}function Gs(e){return e===e&&!Dt(e)}function qm(e){for(var t=zo(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Gs(o)]}return t}function Ws(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Ym(e){var t=qm(e);return t.length==1&&t[0][2]?Ws(t[0][0],t[0][1]):function(r){return r===e||Km(r,e,t)}}var Zm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xm=/^\w*$/;function Jo(e,t){if(at(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Mn(e)?!0:Xm.test(e)||!Zm.test(e)||t!=null&&e in Object(t)}var Qm="Expected a function";function Go(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Qm);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 a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Go.Cache||yt),r}Go.Cache=yt;var ey=500;function ty(e){var t=Go(e,function(n){return r.size===ey&&r.clear(),n}),r=t.cache;return t}var ry=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ny=/\\(\\)?/g,oy=ty(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ry,function(r,n,o,i){t.push(o?i.replace(ny,"$1"):n||r)}),t});function iy(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 wa=kt?kt.prototype:void 0,Ta=wa?wa.toString:void 0;function Hs(e){if(typeof e=="string")return e;if(at(e))return iy(e,Hs)+"";if(Mn(e))return Ta?Ta.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ks(e){return e==null?"":Hs(e)}function qs(e,t){return at(e)?e:Jo(e,t)?[e]:oy(Ks(e))}function Wn(e){if(typeof e=="string"||Mn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ys(e,t){t=qs(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Wn(t[r++])];return r&&r==n?e:void 0}function ay(e,t,r){var n=e==null?void 0:Ys(e,t);return n===void 0?r:n}function sy(e,t){return e!=null&&t in Object(e)}function ly(e,t,r){t=qs(t,e);for(var n=-1,o=t.length,i=!1;++n<o;){var a=Wn(t[n]);if(!(i=e!=null&&r(e,a)))break;e=e[a]}return i||++n!=o?i:(o=e==null?0:e.length,!!o&&Uo(o)&&Bs(a,o)&&(at(e)||Ds(e)))}function cy(e,t){return e!=null&&ly(e,t,sy)}var uy=1,fy=2;function dy(e,t){return Jo(e)&&Gs(t)?Ws(Wn(e),t):function(r){var n=ay(r,e);return n===void 0&&n===t?cy(r,e):Gn(t,n,uy|fy)}}function py(e){return e}function gy(e){return function(t){return t==null?void 0:t[e]}}function hy(e){return function(t){return Ys(t,e)}}function my(e){return Jo(e)?gy(Wn(e)):hy(e)}function yy(e){return typeof e=="function"?e:e==null?py:typeof e=="object"?at(e)?dy(e[0],e[1]):Ym(e):my(e)}function by(e,t){return function(r,n){var o=at(r)?Fm:Gm,i={};return o(r,e,yy(n),i)}}var Yr=by(function(e,t,r){Dm(e,r,t)}),Sy=0;function vy(e){var t=++Sy;return Ks(e)+t}const Po=[{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}],xy=[{id:"continuous"},...Po],wy=["coordsys","tool"];class Hn{constructor(t,r,n,o){var i,a;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=n,this.tcps=o,this.selectedTabId="cartesian",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 s of n)if(s.coordinate_system===""){s.coordinate_system="world";break}this.selectedCoordSystemId=((i=n[0])==null?void 0:i.coordinate_system)||"world",this.selectedTcpId=((a=o[0])==null?void 0:a.id)||"",cr.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(cr.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 Hn(t,n,o||[],i||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return jo.countBy(this.coordSystems,t=>t.name)}async deactivate(){const t=this.jogger.activeWebsocket;this.jogger.setJoggingMode("increment"),t&&await t.closed()}async activate(){if(this.currentTab.id==="cartesian"){const t={tcpId:this.selectedTcpId,coordSystemId:this.activeCoordSystemId};this.activeDiscreteIncrement?this.jogger.setJoggingMode("increment",t):this.jogger.setJoggingMode("cartesian",t)}else this.jogger.setJoggingMode("joint");return this.jogger}loadFromLocalStorage(){const t=Ot.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:"Joints"}]}get incrementOptions(){return xy}get discreteIncrementOptions(){return Po}get incrementOptionsById(){return Yr(this.incrementOptions,t=>t.id)}get tabsById(){return Yr(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 Yr(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 Yr(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:Po.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}get velocityInDisplayUnits(){return this.currentMotionType==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityDegPerSec}get minVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.minTranslationVelocityMmPerSec:this.minRotationVelocityDegPerSec}get maxVelocityInDisplayUnits(){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}lock(t){this.locks.add(t)}unlock(t){this.locks.delete(t)}async withMotionLock(t){const r=vy();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const Ty=ve.observer(({store:e})=>{var n;const{t}=Te.useTranslation();function r(o){switch(o){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return o}}return m.jsxs(j.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"min-height min-height","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:[m.jsx(qr,{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=>m.jsx(j.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))}),m.jsx(qr,{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=>m.jsx(j.MenuItem,{value:o.id,children:o.id},o.id))}),m.jsx(qr,{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:wy.map(o=>m.jsx(j.MenuItem,{value:o,children:r(o)},o))}),m.jsxs(qr,{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:[m.jsx(j.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(o=>m.jsx(j.MenuItem,{value:o.id,children:e.currentMotionType==="translate"?`${o.mm}mm`:`${o.degrees}°`},o.id))]})]})}),Ey=j.styled(j.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 Cy(e,t,r=(n,o)=>n===o){return e.length===t.length&&e.every((n,o)=>r(n,t[o]))}const Oy=2;function ir(e,t,r,n,o){return r===1?Math.min(e+t,o):Math.max(e-t,n)}function Zs(e,t){return e-t}function Ea(e,t){const{index:r}=e.reduce((n,o,i)=>{const a=Math.abs(t-o);return n===null||a<n.distance||a===n.distance?{distance:a,index:i}:n},null)??{};return r}function Zr(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 xn(e,t,r){return(e-t)*100/(r-t)}function Ry(e,t,r){return(r-t)*e+t}function Ay(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 ky(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(Ay(t)))}function Ca({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(Zs)}function Xr({sliderRef:e,activeIndex:t,setActive:r}){var o,i,a;const n=rn(e.current);(!((o=e.current)!=null&&o.contains(n.activeElement))||Number((i=n==null?void 0:n.activeElement)==null?void 0:i.getAttribute("data-index"))!==t)&&((a=e.current)==null||a.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function Qr(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?Cy(e,t):!1}const Py={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}%`})}},jy=e=>e;let en;function Oa(){return en===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?en=CSS.supports("touch-action","none"):en=!0),en}function _y(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:o=!1,isRtl:i=!1,marks:a=!1,max:s=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:p="horizontal",rootRef:S,scale:b=jy,step:f=1,shiftStep:v=10,tabIndex:E,value:O}=e,k=C.useRef(void 0),[T,P]=C.useState(-1),[$,I]=C.useState(-1),[B,H]=C.useState(!1),g=C.useRef(0),_=C.useRef(null),[M,N]=mu({controlled:O,default:r??l,name:"Slider"}),D=u&&((A,L,V)=>{const K=A.nativeEvent||A,te=new K.constructor(K.type,K);Object.defineProperty(te,"target",{writable:!0,value:{value:L,name:c}}),_.current=L,u(te,L,V)}),Q=Array.isArray(M);let Y=Q?M.slice().sort(Zs):[M];Y=Y.map(A=>A==null?l:ar(A,l,s));const Ae=a===!0&&f!==null?[...Array(Math.floor((s-l)/f)+1)].map((A,L)=>({value:l+f*L})):a||[],ee=Ae.map(A=>A.value),[le,Ce]=C.useState(-1),Z=C.useRef(null),Ne=Ha(S,Z),lt=A=>L=>{var K;const V=Number(L.currentTarget.getAttribute("data-index"));yi(L.target)&&Ce(V),I(V),(K=A==null?void 0:A.onFocus)==null||K.call(A,L)},hr=A=>L=>{var V;yi(L.target)||Ce(-1),I(-1),(V=A==null?void 0:A.onBlur)==null||V.call(A,L)},Wt=(A,L)=>{const V=Number(A.currentTarget.getAttribute("data-index")),K=Y[V],te=ee.indexOf(K);let U=L;if(Ae&&f==null){const ye=ee[ee.length-1];U>=ye?U=ye:U<=ee[0]?U=ee[0]:U=U<K?ee[te-1]:ee[te+1]}if(U=ar(U,l,s),Q){o&&(U=ar(U,Y[V-1]||-1/0,Y[V+1]||1/0));const ye=U;U=Ca({values:Y,newValue:U,index:V});let Re=V;o||(Re=U.indexOf(ye)),Xr({sliderRef:Z,activeIndex:Re})}N(U),Ce(V),D&&!Qr(U,M)&&D(A,U,V),d&&d(A,_.current??U)},jt=A=>L=>{var V;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(L.key)){L.preventDefault();const K=Number(L.currentTarget.getAttribute("data-index")),te=Y[K];let U=null;if(f!=null){const ye=L.shiftKey?v:f;switch(L.key){case"ArrowUp":U=ir(te,ye,1,l,s);break;case"ArrowRight":U=ir(te,ye,i?-1:1,l,s);break;case"ArrowDown":U=ir(te,ye,-1,l,s);break;case"ArrowLeft":U=ir(te,ye,i?1:-1,l,s);break;case"PageUp":U=ir(te,v,1,l,s);break;case"PageDown":U=ir(te,v,-1,l,s);break;case"Home":U=l;break;case"End":U=s;break}}else if(Ae){const ye=ee[ee.length-1],Re=ee.indexOf(te),ge=[i?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],Le=[i?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];ge.includes(L.key)?Re===0?U=ee[0]:U=ee[Re-1]:Le.includes(L.key)&&(Re===ee.length-1?U=ye:U=ee[Re+1])}U!=null&&Wt(L,U)}(V=A==null?void 0:A.onKeyDown)==null||V.call(A,L)};Ga(()=>{var A;n&&Z.current.contains(document.activeElement)&&((A=document.activeElement)==null||A.blur())},[n]),n&&T!==-1&&P(-1),n&&le!==-1&&Ce(-1);const bt=A=>L=>{var V;(V=A.onChange)==null||V.call(A,L),Wt(L,L.target.valueAsNumber)},Ve=C.useRef(void 0);let He=p;i&&p==="horizontal"&&(He+="-reverse");const Ue=({finger:A,move:L=!1})=>{const{current:V}=Z,{width:K,height:te,bottom:U,left:ye}=V.getBoundingClientRect();let Re;He.startsWith("vertical")?Re=(U-A.y)/te:Re=(A.x-ye)/K,He.includes("-reverse")&&(Re=1-Re);let ge;if(ge=Ry(Re,l,s),f)ge=ky(ge,f,l);else{const _t=Ea(ee,ge);ge=ee[_t]}ge=ar(ge,l,s);let Le=0;if(Q){L?Le=Ve.current:Le=Ea(Y,ge),o&&(ge=ar(ge,Y[Le-1]||-1/0,Y[Le+1]||1/0));const _t=ge;ge=Ca({values:Y,newValue:ge,index:Le}),o&&L||(Le=ge.indexOf(_t),Ve.current=Le)}return{newValue:ge,activeIndex:Le}},ct=eo(A=>{const L=Zr(A,k);if(!L)return;if(g.current+=1,A.type==="mousemove"&&A.buttons===0){De(A);return}const{newValue:V,activeIndex:K}=Ue({finger:L,move:!0});Xr({sliderRef:Z,activeIndex:K,setActive:P}),N(V),!B&&g.current>Oy&&H(!0),D&&!Qr(V,M)&&D(A,V,K)}),De=eo(A=>{const L=Zr(A,k);if(H(!1),!L)return;const{newValue:V}=Ue({finger:L,move:!0});P(-1),A.type==="touchend"&&I(-1),d&&d(A,_.current??V),k.current=void 0,ut()}),Oe=eo(A=>{if(n)return;Oa()||A.preventDefault();const L=A.changedTouches[0];L!=null&&(k.current=L.identifier);const V=Zr(A,k);if(V!==!1){const{newValue:te,activeIndex:U}=Ue({finger:V});Xr({sliderRef:Z,activeIndex:U,setActive:P}),N(te),D&&!Qr(te,M)&&D(A,te,U)}g.current=0;const K=rn(Z.current);K.addEventListener("touchmove",ct,{passive:!0}),K.addEventListener("touchend",De,{passive:!0})}),ut=C.useCallback(()=>{const A=rn(Z.current);A.removeEventListener("mousemove",ct),A.removeEventListener("mouseup",De),A.removeEventListener("touchmove",ct),A.removeEventListener("touchend",De)},[De,ct]);C.useEffect(()=>{const{current:A}=Z;return A.addEventListener("touchstart",Oe,{passive:Oa()}),()=>{A.removeEventListener("touchstart",Oe),ut()}},[ut,Oe]),C.useEffect(()=>{n&&ut()},[n,ut]);const St=A=>L=>{var te;if((te=A.onMouseDown)==null||te.call(A,L),n||L.defaultPrevented||L.button!==0)return;L.preventDefault();const V=Zr(L,k);if(V!==!1){const{newValue:U,activeIndex:ye}=Ue({finger:V});Xr({sliderRef:Z,activeIndex:ye,setActive:P}),N(U),D&&!Qr(U,M)&&D(L,U,ye)}g.current=0;const K=rn(Z.current);K.addEventListener("mousemove",ct,{passive:!0}),K.addEventListener("mouseup",De)},Xe=xn(Q?Y[0]:l,l,s),Ee=xn(Y[Y.length-1],l,s)-Xe,vt=(A={})=>{const L=nn(A),V={onMouseDown:St(L||{})},K={...L,...V};return{...A,ref:Ne,...K}},ft=A=>L=>{var K;(K=A.onMouseOver)==null||K.call(A,L);const V=Number(L.currentTarget.getAttribute("data-index"));I(V)},Ht=A=>L=>{var V;(V=A.onMouseLeave)==null||V.call(A,L),I(-1)},Kt=(A={})=>{const L=nn(A),V={onMouseOver:ft(L||{}),onMouseLeave:Ht(L||{})};return{...A,...L,...V}},xt=A=>({pointerEvents:T!==-1&&T!==A?"none":void 0});let wt;return p==="vertical"&&(wt=i?"vertical-rl":"vertical-lr"),{active:T,axis:He,axisProps:Py,dragging:B,focusedThumbIndex:le,getHiddenInputProps:(A={})=>{const L=nn(A),V={onChange:bt(L||{}),onFocus:lt(L||{}),onBlur:hr(L||{}),onKeyDown:jt(L||{})},K={...L,...V};return{tabIndex:E,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":b(s),"aria-valuemin":b(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...A,...K,style:{...yu,direction:i?"rtl":"ltr",width:"100%",height:"100%",writingMode:wt}}},getRootProps:vt,getThumbProps:Kt,marks:Ae,open:$,range:Q,rootRef:Ne,trackLeap:Ee,trackOffset:Xe,values:Y,getThumbStyle:xt}}function ln(e){return typeof e=="string"}const $y=e=>!e||!ln(e);function Ly(e){return typeof e.main=="string"}function Iy(e,t=[]){if(!Ly(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Wo(e=[]){return([,t])=>t&&Iy(t,e)}function My(e){return Br("MuiSlider",e)}const Ge=Fa("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"]),Ny=e=>{const{open:t}=e;return{offset:it(t&&Ge.valueLabelOpen),circle:Ge.valueLabelCircle,label:Ge.valueLabelLabel}};function Xs(e){const{children:t,className:r,value:n}=e,o=Ny(e);return t?C.cloneElement(t,{className:it(t.props.className)},m.jsxs(C.Fragment,{children:[t.props.children,m.jsx("span",{className:it(o.offset,r),"aria-hidden":!0,children:m.jsx("span",{className:o.circle,children:m.jsx("span",{className:o.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(Xs.propTypes={children:h.element.isRequired,className:h.string,value:h.node});function Ra(e){return e}const Dy=ht("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${_e(r.color)}`],r.size!=="medium"&&t[`size${_e(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(Ut(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Ge.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Ge.dragging}`]:{[`& .${Ge.thumb}, & .${Ge.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Wo()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),Fy=ht("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}}]}),By=ht("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(Ut(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Wo()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:_r(e.palette[t].main,.62),borderColor:_r(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:jr(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:jr(e.palette[t].main,.5)})}}}))]}))),Vy=ht("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${_e(r.color)}`],r.size!=="medium"&&t[`thumbSize${_e(r.size)}`]]}})(Ut(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${Ge.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(Wo()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${Ge.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${ho(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${Ge.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${ho(e.palette[t].main,.16)}`}}}}))]}))),Qs=ht(Xs,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(Ut(({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%"},[`&.${Ge.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%"},[`&.${Ge.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(Qs.propTypes={children:h.element.isRequired,index:h.number.isRequired,open:h.bool.isRequired,value:h.node});const Uy=ht("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Mo(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(Ut(({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}}]}))),zy=ht("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Mo(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(Ut(({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}}]}))),Jy=e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:i,classes:a,color:s,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",o==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",s&&`color${_e(s)}`,l&&`size${_e(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${_e(l)}`,s&&`thumbColor${_e(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Lo(c,My,a)},Gy=({children:e})=>e,el=C.forwardRef(function(t,r){const n=No({props:t,name:"MuiSlider"}),o=Tu(),{"aria-label":i,"aria-valuetext":a,"aria-labelledby":s,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:p,className:S,disableSwap:b=!1,disabled:f=!1,getAriaLabel:v,getAriaValueText:E,marks:O=!1,max:k=100,min:T=0,name:P,onChange:$,onChangeCommitted:I,orientation:B="horizontal",shiftStep:H=10,size:g="medium",step:_=1,scale:M=Ra,slotProps:N,slots:D,tabIndex:Q,track:Y="normal",value:Ae,valueLabelDisplay:ee="off",valueLabelFormat:le=Ra,...Ce}=n,Z={...n,isRtl:o,max:k,min:T,classes:p,disabled:f,disableSwap:b,orientation:B,marks:O,color:d,size:g,step:_,shiftStep:H,scale:M,track:Y,valueLabelDisplay:ee,valueLabelFormat:le},{axisProps:Ne,getRootProps:lt,getHiddenInputProps:hr,getThumbProps:Wt,open:jt,active:bt,axis:Ve,focusedThumbIndex:He,range:Ue,dragging:ct,marks:De,values:Oe,trackOffset:ut,trackLeap:St,getThumbStyle:Xe}=_y({...Z,rootRef:r});Z.marked=De.length>0&&De.some(ue=>ue.label),Z.dragging=ct,Z.focusedThumbIndex=He;const Ee=Jy(Z),vt=(D==null?void 0:D.root)??c.Root??Dy,ft=(D==null?void 0:D.rail)??c.Rail??Fy,Ht=(D==null?void 0:D.track)??c.Track??By,Kt=(D==null?void 0:D.thumb)??c.Thumb??Vy,xt=(D==null?void 0:D.valueLabel)??c.ValueLabel??Qs,wt=(D==null?void 0:D.mark)??c.Mark??Uy,qt=(D==null?void 0:D.markLabel)??c.MarkLabel??zy,A=(D==null?void 0:D.input)??c.Input??"input",L=(N==null?void 0:N.root)??u.root,V=(N==null?void 0:N.rail)??u.rail,K=(N==null?void 0:N.track)??u.track,te=(N==null?void 0:N.thumb)??u.thumb,U=(N==null?void 0:N.valueLabel)??u.valueLabel,ye=(N==null?void 0:N.mark)??u.mark,Re=(N==null?void 0:N.markLabel)??u.markLabel,ge=(N==null?void 0:N.input)??u.input,Le=Tt({elementType:vt,getSlotProps:lt,externalSlotProps:L,externalForwardedProps:Ce,additionalProps:{...$y(vt)&&{as:l}},ownerState:{...Z,...L==null?void 0:L.ownerState},className:[Ee.root,S]}),_t=Tt({elementType:ft,externalSlotProps:V,ownerState:Z,className:Ee.rail}),Kn=Tt({elementType:Ht,externalSlotProps:K,additionalProps:{style:{...Ne[Ve].offset(ut),...Ne[Ve].leap(St)}},ownerState:{...Z,...K==null?void 0:K.ownerState},className:Ee.track}),mr=Tt({elementType:Kt,getSlotProps:Wt,externalSlotProps:te,ownerState:{...Z,...te==null?void 0:te.ownerState},className:Ee.thumb}),yr=Tt({elementType:xt,externalSlotProps:U,ownerState:{...Z,...U==null?void 0:U.ownerState},className:Ee.valueLabel}),Yt=Tt({elementType:wt,externalSlotProps:ye,ownerState:Z,className:Ee.mark}),Qe=Tt({elementType:qt,externalSlotProps:Re,ownerState:Z,className:Ee.markLabel}),br=Tt({elementType:A,getSlotProps:hr,externalSlotProps:ge,ownerState:Z});return m.jsxs(vt,{...Le,children:[m.jsx(ft,{..._t}),m.jsx(Ht,{...Kn}),De.filter(ue=>ue.value>=T&&ue.value<=k).map((ue,be)=>{const Sr=xn(ue.value,T,k),$t=Ne[Ve].offset(Sr);let Ke;return Y===!1?Ke=Oe.includes(ue.value):Ke=Y==="normal"&&(Ue?ue.value>=Oe[0]&&ue.value<=Oe[Oe.length-1]:ue.value<=Oe[0])||Y==="inverted"&&(Ue?ue.value<=Oe[0]||ue.value>=Oe[Oe.length-1]:ue.value>=Oe[0]),m.jsxs(C.Fragment,{children:[m.jsx(wt,{"data-index":be,...Yt,...!ln(wt)&&{markActive:Ke},style:{...$t,...Yt.style},className:it(Yt.className,Ke&&Ee.markActive)}),ue.label!=null?m.jsx(qt,{"aria-hidden":!0,"data-index":be,...Qe,...!ln(qt)&&{markLabelActive:Ke},style:{...$t,...Qe.style},className:it(Ee.markLabel,Qe.className,Ke&&Ee.markLabelActive),children:ue.label}):null]},be)}),Oe.map((ue,be)=>{const Sr=xn(ue,T,k),$t=Ne[Ve].offset(Sr),Ke=ee==="off"?Gy:xt;return m.jsx(Ke,{...!ln(Ke)&&{valueLabelFormat:le,valueLabelDisplay:ee,value:typeof le=="function"?le(M(ue),be):le,index:be,open:jt===be||bt===be||ee==="on",disabled:f},...yr,children:m.jsx(Kt,{"data-index":be,...mr,className:it(Ee.thumb,mr.className,bt===be&&Ee.active,He===be&&Ee.focusVisible),style:{...$t,...Xe(be),...mr.style},children:m.jsx(A,{"data-index":be,"aria-label":v?v(be):i,"aria-valuenow":M(ue),"aria-labelledby":s,"aria-valuetext":E?E(M(ue),be):a,value:Oe[be],...br})})},be)})]})});process.env.NODE_ENV!=="production"&&(el.propTypes={"aria-label":mi(h.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":h.string,"aria-valuetext":mi(h.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:h.node,classes:h.object,className:h.string,color:h.oneOfType([h.oneOf(["primary","secondary","error","info","success","warning"]),h.string]),components:h.shape({Input:h.elementType,Mark:h.elementType,MarkLabel:h.elementType,Rail:h.elementType,Root:h.elementType,Thumb:h.elementType,Track:h.elementType,ValueLabel:h.elementType}),componentsProps:h.shape({input:h.oneOfType([h.func,h.object]),mark:h.oneOfType([h.func,h.object]),markLabel:h.oneOfType([h.func,h.object]),rail:h.oneOfType([h.func,h.object]),root:h.oneOfType([h.func,h.object]),thumb:h.oneOfType([h.func,h.object]),track:h.oneOfType([h.func,h.object]),valueLabel:h.oneOfType([h.func,h.shape({children:h.element,className:h.string,open:h.bool,style:h.object,value:h.node,valueLabelDisplay:h.oneOf(["auto","off","on"])})])}),defaultValue:h.oneOfType([h.arrayOf(h.number),h.number]),disabled:h.bool,disableSwap:h.bool,getAriaLabel:h.func,getAriaValueText:h.func,marks:h.oneOfType([h.arrayOf(h.shape({label:h.node,value:h.number.isRequired})),h.bool]),max:h.number,min:h.number,name:h.string,onChange:h.func,onChangeCommitted:h.func,orientation:h.oneOf(["horizontal","vertical"]),scale:h.func,shiftStep:h.number,size:h.oneOfType([h.oneOf(["small","medium"]),h.string]),slotProps:h.shape({input:h.oneOfType([h.func,h.object]),mark:h.oneOfType([h.func,h.object]),markLabel:h.oneOfType([h.func,h.object]),rail:h.oneOfType([h.func,h.object]),root:h.oneOfType([h.func,h.object]),thumb:h.oneOfType([h.func,h.object]),track:h.oneOfType([h.func,h.object]),valueLabel:h.oneOfType([h.func,h.shape({children:h.element,className:h.string,open:h.bool,style:h.object,value:h.node,valueLabelDisplay:h.oneOf(["auto","off","on"])})])}),slots:h.shape({input:h.elementType,mark:h.elementType,markLabel:h.elementType,rail:h.elementType,root:h.elementType,thumb:h.elementType,track:h.elementType,valueLabel:h.elementType}),step:h.number,sx:h.oneOfType([h.arrayOf(h.oneOfType([h.func,h.object,h.bool])),h.func,h.object]),tabIndex:h.number,track:h.oneOf(["inverted","normal",!1]),value:h.oneOfType([h.arrayOf(h.number),h.number]),valueLabelDisplay:h.oneOf(["auto","off","on"]),valueLabelFormat:h.oneOfType([h.func,h.string])});var Wy="[object Number]";function Hy(e){return typeof e=="number"||Ft(e)&&zt(e)==Wy}const tl=ve.observer(e=>{j.useTheme();function t(r,n){n===e.velocity||!Hy(n)||e.onVelocityChange(n)}return m.jsxs(j.Stack,{direction:"row",gap:2,children:[m.jsx(el,{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):m.jsx(Ho,{value:e.velocity.toString()})]})});function Ho({value:e,sx:t}){var n;const r=j.useTheme();return m.jsx(j.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:m.jsx(j.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const rl=ve.observer(({store:e})=>{const{t}=Te.useTranslation(),r=ve.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 m.jsx(tl,{velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>m.jsx(Ho,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),Ky=ve.observer(({store:e,children:t})=>{var d,p,S,b,f,v,E,O,k;const{t:r}=Te.useTranslation(),n=j.useTheme();function o(T,P){(P==="translate"||P==="rotate")&&e.setSelectedCartesianMotionType(P)}os(()=>[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(T,P){const $=await e.activate(),I=$.motionStream.rapidlyChangingMotionState.tcp_pose,B=$.motionStream.rapidlyChangingMotionState.state.joint_position;I&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:T.axis,direction:T.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:I,currentJoints:B,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:T.axis,direction:T.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:P.mm}:{type:"rotate",distanceRads:Ot.degreesToRadians(P.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function a(T){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return i(T,e.activeDiscreteIncrement);T.motionType==="translate"?await e.jogger.startTCPTranslation({axis:T.axis,direction:T.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:T.axis,direction:T.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function s(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}const l=[{id:"x",colors:(S=(p=(d=n.componentsExt)==null?void 0:d.JoggingCartesian)==null?void 0:p.Axis)==null?void 0:S.X,icon:m.jsx(tg,{})},{id:"y",colors:(v=(f=(b=n.componentsExt)==null?void 0:b.JoggingCartesian)==null?void 0:f.Axis)==null?void 0:v.Y,icon:m.jsx(ng,{})},{id:"z",colors:(k=(O=(E=n.componentsExt)==null?void 0:E.JoggingCartesian)==null?void 0:O.Axis)==null?void 0:k.Z,icon:m.jsx(ig,{})}];function c(T){return r("General.mm.variable",{amount:T.toFixed(1)})}function u(T){return r("General.degree.variable",{amount:Ot.radiansToDegrees(T).toFixed(1)})}return m.jsxs(j.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[m.jsxs(j.Stack,{gap:2,children:[m.jsx(Ty,{store:e}),m.jsx(rl,{store:e}),m.jsx(j.Divider,{})]}),m.jsx(j.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:m.jsxs(j.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[m.jsxs(Ey,{value:e.selectedCartesianMotionType,onChange:o,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[m.jsx(j.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),m.jsx(j.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&l.map(T=>{var P;return m.jsx(bo,{colors:T.colors,disabled:e.isLocked,activeJoggingDirection:((P=e.incrementJogInProgress)==null?void 0:P.axis)===T.id?e.incrementJogInProgress.direction:void 0,label:m.jsxs(m.Fragment,{children:[T.icon,m.jsx(j.Typography,{sx:{fontSize:"24px",color:n.palette.text.primary},children:T.id.toUpperCase()})]}),getDisplayedValue:()=>{var $;return c((($=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:$.position[T.id])||0)},startJogging:$=>a({axis:T.id,motionType:"translate",direction:$}),stopJogging:s},T.id)}),e.selectedCartesianMotionType==="rotate"&&l.map(T=>{var P;return m.jsx(bo,{colors:T.colors,disabled:e.isLocked,activeJoggingDirection:((P=e.incrementJogInProgress)==null?void 0:P.axis)===T.id?e.incrementJogInProgress.direction:void 0,label:m.jsxs(m.Fragment,{children:[m.jsx(sg,{}),m.jsx(j.Typography,{sx:{fontSize:"24px",color:n.palette.text.primary},children:T.id.toUpperCase()})]}),getDisplayedValue:()=>{var $,I;return u(((I=($=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:$.orientation)==null?void 0:I[T.id])||0)},startJogging:$=>a({axis:T.id,motionType:"rotate",direction:$}),stopJogging:s},T.id)})]})}),m.jsx(Js,{store:e}),t&&m.jsx(j.Divider,{}),t]})}),qy=ve.observer(({store:e,children:t})=>{async function r(o){await e.activate(),await e.jogger.startJointRotation({joint:o.joint,direction:o.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function n(){await e.jogger.stop(),await e.deactivate()}return m.jsxs(j.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[m.jsx(rl,{store:e}),m.jsx(j.Divider,{}),m.jsx(j.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:m.jsx(j.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(o=>{var l;const i=(l=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:l[o.index],a=(i==null?void 0:i.lower_limit)!==void 0?Ot.radiansToDegrees(i.lower_limit):void 0,s=(i==null?void 0:i.upper_limit)!==void 0?Ot.radiansToDegrees(i.upper_limit):void 0;return m.jsx(ls,{disabled:e.isLocked,lowerLimitDegs:a,upperLimitDegs:s,getValueDegs:()=>{const c=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[o.index];return c!==void 0?Ot.radiansToDegrees(c):void 0},startJogging:c=>r({joint:o.index,direction:c}),stopJogging:n},`joint-${o.index}`)})})}),m.jsx(Js,{store:e}),t&&m.jsx(j.Divider,{}),t]})}),Yy=fr(ve.observer(e=>{const t=jo.isString(e.nova)?new Ot.NovaClient({instanceUrl:e.nova}):e.nova,r=ve.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){cr.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let o=e.store;if(!o){const i=await t.connectJogger(e.motionGroupId);o=await Hn.loadFor(i)}cr.runInAction(()=>{r.joggingStore=o}),e.onSetup&&e.onSetup(o)}catch(o){r.loadingError=o}}return z.useEffect(()=>(n(),e.store?()=>null:()=>{var o;(o=r.joggingStore)==null||o.dispose()}),[e.store,e.nova,e.motionGroupId]),z.useEffect(()=>{const o=r.joggingStore;o&&(e.locked?o.lock("external"):o.unlock("external"))},[r.joggingStore,e.locked]),m.jsx(j.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?m.jsx(Zy,{store:r.joggingStore,children:e.children}):m.jsx(Vo,{message:"Loading jogging",error:r.loadingError})})})),Zy=ve.observer(({store:e,children:t})=>{function r(){if(e.currentTab.id==="cartesian")return m.jsx(m.Fragment,{children:m.jsx(Ky,{store:e,children:t})});if(e.currentTab.id==="joint")return m.jsx(m.Fragment,{children:m.jsx(qy,{store:e,children:t})})}return m.jsxs(j.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[m.jsx(j.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(n=>m.jsx(j.Tab,{label:n.label,id:`jogging-tab-${n.id}`,"aria-controls":`jogging-tab-${n.id}`},n.id))}),m.jsx(j.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:r()})]})}),nl=z.forwardRef(({label:e,value:t},r)=>{var s;const n=j.useTheme(),[o,i]=z.useState(!1);async function a(){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 z.useEffect(()=>{if(!o)return;const l=setTimeout(()=>i(!1),3e3);return()=>{l&&clearTimeout(l)}},[o]),m.jsx(j.Tooltip,{open:o,title:"Copied!",children:m.jsx(j.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(s=n.palette.backgroundPaperElevation)==null?void 0:s[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>a(),children:m.jsx(j.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})})})}),Xy=ve.observer(({motionStream:e})=>{const t=z.useRef(null);function r(){const n=e.rapidlyChangingMotionState.tcp_pose;return n?Ot.poseToWandelscriptString(n):""}return dr(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),m.jsx(j.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:m.jsx(nl,{value:r(),ref:t})})}),Qy=ve.observer(({motionStream:e})=>{const t=z.useRef(null);function r(){const{joints:n}=e.rapidlyChangingMotionState.state.joint_position;return`[${n.map(o=>parseFloat(o.toFixed(4))).join(", ")}]`}return dr(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),m.jsx(j.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:m.jsx(nl,{value:r(),ref:t})})});function e0(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function t0({baseUrl:e=e0(),...t}){return m.jsxs(j.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:[m.jsx(j.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),m.jsxs(j.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[m.jsx(j.Typography,{color:"#fff",children:"Found no devices to connect to."}),m.jsx(j.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),m.jsx(j.DialogActions,{children:m.jsxs(j.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[m.jsx(j.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),m.jsx(j.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const r0=Array(6).fill(2*Math.PI),Aa="0.0.0-semantically-released";function Ko(e){let t=Aa;return Aa.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function n0(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>il(r))}function ol(e){return e.name.endsWith("_FLG")}function il(e){return/_J[0-9]+$/.test(e.name)}function o0(e,t){let r;function n(o){if(ol(o)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${o.name}. Only one _FLG group is allowed.`);r=o}il(o),o.children.map(n)}if(n(e.scene),!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 al({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){po.Globals.assign({frameLoop:"always"});const o=z.useRef([]),i=z.useRef([]),{invalidate:a}=Tl.useThree();function s(p){p&&(i.current=n0(p),c(),a())}function l(p){o.current=p,d.start(Object.assign({},o.current))}function c(){const p=i.current.map((S,b)=>u[b].get());if(r)r(i.current,p);else for(const[S,b]of i.current.entries()){const f=t[S],v=f.theta||0,E=f.reverse_rotation_direction?-1:1;b.rotation.y=E*p[S]+v}}ns(()=>{const p=e.state.joint_position.joints.filter(S=>S!==void 0);requestAnimationFrame(()=>l(p))});const[u,d]=po.useSpring(()=>({...Object.assign({},e.state.joint_position.joints),onChange:()=>{c(),a()},onResolve:()=>{c()}}));return m.jsx("group",{ref:s,children:n})}const ka="line",Pa="mesh";function i0({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new pt.Matrix4;function o(s,l){const c=new pt.Vector3,u=new pt.Quaternion,d=new pt.Vector3;n.decompose(c,u,d);const p=c.clone(),S=new pt.Matrix4().makeRotationY(s.theta+l*(s.reverse_rotation_direction?-1:1)).multiply(new pt.Matrix4().makeTranslation(0,s.d/1e3,0)).multiply(new pt.Matrix4().makeTranslation(s.a/1e3,0,0)).multiply(new pt.Matrix4().makeRotationX(s.alpha));return n.multiply(S),n.decompose(c,u,d),{a:p,b:c}}function i(s,l,c,u){if(!t)return;const d=t[s];if(!d)return;const{a:p,b:S}=o(d,u);l.geometry.setPositions([p.toArray(),S.toArray()].flat()),c.position.set(S.x,S.y,S.z)}function a(s,l){n.identity(),s.forEach((c,u)=>{i(u,c.getObjectByName(ka),c.getObjectByName(Pa),l[u])})}return m.jsx(m.Fragment,{children:m.jsx(al,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:a,children:m.jsxs("group",{...r,name:"Scene",children:[m.jsxs("mesh",{children:[m.jsx("sphereGeometry",{args:[.01,32,32]}),m.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((s,l)=>{const{a:c,b:u}=o(s,e.state.joint_position.joints[l]??0),d=`dhrobot_J0${l}`;return m.jsxs("group",{name:d,children:[m.jsx(qe.Line,{name:ka,points:[c,u],color:"white",lineWidth:5}),m.jsxs("mesh",{name:Pa,position:u,children:[m.jsx("sphereGeometry",{args:[.01,32,32]}),m.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+l)]},d)})]})})})}const a0=console.warn;function s0(){return z.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&a0(e)}},[]),m.jsx(m.Fragment,{})}function l0(e){return e.type==="Mesh"}function c0({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:o}=o0(qe.useGLTF(e),e.split("/").pop()||e),i=z.useCallback(s=>{s&&r&&r()},[e]);function a(s){return l0(s)?m.jsx("mesh",{name:s.name,geometry:s.geometry,material:s.material,position:s.position,rotation:s.rotation},s.uuid):m.jsx(po.animated.group,{name:s.name,position:s.position,rotation:s.rotation,ref:ol(s)?t:void 0,children:s.children.map(a)},s.uuid)}return m.jsx("group",{...n,dispose:null,ref:i,children:a(o.scene)})}const u0=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof we.Mesh){r.material instanceof we.Material&&(r.material.colorWrite=!1);const n=r.clone(),o=r.clone();n.material=new we.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:we.DoubleSide}),n.userData.isGhost=!0,o.material=new we.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:we.DoubleSide}),o.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(o))}}),e.userData.isGhost=!0)},f0=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof we.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof we.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},sl=fr(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Ko,flangeRef:o,postModelRender:i,transparentColor:a,...s})=>{const[l,c]=z.useState(null),u=z.useCallback(p=>{c(p)},[]);z.useEffect(()=>{l&&(a?u0(l,a):f0(l))},[l,a]);const d=m.jsx(i0,{rapidlyChangingMotionState:e,dhParameters:r,...s});return m.jsxs(Al.ErrorBoundary,{fallback:d,onError:p=>{if(p.message.includes("404: Not Found"))console.error(p);else throw p},children:[m.jsx(z.Suspense,{fallback:d,children:m.jsx("group",{ref:u,children:m.jsx(al,{rapidlyChangingMotionState:e,dhParameters:r,children:m.jsx(c0,{modelURL:n(t),postModelRender:i,flangeRef:o,...s})})})}),m.jsx(s0,{})]})});function d0({connectedMotionGroup:e,getModel:t=Ko,flangeRef:r,transparentColor:n,...o}){return e.dhParameters?m.jsx(sl,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,...o}):null}const p0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M5.248 21c-.334 0-.619-.116-.853-.35a1.153 1.153 0 0 1-.351-.848c0-.333.117-.616.351-.85.234-.233.519-.35.853-.35H7.24L4.558 9.87a2.881 2.881 0 0 1-1.126-1.042A2.77 2.77 0 0 1 3 7.317c0-.793.28-1.467.838-2.023a2.774 2.774 0 0 1 2.033-.834 2.71 2.71 0 0 1 1.728.585c.494.389.832.887 1.014 1.493h3.58V5.239c0-.22.076-.406.226-.555a.76.76 0 0 1 .558-.224c.136 0 .263.035.381.104.118.07.209.167.273.292v.14l1.835-1.702a.979.979 0 0 1 .52-.279.881.881 0 0 1 .58.091l4.01 1.85a.74.74 0 0 1 .36.364.537.537 0 0 1-.002.474.592.592 0 0 1-.366.323.657.657 0 0 1-.477-.039l-3.858-1.774L13.76 6.59v1.454l2.473 2.233 3.858-1.774a.648.648 0 0 1 .485-.03.571.571 0 0 1 .358.314.513.513 0 0 1 .01.482.79.79 0 0 1-.367.357l-4.011 1.882a.881.881 0 0 1-.58.09.979.979 0 0 1-.52-.278L13.63 9.638v.14a.92.92 0 0 1-.273.275.665.665 0 0 1-.381.12.76.76 0 0 1-.558-.224.752.752 0 0 1-.225-.555V8.096h-3.58a2.82 2.82 0 0 1-.215.54 2.552 2.552 0 0 1-.323.479l5.139 9.488h2.673c.335 0 .62.116.854.35.234.233.35.516.35.849 0 .332-.116.615-.35.849a1.167 1.167 0 0 1-.854.349H5.248Zm.623-12.385c.362 0 .67-.126.924-.378a1.25 1.25 0 0 0 .38-.92 1.25 1.25 0 0 0-.38-.92 1.261 1.261 0 0 0-.924-.379 1.26 1.26 0 0 0-.925.379 1.25 1.25 0 0 0-.38.92c0 .36.127.667.38.92.254.252.562.378.925.378Z"})),g0=z.forwardRef(p0),h0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z"})),m0=z.forwardRef(h0),nt=ve.observer(({id:e,icon:t,color:r,title:n,name:o,explanation:i,literalValue:a,anchorOrigin:s,transformOrigin:l})=>{const c=ve.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!c.anchorEl},openPopover(u){c.anchorEl=u.currentTarget},closePopover(){c.anchorEl=null}}));return m.jsxs(m.Fragment,{children:[m.jsx(j.Stack,{"aria-owns":c.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:c.openPopover,onMouseLeave:c.closePopover,sx:{cursor:"pointer"},children:m.jsx(j.SvgIcon,{component:t,sx:{color:r}})}),m.jsx(j.Popover,{id:e,sx:{pointerEvents:"none"},open:c.isPopoverOpen,anchorEl:c.anchorEl,anchorOrigin:s??{vertical:"bottom",horizontal:"left"},transformOrigin:l??{vertical:"top",horizontal:"left"},onClose:c.closePopover,disableRestoreFocus:!0,children:m.jsxs(j.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[m.jsxs("div",{children:[n&&m.jsx(j.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),m.jsx(j.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:o})]}),m.jsx(j.Typography,{fontSize:"14px",children:i}),a&&m.jsx(j.Typography,{fontSize:"12px",children:a})]})})]})}),y0=ve.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n})=>{const o=j.useTheme(),{t:i}=Te.useTranslation();return e?m.jsx(nt,{id:"motion-group-virtual",icon:m0,color:o.palette.tertiary.main,name:i("SafetyBar.ControllerType.Virtual.lb"),explanation:m.jsxs(Te.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",m.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:r,transformOrigin:n}):m.jsx(nt,{id:"motion-group-physical",icon:g0,color:o.palette.primary.main,name:i("SafetyBar.ControllerType.Physical.lb"),explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:m.jsx("code",{}),strong:m.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),b0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z"})),S0=z.forwardRef(b0),v0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z",fill:"#fff",fillOpacity:.56})),x0=z.forwardRef(v0),w0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z"})),T0=z.forwardRef(w0),E0=ve.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r})=>{const{t:n}=Te.useTranslation(),o=j.useTheme();switch(e){case"OPERATION_MODE_AUTO":return m.jsx(nt,{id:"operation-mode-auto",icon:S0,title:n("SafetyBar.OperationMode.ti"),name:n("SafetyBar.OperationMode.Automatic.ti"),color:"rgba(255, 255, 255, 0.57)",explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:t,transformOrigin:r});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return m.jsx(nt,{id:"operation-mode-manual",icon:T0,color:o.palette.warning.main,title:n("SafetyBar.OperationMode.ti"),name:n("SafetyBar.OperationMode.Manual.lb"),explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:return m.jsx(nt,{id:"operation-mode-error",icon:x0,color:o.palette.warning.main,title:n("SafetyBar.OperationMode.ti"),name:n("SafetyBar.OperationMode.Error.lb"),explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:e,anchorOrigin:t,transformOrigin:r})}}),C0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z"})),O0=z.forwardRef(C0),R0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z"})),A0=z.forwardRef(R0),k0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z",fill:"#fff",fillOpacity:.56})),P0=z.forwardRef(k0),j0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),_0=z.forwardRef(j0),$0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),L0=z.forwardRef($0),I0=ve.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r})=>{const{t:n}=Te.useTranslation(),o=j.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return m.jsx(nt,{id:"safety-state-normal",title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Normal.lb"),icon:_0,color:"rgba(255, 255, 255, 0.57)",explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return m.jsx(nt,{id:"safety-state-estop",title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Estop.lb"),icon:A0,color:o.palette.error.main,explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return m.jsx(nt,{id:"safety-state-stop",icon:L0,title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Stop.lb"),color:o.palette.warning.main,explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return m.jsx(nt,{id:"safety-state-manual-action-required",icon:P0,color:o.palette.warning.main,title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return m.jsx(nt,{id:"safety-state-error",icon:O0,color:o.palette.error.main,title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Error.lb"),explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:Xp(e,`Unknown safety state ${e}`)}}),M0=fr(ve.observer(e=>m.jsxs(j.Stack,{direction:"row",gap:"8px",alignItems:"center",sx:{height:"24px"},children:[m.jsx(I0,{safetyState:e.safetyState,anchorOrigin:e.anchorOrigin,transformOrigin:e.transformOrigin}),m.jsx(j.Divider,{orientation:"vertical",flexItem:!0}),m.jsx(E0,{operationMode:e.operationMode,anchorOrigin:e.anchorOrigin,transformOrigin:e.transformOrigin}),m.jsx(j.Divider,{orientation:"vertical",flexItem:!0}),m.jsx(y0,{isVirtual:e.isVirtual,motionGroupId:e.motionGroupId,anchorOrigin:e.anchorOrigin,transformOrigin:e.transformOrigin})]}))),N0=j.styled(j.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}}]}}),D0=z.forwardRef((e,t)=>m.jsx(N0,{ref:t,selected:e.selected,...e,color:"secondary",variant:"circular"})),F0={$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"},B0=z.lazy(()=>import("@monaco-editor/react"));let fo=null;async function V0(){if(!fo){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);fo={shiki:await e({langs:[F0],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return fo}const U0=fr(e=>{const t=j.useTheme(),[r,n]=z.useState("dark-plus"),o=t.palette.mode==="dark"?"dark-plus":"light-plus";async function i(a){var c,u;a.languages.register({id:"wandelscript"}),a.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:s,shikiToMonaco:l}=await V0();l(s,a),a.editor.defineTheme(o,((u=(c=t.componentsExt)==null?void 0:c.WandelscriptEditor)==null?void 0:u.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(a),n(o)}return m.jsx(z.Suspense,{fallback:m.jsx(Vo,{}),children:m.jsx(B0,{value:e.code,onMount:(a,s)=>{i(s)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function ll(){var t,r,n,o,i,a,s;const e=j.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`}}},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"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(a=(i=e.paletteExt)==null?void 0:i.secondary)==null?void 0:a.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)"}}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":j.rgbToHex(((s=e.palette.backgroundPaperElevation)==null?void 0:s[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function z0(){const e=ll();return e.palette.mode="light",e}function J0(e){var n,o,i,a;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"&&((a=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-color-scheme: light)"))==null?void 0:a.matches)));const r=t?ll():z0();return Qa(r,e)}exports.JoggingCartesianAxisControl=bo;exports.JoggingJointRotationControl=ls;exports.JoggingPanel=Yy;exports.JoggingStore=Hn;exports.LoadingCover=Vo;exports.LoadingErrorMessage=$s;exports.NoMotionGroupModal=t0;exports.PoseCartesianValues=Xy;exports.PoseJointValues=Qy;exports.PresetEnvironment=_l;exports.Robot=d0;exports.SafetyBar=M0;exports.SafetyZonesRenderer=Il;exports.SelectableFab=D0;exports.SupportedRobot=sl;exports.TrajectoryRenderer=Ml;exports.VelocitySlider=tl;exports.VelocitySliderLabel=Ho;exports.WandelscriptEditor=U0;exports.createNovaMuiTheme=J0;exports.defaultAxisConfig=r0;exports.defaultGetModel=Ko;exports.useAnimationFrame=dr;exports.useAutorun=ns;exports.useMounted=In;exports.useReaction=os;
93
+ `+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Bt(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&sn.assertOptions(n,{silentJSONParsing:tt.transitional(tt.boolean),forcedJSONParsing:tt.transitional(tt.boolean),clarifyTimeoutError:tt.transitional(tt.boolean)},!1),o!=null&&(x.isFunction(o)?r.paramsSerializer={serialize:o}:sn.assertOptions(o,{encode:tt.function,serialize:tt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),sn.assertOptions(r,{baseUrl:tt.spelling("baseURL"),withXsrfToken:tt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&x.merge(i.common,i[r.method]);i&&x.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),r.headers=Me.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(r)===!1||(l=l&&f.synchronous,s.unshift(f.fulfilled,f.rejected))});const c=[];this.interceptors.response.forEach(function(f){c.push(f.fulfilled,f.rejected)});let u,d=0,p;if(!l){const b=[ea.bind(this),void 0];for(b.unshift.apply(b,s),b.push.apply(b,c),p=b.length,u=Promise.resolve(r);d<p;)u=u.then(b[d++],b[d++]);return u}p=s.length;let S=r;for(d=0;d<p;){const b=s[d++],f=s[d++];try{S=b(S)}catch(v){f.call(this,v);break}}try{u=ea.call(this,S)}catch(b){return Promise.reject(b)}for(d=0,p=c.length;d<p;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Bt(this.defaults,t);const r=Cs(t.baseURL,t.url,t.allowAbsoluteUrls);return vs(r,t.params,t.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(t){Mt.prototype[t]=function(r,n){return this.request(Bt(n||{},{method:t,url:r,data:(n||{}).data}))}});x.forEach(["post","put","patch"],function(t){function r(n){return function(i,a,s){return this.request(Bt(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Mt.prototype[t]=r(),Mt.prototype[t+"Form"]=r(!0)});let Kp=class js{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 a=new Promise(s=>{n.subscribe(s),i=s}).then(o);return a.cancel=function(){n.unsubscribe(i)},a},t(function(i,a,s){n.reason||(n.reason=new gr(i,a,s),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 js(function(o){t=o}),cancel:t}}};function qp(e){return function(r){return e.apply(null,r)}}function Yp(e){return x.isObject(e)&&e.isAxiosError===!0}const Eo={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(Eo).forEach(([e,t])=>{Eo[t]=e});function _s(e){const t=new Mt(e),r=cs(Mt.prototype.request,t);return x.extend(r,Mt.prototype,t,{allOwnKeys:!0}),x.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return _s(Bt(e,o))},r}const xe=_s(Ur);xe.Axios=Mt;xe.CanceledError=gr;xe.CancelToken=Kp;xe.isCancel=Ts;xe.VERSION=Ps;xe.toFormData=Bn;xe.AxiosError=W;xe.Cancel=xe.CanceledError;xe.all=function(t){return Promise.all(t)};xe.spread=qp;xe.isAxiosError=Yp;xe.mergeConfig=Bt;xe.AxiosHeaders=Me;xe.formToJSON=e=>ws(x.isHTMLForm(e)?new FormData(e):e);xe.getAdapter=ks.getAdapter;xe.HttpStatusCode=Eo;xe.default=xe;const{Axios:K0,AxiosError:ra,CanceledError:q0,isCancel:Y0,CancelToken:Z0,VERSION:X0,all:Q0,Cancel:eb,isAxiosError:tb,spread:rb,toFormData:nb,AxiosHeaders:ob,HttpStatusCode:ib,formToJSON:ab,getAdapter:sb,mergeConfig:lb}=xe;function Zp(e){try{return JSON.stringify(e)}catch{return}}function Xp(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function Qp(e){var t,r,n,o;return e instanceof ra&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof ra&&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: ${Zp(e)||e}`}const Vo=e=>{const t=e.softTimeout||3e3,[r,n]=z.useState(!1),o=j.useTheme();return z.useEffect(()=>{const i=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(i)}),m.jsx(j.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:o.palette.text.primary},children:e.error?m.jsx($s,{loadingMessage:e.message,error:e.error}):m.jsxs(m.Fragment,{children:[m.jsx(j.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&m.jsx("div",{children:e.message}),m.jsx(j.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:o.palette.text.secondary},children:"This is taking longer than expected..."})]})})},$s=e=>{const t=Qp(e.error),r=e.error instanceof Error?e.error.stack:null,n=j.useTheme();return m.jsxs(j.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 ${jo.lowerFirst(j.capitalize(e.loadingMessage))} - `:"")+t,m.jsx("br",{}),r&&m.jsx("pre",{children:r})]})},eg=({title:e,titleId:t,...r},n)=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.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"})),tg=z.forwardRef(eg),rg=({title:e,titleId:t,...r},n)=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.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"})),ng=z.forwardRef(rg),og=({title:e,titleId:t,...r},n)=>C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.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"})),ig=z.forwardRef(og),ag=({title:e,titleId:t,...r},n)=>C.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?C.createElement("title",{id:t},e):null,C.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"})),sg=z.forwardRef(ag);function lg(){this.__data__=[],this.size=0}function Ls(e,t){return e===t||e!==e&&t!==t}function zn(e,t){for(var r=e.length;r--;)if(Ls(e[r][0],t))return r;return-1}var cg=Array.prototype,ug=cg.splice;function fg(e){var t=this.__data__,r=zn(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():ug.call(t,r,1),--this.size,!0}function dg(e){var t=this.__data__,r=zn(t,e);return r<0?void 0:t[r][1]}function pg(e){return zn(this.__data__,e)>-1}function gg(e,t){var r=this.__data__,n=zn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function mt(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])}}mt.prototype.clear=lg;mt.prototype.delete=fg;mt.prototype.get=dg;mt.prototype.has=pg;mt.prototype.set=gg;function hg(){this.__data__=new mt,this.size=0}function mg(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function yg(e){return this.__data__.get(e)}function bg(e){return this.__data__.has(e)}var Sg="[object AsyncFunction]",vg="[object Function]",xg="[object GeneratorFunction]",wg="[object Proxy]";function Is(e){if(!Dt(e))return!1;var t=zt(e);return t==vg||t==xg||t==Sg||t==wg}var lo=st["__core-js_shared__"],na=function(){var e=/[^.]+$/.exec(lo&&lo.keys&&lo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Tg(e){return!!na&&na in e}var Eg=Function.prototype,Cg=Eg.toString;function Jt(e){if(e!=null){try{return Cg.call(e)}catch{}try{return e+""}catch{}}return""}var Og=/[\\^$.*+?()[\]{}|]/g,Rg=/^\[object .+?Constructor\]$/,Ag=Function.prototype,kg=Object.prototype,Pg=Ag.toString,jg=kg.hasOwnProperty,_g=RegExp("^"+Pg.call(jg).replace(Og,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $g(e){if(!Dt(e)||Tg(e))return!1;var t=Is(e)?_g:Rg;return t.test(Jt(e))}function Lg(e,t){return e==null?void 0:e[t]}function Gt(e,t){var r=Lg(e,t);return $g(r)?r:void 0}var Mr=Gt(st,"Map"),Nr=Gt(Object,"create");function Ig(){this.__data__=Nr?Nr(null):{},this.size=0}function Mg(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ng="__lodash_hash_undefined__",Dg=Object.prototype,Fg=Dg.hasOwnProperty;function Bg(e){var t=this.__data__;if(Nr){var r=t[e];return r===Ng?void 0:r}return Fg.call(t,e)?t[e]:void 0}var Vg=Object.prototype,Ug=Vg.hasOwnProperty;function zg(e){var t=this.__data__;return Nr?t[e]!==void 0:Ug.call(t,e)}var Jg="__lodash_hash_undefined__";function Gg(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Nr&&t===void 0?Jg:t,this}function Vt(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])}}Vt.prototype.clear=Ig;Vt.prototype.delete=Mg;Vt.prototype.get=Bg;Vt.prototype.has=zg;Vt.prototype.set=Gg;function Wg(){this.size=0,this.__data__={hash:new Vt,map:new(Mr||mt),string:new Vt}}function Hg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Jn(e,t){var r=e.__data__;return Hg(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Kg(e){var t=Jn(this,e).delete(e);return this.size-=t?1:0,t}function qg(e){return Jn(this,e).get(e)}function Yg(e){return Jn(this,e).has(e)}function Zg(e,t){var r=Jn(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function yt(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])}}yt.prototype.clear=Wg;yt.prototype.delete=Kg;yt.prototype.get=qg;yt.prototype.has=Yg;yt.prototype.set=Zg;var Xg=200;function Qg(e,t){var r=this.__data__;if(r instanceof mt){var n=r.__data__;if(!Mr||n.length<Xg-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new yt(n)}return r.set(e,t),this.size=r.size,this}function gt(e){var t=this.__data__=new mt(e);this.size=t.size}gt.prototype.clear=hg;gt.prototype.delete=mg;gt.prototype.get=yg;gt.prototype.has=bg;gt.prototype.set=Qg;var eh="__lodash_hash_undefined__";function th(e){return this.__data__.set(e,eh),this}function rh(e){return this.__data__.has(e)}function vn(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new yt;++t<r;)this.add(e[t])}vn.prototype.add=vn.prototype.push=th;vn.prototype.has=rh;function nh(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 oh(e,t){return e.has(t)}var ih=1,ah=2;function Ms(e,t,r,n,o,i){var a=r&ih,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,p=!0,S=r&ah?new vn:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var b=e[d],f=t[d];if(n)var v=a?n(f,b,d,t,e,i):n(b,f,d,e,t,i);if(v!==void 0){if(v)continue;p=!1;break}if(S){if(!nh(t,function(E,O){if(!oh(S,O)&&(b===E||o(b,E,r,n,i)))return S.push(O)})){p=!1;break}}else if(!(b===f||o(b,f,r,n,i))){p=!1;break}}return i.delete(e),i.delete(t),p}var oa=st.Uint8Array;function sh(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function lh(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var ch=1,uh=2,fh="[object Boolean]",dh="[object Date]",ph="[object Error]",gh="[object Map]",hh="[object Number]",mh="[object RegExp]",yh="[object Set]",bh="[object String]",Sh="[object Symbol]",vh="[object ArrayBuffer]",xh="[object DataView]",ia=kt?kt.prototype:void 0,co=ia?ia.valueOf:void 0;function wh(e,t,r,n,o,i,a){switch(r){case xh:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case vh:return!(e.byteLength!=t.byteLength||!i(new oa(e),new oa(t)));case fh:case dh:case hh:return Ls(+e,+t);case ph:return e.name==t.name&&e.message==t.message;case mh:case bh:return e==t+"";case gh:var s=sh;case yh:var l=n&ch;if(s||(s=lh),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=uh,a.set(e,t);var u=Ms(s(e),s(t),n,o,i,a);return a.delete(e),u;case Sh:if(co)return co.call(e)==co.call(t)}return!1}function Th(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var at=Array.isArray;function Eh(e,t,r){var n=t(e);return at(e)?n:Th(n,r(e))}function Ch(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}function Oh(){return[]}var Rh=Object.prototype,Ah=Rh.propertyIsEnumerable,aa=Object.getOwnPropertySymbols,kh=aa?function(e){return e==null?[]:(e=Object(e),Ch(aa(e),function(t){return Ah.call(e,t)}))}:Oh;function Ph(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var jh="[object Arguments]";function sa(e){return Ft(e)&&zt(e)==jh}var Ns=Object.prototype,_h=Ns.hasOwnProperty,$h=Ns.propertyIsEnumerable,Ds=sa(function(){return arguments}())?sa:function(e){return Ft(e)&&_h.call(e,"callee")&&!$h.call(e,"callee")};function Lh(){return!1}var Fs=typeof exports=="object"&&exports&&!exports.nodeType&&exports,la=Fs&&typeof module=="object"&&module&&!module.nodeType&&module,Ih=la&&la.exports===Fs,ca=Ih?st.Buffer:void 0,Mh=ca?ca.isBuffer:void 0,Co=Mh||Lh,Nh=9007199254740991,Dh=/^(?:0|[1-9]\d*)$/;function Bs(e,t){var r=typeof e;return t=t??Nh,!!t&&(r=="number"||r!="symbol"&&Dh.test(e))&&e>-1&&e%1==0&&e<t}var Fh=9007199254740991;function Uo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Fh}var Bh="[object Arguments]",Vh="[object Array]",Uh="[object Boolean]",zh="[object Date]",Jh="[object Error]",Gh="[object Function]",Wh="[object Map]",Hh="[object Number]",Kh="[object Object]",qh="[object RegExp]",Yh="[object Set]",Zh="[object String]",Xh="[object WeakMap]",Qh="[object ArrayBuffer]",em="[object DataView]",tm="[object Float32Array]",rm="[object Float64Array]",nm="[object Int8Array]",om="[object Int16Array]",im="[object Int32Array]",am="[object Uint8Array]",sm="[object Uint8ClampedArray]",lm="[object Uint16Array]",cm="[object Uint32Array]",ce={};ce[tm]=ce[rm]=ce[nm]=ce[om]=ce[im]=ce[am]=ce[sm]=ce[lm]=ce[cm]=!0;ce[Bh]=ce[Vh]=ce[Qh]=ce[Uh]=ce[em]=ce[zh]=ce[Jh]=ce[Gh]=ce[Wh]=ce[Hh]=ce[Kh]=ce[qh]=ce[Yh]=ce[Zh]=ce[Xh]=!1;function um(e){return Ft(e)&&Uo(e.length)&&!!ce[zt(e)]}function fm(e){return function(t){return e(t)}}var Vs=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Pr=Vs&&typeof module=="object"&&module&&!module.nodeType&&module,dm=Pr&&Pr.exports===Vs,uo=dm&&as.process,ua=function(){try{var e=Pr&&Pr.require&&Pr.require("util").types;return e||uo&&uo.binding&&uo.binding("util")}catch{}}(),fa=ua&&ua.isTypedArray,Us=fa?fm(fa):um,pm=Object.prototype,gm=pm.hasOwnProperty;function hm(e,t){var r=at(e),n=!r&&Ds(e),o=!r&&!n&&Co(e),i=!r&&!n&&!o&&Us(e),a=r||n||o||i,s=a?Ph(e.length,String):[],l=s.length;for(var c in e)gm.call(e,c)&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Bs(c,l)))&&s.push(c);return s}var mm=Object.prototype;function ym(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||mm;return e===r}function bm(e,t){return function(r){return e(t(r))}}var Sm=bm(Object.keys,Object),vm=Object.prototype,xm=vm.hasOwnProperty;function wm(e){if(!ym(e))return Sm(e);var t=[];for(var r in Object(e))xm.call(e,r)&&r!="constructor"&&t.push(r);return t}function zs(e){return e!=null&&Uo(e.length)&&!Is(e)}function zo(e){return zs(e)?hm(e):wm(e)}function da(e){return Eh(e,zo,kh)}var Tm=1,Em=Object.prototype,Cm=Em.hasOwnProperty;function Om(e,t,r,n,o,i){var a=r&Tm,s=da(e),l=s.length,c=da(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var p=s[d];if(!(a?p in t:Cm.call(t,p)))return!1}var S=i.get(e),b=i.get(t);if(S&&b)return S==t&&b==e;var f=!0;i.set(e,t),i.set(t,e);for(var v=a;++d<l;){p=s[d];var E=e[p],O=t[p];if(n)var k=a?n(O,E,p,t,e,i):n(E,O,p,e,t,i);if(!(k===void 0?E===O||o(E,O,r,n,i):k)){f=!1;break}v||(v=p=="constructor")}if(f&&!v){var T=e.constructor,P=t.constructor;T!=P&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof P=="function"&&P instanceof P)&&(f=!1)}return i.delete(e),i.delete(t),f}var Oo=Gt(st,"DataView"),Ro=Gt(st,"Promise"),Ao=Gt(st,"Set"),ko=Gt(st,"WeakMap"),pa="[object Map]",Rm="[object Object]",ga="[object Promise]",ha="[object Set]",ma="[object WeakMap]",ya="[object DataView]",Am=Jt(Oo),km=Jt(Mr),Pm=Jt(Ro),jm=Jt(Ao),_m=Jt(ko),Et=zt;(Oo&&Et(new Oo(new ArrayBuffer(1)))!=ya||Mr&&Et(new Mr)!=pa||Ro&&Et(Ro.resolve())!=ga||Ao&&Et(new Ao)!=ha||ko&&Et(new ko)!=ma)&&(Et=function(e){var t=zt(e),r=t==Rm?e.constructor:void 0,n=r?Jt(r):"";if(n)switch(n){case Am:return ya;case km:return pa;case Pm:return ga;case jm:return ha;case _m:return ma}return t});var $m=1,ba="[object Arguments]",Sa="[object Array]",Kr="[object Object]",Lm=Object.prototype,va=Lm.hasOwnProperty;function Im(e,t,r,n,o,i){var a=at(e),s=at(t),l=a?Sa:Et(e),c=s?Sa:Et(t);l=l==ba?Kr:l,c=c==ba?Kr:c;var u=l==Kr,d=c==Kr,p=l==c;if(p&&Co(e)){if(!Co(t))return!1;a=!0,u=!1}if(p&&!u)return i||(i=new gt),a||Us(e)?Ms(e,t,r,n,o,i):wh(e,t,l,r,n,o,i);if(!(r&$m)){var S=u&&va.call(e,"__wrapped__"),b=d&&va.call(t,"__wrapped__");if(S||b){var f=S?e.value():e,v=b?t.value():t;return i||(i=new gt),o(f,v,r,n,i)}}return p?(i||(i=new gt),Om(e,t,r,n,o,i)):!1}function Gn(e,t,r,n,o){return e===t?!0:e==null||t==null||!Ft(e)&&!Ft(t)?e!==e&&t!==t:Im(e,t,r,n,Gn,o)}function Mm(e,t){return Gn(e,t)}const Js=({store:e})=>{const{t}=Te.useTranslation(),[r,n]=z.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),o=z.useRef(r);dr(()=>{const a=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;Mm(o.current,a)||(o.current=a,n(a))});const i=[];for(const[a,s]of r.entries())s&&i.push(a);return m.jsx(j.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:i.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:i.map(a=>a+1).join(", ")})})},Nm=j.styled(j.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 qr({labelValue:e,...t}){return m.jsxs(Nm,{fullWidth:!0,variant:"filled",children:[m.jsx(j.InputLabel,{id:t.labelId,children:e}),m.jsx(j.Select,{...t})]})}var xa=function(){try{var e=Gt(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Dm(e,t,r){t=="__proto__"&&xa?xa(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Fm(e,t,r,n){for(var o=-1,i=e==null?0:e.length;++o<i;){var a=e[o];t(n,a,r(a),e)}return n}function Bm(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var l=a[++o];if(r(i[l],l,i)===!1)break}return t}}var Vm=Bm();function Um(e,t){return e&&Vm(e,t,zo)}function zm(e,t){return function(r,n){if(r==null)return r;if(!zs(r))return e(r,n);for(var o=r.length,i=-1,a=Object(r);++i<o&&n(a[i],i,a)!==!1;);return r}}var Jm=zm(Um);function Gm(e,t,r,n){return Jm(e,function(o,i,a){t(n,o,r(o),a)}),n}var Wm=1,Hm=2;function Km(e,t,r,n){var o=r.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var a=r[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){a=r[o];var s=a[0],l=e[s],c=a[1];if(a[2]){if(l===void 0&&!(s in e))return!1}else{var u=new gt,d;if(!(d===void 0?Gn(c,l,Wm|Hm,n,u):d))return!1}}return!0}function Gs(e){return e===e&&!Dt(e)}function qm(e){for(var t=zo(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Gs(o)]}return t}function Ws(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Ym(e){var t=qm(e);return t.length==1&&t[0][2]?Ws(t[0][0],t[0][1]):function(r){return r===e||Km(r,e,t)}}var Zm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xm=/^\w*$/;function Jo(e,t){if(at(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Mn(e)?!0:Xm.test(e)||!Zm.test(e)||t!=null&&e in Object(t)}var Qm="Expected a function";function Go(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Qm);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 a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Go.Cache||yt),r}Go.Cache=yt;var ey=500;function ty(e){var t=Go(e,function(n){return r.size===ey&&r.clear(),n}),r=t.cache;return t}var ry=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ny=/\\(\\)?/g,oy=ty(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ry,function(r,n,o,i){t.push(o?i.replace(ny,"$1"):n||r)}),t});function iy(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 wa=kt?kt.prototype:void 0,Ta=wa?wa.toString:void 0;function Hs(e){if(typeof e=="string")return e;if(at(e))return iy(e,Hs)+"";if(Mn(e))return Ta?Ta.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ks(e){return e==null?"":Hs(e)}function qs(e,t){return at(e)?e:Jo(e,t)?[e]:oy(Ks(e))}function Wn(e){if(typeof e=="string"||Mn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ys(e,t){t=qs(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Wn(t[r++])];return r&&r==n?e:void 0}function ay(e,t,r){var n=e==null?void 0:Ys(e,t);return n===void 0?r:n}function sy(e,t){return e!=null&&t in Object(e)}function ly(e,t,r){t=qs(t,e);for(var n=-1,o=t.length,i=!1;++n<o;){var a=Wn(t[n]);if(!(i=e!=null&&r(e,a)))break;e=e[a]}return i||++n!=o?i:(o=e==null?0:e.length,!!o&&Uo(o)&&Bs(a,o)&&(at(e)||Ds(e)))}function cy(e,t){return e!=null&&ly(e,t,sy)}var uy=1,fy=2;function dy(e,t){return Jo(e)&&Gs(t)?Ws(Wn(e),t):function(r){var n=ay(r,e);return n===void 0&&n===t?cy(r,e):Gn(t,n,uy|fy)}}function py(e){return e}function gy(e){return function(t){return t==null?void 0:t[e]}}function hy(e){return function(t){return Ys(t,e)}}function my(e){return Jo(e)?gy(Wn(e)):hy(e)}function yy(e){return typeof e=="function"?e:e==null?py:typeof e=="object"?at(e)?dy(e[0],e[1]):Ym(e):my(e)}function by(e,t){return function(r,n){var o=at(r)?Fm:Gm,i={};return o(r,e,yy(n),i)}}var Yr=by(function(e,t,r){Dm(e,r,t)}),Sy=0;function vy(e){var t=++Sy;return Ks(e)+t}const Po=[{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}],xy=[{id:"continuous"},...Po],wy=["coordsys","tool"];class Hn{constructor(t,r,n,o){var i,a;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=n,this.tcps=o,this.selectedTabId="cartesian",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 s of n)if(s.coordinate_system===""){s.coordinate_system="world";break}this.selectedCoordSystemId=((i=n[0])==null?void 0:i.coordinate_system)||"world",this.selectedTcpId=((a=o[0])==null?void 0:a.id)||"",cr.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(cr.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 Hn(t,n,o||[],i||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return jo.countBy(this.coordSystems,t=>t.name)}async deactivate(){const t=this.jogger.activeWebsocket;this.jogger.setJoggingMode("increment"),t&&await t.closed()}async activate(){if(this.currentTab.id==="cartesian"){const t={tcpId:this.selectedTcpId,coordSystemId:this.activeCoordSystemId};this.activeDiscreteIncrement?this.jogger.setJoggingMode("increment",t):this.jogger.setJoggingMode("cartesian",t)}else this.jogger.setJoggingMode("joint");return this.jogger}loadFromLocalStorage(){const t=Ot.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:"Joints"}]}get incrementOptions(){return xy}get discreteIncrementOptions(){return Po}get incrementOptionsById(){return Yr(this.incrementOptions,t=>t.id)}get tabsById(){return Yr(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 Yr(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 Yr(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:Po.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}get velocityInDisplayUnits(){return this.currentMotionType==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityDegPerSec}get minVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.minTranslationVelocityMmPerSec:this.minRotationVelocityDegPerSec}get maxVelocityInDisplayUnits(){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}lock(t){this.locks.add(t)}unlock(t){this.locks.delete(t)}async withMotionLock(t){const r=vy();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const Ty=ve.observer(({store:e})=>{var n;const{t}=Te.useTranslation();function r(o){switch(o){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return o}}return m.jsxs(j.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"min-height min-height","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:[m.jsx(qr,{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=>m.jsx(j.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))}),m.jsx(qr,{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=>m.jsx(j.MenuItem,{value:o.id,children:o.id},o.id))}),m.jsx(qr,{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:wy.map(o=>m.jsx(j.MenuItem,{value:o,children:r(o)},o))}),m.jsxs(qr,{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:[m.jsx(j.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(o=>m.jsx(j.MenuItem,{value:o.id,children:e.currentMotionType==="translate"?`${o.mm}mm`:`${o.degrees}°`},o.id))]})]})}),Ey=j.styled(j.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 Cy(e,t,r=(n,o)=>n===o){return e.length===t.length&&e.every((n,o)=>r(n,t[o]))}const Oy=2;function ir(e,t,r,n,o){return r===1?Math.min(e+t,o):Math.max(e-t,n)}function Zs(e,t){return e-t}function Ea(e,t){const{index:r}=e.reduce((n,o,i)=>{const a=Math.abs(t-o);return n===null||a<n.distance||a===n.distance?{distance:a,index:i}:n},null)??{};return r}function Zr(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 xn(e,t,r){return(e-t)*100/(r-t)}function Ry(e,t,r){return(r-t)*e+t}function Ay(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 ky(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(Ay(t)))}function Ca({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(Zs)}function Xr({sliderRef:e,activeIndex:t,setActive:r}){var o,i,a;const n=rn(e.current);(!((o=e.current)!=null&&o.contains(n.activeElement))||Number((i=n==null?void 0:n.activeElement)==null?void 0:i.getAttribute("data-index"))!==t)&&((a=e.current)==null||a.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function Qr(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?Cy(e,t):!1}const Py={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}%`})}},jy=e=>e;let en;function Oa(){return en===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?en=CSS.supports("touch-action","none"):en=!0),en}function _y(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:o=!1,isRtl:i=!1,marks:a=!1,max:s=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:p="horizontal",rootRef:S,scale:b=jy,step:f=1,shiftStep:v=10,tabIndex:E,value:O}=e,k=C.useRef(void 0),[T,P]=C.useState(-1),[$,I]=C.useState(-1),[B,H]=C.useState(!1),g=C.useRef(0),_=C.useRef(null),[M,N]=mu({controlled:O,default:r??l,name:"Slider"}),D=u&&((A,L,V)=>{const K=A.nativeEvent||A,te=new K.constructor(K.type,K);Object.defineProperty(te,"target",{writable:!0,value:{value:L,name:c}}),_.current=L,u(te,L,V)}),Q=Array.isArray(M);let Y=Q?M.slice().sort(Zs):[M];Y=Y.map(A=>A==null?l:ar(A,l,s));const Ae=a===!0&&f!==null?[...Array(Math.floor((s-l)/f)+1)].map((A,L)=>({value:l+f*L})):a||[],ee=Ae.map(A=>A.value),[le,Ce]=C.useState(-1),Z=C.useRef(null),Ne=Ha(S,Z),lt=A=>L=>{var K;const V=Number(L.currentTarget.getAttribute("data-index"));yi(L.target)&&Ce(V),I(V),(K=A==null?void 0:A.onFocus)==null||K.call(A,L)},hr=A=>L=>{var V;yi(L.target)||Ce(-1),I(-1),(V=A==null?void 0:A.onBlur)==null||V.call(A,L)},Wt=(A,L)=>{const V=Number(A.currentTarget.getAttribute("data-index")),K=Y[V],te=ee.indexOf(K);let U=L;if(Ae&&f==null){const ye=ee[ee.length-1];U>=ye?U=ye:U<=ee[0]?U=ee[0]:U=U<K?ee[te-1]:ee[te+1]}if(U=ar(U,l,s),Q){o&&(U=ar(U,Y[V-1]||-1/0,Y[V+1]||1/0));const ye=U;U=Ca({values:Y,newValue:U,index:V});let Re=V;o||(Re=U.indexOf(ye)),Xr({sliderRef:Z,activeIndex:Re})}N(U),Ce(V),D&&!Qr(U,M)&&D(A,U,V),d&&d(A,_.current??U)},jt=A=>L=>{var V;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(L.key)){L.preventDefault();const K=Number(L.currentTarget.getAttribute("data-index")),te=Y[K];let U=null;if(f!=null){const ye=L.shiftKey?v:f;switch(L.key){case"ArrowUp":U=ir(te,ye,1,l,s);break;case"ArrowRight":U=ir(te,ye,i?-1:1,l,s);break;case"ArrowDown":U=ir(te,ye,-1,l,s);break;case"ArrowLeft":U=ir(te,ye,i?1:-1,l,s);break;case"PageUp":U=ir(te,v,1,l,s);break;case"PageDown":U=ir(te,v,-1,l,s);break;case"Home":U=l;break;case"End":U=s;break}}else if(Ae){const ye=ee[ee.length-1],Re=ee.indexOf(te),ge=[i?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],Le=[i?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];ge.includes(L.key)?Re===0?U=ee[0]:U=ee[Re-1]:Le.includes(L.key)&&(Re===ee.length-1?U=ye:U=ee[Re+1])}U!=null&&Wt(L,U)}(V=A==null?void 0:A.onKeyDown)==null||V.call(A,L)};Ga(()=>{var A;n&&Z.current.contains(document.activeElement)&&((A=document.activeElement)==null||A.blur())},[n]),n&&T!==-1&&P(-1),n&&le!==-1&&Ce(-1);const bt=A=>L=>{var V;(V=A.onChange)==null||V.call(A,L),Wt(L,L.target.valueAsNumber)},Ve=C.useRef(void 0);let He=p;i&&p==="horizontal"&&(He+="-reverse");const Ue=({finger:A,move:L=!1})=>{const{current:V}=Z,{width:K,height:te,bottom:U,left:ye}=V.getBoundingClientRect();let Re;He.startsWith("vertical")?Re=(U-A.y)/te:Re=(A.x-ye)/K,He.includes("-reverse")&&(Re=1-Re);let ge;if(ge=Ry(Re,l,s),f)ge=ky(ge,f,l);else{const _t=Ea(ee,ge);ge=ee[_t]}ge=ar(ge,l,s);let Le=0;if(Q){L?Le=Ve.current:Le=Ea(Y,ge),o&&(ge=ar(ge,Y[Le-1]||-1/0,Y[Le+1]||1/0));const _t=ge;ge=Ca({values:Y,newValue:ge,index:Le}),o&&L||(Le=ge.indexOf(_t),Ve.current=Le)}return{newValue:ge,activeIndex:Le}},ct=eo(A=>{const L=Zr(A,k);if(!L)return;if(g.current+=1,A.type==="mousemove"&&A.buttons===0){De(A);return}const{newValue:V,activeIndex:K}=Ue({finger:L,move:!0});Xr({sliderRef:Z,activeIndex:K,setActive:P}),N(V),!B&&g.current>Oy&&H(!0),D&&!Qr(V,M)&&D(A,V,K)}),De=eo(A=>{const L=Zr(A,k);if(H(!1),!L)return;const{newValue:V}=Ue({finger:L,move:!0});P(-1),A.type==="touchend"&&I(-1),d&&d(A,_.current??V),k.current=void 0,ut()}),Oe=eo(A=>{if(n)return;Oa()||A.preventDefault();const L=A.changedTouches[0];L!=null&&(k.current=L.identifier);const V=Zr(A,k);if(V!==!1){const{newValue:te,activeIndex:U}=Ue({finger:V});Xr({sliderRef:Z,activeIndex:U,setActive:P}),N(te),D&&!Qr(te,M)&&D(A,te,U)}g.current=0;const K=rn(Z.current);K.addEventListener("touchmove",ct,{passive:!0}),K.addEventListener("touchend",De,{passive:!0})}),ut=C.useCallback(()=>{const A=rn(Z.current);A.removeEventListener("mousemove",ct),A.removeEventListener("mouseup",De),A.removeEventListener("touchmove",ct),A.removeEventListener("touchend",De)},[De,ct]);C.useEffect(()=>{const{current:A}=Z;return A.addEventListener("touchstart",Oe,{passive:Oa()}),()=>{A.removeEventListener("touchstart",Oe),ut()}},[ut,Oe]),C.useEffect(()=>{n&&ut()},[n,ut]);const St=A=>L=>{var te;if((te=A.onMouseDown)==null||te.call(A,L),n||L.defaultPrevented||L.button!==0)return;L.preventDefault();const V=Zr(L,k);if(V!==!1){const{newValue:U,activeIndex:ye}=Ue({finger:V});Xr({sliderRef:Z,activeIndex:ye,setActive:P}),N(U),D&&!Qr(U,M)&&D(L,U,ye)}g.current=0;const K=rn(Z.current);K.addEventListener("mousemove",ct,{passive:!0}),K.addEventListener("mouseup",De)},Xe=xn(Q?Y[0]:l,l,s),Ee=xn(Y[Y.length-1],l,s)-Xe,vt=(A={})=>{const L=nn(A),V={onMouseDown:St(L||{})},K={...L,...V};return{...A,ref:Ne,...K}},ft=A=>L=>{var K;(K=A.onMouseOver)==null||K.call(A,L);const V=Number(L.currentTarget.getAttribute("data-index"));I(V)},Ht=A=>L=>{var V;(V=A.onMouseLeave)==null||V.call(A,L),I(-1)},Kt=(A={})=>{const L=nn(A),V={onMouseOver:ft(L||{}),onMouseLeave:Ht(L||{})};return{...A,...L,...V}},xt=A=>({pointerEvents:T!==-1&&T!==A?"none":void 0});let wt;return p==="vertical"&&(wt=i?"vertical-rl":"vertical-lr"),{active:T,axis:He,axisProps:Py,dragging:B,focusedThumbIndex:le,getHiddenInputProps:(A={})=>{const L=nn(A),V={onChange:bt(L||{}),onFocus:lt(L||{}),onBlur:hr(L||{}),onKeyDown:jt(L||{})},K={...L,...V};return{tabIndex:E,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":b(s),"aria-valuemin":b(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...A,...K,style:{...yu,direction:i?"rtl":"ltr",width:"100%",height:"100%",writingMode:wt}}},getRootProps:vt,getThumbProps:Kt,marks:Ae,open:$,range:Q,rootRef:Ne,trackLeap:Ee,trackOffset:Xe,values:Y,getThumbStyle:xt}}function ln(e){return typeof e=="string"}const $y=e=>!e||!ln(e);function Ly(e){return typeof e.main=="string"}function Iy(e,t=[]){if(!Ly(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Wo(e=[]){return([,t])=>t&&Iy(t,e)}function My(e){return Br("MuiSlider",e)}const Ge=Fa("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"]),Ny=e=>{const{open:t}=e;return{offset:it(t&&Ge.valueLabelOpen),circle:Ge.valueLabelCircle,label:Ge.valueLabelLabel}};function Xs(e){const{children:t,className:r,value:n}=e,o=Ny(e);return t?C.cloneElement(t,{className:it(t.props.className)},m.jsxs(C.Fragment,{children:[t.props.children,m.jsx("span",{className:it(o.offset,r),"aria-hidden":!0,children:m.jsx("span",{className:o.circle,children:m.jsx("span",{className:o.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(Xs.propTypes={children:h.element.isRequired,className:h.string,value:h.node});function Ra(e){return e}const Dy=ht("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${_e(r.color)}`],r.size!=="medium"&&t[`size${_e(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(Ut(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Ge.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Ge.dragging}`]:{[`& .${Ge.thumb}, & .${Ge.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Wo()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),Fy=ht("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}}]}),By=ht("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(Ut(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(Wo()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:_r(e.palette[t].main,.62),borderColor:_r(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:jr(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:jr(e.palette[t].main,.5)})}}}))]}))),Vy=ht("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${_e(r.color)}`],r.size!=="medium"&&t[`thumbSize${_e(r.size)}`]]}})(Ut(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${Ge.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(Wo()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${Ge.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${ho(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${Ge.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${ho(e.palette[t].main,.16)}`}}}}))]}))),Qs=ht(Xs,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(Ut(({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%"},[`&.${Ge.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%"},[`&.${Ge.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(Qs.propTypes={children:h.element.isRequired,index:h.number.isRequired,open:h.bool.isRequired,value:h.node});const Uy=ht("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Mo(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(Ut(({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}}]}))),zy=ht("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Mo(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(Ut(({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}}]}))),Jy=e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:i,classes:a,color:s,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",o==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",s&&`color${_e(s)}`,l&&`size${_e(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${_e(l)}`,s&&`thumbColor${_e(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Lo(c,My,a)},Gy=({children:e})=>e,el=C.forwardRef(function(t,r){const n=No({props:t,name:"MuiSlider"}),o=Tu(),{"aria-label":i,"aria-valuetext":a,"aria-labelledby":s,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:p,className:S,disableSwap:b=!1,disabled:f=!1,getAriaLabel:v,getAriaValueText:E,marks:O=!1,max:k=100,min:T=0,name:P,onChange:$,onChangeCommitted:I,orientation:B="horizontal",shiftStep:H=10,size:g="medium",step:_=1,scale:M=Ra,slotProps:N,slots:D,tabIndex:Q,track:Y="normal",value:Ae,valueLabelDisplay:ee="off",valueLabelFormat:le=Ra,...Ce}=n,Z={...n,isRtl:o,max:k,min:T,classes:p,disabled:f,disableSwap:b,orientation:B,marks:O,color:d,size:g,step:_,shiftStep:H,scale:M,track:Y,valueLabelDisplay:ee,valueLabelFormat:le},{axisProps:Ne,getRootProps:lt,getHiddenInputProps:hr,getThumbProps:Wt,open:jt,active:bt,axis:Ve,focusedThumbIndex:He,range:Ue,dragging:ct,marks:De,values:Oe,trackOffset:ut,trackLeap:St,getThumbStyle:Xe}=_y({...Z,rootRef:r});Z.marked=De.length>0&&De.some(ue=>ue.label),Z.dragging=ct,Z.focusedThumbIndex=He;const Ee=Jy(Z),vt=(D==null?void 0:D.root)??c.Root??Dy,ft=(D==null?void 0:D.rail)??c.Rail??Fy,Ht=(D==null?void 0:D.track)??c.Track??By,Kt=(D==null?void 0:D.thumb)??c.Thumb??Vy,xt=(D==null?void 0:D.valueLabel)??c.ValueLabel??Qs,wt=(D==null?void 0:D.mark)??c.Mark??Uy,qt=(D==null?void 0:D.markLabel)??c.MarkLabel??zy,A=(D==null?void 0:D.input)??c.Input??"input",L=(N==null?void 0:N.root)??u.root,V=(N==null?void 0:N.rail)??u.rail,K=(N==null?void 0:N.track)??u.track,te=(N==null?void 0:N.thumb)??u.thumb,U=(N==null?void 0:N.valueLabel)??u.valueLabel,ye=(N==null?void 0:N.mark)??u.mark,Re=(N==null?void 0:N.markLabel)??u.markLabel,ge=(N==null?void 0:N.input)??u.input,Le=Tt({elementType:vt,getSlotProps:lt,externalSlotProps:L,externalForwardedProps:Ce,additionalProps:{...$y(vt)&&{as:l}},ownerState:{...Z,...L==null?void 0:L.ownerState},className:[Ee.root,S]}),_t=Tt({elementType:ft,externalSlotProps:V,ownerState:Z,className:Ee.rail}),Kn=Tt({elementType:Ht,externalSlotProps:K,additionalProps:{style:{...Ne[Ve].offset(ut),...Ne[Ve].leap(St)}},ownerState:{...Z,...K==null?void 0:K.ownerState},className:Ee.track}),mr=Tt({elementType:Kt,getSlotProps:Wt,externalSlotProps:te,ownerState:{...Z,...te==null?void 0:te.ownerState},className:Ee.thumb}),yr=Tt({elementType:xt,externalSlotProps:U,ownerState:{...Z,...U==null?void 0:U.ownerState},className:Ee.valueLabel}),Yt=Tt({elementType:wt,externalSlotProps:ye,ownerState:Z,className:Ee.mark}),Qe=Tt({elementType:qt,externalSlotProps:Re,ownerState:Z,className:Ee.markLabel}),br=Tt({elementType:A,getSlotProps:hr,externalSlotProps:ge,ownerState:Z});return m.jsxs(vt,{...Le,children:[m.jsx(ft,{..._t}),m.jsx(Ht,{...Kn}),De.filter(ue=>ue.value>=T&&ue.value<=k).map((ue,be)=>{const Sr=xn(ue.value,T,k),$t=Ne[Ve].offset(Sr);let Ke;return Y===!1?Ke=Oe.includes(ue.value):Ke=Y==="normal"&&(Ue?ue.value>=Oe[0]&&ue.value<=Oe[Oe.length-1]:ue.value<=Oe[0])||Y==="inverted"&&(Ue?ue.value<=Oe[0]||ue.value>=Oe[Oe.length-1]:ue.value>=Oe[0]),m.jsxs(C.Fragment,{children:[m.jsx(wt,{"data-index":be,...Yt,...!ln(wt)&&{markActive:Ke},style:{...$t,...Yt.style},className:it(Yt.className,Ke&&Ee.markActive)}),ue.label!=null?m.jsx(qt,{"aria-hidden":!0,"data-index":be,...Qe,...!ln(qt)&&{markLabelActive:Ke},style:{...$t,...Qe.style},className:it(Ee.markLabel,Qe.className,Ke&&Ee.markLabelActive),children:ue.label}):null]},be)}),Oe.map((ue,be)=>{const Sr=xn(ue,T,k),$t=Ne[Ve].offset(Sr),Ke=ee==="off"?Gy:xt;return m.jsx(Ke,{...!ln(Ke)&&{valueLabelFormat:le,valueLabelDisplay:ee,value:typeof le=="function"?le(M(ue),be):le,index:be,open:jt===be||bt===be||ee==="on",disabled:f},...yr,children:m.jsx(Kt,{"data-index":be,...mr,className:it(Ee.thumb,mr.className,bt===be&&Ee.active,He===be&&Ee.focusVisible),style:{...$t,...Xe(be),...mr.style},children:m.jsx(A,{"data-index":be,"aria-label":v?v(be):i,"aria-valuenow":M(ue),"aria-labelledby":s,"aria-valuetext":E?E(M(ue),be):a,value:Oe[be],...br})})},be)})]})});process.env.NODE_ENV!=="production"&&(el.propTypes={"aria-label":mi(h.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":h.string,"aria-valuetext":mi(h.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:h.node,classes:h.object,className:h.string,color:h.oneOfType([h.oneOf(["primary","secondary","error","info","success","warning"]),h.string]),components:h.shape({Input:h.elementType,Mark:h.elementType,MarkLabel:h.elementType,Rail:h.elementType,Root:h.elementType,Thumb:h.elementType,Track:h.elementType,ValueLabel:h.elementType}),componentsProps:h.shape({input:h.oneOfType([h.func,h.object]),mark:h.oneOfType([h.func,h.object]),markLabel:h.oneOfType([h.func,h.object]),rail:h.oneOfType([h.func,h.object]),root:h.oneOfType([h.func,h.object]),thumb:h.oneOfType([h.func,h.object]),track:h.oneOfType([h.func,h.object]),valueLabel:h.oneOfType([h.func,h.shape({children:h.element,className:h.string,open:h.bool,style:h.object,value:h.node,valueLabelDisplay:h.oneOf(["auto","off","on"])})])}),defaultValue:h.oneOfType([h.arrayOf(h.number),h.number]),disabled:h.bool,disableSwap:h.bool,getAriaLabel:h.func,getAriaValueText:h.func,marks:h.oneOfType([h.arrayOf(h.shape({label:h.node,value:h.number.isRequired})),h.bool]),max:h.number,min:h.number,name:h.string,onChange:h.func,onChangeCommitted:h.func,orientation:h.oneOf(["horizontal","vertical"]),scale:h.func,shiftStep:h.number,size:h.oneOfType([h.oneOf(["small","medium"]),h.string]),slotProps:h.shape({input:h.oneOfType([h.func,h.object]),mark:h.oneOfType([h.func,h.object]),markLabel:h.oneOfType([h.func,h.object]),rail:h.oneOfType([h.func,h.object]),root:h.oneOfType([h.func,h.object]),thumb:h.oneOfType([h.func,h.object]),track:h.oneOfType([h.func,h.object]),valueLabel:h.oneOfType([h.func,h.shape({children:h.element,className:h.string,open:h.bool,style:h.object,value:h.node,valueLabelDisplay:h.oneOf(["auto","off","on"])})])}),slots:h.shape({input:h.elementType,mark:h.elementType,markLabel:h.elementType,rail:h.elementType,root:h.elementType,thumb:h.elementType,track:h.elementType,valueLabel:h.elementType}),step:h.number,sx:h.oneOfType([h.arrayOf(h.oneOfType([h.func,h.object,h.bool])),h.func,h.object]),tabIndex:h.number,track:h.oneOf(["inverted","normal",!1]),value:h.oneOfType([h.arrayOf(h.number),h.number]),valueLabelDisplay:h.oneOf(["auto","off","on"]),valueLabelFormat:h.oneOfType([h.func,h.string])});var Wy="[object Number]";function Hy(e){return typeof e=="number"||Ft(e)&&zt(e)==Wy}const tl=ve.observer(e=>{j.useTheme();function t(r,n){n===e.velocity||!Hy(n)||e.onVelocityChange(n)}return m.jsxs(j.Stack,{direction:"row",gap:2,children:[m.jsx(el,{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):m.jsx(Ho,{value:e.velocity.toString()})]})});function Ho({value:e,sx:t}){var n;const r=j.useTheme();return m.jsx(j.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:m.jsx(j.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const rl=ve.observer(({store:e})=>{const{t}=Te.useTranslation(),r=ve.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 m.jsx(tl,{velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>m.jsx(Ho,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),Ky=ve.observer(({store:e,children:t})=>{var d,p,S,b,f,v,E,O,k;const{t:r}=Te.useTranslation(),n=j.useTheme();function o(T,P){(P==="translate"||P==="rotate")&&e.setSelectedCartesianMotionType(P)}os(()=>[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(T,P){const $=await e.activate(),I=$.motionStream.rapidlyChangingMotionState.tcp_pose,B=$.motionStream.rapidlyChangingMotionState.state.joint_position;I&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:T.axis,direction:T.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:I,currentJoints:B,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:T.axis,direction:T.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:P.mm}:{type:"rotate",distanceRads:Ot.degreesToRadians(P.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function a(T){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return i(T,e.activeDiscreteIncrement);T.motionType==="translate"?await e.jogger.startTCPTranslation({axis:T.axis,direction:T.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:T.axis,direction:T.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function s(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}const l=[{id:"x",colors:(S=(p=(d=n.componentsExt)==null?void 0:d.JoggingCartesian)==null?void 0:p.Axis)==null?void 0:S.X,icon:m.jsx(tg,{})},{id:"y",colors:(v=(f=(b=n.componentsExt)==null?void 0:b.JoggingCartesian)==null?void 0:f.Axis)==null?void 0:v.Y,icon:m.jsx(ng,{})},{id:"z",colors:(k=(O=(E=n.componentsExt)==null?void 0:E.JoggingCartesian)==null?void 0:O.Axis)==null?void 0:k.Z,icon:m.jsx(ig,{})}];function c(T){return r("General.mm.variable",{amount:T.toFixed(1)})}function u(T){return r("General.degree.variable",{amount:Ot.radiansToDegrees(T).toFixed(1)})}return m.jsxs(j.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[m.jsxs(j.Stack,{gap:2,children:[m.jsx(Ty,{store:e}),m.jsx(rl,{store:e}),m.jsx(j.Divider,{})]}),m.jsx(j.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:m.jsxs(j.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[m.jsxs(Ey,{value:e.selectedCartesianMotionType,onChange:o,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[m.jsx(j.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),m.jsx(j.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&l.map(T=>{var P;return m.jsx(bo,{colors:T.colors,disabled:e.isLocked,activeJoggingDirection:((P=e.incrementJogInProgress)==null?void 0:P.axis)===T.id?e.incrementJogInProgress.direction:void 0,label:m.jsxs(m.Fragment,{children:[T.icon,m.jsx(j.Typography,{sx:{fontSize:"24px",color:n.palette.text.primary},children:T.id.toUpperCase()})]}),getDisplayedValue:()=>{var $;return c((($=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:$.position[T.id])||0)},startJogging:$=>a({axis:T.id,motionType:"translate",direction:$}),stopJogging:s},T.id)}),e.selectedCartesianMotionType==="rotate"&&l.map(T=>{var P;return m.jsx(bo,{colors:T.colors,disabled:e.isLocked,activeJoggingDirection:((P=e.incrementJogInProgress)==null?void 0:P.axis)===T.id?e.incrementJogInProgress.direction:void 0,label:m.jsxs(m.Fragment,{children:[m.jsx(sg,{}),m.jsx(j.Typography,{sx:{fontSize:"24px",color:n.palette.text.primary},children:T.id.toUpperCase()})]}),getDisplayedValue:()=>{var $,I;return u(((I=($=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:$.orientation)==null?void 0:I[T.id])||0)},startJogging:$=>a({axis:T.id,motionType:"rotate",direction:$}),stopJogging:s},T.id)})]})}),m.jsx(Js,{store:e}),t&&m.jsx(j.Divider,{}),t]})}),qy=ve.observer(({store:e,children:t})=>{async function r(o){await e.activate(),await e.jogger.startJointRotation({joint:o.joint,direction:o.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function n(){await e.jogger.stop(),await e.deactivate()}return m.jsxs(j.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[m.jsx(rl,{store:e}),m.jsx(j.Divider,{}),m.jsx(j.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:m.jsx(j.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(o=>{var l;const i=(l=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:l[o.index],a=(i==null?void 0:i.lower_limit)!==void 0?Ot.radiansToDegrees(i.lower_limit):void 0,s=(i==null?void 0:i.upper_limit)!==void 0?Ot.radiansToDegrees(i.upper_limit):void 0;return m.jsx(ls,{disabled:e.isLocked,lowerLimitDegs:a,upperLimitDegs:s,getValueDegs:()=>{const c=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[o.index];return c!==void 0?Ot.radiansToDegrees(c):void 0},startJogging:c=>r({joint:o.index,direction:c}),stopJogging:n},`joint-${o.index}`)})})}),m.jsx(Js,{store:e}),t&&m.jsx(j.Divider,{}),t]})}),Yy=fr(ve.observer(e=>{const t=jo.isString(e.nova)?new Ot.NovaClient({instanceUrl:e.nova}):e.nova,r=ve.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){cr.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let o=e.store;if(!o){const i=await t.connectJogger(e.motionGroupId);o=await Hn.loadFor(i)}cr.runInAction(()=>{r.joggingStore=o}),e.onSetup&&e.onSetup(o)}catch(o){r.loadingError=o}}return z.useEffect(()=>(n(),e.store?()=>null:()=>{var o;(o=r.joggingStore)==null||o.dispose()}),[e.store,e.nova,e.motionGroupId]),z.useEffect(()=>{const o=r.joggingStore;o&&(e.locked?o.lock("external"):o.unlock("external"))},[r.joggingStore,e.locked]),m.jsx(j.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?m.jsx(Zy,{store:r.joggingStore,children:e.children}):m.jsx(Vo,{message:"Loading jogging",error:r.loadingError})})})),Zy=ve.observer(({store:e,children:t})=>{function r(){if(e.currentTab.id==="cartesian")return m.jsx(m.Fragment,{children:m.jsx(Ky,{store:e,children:t})});if(e.currentTab.id==="joint")return m.jsx(m.Fragment,{children:m.jsx(qy,{store:e,children:t})})}return m.jsxs(j.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[m.jsx(j.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(n=>m.jsx(j.Tab,{label:n.label,id:`jogging-tab-${n.id}`,"aria-controls":`jogging-tab-${n.id}`},n.id))}),m.jsx(j.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:r()})]})}),nl=z.forwardRef(({label:e,value:t},r)=>{var s;const n=j.useTheme(),[o,i]=z.useState(!1);async function a(){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 z.useEffect(()=>{if(!o)return;const l=setTimeout(()=>i(!1),3e3);return()=>{l&&clearTimeout(l)}},[o]),m.jsx(j.Tooltip,{open:o,title:"Copied!",children:m.jsx(j.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(s=n.palette.backgroundPaperElevation)==null?void 0:s[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>a(),children:m.jsx(j.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})})})}),Xy=ve.observer(({motionStream:e})=>{const t=z.useRef(null);function r(){const n=e.rapidlyChangingMotionState.tcp_pose;return n?Ot.poseToWandelscriptString(n):""}return dr(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),m.jsx(j.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:m.jsx(nl,{value:r(),ref:t})})}),Qy=ve.observer(({motionStream:e})=>{const t=z.useRef(null);function r(){const{joints:n}=e.rapidlyChangingMotionState.state.joint_position;return`[${n.map(o=>parseFloat(o.toFixed(4))).join(", ")}]`}return dr(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),m.jsx(j.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:m.jsx(nl,{value:r(),ref:t})})});function e0(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function t0({baseUrl:e=e0(),...t}){return m.jsxs(j.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:[m.jsx(j.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),m.jsxs(j.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[m.jsx(j.Typography,{color:"#fff",children:"Found no devices to connect to."}),m.jsx(j.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),m.jsx(j.DialogActions,{children:m.jsxs(j.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[m.jsx(j.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),m.jsx(j.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const r0=Array(6).fill(2*Math.PI),Aa="0.0.0-semantically-released";function Ko(e){let t=Aa;return Aa.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function n0(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>il(r))}function ol(e){return e.name.endsWith("_FLG")}function il(e){return/_J[0-9]+$/.test(e.name)}function o0(e,t){let r;function n(o){if(ol(o)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${o.name}. Only one _FLG group is allowed.`);r=o}il(o),o.children.map(n)}if(n(e.scene),!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 al({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){po.Globals.assign({frameLoop:"always"});const o=z.useRef([]),i=z.useRef([]),{invalidate:a}=Tl.useThree();function s(p){p&&(i.current=n0(p),c(),a())}function l(p){o.current=p,d.start(Object.assign({},o.current))}function c(){const p=i.current.map((S,b)=>u[b].get());if(r)r(i.current,p);else for(const[S,b]of i.current.entries()){const f=t[S],v=f.theta||0,E=f.reverse_rotation_direction?-1:1;b.rotation.y=E*p[S]+v}}ns(()=>{const p=e.state.joint_position.joints.filter(S=>S!==void 0);requestAnimationFrame(()=>l(p))});const[u,d]=po.useSpring(()=>({...Object.assign({},e.state.joint_position.joints),onChange:()=>{c(),a()},onResolve:()=>{c()}}));return m.jsx("group",{ref:s,children:n})}const ka="line",Pa="mesh";function i0({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new pt.Matrix4;function o(s,l){const c=new pt.Vector3,u=new pt.Quaternion,d=new pt.Vector3;n.decompose(c,u,d);const p=c.clone(),S=new pt.Matrix4().makeRotationY(s.theta+l*(s.reverse_rotation_direction?-1:1)).multiply(new pt.Matrix4().makeTranslation(0,s.d/1e3,0)).multiply(new pt.Matrix4().makeTranslation(s.a/1e3,0,0)).multiply(new pt.Matrix4().makeRotationX(s.alpha));return n.multiply(S),n.decompose(c,u,d),{a:p,b:c}}function i(s,l,c,u){if(!t)return;const d=t[s];if(!d)return;const{a:p,b:S}=o(d,u);l.geometry.setPositions([p.toArray(),S.toArray()].flat()),c.position.set(S.x,S.y,S.z)}function a(s,l){n.identity(),s.forEach((c,u)=>{i(u,c.getObjectByName(ka),c.getObjectByName(Pa),l[u])})}return m.jsx(m.Fragment,{children:m.jsx(al,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:a,children:m.jsxs("group",{...r,name:"Scene",children:[m.jsxs("mesh",{children:[m.jsx("sphereGeometry",{args:[.01,32,32]}),m.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((s,l)=>{const{a:c,b:u}=o(s,e.state.joint_position.joints[l]??0),d=`dhrobot_J0${l}`;return m.jsxs("group",{name:d,children:[m.jsx(qe.Line,{name:ka,points:[c,u],color:"white",lineWidth:5}),m.jsxs("mesh",{name:Pa,position:u,children:[m.jsx("sphereGeometry",{args:[.01,32,32]}),m.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+l)]},d)})]})})})}const a0=console.warn;function s0(){return z.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&a0(e)}},[]),m.jsx(m.Fragment,{})}function l0(e){return e.type==="Mesh"}function c0({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:o}=o0(qe.useGLTF(e),e.split("/").pop()||e),i=z.useCallback(s=>{s&&r&&r()},[e]);function a(s){return l0(s)?m.jsx("mesh",{name:s.name,geometry:s.geometry,material:s.material,position:s.position,rotation:s.rotation},s.uuid):m.jsx(po.animated.group,{name:s.name,position:s.position,rotation:s.rotation,ref:ol(s)?t:void 0,children:s.children.map(a)},s.uuid)}return m.jsx("group",{...n,dispose:null,ref:i,children:a(o.scene)})}const u0=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof we.Mesh){r.material instanceof we.Material&&(r.material.colorWrite=!1);const n=r.clone(),o=r.clone();n.material=new we.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:we.DoubleSide}),n.userData.isGhost=!0,o.material=new we.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:we.DoubleSide}),o.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(o))}}),e.userData.isGhost=!0)},f0=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof we.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof we.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},sl=fr(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Ko,flangeRef:o,postModelRender:i,transparentColor:a,...s})=>{const[l,c]=z.useState(null),u=z.useCallback(p=>{c(p)},[]);z.useEffect(()=>{l&&(a?u0(l,a):f0(l))},[l,a]);const d=m.jsx(i0,{rapidlyChangingMotionState:e,dhParameters:r,...s});return m.jsxs(Al.ErrorBoundary,{fallback:d,onError:p=>{console.error(p)},children:[m.jsx(z.Suspense,{fallback:d,children:m.jsx("group",{ref:u,children:m.jsx(al,{rapidlyChangingMotionState:e,dhParameters:r,children:m.jsx(c0,{modelURL:n(t),postModelRender:i,flangeRef:o,...s})})})}),m.jsx(s0,{})]})});function d0({connectedMotionGroup:e,getModel:t=Ko,flangeRef:r,transparentColor:n,...o}){return e.dhParameters?m.jsx(sl,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,...o}):null}const p0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M5.248 21c-.334 0-.619-.116-.853-.35a1.153 1.153 0 0 1-.351-.848c0-.333.117-.616.351-.85.234-.233.519-.35.853-.35H7.24L4.558 9.87a2.881 2.881 0 0 1-1.126-1.042A2.77 2.77 0 0 1 3 7.317c0-.793.28-1.467.838-2.023a2.774 2.774 0 0 1 2.033-.834 2.71 2.71 0 0 1 1.728.585c.494.389.832.887 1.014 1.493h3.58V5.239c0-.22.076-.406.226-.555a.76.76 0 0 1 .558-.224c.136 0 .263.035.381.104.118.07.209.167.273.292v.14l1.835-1.702a.979.979 0 0 1 .52-.279.881.881 0 0 1 .58.091l4.01 1.85a.74.74 0 0 1 .36.364.537.537 0 0 1-.002.474.592.592 0 0 1-.366.323.657.657 0 0 1-.477-.039l-3.858-1.774L13.76 6.59v1.454l2.473 2.233 3.858-1.774a.648.648 0 0 1 .485-.03.571.571 0 0 1 .358.314.513.513 0 0 1 .01.482.79.79 0 0 1-.367.357l-4.011 1.882a.881.881 0 0 1-.58.09.979.979 0 0 1-.52-.278L13.63 9.638v.14a.92.92 0 0 1-.273.275.665.665 0 0 1-.381.12.76.76 0 0 1-.558-.224.752.752 0 0 1-.225-.555V8.096h-3.58a2.82 2.82 0 0 1-.215.54 2.552 2.552 0 0 1-.323.479l5.139 9.488h2.673c.335 0 .62.116.854.35.234.233.35.516.35.849 0 .332-.116.615-.35.849a1.167 1.167 0 0 1-.854.349H5.248Zm.623-12.385c.362 0 .67-.126.924-.378a1.25 1.25 0 0 0 .38-.92 1.25 1.25 0 0 0-.38-.92 1.261 1.261 0 0 0-.924-.379 1.26 1.26 0 0 0-.925.379 1.25 1.25 0 0 0-.38.92c0 .36.127.667.38.92.254.252.562.378.925.378Z"})),g0=z.forwardRef(p0),h0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"m13.37 9.12 1.69 1.69 2.99-2.99-3.73-3.73-.95-.95-7.66 7.66-.95.95 3.99 3.99v3.44h7.55v-3.55l-4.72-4.72 1.79-1.79Zm-.91-2.99.91-.91 2.6 2.6-.91.91-2.6-2.6Zm-2.25 10.24h3.74l-1.34-1.34-.04-.04h-2.5l-3.25-3.25 4.59-4.59.92.92L9.5 10.9l5.33 5.33v1.48H10.2v-1.35l.01.01ZM2 2v4.99h1.41V3.4h3.58V2H2ZM22.21 2h-4.98v1.41h3.59v3.58h1.4V2h-.01ZM20.81 20.65h-3.58v1.4h4.98v-4.99h-1.4v3.59ZM3.4 17.06H2v4.98h4.99v-1.4H3.4v-3.58Z"})),m0=z.forwardRef(h0),nt=ve.observer(({id:e,icon:t,color:r,title:n,name:o,explanation:i,literalValue:a,anchorOrigin:s,transformOrigin:l})=>{const c=ve.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!c.anchorEl},openPopover(u){c.anchorEl=u.currentTarget},closePopover(){c.anchorEl=null}}));return m.jsxs(m.Fragment,{children:[m.jsx(j.Stack,{"aria-owns":c.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:c.openPopover,onMouseLeave:c.closePopover,sx:{cursor:"pointer"},children:m.jsx(j.SvgIcon,{component:t,sx:{color:r}})}),m.jsx(j.Popover,{id:e,sx:{pointerEvents:"none"},open:c.isPopoverOpen,anchorEl:c.anchorEl,anchorOrigin:s??{vertical:"bottom",horizontal:"left"},transformOrigin:l??{vertical:"top",horizontal:"left"},onClose:c.closePopover,disableRestoreFocus:!0,children:m.jsxs(j.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[m.jsxs("div",{children:[n&&m.jsx(j.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),m.jsx(j.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:o})]}),m.jsx(j.Typography,{fontSize:"14px",children:i}),a&&m.jsx(j.Typography,{fontSize:"12px",children:a})]})})]})}),y0=ve.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n})=>{const o=j.useTheme(),{t:i}=Te.useTranslation();return e?m.jsx(nt,{id:"motion-group-virtual",icon:m0,color:o.palette.tertiary.main,name:i("SafetyBar.ControllerType.Virtual.lb"),explanation:m.jsxs(Te.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",m.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:r,transformOrigin:n}):m.jsx(nt,{id:"motion-group-physical",icon:g0,color:o.palette.primary.main,name:i("SafetyBar.ControllerType.Physical.lb"),explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:m.jsx("code",{}),strong:m.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),b0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.306 2.768c0-.424.344-.768.768-.768h.406C19.53 2 22 4.551 22 7.699c0 3.237-2.51 5.587-5.31 5.703-.84 1.595-2.478 2.677-4.36 2.677a4.845 4.845 0 0 1-3.146-1.163c-.6 1.783 0 3.922 1.79 4.99 1.929 1.149 4.395.467 5.508-1.524l.212-.378a.75.75 0 1 1 1.308.732l-.231.414c-1.524 2.725-4.9 3.66-7.54 2.085-2.716-1.618-3.432-5.037-2.129-7.599a5.22 5.22 0 0 1-.73-2.677c0-2.192 1.335-4.063 3.212-4.793-1.195-1.427-3.29-1.96-5.08-.892-1.928 1.15-2.589 3.696-1.475 5.687l.231.413a.75.75 0 0 1-1.308.732l-.212-.377c-1.524-2.726-.62-6.211 2.02-7.785 2.716-1.619 5.943-.55 7.44 1.897l.13-.001c2.739 0 4.96 2.292 4.96 5.12 0 .284-.023.563-.066.834 1.795-.354 3.288-1.96 3.288-4.095 0-2.3-1.805-4.163-4.032-4.163h-.406a.768.768 0 0 1-.768-.768Zm.496 8.191c0 .286-.033.564-.094.831a3.62 3.62 0 0 1-.672 1.415 3.425 3.425 0 0 1-2.706 1.338 3.402 3.402 0 0 1-2.384-.98 3.598 3.598 0 0 1-.852-1.306 3.677 3.677 0 0 1-.235-1.298c0-1.623 1.046-2.994 2.48-3.435a3.37 3.37 0 0 1 1.522-.107c1.665.264 2.94 1.75 2.94 3.542Z"})),S0=z.forwardRef(b0),v0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z",fill:"#fff",fillOpacity:.56})),x0=z.forwardRef(v0),w0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M12.953 5.09a1.497 1.497 0 0 0-1.653-.518l-1.35.43a1.504 1.504 0 0 0-1.726-.376L2.858 6.97c-.736.321-1.06 1.155-.726 1.862.334.707 1.202 1.02 1.937.698l4.27-1.865 1.466 1.973v.402c0 .873-.627 1.63-1.512 1.827l-2.56.567c-1.329.295-2.27 1.431-2.27 2.74v.107c0 .26.22.469.489.469h11.117c1.329 0 2.618.435 3.656 1.233l1.665 1.28A1 1 0 0 0 22 17.47V11.062c0-.312-.108-.616-.308-.863l-3.415-4.218a1.5 1.5 0 0 0-1.618-.471l-.378.12-.866-.475a1.516 1.516 0 0 0-1.188-.114l-1.06.338-.214-.289Z"})),T0=z.forwardRef(w0),E0=ve.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r})=>{const{t:n}=Te.useTranslation(),o=j.useTheme();switch(e){case"OPERATION_MODE_AUTO":return m.jsx(nt,{id:"operation-mode-auto",icon:S0,title:n("SafetyBar.OperationMode.ti"),name:n("SafetyBar.OperationMode.Automatic.ti"),color:"rgba(255, 255, 255, 0.57)",explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:t,transformOrigin:r});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return m.jsx(nt,{id:"operation-mode-manual",icon:T0,color:o.palette.warning.main,title:n("SafetyBar.OperationMode.ti"),name:n("SafetyBar.OperationMode.Manual.lb"),explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:return m.jsx(nt,{id:"operation-mode-error",icon:x0,color:o.palette.warning.main,title:n("SafetyBar.OperationMode.ti"),name:n("SafetyBar.OperationMode.Error.lb"),explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:e,anchorOrigin:t,transformOrigin:r})}}),C0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M19.763 16.432 13.516 5.864c-.674-1.152-2.358-1.152-3.049 0l-6.23 10.568C3.563 17.567 4.405 19 5.753 19H18.23c1.364 0 2.206-1.432 1.532-2.568ZM12 8.498c.539 0 .96.428.96.938v.066l-.32 4.708a.639.639 0 0 1-.64.592.639.639 0 0 1-.64-.592l-.32-4.708A.953.953 0 0 1 12 8.498Zm0 8.79c-.556 0-1.01-.444-1.01-.987 0-.544.454-.988 1.01-.988s1.01.444 1.01.988c0 .542-.454.987-1.01.987Z"})),O0=z.forwardRef(C0),R0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 12a6.364 6.364 0 1 1-12.728 0 6.364 6.364 0 0 1 12.728 0ZM7.909 9.273 12 16.546l4.09-7.273H7.91Z"}),C.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.364 0a8.636 8.636 0 1 1-17.273 0 8.636 8.636 0 0 1 17.273 0Z"})),A0=z.forwardRef(R0),k0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M9.057 15.115c-1.681 0-3.111-.59-4.29-1.768C3.59 12.17 3 10.74 3 9.057c0-.29.021-.582.064-.876a4.1 4.1 0 0 1 .214-.844.78.78 0 0 1 .273-.36c.115-.077.244-.133.389-.168a.857.857 0 0 1 .437.008c.146.04.28.12.4.24l2.806 2.787 2.26-2.261-2.775-2.786a.903.903 0 0 1-.241-.405.875.875 0 0 1-.008-.442 1.13 1.13 0 0 1 .174-.389.82.82 0 0 1 .355-.273c.268-.107.548-.182.838-.224.29-.043.581-.064.871-.064 1.682 0 3.112.59 4.29 1.768 1.179 1.178 1.768 2.608 1.768 4.29 0 .444-.042.858-.126 1.241-.084.384-.21.755-.377 1.113l5.726 5.692A2.2 2.2 0 0 1 21 18.721a2.2 2.2 0 0 1-.662 1.617A2.2 2.2 0 0 1 18.72 21a2.173 2.173 0 0 1-1.617-.679l-5.692-5.709c-.372.161-.75.285-1.133.372-.383.087-.79.13-1.222.13Z",fill:"#fff",fillOpacity:.56})),P0=z.forwardRef(k0),j0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),_0=z.forwardRef(j0),$0=({title:e,titleId:t,...r},n)=>C.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?C.createElement("title",{id:t},e):null,C.createElement("path",{d:"M9 16h6c.283 0 .52-.096.713-.287A.968.968 0 0 0 16 15V9a.967.967 0 0 0-.287-.713A.968.968 0 0 0 15 8H9a.968.968 0 0 0-.713.287A.968.968 0 0 0 8 9v6c0 .283.096.52.287.713.192.191.43.287.713.287Zm3 6a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"})),L0=z.forwardRef($0),I0=ve.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r})=>{const{t:n}=Te.useTranslation(),o=j.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return m.jsx(nt,{id:"safety-state-normal",title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Normal.lb"),icon:_0,color:"rgba(255, 255, 255, 0.57)",explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return m.jsx(nt,{id:"safety-state-estop",title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Estop.lb"),icon:A0,color:o.palette.error.main,explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return m.jsx(nt,{id:"safety-state-stop",icon:L0,title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Stop.lb"),color:o.palette.warning.main,explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return m.jsx(nt,{id:"safety-state-manual-action-required",icon:P0,color:o.palette.warning.main,title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return m.jsx(nt,{id:"safety-state-error",icon:O0,color:o.palette.error.main,title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Error.lb"),explanation:m.jsx(Te.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:Xp(e,`Unknown safety state ${e}`)}}),M0=fr(ve.observer(e=>m.jsxs(j.Stack,{direction:"row",gap:"8px",alignItems:"center",sx:{height:"24px"},children:[m.jsx(I0,{safetyState:e.safetyState,anchorOrigin:e.anchorOrigin,transformOrigin:e.transformOrigin}),m.jsx(j.Divider,{orientation:"vertical",flexItem:!0}),m.jsx(E0,{operationMode:e.operationMode,anchorOrigin:e.anchorOrigin,transformOrigin:e.transformOrigin}),m.jsx(j.Divider,{orientation:"vertical",flexItem:!0}),m.jsx(y0,{isVirtual:e.isVirtual,motionGroupId:e.motionGroupId,anchorOrigin:e.anchorOrigin,transformOrigin:e.transformOrigin})]}))),N0=j.styled(j.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}}]}}),D0=z.forwardRef((e,t)=>m.jsx(N0,{ref:t,selected:e.selected,...e,color:"secondary",variant:"circular"})),F0={$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"},B0=z.lazy(()=>import("@monaco-editor/react"));let fo=null;async function V0(){if(!fo){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);fo={shiki:await e({langs:[F0],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return fo}const U0=fr(e=>{const t=j.useTheme(),[r,n]=z.useState("dark-plus"),o=t.palette.mode==="dark"?"dark-plus":"light-plus";async function i(a){var c,u;a.languages.register({id:"wandelscript"}),a.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:s,shikiToMonaco:l}=await V0();l(s,a),a.editor.defineTheme(o,((u=(c=t.componentsExt)==null?void 0:c.WandelscriptEditor)==null?void 0:u.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(a),n(o)}return m.jsx(z.Suspense,{fallback:m.jsx(Vo,{}),children:m.jsx(B0,{value:e.code,onMount:(a,s)=>{i(s)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function ll(){var t,r,n,o,i,a,s;const e=j.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`}}},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"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(a=(i=e.paletteExt)==null?void 0:i.secondary)==null?void 0:a.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)"}}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":j.rgbToHex(((s=e.palette.backgroundPaperElevation)==null?void 0:s[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function z0(){const e=ll();return e.palette.mode="light",e}function J0(e){var n,o,i,a;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"&&((a=(i=window.matchMedia)==null?void 0:i.call(window,"(prefers-color-scheme: light)"))==null?void 0:a.matches)));const r=t?ll():z0();return Qa(r,e)}exports.JoggingCartesianAxisControl=bo;exports.JoggingJointRotationControl=ls;exports.JoggingPanel=Yy;exports.JoggingStore=Hn;exports.LoadingCover=Vo;exports.LoadingErrorMessage=$s;exports.NoMotionGroupModal=t0;exports.PoseCartesianValues=Xy;exports.PoseJointValues=Qy;exports.PresetEnvironment=_l;exports.Robot=d0;exports.SafetyBar=M0;exports.SafetyZonesRenderer=Il;exports.SelectableFab=D0;exports.SupportedRobot=sl;exports.TrajectoryRenderer=Ml;exports.VelocitySlider=tl;exports.VelocitySliderLabel=Ho;exports.WandelscriptEditor=U0;exports.createNovaMuiTheme=J0;exports.defaultAxisConfig=r0;exports.defaultGetModel=Ko;exports.useAnimationFrame=dr;exports.useAutorun=ns;exports.useMounted=In;exports.useReaction=os;
94
94
  //# sourceMappingURL=index.cjs.map