@wandelbots/wandelbots-js-react-components 2.27.0 → 2.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -111,5 +111,5 @@ and limitations under the License.
111
111
  `+s):a.stack=s}catch{}}throw a}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=pr(this.defaults,r);const{transitional:a,paramsSerializer:n,headers:s}=r;a!==void 0&&mn.assertOptions(a,{silentJSONParsing:vt.transitional(vt.boolean),forcedJSONParsing:vt.transitional(vt.boolean),clarifyTimeoutError:vt.transitional(vt.boolean)},!1),n!=null&&(I.isFunction(n)?r.paramsSerializer={serialize:n}:mn.assertOptions(n,{encode:vt.function,serialize:vt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),mn.assertOptions(r,{baseUrl:vt.spelling("baseURL"),withXsrfToken:vt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&I.merge(s.common,s[r.method]);s&&I.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),r.headers=Ze.concat(o,s);const i=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(l=l&&h.synchronous,i.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let d,u=0,p;if(!l){const g=[tl.bind(this),void 0];for(g.unshift.apply(g,i),g.push.apply(g,c),p=g.length,d=Promise.resolve(r);u<p;)d=d.then(g[u++],g[u++]);return d}p=i.length;let f=r;for(u=0;u<p;){const g=i[u++],h=i[u++];try{f=g(f)}catch(x){h.call(this,x);break}}try{d=tl.call(this,f)}catch(g){return Promise.reject(g)}for(u=0,p=c.length;u<p;)d=d.then(c[u++],c[u++]);return d}getUri(t){t=pr(this.defaults,t);const r=zc(t.baseURL,t.url,t.allowAbsoluteUrls);return kc(r,t.params,t.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(t){lr.prototype[t]=function(r,a){return this.request(pr(a||{},{method:t,url:r,data:(a||{}).data}))}});I.forEach(["post","put","patch"],function(t){function r(a){return function(s,o,i){return this.request(pr(i||{},{method:t,headers:a?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}lr.prototype[t]=r(),lr.prototype[t+"Form"]=r(!0)});let rv=class Kc{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const a=this;this.promise.then(n=>{if(!a._listeners)return;let s=a._listeners.length;for(;s-- >0;)a._listeners[s](n);a._listeners=null}),this.promise.then=n=>{let s;const o=new Promise(i=>{a.subscribe(i),s=i}).then(n);return o.cancel=function(){a.unsubscribe(s)},o},t(function(s,o,i){a.reason||(a.reason=new ta(s,o,i),r(a.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=a=>{t.abort(a)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Kc(function(n){t=n}),cancel:t}}};function av(e){return function(r){return e.apply(null,r)}}function nv(e){return I.isObject(e)&&e.isAxiosError===!0}const Zs={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(Zs).forEach(([e,t])=>{Zs[t]=e});function Qc(e){const t=new lr(e),r=Rc(lr.prototype.request,t);return I.extend(r,lr.prototype,t,{allOwnKeys:!0}),I.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return Qc(pr(e,n))},r}const O=Qc(Da);O.Axios=lr;O.CanceledError=ta;O.CancelToken=rv;O.isCancel=Nc;O.VERSION=Wc;O.toFormData=Zn;O.AxiosError=ie;O.Cancel=O.CanceledError;O.all=function(t){return Promise.all(t)};O.spread=av;O.isAxiosError=nv;O.mergeConfig=pr;O.AxiosHeaders=Ze;O.formToJSON=e=>Fc(I.isHTMLForm(e)?new FormData(e):e);O.getAdapter=qc.getAdapter;O.HttpStatusCode=Zs;O.default=O;const{Axios:uP,AxiosError:eo,CanceledError:pP,isCancel:hP,CancelToken:mP,VERSION:fP,all:gP,Cancel:yP,isAxiosError:sv,spread:bP,toFormData:SP,AxiosHeaders:vP,HttpStatusCode:xP,formToJSON:OP,getAdapter:wP,mergeConfig:CP}=O,w="/api/v1".replace(/\/+$/,"");class Pe{constructor(t,r=w,a=O){ia(this,"basePath");ia(this,"axios");ia(this,"configuration");this.basePath=r,this.axios=a,t&&(this.configuration=t,this.basePath=t.basePath??r)}}class ov extends Error{constructor(r,a){super(a);ia(this,"field");this.field=r,this.name="RequiredError"}}const C={},P="https://example.com",m=function(e,t,r){if(r==null)throw new ov(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},V=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},R=async function(e,t){if(t&&t.accessToken){const r=typeof t.accessToken=="function"?await t.accessToken():await t.accessToken;e.Authorization="Bearer "+r}};function to(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(a=>to(e,a,r)):Object.keys(t).forEach(a=>to(e,t[a],`${r}${r!==""?".":""}${a}`)):e.has(r)?e.append(r,t):e.set(r,t))}const _=function(e,...t){const r=new URLSearchParams(e.search);to(r,t),e.search=r.toString()},oe=function(e,t,r){const a=typeof e!="string";return(a&&r&&r.isJsonMime?r.isJsonMime(t.headers["Content-Type"]):a)?JSON.stringify(e!==void 0?e:{}):e||""},A=function(e){return e.pathname+e.search+e.hash},T=function(e,t,r,a){return(n=t,s=r)=>{const o={...e.options,url:(n.defaults.baseURL?"":(a==null?void 0:a.basePath)??s)+e.url};return n.request(o)}},iv=function(e){return{addApp:async(t,r,a,n={})=>{m("addApp","cell",t),m("addApp","app",r);const s="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.completionTimeout=a),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(r,l,e),{url:A(o),options:l}},clearApps:async(t,r,a={})=>{m("clearApps","cell",t);const n="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),r!==void 0&&(c.completionTimeout=r),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},deleteApp:async(t,r,a,n={})=>{m("deleteApp","cell",t),m("deleteApp","app",r);const s="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.completionTimeout=a),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},getApp:async(t,r,a={})=>{m("getApp","cell",t),m("getApp","app",r);const n="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},listApps:async(t,r={})=>{m("listApps","cell",t);const a="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},updateApp:async(t,r,a,n,s={})=>{m("updateApp","cell",t),m("updateApp","app",r),m("updateApp","app2",a);const o="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},d={},u={};V(c,e),await R(d,e),n!==void 0&&(u.completionTimeout=n),d["Content-Type"]="application/json",_(i,u);let p=l&&l.headers?l.headers:{};return c.headers={...d,...p,...s.headers},c.data=oe(a,c,e),{url:A(i),options:c}}}},Ir=function(e){const t=iv(e);return{async addApp(r,a,n,s){var c,d;const o=await t.addApp(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async clearApps(r,a,n){var l,c;const s=await t.clearApps(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ApplicationApi.clearApps"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async deleteApp(r,a,n,s){var c,d;const o=await t.deleteApp(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async getApp(r,a,n){var l,c;const s=await t.getApp(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ApplicationApi.getApp"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async listApps(r,a){var i,l;const n=await t.listApps(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["ApplicationApi.listApps"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async updateApp(r,a,n,s,o){var d,u;const i=await t.updateApp(r,a,n,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(u=(d=C["ApplicationApi.updateApp"])==null?void 0:d[l])==null?void 0:u.url;return(p,f)=>T(i,O,w,e)(p,c||f)}}};class al extends Pe{addApp(t,r,a,n){return Ir(this.configuration).addApp(t,r,a,n).then(s=>s(this.axios,this.basePath))}clearApps(t,r,a){return Ir(this.configuration).clearApps(t,r,a).then(n=>n(this.axios,this.basePath))}deleteApp(t,r,a,n){return Ir(this.configuration).deleteApp(t,r,a,n).then(s=>s(this.axios,this.basePath))}getApp(t,r,a){return Ir(this.configuration).getApp(t,r,a).then(n=>n(this.axios,this.basePath))}listApps(t,r){return Ir(this.configuration).listApps(t,r).then(a=>a(this.axios,this.basePath))}updateApp(t,r,a,n,s){return Ir(this.configuration).updateApp(t,r,a,n,s).then(o=>o(this.axios,this.basePath))}}const lv=function(e){return{deleteCell:async(t,r,a={})=>{m("deleteCell","cell",t);const n="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),r!==void 0&&(c.completionTimeout=r),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},deployCell:async(t,r,a={})=>{m("deployCell","cell",t);const n="/cells",s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...a},l={},c={};V(i,e),await R(l,e),r!==void 0&&(c.completionTimeout=r),l["Content-Type"]="application/json",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(t,i,e),{url:A(s),options:i}},getCell:async(t,r={})=>{m("getCell","cell",t);const a="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},getCellStatus:async(t,r={})=>{m("getCellStatus","cell",t);const a="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},listCells:async(t={})=>{const r="/cells",a=new URL(r,P);let n;e&&(n=e.baseOptions);const s={method:"GET",...n,...t},o={},i={};V(s,e),await R(o,e),_(a,i);let l=n&&n.headers?n.headers:{};return s.headers={...o,...l,...t.headers},{url:A(a),options:s}},updateCell:async(t,r,a,n={})=>{m("updateCell","cell",t),m("updateCell","cell2",r);const s="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.completionTimeout=a),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(r,l,e),{url:A(o),options:l}}}},Mr=function(e){const t=lv(e);return{async deleteCell(r,a,n){var l,c;const s=await t.deleteCell(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["CellApi.deleteCell"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async deployCell(r,a,n){var l,c;const s=await t.deployCell(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["CellApi.deployCell"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getCell(r,a){var i,l;const n=await t.getCell(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["CellApi.getCell"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async getCellStatus(r,a){var i,l;const n=await t.getCellStatus(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["CellApi.getCellStatus"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async listCells(r){var o,i;const a=await t.listCells(r),n=(e==null?void 0:e.serverIndex)??0,s=(i=(o=C["CellApi.listCells"])==null?void 0:o[n])==null?void 0:i.url;return(l,c)=>T(a,O,w,e)(l,s||c)},async updateCell(r,a,n,s){var c,d;const o=await t.updateCell(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)}}};class cv extends Pe{deleteCell(t,r,a){return Mr(this.configuration).deleteCell(t,r,a).then(n=>n(this.axios,this.basePath))}deployCell(t,r,a){return Mr(this.configuration).deployCell(t,r,a).then(n=>n(this.axios,this.basePath))}getCell(t,r){return Mr(this.configuration).getCell(t,r).then(a=>a(this.axios,this.basePath))}getCellStatus(t,r){return Mr(this.configuration).getCellStatus(t,r).then(a=>a(this.axios,this.basePath))}listCells(t){return Mr(this.configuration).listCells(t).then(r=>r(this.axios,this.basePath))}updateCell(t,r,a,n){return Mr(this.configuration).updateCell(t,r,a,n).then(s=>s(this.axios,this.basePath))}}const dv=function(e){return{addRobotController:async(t,r,a,n={})=>{m("addRobotController","cell",t),m("addRobotController","robotController",r);const s="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.completionTimeout=a),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(r,l,e),{url:A(o),options:l}},clearRobotControllers:async(t,r,a={})=>{m("clearRobotControllers","cell",t);const n="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),r!==void 0&&(c.completionTimeout=r),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},deleteRobotController:async(t,r,a,n={})=>{m("deleteRobotController","cell",t),m("deleteRobotController","controller",r);const s="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.completionTimeout=a),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},getCurrentRobotControllerState:async(t,r,a={})=>{m("getCurrentRobotControllerState","cell",t),m("getCurrentRobotControllerState","controller",r);const n="/cells/{cell}/controllers/{controller}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getMode:async(t,r,a={})=>{m("getMode","cell",t),m("getMode","controller",r);const n="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getRobotController:async(t,r,a={})=>{m("getRobotController","cell",t),m("getRobotController","controller",r);const n="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getSupportedModes:async(t,r,a={})=>{m("getSupportedModes","cell",t),m("getSupportedModes","controller",r);const n="/cells/{cell}/controllers/{controller}/controller-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getVirtualRobotConfiguration:async(t,r,a={})=>{m("getVirtualRobotConfiguration","cell",t),m("getVirtualRobotConfiguration","controller",r);const n="/cells/{cell}/controllers/{controller}/virtual-robot-configuration".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},listControllers:async(t,r={})=>{m("listControllers","cell",t);const a="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},setDefaultMode:async(t,r,a,n={})=>{m("setDefaultMode","cell",t),m("setDefaultMode","controller",r),m("setDefaultMode","mode",a);const s="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.mode=a),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},streamFreeDrive:async(t,r,a,n={})=>{m("streamFreeDrive","cell",t),m("streamFreeDrive","controller",r);const s="/cells/{cell}/controllers/{controller}/free-drive-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.response_rate=a),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},streamModeChange:async(t,r,a={})=>{m("streamModeChange","cell",t),m("streamModeChange","controller",r);const n="/cells/{cell}/controllers/{controller}/mode-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},streamRobotControllerState:async(t,r,a,n={})=>{m("streamRobotControllerState","cell",t),m("streamRobotControllerState","controller",r);const s="/cells/{cell}/controllers/{controller}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.response_rate=a),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},updateRobotController:async(t,r,a,n,s={})=>{m("updateRobotController","cell",t),m("updateRobotController","controller",r),m("updateRobotController","robotController",a);const o="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},d={},u={};V(c,e),await R(d,e),n!==void 0&&(u.completionTimeout=n),d["Content-Type"]="application/json",_(i,u);let p=l&&l.headers?l.headers:{};return c.headers={...d,...p,...s.headers},c.data=oe(a,c,e),{url:A(i),options:c}}}},Xe=function(e){const t=dv(e);return{async addRobotController(r,a,n,s){var c,d;const o=await t.addRobotController(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async clearRobotControllers(r,a,n){var l,c;const s=await t.clearRobotControllers(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ControllerApi.clearRobotControllers"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async deleteRobotController(r,a,n,s){var c,d;const o=await t.deleteRobotController(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async getCurrentRobotControllerState(r,a,n){var l,c;const s=await t.getCurrentRobotControllerState(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getMode(r,a,n){var l,c;const s=await t.getMode(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ControllerApi.getMode"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getRobotController(r,a,n){var l,c;const s=await t.getRobotController(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ControllerApi.getRobotController"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getSupportedModes(r,a,n){var l,c;const s=await t.getSupportedModes(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ControllerApi.getSupportedModes"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getVirtualRobotConfiguration(r,a,n){var l,c;const s=await t.getVirtualRobotConfiguration(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ControllerApi.getVirtualRobotConfiguration"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async listControllers(r,a){var i,l;const n=await t.listControllers(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["ControllerApi.listControllers"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async setDefaultMode(r,a,n,s){var c,d;const o=await t.setDefaultMode(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async streamFreeDrive(r,a,n,s){var c,d;const o=await t.streamFreeDrive(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async streamModeChange(r,a,n){var l,c;const s=await t.streamModeChange(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ControllerApi.streamModeChange"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async streamRobotControllerState(r,a,n,s){var c,d;const o=await t.streamRobotControllerState(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["ControllerApi.streamRobotControllerState"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async updateRobotController(r,a,n,s,o){var d,u;const i=await t.updateRobotController(r,a,n,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(u=(d=C["ControllerApi.updateRobotController"])==null?void 0:d[l])==null?void 0:u.url;return(p,f)=>T(i,O,w,e)(p,c||f)}}};class uv extends Pe{addRobotController(t,r,a,n){return Xe(this.configuration).addRobotController(t,r,a,n).then(s=>s(this.axios,this.basePath))}clearRobotControllers(t,r,a){return Xe(this.configuration).clearRobotControllers(t,r,a).then(n=>n(this.axios,this.basePath))}deleteRobotController(t,r,a,n){return Xe(this.configuration).deleteRobotController(t,r,a,n).then(s=>s(this.axios,this.basePath))}getCurrentRobotControllerState(t,r,a){return Xe(this.configuration).getCurrentRobotControllerState(t,r,a).then(n=>n(this.axios,this.basePath))}getMode(t,r,a){return Xe(this.configuration).getMode(t,r,a).then(n=>n(this.axios,this.basePath))}getRobotController(t,r,a){return Xe(this.configuration).getRobotController(t,r,a).then(n=>n(this.axios,this.basePath))}getSupportedModes(t,r,a){return Xe(this.configuration).getSupportedModes(t,r,a).then(n=>n(this.axios,this.basePath))}getVirtualRobotConfiguration(t,r,a){return Xe(this.configuration).getVirtualRobotConfiguration(t,r,a).then(n=>n(this.axios,this.basePath))}listControllers(t,r){return Xe(this.configuration).listControllers(t,r).then(a=>a(this.axios,this.basePath))}setDefaultMode(t,r,a,n){return Xe(this.configuration).setDefaultMode(t,r,a,n).then(s=>s(this.axios,this.basePath))}streamFreeDrive(t,r,a,n){return Xe(this.configuration).streamFreeDrive(t,r,a,n).then(s=>s(this.axios,this.basePath))}streamModeChange(t,r,a){return Xe(this.configuration).streamModeChange(t,r,a).then(n=>n(this.axios,this.basePath))}streamRobotControllerState(t,r,a,n){return Xe(this.configuration).streamRobotControllerState(t,r,a,n).then(s=>s(this.axios,this.basePath))}updateRobotController(t,r,a,n,s){return Xe(this.configuration).updateRobotController(t,r,a,n,s).then(o=>o(this.axios,this.basePath))}}const pv=function(e){return{listIODescriptions:async(t,r,a,n={})=>{m("listIODescriptions","cell",t),m("listIODescriptions","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),a&&(d.ios=a),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},listIOValues:async(t,r,a,n={})=>{m("listIOValues","cell",t),m("listIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),a&&(d.ios=a),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},setOutputValues:async(t,r,a,n={})=>{m("setOutputValues","cell",t),m("setOutputValues","controller",r),m("setOutputValues","iOValue",a);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}},streamIOValues:async(t,r,a,n={})=>{m("streamIOValues","cell",t),m("streamIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),a&&(d.ios=a),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},waitForIOEvent:async(t,r,a,n,s,o,i,l={})=>{m("waitForIOEvent","cell",t),m("waitForIOEvent","controller",r),m("waitForIOEvent","io",a),m("waitForIOEvent","comparisonType",n);const c="/cells/{cell}/controllers/{controller}/ios/wait-for".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),d=new URL(c,P);let u;e&&(u=e.baseOptions);const p={method:"GET",...u,...l},f={},g={};V(p,e),await R(f,e),a!==void 0&&(g.io=a),n!==void 0&&(g.comparison_type=n),s!==void 0&&(g.boolean_value=s),o!==void 0&&(g.integer_value=o),i!==void 0&&(g.floating_value=i),_(d,g);let h=u&&u.headers?u.headers:{};return p.headers={...f,...h,...l.headers},{url:A(d),options:p}}}},fa=function(e){const t=pv(e);return{async listIODescriptions(r,a,n,s){var c,d;const o=await t.listIODescriptions(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["ControllerIOsApi.listIODescriptions"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async listIOValues(r,a,n,s){var c,d;const o=await t.listIOValues(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["ControllerIOsApi.listIOValues"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async setOutputValues(r,a,n,s){var c,d;const o=await t.setOutputValues(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["ControllerIOsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async streamIOValues(r,a,n,s){var c,d;const o=await t.streamIOValues(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["ControllerIOsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async waitForIOEvent(r,a,n,s,o,i,l,c){var f,g;const d=await t.waitForIOEvent(r,a,n,s,o,i,l,c),u=(e==null?void 0:e.serverIndex)??0,p=(g=(f=C["ControllerIOsApi.waitForIOEvent"])==null?void 0:f[u])==null?void 0:g.url;return(h,x)=>T(d,O,w,e)(h,p||x)}}};class hv extends Pe{listIODescriptions(t,r,a,n){return fa(this.configuration).listIODescriptions(t,r,a,n).then(s=>s(this.axios,this.basePath))}listIOValues(t,r,a,n){return fa(this.configuration).listIOValues(t,r,a,n).then(s=>s(this.axios,this.basePath))}setOutputValues(t,r,a,n){return fa(this.configuration).setOutputValues(t,r,a,n).then(s=>s(this.axios,this.basePath))}streamIOValues(t,r,a,n){return fa(this.configuration).streamIOValues(t,r,a,n).then(s=>s(this.axios,this.basePath))}waitForIOEvent(t,r,a,n,s,o,i,l){return fa(this.configuration).waitForIOEvent(t,r,a,n,s,o,i,l).then(c=>c(this.axios,this.basePath))}}const mv=function(e){return{addCoordinateSystem:async(t,r,a={})=>{m("addCoordinateSystem","cell",t),m("addCoordinateSystem","addRequest",r);const n="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...a},l={},c={};V(i,e),await R(l,e),l["Content-Type"]="application/json",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(r,i,e),{url:A(s),options:i}},deleteCoordinateSystem:async(t,r,a={})=>{m("deleteCoordinateSystem","cell",t),m("deleteCoordinateSystem","coordinateSystem",r);const n="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getCoordinateSystem:async(t,r,a,n={})=>{m("getCoordinateSystem","cell",t),m("getCoordinateSystem","coordinateSystem",r);const s="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.rotation_type=a),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},listCoordinateSystems:async(t,r,a={})=>{m("listCoordinateSystems","cell",t);const n="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),r!==void 0&&(c.rotation_type=r),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},transformInCoordinateSystem:async(t,r,a,n={})=>{m("transformInCoordinateSystem","cell",t),m("transformInCoordinateSystem","coordinateSystem",r),m("transformInCoordinateSystem","pose",a);const s="/cells/{cell}/coordinate-systems/{coordinate-system}/transform".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}}}},ga=function(e){const t=mv(e);return{async addCoordinateSystem(r,a,n){var l,c;const s=await t.addCoordinateSystem(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["CoordinateSystemsApi.addCoordinateSystem"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async deleteCoordinateSystem(r,a,n){var l,c;const s=await t.deleteCoordinateSystem(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["CoordinateSystemsApi.deleteCoordinateSystem"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getCoordinateSystem(r,a,n,s){var c,d;const o=await t.getCoordinateSystem(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["CoordinateSystemsApi.getCoordinateSystem"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async listCoordinateSystems(r,a,n){var l,c;const s=await t.listCoordinateSystems(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["CoordinateSystemsApi.listCoordinateSystems"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async transformInCoordinateSystem(r,a,n,s){var c,d;const o=await t.transformInCoordinateSystem(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["CoordinateSystemsApi.transformInCoordinateSystem"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)}}};class fv extends Pe{addCoordinateSystem(t,r,a){return ga(this.configuration).addCoordinateSystem(t,r,a).then(n=>n(this.axios,this.basePath))}deleteCoordinateSystem(t,r,a){return ga(this.configuration).deleteCoordinateSystem(t,r,a).then(n=>n(this.axios,this.basePath))}getCoordinateSystem(t,r,a,n){return ga(this.configuration).getCoordinateSystem(t,r,a,n).then(s=>s(this.axios,this.basePath))}listCoordinateSystems(t,r,a){return ga(this.configuration).listCoordinateSystems(t,r,a).then(n=>n(this.axios,this.basePath))}transformInCoordinateSystem(t,r,a,n){return ga(this.configuration).transformInCoordinateSystem(t,r,a,n).then(s=>s(this.axios,this.basePath))}}const gv=function(e){return{clearDevices:async(t,r={})=>{m("clearDevices","cell",t);const a="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"DELETE",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},createDevice:async(t,r,a={})=>{m("createDevice","cell",t),m("createDevice","createDeviceRequestInner",r);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...a},l={},c={};V(i,e),await R(l,e),l["Content-Type"]="application/json",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(r,i,e),{url:A(s),options:i}},deleteDevice:async(t,r,a={})=>{m("deleteDevice","cell",t),m("deleteDevice","identifier",r);const n="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getDevice:async(t,r,a={})=>{m("getDevice","cell",t),m("getDevice","identifier",r);const n="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},listDevices:async(t,r={})=>{m("listDevices","cell",t);const a="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}}}},ya=function(e){const t=gv(e);return{async clearDevices(r,a){var i,l;const n=await t.clearDevices(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["DeviceConfigurationApi.clearDevices"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async createDevice(r,a,n){var l,c;const s=await t.createDevice(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["DeviceConfigurationApi.createDevice"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async deleteDevice(r,a,n){var l,c;const s=await t.deleteDevice(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["DeviceConfigurationApi.deleteDevice"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getDevice(r,a,n){var l,c;const s=await t.getDevice(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["DeviceConfigurationApi.getDevice"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async listDevices(r,a){var i,l;const n=await t.listDevices(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["DeviceConfigurationApi.listDevices"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)}}};class yv extends Pe{clearDevices(t,r){return ya(this.configuration).clearDevices(t,r).then(a=>a(this.axios,this.basePath))}createDevice(t,r,a){return ya(this.configuration).createDevice(t,r,a).then(n=>n(this.axios,this.basePath))}deleteDevice(t,r,a){return ya(this.configuration).deleteDevice(t,r,a).then(n=>n(this.axios,this.basePath))}getDevice(t,r,a){return ya(this.configuration).getDevice(t,r,a).then(n=>n(this.axios,this.basePath))}listDevices(t,r){return ya(this.configuration).listDevices(t,r).then(a=>a(this.axios,this.basePath))}}const bv=function(e){return{createProgram:async(t,r,a,n={})=>{m("createProgram","cell",t),m("createProgram","body",r);const s="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.name=a),c["Content-Type"]="text/plain",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(r,l,e),{url:A(o),options:l}},deleteProgram:async(t,r,a={})=>{m("deleteProgram","cell",t),m("deleteProgram","program",r);const n="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},deleteProgramList:async(t,r,a={})=>{m("deleteProgramList","cell",t),m("deleteProgramList","programIds",r);const n="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),r&&(c.program_ids=r),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getProgram:async(t,r,a={})=>{m("getProgram","cell",t),m("getProgram","program",r);const n="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},updateProgram:async(t,r,a,n={})=>{m("updateProgram","cell",t),m("updateProgram","program",r),m("updateProgram","body",a);const s="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="text/plain",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}}}},ba=function(e){const t=bv(e);return{async createProgram(r,a,n,s){var c,d;const o=await t.createProgram(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["LibraryProgramApi.createProgram"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async deleteProgram(r,a,n){var l,c;const s=await t.deleteProgram(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["LibraryProgramApi.deleteProgram"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async deleteProgramList(r,a,n){var l,c;const s=await t.deleteProgramList(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["LibraryProgramApi.deleteProgramList"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getProgram(r,a,n){var l,c;const s=await t.getProgram(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["LibraryProgramApi.getProgram"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async updateProgram(r,a,n,s){var c,d;const o=await t.updateProgram(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["LibraryProgramApi.updateProgram"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)}}};class Sv extends Pe{createProgram(t,r,a,n){return ba(this.configuration).createProgram(t,r,a,n).then(s=>s(this.axios,this.basePath))}deleteProgram(t,r,a){return ba(this.configuration).deleteProgram(t,r,a).then(n=>n(this.axios,this.basePath))}deleteProgramList(t,r,a){return ba(this.configuration).deleteProgramList(t,r,a).then(n=>n(this.axios,this.basePath))}getProgram(t,r,a){return ba(this.configuration).getProgram(t,r,a).then(n=>n(this.axios,this.basePath))}updateProgram(t,r,a,n){return ba(this.configuration).updateProgram(t,r,a,n).then(s=>s(this.axios,this.basePath))}}const vv=function(e){return{getProgramMetadata:async(t,r,a={})=>{m("getProgramMetadata","cell",t),m("getProgramMetadata","program",r);const n="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},listProgramMetadata:async(t,r,a={})=>{m("listProgramMetadata","cell",t);const n="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),r!==void 0&&(c.show_hidden=r),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},updateProgramMetadata:async(t,r,a,n={})=>{m("updateProgramMetadata","cell",t),m("updateProgramMetadata","program",r),m("updateProgramMetadata","updateProgramMetadataRequest",a);const s="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}},uploadProgramMetadataImage:async(t,r,a,n={})=>{m("uploadProgramMetadataImage","cell",t),m("uploadProgramMetadataImage","program",r),m("uploadProgramMetadataImage","file",a);const s="/cells/{cell}/store/programs/{program}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...n},c={},d={},u=new(e&&e.formDataCtor||FormData);V(l,e),await R(c,e),a!==void 0&&u.append("file",a),c["Content-Type"]="multipart/form-data",_(o,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=u,{url:A(o),options:l}}}},Ka=function(e){const t=vv(e);return{async getProgramMetadata(r,a,n){var l,c;const s=await t.getProgramMetadata(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["LibraryProgramMetadataApi.getProgramMetadata"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async listProgramMetadata(r,a,n){var l,c;const s=await t.listProgramMetadata(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["LibraryProgramMetadataApi.listProgramMetadata"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async updateProgramMetadata(r,a,n,s){var c,d;const o=await t.updateProgramMetadata(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["LibraryProgramMetadataApi.updateProgramMetadata"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async uploadProgramMetadataImage(r,a,n,s){var c,d;const o=await t.uploadProgramMetadataImage(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["LibraryProgramMetadataApi.uploadProgramMetadataImage"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)}}};class xv extends Pe{getProgramMetadata(t,r,a){return Ka(this.configuration).getProgramMetadata(t,r,a).then(n=>n(this.axios,this.basePath))}listProgramMetadata(t,r,a){return Ka(this.configuration).listProgramMetadata(t,r,a).then(n=>n(this.axios,this.basePath))}updateProgramMetadata(t,r,a,n){return Ka(this.configuration).updateProgramMetadata(t,r,a,n).then(s=>s(this.axios,this.basePath))}uploadProgramMetadataImage(t,r,a,n){return Ka(this.configuration).uploadProgramMetadataImage(t,r,a,n).then(s=>s(this.axios,this.basePath))}}const Ov=function(e){return{createRecipe:async(t,r,a,n,s={})=>{m("createRecipe","cell",t),m("createRecipe","programId",r),m("createRecipe","body",a);const o="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"POST",...l,...s},d={},u={};V(c,e),await R(d,e),r!==void 0&&(u.program_id=r),n!==void 0&&(u.name=n),d["Content-Type"]="application/json",_(i,u);let p=l&&l.headers?l.headers:{};return c.headers={...d,...p,...s.headers},c.data=oe(a,c,e),{url:A(i),options:c}},deleteRecipe:async(t,r,a={})=>{m("deleteRecipe","cell",t),m("deleteRecipe","recipe",r);const n="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},deleteRecipeList:async(t,r,a={})=>{m("deleteRecipeList","cell",t),m("deleteRecipeList","recipeIds",r);const n="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),r&&(c.recipe_ids=r),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getRecipe:async(t,r,a={})=>{m("getRecipe","cell",t),m("getRecipe","recipe",r);const n="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},updateRecipe:async(t,r,a,n={})=>{m("updateRecipe","cell",t),m("updateRecipe","recipe",r),m("updateRecipe","body",a);const s="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}}}},Sa=function(e){const t=Ov(e);return{async createRecipe(r,a,n,s,o){var d,u;const i=await t.createRecipe(r,a,n,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(u=(d=C["LibraryRecipeApi.createRecipe"])==null?void 0:d[l])==null?void 0:u.url;return(p,f)=>T(i,O,w,e)(p,c||f)},async deleteRecipe(r,a,n){var l,c;const s=await t.deleteRecipe(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["LibraryRecipeApi.deleteRecipe"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async deleteRecipeList(r,a,n){var l,c;const s=await t.deleteRecipeList(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["LibraryRecipeApi.deleteRecipeList"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getRecipe(r,a,n){var l,c;const s=await t.getRecipe(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["LibraryRecipeApi.getRecipe"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async updateRecipe(r,a,n,s){var c,d;const o=await t.updateRecipe(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["LibraryRecipeApi.updateRecipe"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)}}};class wv extends Pe{createRecipe(t,r,a,n,s){return Sa(this.configuration).createRecipe(t,r,a,n,s).then(o=>o(this.axios,this.basePath))}deleteRecipe(t,r,a){return Sa(this.configuration).deleteRecipe(t,r,a).then(n=>n(this.axios,this.basePath))}deleteRecipeList(t,r,a){return Sa(this.configuration).deleteRecipeList(t,r,a).then(n=>n(this.axios,this.basePath))}getRecipe(t,r,a){return Sa(this.configuration).getRecipe(t,r,a).then(n=>n(this.axios,this.basePath))}updateRecipe(t,r,a,n){return Sa(this.configuration).updateRecipe(t,r,a,n).then(s=>s(this.axios,this.basePath))}}const Cv=function(e){return{getRecipeMetadata:async(t,r,a={})=>{m("getRecipeMetadata","cell",t),m("getRecipeMetadata","recipe",r);const n="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},listRecipeMetadata:async(t,r={})=>{m("listRecipeMetadata","cell",t);const a="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},updateRecipeMetadata:async(t,r,a,n={})=>{m("updateRecipeMetadata","cell",t),m("updateRecipeMetadata","recipe",r),m("updateRecipeMetadata","updateRecipeMetadataRequest",a);const s="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}},uploadRecipeMetadataImage:async(t,r,a,n={})=>{m("uploadRecipeMetadataImage","cell",t),m("uploadRecipeMetadataImage","recipe",r),m("uploadRecipeMetadataImage","file",a);const s="/cells/{cell}/store/recipes/{recipe}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...n},c={},d={},u=new(e&&e.formDataCtor||FormData);V(l,e),await R(c,e),a!==void 0&&u.append("file",a),c["Content-Type"]="multipart/form-data",_(o,d);let p=i&&i.headers?i.headers:{};return l.headers={...c,...p,...n.headers},l.data=u,{url:A(o),options:l}}}},Qa=function(e){const t=Cv(e);return{async getRecipeMetadata(r,a,n){var l,c;const s=await t.getRecipeMetadata(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["LibraryRecipeMetadataApi.getRecipeMetadata"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async listRecipeMetadata(r,a){var i,l;const n=await t.listRecipeMetadata(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["LibraryRecipeMetadataApi.listRecipeMetadata"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async updateRecipeMetadata(r,a,n,s){var c,d;const o=await t.updateRecipeMetadata(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["LibraryRecipeMetadataApi.updateRecipeMetadata"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async uploadRecipeMetadataImage(r,a,n,s){var c,d;const o=await t.uploadRecipeMetadataImage(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["LibraryRecipeMetadataApi.uploadRecipeMetadataImage"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)}}};class Pv extends Pe{getRecipeMetadata(t,r,a){return Qa(this.configuration).getRecipeMetadata(t,r,a).then(n=>n(this.axios,this.basePath))}listRecipeMetadata(t,r){return Qa(this.configuration).listRecipeMetadata(t,r).then(a=>a(this.axios,this.basePath))}updateRecipeMetadata(t,r,a,n){return Qa(this.configuration).updateRecipeMetadata(t,r,a,n).then(s=>s(this.axios,this.basePath))}uploadRecipeMetadataImage(t,r,a,n){return Qa(this.configuration).uploadRecipeMetadataImage(t,r,a,n).then(s=>s(this.axios,this.basePath))}}const Vv=function(e){return{deleteAllMotions:async(t,r={})=>{m("deleteAllMotions","cell",t);const a="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"DELETE",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},deleteMotion:async(t,r,a={})=>{m("deleteMotion","cell",t),m("deleteMotion","motion",r);const n="/cells/{cell}/motions/{motion}/delete".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},executeTrajectory:async(t,r,a={})=>{m("executeTrajectory","cell",t),m("executeTrajectory","executeTrajectoryRequest",r);const n="/cells/{cell}/motions/executetrajectory".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),l["Content-Type"]="application/json",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(r,i,e),{url:A(s),options:i}},getMotionTrajectory:async(t,r,a,n,s={})=>{m("getMotionTrajectory","cell",t),m("getMotionTrajectory","motion",r),m("getMotionTrajectory","sampleTime",a);const o="/cells/{cell}/motions/{motion}/trajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},d={},u={};V(c,e),await R(d,e),a!==void 0&&(u.sample_time=a),n!==void 0&&(u.responses_coordinate_system=n),_(i,u);let p=l&&l.headers?l.headers:{};return c.headers={...d,...p,...s.headers},{url:A(i),options:c}},getMotionTrajectorySample:async(t,r,a,n,s={})=>{m("getMotionTrajectorySample","cell",t),m("getMotionTrajectorySample","motion",r);const o="/cells/{cell}/motions/{motion}/trajectorysample".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},d={},u={};V(c,e),await R(d,e),a!==void 0&&(u.location_on_trajectory=a),n!==void 0&&(u.response_coordinate_system=n),_(i,u);let p=l&&l.headers?l.headers:{};return c.headers={...d,...p,...s.headers},{url:A(i),options:c}},getPlannedMotion:async(t,r,a,n={})=>{m("getPlannedMotion","cell",t),m("getPlannedMotion","motion",r);const s="/cells/{cell}/motions/{motion}/planned-motion".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.sample_time=a),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},getPlanningMotionGroupModels:async(t,r={})=>{m("getPlanningMotionGroupModels","cell",t);const a="/cells/{cell}/motion-planning/motion-group-models".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},listMotions:async(t,r={})=>{m("listMotions","cell",t);const a="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},loadPlannedMotion:async(t,r,a={})=>{m("loadPlannedMotion","cell",t),m("loadPlannedMotion","plannedMotion",r);const n="/cells/{cell}/planned-motions".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...a},l={},c={};V(i,e),await R(l,e),l["Content-Type"]="application/json",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(r,i,e),{url:A(s),options:i}},planCollisionFreePTP:async(t,r,a={})=>{m("planCollisionFreePTP","cell",t);const n="/cells/{cell}/motion-planning/plan-collision-free-ptp".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...a},l={},c={};V(i,e),await R(l,e),l["Content-Type"]="application/json",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(r,i,e),{url:A(s),options:i}},planMotion:async(t,r,a={})=>{m("planMotion","cell",t),m("planMotion","planRequest",r);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...a},l={},c={};V(i,e),await R(l,e),l["Content-Type"]="application/json",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(r,i,e),{url:A(s),options:i}},planTrajectory:async(t,r,a={})=>{m("planTrajectory","cell",t);const n="/cells/{cell}/motion-planning/plan-trajectory".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...a},l={},c={};V(i,e),await R(l,e),l["Content-Type"]="application/json",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(r,i,e),{url:A(s),options:i}},stopExecution:async(t,r,a={})=>{m("stopExecution","cell",t),m("stopExecution","motion",r);const n="/cells/{cell}/motions/{motion}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},streamMove:async(t,r,a={})=>{m("streamMove","cell",t),m("streamMove","streamMoveRequest",r);const n="/cells/{cell}/motions/streammove".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),l["Content-Type"]="application/json",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(r,i,e),{url:A(s),options:i}},streamMoveBackward:async(t,r,a,n,s,o,i={})=>{m("streamMoveBackward","cell",t),m("streamMoveBackward","motion",r),m("streamMoveBackward","playbackSpeedInPercent",a);const l="/cells/{cell}/motions/{motion}/executebackward".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),c=new URL(l,P);let d;e&&(d=e.baseOptions);const u={method:"GET",...d,...i},p={},f={};V(u,e),await R(p,e),a!==void 0&&(f.playback_speed_in_percent=a),n!==void 0&&(f.response_rate=n),s!==void 0&&(f.response_coordinate_system=s),o!==void 0&&(f.start_location_on_trajectory=o),_(c,f);let g=d&&d.headers?d.headers:{};return u.headers={...p,...g,...i.headers},{url:A(c),options:u}},streamMoveForward:async(t,r,a,n,s,o,i={})=>{m("streamMoveForward","cell",t),m("streamMoveForward","motion",r),m("streamMoveForward","playbackSpeedInPercent",a);const l="/cells/{cell}/motions/{motion}/executeforward".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),c=new URL(l,P);let d;e&&(d=e.baseOptions);const u={method:"GET",...d,...i},p={},f={};V(u,e),await R(p,e),a!==void 0&&(f.playback_speed_in_percent=a),n!==void 0&&(f.response_rate=n),s!==void 0&&(f.response_coordinate_system=s),o!==void 0&&(f.start_location_on_trajectory=o),_(c,f);let g=d&&d.headers?d.headers:{};return u.headers={...p,...g,...i.headers},{url:A(c),options:u}},streamMoveToTrajectoryViaJointPTP:async(t,r,a,n,s,o,i,l,c,d,u={})=>{m("streamMoveToTrajectoryViaJointPTP","cell",t),m("streamMoveToTrajectoryViaJointPTP","motion",r),m("streamMoveToTrajectoryViaJointPTP","locationOnTrajectory",a);const p="/cells/{cell}/motions/{motion}/executetotrajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),f=new URL(p,P);let g;e&&(g=e.baseOptions);const h={method:"GET",...g,...u},x={},E={};V(h,e),await R(x,e),a!==void 0&&(E.location_on_trajectory=a),n&&(E["limit_override.joint_velocity_limits.joints"]=n),s&&(E["limit_override.joint_acceleration_limits.joints"]=s),o!==void 0&&(E["limit_override.tcp_velocity_limit"]=o),i!==void 0&&(E["limit_override.tcp_acceleration_limit"]=i),l!==void 0&&(E["limit_override.tcp_orientation_velocity_limit"]=l),c!==void 0&&(E["limit_override.tcp_orientation_acceleration_limit"]=c),d!==void 0&&(E.responses_coordinate_system=d),_(f,E);let U=g&&g.headers?g.headers:{};return h.headers={...x,...U,...u.headers},{url:A(f),options:h}}}},ze=function(e){const t=Vv(e);return{async deleteAllMotions(r,a){var i,l;const n=await t.deleteAllMotions(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["MotionApi.deleteAllMotions"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async deleteMotion(r,a,n){var l,c;const s=await t.deleteMotion(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionApi.deleteMotion"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async executeTrajectory(r,a,n){var l,c;const s=await t.executeTrajectory(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionApi.executeTrajectory"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getMotionTrajectory(r,a,n,s,o){var d,u;const i=await t.getMotionTrajectory(r,a,n,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(u=(d=C["MotionApi.getMotionTrajectory"])==null?void 0:d[l])==null?void 0:u.url;return(p,f)=>T(i,O,w,e)(p,c||f)},async getMotionTrajectorySample(r,a,n,s,o){var d,u;const i=await t.getMotionTrajectorySample(r,a,n,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(u=(d=C["MotionApi.getMotionTrajectorySample"])==null?void 0:d[l])==null?void 0:u.url;return(p,f)=>T(i,O,w,e)(p,c||f)},async getPlannedMotion(r,a,n,s){var c,d;const o=await t.getPlannedMotion(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["MotionApi.getPlannedMotion"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async getPlanningMotionGroupModels(r,a){var i,l;const n=await t.getPlanningMotionGroupModels(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["MotionApi.getPlanningMotionGroupModels"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async listMotions(r,a){var i,l;const n=await t.listMotions(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["MotionApi.listMotions"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async loadPlannedMotion(r,a,n){var l,c;const s=await t.loadPlannedMotion(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionApi.loadPlannedMotion"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async planCollisionFreePTP(r,a,n){var l,c;const s=await t.planCollisionFreePTP(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionApi.planCollisionFreePTP"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async planMotion(r,a,n){var l,c;const s=await t.planMotion(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionApi.planMotion"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async planTrajectory(r,a,n){var l,c;const s=await t.planTrajectory(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionApi.planTrajectory"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async stopExecution(r,a,n){var l,c;const s=await t.stopExecution(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionApi.stopExecution"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async streamMove(r,a,n){var l,c;const s=await t.streamMove(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionApi.streamMove"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async streamMoveBackward(r,a,n,s,o,i,l){var p,f;const c=await t.streamMoveBackward(r,a,n,s,o,i,l),d=(e==null?void 0:e.serverIndex)??0,u=(f=(p=C["MotionApi.streamMoveBackward"])==null?void 0:p[d])==null?void 0:f.url;return(g,h)=>T(c,O,w,e)(g,u||h)},async streamMoveForward(r,a,n,s,o,i,l){var p,f;const c=await t.streamMoveForward(r,a,n,s,o,i,l),d=(e==null?void 0:e.serverIndex)??0,u=(f=(p=C["MotionApi.streamMoveForward"])==null?void 0:p[d])==null?void 0:f.url;return(g,h)=>T(c,O,w,e)(g,u||h)},async streamMoveToTrajectoryViaJointPTP(r,a,n,s,o,i,l,c,d,u,p){var x,E;const f=await t.streamMoveToTrajectoryViaJointPTP(r,a,n,s,o,i,l,c,d,u,p),g=(e==null?void 0:e.serverIndex)??0,h=(E=(x=C["MotionApi.streamMoveToTrajectoryViaJointPTP"])==null?void 0:x[g])==null?void 0:E.url;return(U,F)=>T(f,O,w,e)(U,h||F)}}};class Rv extends Pe{deleteAllMotions(t,r){return ze(this.configuration).deleteAllMotions(t,r).then(a=>a(this.axios,this.basePath))}deleteMotion(t,r,a){return ze(this.configuration).deleteMotion(t,r,a).then(n=>n(this.axios,this.basePath))}executeTrajectory(t,r,a){return ze(this.configuration).executeTrajectory(t,r,a).then(n=>n(this.axios,this.basePath))}getMotionTrajectory(t,r,a,n,s){return ze(this.configuration).getMotionTrajectory(t,r,a,n,s).then(o=>o(this.axios,this.basePath))}getMotionTrajectorySample(t,r,a,n,s){return ze(this.configuration).getMotionTrajectorySample(t,r,a,n,s).then(o=>o(this.axios,this.basePath))}getPlannedMotion(t,r,a,n){return ze(this.configuration).getPlannedMotion(t,r,a,n).then(s=>s(this.axios,this.basePath))}getPlanningMotionGroupModels(t,r){return ze(this.configuration).getPlanningMotionGroupModels(t,r).then(a=>a(this.axios,this.basePath))}listMotions(t,r){return ze(this.configuration).listMotions(t,r).then(a=>a(this.axios,this.basePath))}loadPlannedMotion(t,r,a){return ze(this.configuration).loadPlannedMotion(t,r,a).then(n=>n(this.axios,this.basePath))}planCollisionFreePTP(t,r,a){return ze(this.configuration).planCollisionFreePTP(t,r,a).then(n=>n(this.axios,this.basePath))}planMotion(t,r,a){return ze(this.configuration).planMotion(t,r,a).then(n=>n(this.axios,this.basePath))}planTrajectory(t,r,a){return ze(this.configuration).planTrajectory(t,r,a).then(n=>n(this.axios,this.basePath))}stopExecution(t,r,a){return ze(this.configuration).stopExecution(t,r,a).then(n=>n(this.axios,this.basePath))}streamMove(t,r,a){return ze(this.configuration).streamMove(t,r,a).then(n=>n(this.axios,this.basePath))}streamMoveBackward(t,r,a,n,s,o,i){return ze(this.configuration).streamMoveBackward(t,r,a,n,s,o,i).then(l=>l(this.axios,this.basePath))}streamMoveForward(t,r,a,n,s,o,i){return ze(this.configuration).streamMoveForward(t,r,a,n,s,o,i).then(l=>l(this.axios,this.basePath))}streamMoveToTrajectoryViaJointPTP(t,r,a,n,s,o,i,l,c,d,u){return ze(this.configuration).streamMoveToTrajectoryViaJointPTP(t,r,a,n,s,o,i,l,c,d,u).then(p=>p(this.axios,this.basePath))}}const _v=function(e){return{activateAllMotionGroups:async(t,r,a={})=>{m("activateAllMotionGroups","cell",t),m("activateAllMotionGroups","controller",r);const n="/cells/{cell}/motion-groups/all".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...a},l={},c={};V(i,e),await R(l,e),r!==void 0&&(c.controller=r),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},activateMotionGroup:async(t,r,a={})=>{m("activateMotionGroup","cell",t),m("activateMotionGroup","motionGroup",r);const n="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...a},l={},c={};V(i,e),await R(l,e),r!==void 0&&(c.motion_group=r),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},deactivateMotionGroup:async(t,r,a={})=>{m("deactivateMotionGroup","cell",t),m("deactivateMotionGroup","motionGroup",r);const n="/cells/{cell}/motion-groups/{motion-group}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},listMotionGroups:async(t,r={})=>{m("listMotionGroups","cell",t);const a="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}}}},Ya=function(e){const t=_v(e);return{async activateAllMotionGroups(r,a,n){var l,c;const s=await t.activateAllMotionGroups(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionGroupApi.activateAllMotionGroups"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async activateMotionGroup(r,a,n){var l,c;const s=await t.activateMotionGroup(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionGroupApi.activateMotionGroup"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async deactivateMotionGroup(r,a,n){var l,c;const s=await t.deactivateMotionGroup(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionGroupApi.deactivateMotionGroup"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async listMotionGroups(r,a){var i,l;const n=await t.listMotionGroups(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["MotionGroupApi.listMotionGroups"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)}}};class Av extends Pe{activateAllMotionGroups(t,r,a){return Ya(this.configuration).activateAllMotionGroups(t,r,a).then(n=>n(this.axios,this.basePath))}activateMotionGroup(t,r,a){return Ya(this.configuration).activateMotionGroup(t,r,a).then(n=>n(this.axios,this.basePath))}deactivateMotionGroup(t,r,a){return Ya(this.configuration).deactivateMotionGroup(t,r,a).then(n=>n(this.axios,this.basePath))}listMotionGroups(t,r){return Ya(this.configuration).listMotionGroups(t,r).then(a=>a(this.axios,this.basePath))}}const Tv=function(e){return{getActivePayload:async(t,r,a={})=>{m("getActivePayload","cell",t),m("getActivePayload","motionGroup",r);const n="/cells/{cell}/motion-groups/{motion-group}/payloads/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getActiveTcp:async(t,r,a,n={})=>{m("getActiveTcp","cell",t),m("getActiveTcp","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/tcps/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.rotation_type=a),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},getCurrentMotionGroupState:async(t,r,a,n,s={})=>{m("getCurrentMotionGroupState","cell",t),m("getCurrentMotionGroupState","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},d={},u={};V(c,e),await R(d,e),a!==void 0&&(u.tcp=a),n!==void 0&&(u.response_coordinate_system=n),_(i,u);let p=l&&l.headers?l.headers:{};return c.headers={...d,...p,...s.headers},{url:A(i),options:c}},getInfoCapabilities:async(t,r,a={})=>{m("getInfoCapabilities","cell",t),m("getInfoCapabilities","motionGroup",r);const n="/cells/{cell}/motion-groups/{motion-group}/info-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getMotionGroupSpecification:async(t,r,a={})=>{m("getMotionGroupSpecification","cell",t),m("getMotionGroupSpecification","motionGroup",r);const n="/cells/{cell}/motion-groups/{motion-group}/specification".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getMounting:async(t,r,a={})=>{m("getMounting","cell",t),m("getMounting","motionGroup",r);const n="/cells/{cell}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getOptimizerConfiguration:async(t,r,a,n={})=>{m("getOptimizerConfiguration","cell",t),m("getOptimizerConfiguration","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/optimizer-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.tcp=a),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},getSafetySetup:async(t,r,a={})=>{m("getSafetySetup","cell",t),m("getSafetySetup","motionGroup",r);const n="/cells/{cell}/motion-groups/{motion-group}/safety-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},listPayloads:async(t,r,a={})=>{m("listPayloads","cell",t),m("listPayloads","motionGroup",r);const n="/cells/{cell}/motion-groups/{motion-group}/payloads".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},listTcps:async(t,r,a,n={})=>{m("listTcps","cell",t),m("listTcps","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.rotation_type=a),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},streamMotionGroupState:async(t,r,a,n,s,o={})=>{m("streamMotionGroupState","cell",t),m("streamMotionGroupState","motionGroup",r);const i="/cells/{cell}/motion-groups/{motion-group}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),l=new URL(i,P);let c;e&&(c=e.baseOptions);const d={method:"GET",...c,...o},u={},p={};V(d,e),await R(u,e),a!==void 0&&(p.response_rate=a),n!==void 0&&(p.response_coordinate_system=n),s!==void 0&&(p.tcp=s),_(l,p);let f=c&&c.headers?c.headers:{};return d.headers={...u,...f,...o.headers},{url:A(l),options:d}}}},pt=function(e){const t=Tv(e);return{async getActivePayload(r,a,n){var l,c;const s=await t.getActivePayload(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionGroupInfosApi.getActivePayload"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getActiveTcp(r,a,n,s){var c,d;const o=await t.getActiveTcp(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["MotionGroupInfosApi.getActiveTcp"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async getCurrentMotionGroupState(r,a,n,s,o){var d,u;const i=await t.getCurrentMotionGroupState(r,a,n,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(u=(d=C["MotionGroupInfosApi.getCurrentMotionGroupState"])==null?void 0:d[l])==null?void 0:u.url;return(p,f)=>T(i,O,w,e)(p,c||f)},async getInfoCapabilities(r,a,n){var l,c;const s=await t.getInfoCapabilities(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionGroupInfosApi.getInfoCapabilities"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getMotionGroupSpecification(r,a,n){var l,c;const s=await t.getMotionGroupSpecification(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionGroupInfosApi.getMotionGroupSpecification"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getMounting(r,a,n){var l,c;const s=await t.getMounting(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionGroupInfosApi.getMounting"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getOptimizerConfiguration(r,a,n,s){var c,d;const o=await t.getOptimizerConfiguration(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["MotionGroupInfosApi.getOptimizerConfiguration"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async getSafetySetup(r,a,n){var l,c;const s=await t.getSafetySetup(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionGroupInfosApi.getSafetySetup"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async listPayloads(r,a,n){var l,c;const s=await t.listPayloads(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionGroupInfosApi.listPayloads"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async listTcps(r,a,n,s){var c,d;const o=await t.listTcps(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["MotionGroupInfosApi.listTcps"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async streamMotionGroupState(r,a,n,s,o,i){var u,p;const l=await t.streamMotionGroupState(r,a,n,s,o,i),c=(e==null?void 0:e.serverIndex)??0,d=(p=(u=C["MotionGroupInfosApi.streamMotionGroupState"])==null?void 0:u[c])==null?void 0:p.url;return(f,g)=>T(l,O,w,e)(f,d||g)}}};class Ev extends Pe{getActivePayload(t,r,a){return pt(this.configuration).getActivePayload(t,r,a).then(n=>n(this.axios,this.basePath))}getActiveTcp(t,r,a,n){return pt(this.configuration).getActiveTcp(t,r,a,n).then(s=>s(this.axios,this.basePath))}getCurrentMotionGroupState(t,r,a,n,s){return pt(this.configuration).getCurrentMotionGroupState(t,r,a,n,s).then(o=>o(this.axios,this.basePath))}getInfoCapabilities(t,r,a){return pt(this.configuration).getInfoCapabilities(t,r,a).then(n=>n(this.axios,this.basePath))}getMotionGroupSpecification(t,r,a){return pt(this.configuration).getMotionGroupSpecification(t,r,a).then(n=>n(this.axios,this.basePath))}getMounting(t,r,a){return pt(this.configuration).getMounting(t,r,a).then(n=>n(this.axios,this.basePath))}getOptimizerConfiguration(t,r,a,n){return pt(this.configuration).getOptimizerConfiguration(t,r,a,n).then(s=>s(this.axios,this.basePath))}getSafetySetup(t,r,a){return pt(this.configuration).getSafetySetup(t,r,a).then(n=>n(this.axios,this.basePath))}listPayloads(t,r,a){return pt(this.configuration).listPayloads(t,r,a).then(n=>n(this.axios,this.basePath))}listTcps(t,r,a,n){return pt(this.configuration).listTcps(t,r,a,n).then(s=>s(this.axios,this.basePath))}streamMotionGroupState(t,r,a,n,s,o){return pt(this.configuration).streamMotionGroupState(t,r,a,n,s,o).then(i=>i(this.axios,this.basePath))}}const Iv=function(e){return{directionJogging:async(t,r,a={})=>{m("directionJogging","cell",t),m("directionJogging","directionJoggingRequest",r);const n="/cells/{cell}/motion-groups/move-tcp".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),l["Content-Type"]="application/json",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(r,i,e),{url:A(s),options:i}},getJoggingCapabilities:async(t,r,a={})=>{m("getJoggingCapabilities","cell",t),m("getJoggingCapabilities","motionGroup",r);const n="/cells/{cell}/motion-groups/{motion-group}/jogging-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},jointJogging:async(t,r,a={})=>{m("jointJogging","cell",t),m("jointJogging","jointJoggingRequest",r);const n="/cells/{cell}/motion-groups/move-joint".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),l["Content-Type"]="application/json",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(r,i,e),{url:A(s),options:i}},stopJogging:async(t,r,a={})=>{m("stopJogging","cell",t),m("stopJogging","motionGroup",r);const n="/cells/{cell}/motion-groups/{motion-group}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}}}},Xa=function(e){const t=Iv(e);return{async directionJogging(r,a,n){var l,c;const s=await t.directionJogging(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionGroupJoggingApi.directionJogging"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getJoggingCapabilities(r,a,n){var l,c;const s=await t.getJoggingCapabilities(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionGroupJoggingApi.getJoggingCapabilities"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async jointJogging(r,a,n){var l,c;const s=await t.jointJogging(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionGroupJoggingApi.jointJogging"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async stopJogging(r,a,n){var l,c;const s=await t.stopJogging(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionGroupJoggingApi.stopJogging"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)}}};class Mv extends Pe{directionJogging(t,r,a){return Xa(this.configuration).directionJogging(t,r,a).then(n=>n(this.axios,this.basePath))}getJoggingCapabilities(t,r,a){return Xa(this.configuration).getJoggingCapabilities(t,r,a).then(n=>n(this.axios,this.basePath))}jointJogging(t,r,a){return Xa(this.configuration).jointJogging(t,r,a).then(n=>n(this.axios,this.basePath))}stopJogging(t,r,a){return Xa(this.configuration).stopJogging(t,r,a).then(n=>n(this.axios,this.basePath))}}const jv=function(e){return{calculateAllInverseKinematic:async(t,r,a,n={})=>{m("calculateAllInverseKinematic","cell",t),m("calculateAllInverseKinematic","motionGroup",r),m("calculateAllInverseKinematic","allJointPositionsRequest",a);const s="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-all-joint-positions".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}},calculateForwardKinematic:async(t,r,a,n={})=>{m("calculateForwardKinematic","cell",t),m("calculateForwardKinematic","motionGroup",r),m("calculateForwardKinematic","tcpPoseRequest",a);const s="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-tcp-pose".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}},calculateInverseKinematic:async(t,r,a,n={})=>{m("calculateInverseKinematic","cell",t),m("calculateInverseKinematic","motionGroup",r),m("calculateInverseKinematic","jointPositionRequest",a);const s="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-joint-position".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}},getKinematicCapabilities:async(t,r,a={})=>{m("getKinematicCapabilities","cell",t),m("getKinematicCapabilities","motionGroup",r);const n="/cells/{cell}/motion-groups/{motion-group}/kinematic-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}}}},Za=function(e){const t=jv(e);return{async calculateAllInverseKinematic(r,a,n,s){var c,d;const o=await t.calculateAllInverseKinematic(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["MotionGroupKinematicApi.calculateAllInverseKinematic"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async calculateForwardKinematic(r,a,n,s){var c,d;const o=await t.calculateForwardKinematic(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["MotionGroupKinematicApi.calculateForwardKinematic"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async calculateInverseKinematic(r,a,n,s){var c,d;const o=await t.calculateInverseKinematic(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["MotionGroupKinematicApi.calculateInverseKinematic"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async getKinematicCapabilities(r,a,n){var l,c;const s=await t.getKinematicCapabilities(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["MotionGroupKinematicApi.getKinematicCapabilities"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)}}};class $v extends Pe{calculateAllInverseKinematic(t,r,a,n){return Za(this.configuration).calculateAllInverseKinematic(t,r,a,n).then(s=>s(this.axios,this.basePath))}calculateForwardKinematic(t,r,a,n){return Za(this.configuration).calculateForwardKinematic(t,r,a,n).then(s=>s(this.axios,this.basePath))}calculateInverseKinematic(t,r,a,n){return Za(this.configuration).calculateInverseKinematic(t,r,a,n).then(s=>s(this.axios,this.basePath))}getKinematicCapabilities(t,r,a){return Za(this.configuration).getKinematicCapabilities(t,r,a).then(n=>n(this.axios,this.basePath))}}const Uv=function(e){return{createProgramRunner:async(t,r,a={})=>{m("createProgramRunner","cell",t),m("createProgramRunner","request",r);const n="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...a},l={},c={};V(i,e),await R(l,e),l["Content-Type"]="text/plain",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(r,i,e),{url:A(s),options:i}},executeProgram:async(t,r,a={})=>{m("executeProgram","cell",t),m("executeProgram","codeWithArguments",r);const n="/cells/{cell}/programs/execute".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...a},l={},c={};V(i,e),await R(l,e),l["Content-Type"]="application/json",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(r,i,e),{url:A(s),options:i}},getProgramRunner:async(t,r,a={})=>{m("getProgramRunner","cell",t),m("getProgramRunner","runner",r);const n="/cells/{cell}/programs/runners/{runner}".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},listProgramRunners:async(t,r={})=>{m("listProgramRunners","cell",t);const a="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},migrateProgram:async(t,r,a={})=>{m("migrateProgram","cell",t),m("migrateProgram","request1",r);const n="/cells/{cell}/programs/migrate".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...a},l={},c={};V(i,e),await R(l,e),l["Content-Type"]="text/plain",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(r,i,e),{url:A(s),options:i}},planProgram:async(t,r,a,n={})=>{m("planProgram","cell",t),m("planProgram","request",r);const s="/cells/{cell}/programs/plan".replace("{cell}",encodeURIComponent(String(t))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.identifier=a),c["Content-Type"]="text/plain",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(r,l,e),{url:A(o),options:l}},stopAllProgramRunner:async(t,r={})=>{m("stopAllProgramRunner","cell",t);const a="/cells/{cell}/programs/runners/stop".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"POST",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},stopProgramRunner:async(t,r,a={})=>{m("stopProgramRunner","cell",t),m("stopProgramRunner","runner",r);const n="/cells/{cell}/programs/runners/{runner}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}}}},Jt=function(e){const t=Uv(e);return{async createProgramRunner(r,a,n){var l,c;const s=await t.createProgramRunner(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ProgramApi.createProgramRunner"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async executeProgram(r,a,n){var l,c;const s=await t.executeProgram(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ProgramApi.executeProgram"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getProgramRunner(r,a,n){var l,c;const s=await t.getProgramRunner(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ProgramApi.getProgramRunner"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async listProgramRunners(r,a){var i,l;const n=await t.listProgramRunners(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["ProgramApi.listProgramRunners"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async migrateProgram(r,a,n){var l,c;const s=await t.migrateProgram(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ProgramApi.migrateProgram"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async planProgram(r,a,n,s){var c,d;const o=await t.planProgram(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["ProgramApi.planProgram"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async stopAllProgramRunner(r,a){var i,l;const n=await t.stopAllProgramRunner(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["ProgramApi.stopAllProgramRunner"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async stopProgramRunner(r,a,n){var l,c;const s=await t.stopProgramRunner(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ProgramApi.stopProgramRunner"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)}}};class Lv extends Pe{createProgramRunner(t,r,a){return Jt(this.configuration).createProgramRunner(t,r,a).then(n=>n(this.axios,this.basePath))}executeProgram(t,r,a){return Jt(this.configuration).executeProgram(t,r,a).then(n=>n(this.axios,this.basePath))}getProgramRunner(t,r,a){return Jt(this.configuration).getProgramRunner(t,r,a).then(n=>n(this.axios,this.basePath))}listProgramRunners(t,r){return Jt(this.configuration).listProgramRunners(t,r).then(a=>a(this.axios,this.basePath))}migrateProgram(t,r,a){return Jt(this.configuration).migrateProgram(t,r,a).then(n=>n(this.axios,this.basePath))}planProgram(t,r,a,n){return Jt(this.configuration).planProgram(t,r,a,n).then(s=>s(this.axios,this.basePath))}stopAllProgramRunner(t,r){return Jt(this.configuration).stopAllProgramRunner(t,r).then(a=>a(this.axios,this.basePath))}stopProgramRunner(t,r,a){return Jt(this.configuration).stopProgramRunner(t,r,a).then(n=>n(this.axios,this.basePath))}}const kv=function(e){return{clearProgramsValues:async(t,r={})=>{m("clearProgramsValues","cell",t);const a="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"DELETE",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},createProgramsValue:async(t,r,a={})=>{m("createProgramsValue","cell",t),m("createProgramsValue","requestBody",r);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"POST",...o,...a},l={},c={};V(i,e),await R(l,e),l["Content-Type"]="application/json",_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},i.data=oe(r,i,e),{url:A(s),options:i}},deleteProgramValue:async(t,r,a={})=>{m("deleteProgramValue","cell",t),m("deleteProgramValue","key",r);const n="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getProgramValue:async(t,r,a={})=>{m("getProgramValue","cell",t),m("getProgramValue","key",r);const n="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},listProgramsValues:async(t,r={})=>{m("listProgramsValues","cell",t);const a="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},updateProgramValue:async(t,r,a,n={})=>{m("updateProgramValue","cell",t),m("updateProgramValue","key",r),m("updateProgramValue","value",a);const s="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}}}},jr=function(e){const t=kv(e);return{async clearProgramsValues(r,a){var i,l;const n=await t.clearProgramsValues(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["ProgramValuesApi.clearProgramsValues"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async createProgramsValue(r,a,n){var l,c;const s=await t.createProgramsValue(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ProgramValuesApi.createProgramsValue"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async deleteProgramValue(r,a,n){var l,c;const s=await t.deleteProgramValue(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ProgramValuesApi.deleteProgramValue"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getProgramValue(r,a,n){var l,c;const s=await t.getProgramValue(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["ProgramValuesApi.getProgramValue"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async listProgramsValues(r,a){var i,l;const n=await t.listProgramsValues(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["ProgramValuesApi.listProgramsValues"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async updateProgramValue(r,a,n,s){var c,d;const o=await t.updateProgramValue(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["ProgramValuesApi.updateProgramValue"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)}}};class Bv extends Pe{clearProgramsValues(t,r){return jr(this.configuration).clearProgramsValues(t,r).then(a=>a(this.axios,this.basePath))}createProgramsValue(t,r,a){return jr(this.configuration).createProgramsValue(t,r,a).then(n=>n(this.axios,this.basePath))}deleteProgramValue(t,r,a){return jr(this.configuration).deleteProgramValue(t,r,a).then(n=>n(this.axios,this.basePath))}getProgramValue(t,r,a){return jr(this.configuration).getProgramValue(t,r,a).then(n=>n(this.axios,this.basePath))}listProgramsValues(t,r){return jr(this.configuration).listProgramsValues(t,r).then(a=>a(this.axios,this.basePath))}updateProgramValue(t,r,a,n){return jr(this.configuration).updateProgramValue(t,r,a,n).then(s=>s(this.axios,this.basePath))}}const Fv=function(e){return{deleteStoredCollider:async(t,r,a={})=>{m("deleteStoredCollider","cell",t),m("deleteStoredCollider","collider",r);const n="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},deleteStoredCollisionLinkChain:async(t,r,a={})=>{m("deleteStoredCollisionLinkChain","cell",t),m("deleteStoredCollisionLinkChain","linkChain",r);const n="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},deleteStoredCollisionTool:async(t,r,a={})=>{m("deleteStoredCollisionTool","cell",t),m("deleteStoredCollisionTool","tool",r);const n="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getDefaultLinkChain:async(t,r,a={})=>{m("getDefaultLinkChain","cell",t),m("getDefaultLinkChain","motionGroupModel",r);const n="/cells/{cell}/store/collision/default-link-chains/{motion-group-model}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group-model}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getStoredCollider:async(t,r,a={})=>{m("getStoredCollider","cell",t),m("getStoredCollider","collider",r);const n="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getStoredCollisionLinkChain:async(t,r,a={})=>{m("getStoredCollisionLinkChain","cell",t),m("getStoredCollisionLinkChain","linkChain",r);const n="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getStoredCollisionTool:async(t,r,a={})=>{m("getStoredCollisionTool","cell",t),m("getStoredCollisionTool","tool",r);const n="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},listCollisionLinkChains:async(t,r={})=>{m("listCollisionLinkChains","cell",t);const a="/cells/{cell}/store/collision/link-chains".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},listStoredColliders:async(t,r={})=>{m("listStoredColliders","cell",t);const a="/cells/{cell}/store/collision/colliders".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},listStoredCollisionTools:async(t,r={})=>{m("listStoredCollisionTools","cell",t);const a="/cells/{cell}/store/collision/tools".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},storeCollider:async(t,r,a,n={})=>{m("storeCollider","cell",t),m("storeCollider","collider",r),m("storeCollider","collider2",a);const s="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}},storeCollisionLinkChain:async(t,r,a,n={})=>{m("storeCollisionLinkChain","cell",t),m("storeCollisionLinkChain","linkChain",r),m("storeCollisionLinkChain","collider",a);const s="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}},storeCollisionTool:async(t,r,a,n={})=>{m("storeCollisionTool","cell",t),m("storeCollisionTool","tool",r),m("storeCollisionTool","requestBody",a);const s="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}}}},tt=function(e){const t=Fv(e);return{async deleteStoredCollider(r,a,n){var l,c;const s=await t.deleteStoredCollider(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async deleteStoredCollisionLinkChain(r,a,n){var l,c;const s=await t.deleteStoredCollisionLinkChain(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async deleteStoredCollisionTool(r,a,n){var l,c;const s=await t.deleteStoredCollisionTool(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getDefaultLinkChain(r,a,n){var l,c;const s=await t.getDefaultLinkChain(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["StoreCollisionComponentsApi.getDefaultLinkChain"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getStoredCollider(r,a,n){var l,c;const s=await t.getStoredCollider(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getStoredCollisionLinkChain(r,a,n){var l,c;const s=await t.getStoredCollisionLinkChain(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getStoredCollisionTool(r,a,n){var l,c;const s=await t.getStoredCollisionTool(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async listCollisionLinkChains(r,a){var i,l;const n=await t.listCollisionLinkChains(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async listStoredColliders(r,a){var i,l;const n=await t.listStoredColliders(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async listStoredCollisionTools(r,a){var i,l;const n=await t.listStoredCollisionTools(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async storeCollider(r,a,n,s){var c,d;const o=await t.storeCollider(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async storeCollisionLinkChain(r,a,n,s){var c,d;const o=await t.storeCollisionLinkChain(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async storeCollisionTool(r,a,n,s){var c,d;const o=await t.storeCollisionTool(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)}}};class Nv extends Pe{deleteStoredCollider(t,r,a){return tt(this.configuration).deleteStoredCollider(t,r,a).then(n=>n(this.axios,this.basePath))}deleteStoredCollisionLinkChain(t,r,a){return tt(this.configuration).deleteStoredCollisionLinkChain(t,r,a).then(n=>n(this.axios,this.basePath))}deleteStoredCollisionTool(t,r,a){return tt(this.configuration).deleteStoredCollisionTool(t,r,a).then(n=>n(this.axios,this.basePath))}getDefaultLinkChain(t,r,a){return tt(this.configuration).getDefaultLinkChain(t,r,a).then(n=>n(this.axios,this.basePath))}getStoredCollider(t,r,a){return tt(this.configuration).getStoredCollider(t,r,a).then(n=>n(this.axios,this.basePath))}getStoredCollisionLinkChain(t,r,a){return tt(this.configuration).getStoredCollisionLinkChain(t,r,a).then(n=>n(this.axios,this.basePath))}getStoredCollisionTool(t,r,a){return tt(this.configuration).getStoredCollisionTool(t,r,a).then(n=>n(this.axios,this.basePath))}listCollisionLinkChains(t,r){return tt(this.configuration).listCollisionLinkChains(t,r).then(a=>a(this.axios,this.basePath))}listStoredColliders(t,r){return tt(this.configuration).listStoredColliders(t,r).then(a=>a(this.axios,this.basePath))}listStoredCollisionTools(t,r){return tt(this.configuration).listStoredCollisionTools(t,r).then(a=>a(this.axios,this.basePath))}storeCollider(t,r,a,n){return tt(this.configuration).storeCollider(t,r,a,n).then(s=>s(this.axios,this.basePath))}storeCollisionLinkChain(t,r,a,n){return tt(this.configuration).storeCollisionLinkChain(t,r,a,n).then(s=>s(this.axios,this.basePath))}storeCollisionTool(t,r,a,n){return tt(this.configuration).storeCollisionTool(t,r,a,n).then(s=>s(this.axios,this.basePath))}}const Dv=function(e){return{deleteStoredCollisionScene:async(t,r,a={})=>{m("deleteStoredCollisionScene","cell",t),m("deleteStoredCollisionScene","scene",r);const n="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getStoredCollisionScene:async(t,r,a={})=>{m("getStoredCollisionScene","cell",t),m("getStoredCollisionScene","scene",r);const n="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},listStoredCollisionScenes:async(t,r={})=>{m("listStoredCollisionScenes","cell",t);const a="/cells/{cell}/store/collision/scenes".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},storeCollisionScene:async(t,r,a,n={})=>{m("storeCollisionScene","cell",t),m("storeCollisionScene","scene",r),m("storeCollisionScene","collisionSceneAssembly",a);const s="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}}}},en=function(e){const t=Dv(e);return{async deleteStoredCollisionScene(r,a,n){var l,c;const s=await t.deleteStoredCollisionScene(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["StoreCollisionScenesApi.deleteStoredCollisionScene"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getStoredCollisionScene(r,a,n){var l,c;const s=await t.getStoredCollisionScene(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["StoreCollisionScenesApi.getStoredCollisionScene"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async listStoredCollisionScenes(r,a){var i,l;const n=await t.listStoredCollisionScenes(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["StoreCollisionScenesApi.listStoredCollisionScenes"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async storeCollisionScene(r,a,n,s){var c,d;const o=await t.storeCollisionScene(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["StoreCollisionScenesApi.storeCollisionScene"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)}}};class zv extends Pe{deleteStoredCollisionScene(t,r,a){return en(this.configuration).deleteStoredCollisionScene(t,r,a).then(n=>n(this.axios,this.basePath))}getStoredCollisionScene(t,r,a){return en(this.configuration).getStoredCollisionScene(t,r,a).then(n=>n(this.axios,this.basePath))}listStoredCollisionScenes(t,r){return en(this.configuration).listStoredCollisionScenes(t,r).then(a=>a(this.axios,this.basePath))}storeCollisionScene(t,r,a,n){return en(this.configuration).storeCollisionScene(t,r,a,n).then(s=>s(this.axios,this.basePath))}}const Gv=function(e){return{clearAllObjects:async(t,r={})=>{m("clearAllObjects","cell",t);const a="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"DELETE",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},deleteObject:async(t,r,a={})=>{m("deleteObject","cell",t),m("deleteObject","key",r);const n="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"DELETE",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getObject:async(t,r,a={})=>{m("getObject","cell",t),m("getObject","key",r);const n="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getObjectMetadata:async(t,r,a={})=>{m("getObjectMetadata","cell",t),m("getObjectMetadata","key",r);const n="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"HEAD",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},listAllObjectKeys:async(t,r={})=>{m("listAllObjectKeys","cell",t);const a="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},storeObject:async(t,r,a,n,s={})=>{m("storeObject","cell",t),m("storeObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},d={},u={},p=new(e&&e.formDataCtor||FormData);V(c,e),await R(d,e),n!==void 0&&p.append("AnyValue",new Blob([JSON.stringify(n)],{type:"application/json"})),d["Content-Type"]="multipart/form-data",a!=null&&(d["X-Metadata"]=typeof a=="string"?a:JSON.stringify(a)),_(i,u);let f=l&&l.headers?l.headers:{};return c.headers={...d,...f,...s.headers},c.data=p,{url:A(i),options:c}}}},$r=function(e){const t=Gv(e);return{async clearAllObjects(r,a){var i,l;const n=await t.clearAllObjects(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["StoreObjectApi.clearAllObjects"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async deleteObject(r,a,n){var l,c;const s=await t.deleteObject(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["StoreObjectApi.deleteObject"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getObject(r,a,n){var l,c;const s=await t.getObject(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["StoreObjectApi.getObject"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getObjectMetadata(r,a,n){var l,c;const s=await t.getObjectMetadata(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["StoreObjectApi.getObjectMetadata"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async listAllObjectKeys(r,a){var i,l;const n=await t.listAllObjectKeys(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async storeObject(r,a,n,s,o){var d,u;const i=await t.storeObject(r,a,n,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(u=(d=C["StoreObjectApi.storeObject"])==null?void 0:d[l])==null?void 0:u.url;return(p,f)=>T(i,O,w,e)(p,c||f)}}};class Jv extends Pe{clearAllObjects(t,r){return $r(this.configuration).clearAllObjects(t,r).then(a=>a(this.axios,this.basePath))}deleteObject(t,r,a){return $r(this.configuration).deleteObject(t,r,a).then(n=>n(this.axios,this.basePath))}getObject(t,r,a){return $r(this.configuration).getObject(t,r,a).then(n=>n(this.axios,this.basePath))}getObjectMetadata(t,r,a){return $r(this.configuration).getObjectMetadata(t,r,a).then(n=>n(this.axios,this.basePath))}listAllObjectKeys(t,r){return $r(this.configuration).listAllObjectKeys(t,r).then(a=>a(this.axios,this.basePath))}storeObject(t,r,a,n,s){return $r(this.configuration).storeObject(t,r,a,n,s).then(o=>o(this.axios,this.basePath))}}const Hv=function(e){return{checkNovaVersionUpdate:async(t,r={})=>{m("checkNovaVersionUpdate","channel",t);const a="/system/update",n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"GET",...s,...r},i={},l={};V(o,e),await R(i,e),t!==void 0&&(l.channel=t),_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},{url:A(n),options:o}},getDiagnosePackage:async(t={})=>{const r="/system/diagnosis-package/zip",a=new URL(r,P);let n;e&&(n=e.baseOptions);const s={method:"GET",...n,...t},o={},i={};V(s,e),await R(o,e),_(a,i);let l=n&&n.headers?n.headers:{};return s.headers={...o,...l,...t.headers},{url:A(a),options:s}},getSystemStatus:async(t={})=>{const r="/system/status",a=new URL(r,P);let n;e&&(n=e.baseOptions);const s={method:"GET",...n,...t},o={},i={};V(s,e),await R(o,e),_(a,i);let l=n&&n.headers?n.headers:{};return s.headers={...o,...l,...t.headers},{url:A(a),options:s}},getSystemVersion:async(t={})=>{const r="/system/version",a=new URL(r,P);let n;e&&(n=e.baseOptions);const s={method:"GET",...n,...t},o={},i={};V(s,e),await R(o,e),_(a,i);let l=n&&n.headers?n.headers:{};return s.headers={...o,...l,...t.headers},{url:A(a),options:s}},updateNovaVersion:async(t,r={})=>{m("updateNovaVersion","updateNovaVersionRequest",t);const a="/system/update",n=new URL(a,P);let s;e&&(s=e.baseOptions);const o={method:"PUT",...s,...r},i={},l={};V(o,e),await R(i,e),i["Content-Type"]="application/json",_(n,l);let c=s&&s.headers?s.headers:{};return o.headers={...i,...c,...r.headers},o.data=oe(t,o,e),{url:A(n),options:o}}}},va=function(e){const t=Hv(e);return{async checkNovaVersionUpdate(r,a){var i,l;const n=await t.checkNovaVersionUpdate(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)},async getDiagnosePackage(r){var o,i;const a=await t.getDiagnosePackage(r),n=(e==null?void 0:e.serverIndex)??0,s=(i=(o=C["SystemApi.getDiagnosePackage"])==null?void 0:o[n])==null?void 0:i.url;return(l,c)=>T(a,O,w,e)(l,s||c)},async getSystemStatus(r){var o,i;const a=await t.getSystemStatus(r),n=(e==null?void 0:e.serverIndex)??0,s=(i=(o=C["SystemApi.getSystemStatus"])==null?void 0:o[n])==null?void 0:i.url;return(l,c)=>T(a,O,w,e)(l,s||c)},async getSystemVersion(r){var o,i;const a=await t.getSystemVersion(r),n=(e==null?void 0:e.serverIndex)??0,s=(i=(o=C["SystemApi.getSystemVersion"])==null?void 0:o[n])==null?void 0:i.url;return(l,c)=>T(a,O,w,e)(l,s||c)},async updateNovaVersion(r,a){var i,l;const n=await t.updateNovaVersion(r,a),s=(e==null?void 0:e.serverIndex)??0,o=(l=(i=C["SystemApi.updateNovaVersion"])==null?void 0:i[s])==null?void 0:l.url;return(c,d)=>T(n,O,w,e)(c,o||d)}}};class qv extends Pe{checkNovaVersionUpdate(t,r){return va(this.configuration).checkNovaVersionUpdate(t,r).then(a=>a(this.axios,this.basePath))}getDiagnosePackage(t){return va(this.configuration).getDiagnosePackage(t).then(r=>r(this.axios,this.basePath))}getSystemStatus(t){return va(this.configuration).getSystemStatus(t).then(r=>r(this.axios,this.basePath))}getSystemVersion(t){return va(this.configuration).getSystemVersion(t).then(r=>r(this.axios,this.basePath))}updateNovaVersion(t,r){return va(this.configuration).updateNovaVersion(t,r).then(a=>a(this.axios,this.basePath))}}const Wv=function(e){return{getMotionGroupState:async(t,r,a,n={})=>{m("getMotionGroupState","cell",t),m("getMotionGroupState","controller",r),m("getMotionGroupState","id",a);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(a))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},getMotionGroups:async(t,r,a={})=>{m("getMotionGroups","cell",t),m("getMotionGroups","controller",r);const n="/cells/{cell}/controllers/{controller}/teach-pendant/motiongroups".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getVirtualRobotIOValue:async(t,r,a,n={})=>{m("getVirtualRobotIOValue","cell",t),m("getVirtualRobotIOValue","controller",r),m("getVirtualRobotIOValue","io",a);const s="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(a))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},listIOs:async(t,r,a={})=>{m("listIOs","cell",t),m("listIOs","controller",r);const n="/cells/{cell}/controllers/{controller}/teach-pendant/ios".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},setMotionGroupState:async(t,r,a,n,s={})=>{m("setMotionGroupState","cell",t),m("setMotionGroupState","controller",r),m("setMotionGroupState","id",a),m("setMotionGroupState","motionGroupJoints",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(a))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},d={},u={};V(c,e),await R(d,e),d["Content-Type"]="application/json",_(i,u);let p=l&&l.headers?l.headers:{};return c.headers={...d,...p,...s.headers},c.data=oe(n,c,e),{url:A(i),options:c}},setVirtualRobotIOValue:async(t,r,a,n,s,o,i={})=>{m("setVirtualRobotIOValue","cell",t),m("setVirtualRobotIOValue","controller",r),m("setVirtualRobotIOValue","io",a);const l="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(a))),c=new URL(l,P);let d;e&&(d=e.baseOptions);const u={method:"PUT",...d,...i},p={},f={};V(u,e),await R(p,e),n!==void 0&&(f.bool=n),s!==void 0&&(f.integer=s),o!==void 0&&(f.double=o),_(c,f);let g=d&&d.headers?d.headers:{};return u.headers={...p,...g,...i.headers},{url:A(c),options:u}}}},Ur=function(e){const t=Wv(e);return{async getMotionGroupState(r,a,n,s){var c,d;const o=await t.getMotionGroupState(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["VirtualRobotApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async getMotionGroups(r,a,n){var l,c;const s=await t.getMotionGroups(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["VirtualRobotApi.getMotionGroups"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getVirtualRobotIOValue(r,a,n,s){var c,d;const o=await t.getVirtualRobotIOValue(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["VirtualRobotApi.getVirtualRobotIOValue"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async listIOs(r,a,n){var l,c;const s=await t.listIOs(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["VirtualRobotApi.listIOs"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async setMotionGroupState(r,a,n,s,o){var d,u;const i=await t.setMotionGroupState(r,a,n,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(u=(d=C["VirtualRobotApi.setMotionGroupState"])==null?void 0:d[l])==null?void 0:u.url;return(p,f)=>T(i,O,w,e)(p,c||f)},async setVirtualRobotIOValue(r,a,n,s,o,i,l){var p,f;const c=await t.setVirtualRobotIOValue(r,a,n,s,o,i,l),d=(e==null?void 0:e.serverIndex)??0,u=(f=(p=C["VirtualRobotApi.setVirtualRobotIOValue"])==null?void 0:p[d])==null?void 0:f.url;return(g,h)=>T(c,O,w,e)(g,u||h)}}};class Kv extends Pe{getMotionGroupState(t,r,a,n){return Ur(this.configuration).getMotionGroupState(t,r,a,n).then(s=>s(this.axios,this.basePath))}getMotionGroups(t,r,a){return Ur(this.configuration).getMotionGroups(t,r,a).then(n=>n(this.axios,this.basePath))}getVirtualRobotIOValue(t,r,a,n){return Ur(this.configuration).getVirtualRobotIOValue(t,r,a,n).then(s=>s(this.axios,this.basePath))}listIOs(t,r,a){return Ur(this.configuration).listIOs(t,r,a).then(n=>n(this.axios,this.basePath))}setMotionGroupState(t,r,a,n,s){return Ur(this.configuration).setMotionGroupState(t,r,a,n,s).then(o=>o(this.axios,this.basePath))}setVirtualRobotIOValue(t,r,a,n,s,o,i){return Ur(this.configuration).setVirtualRobotIOValue(t,r,a,n,s,o,i).then(l=>l(this.axios,this.basePath))}}const Qv=function(e){return{externalJointsStream:async(t,r,a,n={})=>{m("externalJointsStream","cell",t),m("externalJointsStream","controller",r),m("externalJointsStream","externalJointStreamDatapoint",a);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/externalJointsStream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}},getMotionGroupBehavior:async(t,r,a,n={})=>{m("getMotionGroupBehavior","cell",t),m("getMotionGroupBehavior","controller",r),m("getMotionGroupBehavior","id",a);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(a))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},setMotionGroupBehavior:async(t,r,a,n,s={})=>{m("setMotionGroupBehavior","cell",t),m("setMotionGroupBehavior","controller",r),m("setMotionGroupBehavior","id",a);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/behavior".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(a))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},d={},u={};V(c,e),await R(d,e),n!==void 0&&(u.behavior=n),_(i,u);let p=l&&l.headers?l.headers:{};return c.headers={...d,...p,...s.headers},{url:A(i),options:c}}}},_s=function(e){const t=Qv(e);return{async externalJointsStream(r,a,n,s){var c,d;const o=await t.externalJointsStream(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["VirtualRobotBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async getMotionGroupBehavior(r,a,n,s){var c,d;const o=await t.getMotionGroupBehavior(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["VirtualRobotBehaviorApi.getMotionGroupBehavior"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async setMotionGroupBehavior(r,a,n,s,o){var d,u;const i=await t.setMotionGroupBehavior(r,a,n,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(u=(d=C["VirtualRobotBehaviorApi.setMotionGroupBehavior"])==null?void 0:d[l])==null?void 0:u.url;return(p,f)=>T(i,O,w,e)(p,c||f)}}};class Yv extends Pe{externalJointsStream(t,r,a,n){return _s(this.configuration).externalJointsStream(t,r,a,n).then(s=>s(this.axios,this.basePath))}getMotionGroupBehavior(t,r,a,n){return _s(this.configuration).getMotionGroupBehavior(t,r,a,n).then(s=>s(this.axios,this.basePath))}setMotionGroupBehavior(t,r,a,n,s){return _s(this.configuration).setMotionGroupBehavior(t,r,a,n,s).then(o=>o(this.axios,this.basePath))}}const Xv=function(e){return{getCycleTime:async(t,r,a={})=>{m("getCycleTime","cell",t),m("getCycleTime","controller",r);const n="/cells/{cell}/controllers/{controller}/teach-pendant/cycle-time".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getEStop:async(t,r,a={})=>{m("getEStop","cell",t),m("getEStop","controller",r);const n="/cells/{cell}/controllers/{controller}/teach-pendant/estop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},getOperationMode:async(t,r,a={})=>{m("getOperationMode","cell",t),m("getOperationMode","controller",r);const n="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},pushEStop:async(t,r,a={})=>{m("pushEStop","cell",t),m("pushEStop","controller",r);const n="/cells/{cell}/controllers/{controller}/teach-pendant/estop/push".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},releaseEStop:async(t,r,a={})=>{m("releaseEStop","cell",t),m("releaseEStop","controller",r);const n="/cells/{cell}/controllers/{controller}/teach-pendant/estop/release".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"PUT",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},setOperationMode:async(t,r,a,n={})=>{m("setOperationMode","cell",t),m("setOperationMode","controller",r),m("setOperationMode","mode",a);const s="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};V(l,e),await R(c,e),a!==void 0&&(d.mode=a),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}}}},Lr=function(e){const t=Xv(e);return{async getCycleTime(r,a,n){var l,c;const s=await t.getCycleTime(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["VirtualRobotModeApi.getCycleTime"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getEStop(r,a,n){var l,c;const s=await t.getEStop(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["VirtualRobotModeApi.getEStop"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async getOperationMode(r,a,n){var l,c;const s=await t.getOperationMode(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["VirtualRobotModeApi.getOperationMode"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async pushEStop(r,a,n){var l,c;const s=await t.pushEStop(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["VirtualRobotModeApi.pushEStop"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async releaseEStop(r,a,n){var l,c;const s=await t.releaseEStop(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["VirtualRobotModeApi.releaseEStop"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async setOperationMode(r,a,n,s){var c,d;const o=await t.setOperationMode(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["VirtualRobotModeApi.setOperationMode"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)}}};class Zv extends Pe{getCycleTime(t,r,a){return Lr(this.configuration).getCycleTime(t,r,a).then(n=>n(this.axios,this.basePath))}getEStop(t,r,a){return Lr(this.configuration).getEStop(t,r,a).then(n=>n(this.axios,this.basePath))}getOperationMode(t,r,a){return Lr(this.configuration).getOperationMode(t,r,a).then(n=>n(this.axios,this.basePath))}pushEStop(t,r,a){return Lr(this.configuration).pushEStop(t,r,a).then(n=>n(this.axios,this.basePath))}releaseEStop(t,r,a){return Lr(this.configuration).releaseEStop(t,r,a).then(n=>n(this.axios,this.basePath))}setOperationMode(t,r,a,n){return Lr(this.configuration).setOperationMode(t,r,a,n).then(s=>s(this.axios,this.basePath))}}const e1=function(e){return{addVirtualRobotCoordinateSystem:async(t,r,a,n={})=>{m("addVirtualRobotCoordinateSystem","cell",t),m("addVirtualRobotCoordinateSystem","controller",r),m("addVirtualRobotCoordinateSystem","coordinateSystem",a);const s="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...n},c={},d={};V(l,e),await R(c,e),c["Content-Type"]="application/json",_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},l.data=oe(a,l,e),{url:A(o),options:l}},addVirtualRobotTcp:async(t,r,a,n,s={})=>{m("addVirtualRobotTcp","cell",t),m("addVirtualRobotTcp","controller",r),m("addVirtualRobotTcp","id",a),m("addVirtualRobotTcp","robotTcp",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(a))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},d={},u={};V(c,e),await R(d,e),d["Content-Type"]="application/json",_(i,u);let p=l&&l.headers?l.headers:{};return c.headers={...d,...p,...s.headers},c.data=oe(n,c,e),{url:A(i),options:c}},deleteVirtualRobotCoordinateSystem:async(t,r,a,n,s={})=>{m("deleteVirtualRobotCoordinateSystem","cell",t),m("deleteVirtualRobotCoordinateSystem","controller",r),m("deleteVirtualRobotCoordinateSystem","coordinateSystem",a);const o="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{coordinate-system}",encodeURIComponent(String(a))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},d={},u={};V(c,e),await R(d,e),n!==void 0&&(u.delete_dependent=n),_(i,u);let p=l&&l.headers?l.headers:{};return c.headers={...d,...p,...s.headers},{url:A(i),options:c}},deleteVirtualRobotTcp:async(t,r,a,n,s={})=>{m("deleteVirtualRobotTcp","cell",t),m("deleteVirtualRobotTcp","controller",r),m("deleteVirtualRobotTcp","id",a),m("deleteVirtualRobotTcp","tcp",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps/{tcp}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(a))).replace("{tcp}",encodeURIComponent(String(n))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},d={},u={};V(c,e),await R(d,e),_(i,u);let p=l&&l.headers?l.headers:{};return c.headers={...d,...p,...s.headers},{url:A(i),options:c}},getVirtualRobotMounting:async(t,r,a,n={})=>{m("getVirtualRobotMounting","cell",t),m("getVirtualRobotMounting","controller",r),m("getVirtualRobotMounting","id",a);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(a))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},listVirtualRobotCoordinateSystems:async(t,r,a={})=>{m("listVirtualRobotCoordinateSystems","cell",t),m("listVirtualRobotCoordinateSystems","controller",r);const n="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(n,P);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...a},l={},c={};V(i,e),await R(l,e),_(s,c);let d=o&&o.headers?o.headers:{};return i.headers={...l,...d,...a.headers},{url:A(s),options:i}},listVirtualRobotTcps:async(t,r,a,n={})=>{m("listVirtualRobotTcps","cell",t),m("listVirtualRobotTcps","controller",r),m("listVirtualRobotTcps","id",a);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(a))),o=new URL(s,P);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...n},c={},d={};V(l,e),await R(c,e),_(o,d);let u=i&&i.headers?i.headers:{};return l.headers={...c,...u,...n.headers},{url:A(o),options:l}},setVirtualRobotMounting:async(t,r,a,n,s={})=>{m("setVirtualRobotMounting","cell",t),m("setVirtualRobotMounting","controller",r),m("setVirtualRobotMounting","id",a),m("setVirtualRobotMounting","coordinateSystem",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/{id}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{id}",encodeURIComponent(String(a))),i=new URL(o,P);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},d={},u={};V(c,e),await R(d,e),d["Content-Type"]="application/json",_(i,u);let p=l&&l.headers?l.headers:{};return c.headers={...d,...p,...s.headers},c.data=oe(n,c,e),{url:A(i),options:c}}}},Ht=function(e){const t=e1(e);return{async addVirtualRobotCoordinateSystem(r,a,n,s){var c,d;const o=await t.addVirtualRobotCoordinateSystem(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["VirtualRobotSetupApi.addVirtualRobotCoordinateSystem"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async addVirtualRobotTcp(r,a,n,s,o){var d,u;const i=await t.addVirtualRobotTcp(r,a,n,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(u=(d=C["VirtualRobotSetupApi.addVirtualRobotTcp"])==null?void 0:d[l])==null?void 0:u.url;return(p,f)=>T(i,O,w,e)(p,c||f)},async deleteVirtualRobotCoordinateSystem(r,a,n,s,o){var d,u;const i=await t.deleteVirtualRobotCoordinateSystem(r,a,n,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(u=(d=C["VirtualRobotSetupApi.deleteVirtualRobotCoordinateSystem"])==null?void 0:d[l])==null?void 0:u.url;return(p,f)=>T(i,O,w,e)(p,c||f)},async deleteVirtualRobotTcp(r,a,n,s,o){var d,u;const i=await t.deleteVirtualRobotTcp(r,a,n,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(u=(d=C["VirtualRobotSetupApi.deleteVirtualRobotTcp"])==null?void 0:d[l])==null?void 0:u.url;return(p,f)=>T(i,O,w,e)(p,c||f)},async getVirtualRobotMounting(r,a,n,s){var c,d;const o=await t.getVirtualRobotMounting(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["VirtualRobotSetupApi.getVirtualRobotMounting"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async listVirtualRobotCoordinateSystems(r,a,n){var l,c;const s=await t.listVirtualRobotCoordinateSystems(r,a,n),o=(e==null?void 0:e.serverIndex)??0,i=(c=(l=C["VirtualRobotSetupApi.listVirtualRobotCoordinateSystems"])==null?void 0:l[o])==null?void 0:c.url;return(d,u)=>T(s,O,w,e)(d,i||u)},async listVirtualRobotTcps(r,a,n,s){var c,d;const o=await t.listVirtualRobotTcps(r,a,n,s),i=(e==null?void 0:e.serverIndex)??0,l=(d=(c=C["VirtualRobotSetupApi.listVirtualRobotTcps"])==null?void 0:c[i])==null?void 0:d.url;return(u,p)=>T(o,O,w,e)(u,l||p)},async setVirtualRobotMounting(r,a,n,s,o){var d,u;const i=await t.setVirtualRobotMounting(r,a,n,s,o),l=(e==null?void 0:e.serverIndex)??0,c=(u=(d=C["VirtualRobotSetupApi.setVirtualRobotMounting"])==null?void 0:d[l])==null?void 0:u.url;return(p,f)=>T(i,O,w,e)(p,c||f)}}};class t1 extends Pe{addVirtualRobotCoordinateSystem(t,r,a,n){return Ht(this.configuration).addVirtualRobotCoordinateSystem(t,r,a,n).then(s=>s(this.axios,this.basePath))}addVirtualRobotTcp(t,r,a,n,s){return Ht(this.configuration).addVirtualRobotTcp(t,r,a,n,s).then(o=>o(this.axios,this.basePath))}deleteVirtualRobotCoordinateSystem(t,r,a,n,s){return Ht(this.configuration).deleteVirtualRobotCoordinateSystem(t,r,a,n,s).then(o=>o(this.axios,this.basePath))}deleteVirtualRobotTcp(t,r,a,n,s){return Ht(this.configuration).deleteVirtualRobotTcp(t,r,a,n,s).then(o=>o(this.axios,this.basePath))}getVirtualRobotMounting(t,r,a,n){return Ht(this.configuration).getVirtualRobotMounting(t,r,a,n).then(s=>s(this.axios,this.basePath))}listVirtualRobotCoordinateSystems(t,r,a){return Ht(this.configuration).listVirtualRobotCoordinateSystems(t,r,a).then(n=>n(this.axios,this.basePath))}listVirtualRobotTcps(t,r,a,n){return Ht(this.configuration).listVirtualRobotTcps(t,r,a,n).then(s=>s(this.axios,this.basePath))}setVirtualRobotMounting(t,r,a,n,s){return Ht(this.configuration).setVirtualRobotMounting(t,r,a,n,s).then(o=>o(this.axios,this.basePath))}}function Mt(e,t,r){return Math.max(t,Math.min(r,e))}class r1{constructor(t=0,r=0,a=0,n=1){this.isQuaternion=!0,this._x=t,this._y=r,this._z=a,this._w=n}static slerpFlat(t,r,a,n,s,o,i){let l=a[n+0],c=a[n+1],d=a[n+2],u=a[n+3];const p=s[o+0],f=s[o+1],g=s[o+2],h=s[o+3];if(i===0){t[r+0]=l,t[r+1]=c,t[r+2]=d,t[r+3]=u;return}if(i===1){t[r+0]=p,t[r+1]=f,t[r+2]=g,t[r+3]=h;return}if(u!==h||l!==p||c!==f||d!==g){let x=1-i;const E=l*p+c*f+d*g+u*h,U=E>=0?1:-1,F=1-E*E;if(F>Number.EPSILON){const G=Math.sqrt(F),K=Math.atan2(G,E*U);x=Math.sin(x*K)/G,i=Math.sin(i*K)/G}const N=i*U;if(l=l*x+p*N,c=c*x+f*N,d=d*x+g*N,u=u*x+h*N,x===1-i){const G=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=G,c*=G,d*=G,u*=G}}t[r]=l,t[r+1]=c,t[r+2]=d,t[r+3]=u}static multiplyQuaternionsFlat(t,r,a,n,s,o){const i=a[n],l=a[n+1],c=a[n+2],d=a[n+3],u=s[o],p=s[o+1],f=s[o+2],g=s[o+3];return t[r]=i*g+d*u+l*f-c*p,t[r+1]=l*g+d*p+c*u-i*f,t[r+2]=c*g+d*f+i*p-l*u,t[r+3]=d*g-i*u-l*p-c*f,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,r,a,n){return this._x=t,this._y=r,this._z=a,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,r=!0){const a=t._x,n=t._y,s=t._z,o=t._order,i=Math.cos,l=Math.sin,c=i(a/2),d=i(n/2),u=i(s/2),p=l(a/2),f=l(n/2),g=l(s/2);switch(o){case"XYZ":this._x=p*d*u+c*f*g,this._y=c*f*u-p*d*g,this._z=c*d*g+p*f*u,this._w=c*d*u-p*f*g;break;case"YXZ":this._x=p*d*u+c*f*g,this._y=c*f*u-p*d*g,this._z=c*d*g-p*f*u,this._w=c*d*u+p*f*g;break;case"ZXY":this._x=p*d*u-c*f*g,this._y=c*f*u+p*d*g,this._z=c*d*g+p*f*u,this._w=c*d*u-p*f*g;break;case"ZYX":this._x=p*d*u-c*f*g,this._y=c*f*u+p*d*g,this._z=c*d*g-p*f*u,this._w=c*d*u+p*f*g;break;case"YZX":this._x=p*d*u+c*f*g,this._y=c*f*u+p*d*g,this._z=c*d*g-p*f*u,this._w=c*d*u-p*f*g;break;case"XZY":this._x=p*d*u-c*f*g,this._y=c*f*u-p*d*g,this._z=c*d*g+p*f*u,this._w=c*d*u+p*f*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,r){const a=r/2,n=Math.sin(a);return this._x=t.x*n,this._y=t.y*n,this._z=t.z*n,this._w=Math.cos(a),this._onChangeCallback(),this}setFromRotationMatrix(t){const r=t.elements,a=r[0],n=r[4],s=r[8],o=r[1],i=r[5],l=r[9],c=r[2],d=r[6],u=r[10],p=a+i+u;if(p>0){const f=.5/Math.sqrt(p+1);this._w=.25/f,this._x=(d-l)*f,this._y=(s-c)*f,this._z=(o-n)*f}else if(a>i&&a>u){const f=2*Math.sqrt(1+a-i-u);this._w=(d-l)/f,this._x=.25*f,this._y=(n+o)/f,this._z=(s+c)/f}else if(i>u){const f=2*Math.sqrt(1+i-a-u);this._w=(s-c)/f,this._x=(n+o)/f,this._y=.25*f,this._z=(l+d)/f}else{const f=2*Math.sqrt(1+u-a-i);this._w=(o-n)/f,this._x=(s+c)/f,this._y=(l+d)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(t,r){let a=t.dot(r)+1;return a<Number.EPSILON?(a=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=a):(this._x=0,this._y=-t.z,this._z=t.y,this._w=a)):(this._x=t.y*r.z-t.z*r.y,this._y=t.z*r.x-t.x*r.z,this._z=t.x*r.y-t.y*r.x,this._w=a),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Mt(this.dot(t),-1,1)))}rotateTowards(t,r){const a=this.angleTo(t);if(a===0)return this;const n=Math.min(1,r/a);return this.slerp(t,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,r){const a=t._x,n=t._y,s=t._z,o=t._w,i=r._x,l=r._y,c=r._z,d=r._w;return this._x=a*d+o*i+n*c-s*l,this._y=n*d+o*l+s*i-a*c,this._z=s*d+o*c+a*l-n*i,this._w=o*d-a*i-n*l-s*c,this._onChangeCallback(),this}slerp(t,r){if(r===0)return this;if(r===1)return this.copy(t);const a=this._x,n=this._y,s=this._z,o=this._w;let i=o*t._w+a*t._x+n*t._y+s*t._z;if(i<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,i=-i):this.copy(t),i>=1)return this._w=o,this._x=a,this._y=n,this._z=s,this;const l=1-i*i;if(l<=Number.EPSILON){const f=1-r;return this._w=f*o+r*this._w,this._x=f*a+r*this._x,this._y=f*n+r*this._y,this._z=f*s+r*this._z,this.normalize(),this}const c=Math.sqrt(l),d=Math.atan2(c,i),u=Math.sin((1-r)*d)/c,p=Math.sin(r*d)/c;return this._w=o*u+this._w*p,this._x=a*u+this._x*p,this._y=n*u+this._y*p,this._z=s*u+this._z*p,this._onChangeCallback(),this}slerpQuaternions(t,r,a){return this.copy(t).slerp(r,a)}random(){const t=2*Math.PI*Math.random(),r=2*Math.PI*Math.random(),a=Math.random(),n=Math.sqrt(1-a),s=Math.sqrt(a);return this.set(n*Math.sin(t),n*Math.cos(t),s*Math.sin(r),s*Math.cos(r))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,r=0){return this._x=t[r],this._y=t[r+1],this._z=t[r+2],this._w=t[r+3],this._onChangeCallback(),this}toArray(t=[],r=0){return t[r]=this._x,t[r+1]=this._y,t[r+2]=this._z,t[r+3]=this._w,t}fromBufferAttribute(t,r){return this._x=t.getX(r),this._y=t.getY(r),this._z=t.getZ(r),this._w=t.getW(r),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Gr{constructor(t=0,r=0,a=0){Gr.prototype.isVector3=!0,this.x=t,this.y=r,this.z=a}set(t,r,a){return a===void 0&&(a=this.z),this.x=t,this.y=r,this.z=a,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,r){switch(t){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,r){return this.x=t.x+r.x,this.y=t.y+r.y,this.z=t.z+r.z,this}addScaledVector(t,r){return this.x+=t.x*r,this.y+=t.y*r,this.z+=t.z*r,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,r){return this.x=t.x-r.x,this.y=t.y-r.y,this.z=t.z-r.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,r){return this.x=t.x*r.x,this.y=t.y*r.y,this.z=t.z*r.z,this}applyEuler(t){return this.applyQuaternion(nl.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(nl.setFromAxisAngle(t,r))}applyMatrix3(t){const r=this.x,a=this.y,n=this.z,s=t.elements;return this.x=s[0]*r+s[3]*a+s[6]*n,this.y=s[1]*r+s[4]*a+s[7]*n,this.z=s[2]*r+s[5]*a+s[8]*n,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const r=this.x,a=this.y,n=this.z,s=t.elements,o=1/(s[3]*r+s[7]*a+s[11]*n+s[15]);return this.x=(s[0]*r+s[4]*a+s[8]*n+s[12])*o,this.y=(s[1]*r+s[5]*a+s[9]*n+s[13])*o,this.z=(s[2]*r+s[6]*a+s[10]*n+s[14])*o,this}applyQuaternion(t){const r=this.x,a=this.y,n=this.z,s=t.x,o=t.y,i=t.z,l=t.w,c=2*(o*n-i*a),d=2*(i*r-s*n),u=2*(s*a-o*r);return this.x=r+l*c+o*u-i*d,this.y=a+l*d+i*c-s*u,this.z=n+l*u+s*d-o*c,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const r=this.x,a=this.y,n=this.z,s=t.elements;return this.x=s[0]*r+s[4]*a+s[8]*n,this.y=s[1]*r+s[5]*a+s[9]*n,this.z=s[2]*r+s[6]*a+s[10]*n,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,r){return this.x=Mt(this.x,t.x,r.x),this.y=Mt(this.y,t.y,r.y),this.z=Mt(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=Mt(this.x,t,r),this.y=Mt(this.y,t,r),this.z=Mt(this.z,t,r),this}clampLength(t,r){const a=this.length();return this.divideScalar(a||1).multiplyScalar(Mt(a,t,r))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,r){return this.x+=(t.x-this.x)*r,this.y+=(t.y-this.y)*r,this.z+=(t.z-this.z)*r,this}lerpVectors(t,r,a){return this.x=t.x+(r.x-t.x)*a,this.y=t.y+(r.y-t.y)*a,this.z=t.z+(r.z-t.z)*a,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,r){const a=t.x,n=t.y,s=t.z,o=r.x,i=r.y,l=r.z;return this.x=n*l-s*i,this.y=s*o-a*l,this.z=a*i-n*o,this}projectOnVector(t){const r=t.lengthSq();if(r===0)return this.set(0,0,0);const a=t.dot(this)/r;return this.copy(t).multiplyScalar(a)}projectOnPlane(t){return As.copy(this).projectOnVector(t),this.sub(As)}reflect(t){return this.sub(As.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const r=Math.sqrt(this.lengthSq()*t.lengthSq());if(r===0)return Math.PI/2;const a=this.dot(t)/r;return Math.acos(Mt(a,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const r=this.x-t.x,a=this.y-t.y,n=this.z-t.z;return r*r+a*a+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,r,a){const n=Math.sin(r)*t;return this.x=n*Math.sin(a),this.y=Math.cos(r)*t,this.z=n*Math.cos(a),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,r,a){return this.x=t*Math.sin(r),this.y=a,this.z=t*Math.cos(r),this}setFromMatrixPosition(t){const r=t.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this}setFromMatrixScale(t){const r=this.setFromMatrixColumn(t,0).length(),a=this.setFromMatrixColumn(t,1).length(),n=this.setFromMatrixColumn(t,2).length();return this.x=r,this.y=a,this.z=n,this}setFromMatrixColumn(t,r){return this.fromArray(t.elements,r*4)}setFromMatrix3Column(t,r){return this.fromArray(t.elements,r*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,r=0){return this.x=t[r],this.y=t[r+1],this.z=t[r+2],this}toArray(t=[],r=0){return t[r]=this.x,t[r+1]=this.y,t[r+2]=this.z,t}fromBufferAttribute(t,r){return this.x=t.getX(r),this.y=t.getY(r),this.z=t.getZ(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,r=Math.random()*2-1,a=Math.sqrt(1-r*r);return this.x=a*Math.cos(t),this.y=r,this.z=a*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const As=new Gr,nl=new r1;function a1(e){var t=[];if(e.length===0)return"";if(typeof e[0]!="string")throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var r=e.shift();e[0]=r+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var a=0;a<e.length;a++){var n=e[a];if(typeof n!="string")throw new TypeError("Url must be a string. Received "+n);n!==""&&(a>0&&(n=n.replace(/^[\/]+/,"")),a<e.length-1?n=n.replace(/[\/]+$/,""):n=n.replace(/[\/]+$/,"/"),t.push(n))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var o=s.split("?");return s=o.shift()+(o.length>0?"?":"")+o.join("&"),s}function Ts(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),a1(e)}var xt={},sl;function n1(){if(sl)return xt;sl=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.TokenData=void 0,xt.parse=u,xt.compile=p,xt.match=h,xt.pathToRegexp=x,xt.stringify=N;const e="/",t=j=>j,r=/^[$_\p{ID_Start}]$/u,a=/^[$\u200c\u200d\p{ID_Continue}]$/u,n="https://git.new/pathToRegexpError",s={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function o(j){return j.replace(/[{}()\[\]+?!:*]/g,"\\$&")}function i(j){return j.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}function*l(j){const L=[...j];let k=0;function y(){let M="";if(r.test(L[++k]))for(M+=L[k];a.test(L[++k]);)M+=L[k];else if(L[k]==='"'){let B=k;for(;k<L.length;){if(L[++k]==='"'){k++,B=0;break}L[k]==="\\"?M+=L[++k]:M+=L[k]}if(B)throw new TypeError(`Unterminated quote at ${B}: ${n}`)}if(!M)throw new TypeError(`Missing parameter name at ${k}: ${n}`);return M}for(;k<L.length;){const M=L[k],B=s[M];if(B)yield{type:B,index:k++,value:M};else if(M==="\\")yield{type:"ESCAPED",index:k++,value:L[k++]};else if(M===":"){const z=y();yield{type:"PARAM",index:k,value:z}}else if(M==="*"){const z=y();yield{type:"WILDCARD",index:k,value:z}}else yield{type:"CHAR",index:k,value:L[k++]}}return{type:"END",index:k,value:""}}class c{constructor(L){this.tokens=L}peek(){if(!this._peek){const L=this.tokens.next();this._peek=L.value}return this._peek}tryConsume(L){const k=this.peek();if(k.type===L)return this._peek=void 0,k.value}consume(L){const k=this.tryConsume(L);if(k!==void 0)return k;const{type:y,index:M}=this.peek();throw new TypeError(`Unexpected ${y} at ${M}, expected ${L}: ${n}`)}text(){let L="",k;for(;k=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)L+=k;return L}}class d{constructor(L){this.tokens=L}}xt.TokenData=d;function u(j,L={}){const{encodePath:k=t}=L,y=new c(l(j));function M(z){const D=[];for(;;){const re=y.text();re&&D.push({type:"text",value:k(re)});const Z=y.tryConsume("PARAM");if(Z){D.push({type:"param",name:Z});continue}const xe=y.tryConsume("WILDCARD");if(xe){D.push({type:"wildcard",name:xe});continue}if(y.tryConsume("{")){D.push({type:"group",tokens:M("}")});continue}return y.consume(z),D}}const B=M("END");return new d(B)}function p(j,L={}){const{encode:k=encodeURIComponent,delimiter:y=e}=L,M=j instanceof d?j:u(j,L),B=f(M.tokens,y,k);return function(D={}){const[re,...Z]=B(D);if(Z.length)throw new TypeError(`Missing parameters: ${Z.join(", ")}`);return re}}function f(j,L,k){const y=j.map(M=>g(M,L,k));return M=>{const B=[""];for(const z of y){const[D,...re]=z(M);B[0]+=D,B.push(...re)}return B}}function g(j,L,k){if(j.type==="text")return()=>[j.value];if(j.type==="group"){const M=f(j.tokens,L,k);return B=>{const[z,...D]=M(B);return D.length?[""]:[z]}}const y=k||t;return j.type==="wildcard"&&k!==!1?M=>{const B=M[j.name];if(B==null)return["",j.name];if(!Array.isArray(B)||B.length===0)throw new TypeError(`Expected "${j.name}" to be a non-empty array`);return[B.map((z,D)=>{if(typeof z!="string")throw new TypeError(`Expected "${j.name}/${D}" to be a string`);return y(z)}).join(L)]}:M=>{const B=M[j.name];if(B==null)return["",j.name];if(typeof B!="string")throw new TypeError(`Expected "${j.name}" to be a string`);return[y(B)]}}function h(j,L={}){const{decode:k=decodeURIComponent,delimiter:y=e}=L,{regexp:M,keys:B}=x(j,L),z=B.map(D=>k===!1?t:D.type==="param"?k:re=>re.split(y).map(k));return function(re){const Z=M.exec(re);if(!Z)return!1;const xe=Z[0],X=Object.create(null);for(let ce=1;ce<Z.length;ce++){if(Z[ce]===void 0)continue;const fe=B[ce-1],le=z[ce-1];X[fe.name]=le(Z[ce])}return{path:xe,params:X}}}function x(j,L={}){const{delimiter:k=e,end:y=!0,sensitive:M=!1,trailing:B=!0}=L,z=[],D=[],re=M?"":"i",xe=(Array.isArray(j)?j:[j]).map(fe=>fe instanceof d?fe:u(fe,L));for(const{tokens:fe}of xe)for(const le of E(fe,0,[])){const He=U(le,k,z);D.push(He)}let X=`^(?:${D.join("|")})`;return B&&(X+=`(?:${i(k)}$)?`),X+=y?"$":`(?=${i(k)}|$)`,{regexp:new RegExp(X,re),keys:z}}function*E(j,L,k){if(L===j.length)return yield k;const y=j[L];if(y.type==="group"){const M=k.slice();for(const B of E(y.tokens,0,M))yield*E(j,L+1,B)}else k.push(y);yield*E(j,L+1,k)}function U(j,L,k){let y="",M="",B=!0;for(let z=0;z<j.length;z++){const D=j[z];if(D.type==="text"){y+=i(D.value),M+=D.value,B||(B=D.value.includes(L));continue}if(D.type==="param"||D.type==="wildcard"){if(!B&&!M)throw new TypeError(`Missing text after "${D.name}": ${n}`);D.type==="param"?y+=`(${F(L,B?"":M)}+)`:y+="([\\s\\S]+)",k.push(D),M="",B=!1;continue}}return y}function F(j,L){return L.length<2?j.length<2?`[^${i(j+L)}]`:`(?:(?!${i(j)})[^${i(L)}])`:j.length<2?`(?:(?!${i(L)})[^${i(j)}])`:`(?:(?!${i(L)}|${i(j)})[\\s\\S])`}function N(j){return j.tokens.map(function L(k,y,M){if(k.type==="text")return o(k.value);if(k.type==="group")return`{${k.tokens.map(L).join("")}}`;const z=G(k.name)&&K(M[y+1])?k.name:JSON.stringify(k.name);if(k.type==="param")return`:${z}`;if(k.type==="wildcard")return`*${z}`;throw new TypeError(`Unexpected token: ${k}`)}).join("")}function G(j){const[L,...k]=j;return r.test(L)?k.every(y=>a.test(y)):!1}function K(j){return(j==null?void 0:j.type)!=="text"?!0:!a.test(j.value[0])}return xt}var s1=n1();function Yc(e,t,r){if(t.length!==e.length)return!0;for(let a=0;a<t.length;a++)if(Math.abs(t[a]-e[a])>r)return!1;return!0}function Xc(e,t,r){if(e===void 0&&t||e&&t===void 0)return!1;if(e===void 0||t===void 0)return!0;let a=0;return a+=Math.abs(e.orientation.x-t.orientation.x),a+=Math.abs(e.orientation.y-t.orientation.y),a+=Math.abs(e.orientation.z-t.orientation.z),a+=Math.abs(e.position.x-t.position.x),a+=Math.abs(e.position.y-t.position.y),a+=Math.abs(e.position.z-t.position.z),a>r?!1:e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp}var ol=1e-4,o1=class Zc{constructor(t,r,a,n,s,o,i,l,c,d,u,p){this.nova=t,this.controller=r,this.motionGroup=a,this.initialMotionState=n,this.motionStateSocket=s,this.isVirtual=o,this.tcps=i,this.motionGroupSpecification=l,this.safetySetup=c,this.mounting=d,this.initialControllerState=u,this.controllerStateSocket=p,this.connectedJoggingCartesianSocket=null,this.connectedJoggingJointsSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.rapidlyChangingMotionState=n,this.controllerState=u,p.addEventListener("message",f=>{var g;const h=(g=Kt(f.data))==null?void 0:g.result;h&&Be.runInAction(()=>{this.controllerState=h})}),s.addEventListener("message",f=>{var g;const h=(g=Kt(f.data))==null?void 0:g.result;if(!h)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${f.data}`);Yc(this.rapidlyChangingMotionState.state.joint_position.joints,h.state.joint_position.joints,ol)||Be.runInAction(()=>{this.rapidlyChangingMotionState.state=h.state}),Xc(this.rapidlyChangingMotionState.tcp_pose,h.tcp_pose,ol)||Be.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=h.tcp_pose})}),Be.makeAutoObservable(this)}static connect(t,r,a){return Ce(this,null,function*(){var n,s;const[o,i]=r.split("@"),l=a.find(K=>K.controller===i),c=l==null?void 0:l.physical_motion_groups.find(K=>K.motion_group===r);if(!l||!c)throw new Error(`Controller ${i} or motion group ${r} not found`);const d=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),u=yield d.firstMessage(),p=(n=Kt(u.data))==null?void 0:n.result;if(!p)throw new Error(`Unable to parse initial motion state message ${u.data}`);console.log(`Connected motion state websocket to motion group ${c.motion_group}. Initial state:
112
112
  `,p);const g=(yield t.api.controller.getRobotController(l.controller)).configuration.kind==="VirtualController",h=yield Ce(this,null,function*(){try{return yield t.api.motionGroupInfos.getMounting(c.motion_group)}catch(K){return console.error(`Error fetching mounting for ${c.motion_group}`,K),null}}),x=t.openReconnectingWebsocket(`/controllers/${l.controller}/state-stream?response_rate=1000`),E=yield x.firstMessage(),U=(s=Kt(E.data))==null?void 0:s.result;if(!U)throw new Error(`Unable to parse initial controller state message ${E.data}`);console.log(`Connected controller state websocket to controller ${l.controller}. Initial state:
113
113
  `,U);const{tcps:F}=yield t.api.motionGroupInfos.listTcps(r),N=yield t.api.motionGroupInfos.getMotionGroupSpecification(r),G=yield t.api.motionGroupInfos.getSafetySetup(r);return new Zc(t,l,c,p,d,g,F,N,G,h,U,x)})}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.motionGroup.model_from_controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replaceAll("-","_")}_${t}`}get joggingVelocityRads(){return this.joggingVelocity*Math.PI/180}get joints(){return this.initialMotionState.state.joint_position.joints.map((t,r)=>({index:r}))}get dhParameters(){return this.motionGroupSpecification.dh_parameters}get safetyZones(){return this.safetySetup.safety_zones}get mountingPosition(){return this.mounting?[this.mounting.pose.position.x/1e3,this.mounting.pose.position.y/1e3,this.mounting.pose.position.z/1e3]:[0,0,0]}get mountingQuaternion(){var t,r,a,n,s,o;const i=new Ie.Vector3(((r=(t=this.mounting)==null?void 0:t.pose.orientation)==null?void 0:r.x)||0,((n=(a=this.mounting)==null?void 0:a.pose.orientation)==null?void 0:n.y)||0,((o=(s=this.mounting)==null?void 0:s.pose.orientation)==null?void 0:o.z)||0),l=i.length(),c=i.normalize();return new Ie.Quaternion().setFromAxisAngle(c,l)}get isEstopActive(){return["SAFETY_STATE_ROBOT_EMERGENCY_STOP","SAFETY_STATE_DEVICE_EMERGENCY_STOP"].includes(this.controllerState.safety_state)}get isMoveableSafetyState(){return["SAFETY_STATE_NORMAL","SAFETY_STATE_REDUCED"].includes(this.controllerState.safety_state)}get isMoveableOperationMode(){return["OPERATION_MODE_AUTO","OPERATION_MODE_MANUAL","OPERATION_MODE_MANUAL_T1","OPERATION_MODE_MANUAL_T2"].includes(this.controllerState.operation_mode)}get canBeMoved(){return this.isMoveableSafetyState&&this.isMoveableOperationMode&&this.activationState==="active"}deactivate(){return Ce(this,null,function*(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}Be.runInAction(()=>{this.activationState="deactivating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_MONITOR"),Be.runInAction(()=>{this.activationState="inactive"})}catch(t){throw Be.runInAction(()=>{this.activationState="active"}),t}})}activate(){return Ce(this,null,function*(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}Be.runInAction(()=>{this.activationState="activating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_CONTROL"),Be.runInAction(()=>{this.activationState="active"})}catch(t){throw Be.runInAction(()=>{this.activationState="inactive"}),t}})}toggleActivation(){this.activationState==="inactive"?this.activate():this.activationState==="active"&&this.deactivate()}dispose(){this.motionStateSocket.close(),this.connectedJoggingCartesianSocket&&this.connectedJoggingCartesianSocket.close(),this.connectedJoggingJointsSocket&&this.connectedJoggingJointsSocket.close()}setJoggingVelocity(t){this.joggingVelocity=t}},i1=class ed{constructor(t,r={}){this.motionStream=t,this.opts=r,this.cartesianWebsocket=null,this.jointWebsocket=null,this.cartesianJoggingOpts={}}static open(t,r){return Ce(this,arguments,function*(a,n,s={}){const o=yield a.connectMotionStream(n);return new ed(o,s)})}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get numJoints(){return this.motionStream.joints.length}get activeJoggingMode(){return this.cartesianWebsocket?"cartesian":this.jointWebsocket?"joint":"increment"}get activeWebsocket(){return this.cartesianWebsocket||this.jointWebsocket}stop(){return Ce(this,null,function*(){this.cartesianWebsocket&&this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:{x:0,y:0,z:0},rotation_direction:{x:0,y:0,z:0},position_velocity:0,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId}),this.jointWebsocket&&this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:new Array(this.numJoints).fill(0)})})}dispose(){this.cartesianWebsocket&&this.cartesianWebsocket.dispose(),this.jointWebsocket&&this.jointWebsocket.dispose()}setJoggingMode(t,r){console.log("Setting jogging mode to",t),r&&(u0(this.cartesianJoggingOpts,r)||this.cartesianWebsocket&&(this.cartesianWebsocket.dispose(),this.cartesianWebsocket=null),this.cartesianJoggingOpts=r),t!=="cartesian"&&this.cartesianWebsocket&&(this.cartesianWebsocket.dispose(),this.cartesianWebsocket=null),t!=="joint"&&this.jointWebsocket&&(this.jointWebsocket.dispose(),this.jointWebsocket=null),t==="cartesian"&&!this.cartesianWebsocket&&(this.cartesianWebsocket=this.nova.openReconnectingWebsocket("/motion-groups/move-tcp"),this.cartesianWebsocket.addEventListener("message",a=>{const n=Kt(a.data);if(n&&"error"in n)if(this.opts.onError)this.opts.onError(a.data);else throw new Error(a.data)})),t==="joint"&&!this.jointWebsocket&&(this.jointWebsocket=this.nova.openReconnectingWebsocket("/motion-groups/move-joint"),this.jointWebsocket.addEventListener("message",a=>{const n=Kt(a.data);if(n&&"error"in n)if(this.opts.onError)this.opts.onError(a.data);else throw new Error(a.data)}))}startJointRotation(t){return Ce(this,arguments,function*({joint:r,direction:a,velocityRadsPerSec:n}){if(!this.jointWebsocket)throw new Error("Joint jogging websocket not connected; call setJoggingMode first");const s=new Array(this.numJoints).fill(0);s[r]=a==="-"?-n:n,this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:s})})}startTCPTranslation(t){return Ce(this,arguments,function*({axis:r,direction:a,velocityMmPerSec:n}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const s={x:0,y:0,z:0},o=Object.assign({},s);o[r]=a==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:o,rotation_direction:s,position_velocity:n,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}startTCPRotation(t){return Ce(this,arguments,function*({axis:r,direction:a,velocityRadsPerSec:n}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const s={x:0,y:0,z:0},o=Object.assign({},s);o[r]=a==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:s,rotation_direction:o,position_velocity:0,rotation_velocity:n,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}runIncrementalCartesianMotion(t){return Ce(this,arguments,function*({currentTcpPose:r,currentJoints:a,coordSystemId:n,velocityInRelevantUnits:s,axis:o,direction:i,motion:l}){var c;const d=[];if(!R0(r.coordinate_system,n))throw new Error(`Current TCP pose coordinate system ${r.coordinate_system} does not match target coordinate system ${n}`);if(l.type==="translate"){const f=Object.assign({},r.position);f[o]+=l.distanceMm*(i==="-"?-1:1),d.push({settings:{limits_override:{tcp_velocity_limit:s}},line:{position:f,orientation:r.orientation,coordinate_system:n}})}else if(l.type==="rotate"){const f=new Gr(r.orientation.x,r.orientation.y,r.orientation.z),g=f.length(),h=f.clone().normalize(),x=l.distanceRads*(i==="-"?-1:1),E=new Gr(0,0,0);E[o]=1;const U=Math.cos(.5*x)*Math.cos(.5*g),F=Math.sin(.5*x)*Math.sin(.5*g),N=Math.sin(.5*x)*Math.cos(.5*g),G=Math.cos(.5*x)*Math.sin(.5*g),K=E.dot(h),j=E.clone().cross(h),L=2*Math.acos(U-F*K),k=L/Math.sin(.5*L),y=new Gr().addScaledVector(j,F).addScaledVector(E,N).addScaledVector(h,G).multiplyScalar(k);d.push({settings:{limits_override:{tcp_orientation_velocity_limit:s}},line:{position:r.position,orientation:y,coordinate_system:n}})}const u=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:a,tcp:this.cartesianJoggingOpts.tcpId,commands:d}),p=(c=u.plan_successful_response)==null?void 0:c.motion;if(!p)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(u)}`);yield this.nova.api.motion.streamMoveForward(p,100,void 0,void 0,void 0,{timeout:1e3*60})})}runIncrementalJointRotation(t){return Ce(this,arguments,function*({joint:r,currentJoints:a,velocityRadsPerSec:n,direction:s,distanceRads:o}){var i;const l=[...a.joints];l[r]+=o*(s==="-"?-1:1);const c=new Array(a.joints.length).fill(n),d=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:a,commands:[{settings:{limits_override:{joint_velocity_limits:{joints:c}}},joint_ptp:{joints:l}}]}),u=(i=d.plan_successful_response)==null?void 0:i.motion;if(!u){console.error("Failed to plan jogging increment motion",d);return}yield this.nova.api.motion.streamMoveForward(u,100,void 0,void 0,void 0,{timeout:1e3*60})})}},il=1e-4;function l1(e,t){const r=new ht.Vector3(t.x,t.y,t.z),a=new ht.Vector3(e.x,e.y,e.z),n=r.length(),s=r.normalize();let o=a.length(),i=a.normalize();i.dot(s)<0&&(o=-o,i=i.multiplyScalar(-1));let l=o-n;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),o=n+l,i.multiplyScalar(o)}var c1=class td{constructor(t,r,a,n,s){this.nova=t,this.controller=r,this.motionGroup=a,this.initialMotionState=n,this.motionStateSocket=s,this.rapidlyChangingMotionState=n,s.addEventListener("message",o=>{var i;const l=(i=Kt(o.data))==null?void 0:i.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${o.data}`);Yc(this.rapidlyChangingMotionState.state.joint_position.joints,l.state.joint_position.joints,il)||Be.runInAction(()=>{this.rapidlyChangingMotionState.state=l.state}),Xc(this.rapidlyChangingMotionState.tcp_pose,l.tcp_pose,il)||Be.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:l1(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation),tcp:l.tcp_pose.tcp,coordinate_system:l.tcp_pose.coordinate_system}})}),Be.makeAutoObservable(this)}static open(t,r){return Ce(this,null,function*(){var a;const{instances:n}=yield t.api.controller.listControllers(),[s,o]=r.split("@"),i=n.find(p=>p.controller===o),l=i==null?void 0:i.physical_motion_groups.find(p=>p.motion_group===r);if(!i||!l)throw new Error(`Controller ${o} or motion group ${r} not found`);const c=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),d=yield c.firstMessage();console.log("got first message",d);const u=(a=Kt(d.data))==null?void 0:a.result;if(!u)throw new Error(`Unable to parse initial motion state message ${d.data}`);return console.log(`Connected motion state websocket to motion group ${l.motion_group}. Initial state:
114
- `,u),new td(t,i,l,u,c)})}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.motionGroup.model_from_controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replaceAll("-","_")}_${t}`}get joints(){return this.initialMotionState.state.joint_position.joints.map((t,r)=>({index:r}))}dispose(){this.motionStateSocket.close()}},d1=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(qv),this.cell=this.withUnwrappedResponsesOnly(cv),this.deviceConfig=this.withCellId(yv),this.motionGroup=this.withCellId(Av),this.motionGroupInfos=this.withCellId(Ev),this.controller=this.withCellId(uv),this.program=this.withCellId(Lv),this.programValues=this.withCellId(Bv),this.controllerIOs=this.withCellId(hv),this.motionGroupKinematic=this.withCellId($v),this.motion=this.withCellId(Rv),this.coordinateSystems=this.withCellId(fv),this.application=this.withCellId(al),this.applicationGlobal=this.withUnwrappedResponsesOnly(al),this.motionGroupJogging=this.withCellId(Mv),this.virtualRobot=this.withCellId(Kv),this.virtualRobotSetup=this.withCellId(t1),this.virtualRobotMode=this.withCellId(Zv),this.virtualRobotBehavior=this.withCellId(Yv),this.libraryProgramMetadata=this.withCellId(xv),this.libraryProgram=this.withCellId(Sv),this.libraryRecipeMetadata=this.withCellId(Pv),this.libraryRecipe=this.withCellId(wv),this.storeObject=this.withCellId(Jv),this.storeCollisionComponents=this.withCellId(Nv),this.storeCollisionScenes=this.withCellId(zv)}withCellId(e){var t,r;const a=new e(qs(Fr({},this.opts),{isJsonMime:n=>n==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:O.create());for(const n of Reflect.ownKeys(Reflect.getPrototypeOf(a)))if(n!=="constructor"&&typeof a[n]=="function"){const s=a[n];a[n]=(...o)=>s.apply(a,[this.cellId,...o]).then(i=>i.data)}return a}withUnwrappedResponsesOnly(e){var t,r;const a=new e(qs(Fr({},this.opts),{isJsonMime:n=>n==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:O.create());for(const n of Reflect.ownKeys(Reflect.getPrototypeOf(a)))if(n!=="constructor"&&typeof a[n]=="function"){const s=a[n];a[n]=(...o)=>s.apply(a,o).then(i=>i.data)}return a}},u1=class{constructor(){this.connections=[]}handleAPIRequest(e){return Ce(this,null,function*(){var t,r,a;const n=[{method:"GET",path:"/cells/:cellId/controllers",handle(){return{instances:[{controller:"mock-ur5e",model_name:"UniversalRobots::Controller",host:"mock-ur5e",allow_software_install_on_controller:!0,physical_motion_groups:[{motion_group:"0@mock-ur5e",name_from_controller:"UR5e",active:!1,model_from_controller:"UniversalRobots_UR5e"}],has_error:!1,error_details:""}]}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId",handle(){return{configuration:{kind:"VirtualController",manufacturer:"universalrobots",position:"[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",type:"universalrobots-ur5e"},name:"mock-ur5"}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/specification",handle(){return{dh_parameters:[{alpha:1.5707963267948966,theta:0,a:0,d:162.25,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-425,d:0,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-392.2,d:0,reverse_rotation_direction:!1},{alpha:1.5707963267948966,theta:0,a:0,d:133.3,reverse_rotation_direction:!1},{alpha:-1.5707963267948966,theta:0,a:0,d:99.7,reverse_rotation_direction:!1},{alpha:0,theta:0,a:0,d:99.6,reverse_rotation_direction:!1}],mechanical_joint_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/safety-setup",handle(){return{safety_settings:[{safety_state:"SAFETY_NORMAL",settings:{joint_position_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-2.96705961227417,upper_limit:2.96705961227417,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-1.7453292608261108,upper_limit:2.7925267219543457,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-3.3161256313323975,upper_limit:.40142571926116943,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-3.4906585216522217,upper_limit:3.4906585216522217,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-2.4434609413146973,upper_limit:2.4434609413146973,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-4.71238899230957,upper_limit:4.71238899230957,unlimited:!1}],joint_velocity_limits:[{joint:"JOINTNAME_AXIS_1",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_2",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_3",limit:3.4906585216522217},{joint:"JOINTNAME_AXIS_4",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_5",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_6",limit:6.981317043304443}],joint_acceleration_limits:[],joint_torque_limits:[],tcp_velocity_limit:1800}}],safety_zones:[{id:1,priority:0,geometry:{compound:{child_geometries:[{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820},{x:-800,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:-1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:-800,y:1330,z:-1820},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500},{x:1650,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:1650,y:-1330,z:1500},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Cell workzone"},motion_group_uid:1},{id:2,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-1850},{x:865,y:1330,z:-1850},{x:865,y:-720,z:-1850},{x:1650,y:-720,z:-1850},{x:1650,y:1330,z:-920},{x:865,y:1330,z:-920},{x:865,y:-720,z:-920},{x:1650,y:-720,z:-920}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Transport"},motion_group_uid:1},{id:3,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-600},{x:865,y:1330,z:-600},{x:865,y:430,z:-600},{x:1650,y:430,z:-600},{x:1650,y:1330,z:-1250},{x:865,y:1330,z:-1250},{x:865,y:430,z:-1250},{x:1650,y:430,z:-1250}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Tunel"},motion_group_uid:1},{id:4,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:-760,z:-440},{x:900,y:-760,z:-440},{x:900,y:-1330,z:-440},{x:1650,y:-1330,z:-440},{x:1650,y:-760,z:-1800},{x:900,y:-760,z:-1800},{x:900,y:-1330,z:-1800},{x:1650,y:-1330,z:-1800}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Fanuc controller"},motion_group_uid:1},{id:6,priority:0,geometry:{convex_hull:{vertices:[{x:-200,y:-200,z:-1900},{x:200,y:-200,z:-1900},{x:200,y:200,z:-1900},{x:-200,y:200,z:-1900},{x:-200,y:-200,z:-350},{x:200,y:-200,z:-350},{x:200,y:200,z:-350},{x:-200,y:200,z:-350}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Robot base"},motion_group_uid:1}],robot_model_geometries:[{link_index:1,geometry:{sphere:{radius:270},init_pose:{position:{x:-70,y:-70,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link1_sphere"}},{link_index:2,geometry:{capsule:{radius:160,cylinder_height:800},init_pose:{position:{x:-450,y:40,z:170},orientation:{x:0,y:-.7071067811865475,z:0,w:.7071067811865476}},id:"link2_capsule"}},{link_index:3,geometry:{sphere:{radius:270},init_pose:{position:{x:-110,y:10,z:-100},orientation:{x:0,y:0,z:0,w:1}},id:"link3_sphere"}},{link_index:4,geometry:{capsule:{radius:110,cylinder_height:600},init_pose:{position:{x:0,y:300,z:40},orientation:{x:-.7071067811865475,y:0,z:0,w:.7071067811865476}},id:"link4_capsule"}},{link_index:5,geometry:{sphere:{radius:75},init_pose:{position:{x:0,y:0,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link5_sphere"}}],tool_geometries:[]}}},{method:"GET",path:"/cells/:cellId/coordinate-systems",handle(){return{coordinatesystems:[{coordinate_system:"",name:"world",reference_uid:"",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0],type:"ROTATION_VECTOR"}}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/tcps",handle(){return{tcps:[{id:"Flange",readable_name:"Default-Flange",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0,0],type:"ROTATION_VECTOR"}},{id:"complex-tcp-position",readable_name:"Complex TCP Position",position:{x:-200,y:300,z:150},rotation:{angles:[-.12139440409113832,-.06356210998212003,-.2023240068185639,0],type:"ROTATION_VECTOR"}}]}}}],s=((t=e.method)==null?void 0:t.toUpperCase())||"GET",o="/cells"+((a=(r=e.url)==null?void 0:r.split("/cells")[1])==null?void 0:a.split("?")[0]);for(const i of n){const l=s1.match(i.path)(o||"");if(s===i.method&&l){const c=i.handle();return{status:200,statusText:"Success",data:JSON.stringify(c),headers:{},config:e,request:{responseURL:e.url}}}}throw new eo(`No mock handler matched this request: ${s} ${o}`,"404",e)})}handleWebsocketConnection(e){this.connections.push(e),setTimeout(()=>{e.dispatchEvent(new Event("open")),console.log("Websocket connection opened from",e.url),e.url.includes("/state-stream")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify(p1)})),e.url.includes("/move-joint")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{motion_group:"0@ur",state:{controller:"ur",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",timestamp:"2024-09-18T12:48:26.096266444Z",velocity_override:100,motion_groups:[{motion_group:"0@ur",controller:"ur",joint_position:{joints:[1.3492152690887451,-1.5659207105636597,1.6653711795806885,-1.0991662740707397,-1.829018235206604,1.264623761177063]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:6.437331889439328,y:-628.4123774830913,z:577.0569957147832},orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:""},tcp_pose:{position:{x:6.437331889439328,y:-628.4123774830913,z:577.0569957147832},orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:-0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"671259"}],sequence_number:"671259"},movement_state:"MOVEMENT_STATE_MOVING"}})})),e.url.includes("/move-tcp")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{motion_group:"0@ur",state:{controller:"ur",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",timestamp:"2024-09-18T12:43:12.188335774Z",velocity_override:100,motion_groups:[{motion_group:"0@ur",controller:"ur",joint_position:{joints:[1.3352527618408203,-1.5659207105636597,1.6653711795806885,-1.110615611076355,-1.829018235206604,1.264623761177063]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:-2.763015284002938,y:-630.2151479701106,z:577.524509114342},orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:""},tcp_pose:{position:{x:-2.763015284002938,y:-630.2151479701106,z:577.524509114342},orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:-0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"627897"}],sequence_number:"627897"},movement_state:"MOVEMENT_STATE_MOVING"}})}))},10)}handleWebsocketMessage(e,t){console.log(`Received message on ${e.url}`,t)}},p1={result:{state:{motion_group:"0@universalrobots-ur5e",controller:"universalrobots-ur5e",joint_position:{joints:[1.1699999570846558,-1.5700000524520874,1.3600000143051147,1.0299999713897705,1.2899999618530273,1.2799999713897705]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:1.3300010259703043,y:-409.2680714682808,z:531.0203477065281},orientation:{x:1.7564919306270736,y:-1.7542521568325058,z:.7326972590614671},coordinate_system:""},tcp_pose:{position:{x:1.3300010259703043,y:-409.2680714682808,z:531.0203477065281},orientation:{x:1.7564919306270736,y:-1.7542521568325058,z:.7326972590614671},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]}},tcp_pose:{position:{x:302.90748476115556,y:-152.87065869452337,z:424.0454619321661},orientation:{x:2.3403056115045353,y:-1.1706836379431356,z:.9772511964246311},coordinate_system:"",tcp:"Flange"}}},h1=class{constructor(e){this.authPromise=null,this.accessToken=null;var t;const r=(t=e.cellId)!=null?t:"cell";this.config=Fr({cellId:r},e),this.accessToken=e.accessToken||ws.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"&&(this.mock=new u1);const a=O.create({baseURL:Ts(this.config.instanceUrl,"/api/v1")});a.interceptors.request.use(n=>Ce(this,null,function*(){return n.headers.Authorization||(this.accessToken?n.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(n.headers.Authorization=`Basic ${btoa(e.username+":"+e.password)}`)),n})),typeof window<"u"&&a.interceptors.response.use(n=>n,n=>Ce(this,null,function*(){var s,o;if(sv(n))if(((s=n.response)==null?void 0:s.status)===401)try{if(yield this.renewAuthentication(),n.config)return this.accessToken?n.config.headers.Authorization=`Bearer ${this.accessToken}`:delete n.config.headers.Authorization,a.request(n.config)}catch(i){return Promise.reject(i)}else((o=n.response)==null?void 0:o.status)===503&&(yield fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(n)})),this.api=new d1(r,qs(Fr({},e),{basePath:Ts(this.config.instanceUrl,"/api/v1"),isJsonMime:n=>n==="application/json",baseOptions:Fr(Fr({},this.mock?{adapter:n=>this.mock.handleAPIRequest(n)}:{}),e.baseOptions),axiosInstance:a}))}renewAuthentication(){return Ce(this,null,function*(){if(!this.authPromise){this.authPromise=A0(this.config.instanceUrl);try{this.accessToken=yield this.authPromise,this.accessToken?ws.setString("wbjs.access_token",this.accessToken):ws.delete("wbjs.access_token")}finally{this.authPromise=null}}})}makeWebsocketURL(e){const t=new URL(Ts(this.config.instanceUrl,`/api/v1/cells/${this.config.cellId}`,e));return t.protocol=t.protocol.replace("http","ws"),t.protocol=t.protocol.replace("https","wss"),this.accessToken?t.searchParams.append("token",this.accessToken):this.config.username&&this.config.password&&(t.username=this.config.username,t.password=this.config.password),t.toString()}openReconnectingWebsocket(e){return new P0(this.makeWebsocketURL(e),{mock:this.mock})}connectMotionStream(e){return Ce(this,null,function*(){return yield c1.open(this,e)})}connectJogger(e){return Ce(this,null,function*(){return yield i1.open(this,e)})}connectMotionGroups(e){return Ce(this,null,function*(){const{instances:t}=yield this.api.controller.listControllers();return Promise.all(e.map(r=>o1.connect(this,r,t)))})}connectMotionGroup(e){return Ce(this,null,function*(){return(yield this.connectMotionGroups([e]))[0]})}};function m1(e){try{return JSON.stringify(e)}catch{return}}function f1(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function g1(e){var t,r,a,n;return e instanceof eo&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof eo&&e.response?`${(t=e.response)==null?void 0:t.status} ${(r=e.response)==null?void 0:r.statusText} from ${(a=e.response)==null?void 0:a.config.url}: ${JSON.stringify((n=e.response)==null?void 0:n.data)}`:e instanceof Error?e.message:`Unexpected error: ${m1(e)||e}`}const vo=e=>{const t=e.softTimeout||3e3,[r,a]=ae.useState(!1),n=q.useTheme();return ae.useEffect(()=>{const s=setTimeout(()=>{a(!0)},t);return()=>clearTimeout(s)}),b.jsx(q.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:n.palette.text.primary},children:e.error?b.jsx(rd,{loadingMessage:e.message,error:e.error}):b.jsxs(b.Fragment,{children:[b.jsx(q.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&b.jsx("div",{children:e.message}),b.jsx(q.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:n.palette.text.secondary},children:"This is taking longer than expected..."})]})})},rd=e=>{const t=g1(e.error),r=e.error instanceof Error?e.error.stack:null,a=q.useTheme();return b.jsxs(q.Stack,{sx:{maxHeight:"100%",maxWidth:"min(100%, 800px)",padding:2,overflow:"auto",color:a.palette.error.main,"& pre":{whiteSpace:"pre-wrap",wordBreak:"break-word",paddingBottom:"3rem"}},children:[(e.loadingMessage?`Error while ${lo.lowerFirst(q.capitalize(e.loadingMessage))} - `:"")+t,b.jsx("br",{}),r&&b.jsx("pre",{children:r})]})},y1=({title:e,titleId:t,...r},a)=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),b1=ae.forwardRef(y1),S1=({title:e,titleId:t,...r},a)=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),v1=ae.forwardRef(S1),x1=({title:e,titleId:t,...r},a)=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),O1=ae.forwardRef(x1),w1=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),C1=ae.forwardRef(w1);function P1(){this.__data__=[],this.size=0}function ad(e,t){return e===t||e!==e&&t!==t}function rs(e,t){for(var r=e.length;r--;)if(ad(e[r][0],t))return r;return-1}var V1=Array.prototype,R1=V1.splice;function _1(e){var t=this.__data__,r=rs(t,e);if(r<0)return!1;var a=t.length-1;return r==a?t.pop():R1.call(t,r,1),--this.size,!0}function A1(e){var t=this.__data__,r=rs(t,e);return r<0?void 0:t[r][1]}function T1(e){return rs(this.__data__,e)>-1}function E1(e,t){var r=this.__data__,a=rs(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}function Lt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}Lt.prototype.clear=P1;Lt.prototype.delete=_1;Lt.prototype.get=A1;Lt.prototype.has=T1;Lt.prototype.set=E1;function I1(){this.__data__=new Lt,this.size=0}function M1(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function j1(e){return this.__data__.get(e)}function $1(e){return this.__data__.has(e)}var U1="[object AsyncFunction]",L1="[object Function]",k1="[object GeneratorFunction]",B1="[object Proxy]";function nd(e){if(!dr(e))return!1;var t=fr(e);return t==L1||t==k1||t==U1||t==B1}var Es=Rt["__core-js_shared__"],ll=function(){var e=/[^.]+$/.exec(Es&&Es.keys&&Es.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function F1(e){return!!ll&&ll in e}var N1=Function.prototype,D1=N1.toString;function yr(e){if(e!=null){try{return D1.call(e)}catch{}try{return e+""}catch{}}return""}var z1=/[\\^$.*+?()[\]{}|]/g,G1=/^\[object .+?Constructor\]$/,J1=Function.prototype,H1=Object.prototype,q1=J1.toString,W1=H1.hasOwnProperty,K1=RegExp("^"+q1.call(W1).replace(z1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Q1(e){if(!dr(e)||F1(e))return!1;var t=nd(e)?K1:G1;return t.test(yr(e))}function Y1(e,t){return e==null?void 0:e[t]}function br(e,t){var r=Y1(e,t);return Q1(r)?r:void 0}var $a=br(Rt,"Map"),Ua=br(Object,"create");function X1(){this.__data__=Ua?Ua(null):{},this.size=0}function Z1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ex="__lodash_hash_undefined__",tx=Object.prototype,rx=tx.hasOwnProperty;function ax(e){var t=this.__data__;if(Ua){var r=t[e];return r===ex?void 0:r}return rx.call(t,e)?t[e]:void 0}var nx=Object.prototype,sx=nx.hasOwnProperty;function ox(e){var t=this.__data__;return Ua?t[e]!==void 0:sx.call(t,e)}var ix="__lodash_hash_undefined__";function lx(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ua&&t===void 0?ix:t,this}function hr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}hr.prototype.clear=X1;hr.prototype.delete=Z1;hr.prototype.get=ax;hr.prototype.has=ox;hr.prototype.set=lx;function cx(){this.size=0,this.__data__={hash:new hr,map:new($a||Lt),string:new hr}}function dx(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function as(e,t){var r=e.__data__;return dx(t)?r[typeof t=="string"?"string":"hash"]:r.map}function ux(e){var t=as(this,e).delete(e);return this.size-=t?1:0,t}function px(e){return as(this,e).get(e)}function hx(e){return as(this,e).has(e)}function mx(e,t){var r=as(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}function kt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}kt.prototype.clear=cx;kt.prototype.delete=ux;kt.prototype.get=px;kt.prototype.has=hx;kt.prototype.set=mx;var fx=200;function gx(e,t){var r=this.__data__;if(r instanceof Lt){var a=r.__data__;if(!$a||a.length<fx-1)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new kt(a)}return r.set(e,t),this.size=r.size,this}function jt(e){var t=this.__data__=new Lt(e);this.size=t.size}jt.prototype.clear=I1;jt.prototype.delete=M1;jt.prototype.get=j1;jt.prototype.has=$1;jt.prototype.set=gx;var yx="__lodash_hash_undefined__";function bx(e){return this.__data__.set(e,yx),this}function Sx(e){return this.__data__.has(e)}function An(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new kt;++t<r;)this.add(e[t])}An.prototype.add=An.prototype.push=bx;An.prototype.has=Sx;function vx(e,t){for(var r=-1,a=e==null?0:e.length;++r<a;)if(t(e[r],r,e))return!0;return!1}function xx(e,t){return e.has(t)}var Ox=1,wx=2;function sd(e,t,r,a,n,s){var o=r&Ox,i=e.length,l=t.length;if(i!=l&&!(o&&l>i))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var u=-1,p=!0,f=r&wx?new An:void 0;for(s.set(e,t),s.set(t,e);++u<i;){var g=e[u],h=t[u];if(a)var x=o?a(h,g,u,t,e,s):a(g,h,u,e,t,s);if(x!==void 0){if(x)continue;p=!1;break}if(f){if(!vx(t,function(E,U){if(!xx(f,U)&&(g===E||n(g,E,r,a,s)))return f.push(U)})){p=!1;break}}else if(!(g===h||n(g,h,r,a,s))){p=!1;break}}return s.delete(e),s.delete(t),p}var cl=Rt.Uint8Array;function Cx(e){var t=-1,r=Array(e.size);return e.forEach(function(a,n){r[++t]=[n,a]}),r}function Px(e){var t=-1,r=Array(e.size);return e.forEach(function(a){r[++t]=a}),r}var Vx=1,Rx=2,_x="[object Boolean]",Ax="[object Date]",Tx="[object Error]",Ex="[object Map]",Ix="[object Number]",Mx="[object RegExp]",jx="[object Set]",$x="[object String]",Ux="[object Symbol]",Lx="[object ArrayBuffer]",kx="[object DataView]",dl=Xt?Xt.prototype:void 0,Is=dl?dl.valueOf:void 0;function Bx(e,t,r,a,n,s,o){switch(r){case kx:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Lx:return!(e.byteLength!=t.byteLength||!s(new cl(e),new cl(t)));case _x:case Ax:case Ix:return ad(+e,+t);case Tx:return e.name==t.name&&e.message==t.message;case Mx:case $x:return e==t+"";case Ex:var i=Cx;case jx:var l=a&Vx;if(i||(i=Px),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;a|=Rx,o.set(e,t);var d=sd(i(e),i(t),a,n,s,o);return o.delete(e),d;case Ux:if(Is)return Is.call(e)==Is.call(t)}return!1}function Fx(e,t){for(var r=-1,a=t.length,n=e.length;++r<a;)e[n+r]=t[r];return e}var Vt=Array.isArray;function Nx(e,t,r){var a=t(e);return Vt(e)?a:Fx(a,r(e))}function Dx(e,t){for(var r=-1,a=e==null?0:e.length,n=0,s=[];++r<a;){var o=e[r];t(o,r,e)&&(s[n++]=o)}return s}function zx(){return[]}var Gx=Object.prototype,Jx=Gx.propertyIsEnumerable,ul=Object.getOwnPropertySymbols,Hx=ul?function(e){return e==null?[]:(e=Object(e),Dx(ul(e),function(t){return Jx.call(e,t)}))}:zx;function qx(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}var Wx="[object Arguments]";function pl(e){return ur(e)&&fr(e)==Wx}var od=Object.prototype,Kx=od.hasOwnProperty,Qx=od.propertyIsEnumerable,id=pl(function(){return arguments}())?pl:function(e){return ur(e)&&Kx.call(e,"callee")&&!Qx.call(e,"callee")};function Yx(){return!1}var ld=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hl=ld&&typeof module=="object"&&module&&!module.nodeType&&module,Xx=hl&&hl.exports===ld,ml=Xx?Rt.Buffer:void 0,Zx=ml?ml.isBuffer:void 0,ro=Zx||Yx,eO=9007199254740991,tO=/^(?:0|[1-9]\d*)$/;function cd(e,t){var r=typeof e;return t=t??eO,!!t&&(r=="number"||r!="symbol"&&tO.test(e))&&e>-1&&e%1==0&&e<t}var rO=9007199254740991;function xo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=rO}var aO="[object Arguments]",nO="[object Array]",sO="[object Boolean]",oO="[object Date]",iO="[object Error]",lO="[object Function]",cO="[object Map]",dO="[object Number]",uO="[object Object]",pO="[object RegExp]",hO="[object Set]",mO="[object String]",fO="[object WeakMap]",gO="[object ArrayBuffer]",yO="[object DataView]",bO="[object Float32Array]",SO="[object Float64Array]",vO="[object Int8Array]",xO="[object Int16Array]",OO="[object Int32Array]",wO="[object Uint8Array]",CO="[object Uint8ClampedArray]",PO="[object Uint16Array]",VO="[object Uint32Array]",we={};we[bO]=we[SO]=we[vO]=we[xO]=we[OO]=we[wO]=we[CO]=we[PO]=we[VO]=!0;we[aO]=we[nO]=we[gO]=we[sO]=we[yO]=we[oO]=we[iO]=we[lO]=we[cO]=we[dO]=we[uO]=we[pO]=we[hO]=we[mO]=we[fO]=!1;function RO(e){return ur(e)&&xo(e.length)&&!!we[fr(e)]}function _O(e){return function(t){return e(t)}}var dd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Va=dd&&typeof module=="object"&&module&&!module.nodeType&&module,AO=Va&&Va.exports===dd,Ms=AO&&cc.process,fl=function(){try{var e=Va&&Va.require&&Va.require("util").types;return e||Ms&&Ms.binding&&Ms.binding("util")}catch{}}(),gl=fl&&fl.isTypedArray,ud=gl?_O(gl):RO,TO=Object.prototype,EO=TO.hasOwnProperty;function IO(e,t){var r=Vt(e),a=!r&&id(e),n=!r&&!a&&ro(e),s=!r&&!a&&!n&&ud(e),o=r||a||n||s,i=o?qx(e.length,String):[],l=i.length;for(var c in e)EO.call(e,c)&&!(o&&(c=="length"||n&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||cd(c,l)))&&i.push(c);return i}var MO=Object.prototype;function jO(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||MO;return e===r}function $O(e,t){return function(r){return e(t(r))}}var UO=$O(Object.keys,Object),LO=Object.prototype,kO=LO.hasOwnProperty;function BO(e){if(!jO(e))return UO(e);var t=[];for(var r in Object(e))kO.call(e,r)&&r!="constructor"&&t.push(r);return t}function pd(e){return e!=null&&xo(e.length)&&!nd(e)}function Oo(e){return pd(e)?IO(e):BO(e)}function yl(e){return Nx(e,Oo,Hx)}var FO=1,NO=Object.prototype,DO=NO.hasOwnProperty;function zO(e,t,r,a,n,s){var o=r&FO,i=yl(e),l=i.length,c=yl(t),d=c.length;if(l!=d&&!o)return!1;for(var u=l;u--;){var p=i[u];if(!(o?p in t:DO.call(t,p)))return!1}var f=s.get(e),g=s.get(t);if(f&&g)return f==t&&g==e;var h=!0;s.set(e,t),s.set(t,e);for(var x=o;++u<l;){p=i[u];var E=e[p],U=t[p];if(a)var F=o?a(U,E,p,t,e,s):a(E,U,p,e,t,s);if(!(F===void 0?E===U||n(E,U,r,a,s):F)){h=!1;break}x||(x=p=="constructor")}if(h&&!x){var N=e.constructor,G=t.constructor;N!=G&&"constructor"in e&&"constructor"in t&&!(typeof N=="function"&&N instanceof N&&typeof G=="function"&&G instanceof G)&&(h=!1)}return s.delete(e),s.delete(t),h}var ao=br(Rt,"DataView"),no=br(Rt,"Promise"),so=br(Rt,"Set"),oo=br(Rt,"WeakMap"),bl="[object Map]",GO="[object Object]",Sl="[object Promise]",vl="[object Set]",xl="[object WeakMap]",Ol="[object DataView]",JO=yr(ao),HO=yr($a),qO=yr(no),WO=yr(so),KO=yr(oo),qt=fr;(ao&&qt(new ao(new ArrayBuffer(1)))!=Ol||$a&&qt(new $a)!=bl||no&&qt(no.resolve())!=Sl||so&&qt(new so)!=vl||oo&&qt(new oo)!=xl)&&(qt=function(e){var t=fr(e),r=t==GO?e.constructor:void 0,a=r?yr(r):"";if(a)switch(a){case JO:return Ol;case HO:return bl;case qO:return Sl;case WO:return vl;case KO:return xl}return t});var QO=1,wl="[object Arguments]",Cl="[object Array]",tn="[object Object]",YO=Object.prototype,Pl=YO.hasOwnProperty;function XO(e,t,r,a,n,s){var o=Vt(e),i=Vt(t),l=o?Cl:qt(e),c=i?Cl:qt(t);l=l==wl?tn:l,c=c==wl?tn:c;var d=l==tn,u=c==tn,p=l==c;if(p&&ro(e)){if(!ro(t))return!1;o=!0,d=!1}if(p&&!d)return s||(s=new jt),o||ud(e)?sd(e,t,r,a,n,s):Bx(e,t,l,r,a,n,s);if(!(r&QO)){var f=d&&Pl.call(e,"__wrapped__"),g=u&&Pl.call(t,"__wrapped__");if(f||g){var h=f?e.value():e,x=g?t.value():t;return s||(s=new jt),n(h,x,r,a,s)}}return p?(s||(s=new jt),zO(e,t,r,a,n,s)):!1}function ns(e,t,r,a,n){return e===t?!0:e==null||t==null||!ur(e)&&!ur(t)?e!==e&&t!==t:XO(e,t,r,a,ns,n)}function ZO(e,t){return ns(e,t)}const hd=({store:e})=>{const{t}=Me.useTranslation(),[r,a]=ae.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),n=ae.useRef(r);Wr(()=>{const o=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;ZO(n.current,o)||(n.current=o,a(o))});const s=[];for(const[o,i]of r.entries())i&&s.push(o);return b.jsx(q.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:s.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:s.map(o=>o+1).join(", ")})})},ew=q.styled(q.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 rn({labelValue:e,...t}){return b.jsxs(ew,{fullWidth:!0,variant:"filled",children:[b.jsx(q.InputLabel,{id:t.labelId,children:e}),b.jsx(q.Select,{...t})]})}var Vl=function(){try{var e=br(Object,"defineProperty");return e({},"",{}),e}catch{}}();function tw(e,t,r){t=="__proto__"&&Vl?Vl(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function rw(e,t,r,a){for(var n=-1,s=e==null?0:e.length;++n<s;){var o=e[n];t(a,o,r(o),e)}return a}function aw(e){return function(t,r,a){for(var n=-1,s=Object(t),o=a(t),i=o.length;i--;){var l=o[++n];if(r(s[l],l,s)===!1)break}return t}}var nw=aw();function sw(e,t){return e&&nw(e,t,Oo)}function ow(e,t){return function(r,a){if(r==null)return r;if(!pd(r))return e(r,a);for(var n=r.length,s=-1,o=Object(r);++s<n&&a(o[s],s,o)!==!1;);return r}}var iw=ow(sw);function lw(e,t,r,a){return iw(e,function(n,s,o){t(a,n,r(n),o)}),a}var cw=1,dw=2;function uw(e,t,r,a){var n=r.length,s=n;if(e==null)return!s;for(e=Object(e);n--;){var o=r[n];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++n<s;){o=r[n];var i=o[0],l=e[i],c=o[1];if(o[2]){if(l===void 0&&!(i in e))return!1}else{var d=new jt,u;if(!(u===void 0?ns(c,l,cw|dw,a,d):u))return!1}}return!0}function md(e){return e===e&&!dr(e)}function pw(e){for(var t=Oo(e),r=t.length;r--;){var a=t[r],n=e[a];t[r]=[a,n,md(n)]}return t}function fd(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function hw(e){var t=pw(e);return t.length==1&&t[0][2]?fd(t[0][0],t[0][1]):function(r){return r===e||uw(r,e,t)}}var mw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fw=/^\w*$/;function wo(e,t){if(Vt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Hn(e)?!0:fw.test(e)||!mw.test(e)||t!=null&&e in Object(t)}var gw="Expected a function";function Co(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(gw);var r=function(){var a=arguments,n=t?t.apply(this,a):a[0],s=r.cache;if(s.has(n))return s.get(n);var o=e.apply(this,a);return r.cache=s.set(n,o)||s,o};return r.cache=new(Co.Cache||kt),r}Co.Cache=kt;var yw=500;function bw(e){var t=Co(e,function(a){return r.size===yw&&r.clear(),a}),r=t.cache;return t}var Sw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vw=/\\(\\)?/g,xw=bw(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Sw,function(r,a,n,s){t.push(n?s.replace(vw,"$1"):a||r)}),t});function Ow(e,t){for(var r=-1,a=e==null?0:e.length,n=Array(a);++r<a;)n[r]=t(e[r],r,e);return n}var Rl=Xt?Xt.prototype:void 0,_l=Rl?Rl.toString:void 0;function gd(e){if(typeof e=="string")return e;if(Vt(e))return Ow(e,gd)+"";if(Hn(e))return _l?_l.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function yd(e){return e==null?"":gd(e)}function bd(e,t){return Vt(e)?e:wo(e,t)?[e]:xw(yd(e))}function ss(e){if(typeof e=="string"||Hn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Sd(e,t){t=bd(t,e);for(var r=0,a=t.length;e!=null&&r<a;)e=e[ss(t[r++])];return r&&r==a?e:void 0}function ww(e,t,r){var a=e==null?void 0:Sd(e,t);return a===void 0?r:a}function Cw(e,t){return e!=null&&t in Object(e)}function Pw(e,t,r){t=bd(t,e);for(var a=-1,n=t.length,s=!1;++a<n;){var o=ss(t[a]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}return s||++a!=n?s:(n=e==null?0:e.length,!!n&&xo(n)&&cd(o,n)&&(Vt(e)||id(e)))}function Vw(e,t){return e!=null&&Pw(e,t,Cw)}var Rw=1,_w=2;function Aw(e,t){return wo(e)&&md(t)?fd(ss(e),t):function(r){var a=ww(r,e);return a===void 0&&a===t?Vw(r,e):ns(t,a,Rw|_w)}}function Tw(e){return e}function Ew(e){return function(t){return t==null?void 0:t[e]}}function Iw(e){return function(t){return Sd(t,e)}}function Mw(e){return wo(e)?Ew(ss(e)):Iw(e)}function jw(e){return typeof e=="function"?e:e==null?Tw:typeof e=="object"?Vt(e)?Aw(e[0],e[1]):hw(e):Mw(e)}function $w(e,t){return function(r,a){var n=Vt(r)?rw:lw,s={};return n(r,e,jw(a),s)}}var an=$w(function(e,t,r){tw(e,r,t)}),Uw=0;function Lw(e){var t=++Uw;return yd(e)+t}const io=[{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}],kw=[{id:"continuous"},...io],Bw=["coordsys","tool"];class os{constructor(t,r,a,n){var s,o;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=a,this.tcps=n,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.showCoordSystemSelect=!0,this.showTcpSelect=!0,this.showOrientationSelect=!0,this.showIncrementSelect=!0,this.showTabIcons=!1,this.showVelocitySliderLabel=!0,this.showVelocityLegend=!1,this.showJointsLegend=!1,this.disposers=[];for(const i of a)if(i.coordinate_system===""){i.coordinate_system="world";break}this.selectedCoordSystemId=((s=a[0])==null?void 0:s.coordinate_system)||"world",this.selectedTcpId=((o=n[0])==null?void 0:o.id)||"",Be.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(Be.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[a,{coordinatesystems:n},{tcps:s}]=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 os(t,a,n||[],s||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return lo.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=ir.tryParseJson(localStorage.getItem("joggingToolStore"));t&&(this.tabsById[t.selectedTabId]&&(this.selectedTabId=t.selectedTabId),this.coordSystemsById[t.selectedCoordSystemId]&&(this.selectedCoordSystemId=t.selectedCoordSystemId),this.tcpsById[t.selectedTcpId]&&(this.selectedTcpId=t.selectedTcpId),this.incrementOptionsById[t.selectedIncrementId]&&(this.selectedIncrementId=t.selectedIncrementId),["translate","rotate"].includes(t.selectedCartesianMotionType)&&(this.selectedCartesianMotionType=t.selectedCartesianMotionType),["coordsys","tool"].includes(t.selectedOrientation)&&(this.selectedOrientation=t.selectedOrientation))}saveToLocalStorage(){localStorage.setItem("joggingToolStore",JSON.stringify(this.localStorageSave))}get isLocked(){return this.locks.size>0}get localStorageSave(){return{selectedTabId:this.selectedTabId,selectedCoordSystemId:this.selectedCoordSystemId,selectedTcpId:this.selectedTcpId,selectedOrientation:this.selectedOrientation,selectedIncrementId:this.selectedIncrementId,selectedCartesianMotionType:this.selectedCartesianMotionType}}get tabs(){return[{id:"cartesian",label:"cartesian"},{id:"joint",label:"joint"}]}get incrementOptions(){return kw}get discreteIncrementOptions(){return io}get incrementOptionsById(){return an(this.incrementOptions,t=>t.id)}get tabsById(){return an(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 an(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 an(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:io.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 a=this.tabs[r]||this.tabs[0];this.selectedTabId=a.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=Lw();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const Fw=ke.observer(({store:e})=>{var n;const{t}=Me.useTranslation(),r=[];function a(s){switch(s){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return s}}return e.showCoordSystemSelect&&r.push(b.jsx(rn,{labelId:"jogging-coord-select",labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:s=>e.setSelectedCoordSystemId(s.target.value),disabled:e.isLocked,children:e.coordSystems.map(s=>b.jsx(q.MenuItem,{value:s.coordinate_system,children:s.name&&e.coordSystemCountByName[s.name]>1?`${s.name} / ${s.coordinate_system}`:s.name||s.coordinate_system},s.coordinate_system))},"coord")),e.showTcpSelect&&r.push(b.jsx(rn,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:s=>e.setSelectedTcpId(s.target.value),disabled:e.isLocked,children:e.tcps.map(s=>b.jsx(q.MenuItem,{value:s.id,children:s.id},s.id))},"tcp")),e.showOrientationSelect&&r.push(b.jsx(rn,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:s=>e.setSelectedOrientation(s.target.value),disabled:e.isLocked,children:Bw.map(s=>b.jsx(q.MenuItem,{value:s,children:a(s)},s))},"orientation")),e.showIncrementSelect&&r.push(b.jsxs(rn,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((n=e.activeDiscreteIncrement)==null?void 0:n.id)||"continuous",onChange:s=>e.setSelectedIncrementId(s.target.value),disabled:e.isLocked,children:[b.jsx(q.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(s=>b.jsx(q.MenuItem,{value:s.id,children:e.currentMotionType==="translate"?`${s.mm}mm`:`${s.degrees}°`},s.id))]},"increment")),b.jsx(q.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((s,o)=>b.jsx(q.Box,{sx:{gridColumn:r.length%2===1&&o===r.length-1?"span 2":"auto"},children:s},o))})}),Nw=q.styled(q.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 Dw(e,t,r=(a,n)=>a===n){return e.length===t.length&&e.every((a,n)=>r(a,t[n]))}const zw=2;function kr(e,t,r,a,n){return r===1?Math.min(e+t,n):Math.max(e-t,a)}function vd(e,t){return e-t}function Al(e,t){const{index:r}=e.reduce((a,n,s)=>{const o=Math.abs(t-n);return a===null||o<a.distance||o===a.distance?{distance:o,index:s}:a},null)??{};return r}function nn(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let a=0;a<r.changedTouches.length;a+=1){const n=r.changedTouches[a];if(n.identifier===t.current)return{x:n.clientX,y:n.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Tn(e,t,r){return(e-t)*100/(r-t)}function Gw(e,t,r){return(r-t)*e+t}function Jw(e){if(Math.abs(e)<1){const r=e.toExponential().split("e-"),a=r[0].split(".")[1];return(a?a.length:0)+parseInt(r[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Hw(e,t,r){const a=Math.round((e-r)/t)*t+r;return Number(a.toFixed(Jw(t)))}function Tl({values:e,newValue:t,index:r}){const a=e.slice();return a[r]=t,a.sort(vd)}function sn({sliderRef:e,activeIndex:t,setActive:r}){var n,s,o;const a=dn(e.current);(!((n=e.current)!=null&&n.contains(a.activeElement))||Number((s=a==null?void 0:a.activeElement)==null?void 0:s.getAttribute("data-index"))!==t)&&((o=e.current)==null||o.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function on(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?Dw(e,t):!1}const qw={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}%`})}},Ww=e=>e;let ln;function El(){return ln===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?ln=CSS.supports("touch-action","none"):ln=!0),ln}function Kw(e){const{"aria-labelledby":t,defaultValue:r,disabled:a=!1,disableSwap:n=!1,isRtl:s=!1,marks:o=!1,max:i=100,min:l=0,name:c,onChange:d,onChangeCommitted:u,orientation:p="horizontal",rootRef:f,scale:g=Ww,step:h=1,shiftStep:x=10,tabIndex:E,value:U}=e,F=J.useRef(void 0),[N,G]=J.useState(-1),[K,j]=J.useState(-1),[L,k]=J.useState(!1),y=J.useRef(0),M=J.useRef(null),[B,z]=Fp({controlled:U,default:r??l,name:"Slider"}),D=d&&((W,Q,ee)=>{const de=W.nativeEvent||W,he=new de.constructor(de.type,de);Object.defineProperty(he,"target",{writable:!0,value:{value:Q,name:c}}),M.current=Q,d(he,Q,ee)}),re=Array.isArray(B);let Z=re?B.slice().sort(vd):[B];Z=Z.map(W=>W==null?l:Br(W,l,i));const xe=o===!0&&h!==null?[...Array(Math.floor((i-l)/h)+1)].map((W,Q)=>({value:l+h*Q})):o||[],X=xe.map(W=>W.value),[ce,fe]=J.useState(-1),le=J.useRef(null),He=Xl(f,le),_t=W=>Q=>{var de;const ee=Number(Q.currentTarget.getAttribute("data-index"));Ko(Q.target)&&fe(ee),j(ee),(de=W==null?void 0:W.onFocus)==null||de.call(W,Q)},ra=W=>Q=>{var ee;Ko(Q.target)||fe(-1),j(-1),(ee=W==null?void 0:W.onBlur)==null||ee.call(W,Q)},Sr=(W,Q)=>{const ee=Number(W.currentTarget.getAttribute("data-index")),de=Z[ee],he=X.indexOf(de);let te=Q;if(xe&&h==null){const $e=X[X.length-1];te>=$e?te=$e:te<=X[0]?te=X[0]:te=te<de?X[he-1]:X[he+1]}if(te=Br(te,l,i),re){n&&(te=Br(te,Z[ee-1]||-1/0,Z[ee+1]||1/0));const $e=te;te=Tl({values:Z,newValue:te,index:ee});let De=ee;n||(De=te.indexOf($e)),sn({sliderRef:le,activeIndex:De})}z(te),fe(ee),D&&!on(te,B)&&D(W,te,ee),u&&u(W,M.current??te)},er=W=>Q=>{var ee;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(Q.key)){Q.preventDefault();const de=Number(Q.currentTarget.getAttribute("data-index")),he=Z[de];let te=null;if(h!=null){const $e=Q.shiftKey?x:h;switch(Q.key){case"ArrowUp":te=kr(he,$e,1,l,i);break;case"ArrowRight":te=kr(he,$e,s?-1:1,l,i);break;case"ArrowDown":te=kr(he,$e,-1,l,i);break;case"ArrowLeft":te=kr(he,$e,s?1:-1,l,i);break;case"PageUp":te=kr(he,x,1,l,i);break;case"PageDown":te=kr(he,x,-1,l,i);break;case"Home":te=l;break;case"End":te=i;break}}else if(xe){const $e=X[X.length-1],De=X.indexOf(he),Te=[s?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],Qe=[s?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Te.includes(Q.key)?De===0?te=X[0]:te=X[De-1]:Qe.includes(Q.key)&&(De===X.length-1?te=$e:te=X[De+1])}te!=null&&Sr(Q,te)}(ee=W==null?void 0:W.onKeyDown)==null||ee.call(W,Q)};Ql(()=>{var W;a&&le.current.contains(document.activeElement)&&((W=document.activeElement)==null||W.blur())},[a]),a&&N!==-1&&G(-1),a&&ce!==-1&&fe(-1);const Bt=W=>Q=>{var ee;(ee=W.onChange)==null||ee.call(W,Q),Sr(Q,Q.target.valueAsNumber)},nt=J.useRef(void 0);let dt=p;s&&p==="horizontal"&&(dt+="-reverse");const st=({finger:W,move:Q=!1})=>{const{current:ee}=le,{width:de,height:he,bottom:te,left:$e}=ee.getBoundingClientRect();let De;dt.startsWith("vertical")?De=(te-W.y)/he:De=(W.x-$e)/de,dt.includes("-reverse")&&(De=1-De);let Te;if(Te=Gw(De,l,i),h)Te=Hw(Te,h,l);else{const tr=Al(X,Te);Te=X[tr]}Te=Br(Te,l,i);let Qe=0;if(re){Q?Qe=nt.current:Qe=Al(Z,Te),n&&(Te=Br(Te,Z[Qe-1]||-1/0,Z[Qe+1]||1/0));const tr=Te;Te=Tl({values:Z,newValue:Te,index:Qe}),n&&Q||(Qe=Te.indexOf(tr),nt.current=Qe)}return{newValue:Te,activeIndex:Qe}},At=ms(W=>{const Q=nn(W,F);if(!Q)return;if(y.current+=1,W.type==="mousemove"&&W.buttons===0){et(W);return}const{newValue:ee,activeIndex:de}=st({finger:Q,move:!0});sn({sliderRef:le,activeIndex:de,setActive:G}),z(ee),!L&&y.current>zw&&k(!0),D&&!on(ee,B)&&D(W,ee,de)}),et=ms(W=>{const Q=nn(W,F);if(k(!1),!Q)return;const{newValue:ee}=st({finger:Q,move:!0});G(-1),W.type==="touchend"&&j(-1),u&&u(W,M.current??ee),F.current=void 0,Tt()}),Ne=ms(W=>{if(a)return;El()||W.preventDefault();const Q=W.changedTouches[0];Q!=null&&(F.current=Q.identifier);const ee=nn(W,F);if(ee!==!1){const{newValue:he,activeIndex:te}=st({finger:ee});sn({sliderRef:le,activeIndex:te,setActive:G}),z(he),D&&!on(he,B)&&D(W,he,te)}y.current=0;const de=dn(le.current);de.addEventListener("touchmove",At,{passive:!0}),de.addEventListener("touchend",et,{passive:!0})}),Tt=J.useCallback(()=>{const W=dn(le.current);W.removeEventListener("mousemove",At),W.removeEventListener("mouseup",et),W.removeEventListener("touchmove",At),W.removeEventListener("touchend",et)},[et,At]);J.useEffect(()=>{const{current:W}=le;return W.addEventListener("touchstart",Ne,{passive:El()}),()=>{W.removeEventListener("touchstart",Ne),Tt()}},[Tt,Ne]),J.useEffect(()=>{a&&Tt()},[a,Tt]);const Ft=W=>Q=>{var he;if((he=W.onMouseDown)==null||he.call(W,Q),a||Q.defaultPrevented||Q.button!==0)return;Q.preventDefault();const ee=nn(Q,F);if(ee!==!1){const{newValue:te,activeIndex:$e}=st({finger:ee});sn({sliderRef:le,activeIndex:$e,setActive:G}),z(te),D&&!on(te,B)&&D(Q,te,$e)}y.current=0;const de=dn(le.current);de.addEventListener("mousemove",At,{passive:!0}),de.addEventListener("mouseup",et)},yt=Tn(re?Z[0]:l,l,i),Fe=Tn(Z[Z.length-1],l,i)-yt,Nt=(W={})=>{const Q=un(W),ee={onMouseDown:Ft(Q||{})},de={...Q,...ee};return{...W,ref:He,...de}},Et=W=>Q=>{var de;(de=W.onMouseOver)==null||de.call(W,Q);const ee=Number(Q.currentTarget.getAttribute("data-index"));j(ee)},vr=W=>Q=>{var ee;(ee=W.onMouseLeave)==null||ee.call(W,Q),j(-1)},xr=(W={})=>{const Q=un(W),ee={onMouseOver:Et(Q||{}),onMouseLeave:vr(Q||{})};return{...W,...Q,...ee}},Dt=W=>({pointerEvents:N!==-1&&N!==W?"none":void 0});let zt;return p==="vertical"&&(zt=s?"vertical-rl":"vertical-lr"),{active:N,axis:dt,axisProps:qw,dragging:L,focusedThumbIndex:ce,getHiddenInputProps:(W={})=>{const Q=un(W),ee={onChange:Bt(Q||{}),onFocus:_t(Q||{}),onBlur:ra(Q||{}),onKeyDown:er(Q||{})},de={...Q,...ee};return{tabIndex:E,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":g(i),"aria-valuemin":g(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:a,...W,...de,style:{...Np,direction:s?"rtl":"ltr",width:"100%",height:"100%",writingMode:zt}}},getRootProps:Nt,getThumbProps:xr,marks:xe,open:K,range:re,rootRef:He,trackLeap:Fe,trackOffset:yt,values:Z,getThumbStyle:Dt}}function fn(e){return typeof e=="string"}const Qw=e=>!e||!fn(e);function Yw(e){return typeof e.main=="string"}function Xw(e,t=[]){if(!Yw(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Po(e=[]){return([,t])=>t&&Xw(t,e)}function Zw(e){return Ba("MuiSlider",e)}const lt=Gl("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"]),eC=e=>{const{open:t}=e;return{offset:Pt(t&&lt.valueLabelOpen),circle:lt.valueLabelCircle,label:lt.valueLabelLabel}};function xd(e){const{children:t,className:r,value:a}=e,n=eC(e);return t?J.cloneElement(t,{className:Pt(t.props.className)},b.jsxs(J.Fragment,{children:[t.props.children,b.jsx("span",{className:Pt(n.offset,r),"aria-hidden":!0,children:b.jsx("span",{className:n.circle,children:b.jsx("span",{className:n.label,children:a})})})]})):null}process.env.NODE_ENV!=="production"&&(xd.propTypes={children:S.element.isRequired,className:S.string,value:S.node});function Il(e){return e}const tC=$t("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${We(r.color)}`],r.size!=="medium"&&t[`size${We(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(mr(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${lt.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${lt.dragging}`]:{[`& .${lt.thumb}, & .${lt.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Po()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),rC=$t("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}}]}),aC=$t("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(mr(({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(Po()).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:_a(e.palette[t].main,.62),borderColor:_a(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:Ra(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:Ra(e.palette[t].main,.5)})}}}))]}))),nC=$t("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${We(r.color)}`],r.size!=="medium"&&t[`thumbSize${We(r.size)}`]]}})(mr(({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%)"},[`&.${lt.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(Po()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${lt.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Ls(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${lt.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Ls(e.palette[t].main,.16)}`}}}}))]}))),Od=$t(xd,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(mr(({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%"},[`&.${lt.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%"},[`&.${lt.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"&&(Od.propTypes={children:S.element.isRequired,index:S.number.isRequired,open:S.bool.isRequired,value:S.node});const sC=$t("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>mo(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(mr(({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}}]}))),oC=$t("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>mo(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(mr(({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}}]}))),iC=e=>{const{disabled:t,dragging:r,marked:a,orientation:n,track:s,classes:o,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",a&&"marked",n==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",i&&`color${We(i)}`,l&&`size${We(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${We(l)}`,i&&`thumbColor${We(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return po(c,Zw,o)},lC=({children:e})=>e,wd=J.forwardRef(function(t,r){const a=fo({props:t,name:"MuiSlider"}),n=qp(),{"aria-label":s,"aria-valuetext":o,"aria-labelledby":i,component:l="span",components:c={},componentsProps:d={},color:u="primary",classes:p,className:f,disableSwap:g=!1,disabled:h=!1,getAriaLabel:x,getAriaValueText:E,marks:U=!1,max:F=100,min:N=0,name:G,onChange:K,onChangeCommitted:j,orientation:L="horizontal",shiftStep:k=10,size:y="medium",step:M=1,scale:B=Il,slotProps:z,slots:D,tabIndex:re,track:Z="normal",value:xe,valueLabelDisplay:X="off",valueLabelFormat:ce=Il,...fe}=a,le={...a,isRtl:n,max:F,min:N,classes:p,disabled:h,disableSwap:g,orientation:L,marks:U,color:u,size:y,step:M,shiftStep:k,scale:B,track:Z,valueLabelDisplay:X,valueLabelFormat:ce},{axisProps:He,getRootProps:_t,getHiddenInputProps:ra,getThumbProps:Sr,open:er,active:Bt,axis:nt,focusedThumbIndex:dt,range:st,dragging:At,marks:et,values:Ne,trackOffset:Tt,trackLeap:Ft,getThumbStyle:yt}=Kw({...le,rootRef:r});le.marked=et.length>0&&et.some(Ve=>Ve.label),le.dragging=At,le.focusedThumbIndex=dt;const Fe=iC(le),Nt=(D==null?void 0:D.root)??c.Root??tC,Et=(D==null?void 0:D.rail)??c.Rail??rC,vr=(D==null?void 0:D.track)??c.Track??aC,xr=(D==null?void 0:D.thumb)??c.Thumb??nC,Dt=(D==null?void 0:D.valueLabel)??c.ValueLabel??Od,zt=(D==null?void 0:D.mark)??c.Mark??sC,Or=(D==null?void 0:D.markLabel)??c.MarkLabel??oC,W=(D==null?void 0:D.input)??c.Input??"input",Q=(z==null?void 0:z.root)??d.root,ee=(z==null?void 0:z.rail)??d.rail,de=(z==null?void 0:z.track)??d.track,he=(z==null?void 0:z.thumb)??d.thumb,te=(z==null?void 0:z.valueLabel)??d.valueLabel,$e=(z==null?void 0:z.mark)??d.mark,De=(z==null?void 0:z.markLabel)??d.markLabel,Te=(z==null?void 0:z.input)??d.input,Qe=Gt({elementType:Nt,getSlotProps:_t,externalSlotProps:Q,externalForwardedProps:fe,additionalProps:{...Qw(Nt)&&{as:l}},ownerState:{...le,...Q==null?void 0:Q.ownerState},className:[Fe.root,f]}),tr=Gt({elementType:Et,externalSlotProps:ee,ownerState:le,className:Fe.rail}),is=Gt({elementType:vr,externalSlotProps:de,additionalProps:{style:{...He[nt].offset(Tt),...He[nt].leap(Ft)}},ownerState:{...le,...de==null?void 0:de.ownerState},className:Fe.track}),aa=Gt({elementType:xr,getSlotProps:Sr,externalSlotProps:he,ownerState:{...le,...he==null?void 0:he.ownerState},className:Fe.thumb}),na=Gt({elementType:Dt,externalSlotProps:te,ownerState:{...le,...te==null?void 0:te.ownerState},className:Fe.valueLabel}),wr=Gt({elementType:zt,externalSlotProps:$e,ownerState:le,className:Fe.mark}),bt=Gt({elementType:Or,externalSlotProps:De,ownerState:le,className:Fe.markLabel}),sa=Gt({elementType:W,getSlotProps:ra,externalSlotProps:Te,ownerState:le});return b.jsxs(Nt,{...Qe,children:[b.jsx(Et,{...tr}),b.jsx(vr,{...is}),et.filter(Ve=>Ve.value>=N&&Ve.value<=F).map((Ve,Ue)=>{const oa=Tn(Ve.value,N,F),rr=He[nt].offset(oa);let ut;return Z===!1?ut=Ne.includes(Ve.value):ut=Z==="normal"&&(st?Ve.value>=Ne[0]&&Ve.value<=Ne[Ne.length-1]:Ve.value<=Ne[0])||Z==="inverted"&&(st?Ve.value<=Ne[0]||Ve.value>=Ne[Ne.length-1]:Ve.value>=Ne[0]),b.jsxs(J.Fragment,{children:[b.jsx(zt,{"data-index":Ue,...wr,...!fn(zt)&&{markActive:ut},style:{...rr,...wr.style},className:Pt(wr.className,ut&&Fe.markActive)}),Ve.label!=null?b.jsx(Or,{"aria-hidden":!0,"data-index":Ue,...bt,...!fn(Or)&&{markLabelActive:ut},style:{...rr,...bt.style},className:Pt(Fe.markLabel,bt.className,ut&&Fe.markLabelActive),children:Ve.label}):null]},Ue)}),Ne.map((Ve,Ue)=>{const oa=Tn(Ve,N,F),rr=He[nt].offset(oa),ut=X==="off"?lC:Dt;return b.jsx(ut,{...!fn(ut)&&{valueLabelFormat:ce,valueLabelDisplay:X,value:typeof ce=="function"?ce(B(Ve),Ue):ce,index:Ue,open:er===Ue||Bt===Ue||X==="on",disabled:h},...na,children:b.jsx(xr,{"data-index":Ue,...aa,className:Pt(Fe.thumb,aa.className,Bt===Ue&&Fe.active,dt===Ue&&Fe.focusVisible),style:{...rr,...yt(Ue),...aa.style},children:b.jsx(W,{"data-index":Ue,"aria-label":x?x(Ue):s,"aria-valuenow":B(Ve),"aria-labelledby":i,"aria-valuetext":E?E(B(Ve),Ue):o,value:Ne[Ue],...sa})})},Ue)})]})});process.env.NODE_ENV!=="production"&&(wd.propTypes={"aria-label":Wo(S.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":S.string,"aria-valuetext":Wo(S.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:S.node,classes:S.object,className:S.string,color:S.oneOfType([S.oneOf(["primary","secondary","error","info","success","warning"]),S.string]),components:S.shape({Input:S.elementType,Mark:S.elementType,MarkLabel:S.elementType,Rail:S.elementType,Root:S.elementType,Thumb:S.elementType,Track:S.elementType,ValueLabel:S.elementType}),componentsProps:S.shape({input:S.oneOfType([S.func,S.object]),mark:S.oneOfType([S.func,S.object]),markLabel:S.oneOfType([S.func,S.object]),rail:S.oneOfType([S.func,S.object]),root:S.oneOfType([S.func,S.object]),thumb:S.oneOfType([S.func,S.object]),track:S.oneOfType([S.func,S.object]),valueLabel:S.oneOfType([S.func,S.shape({children:S.element,className:S.string,open:S.bool,style:S.object,value:S.node,valueLabelDisplay:S.oneOf(["auto","off","on"])})])}),defaultValue:S.oneOfType([S.arrayOf(S.number),S.number]),disabled:S.bool,disableSwap:S.bool,getAriaLabel:S.func,getAriaValueText:S.func,marks:S.oneOfType([S.arrayOf(S.shape({label:S.node,value:S.number.isRequired})),S.bool]),max:S.number,min:S.number,name:S.string,onChange:S.func,onChangeCommitted:S.func,orientation:S.oneOf(["horizontal","vertical"]),scale:S.func,shiftStep:S.number,size:S.oneOfType([S.oneOf(["small","medium"]),S.string]),slotProps:S.shape({input:S.oneOfType([S.func,S.object]),mark:S.oneOfType([S.func,S.object]),markLabel:S.oneOfType([S.func,S.object]),rail:S.oneOfType([S.func,S.object]),root:S.oneOfType([S.func,S.object]),thumb:S.oneOfType([S.func,S.object]),track:S.oneOfType([S.func,S.object]),valueLabel:S.oneOfType([S.func,S.shape({children:S.element,className:S.string,open:S.bool,style:S.object,value:S.node,valueLabelDisplay:S.oneOf(["auto","off","on"])})])}),slots:S.shape({input:S.elementType,mark:S.elementType,markLabel:S.elementType,rail:S.elementType,root:S.elementType,thumb:S.elementType,track:S.elementType,valueLabel:S.elementType}),step:S.number,sx:S.oneOfType([S.arrayOf(S.oneOfType([S.func,S.object,S.bool])),S.func,S.object]),tabIndex:S.number,track:S.oneOf(["inverted","normal",!1]),value:S.oneOfType([S.arrayOf(S.number),S.number]),valueLabelDisplay:S.oneOf(["auto","off","on"]),valueLabelFormat:S.oneOfType([S.func,S.string])});var cC="[object Number]";function dC(e){return typeof e=="number"||ur(e)&&fr(e)==cC}const Cd=ke.observer(e=>{var s,o,i;const t=q.useTheme(),{store:r}=e,{t:a}=Me.useTranslation();function n(l,c){c===e.velocity||!dC(c)||e.onVelocityChange(c)}return b.jsxs(q.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&b.jsx(q.Typography,{sx:{color:(i=(o=(s=t.componentsExt)==null?void 0:s.JoggingPanel)==null?void 0:o.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:a("Jogging.Velocity.bt")}),b.jsx(wd,{value:e.velocity,color:"secondary",onChange:n,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),r.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):b.jsx(Vo,{value:e.velocity.toString()}))]})});function Vo({value:e,sx:t}){var a;const r=q.useTheme();return b.jsx(q.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(a=r.palette.backgroundPaperElevation)==null?void 0:a[8],borderRadius:"10px",minWidth:"111px",...t},children:b.jsx(q.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Pd=ke.observer(({store:e})=>{const{t}=Me.useTranslation(),r=ke.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?a=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:a})}`:a=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:a})}`}}));return b.jsx(Cd,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:a=>b.jsx(Vo,{value:r.valueLabelFormat(a),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),uC=ke.observer(({store:e,children:t})=>{const{t:r}=Me.useTranslation(),a=q.useTheme();function n(p,f){(f==="translate"||f==="rotate")&&e.setSelectedCartesianMotionType(f)}lc(()=>[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 s(p,f){const g=await e.activate(),h=g.motionStream.rapidlyChangingMotionState.tcp_pose,x=g.motionStream.rapidlyChangingMotionState.state.joint_position;h&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:p.axis,direction:p.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:h,currentJoints:x,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:p.axis,direction:p.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:f.mm}:{type:"rotate",distanceRads:ir.degreesToRadians(f.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function o(p){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return s(p,e.activeDiscreteIncrement);p.motionType==="translate"?await e.jogger.startTCPTranslation({axis:p.axis,direction:p.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:p.axis,direction:p.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function i(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(p,f,g){var x,E,U;const h=(U=(E=(x=g.componentsExt)==null?void 0:x.JoggingPanel)==null?void 0:E.JoggingCartesian)==null?void 0:U.Axis;if(h)return f==="translate"?h[p]:h.CustomRotation??h[p]}const c=[{id:"x",icon:b.jsx(b1,{}),colors:l("X",e.selectedCartesianMotionType,a)},{id:"y",icon:b.jsx(v1,{}),colors:l("Y",e.selectedCartesianMotionType,a)},{id:"z",icon:b.jsx(O1,{}),colors:l("Z",e.selectedCartesianMotionType,a)}];function d(p){return r("General.mm.variable",{amount:p.toFixed(1)})}function u(p){return r("General.degree.variable",{amount:ir.radiansToDegrees(p).toFixed(1)})}return b.jsxs(q.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[b.jsxs(q.Stack,{gap:2,children:[b.jsx(Fw,{store:e}),b.jsx(Pd,{store:e}),b.jsx(q.Divider,{})]}),b.jsx(q.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:b.jsxs(q.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[b.jsxs(Nw,{value:e.selectedCartesianMotionType,onChange:n,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[b.jsx(q.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),b.jsx(q.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(p=>{var f,g;return b.jsx(Fs,{colors:p.colors,disabled:e.isLocked,activeJoggingDirection:((f=e.incrementJogInProgress)==null?void 0:f.axis)===p.id?e.incrementJogInProgress.direction:void 0,label:b.jsxs(b.Fragment,{children:[p.icon,b.jsx(q.Typography,{sx:{fontSize:"24px",color:((g=p.colors)==null?void 0:g.labelColor)??a.palette.text.primary},children:p.id.toUpperCase()})]}),getDisplayedValue:()=>{var h;return d(((h=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:h.position[p.id])||0)},startJogging:h=>o({axis:p.id,motionType:"translate",direction:h}),stopJogging:i},p.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(p=>{var f,g;return b.jsx(Fs,{colors:p.colors,disabled:e.isLocked,activeJoggingDirection:((f=e.incrementJogInProgress)==null?void 0:f.axis)===p.id?e.incrementJogInProgress.direction:void 0,label:b.jsxs(b.Fragment,{children:[b.jsx(C1,{}),b.jsx(q.Typography,{sx:{fontSize:"24px",color:((g=p.colors)==null?void 0:g.labelColor)??a.palette.text.primary},children:p.id.toUpperCase()})]}),getDisplayedValue:()=>{var h,x;return u(((x=(h=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:h.orientation)==null?void 0:x[p.id])||0)},startJogging:h=>o({axis:p.id,motionType:"rotate",direction:h}),stopJogging:i},p.id)})]})}),b.jsx(hd,{store:e}),t&&b.jsx(q.Divider,{}),t]})}),pC=ke.observer(({store:e,children:t})=>{const r=q.useTheme();async function a(s){await e.activate(),await e.jogger.startJointRotation({joint:s.joint,direction:s.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function n(){await e.jogger.stop(),await e.deactivate()}return b.jsxs(q.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[b.jsx(Pd,{store:e}),b.jsx(q.Divider,{}),b.jsx(q.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:b.jsx(q.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(s=>{var c;const o=(c=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:c[s.index],i=(o==null?void 0:o.lower_limit)!==void 0?ir.radiansToDegrees(o.lower_limit):void 0,l=(o==null?void 0:o.upper_limit)!==void 0?ir.radiansToDegrees(o.upper_limit):void 0;return b.jsxs(q.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&b.jsx(q.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${s.index+1}`}),b.jsx(uc,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const d=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[s.index];return d!==void 0?ir.radiansToDegrees(d):void 0},startJogging:d=>a({joint:s.index,direction:d}),stopJogging:n})]},`joint-${s.index}`)})})}),b.jsx(hd,{store:e}),t&&b.jsx(q.Divider,{}),t]})}),hC=qr(ke.observer(e=>{const t=lo.isString(e.nova)?new h1({instanceUrl:e.nova}):e.nova,r=ke.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function a(){Be.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let n=e.store;if(!n){const s=await t.connectJogger(e.motionGroupId);n=await os.loadFor(s)}Be.runInAction(()=>{r.joggingStore=n}),e.onSetup&&e.onSetup(n)}catch(n){r.loadingError=n}}return ae.useEffect(()=>(a(),e.store?()=>null:()=>{var n;(n=r.joggingStore)==null||n.dispose()}),[e.store,e.nova,e.motionGroupId]),ae.useEffect(()=>{const n=r.joggingStore;n&&(e.locked?n.lock("external"):n.unlock("external"))},[r.joggingStore,e.locked]),b.jsx(q.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?b.jsx(mC,{store:r.joggingStore,children:e.children}):b.jsx(vo,{message:"Loading jogging",error:r.loadingError})})})),mC=ke.observer(({store:e,children:t})=>{const{t:r}=Me.useTranslation();function a(){if(e.currentTab.id==="cartesian")return b.jsx(b.Fragment,{children:b.jsx(uC,{store:e,children:t})});if(e.currentTab.id==="joint")return b.jsx(b.Fragment,{children:b.jsx(pC,{store:e,children:t})})}return b.jsxs(q.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[b.jsx(q.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(n=>{const s=n.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),o=n.label==="cartesian"?b.jsx(Jm,{fontSize:"small",sx:{mr:1}}):b.jsx(Hm,{fontSize:"small",sx:{mr:1}});return b.jsx(q.Tab,{label:e.showTabIcons?b.jsxs(q.Stack,{direction:"row",alignItems:"center",children:[o,s]}):s,id:`jogging-tab-${n.id}`,"aria-controls":`jogging-tab-${n.id}`},n.id)})}),b.jsx(q.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:a()})]})}),Vd=ae.forwardRef(({label:e,value:t},r)=>{var i;const a=q.useTheme(),[n,s]=ae.useState(!1);async function o(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),s(!0),!0}catch(l){console.error(l);const c=window.getSelection(),d=document.createRange();d.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(d)}return!1}return ae.useEffect(()=>{if(!n)return;const l=setTimeout(()=>s(!1),3e3);return()=>{l&&clearTimeout(l)}},[n]),b.jsx(q.Tooltip,{open:n,title:"Copied!",children:b.jsx(q.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(i=a.palette.backgroundPaperElevation)==null?void 0:i[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>o(),children:b.jsx(q.Typography,{ref:r,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:a.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})}),fC=ke.observer(({motionStream:e})=>{const t=ae.useRef(null);function r(){const a=e.rapidlyChangingMotionState.tcp_pose;return a?ir.poseToWandelscriptString(a):""}return Wr(()=>{if(!t.current)return;const a=r();t.current.textContent!==a&&(t.current.textContent=a)}),b.jsx(q.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:b.jsx(Vd,{value:r(),ref:t})})}),gC=ke.observer(({motionStream:e})=>{const t=ae.useRef(null);function r(){const{joints:a}=e.rapidlyChangingMotionState.state.joint_position;return`[${a.map(n=>parseFloat(n.toFixed(4))).join(", ")}]`}return Wr(()=>{if(!t.current)return;const a=r();t.current.textContent!==a&&(t.current.textContent=a)}),b.jsx(q.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:b.jsx(Vd,{value:r(),ref:t})})});function yC(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function bC({baseUrl:e=yC(),...t}){return b.jsxs(q.Dialog,{"aria-labelledby":"no-motion-group-modal-title",open:!0,fullWidth:!0,sx:{"& .MuiModal-backdrop":{backdropFilter:"blur(10px)"},"& .MuiDialog-paper":{"::before":{content:'""',height:"8px",width:"100%",background:"linear-gradient(90deg, #FF0E65 0%, #47D3FF 100%)"},background:"#101629"}},children:[b.jsx(q.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),b.jsxs(q.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[b.jsx(q.Typography,{color:"#fff",children:"Found no devices to connect to."}),b.jsx(q.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),b.jsx(q.DialogActions,{children:b.jsxs(q.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[b.jsx(q.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),b.jsx(q.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const SC=Array(6).fill(2*Math.PI),Ml="0.0.0-semantically-released";function Ro(e){let t=Ml;return Ml.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function vC(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(a=>t(a))]}return t(e).filter(r=>_d(r))}function Rd(e){return e.name.endsWith("_FLG")}function _d(e){return/_J[0-9]+$/.test(e.name)}function xC(e,t){let r;function a(n){if(Rd(n)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${n.name}. Only one _FLG group is allowed.`);r=n}_d(n),n.children.map(a)}if(a(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 Ad({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:a}){$s.Globals.assign({frameLoop:"always"});const n=ae.useRef([]),s=ae.useRef([]),{invalidate:o}=qd.useThree();function i(p){p&&(s.current=vC(p),c(),o())}function l(p){n.current=p,u.start(Object.assign({},n.current))}function c(){const p=s.current.map((f,g)=>d[g].get());if(r)r(s.current,p);else for(const[f,g]of s.current.entries()){const h=t[f],x=h.theta||0,E=h.reverse_rotation_direction?-1:1;g.rotation.y=E*p[f]+x}}ic(()=>{const p=e.state.joint_position.joints.filter(f=>f!==void 0);requestAnimationFrame(()=>l(p))});const[d,u]=$s.useSpring(()=>({...Object.assign({},e.state.joint_position.joints),onChange:()=>{c(),o()},onResolve:()=>{c()}}));return b.jsx("group",{ref:i,children:a})}const jl="line",$l="mesh";function OC({rapidlyChangingMotionState:e,dhParameters:t,...r}){const a=new ht.Matrix4;function n(i,l){const c=new ht.Vector3,d=new ht.Quaternion,u=new ht.Vector3;a.decompose(c,d,u);const p=c.clone(),f=new ht.Matrix4().makeRotationY(i.theta+l*(i.reverse_rotation_direction?-1:1)).multiply(new ht.Matrix4().makeTranslation(0,i.d/1e3,0)).multiply(new ht.Matrix4().makeTranslation(i.a/1e3,0,0)).multiply(new ht.Matrix4().makeRotationX(i.alpha));return a.multiply(f),a.decompose(c,d,u),{a:p,b:c}}function s(i,l,c,d){if(!t)return;const u=t[i];if(!u)return;const{a:p,b:f}=n(u,d);l.geometry.setPositions([p.toArray(),f.toArray()].flat()),c.position.set(f.x,f.y,f.z)}function o(i,l){a.identity(),i.forEach((c,d)=>{s(d,c.getObjectByName(jl),c.getObjectByName($l),l[d])})}return b.jsx(b.Fragment,{children:b.jsx(Ad,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:o,children:b.jsxs("group",{...r,name:"Scene",children:[b.jsxs("mesh",{children:[b.jsx("sphereGeometry",{args:[.01,32,32]}),b.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((i,l)=>{const{a:c,b:d}=n(i,e.state.joint_position.joints[l]??0),u=`dhrobot_J0${l}`;return b.jsxs("group",{name:u,children:[b.jsx(mt.Line,{name:jl,points:[c,d],color:"white",lineWidth:5}),b.jsxs("mesh",{name:$l,position:d,children:[b.jsx("sphereGeometry",{args:[.01,32,32]}),b.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+l)]},u)})]})})})}const wC=console.warn;function CC(){return ae.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&wC(e)}},[]),b.jsx(b.Fragment,{})}function PC(e){return e.type==="Mesh"}function VC({modelURL:e,flangeRef:t,postModelRender:r,...a}){const{gltf:n}=xC(mt.useGLTF(e),e.split("/").pop()||e),s=ae.useCallback(i=>{i&&r&&r()},[e]);function o(i){return PC(i)?b.jsx("mesh",{name:i.name,geometry:i.geometry,material:i.material,position:i.position,rotation:i.rotation},i.uuid):b.jsx($s.animated.group,{name:i.name,position:i.position,rotation:i.rotation,ref:Rd(i)?t:void 0,children:i.children.map(o)},i.uuid)}return b.jsx("group",{...a,dispose:null,ref:s,children:o(n.scene)})}const RC=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof Ie.Mesh){r.material instanceof Ie.Material&&(r.material.colorWrite=!1);const a=r.clone(),n=r.clone();a.material=new Ie.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:Ie.DoubleSide}),a.userData.isGhost=!0,n.material=new Ie.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:Ie.DoubleSide}),n.userData.isGhost=!0,r.parent&&(r.parent.add(a),r.parent.add(n))}}),e.userData.isGhost=!0)},_C=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var a;r instanceof Ie.Mesh&&((a=r.userData)!=null&&a.isGhost?t.push(r):r.material instanceof Ie.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},Td=qr(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:a=Ro,flangeRef:n,postModelRender:s,transparentColor:o,...i})=>{const[l,c]=ae.useState(null),d=ae.useCallback(p=>{c(p)},[]);ae.useEffect(()=>{l&&(o?RC(l,o):_C(l))},[l,o]);const u=b.jsx(OC,{rapidlyChangingMotionState:e,dhParameters:r,...i});return b.jsxs(Xd.ErrorBoundary,{fallback:u,onError:p=>{console.error(p)},children:[b.jsx(ae.Suspense,{fallback:u,children:b.jsx("group",{ref:d,children:b.jsx(Ad,{rapidlyChangingMotionState:e,dhParameters:r,children:b.jsx(VC,{modelURL:a(t),postModelRender:s,flangeRef:n,...i})})})}),b.jsx(CC,{})]})});function AC({connectedMotionGroup:e,getModel:t=Ro,flangeRef:r,transparentColor:a,...n}){return e.dhParameters?b.jsx(Td,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:a,...n}):null}const TC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),EC=ae.forwardRef(TC),IC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),MC=ae.forwardRef(IC),wt=ke.observer(({id:e,icon:t,color:r,title:a,name:n,label:s,explanation:o,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const d=ke.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!d.anchorEl},openPopover(u){d.anchorEl=u.currentTarget},closePopover(){d.anchorEl=null}}));return b.jsxs(b.Fragment,{children:[b.jsxs(q.Stack,{"aria-owns":d.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:d.openPopover,onMouseLeave:d.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[b.jsx(q.SvgIcon,{component:t,sx:{color:r}}),s&&b.jsx("div",{style:{color:r},children:s})]}),b.jsx(q.Popover,{id:e,sx:{pointerEvents:"none"},open:d.isPopoverOpen,anchorEl:d.anchorEl,anchorOrigin:l??{vertical:"bottom",horizontal:"left"},transformOrigin:c??{vertical:"top",horizontal:"left"},onClose:d.closePopover,disableRestoreFocus:!0,children:b.jsxs(q.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[b.jsxs("div",{children:[a&&b.jsx(q.Typography,{component:"span",fontSize:"14px",children:`${a}: `}),b.jsx(q.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:n})]}),b.jsx(q.Typography,{fontSize:"14px",children:o}),i&&b.jsx(q.Typography,{fontSize:"12px",children:i})]})})]})}),jC=ke.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:a,compact:n})=>{const s=q.useTheme(),{t:o}=Me.useTranslation();return e?b.jsx(wt,{id:"motion-group-virtual",icon:MC,color:s.palette.tertiary.main,name:o("SafetyBar.ControllerType.Virtual.lb"),label:n?null:o("SafetyBar.ControllerType.Virtual.lb"),explanation:b.jsxs(Me.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",b.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:a}):b.jsx(wt,{id:"motion-group-physical",icon:EC,color:s.palette.primary.main,name:o("SafetyBar.ControllerType.Physical.lb"),label:n?null:o("SafetyBar.ControllerType.Physical.lb"),explanation:b.jsx(Me.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:b.jsx("code",{}),strong:b.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:a})}),$C=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),UC=ae.forwardRef($C),LC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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})),kC=ae.forwardRef(LC),BC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),FC=ae.forwardRef(BC),NC=ke.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:a})=>{const{t:n}=Me.useTranslation(),s=q.useTheme();switch(e){case"OPERATION_MODE_AUTO":return b.jsx(wt,{id:"operation-mode-auto",icon:UC,title:n("SafetyBar.OperationMode.ti"),name:n("SafetyBar.OperationMode.Automatic.ti"),label:a?null:n("SafetyBar.OperationMode.Automatic.ti"),color:"rgba(255, 255, 255, 0.57)",explanation:b.jsx(Me.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 b.jsx(wt,{id:"operation-mode-manual",icon:FC,color:s.palette.warning.main,title:n("SafetyBar.OperationMode.ti"),name:n("SafetyBar.OperationMode.Manual.lb"),label:a?null:n("SafetyBar.OperationMode.Manual.lb"),explanation:b.jsx(Me.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 b.jsx(wt,{id:"operation-mode-error",icon:kC,color:s.palette.warning.main,title:n("SafetyBar.OperationMode.ti"),name:n("SafetyBar.OperationMode.Error.lb"),label:a?null:n("SafetyBar.OperationMode.Error.lb"),explanation:b.jsx(Me.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})}}),DC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),zC=ae.forwardRef(DC),GC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),J.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"}),J.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"})),JC=ae.forwardRef(GC),HC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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})),qC=ae.forwardRef(HC),WC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),KC=ae.forwardRef(WC),QC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),YC=ae.forwardRef(QC),XC=ke.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:a})=>{const{t:n}=Me.useTranslation(),s=q.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return b.jsx(wt,{id:"safety-state-normal",title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Normal.lb"),label:a?null:n("SafetyBar.SafetyState.Normal.lb"),icon:KC,color:"rgba(255, 255, 255, 0.57)",explanation:b.jsx(Me.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 b.jsx(wt,{id:"safety-state-estop",title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Estop.lb"),label:a?null:n("SafetyBar.SafetyState.Estop.lb"),icon:JC,color:s.palette.error.main,explanation:b.jsx(Me.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 b.jsx(wt,{id:"safety-state-stop",icon:YC,title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Stop.lb"),label:a?null:n("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:b.jsx(Me.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 b.jsx(wt,{id:"safety-state-manual-action-required",icon:qC,color:s.palette.warning.main,title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.ManualActionRequired.lb"),label:a?null:n("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:b.jsx(Me.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 b.jsx(wt,{id:"safety-state-error",icon:zC,color:s.palette.error.main,title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Error.lb"),label:a?null:n("SafetyBar.SafetyState.Error.lb"),explanation:b.jsx(Me.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:f1(e,`Unknown safety state ${e}`)}}),ZC=qr(ke.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:a,anchorOrigin:n,transformOrigin:s,compact:o=!0})=>{const i=o?1:2;return b.jsxs(q.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[b.jsx(XC,{safetyState:a,anchorOrigin:n,transformOrigin:s,compact:o}),b.jsx(q.Divider,{orientation:"vertical",flexItem:!0}),b.jsx(NC,{operationMode:r,anchorOrigin:n,transformOrigin:s,compact:o}),b.jsx(q.Divider,{orientation:"vertical",flexItem:!0}),b.jsx(jC,{isVirtual:e,motionGroupId:t,anchorOrigin:n,transformOrigin:s,compact:o})]})})),eP=q.styled(q.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,r,a;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:n})=>!n,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:n})=>n,style:{background:(a=e.palette.backgroundPaperElevation)==null?void 0:a[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),tP=ae.forwardRef((e,t)=>b.jsx(eP,{ref:t,selected:e.selected,...e,color:"secondary",variant:"circular"})),rP={$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"},aP=ae.lazy(()=>import("@monaco-editor/react"));let js=null;async function nP(){if(!js){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);js={shiki:await e({langs:[rP],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return js}const sP=qr(e=>{const t=q.useTheme(),[r,a]=ae.useState("dark-plus"),n=t.palette.mode==="dark"?"dark-plus":"light-plus";async function s(o){var c,d;o.languages.register({id:"wandelscript"}),o.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await nP();l(i,o),o.editor.defineTheme(n,((d=(c=t.componentsExt)==null?void 0:c.WandelscriptEditor)==null?void 0:d.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(o),a(n)}return b.jsx(ae.Suspense,{fallback:b.jsx(vo,{}),children:b.jsx(aP,{value:e.code,onMount:(o,i)=>{s(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function Ed(){var t,r,a,n,s,o,i;const e=q.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:(a=(r=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:r.tonal)==null?void 0:a.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:(n=e.palette.backgroundPaperElevation)==null?void 0:n[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:(o=(s=e.paletteExt)==null?void 0:s.secondary)==null?void 0:o.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":q.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function oP(){const e=Ed();return e.palette.mode="light",e}function iP(e){var a,n,s,o;let t=!0;((a=e.palette)==null?void 0:a.mode)==="light"?t=!1:((n=e.palette)==null?void 0:n.mode)!=="dark"&&(t=!(typeof window<"u"&&((o=(s=window.matchMedia)==null?void 0:s.call(window,"(prefers-color-scheme: light)"))==null?void 0:o.matches)));const r=t?Ed():oP();return nc(r,e)}exports.JoggingCartesianAxisControl=Fs;exports.JoggingJointRotationControl=uc;exports.JoggingPanel=hC;exports.JoggingStore=os;exports.LoadingCover=vo;exports.LoadingErrorMessage=rd;exports.NoMotionGroupModal=bC;exports.PoseCartesianValues=fC;exports.PoseJointValues=gC;exports.PresetEnvironment=ru;exports.Robot=AC;exports.SafetyBar=ZC;exports.SafetyZonesRenderer=su;exports.SelectableFab=tP;exports.SupportedRobot=Td;exports.TrajectoryRenderer=ou;exports.VelocitySlider=Cd;exports.VelocitySliderLabel=Vo;exports.WandelscriptEditor=sP;exports.createNovaMuiTheme=iP;exports.defaultAxisConfig=SC;exports.defaultGetModel=Ro;exports.i18n=go;exports.useAnimationFrame=Wr;exports.useAutorun=ic;exports.useMounted=Gn;exports.useReaction=lc;
114
+ `,u),new td(t,i,l,u,c)})}get motionGroupId(){return this.motionGroup.motion_group}get controllerId(){return this.controller.controller}get modelFromController(){return this.motionGroup.model_from_controller}get wandelscriptIdentifier(){const t=this.motionGroupId.split("@")[0];return`${this.controllerId.replaceAll("-","_")}_${t}`}get joints(){return this.initialMotionState.state.joint_position.joints.map((t,r)=>({index:r}))}dispose(){this.motionStateSocket.close()}},d1=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(qv),this.cell=this.withUnwrappedResponsesOnly(cv),this.deviceConfig=this.withCellId(yv),this.motionGroup=this.withCellId(Av),this.motionGroupInfos=this.withCellId(Ev),this.controller=this.withCellId(uv),this.program=this.withCellId(Lv),this.programValues=this.withCellId(Bv),this.controllerIOs=this.withCellId(hv),this.motionGroupKinematic=this.withCellId($v),this.motion=this.withCellId(Rv),this.coordinateSystems=this.withCellId(fv),this.application=this.withCellId(al),this.applicationGlobal=this.withUnwrappedResponsesOnly(al),this.motionGroupJogging=this.withCellId(Mv),this.virtualRobot=this.withCellId(Kv),this.virtualRobotSetup=this.withCellId(t1),this.virtualRobotMode=this.withCellId(Zv),this.virtualRobotBehavior=this.withCellId(Yv),this.libraryProgramMetadata=this.withCellId(xv),this.libraryProgram=this.withCellId(Sv),this.libraryRecipeMetadata=this.withCellId(Pv),this.libraryRecipe=this.withCellId(wv),this.storeObject=this.withCellId(Jv),this.storeCollisionComponents=this.withCellId(Nv),this.storeCollisionScenes=this.withCellId(zv)}withCellId(e){var t,r;const a=new e(qs(Fr({},this.opts),{isJsonMime:n=>n==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:O.create());for(const n of Reflect.ownKeys(Reflect.getPrototypeOf(a)))if(n!=="constructor"&&typeof a[n]=="function"){const s=a[n];a[n]=(...o)=>s.apply(a,[this.cellId,...o]).then(i=>i.data)}return a}withUnwrappedResponsesOnly(e){var t,r;const a=new e(qs(Fr({},this.opts),{isJsonMime:n=>n==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:O.create());for(const n of Reflect.ownKeys(Reflect.getPrototypeOf(a)))if(n!=="constructor"&&typeof a[n]=="function"){const s=a[n];a[n]=(...o)=>s.apply(a,o).then(i=>i.data)}return a}},u1=class{constructor(){this.connections=[]}handleAPIRequest(e){return Ce(this,null,function*(){var t,r,a;const n=[{method:"GET",path:"/cells/:cellId/controllers",handle(){return{instances:[{controller:"mock-ur5e",model_name:"UniversalRobots::Controller",host:"mock-ur5e",allow_software_install_on_controller:!0,physical_motion_groups:[{motion_group:"0@mock-ur5e",name_from_controller:"UR5e",active:!1,model_from_controller:"UniversalRobots_UR5e"}],has_error:!1,error_details:""}]}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId",handle(){return{configuration:{kind:"VirtualController",manufacturer:"universalrobots",position:"[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",type:"universalrobots-ur5e"},name:"mock-ur5"}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/specification",handle(){return{dh_parameters:[{alpha:1.5707963267948966,theta:0,a:0,d:162.25,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-425,d:0,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-392.2,d:0,reverse_rotation_direction:!1},{alpha:1.5707963267948966,theta:0,a:0,d:133.3,reverse_rotation_direction:!1},{alpha:-1.5707963267948966,theta:0,a:0,d:99.7,reverse_rotation_direction:!1},{alpha:0,theta:0,a:0,d:99.6,reverse_rotation_direction:!1}],mechanical_joint_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/safety-setup",handle(){return{safety_settings:[{safety_state:"SAFETY_NORMAL",settings:{joint_position_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-2.96705961227417,upper_limit:2.96705961227417,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-1.7453292608261108,upper_limit:2.7925267219543457,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-3.3161256313323975,upper_limit:.40142571926116943,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-3.4906585216522217,upper_limit:3.4906585216522217,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-2.4434609413146973,upper_limit:2.4434609413146973,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-4.71238899230957,upper_limit:4.71238899230957,unlimited:!1}],joint_velocity_limits:[{joint:"JOINTNAME_AXIS_1",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_2",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_3",limit:3.4906585216522217},{joint:"JOINTNAME_AXIS_4",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_5",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_6",limit:6.981317043304443}],joint_acceleration_limits:[],joint_torque_limits:[],tcp_velocity_limit:1800}}],safety_zones:[{id:1,priority:0,geometry:{compound:{child_geometries:[{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820},{x:-800,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:-1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:-800,y:1330,z:-1820},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500},{x:1650,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:1650,y:-1330,z:1500},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Cell workzone"},motion_group_uid:1},{id:2,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-1850},{x:865,y:1330,z:-1850},{x:865,y:-720,z:-1850},{x:1650,y:-720,z:-1850},{x:1650,y:1330,z:-920},{x:865,y:1330,z:-920},{x:865,y:-720,z:-920},{x:1650,y:-720,z:-920}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Transport"},motion_group_uid:1},{id:3,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-600},{x:865,y:1330,z:-600},{x:865,y:430,z:-600},{x:1650,y:430,z:-600},{x:1650,y:1330,z:-1250},{x:865,y:1330,z:-1250},{x:865,y:430,z:-1250},{x:1650,y:430,z:-1250}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Tunel"},motion_group_uid:1},{id:4,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:-760,z:-440},{x:900,y:-760,z:-440},{x:900,y:-1330,z:-440},{x:1650,y:-1330,z:-440},{x:1650,y:-760,z:-1800},{x:900,y:-760,z:-1800},{x:900,y:-1330,z:-1800},{x:1650,y:-1330,z:-1800}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Fanuc controller"},motion_group_uid:1},{id:6,priority:0,geometry:{convex_hull:{vertices:[{x:-200,y:-200,z:-1900},{x:200,y:-200,z:-1900},{x:200,y:200,z:-1900},{x:-200,y:200,z:-1900},{x:-200,y:-200,z:-350},{x:200,y:-200,z:-350},{x:200,y:200,z:-350},{x:-200,y:200,z:-350}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Robot base"},motion_group_uid:1}],robot_model_geometries:[{link_index:1,geometry:{sphere:{radius:270},init_pose:{position:{x:-70,y:-70,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link1_sphere"}},{link_index:2,geometry:{capsule:{radius:160,cylinder_height:800},init_pose:{position:{x:-450,y:40,z:170},orientation:{x:0,y:-.7071067811865475,z:0,w:.7071067811865476}},id:"link2_capsule"}},{link_index:3,geometry:{sphere:{radius:270},init_pose:{position:{x:-110,y:10,z:-100},orientation:{x:0,y:0,z:0,w:1}},id:"link3_sphere"}},{link_index:4,geometry:{capsule:{radius:110,cylinder_height:600},init_pose:{position:{x:0,y:300,z:40},orientation:{x:-.7071067811865475,y:0,z:0,w:.7071067811865476}},id:"link4_capsule"}},{link_index:5,geometry:{sphere:{radius:75},init_pose:{position:{x:0,y:0,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link5_sphere"}}],tool_geometries:[]}}},{method:"GET",path:"/cells/:cellId/coordinate-systems",handle(){return{coordinatesystems:[{coordinate_system:"",name:"world",reference_uid:"",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0],type:"ROTATION_VECTOR"}}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/tcps",handle(){return{tcps:[{id:"Flange",readable_name:"Default-Flange",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0,0],type:"ROTATION_VECTOR"}},{id:"complex-tcp-position",readable_name:"Complex TCP Position",position:{x:-200,y:300,z:150},rotation:{angles:[-.12139440409113832,-.06356210998212003,-.2023240068185639,0],type:"ROTATION_VECTOR"}}]}}}],s=((t=e.method)==null?void 0:t.toUpperCase())||"GET",o="/cells"+((a=(r=e.url)==null?void 0:r.split("/cells")[1])==null?void 0:a.split("?")[0]);for(const i of n){const l=s1.match(i.path)(o||"");if(s===i.method&&l){const c=i.handle();return{status:200,statusText:"Success",data:JSON.stringify(c),headers:{},config:e,request:{responseURL:e.url}}}}throw new eo(`No mock handler matched this request: ${s} ${o}`,"404",e)})}handleWebsocketConnection(e){this.connections.push(e),setTimeout(()=>{e.dispatchEvent(new Event("open")),console.log("Websocket connection opened from",e.url),e.url.includes("/state-stream")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify(p1)})),e.url.includes("/move-joint")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{motion_group:"0@ur",state:{controller:"ur",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",timestamp:"2024-09-18T12:48:26.096266444Z",velocity_override:100,motion_groups:[{motion_group:"0@ur",controller:"ur",joint_position:{joints:[1.3492152690887451,-1.5659207105636597,1.6653711795806885,-1.0991662740707397,-1.829018235206604,1.264623761177063]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:6.437331889439328,y:-628.4123774830913,z:577.0569957147832},orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:""},tcp_pose:{position:{x:6.437331889439328,y:-628.4123774830913,z:577.0569957147832},orientation:{x:-1.683333649797158,y:-1.9783363827298732,z:-.4928031860165713},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:-0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"671259"}],sequence_number:"671259"},movement_state:"MOVEMENT_STATE_MOVING"}})})),e.url.includes("/move-tcp")&&e.dispatchEvent(new MessageEvent("message",{data:JSON.stringify({result:{motion_group:"0@ur",state:{controller:"ur",operation_mode:"OPERATION_MODE_AUTO",safety_state:"SAFETY_STATE_NORMAL",timestamp:"2024-09-18T12:43:12.188335774Z",velocity_override:100,motion_groups:[{motion_group:"0@ur",controller:"ur",joint_position:{joints:[1.3352527618408203,-1.5659207105636597,1.6653711795806885,-1.110615611076355,-1.829018235206604,1.264623761177063]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:-2.763015284002938,y:-630.2151479701106,z:577.524509114342},orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:""},tcp_pose:{position:{x:-2.763015284002938,y:-630.2151479701106,z:577.524509114342},orientation:{x:-1.704794877102097,y:-1.9722372952861567,z:-.4852079204210754},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:-0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]},sequence_number:"627897"}],sequence_number:"627897"},movement_state:"MOVEMENT_STATE_MOVING"}})}))},10)}handleWebsocketMessage(e,t){console.log(`Received message on ${e.url}`,t)}},p1={result:{state:{motion_group:"0@universalrobots-ur5e",controller:"universalrobots-ur5e",joint_position:{joints:[1.1699999570846558,-1.5700000524520874,1.3600000143051147,1.0299999713897705,1.2899999618530273,1.2799999713897705]},joint_velocity:{joints:[0,0,0,0,0,0]},flange_pose:{position:{x:1.3300010259703043,y:-409.2680714682808,z:531.0203477065281},orientation:{x:1.7564919306270736,y:-1.7542521568325058,z:.7326972590614671},coordinate_system:""},tcp_pose:{position:{x:1.3300010259703043,y:-409.2680714682808,z:531.0203477065281},orientation:{x:1.7564919306270736,y:-1.7542521568325058,z:.7326972590614671},coordinate_system:"",tcp:"Flange"},velocity:{linear:{x:0,y:0,z:0},angular:{x:0,y:0,z:0},coordinate_system:""},force:{force:{x:0,y:0,z:0},moment:{x:0,y:0,z:0},coordinate_system:""},joint_limit_reached:{limit_reached:[!1,!1,!1,!1,!1,!1]},joint_current:{joints:[0,0,0,0,0,0]}},tcp_pose:{position:{x:302.90748476115556,y:-152.87065869452337,z:424.0454619321661},orientation:{x:2.3403056115045353,y:-1.1706836379431356,z:.9772511964246311},coordinate_system:"",tcp:"Flange"}}},h1=class{constructor(e){this.authPromise=null,this.accessToken=null;var t;const r=(t=e.cellId)!=null?t:"cell";this.config=Fr({cellId:r},e),this.accessToken=e.accessToken||ws.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"&&(this.mock=new u1);const a=O.create({baseURL:Ts(this.config.instanceUrl,"/api/v1")});a.interceptors.request.use(n=>Ce(this,null,function*(){return n.headers.Authorization||(this.accessToken?n.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(n.headers.Authorization=`Basic ${btoa(e.username+":"+e.password)}`)),n})),typeof window<"u"&&a.interceptors.response.use(n=>n,n=>Ce(this,null,function*(){var s,o;if(sv(n))if(((s=n.response)==null?void 0:s.status)===401)try{if(yield this.renewAuthentication(),n.config)return this.accessToken?n.config.headers.Authorization=`Bearer ${this.accessToken}`:delete n.config.headers.Authorization,a.request(n.config)}catch(i){return Promise.reject(i)}else((o=n.response)==null?void 0:o.status)===503&&(yield fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(n)})),this.api=new d1(r,qs(Fr({},e),{basePath:Ts(this.config.instanceUrl,"/api/v1"),isJsonMime:n=>n==="application/json",baseOptions:Fr(Fr({},this.mock?{adapter:n=>this.mock.handleAPIRequest(n)}:{}),e.baseOptions),axiosInstance:a}))}renewAuthentication(){return Ce(this,null,function*(){if(!this.authPromise){this.authPromise=A0(this.config.instanceUrl);try{this.accessToken=yield this.authPromise,this.accessToken?ws.setString("wbjs.access_token",this.accessToken):ws.delete("wbjs.access_token")}finally{this.authPromise=null}}})}makeWebsocketURL(e){const t=new URL(Ts(this.config.instanceUrl,`/api/v1/cells/${this.config.cellId}`,e));return t.protocol=t.protocol.replace("http","ws"),t.protocol=t.protocol.replace("https","wss"),this.accessToken?t.searchParams.append("token",this.accessToken):this.config.username&&this.config.password&&(t.username=this.config.username,t.password=this.config.password),t.toString()}openReconnectingWebsocket(e){return new P0(this.makeWebsocketURL(e),{mock:this.mock})}connectMotionStream(e){return Ce(this,null,function*(){return yield c1.open(this,e)})}connectJogger(e){return Ce(this,null,function*(){return yield i1.open(this,e)})}connectMotionGroups(e){return Ce(this,null,function*(){const{instances:t}=yield this.api.controller.listControllers();return Promise.all(e.map(r=>o1.connect(this,r,t)))})}connectMotionGroup(e){return Ce(this,null,function*(){return(yield this.connectMotionGroups([e]))[0]})}};function m1(e){try{return JSON.stringify(e)}catch{return}}function f1(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function g1(e){var t,r,a,n;return e instanceof eo&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof eo&&e.response?`${(t=e.response)==null?void 0:t.status} ${(r=e.response)==null?void 0:r.statusText} from ${(a=e.response)==null?void 0:a.config.url}: ${JSON.stringify((n=e.response)==null?void 0:n.data)}`:e instanceof Error?e.message:`Unexpected error: ${m1(e)||e}`}const vo=e=>{const t=e.softTimeout||3e3,[r,a]=ae.useState(!1),n=q.useTheme();return ae.useEffect(()=>{const s=setTimeout(()=>{a(!0)},t);return()=>clearTimeout(s)}),b.jsx(q.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:n.palette.text.primary},children:e.error?b.jsx(rd,{loadingMessage:e.message,error:e.error}):b.jsxs(b.Fragment,{children:[b.jsx(q.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&b.jsx("div",{children:e.message}),b.jsx(q.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:n.palette.text.secondary},children:"This is taking longer than expected..."})]})})},rd=e=>{const t=g1(e.error),r=e.error instanceof Error?e.error.stack:null,a=q.useTheme();return b.jsxs(q.Stack,{sx:{maxHeight:"100%",maxWidth:"min(100%, 800px)",padding:2,overflow:"auto",color:a.palette.error.main,"& pre":{whiteSpace:"pre-wrap",wordBreak:"break-word",paddingBottom:"3rem"}},children:[(e.loadingMessage?`Error while ${lo.lowerFirst(q.capitalize(e.loadingMessage))} - `:"")+t,b.jsx("br",{}),r&&b.jsx("pre",{children:r})]})},y1=({title:e,titleId:t,...r},a)=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),b1=ae.forwardRef(y1),S1=({title:e,titleId:t,...r},a)=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),v1=ae.forwardRef(S1),x1=({title:e,titleId:t,...r},a)=>J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),O1=ae.forwardRef(x1),w1=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),C1=ae.forwardRef(w1);function P1(){this.__data__=[],this.size=0}function ad(e,t){return e===t||e!==e&&t!==t}function rs(e,t){for(var r=e.length;r--;)if(ad(e[r][0],t))return r;return-1}var V1=Array.prototype,R1=V1.splice;function _1(e){var t=this.__data__,r=rs(t,e);if(r<0)return!1;var a=t.length-1;return r==a?t.pop():R1.call(t,r,1),--this.size,!0}function A1(e){var t=this.__data__,r=rs(t,e);return r<0?void 0:t[r][1]}function T1(e){return rs(this.__data__,e)>-1}function E1(e,t){var r=this.__data__,a=rs(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}function Lt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}Lt.prototype.clear=P1;Lt.prototype.delete=_1;Lt.prototype.get=A1;Lt.prototype.has=T1;Lt.prototype.set=E1;function I1(){this.__data__=new Lt,this.size=0}function M1(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function j1(e){return this.__data__.get(e)}function $1(e){return this.__data__.has(e)}var U1="[object AsyncFunction]",L1="[object Function]",k1="[object GeneratorFunction]",B1="[object Proxy]";function nd(e){if(!dr(e))return!1;var t=fr(e);return t==L1||t==k1||t==U1||t==B1}var Es=Rt["__core-js_shared__"],ll=function(){var e=/[^.]+$/.exec(Es&&Es.keys&&Es.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function F1(e){return!!ll&&ll in e}var N1=Function.prototype,D1=N1.toString;function yr(e){if(e!=null){try{return D1.call(e)}catch{}try{return e+""}catch{}}return""}var z1=/[\\^$.*+?()[\]{}|]/g,G1=/^\[object .+?Constructor\]$/,J1=Function.prototype,H1=Object.prototype,q1=J1.toString,W1=H1.hasOwnProperty,K1=RegExp("^"+q1.call(W1).replace(z1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Q1(e){if(!dr(e)||F1(e))return!1;var t=nd(e)?K1:G1;return t.test(yr(e))}function Y1(e,t){return e==null?void 0:e[t]}function br(e,t){var r=Y1(e,t);return Q1(r)?r:void 0}var $a=br(Rt,"Map"),Ua=br(Object,"create");function X1(){this.__data__=Ua?Ua(null):{},this.size=0}function Z1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ex="__lodash_hash_undefined__",tx=Object.prototype,rx=tx.hasOwnProperty;function ax(e){var t=this.__data__;if(Ua){var r=t[e];return r===ex?void 0:r}return rx.call(t,e)?t[e]:void 0}var nx=Object.prototype,sx=nx.hasOwnProperty;function ox(e){var t=this.__data__;return Ua?t[e]!==void 0:sx.call(t,e)}var ix="__lodash_hash_undefined__";function lx(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ua&&t===void 0?ix:t,this}function hr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}hr.prototype.clear=X1;hr.prototype.delete=Z1;hr.prototype.get=ax;hr.prototype.has=ox;hr.prototype.set=lx;function cx(){this.size=0,this.__data__={hash:new hr,map:new($a||Lt),string:new hr}}function dx(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function as(e,t){var r=e.__data__;return dx(t)?r[typeof t=="string"?"string":"hash"]:r.map}function ux(e){var t=as(this,e).delete(e);return this.size-=t?1:0,t}function px(e){return as(this,e).get(e)}function hx(e){return as(this,e).has(e)}function mx(e,t){var r=as(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}function kt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}kt.prototype.clear=cx;kt.prototype.delete=ux;kt.prototype.get=px;kt.prototype.has=hx;kt.prototype.set=mx;var fx=200;function gx(e,t){var r=this.__data__;if(r instanceof Lt){var a=r.__data__;if(!$a||a.length<fx-1)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new kt(a)}return r.set(e,t),this.size=r.size,this}function jt(e){var t=this.__data__=new Lt(e);this.size=t.size}jt.prototype.clear=I1;jt.prototype.delete=M1;jt.prototype.get=j1;jt.prototype.has=$1;jt.prototype.set=gx;var yx="__lodash_hash_undefined__";function bx(e){return this.__data__.set(e,yx),this}function Sx(e){return this.__data__.has(e)}function An(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new kt;++t<r;)this.add(e[t])}An.prototype.add=An.prototype.push=bx;An.prototype.has=Sx;function vx(e,t){for(var r=-1,a=e==null?0:e.length;++r<a;)if(t(e[r],r,e))return!0;return!1}function xx(e,t){return e.has(t)}var Ox=1,wx=2;function sd(e,t,r,a,n,s){var o=r&Ox,i=e.length,l=t.length;if(i!=l&&!(o&&l>i))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var u=-1,p=!0,f=r&wx?new An:void 0;for(s.set(e,t),s.set(t,e);++u<i;){var g=e[u],h=t[u];if(a)var x=o?a(h,g,u,t,e,s):a(g,h,u,e,t,s);if(x!==void 0){if(x)continue;p=!1;break}if(f){if(!vx(t,function(E,U){if(!xx(f,U)&&(g===E||n(g,E,r,a,s)))return f.push(U)})){p=!1;break}}else if(!(g===h||n(g,h,r,a,s))){p=!1;break}}return s.delete(e),s.delete(t),p}var cl=Rt.Uint8Array;function Cx(e){var t=-1,r=Array(e.size);return e.forEach(function(a,n){r[++t]=[n,a]}),r}function Px(e){var t=-1,r=Array(e.size);return e.forEach(function(a){r[++t]=a}),r}var Vx=1,Rx=2,_x="[object Boolean]",Ax="[object Date]",Tx="[object Error]",Ex="[object Map]",Ix="[object Number]",Mx="[object RegExp]",jx="[object Set]",$x="[object String]",Ux="[object Symbol]",Lx="[object ArrayBuffer]",kx="[object DataView]",dl=Xt?Xt.prototype:void 0,Is=dl?dl.valueOf:void 0;function Bx(e,t,r,a,n,s,o){switch(r){case kx:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Lx:return!(e.byteLength!=t.byteLength||!s(new cl(e),new cl(t)));case _x:case Ax:case Ix:return ad(+e,+t);case Tx:return e.name==t.name&&e.message==t.message;case Mx:case $x:return e==t+"";case Ex:var i=Cx;case jx:var l=a&Vx;if(i||(i=Px),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;a|=Rx,o.set(e,t);var d=sd(i(e),i(t),a,n,s,o);return o.delete(e),d;case Ux:if(Is)return Is.call(e)==Is.call(t)}return!1}function Fx(e,t){for(var r=-1,a=t.length,n=e.length;++r<a;)e[n+r]=t[r];return e}var Vt=Array.isArray;function Nx(e,t,r){var a=t(e);return Vt(e)?a:Fx(a,r(e))}function Dx(e,t){for(var r=-1,a=e==null?0:e.length,n=0,s=[];++r<a;){var o=e[r];t(o,r,e)&&(s[n++]=o)}return s}function zx(){return[]}var Gx=Object.prototype,Jx=Gx.propertyIsEnumerable,ul=Object.getOwnPropertySymbols,Hx=ul?function(e){return e==null?[]:(e=Object(e),Dx(ul(e),function(t){return Jx.call(e,t)}))}:zx;function qx(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}var Wx="[object Arguments]";function pl(e){return ur(e)&&fr(e)==Wx}var od=Object.prototype,Kx=od.hasOwnProperty,Qx=od.propertyIsEnumerable,id=pl(function(){return arguments}())?pl:function(e){return ur(e)&&Kx.call(e,"callee")&&!Qx.call(e,"callee")};function Yx(){return!1}var ld=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hl=ld&&typeof module=="object"&&module&&!module.nodeType&&module,Xx=hl&&hl.exports===ld,ml=Xx?Rt.Buffer:void 0,Zx=ml?ml.isBuffer:void 0,ro=Zx||Yx,eO=9007199254740991,tO=/^(?:0|[1-9]\d*)$/;function cd(e,t){var r=typeof e;return t=t??eO,!!t&&(r=="number"||r!="symbol"&&tO.test(e))&&e>-1&&e%1==0&&e<t}var rO=9007199254740991;function xo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=rO}var aO="[object Arguments]",nO="[object Array]",sO="[object Boolean]",oO="[object Date]",iO="[object Error]",lO="[object Function]",cO="[object Map]",dO="[object Number]",uO="[object Object]",pO="[object RegExp]",hO="[object Set]",mO="[object String]",fO="[object WeakMap]",gO="[object ArrayBuffer]",yO="[object DataView]",bO="[object Float32Array]",SO="[object Float64Array]",vO="[object Int8Array]",xO="[object Int16Array]",OO="[object Int32Array]",wO="[object Uint8Array]",CO="[object Uint8ClampedArray]",PO="[object Uint16Array]",VO="[object Uint32Array]",we={};we[bO]=we[SO]=we[vO]=we[xO]=we[OO]=we[wO]=we[CO]=we[PO]=we[VO]=!0;we[aO]=we[nO]=we[gO]=we[sO]=we[yO]=we[oO]=we[iO]=we[lO]=we[cO]=we[dO]=we[uO]=we[pO]=we[hO]=we[mO]=we[fO]=!1;function RO(e){return ur(e)&&xo(e.length)&&!!we[fr(e)]}function _O(e){return function(t){return e(t)}}var dd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Va=dd&&typeof module=="object"&&module&&!module.nodeType&&module,AO=Va&&Va.exports===dd,Ms=AO&&cc.process,fl=function(){try{var e=Va&&Va.require&&Va.require("util").types;return e||Ms&&Ms.binding&&Ms.binding("util")}catch{}}(),gl=fl&&fl.isTypedArray,ud=gl?_O(gl):RO,TO=Object.prototype,EO=TO.hasOwnProperty;function IO(e,t){var r=Vt(e),a=!r&&id(e),n=!r&&!a&&ro(e),s=!r&&!a&&!n&&ud(e),o=r||a||n||s,i=o?qx(e.length,String):[],l=i.length;for(var c in e)EO.call(e,c)&&!(o&&(c=="length"||n&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||cd(c,l)))&&i.push(c);return i}var MO=Object.prototype;function jO(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||MO;return e===r}function $O(e,t){return function(r){return e(t(r))}}var UO=$O(Object.keys,Object),LO=Object.prototype,kO=LO.hasOwnProperty;function BO(e){if(!jO(e))return UO(e);var t=[];for(var r in Object(e))kO.call(e,r)&&r!="constructor"&&t.push(r);return t}function pd(e){return e!=null&&xo(e.length)&&!nd(e)}function Oo(e){return pd(e)?IO(e):BO(e)}function yl(e){return Nx(e,Oo,Hx)}var FO=1,NO=Object.prototype,DO=NO.hasOwnProperty;function zO(e,t,r,a,n,s){var o=r&FO,i=yl(e),l=i.length,c=yl(t),d=c.length;if(l!=d&&!o)return!1;for(var u=l;u--;){var p=i[u];if(!(o?p in t:DO.call(t,p)))return!1}var f=s.get(e),g=s.get(t);if(f&&g)return f==t&&g==e;var h=!0;s.set(e,t),s.set(t,e);for(var x=o;++u<l;){p=i[u];var E=e[p],U=t[p];if(a)var F=o?a(U,E,p,t,e,s):a(E,U,p,e,t,s);if(!(F===void 0?E===U||n(E,U,r,a,s):F)){h=!1;break}x||(x=p=="constructor")}if(h&&!x){var N=e.constructor,G=t.constructor;N!=G&&"constructor"in e&&"constructor"in t&&!(typeof N=="function"&&N instanceof N&&typeof G=="function"&&G instanceof G)&&(h=!1)}return s.delete(e),s.delete(t),h}var ao=br(Rt,"DataView"),no=br(Rt,"Promise"),so=br(Rt,"Set"),oo=br(Rt,"WeakMap"),bl="[object Map]",GO="[object Object]",Sl="[object Promise]",vl="[object Set]",xl="[object WeakMap]",Ol="[object DataView]",JO=yr(ao),HO=yr($a),qO=yr(no),WO=yr(so),KO=yr(oo),qt=fr;(ao&&qt(new ao(new ArrayBuffer(1)))!=Ol||$a&&qt(new $a)!=bl||no&&qt(no.resolve())!=Sl||so&&qt(new so)!=vl||oo&&qt(new oo)!=xl)&&(qt=function(e){var t=fr(e),r=t==GO?e.constructor:void 0,a=r?yr(r):"";if(a)switch(a){case JO:return Ol;case HO:return bl;case qO:return Sl;case WO:return vl;case KO:return xl}return t});var QO=1,wl="[object Arguments]",Cl="[object Array]",tn="[object Object]",YO=Object.prototype,Pl=YO.hasOwnProperty;function XO(e,t,r,a,n,s){var o=Vt(e),i=Vt(t),l=o?Cl:qt(e),c=i?Cl:qt(t);l=l==wl?tn:l,c=c==wl?tn:c;var d=l==tn,u=c==tn,p=l==c;if(p&&ro(e)){if(!ro(t))return!1;o=!0,d=!1}if(p&&!d)return s||(s=new jt),o||ud(e)?sd(e,t,r,a,n,s):Bx(e,t,l,r,a,n,s);if(!(r&QO)){var f=d&&Pl.call(e,"__wrapped__"),g=u&&Pl.call(t,"__wrapped__");if(f||g){var h=f?e.value():e,x=g?t.value():t;return s||(s=new jt),n(h,x,r,a,s)}}return p?(s||(s=new jt),zO(e,t,r,a,n,s)):!1}function ns(e,t,r,a,n){return e===t?!0:e==null||t==null||!ur(e)&&!ur(t)?e!==e&&t!==t:XO(e,t,r,a,ns,n)}function ZO(e,t){return ns(e,t)}const hd=({store:e})=>{const{t}=Me.useTranslation(),[r,a]=ae.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),n=ae.useRef(r);Wr(()=>{const o=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;ZO(n.current,o)||(n.current=o,a(o))});const s=[];for(const[o,i]of r.entries())i&&s.push(o);return b.jsx(q.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:s.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:s.map(o=>o+1).join(", ")})})},ew=q.styled(q.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 rn({labelValue:e,...t}){return b.jsxs(ew,{fullWidth:!0,variant:"filled",children:[b.jsx(q.InputLabel,{id:t.labelId,children:e}),b.jsx(q.Select,{...t})]})}var Vl=function(){try{var e=br(Object,"defineProperty");return e({},"",{}),e}catch{}}();function tw(e,t,r){t=="__proto__"&&Vl?Vl(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function rw(e,t,r,a){for(var n=-1,s=e==null?0:e.length;++n<s;){var o=e[n];t(a,o,r(o),e)}return a}function aw(e){return function(t,r,a){for(var n=-1,s=Object(t),o=a(t),i=o.length;i--;){var l=o[++n];if(r(s[l],l,s)===!1)break}return t}}var nw=aw();function sw(e,t){return e&&nw(e,t,Oo)}function ow(e,t){return function(r,a){if(r==null)return r;if(!pd(r))return e(r,a);for(var n=r.length,s=-1,o=Object(r);++s<n&&a(o[s],s,o)!==!1;);return r}}var iw=ow(sw);function lw(e,t,r,a){return iw(e,function(n,s,o){t(a,n,r(n),o)}),a}var cw=1,dw=2;function uw(e,t,r,a){var n=r.length,s=n;if(e==null)return!s;for(e=Object(e);n--;){var o=r[n];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++n<s;){o=r[n];var i=o[0],l=e[i],c=o[1];if(o[2]){if(l===void 0&&!(i in e))return!1}else{var d=new jt,u;if(!(u===void 0?ns(c,l,cw|dw,a,d):u))return!1}}return!0}function md(e){return e===e&&!dr(e)}function pw(e){for(var t=Oo(e),r=t.length;r--;){var a=t[r],n=e[a];t[r]=[a,n,md(n)]}return t}function fd(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function hw(e){var t=pw(e);return t.length==1&&t[0][2]?fd(t[0][0],t[0][1]):function(r){return r===e||uw(r,e,t)}}var mw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fw=/^\w*$/;function wo(e,t){if(Vt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Hn(e)?!0:fw.test(e)||!mw.test(e)||t!=null&&e in Object(t)}var gw="Expected a function";function Co(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(gw);var r=function(){var a=arguments,n=t?t.apply(this,a):a[0],s=r.cache;if(s.has(n))return s.get(n);var o=e.apply(this,a);return r.cache=s.set(n,o)||s,o};return r.cache=new(Co.Cache||kt),r}Co.Cache=kt;var yw=500;function bw(e){var t=Co(e,function(a){return r.size===yw&&r.clear(),a}),r=t.cache;return t}var Sw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vw=/\\(\\)?/g,xw=bw(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Sw,function(r,a,n,s){t.push(n?s.replace(vw,"$1"):a||r)}),t});function Ow(e,t){for(var r=-1,a=e==null?0:e.length,n=Array(a);++r<a;)n[r]=t(e[r],r,e);return n}var Rl=Xt?Xt.prototype:void 0,_l=Rl?Rl.toString:void 0;function gd(e){if(typeof e=="string")return e;if(Vt(e))return Ow(e,gd)+"";if(Hn(e))return _l?_l.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function yd(e){return e==null?"":gd(e)}function bd(e,t){return Vt(e)?e:wo(e,t)?[e]:xw(yd(e))}function ss(e){if(typeof e=="string"||Hn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Sd(e,t){t=bd(t,e);for(var r=0,a=t.length;e!=null&&r<a;)e=e[ss(t[r++])];return r&&r==a?e:void 0}function ww(e,t,r){var a=e==null?void 0:Sd(e,t);return a===void 0?r:a}function Cw(e,t){return e!=null&&t in Object(e)}function Pw(e,t,r){t=bd(t,e);for(var a=-1,n=t.length,s=!1;++a<n;){var o=ss(t[a]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}return s||++a!=n?s:(n=e==null?0:e.length,!!n&&xo(n)&&cd(o,n)&&(Vt(e)||id(e)))}function Vw(e,t){return e!=null&&Pw(e,t,Cw)}var Rw=1,_w=2;function Aw(e,t){return wo(e)&&md(t)?fd(ss(e),t):function(r){var a=ww(r,e);return a===void 0&&a===t?Vw(r,e):ns(t,a,Rw|_w)}}function Tw(e){return e}function Ew(e){return function(t){return t==null?void 0:t[e]}}function Iw(e){return function(t){return Sd(t,e)}}function Mw(e){return wo(e)?Ew(ss(e)):Iw(e)}function jw(e){return typeof e=="function"?e:e==null?Tw:typeof e=="object"?Vt(e)?Aw(e[0],e[1]):hw(e):Mw(e)}function $w(e,t){return function(r,a){var n=Vt(r)?rw:lw,s={};return n(r,e,jw(a),s)}}var an=$w(function(e,t,r){tw(e,r,t)}),Uw=0;function Lw(e){var t=++Uw;return yd(e)+t}const io=[{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}],kw=[{id:"continuous"},...io],Bw=["coordsys","tool"];class os{constructor(t,r,a,n){var s,o;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=a,this.tcps=n,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.showCoordSystemSelect=!0,this.showTcpSelect=!0,this.showOrientationSelect=!0,this.showIncrementSelect=!0,this.showTabIcons=!1,this.showVelocitySliderLabel=!0,this.showVelocityLegend=!1,this.showJointsLegend=!1,this.disposers=[];for(const i of a)if(i.coordinate_system===""){i.coordinate_system="world";break}this.selectedCoordSystemId=((s=a[0])==null?void 0:s.coordinate_system)||"world",this.selectedTcpId=((o=n[0])==null?void 0:o.id)||"",Be.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(Be.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[a,{coordinatesystems:n},{tcps:s}]=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 os(t,a,n||[],s||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return lo.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=ir.tryParseJson(localStorage.getItem("joggingToolStore"));t&&(this.tabsById[t.selectedTabId]&&(this.selectedTabId=t.selectedTabId),this.coordSystemsById[t.selectedCoordSystemId]&&(this.selectedCoordSystemId=t.selectedCoordSystemId),this.tcpsById[t.selectedTcpId]&&(this.selectedTcpId=t.selectedTcpId),this.incrementOptionsById[t.selectedIncrementId]&&(this.selectedIncrementId=t.selectedIncrementId),["translate","rotate"].includes(t.selectedCartesianMotionType)&&(this.selectedCartesianMotionType=t.selectedCartesianMotionType),["coordsys","tool"].includes(t.selectedOrientation)&&(this.selectedOrientation=t.selectedOrientation))}saveToLocalStorage(){localStorage.setItem("joggingToolStore",JSON.stringify(this.localStorageSave))}get isLocked(){return this.locks.size>0}get localStorageSave(){return{selectedTabId:this.selectedTabId,selectedCoordSystemId:this.selectedCoordSystemId,selectedTcpId:this.selectedTcpId,selectedOrientation:this.selectedOrientation,selectedIncrementId:this.selectedIncrementId,selectedCartesianMotionType:this.selectedCartesianMotionType}}get tabs(){return[{id:"cartesian",label:"cartesian"},{id:"joint",label:"joint"}]}get incrementOptions(){return kw}get discreteIncrementOptions(){return io}get incrementOptionsById(){return an(this.incrementOptions,t=>t.id)}get tabsById(){return an(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 an(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 an(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:io.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 a=this.tabs[r]||this.tabs[0];this.selectedTabId=a.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=Lw();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const Fw=ke.observer(({store:e})=>{var n;const{t}=Me.useTranslation(),r=[];function a(s){switch(s){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return s}}return e.showCoordSystemSelect&&r.push(b.jsx(rn,{labelId:"jogging-coord-select",labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:s=>e.setSelectedCoordSystemId(s.target.value),disabled:e.isLocked,children:e.coordSystems.map(s=>b.jsx(q.MenuItem,{value:s.coordinate_system,children:s.name&&e.coordSystemCountByName[s.name]>1?`${s.name} / ${s.coordinate_system}`:s.name||s.coordinate_system},s.coordinate_system))},"coord")),e.showTcpSelect&&r.push(b.jsx(rn,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:s=>e.setSelectedTcpId(s.target.value),disabled:e.isLocked,children:e.tcps.map(s=>b.jsx(q.MenuItem,{value:s.id,children:s.id},s.id))},"tcp")),e.showOrientationSelect&&r.push(b.jsx(rn,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:s=>e.setSelectedOrientation(s.target.value),disabled:e.isLocked,children:Bw.map(s=>b.jsx(q.MenuItem,{value:s,children:a(s)},s))},"orientation")),e.showIncrementSelect&&r.push(b.jsxs(rn,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((n=e.activeDiscreteIncrement)==null?void 0:n.id)||"continuous",onChange:s=>e.setSelectedIncrementId(s.target.value),disabled:e.isLocked,children:[b.jsx(q.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(s=>b.jsx(q.MenuItem,{value:s.id,children:e.currentMotionType==="translate"?`${s.mm}mm`:`${s.degrees}°`},s.id))]},"increment")),b.jsx(q.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((s,o)=>b.jsx(q.Box,{sx:{gridColumn:r.length%2===1&&o===r.length-1?"span 2":"auto"},children:s},o))})}),Nw=q.styled(q.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 Dw(e,t,r=(a,n)=>a===n){return e.length===t.length&&e.every((a,n)=>r(a,t[n]))}const zw=2;function kr(e,t,r,a,n){return r===1?Math.min(e+t,n):Math.max(e-t,a)}function vd(e,t){return e-t}function Al(e,t){const{index:r}=e.reduce((a,n,s)=>{const o=Math.abs(t-n);return a===null||o<a.distance||o===a.distance?{distance:o,index:s}:a},null)??{};return r}function nn(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let a=0;a<r.changedTouches.length;a+=1){const n=r.changedTouches[a];if(n.identifier===t.current)return{x:n.clientX,y:n.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Tn(e,t,r){return(e-t)*100/(r-t)}function Gw(e,t,r){return(r-t)*e+t}function Jw(e){if(Math.abs(e)<1){const r=e.toExponential().split("e-"),a=r[0].split(".")[1];return(a?a.length:0)+parseInt(r[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Hw(e,t,r){const a=Math.round((e-r)/t)*t+r;return Number(a.toFixed(Jw(t)))}function Tl({values:e,newValue:t,index:r}){const a=e.slice();return a[r]=t,a.sort(vd)}function sn({sliderRef:e,activeIndex:t,setActive:r}){var n,s,o;const a=dn(e.current);(!((n=e.current)!=null&&n.contains(a.activeElement))||Number((s=a==null?void 0:a.activeElement)==null?void 0:s.getAttribute("data-index"))!==t)&&((o=e.current)==null||o.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function on(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?Dw(e,t):!1}const qw={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}%`})}},Ww=e=>e;let ln;function El(){return ln===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?ln=CSS.supports("touch-action","none"):ln=!0),ln}function Kw(e){const{"aria-labelledby":t,defaultValue:r,disabled:a=!1,disableSwap:n=!1,isRtl:s=!1,marks:o=!1,max:i=100,min:l=0,name:c,onChange:d,onChangeCommitted:u,orientation:p="horizontal",rootRef:f,scale:g=Ww,step:h=1,shiftStep:x=10,tabIndex:E,value:U}=e,F=J.useRef(void 0),[N,G]=J.useState(-1),[K,j]=J.useState(-1),[L,k]=J.useState(!1),y=J.useRef(0),M=J.useRef(null),[B,z]=Fp({controlled:U,default:r??l,name:"Slider"}),D=d&&((W,Q,ee)=>{const de=W.nativeEvent||W,he=new de.constructor(de.type,de);Object.defineProperty(he,"target",{writable:!0,value:{value:Q,name:c}}),M.current=Q,d(he,Q,ee)}),re=Array.isArray(B);let Z=re?B.slice().sort(vd):[B];Z=Z.map(W=>W==null?l:Br(W,l,i));const xe=o===!0&&h!==null?[...Array(Math.floor((i-l)/h)+1)].map((W,Q)=>({value:l+h*Q})):o||[],X=xe.map(W=>W.value),[ce,fe]=J.useState(-1),le=J.useRef(null),He=Xl(f,le),_t=W=>Q=>{var de;const ee=Number(Q.currentTarget.getAttribute("data-index"));Ko(Q.target)&&fe(ee),j(ee),(de=W==null?void 0:W.onFocus)==null||de.call(W,Q)},ra=W=>Q=>{var ee;Ko(Q.target)||fe(-1),j(-1),(ee=W==null?void 0:W.onBlur)==null||ee.call(W,Q)},Sr=(W,Q)=>{const ee=Number(W.currentTarget.getAttribute("data-index")),de=Z[ee],he=X.indexOf(de);let te=Q;if(xe&&h==null){const $e=X[X.length-1];te>=$e?te=$e:te<=X[0]?te=X[0]:te=te<de?X[he-1]:X[he+1]}if(te=Br(te,l,i),re){n&&(te=Br(te,Z[ee-1]||-1/0,Z[ee+1]||1/0));const $e=te;te=Tl({values:Z,newValue:te,index:ee});let De=ee;n||(De=te.indexOf($e)),sn({sliderRef:le,activeIndex:De})}z(te),fe(ee),D&&!on(te,B)&&D(W,te,ee),u&&u(W,M.current??te)},er=W=>Q=>{var ee;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(Q.key)){Q.preventDefault();const de=Number(Q.currentTarget.getAttribute("data-index")),he=Z[de];let te=null;if(h!=null){const $e=Q.shiftKey?x:h;switch(Q.key){case"ArrowUp":te=kr(he,$e,1,l,i);break;case"ArrowRight":te=kr(he,$e,s?-1:1,l,i);break;case"ArrowDown":te=kr(he,$e,-1,l,i);break;case"ArrowLeft":te=kr(he,$e,s?1:-1,l,i);break;case"PageUp":te=kr(he,x,1,l,i);break;case"PageDown":te=kr(he,x,-1,l,i);break;case"Home":te=l;break;case"End":te=i;break}}else if(xe){const $e=X[X.length-1],De=X.indexOf(he),Te=[s?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],Qe=[s?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Te.includes(Q.key)?De===0?te=X[0]:te=X[De-1]:Qe.includes(Q.key)&&(De===X.length-1?te=$e:te=X[De+1])}te!=null&&Sr(Q,te)}(ee=W==null?void 0:W.onKeyDown)==null||ee.call(W,Q)};Ql(()=>{var W;a&&le.current.contains(document.activeElement)&&((W=document.activeElement)==null||W.blur())},[a]),a&&N!==-1&&G(-1),a&&ce!==-1&&fe(-1);const Bt=W=>Q=>{var ee;(ee=W.onChange)==null||ee.call(W,Q),Sr(Q,Q.target.valueAsNumber)},nt=J.useRef(void 0);let dt=p;s&&p==="horizontal"&&(dt+="-reverse");const st=({finger:W,move:Q=!1})=>{const{current:ee}=le,{width:de,height:he,bottom:te,left:$e}=ee.getBoundingClientRect();let De;dt.startsWith("vertical")?De=(te-W.y)/he:De=(W.x-$e)/de,dt.includes("-reverse")&&(De=1-De);let Te;if(Te=Gw(De,l,i),h)Te=Hw(Te,h,l);else{const tr=Al(X,Te);Te=X[tr]}Te=Br(Te,l,i);let Qe=0;if(re){Q?Qe=nt.current:Qe=Al(Z,Te),n&&(Te=Br(Te,Z[Qe-1]||-1/0,Z[Qe+1]||1/0));const tr=Te;Te=Tl({values:Z,newValue:Te,index:Qe}),n&&Q||(Qe=Te.indexOf(tr),nt.current=Qe)}return{newValue:Te,activeIndex:Qe}},At=ms(W=>{const Q=nn(W,F);if(!Q)return;if(y.current+=1,W.type==="mousemove"&&W.buttons===0){et(W);return}const{newValue:ee,activeIndex:de}=st({finger:Q,move:!0});sn({sliderRef:le,activeIndex:de,setActive:G}),z(ee),!L&&y.current>zw&&k(!0),D&&!on(ee,B)&&D(W,ee,de)}),et=ms(W=>{const Q=nn(W,F);if(k(!1),!Q)return;const{newValue:ee}=st({finger:Q,move:!0});G(-1),W.type==="touchend"&&j(-1),u&&u(W,M.current??ee),F.current=void 0,Tt()}),Ne=ms(W=>{if(a)return;El()||W.preventDefault();const Q=W.changedTouches[0];Q!=null&&(F.current=Q.identifier);const ee=nn(W,F);if(ee!==!1){const{newValue:he,activeIndex:te}=st({finger:ee});sn({sliderRef:le,activeIndex:te,setActive:G}),z(he),D&&!on(he,B)&&D(W,he,te)}y.current=0;const de=dn(le.current);de.addEventListener("touchmove",At,{passive:!0}),de.addEventListener("touchend",et,{passive:!0})}),Tt=J.useCallback(()=>{const W=dn(le.current);W.removeEventListener("mousemove",At),W.removeEventListener("mouseup",et),W.removeEventListener("touchmove",At),W.removeEventListener("touchend",et)},[et,At]);J.useEffect(()=>{const{current:W}=le;return W.addEventListener("touchstart",Ne,{passive:El()}),()=>{W.removeEventListener("touchstart",Ne),Tt()}},[Tt,Ne]),J.useEffect(()=>{a&&Tt()},[a,Tt]);const Ft=W=>Q=>{var he;if((he=W.onMouseDown)==null||he.call(W,Q),a||Q.defaultPrevented||Q.button!==0)return;Q.preventDefault();const ee=nn(Q,F);if(ee!==!1){const{newValue:te,activeIndex:$e}=st({finger:ee});sn({sliderRef:le,activeIndex:$e,setActive:G}),z(te),D&&!on(te,B)&&D(Q,te,$e)}y.current=0;const de=dn(le.current);de.addEventListener("mousemove",At,{passive:!0}),de.addEventListener("mouseup",et)},yt=Tn(re?Z[0]:l,l,i),Fe=Tn(Z[Z.length-1],l,i)-yt,Nt=(W={})=>{const Q=un(W),ee={onMouseDown:Ft(Q||{})},de={...Q,...ee};return{...W,ref:He,...de}},Et=W=>Q=>{var de;(de=W.onMouseOver)==null||de.call(W,Q);const ee=Number(Q.currentTarget.getAttribute("data-index"));j(ee)},vr=W=>Q=>{var ee;(ee=W.onMouseLeave)==null||ee.call(W,Q),j(-1)},xr=(W={})=>{const Q=un(W),ee={onMouseOver:Et(Q||{}),onMouseLeave:vr(Q||{})};return{...W,...Q,...ee}},Dt=W=>({pointerEvents:N!==-1&&N!==W?"none":void 0});let zt;return p==="vertical"&&(zt=s?"vertical-rl":"vertical-lr"),{active:N,axis:dt,axisProps:qw,dragging:L,focusedThumbIndex:ce,getHiddenInputProps:(W={})=>{const Q=un(W),ee={onChange:Bt(Q||{}),onFocus:_t(Q||{}),onBlur:ra(Q||{}),onKeyDown:er(Q||{})},de={...Q,...ee};return{tabIndex:E,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":g(i),"aria-valuemin":g(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:a,...W,...de,style:{...Np,direction:s?"rtl":"ltr",width:"100%",height:"100%",writingMode:zt}}},getRootProps:Nt,getThumbProps:xr,marks:xe,open:K,range:re,rootRef:He,trackLeap:Fe,trackOffset:yt,values:Z,getThumbStyle:Dt}}function fn(e){return typeof e=="string"}const Qw=e=>!e||!fn(e);function Yw(e){return typeof e.main=="string"}function Xw(e,t=[]){if(!Yw(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Po(e=[]){return([,t])=>t&&Xw(t,e)}function Zw(e){return Ba("MuiSlider",e)}const lt=Gl("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"]),eC=e=>{const{open:t}=e;return{offset:Pt(t&&lt.valueLabelOpen),circle:lt.valueLabelCircle,label:lt.valueLabelLabel}};function xd(e){const{children:t,className:r,value:a}=e,n=eC(e);return t?J.cloneElement(t,{className:Pt(t.props.className)},b.jsxs(J.Fragment,{children:[t.props.children,b.jsx("span",{className:Pt(n.offset,r),"aria-hidden":!0,children:b.jsx("span",{className:n.circle,children:b.jsx("span",{className:n.label,children:a})})})]})):null}process.env.NODE_ENV!=="production"&&(xd.propTypes={children:S.element.isRequired,className:S.string,value:S.node});function Il(e){return e}const tC=$t("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${We(r.color)}`],r.size!=="medium"&&t[`size${We(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(mr(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${lt.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${lt.dragging}`]:{[`& .${lt.thumb}, & .${lt.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Po()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),rC=$t("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}}]}),aC=$t("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(mr(({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(Po()).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:_a(e.palette[t].main,.62),borderColor:_a(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:Ra(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:Ra(e.palette[t].main,.5)})}}}))]}))),nC=$t("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${We(r.color)}`],r.size!=="medium"&&t[`thumbSize${We(r.size)}`]]}})(mr(({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%)"},[`&.${lt.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(Po()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${lt.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Ls(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${lt.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Ls(e.palette[t].main,.16)}`}}}}))]}))),Od=$t(xd,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(mr(({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%"},[`&.${lt.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%"},[`&.${lt.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"&&(Od.propTypes={children:S.element.isRequired,index:S.number.isRequired,open:S.bool.isRequired,value:S.node});const sC=$t("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>mo(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(mr(({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}}]}))),oC=$t("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>mo(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(mr(({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}}]}))),iC=e=>{const{disabled:t,dragging:r,marked:a,orientation:n,track:s,classes:o,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",a&&"marked",n==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",i&&`color${We(i)}`,l&&`size${We(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${We(l)}`,i&&`thumbColor${We(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return po(c,Zw,o)},lC=({children:e})=>e,wd=J.forwardRef(function(t,r){const a=fo({props:t,name:"MuiSlider"}),n=qp(),{"aria-label":s,"aria-valuetext":o,"aria-labelledby":i,component:l="span",components:c={},componentsProps:d={},color:u="primary",classes:p,className:f,disableSwap:g=!1,disabled:h=!1,getAriaLabel:x,getAriaValueText:E,marks:U=!1,max:F=100,min:N=0,name:G,onChange:K,onChangeCommitted:j,orientation:L="horizontal",shiftStep:k=10,size:y="medium",step:M=1,scale:B=Il,slotProps:z,slots:D,tabIndex:re,track:Z="normal",value:xe,valueLabelDisplay:X="off",valueLabelFormat:ce=Il,...fe}=a,le={...a,isRtl:n,max:F,min:N,classes:p,disabled:h,disableSwap:g,orientation:L,marks:U,color:u,size:y,step:M,shiftStep:k,scale:B,track:Z,valueLabelDisplay:X,valueLabelFormat:ce},{axisProps:He,getRootProps:_t,getHiddenInputProps:ra,getThumbProps:Sr,open:er,active:Bt,axis:nt,focusedThumbIndex:dt,range:st,dragging:At,marks:et,values:Ne,trackOffset:Tt,trackLeap:Ft,getThumbStyle:yt}=Kw({...le,rootRef:r});le.marked=et.length>0&&et.some(Ve=>Ve.label),le.dragging=At,le.focusedThumbIndex=dt;const Fe=iC(le),Nt=(D==null?void 0:D.root)??c.Root??tC,Et=(D==null?void 0:D.rail)??c.Rail??rC,vr=(D==null?void 0:D.track)??c.Track??aC,xr=(D==null?void 0:D.thumb)??c.Thumb??nC,Dt=(D==null?void 0:D.valueLabel)??c.ValueLabel??Od,zt=(D==null?void 0:D.mark)??c.Mark??sC,Or=(D==null?void 0:D.markLabel)??c.MarkLabel??oC,W=(D==null?void 0:D.input)??c.Input??"input",Q=(z==null?void 0:z.root)??d.root,ee=(z==null?void 0:z.rail)??d.rail,de=(z==null?void 0:z.track)??d.track,he=(z==null?void 0:z.thumb)??d.thumb,te=(z==null?void 0:z.valueLabel)??d.valueLabel,$e=(z==null?void 0:z.mark)??d.mark,De=(z==null?void 0:z.markLabel)??d.markLabel,Te=(z==null?void 0:z.input)??d.input,Qe=Gt({elementType:Nt,getSlotProps:_t,externalSlotProps:Q,externalForwardedProps:fe,additionalProps:{...Qw(Nt)&&{as:l}},ownerState:{...le,...Q==null?void 0:Q.ownerState},className:[Fe.root,f]}),tr=Gt({elementType:Et,externalSlotProps:ee,ownerState:le,className:Fe.rail}),is=Gt({elementType:vr,externalSlotProps:de,additionalProps:{style:{...He[nt].offset(Tt),...He[nt].leap(Ft)}},ownerState:{...le,...de==null?void 0:de.ownerState},className:Fe.track}),aa=Gt({elementType:xr,getSlotProps:Sr,externalSlotProps:he,ownerState:{...le,...he==null?void 0:he.ownerState},className:Fe.thumb}),na=Gt({elementType:Dt,externalSlotProps:te,ownerState:{...le,...te==null?void 0:te.ownerState},className:Fe.valueLabel}),wr=Gt({elementType:zt,externalSlotProps:$e,ownerState:le,className:Fe.mark}),bt=Gt({elementType:Or,externalSlotProps:De,ownerState:le,className:Fe.markLabel}),sa=Gt({elementType:W,getSlotProps:ra,externalSlotProps:Te,ownerState:le});return b.jsxs(Nt,{...Qe,children:[b.jsx(Et,{...tr}),b.jsx(vr,{...is}),et.filter(Ve=>Ve.value>=N&&Ve.value<=F).map((Ve,Ue)=>{const oa=Tn(Ve.value,N,F),rr=He[nt].offset(oa);let ut;return Z===!1?ut=Ne.includes(Ve.value):ut=Z==="normal"&&(st?Ve.value>=Ne[0]&&Ve.value<=Ne[Ne.length-1]:Ve.value<=Ne[0])||Z==="inverted"&&(st?Ve.value<=Ne[0]||Ve.value>=Ne[Ne.length-1]:Ve.value>=Ne[0]),b.jsxs(J.Fragment,{children:[b.jsx(zt,{"data-index":Ue,...wr,...!fn(zt)&&{markActive:ut},style:{...rr,...wr.style},className:Pt(wr.className,ut&&Fe.markActive)}),Ve.label!=null?b.jsx(Or,{"aria-hidden":!0,"data-index":Ue,...bt,...!fn(Or)&&{markLabelActive:ut},style:{...rr,...bt.style},className:Pt(Fe.markLabel,bt.className,ut&&Fe.markLabelActive),children:Ve.label}):null]},Ue)}),Ne.map((Ve,Ue)=>{const oa=Tn(Ve,N,F),rr=He[nt].offset(oa),ut=X==="off"?lC:Dt;return b.jsx(ut,{...!fn(ut)&&{valueLabelFormat:ce,valueLabelDisplay:X,value:typeof ce=="function"?ce(B(Ve),Ue):ce,index:Ue,open:er===Ue||Bt===Ue||X==="on",disabled:h},...na,children:b.jsx(xr,{"data-index":Ue,...aa,className:Pt(Fe.thumb,aa.className,Bt===Ue&&Fe.active,dt===Ue&&Fe.focusVisible),style:{...rr,...yt(Ue),...aa.style},children:b.jsx(W,{"data-index":Ue,"aria-label":x?x(Ue):s,"aria-valuenow":B(Ve),"aria-labelledby":i,"aria-valuetext":E?E(B(Ve),Ue):o,value:Ne[Ue],...sa})})},Ue)})]})});process.env.NODE_ENV!=="production"&&(wd.propTypes={"aria-label":Wo(S.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":S.string,"aria-valuetext":Wo(S.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:S.node,classes:S.object,className:S.string,color:S.oneOfType([S.oneOf(["primary","secondary","error","info","success","warning"]),S.string]),components:S.shape({Input:S.elementType,Mark:S.elementType,MarkLabel:S.elementType,Rail:S.elementType,Root:S.elementType,Thumb:S.elementType,Track:S.elementType,ValueLabel:S.elementType}),componentsProps:S.shape({input:S.oneOfType([S.func,S.object]),mark:S.oneOfType([S.func,S.object]),markLabel:S.oneOfType([S.func,S.object]),rail:S.oneOfType([S.func,S.object]),root:S.oneOfType([S.func,S.object]),thumb:S.oneOfType([S.func,S.object]),track:S.oneOfType([S.func,S.object]),valueLabel:S.oneOfType([S.func,S.shape({children:S.element,className:S.string,open:S.bool,style:S.object,value:S.node,valueLabelDisplay:S.oneOf(["auto","off","on"])})])}),defaultValue:S.oneOfType([S.arrayOf(S.number),S.number]),disabled:S.bool,disableSwap:S.bool,getAriaLabel:S.func,getAriaValueText:S.func,marks:S.oneOfType([S.arrayOf(S.shape({label:S.node,value:S.number.isRequired})),S.bool]),max:S.number,min:S.number,name:S.string,onChange:S.func,onChangeCommitted:S.func,orientation:S.oneOf(["horizontal","vertical"]),scale:S.func,shiftStep:S.number,size:S.oneOfType([S.oneOf(["small","medium"]),S.string]),slotProps:S.shape({input:S.oneOfType([S.func,S.object]),mark:S.oneOfType([S.func,S.object]),markLabel:S.oneOfType([S.func,S.object]),rail:S.oneOfType([S.func,S.object]),root:S.oneOfType([S.func,S.object]),thumb:S.oneOfType([S.func,S.object]),track:S.oneOfType([S.func,S.object]),valueLabel:S.oneOfType([S.func,S.shape({children:S.element,className:S.string,open:S.bool,style:S.object,value:S.node,valueLabelDisplay:S.oneOf(["auto","off","on"])})])}),slots:S.shape({input:S.elementType,mark:S.elementType,markLabel:S.elementType,rail:S.elementType,root:S.elementType,thumb:S.elementType,track:S.elementType,valueLabel:S.elementType}),step:S.number,sx:S.oneOfType([S.arrayOf(S.oneOfType([S.func,S.object,S.bool])),S.func,S.object]),tabIndex:S.number,track:S.oneOf(["inverted","normal",!1]),value:S.oneOfType([S.arrayOf(S.number),S.number]),valueLabelDisplay:S.oneOf(["auto","off","on"]),valueLabelFormat:S.oneOfType([S.func,S.string])});var cC="[object Number]";function dC(e){return typeof e=="number"||ur(e)&&fr(e)==cC}const Cd=ke.observer(e=>{var s,o,i;const t=q.useTheme(),{store:r}=e,{t:a}=Me.useTranslation();function n(l,c){c===e.velocity||!dC(c)||e.onVelocityChange(c)}return b.jsxs(q.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&b.jsx(q.Typography,{sx:{color:(i=(o=(s=t.componentsExt)==null?void 0:s.JoggingPanel)==null?void 0:o.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:a("Jogging.Velocity.bt")}),b.jsx(wd,{value:e.velocity,color:"secondary",onChange:n,min:e.min,max:e.max,"aria-labelledby":"input-slider",disabled:e.disabled,sx:{"& .MuiSlider-valueLabelOpen":{zIndex:100,backgroundColor:"transparent",top:"0px"}}}),r.showVelocitySliderLabel&&(e.renderValue?e.renderValue(e.velocity):b.jsx(Vo,{value:e.velocity.toString()}))]})});function Vo({value:e,sx:t}){var a;const r=q.useTheme();return b.jsx(q.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(a=r.palette.backgroundPaperElevation)==null?void 0:a[8],borderRadius:"10px",minWidth:"111px",...t},children:b.jsx(q.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Pd=ke.observer(({store:e})=>{const{t}=Me.useTranslation(),r=ke.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?a=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:a})}`:a=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:a})}`}}));return b.jsx(Cd,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:a=>b.jsx(Vo,{value:r.valueLabelFormat(a),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),uC=ke.observer(({store:e,children:t})=>{const{t:r}=Me.useTranslation(),a=q.useTheme();function n(p,f){(f==="translate"||f==="rotate")&&e.setSelectedCartesianMotionType(f)}lc(()=>[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 s(p,f){const g=await e.activate(),h=g.motionStream.rapidlyChangingMotionState.tcp_pose,x=g.motionStream.rapidlyChangingMotionState.state.joint_position;h&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:p.axis,direction:p.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:h,currentJoints:x,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:p.axis,direction:p.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:f.mm}:{type:"rotate",distanceRads:ir.degreesToRadians(f.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function o(p){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return s(p,e.activeDiscreteIncrement);p.motionType==="translate"?await e.jogger.startTCPTranslation({axis:p.axis,direction:p.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:p.axis,direction:p.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function i(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(p,f,g){var x,E,U;const h=(U=(E=(x=g.componentsExt)==null?void 0:x.JoggingPanel)==null?void 0:E.JoggingCartesian)==null?void 0:U.Axis;if(h)return f==="translate"?h[p]:h.CustomRotation??h[p]}const c=[{id:"x",icon:b.jsx(b1,{}),colors:l("X",e.selectedCartesianMotionType,a)},{id:"y",icon:b.jsx(v1,{}),colors:l("Y",e.selectedCartesianMotionType,a)},{id:"z",icon:b.jsx(O1,{}),colors:l("Z",e.selectedCartesianMotionType,a)}];function d(p){return r("General.mm.variable",{amount:p.toFixed(1)})}function u(p){return r("General.degree.variable",{amount:ir.radiansToDegrees(p).toFixed(1)})}return b.jsxs(q.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[b.jsxs(q.Stack,{gap:2,children:[b.jsx(Fw,{store:e}),b.jsx(Pd,{store:e}),b.jsx(q.Divider,{})]}),b.jsx(q.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:b.jsxs(q.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[b.jsxs(Nw,{value:e.selectedCartesianMotionType,onChange:n,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[b.jsx(q.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),b.jsx(q.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(p=>{var f,g;return b.jsx(Fs,{colors:p.colors,disabled:e.isLocked,activeJoggingDirection:((f=e.incrementJogInProgress)==null?void 0:f.axis)===p.id?e.incrementJogInProgress.direction:void 0,label:b.jsxs(b.Fragment,{children:[p.icon,b.jsx(q.Typography,{sx:{fontSize:"24px",color:((g=p.colors)==null?void 0:g.labelColor)??a.palette.text.primary},children:p.id.toUpperCase()})]}),getDisplayedValue:()=>{var h;return d(((h=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:h.position[p.id])||0)},startJogging:h=>o({axis:p.id,motionType:"translate",direction:h}),stopJogging:i},p.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(p=>{var f,g;return b.jsx(Fs,{colors:p.colors,disabled:e.isLocked,activeJoggingDirection:((f=e.incrementJogInProgress)==null?void 0:f.axis)===p.id?e.incrementJogInProgress.direction:void 0,label:b.jsxs(b.Fragment,{children:[b.jsx(C1,{}),b.jsx(q.Typography,{sx:{fontSize:"24px",color:((g=p.colors)==null?void 0:g.labelColor)??a.palette.text.primary},children:p.id.toUpperCase()})]}),getDisplayedValue:()=>{var h,x;return u(((x=(h=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:h.orientation)==null?void 0:x[p.id])||0)},startJogging:h=>o({axis:p.id,motionType:"rotate",direction:h}),stopJogging:i},p.id)})]})}),b.jsx(hd,{store:e}),t&&b.jsx(q.Divider,{}),t]})}),pC=ke.observer(({store:e,children:t})=>{const r=q.useTheme();async function a(s){await e.activate(),await e.jogger.startJointRotation({joint:s.joint,direction:s.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function n(){await e.jogger.stop(),await e.deactivate()}return b.jsxs(q.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[b.jsx(Pd,{store:e}),b.jsx(q.Divider,{}),b.jsx(q.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:b.jsx(q.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(s=>{var c;const o=(c=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:c[s.index],i=(o==null?void 0:o.lower_limit)!==void 0?ir.radiansToDegrees(o.lower_limit):void 0,l=(o==null?void 0:o.upper_limit)!==void 0?ir.radiansToDegrees(o.upper_limit):void 0;return b.jsxs(q.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&b.jsx(q.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${s.index+1}`}),b.jsx(uc,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const d=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[s.index];return d!==void 0?ir.radiansToDegrees(d):void 0},startJogging:d=>a({joint:s.index,direction:d}),stopJogging:n})]},`joint-${s.index}`)})})}),b.jsx(hd,{store:e}),t&&b.jsx(q.Divider,{}),t]})}),hC=qr(ke.observer(e=>{const t=lo.isString(e.nova)?new h1({instanceUrl:e.nova}):e.nova,r=ke.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function a(){Be.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let n=e.store;if(!n){const s=await t.connectJogger(e.motionGroupId);n=await os.loadFor(s)}Be.runInAction(()=>{r.joggingStore=n}),e.onSetup&&e.onSetup(n)}catch(n){r.loadingError=n}}return ae.useEffect(()=>(a(),e.store?()=>null:()=>{var n;(n=r.joggingStore)==null||n.dispose()}),[e.store,e.nova,e.motionGroupId]),ae.useEffect(()=>{const n=r.joggingStore;n&&(e.locked?n.lock("external"):n.unlock("external"))},[r.joggingStore,e.locked]),b.jsx(q.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?b.jsx(mC,{store:r.joggingStore,children:e.children}):b.jsx(vo,{message:"Loading jogging",error:r.loadingError})})})),mC=ke.observer(({store:e,children:t})=>{const{t:r}=Me.useTranslation();function a(){if(e.currentTab.id==="cartesian")return b.jsx(b.Fragment,{children:b.jsx(uC,{store:e,children:t})});if(e.currentTab.id==="joint")return b.jsx(b.Fragment,{children:b.jsx(pC,{store:e,children:t})})}return b.jsxs(q.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[b.jsx(q.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(n=>{const s=n.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),o=n.label==="cartesian"?b.jsx(Jm,{fontSize:"small",sx:{mr:1}}):b.jsx(Hm,{fontSize:"small",sx:{mr:1}});return b.jsx(q.Tab,{label:e.showTabIcons?b.jsxs(q.Stack,{direction:"row",alignItems:"center",children:[o,s]}):s,id:`jogging-tab-${n.id}`,"aria-controls":`jogging-tab-${n.id}`},n.id)})}),b.jsx(q.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:a()})]})}),Vd=ae.forwardRef(({label:e,value:t},r)=>{var i;const a=q.useTheme(),[n,s]=ae.useState(!1);async function o(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),s(!0),!0}catch(l){console.error(l);const c=window.getSelection(),d=document.createRange();d.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(d)}return!1}return ae.useEffect(()=>{if(!n)return;const l=setTimeout(()=>s(!1),3e3);return()=>{l&&clearTimeout(l)}},[n]),b.jsx(q.Tooltip,{open:n,title:"Copied!",children:b.jsx(q.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(i=a.palette.backgroundPaperElevation)==null?void 0:i[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>o(),children:b.jsx(q.Typography,{ref:r,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:a.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})}),fC=ke.observer(({motionStream:e})=>{const t=ae.useRef(null);function r(){const a=e.rapidlyChangingMotionState.tcp_pose;return a?ir.poseToWandelscriptString(a):""}return Wr(()=>{if(!t.current)return;const a=r();t.current.textContent!==a&&(t.current.textContent=a)}),b.jsx(q.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:b.jsx(Vd,{value:r(),ref:t})})}),gC=ke.observer(({motionStream:e})=>{const t=ae.useRef(null);function r(){const{joints:a}=e.rapidlyChangingMotionState.state.joint_position;return`[${a.map(n=>parseFloat(n.toFixed(4))).join(", ")}]`}return Wr(()=>{if(!t.current)return;const a=r();t.current.textContent!==a&&(t.current.textContent=a)}),b.jsx(q.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:b.jsx(Vd,{value:r(),ref:t})})});function yC(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function bC({baseUrl:e=yC(),...t}){return b.jsxs(q.Dialog,{"aria-labelledby":"no-motion-group-modal-title",open:!0,fullWidth:!0,sx:{"& .MuiModal-backdrop":{backdropFilter:"blur(10px)"},"& .MuiDialog-paper":{"::before":{content:'""',height:"8px",width:"100%",background:"linear-gradient(90deg, #FF0E65 0%, #47D3FF 100%)"},background:"#101629"}},children:[b.jsx(q.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),b.jsxs(q.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[b.jsx(q.Typography,{color:"#fff",children:"Found no devices to connect to."}),b.jsx(q.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),b.jsx(q.DialogActions,{children:b.jsxs(q.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[b.jsx(q.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),b.jsx(q.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}const SC=Array(6).fill(2*Math.PI),Ml="0.0.0-semantically-released";function Ro(e){let t=Ml;return Ml.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function vC(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(a=>t(a))]}return t(e).filter(r=>_d(r))}function Rd(e){return e.name.endsWith("_FLG")}function _d(e){return/_J[0-9]+$/.test(e.name)}function xC(e,t){let r;function a(n){if(Rd(n)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${n.name}. Only one _FLG group is allowed.`);r=n}_d(n),n.children.map(a)}if(a(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 Ad({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:a}){$s.Globals.assign({frameLoop:"always"});const n=ae.useRef([]),s=ae.useRef([]),{invalidate:o}=qd.useThree();function i(p){p&&(s.current=vC(p),c(),o())}function l(p){n.current=p,u.start(Object.assign({},n.current))}function c(){const p=s.current.map((f,g)=>d[g].get());if(r)r(s.current,p);else for(const[f,g]of s.current.entries()){const h=t[f],x=h.theta||0,E=h.reverse_rotation_direction?-1:1;g.rotation.y=E*p[f]+x}}ic(()=>{const p=e.state.joint_position.joints.filter(f=>f!==void 0);requestAnimationFrame(()=>l(p))});const[d,u]=$s.useSpring(()=>({...Object.assign({},e.state.joint_position.joints),onChange:()=>{c(),o()},onResolve:()=>{c()}}));return b.jsx("group",{ref:i,children:a})}const jl="line",$l="mesh";function OC({rapidlyChangingMotionState:e,dhParameters:t,...r}){const a=new ht.Matrix4;function n(i,l){const c=new ht.Vector3,d=new ht.Quaternion,u=new ht.Vector3;a.decompose(c,d,u);const p=c.clone(),f=new ht.Matrix4().makeRotationY(i.theta+l*(i.reverse_rotation_direction?-1:1)).multiply(new ht.Matrix4().makeTranslation(0,i.d/1e3,0)).multiply(new ht.Matrix4().makeTranslation(i.a/1e3,0,0)).multiply(new ht.Matrix4().makeRotationX(i.alpha));return a.multiply(f),a.decompose(c,d,u),{a:p,b:c}}function s(i,l,c,d){if(!t)return;const u=t[i];if(!u)return;const{a:p,b:f}=n(u,d);l.geometry.setPositions([p.toArray(),f.toArray()].flat()),c.position.set(f.x,f.y,f.z)}function o(i,l){a.identity(),i.forEach((c,d)=>{s(d,c.getObjectByName(jl),c.getObjectByName($l),l[d])})}return b.jsx(b.Fragment,{children:b.jsx(Ad,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:o,children:b.jsxs("group",{...r,name:"Scene",children:[b.jsxs("mesh",{children:[b.jsx("sphereGeometry",{args:[.01,32,32]}),b.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((i,l)=>{const{a:c,b:d}=n(i,e.state.joint_position.joints[l]??0),u=`dhrobot_J0${l}`;return b.jsxs("group",{name:u,children:[b.jsx(mt.Line,{name:jl,points:[c,d],color:"white",lineWidth:5}),b.jsxs("mesh",{name:$l,position:d,children:[b.jsx("sphereGeometry",{args:[.01,32,32]}),b.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+l)]},u)})]})})})}const wC=console.warn;function CC(){return ae.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&wC(e)}},[]),b.jsx(b.Fragment,{})}function PC(e){return e.type==="Mesh"}function VC({modelURL:e,flangeRef:t,postModelRender:r,...a}){const{gltf:n}=xC(mt.useGLTF(e),e.split("/").pop()||e),s=ae.useCallback(i=>{i&&r&&r()},[e]);function o(i){return PC(i)?b.jsx("mesh",{name:i.name,geometry:i.geometry,material:i.material,position:i.position,rotation:i.rotation},i.uuid):b.jsx($s.animated.group,{name:i.name,position:i.position,rotation:i.rotation,ref:Rd(i)?t:void 0,children:i.children.map(o)},i.uuid)}return b.jsx("group",{...a,dispose:null,ref:s,children:o(n.scene)})}const RC=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof Ie.Mesh){r.material instanceof Ie.Material&&(r.material.colorWrite=!1);const a=r.clone(),n=r.clone();a.material=new Ie.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:Ie.DoubleSide}),a.userData.isGhost=!0,n.material=new Ie.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:Ie.DoubleSide}),n.userData.isGhost=!0,r.parent&&(r.parent.add(a),r.parent.add(n))}}),e.userData.isGhost=!0)},_C=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var a;r instanceof Ie.Mesh&&((a=r.userData)!=null&&a.isGhost?t.push(r):r.material instanceof Ie.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},Td=qr(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:a=Ro,flangeRef:n,postModelRender:s,transparentColor:o,...i})=>{const[l,c]=ae.useState(null),d=ae.useCallback(p=>{c(p)},[]);ae.useEffect(()=>{l&&(o?RC(l,o):_C(l))},[l,o]);const u=b.jsx(OC,{rapidlyChangingMotionState:e,dhParameters:r,...i});return b.jsxs(Xd.ErrorBoundary,{fallback:u,onError:p=>{console.error(p)},children:[b.jsx(ae.Suspense,{fallback:u,children:b.jsx("group",{ref:d,children:b.jsx(Ad,{rapidlyChangingMotionState:e,dhParameters:r,children:b.jsx(VC,{modelURL:a(t),postModelRender:s,flangeRef:n,...i})})})}),b.jsx(CC,{})]})});function AC({connectedMotionGroup:e,getModel:t=Ro,flangeRef:r,transparentColor:a,...n}){return e.dhParameters?b.jsx(Td,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:a,...n}):null}const TC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),EC=ae.forwardRef(TC),IC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),MC=ae.forwardRef(IC),wt=ke.observer(({id:e,icon:t,color:r,title:a,name:n,label:s,explanation:o,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const d=ke.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!d.anchorEl},openPopover(u){d.anchorEl=u.currentTarget},closePopover(){d.anchorEl=null}}));return b.jsxs(b.Fragment,{children:[b.jsxs(q.Stack,{"aria-owns":d.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:d.openPopover,onMouseLeave:d.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[b.jsx(q.SvgIcon,{component:t,sx:{color:r}}),s&&b.jsx("div",{style:{color:r},children:s})]}),b.jsx(q.Popover,{id:e,sx:{pointerEvents:"none"},open:d.isPopoverOpen,anchorEl:d.anchorEl,anchorOrigin:l??{vertical:"bottom",horizontal:"left"},transformOrigin:c??{vertical:"top",horizontal:"left"},onClose:d.closePopover,disableRestoreFocus:!0,children:b.jsxs(q.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[b.jsxs("div",{children:[a&&b.jsx(q.Typography,{component:"span",fontSize:"14px",children:`${a}: `}),b.jsx(q.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:n})]}),b.jsx(q.Typography,{fontSize:"14px",children:o}),i&&b.jsx(q.Typography,{fontSize:"12px",children:i})]})})]})}),jC=ke.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:a,compact:n})=>{const s=q.useTheme(),{t:o}=Me.useTranslation();return e?b.jsx(wt,{id:"motion-group-virtual",icon:MC,color:s.palette.tertiary.main,name:o("SafetyBar.ControllerType.Virtual.lb"),label:n?null:o("SafetyBar.ControllerType.Virtual.lb"),explanation:b.jsxs(Me.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",b.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:a}):b.jsx(wt,{id:"motion-group-physical",icon:EC,color:s.palette.primary.main,name:o("SafetyBar.ControllerType.Physical.lb"),label:n?null:o("SafetyBar.ControllerType.Physical.lb"),explanation:b.jsx(Me.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:b.jsx("code",{}),strong:b.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:a})}),$C=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),UC=ae.forwardRef($C),LC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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})),kC=ae.forwardRef(LC),BC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),FC=ae.forwardRef(BC),NC=ke.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:a})=>{const{t:n}=Me.useTranslation(),s=q.useTheme();switch(e){case"OPERATION_MODE_AUTO":return b.jsx(wt,{id:"operation-mode-auto",icon:UC,title:n("SafetyBar.OperationMode.ti"),name:n("SafetyBar.OperationMode.Automatic.ti"),label:a?null:n("SafetyBar.OperationMode.Automatic.ti"),color:s.palette.text.secondary,explanation:b.jsx(Me.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 b.jsx(wt,{id:"operation-mode-manual",icon:FC,color:s.palette.warning.main,title:n("SafetyBar.OperationMode.ti"),name:n("SafetyBar.OperationMode.Manual.lb"),label:a?null:n("SafetyBar.OperationMode.Manual.lb"),explanation:b.jsx(Me.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 b.jsx(wt,{id:"operation-mode-error",icon:kC,color:s.palette.warning.main,title:n("SafetyBar.OperationMode.ti"),name:n("SafetyBar.OperationMode.Error.lb"),label:a?null:n("SafetyBar.OperationMode.Error.lb"),explanation:b.jsx(Me.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})}}),DC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),zC=ae.forwardRef(DC),GC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),J.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"}),J.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"})),JC=ae.forwardRef(GC),HC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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})),qC=ae.forwardRef(HC),WC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),KC=ae.forwardRef(WC),QC=({title:e,titleId:t,...r},a)=>J.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:a,"aria-labelledby":t,...r},e?J.createElement("title",{id:t},e):null,J.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"})),YC=ae.forwardRef(QC),XC=ke.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:a})=>{const{t:n}=Me.useTranslation(),s=q.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return b.jsx(wt,{id:"safety-state-normal",title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Normal.lb"),label:a?null:n("SafetyBar.SafetyState.Normal.lb"),icon:KC,color:s.palette.text.secondary,explanation:b.jsx(Me.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 b.jsx(wt,{id:"safety-state-estop",title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Estop.lb"),label:a?null:n("SafetyBar.SafetyState.Estop.lb"),icon:JC,color:s.palette.error.main,explanation:b.jsx(Me.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 b.jsx(wt,{id:"safety-state-stop",icon:YC,title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Stop.lb"),label:a?null:n("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:b.jsx(Me.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 b.jsx(wt,{id:"safety-state-manual-action-required",icon:qC,color:s.palette.warning.main,title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.ManualActionRequired.lb"),label:a?null:n("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:b.jsx(Me.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 b.jsx(wt,{id:"safety-state-error",icon:zC,color:s.palette.error.main,title:n("SafetyBar.SafetyState.ti"),name:n("SafetyBar.SafetyState.Error.lb"),label:a?null:n("SafetyBar.SafetyState.Error.lb"),explanation:b.jsx(Me.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:f1(e,`Unknown safety state ${e}`)}}),ZC=qr(ke.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:a,anchorOrigin:n,transformOrigin:s,compact:o=!0})=>{const i=o?1:2;return b.jsxs(q.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[b.jsx(XC,{safetyState:a,anchorOrigin:n,transformOrigin:s,compact:o}),b.jsx(q.Divider,{orientation:"vertical",flexItem:!0}),b.jsx(NC,{operationMode:r,anchorOrigin:n,transformOrigin:s,compact:o}),b.jsx(q.Divider,{orientation:"vertical",flexItem:!0}),b.jsx(jC,{isVirtual:e,motionGroupId:t,anchorOrigin:n,transformOrigin:s,compact:o})]})})),eP=q.styled(q.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,r,a;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:n})=>!n,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:n})=>n,style:{background:(a=e.palette.backgroundPaperElevation)==null?void 0:a[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),tP=ae.forwardRef((e,t)=>b.jsx(eP,{ref:t,selected:e.selected,...e,color:"secondary",variant:"circular"})),rP={$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"},aP=ae.lazy(()=>import("@monaco-editor/react"));let js=null;async function nP(){if(!js){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);js={shiki:await e({langs:[rP],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return js}const sP=qr(e=>{const t=q.useTheme(),[r,a]=ae.useState("dark-plus"),n=t.palette.mode==="dark"?"dark-plus":"light-plus";async function s(o){var c,d;o.languages.register({id:"wandelscript"}),o.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await nP();l(i,o),o.editor.defineTheme(n,((d=(c=t.componentsExt)==null?void 0:c.WandelscriptEditor)==null?void 0:d.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(o),a(n)}return b.jsx(ae.Suspense,{fallback:b.jsx(vo,{}),children:b.jsx(aP,{value:e.code,onMount:(o,i)=>{s(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function Ed(){var t,r,a,n,s,o,i;const e=q.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:(a=(r=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:r.tonal)==null?void 0:a.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:(n=e.palette.backgroundPaperElevation)==null?void 0:n[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:(o=(s=e.paletteExt)==null?void 0:s.secondary)==null?void 0:o.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":q.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function oP(){const e=Ed();return e.palette.mode="light",e}function iP(e){var a,n,s,o;let t=!0;((a=e.palette)==null?void 0:a.mode)==="light"?t=!1:((n=e.palette)==null?void 0:n.mode)!=="dark"&&(t=!(typeof window<"u"&&((o=(s=window.matchMedia)==null?void 0:s.call(window,"(prefers-color-scheme: light)"))==null?void 0:o.matches)));const r=t?Ed():oP();return nc(r,e)}exports.JoggingCartesianAxisControl=Fs;exports.JoggingJointRotationControl=uc;exports.JoggingPanel=hC;exports.JoggingStore=os;exports.LoadingCover=vo;exports.LoadingErrorMessage=rd;exports.NoMotionGroupModal=bC;exports.PoseCartesianValues=fC;exports.PoseJointValues=gC;exports.PresetEnvironment=ru;exports.Robot=AC;exports.SafetyBar=ZC;exports.SafetyZonesRenderer=su;exports.SelectableFab=tP;exports.SupportedRobot=Td;exports.TrajectoryRenderer=ou;exports.VelocitySlider=Cd;exports.VelocitySliderLabel=Vo;exports.WandelscriptEditor=sP;exports.createNovaMuiTheme=iP;exports.defaultAxisConfig=SC;exports.defaultGetModel=Ro;exports.i18n=go;exports.useAnimationFrame=Wr;exports.useAutorun=ic;exports.useMounted=Gn;exports.useReaction=lc;
115
115
  //# sourceMappingURL=index.cjs.map