@wandelbots/wandelbots-js-react-components 2.32.0-pr.feature-robot-precondition-list.372.5d8a86e → 2.32.0-pr.feature-robot-precondition-list.372.82f340f
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/components/RobotCard.d.ts +12 -1
- package/dist/components/RobotCard.d.ts.map +1 -1
- package/dist/components/SearchableDataGrid.d.ts +66 -0
- package/dist/components/SearchableDataGrid.d.ts.map +1 -0
- package/dist/index.cjs +49 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6387 -6123
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/components/RobotCard.tsx +39 -31
- package/src/components/SearchableDataGrid.tsx +461 -0
- package/src/index.ts +1 -0
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var rg=Object.create;var Ys=Object.defineProperty;var ng=Object.getOwnPropertyDescriptor;var ag=Object.getOwnPropertyNames;var og=Object.getPrototypeOf,sg=Object.prototype.hasOwnProperty;var ig=(e,t,r)=>t in e?Ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var lg=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ag(t))!sg.call(e,a)&&a!==r&&Ys(e,a,{get:()=>t[a],enumerable:!(n=ng(t,a))||n.enumerable});return e};var Ks=(e,t,r)=>(r=e!=null?rg(og(e)):{},lg(t||!e||!e.__esModule?Ys(r,"default",{value:e,enumerable:!0}):r,e));var jn=(e,t,r)=>ig(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("react"),at=require("@react-three/drei"),Po=require("@react-three/fiber"),St=require("three"),cg=require("three-stdlib"),F=require("@mui/material"),Te=require("mobx-react-lite"),Re=require("react-i18next"),ug=require("i18next"),dg=require("i18next-browser-languagedetector"),y=require("prop-types"),hg=require("@emotion/react"),pg=require("@emotion/styled"),Be=require("mobx"),Pl=require("lodash-es"),Sr=require("@wandelbots/nova-js"),$n=require("@mui/icons-material"),mg=require("react-error-boundary"),Rt=require("@mui/x-data-grid");function Mh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const B=Mh(K),ke=Mh(St);function fg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fa={exports:{}},kn={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Ec;function gg(){if(Ec)return kn;Ec=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,o){var s=null;if(o!==void 0&&(s=""+o),a.key!==void 0&&(s=""+a.key),"key"in a){o={};for(var i in a)i!=="key"&&(o[i]=a[i])}else o=a;return a=o.ref,{$$typeof:e,type:n,key:s,ref:a!==void 0?a:null,props:o}}return kn.Fragment=t,kn.jsx=r,kn.jsxs=r,kn}var Un={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,19 +14,19 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var Vc;function yg(){return Vc||(Vc=1,process.env.NODE_ENV!=="production"&&function(){function e(q){if(q==null)return null;if(typeof q=="function")return q.$$typeof===v?null:q.displayName||q.name||null;if(typeof q=="string")return q;switch(q){case m:return"Fragment";case S:return"Profiler";case b:return"StrictMode";case C:return"Suspense";case w:return"SuspenseList";case z:return"Activity"}if(typeof q=="object")switch(typeof q.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),q.$$typeof){case f:return"Portal";case O:return(q.displayName||"Context")+".Provider";case E:return(q._context.displayName||"Context")+".Consumer";case P:var Z=q.render;return q=q.displayName,q||(q=Z.displayName||Z.name||"",q=q!==""?"ForwardRef("+q+")":"ForwardRef"),q;case T:return Z=q.displayName||null,Z!==null?Z:e(q.type)||"Memo";case V:Z=q._payload,q=q._init;try{return e(q(Z))}catch{}}return null}function t(q){return""+q}function r(q){try{t(q);var Z=!1}catch{Z=!0}if(Z){Z=console;var ue=Z.error,ve=typeof Symbol=="function"&&Symbol.toStringTag&&q[Symbol.toStringTag]||q.constructor.name||"Object";return ue.call(Z,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ve),t(q)}}function n(q){if(q===m)return"<>";if(typeof q=="object"&&q!==null&&q.$$typeof===V)return"<...>";try{var Z=e(q);return Z?"<"+Z+">":"<...>"}catch{return"<...>"}}function a(){var q=R.A;return q===null?null:q.getOwner()}function o(){return Error("react-stack-top-frame")}function s(q){if(G.call(q,"key")){var Z=Object.getOwnPropertyDescriptor(q,"key").get;if(Z&&Z.isReactWarning)return!1}return q.key!==void 0}function i(q,Z){function ue(){re||(re=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Z))}ue.isReactWarning=!0,Object.defineProperty(q,"key",{get:ue,configurable:!0})}function l(){var q=e(this.type);return ee[q]||(ee[q]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),q=this.props.ref,q!==void 0?q:null}function c(q,Z,ue,ve,ze,Oe,lt,tt){return ue=Oe.ref,q={$$typeof:p,type:q,key:Z,props:Oe,_owner:ze},(ue!==void 0?ue:null)!==null?Object.defineProperty(q,"ref",{enumerable:!1,get:l}):Object.defineProperty(q,"ref",{enumerable:!1,value:null}),q._store={},Object.defineProperty(q._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(q,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(q,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:lt}),Object.defineProperty(q,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:tt}),Object.freeze&&(Object.freeze(q.props),Object.freeze(q)),q}function u(q,Z,ue,ve,ze,Oe,lt,tt){var ye=Z.children;if(ye!==void 0)if(ve)if(A(ye)){for(ve=0;ve<ye.length;ve++)d(ye[ve]);Object.freeze&&Object.freeze(ye)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(ye);if(G.call(Z,"key")){ye=e(q);var X=Object.keys(Z).filter(function(ce){return ce!=="key"});ve=0<X.length?"{key: someKey, "+X.join(": ..., ")+": ...}":"{key: someKey}",se[ye+ve]||(X=0<X.length?"{"+X.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,
|
|
22
|
+
<%s key={someKey} {...props} />`,ve,ye,X,ye),se[ye+ve]=!0)}if(ye=null,ue!==void 0&&(r(ue),ye=""+ue),s(Z)&&(r(Z.key),ye=""+Z.key),"key"in Z){ue={};for(var oe in Z)oe!=="key"&&(ue[oe]=Z[oe])}else ue=Z;return ye&&i(ue,typeof q=="function"?q.displayName||q.name||"Unknown":q),c(q,ye,Oe,ze,a(),ue,lt,tt)}function d(q){typeof q=="object"&&q!==null&&q.$$typeof===p&&q._store&&(q._store.validated=1)}var h=K,p=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),O=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),v=Symbol.for("react.client.reference"),R=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=Object.prototype.hasOwnProperty,A=Array.isArray,N=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(q){return q()}};var re,ee={},ae=h["react-stack-bottom-frame"].bind(h,o)(),te=N(n(o)),se={};Un.Fragment=m,Un.jsx=function(q,Z,ue,ve,ze){var Oe=1e4>R.recentlyCreatedOwnerStacks++;return u(q,Z,ue,!1,ve,ze,Oe?Error("react-stack-top-frame"):ae,Oe?N(n(q)):te)},Un.jsxs=function(q,Z,ue,ve,ze){var Oe=1e4>R.recentlyCreatedOwnerStacks++;return u(q,Z,ue,!0,ve,ze,Oe?Error("react-stack-top-frame"):ae,Oe?N(n(q)):te)}}()),Un}var Ic;function bg(){return Ic||(Ic=1,process.env.NODE_ENV==="production"?Fa.exports=gg():Fa.exports=yg()),Fa.exports}var g=bg();function Li(){return g.jsx(at.Environment,{children:g.jsx(vg,{})})}function vg({positions:e=[2,0,2,0,2,0,2,0]}){return g.jsxs(g.Fragment,{children:[g.jsx(at.Lightformer,{intensity:5,"rotation-x":Math.PI/2,position:[0,5,-9],scale:[10,10,1]}),g.jsx("group",{rotation:[0,.5,0],children:g.jsx("group",{children:e.map((t,r)=>g.jsx(at.Lightformer,{form:"circle",intensity:5,rotation:[Math.PI/2,0,0],position:[t,4,r*4],scale:[3,1,1]},r))})}),g.jsx(at.Lightformer,{intensity:40,"rotation-y":Math.PI/2,position:[-5,1,-1],scale:[20,.1,1]}),g.jsx(at.Lightformer,{intensity:20,"rotation-y":-Math.PI,position:[-5,-2,-1],scale:[20,.1,1]}),g.jsx(at.Lightformer,{"rotation-y":Math.PI/2,position:[-5,-1,-1],scale:[20,.5,1],intensity:5}),g.jsx(at.Lightformer,{"rotation-y":-Math.PI/2,position:[10,1,0],scale:[20,1,1],intensity:10}),g.jsx(at.Lightformer,{form:"ring",color:"white",intensity:5,scale:10,position:[-15,4,-18],target:[0,0,0]})]})}function xg(e){if(e.length<3)return console.log("Not enough vertices to define a plane"),{isCoplanar:!1};const t=new ke.Vector3(e[0].x,e[0].y,e[0].z),r=new ke.Vector3(e[1].x,e[1].y,e[1].z),n=new ke.Vector3(e[2].x,e[2].y,e[2].z),a=new ke.Vector3().subVectors(r,t),o=new ke.Vector3().subVectors(n,t),s=new ke.Vector3().crossVectors(a,o).normalize();for(let i=3;i<e.length;i++){const l=new ke.Vector3(e[i].x,e[i].y,e[i].z),c=new ke.Vector3().subVectors(l,t),u=s.dot(c);if(Math.abs(u)>1e-6)return console.log("Vertices are not on the same plane"),{isCoplanar:!1}}return{isCoplanar:!0,normal:s}}function Sg({safetyZones:e,...t}){return g.jsx("group",{...t,children:e.map((r,n)=>{let a=[];return r.geometry&&(r.geometry.compound?a=r.geometry.compound.child_geometries:r.geometry.convex_hull&&(a=[r.geometry])),a.map((o,s)=>{if(!o.convex_hull)return null;const i=o.convex_hull.vertices.map(u=>new ke.Vector3(u.x/1e3,u.y/1e3,u.z/1e3)),l=xg(i);if(l.isCoplanar&&l.normal){const d=new ke.Vector3().addVectors(i[0],l.normal.multiplyScalar(1e-4));i.push(d)}let c;try{c=new cg.ConvexGeometry(i)}catch(u){return console.log("Error creating ConvexGeometry:",u),null}return g.jsx("mesh",{geometry:c,children:g.jsx("meshStandardMaterial",{attach:"material",color:"#009f4d",opacity:.2,depthTest:!1,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-s},n)},`${n}-${s}`)})})})}function Og({trajectory:e,...t}){var n;const r=((n=e.trajectory)==null?void 0:n.map(a=>a.tcp_pose?new ke.Vector3(a.tcp_pose.position.x/1e3,a.tcp_pose.position.z/1e3,-a.tcp_pose.position.y/1e3):null).filter(a=>a!==null))||[];return g.jsx("group",{...t,children:r.length>0&&g.jsx(at.Line,{points:r,lineWidth:3,polygonOffset:!0,polygonOffsetFactor:10,polygonOffsetUnits:10})})}function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Y.apply(null,arguments)}function ir(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Xo(e,t,r=void 0){const n={};for(const a in e){const o=e[a];let s="",i=!0;for(let l=0;l<o.length;l+=1){const c=o[l];c&&(s+=(i===!0?"":" ")+t(c),i=!1,r&&r[c]&&(s+=" "+r[c]))}n[a]=s}return n}function jh(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=jh(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ct(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=jh(e))&&(n&&(n+=" "),n+=t);return n}function lr(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}const $h="$$material";function wg(e){for(var t=0,r,n=0,a=e.length;a>=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Cg={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Pg(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Tg=/[A-Z]|^ms/g,Rg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,kh=function(t){return t.charCodeAt(1)===45},Mc=function(t){return t!=null&&typeof t!="boolean"},Qs=Pg(function(e){return kh(e)?e:e.replace(Tg,"-$&").toLowerCase()}),jc=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Rg,function(n,a,o){return or={name:a,styles:o,next:or},a})}return Cg[t]!==1&&!kh(t)&&typeof r=="number"&&r!==0?r+"px":r};function To(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return or={name:a.name,styles:a.styles,next:or},a.name;var o=r;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)or={name:s.name,styles:s.styles,next:or},s=s.next;var i=o.styles+";";return i}return Ag(e,t,r)}}var l=r;return l}function Ag(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=To(e,t,r[a])+";";else for(var o in r){var s=r[o];if(typeof s!="object"){var i=s;Mc(i)&&(n+=Qs(o)+":"+jc(o,i)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)Mc(s[l])&&(n+=Qs(o)+":"+jc(o,s[l])+";");else{var c=To(e,t,s);switch(o){case"animation":case"animationName":{n+=Qs(o)+":"+c+";";break}default:n+=o+"{"+c+"}"}}}return n}var $c=/label:\s*([^\s;{]+)\s*(;|$)/g,or;function _g(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,a="";or=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,a+=To(r,t,o);else{var s=o;a+=s[0]}for(var i=1;i<e.length;i++)if(a+=To(r,t,e[i]),n){var l=o;a+=l[i]}$c.lastIndex=0;for(var c="",u;(u=$c.exec(a))!==null;)c+="-"+u[1];var d=wg(a)+c;return{name:d,styles:a,next:or}}/**
|
|
23
23
|
* @mui/styled-engine v7.1.1
|
|
24
24
|
*
|
|
25
25
|
* @license MIT
|
|
26
26
|
* This source code is licensed under the MIT license found in the
|
|
27
27
|
* LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/function
|
|
29
|
-
`)):n.some(o=>o===void 0)&&console.error(`MUI: the styled(${a})(...args) API requires all its args to be defined.`),r(...n)}:r}function
|
|
28
|
+
*/function Eg(e,t){const r=pg(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const a=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${a})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
29
|
+
`)):n.some(o=>o===void 0)&&console.error(`MUI: the styled(${a})(...args) API requires all its args to be defined.`),r(...n)}:r}function Vg(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const kc=[];function Uc(e){return kc[0]=e,_g(kc)}var Na={exports:{}},xe={};/**
|
|
30
30
|
* @license React
|
|
31
31
|
* react-is.production.js
|
|
32
32
|
*
|
|
@@ -34,7 +34,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the MIT license found in the
|
|
36
36
|
* LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var
|
|
37
|
+
*/var Dc;function Ig(){if(Dc)return xe;Dc=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function f(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case e:switch(m=m.type,m){case r:case a:case n:case l:case c:case h:return m;default:switch(m=m&&m.$$typeof,m){case s:case i:case d:case u:return m;case o:return m;default:return b}}case t:return b}}}return xe.ContextConsumer=o,xe.ContextProvider=s,xe.Element=e,xe.ForwardRef=i,xe.Fragment=r,xe.Lazy=d,xe.Memo=u,xe.Portal=t,xe.Profiler=a,xe.StrictMode=n,xe.Suspense=l,xe.SuspenseList=c,xe.isContextConsumer=function(m){return f(m)===o},xe.isContextProvider=function(m){return f(m)===s},xe.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},xe.isForwardRef=function(m){return f(m)===i},xe.isFragment=function(m){return f(m)===r},xe.isLazy=function(m){return f(m)===d},xe.isMemo=function(m){return f(m)===u},xe.isPortal=function(m){return f(m)===t},xe.isProfiler=function(m){return f(m)===a},xe.isStrictMode=function(m){return f(m)===n},xe.isSuspense=function(m){return f(m)===l},xe.isSuspenseList=function(m){return f(m)===c},xe.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===a||m===n||m===l||m===c||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===u||m.$$typeof===s||m.$$typeof===o||m.$$typeof===i||m.$$typeof===p||m.getModuleId!==void 0)},xe.typeOf=f,xe}var Se={};/**
|
|
38
38
|
* @license React
|
|
39
39
|
* react-is.development.js
|
|
40
40
|
*
|
|
@@ -42,15 +42,15 @@ React keys must be passed directly to JSX without using spread:
|
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the MIT license found in the
|
|
44
44
|
* LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/var
|
|
46
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:
|
|
45
|
+
*/var Lc;function Mg(){return Lc||(Lc=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case t:switch(m=m.type,m){case n:case o:case a:case c:case u:case p:return m;default:switch(m=m&&m.$$typeof,m){case i:case l:case h:case d:return m;case s:return m;default:return b}}case r:return b}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),f=Symbol.for("react.client.reference");Se.ContextConsumer=s,Se.ContextProvider=i,Se.Element=t,Se.ForwardRef=l,Se.Fragment=n,Se.Lazy=h,Se.Memo=d,Se.Portal=r,Se.Profiler=o,Se.StrictMode=a,Se.Suspense=c,Se.SuspenseList=u,Se.isContextConsumer=function(m){return e(m)===s},Se.isContextProvider=function(m){return e(m)===i},Se.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Se.isForwardRef=function(m){return e(m)===l},Se.isFragment=function(m){return e(m)===n},Se.isLazy=function(m){return e(m)===h},Se.isMemo=function(m){return e(m)===d},Se.isPortal=function(m){return e(m)===r},Se.isProfiler=function(m){return e(m)===o},Se.isStrictMode=function(m){return e(m)===a},Se.isSuspense=function(m){return e(m)===c},Se.isSuspenseList=function(m){return e(m)===u},Se.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===o||m===a||m===c||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===d||m.$$typeof===i||m.$$typeof===s||m.$$typeof===l||m.$$typeof===f||m.getModuleId!==void 0)},Se.typeOf=e}()),Se}var Bc;function jg(){return Bc||(Bc=1,process.env.NODE_ENV==="production"?Na.exports=Ig():Na.exports=Mg()),Na.exports}var Ro=jg();function It(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Uh(e){if(B.isValidElement(e)||Ro.isValidElementType(e)||!It(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Uh(e[r])}),t}function et(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return It(e)&&It(t)&&Object.keys(t).forEach(a=>{B.isValidElement(t[a])||Ro.isValidElementType(t[a])?n[a]=t[a]:It(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&It(e[a])?n[a]=et(e[a],t[a],r):r.clone?n[a]=It(t[a])?Uh(t[a]):t[a]:n[a]=t[a]}),n}const $g=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function kg(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...a}=e,o=$g(t),s=Object.keys(o);function i(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-n/100}${r})`}function c(h,p){const f=s.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r}) and (max-width:${(f!==-1&&typeof t[s[f]]=="number"?t[s[f]]:p)-n/100}${r})`}function u(h){return s.indexOf(h)+1<s.length?c(h,s[s.indexOf(h)+1]):i(h)}function d(h){const p=s.indexOf(h);return p===0?i(s[1]):p===s.length-1?l(s[p]):c(h,s[s.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:s,values:o,up:i,down:l,between:c,only:u,not:d,unit:r,...a}}function Ug(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,a)=>{var s,i;const o=/min-width:\s*([0-9.]+)/;return+(((s=n.match(o))==null?void 0:s[1])||0)-+(((i=a.match(o))==null?void 0:i[1])||0)});return r.length?r.reduce((n,a)=>{const o=t[a];return delete n[a],n[a]=o,n},{...t}):t}function Dg(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function Lg(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
46
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:lr(18,`(${t})`));return null}const[,n,a]=r,o=Number.isNaN(+n)?n||0:+n;return e.containerQueries(a).up(o)}function Bg(e){const t=(o,s)=>o.replace("@media",s?`@container ${s}`:"@container");function r(o,s){o.up=(...i)=>t(e.breakpoints.up(...i),s),o.down=(...i)=>t(e.breakpoints.down(...i),s),o.between=(...i)=>t(e.breakpoints.between(...i),s),o.only=(...i)=>t(e.breakpoints.only(...i),s),o.not=(...i)=>{const l=t(e.breakpoints.not(...i),s);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const n={},a=o=>(r(n,o),n);return r(a),{...e,containerQueries:a}}const Fg={borderRadius:4},dr=process.env.NODE_ENV!=="production"?y.oneOfType([y.number,y.string,y.object,y.array]):{};function na(e,t){return t?et(e,t,{clone:!1}):e}const Zo={xs:0,sm:600,md:900,lg:1200,xl:1536},Fc={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Zo[e]}px)`},Ng={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Zo[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Pt(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const o=n.breakpoints||Fc;return t.reduce((s,i,l)=>(s[o.up(o.keys[l])]=r(t[l]),s),{})}if(typeof t=="object"){const o=n.breakpoints||Fc;return Object.keys(t).reduce((s,i)=>{if(Dg(o.keys,i)){const l=Lg(n.containerQueries?n:Ng,i);l&&(s[l]=r(t[i],i))}else if(Object.keys(o.values||Zo).includes(i)){const l=o.up(i);s[l]=r(t[i],i)}else{const l=i;s[l]=t[l]}return s},{})}return r(t)}function Dh(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,a)=>{const o=e.up(a);return n[o]={},n},{}))||{}}function Lh(e,t){return e.reduce((r,n)=>{const a=r[n];return(!a||Object.keys(a).length===0)&&delete r[n],r},t)}function zg(e,...t){const r=Dh(e),n=[r,...t].reduce((a,o)=>et(a,o),{});return Lh(Object.keys(r),n)}function Gg(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((a,o)=>{o<e.length&&(r[a]=!0)}):n.forEach(a=>{e[a]!=null&&(r[a]=!0)}),r}function Xs({values:e,breakpoints:t,base:r}){const n=r||Gg(e,t),a=Object.keys(n);if(a.length===0)return e;let o;return a.reduce((s,i,l)=>(Array.isArray(e)?(s[i]=e[l]!=null?e[l]:e[o],o=l):typeof e=="object"?(s[i]=e[i]!=null?e[i]:e[o],o=i):s[i]=e,s),{})}function Ze(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":lr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function es(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((a,o)=>a&&a[o]?a[o]:null,e);if(n!=null)return n}return t.split(".").reduce((n,a)=>n&&n[a]!=null?n[a]:null,e)}function Ao(e,t,r,n=r){let a;return typeof e=="function"?a=e(r):Array.isArray(e)?a=e[r]||n:a=es(e,r)||n,t&&(a=t(a,n,e)),a}function Ue(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:a}=e,o=s=>{if(s[t]==null)return null;const i=s[t],l=s.theme,c=es(l,n)||{};return Pt(s,i,d=>{let h=Ao(c,a,d);return d===h&&typeof d=="string"&&(h=Ao(c,a,`${t}${d==="default"?"":Ze(d)}`,d)),r===!1?h:{[r]:h}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[t]:dr}:{},o.filterProps=[t],o}function Hg(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const qg={m:"margin",p:"padding"},Jg={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Nc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Wg=Hg(e=>{if(e.length>2)if(Nc[e])e=Nc[e];else return[e];const[t,r]=e.split(""),n=qg[t],a=Jg[r]||"";return Array.isArray(a)?a.map(o=>n+o):[n+a]}),ts=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],rs=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Yg=[...ts,...rs];function Ca(e,t,r,n){const a=es(e,t,!0)??r;return typeof a=="number"||typeof a=="string"?o=>typeof o=="string"?o:(process.env.NODE_ENV!=="production"&&typeof o!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${o}.`),typeof a=="string"?a.startsWith("var(")&&o===0?0:a.startsWith("var(")&&o===1?a:`calc(${o} * ${a})`:a*o):Array.isArray(a)?o=>{if(typeof o=="string")return o;const s=Math.abs(o);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>a.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${s} > ${a.length-1}, you need to add the missing values.`].join(`
|
|
47
47
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
48
48
|
`)));const i=a[s];return o>=0?i:typeof i=="number"?-i:typeof i=="string"&&i.startsWith("var(")?`calc(-1 * ${i})`:`-${i}`}:typeof a=="function"?a:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${a}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
49
|
-
`)),()=>{})}function ts(e){return xa(e,"spacing",8,"spacing")}function Sr(e,t){return typeof t=="string"||t==null?t:e(t)}function ey(e,t){return r=>e.reduce((n,a)=>(n[a]=Sr(t,r),n),{})}function ty(e,t,r,n){if(!t.includes(r))return null;const a=Xg(r),o=ey(a,n),s=e[r];return Ct(e,s,o)}function Dh(e,t){const r=ts(e.theme);return Object.keys(e).map(n=>ty(e,t,n,r)).reduce(ea,{})}function je(e){return Dh(e,Zo)}je.propTypes=process.env.NODE_ENV!=="production"?Zo.reduce((e,t)=>(e[t]=cr,e),{}):{};je.filterProps=Zo;function $e(e){return Dh(e,es)}$e.propTypes=process.env.NODE_ENV!=="production"?es.reduce((e,t)=>(e[t]=cr,e),{}):{};$e.filterProps=es;process.env.NODE_ENV!=="production"&&Zg.reduce((e,t)=>(e[t]=cr,e),{});function Fh(e=8,t=ts({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function rs(...e){const t=e.reduce((n,a)=>(a.filterProps.forEach(o=>{n[o]=a}),n),{}),r=n=>Object.keys(n).reduce((a,o)=>t[o]?ea(a,t[o](n)):a,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,a)=>Object.assign(n,a.propTypes),{}):{},r.filterProps=e.reduce((n,a)=>n.concat(a.filterProps),[]),r}function mt(e){return typeof e!="number"?e:`${e}px solid`}function bt(e,t){return Ue({prop:e,themeKey:"borders",transform:t})}const ry=bt("border",mt),ny=bt("borderTop",mt),ay=bt("borderRight",mt),oy=bt("borderBottom",mt),sy=bt("borderLeft",mt),iy=bt("borderColor"),ly=bt("borderTopColor"),cy=bt("borderRightColor"),uy=bt("borderBottomColor"),dy=bt("borderLeftColor"),hy=bt("outline",mt),py=bt("outlineColor"),ns=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=xa(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Sr(t,n)});return Ct(e,e.borderRadius,r)}return null};ns.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:cr}:{};ns.filterProps=["borderRadius"];rs(ry,ny,ay,oy,sy,iy,ly,cy,uy,dy,ns,hy,py);const as=e=>{if(e.gap!==void 0&&e.gap!==null){const t=xa(e.theme,"spacing",8,"gap"),r=n=>({gap:Sr(t,n)});return Ct(e,e.gap,r)}return null};as.propTypes=process.env.NODE_ENV!=="production"?{gap:cr}:{};as.filterProps=["gap"];const os=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=xa(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Sr(t,n)});return Ct(e,e.columnGap,r)}return null};os.propTypes=process.env.NODE_ENV!=="production"?{columnGap:cr}:{};os.filterProps=["columnGap"];const ss=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=xa(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Sr(t,n)});return Ct(e,e.rowGap,r)}return null};ss.propTypes=process.env.NODE_ENV!=="production"?{rowGap:cr}:{};ss.filterProps=["rowGap"];const my=Ue({prop:"gridColumn"}),fy=Ue({prop:"gridRow"}),gy=Ue({prop:"gridAutoFlow"}),yy=Ue({prop:"gridAutoColumns"}),by=Ue({prop:"gridAutoRows"}),vy=Ue({prop:"gridTemplateColumns"}),xy=Ue({prop:"gridTemplateRows"}),Sy=Ue({prop:"gridTemplateAreas"}),Oy=Ue({prop:"gridArea"});rs(as,os,ss,my,fy,gy,yy,by,vy,xy,Sy,Oy);function an(e,t){return t==="grey"?t:e}const wy=Ue({prop:"color",themeKey:"palette",transform:an}),Cy=Ue({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:an}),Py=Ue({prop:"backgroundColor",themeKey:"palette",transform:an});rs(wy,Cy,Py);function ut(e){return e<=1&&e!==0?`${e*100}%`:e}const Ty=Ue({prop:"width",transform:ut}),Cl=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var a,o,s,i,l;const n=((s=(o=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:o.values)==null?void 0:s[r])||Qo[r];return n?((l=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:ut(r)}};return Ct(e,e.maxWidth,t)}return null};Cl.filterProps=["maxWidth"];const Ry=Ue({prop:"minWidth",transform:ut}),Ay=Ue({prop:"height",transform:ut}),_y=Ue({prop:"maxHeight",transform:ut}),Ey=Ue({prop:"minHeight",transform:ut});Ue({prop:"size",cssProperty:"width",transform:ut});Ue({prop:"size",cssProperty:"height",transform:ut});const Vy=Ue({prop:"boxSizing"});rs(Ty,Cl,Ry,Ay,_y,Ey,Vy);const Sa={border:{themeKey:"borders",transform:mt},borderTop:{themeKey:"borders",transform:mt},borderRight:{themeKey:"borders",transform:mt},borderBottom:{themeKey:"borders",transform:mt},borderLeft:{themeKey:"borders",transform:mt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:mt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ns},color:{themeKey:"palette",transform:an},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:an},backgroundColor:{themeKey:"palette",transform:an},p:{style:$e},pt:{style:$e},pr:{style:$e},pb:{style:$e},pl:{style:$e},px:{style:$e},py:{style:$e},padding:{style:$e},paddingTop:{style:$e},paddingRight:{style:$e},paddingBottom:{style:$e},paddingLeft:{style:$e},paddingX:{style:$e},paddingY:{style:$e},paddingInline:{style:$e},paddingInlineStart:{style:$e},paddingInlineEnd:{style:$e},paddingBlock:{style:$e},paddingBlockStart:{style:$e},paddingBlockEnd:{style:$e},m:{style:je},mt:{style:je},mr:{style:je},mb:{style:je},ml:{style:je},mx:{style:je},my:{style:je},margin:{style:je},marginTop:{style:je},marginRight:{style:je},marginBottom:{style:je},marginLeft:{style:je},marginX:{style:je},marginY:{style:je},marginInline:{style:je},marginInlineStart:{style:je},marginInlineEnd:{style:je},marginBlock:{style:je},marginBlockStart:{style:je},marginBlockEnd:{style:je},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:as},rowGap:{style:ss},columnGap:{style:os},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ut},maxWidth:{style:Cl},minWidth:{transform:ut},height:{transform:ut},maxHeight:{transform:ut},minHeight:{transform:ut},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Iy(...e){const t=e.reduce((n,a)=>n.concat(Object.keys(a)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function My(e,t){return typeof e=="function"?e(t):e}function jy(){function e(r,n,a,o){const s={[r]:n,theme:a},i=o[r];if(!i)return{[r]:n};const{cssProperty:l=r,themeKey:c,transform:u,style:d}=i;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const h=Xo(a,c)||{};return d?d(s):Ct(s,n,f=>{let m=Ro(h,u,f);return f===m&&typeof f=="string"&&(m=Ro(h,u,`${r}${f==="default"?"":Ze(f)}`,f)),l===!1?m:{[l]:m}})}function t(r){const{sx:n,theme:a={}}=r||{};if(!n)return null;const o=a.unstable_sxConfig??Sa;function s(i){let l=i;if(typeof i=="function")l=i(a);else if(typeof i!="object")return i;if(!l)return null;const c=Uh(a.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(h=>{const p=My(l[h],a);if(p!=null)if(typeof p=="object")if(o[h])d=ea(d,e(h,p,a,o));else{const f=Ct({theme:a},p,m=>({[h]:m}));Iy(f,p)?d[h]=t({sx:p,theme:a}):d=ea(d,f)}else d=ea(d,e(h,p,a,o))}),Bg(a,Lh(u,d))}return Array.isArray(n)?n.map(s):s(n)}return t}const un=jy();un.filterProps=["sx"];function $y(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let a=r.getColorSchemeSelector(e);return a==="&"?t:((a.includes("data-")||a.includes("."))&&(a=`*:where(${a.replace(/\s*&$/,"")}) &`),{[a]:t})}return r.palette.mode===e?t:{}}function is(e={},...t){const{breakpoints:r={},palette:n={},spacing:a,shape:o={},...s}=e,i=Fg(r),l=Fh(a);let c=et({breakpoints:i,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...Hg,...o}},s);return c=Gg(c),c.applyStyles=$y,c=t.reduce((u,d)=>et(u,d),c),c.unstable_sxConfig={...Sa,...s==null?void 0:s.unstable_sxConfig},c.unstable_sx=function(d){return un({sx:d,theme:this})},c}function ky(e){return Object.keys(e).length===0}function Uy(e=null){const t=I.useContext(fg.ThemeContext);return!t||ky(t)?e:t}const Ly=is();function Dy(e=Ly){return Uy(e)}const Fy=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??Sa;return Object.keys(e).forEach(a=>{r[a]?t.systemProps[a]=e[a]:t.otherProps[a]=e[a]}),t};function By(e){const{sx:t,...r}=e,{systemProps:n,otherProps:a}=Fy(r);let o;return Array.isArray(t)?o=[n,...t]:typeof t=="function"?o=(...s)=>{const i=t(...s);return Et(i)?{...n,...i}:n}:o={...n,...t},{...a,sx:o}}const Bc=e=>e,Ny=()=>{let e=Bc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Bc}}},zy=Ny(),Gy={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Oa(e,t,r="Mui"){const n=Gy[t];return n?`${r}-${n}`:`${zy.generate(e)}-${t}`}function Bh(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=Oa(e,a,r)}),n}function Nh(e,t=""){return e.displayName||e.name||t}function Nc(e,t,r){const n=Nh(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Hy(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Nh(e,"Component");if(typeof e=="object")switch(e.$$typeof){case To.ForwardRef:return Nc(e,e.render,"ForwardRef");case To.Memo:return Nc(e,e.type,"memo");default:return}}}function zh(e){const{variants:t,...r}=e,n={variants:t,style:$c(r),isProcessed:!0};return n.style===r||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=$c(a.style))}),n}const qy=is();function Ks(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Jy(e){return e?(t,r)=>r[e]:null}function Wy(e,t,r){e.theme=Qy(e.theme)?r:e.theme[t]||e.theme}function mo(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>mo(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:a,...o}=r;n=o}return Gh(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Gh(e,t,r=[]){var a;let n;e:for(let o=0;o<t.length;o+=1){const s=t[o];if(typeof s.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!s.props(n))continue}else for(const i in s.props)if(e[i]!==s.props[i]&&((a=e.ownerState)==null?void 0:a[i])!==s.props[i])continue e;typeof s.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(s.style(n))):r.push(s.style)}return r}function Hh(e={}){const{themeId:t,defaultTheme:r=qy,rootShouldForwardProp:n=Ks,slotShouldForwardProp:a=Ks}=e;function o(i){Wy(i,t,r)}return(i,l={})=>{$g(i,T=>T.filter(C=>C!==un));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:p=Jy(qh(u)),...f}=l,m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,v=h||!1;let S=Ks;u==="Root"||u==="root"?S=n:u?S=a:Xy(i)&&(S=void 0);const E=jg(i,{shouldForwardProp:S,label:Ky(c,u),...f}),O=T=>{if(T.__emotion_real===T)return T;if(typeof T=="function")return function(A){return mo(A,T)};if(Et(T)){const C=zh(T);return C.variants?function(V){return mo(V,C)}:C.style}return T},w=(...T)=>{const C=[],A=T.map(O),V=[];if(C.push(o),c&&p&&V.push(function(G){var Z,ae;const N=(ae=(Z=G.theme.components)==null?void 0:Z[c])==null?void 0:ae.styleOverrides;if(!N)return null;const re={};for(const te in N)re[te]=mo(G,N[te]);return p(G,re)}),c&&!m&&V.push(function(G){var re,Z;const P=G.theme,N=(Z=(re=P==null?void 0:P.components)==null?void 0:re[c])==null?void 0:Z.variants;return N?Gh(G,N):null}),v||V.push(un),Array.isArray(A[0])){const R=A.shift(),G=new Array(C.length).fill(""),P=new Array(V.length).fill("");let N;N=[...G,...R,...P],N.raw=[...G,...R.raw,...P],C.unshift(N)}const B=[...C,...A,...V],y=E(...B);return i.muiName&&(y.muiName=i.muiName),process.env.NODE_ENV!=="production"&&(y.displayName=Yy(c,u,i)),y};return E.withConfig&&(w.withConfig=E.withConfig),w}}function Yy(e,t,r){return e?`${e}${Ze(t||"")}`:`Styled(${Hy(r)})`}function Ky(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${qh(t||"Root")}`),r}function Qy(e){for(const t in e)return!1;return!0}function Xy(e){return typeof e=="string"&&e.charCodeAt(0)>96}function qh(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Zy=Hh();function Ao(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const a=n;if(a==="components"||a==="slots")r[a]={...e[a],...r[a]};else if(a==="componentsProps"||a==="slotProps"){const o=e[a],s=t[a];if(!s)r[a]=o||{};else if(!o)r[a]=s;else{r[a]={...s};for(const i in o)if(Object.prototype.hasOwnProperty.call(o,i)){const l=i;r[a][l]=Ao(o[l],s[l])}}}else r[a]===void 0&&(r[a]=e[a])}return r}function e0(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:Ao(t.components[r].defaultProps,n)}function Jh({props:e,name:t,defaultTheme:r,themeId:n}){let a=Dy(r);return n&&(a=a[n]||a),e0({theme:a,name:t,props:e})}const Wh=typeof window<"u"?I.useLayoutEffect:I.useEffect;function Zr(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Pl(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),Zr(e,t,r)}function t0(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,a)=>a<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function ir(e){if(e.type)return e;if(e.charAt(0)==="#")return ir(t0(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
50
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:
|
|
51
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:sr(10,a))}else n=n.split(",");return n=n.map(o=>parseFloat(o)),{type:r,values:n,colorSpace:a}}const r0=e=>{const t=ir(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Kn=(e,t)=>{try{return r0(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function ls(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((a,o)=>o<3?parseInt(a,10):a):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Yh(e){e=ir(e);const{values:t}=e,r=t[0],n=t[1]/100,a=t[2]/100,o=n*Math.min(a,1-a),s=(c,u=(c+r/30)%12)=>a-o*Math.max(Math.min(u-3,9-u,1),-1);let i="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(i+="a",l.push(t[3])),ls({type:i,values:l})}function Li(e){e=ir(e);let t=e.type==="hsl"||e.type==="hsla"?ir(Yh(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function zc(e,t){const r=Li(e),n=Li(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Di(e,t){return e=ir(e),t=Pl(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ls(e)}function Ba(e,t,r){try{return Di(e,t)}catch{return e}}function aa(e,t){if(e=ir(e),t=Pl(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return ls(e)}function we(e,t,r){try{return aa(e,t)}catch{return e}}function oa(e,t){if(e=ir(e),t=Pl(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return ls(e)}function Ce(e,t,r){try{return oa(e,t)}catch{return e}}function n0(e,t=.15){return Li(e)>.5?aa(e,t):oa(e,t)}function Na(e,t,r){try{return n0(e,t)}catch{return e}}const a0=I.createContext();process.env.NODE_ENV!=="production"&&(b.node,b.bool);const o0=()=>I.useContext(a0)??!1,s0=I.createContext(void 0);process.env.NODE_ENV!=="production"&&(b.node,b.object);function i0(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const a=t.components[r];return a.defaultProps?Ao(a.defaultProps,n):!a.styleOverrides&&!a.variants?Ao(a,n):n}function l0({props:e,name:t}){const r=I.useContext(s0);return i0({props:e,name:t,theme:{components:r}})}const Gc={theme:void 0};function c0(e){let t,r;return function(a){let o=t;return(o===void 0||a.theme!==r)&&(Gc.theme=a.theme,o=zh(e(Gc)),t=o,r=a.theme),o}}function u0(e=""){function t(...n){if(!n.length)return"";const a=n[0];return typeof a=="string"&&!a.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${a}${t(...n.slice(1))})`:`, ${a}`}return(n,...a)=>`var(--${e?`${e}-`:""}${n}${t(...a)})`}const Hc=(e,t,r,n=[])=>{let a=e;t.forEach((o,s)=>{s===t.length-1?Array.isArray(a)?a[Number(o)]=r:a&&typeof a=="object"&&(a[o]=r):a&&typeof a=="object"&&(a[o]||(a[o]=n.includes(o)?[]:{}),a=a[o])})},d0=(e,t,r)=>{function n(a,o=[],s=[]){Object.entries(a).forEach(([i,l])=>{(!r||r&&!r([...o,i]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...o,i],Array.isArray(l)?[...s,i]:s):t([...o,i],l,s))})}n(e)},h0=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Qs(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},a={},o={},s={};return d0(e,(i,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(i,l))){const u=`--${r?`${r}-`:""}${i.join("-")}`,d=h0(i,l);Object.assign(a,{[u]:d}),Hc(o,i,`var(${u})`,c),Hc(s,i,`var(${u}, ${d})`,c)}},i=>i[0]==="vars"),{css:a,vars:o,varsWithDefaults:s}}function p0(e,t={}){const{getSelector:r=v,disableCssColorScheme:n,colorSchemeSelector:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:i="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=Qs(l,t);let h=d;const p={},{[i]:f,...m}=o;if(Object.entries(m||{}).forEach(([O,w])=>{const{vars:T,css:C,varsWithDefaults:A}=Qs(w,t);h=et(h,A),p[O]={css:C,vars:T}}),f){const{css:O,vars:w,varsWithDefaults:T}=Qs(f,t);h=et(h,T),p[i]={css:O,vars:w}}function v(O,w){var C,A;let T=a;if(a==="class"&&(T=".%s"),a==="data"&&(T="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(T=`[${a}="%s"]`),O){if(T==="media")return e.defaultColorScheme===O?":root":{[`@media (prefers-color-scheme: ${((A=(C=o[O])==null?void 0:C.palette)==null?void 0:A.mode)||O})`]:{":root":w}};if(T)return e.defaultColorScheme===O?`:root, ${T.replace("%s",String(O))}`:T.replace("%s",String(O))}return":root"}return{vars:h,generateThemeVars:()=>{let O={...c};return Object.entries(p).forEach(([,{vars:w}])=>{O=et(O,w)}),O},generateStyleSheets:()=>{var V,B;const O=[],w=e.defaultColorScheme||"light";function T(y,R){Object.keys(R).length&&O.push(typeof y=="string"?{[y]:{...R}}:y)}T(r(void 0,{...u}),u);const{[w]:C,...A}=p;if(C){const{css:y}=C,R=(B=(V=o[w])==null?void 0:V.palette)==null?void 0:B.mode,G=!n&&R?{colorScheme:R,...y}:{...y};T(r(w,{...G}),G)}return Object.entries(A).forEach(([y,{css:R}])=>{var N,re;const G=(re=(N=o[y])==null?void 0:N.palette)==null?void 0:re.mode,P=!n&&G?{colorScheme:G,...R}:{...R};T(r(y,{...P}),P)}),O}}}function m0(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}function Tl(e,t,r=void 0){const n={};for(const a in e){const o=e[a];let s="",i=!0;for(let l=0;l<o.length;l+=1){const c=o[l];c&&(s+=(i===!0?"":" ")+t(c),i=!1,r&&r[c]&&(s+=" "+r[c]))}n[a]=s}return n}const f0=is(),g0=Zy("div",{name:"MuiStack",slot:"Root"});function y0(e){return Jh({props:e,name:"MuiStack",defaultTheme:f0})}function b0(e,t){const r=I.Children.toArray(e).filter(Boolean);return r.reduce((n,a,o)=>(n.push(a),o<r.length-1&&n.push(I.cloneElement(t,{key:`separator-${o}`})),n),[])}const v0=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],x0=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...Ct({theme:t},Ys({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n}))};if(e.spacing){const n=ts(t),a=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),o=Ys({values:e.direction,base:a}),s=Ys({values:e.spacing,base:a});typeof o=="object"&&Object.keys(o).forEach((l,c,u)=>{if(!o[l]){const h=c>0?o[u[c-1]]:"column";o[l]=h}}),r=et(r,Ct({theme:t},s,(l,c)=>e.useFlexGap?{gap:Sr(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${v0(c?o[c]:e.direction)}`]:Sr(n,l)}}))}return r=Jg(t.breakpoints,r),r};function S0(e={}){const{createStyledComponent:t=g0,useThemeProps:r=y0,componentName:n="MuiStack"}=e,a=()=>Tl({root:["root"]},l=>Oa(n,l),{}),o=t(x0),s=I.forwardRef(function(l,c){const u=r(l),d=By(u),{component:h="div",direction:p="column",spacing:f=0,divider:m,children:v,className:S,useFlexGap:E=!1,...O}=d,w={direction:p,spacing:f,useFlexGap:E},T=a();return g.jsx(o,{as:h,ownerState:w,ref:c,className:It(T.root,S),...O,children:m?b0(v,m):v})});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:b.node,direction:b.oneOfType([b.oneOf(["column-reverse","column","row-reverse","row"]),b.arrayOf(b.oneOf(["column-reverse","column","row-reverse","row"])),b.object]),divider:b.node,spacing:b.oneOfType([b.arrayOf(b.oneOfType([b.number,b.string])),b.number,b.object,b.string]),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object])}),s}const sa={black:"#000",white:"#fff"},O0={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Lr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Dr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},$n={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Fr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Br={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Nr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Kh(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:sa.white,default:sa.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const w0=Kh();function Qh(){return{text:{primary:sa.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:sa.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const qc=Qh();function Jc(e,t,r,n){const a=n.light||n,o=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=oa(e.main,a):t==="dark"&&(e.dark=aa(e.main,o)))}function C0(e="light"){return e==="dark"?{main:Fr[200],light:Fr[50],dark:Fr[400]}:{main:Fr[700],light:Fr[400],dark:Fr[800]}}function P0(e="light"){return e==="dark"?{main:Lr[200],light:Lr[50],dark:Lr[400]}:{main:Lr[500],light:Lr[300],dark:Lr[700]}}function T0(e="light"){return e==="dark"?{main:Dr[500],light:Dr[300],dark:Dr[700]}:{main:Dr[700],light:Dr[400],dark:Dr[800]}}function R0(e="light"){return e==="dark"?{main:Br[400],light:Br[300],dark:Br[700]}:{main:Br[700],light:Br[500],dark:Br[900]}}function A0(e="light"){return e==="dark"?{main:Nr[400],light:Nr[300],dark:Nr[700]}:{main:Nr[800],light:Nr[500],dark:Nr[900]}}function _0(e="light"){return e==="dark"?{main:$n[400],light:$n[300],dark:$n[700]}:{main:"#ed6c02",light:$n[500],dark:$n[900]}}function Rl(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...a}=e,o=e.primary||C0(t),s=e.secondary||P0(t),i=e.error||T0(t),l=e.info||R0(t),c=e.success||A0(t),u=e.warning||_0(t);function d(m){const v=zc(m,qc.text.primary)>=r?qc.text.primary:w0.text.primary;if(process.env.NODE_ENV!=="production"){const S=zc(m,v);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${v} on ${m}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
52
|
-
`))}return
|
|
53
|
-
The color object needs to have a \`main\` property or a \`${S}\` property.`:
|
|
49
|
+
`)),()=>{})}function ns(e){return Ca(e,"spacing",8,"spacing")}function Cr(e,t){return typeof t=="string"||t==null?t:e(t)}function Kg(e,t){return r=>e.reduce((n,a)=>(n[a]=Cr(t,r),n),{})}function Qg(e,t,r,n){if(!t.includes(r))return null;const a=Wg(r),o=Kg(a,n),s=e[r];return Pt(e,s,o)}function Bh(e,t){const r=ns(e.theme);return Object.keys(e).map(n=>Qg(e,t,n,r)).reduce(na,{})}function je(e){return Bh(e,ts)}je.propTypes=process.env.NODE_ENV!=="production"?ts.reduce((e,t)=>(e[t]=dr,e),{}):{};je.filterProps=ts;function $e(e){return Bh(e,rs)}$e.propTypes=process.env.NODE_ENV!=="production"?rs.reduce((e,t)=>(e[t]=dr,e),{}):{};$e.filterProps=rs;process.env.NODE_ENV!=="production"&&Yg.reduce((e,t)=>(e[t]=dr,e),{});function Fh(e=8,t=ns({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function as(...e){const t=e.reduce((n,a)=>(a.filterProps.forEach(o=>{n[o]=a}),n),{}),r=n=>Object.keys(n).reduce((a,o)=>t[o]?na(a,t[o](n)):a,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,a)=>Object.assign(n,a.propTypes),{}):{},r.filterProps=e.reduce((n,a)=>n.concat(a.filterProps),[]),r}function ft(e){return typeof e!="number"?e:`${e}px solid`}function vt(e,t){return Ue({prop:e,themeKey:"borders",transform:t})}const Xg=vt("border",ft),Zg=vt("borderTop",ft),ey=vt("borderRight",ft),ty=vt("borderBottom",ft),ry=vt("borderLeft",ft),ny=vt("borderColor"),ay=vt("borderTopColor"),oy=vt("borderRightColor"),sy=vt("borderBottomColor"),iy=vt("borderLeftColor"),ly=vt("outline",ft),cy=vt("outlineColor"),os=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ca(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Cr(t,n)});return Pt(e,e.borderRadius,r)}return null};os.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:dr}:{};os.filterProps=["borderRadius"];as(Xg,Zg,ey,ty,ry,ny,ay,oy,sy,iy,os,ly,cy);const ss=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ca(e.theme,"spacing",8,"gap"),r=n=>({gap:Cr(t,n)});return Pt(e,e.gap,r)}return null};ss.propTypes=process.env.NODE_ENV!=="production"?{gap:dr}:{};ss.filterProps=["gap"];const is=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ca(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Cr(t,n)});return Pt(e,e.columnGap,r)}return null};is.propTypes=process.env.NODE_ENV!=="production"?{columnGap:dr}:{};is.filterProps=["columnGap"];const ls=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ca(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Cr(t,n)});return Pt(e,e.rowGap,r)}return null};ls.propTypes=process.env.NODE_ENV!=="production"?{rowGap:dr}:{};ls.filterProps=["rowGap"];const uy=Ue({prop:"gridColumn"}),dy=Ue({prop:"gridRow"}),hy=Ue({prop:"gridAutoFlow"}),py=Ue({prop:"gridAutoColumns"}),my=Ue({prop:"gridAutoRows"}),fy=Ue({prop:"gridTemplateColumns"}),gy=Ue({prop:"gridTemplateRows"}),yy=Ue({prop:"gridTemplateAreas"}),by=Ue({prop:"gridArea"});as(ss,is,ls,uy,dy,hy,py,my,fy,gy,yy,by);function sn(e,t){return t==="grey"?t:e}const vy=Ue({prop:"color",themeKey:"palette",transform:sn}),xy=Ue({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:sn}),Sy=Ue({prop:"backgroundColor",themeKey:"palette",transform:sn});as(vy,xy,Sy);function ut(e){return e<=1&&e!==0?`${e*100}%`:e}const Oy=Ue({prop:"width",transform:ut}),Tl=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var a,o,s,i,l;const n=((s=(o=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:o.values)==null?void 0:s[r])||Zo[r];return n?((l=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:ut(r)}};return Pt(e,e.maxWidth,t)}return null};Tl.filterProps=["maxWidth"];const wy=Ue({prop:"minWidth",transform:ut}),Cy=Ue({prop:"height",transform:ut}),Py=Ue({prop:"maxHeight",transform:ut}),Ty=Ue({prop:"minHeight",transform:ut});Ue({prop:"size",cssProperty:"width",transform:ut});Ue({prop:"size",cssProperty:"height",transform:ut});const Ry=Ue({prop:"boxSizing"});as(Oy,Tl,wy,Cy,Py,Ty,Ry);const Pa={border:{themeKey:"borders",transform:ft},borderTop:{themeKey:"borders",transform:ft},borderRight:{themeKey:"borders",transform:ft},borderBottom:{themeKey:"borders",transform:ft},borderLeft:{themeKey:"borders",transform:ft},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ft},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:os},color:{themeKey:"palette",transform:sn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:sn},backgroundColor:{themeKey:"palette",transform:sn},p:{style:$e},pt:{style:$e},pr:{style:$e},pb:{style:$e},pl:{style:$e},px:{style:$e},py:{style:$e},padding:{style:$e},paddingTop:{style:$e},paddingRight:{style:$e},paddingBottom:{style:$e},paddingLeft:{style:$e},paddingX:{style:$e},paddingY:{style:$e},paddingInline:{style:$e},paddingInlineStart:{style:$e},paddingInlineEnd:{style:$e},paddingBlock:{style:$e},paddingBlockStart:{style:$e},paddingBlockEnd:{style:$e},m:{style:je},mt:{style:je},mr:{style:je},mb:{style:je},ml:{style:je},mx:{style:je},my:{style:je},margin:{style:je},marginTop:{style:je},marginRight:{style:je},marginBottom:{style:je},marginLeft:{style:je},marginX:{style:je},marginY:{style:je},marginInline:{style:je},marginInlineStart:{style:je},marginInlineEnd:{style:je},marginBlock:{style:je},marginBlockStart:{style:je},marginBlockEnd:{style:je},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ss},rowGap:{style:ls},columnGap:{style:is},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ut},maxWidth:{style:Tl},minWidth:{transform:ut},height:{transform:ut},maxHeight:{transform:ut},minHeight:{transform:ut},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Ay(...e){const t=e.reduce((n,a)=>n.concat(Object.keys(a)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function _y(e,t){return typeof e=="function"?e(t):e}function Ey(){function e(r,n,a,o){const s={[r]:n,theme:a},i=o[r];if(!i)return{[r]:n};const{cssProperty:l=r,themeKey:c,transform:u,style:d}=i;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const h=es(a,c)||{};return d?d(s):Pt(s,n,f=>{let m=Ao(h,u,f);return f===m&&typeof f=="string"&&(m=Ao(h,u,`${r}${f==="default"?"":Ze(f)}`,f)),l===!1?m:{[l]:m}})}function t(r){const{sx:n,theme:a={}}=r||{};if(!n)return null;const o=a.unstable_sxConfig??Pa;function s(i){let l=i;if(typeof i=="function")l=i(a);else if(typeof i!="object")return i;if(!l)return null;const c=Dh(a.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(h=>{const p=_y(l[h],a);if(p!=null)if(typeof p=="object")if(o[h])d=na(d,e(h,p,a,o));else{const f=Pt({theme:a},p,m=>({[h]:m}));Ay(f,p)?d[h]=t({sx:p,theme:a}):d=na(d,f)}else d=na(d,e(h,p,a,o))}),Ug(a,Lh(u,d))}return Array.isArray(n)?n.map(s):s(n)}return t}const hn=Ey();hn.filterProps=["sx"];function Vy(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let a=r.getColorSchemeSelector(e);return a==="&"?t:((a.includes("data-")||a.includes("."))&&(a=`*:where(${a.replace(/\s*&$/,"")}) &`),{[a]:t})}return r.palette.mode===e?t:{}}function cs(e={},...t){const{breakpoints:r={},palette:n={},spacing:a,shape:o={},...s}=e,i=kg(r),l=Fh(a);let c=et({breakpoints:i,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...Fg,...o}},s);return c=Bg(c),c.applyStyles=Vy,c=t.reduce((u,d)=>et(u,d),c),c.unstable_sxConfig={...Pa,...s==null?void 0:s.unstable_sxConfig},c.unstable_sx=function(d){return hn({sx:d,theme:this})},c}function Iy(e){return Object.keys(e).length===0}function My(e=null){const t=B.useContext(hg.ThemeContext);return!t||Iy(t)?e:t}const jy=cs();function $y(e=jy){return My(e)}const ky=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??Pa;return Object.keys(e).forEach(a=>{r[a]?t.systemProps[a]=e[a]:t.otherProps[a]=e[a]}),t};function Uy(e){const{sx:t,...r}=e,{systemProps:n,otherProps:a}=ky(r);let o;return Array.isArray(t)?o=[n,...t]:typeof t=="function"?o=(...s)=>{const i=t(...s);return It(i)?{...n,...i}:n}:o={...n,...t},{...a,sx:o}}const zc=e=>e,Dy=()=>{let e=zc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=zc}}},Ly=Dy(),By={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Sn(e,t,r="Mui"){const n=By[t];return n?`${r}-${n}`:`${Ly.generate(e)}-${t}`}function Rl(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=Sn(e,a,r)}),n}function Nh(e,t=""){return e.displayName||e.name||t}function Gc(e,t,r){const n=Nh(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Fy(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Nh(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Ro.ForwardRef:return Gc(e,e.render,"ForwardRef");case Ro.Memo:return Gc(e,e.type,"memo");default:return}}}function zh(e){const{variants:t,...r}=e,n={variants:t,style:Uc(r),isProcessed:!0};return n.style===r||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=Uc(a.style))}),n}const Ny=cs();function Zs(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function zy(e){return e?(t,r)=>r[e]:null}function Gy(e,t,r){e.theme=Jy(e.theme)?r:e.theme[t]||e.theme}function go(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>go(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:a,...o}=r;n=o}return Gh(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Gh(e,t,r=[]){var a;let n;e:for(let o=0;o<t.length;o+=1){const s=t[o];if(typeof s.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!s.props(n))continue}else for(const i in s.props)if(e[i]!==s.props[i]&&((a=e.ownerState)==null?void 0:a[i])!==s.props[i])continue e;typeof s.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(s.style(n))):r.push(s.style)}return r}function Hh(e={}){const{themeId:t,defaultTheme:r=Ny,rootShouldForwardProp:n=Zs,slotShouldForwardProp:a=Zs}=e;function o(i){Gy(i,t,r)}return(i,l={})=>{Vg(i,C=>C.filter(w=>w!==hn));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:p=zy(qh(u)),...f}=l,m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,b=h||!1;let S=Zs;u==="Root"||u==="root"?S=n:u?S=a:Wy(i)&&(S=void 0);const E=Eg(i,{shouldForwardProp:S,label:qy(c,u),...f}),O=C=>{if(C.__emotion_real===C)return C;if(typeof C=="function")return function(T){return go(T,C)};if(It(C)){const w=zh(C);return w.variants?function(V){return go(V,w)}:w.style}return C},P=(...C)=>{const w=[],T=C.map(O),V=[];if(w.push(o),c&&p&&V.push(function(G){var ee,ae;const N=(ae=(ee=G.theme.components)==null?void 0:ee[c])==null?void 0:ae.styleOverrides;if(!N)return null;const re={};for(const te in N)re[te]=go(G,N[te]);return p(G,re)}),c&&!m&&V.push(function(G){var re,ee;const A=G.theme,N=(ee=(re=A==null?void 0:A.components)==null?void 0:re[c])==null?void 0:ee.variants;return N?Gh(G,N):null}),b||V.push(hn),Array.isArray(T[0])){const R=T.shift(),G=new Array(w.length).fill(""),A=new Array(V.length).fill("");let N;N=[...G,...R,...A],N.raw=[...G,...R.raw,...A],w.unshift(N)}const z=[...w,...T,...V],v=E(...z);return i.muiName&&(v.muiName=i.muiName),process.env.NODE_ENV!=="production"&&(v.displayName=Hy(c,u,i)),v};return E.withConfig&&(P.withConfig=E.withConfig),P}}function Hy(e,t,r){return e?`${e}${Ze(t||"")}`:`Styled(${Fy(r)})`}function qy(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${qh(t||"Root")}`),r}function Jy(e){for(const t in e)return!1;return!0}function Wy(e){return typeof e=="string"&&e.charCodeAt(0)>96}function qh(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Yy=Hh();function _o(e,t,r=!1){const n={...t};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const o=a;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const s=e[o],i=t[o];if(!i)n[o]=s||{};else if(!s)n[o]=i;else{n[o]={...i};for(const l in s)if(Object.prototype.hasOwnProperty.call(s,l)){const c=l;n[o][c]=_o(s[c],i[c],r)}}}else o==="className"&&r&&t.className?n.className=Ct(e==null?void 0:e.className,t==null?void 0:t.className):o==="style"&&r&&t.style?n.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:n[o]===void 0&&(n[o]=e[o])}return n}function Ky(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:_o(t.components[r].defaultProps,n)}function Jh({props:e,name:t,defaultTheme:r,themeId:n}){let a=$y(r);return n&&(a=a[n]||a),Ky({theme:a,name:t,props:e})}const $t=typeof window<"u"?B.useLayoutEffect:B.useEffect;function rn(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Al(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),rn(e,t,r)}function Qy(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,a)=>a<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function cr(e){if(e.type)return e;if(e.charAt(0)==="#")return cr(Qy(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
50
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:lr(9,e));let n=e.substring(t+1,e.length-1),a;if(r==="color"){if(n=n.split(" "),a=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(a))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${a}\` color space.
|
|
51
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:lr(10,a))}else n=n.split(",");return n=n.map(o=>parseFloat(o)),{type:r,values:n,colorSpace:a}}const Xy=e=>{const t=cr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Zn=(e,t)=>{try{return Xy(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function us(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((a,o)=>o<3?parseInt(a,10):a):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Wh(e){e=cr(e);const{values:t}=e,r=t[0],n=t[1]/100,a=t[2]/100,o=n*Math.min(a,1-a),s=(c,u=(c+r/30)%12)=>a-o*Math.max(Math.min(u-3,9-u,1),-1);let i="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(i+="a",l.push(t[3])),us({type:i,values:l})}function Bi(e){e=cr(e);let t=e.type==="hsl"||e.type==="hsla"?cr(Wh(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Hc(e,t){const r=Bi(e),n=Bi(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Fi(e,t){return e=cr(e),t=Al(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,us(e)}function za(e,t,r){try{return Fi(e,t)}catch{return e}}function la(e,t){if(e=cr(e),t=Al(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return us(e)}function Ce(e,t,r){try{return la(e,t)}catch{return e}}function ca(e,t){if(e=cr(e),t=Al(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return us(e)}function Pe(e,t,r){try{return ca(e,t)}catch{return e}}function Zy(e,t=.15){return Bi(e)>.5?la(e,t):ca(e,t)}function Ga(e,t,r){try{return Zy(e,t)}catch{return e}}const e0=B.createContext();process.env.NODE_ENV!=="production"&&(y.node,y.bool);const t0=()=>B.useContext(e0)??!1,r0=B.createContext(void 0);process.env.NODE_ENV!=="production"&&(y.node,y.object);function n0(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const a=t.components[r];return a.defaultProps?_o(a.defaultProps,n):!a.styleOverrides&&!a.variants?_o(a,n):n}function a0({props:e,name:t}){const r=B.useContext(r0);return n0({props:e,name:t,theme:{components:r}})}const qc={theme:void 0};function o0(e){let t,r;return function(a){let o=t;return(o===void 0||a.theme!==r)&&(qc.theme=a.theme,o=zh(e(qc)),t=o,r=a.theme),o}}function s0(e=""){function t(...n){if(!n.length)return"";const a=n[0];return typeof a=="string"&&!a.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${a}${t(...n.slice(1))})`:`, ${a}`}return(n,...a)=>`var(--${e?`${e}-`:""}${n}${t(...a)})`}const Jc=(e,t,r,n=[])=>{let a=e;t.forEach((o,s)=>{s===t.length-1?Array.isArray(a)?a[Number(o)]=r:a&&typeof a=="object"&&(a[o]=r):a&&typeof a=="object"&&(a[o]||(a[o]=n.includes(o)?[]:{}),a=a[o])})},i0=(e,t,r)=>{function n(a,o=[],s=[]){Object.entries(a).forEach(([i,l])=>{(!r||r&&!r([...o,i]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...o,i],Array.isArray(l)?[...s,i]:s):t([...o,i],l,s))})}n(e)},l0=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function ei(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},a={},o={},s={};return i0(e,(i,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(i,l))){const u=`--${r?`${r}-`:""}${i.join("-")}`,d=l0(i,l);Object.assign(a,{[u]:d}),Jc(o,i,`var(${u})`,c),Jc(s,i,`var(${u}, ${d})`,c)}},i=>i[0]==="vars"),{css:a,vars:o,varsWithDefaults:s}}function c0(e,t={}){const{getSelector:r=b,disableCssColorScheme:n,colorSchemeSelector:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:i="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=ei(l,t);let h=d;const p={},{[i]:f,...m}=o;if(Object.entries(m||{}).forEach(([O,P])=>{const{vars:C,css:w,varsWithDefaults:T}=ei(P,t);h=et(h,T),p[O]={css:w,vars:C}}),f){const{css:O,vars:P,varsWithDefaults:C}=ei(f,t);h=et(h,C),p[i]={css:O,vars:P}}function b(O,P){var w,T;let C=a;if(a==="class"&&(C=".%s"),a==="data"&&(C="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(C=`[${a}="%s"]`),O){if(C==="media")return e.defaultColorScheme===O?":root":{[`@media (prefers-color-scheme: ${((T=(w=o[O])==null?void 0:w.palette)==null?void 0:T.mode)||O})`]:{":root":P}};if(C)return e.defaultColorScheme===O?`:root, ${C.replace("%s",String(O))}`:C.replace("%s",String(O))}return":root"}return{vars:h,generateThemeVars:()=>{let O={...c};return Object.entries(p).forEach(([,{vars:P}])=>{O=et(O,P)}),O},generateStyleSheets:()=>{var V,z;const O=[],P=e.defaultColorScheme||"light";function C(v,R){Object.keys(R).length&&O.push(typeof v=="string"?{[v]:{...R}}:v)}C(r(void 0,{...u}),u);const{[P]:w,...T}=p;if(w){const{css:v}=w,R=(z=(V=o[P])==null?void 0:V.palette)==null?void 0:z.mode,G=!n&&R?{colorScheme:R,...v}:{...v};C(r(P,{...G}),G)}return Object.entries(T).forEach(([v,{css:R}])=>{var N,re;const G=(re=(N=o[v])==null?void 0:N.palette)==null?void 0:re.mode,A=!n&&G?{colorScheme:G,...R}:{...R};C(r(v,{...A}),A)}),O}}}function u0(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const d0=cs(),h0=Yy("div",{name:"MuiStack",slot:"Root"});function p0(e){return Jh({props:e,name:"MuiStack",defaultTheme:d0})}function m0(e,t){const r=B.Children.toArray(e).filter(Boolean);return r.reduce((n,a,o)=>(n.push(a),o<r.length-1&&n.push(B.cloneElement(t,{key:`separator-${o}`})),n),[])}const f0=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],g0=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...Pt({theme:t},Xs({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n}))};if(e.spacing){const n=ns(t),a=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),o=Xs({values:e.direction,base:a}),s=Xs({values:e.spacing,base:a});typeof o=="object"&&Object.keys(o).forEach((l,c,u)=>{if(!o[l]){const h=c>0?o[u[c-1]]:"column";o[l]=h}}),r=et(r,Pt({theme:t},s,(l,c)=>e.useFlexGap?{gap:Cr(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${f0(c?o[c]:e.direction)}`]:Cr(n,l)}}))}return r=zg(t.breakpoints,r),r};function y0(e={}){const{createStyledComponent:t=h0,useThemeProps:r=p0,componentName:n="MuiStack"}=e,a=()=>Xo({root:["root"]},l=>Sn(n,l),{}),o=t(g0),s=B.forwardRef(function(l,c){const u=r(l),d=Uy(u),{component:h="div",direction:p="column",spacing:f=0,divider:m,children:b,className:S,useFlexGap:E=!1,...O}=d,P={direction:p,spacing:f,useFlexGap:E},C=a();return g.jsx(o,{as:h,ownerState:P,ref:c,className:Ct(C.root,S),...O,children:m?m0(b,m):b})});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:y.node,direction:y.oneOfType([y.oneOf(["column-reverse","column","row-reverse","row"]),y.arrayOf(y.oneOf(["column-reverse","column","row-reverse","row"])),y.object]),divider:y.node,spacing:y.oneOfType([y.arrayOf(y.oneOfType([y.number,y.string])),y.number,y.object,y.string]),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object])}),s}const ua={black:"#000",white:"#fff"},b0={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Fr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Nr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Dn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},zr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Gr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Hr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Yh(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ua.white,default:ua.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const v0=Yh();function Kh(){return{text:{primary:ua.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:ua.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Wc=Kh();function Yc(e,t,r,n){const a=n.light||n,o=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=ca(e.main,a):t==="dark"&&(e.dark=la(e.main,o)))}function x0(e="light"){return e==="dark"?{main:zr[200],light:zr[50],dark:zr[400]}:{main:zr[700],light:zr[400],dark:zr[800]}}function S0(e="light"){return e==="dark"?{main:Fr[200],light:Fr[50],dark:Fr[400]}:{main:Fr[500],light:Fr[300],dark:Fr[700]}}function O0(e="light"){return e==="dark"?{main:Nr[500],light:Nr[300],dark:Nr[700]}:{main:Nr[700],light:Nr[400],dark:Nr[800]}}function w0(e="light"){return e==="dark"?{main:Gr[400],light:Gr[300],dark:Gr[700]}:{main:Gr[700],light:Gr[500],dark:Gr[900]}}function C0(e="light"){return e==="dark"?{main:Hr[400],light:Hr[300],dark:Hr[700]}:{main:Hr[800],light:Hr[500],dark:Hr[900]}}function P0(e="light"){return e==="dark"?{main:Dn[400],light:Dn[300],dark:Dn[700]}:{main:"#ed6c02",light:Dn[500],dark:Dn[900]}}function _l(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...a}=e,o=e.primary||x0(t),s=e.secondary||S0(t),i=e.error||O0(t),l=e.info||w0(t),c=e.success||C0(t),u=e.warning||P0(t);function d(m){const b=Hc(m,Wc.text.primary)>=r?Wc.text.primary:v0.text.primary;if(process.env.NODE_ENV!=="production"){const S=Hc(m,b);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${b} on ${m}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
52
|
+
`))}return b}const h=({color:m,name:b,mainShade:S=500,lightShade:E=300,darkShade:O=700})=>{if(m={...m},!m.main&&m[S]&&(m.main=m[S]),!m.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
|
|
53
|
+
The color object needs to have a \`main\` property or a \`${S}\` property.`:lr(11,b?` (${b})`:"",S));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
|
|
54
54
|
\`color.main\` should be a string, but \`${JSON.stringify(m.main)}\` was provided instead.
|
|
55
55
|
|
|
56
56
|
Did you intend to use one of the following approaches?
|
|
@@ -63,23 +63,23 @@ const theme1 = createTheme({ palette: {
|
|
|
63
63
|
|
|
64
64
|
const theme2 = createTheme({ palette: {
|
|
65
65
|
primary: { main: green[500] },
|
|
66
|
-
} });`:
|
|
67
|
-
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(a)?a:[a]).map(u=>`${u} ${typeof s=="string"?s:
|
|
66
|
+
} });`:lr(12,b?` (${b})`:"",JSON.stringify(m.main)));return Yc(m,"light",E,n),Yc(m,"dark",O,n),m.contrastText||(m.contrastText=d(m.main)),m};let p;return t==="light"?p=Yh():t==="dark"&&(p=Kh()),process.env.NODE_ENV!=="production"&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),et({common:{...ua},mode:t,primary:h({color:o,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:i,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:b0,contrastThreshold:r,getContrastText:d,augmentColor:h,tonalOffset:n,...p},a)}function T0(e){const t={};return Object.entries(e).forEach(n=>{const[a,o]=n;typeof o=="object"&&(t[a]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function R0(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function A0(e){return Math.round(e*1e5)/1e5}const Kc={textTransform:"uppercase"},Qc='"Roboto", "Helvetica", "Arial", sans-serif';function _0(e,t){const{fontFamily:r=Qc,fontSize:n=14,fontWeightLight:a=300,fontWeightRegular:o=400,fontWeightMedium:s=500,fontWeightBold:i=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const h=n/14,p=u||(b=>`${b/l*h}rem`),f=(b,S,E,O,P)=>({fontFamily:r,fontWeight:b,fontSize:p(S),lineHeight:E,...r===Qc?{letterSpacing:`${A0(O/S)}em`}:{},...P,...c}),m={h1:f(a,96,1.167,-1.5),h2:f(a,60,1.2,-.5),h3:f(o,48,1.167,0),h4:f(o,34,1.235,.25),h5:f(o,24,1.334,0),h6:f(s,20,1.6,.15),subtitle1:f(o,16,1.75,.15),subtitle2:f(s,14,1.57,.1),body1:f(o,16,1.5,.15),body2:f(o,14,1.43,.15),button:f(s,14,1.75,.4,Kc),caption:f(o,12,1.66,.4),overline:f(o,12,2.66,1,Kc),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return et({htmlFontSize:l,pxToRem:p,fontFamily:r,fontSize:n,fontWeightLight:a,fontWeightRegular:o,fontWeightMedium:s,fontWeightBold:i,...m},d,{clone:!1})}const E0=.2,V0=.14,I0=.12;function Ie(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${E0})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${V0})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${I0})`].join(",")}const M0=["none",Ie(0,2,1,-1,0,1,1,0,0,1,3,0),Ie(0,3,1,-2,0,2,2,0,0,1,5,0),Ie(0,3,3,-2,0,3,4,0,0,1,8,0),Ie(0,2,4,-1,0,4,5,0,0,1,10,0),Ie(0,3,5,-1,0,5,8,0,0,1,14,0),Ie(0,3,5,-1,0,6,10,0,0,1,18,0),Ie(0,4,5,-2,0,7,10,1,0,2,16,1),Ie(0,5,5,-3,0,8,10,1,0,3,14,2),Ie(0,5,6,-3,0,9,12,1,0,3,16,2),Ie(0,6,6,-3,0,10,14,1,0,4,18,3),Ie(0,6,7,-4,0,11,15,1,0,4,20,3),Ie(0,7,8,-4,0,12,17,2,0,5,22,4),Ie(0,7,8,-4,0,13,19,2,0,5,24,4),Ie(0,7,9,-4,0,14,21,2,0,5,26,4),Ie(0,8,9,-5,0,15,22,2,0,6,28,5),Ie(0,8,10,-5,0,16,24,2,0,6,30,5),Ie(0,8,11,-5,0,17,26,2,0,6,32,5),Ie(0,9,11,-5,0,18,28,2,0,7,34,6),Ie(0,9,12,-6,0,19,29,2,0,7,36,6),Ie(0,10,13,-6,0,20,31,3,0,8,38,7),Ie(0,10,13,-6,0,21,33,3,0,8,40,7),Ie(0,10,14,-6,0,22,35,3,0,8,42,7),Ie(0,11,14,-7,0,23,36,3,0,9,44,8),Ie(0,11,15,-7,0,24,38,3,0,9,46,8)],j0={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},$0={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Xc(e){return`${Math.round(e)}ms`}function k0(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function U0(e){const t={...j0,...e.easing},r={...$0,...e.duration};return{getAutoHeightDuration:k0,create:(a=["all"],o={})=>{const{duration:s=r.standard,easing:i=t.easeInOut,delay:l=0,...c}=o;if(process.env.NODE_ENV!=="production"){const u=h=>typeof h=="string",d=h=>!Number.isNaN(parseFloat(h));!u(a)&&!Array.isArray(a)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(s)&&!u(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),u(i)||console.error('MUI: Argument "easing" must be a string.'),!d(l)&&!u(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof o!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
67
|
+
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(a)?a:[a]).map(u=>`${u} ${typeof s=="string"?s:Xc(s)} ${i} ${typeof l=="string"?l:Xc(l)}`).join(",")},...e,easing:t,duration:r}}const D0={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function L0(e){return It(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Qh(e={}){const t={...e};function r(n){const a=Object.entries(n);for(let o=0;o<a.length;o++){const[s,i]=a[o];!L0(i)||s.startsWith("unstable_")?delete n[s]:It(i)&&(n[s]={...i},r(n[s]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
68
68
|
|
|
69
69
|
const theme = ${JSON.stringify(t,null,2)};
|
|
70
70
|
|
|
71
71
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
72
72
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
73
73
|
|
|
74
|
-
export default theme;`}function
|
|
75
|
-
`))}m[S]={}}}};Object.keys(h.components).forEach(m=>{const
|
|
76
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Q0(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Tt=e=>{try{return e()}catch{}},X0=(e="mui")=>u0(e);function Xs(e,t,r,n){if(!t)return;t=t===!0?{}:t;const a=n==="dark"?"dark":"light";if(!r){e[n]=q0({...t,palette:{mode:a,...t==null?void 0:t.palette}});return}const{palette:o,...s}=Fi({...r,palette:{mode:a,...t==null?void 0:t.palette}});return e[n]={...t,palette:o,opacity:{...Zh(a),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||ep(a)},s}function Z0(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:a=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:s=J0,colorSchemeSelector:i=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...c}=e,u=Object.keys(r)[0],d=n||(r.light&&u!=="light"?"light":u),h=X0(o),{[d]:p,light:f,dark:m,...v}=r,S={...v};let E=p;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(E=!0),!E)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:sr(21,d));const O=Xs(S,E,c,d);f&&!S.light&&Xs(S,f,void 0,"light"),m&&!S.dark&&Xs(S,m,void 0,"dark");let w={defaultColorScheme:d,...O,cssVarPrefix:o,colorSchemeSelector:i,rootSelector:l,getCssVar:h,colorSchemes:S,font:{...E0(O.typography),...O.font},spacing:Q0(c.spacing)};Object.keys(w.colorSchemes).forEach(B=>{const y=w.colorSchemes[B].palette,R=G=>{const P=G.split("-"),N=P[1],re=P[2];return h(G,y[N][re])};if(y.mode==="light"&&(q(y.common,"background","#fff"),q(y.common,"onBackground","#000")),y.mode==="dark"&&(q(y.common,"background","#000"),q(y.common,"onBackground","#fff")),K0(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){q(y.Alert,"errorColor",we(y.error.light,.6)),q(y.Alert,"infoColor",we(y.info.light,.6)),q(y.Alert,"successColor",we(y.success.light,.6)),q(y.Alert,"warningColor",we(y.warning.light,.6)),q(y.Alert,"errorFilledBg",R("palette-error-main")),q(y.Alert,"infoFilledBg",R("palette-info-main")),q(y.Alert,"successFilledBg",R("palette-success-main")),q(y.Alert,"warningFilledBg",R("palette-warning-main")),q(y.Alert,"errorFilledColor",Tt(()=>y.getContrastText(y.error.main))),q(y.Alert,"infoFilledColor",Tt(()=>y.getContrastText(y.info.main))),q(y.Alert,"successFilledColor",Tt(()=>y.getContrastText(y.success.main))),q(y.Alert,"warningFilledColor",Tt(()=>y.getContrastText(y.warning.main))),q(y.Alert,"errorStandardBg",Ce(y.error.light,.9)),q(y.Alert,"infoStandardBg",Ce(y.info.light,.9)),q(y.Alert,"successStandardBg",Ce(y.success.light,.9)),q(y.Alert,"warningStandardBg",Ce(y.warning.light,.9)),q(y.Alert,"errorIconColor",R("palette-error-main")),q(y.Alert,"infoIconColor",R("palette-info-main")),q(y.Alert,"successIconColor",R("palette-success-main")),q(y.Alert,"warningIconColor",R("palette-warning-main")),q(y.AppBar,"defaultBg",R("palette-grey-100")),q(y.Avatar,"defaultBg",R("palette-grey-400")),q(y.Button,"inheritContainedBg",R("palette-grey-300")),q(y.Button,"inheritContainedHoverBg",R("palette-grey-A100")),q(y.Chip,"defaultBorder",R("palette-grey-400")),q(y.Chip,"defaultAvatarColor",R("palette-grey-700")),q(y.Chip,"defaultIconColor",R("palette-grey-700")),q(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),q(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),q(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),q(y.LinearProgress,"primaryBg",Ce(y.primary.main,.62)),q(y.LinearProgress,"secondaryBg",Ce(y.secondary.main,.62)),q(y.LinearProgress,"errorBg",Ce(y.error.main,.62)),q(y.LinearProgress,"infoBg",Ce(y.info.main,.62)),q(y.LinearProgress,"successBg",Ce(y.success.main,.62)),q(y.LinearProgress,"warningBg",Ce(y.warning.main,.62)),q(y.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),q(y.Slider,"primaryTrack",Ce(y.primary.main,.62)),q(y.Slider,"secondaryTrack",Ce(y.secondary.main,.62)),q(y.Slider,"errorTrack",Ce(y.error.main,.62)),q(y.Slider,"infoTrack",Ce(y.info.main,.62)),q(y.Slider,"successTrack",Ce(y.success.main,.62)),q(y.Slider,"warningTrack",Ce(y.warning.main,.62));const G=Na(y.background.default,.8);q(y.SnackbarContent,"bg",G),q(y.SnackbarContent,"color",Tt(()=>y.getContrastText(G))),q(y.SpeedDialAction,"fabHoverBg",Na(y.background.paper,.15)),q(y.StepConnector,"border",R("palette-grey-400")),q(y.StepContent,"border",R("palette-grey-400")),q(y.Switch,"defaultColor",R("palette-common-white")),q(y.Switch,"defaultDisabledColor",R("palette-grey-100")),q(y.Switch,"primaryDisabledColor",Ce(y.primary.main,.62)),q(y.Switch,"secondaryDisabledColor",Ce(y.secondary.main,.62)),q(y.Switch,"errorDisabledColor",Ce(y.error.main,.62)),q(y.Switch,"infoDisabledColor",Ce(y.info.main,.62)),q(y.Switch,"successDisabledColor",Ce(y.success.main,.62)),q(y.Switch,"warningDisabledColor",Ce(y.warning.main,.62)),q(y.TableCell,"border",Ce(Ba(y.divider,1),.88)),q(y.Tooltip,"bg",Ba(y.grey[700],.92))}if(y.mode==="dark"){q(y.Alert,"errorColor",Ce(y.error.light,.6)),q(y.Alert,"infoColor",Ce(y.info.light,.6)),q(y.Alert,"successColor",Ce(y.success.light,.6)),q(y.Alert,"warningColor",Ce(y.warning.light,.6)),q(y.Alert,"errorFilledBg",R("palette-error-dark")),q(y.Alert,"infoFilledBg",R("palette-info-dark")),q(y.Alert,"successFilledBg",R("palette-success-dark")),q(y.Alert,"warningFilledBg",R("palette-warning-dark")),q(y.Alert,"errorFilledColor",Tt(()=>y.getContrastText(y.error.dark))),q(y.Alert,"infoFilledColor",Tt(()=>y.getContrastText(y.info.dark))),q(y.Alert,"successFilledColor",Tt(()=>y.getContrastText(y.success.dark))),q(y.Alert,"warningFilledColor",Tt(()=>y.getContrastText(y.warning.dark))),q(y.Alert,"errorStandardBg",we(y.error.light,.9)),q(y.Alert,"infoStandardBg",we(y.info.light,.9)),q(y.Alert,"successStandardBg",we(y.success.light,.9)),q(y.Alert,"warningStandardBg",we(y.warning.light,.9)),q(y.Alert,"errorIconColor",R("palette-error-main")),q(y.Alert,"infoIconColor",R("palette-info-main")),q(y.Alert,"successIconColor",R("palette-success-main")),q(y.Alert,"warningIconColor",R("palette-warning-main")),q(y.AppBar,"defaultBg",R("palette-grey-900")),q(y.AppBar,"darkBg",R("palette-background-paper")),q(y.AppBar,"darkColor",R("palette-text-primary")),q(y.Avatar,"defaultBg",R("palette-grey-600")),q(y.Button,"inheritContainedBg",R("palette-grey-800")),q(y.Button,"inheritContainedHoverBg",R("palette-grey-700")),q(y.Chip,"defaultBorder",R("palette-grey-700")),q(y.Chip,"defaultAvatarColor",R("palette-grey-300")),q(y.Chip,"defaultIconColor",R("palette-grey-300")),q(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),q(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),q(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),q(y.LinearProgress,"primaryBg",we(y.primary.main,.5)),q(y.LinearProgress,"secondaryBg",we(y.secondary.main,.5)),q(y.LinearProgress,"errorBg",we(y.error.main,.5)),q(y.LinearProgress,"infoBg",we(y.info.main,.5)),q(y.LinearProgress,"successBg",we(y.success.main,.5)),q(y.LinearProgress,"warningBg",we(y.warning.main,.5)),q(y.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),q(y.Slider,"primaryTrack",we(y.primary.main,.5)),q(y.Slider,"secondaryTrack",we(y.secondary.main,.5)),q(y.Slider,"errorTrack",we(y.error.main,.5)),q(y.Slider,"infoTrack",we(y.info.main,.5)),q(y.Slider,"successTrack",we(y.success.main,.5)),q(y.Slider,"warningTrack",we(y.warning.main,.5));const G=Na(y.background.default,.98);q(y.SnackbarContent,"bg",G),q(y.SnackbarContent,"color",Tt(()=>y.getContrastText(G))),q(y.SpeedDialAction,"fabHoverBg",Na(y.background.paper,.15)),q(y.StepConnector,"border",R("palette-grey-600")),q(y.StepContent,"border",R("palette-grey-600")),q(y.Switch,"defaultColor",R("palette-grey-300")),q(y.Switch,"defaultDisabledColor",R("palette-grey-600")),q(y.Switch,"primaryDisabledColor",we(y.primary.main,.55)),q(y.Switch,"secondaryDisabledColor",we(y.secondary.main,.55)),q(y.Switch,"errorDisabledColor",we(y.error.main,.55)),q(y.Switch,"infoDisabledColor",we(y.info.main,.55)),q(y.Switch,"successDisabledColor",we(y.success.main,.55)),q(y.Switch,"warningDisabledColor",we(y.warning.main,.55)),q(y.TableCell,"border",we(Ba(y.divider,1),.68)),q(y.Tooltip,"bg",Ba(y.grey[700],.92))}Ut(y.background,"default"),Ut(y.background,"paper"),Ut(y.common,"background"),Ut(y.common,"onBackground"),Ut(y,"divider"),Object.keys(y).forEach(G=>{const P=y[G];G!=="tonalOffset"&&P&&typeof P=="object"&&(P.main&&q(y[G],"mainChannel",Kn(Qn(P.main))),P.light&&q(y[G],"lightChannel",Kn(Qn(P.light))),P.dark&&q(y[G],"darkChannel",Kn(Qn(P.dark))),P.contrastText&&q(y[G],"contrastTextChannel",Kn(Qn(P.contrastText))),G==="text"&&(Ut(y[G],"primary"),Ut(y[G],"secondary")),G==="action"&&(P.active&&Ut(y[G],"active"),P.selected&&Ut(y[G],"selected")))})}),w=t.reduce((B,y)=>et(B,y),w);const T={prefix:o,disableCssColorScheme:a,shouldSkipGeneratingVar:s,getSelector:Y0(w)},{vars:C,generateThemeVars:A,generateStyleSheets:V}=p0(w,T);return w.vars=C,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([B,y])=>{w[B]=y}),w.generateThemeVars=A,w.generateStyleSheets=V,w.generateSpacing=function(){return Fh(c.spacing,ts(this))},w.getColorSchemeSelector=m0(i),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=s,w.unstable_sxConfig={...Sa,...c==null?void 0:c.unstable_sxConfig},w.unstable_sx=function(y){return un({sx:y,theme:this})},w.toRuntimeSource=Xh,w}function Qc(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Rl({...r===!0?{}:r.palette,mode:t})})}function tp(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:a=r?void 0:{light:!0},defaultColorScheme:o=r==null?void 0:r.mode,...s}=e,i=o||"light",l=a==null?void 0:a[i],c={...a,...r?{[i]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Fi(e,...t);let u=r;"palette"in e||c[i]&&(c[i]!==!0?u=c[i].palette:i==="dark"&&(u={mode:"dark"}));const d=Fi({...e,palette:u},...t);return d.defaultColorScheme=i,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},Qc(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},Qc(d,"light",c.light)),d}return!r&&!("light"in c)&&i==="light"&&(c.light=!0),Z0({...s,colorSchemes:c,defaultColorScheme:i,...typeof n!="boolean"&&n},...t)}const rp=tp();function eb({props:e,name:t}){return Jh({props:e,name:t,defaultTheme:rp,themeId:jh})}function Al(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const tb=e=>Al(e)&&e!=="classes",ht=Hh({themeId:jh,defaultTheme:rp,rootShouldForwardProp:tb});function np(...e){const t=I.useRef(void 0),r=I.useCallback(n=>{const a=e.map(o=>{if(o==null)return null;if(typeof o=="function"){const s=o,i=s(n);return typeof i=="function"?i:()=>{s(null)}}return o.current=n,()=>{o.current=null}});return()=>{a.forEach(o=>o==null?void 0:o())}},e);return I.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}let Xc=0;function rb(e){const[t,r]=I.useState(e),n=t;return I.useEffect(()=>{t==null&&(Xc+=1,r(`mui-${Xc}`))},[t]),n}const nb={...I},Zc=nb.useId;function ab(e){return Zc!==void 0?Zc():rb(e)}class ob{constructor(t){this.value=void 0,this.listeners=void 0,this.subscribe=r=>(this.listeners.add(r),()=>{this.listeners.delete(r)}),this.getSnapshot=()=>this.value,this.update=r=>{const n=r(this.value);n!==this.value&&(this.value=n,this.listeners.forEach(a=>a(n)))},this.value=t,this.listeners=new Set}}const Nt=typeof window<"u"?I.useLayoutEffect:I.useEffect,cs=({params:e,store:t})=>{I.useEffect(()=>{t.update(n=>Y({},n,{animation:Y({},n.animation,{skip:e.skipAnimation})}))},[t,e.skipAnimation]);const r=I.useCallback(()=>{let n=!1;return t.update(a=>Y({},a,{animation:Y({},a.animation,{skipAnimationRequests:a.animation.skipAnimationRequests+1})})),()=>{n||(n=!0,t.update(a=>Y({},a,{animation:Y({},a.animation,{skipAnimationRequests:a.animation.skipAnimationRequests-1})})))}},[t]);return Nt(()=>{if(typeof window>"u"||!(window!=null&&window.matchMedia))return;let a;const o=i=>{i.matches?a=r():a==null||a()},s=window.matchMedia("(prefers-reduced-motion)");return o(s),s.addEventListener("change",o),()=>{s.removeEventListener("change",o)}},[r,t]),{instance:{disableAnimation:r}}};cs.params={skipAnimation:!0};cs.getDefaultizedParams=({params:e})=>Y({},e,{skipAnimation:e.skipAnimation??!1});cs.getInitialState=({skipAnimation:e})=>{const t=typeof window>"u"||!(window!=null&&window.matchMedia),r=process.env.NODE_ENV==="test"?t:!1;return{animation:{skip:e,skipAnimationRequests:r?1:0}}};var sb=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const a={};e(a)===a&&(n=!0)}catch{}if(n){let a;try{throw new Error}catch(o){({stack:a}=o)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
74
|
+
export default theme;`}function Ni(e={},...t){const{breakpoints:r,mixins:n={},spacing:a,palette:o={},transitions:s={},typography:i={},shape:l,...c}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":lr(20));const u=_l(o),d=cs(e);let h=et(d,{mixins:R0(d.breakpoints,n),palette:u,shadows:M0.slice(),typography:_0(u,i),transitions:U0(s),zIndex:{...D0}});if(h=et(h,c),h=t.reduce((p,f)=>et(p,f),h),process.env.NODE_ENV!=="production"){const p=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(m,b)=>{let S;for(S in m){const E=m[S];if(p.includes(S)&&Object.keys(E).length>0){if(process.env.NODE_ENV!=="production"){const O=Sn("",S);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${S}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${O}' syntax:`,JSON.stringify({root:{[`&.${O}`]:E}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
75
|
+
`))}m[S]={}}}};Object.keys(h.components).forEach(m=>{const b=h.components[m].styleOverrides;b&&m.startsWith("Mui")&&f(b,m)})}return h.unstable_sxConfig={...Pa,...c==null?void 0:c.unstable_sxConfig},h.unstable_sx=function(f){return hn({sx:f,theme:this})},h.toRuntimeSource=Qh,h}function B0(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const F0=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=B0(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Xh(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Zh(e){return e==="dark"?F0:[]}function N0(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...a}=e,o=_l(t);return{palette:o,opacity:{...Xh(o.mode),...r},overlays:n||Zh(o.mode),...a}}function z0(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const G0=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],H0=e=>(t,r)=>{const n=e.rootSelector||":root",a=e.colorSchemeSelector;let o=a;if(a==="class"&&(o=".%s"),a==="data"&&(o="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(o=`[${a}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return G0(e.cssVarPrefix).forEach(i=>{s[i]=r[i],delete r[i]}),o==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:s}}:o?{[o.replace("%s",t)]:s,[`${n}, ${o.replace("%s",t)}`]:r}:{[n]:{...r,...s}}}if(o&&o!=="media")return`${n}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(o)return o.replace("%s",String(t))}return n};function q0(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function J(e,t,r){!e[t]&&r&&(e[t]=r)}function ea(e){return typeof e!="string"||!e.startsWith("hsl")?e:Wh(e)}function Lt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Zn(ea(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
76
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function J0(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const At=e=>{try{return e()}catch{}},W0=(e="mui")=>s0(e);function ti(e,t,r,n){if(!t)return;t=t===!0?{}:t;const a=n==="dark"?"dark":"light";if(!r){e[n]=N0({...t,palette:{mode:a,...t==null?void 0:t.palette}});return}const{palette:o,...s}=Ni({...r,palette:{mode:a,...t==null?void 0:t.palette}});return e[n]={...t,palette:o,opacity:{...Xh(a),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Zh(a)},s}function Y0(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:a=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:s=z0,colorSchemeSelector:i=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...c}=e,u=Object.keys(r)[0],d=n||(r.light&&u!=="light"?"light":u),h=W0(o),{[d]:p,light:f,dark:m,...b}=r,S={...b};let E=p;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(E=!0),!E)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:lr(21,d));const O=ti(S,E,c,d);f&&!S.light&&ti(S,f,void 0,"light"),m&&!S.dark&&ti(S,m,void 0,"dark");let P={defaultColorScheme:d,...O,cssVarPrefix:o,colorSchemeSelector:i,rootSelector:l,getCssVar:h,colorSchemes:S,font:{...T0(O.typography),...O.font},spacing:J0(c.spacing)};Object.keys(P.colorSchemes).forEach(z=>{const v=P.colorSchemes[z].palette,R=G=>{const A=G.split("-"),N=A[1],re=A[2];return h(G,v[N][re])};if(v.mode==="light"&&(J(v.common,"background","#fff"),J(v.common,"onBackground","#000")),v.mode==="dark"&&(J(v.common,"background","#000"),J(v.common,"onBackground","#fff")),q0(v,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),v.mode==="light"){J(v.Alert,"errorColor",Ce(v.error.light,.6)),J(v.Alert,"infoColor",Ce(v.info.light,.6)),J(v.Alert,"successColor",Ce(v.success.light,.6)),J(v.Alert,"warningColor",Ce(v.warning.light,.6)),J(v.Alert,"errorFilledBg",R("palette-error-main")),J(v.Alert,"infoFilledBg",R("palette-info-main")),J(v.Alert,"successFilledBg",R("palette-success-main")),J(v.Alert,"warningFilledBg",R("palette-warning-main")),J(v.Alert,"errorFilledColor",At(()=>v.getContrastText(v.error.main))),J(v.Alert,"infoFilledColor",At(()=>v.getContrastText(v.info.main))),J(v.Alert,"successFilledColor",At(()=>v.getContrastText(v.success.main))),J(v.Alert,"warningFilledColor",At(()=>v.getContrastText(v.warning.main))),J(v.Alert,"errorStandardBg",Pe(v.error.light,.9)),J(v.Alert,"infoStandardBg",Pe(v.info.light,.9)),J(v.Alert,"successStandardBg",Pe(v.success.light,.9)),J(v.Alert,"warningStandardBg",Pe(v.warning.light,.9)),J(v.Alert,"errorIconColor",R("palette-error-main")),J(v.Alert,"infoIconColor",R("palette-info-main")),J(v.Alert,"successIconColor",R("palette-success-main")),J(v.Alert,"warningIconColor",R("palette-warning-main")),J(v.AppBar,"defaultBg",R("palette-grey-100")),J(v.Avatar,"defaultBg",R("palette-grey-400")),J(v.Button,"inheritContainedBg",R("palette-grey-300")),J(v.Button,"inheritContainedHoverBg",R("palette-grey-A100")),J(v.Chip,"defaultBorder",R("palette-grey-400")),J(v.Chip,"defaultAvatarColor",R("palette-grey-700")),J(v.Chip,"defaultIconColor",R("palette-grey-700")),J(v.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),J(v.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),J(v.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),J(v.LinearProgress,"primaryBg",Pe(v.primary.main,.62)),J(v.LinearProgress,"secondaryBg",Pe(v.secondary.main,.62)),J(v.LinearProgress,"errorBg",Pe(v.error.main,.62)),J(v.LinearProgress,"infoBg",Pe(v.info.main,.62)),J(v.LinearProgress,"successBg",Pe(v.success.main,.62)),J(v.LinearProgress,"warningBg",Pe(v.warning.main,.62)),J(v.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),J(v.Slider,"primaryTrack",Pe(v.primary.main,.62)),J(v.Slider,"secondaryTrack",Pe(v.secondary.main,.62)),J(v.Slider,"errorTrack",Pe(v.error.main,.62)),J(v.Slider,"infoTrack",Pe(v.info.main,.62)),J(v.Slider,"successTrack",Pe(v.success.main,.62)),J(v.Slider,"warningTrack",Pe(v.warning.main,.62));const G=Ga(v.background.default,.8);J(v.SnackbarContent,"bg",G),J(v.SnackbarContent,"color",At(()=>v.getContrastText(G))),J(v.SpeedDialAction,"fabHoverBg",Ga(v.background.paper,.15)),J(v.StepConnector,"border",R("palette-grey-400")),J(v.StepContent,"border",R("palette-grey-400")),J(v.Switch,"defaultColor",R("palette-common-white")),J(v.Switch,"defaultDisabledColor",R("palette-grey-100")),J(v.Switch,"primaryDisabledColor",Pe(v.primary.main,.62)),J(v.Switch,"secondaryDisabledColor",Pe(v.secondary.main,.62)),J(v.Switch,"errorDisabledColor",Pe(v.error.main,.62)),J(v.Switch,"infoDisabledColor",Pe(v.info.main,.62)),J(v.Switch,"successDisabledColor",Pe(v.success.main,.62)),J(v.Switch,"warningDisabledColor",Pe(v.warning.main,.62)),J(v.TableCell,"border",Pe(za(v.divider,1),.88)),J(v.Tooltip,"bg",za(v.grey[700],.92))}if(v.mode==="dark"){J(v.Alert,"errorColor",Pe(v.error.light,.6)),J(v.Alert,"infoColor",Pe(v.info.light,.6)),J(v.Alert,"successColor",Pe(v.success.light,.6)),J(v.Alert,"warningColor",Pe(v.warning.light,.6)),J(v.Alert,"errorFilledBg",R("palette-error-dark")),J(v.Alert,"infoFilledBg",R("palette-info-dark")),J(v.Alert,"successFilledBg",R("palette-success-dark")),J(v.Alert,"warningFilledBg",R("palette-warning-dark")),J(v.Alert,"errorFilledColor",At(()=>v.getContrastText(v.error.dark))),J(v.Alert,"infoFilledColor",At(()=>v.getContrastText(v.info.dark))),J(v.Alert,"successFilledColor",At(()=>v.getContrastText(v.success.dark))),J(v.Alert,"warningFilledColor",At(()=>v.getContrastText(v.warning.dark))),J(v.Alert,"errorStandardBg",Ce(v.error.light,.9)),J(v.Alert,"infoStandardBg",Ce(v.info.light,.9)),J(v.Alert,"successStandardBg",Ce(v.success.light,.9)),J(v.Alert,"warningStandardBg",Ce(v.warning.light,.9)),J(v.Alert,"errorIconColor",R("palette-error-main")),J(v.Alert,"infoIconColor",R("palette-info-main")),J(v.Alert,"successIconColor",R("palette-success-main")),J(v.Alert,"warningIconColor",R("palette-warning-main")),J(v.AppBar,"defaultBg",R("palette-grey-900")),J(v.AppBar,"darkBg",R("palette-background-paper")),J(v.AppBar,"darkColor",R("palette-text-primary")),J(v.Avatar,"defaultBg",R("palette-grey-600")),J(v.Button,"inheritContainedBg",R("palette-grey-800")),J(v.Button,"inheritContainedHoverBg",R("palette-grey-700")),J(v.Chip,"defaultBorder",R("palette-grey-700")),J(v.Chip,"defaultAvatarColor",R("palette-grey-300")),J(v.Chip,"defaultIconColor",R("palette-grey-300")),J(v.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),J(v.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),J(v.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),J(v.LinearProgress,"primaryBg",Ce(v.primary.main,.5)),J(v.LinearProgress,"secondaryBg",Ce(v.secondary.main,.5)),J(v.LinearProgress,"errorBg",Ce(v.error.main,.5)),J(v.LinearProgress,"infoBg",Ce(v.info.main,.5)),J(v.LinearProgress,"successBg",Ce(v.success.main,.5)),J(v.LinearProgress,"warningBg",Ce(v.warning.main,.5)),J(v.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),J(v.Slider,"primaryTrack",Ce(v.primary.main,.5)),J(v.Slider,"secondaryTrack",Ce(v.secondary.main,.5)),J(v.Slider,"errorTrack",Ce(v.error.main,.5)),J(v.Slider,"infoTrack",Ce(v.info.main,.5)),J(v.Slider,"successTrack",Ce(v.success.main,.5)),J(v.Slider,"warningTrack",Ce(v.warning.main,.5));const G=Ga(v.background.default,.98);J(v.SnackbarContent,"bg",G),J(v.SnackbarContent,"color",At(()=>v.getContrastText(G))),J(v.SpeedDialAction,"fabHoverBg",Ga(v.background.paper,.15)),J(v.StepConnector,"border",R("palette-grey-600")),J(v.StepContent,"border",R("palette-grey-600")),J(v.Switch,"defaultColor",R("palette-grey-300")),J(v.Switch,"defaultDisabledColor",R("palette-grey-600")),J(v.Switch,"primaryDisabledColor",Ce(v.primary.main,.55)),J(v.Switch,"secondaryDisabledColor",Ce(v.secondary.main,.55)),J(v.Switch,"errorDisabledColor",Ce(v.error.main,.55)),J(v.Switch,"infoDisabledColor",Ce(v.info.main,.55)),J(v.Switch,"successDisabledColor",Ce(v.success.main,.55)),J(v.Switch,"warningDisabledColor",Ce(v.warning.main,.55)),J(v.TableCell,"border",Ce(za(v.divider,1),.68)),J(v.Tooltip,"bg",za(v.grey[700],.92))}Lt(v.background,"default"),Lt(v.background,"paper"),Lt(v.common,"background"),Lt(v.common,"onBackground"),Lt(v,"divider"),Object.keys(v).forEach(G=>{const A=v[G];G!=="tonalOffset"&&A&&typeof A=="object"&&(A.main&&J(v[G],"mainChannel",Zn(ea(A.main))),A.light&&J(v[G],"lightChannel",Zn(ea(A.light))),A.dark&&J(v[G],"darkChannel",Zn(ea(A.dark))),A.contrastText&&J(v[G],"contrastTextChannel",Zn(ea(A.contrastText))),G==="text"&&(Lt(v[G],"primary"),Lt(v[G],"secondary")),G==="action"&&(A.active&&Lt(v[G],"active"),A.selected&&Lt(v[G],"selected")))})}),P=t.reduce((z,v)=>et(z,v),P);const C={prefix:o,disableCssColorScheme:a,shouldSkipGeneratingVar:s,getSelector:H0(P)},{vars:w,generateThemeVars:T,generateStyleSheets:V}=c0(P,C);return P.vars=w,Object.entries(P.colorSchemes[P.defaultColorScheme]).forEach(([z,v])=>{P[z]=v}),P.generateThemeVars=T,P.generateStyleSheets=V,P.generateSpacing=function(){return Fh(c.spacing,ns(this))},P.getColorSchemeSelector=u0(i),P.spacing=P.generateSpacing(),P.shouldSkipGeneratingVar=s,P.unstable_sxConfig={...Pa,...c==null?void 0:c.unstable_sxConfig},P.unstable_sx=function(v){return hn({sx:v,theme:this})},P.toRuntimeSource=Qh,P}function Zc(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:_l({...r===!0?{}:r.palette,mode:t})})}function ep(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:a=r?void 0:{light:!0},defaultColorScheme:o=r==null?void 0:r.mode,...s}=e,i=o||"light",l=a==null?void 0:a[i],c={...a,...r?{[i]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Ni(e,...t);let u=r;"palette"in e||c[i]&&(c[i]!==!0?u=c[i].palette:i==="dark"&&(u={mode:"dark"}));const d=Ni({...e,palette:u},...t);return d.defaultColorScheme=i,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},Zc(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},Zc(d,"light",c.light)),d}return!r&&!("light"in c)&&i==="light"&&(c.light=!0),Y0({...s,colorSchemes:c,defaultColorScheme:i,...typeof n!="boolean"&&n},...t)}const tp=ep();function K0({props:e,name:t}){return Jh({props:e,name:t,defaultTheme:tp,themeId:$h})}function El(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Q0=e=>El(e)&&e!=="classes",ht=Hh({themeId:$h,defaultTheme:tp,rootShouldForwardProp:Q0});function ds(...e){const t=B.useRef(void 0),r=B.useCallback(n=>{const a=e.map(o=>{if(o==null)return null;if(typeof o=="function"){const s=o,i=s(n);return typeof i=="function"?i:()=>{s(null)}}return o.current=n,()=>{o.current=null}});return()=>{a.forEach(o=>o==null?void 0:o())}},e);return B.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}let eu=0;function X0(e){const[t,r]=B.useState(e),n=t;return B.useEffect(()=>{t==null&&(eu+=1,r(`mui-${eu}`))},[t]),n}const Z0={...B},tu=Z0.useId;function eb(e){return tu!==void 0?tu():X0(e)}class tb{constructor(t){this.value=void 0,this.listeners=void 0,this.subscribe=r=>(this.listeners.add(r),()=>{this.listeners.delete(r)}),this.getSnapshot=()=>this.value,this.update=r=>{const n=r(this.value);n!==this.value&&(this.value=n,this.listeners.forEach(a=>a(n)))},this.value=t,this.listeners=new Set}}const hs=({params:e,store:t})=>{B.useEffect(()=>{t.update(n=>Y({},n,{animation:Y({},n.animation,{skip:e.skipAnimation})}))},[t,e.skipAnimation]);const r=B.useCallback(()=>{let n=!1;return t.update(a=>Y({},a,{animation:Y({},a.animation,{skipAnimationRequests:a.animation.skipAnimationRequests+1})})),()=>{n||(n=!0,t.update(a=>Y({},a,{animation:Y({},a.animation,{skipAnimationRequests:a.animation.skipAnimationRequests-1})})))}},[t]);return $t(()=>{if(typeof window>"u"||!(window!=null&&window.matchMedia))return;let a;const o=i=>{i.matches?a=r():a==null||a()},s=window.matchMedia("(prefers-reduced-motion)");return o(s),s.addEventListener("change",o),()=>{s.removeEventListener("change",o)}},[r,t]),{instance:{disableAnimation:r}}};hs.params={skipAnimation:!0};hs.getDefaultizedParams=({params:e})=>Y({},e,{skipAnimation:e.skipAnimation??!1});hs.getInitialState=({skipAnimation:e})=>{const t=typeof window>"u"||!(window!=null&&window.matchMedia),r=process.env.NODE_ENV==="test"?t:!1;return{animation:{skip:e,skipAnimationRequests:r?1:0}}};var rb=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const a={};e(a)===a&&(n=!0)}catch{}if(n){let a;try{throw new Error}catch(o){({stack:a}=o)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
77
77
|
\`createSelector([state => state.todos], todos => todos)\`
|
|
78
78
|
This could lead to inefficient memoization and unnecessary re-renders.
|
|
79
|
-
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:a})}}},
|
|
79
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:a})}}},nb=(e,t,r)=>{const{memoize:n,memoizeOptions:a}=t,{inputSelectorResults:o,inputSelectorResultsCopy:s}=e,i=n(()=>({}),...a);if(!(i.apply(null,o)===i.apply(null,s))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
80
80
|
This means your output selector will likely run more frequently than intended.
|
|
81
81
|
Avoid returning a new reference inside your input selector, e.g.
|
|
82
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:o,secondInputs:s,stack:c})}},
|
|
82
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:o,secondInputs:s,stack:c})}},ab={inputStabilityCheck:"once",identityFunctionCheck:"once"},Eo=Symbol("NOT_FOUND");function ob(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function sb(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function ib(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var ru=e=>Array.isArray(e)?e:[e];function lb(e){const t=Array.isArray(e[0])?e[0]:e;return ib(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function nu(e,t){const r=[],{length:n}=e;for(let a=0;a<n;a++)r.push(e[a].apply(null,t));return r}var cb=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...ab,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:rb},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:nb}}};function ub(e){let t;return{get(r){return t&&e(t.key,r)?t.value:Eo},put(r,n){t={key:r,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function db(e,t){let r=[];function n(i){const l=r.findIndex(c=>t(i,c.key));if(l>-1){const c=r[l];return l>0&&(r.splice(l,1),r.unshift(c)),c.value}return Eo}function a(i,l){n(i)===Eo&&(r.unshift({key:i,value:l}),r.length>e&&r.pop())}function o(){return r}function s(){r=[]}return{get:n,put:a,getEntries:o,clear:s}}var hb=(e,t)=>e===t;function pb(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;const{length:a}=r;for(let o=0;o<a;o++)if(!e(r[o],n[o]))return!1;return!0}}function mb(e,t){const r=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:n=hb,maxSize:a=1,resultEqualityCheck:o}=r,s=pb(n);let i=0;const l=a<=1?ub(s):db(a,s);function c(){let u=l.get(arguments);if(u===Eo){if(u=e.apply(null,arguments),i++,o){const h=l.getEntries().find(p=>o(p.value,u));h&&(u=h.value,i!==0&&i--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>i,c.resetResultsCount=()=>{i=0},c}var fb=class{constructor(e){this.value=e}deref(){return this.value}},gb=typeof WeakRef<"u"?WeakRef:fb,yb=0,au=1;function Ha(){return{s:yb,v:void 0,o:null,p:null}}function rp(e,t={}){let r=Ha();const{resultEqualityCheck:n}=t;let a,o=0;function s(){var d;let i=r;const{length:l}=arguments;for(let h=0,p=l;h<p;h++){const f=arguments[h];if(typeof f=="function"||typeof f=="object"&&f!==null){let m=i.o;m===null&&(i.o=m=new WeakMap);const b=m.get(f);b===void 0?(i=Ha(),m.set(f,i)):i=b}else{let m=i.p;m===null&&(i.p=m=new Map);const b=m.get(f);b===void 0?(i=Ha(),m.set(f,i)):i=b}}const c=i;let u;if(i.s===au)u=i.v;else if(u=e.apply(null,arguments),o++,n){const h=((d=a==null?void 0:a.deref)==null?void 0:d.call(a))??a;h!=null&&n(h,u)&&(u=h,o!==0&&o--),a=typeof u=="object"&&u!==null||typeof u=="function"?new gb(u):u}return c.s=au,c.v=u,u}return s.clearCache=()=>{r=Ha(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function np(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...a)=>{let o=0,s=0,i,l={},c=a.pop();typeof c=="object"&&(l=c,c=a.pop()),ob(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:d,memoizeOptions:h=[],argsMemoize:p=rp,argsMemoizeOptions:f=[],devModeChecks:m={}}=u,b=ru(h),S=ru(f),E=lb(a),O=d(function(){return o++,c.apply(null,arguments)},...b);let P=!0;const C=p(function(){s++;const T=nu(E,arguments);if(i=O.apply(null,T),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:V,inputStabilityCheck:z}=cb(P,m);if(V.shouldRun&&V.run(c,T,i),z.shouldRun){const v=nu(E,arguments);z.run({inputSelectorResults:T,inputSelectorResultsCopy:v},{memoize:d,memoizeOptions:b},arguments)}P&&(P=!1)}return i},...S);return Object.assign(C,{resultFunc:c,memoizedResultFunc:O,dependencies:E,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>i,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:p})};return Object.assign(n,{withTypes:()=>n}),n}var bb=np(rp),vb=Object.assign((e,t=bb)=>{sb(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(o=>e[o]);return t(n,(...o)=>o.reduce((s,i,l)=>(s[r[l]]=i,s),{}))},{withTypes:()=>vb});const xb=np({memoize:mb,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),ou=new WeakMap,pe=(...e)=>(r,...n)=>{const a=r.cacheKey;let o=ou.get(a);o||(o=new Map,ou.set(a,o));const s=o.get(e);if(s)return s(r,...n);const i=xb(...e);return o.set(e,i),i(r,...n)},Sb=e=>e.animation,Ob=pe([Sb],e=>e.skip||e.skipAnimationRequests>0);function aa(e){return e&&e.ownerDocument||document}function wb(e){return aa(e).defaultView||window}var qa={exports:{}},ri={},Ja={exports:{}},ni={};/**
|
|
83
83
|
* @license React
|
|
84
84
|
* use-sync-external-store-shim.production.js
|
|
85
85
|
*
|
|
@@ -87,7 +87,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
87
87
|
*
|
|
88
88
|
* This source code is licensed under the MIT license found in the
|
|
89
89
|
* LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/var
|
|
90
|
+
*/var su;function Cb(){if(su)return ni;su=1;var e=K;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function i(d,h){var p=h(),f=n({inst:{value:p,getSnapshot:h}}),m=f[0].inst,b=f[1];return o(function(){m.value=p,m.getSnapshot=h,l(m)&&b({inst:m})},[d,p,h]),a(function(){return l(m)&&b({inst:m}),d(function(){l(m)&&b({inst:m})})},[d]),s(p),p}function l(d){var h=d.getSnapshot;d=d.value;try{var p=h();return!r(d,p)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:i;return ni.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,ni}var ai={};/**
|
|
91
91
|
* @license React
|
|
92
92
|
* use-sync-external-store-shim.development.js
|
|
93
93
|
*
|
|
@@ -95,7 +95,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
95
95
|
*
|
|
96
96
|
* This source code is licensed under the MIT license found in the
|
|
97
97
|
* LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/var
|
|
98
|
+
*/var iu;function Pb(){return iu||(iu=1,process.env.NODE_ENV!=="production"&&function(){function e(p,f){return p===f&&(p!==0||1/p===1/f)||p!==p&&f!==f}function t(p,f){u||a.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=f();if(!d){var b=f();o(m,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}b=s({inst:{value:m,getSnapshot:f}});var S=b[0].inst,E=b[1];return l(function(){S.value=m,S.getSnapshot=f,r(S)&&E({inst:S})},[p,m,f]),i(function(){return r(S)&&E({inst:S}),p(function(){r(S)&&E({inst:S})})},[p]),c(m),m}function r(p){var f=p.getSnapshot;p=p.value;try{var m=f();return!o(p,m)}catch{return!0}}function n(p,f){return f()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=K,o=typeof Object.is=="function"?Object.is:e,s=a.useState,i=a.useEffect,l=a.useLayoutEffect,c=a.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;ai.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),ai}var lu;function ap(){return lu||(lu=1,process.env.NODE_ENV==="production"?Ja.exports=Cb():Ja.exports=Pb()),Ja.exports}/**
|
|
99
99
|
* @license React
|
|
100
100
|
* use-sync-external-store-shim/with-selector.production.js
|
|
101
101
|
*
|
|
@@ -103,7 +103,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the MIT license found in the
|
|
105
105
|
* LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/var
|
|
106
|
+
*/var cu;function Tb(){if(cu)return ri;cu=1;var e=K,t=ap();function r(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,i=e.useMemo,l=e.useDebugValue;return ri.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var f=o(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function S(w){if(!E){if(E=!0,O=w,w=h(w),p!==void 0&&m.hasValue){var T=m.value;if(p(T,w))return P=T}return P=w}if(T=P,n(O,w))return T;var V=h(w);return p!==void 0&&p(T,V)?(O=w,T):(O=w,P=V)}var E=!1,O,P,C=d===void 0?null:d;return[function(){return S(u())},C===null?void 0:function(){return S(C())}]},[u,d,h,p]);var b=a(c,f[0],f[1]);return s(function(){m.hasValue=!0,m.value=b},[b]),l(b),b},ri}var oi={};/**
|
|
107
107
|
* @license React
|
|
108
108
|
* use-sync-external-store-shim/with-selector.development.js
|
|
109
109
|
*
|
|
@@ -111,20 +111,20 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
111
111
|
*
|
|
112
112
|
* This source code is licensed under the MIT license found in the
|
|
113
113
|
* LICENSE file in the root directory of this source tree.
|
|
114
|
-
*/var lu;function Ib(){return lu||(lu=1,process.env.NODE_ENV!=="production"&&function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=Q,r=sp(),n=typeof Object.is=="function"?Object.is:e,a=r.useSyncExternalStore,o=t.useRef,s=t.useEffect,i=t.useMemo,l=t.useDebugValue;ri.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var f=o(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function S(C){if(!E){if(E=!0,O=C,C=h(C),p!==void 0&&m.hasValue){var A=m.value;if(p(A,C))return w=A}return w=C}if(A=w,n(O,C))return A;var V=h(C);return p!==void 0&&p(A,V)?(O=C,A):(O=C,w=V)}var E=!1,O,w,T=d===void 0?null:d;return[function(){return S(u())},T===null?void 0:function(){return S(T())}]},[u,d,h,p]);var v=a(c,f[0],f[1]);return s(function(){m.hasValue=!0,m.value=v},[v]),l(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),ri}var cu;function Mb(){return cu||(cu=1,process.env.NODE_ENV==="production"?Ga.exports=Vb():Ga.exports=Ib()),Ga.exports}var jb=Mb();const $b=Object.is,ot=(e,t,r=[],n=$b)=>{const a=o=>t(o,...r);return jb.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a,n)},kb="DEFAULT_X_AXIS_KEY",Ub="DEFAULT_Y_AXIS_KEY",Lb={top:20,bottom:20,left:20,right:20},Db=45,Fb=25,ip=20,vn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},xn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},Bb=pe([xn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="left"?t+(r.width||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Nb=pe([xn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="right"?t+(r.width||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),zb=pe([vn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="top"?t+(r.height||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Gb=pe([vn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="bottom"?t+(r.height||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Hb=e=>e.dimensions,lp=e=>e.dimensions.width,cp=e=>e.dimensions.height,qb=e=>e.dimensions.margin.top,Jb=e=>e.dimensions.margin.right,Wb=e=>e.dimensions.margin.bottom,Yb=e=>e.dimensions.margin.left,wa=pe([lp,cp,qb,Jb,Wb,Yb,zb,Nb,Gb,Bb],(e,t,r,n,a,o,s,i,l,c)=>({width:e-o-n-c-i,left:o+c,right:n+i,height:t-r-a-s-l,top:r+s,bottom:a+l})),Kb=pe([Hb],e=>({width:e.propsWidth,height:e.propsHeight})),Qb=pe([lp,cp],(e,t)=>({width:e,height:t}));function up(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?Y({},t,e):e}const Xb=10,us=({params:e,store:t,svgRef:r})=>{const n=e.width!==void 0&&e.height!==void 0,a=I.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[o,s]=I.useState(0),[i,l]=I.useState(0),c=I.useCallback(()=>{const f=r==null?void 0:r.current;if(!f)return{};const v=Ab(f).getComputedStyle(f),S=Math.floor(parseFloat(v.height))||0,E=Math.floor(parseFloat(v.width))||0;return t.update(O=>O.dimensions.width===E&&O.dimensions.height===S?O:Y({},O,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:e.width??E,height:e.height??S,propsWidth:e.width,propsHeight:e.height}})),{height:S,width:E}},[t,r,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]);I.useEffect(()=>{t.update(f=>{const m=e.width??f.dimensions.width,v=e.height??f.dimensions.height;return Y({},f,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:m,height:v,propsHeight:e.height,propsWidth:e.width}})})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),I.useEffect(()=>{a.current.displayError=!0},[]),Nt(()=>{if(n||!a.current.initialCompute||a.current.computeRun>Xb)return;const f=c();f.width!==o||f.height!==i?(a.current.computeRun+=1,f.width!==void 0&&s(f.width),f.height!==void 0&&l(f.height)):a.current.initialCompute&&(a.current.initialCompute=!1)},[i,o,c,n]),Nt(()=>{if(n)return()=>{};c();const f=r.current;if(typeof ResizeObserver>"u")return()=>{};let m;const v=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{c()})});return f&&v.observe(f),()=>{m&&cancelAnimationFrame(m),f&&v.unobserve(f)}},[c,n,r]),process.env.NODE_ENV!=="production"&&(a.current.displayError&&e.width===void 0&&o===0&&(console.error("MUI X Charts: ChartContainer does not have `width` prop, and its container has no `width` defined."),a.current.displayError=!1),a.current.displayError&&e.height===void 0&&i===0&&(console.error("MUI X Charts: ChartContainer does not have `height` prop, and its container has no `height` defined."),a.current.displayError=!1));const u=ot(t,wa),d=I.useCallback(f=>f>=u.left-1&&f<=u.left+u.width,[u.left,u.width]),h=I.useCallback(f=>f>=u.top-1&&f<=u.top+u.height,[u.height,u.top]);return{instance:{isPointInside:I.useCallback((f,m,v)=>v&&"closest"in v&&v.closest("[data-drawing-container]")?!0:d(f)&&h(m),[d,h]),isXInside:d,isYInside:h}}};us.params={width:!0,height:!0,margin:!0};us.getDefaultizedParams=({params:e})=>Y({},e,{margin:up(e.margin,Lb)});us.getInitialState=({width:e,height:t,margin:r})=>({dimensions:{margin:r,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const _l=({params:e,store:t})=>(Nt(()=>{t.update(r=>Y({},r,{experimentalFeatures:e.experimentalFeatures}))},[t,e.experimentalFeatures]),{});_l.params={experimentalFeatures:!0};_l.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const Zb=e=>e.experimentalFeatures,dp=pe([Zb],e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let uu=0;const ev=()=>(uu+=1,`mui-chart-${uu}`),El=({params:e,store:t})=>(I.useEffect(()=>{t.update(r=>e.id===void 0||e.id===r.id.providedChartId&&r.id.chartId!==void 0?r:Y({},r,{id:Y({},r.id,{chartId:e.id??ev()})}))},[t,e.id]),{});El.params={id:!0};El.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const tv=e=>e.id,rv=pe([tv],e=>e.chartId),nv=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],av=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],hp=e=>e==="dark"?av:nv,pp=({series:e,colors:t,seriesConfig:r,dataset:n})=>{const a={};e.forEach((s,i)=>{var u;const l=r[s.type].getSeriesWithDefaultValues(s,i,t),c=l.id;if(a[s.type]===void 0&&(a[s.type]={series:{},seriesOrder:[]}),((u=a[s.type])==null?void 0:u.series[c])!==void 0)throw new Error(`MUI X Charts: series' id "${c}" is not unique.`);a[s.type].series[c]=l,a[s.type].seriesOrder.push(c)});const o={};return Object.keys(r).forEach(s=>{var l,c;const i=a[s];i!==void 0&&(o[s]=((c=(l=r[s])==null?void 0:l.seriesProcessor)==null?void 0:c.call(l,i,n))??a[s])}),o},ds=({params:e,store:t,seriesConfig:r})=>{const{series:n,dataset:a,theme:o,colors:s}=e,i=I.useRef(!0);return I.useEffect(()=>{if(i.current){i.current=!1;return}t.update(l=>Y({},l,{series:Y({},l.series,{processedSeries:pp({series:n,colors:typeof s=="function"?s(o):s,seriesConfig:r,dataset:a})})}))},[s,a,n,o,r,t]),{}};ds.params={dataset:!0,series:!0,colors:!0,theme:!0};const ov=[];ds.getDefaultizedParams=({params:e})=>{var t;return Y({},e,{series:(t=e.series)!=null&&t.length?e.series:ov,colors:e.colors??hp,theme:e.theme??"light"})};ds.getInitialState=({series:e=[],colors:t,theme:r,dataset:n},a,o)=>({series:{seriesConfig:o,processedSeries:pp({series:e,colors:typeof t=="function"?t(r):t,seriesConfig:o,dataset:n})}});const mp=e=>e.series,Ca=pe([mp],e=>e.processedSeries),hs=pe([mp],e=>e.seriesConfig),sv={abort:!0,animationcancel:!0,animationend:!0,animationiteration:!0,animationstart:!0,auxclick:!0,beforeinput:!0,beforetoggle:!0,blur:!0,cancel:!0,canplay:!0,canplaythrough:!0,change:!0,click:!0,close:!0,compositionend:!0,compositionstart:!0,compositionupdate:!0,contextlost:!0,contextmenu:!0,contextrestored:!0,copy:!0,cuechange:!0,cut:!0,dblclick:!0,drag:!0,dragend:!0,dragenter:!0,dragleave:!0,dragover:!0,dragstart:!0,drop:!0,durationchange:!0,emptied:!0,ended:!0,error:!0,focus:!0,focusin:!0,focusout:!0,formdata:!0,gotpointercapture:!0,input:!0,invalid:!0,keydown:!0,keypress:!0,keyup:!0,load:!0,loadeddata:!0,loadedmetadata:!0,loadstart:!0,lostpointercapture:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,paste:!0,pause:!0,play:!0,playing:!0,pointercancel:!0,pointerdown:!0,pointerenter:!0,pointerleave:!0,pointermove:!0,pointerout:!0,pointerover:!0,pointerup:!0,progress:!0,ratechange:!0,reset:!0,resize:!0,scroll:!0,scrollend:!0,securitypolicyviolation:!0,seeked:!0,seeking:!0,select:!0,selectionchange:!0,selectstart:!0,slotchange:!0,stalled:!0,submit:!0,suspend:!0,timeupdate:!0,toggle:!0,touchcancel:!0,touchend:!0,touchmove:!0,touchstart:!0,transitioncancel:!0,transitionend:!0,transitionrun:!0,transitionstart:!0,volumechange:!0,waiting:!0,webkitanimationend:!0,webkitanimationiteration:!0,webkitanimationstart:!0,webkittransitionend:!0,wheel:!0};class fp{constructor(t){if(this.name=void 0,this.preventDefault=void 0,this.stopPropagation=void 0,this.preventIf=void 0,this.requiredKeys=void 0,this.keyboardManager=void 0,this.pointerMode=void 0,this.customData={},this.pointerManager=void 0,this.gesturesRegistry=void 0,this.element=void 0,this.state=void 0,this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,!t||!t.name)throw new Error("Gesture must be initialized with a valid name.");if(t.name in sv)throw new Error(`Gesture can't be created with a native event name. Tried to use "${t.name}". Please use a custom name instead.`);this.name=t.name,this.preventDefault=t.preventDefault??!1,this.stopPropagation=t.stopPropagation??!1,this.preventIf=t.preventIf??[],this.requiredKeys=t.requiredKeys??[],this.pointerMode=t.pointerMode??[]}init(t,r,n,a){this.element=t,this.pointerManager=r,this.gesturesRegistry=n,this.keyboardManager=a;const o=`${this.name}ChangeOptions`;this.element.addEventListener(o,this.handleOptionsChange.bind(this));const s=`${this.name}ChangeState`;this.element.addEventListener(s,this.handleStateChange.bind(this))}handleOptionsChange(t){t&&t.detail&&this.updateOptions(t.detail)}updateOptions(t){this.preventDefault=t.preventDefault??this.preventDefault,this.stopPropagation=t.stopPropagation??this.stopPropagation,this.preventIf=t.preventIf??this.preventIf,this.requiredKeys=t.requiredKeys??this.requiredKeys,this.pointerMode=t.pointerMode??this.pointerMode}handleStateChange(t){t&&t.detail&&this.updateState(t.detail)}updateState(t){Object.assign(this.state,t)}getTargetElement(t){return this.isActive||this.element===t.target||this.element.contains(t.target)?this.element:null}set isActive(t){t?this.gesturesRegistry.registerActiveGesture(this.element,this):this.gesturesRegistry.unregisterActiveGesture(this.element,this)}get isActive(){return this.gesturesRegistry.isGestureActive(this.element,this)??!1}shouldPreventGesture(t){if(!this.keyboardManager.areKeysPressed(this.requiredKeys))return!0;if(this.preventIf.length===0)return!1;const r=this.gesturesRegistry.getActiveGestures(t);return this.preventIf.some(n=>r[n])}isPointerTypeAllowed(t){return!this.pointerMode||this.pointerMode.length===0?!0:this.pointerMode.includes(t)}destroy(){const t=`${this.name}ChangeOptions`;this.element.removeEventListener(t,this.handleOptionsChange.bind(this));const r=`${this.name}ChangeState`;this.element.removeEventListener(r,this.handleStateChange.bind(this))}}class iv{constructor(){this.activeGestures=new Map}registerActiveGesture(t,r){this.activeGestures.has(t)||this.activeGestures.set(t,new Set);const n=this.activeGestures.get(t),a={gesture:r,element:t};n.add(a)}unregisterActiveGesture(t,r){const n=this.activeGestures.get(t);n&&(n.forEach(a=>{a.gesture===r&&n.delete(a)}),n.size===0&&this.activeGestures.delete(t))}getActiveGestures(t){const r=this.activeGestures.get(t);return r?Array.from(r).reduce((n,a)=>(n[a.gesture.name]=!0,n),{}):{}}isGestureActive(t,r){const n=this.activeGestures.get(t);return n?Array.from(n).some(a=>a.gesture===r):!1}destroy(){this.activeGestures.clear()}unregisterElement(t){this.activeGestures.delete(t)}}class lv{constructor(){this.pressedKeys=new Set,this.handleKeyDown=t=>{this.pressedKeys.add(t.key)},this.handleKeyUp=t=>{this.pressedKeys.delete(t.key)},this.clearKeys=()=>{this.pressedKeys.clear()},this.initialize()}initialize(){typeof window>"u"||(window.addEventListener("keydown",this.handleKeyDown),window.addEventListener("keyup",this.handleKeyUp),window.addEventListener("blur",this.clearKeys))}areKeysPressed(t){return!t||t.length===0?!0:t.every(r=>r==="ControlOrMeta"?this.pressedKeys.has("Control")||this.pressedKeys.has("Meta"):this.pressedKeys.has(r))}destroy(){typeof window<"u"&&(window.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("keyup",this.handleKeyUp),window.removeEventListener("blur",this.clearKeys)),this.clearKeys()}}class cv{constructor(t){this.root=void 0,this.touchAction=void 0,this.passive=void 0,this.preventEventInterruption=!0,this.pointers=new Map,this.gestureHandlers=new Set,this.handleInterruptEvents=r=>{if(this.preventEventInterruption&&"pointerType"in r&&r.pointerType==="touch"){r.preventDefault();return}const n=new PointerEvent("forceCancel",{bubbles:!1,cancelable:!1}),a=this.pointers.values().next().value;if(this.pointers.size>0&&a){Object.defineProperties(n,{clientX:{value:a.clientX},clientY:{value:a.clientY},pointerId:{value:a.pointerId},pointerType:{value:a.pointerType}});for(const[o,s]of this.pointers.entries()){const i=Y({},s,{type:"forceCancel"});this.pointers.set(o,i)}}this.notifyHandlers(n),this.pointers.clear()},this.handlePointerEvent=r=>{const{type:n,pointerId:a}=r;if(n==="pointerdown"){if(this.pointers.set(a,this.createPointerData(r)),r.target instanceof Element)try{r.target.setPointerCapture(a)}catch{}}else if(n==="pointermove")this.pointers.set(a,this.createPointerData(r));else if(n==="pointerup"||n==="pointercancel"||n==="forceCancel"){if(r.target instanceof Element)try{r.target.releasePointerCapture(a)}catch{}this.pointers.set(a,this.createPointerData(r)),this.notifyHandlers(r),this.pointers.delete(a);return}this.notifyHandlers(r)},this.root=t.root??document.documentElement,this.touchAction=t.touchAction||"auto",this.passive=t.passive!==!1,this.preventEventInterruption=t.preventEventInterruption!==!1,this.setupEventListeners()}registerGestureHandler(t){return this.gestureHandlers.add(t),()=>{this.gestureHandlers.delete(t)}}getPointers(){return new Map(this.pointers)}setupEventListeners(){this.touchAction!=="auto"&&(this.root.style.touchAction=this.touchAction),this.root.addEventListener("pointerdown",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointermove",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointerup",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointercancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("forceCancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("blur",this.handleInterruptEvents),this.root.addEventListener("contextmenu",this.handleInterruptEvents)}notifyHandlers(t){this.gestureHandlers.forEach(r=>r(this.pointers,t))}createPointerData(t){return{pointerId:t.pointerId,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,target:t.target,timeStamp:t.timeStamp,type:t.type,isPrimary:t.isPrimary,pressure:t.pressure,width:t.width,height:t.height,pointerType:t.pointerType,srcEvent:t}}destroy(){this.root.removeEventListener("pointerdown",this.handlePointerEvent),this.root.removeEventListener("pointermove",this.handlePointerEvent),this.root.removeEventListener("pointerup",this.handlePointerEvent),this.root.removeEventListener("pointercancel",this.handlePointerEvent),this.root.removeEventListener("forceCancel",this.handlePointerEvent),this.root.removeEventListener("blur",this.handleInterruptEvents),this.root.removeEventListener("contextmenu",this.handleInterruptEvents),this.pointers.clear(),this.gestureHandlers.clear()}}class uv{constructor(t){this.gestureTemplates=new Map,this.elementGestureMap=new Map,this.activeGesturesRegistry=new iv,this.pointerManager=void 0,this.keyboardManager=new lv,this.pointerManager=new cv({root:t.root,touchAction:t.touchAction,passive:t.passive}),t.gestures&&t.gestures.length>0&&t.gestures.forEach(r=>{this.addGestureTemplate(r)})}addGestureTemplate(t){this.gestureTemplates.has(t.name)&&console.warn(`Gesture template with name "${t.name}" already exists. It will be overwritten.`),this.gestureTemplates.set(t.name,t)}setGestureOptions(t,r,n){const a=this.elementGestureMap.get(r);if(!a||!a.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const o=new CustomEvent(`${t}ChangeOptions`,{detail:n,bubbles:!1,cancelable:!1});r.dispatchEvent(o)}setGestureState(t,r,n){const a=this.elementGestureMap.get(r);if(!a||!a.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const o=new CustomEvent(`${t}ChangeState`,{detail:n,bubbles:!1,cancelable:!1});r.dispatchEvent(o)}registerElement(t,r,n){if(Array.isArray(t))return t.forEach(o=>{const s=n==null?void 0:n[o];this.registerSingleGesture(o,r,s)}),r;const a=n==null?void 0:n[t];return this.registerSingleGesture(t,r,a),r}registerSingleGesture(t,r,n){const a=this.gestureTemplates.get(t);if(!a)return console.error(`Gesture template "${t}" not found.`),!1;this.elementGestureMap.has(r)||this.elementGestureMap.set(r,new Map);const o=this.elementGestureMap.get(r);o.has(t)&&(console.warn(`Element already has gesture "${t}" registered. It will be replaced.`),this.unregisterElement(t,r));const s=a.clone(n);return s.init(r,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),o.set(t,s),!0}unregisterElement(t,r){const n=this.elementGestureMap.get(r);return!n||!n.has(t)?!1:(n.get(t).destroy(),n.delete(t),this.activeGesturesRegistry.unregisterElement(r),n.size===0&&this.elementGestureMap.delete(r),!0)}unregisterAllGestures(t){const r=this.elementGestureMap.get(t);if(r){for(const[,n]of r)n.destroy(),this.activeGesturesRegistry.unregisterElement(t);this.elementGestureMap.delete(t)}}destroy(){for(const[t]of this.elementGestureMap)this.unregisterAllGestures(t);this.gestureTemplates.clear(),this.elementGestureMap.clear(),this.activeGesturesRegistry.destroy(),this.keyboardManager.destroy()}}class Pa extends fp{constructor(t){super(t),this.unregisterHandler=null,this.originalTarget=null,this.optionsType=void 0,this.mutableOptionsType=void 0,this.minPointers=void 0,this.maxPointers=void 0,this.minPointers=t.minPointers??1,this.maxPointers=t.maxPointers??1/0}init(t,r,n,a){super.init(t,r,n,a),this.unregisterHandler=this.pointerManager.registerGestureHandler((o,s)=>this.handlePointerEvent(o,s))}updateOptions(t){super.updateOptions(t),this.minPointers=t.minPointers??this.minPointers,this.maxPointers=t.maxPointers??this.maxPointers}getRelevantPointers(t,r){return t.filter(n=>this.isPointerTypeAllowed(n.pointerType)&&(r===n.target||n.target===this.originalTarget||r===this.originalTarget||r.contains(n.target)))}destroy(){this.unregisterHandler&&(this.unregisterHandler(),this.unregisterHandler=null),super.destroy()}}function dv(e,t){const r=t.x-e.x,n=t.y-e.y;return Math.sqrt(r*r+n*n)}function ni(e){if(e.length<2)return 0;let t=0,r=0;for(let n=0;n<e.length;n+=1)for(let a=n+1;a<e.length;a+=1)t+=dv({x:e[n].clientX,y:e[n].clientY},{x:e[a].clientX,y:e[a].clientY}),r+=1;return r>0?t/r:0}function zt(e){if(e.length===0)return{x:0,y:0};const t=e.reduce((r,n)=>(r.x+=n.clientX,r.y+=n.clientY,r),{x:0,y:0});return{x:t.x/e.length,y:t.y/e.length}}function Sn(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const qa=1e-5,Xt=1e-5,du=.15;function hv(e,t){const r=t.x-e.x,n=t.y-e.y,a={vertical:null,horizontal:null,mainAxis:null},o=pv(t,e),s=Math.abs(r)>Math.abs(n)?"horizontal":"vertical",i=o||s==="horizontal"?qa:du,l=o?qa:s==="horizontal"?du:qa;return Math.abs(r)>i&&(a.horizontal=r>0?"right":"left"),Math.abs(n)>l&&(a.vertical=n>0?"down":"up"),a.mainAxis=o?"diagonal":s,a}function pv(e,t){const r=t.x-e.x,n=t.y-e.y,a=Math.atan2(n,r)*180/Math.PI;return a>=-45+Xt&&a<=-22.5+Xt||a>=22.5+Xt&&a<=45+Xt||a>=135+Xt&&a<=157.5+Xt||a>=-157.5+Xt&&a<=-135+Xt}function mv(e,t){if(!e.vertical&&!e.horizontal)return!1;if(t.length===0)return!0;const r=e.vertical===null||t.includes(e.vertical),n=e.horizontal===null||t.includes(e.horizontal);return r&&n}const fv=0,gv=e=>e>fv?1:e<-0?-1:0;class Vl extends Pa{constructor(t){super(t),this.state={lastPosition:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.handleElementEnterBound=void 0,this.handleElementLeaveBound=void 0,this.handleElementEnterBound=this.handleElementEnter.bind(this),this.handleElementLeaveBound=this.handleElementLeave.bind(this),this.threshold=t.threshold||0}clone(t){return new Vl(Y({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,r,n,a){super.init(t,r,n,a),this.element.addEventListener("pointerenter",this.handleElementEnterBound),this.element.addEventListener("pointerleave",this.handleElementLeaveBound)}destroy(){this.element.removeEventListener("pointerenter",this.handleElementEnterBound),this.element.removeEventListener("pointerleave",this.handleElementLeaveBound),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state={lastPosition:null}}handleElementEnter(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen")return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());if(n.length>=this.minPointers&&n.length<=this.maxPointers){this.isActive=!0;const a={x:t.clientX,y:t.clientY};this.state.lastPosition=a,this.emitMoveEvent(this.element,"start",n,t),this.emitMoveEvent(this.element,"ongoing",n,t)}}handleElementLeave(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen"||!this.isActive)return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());this.emitMoveEvent(this.element,"end",n,t),this.resetState()}handlePointerEvent(t,r){if(r.type!=="pointermove"||r.pointerType!=="mouse"&&r.pointerType!=="pen")return;this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const n=Array.from(t.values()),a=this.getTargetElement(r);if(!a||n.length<this.minPointers||n.length>this.maxPointers)return;if(this.shouldPreventGesture(a)){if(!this.isActive)return;this.resetState(),this.emitMoveEvent(a,"end",n,r);return}const o={x:r.clientX,y:r.clientY};this.state.lastPosition=o,this.isActive||(this.isActive=!0,this.emitMoveEvent(a,"start",n,r)),this.emitMoveEvent(a,"ongoing",n,r)}emitMoveEvent(t,r,n,a){const o=this.state.lastPosition||zt(n),s=this.gesturesRegistry.getActiveGestures(t),i={gestureName:this.name,centroid:o,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,activeGestures:s,customData:this.customData},l=Sn(this.name,r),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(c)}}class Il extends Pa{constructor(t){super(t),this.state={startPointers:new Map,startCentroid:null,lastCentroid:null,movementThresholdReached:!1,totalDeltaX:0,totalDeltaY:0,activeDeltaX:0,activeDeltaY:0,lastDirection:{vertical:null,horizontal:null,mainAxis:null},lastDeltas:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.direction=void 0,this.direction=t.direction||["up","down","left","right"],this.threshold=t.threshold||0}clone(t){return new Il(Y({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,direction:[...this.direction],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.direction=t.direction||this.direction}resetState(){this.isActive=!1,this.state=Y({},this.state,{startPointers:new Map,startCentroid:null,lastCentroid:null,lastDeltas:null,activeDeltaX:0,activeDeltaY:0,movementThresholdReached:!1,lastDirection:{vertical:null,horizontal:null,mainAxis:null}})}handlePointerEvent(t,r){const n=Array.from(t.values());if(r.type==="forceCancel"){this.cancel(r.target,n,r);return}const a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.cancel(a,n,r);return}const o=this.getRelevantPointers(n,a);if(o.length<this.minPointers||o.length>this.maxPointers){this.cancel(a,o,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(o.forEach(s=>{this.state.startPointers.set(s.pointerId,s)}),this.originalTarget=a,this.state.startCentroid=zt(o),this.state.lastCentroid=Y({},this.state.startCentroid));break;case"pointermove":if(this.state.startCentroid&&o.length>=this.minPointers){const s=zt(o),i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y,c=Math.sqrt(i*i+l*l),u=hv(this.state.lastCentroid??this.state.startCentroid,s),d=this.state.lastCentroid?s.x-this.state.lastCentroid.x:0,h=this.state.lastCentroid?s.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&c>=this.threshold&&mv(u,this.direction)?(this.state.movementThresholdReached=!0,this.isActive=!0,this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(a,"start",o,r,s),this.emitPanEvent(a,"ongoing",o,r,s)):this.state.movementThresholdReached&&this.isActive&&(this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(a,"ongoing",o,r,s)),this.state.lastCentroid=s,this.state.lastDirection=u}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){if(o.filter(s=>s.type!=="pointerup"&&s.type!=="pointercancel").length<this.minPointers){const s=this.state.lastCentroid||this.state.startCentroid;r.type==="pointercancel"&&this.emitPanEvent(a,"cancel",o,r,s),this.emitPanEvent(a,"end",o,r,s),this.resetState()}}else this.resetState();break}}emitPanEvent(t,r,n,a,o){var S,E;if(!this.state.startCentroid)return;const s=((S=this.state.lastDeltas)==null?void 0:S.x)??0,i=((E=this.state.lastDeltas)==null?void 0:E.y)??0,l=this.state.startPointers.values().next().value,c=l?(a.timeStamp-l.timeStamp)/1e3:0,u=c>0?s/c:0,d=c>0?i/c:0,h=Math.sqrt(u*u+d*d),p=this.gesturesRegistry.getActiveGestures(t),f={gestureName:this.name,initialCentroid:this.state.startCentroid,centroid:o,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,deltaX:s,deltaY:i,direction:this.state.lastDirection,velocityX:u,velocityY:d,velocity:h,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,activeDeltaX:this.state.activeDeltaX,activeDeltaY:this.state.activeDeltaY,activeGestures:p,customData:this.customData},m=Sn(this.name,r),v=new CustomEvent(m,{bubbles:!0,cancelable:!0,detail:f});t.dispatchEvent(v),this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation()}cancel(t,r,n){if(this.isActive){const a=t??this.element;this.emitPanEvent(a,"cancel",r,n,this.state.lastCentroid),this.emitPanEvent(a,"end",r,n,this.state.lastCentroid)}this.resetState()}}class Ml extends Pa{constructor(t){super(Y({},t,{minPointers:t.minPointers??2})),this.state={startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,totalScale:1,deltaScale:0},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.threshold=t.threshold??0}clone(t){return new Ml(Y({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state=Y({},this.state,{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,deltaScale:0})}handlePointerEvent(t,r){const n=Array.from(t.values()),a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.isActive&&(this.emitPinchEvent(a,"cancel",n,r),this.resetState());return}const o=this.getRelevantPointers(n,a);switch(r.type){case"pointerdown":if(o.length>=2&&!this.isActive){const s=ni(o);this.state.startDistance=s,this.state.lastDistance=s,this.state.lastTime=r.timeStamp,this.originalTarget=a}break;case"pointermove":if(this.state.startDistance&&o.length>=this.minPointers){const s=ni(o),i=Math.abs(s-this.state.lastDistance);if(i!==0&&i>=this.threshold){const l=this.state.startDistance?s/this.state.startDistance:1,c=l/this.state.lastScale;this.state.totalScale*=c;const u=(r.timeStamp-this.state.lastTime)/1e3;if(this.state.lastDistance){const h=(s-this.state.lastDistance)/u;this.state.velocity=Number.isNaN(h)?0:h}this.state.lastDistance=s,this.state.deltaScale=l-this.state.lastScale,this.state.lastScale=l,this.state.lastTime=r.timeStamp,this.isActive?this.emitPinchEvent(a,"ongoing",o,r):(this.isActive=!0,this.emitPinchEvent(a,"start",o,r),this.emitPinchEvent(a,"ongoing",o,r))}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const s=o.filter(i=>i.type!=="pointerup"&&i.type!=="pointercancel");if(s.length<this.minPointers)r.type==="pointercancel"&&this.emitPinchEvent(a,"cancel",o,r),this.emitPinchEvent(a,"end",o,r),this.resetState();else if(s.length>=2){const i=ni(s);this.state.startDistance=i/this.state.lastScale}}break}}emitPinchEvent(t,r,n,a){const o=zt(n),s=this.state.lastDistance,i=this.state.lastScale,l=this.gesturesRegistry.getActiveGestures(t),c={gestureName:this.name,centroid:o,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,scale:i,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:s,velocity:this.state.velocity,activeGestures:l,direction:gv(this.state.velocity),customData:this.customData};this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation();const u=Sn(this.name,r),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,detail:c});t.dispatchEvent(d)}}class jl extends Pa{constructor(t){super(t),this.state={startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.duration=void 0,this.maxDistance=void 0,this.duration=t.duration??500,this.maxDistance=t.maxDistance??10}clone(t){return new jl(Y({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,duration:this.duration,maxDistance:this.maxDistance,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.clearPressTimer(),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.duration=t.duration??this.duration,this.maxDistance=t.maxDistance??this.maxDistance}resetState(){this.clearPressTimer(),this.isActive=!1,this.state=Y({},this.state,{startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1})}clearPressTimer(){this.state.timerId!==null&&(clearTimeout(this.state.timerId),this.state.timerId=null)}handlePointerEvent(t,r){const n=Array.from(t.values());if(r.type==="forceCancel"){this.cancelPress(r.target,n,r);return}const a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.isActive&&this.cancelPress(a,n,r);return}const o=this.getRelevantPointers(n,a);if(o.length<this.minPointers||o.length>this.maxPointers){this.isActive&&this.cancelPress(a,o,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(this.state.startCentroid=zt(o),this.state.lastPosition=Y({},this.state.startCentroid),this.state.startTime=r.timeStamp,this.isActive=!0,this.originalTarget=a,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const s=this.state.lastPosition;this.emitPressEvent(a,"start",o,r,s),this.emitPressEvent(a,"ongoing",o,r,s)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const s=zt(o);this.state.lastPosition=s;const i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelPress(a,o,r)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const s=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(a,"end",o,r,s)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(a,o,r);break}}emitPressEvent(t,r,n,a,o){const s=this.gesturesRegistry.getActiveGestures(t),i=a.timeStamp-this.state.startTime,l={gestureName:this.name,centroid:o,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,x:o.x,y:o.y,duration:i,activeGestures:s,customData:this.customData},c=Sn(this.name,r),u=new CustomEvent(c,{bubbles:!0,cancelable:!0,detail:l});t.dispatchEvent(u),this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation()}cancelPress(t,r,n){if(this.isActive&&this.state.pressThresholdReached){const a=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(t??this.element,"cancel",r,n,a),this.emitPressEvent(t??this.element,"end",r,n,a)}this.resetState()}}class $l extends Pa{constructor(t){super(t),this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.maxDistance=void 0,this.taps=void 0,this.maxDistance=t.maxDistance??10,this.taps=t.taps??1}clone(t){return new $l(Y({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,maxDistance:this.maxDistance,taps:this.taps,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.maxDistance=t.maxDistance??this.maxDistance,this.taps=t.taps??this.taps}resetState(){this.isActive=!1,this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null}}handlePointerEvent(t,r){const n=Array.from(t.values()),a=this.getTargetElement(r);if(!a)return;const o=this.getRelevantPointers(n,a);if(this.shouldPreventGesture(a)||o.length<this.minPointers||o.length>this.maxPointers){this.isActive&&this.cancelTap(a,o,r);return}switch(r.type){case"pointerdown":this.isActive||(this.state.startCentroid=zt(o),this.state.lastPosition=Y({},this.state.startCentroid),this.isActive=!0,this.originalTarget=a);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const s=zt(o);this.state.lastPosition=s;const i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelTap(a,o,r)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const s=this.state.lastPosition||this.state.startCentroid;if(!s){this.cancelTap(a,o,r);return}this.state.currentTapCount>=this.taps?(this.fireTapEvent(a,o,r,s),this.resetState()):(this.state.lastTapTime=r.timeStamp,this.isActive=!1,this.state.startCentroid=null,setTimeout(()=>{this.state&&this.state.currentTapCount>0&&this.state.currentTapCount<this.taps&&(this.state.currentTapCount=0)},300))}break;case"pointercancel":case"forceCancel":this.cancelTap(a,o,r);break}}fireTapEvent(t,r,n,a){const o=this.gesturesRegistry.getActiveGestures(t),s={gestureName:this.name,centroid:a,target:n.target,srcEvent:n,phase:"end",pointers:r,timeStamp:n.timeStamp,x:a.x,y:a.y,tapCount:this.state.currentTapCount,activeGestures:o,customData:this.customData},i=new CustomEvent(this.name,{bubbles:!0,cancelable:!0,detail:s});t.dispatchEvent(i),this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation()}cancelTap(t,r,n){if(this.state.startCentroid||this.state.lastPosition){const a=this.state.lastPosition||this.state.startCentroid,o=this.gesturesRegistry.getActiveGestures(t),s={gestureName:this.name,centroid:a,target:n.target,srcEvent:n,phase:"cancel",pointers:r,timeStamp:n.timeStamp,x:a.x,y:a.y,tapCount:this.state.currentTapCount,activeGestures:o,customData:this.customData},i=Sn(this.name,"cancel"),l=new CustomEvent(i,{bubbles:!0,cancelable:!0,detail:s});t.dispatchEvent(l)}this.resetState()}}class kl extends fp{constructor(t){super(t),this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.sensitivity=void 0,this.max=void 0,this.min=void 0,this.initialDelta=void 0,this.invert=void 0,this.handleWheelEventBound=void 0,this.sensitivity=t.sensitivity??1,this.max=t.max??Number.MAX_SAFE_INTEGER,this.min=t.min??Number.MIN_SAFE_INTEGER,this.initialDelta=t.initialDelta??0,this.invert=t.invert??!1,this.state.totalDeltaX=this.initialDelta,this.state.totalDeltaY=this.initialDelta,this.state.totalDeltaZ=this.initialDelta,this.handleWheelEventBound=this.handleWheelEvent.bind(this)}clone(t){return new kl(Y({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,sensitivity:this.sensitivity,max:this.max,min:this.min,initialDelta:this.initialDelta,invert:this.invert,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,r,n,a){super.init(t,r,n,a),this.element.addEventListener("wheel",this.handleWheelEventBound)}destroy(){this.element.removeEventListener("wheel",this.handleWheelEventBound),this.resetState(),super.destroy()}resetState(){this.isActive=!1,this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0}}updateOptions(t){super.updateOptions(t),this.sensitivity=t.sensitivity??this.sensitivity,this.max=t.max??this.max,this.min=t.min??this.min,this.initialDelta=t.initialDelta??this.initialDelta,this.invert=t.invert??this.invert}handleWheelEvent(t){if(this.shouldPreventGesture(this.element))return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());this.state.totalDeltaX+=t.deltaX*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaY+=t.deltaY*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaZ+=t.deltaZ*this.sensitivity*(this.invert?-1:1),["totalDeltaX","totalDeltaY","totalDeltaZ"].forEach(a=>{this.state[a]<this.min&&(this.state[a]=this.min),this.state[a]>this.max&&(this.state[a]=this.max)}),this.emitWheelEvent(n,t)}emitWheelEvent(t,r){const n=t.length>0?zt(t):{x:r.clientX,y:r.clientY},a=this.gesturesRegistry.getActiveGestures(this.element),o={gestureName:this.name,centroid:n,target:r.target,srcEvent:r,phase:"ongoing",pointers:t,timeStamp:r.timeStamp,deltaX:r.deltaX*this.sensitivity*(this.invert?-1:1),deltaY:r.deltaY*this.sensitivity*(this.invert?-1:1),deltaZ:r.deltaZ*this.sensitivity*(this.invert?-1:1),deltaMode:r.deltaMode,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,totalDeltaZ:this.state.totalDeltaZ,activeGestures:a,customData:this.customData};this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const s=Sn(this.name,"ongoing"),i=new CustomEvent(s,{bubbles:!0,cancelable:!0,detail:o});this.element.dispatchEvent(i)}}const zr=e=>e.preventDefault(),Ul=({svgRef:e})=>{I.useEffect(()=>{const r=e.current;if(!r)return;const n=new uv({gestures:[new Il({name:"pan",threshold:0,maxPointers:1}),new Vl({name:"move",preventIf:["pan","pinch"]}),new Ml({name:"pinch",threshold:5,preventIf:["pan"]}),new kl({name:"turnWheel",sensitivity:.01,initialDelta:1}),new $l({name:"tap",maxDistance:10,preventIf:["pan","pinch"]}),new jl({name:"quickPress",duration:50,maxDistance:10})]});return n.registerElement(["pan","move","pinch","turnWheel","tap","quickPress"],r),()=>{n.destroy()}},[e]);const t=I.useCallback((r,n,a)=>{const o=e.current;return o==null||o.addEventListener(r,n,a),{cleanup:()=>o==null?void 0:o.removeEventListener(r,n)}},[e]);return I.useEffect(()=>{const r=e.current;return r==null||r.addEventListener("gesturestart",zr),r==null||r.addEventListener("gesturechange",zr),r==null||r.addEventListener("gestureend",zr),()=>{r==null||r.removeEventListener("gesturestart",zr),r==null||r.removeEventListener("gesturechange",zr),r==null||r.removeEventListener("gestureend",zr)}},[e]),{instance:{addInteractionListener:t}}};Ul.params={};Ul.getInitialState=()=>({});const yv=[El,_l,us,ds,Ul,cs],bv=["apiRef"],vv=e=>{let{plugins:t}=e,r=or(e.props,bv);const n={};t.forEach(s=>{Object.assign(n,s.params)});const a={};return Object.keys(r).forEach(s=>{const i=r[s];n[s]&&(a[s]=i)}),t.reduce((s,i)=>i.getDefaultizedParams?i.getDefaultizedParams({params:s}):s,a)};let hu=0;function xv(e,t,r){const n=ab(),a=I.useMemo(()=>[...yv,...e],[e]),o=vv({plugins:a,props:t});o.id=o.id??n;const i=I.useRef({}).current,l=Ov(t.apiRef),c=I.useRef(null),u=I.useRef(null),d=I.useRef(null);if(d.current==null){hu+=1;const f={cacheKey:{id:hu}};a.forEach(m=>{m.getInitialState&&Object.assign(f,m.getInitialState(o,f,r))}),d.current=new ob(f)}const h=f=>{const m=f({instance:i,params:o,plugins:a,store:d.current,svgRef:u,chartRootRef:c,seriesConfig:r});m.publicAPI&&Object.assign(l.current,m.publicAPI),m.instance&&Object.assign(i,m.instance)};return a.forEach(h),{contextValue:I.useMemo(()=>({store:d.current,publicAPI:l.current,instance:i,svgRef:u,chartRootRef:c}),[i,l])}}function Sv(e){return e.current==null&&(e.current={}),e}function Ov(e){const t=I.useRef({});return e?Sv(e):t}const Ll=I.createContext(null);process.env.NODE_ENV!=="production"&&(Ll.displayName="ChartContext");const pu=new Set;function ia(e,t="warning"){if(process.env.NODE_ENV==="production")return;const r=Array.isArray(e)?e.join(`
|
|
115
|
-
`):e;pu.has(r)||(pu.add(r),t==="error"?console.error(r):console.warn(r))}function wv(e){const{componentName:t,propName:r,controlled:n,defaultValue:a,warningPrefix:o="MUI X"}=e,[{initialDefaultValue:s,isControlled:i}]=I.useState({initialDefaultValue:a,isControlled:n!==void 0});i!==(n!==void 0)&&ia([`${o}: A component is changing the ${i?"":"un"}controlled ${r} state of ${t} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"],"error"),JSON.stringify(s)!==JSON.stringify(a)&&ia([`${o}: A component is changing the default ${r} state of an uncontrolled ${t} after being initialized. To suppress this warning opt to use a controlled ${t}.`],"error")}const gp=process.env.NODE_ENV==="production"?()=>{}:wv,yp=4,bp=20+2*yp,Cv=40+2*yp,Pv="hover",Ja={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",slider:{enabled:!1,preview:!1,size:bp,showTooltip:Pv}},Dl=(e,t,r)=>{var n;if(e)return e===!0?Y({axisId:t,axisDirection:r},Ja):Y({axisId:t,axisDirection:r},Ja,e,{slider:Y({},Ja.slider,{size:((n=e.slider)==null?void 0:n.preview)??Ja.slider.preview?Cv:bp},e.slider)})};function vp(e,t){const r={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:kb,scaleType:"linear"}]).map((o,s)=>{var p;const i=o.dataKey,l=s===0?"bottom":"none",c=o.position??l,u=Fb+(o.label?ip:0),d=o.id??`defaultized-x-axis-${s}`,h=Y({offset:r[c]},o,{id:d,position:c,height:o.height??u,zoom:Dl(o.zoom,d,"x")});if(c!=="none"&&(r[c]+=h.height,(p=h.zoom)!=null&&p.slider.enabled&&(r[c]+=h.zoom.slider.size)),i===void 0||o.data!==void 0)return h;if(t===void 0)throw new Error("MUI X Charts: x-axis uses `dataKey` but no `dataset` is provided.");return Y({},h,{data:t.map(f=>f[i])})})}function xp(e,t){const r={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:Ub,scaleType:"linear"}]).map((o,s)=>{var p;const i=o.dataKey,l=s===0?"left":"none",c=o.position??l,u=Db+(o.label?ip:0),d=o.id??`defaultized-y-axis-${s}`,h=Y({offset:r[c]},o,{id:d,position:c,width:o.width??u,zoom:Dl(o.zoom,d,"y")});if(c!=="none"&&(r[c]+=h.width,(p=h.zoom)!=null&&p.slider.enabled&&(r[c]+=h.zoom.slider.size)),i===void 0||o.data!==void 0)return h;if(t===void 0)throw new Error("MUI X Charts: y-axis uses `dataKey` but no `dataset` is provided.");return Y({},h,{data:t.map(f=>f[i])})})}function fo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Tv(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Fl(e){let t,r,n;e.length!==2?(t=fo,r=(i,l)=>fo(e(i),l),n=(i,l)=>e(i)-l):(t=e===fo||e===Tv?e:Rv,r=e,n=e);function a(i,l,c=0,u=i.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(i[d],l)<0?c=d+1:u=d}while(c<u)}return c}function o(i,l,c=0,u=i.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(i[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function s(i,l,c=0,u=i.length){const d=a(i,l,c,u-1);return d>c&&n(i[d-1],l)>-n(i[d],l)?d-1:d}return{left:a,center:s,right:o}}function Rv(){return 0}function Av(e){return e===null?NaN:+e}const _v=Fl(fo),Sp=_v.right;Fl(Av).center;class mu extends Map{constructor(t,r=Iv){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(fu(this,t))}has(t){return super.has(fu(this,t))}set(t,r){return super.set(Ev(this,t),r)}delete(t){return super.delete(Vv(this,t))}}function fu({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Ev({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Vv({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Iv(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Mv=Math.sqrt(50),jv=Math.sqrt(10),$v=Math.sqrt(2);function Eo(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),o=n/Math.pow(10,a),s=o>=Mv?10:o>=jv?5:o>=$v?2:1;let i,l,c;return a<0?(c=Math.pow(10,-a)/s,i=Math.round(e*c),l=Math.round(t*c),i/c<e&&++i,l/c>t&&--l,c=-c):(c=Math.pow(10,a)*s,i=Math.round(e/c),l=Math.round(t/c),i*c<e&&++i,l*c>t&&--l),l<i&&.5<=r&&r<2?Eo(e,t,r*2):[i,l,c]}function Bi(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,o,s]=n?Eo(t,e,r):Eo(e,t,r);if(!(o>=a))return[];const i=o-a+1,l=new Array(i);if(n)if(s<0)for(let c=0;c<i;++c)l[c]=(o-c)/-s;else for(let c=0;c<i;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<i;++c)l[c]=(a+c)/-s;else for(let c=0;c<i;++c)l[c]=(a+c)*s;return l}function Ni(e,t,r){return t=+t,e=+e,r=+r,Eo(e,t,r)[2]}function zi(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Ni(t,e,r):Ni(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function kv(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(a);++n<a;)o[n]=e+n*r;return o}function ur(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Uv(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const gu=Symbol("implicit");function Vo(){var e=new mu,t=[],r=[],n=gu;function a(o){let s=e.get(o);if(s===void 0){if(n!==gu)return n;e.set(o,s=t.push(o)-1)}return r[s%r.length]}return a.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new mu;for(const s of o)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(o){return arguments.length?(r=Array.from(o),a):r.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return Vo(t,r).unknown(n)},ur.apply(a,arguments),a}function Bl(){var e=Vo().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,o,s,i=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,p=a<n,f=p?a:n,m=p?n:a;o=(m-f)/Math.max(1,h-l+c*2),i&&(o=Math.floor(o)),f+=(m-f-o*(h-l))*u,s=o*(1-l),i&&(f=Math.round(f),s=Math.round(s));var v=kv(h).map(function(S){return f+o*S});return r(p?v.reverse():v)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([n,a]=h,n=+n,a=+a,d()):[n,a]},e.rangeRound=function(h){return[n,a]=h,n=+n,a=+a,i=!0,d()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(h){return arguments.length?(i=!!h,d()):i},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return Bl(t(),[n,a]).round(i).paddingInner(l).paddingOuter(c).align(u)},ur.apply(d(),arguments)}function Op(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Op(t())},e}function Lv(){return Op(Bl.apply(null,arguments).paddingInner(1))}function Nl(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function wp(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ta(){}var la=.7,Io=1/la,on="\\s*([+-]?\\d+)\\s*",ca="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Dv=/^#([0-9a-f]{3,8})$/,Fv=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),Bv=new RegExp(`^rgb\\(${Mt},${Mt},${Mt}\\)$`),Nv=new RegExp(`^rgba\\(${on},${on},${on},${ca}\\)$`),zv=new RegExp(`^rgba\\(${Mt},${Mt},${Mt},${ca}\\)$`),Gv=new RegExp(`^hsl\\(${ca},${Mt},${Mt}\\)$`),Hv=new RegExp(`^hsla\\(${ca},${Mt},${Mt},${ca}\\)$`),yu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Nl(Ta,ua,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:bu,formatHex:bu,formatHex8:qv,formatHsl:Jv,formatRgb:vu,toString:vu});function bu(){return this.rgb().formatHex()}function qv(){return this.rgb().formatHex8()}function Jv(){return Cp(this).formatHsl()}function vu(){return this.rgb().formatRgb()}function ua(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Dv.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?xu(t):r===3?new st(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Wa(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Wa(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Fv.exec(e))?new st(t[1],t[2],t[3],1):(t=Bv.exec(e))?new st(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Nv.exec(e))?Wa(t[1],t[2],t[3],t[4]):(t=zv.exec(e))?Wa(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Gv.exec(e))?wu(t[1],t[2]/100,t[3]/100,1):(t=Hv.exec(e))?wu(t[1],t[2]/100,t[3]/100,t[4]):yu.hasOwnProperty(e)?xu(yu[e]):e==="transparent"?new st(NaN,NaN,NaN,0):null}function xu(e){return new st(e>>16&255,e>>8&255,e&255,1)}function Wa(e,t,r,n){return n<=0&&(e=t=r=NaN),new st(e,t,r,n)}function Wv(e){return e instanceof Ta||(e=ua(e)),e?(e=e.rgb(),new st(e.r,e.g,e.b,e.opacity)):new st}function Gi(e,t,r,n){return arguments.length===1?Wv(e):new st(e,t,r,n??1)}function st(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Nl(st,Gi,wp(Ta,{brighter(e){return e=e==null?Io:Math.pow(Io,e),new st(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?la:Math.pow(la,e),new st(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new st(vr(this.r),vr(this.g),vr(this.b),Mo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Su,formatHex:Su,formatHex8:Yv,formatRgb:Ou,toString:Ou}));function Su(){return`#${fr(this.r)}${fr(this.g)}${fr(this.b)}`}function Yv(){return`#${fr(this.r)}${fr(this.g)}${fr(this.b)}${fr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ou(){const e=Mo(this.opacity);return`${e===1?"rgb(":"rgba("}${vr(this.r)}, ${vr(this.g)}, ${vr(this.b)}${e===1?")":`, ${e})`}`}function Mo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function fr(e){return e=vr(e),(e<16?"0":"")+e.toString(16)}function wu(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ot(e,t,r,n)}function Cp(e){if(e instanceof Ot)return new Ot(e.h,e.s,e.l,e.opacity);if(e instanceof Ta||(e=ua(e)),!e)return new Ot;if(e instanceof Ot)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),o=Math.max(t,r,n),s=NaN,i=o-a,l=(o+a)/2;return i?(t===o?s=(r-n)/i+(r<n)*6:r===o?s=(n-t)/i+2:s=(t-r)/i+4,i/=l<.5?o+a:2-o-a,s*=60):i=l>0&&l<1?0:s,new Ot(s,i,l,e.opacity)}function Kv(e,t,r,n){return arguments.length===1?Cp(e):new Ot(e,t,r,n??1)}function Ot(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Nl(Ot,Kv,wp(Ta,{brighter(e){return e=e==null?Io:Math.pow(Io,e),new Ot(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?la:Math.pow(la,e),new Ot(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new st(ai(e>=240?e-240:e+120,a,n),ai(e,a,n),ai(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Ot(Cu(this.h),Ya(this.s),Ya(this.l),Mo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Mo(this.opacity);return`${e===1?"hsl(":"hsla("}${Cu(this.h)}, ${Ya(this.s)*100}%, ${Ya(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Cu(e){return e=(e||0)%360,e<0?e+360:e}function Ya(e){return Math.max(0,Math.min(1,e||0))}function ai(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const zl=e=>()=>e;function Qv(e,t){return function(r){return e+r*t}}function Xv(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function Zv(e){return(e=+e)==1?Pp:function(t,r){return r-t?Xv(t,r,e):zl(isNaN(t)?r:t)}}function Pp(e,t){var r=t-e;return r?Qv(e,r):zl(isNaN(e)?t:e)}const Pu=function e(t){var r=Zv(t);function n(a,o){var s=r((a=Gi(a)).r,(o=Gi(o)).r),i=r(a.g,o.g),l=r(a.b,o.b),c=Pp(a.opacity,o.opacity);return function(u){return a.r=s(u),a.g=i(u),a.b=l(u),a.opacity=c(u),a+""}}return n.gamma=e,n}(1);function ex(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(o){for(a=0;a<r;++a)n[a]=e[a]*(1-o)+t[a]*o;return n}}function tx(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function rx(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),o=new Array(r),s;for(s=0;s<n;++s)a[s]=ps(e[s],t[s]);for(;s<r;++s)o[s]=t[s];return function(i){for(s=0;s<n;++s)o[s]=a[s](i);return o}}function Gl(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function wt(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function nx(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=ps(e[a],t[a]):n[a]=t[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var Hi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,oi=new RegExp(Hi.source,"g");function ax(e){return function(){return e}}function ox(e){return function(t){return e(t)+""}}function sx(e,t){var r=Hi.lastIndex=oi.lastIndex=0,n,a,o,s=-1,i=[],l=[];for(e=e+"",t=t+"";(n=Hi.exec(e))&&(a=oi.exec(t));)(o=a.index)>r&&(o=t.slice(r,o),i[s]?i[s]+=o:i[++s]=o),(n=n[0])===(a=a[0])?i[s]?i[s]+=a:i[++s]=a:(i[++s]=null,l.push({i:s,x:wt(n,a)})),r=oi.lastIndex;return r<t.length&&(o=t.slice(r),i[s]?i[s]+=o:i[++s]=o),i.length<2?l[0]?ox(l[0].x):ax(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)i[(d=l[u]).i]=d.x(c);return i.join("")})}function ps(e,t){var r=typeof t,n;return t==null||r==="boolean"?zl(t):(r==="number"?wt:r==="string"?(n=ua(t))?(t=n,Pu):sx:t instanceof ua?Pu:t instanceof Date?Gl:tx(t)?ex:Array.isArray(t)?rx:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?nx:wt)(e,t)}function Tp(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function ix(e){return function(){return e}}function lx(e){return+e}var Tu=[0,1];function ft(e){return e}function qi(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:ix(isNaN(t)?NaN:.5)}function cx(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function ux(e,t,r){var n=e[0],a=e[1],o=t[0],s=t[1];return a<n?(n=qi(a,n),o=r(s,o)):(n=qi(n,a),o=r(o,s)),function(i){return o(n(i))}}function dx(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),o=new Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)a[s]=qi(e[s],e[s+1]),o[s]=r(t[s],t[s+1]);return function(i){var l=Sp(e,i,1,n)-1;return o[l](a[l](i))}}function ms(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Hl(){var e=Tu,t=Tu,r=ps,n,a,o,s=ft,i,l,c;function u(){var h=Math.min(e.length,t.length);return s!==ft&&(s=cx(e[0],e[h-1])),i=h>2?dx:ux,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?o:(l||(l=i(e.map(n),t,r)))(n(s(h)))}return d.invert=function(h){return s(a((c||(c=i(t,e.map(n),wt)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,lx),u()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),r=Tp,u()},d.clamp=function(h){return arguments.length?(s=h?!0:ft,u()):s!==ft},d.interpolate=function(h){return arguments.length?(r=h,u()):r},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,p){return n=h,a=p,u()}}function Rp(){return Hl()(ft,ft)}function hx(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function jo(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function dn(e){return e=jo(Math.abs(e)),e?e[1]:NaN}function px(e,t){return function(r,n){for(var a=r.length,o=[],s=0,i=e[0],l=0;a>0&&i>0&&(l+i+1>n&&(i=Math.max(1,n-l)),o.push(r.substring(a-=i,a+i)),!((l+=i+1)>n));)i=e[s=(s+1)%e.length];return o.reverse().join(t)}}function mx(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var fx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function da(e){if(!(t=fx.exec(e)))throw new Error("invalid format: "+e);var t;return new ql({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}da.prototype=ql.prototype;function ql(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}ql.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function gx(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Ap;function yx(e,t){var r=jo(e,t);if(!r)return e+"";var n=r[0],a=r[1],o=a-(Ap=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=n.length;return o===s?n:o>s?n+new Array(o-s+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+jo(e,Math.max(0,t+o-1))[0]}function Ru(e,t){var r=jo(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Au={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:hx,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Ru(e*100,t),r:Ru,s:yx,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function _u(e){return e}var Eu=Array.prototype.map,Vu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function bx(e){var t=e.grouping===void 0||e.thousands===void 0?_u:px(Eu.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?_u:mx(Eu.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",i=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=da(d);var h=d.fill,p=d.align,f=d.sign,m=d.symbol,v=d.zero,S=d.width,E=d.comma,O=d.precision,w=d.trim,T=d.type;T==="n"?(E=!0,T="g"):Au[T]||(O===void 0&&(O=12),w=!0,T="g"),(v||h==="0"&&p==="=")&&(v=!0,h="0",p="=");var C=m==="$"?r:m==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",A=m==="$"?n:/[%p]/.test(T)?s:"",V=Au[T],B=/[defgprs%]/.test(T);O=O===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function y(R){var G=C,P=A,N,re,Z;if(T==="c")P=V(R)+P,R="";else{R=+R;var ae=R<0||1/R<0;if(R=isNaN(R)?l:V(Math.abs(R),O),w&&(R=gx(R)),ae&&+R==0&&f!=="+"&&(ae=!1),G=(ae?f==="("?f:i:f==="-"||f==="("?"":f)+G,P=(T==="s"?Vu[8+Ap/3]:"")+P+(ae&&f==="("?")":""),B){for(N=-1,re=R.length;++N<re;)if(Z=R.charCodeAt(N),48>Z||Z>57){P=(Z===46?a+R.slice(N+1):R.slice(N))+P,R=R.slice(0,N);break}}}E&&!v&&(R=t(R,1/0));var te=G.length+R.length+P.length,se=te<S?new Array(S-te+1).join(h):"";switch(E&&v&&(R=t(se+R,se.length?S-P.length:1/0),se=""),p){case"<":R=G+R+P+se;break;case"=":R=G+se+R+P;break;case"^":R=se.slice(0,te=se.length>>1)+G+R+P+se.slice(te);break;default:R=se+G+R+P;break}return o(R)}return y.toString=function(){return d+""},y}function u(d,h){var p=c((d=da(d),d.type="f",d)),f=Math.max(-8,Math.min(8,Math.floor(dn(h)/3)))*3,m=Math.pow(10,-f),v=Vu[8+f/3];return function(S){return p(m*S)+v}}return{format:c,formatPrefix:u}}var Ka,Jl,_p;vx({thousands:",",grouping:[3],currency:["$",""]});function vx(e){return Ka=bx(e),Jl=Ka.format,_p=Ka.formatPrefix,Ka}function xx(e){return Math.max(0,-dn(Math.abs(e)))}function Sx(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(dn(t)/3)))*3-dn(Math.abs(e)))}function Ox(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,dn(t)-dn(e))+1}function wx(e,t,r,n){var a=zi(e,t,r),o;switch(n=da(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=Sx(a,s))&&(n.precision=o),_p(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=Ox(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=xx(a))&&(n.precision=o-(n.type==="%")*2);break}}return Jl(n)}function Wl(e){var t=e.domain;return e.ticks=function(r){var n=t();return Bi(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return wx(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,o=n.length-1,s=n[a],i=n[o],l,c,u=10;for(i<s&&(c=s,s=i,i=c,c=a,a=o,o=c);u-- >0;){if(c=Ni(s,i,r),c===l)return n[a]=s,n[o]=i,t(n);if(c>0)s=Math.floor(s/c)*c,i=Math.ceil(i/c)*c;else if(c<0)s=Math.ceil(s*c)/c,i=Math.floor(i*c)/c;else break;l=c}return e},e}function Ep(){var e=Rp();return e.copy=function(){return ms(e,Ep())},ur.apply(e,arguments),Wl(e)}function Vp(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],o=e[n],s;return o<a&&(s=r,r=n,n=s,s=a,a=o,o=s),e[r]=t.floor(a),e[n]=t.ceil(o),e}function Iu(e){return Math.log(e)}function Mu(e){return Math.exp(e)}function Cx(e){return-Math.log(-e)}function Px(e){return-Math.exp(-e)}function Tx(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Rx(e){return e===10?Tx:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Ax(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function ju(e){return(t,r)=>-e(-t,r)}function _x(e){const t=e(Iu,Mu),r=t.domain;let n=10,a,o;function s(){return a=Ax(n),o=Rx(n),r()[0]<0?(a=ju(a),o=ju(o),e(Cx,Px)):e(Iu,Mu),t}return t.base=function(i){return arguments.length?(n=+i,s()):n},t.domain=function(i){return arguments.length?(r(i),s()):r()},t.ticks=i=>{const l=r();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=a(c),p=a(u),f,m;const v=i==null?10:+i;let S=[];if(!(n%1)&&p-h<v){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;++h)for(f=1;f<n;++f)if(m=h<0?f/o(-h):f*o(h),!(m<c)){if(m>u)break;S.push(m)}}else for(;h<=p;++h)for(f=n-1;f>=1;--f)if(m=h>0?f/o(-h):f*o(h),!(m<c)){if(m>u)break;S.push(m)}S.length*2<v&&(S=Bi(c,u,v))}else S=Bi(h,p,Math.min(p-h,v)).map(o);return d?S.reverse():S},t.tickFormat=(i,l)=>{if(i==null&&(i=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=da(l)).precision==null&&(l.trim=!0),l=Jl(l)),i===1/0)return l;const c=Math.max(1,n*i/t.ticks().length);return u=>{let d=u/o(Math.round(a(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>r(Vp(r(),{floor:i=>o(Math.floor(a(i))),ceil:i=>o(Math.ceil(a(i)))})),t}function Ip(){const e=_x(Hl()).domain([1,10]);return e.copy=()=>ms(e,Ip()).base(e.base()),ur.apply(e,arguments),e}function $u(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Ex(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Vx(e){return e<0?-e*e:e*e}function Ix(e){var t=e(ft,ft),r=1;function n(){return r===1?e(ft,ft):r===.5?e(Ex,Vx):e($u(r),$u(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Wl(t)}function Yl(){var e=Ix(Hl());return e.copy=function(){return ms(e,Yl()).exponent(e.exponent())},ur.apply(e,arguments),e}function Mx(){return Yl.apply(null,arguments).exponent(.5)}function Mp(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[Sp(e,o,0,n)]:r}return a.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return Mp().domain(e).range(t).unknown(r)},ur.apply(a,arguments)}const si=new Date,ii=new Date;function Ne(e,t,r,n){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const s=a(o),i=a.ceil(o);return o-s<i-o?s:i},a.offset=(o,s)=>(t(o=new Date(+o),s==null?1:Math.floor(s)),o),a.range=(o,s,i)=>{const l=[];if(o=a.ceil(o),i=i==null?1:Math.floor(i),!(o<s)||!(i>0))return l;let c;do l.push(c=new Date(+o)),t(o,i),e(o);while(c<o&&o<s);return l},a.filter=o=>Ne(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,i)=>{if(s>=s)if(i<0)for(;++i<=0;)for(;t(s,-1),!o(s););else for(;--i>=0;)for(;t(s,1),!o(s););}),r&&(a.count=(o,s)=>(si.setTime(+o),ii.setTime(+s),e(si),e(ii),Math.floor(r(si,ii))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(n?s=>n(s)%o===0:s=>a.count(0,s)%o===0):a)),a}const $o=Ne(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);$o.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ne(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):$o);$o.range;const Dt=1e3,gt=Dt*60,Ft=gt*60,Gt=Ft*24,Kl=Gt*7,ku=Gt*30,li=Gt*365,gr=Ne(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Dt)},(e,t)=>(t-e)/Dt,e=>e.getUTCSeconds());gr.range;const Ql=Ne(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Dt)},(e,t)=>{e.setTime(+e+t*gt)},(e,t)=>(t-e)/gt,e=>e.getMinutes());Ql.range;const Xl=Ne(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*gt)},(e,t)=>(t-e)/gt,e=>e.getUTCMinutes());Xl.range;const Zl=Ne(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Dt-e.getMinutes()*gt)},(e,t)=>{e.setTime(+e+t*Ft)},(e,t)=>(t-e)/Ft,e=>e.getHours());Zl.range;const ec=Ne(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ft)},(e,t)=>(t-e)/Ft,e=>e.getUTCHours());ec.range;const Ra=Ne(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*gt)/Gt,e=>e.getDate()-1);Ra.range;const fs=Ne(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Gt,e=>e.getUTCDate()-1);fs.range;const jp=Ne(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Gt,e=>Math.floor(e/Gt));jp.range;function Rr(e){return Ne(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*gt)/Kl)}const gs=Rr(0),ko=Rr(1),jx=Rr(2),$x=Rr(3),hn=Rr(4),kx=Rr(5),Ux=Rr(6);gs.range;ko.range;jx.range;$x.range;hn.range;kx.range;Ux.range;function Ar(e){return Ne(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Kl)}const ys=Ar(0),Uo=Ar(1),Lx=Ar(2),Dx=Ar(3),pn=Ar(4),Fx=Ar(5),Bx=Ar(6);ys.range;Uo.range;Lx.range;Dx.range;pn.range;Fx.range;Bx.range;const tc=Ne(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());tc.range;const rc=Ne(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());rc.range;const Ht=Ne(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ht.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ne(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Ht.range;const qt=Ne(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());qt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ne(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});qt.range;function $p(e,t,r,n,a,o){const s=[[gr,1,Dt],[gr,5,5*Dt],[gr,15,15*Dt],[gr,30,30*Dt],[o,1,gt],[o,5,5*gt],[o,15,15*gt],[o,30,30*gt],[a,1,Ft],[a,3,3*Ft],[a,6,6*Ft],[a,12,12*Ft],[n,1,Gt],[n,2,2*Gt],[r,1,Kl],[t,1,ku],[t,3,3*ku],[e,1,li]];function i(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),f=p?p.range(c,+u+1):[];return h?f.reverse():f}function l(c,u,d){const h=Math.abs(u-c)/d,p=Fl(([,,v])=>v).right(s,h);if(p===s.length)return e.every(zi(c/li,u/li,d));if(p===0)return $o.every(Math.max(zi(c,u,d),1));const[f,m]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return f.every(m)}return[i,l]}const[Nx,zx]=$p(qt,rc,ys,jp,ec,Xl),[Gx,Hx]=$p(Ht,tc,gs,Ra,Zl,Ql);function ci(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ui(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function kn(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function qx(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,o=e.days,s=e.shortDays,i=e.months,l=e.shortMonths,c=Un(a),u=Ln(a),d=Un(o),h=Ln(o),p=Un(s),f=Ln(s),m=Un(i),v=Ln(i),S=Un(l),E=Ln(l),O={a:ae,A:te,b:se,B:J,c:null,d:Nu,e:Nu,f:f1,g:P1,G:R1,H:h1,I:p1,j:m1,L:kp,m:g1,M:y1,p:ee,q:he,Q:Hu,s:qu,S:b1,u:v1,U:x1,V:S1,w:O1,W:w1,x:null,X:null,y:C1,Y:T1,Z:A1,"%":Gu},w={a:Pe,A:ze,b:Se,B:lt,c:null,d:zu,e:zu,f:I1,g:N1,G:G1,H:_1,I:E1,j:V1,L:Lp,m:M1,M:j1,p:tt,q:ye,Q:Hu,s:qu,S:$1,u:k1,U:U1,V:L1,w:D1,W:F1,x:null,X:null,y:B1,Y:z1,Z:H1,"%":Gu},T={a:y,A:R,b:G,B:P,c:N,d:Fu,e:Fu,f:l1,g:Du,G:Lu,H:Bu,I:Bu,j:a1,L:i1,m:n1,M:o1,p:B,q:r1,Q:u1,s:d1,S:s1,u:Qx,U:Xx,V:Zx,w:Kx,W:e1,x:re,X:Z,y:Du,Y:Lu,Z:t1,"%":c1};O.x=C(r,O),O.X=C(n,O),O.c=C(t,O),w.x=C(r,w),w.X=C(n,w),w.c=C(t,w);function C(X,oe){return function(ce){var W=[],be=-1,me=0,Je=X.length,Ge,Me,Qt;for(ce instanceof Date||(ce=new Date(+ce));++be<Je;)X.charCodeAt(be)===37&&(W.push(X.slice(me,be)),(Me=Uu[Ge=X.charAt(++be)])!=null?Ge=X.charAt(++be):Me=Ge==="e"?" ":"0",(Qt=oe[Ge])&&(Ge=Qt(ce,Me)),W.push(Ge),me=be+1);return W.push(X.slice(me,be)),W.join("")}}function A(X,oe){return function(ce){var W=kn(1900,void 0,1),be=V(W,X,ce+="",0),me,Je;if(be!=ce.length)return null;if("Q"in W)return new Date(W.Q);if("s"in W)return new Date(W.s*1e3+("L"in W?W.L:0));if(oe&&!("Z"in W)&&(W.Z=0),"p"in W&&(W.H=W.H%12+W.p*12),W.m===void 0&&(W.m="q"in W?W.q:0),"V"in W){if(W.V<1||W.V>53)return null;"w"in W||(W.w=1),"Z"in W?(me=ui(kn(W.y,0,1)),Je=me.getUTCDay(),me=Je>4||Je===0?Uo.ceil(me):Uo(me),me=fs.offset(me,(W.V-1)*7),W.y=me.getUTCFullYear(),W.m=me.getUTCMonth(),W.d=me.getUTCDate()+(W.w+6)%7):(me=ci(kn(W.y,0,1)),Je=me.getDay(),me=Je>4||Je===0?ko.ceil(me):ko(me),me=Ra.offset(me,(W.V-1)*7),W.y=me.getFullYear(),W.m=me.getMonth(),W.d=me.getDate()+(W.w+6)%7)}else("W"in W||"U"in W)&&("w"in W||(W.w="u"in W?W.u%7:"W"in W?1:0),Je="Z"in W?ui(kn(W.y,0,1)).getUTCDay():ci(kn(W.y,0,1)).getDay(),W.m=0,W.d="W"in W?(W.w+6)%7+W.W*7-(Je+5)%7:W.w+W.U*7-(Je+6)%7);return"Z"in W?(W.H+=W.Z/100|0,W.M+=W.Z%100,ui(W)):ci(W)}}function V(X,oe,ce,W){for(var be=0,me=oe.length,Je=ce.length,Ge,Me;be<me;){if(W>=Je)return-1;if(Ge=oe.charCodeAt(be++),Ge===37){if(Ge=oe.charAt(be++),Me=T[Ge in Uu?oe.charAt(be++):Ge],!Me||(W=Me(X,ce,W))<0)return-1}else if(Ge!=ce.charCodeAt(W++))return-1}return W}function B(X,oe,ce){var W=c.exec(oe.slice(ce));return W?(X.p=u.get(W[0].toLowerCase()),ce+W[0].length):-1}function y(X,oe,ce){var W=p.exec(oe.slice(ce));return W?(X.w=f.get(W[0].toLowerCase()),ce+W[0].length):-1}function R(X,oe,ce){var W=d.exec(oe.slice(ce));return W?(X.w=h.get(W[0].toLowerCase()),ce+W[0].length):-1}function G(X,oe,ce){var W=S.exec(oe.slice(ce));return W?(X.m=E.get(W[0].toLowerCase()),ce+W[0].length):-1}function P(X,oe,ce){var W=m.exec(oe.slice(ce));return W?(X.m=v.get(W[0].toLowerCase()),ce+W[0].length):-1}function N(X,oe,ce){return V(X,t,oe,ce)}function re(X,oe,ce){return V(X,r,oe,ce)}function Z(X,oe,ce){return V(X,n,oe,ce)}function ae(X){return s[X.getDay()]}function te(X){return o[X.getDay()]}function se(X){return l[X.getMonth()]}function J(X){return i[X.getMonth()]}function ee(X){return a[+(X.getHours()>=12)]}function he(X){return 1+~~(X.getMonth()/3)}function Pe(X){return s[X.getUTCDay()]}function ze(X){return o[X.getUTCDay()]}function Se(X){return l[X.getUTCMonth()]}function lt(X){return i[X.getUTCMonth()]}function tt(X){return a[+(X.getUTCHours()>=12)]}function ye(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var oe=C(X+="",O);return oe.toString=function(){return X},oe},parse:function(X){var oe=A(X+="",!1);return oe.toString=function(){return X},oe},utcFormat:function(X){var oe=C(X+="",w);return oe.toString=function(){return X},oe},utcParse:function(X){var oe=A(X+="",!0);return oe.toString=function(){return X},oe}}}var Uu={"-":"",_:" ",0:"0"},qe=/^\s*\d+/,Jx=/^%/,Wx=/[\\^$*+?|[\]().{}]/g;function ge(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",o=a.length;return n+(o<r?new Array(r-o+1).join(t)+a:a)}function Yx(e){return e.replace(Wx,"\\$&")}function Un(e){return new RegExp("^(?:"+e.map(Yx).join("|")+")","i")}function Ln(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Kx(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Qx(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Xx(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Zx(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function e1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Lu(e,t,r){var n=qe.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Du(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function t1(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function r1(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function n1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Fu(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function a1(e,t,r){var n=qe.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Bu(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function o1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function s1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function i1(e,t,r){var n=qe.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function l1(e,t,r){var n=qe.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function c1(e,t,r){var n=Jx.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function u1(e,t,r){var n=qe.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function d1(e,t,r){var n=qe.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Nu(e,t){return ge(e.getDate(),t,2)}function h1(e,t){return ge(e.getHours(),t,2)}function p1(e,t){return ge(e.getHours()%12||12,t,2)}function m1(e,t){return ge(1+Ra.count(Ht(e),e),t,3)}function kp(e,t){return ge(e.getMilliseconds(),t,3)}function f1(e,t){return kp(e,t)+"000"}function g1(e,t){return ge(e.getMonth()+1,t,2)}function y1(e,t){return ge(e.getMinutes(),t,2)}function b1(e,t){return ge(e.getSeconds(),t,2)}function v1(e){var t=e.getDay();return t===0?7:t}function x1(e,t){return ge(gs.count(Ht(e)-1,e),t,2)}function Up(e){var t=e.getDay();return t>=4||t===0?hn(e):hn.ceil(e)}function S1(e,t){return e=Up(e),ge(hn.count(Ht(e),e)+(Ht(e).getDay()===4),t,2)}function O1(e){return e.getDay()}function w1(e,t){return ge(ko.count(Ht(e)-1,e),t,2)}function C1(e,t){return ge(e.getFullYear()%100,t,2)}function P1(e,t){return e=Up(e),ge(e.getFullYear()%100,t,2)}function T1(e,t){return ge(e.getFullYear()%1e4,t,4)}function R1(e,t){var r=e.getDay();return e=r>=4||r===0?hn(e):hn.ceil(e),ge(e.getFullYear()%1e4,t,4)}function A1(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ge(t/60|0,"0",2)+ge(t%60,"0",2)}function zu(e,t){return ge(e.getUTCDate(),t,2)}function _1(e,t){return ge(e.getUTCHours(),t,2)}function E1(e,t){return ge(e.getUTCHours()%12||12,t,2)}function V1(e,t){return ge(1+fs.count(qt(e),e),t,3)}function Lp(e,t){return ge(e.getUTCMilliseconds(),t,3)}function I1(e,t){return Lp(e,t)+"000"}function M1(e,t){return ge(e.getUTCMonth()+1,t,2)}function j1(e,t){return ge(e.getUTCMinutes(),t,2)}function $1(e,t){return ge(e.getUTCSeconds(),t,2)}function k1(e){var t=e.getUTCDay();return t===0?7:t}function U1(e,t){return ge(ys.count(qt(e)-1,e),t,2)}function Dp(e){var t=e.getUTCDay();return t>=4||t===0?pn(e):pn.ceil(e)}function L1(e,t){return e=Dp(e),ge(pn.count(qt(e),e)+(qt(e).getUTCDay()===4),t,2)}function D1(e){return e.getUTCDay()}function F1(e,t){return ge(Uo.count(qt(e)-1,e),t,2)}function B1(e,t){return ge(e.getUTCFullYear()%100,t,2)}function N1(e,t){return e=Dp(e),ge(e.getUTCFullYear()%100,t,2)}function z1(e,t){return ge(e.getUTCFullYear()%1e4,t,4)}function G1(e,t){var r=e.getUTCDay();return e=r>=4||r===0?pn(e):pn.ceil(e),ge(e.getUTCFullYear()%1e4,t,4)}function H1(){return"+0000"}function Gu(){return"%"}function Hu(e){return+e}function qu(e){return Math.floor(+e/1e3)}var Gr,Fp,Bp;q1({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function q1(e){return Gr=qx(e),Fp=Gr.format,Gr.parse,Bp=Gr.utcFormat,Gr.utcParse,Gr}function J1(e){return new Date(e)}function W1(e){return e instanceof Date?+e:+new Date(+e)}function nc(e,t,r,n,a,o,s,i,l,c){var u=Rp(),d=u.invert,h=u.domain,p=c(".%L"),f=c(":%S"),m=c("%I:%M"),v=c("%I %p"),S=c("%a %d"),E=c("%b %d"),O=c("%B"),w=c("%Y");function T(C){return(l(C)<C?p:i(C)<C?f:s(C)<C?m:o(C)<C?v:n(C)<C?a(C)<C?S:E:r(C)<C?O:w)(C)}return u.invert=function(C){return new Date(d(C))},u.domain=function(C){return arguments.length?h(Array.from(C,W1)):h().map(J1)},u.ticks=function(C){var A=h();return e(A[0],A[A.length-1],C??10)},u.tickFormat=function(C,A){return A==null?T:c(A)},u.nice=function(C){var A=h();return(!C||typeof C.range!="function")&&(C=t(A[0],A[A.length-1],C??10)),C?h(Vp(A,C)):u},u.copy=function(){return ms(u,nc(e,t,r,n,a,o,s,i,l,c))},u}function Np(){return ur.apply(nc(Gx,Hx,Ht,tc,gs,Ra,Zl,Ql,gr,Fp).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Y1(){return ur.apply(nc(Nx,zx,qt,rc,ys,fs,ec,Xl,gr,Bp).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function K1(){var e=0,t=1,r,n,a,o,s=ft,i=!1,l;function c(d){return d==null||isNaN(d=+d)?l:s(a===0?.5:(d=(o(d)-r)*a,i?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,r=o(e=+e),n=o(t=+t),a=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(d){return arguments.length?(i=!!d,c):i},c.interpolator=function(d){return arguments.length?(s=d,c):s};function u(d){return function(h){var p,f;return arguments.length?([p,f]=h,s=d(p,f),c):[s(0),s(1)]}}return c.range=u(ps),c.rangeRound=u(Tp),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return o=d,r=d(e),n=d(t),a=r===n?0:1/(n-r),c}}function Q1(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function zp(){var e=Wl(K1()(ft));return e.copy=function(){return Q1(e,zp())},Uv.apply(e,arguments)}function X1(e,t){return function(n,a){return a.location==="tick"?a.scale.tickFormat(e)(n):a.location==="zoom-slider-tooltip"?t.tickFormat(2)(n):`${n}`}}function Z1(e){return e.scaleType==="band"}function eS(e){return e.scaleType==="point"}function tS(e){return e.type==="piecewise"?Mp(e.thresholds,e.colors):zp([e.min??0,e.max??100],e.color)}function Lo(e){return e.values?Vo(e.values,e.colors).unknown(e.unknownColor??null):Vo(e.colors.map((t,r)=>r),e.colors).unknown(e.unknownColor??null)}function go(e){return e.type==="ordinal"?Lo(e):tS(e)}function rS(e){const{tickMaxStep:t,tickMinStep:r,tickNumber:n,range:a,domain:o}=e,s=r===void 0?999:Math.floor(Math.abs(o[1]-o[0])/r),i=t===void 0?2:Math.ceil(Math.abs(o[1]-o[0])/t),l=n??Math.floor(Math.abs(a[1]-a[0])/50);return Math.min(s,Math.max(i,l))}function nS(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function Ji(e,t,r){switch(e){case"log":return Ip(t,r);case"pow":return Yl(t,r);case"sqrt":return Mx(t,r);case"time":return Np(t,r);case"utc":return Y1(t,r);default:return Ep(t,r)}}const Ju=e=>(e==null?void 0:e[0])instanceof Date;function Wu(e,t){const r=Np(e.data,t);return(n,{location:a})=>a==="tick"?r.tickFormat(e.tickNumber)(n):`${n.toLocaleString()}`}const di=(e,t)=>{const r=e[1]-e[0],n=t[1]-t[0],a=e[0]-t[0]*r/n,o=e[1]+(100-t[1])*r/n;return[a,o]};let Yu,Ku;class aS{constructor(){if(this.types=new Set,Yu)throw new Error("You can only create one instance!");Yu=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class oS{constructor(){if(this.types=new Set,Ku)throw new Error("You can only create one instance!");Ku=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const bs=new aS;bs.addType("bar");bs.addType("line");bs.addType("scatter");const sS=new oS;sS.addType("radar");function Gp(e){return bs.getTypes().has(e)}const iS=(e,t,r,n,a,o,s,i)=>{var f;const l=n==="x"?a[t].xExtremumGetter:a[t].yExtremumGetter,c=((f=s[t])==null?void 0:f.series)??{},[u,d]=(l==null?void 0:l({series:c,axis:r,axisIndex:o,isDefaultAxis:o===0,getFilters:i}))??[1/0,-1/0],[h,p]=e;return[Math.min(u,h),Math.max(d,p)]},Hp=(e,t,r,n,a,o)=>{const i=Object.keys(r).filter(Gp).reduce((l,c)=>iS(l,c,e,t,r,n,a,o),[1/0,-1/0]);return Number.isNaN(i[0])||Number.isNaN(i[1])?[1/0,-1/0]:i},lS=(e,t,r,n)=>{const a=new Set;return Object.keys(t).filter(Gp).forEach(s=>{var c,u,d;const i=((c=r[s])==null?void 0:c.series)??{},l=(d=(u=t[s]).axisTooltipGetter)==null?void 0:d.call(u,i);l!==void 0&&l.forEach(({axisId:h,direction:p})=>{p===e&&a.add(h??n)})}),a},cS=(e,t,r,n)=>{var a;if(e.domainLimit!==void 0)return e.domainLimit;if(t==="x")for(const o of((a=n.line)==null?void 0:a.seriesOrder)??[]){const s=n.line.series[o];if(s.xAxisId===e.id||s.xAxisId===void 0&&r===0)return"strict"}return"nice"};function uS(e,t,r){const n=t==="x"?[e.left,e.left+e.width]:[e.top+e.height,e.top];return r.reverse?[n[1],n[0]]:n}const dS=.2,hS=.1;function qp({drawingArea:e,formattedSeries:t,axis:r,seriesConfig:n,axisDirection:a,zoomMap:o,zoomOptions:s,getFilters:i,preferStrictDomainInLineCharts:l}){if(r===void 0)return{axis:{},axisIds:[]};const c=lS(a,n,t,r[0].id),u={};return r.forEach((d,h)=>{const p=d,f=s==null?void 0:s[p.id],m=o==null?void 0:o.get(p.id),v=m?[m.start,m.end]:[0,100],S=uS(e,a,p),[E,O]=Hp(p,a,n,h,t,m===void 0&&!f?i:void 0),w=!p.ignoreTooltip&&c.has(p.id),T=p.data??[];if(Z1(p)){const ae=p.categoryGapRatio??dS,te=p.barGapRatio??hS,se=a==="y"?[S[1],S[0]]:S,J=di(se,v);if(u[p.id]=Y({offset:0,height:0,categoryGapRatio:ae,barGapRatio:te,triggerTooltip:w},p,{data:T,scale:Bl(p.data,J).paddingInner(ae).paddingOuter(ae/2),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?Lo(Y({values:p.data},p.colorMap)):go(p.colorMap))}),Ju(p.data)){const ee=Wu(p,se);u[p.id].valueFormatter=p.valueFormatter??ee}}if(eS(p)){const ae=a==="y"?[...S].reverse():S,te=di(ae,v);if(u[p.id]=Y({offset:0,height:0,triggerTooltip:w},p,{data:T,scale:Lv(p.data,te),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?Lo(Y({values:p.data},p.colorMap)):go(p.colorMap))}),Ju(p.data)){const se=Wu(p,ae);u[p.id].valueFormatter=p.valueFormatter??se}}if(p.scaleType==="band"||p.scaleType==="point")return;const C=p.scaleType??"linear",A=l?cS(p,a,h,t):p.domainLimit??"nice",V=[p.min??E,p.max??O];if(typeof A=="function"){const{min:ae,max:te}=A(E,O);V[0]=ae,V[1]=te}const B=rS(Y({},p,{range:S,domain:V})),y=nS(B,v),R=di(S,v),G=Ji(C,V,R),P=A==="nice"?G.nice(B):G,[N,re]=P.domain(),Z=[p.min??N,p.max??re];u[p.id]=Y({offset:0,height:0,triggerTooltip:w},p,{data:T,scaleType:C,scale:P.domain(Z),tickNumber:y,colorScale:p.colorMap&&go(p.colorMap),valueFormatter:p.valueFormatter??X1(y,Ji(C,S.map(ae=>G.invert(ae)),S))})}),{axis:u,axisIds:r.map(({id:d})=>d)}}function pS(e){return e!=null}function Jp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:a}){return(o,s)=>{var v;const i=t[o.id];if(!i||i.filterMode!=="discard")return null;const l=e==null?void 0:e.get(o.id);if(l===void 0||l.start<=0&&l.end>=100)return null;let c=[];const u=o.scaleType;u==="point"||u==="band"?c=[0,(((v=o.data)==null?void 0:v.length)??1)-1]:c=Hp(o,a,r,s,n);let d,h;[d,h]=Ji(!u||u==="band"||u==="point"?"linear":u,c,[0,100]).nice().domain(),d=d instanceof Date?d.getTime():d,h=h instanceof Date?h.getTime():h;const f=d+l.start*(h-d)/100,m=d+l.end*(h-d)/100;return(S,E)=>{var w;const O=S[a]??((w=o.data)==null?void 0:w[E]);return O==null?!0:o.scaleType==="point"||o.scaleType==="band"||typeof O=="string"?E>=f&&E<=m:O>=f&&O<=m}}}const mS=e=>({currentAxisId:t,seriesXAxisId:r,seriesYAxisId:n,isDefaultAxis:a})=>(o,s)=>{var c,u;return!(t===r?n:r)||a?((u=(c=Object.values(e??{}))[0])==null?void 0:u.call(c,o,s))??!0:[n,r].filter(d=>d!==t).map(d=>e[d??""]).filter(pS).every(d=>d(o,s))},Qu=e=>(t=[])=>t.reduce((r,n)=>{const{zoom:a,id:o}=n,s=Dl(a,o,e);return s&&(r[o]=s),r},{}),fS=e=>{const t=new Map;return e.forEach(r=>{t.set(r.axisId,r)}),t},Wp=e=>e.zoom;pe([Wp],e=>e==null?void 0:e.isInteracting);const vs=pe([Wp],e=>(e==null?void 0:e.zoomData)&&fS(e==null?void 0:e.zoomData)),Aa=pe([vn,xn],(e,t)=>Y({},Qu("x")(e),Qu("y")(t)));pe([Aa,(e,t)=>t],(e,t)=>e[t]);const gS=pe([vs,Aa,hs,Ca],(e,t,r,n)=>e&&t&&Jp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"x"})),yS=pe([vs,Aa,hs,Ca],(e,t,r,n)=>e&&t&&Jp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"y"})),Yp=pe([gS,yS,vn,xn],(e,t,r,n)=>{if(e===void 0||t===void 0)return;const a=r==null?void 0:r.reduce((s,i,l)=>{const c=e(i,l);return c!==null&&(s[i.id]=c),s},{}),o=n==null?void 0:n.reduce((s,i,l)=>{const c=t(i,l);return c!==null&&(s[i.id]=c),s},{});if(!(Object.keys(a??{}).length===0&&Object.keys(o??{}).length===0))return mS(Y({},a,o))}),_r=pe([vn,wa,Ca,hs,vs,Aa,Yp,dp],(e,t,r,n,a,o,s,i)=>qp({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"x",zoomMap:a,zoomOptions:o,getFilters:s,preferStrictDomainInLineCharts:i})),Er=pe([xn,wa,Ca,hs,vs,Aa,Yp,dp],(e,t,r,n,a,o,s,i)=>qp({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"y",zoomMap:a,zoomOptions:o,getFilters:s,preferStrictDomainInLineCharts:i}));pe([_r,Er,(e,t)=>t],(e,t,r)=>(e==null?void 0:e.axis[r])??(t==null?void 0:t.axis[r]));pe([vn,xn,(e,t)=>t],(e,t,r)=>{const n=(e==null?void 0:e.find(a=>a.id===r))??(t==null?void 0:t.find(a=>a.id===r))??null;if(n)return n});function Kp(e){return e.bandwidth!==void 0}function Hr(e){return e instanceof Date?e.getTime():e}function mn(e,t){const{scale:r,data:n,reverse:a}=e;if(!Kp(r)){const s=r.invert(t);if(n===void 0)return-1;const i=Hr(s);return n==null?void 0:n.findIndex((c,u)=>{const d=Hr(c);return d>i&&(u===0||Math.abs(i-d)<=Math.abs(i-Hr(n[u-1])))||d<=i&&(u===n.length-1||Math.abs(Hr(s)-d)<Math.abs(Hr(s)-Hr(n[u+1])))})}const o=r.bandwidth()===0?Math.floor((t-Math.min(...r.range())+r.step()/2)/r.step()):Math.floor((t-Math.min(...r.range()))/r.step());return o<0||o>=n.length?-1:a?n.length-1-o:o}function Xu(e,t,r){const{scale:n,data:a}=e;if(!Kp(n)){const o=n.invert(t);return r<0?o:a[r]}return r<0||r>=a.length?null:a[r]}function Zu(e,t){const r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r.matrixTransform(e.getScreenCTM().inverse())}function en(e){const t=I.useRef(e);return Nt(()=>{t.current=e}),I.useRef((...r)=>(0,t.current)(...r)).current}const bS=Object.is;function Qp(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=0,n=0;for(const a in e)if(r+=1,!bS(e[a],t[a])||!(a in t))return!1;for(const a in t)n+=1;return r===n}const ac=({store:e})=>{const t=en(function(){e.update(s=>Y({},s,{interaction:{pointer:null,item:null}}))}),r=en(function(s){e.update(i=>{const l=i.interaction.item;return s?l===null||Object.keys(s).some(c=>s[c]!==l[c])?i:Y({},i,{interaction:Y({},i.interaction,{item:null})}):l===null?i:Y({},i,{interaction:Y({},i.interaction,{item:null})})})}),n=en(function(s){e.update(i=>Qp(i.interaction.item,s)?i:Y({},i,{interaction:Y({},i.interaction,{item:s})}))}),a=en(function(s){e.update(i=>Y({},i,{interaction:Y({},i.interaction,{pointer:s})}))});return{instance:{cleanInteraction:t,setItemInteraction:n,removeItemInteraction:r,setPointerCoordinate:a}}};ac.getInitialState=()=>({interaction:{item:null,pointer:null}});ac.params={};const oc=e=>e.interaction,vS=pe([oc],e=>e!==void 0),xS=pe([oc],e=>(e==null?void 0:e.item)??null),Xp=pe([oc],e=>(e==null?void 0:e.pointer)??null),xs=pe([Xp],e=>e&&e.x),Ss=pe([Xp],e=>e&&e.y);pe([xS],e=>e!==null);function ta(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const a=e.length;if(a!==t.length)return!1;for(let o=0;o<a;o+=1)if(!ta(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const a=Array.from(e.entries());for(let o=0;o<a.length;o+=1)if(!t.has(a[o][0]))return!1;for(let o=0;o<a.length;o+=1){const s=a[o];if(!ta(s[1],t.get(s[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const a=Array.from(e.entries());for(let o=0;o<a.length;o+=1)if(!t.has(a[o][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const a=e.length;if(a!==t.length)return!1;for(let o=0;o<a;o+=1)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=r.length;if(n!==Object.keys(t).length)return!1;for(let a=0;a<n;a+=1)if(!Object.prototype.hasOwnProperty.call(t,r[a]))return!1;for(let a=0;a<n;a+=1){const o=r[a];if(!ta(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}const Os=(e,t)=>t;function Wi(e,t,r=t.axisIds[0]){return Array.isArray(r)?r.map(n=>mn(t.axis[n],e)):mn(t.axis[r],e)}const Zp=(e,t,r)=>{if(e===null)return null;const n=Wi(e,t,r);return n===-1?null:n},SS=pe([xs,_r,Os],Zp),OS=pe([Ss,Er,Os],Zp),wS=pe([xs,Ss,_r,Er],(e,t,r,n)=>[...e===null?[]:r.axisIds.map(a=>({axisId:a,dataIndex:Wi(e,r,a)})),...t===null?[]:n.axisIds.map(a=>({axisId:a,dataIndex:Wi(t,n,a)}))].filter(a=>a.dataIndex!==null&&a.dataIndex>=0));function em(e,t,r,n=t.axisIds[0]){return Array.isArray(n)?n.map((a,o)=>Xu(t.axis[a],e,r[o])):Xu(t.axis[n],e,r)}pe([xs,_r,SS,Os],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:em(e,t,r,n));pe([Ss,Er,OS,Os],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:em(e,t,r,n));const CS=pe([xs,_r],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:mn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:ta}}),PS=pe([Ss,Er],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:mn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:ta}});pe([CS,PS],(e,t)=>e.length>0||t.length>0);const ed={};function TS(e,t){const r=I.useRef(ed);return r.current===ed&&(r.current=e(t)),r}const RS=()=>{};function AS(e,t,r,n){const a=TS(_S,{store:e,selector:t,skip:n}).current;a.effect=r,I.useEffect(a.onMount(n),[n])}function _S(e){const{store:t,selector:r,skip:n}=e;let a=!1,o;const s=()=>{i.dispose??(i.dispose=t.subscribe(l=>{const c=r(l);i.effect(o,c),o=c}))},i={effect:RS,dispose:null,onMount:l=>()=>{if(!l)return a||(a=!0,o=r(t.value)),s(),()=>{var c;(c=i.dispose)==null||c.call(i),i.dispose=null}}};return n||(a=!0,o=r(t.value),s()),i}const ws=({params:e,store:t,seriesConfig:r,svgRef:n,instance:a})=>{const{xAxis:o,yAxis:s,dataset:i,onHighlightedAxisChange:l}=e;if(process.env.NODE_ENV!=="production"){const O=[...o??[],...s??[]].filter(T=>T.id).map(T=>T.id),w=new Set(O.filter((T,C)=>O.indexOf(T)!==C));w.size>0&&ia([`MUI X Charts: The following axis ids are duplicated: ${Array.from(w).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
|
|
116
|
-
`),"error")}const c=ot(t,wa),u=ot(t,Ca),d=ot(t,vS),{axis:h,axisIds:p}=ot(t,_r),{axis:f,axisIds:m}=ot(t,Er);gp({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),Nt(()=>{e.highlightedAxis!==void 0&&t.update(O=>O.controlledCartesianAxisHighlight===e.highlightedAxis?O:Y({},O,{controlledCartesianAxisHighlight:e.highlightedAxis}))},[t,e.highlightedAxis]);const v=I.useRef(!0);I.useEffect(()=>{if(v.current){v.current=!1;return}t.update(O=>Y({},O,{cartesianAxis:Y({},O.cartesianAxis,{x:vp(o,i),y:xp(s,i)})}))},[r,c,o,s,i,t]);const S=p[0],E=m[0];return AS(t,wS,(O,w)=>{if(!Object.is(O,w)){if(O.length!==w.length){l(w);return}O!=null&&O.some(({axisId:T,dataIndex:C},A)=>w[A].axisId!==T||w[A].dataIndex!==C)&&l(w)}},!l),I.useEffect(()=>{const O=n.current;if(!d||!O||e.disableAxisListener)return()=>{};const w=a.addInteractionListener("moveEnd",R=>{var G;R.detail.activeGestures.pan||(G=a.cleanInteraction)==null||G.call(a)}),T=a.addInteractionListener("panEnd",R=>{var G;R.detail.activeGestures.move||(G=a.cleanInteraction)==null||G.call(a)}),C=a.addInteractionListener("quickPressEnd",R=>{var G;!R.detail.activeGestures.move&&!R.detail.activeGestures.pan&&((G=a.cleanInteraction)==null||G.call(a))}),A=R=>{var re,Z;const G=R.detail.srcEvent,P=R.detail.target,N=Zu(O,G);if(R.detail.srcEvent.buttons>=1&&(P!=null&&P.hasPointerCapture(R.detail.srcEvent.pointerId))&&!(P!=null&&P.closest("[data-charts-zoom-slider]"))&&(P==null||P.releasePointerCapture(R.detail.srcEvent.pointerId)),!a.isPointInside(N.x,N.y,P)){(re=a.cleanInteraction)==null||re.call(a);return}(Z=a.setPointerCoordinate)==null||Z.call(a,N)},V=a.addInteractionListener("move",A),B=a.addInteractionListener("pan",A),y=a.addInteractionListener("quickPress",A);return()=>{V.cleanup(),w.cleanup(),B.cleanup(),T.cleanup(),y.cleanup(),C.cleanup()}},[n,t,h,S,f,E,a,e.disableAxisListener,d]),I.useEffect(()=>{const O=n.current,w=e.onAxisClick;if(O===null||!w)return()=>{};const T=a.addInteractionListener("tap",C=>{let A=null,V=!1;const B=Zu(O,C.detail.srcEvent),y=mn(h[S],B.x);V=y!==-1,A=V?y:mn(f[E],B.y);const R=V?p[0]:m[0];if(A==null||A===-1)return;const G=(V?h:f)[R].data[A],P={};Object.keys(u).filter(N=>["bar","line"].includes(N)).forEach(N=>{var re;(re=u[N])==null||re.seriesOrder.forEach(Z=>{const ae=u[N].series[Z],te=ae.xAxisId,se=ae.yAxisId,J=V?te:se;(J===void 0||J===R)&&(P[Z]=ae.data[A])})}),w(C.detail.srcEvent,{dataIndex:A,axisValue:G,seriesValues:P})});return()=>{T.cleanup()}},[e.onAxisClick,u,n,h,p,f,m,S,E,a]),{}};ws.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};ws.getDefaultizedParams=({params:e})=>Y({},e,{colors:e.colors??hp,theme:e.theme??"light",defaultizedXAxis:vp(e.xAxis,e.dataset),defaultizedYAxis:xp(e.yAxis,e.dataset)});ws.getInitialState=e=>Y({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});function td(e,t){return e.id!==void 0?e:Y({id:t},e)}function rd(e){return e.colorMap?Y({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?Lo(Y({values:e.data},e.colorMap)):go(e.colorMap.type==="continuous"?Y({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function tm(e,t){if(!e||e.length===0)return{axis:{},axisIds:[]};const r={},n=[];return e.forEach((a,o)=>{const s=a.dataKey,i=a.id??`defaultized-z-axis-${o}`;if(s===void 0||a.data!==void 0){r[i]=rd(td(a,i)),n.push(i);return}if(t===void 0)throw new Error("MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.");r[i]=rd(td(Y({},a,{data:t.map(l=>l[s])}),i)),n.push(i)}),{axis:r,axisIds:n}}const sc=({params:e,store:t})=>{const{zAxis:r,dataset:n}=e,a=I.useRef(!0);return I.useEffect(()=>{if(a.current){a.current=!1;return}t.update(o=>Y({},o,{zAxis:tm(r,n)}))},[r,n,t]),{}};sc.params={zAxis:!0,dataset:!0};sc.getInitialState=e=>({zAxis:tm(e.zAxis,e.dataset)});const ES=e=>e,VS=pe([ES],e=>e.zAxis),Cs=({store:e,params:t})=>{gp({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),Nt(()=>{e.update(a=>a.highlight.item===t.highlightedItem?a:Y({},a,{highlight:Y({},a.highlight,{item:t.highlightedItem})}))},[e,t.highlightedItem]);const r=en(()=>{var a;(a=t.onHighlightChange)==null||a.call(t,null),e.update(o=>Y({},o,{highlight:{item:null}}))}),n=en(a=>{var s;const o=e.getSnapshot().highlight.item;Qp(o,a)||((s=t.onHighlightChange)==null||s.call(t,a),e.update(i=>Y({},i,{highlight:{item:a}})))});return{instance:{clearHighlight:r,setHighlight:n}}};Cs.getDefaultizedParams=({params:e})=>Y({},e,{highlightedItem:e.highlightedItem??null});Cs.getInitialState=e=>({highlight:{item:e.highlightedItem}});Cs.params={highlightedItem:!0,onHighlightChange:!0};const nd=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},rm=e=>{var l;const{axis:t,getFilters:r,isDefaultAxis:n}=e,a=r==null?void 0:r({currentAxisId:t.id,isDefaultAxis:n}),o=a?(l=t.data)==null?void 0:l.filter((c,u)=>a({x:null,y:null},u)):t.data,s=Math.min(...o??[]),i=Math.max(...o??[]);return[s,i]},nm=e=>t=>{const{series:r,axis:n,getFilters:a,isDefaultAxis:o}=t;return Object.keys(r).filter(s=>{const i=e==="x"?r[s].xAxisId:r[s].yAxisId;return i===n.id||o&&i===void 0}).reduce((s,i)=>{const{stackedData:l}=r[i],c=a==null?void 0:a({currentAxisId:n.id,isDefaultAxis:o,seriesXAxisId:r[i].xAxisId,seriesYAxisId:r[i].yAxisId}),[u,d]=(l==null?void 0:l.reduce((h,p,f)=>c&&(!c(nd(p[0],e),f)||!c(nd(p[1],e),f))?h:[Math.min(...p,h[0]),Math.max(...p,h[1])],[1/0,-1/0]))??[1/0,-1/0];return[Math.min(u,s[0]),Math.max(d,s[1])]},[1/0,-1/0])},IS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?nm("x")(e):rm(e),MS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?rm(e):nm("y")(e);function Be(e){return function(){return e}}const ad=Math.abs,Ke=Math.atan2,dr=Math.cos,jS=Math.max,hi=Math.min,Rt=Math.sin,tn=Math.sqrt,nt=1e-12,ha=Math.PI,Do=ha/2,yo=2*ha;function $S(e){return e>1?0:e<-1?ha:Math.acos(e)}function od(e){return e>=1?Do:e<=-1?-Do:Math.asin(e)}const Yi=Math.PI,Ki=2*Yi,pr=1e-6,kS=Ki-pr;function am(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function US(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return am;const r=10**t;return function(n){this._+=n[0];for(let a=1,o=n.length;a<o;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class LS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?am:US(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,o,s){this._append`C${+t},${+r},${+n},${+a},${this._x1=+o},${this._y1=+s}`}arcTo(t,r,n,a,o){if(t=+t,r=+r,n=+n,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,i=this._y1,l=n-t,c=a-r,u=s-t,d=i-r,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>pr)if(!(Math.abs(d*l-c*u)>pr)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-s,f=a-i,m=l*l+c*c,v=p*p+f*f,S=Math.sqrt(m),E=Math.sqrt(h),O=o*Math.tan((Yi-Math.acos((m+h-v)/(2*S*E)))/2),w=O/E,T=O/S;Math.abs(w-1)>pr&&this._append`L${t+w*u},${r+w*d}`,this._append`A${o},${o},0,0,${+(d*p>u*f)},${this._x1=t+T*l},${this._y1=r+T*c}`}}arc(t,r,n,a,o,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(a),l=n*Math.sin(a),c=t+i,u=r+l,d=1^s,h=s?a-o:o-a;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>pr||Math.abs(this._y1-u)>pr)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%Ki+Ki),h>kS?this._append`A${n},${n},0,1,${d},${t-i},${r-l}A${n},${n},0,1,${d},${this._x1=c},${this._y1=u}`:h>pr&&this._append`A${n},${n},0,${+(h>=Yi)},${d},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function DS(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new LS(t)}function FS(e){return e.innerRadius}function BS(e){return e.outerRadius}function NS(e){return e.startAngle}function zS(e){return e.endAngle}function GS(e){return e&&e.padAngle}function HS(e,t,r,n,a,o,s,i){var l=r-e,c=n-t,u=s-a,d=i-o,h=d*l-u*c;if(!(h*h<nt))return h=(u*(t-o)-d*(e-a))/h,[e+h*l,t+h*c]}function Qa(e,t,r,n,a,o,s){var i=e-r,l=t-n,c=(s?o:-o)/tn(i*i+l*l),u=c*l,d=-c*i,h=e+u,p=t+d,f=r+u,m=n+d,v=(h+f)/2,S=(p+m)/2,E=f-h,O=m-p,w=E*E+O*O,T=a-o,C=h*m-f*p,A=(O<0?-1:1)*tn(jS(0,T*T*w-C*C)),V=(C*O-E*A)/w,B=(-C*E-O*A)/w,y=(C*O+E*A)/w,R=(-C*E+O*A)/w,G=V-v,P=B-S,N=y-v,re=R-S;return G*G+P*P>N*N+re*re&&(V=y,B=R),{cx:V,cy:B,x01:-u,y01:-d,x11:V*(a/T-1),y11:B*(a/T-1)}}function om(){var e=FS,t=BS,r=Be(0),n=null,a=NS,o=zS,s=GS,i=null,l=DS(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),f=a.apply(this,arguments)-Do,m=o.apply(this,arguments)-Do,v=ad(m-f),S=m>f;if(i||(i=u=l()),p<h&&(d=p,p=h,h=d),!(p>nt))i.moveTo(0,0);else if(v>yo-nt)i.moveTo(p*dr(f),p*Rt(f)),i.arc(0,0,p,f,m,!S),h>nt&&(i.moveTo(h*dr(m),h*Rt(m)),i.arc(0,0,h,m,f,S));else{var E=f,O=m,w=f,T=m,C=v,A=v,V=s.apply(this,arguments)/2,B=V>nt&&(n?+n.apply(this,arguments):tn(h*h+p*p)),y=hi(ad(p-h)/2,+r.apply(this,arguments)),R=y,G=y,P,N;if(B>nt){var re=od(B/h*Rt(V)),Z=od(B/p*Rt(V));(C-=re*2)>nt?(re*=S?1:-1,w+=re,T-=re):(C=0,w=T=(f+m)/2),(A-=Z*2)>nt?(Z*=S?1:-1,E+=Z,O-=Z):(A=0,E=O=(f+m)/2)}var ae=p*dr(E),te=p*Rt(E),se=h*dr(T),J=h*Rt(T);if(y>nt){var ee=p*dr(O),he=p*Rt(O),Pe=h*dr(w),ze=h*Rt(w),Se;if(v<ha)if(Se=HS(ae,te,Pe,ze,ee,he,se,J)){var lt=ae-Se[0],tt=te-Se[1],ye=ee-Se[0],X=he-Se[1],oe=1/Rt($S((lt*ye+tt*X)/(tn(lt*lt+tt*tt)*tn(ye*ye+X*X)))/2),ce=tn(Se[0]*Se[0]+Se[1]*Se[1]);R=hi(y,(h-ce)/(oe-1)),G=hi(y,(p-ce)/(oe+1))}else R=G=0}A>nt?G>nt?(P=Qa(Pe,ze,ae,te,p,G,S),N=Qa(ee,he,se,J,p,G,S),i.moveTo(P.cx+P.x01,P.cy+P.y01),G<y?i.arc(P.cx,P.cy,G,Ke(P.y01,P.x01),Ke(N.y01,N.x01),!S):(i.arc(P.cx,P.cy,G,Ke(P.y01,P.x01),Ke(P.y11,P.x11),!S),i.arc(0,0,p,Ke(P.cy+P.y11,P.cx+P.x11),Ke(N.cy+N.y11,N.cx+N.x11),!S),i.arc(N.cx,N.cy,G,Ke(N.y11,N.x11),Ke(N.y01,N.x01),!S))):(i.moveTo(ae,te),i.arc(0,0,p,E,O,!S)):i.moveTo(ae,te),!(h>nt)||!(C>nt)?i.lineTo(se,J):R>nt?(P=Qa(se,J,ee,he,h,-R,S),N=Qa(ae,te,Pe,ze,h,-R,S),i.lineTo(P.cx+P.x01,P.cy+P.y01),R<y?i.arc(P.cx,P.cy,R,Ke(P.y01,P.x01),Ke(N.y01,N.x01),!S):(i.arc(P.cx,P.cy,R,Ke(P.y01,P.x01),Ke(P.y11,P.x11),!S),i.arc(0,0,h,Ke(P.cy+P.y11,P.cx+P.x11),Ke(N.cy+N.y11,N.cx+N.x11),S),i.arc(N.cx,N.cy,R,Ke(N.y11,N.x11),Ke(N.y01,N.x01),!S))):i.arc(0,0,h,T,w,S)}if(i.closePath(),u)return i=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-ha/2;return[dr(d)*u,Rt(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Be(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Be(+u),c):t},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Be(+u),c):r},c.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Be(+u),c):n},c.startAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Be(+u),c):a},c.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Be(+u),c):o},c.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Be(+u),c):s},c.context=function(u){return arguments.length?(i=u??null,c):i},c}function sm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function qS(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function JS(e){return e}function WS(){var e=JS,t=qS,r=null,n=Be(0),a=Be(yo),o=Be(0);function s(i){var l,c=(i=sm(i)).length,u,d,h=0,p=new Array(c),f=new Array(c),m=+n.apply(this,arguments),v=Math.min(yo,Math.max(-yo,a.apply(this,arguments)-m)),S,E=Math.min(Math.abs(v)/c,o.apply(this,arguments)),O=E*(v<0?-1:1),w;for(l=0;l<c;++l)(w=f[p[l]=l]=+e(i[l],l,i))>0&&(h+=w);for(t!=null?p.sort(function(T,C){return t(f[T],f[C])}):r!=null&&p.sort(function(T,C){return r(i[T],i[C])}),l=0,d=h?(v-c*O)/h:0;l<c;++l,m=S)u=p[l],w=f[u],S=m+(w>0?w*d:0)+O,f[u]={data:i[u],index:l,value:w,startAngle:m,endAngle:S,padAngle:E};return f}return s.value=function(i){return arguments.length?(e=typeof i=="function"?i:Be(+i),s):e},s.sortValues=function(i){return arguments.length?(t=i,r=null,s):t},s.sort=function(i){return arguments.length?(r=i,t=null,s):r},s.startAngle=function(i){return arguments.length?(n=typeof i=="function"?i:Be(+i),s):n},s.endAngle=function(i){return arguments.length?(a=typeof i=="function"?i:Be(+i),s):a},s.padAngle=function(i){return arguments.length?(o=typeof i=="function"?i:Be(+i),s):o},s}function fn(e,t){if((s=e.length)>1)for(var r=1,n,a,o=e[t[0]],s,i=o.length;r<s;++r)for(a=o,o=e[t[r]],n=0;n<i;++n)o[n][1]+=o[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function gn(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function YS(e,t){return e[t]}function KS(e){const t=[];return t.key=e,t}function im(){var e=Be([]),t=gn,r=fn,n=YS;function a(o){var s=Array.from(e.apply(this,arguments),KS),i,l=s.length,c=-1,u;for(const d of o)for(i=0,++c;i<l;++i)(s[i][c]=[0,+n(d,s[i].key,c,o)]).data=d;for(i=0,u=sm(t(s));i<l;++i)s[u[i]].index=i;return r(s,u),s}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:Be(Array.from(o)),a):e},a.value=function(o){return arguments.length?(n=typeof o=="function"?o:Be(+o),a):n},a.order=function(o){return arguments.length?(t=o==null?gn:typeof o=="function"?o:Be(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(r=o??fn,a):r},a}function QS(e,t){if((n=e.length)>0){for(var r,n,a=0,o=e[0].length,s;a<o;++a){for(s=r=0;r<n;++r)s+=e[r][a][1]||0;if(s)for(r=0;r<n;++r)e[r][a][1]/=s}fn(e,t)}}function XS(e,t){if((l=e.length)>0)for(var r,n=0,a,o,s,i,l,c=e[t[0]].length;n<c;++n)for(s=i=0,r=0;r<l;++r)(o=(a=e[t[r]][n])[1]-a[0])>0?(a[0]=s,a[1]=s+=o):o<0?(a[1]=i,a[0]=i+=o):(a[0]=0,a[1]=o)}function ZS(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,o=n.length;r<o;++r){for(var s=0,i=0;s<a;++s)i+=e[s][r][1]||0;n[r][1]+=n[r][0]=-i/2}fn(e,t)}}function eO(e,t){if(!(!((s=e.length)>0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,o,s;n<o;++n){for(var i=0,l=0,c=0;i<s;++i){for(var u=e[t[i]],d=u[n][1]||0,h=u[n-1][1]||0,p=(d-h)/2,f=0;f<i;++f){var m=e[t[f]],v=m[n][1]||0,S=m[n-1][1]||0;p+=v-S}l+=d,c+=p*d}a[n-1][1]+=a[n-1][0]=r,l&&(r-=c/l)}a[n-1][1]+=a[n-1][0]=r,fn(e,t)}}function lm(e){var t=e.map(tO);return gn(e).sort(function(r,n){return t[r]-t[n]})}function tO(e){for(var t=-1,r=0,n=e.length,a,o=-1/0;++t<n;)(a=+e[t][1])>o&&(o=a,r=t);return r}function cm(e){var t=e.map(um);return gn(e).sort(function(r,n){return t[r]-t[n]})}function um(e){for(var t=0,r=-1,n=e.length,a;++r<n;)(a=+e[r][1])&&(t+=a);return t}function rO(e){return cm(e).reverse()}function nO(e){var t=e.length,r,n,a=e.map(um),o=lm(e),s=0,i=0,l=[],c=[];for(r=0;r<t;++r)n=o[r],s<i?(s+=a[n],l.push(n)):(i+=a[n],c.push(n));return c.reverse().concat(l)}function aO(e){return gn(e).reverse()}const pi={appearance:lm,ascending:cm,descending:rO,insideOut:nO,none:gn,reverse:aO},mi={expand:QS,diverging:XS,none:fn,silhouette:ZS,wiggle:eO},dm=e=>{const{series:t,seriesOrder:r,defaultStrategy:n}=e,a=[],o={};return r.forEach(s=>{const{stack:i,stackOrder:l,stackOffset:c}=t[s];i===void 0?a.push({ids:[s],stackingOrder:pi.none,stackingOffset:mi.none}):o[i]===void 0?(o[i]=a.length,a.push({ids:[s],stackingOrder:pi[l??(n==null?void 0:n.stackOrder)??"none"],stackingOffset:mi[c??(n==null?void 0:n.stackOffset)??"diverging"]})):(a[o[i]].ids.push(s),l!==void 0&&(a[o[i]].stackingOrder=pi[l]),c!==void 0&&(a[o[i]].stackingOffset=mi[c]))}),a},oO=e=>e==null?"":e.toLocaleString(),sO=(e,t)=>{const{seriesOrder:r,series:n}=e,a=dm(e),o=t??[];r.forEach(i=>{const l=n[i].data;if(l!==void 0)l.forEach((c,u)=>{o.length<=u?o.push({[i]:c}):o[u][i]=c});else if(t===void 0)throw new Error([`MUI X Charts: bar series with id='${i}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
|
|
117
|
-
`))});const s={};return a.forEach(i=>{const{ids:l,stackingOffset:c,stackingOrder:u}=i,d=
|
|
118
|
-
`));const l=s?(r==null?void 0:r.map(c=>({x:c[s.x]??null,y:c[s.y]??null,z:s.z&&c[s.z],id:s.id&&c[s.id]})))??[]:o.data??[];return[a,Y({labelMarkType:"circle",markerSize:4},o,{preview:Y({markerSize:1},o==null?void 0:o.preview),data:l,valueFormatter:o.valueFormatter??(c=>c&&`(${c.x}, ${c.y})`)})]})),seriesOrder:t}),
|
|
119
|
-
`))});const s={};return a.forEach(i=>{const{ids:l,stackingOrder:c,stackingOffset:u}=i,d=
|
|
120
|
-
`));return e};function
|
|
121
|
-
`));return e.store}function
|
|
122
|
-
`));return e.svgRef}function qO(){const e=mm();return I.useCallback(t=>`${e}-gradient-${t}`,[e])}function JO(){const e=mm();return I.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var fi,sd;function WO(){if(sd)return fi;sd=1;var e=4,t=.001,r=1e-7,n=10,a=11,o=1/(a-1),s=typeof Float32Array=="function";function i(m,v){return 1-3*v+3*m}function l(m,v){return 3*v-6*m}function c(m){return 3*m}function u(m,v,S){return((i(v,S)*m+l(v,S))*m+c(v))*m}function d(m,v,S){return 3*i(v,S)*m*m+2*l(v,S)*m+c(v)}function h(m,v,S,E,O){var w,T,C=0;do T=v+(S-v)/2,w=u(T,E,O)-m,w>0?S=T:v=T;while(Math.abs(w)>r&&++C<n);return T}function p(m,v,S,E){for(var O=0;O<e;++O){var w=d(v,S,E);if(w===0)return v;var T=u(v,S,E)-m;v-=T/w}return v}function f(m){return m}return fi=function(v,S,E,O){if(!(0<=v&&v<=1&&0<=E&&E<=1))throw new Error("bezier x values must be in [0, 1] range");if(v===S&&E===O)return f;for(var w=s?new Float32Array(a):new Array(a),T=0;T<a;++T)w[T]=u(T*o,v,E);function C(A){for(var V=0,B=1,y=a-1;B!==y&&w[B]<=A;++B)V+=o;--B;var R=(A-w[B])/(w[B+1]-w[B]),G=V+R*o,P=d(G,v,E);return P>=t?p(A,G,v,E):P===0?G:h(A,V,V+o,v,E)}return function(V){return V===0?0:V===1?1:u(C(V),S,O)}},fi}var YO=WO();const KO=bg(YO),QO=300,XO=KO(.66,0,.34,1);var yn=0,Xn=0,Dn=0,fm=1e3,Bo,Zn,No=0,Or=0,Ps=0,pa=typeof performance=="object"&&performance.now?performance:Date,gm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ic(){return Or||(gm(ZO),Or=pa.now()+Ps)}function ZO(){Or=0}function zo(){this._call=this._time=this._next=null}zo.prototype=ym.prototype={constructor:zo,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?ic():+r)+(t==null?0:+t),!this._next&&Zn!==this&&(Zn?Zn._next=this:Bo=this,Zn=this),this._call=e,this._time=r,Zi()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zi())}};function ym(e,t,r){var n=new zo;return n.restart(e,t,r),n}function Xi(){ic(),++yn;for(var e=Bo,t;e;)(t=Or-e._time)>=0&&e._call.call(void 0,t),e=e._next;--yn}function id(){Or=(No=pa.now())+Ps,yn=Xn=0;try{Xi()}finally{yn=0,tw(),Or=0}}function ew(){var e=pa.now(),t=e-No;t>fm&&(Ps-=t,No=e)}function tw(){for(var e,t=Bo,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Bo=r);Zn=e,Zi(n)}function Zi(e){if(!yn){Xn&&(Xn=clearTimeout(Xn));var t=e-Or;t>24?(e<1/0&&(Xn=setTimeout(id,e-pa.now()-Ps)),Dn&&(Dn=clearInterval(Dn))):(Dn||(No=pa.now(),Dn=setInterval(ew,fm)),yn=1,gm(id))}}function rw(e,t,r){var n=new zo;return t=t==null?0:+t,n.restart(a=>{n.stop(),e(a+t)},t,r),n}class nw{constructor(t,r,n){this.duration=void 0,this.elapsed=0,this.easingFn=void 0,this.timer=null,this.onTickCallback=void 0,this.duration=t,this.easingFn=r,this.onTickCallback=n,this.resume()}get running(){return this.timer!==null}timerCallback(t){this.elapsed=Math.min(t,this.duration);const r=this.duration===0?1:this.elapsed/this.duration,n=this.easingFn(r);this.onTickCallback(n),this.elapsed>=this.duration&&this.stop()}resume(){if(this.running||this.elapsed>=this.duration)return this;const t=ic()-this.elapsed;return this.timer=ym(r=>this.timerCallback(r),0,t),Xi(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),rw(()=>this.timerCallback(this.duration)),Xi(),this}}function aw(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=0;a<r.length;a+=1){const o=r[a];if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1}return!0}function ow(e,{createInterpolator:t,applyProps:r,skip:n,initialProps:a=e}){const o=I.useRef(a),s=I.useRef(null),i=I.useRef(null),l=I.useRef(e);Nt(()=>{l.current=e},[e]),Nt(()=>{var d;n&&((d=s.current)==null||d.finish(),s.current=null,i.current=null,o.current=e)},[e,n]);const c=I.useCallback(d=>{const h=o.current,p=t(h,e);s.current=new nw(QO,XO,f=>{const m=p(f);o.current=m,r(d,m)})},[r,t,e]);return I.useCallback(d=>{var p,f,m,v;if(d===null){(p=s.current)==null||p.stop();return}const h=i.current;if(h===d){if(aw(l.current,e)){(f=s.current)==null||f.resume();return}(m=s.current)==null||m.stop()}h&&((v=s.current)==null||v.stop()),i.current=d,(s.current||!n)&&c(d)},[c,e,n])}function sw(e,{createInterpolator:t,transformProps:r,applyProps:n,skip:a,initialProps:o=e,ref:s}){const i=r??(u=>u),l=ow(e,{initialProps:o,createInterpolator:t,applyProps:(u,d)=>n(u,i(d)),skip:a});return Y({},r(a?e:o),{ref:np(l,s)})}function ld(e){const{isReversed:t,gradientId:r,size:n,direction:a,scale:o,colorMap:s}=e;return n<=0?null:g.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${a}${t?1:2}`]:`${n}px`,gradientUnits:"userSpaceOnUse",children:s.thresholds.map((i,l)=>{const c=o(i);if(c===void 0)return null;const u=t?1-c/n:c/n;return Number.isNaN(u)?null:g.jsxs(I.Fragment,{children:[g.jsx("stop",{offset:u,stopColor:s.colors[l],stopOpacity:1}),g.jsx("stop",{offset:u,stopColor:s.colors[l+1],stopOpacity:1})]},i.toString()+l)})})}const iw=10;function cd(e){const{gradientUnits:t,isReversed:r,gradientId:n,size:a,direction:o,scale:s,colorScale:i,colorMap:l}=e,c=[l.min??0,l.max??100],u=c.map(s).filter(f=>f!==void 0);if(u.length!==2)return null;const d=typeof c[0]=="number"?wt(c[0],c[1]):Gl(c[0],c[1]),h=Math.round((Math.max(...u)-Math.min(...u))/iw),p=`${c[0]}-${c[1]}-`;return g.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${r?1:2}`]:t==="objectBoundingBox"?1:`${a}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:h+1},(f,m)=>{const v=d(m/h);if(v===void 0)return null;const S=s(v);if(S===void 0)return null;const E=r?1-S/a:S/a,O=i(v);return O===null?null:g.jsx("stop",{offset:E,stopColor:O,stopOpacity:1},p+m)})})}const lw=10,cw=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function gi(e){const{isReversed:t,gradientId:r,colorScale:n,colorMap:a}=e,o=[a.min??0,a.max??100],s=typeof o[0]=="number"?wt(o[0],o[1]):Gl(o[0],o[1]),i=lw,l=`${o[0]}-${o[1]}-`;return g.jsx("linearGradient",Y({id:r},cw(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:i+1},(c,u)=>{const d=u/i,h=s(d);if(h===void 0)return null;const p=n(h);return p===null?null:g.jsx("stop",{offset:d,stopColor:p,stopOpacity:1},l+u)})}))}function uw(){const{top:e,height:t,bottom:r,left:n,width:a,right:o}=pm(),s=e+t+r,i=n+a+o,l=qO(),c=JO(),{xAxis:u,xAxisIds:d}=NO(),{yAxis:h,yAxisIds:p}=zO(),{zAxis:f,zAxisIds:m}=GO(),v=p.filter(O=>h[O].colorMap!==void 0),S=d.filter(O=>u[O].colorMap!==void 0),E=m.filter(O=>f[O].colorMap!==void 0);return v.length===0&&S.length===0&&E.length===0?null:g.jsxs("defs",{children:[v.map(O=>{const w=l(O),T=c(O),{colorMap:C,scale:A,colorScale:V,reverse:B}=h[O];return(C==null?void 0:C.type)==="piecewise"?g.jsx(ld,{isReversed:!B,scale:A,colorMap:C,size:s,gradientId:w,direction:"y"},w):(C==null?void 0:C.type)==="continuous"?g.jsxs(I.Fragment,{children:[g.jsx(cd,{isReversed:!B,scale:A,colorScale:V,colorMap:C,size:s,gradientId:w,direction:"y"}),g.jsx(gi,{isReversed:B,colorScale:V,colorMap:C,gradientId:T})]},w):null}),S.map(O=>{const w=l(O),T=c(O),{colorMap:C,scale:A,reverse:V,colorScale:B}=u[O];return(C==null?void 0:C.type)==="piecewise"?g.jsx(ld,{isReversed:V,scale:A,colorMap:C,size:i,gradientId:w,direction:"x"},w):(C==null?void 0:C.type)==="continuous"?g.jsxs(I.Fragment,{children:[g.jsx(cd,{isReversed:V,scale:A,colorScale:B,colorMap:C,size:i,gradientId:w,direction:"x"}),g.jsx(gi,{isReversed:V,colorScale:B,colorMap:C,gradientId:T})]},w):null}),E.map(O=>{const w=c(O),{colorMap:T,colorScale:C}=f[O];return(T==null?void 0:T.type)==="continuous"?g.jsx(gi,{colorScale:C,colorMap:T,gradientId:w},w):null})]})}const dw=["children","className","title","desc"],hw=ht("svg",{name:"MuiChartsSurface",slot:"Root"})(({ownerState:e})=>({width:e.width??"100%",height:e.height??"100%",display:"flex",position:"relative",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",touchAction:"pan-y",userSelect:"none"})),lc=I.forwardRef(function(t,r){const n=Vr(),{width:a,height:o}=ot(n,Qb),{width:s,height:i}=ot(n,Kb),l=HO(),c=np(l,r),u=eb({props:t,name:"MuiChartsSurface"}),{children:d,className:h,title:p,desc:f}=u,m=or(u,dw),v=o>0&&a>0;return g.jsxs(hw,Y({ownerState:{width:s,height:i},viewBox:`0 0 ${a} ${o}`,className:h},m,{ref:c,children:[p&&g.jsx("title",{children:p}),f&&g.jsx("desc",{children:f}),g.jsx(uw,{}),v&&d]}))});process.env.NODE_ENV!=="production"&&(lc.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(lc.propTypes={children:b.node,className:b.string,desc:b.string,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),title:b.string});function Fn(e,t){if(typeof e=="number")return e;if(e==="100%")return t;if(e.endsWith("%")){const r=Number.parseFloat(e.slice(0,e.length-1));if(!Number.isNaN(r))return r*t/100}if(e.endsWith("px")){const r=Number.parseFloat(e.slice(0,e.length-2));if(!Number.isNaN(r))return r}throw new Error(`MUI X Charts: Received an unknown value "${e}". It should be a number, or a string with a percentage value.`)}function yi(e){const t=Qi(e);return[Math.sin(t),-Math.cos(t)]}function pw(e,t){const r=[[0,0],yi(e),yi(t)],n=Math.min(e,t),a=Math.max(e,t),o=Math.floor(n/90)*90;for(let u=1;u<=4;u+=1){const d=o+u*90;d<a&&r.push(yi(d))}const s=Math.min(...r.map(([u])=>u)),i=Math.max(...r.map(([u])=>u)),l=Math.min(...r.map(([,u])=>u)),c=Math.max(...r.map(([,u])=>u));return{cx:-s/(i-s),cy:-l/(c-l),minX:s,maxX:i,minY:l,maxY:c}}function mw(e,t,r,n,{minX:a,maxX:o,minY:s,maxY:i}){return Math.min(...[{ratio:Math.abs(a),space:e},{ratio:Math.abs(o),space:r-e},{ratio:Math.abs(s),space:t},{ratio:Math.abs(i),space:n-t}].map(({ratio:l,space:c})=>l<1e-5?1/0:c/l))}const cc=I.createContext({value:null,valueMin:0,valueMax:0,startAngle:0,endAngle:0,innerRadius:0,outerRadius:0,cornerRadius:0,cx:0,cy:0,maxRadius:0,valueAngle:null});process.env.NODE_ENV!=="production"&&(cc.displayName="GaugeContext");function fw(e){const{value:t=null,valueMin:r=0,valueMax:n=100,startAngle:a=0,endAngle:o=360,outerRadius:s,innerRadius:i,cornerRadius:l,cx:c,cy:u,children:d}=e,{left:h,top:p,width:f,height:m}=pm(),v=pw(a,o),S=c?Fn(c,f):v.cx*f,E=u?Fn(u,m):v.cy*m;let O=h+S,w=p+E;const T=mw(S,E,f,m,v);if(c===void 0){const y=T*(v.maxX-v.minX);O=h+(f-y)/2+v.cx*y}if(u===void 0){const y=T*(v.maxY-v.minY);w=p+(m-y)/2+v.cy*y}const C=Fn(s??T,T),A=Fn(i??"80%",T),V=Fn(l??0,C-A),B=I.useMemo(()=>{const y=Qi(a),R=Qi(o);return{value:t,valueMin:r,valueMax:n,startAngle:y,endAngle:R,outerRadius:C,innerRadius:A,cornerRadius:V,cx:O,cy:w,maxRadius:T,valueAngle:t===null?null:y+(R-y)*(t-r)/(n-r)}},[t,r,n,a,o,C,A,V,O,w,T]);return g.jsx(cc.Provider,{value:B,children:d})}function uc(){return I.useContext(cc)}const gw=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],yw=ht("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),dc=I.forwardRef(function(t,r){const{width:n,height:a,margin:o,title:s,desc:i,value:l,valueMin:c=0,valueMax:u=100,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:v,cy:S,children:E}=t,O=or(t,gw);return g.jsx(BO,{pluginParams:{width:n,height:a,margin:up(o,{left:10,right:10,top:10,bottom:10})},plugins:[],children:g.jsx(fw,{value:l,valueMin:c,valueMax:u,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:v,cy:S,children:g.jsx(lc,Y({title:s,desc:i,role:"meter","aria-valuenow":l===null?void 0:l,"aria-valuemin":c,"aria-valuemax":u},O,{ref:r,children:g.jsx(yw,{"aria-hidden":"true",children:E})}))})})});process.env.NODE_ENV!=="production"&&(dc.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(dc.propTypes={children:b.node,className:b.string,cornerRadius:b.oneOfType([b.number,b.string]),cx:b.oneOfType([b.number,b.string]),cy:b.oneOfType([b.number,b.string]),desc:b.string,endAngle:b.number,height:b.number,id:b.string,innerRadius:b.oneOfType([b.number,b.string]),margin:b.oneOfType([b.number,b.shape({bottom:b.number,left:b.number,right:b.number,top:b.number})]),outerRadius:b.oneOfType([b.number,b.string]),skipAnimation:b.bool,startAngle:b.number,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),title:b.string,value:b.number,valueMax:b.number,valueMin:b.number,width:b.number});function bw(e){const t=Vr(),r=ot(t,Tb);return e||r}function vw(e,t){const r=wt(e.startAngle,t.startAngle),n=wt(e.endAngle,t.endAngle),a=wt(e.innerRadius,t.innerRadius),o=wt(e.outerRadius,t.outerRadius),s=wt(e.cornerRadius,t.cornerRadius);return i=>({startAngle:r(i),endAngle:n(i),innerRadius:a(i),outerRadius:o(i),cornerRadius:s(i)})}function xw(e){return sw({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:vw,transformProps:t=>({d:om().cornerRadius(t.cornerRadius)({innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle})}),applyProps(t,r){t.setAttribute("d",r.d)},initialProps:{startAngle:e.startAngle,endAngle:e.startAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},skip:e.skipAnimation,ref:e.ref})}const Sw=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],Ow=ht("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function bm(e){const{value:t,valueMin:r,valueMax:n,startAngle:a,endAngle:o,outerRadius:s,innerRadius:i,cornerRadius:l,cx:c,cy:u}=uc();if(t===null)return null;const d=a+(t-r)/(n-r)*(o-a);return g.jsx(vm,Y({},e,{cx:c,cy:u,startAngle:a,endAngle:d,cornerRadius:l,innerRadius:i,outerRadius:s}))}process.env.NODE_ENV!=="production"&&(bm.propTypes={skipAnimation:b.bool});function vm(e){let{cx:t,cy:r,startAngle:n,endAngle:a,cornerRadius:o,innerRadius:s,outerRadius:i,skipAnimation:l}=e,c=or(e,Sw);const u=bw(l),d=xw({startAngle:n,endAngle:a,cornerRadius:o,innerRadius:s,outerRadius:i,skipAnimation:u});return g.jsx(Ow,Y({},d,{transform:`translate(${t}, ${r})`},c))}process.env.NODE_ENV!=="production"&&(vm.propTypes={cornerRadius:b.number.isRequired,cx:b.number.isRequired,cy:b.number.isRequired,endAngle:b.number.isRequired,innerRadius:b.number.isRequired,outerRadius:b.number.isRequired,skipAnimation:b.bool,startAngle:b.number.isRequired});const ww=ht("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function Cw(e){const{startAngle:t,endAngle:r,outerRadius:n,innerRadius:a,cornerRadius:o,cx:s,cy:i}=uc();return g.jsx(ww,Y({transform:`translate(${s}, ${i})`,d:om().cornerRadius(o)({startAngle:t,endAngle:r,innerRadius:a,outerRadius:n})},e))}const ud=e=>e,Pw=()=>{let e=ud;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ud}}},Tw=Pw(),Rw={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function xm(e,t,r="Mui"){const n=Rw[t];return n?`${r}-${n}`:`${Tw.generate(e)}-${t}`}function Aw(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=xm(e,a,r)}),n}function _w(e){return xm("MuiGauge",e)}Aw("MuiGauge",["root","valueArc","referenceArc","valueText"]);function Ew(){return typeof window>"u"}const Xa=new Map,Vw=2e3,Iw={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Mw=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],dd="mui_measurement_span";function Sm(e,t){return Mw.indexOf(e)>=0&&t===+t?`${t}px`:t}function Om(e){return e.split("").reduce((n,a)=>a===a.toUpperCase()?[...n,"-",a.toLowerCase()]:[...n,a],[]).join("")}const jw=e=>Object.keys(e).sort().reduce((t,r)=>`${t}${Om(r)}:${Sm(r,e[r])};`,"");let bi;const $w=(e,t={})=>{if(e==null||Ew())return{width:0,height:0};const r=`${e}`,n=jw(t),a=`${r}-${n}`,o=Xa.get(a);if(o)return o;try{let s=document.getElementById(dd);s===null&&(s=document.createElement("span"),s.setAttribute("id",dd),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));const i=Y({},Iw,t);Object.keys(i).map(u=>(s.style[Om(u)]=Sm(u,i[u]),u)),s.textContent=r;const l=s.getBoundingClientRect(),c={width:l.width,height:l.height};return Xa.set(a,c),Xa.size+1>Vw&&Xa.clear(),process.env.NODE_ENV==="test"?s.textContent="":(bi&&clearTimeout(bi),bi=setTimeout(()=>{s.textContent=""},0)),c}catch{return{width:0,height:0}}};function kw({style:e,needsComputation:t,text:r}){return r.split(`
|
|
123
|
-
`).map(n=>Y({text:n},t
|
|
124
|
-
`),text:a}),[u,a,d]);let p;switch(c){case"hanging":case"text-before-edge":p=0;break;case"central":p=(h.length-1)/2*-h[0].height;break;default:p=(h.length-1)*-h[0].height;break}return g.jsx("text",Y({},o,{transform:i?`rotate(${i}, ${t}, ${r})`:void 0,x:t,y:r,textAnchor:l,dominantBaseline:c,style:u,children:h.map((f,m)=>g.jsx("tspan",{x:t,dy:`${m===0?p:h[0].height}px`,dominantBaseline:c,children:f.text},m))}))}process.env.NODE_ENV!=="production"&&(
|
|
125
|
-
Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabeschalter gedrückt werden muss, damit sich der Roboter erfolgreich bewegen kann.`,"SafetyBar.OperationMode.Manual.lb":"Manuell","SafetyBar.OperationMode.ti":"Betriebsmodus","SafetyBar.SafetyState.Error.Explanation.lb":"Die Robotersteuerung ist in einen unerwarteten Sicherheitszustand eingetreten.","SafetyBar.SafetyState.Error.lb":"Fehler","SafetyBar.SafetyState.Estop.lb":"NOT-AUS","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"Die Robotersteuerung ist in einen Sicherheitszustand eingetreten, der manuelle Maßnahmen zur Behebung erfordert.","SafetyBar.SafetyState.ManualActionRequired.lb":"Aktion erforderlich","SafetyBar.SafetyState.Normal.Explanation.lb":"Die Robotersteuerung befindet sich in einem sicheren Zustand. Roboterbewegungen sind möglich.","SafetyBar.SafetyState.Normal.lb":"Sicher","SafetyBar.SafetyState.Stop.Explanation.lb":"Die Robotersteuerung ist in einen Stoppzustand übergegangen. Bis der Stoppzustand aufgelöst ist, ist keine Bewegung mehr möglich.","SafetyBar.SafetyState.Stop.lb":"Stopp","SafetyBar.SafetyState.ti":"Sicherheitszustand","SafetyBar.StopState.Estop.Explanation.lb":"NOT-AUS aktiviert. NOT-AUS freischalten, um Roboter zu bewegen.","Jogging.Increment.hlb":"Schrittgröße","Jogging.CoordinateSystem.hlb":"Koordinatensystem","Jogging.Cartesian.bt":"Kartesisch","Jogging.Joints.bt":"Gelenke","Jogging.Velocity.bt":"Geschwindigkeit","CycleTimer.RemainingTime.lb":"Verbleibende Zeit","CycleTimer.OfTime.lb":"von {{time}} min.","CycleTimer.Time.lb":"{{time}} min.","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Weiter","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stopp","ProgramStateIndicator.Running.lb":"In Betrieb","ProgramStateIndicator.Error.lb":"Fehler","ProgramStateIndicator.EStop.lb":"Not-Aus","ProgramStateIndicator.Idle.lb":"Leerlauf","ProgramStateIndicator.Paused.lb":"Pausiert","ProgramStateIndicator.Ready.lb":"Bereit","ProgramStateIndicator.Stopped.lb":"Gestoppt","ProgramStateIndicator.Auto.lb":"Auto","ProgramStateIndicator.Manual.lb":"Manuell","ProgramStateIndicator.ManualT1.lb":"Manuell T1","ProgramStateIndicator.ManualT2.lb":"Manuell T2","RobotSetupReadinessIndicator.Ready.lb":"Bereit","RobotSetupReadinessIndicator.RobotDisconnected.lb":"Roboter getrennt","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Voraussetzung nicht erfüllt","RobotCard.Runtime.lb":"Laufzeit","RobotCard.DriveToHome.bt":"Zur Home-Position fahren"},Hw={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Velocity","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Cartesian.MotionType.lb":"Motion type","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Joint values","Jogging.Increment.Continuous.dd":"Continuous","Jogging.Cartesian.Orientation.lb":"Orientation","Jogging.Activating.lb":"Activating jogging","Jogging.JointLimitsReached.lb":"Joint limit reached for joint {{jointNumbers}}","Jogging.Orientation.coordsys":"Robot base","Jogging.Orientation.tool":"Tool","SafetyBar.ActivationToggle.Activate.bt":"Activate","SafetyBar.ActivationToggle.Activated.bt":"Activated","SafetyBar.ActivationToggle.Activating.bt":"Activating","SafetyBar.ActivationToggle.Deactivating.bt":"Deactivating","SafetyBar.ControllerType.Physical.lb":"Physical","SafetyBar.ControllerType.Virtual.lb":"Virtual","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> is a physical robot controller. <strong>Safety precautions</strong> are active for the movement of this robot.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> is a virtual robot controller with no physical counterpart. It can be freely manipulated without safety precautions.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatic operation mode active. Automated movement without manual confirmation enabled.","SafetyBar.OperationMode.Automatic.ti":"Automatic","SafetyBar.OperationMode.Error.Explanation.lb":"Failed to get operation mode. Use the original control panel to resolve the error.","SafetyBar.OperationMode.Error.lb":"Error","SafetyBar.OperationMode.Manual.Explanation.lb":"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.","SafetyBar.OperationMode.Manual.lb":"Manual","SafetyBar.OperationMode.ti":"Operation mode","SafetyBar.SafetyState.Error.Explanation.lb":"The robot controller has entered an unexpected safety state.","SafetyBar.SafetyState.Error.lb":"Error","SafetyBar.SafetyState.Estop.lb":"E-Stop","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"The robot controller has entered a safety state requiring manual action to resolve.","SafetyBar.SafetyState.ManualActionRequired.lb":"Action required","SafetyBar.SafetyState.Normal.Explanation.lb":"The robot controller is in a safe state. Robot movement is enabled.","SafetyBar.SafetyState.Normal.lb":"Safe","SafetyBar.SafetyState.Stop.Explanation.lb":"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved.","SafetyBar.SafetyState.Stop.lb":"Stop","SafetyBar.SafetyState.ti":"Safety state","SafetyBar.StopState.Estop.Explanation.lb":"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released.","Jogging.Increment.hlb":"Increment","Jogging.CoordinateSystem.hlb":"Coordinate system","Jogging.Cartesian.bt":"Cartesian","Jogging.Joints.bt":"Joints","Jogging.Velocity.bt":"Velocity","CycleTimer.RemainingTime.lb":"Time remaining","CycleTimer.OfTime.lb":"of {{time}} min.","CycleTimer.Time.lb":"{{time}} min.","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Resume","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stop","ProgramStateIndicator.Running.lb":"Running","ProgramStateIndicator.Error.lb":"Error","ProgramStateIndicator.EStop.lb":"E-Stop","ProgramStateIndicator.Idle.lb":"Idle","ProgramStateIndicator.Paused.lb":"Paused","ProgramStateIndicator.Ready.lb":"Ready","ProgramStateIndicator.Stopped.lb":"Stopped","ProgramStateIndicator.Auto.lb":"Auto","ProgramStateIndicator.Manual.lb":"Manual","ProgramStateIndicator.ManualT1.lb":"Manual T1","ProgramStateIndicator.ManualT2.lb":"Manual T2","RobotSetupReadinessIndicator.Ready.lb":"Ready","RobotSetupReadinessIndicator.RobotDisconnected.lb":"Robot disconnected","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Precondition not fulfilled","RobotCard.Runtime.lb":"Runtime","RobotCard.DriveToHome.bt":"Drive to Home"},pc=pg.createInstance();pc.use(mg).init({supportedLngs:["en","de"],resources:{en:{translations:Hw},de:{translations:Gw}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function vt(e){return r=>g.jsx(qw,{children:g.jsx(e,{...r})})}const qw=({children:e})=>g.jsx(Te.I18nextProvider,{i18n:pc,children:e});class mc{constructor(t=[],r={}){this.currentValues=[],this.targetValues=[],this.previousTargetValues=[],this.targetUpdateTime=0,this.animationId=null,this.updateCount=0,this.velocities=[],this.animate=()=>{this.update(.016666666666666666)?this.animationId=null:this.animationId=requestAnimationFrame(this.animate)},this.options={tension:120,friction:20,threshold:.001,onChange:()=>{},onComplete:()=>{},...r},this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0}update(t=1/60){let r=!1,n=!0;this.updateCount++;const a=Math.min(t,1/15),o=this.updateCount===1?.7:1;for(let s=0;s<this.currentValues.length;s++){const i=this.currentValues[s],l=this.targetValues[s],c=this.velocities[s],u=l-i,d=u*this.options.tension*o,h=c*this.options.friction,p=d-h,f=c+p*a,m=i+f*a;Math.abs(u)<this.options.threshold&&Math.abs(f)<this.options.threshold*10?this.currentValues[s]!==l&&(this.currentValues[s]=l,this.velocities[s]=0,r=!0):(n=!1,this.currentValues[s]=m,this.velocities[s]=f,r=!0)}return r&&this.options.onChange(this.currentValues),n&&this.options.onComplete(this.currentValues),n}setTarget(t){const r=performance.now(),n=r-this.targetUpdateTime;this.previousTargetValues=[...this.targetValues],this.targetValues=[...t],this.targetUpdateTime=r,this.updateCount=0;const a=this.previousTargetValues.every((o,s)=>o===this.currentValues[s]);if(n<8&&n>0&&this.previousTargetValues.length>0&&!a){const o=Math.min(n/8,1);for(let s=0;s<this.targetValues.length;s++){const i=this.previousTargetValues[s]||0,l=t[s]||0;Math.abs(l-i)>.1&&(this.targetValues[s]=i+(l-i)*o)}}for(;this.currentValues.length<t.length;)this.currentValues.push(t[this.currentValues.length]),this.velocities.push(0);this.currentValues.length>t.length&&(this.currentValues=this.currentValues.slice(0,t.length),this.velocities=this.velocities.slice(0,t.length))}getCurrentValues(){return[...this.currentValues]}getValue(t){return this.currentValues[t]??0}isInterpolating(){return this.animationId!==null}stop(){this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null)}setImmediate(t){this.stop(),this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0,this.options.onChange(this.currentValues)}updateOptions(t){this.options={...this.options,...t}}startAutoInterpolation(){this.startInterpolation()}destroy(){this.stop()}startInterpolation(){this.animationId===null&&this.animate()}}function Pm(e=[],t={}){const r=Q.useRef(null);return r.current||(r.current=new mc(e,t)),Q.useEffect(()=>{var n;(n=r.current)==null||n.updateOptions(t)},[t]),Q.useEffect(()=>()=>{var n;(n=r.current)==null||n.destroy()},[]),[r.current]}const Tm=vt(Re.observer(({onCycleComplete:e,onCycleEnd:t,autoStart:r=!0,variant:n="default",compact:a=!1,className:o})=>{var G;const s=z.useTheme(),{t:i}=Te.useTranslation(),[l,c]=Q.useState(0),[u,d]=Q.useState(0),[h,p]=Q.useState(!1),[f,m]=Q.useState(!1),[v,S]=Q.useState(0),E=Q.useRef(null),O=Q.useRef(null),w=Q.useRef(0),[T]=Pm([0],{tension:80,friction:18,onChange:([P])=>{S(P)}}),C=Q.useCallback((P,N=0)=>{d(P);const re=Math.max(0,P-N);c(re),m(!1),w.current=0;const Z=N>0?N/P*100:0;N===0?T.setTarget([0]):T.setTarget([Z]),re===0?(p(!1),O.current=null,t&&setTimeout(()=>t(),0)):r?(O.current=Date.now()-N*1e3,p(!0)):O.current=null},[r,t,T]),A=Q.useCallback(()=>{if(O.current&&h){const N=Date.now()-O.current;w.current+=N;const re=w.current/1e3,Z=Math.min(100,re/u*100);T.setTarget([Z])}p(!1),m(!0)},[h,u,T]),V=Q.useCallback(()=>{f&&l>0&&(O.current=Date.now(),p(!0),m(!1))},[f,l]),B=Q.useCallback(()=>f,[f]);Q.useEffect(()=>{let P=!0;const N=setTimeout(()=>{P&&e({startNewCycle:C,pause:A,resume:V,isPaused:B})},0);return()=>{P=!1,clearTimeout(N)}},[e,C,A,V,B]),Q.useEffect(()=>{if(h){const P=()=>{if(O.current&&u>0){const re=(Date.now()-O.current+w.current)/1e3,Z=Math.max(0,u-re);c(Math.ceil(Z));const ae=Math.min(100,re/u*100);if(T.setTarget([ae]),Z<=0){p(!1),O.current=null,c(0),T.setTarget([100]),t&&setTimeout(()=>t(),0);return}h&&(E.current=requestAnimationFrame(P))}};E.current=requestAnimationFrame(P)}else E.current&&(cancelAnimationFrame(E.current),E.current=null);return()=>{E.current&&cancelAnimationFrame(E.current)}},[h,t,u,T]),Q.useEffect(()=>{let P=null;const N=()=>{T.update(1/60),P=requestAnimationFrame(N)};return P=requestAnimationFrame(N),()=>{P&&cancelAnimationFrame(P)}},[T]),Q.useEffect(()=>{if(!h&&!f&&u>0){const P=(u-l)/u*100;T.setTarget([P])}},[h,f,u,l,T]);const y=P=>{const N=Math.floor(P/60),re=P%60;return`${N}:${re.toString().padStart(2,"0")}`},R=v;return n==="small"?g.jsxs(z.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsx(z.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:f?.6:1,transition:"opacity 0.2s ease"},children:g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:s.palette.success.main,strokeWidth:"2",opacity:.3}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:s.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-R/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out"}})]})}),g.jsx(z.Typography,{variant:"body2",sx:{color:s.palette.text.primary,fontSize:"14px"},children:a?`${y(l)} ${i("CycleTimer.Time.lb",{time:""}).replace(/\s*$/,"")}`:`${y(l)} / ${i("CycleTimer.Time.lb",{time:y(u)})}`})]}):g.jsxs(z.Box,{className:o,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(hc,{width:264,height:264,value:R,valueMin:0,valueMax:100,innerRadius:"71%",outerRadius:"90%",skipAnimation:!0,sx:{opacity:f?.6:1,transition:"opacity 0.2s ease","& .MuiGauge-valueArc":{fill:s.palette.success.main},"& .MuiGauge-referenceArc":{fill:"white",stroke:"transparent"}}}),g.jsxs(z.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:187,height:187,borderRadius:"50%",backgroundColor:(G=s.palette.backgroundPaperElevation)==null?void 0:G[8],display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1},children:[g.jsx(z.Typography,{variant:"body2",sx:{fontSize:"12px",color:s.palette.text.secondary,marginBottom:.5},children:i("CycleTimer.RemainingTime.lb")}),g.jsx(z.Typography,{variant:"h1",sx:{fontSize:"48px",fontWeight:500,color:s.palette.text.primary,lineHeight:1,marginBottom:.5},children:y(l)}),g.jsx(z.Typography,{variant:"body2",sx:{fontSize:"12px",color:s.palette.text.secondary},children:i("CycleTimer.OfTime.lb",{time:y(u)})})]})]})}));process.env.NODE_ENV!=="production"&&(b.node,b.object.isRequired);function fc(e){return l0(e)}const sn=S0({createStyledComponent:ht("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>fc({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(sn.propTypes={children:b.node,component:b.elementType,direction:b.oneOfType([b.oneOf(["column-reverse","column","row-reverse","row"]),b.arrayOf(b.oneOf(["column-reverse","column","row-reverse","row"])),b.object]),divider:b.node,spacing:b.oneOfType([b.arrayOf(b.oneOfType([b.number,b.string])),b.number,b.object,b.string]),sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),useFlexGap:b.bool});const Jw=({title:e,titleId:t,...r},n)=>I.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.createElement("g",{id:"JogMinus"},I.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),Ww=Q.forwardRef(Jw),Yw=({title:e,titleId:t,...r},n)=>I.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.createElement("g",{id:"JogPlus"},I.createElement("g",{id:"Plus"},I.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),I.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),I.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),Kw=Q.forwardRef(Yw);function Ts(e){Q.useEffect(e,[])}function Rm(e){Ts(()=>Fe.autorun(e))}function Am(e,t,r){Ts(()=>Fe.reaction(e,t,r))}function On(e){return Ts(()=>{let t;function r(){e(),t=requestAnimationFrame(r)}return t=requestAnimationFrame(r),()=>{cancelAnimationFrame(t)}})}const el=vt(Re.observer(({colors:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:a,disabled:o,activeJoggingDirection:s,...i})=>{var O,w,T,C,A,V,B;On(()=>{const y=r(),R=h.current;R&&(R.textContent=y)});const l=z.useTheme(),[c,u]=Q.useState(null);Q.useEffect(()=>{o&&E()},[o]);const d=s||c,h=Q.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const p=d?(O=e.buttonBackgroundColor)==null?void 0:O.pressed:e.borderColor,f={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},m={...f,backgroundColor:(w=e.buttonBackgroundColor)==null?void 0:w.default,":hover":{backgroundColor:(T=e.buttonBackgroundColor)==null?void 0:T.hovered},":active":{backgroundColor:(C=e.buttonBackgroundColor)==null?void 0:C.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(A=e.buttonBackgroundColor)==null?void 0:A.disabled,"svg path":{fill:l.palette.action.disabled}}},v={...f,backgroundColor:(V=e.buttonBackgroundColor)==null?void 0:V.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(B=e.buttonBackgroundColor)==null?void 0:B.pressed,"svg path":{fill:l.palette.action.disabled}}};function S(y,R){o||y.button===0&&(u(R),n(R))}function E(){u(null),a()}return g.jsxs(sn,{height:"64px",direction:"row",justifyContent:"center",...i,children:[g.jsx(z.IconButton,{disabled:o,disableRipple:!0,onPointerDown:y=>S(y,"-"),onPointerUp:E,onPointerOut:E,size:"large",sx:{...d==="-"?v:m,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(Ww,{})}),g.jsxs(sn,{spacing:"6px",sx:{width:"150px",backgroundColor:e.backgroundColor,alignItems:"center",justifyContent:"center",opacity:"0.9",borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:[g.jsx(sn,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:e.color,".MuiTypography-root":{fontWeight:700,...o?{color:l.palette.action.disabled}:{}},...o?{"svg path":{fill:l.palette.action.disabled}}:{}},children:t}),g.jsx(z.Typography,{height:"22px",sx:{fontSize:"15px",color:o?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:r()})]}),g.jsx(z.IconButton,{disableRipple:!0,disabled:o,onPointerDown:y=>S(y,"+"),onPointerUp:E,onPointerOut:E,size:"large",sx:{...d==="+"?v:m,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(Kw,{})})]})})),Ir=c0;function Qw(e){return Oa("MuiSvgIcon",e)}Bh("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Xw=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${Ze(t)}`,`fontSize${Ze(r)}`]};return Tl(a,Qw,n)},Zw=ht("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Ze(r.color)}`],t[`fontSize${Ze(r.fontSize)}`]]}})(Ir(({theme:e})=>{var t,r,n,a,o,s,i,l,c,u,d,h,p,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(a=(t=e.transitions)==null?void 0:t.create)==null?void 0:a.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:l.call(i,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var v,S;return{props:{color:m},style:{color:(S=(v=(e.vars??e).palette)==null?void 0:v[m])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(h=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(f=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:f.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Go=I.forwardRef(function(t,r){const n=fc({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:s="inherit",component:i="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...p}=n,f=I.isValidElement(a)&&a.type==="svg",m={...n,color:s,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},v={};u||(v.viewBox=h);const S=Xw(m);return g.jsxs(Zw,{as:i,className:It(S.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...v,...p,...f&&a.props,ownerState:m,children:[f?a.props.children:a,d?g.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Go.propTypes={children:b.node,classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),b.string]),component:b.elementType,fontSize:b.oneOfType([b.oneOf(["inherit","large","medium","small"]),b.string]),htmlColor:b.string,inheritViewBox:b.bool,shapeRendering:b.string,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),titleAccess:b.string,viewBox:b.string});Go.muiName="SvgIcon";function _a(e,t){function r(n,a){return g.jsx(Go,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:a,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Go.muiName,I.memo(I.forwardRef(r))}function bo(e){return e&&e.ownerDocument||document}function eC(e){const{controlled:t,default:r,name:n,state:a="value"}=e,{current:o}=I.useRef(t!==void 0),[s,i]=I.useState(r),l=o?t:s;if(process.env.NODE_ENV!=="production"){I.useEffect(()=>{o!==(t!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${a} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
126
|
-
`))},[a,n,t]);const{current:u}=
|
|
127
|
-
`))},[JSON.stringify(r)])}const c=I.useCallback(u=>{o||i(u)},[]);return[l,c]}function vi(e){const t=I.useRef(e);return Wh(()=>{t.current=e}),I.useRef((...r)=>(0,t.current)(...r)).current}function _m(...e){const t=I.useRef(void 0),r=I.useCallback(n=>{const a=e.map(o=>{if(o==null)return null;if(typeof o=="function"){const s=o,i=s(n);return typeof i=="function"?i:()=>{s(null)}}return o.current=n,()=>{o.current=null}});return()=>{a.forEach(o=>o==null?void 0:o())}},e);return I.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}const tC=_a(g.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),rC=_a(g.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function wr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Em=typeof global=="object"&&global&&global.Object===Object&&global,nC=typeof self=="object"&&self&&self.Object===Object&&self,$t=Em||nC||Function("return this")(),xi=function(){return $t.Date.now()},aC=/\s/;function oC(e){for(var t=e.length;t--&&aC.test(e.charAt(t)););return t}var sC=/^\s+/;function iC(e){return e&&e.slice(0,oC(e)+1).replace(sC,"")}var lr=$t.Symbol,Vm=Object.prototype,lC=Vm.hasOwnProperty,cC=Vm.toString,Bn=lr?lr.toStringTag:void 0;function uC(e){var t=lC.call(e,Bn),r=e[Bn];try{e[Bn]=void 0;var n=!0}catch{}var a=cC.call(e);return n&&(t?e[Bn]=r:delete e[Bn]),a}var dC=Object.prototype,hC=dC.toString;function pC(e){return hC.call(e)}var mC="[object Null]",fC="[object Undefined]",hd=lr?lr.toStringTag:void 0;function Mr(e){return e==null?e===void 0?fC:mC:hd&&hd in Object(e)?uC(e):pC(e)}function Cr(e){return e!=null&&typeof e=="object"}var gC="[object Symbol]";function Rs(e){return typeof e=="symbol"||Cr(e)&&Mr(e)==gC}var pd=NaN,yC=/^[-+]0x[0-9a-f]+$/i,bC=/^0b[01]+$/i,vC=/^0o[0-7]+$/i,xC=parseInt;function md(e){if(typeof e=="number")return e;if(Rs(e))return pd;if(wr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=wr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=iC(e);var r=bC.test(e);return r||vC.test(e)?xC(e.slice(2),r?2:8):yC.test(e)?pd:+e}var SC="Expected a function",OC=Math.max,wC=Math.min;function CC(e,t,r){var n,a,o,s,i,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(SC);t=md(t)||0,wr(r)&&(u=!!r.leading,d="maxWait"in r,o=d?OC(md(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(C){var A=n,V=a;return n=a=void 0,c=C,s=e.apply(V,A),s}function f(C){return c=C,i=setTimeout(S,t),u?p(C):s}function m(C){var A=C-l,V=C-c,B=t-A;return d?wC(B,o-V):B}function v(C){var A=C-l,V=C-c;return l===void 0||A>=t||A<0||d&&V>=o}function S(){var C=xi();if(v(C))return E(C);i=setTimeout(S,m(C))}function E(C){return i=void 0,h&&n?p(C):(n=a=void 0,s)}function O(){i!==void 0&&clearTimeout(i),c=0,n=l=a=i=void 0}function w(){return i===void 0?s:E(xi())}function T(){var C=xi(),A=v(C);if(n=arguments,a=this,l=C,A){if(i===void 0)return f(l);if(d)return clearTimeout(i),i=setTimeout(S,t),p(l)}return i===void 0&&(i=setTimeout(S,t)),s}return T.cancel=O,T.flush=w,T}var PC="Expected a function";function TC(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(PC);return wr(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),CC(e,t,{leading:n,maxWait:t,trailing:a})}const Im=vt(Re.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:a,disabled:o,...s})=>{var O,w,T,C,A,V,B,y,R,G,P,N,re,Z,ae;const{t:i}=Te.useTranslation(),[l,c]=Q.useState(),u=z.useTheme(),d={background:(O=u.palette.backgroundPaperElevation)==null?void 0:O[4],color:(w=u.palette.backgroundPaperElevation)==null?void 0:w[11]},h=Re.useLocalObservable(()=>({activeJoggingDir:null,startJogging(te){this.activeJoggingDir=te,e(te)},stopJogging(){this.activeJoggingDir=null,t()}})),p=TC(()=>{c(a())},50);On(p);function f(te){te.button===0&&h.startJogging("-")}function m(te){te.button===0&&h.startJogging("+")}function v(te){h.stopJogging()}function S(te){h.stopJogging()}function E(te,se=1){if(te===void 0||isNaN(te))return"";const J=i("General.degree.variable",{amount:te.toFixed(se)});return te>0&&se===0?`+${J}`:J}return g.jsxs(sn,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...s,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(T=u.palette.backgroundPaperElevation)==null?void 0:T[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(C=u.palette.backgroundPaperElevation)==null?void 0:C[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(A=u.palette.backgroundPaperElevation)==null?void 0:A[9]},"&:active":{...d}}},children:[g.jsx(z.IconButton,{onPointerDown:f,onPointerUp:v,onPointerOut:S,disabled:o,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:g.jsx(tC,{sx:{pointerEvents:"none",color:(R=(y=(B=(V=u.componentsExt)==null?void 0:V.JoggingPanel)==null?void 0:B.JoggingJoint)==null?void 0:y.Joint)==null?void 0:R.arrowColor}})}),g.jsxs(sn,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(G=u.palette.backgroundPaperElevation)==null?void 0:G[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[g.jsx(z.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:o?u.palette.action.disabled:u.palette.text.primary},children:E(l)}),g.jsx(z.Slider,{disabled:!0,"aria-label":"Joint position",min:r,max:n,value:l||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"12px",borderRadius:"2px",color:o?u.palette.action.disabled:u.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:o?u.palette.action.disabled:u.palette.text.secondary},"& .MuiSlider-rail":{backgroundColor:(P=u.palette.backgroundPaperElevation)==null?void 0:P[5],opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:E(r,0)},{value:n,label:E(n,0)}]})]}),g.jsx(z.IconButton,{onPointerDown:m,onPointerUp:v,onPointerOut:S,disabled:o,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:g.jsx(rC,{sx:{pointerEvents:"none",color:(ae=(Z=(re=(N=u.componentsExt)==null?void 0:N.JoggingPanel)==null?void 0:re.JoggingJoint)==null?void 0:Z.Joint)==null?void 0:ae.arrowColor}})})]})})),RC=_a(g.jsx("path",{d:"M10 9h4V6h3l-5-5-5 5h3zm-1 1H6V7l-5 5 5 5v-3h3zm14 2-5-5v3h-3v4h3v3zm-9 3h-4v3H7l5 5 5-5h-3z"}),"OpenWith"),AC=_a(g.jsx("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92"}),"Share");function _C(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Mm=_C;function EC(){this.__data__=[],this.size=0}var VC=EC;function IC(e,t){return e===t||e!==e&&t!==t}var jm=IC;function MC(e,t){for(var r=e.length;r--;)if(jm(e[r][0],t))return r;return-1}var As=MC,jC=Array.prototype,$C=jC.splice;function kC(e){var t=this.__data__,r=As(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():$C.call(t,r,1),--this.size,!0}var UC=kC;function LC(e){var t=this.__data__,r=As(t,e);return r<0?void 0:t[r][1]}var DC=LC;function FC(e){return As(this.__data__,e)>-1}var BC=FC;function NC(e,t){var r=this.__data__,n=As(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var zC=NC;function wn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}wn.prototype.clear=VC;wn.prototype.delete=UC;wn.prototype.get=DC;wn.prototype.has=BC;wn.prototype.set=zC;var _s=wn;function GC(){this.__data__=new _s,this.size=0}var HC=GC;function qC(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var JC=qC;function WC(e){return this.__data__.get(e)}var YC=WC;function KC(e){return this.__data__.has(e)}var QC=KC,XC=typeof global=="object"&&global&&global.Object===Object&&global,$m=XC,ZC=typeof self=="object"&&self&&self.Object===Object&&self,eP=$m||ZC||Function("return this")(),Wt=eP,tP=Wt.Symbol,bn=tP,km=Object.prototype,rP=km.hasOwnProperty,nP=km.toString,Nn=bn?bn.toStringTag:void 0;function aP(e){var t=rP.call(e,Nn),r=e[Nn];try{e[Nn]=void 0;var n=!0}catch{}var a=nP.call(e);return n&&(t?e[Nn]=r:delete e[Nn]),a}var oP=aP,sP=Object.prototype,iP=sP.toString;function lP(e){return iP.call(e)}var cP=lP,uP="[object Null]",dP="[object Undefined]",fd=bn?bn.toStringTag:void 0;function hP(e){return e==null?e===void 0?dP:uP:fd&&fd in Object(e)?oP(e):cP(e)}var Ea=hP,pP="[object AsyncFunction]",mP="[object Function]",fP="[object GeneratorFunction]",gP="[object Proxy]";function yP(e){if(!Mm(e))return!1;var t=Ea(e);return t==mP||t==fP||t==pP||t==gP}var Um=yP,bP=Wt["__core-js_shared__"],Si=bP,gd=function(){var e=/[^.]+$/.exec(Si&&Si.keys&&Si.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function vP(e){return!!gd&&gd in e}var xP=vP,SP=Function.prototype,OP=SP.toString;function wP(e){if(e!=null){try{return OP.call(e)}catch{}try{return e+""}catch{}}return""}var jr=wP,CP=/[\\^$.*+?()[\]{}|]/g,PP=/^\[object .+?Constructor\]$/,TP=Function.prototype,RP=Object.prototype,AP=TP.toString,_P=RP.hasOwnProperty,EP=RegExp("^"+AP.call(_P).replace(CP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function VP(e){if(!Mm(e)||xP(e))return!1;var t=Um(e)?EP:PP;return t.test(jr(e))}var IP=VP;function MP(e,t){return e==null?void 0:e[t]}var jP=MP;function $P(e,t){var r=jP(e,t);return IP(r)?r:void 0}var Cn=$P,kP=Cn(Wt,"Map"),ma=kP,UP=Cn(Object,"create"),fa=UP;function LP(){this.__data__=fa?fa(null):{},this.size=0}var DP=LP;function FP(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var BP=FP,NP="__lodash_hash_undefined__",zP=Object.prototype,GP=zP.hasOwnProperty;function HP(e){var t=this.__data__;if(fa){var r=t[e];return r===NP?void 0:r}return GP.call(t,e)?t[e]:void 0}var qP=HP,JP=Object.prototype,WP=JP.hasOwnProperty;function YP(e){var t=this.__data__;return fa?t[e]!==void 0:WP.call(t,e)}var KP=YP,QP="__lodash_hash_undefined__";function XP(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fa&&t===void 0?QP:t,this}var ZP=XP;function Pn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Pn.prototype.clear=DP;Pn.prototype.delete=BP;Pn.prototype.get=qP;Pn.prototype.has=KP;Pn.prototype.set=ZP;var yd=Pn;function eT(){this.size=0,this.__data__={hash:new yd,map:new(ma||_s),string:new yd}}var tT=eT;function rT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var nT=rT;function aT(e,t){var r=e.__data__;return nT(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Es=aT;function oT(e){var t=Es(this,e).delete(e);return this.size-=t?1:0,t}var sT=oT;function iT(e){return Es(this,e).get(e)}var lT=iT;function cT(e){return Es(this,e).has(e)}var uT=cT;function dT(e,t){var r=Es(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var hT=dT;function Tn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Tn.prototype.clear=tT;Tn.prototype.delete=sT;Tn.prototype.get=lT;Tn.prototype.has=uT;Tn.prototype.set=hT;var Lm=Tn,pT=200;function mT(e,t){var r=this.__data__;if(r instanceof _s){var n=r.__data__;if(!ma||n.length<pT-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Lm(n)}return r.set(e,t),this.size=r.size,this}var fT=mT;function Rn(e){var t=this.__data__=new _s(e);this.size=t.size}Rn.prototype.clear=HC;Rn.prototype.delete=JC;Rn.prototype.get=YC;Rn.prototype.has=QC;Rn.prototype.set=fT;var Oi=Rn,gT="__lodash_hash_undefined__";function yT(e){return this.__data__.set(e,gT),this}var bT=yT;function vT(e){return this.__data__.has(e)}var xT=vT;function Ho(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Lm;++t<r;)this.add(e[t])}Ho.prototype.add=Ho.prototype.push=bT;Ho.prototype.has=xT;var ST=Ho;function OT(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var wT=OT;function CT(e,t){return e.has(t)}var PT=CT,TT=1,RT=2;function AT(e,t,r,n,a,o){var s=r&TT,i=e.length,l=t.length;if(i!=l&&!(s&&l>i))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&RT?new ST:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var v=s?n(m,f,d,t,e,o):n(f,m,d,e,t,o);if(v!==void 0){if(v)continue;h=!1;break}if(p){if(!wT(t,function(S,E){if(!PT(p,E)&&(f===S||a(f,S,r,n,o)))return p.push(E)})){h=!1;break}}else if(!(f===m||a(f,m,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}var Dm=AT,_T=Wt.Uint8Array,bd=_T;function ET(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var VT=ET;function IT(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var MT=IT,jT=1,$T=2,kT="[object Boolean]",UT="[object Date]",LT="[object Error]",DT="[object Map]",FT="[object Number]",BT="[object RegExp]",NT="[object Set]",zT="[object String]",GT="[object Symbol]",HT="[object ArrayBuffer]",qT="[object DataView]",vd=bn?bn.prototype:void 0,wi=vd?vd.valueOf:void 0;function JT(e,t,r,n,a,o,s){switch(r){case qT:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case HT:return!(e.byteLength!=t.byteLength||!o(new bd(e),new bd(t)));case kT:case UT:case FT:return jm(+e,+t);case LT:return e.name==t.name&&e.message==t.message;case BT:case zT:return e==t+"";case DT:var i=VT;case NT:var l=n&jT;if(i||(i=MT),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=$T,s.set(e,t);var u=Dm(i(e),i(t),n,a,o,s);return s.delete(e),u;case GT:if(wi)return wi.call(e)==wi.call(t)}return!1}var WT=JT;function YT(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var KT=YT,QT=Array.isArray,qo=QT;function XT(e,t,r){var n=t(e);return qo(e)?n:KT(n,r(e))}var ZT=XT;function eR(e,t){for(var r=-1,n=e==null?0:e.length,a=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[a++]=s)}return o}var tR=eR;function rR(){return[]}var nR=rR,aR=Object.prototype,oR=aR.propertyIsEnumerable,xd=Object.getOwnPropertySymbols,sR=xd?function(e){return e==null?[]:(e=Object(e),tR(xd(e),function(t){return oR.call(e,t)}))}:nR,iR=sR;function lR(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var cR=lR;function uR(e){return e!=null&&typeof e=="object"}var ga=uR,dR="[object Arguments]";function hR(e){return ga(e)&&Ea(e)==dR}var Sd=hR,Fm=Object.prototype,pR=Fm.hasOwnProperty,mR=Fm.propertyIsEnumerable,fR=Sd(function(){return arguments}())?Sd:function(e){return ga(e)&&pR.call(e,"callee")&&!mR.call(e,"callee")},gR=fR;function yR(){return!1}var bR=yR,Bm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Od=Bm&&typeof module=="object"&&module&&!module.nodeType&&module,vR=Od&&Od.exports===Bm,wd=vR?Wt.Buffer:void 0,xR=wd?wd.isBuffer:void 0,SR=xR||bR,tl=SR,OR=9007199254740991,wR=/^(?:0|[1-9]\d*)$/;function CR(e,t){var r=typeof e;return t=t??OR,!!t&&(r=="number"||r!="symbol"&&wR.test(e))&&e>-1&&e%1==0&&e<t}var PR=CR,TR=9007199254740991;function RR(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=TR}var Nm=RR,AR="[object Arguments]",_R="[object Array]",ER="[object Boolean]",VR="[object Date]",IR="[object Error]",MR="[object Function]",jR="[object Map]",$R="[object Number]",kR="[object Object]",UR="[object RegExp]",LR="[object Set]",DR="[object String]",FR="[object WeakMap]",BR="[object ArrayBuffer]",NR="[object DataView]",zR="[object Float32Array]",GR="[object Float64Array]",HR="[object Int8Array]",qR="[object Int16Array]",JR="[object Int32Array]",WR="[object Uint8Array]",YR="[object Uint8ClampedArray]",KR="[object Uint16Array]",QR="[object Uint32Array]",Ae={};Ae[zR]=Ae[GR]=Ae[HR]=Ae[qR]=Ae[JR]=Ae[WR]=Ae[YR]=Ae[KR]=Ae[QR]=!0;Ae[AR]=Ae[_R]=Ae[BR]=Ae[ER]=Ae[NR]=Ae[VR]=Ae[IR]=Ae[MR]=Ae[jR]=Ae[$R]=Ae[kR]=Ae[UR]=Ae[LR]=Ae[DR]=Ae[FR]=!1;function XR(e){return ga(e)&&Nm(e.length)&&!!Ae[Ea(e)]}var ZR=XR;function eA(e){return function(t){return e(t)}}var tA=eA,zm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ra=zm&&typeof module=="object"&&module&&!module.nodeType&&module,rA=ra&&ra.exports===zm,Ci=rA&&$m.process,nA=function(){try{var e=ra&&ra.require&&ra.require("util").types;return e||Ci&&Ci.binding&&Ci.binding("util")}catch{}}(),Cd=nA,Pd=Cd&&Cd.isTypedArray,aA=Pd?tA(Pd):ZR,Gm=aA,oA=Object.prototype,sA=oA.hasOwnProperty;function iA(e,t){var r=qo(e),n=!r&&gR(e),a=!r&&!n&&tl(e),o=!r&&!n&&!a&&Gm(e),s=r||n||a||o,i=s?cR(e.length,String):[],l=i.length;for(var c in e)(t||sA.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||PR(c,l)))&&i.push(c);return i}var lA=iA,cA=Object.prototype;function uA(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||cA;return e===r}var dA=uA;function hA(e,t){return function(r){return e(t(r))}}var pA=hA,mA=pA(Object.keys,Object),fA=mA,gA=Object.prototype,yA=gA.hasOwnProperty;function bA(e){if(!dA(e))return fA(e);var t=[];for(var r in Object(e))yA.call(e,r)&&r!="constructor"&&t.push(r);return t}var vA=bA;function xA(e){return e!=null&&Nm(e.length)&&!Um(e)}var SA=xA;function OA(e){return SA(e)?lA(e):vA(e)}var wA=OA;function CA(e){return ZT(e,wA,iR)}var Td=CA,PA=1,TA=Object.prototype,RA=TA.hasOwnProperty;function AA(e,t,r,n,a,o){var s=r&PA,i=Td(e),l=i.length,c=Td(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:RA.call(t,h)))return!1}var p=o.get(e),f=o.get(t);if(p&&f)return p==t&&f==e;var m=!0;o.set(e,t),o.set(t,e);for(var v=s;++d<l;){h=i[d];var S=e[h],E=t[h];if(n)var O=s?n(E,S,h,t,e,o):n(S,E,h,e,t,o);if(!(O===void 0?S===E||a(S,E,r,n,o):O)){m=!1;break}v||(v=h=="constructor")}if(m&&!v){var w=e.constructor,T=t.constructor;w!=T&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof T=="function"&&T instanceof T)&&(m=!1)}return o.delete(e),o.delete(t),m}var _A=AA,EA=Cn(Wt,"DataView"),rl=EA,VA=Cn(Wt,"Promise"),nl=VA,IA=Cn(Wt,"Set"),al=IA,MA=Cn(Wt,"WeakMap"),ol=MA,Rd="[object Map]",jA="[object Object]",Ad="[object Promise]",_d="[object Set]",Ed="[object WeakMap]",Vd="[object DataView]",$A=jr(rl),kA=jr(ma),UA=jr(nl),LA=jr(al),DA=jr(ol),mr=Ea;(rl&&mr(new rl(new ArrayBuffer(1)))!=Vd||ma&&mr(new ma)!=Rd||nl&&mr(nl.resolve())!=Ad||al&&mr(new al)!=_d||ol&&mr(new ol)!=Ed)&&(mr=function(e){var t=Ea(e),r=t==jA?e.constructor:void 0,n=r?jr(r):"";if(n)switch(n){case $A:return Vd;case kA:return Rd;case UA:return Ad;case LA:return _d;case DA:return Ed}return t});var Id=mr,FA=1,Md="[object Arguments]",jd="[object Array]",Za="[object Object]",BA=Object.prototype,$d=BA.hasOwnProperty;function NA(e,t,r,n,a,o){var s=qo(e),i=qo(t),l=s?jd:Id(e),c=i?jd:Id(t);l=l==Md?Za:l,c=c==Md?Za:c;var u=l==Za,d=c==Za,h=l==c;if(h&&tl(e)){if(!tl(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new Oi),s||Gm(e)?Dm(e,t,r,n,a,o):WT(e,t,l,r,n,a,o);if(!(r&FA)){var p=u&&$d.call(e,"__wrapped__"),f=d&&$d.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,v=f?t.value():t;return o||(o=new Oi),a(m,v,r,n,o)}}return h?(o||(o=new Oi),_A(e,t,r,n,a,o)):!1}var zA=NA;function Hm(e,t,r,n,a){return e===t?!0:e==null||t==null||!ga(e)&&!ga(t)?e!==e&&t!==t:zA(e,t,r,n,Hm,a)}var GA=Hm;function HA(e,t){return GA(e,t)}var qA=HA;/*! *****************************************************************************
|
|
114
|
+
*/var uu;function Rb(){return uu||(uu=1,process.env.NODE_ENV!=="production"&&function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=K,r=ap(),n=typeof Object.is=="function"?Object.is:e,a=r.useSyncExternalStore,o=t.useRef,s=t.useEffect,i=t.useMemo,l=t.useDebugValue;oi.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var f=o(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function S(w){if(!E){if(E=!0,O=w,w=h(w),p!==void 0&&m.hasValue){var T=m.value;if(p(T,w))return P=T}return P=w}if(T=P,n(O,w))return T;var V=h(w);return p!==void 0&&p(T,V)?(O=w,T):(O=w,P=V)}var E=!1,O,P,C=d===void 0?null:d;return[function(){return S(u())},C===null?void 0:function(){return S(C())}]},[u,d,h,p]);var b=a(c,f[0],f[1]);return s(function(){m.hasValue=!0,m.value=b},[b]),l(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),oi}var du;function Ab(){return du||(du=1,process.env.NODE_ENV==="production"?qa.exports=Tb():qa.exports=Rb()),qa.exports}var _b=Ab();const Eb=Object.is,ot=(e,t,r=[],n=Eb)=>{const a=o=>t(o,...r);return _b.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a,n)},Vb="DEFAULT_X_AXIS_KEY",Ib="DEFAULT_Y_AXIS_KEY",Mb={top:20,bottom:20,left:20,right:20},jb=45,$b=25,op=20,On=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},wn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},kb=pe([wn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="left"?t+(r.width||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Ub=pe([wn],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="right"?t+(r.width||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Db=pe([On],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="top"?t+(r.height||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Lb=pe([On],e=>(e??[]).reduce((t,r)=>{var n;return r.position==="bottom"?t+(r.height||0)+((n=r.zoom)!=null&&n.slider.enabled?r.zoom.slider.size:0):t},0)),Bb=e=>e.dimensions,sp=e=>e.dimensions.width,ip=e=>e.dimensions.height,Fb=e=>e.dimensions.margin.top,Nb=e=>e.dimensions.margin.right,zb=e=>e.dimensions.margin.bottom,Gb=e=>e.dimensions.margin.left,Ta=pe([sp,ip,Fb,Nb,zb,Gb,Db,Ub,Lb,kb],(e,t,r,n,a,o,s,i,l,c)=>({width:e-o-n-c-i,left:o+c,right:n+i,height:t-r-a-s-l,top:r+s,bottom:a+l})),Hb=pe([Bb],e=>({width:e.propsWidth,height:e.propsHeight})),qb=pe([sp,ip],(e,t)=>({width:e,height:t}));function lp(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?Y({},t,e):e}const Jb=10,ps=({params:e,store:t,svgRef:r})=>{const n=e.width!==void 0&&e.height!==void 0,a=B.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[o,s]=B.useState(0),[i,l]=B.useState(0),c=B.useCallback(()=>{const f=r==null?void 0:r.current;if(!f)return{};const b=wb(f).getComputedStyle(f),S=Math.floor(parseFloat(b.height))||0,E=Math.floor(parseFloat(b.width))||0;return t.update(O=>O.dimensions.width===E&&O.dimensions.height===S?O:Y({},O,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:e.width??E,height:e.height??S,propsWidth:e.width,propsHeight:e.height}})),{height:S,width:E}},[t,r,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]);B.useEffect(()=>{t.update(f=>{const m=e.width??f.dimensions.width,b=e.height??f.dimensions.height;return Y({},f,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:m,height:b,propsHeight:e.height,propsWidth:e.width}})})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),B.useEffect(()=>{a.current.displayError=!0},[]),$t(()=>{if(n||!a.current.initialCompute||a.current.computeRun>Jb)return;const f=c();f.width!==o||f.height!==i?(a.current.computeRun+=1,f.width!==void 0&&s(f.width),f.height!==void 0&&l(f.height)):a.current.initialCompute&&(a.current.initialCompute=!1)},[i,o,c,n]),$t(()=>{if(n)return()=>{};c();const f=r.current;if(typeof ResizeObserver>"u")return()=>{};let m;const b=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{c()})});return f&&b.observe(f),()=>{m&&cancelAnimationFrame(m),f&&b.unobserve(f)}},[c,n,r]),process.env.NODE_ENV!=="production"&&(a.current.displayError&&e.width===void 0&&o===0&&(console.error("MUI X Charts: ChartContainer does not have `width` prop, and its container has no `width` defined."),a.current.displayError=!1),a.current.displayError&&e.height===void 0&&i===0&&(console.error("MUI X Charts: ChartContainer does not have `height` prop, and its container has no `height` defined."),a.current.displayError=!1));const u=ot(t,Ta),d=B.useCallback(f=>f>=u.left-1&&f<=u.left+u.width,[u.left,u.width]),h=B.useCallback(f=>f>=u.top-1&&f<=u.top+u.height,[u.height,u.top]);return{instance:{isPointInside:B.useCallback((f,m,b)=>b&&"closest"in b&&b.closest("[data-drawing-container]")?!0:d(f)&&h(m),[d,h]),isXInside:d,isYInside:h}}};ps.params={width:!0,height:!0,margin:!0};ps.getDefaultizedParams=({params:e})=>Y({},e,{margin:lp(e.margin,Mb)});ps.getInitialState=({width:e,height:t,margin:r})=>({dimensions:{margin:r,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const Vl=({params:e,store:t})=>($t(()=>{t.update(r=>Y({},r,{experimentalFeatures:e.experimentalFeatures}))},[t,e.experimentalFeatures]),{});Vl.params={experimentalFeatures:!0};Vl.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const Wb=e=>e.experimentalFeatures,cp=pe([Wb],e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let hu=0;const Yb=()=>(hu+=1,`mui-chart-${hu}`),Il=({params:e,store:t})=>(B.useEffect(()=>{t.update(r=>e.id===void 0||e.id===r.id.providedChartId&&r.id.chartId!==void 0?r:Y({},r,{id:Y({},r.id,{chartId:e.id??Yb()})}))},[t,e.id]),{});Il.params={id:!0};Il.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const Kb=e=>e.id,Qb=pe([Kb],e=>e.chartId),Xb=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],Zb=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],up=e=>e==="dark"?Zb:Xb,dp=({series:e,colors:t,seriesConfig:r,dataset:n})=>{const a={};e.forEach((s,i)=>{var u;const l=r[s.type].getSeriesWithDefaultValues(s,i,t),c=l.id;if(a[s.type]===void 0&&(a[s.type]={series:{},seriesOrder:[]}),((u=a[s.type])==null?void 0:u.series[c])!==void 0)throw new Error(`MUI X Charts: series' id "${c}" is not unique.`);a[s.type].series[c]=l,a[s.type].seriesOrder.push(c)});const o={};return Object.keys(r).forEach(s=>{var l,c;const i=a[s];i!==void 0&&(o[s]=((c=(l=r[s])==null?void 0:l.seriesProcessor)==null?void 0:c.call(l,i,n))??a[s])}),o},ms=({params:e,store:t,seriesConfig:r})=>{const{series:n,dataset:a,theme:o,colors:s}=e,i=B.useRef(!0);return B.useEffect(()=>{if(i.current){i.current=!1;return}t.update(l=>Y({},l,{series:Y({},l.series,{processedSeries:dp({series:n,colors:typeof s=="function"?s(o):s,seriesConfig:r,dataset:a})})}))},[s,a,n,o,r,t]),{}};ms.params={dataset:!0,series:!0,colors:!0,theme:!0};const ev=[];ms.getDefaultizedParams=({params:e})=>{var t;return Y({},e,{series:(t=e.series)!=null&&t.length?e.series:ev,colors:e.colors??up,theme:e.theme??"light"})};ms.getInitialState=({series:e=[],colors:t,theme:r,dataset:n},a,o)=>({series:{seriesConfig:o,processedSeries:dp({series:e,colors:typeof t=="function"?t(r):t,seriesConfig:o,dataset:n})}});const hp=e=>e.series,Ra=pe([hp],e=>e.processedSeries),fs=pe([hp],e=>e.seriesConfig),tv={abort:!0,animationcancel:!0,animationend:!0,animationiteration:!0,animationstart:!0,auxclick:!0,beforeinput:!0,beforetoggle:!0,blur:!0,cancel:!0,canplay:!0,canplaythrough:!0,change:!0,click:!0,close:!0,compositionend:!0,compositionstart:!0,compositionupdate:!0,contextlost:!0,contextmenu:!0,contextrestored:!0,copy:!0,cuechange:!0,cut:!0,dblclick:!0,drag:!0,dragend:!0,dragenter:!0,dragleave:!0,dragover:!0,dragstart:!0,drop:!0,durationchange:!0,emptied:!0,ended:!0,error:!0,focus:!0,focusin:!0,focusout:!0,formdata:!0,gotpointercapture:!0,input:!0,invalid:!0,keydown:!0,keypress:!0,keyup:!0,load:!0,loadeddata:!0,loadedmetadata:!0,loadstart:!0,lostpointercapture:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,paste:!0,pause:!0,play:!0,playing:!0,pointercancel:!0,pointerdown:!0,pointerenter:!0,pointerleave:!0,pointermove:!0,pointerout:!0,pointerover:!0,pointerup:!0,progress:!0,ratechange:!0,reset:!0,resize:!0,scroll:!0,scrollend:!0,securitypolicyviolation:!0,seeked:!0,seeking:!0,select:!0,selectionchange:!0,selectstart:!0,slotchange:!0,stalled:!0,submit:!0,suspend:!0,timeupdate:!0,toggle:!0,touchcancel:!0,touchend:!0,touchmove:!0,touchstart:!0,transitioncancel:!0,transitionend:!0,transitionrun:!0,transitionstart:!0,volumechange:!0,waiting:!0,webkitanimationend:!0,webkitanimationiteration:!0,webkitanimationstart:!0,webkittransitionend:!0,wheel:!0};class pp{constructor(t){if(this.name=void 0,this.preventDefault=void 0,this.stopPropagation=void 0,this.preventIf=void 0,this.requiredKeys=void 0,this.keyboardManager=void 0,this.pointerMode=void 0,this.customData={},this.pointerManager=void 0,this.gesturesRegistry=void 0,this.element=void 0,this.state=void 0,this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,!t||!t.name)throw new Error("Gesture must be initialized with a valid name.");if(t.name in tv)throw new Error(`Gesture can't be created with a native event name. Tried to use "${t.name}". Please use a custom name instead.`);this.name=t.name,this.preventDefault=t.preventDefault??!1,this.stopPropagation=t.stopPropagation??!1,this.preventIf=t.preventIf??[],this.requiredKeys=t.requiredKeys??[],this.pointerMode=t.pointerMode??[]}init(t,r,n,a){this.element=t,this.pointerManager=r,this.gesturesRegistry=n,this.keyboardManager=a;const o=`${this.name}ChangeOptions`;this.element.addEventListener(o,this.handleOptionsChange.bind(this));const s=`${this.name}ChangeState`;this.element.addEventListener(s,this.handleStateChange.bind(this))}handleOptionsChange(t){t&&t.detail&&this.updateOptions(t.detail)}updateOptions(t){this.preventDefault=t.preventDefault??this.preventDefault,this.stopPropagation=t.stopPropagation??this.stopPropagation,this.preventIf=t.preventIf??this.preventIf,this.requiredKeys=t.requiredKeys??this.requiredKeys,this.pointerMode=t.pointerMode??this.pointerMode}handleStateChange(t){t&&t.detail&&this.updateState(t.detail)}updateState(t){Object.assign(this.state,t)}getTargetElement(t){return this.isActive||this.element===t.target||this.element.contains(t.target)?this.element:null}set isActive(t){t?this.gesturesRegistry.registerActiveGesture(this.element,this):this.gesturesRegistry.unregisterActiveGesture(this.element,this)}get isActive(){return this.gesturesRegistry.isGestureActive(this.element,this)??!1}shouldPreventGesture(t){if(!this.keyboardManager.areKeysPressed(this.requiredKeys))return!0;if(this.preventIf.length===0)return!1;const r=this.gesturesRegistry.getActiveGestures(t);return this.preventIf.some(n=>r[n])}isPointerTypeAllowed(t){return!this.pointerMode||this.pointerMode.length===0?!0:this.pointerMode.includes(t)}destroy(){const t=`${this.name}ChangeOptions`;this.element.removeEventListener(t,this.handleOptionsChange.bind(this));const r=`${this.name}ChangeState`;this.element.removeEventListener(r,this.handleStateChange.bind(this))}}class rv{constructor(){this.activeGestures=new Map}registerActiveGesture(t,r){this.activeGestures.has(t)||this.activeGestures.set(t,new Set);const n=this.activeGestures.get(t),a={gesture:r,element:t};n.add(a)}unregisterActiveGesture(t,r){const n=this.activeGestures.get(t);n&&(n.forEach(a=>{a.gesture===r&&n.delete(a)}),n.size===0&&this.activeGestures.delete(t))}getActiveGestures(t){const r=this.activeGestures.get(t);return r?Array.from(r).reduce((n,a)=>(n[a.gesture.name]=!0,n),{}):{}}isGestureActive(t,r){const n=this.activeGestures.get(t);return n?Array.from(n).some(a=>a.gesture===r):!1}destroy(){this.activeGestures.clear()}unregisterElement(t){this.activeGestures.delete(t)}}class nv{constructor(){this.pressedKeys=new Set,this.handleKeyDown=t=>{this.pressedKeys.add(t.key)},this.handleKeyUp=t=>{this.pressedKeys.delete(t.key)},this.clearKeys=()=>{this.pressedKeys.clear()},this.initialize()}initialize(){typeof window>"u"||(window.addEventListener("keydown",this.handleKeyDown),window.addEventListener("keyup",this.handleKeyUp),window.addEventListener("blur",this.clearKeys))}areKeysPressed(t){return!t||t.length===0?!0:t.every(r=>r==="ControlOrMeta"?this.pressedKeys.has("Control")||this.pressedKeys.has("Meta"):this.pressedKeys.has(r))}destroy(){typeof window<"u"&&(window.removeEventListener("keydown",this.handleKeyDown),window.removeEventListener("keyup",this.handleKeyUp),window.removeEventListener("blur",this.clearKeys)),this.clearKeys()}}class av{constructor(t){this.root=void 0,this.touchAction=void 0,this.passive=void 0,this.preventEventInterruption=!0,this.pointers=new Map,this.gestureHandlers=new Set,this.handleInterruptEvents=r=>{if(this.preventEventInterruption&&"pointerType"in r&&r.pointerType==="touch"){r.preventDefault();return}const n=new PointerEvent("forceCancel",{bubbles:!1,cancelable:!1}),a=this.pointers.values().next().value;if(this.pointers.size>0&&a){Object.defineProperties(n,{clientX:{value:a.clientX},clientY:{value:a.clientY},pointerId:{value:a.pointerId},pointerType:{value:a.pointerType}});for(const[o,s]of this.pointers.entries()){const i=Y({},s,{type:"forceCancel"});this.pointers.set(o,i)}}this.notifyHandlers(n),this.pointers.clear()},this.handlePointerEvent=r=>{const{type:n,pointerId:a}=r;if(n==="pointerdown"){if(this.pointers.set(a,this.createPointerData(r)),r.target instanceof Element)try{r.target.setPointerCapture(a)}catch{}}else if(n==="pointermove")this.pointers.set(a,this.createPointerData(r));else if(n==="pointerup"||n==="pointercancel"||n==="forceCancel"){if(r.target instanceof Element)try{r.target.releasePointerCapture(a)}catch{}this.pointers.set(a,this.createPointerData(r)),this.notifyHandlers(r),this.pointers.delete(a);return}this.notifyHandlers(r)},this.root=t.root??document.documentElement,this.touchAction=t.touchAction||"auto",this.passive=t.passive!==!1,this.preventEventInterruption=t.preventEventInterruption!==!1,this.setupEventListeners()}registerGestureHandler(t){return this.gestureHandlers.add(t),()=>{this.gestureHandlers.delete(t)}}getPointers(){return new Map(this.pointers)}setupEventListeners(){this.touchAction!=="auto"&&(this.root.style.touchAction=this.touchAction),this.root.addEventListener("pointerdown",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointermove",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointerup",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("pointercancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("forceCancel",this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener("blur",this.handleInterruptEvents),this.root.addEventListener("contextmenu",this.handleInterruptEvents)}notifyHandlers(t){this.gestureHandlers.forEach(r=>r(this.pointers,t))}createPointerData(t){return{pointerId:t.pointerId,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,target:t.target,timeStamp:t.timeStamp,type:t.type,isPrimary:t.isPrimary,pressure:t.pressure,width:t.width,height:t.height,pointerType:t.pointerType,srcEvent:t}}destroy(){this.root.removeEventListener("pointerdown",this.handlePointerEvent),this.root.removeEventListener("pointermove",this.handlePointerEvent),this.root.removeEventListener("pointerup",this.handlePointerEvent),this.root.removeEventListener("pointercancel",this.handlePointerEvent),this.root.removeEventListener("forceCancel",this.handlePointerEvent),this.root.removeEventListener("blur",this.handleInterruptEvents),this.root.removeEventListener("contextmenu",this.handleInterruptEvents),this.pointers.clear(),this.gestureHandlers.clear()}}class ov{constructor(t){this.gestureTemplates=new Map,this.elementGestureMap=new Map,this.activeGesturesRegistry=new rv,this.pointerManager=void 0,this.keyboardManager=new nv,this.pointerManager=new av({root:t.root,touchAction:t.touchAction,passive:t.passive}),t.gestures&&t.gestures.length>0&&t.gestures.forEach(r=>{this.addGestureTemplate(r)})}addGestureTemplate(t){this.gestureTemplates.has(t.name)&&console.warn(`Gesture template with name "${t.name}" already exists. It will be overwritten.`),this.gestureTemplates.set(t.name,t)}setGestureOptions(t,r,n){const a=this.elementGestureMap.get(r);if(!a||!a.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const o=new CustomEvent(`${t}ChangeOptions`,{detail:n,bubbles:!1,cancelable:!1});r.dispatchEvent(o)}setGestureState(t,r,n){const a=this.elementGestureMap.get(r);if(!a||!a.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const o=new CustomEvent(`${t}ChangeState`,{detail:n,bubbles:!1,cancelable:!1});r.dispatchEvent(o)}registerElement(t,r,n){if(Array.isArray(t))return t.forEach(o=>{const s=n==null?void 0:n[o];this.registerSingleGesture(o,r,s)}),r;const a=n==null?void 0:n[t];return this.registerSingleGesture(t,r,a),r}registerSingleGesture(t,r,n){const a=this.gestureTemplates.get(t);if(!a)return console.error(`Gesture template "${t}" not found.`),!1;this.elementGestureMap.has(r)||this.elementGestureMap.set(r,new Map);const o=this.elementGestureMap.get(r);o.has(t)&&(console.warn(`Element already has gesture "${t}" registered. It will be replaced.`),this.unregisterElement(t,r));const s=a.clone(n);return s.init(r,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),o.set(t,s),!0}unregisterElement(t,r){const n=this.elementGestureMap.get(r);return!n||!n.has(t)?!1:(n.get(t).destroy(),n.delete(t),this.activeGesturesRegistry.unregisterElement(r),n.size===0&&this.elementGestureMap.delete(r),!0)}unregisterAllGestures(t){const r=this.elementGestureMap.get(t);if(r){for(const[,n]of r)n.destroy(),this.activeGesturesRegistry.unregisterElement(t);this.elementGestureMap.delete(t)}}destroy(){for(const[t]of this.elementGestureMap)this.unregisterAllGestures(t);this.gestureTemplates.clear(),this.elementGestureMap.clear(),this.activeGesturesRegistry.destroy(),this.keyboardManager.destroy()}}class Aa extends pp{constructor(t){super(t),this.unregisterHandler=null,this.originalTarget=null,this.optionsType=void 0,this.mutableOptionsType=void 0,this.minPointers=void 0,this.maxPointers=void 0,this.minPointers=t.minPointers??1,this.maxPointers=t.maxPointers??1/0}init(t,r,n,a){super.init(t,r,n,a),this.unregisterHandler=this.pointerManager.registerGestureHandler((o,s)=>this.handlePointerEvent(o,s))}updateOptions(t){super.updateOptions(t),this.minPointers=t.minPointers??this.minPointers,this.maxPointers=t.maxPointers??this.maxPointers}getRelevantPointers(t,r){return t.filter(n=>this.isPointerTypeAllowed(n.pointerType)&&(r===n.target||n.target===this.originalTarget||r===this.originalTarget||r.contains(n.target)))}destroy(){this.unregisterHandler&&(this.unregisterHandler(),this.unregisterHandler=null),super.destroy()}}function sv(e,t){const r=t.x-e.x,n=t.y-e.y;return Math.sqrt(r*r+n*n)}function si(e){if(e.length<2)return 0;let t=0,r=0;for(let n=0;n<e.length;n+=1)for(let a=n+1;a<e.length;a+=1)t+=sv({x:e[n].clientX,y:e[n].clientY},{x:e[a].clientX,y:e[a].clientY}),r+=1;return r>0?t/r:0}function Ht(e){if(e.length===0)return{x:0,y:0};const t=e.reduce((r,n)=>(r.x+=n.clientX,r.y+=n.clientY,r),{x:0,y:0});return{x:t.x/e.length,y:t.y/e.length}}function Cn(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const Wa=1e-5,er=1e-5,pu=.15;function iv(e,t){const r=t.x-e.x,n=t.y-e.y,a={vertical:null,horizontal:null,mainAxis:null},o=lv(t,e),s=Math.abs(r)>Math.abs(n)?"horizontal":"vertical",i=o||s==="horizontal"?Wa:pu,l=o?Wa:s==="horizontal"?pu:Wa;return Math.abs(r)>i&&(a.horizontal=r>0?"right":"left"),Math.abs(n)>l&&(a.vertical=n>0?"down":"up"),a.mainAxis=o?"diagonal":s,a}function lv(e,t){const r=t.x-e.x,n=t.y-e.y,a=Math.atan2(n,r)*180/Math.PI;return a>=-45+er&&a<=-22.5+er||a>=22.5+er&&a<=45+er||a>=135+er&&a<=157.5+er||a>=-157.5+er&&a<=-135+er}function cv(e,t){if(!e.vertical&&!e.horizontal)return!1;if(t.length===0)return!0;const r=e.vertical===null||t.includes(e.vertical),n=e.horizontal===null||t.includes(e.horizontal);return r&&n}const uv=0,dv=e=>e>uv?1:e<-0?-1:0;class Ml extends Aa{constructor(t){super(t),this.state={lastPosition:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.handleElementEnterBound=void 0,this.handleElementLeaveBound=void 0,this.handleElementEnterBound=this.handleElementEnter.bind(this),this.handleElementLeaveBound=this.handleElementLeave.bind(this),this.threshold=t.threshold||0}clone(t){return new Ml(Y({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,r,n,a){super.init(t,r,n,a),this.element.addEventListener("pointerenter",this.handleElementEnterBound),this.element.addEventListener("pointerleave",this.handleElementLeaveBound)}destroy(){this.element.removeEventListener("pointerenter",this.handleElementEnterBound),this.element.removeEventListener("pointerleave",this.handleElementLeaveBound),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state={lastPosition:null}}handleElementEnter(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen")return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());if(n.length>=this.minPointers&&n.length<=this.maxPointers){this.isActive=!0;const a={x:t.clientX,y:t.clientY};this.state.lastPosition=a,this.emitMoveEvent(this.element,"start",n,t),this.emitMoveEvent(this.element,"ongoing",n,t)}}handleElementLeave(t){if(t.pointerType!=="mouse"&&t.pointerType!=="pen"||!this.isActive)return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());this.emitMoveEvent(this.element,"end",n,t),this.resetState()}handlePointerEvent(t,r){if(r.type!=="pointermove"||r.pointerType!=="mouse"&&r.pointerType!=="pen")return;this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const n=Array.from(t.values()),a=this.getTargetElement(r);if(!a||n.length<this.minPointers||n.length>this.maxPointers)return;if(this.shouldPreventGesture(a)){if(!this.isActive)return;this.resetState(),this.emitMoveEvent(a,"end",n,r);return}const o={x:r.clientX,y:r.clientY};this.state.lastPosition=o,this.isActive||(this.isActive=!0,this.emitMoveEvent(a,"start",n,r)),this.emitMoveEvent(a,"ongoing",n,r)}emitMoveEvent(t,r,n,a){const o=this.state.lastPosition||Ht(n),s=this.gesturesRegistry.getActiveGestures(t),i={gestureName:this.name,centroid:o,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,activeGestures:s,customData:this.customData},l=Cn(this.name,r),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(c)}}class jl extends Aa{constructor(t){super(t),this.state={startPointers:new Map,startCentroid:null,lastCentroid:null,movementThresholdReached:!1,totalDeltaX:0,totalDeltaY:0,activeDeltaX:0,activeDeltaY:0,lastDirection:{vertical:null,horizontal:null,mainAxis:null},lastDeltas:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.direction=void 0,this.direction=t.direction||["up","down","left","right"],this.threshold=t.threshold||0}clone(t){return new jl(Y({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,direction:[...this.direction],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.direction=t.direction||this.direction}resetState(){this.isActive=!1,this.state=Y({},this.state,{startPointers:new Map,startCentroid:null,lastCentroid:null,lastDeltas:null,activeDeltaX:0,activeDeltaY:0,movementThresholdReached:!1,lastDirection:{vertical:null,horizontal:null,mainAxis:null}})}handlePointerEvent(t,r){const n=Array.from(t.values());if(r.type==="forceCancel"){this.cancel(r.target,n,r);return}const a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.cancel(a,n,r);return}const o=this.getRelevantPointers(n,a);if(o.length<this.minPointers||o.length>this.maxPointers){this.cancel(a,o,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(o.forEach(s=>{this.state.startPointers.set(s.pointerId,s)}),this.originalTarget=a,this.state.startCentroid=Ht(o),this.state.lastCentroid=Y({},this.state.startCentroid));break;case"pointermove":if(this.state.startCentroid&&o.length>=this.minPointers){const s=Ht(o),i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y,c=Math.sqrt(i*i+l*l),u=iv(this.state.lastCentroid??this.state.startCentroid,s),d=this.state.lastCentroid?s.x-this.state.lastCentroid.x:0,h=this.state.lastCentroid?s.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&c>=this.threshold&&cv(u,this.direction)?(this.state.movementThresholdReached=!0,this.isActive=!0,this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(a,"start",o,r,s),this.emitPanEvent(a,"ongoing",o,r,s)):this.state.movementThresholdReached&&this.isActive&&(this.state.lastDeltas={x:d,y:h},this.state.totalDeltaX+=d,this.state.totalDeltaY+=h,this.state.activeDeltaX+=d,this.state.activeDeltaY+=h,this.emitPanEvent(a,"ongoing",o,r,s)),this.state.lastCentroid=s,this.state.lastDirection=u}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){if(o.filter(s=>s.type!=="pointerup"&&s.type!=="pointercancel").length<this.minPointers){const s=this.state.lastCentroid||this.state.startCentroid;r.type==="pointercancel"&&this.emitPanEvent(a,"cancel",o,r,s),this.emitPanEvent(a,"end",o,r,s),this.resetState()}}else this.resetState();break}}emitPanEvent(t,r,n,a,o){var S,E;if(!this.state.startCentroid)return;const s=((S=this.state.lastDeltas)==null?void 0:S.x)??0,i=((E=this.state.lastDeltas)==null?void 0:E.y)??0,l=this.state.startPointers.values().next().value,c=l?(a.timeStamp-l.timeStamp)/1e3:0,u=c>0?s/c:0,d=c>0?i/c:0,h=Math.sqrt(u*u+d*d),p=this.gesturesRegistry.getActiveGestures(t),f={gestureName:this.name,initialCentroid:this.state.startCentroid,centroid:o,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,deltaX:s,deltaY:i,direction:this.state.lastDirection,velocityX:u,velocityY:d,velocity:h,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,activeDeltaX:this.state.activeDeltaX,activeDeltaY:this.state.activeDeltaY,activeGestures:p,customData:this.customData},m=Cn(this.name,r),b=new CustomEvent(m,{bubbles:!0,cancelable:!0,detail:f});t.dispatchEvent(b),this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation()}cancel(t,r,n){if(this.isActive){const a=t??this.element;this.emitPanEvent(a,"cancel",r,n,this.state.lastCentroid),this.emitPanEvent(a,"end",r,n,this.state.lastCentroid)}this.resetState()}}class $l extends Aa{constructor(t){super(Y({},t,{minPointers:t.minPointers??2})),this.state={startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,totalScale:1,deltaScale:0},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.threshold=void 0,this.threshold=t.threshold??0}clone(t){return new $l(Y({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t)}resetState(){this.isActive=!1,this.state=Y({},this.state,{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,deltaScale:0})}handlePointerEvent(t,r){const n=Array.from(t.values()),a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.isActive&&(this.emitPinchEvent(a,"cancel",n,r),this.resetState());return}const o=this.getRelevantPointers(n,a);switch(r.type){case"pointerdown":if(o.length>=2&&!this.isActive){const s=si(o);this.state.startDistance=s,this.state.lastDistance=s,this.state.lastTime=r.timeStamp,this.originalTarget=a}break;case"pointermove":if(this.state.startDistance&&o.length>=this.minPointers){const s=si(o),i=Math.abs(s-this.state.lastDistance);if(i!==0&&i>=this.threshold){const l=this.state.startDistance?s/this.state.startDistance:1,c=l/this.state.lastScale;this.state.totalScale*=c;const u=(r.timeStamp-this.state.lastTime)/1e3;if(this.state.lastDistance){const h=(s-this.state.lastDistance)/u;this.state.velocity=Number.isNaN(h)?0:h}this.state.lastDistance=s,this.state.deltaScale=l-this.state.lastScale,this.state.lastScale=l,this.state.lastTime=r.timeStamp,this.isActive?this.emitPinchEvent(a,"ongoing",o,r):(this.isActive=!0,this.emitPinchEvent(a,"start",o,r),this.emitPinchEvent(a,"ongoing",o,r))}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const s=o.filter(i=>i.type!=="pointerup"&&i.type!=="pointercancel");if(s.length<this.minPointers)r.type==="pointercancel"&&this.emitPinchEvent(a,"cancel",o,r),this.emitPinchEvent(a,"end",o,r),this.resetState();else if(s.length>=2){const i=si(s);this.state.startDistance=i/this.state.lastScale}}break}}emitPinchEvent(t,r,n,a){const o=Ht(n),s=this.state.lastDistance,i=this.state.lastScale,l=this.gesturesRegistry.getActiveGestures(t),c={gestureName:this.name,centroid:o,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,scale:i,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:s,velocity:this.state.velocity,activeGestures:l,direction:dv(this.state.velocity),customData:this.customData};this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation();const u=Cn(this.name,r),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,detail:c});t.dispatchEvent(d)}}class kl extends Aa{constructor(t){super(t),this.state={startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.duration=void 0,this.maxDistance=void 0,this.duration=t.duration??500,this.maxDistance=t.maxDistance??10}clone(t){return new kl(Y({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,duration:this.duration,maxDistance:this.maxDistance,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.clearPressTimer(),this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.duration=t.duration??this.duration,this.maxDistance=t.maxDistance??this.maxDistance}resetState(){this.clearPressTimer(),this.isActive=!1,this.state=Y({},this.state,{startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1})}clearPressTimer(){this.state.timerId!==null&&(clearTimeout(this.state.timerId),this.state.timerId=null)}handlePointerEvent(t,r){const n=Array.from(t.values());if(r.type==="forceCancel"){this.cancelPress(r.target,n,r);return}const a=this.getTargetElement(r);if(!a)return;if(this.shouldPreventGesture(a)){this.isActive&&this.cancelPress(a,n,r);return}const o=this.getRelevantPointers(n,a);if(o.length<this.minPointers||o.length>this.maxPointers){this.isActive&&this.cancelPress(a,o,r);return}switch(r.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(this.state.startCentroid=Ht(o),this.state.lastPosition=Y({},this.state.startCentroid),this.state.startTime=r.timeStamp,this.isActive=!0,this.originalTarget=a,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const s=this.state.lastPosition;this.emitPressEvent(a,"start",o,r,s),this.emitPressEvent(a,"ongoing",o,r,s)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const s=Ht(o);this.state.lastPosition=s;const i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelPress(a,o,r)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const s=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(a,"end",o,r,s)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(a,o,r);break}}emitPressEvent(t,r,n,a,o){const s=this.gesturesRegistry.getActiveGestures(t),i=a.timeStamp-this.state.startTime,l={gestureName:this.name,centroid:o,target:a.target,srcEvent:a,phase:r,pointers:n,timeStamp:a.timeStamp,x:o.x,y:o.y,duration:i,activeGestures:s,customData:this.customData},c=Cn(this.name,r),u=new CustomEvent(c,{bubbles:!0,cancelable:!0,detail:l});t.dispatchEvent(u),this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation()}cancelPress(t,r,n){if(this.isActive&&this.state.pressThresholdReached){const a=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(t??this.element,"cancel",r,n,a),this.emitPressEvent(t??this.element,"end",r,n,a)}this.resetState()}}class Ul extends Aa{constructor(t){super(t),this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.maxDistance=void 0,this.taps=void 0,this.maxDistance=t.maxDistance??10,this.taps=t.taps??1}clone(t){return new Ul(Y({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,maxDistance:this.maxDistance,taps:this.taps,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}destroy(){this.resetState(),super.destroy()}updateOptions(t){super.updateOptions(t),this.maxDistance=t.maxDistance??this.maxDistance,this.taps=t.taps??this.taps}resetState(){this.isActive=!1,this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null}}handlePointerEvent(t,r){const n=Array.from(t.values()),a=this.getTargetElement(r);if(!a)return;const o=this.getRelevantPointers(n,a);if(this.shouldPreventGesture(a)||o.length<this.minPointers||o.length>this.maxPointers){this.isActive&&this.cancelTap(a,o,r);return}switch(r.type){case"pointerdown":this.isActive||(this.state.startCentroid=Ht(o),this.state.lastPosition=Y({},this.state.startCentroid),this.isActive=!0,this.originalTarget=a);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const s=Ht(o);this.state.lastPosition=s;const i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y;Math.sqrt(i*i+l*l)>this.maxDistance&&this.cancelTap(a,o,r)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const s=this.state.lastPosition||this.state.startCentroid;if(!s){this.cancelTap(a,o,r);return}this.state.currentTapCount>=this.taps?(this.fireTapEvent(a,o,r,s),this.resetState()):(this.state.lastTapTime=r.timeStamp,this.isActive=!1,this.state.startCentroid=null,setTimeout(()=>{this.state&&this.state.currentTapCount>0&&this.state.currentTapCount<this.taps&&(this.state.currentTapCount=0)},300))}break;case"pointercancel":case"forceCancel":this.cancelTap(a,o,r);break}}fireTapEvent(t,r,n,a){const o=this.gesturesRegistry.getActiveGestures(t),s={gestureName:this.name,centroid:a,target:n.target,srcEvent:n,phase:"end",pointers:r,timeStamp:n.timeStamp,x:a.x,y:a.y,tapCount:this.state.currentTapCount,activeGestures:o,customData:this.customData},i=new CustomEvent(this.name,{bubbles:!0,cancelable:!0,detail:s});t.dispatchEvent(i),this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation()}cancelTap(t,r,n){if(this.state.startCentroid||this.state.lastPosition){const a=this.state.lastPosition||this.state.startCentroid,o=this.gesturesRegistry.getActiveGestures(t),s={gestureName:this.name,centroid:a,target:n.target,srcEvent:n,phase:"cancel",pointers:r,timeStamp:n.timeStamp,x:a.x,y:a.y,tapCount:this.state.currentTapCount,activeGestures:o,customData:this.customData},i=Cn(this.name,"cancel"),l=new CustomEvent(i,{bubbles:!0,cancelable:!0,detail:s});t.dispatchEvent(l)}this.resetState()}}class Dl extends pp{constructor(t){super(t),this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0},this.isSinglePhase=void 0,this.eventType=void 0,this.optionsType=void 0,this.mutableOptionsType=void 0,this.mutableStateType=void 0,this.sensitivity=void 0,this.max=void 0,this.min=void 0,this.initialDelta=void 0,this.invert=void 0,this.handleWheelEventBound=void 0,this.sensitivity=t.sensitivity??1,this.max=t.max??Number.MAX_SAFE_INTEGER,this.min=t.min??Number.MIN_SAFE_INTEGER,this.initialDelta=t.initialDelta??0,this.invert=t.invert??!1,this.state.totalDeltaX=this.initialDelta,this.state.totalDeltaY=this.initialDelta,this.state.totalDeltaZ=this.initialDelta,this.handleWheelEventBound=this.handleWheelEvent.bind(this)}clone(t){return new Dl(Y({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,sensitivity:this.sensitivity,max:this.max,min:this.min,initialDelta:this.initialDelta,invert:this.invert,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf]},t))}init(t,r,n,a){super.init(t,r,n,a),this.element.addEventListener("wheel",this.handleWheelEventBound)}destroy(){this.element.removeEventListener("wheel",this.handleWheelEventBound),this.resetState(),super.destroy()}resetState(){this.isActive=!1,this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0}}updateOptions(t){super.updateOptions(t),this.sensitivity=t.sensitivity??this.sensitivity,this.max=t.max??this.max,this.min=t.min??this.min,this.initialDelta=t.initialDelta??this.initialDelta,this.invert=t.invert??this.invert}handleWheelEvent(t){if(this.shouldPreventGesture(this.element))return;const r=this.pointerManager.getPointers()||new Map,n=Array.from(r.values());this.state.totalDeltaX+=t.deltaX*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaY+=t.deltaY*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaZ+=t.deltaZ*this.sensitivity*(this.invert?-1:1),["totalDeltaX","totalDeltaY","totalDeltaZ"].forEach(a=>{this.state[a]<this.min&&(this.state[a]=this.min),this.state[a]>this.max&&(this.state[a]=this.max)}),this.emitWheelEvent(n,t)}emitWheelEvent(t,r){const n=t.length>0?Ht(t):{x:r.clientX,y:r.clientY},a=this.gesturesRegistry.getActiveGestures(this.element),o={gestureName:this.name,centroid:n,target:r.target,srcEvent:r,phase:"ongoing",pointers:t,timeStamp:r.timeStamp,deltaX:r.deltaX*this.sensitivity*(this.invert?-1:1),deltaY:r.deltaY*this.sensitivity*(this.invert?-1:1),deltaZ:r.deltaZ*this.sensitivity*(this.invert?-1:1),deltaMode:r.deltaMode,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,totalDeltaZ:this.state.totalDeltaZ,activeGestures:a,customData:this.customData};this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation();const s=Cn(this.name,"ongoing"),i=new CustomEvent(s,{bubbles:!0,cancelable:!0,detail:o});this.element.dispatchEvent(i)}}const qr=e=>e.preventDefault(),Ll=({svgRef:e})=>{B.useEffect(()=>{const r=e.current;if(!r)return;const n=new ov({gestures:[new jl({name:"pan",threshold:0,maxPointers:1}),new Ml({name:"move",preventIf:["pan","pinch"]}),new $l({name:"pinch",threshold:5,preventIf:["pan"]}),new Dl({name:"turnWheel",sensitivity:.01,initialDelta:1}),new Ul({name:"tap",maxDistance:10,preventIf:["pan","pinch"]}),new kl({name:"quickPress",duration:50,maxDistance:10})]});return n.registerElement(["pan","move","pinch","turnWheel","tap","quickPress"],r),()=>{n.destroy()}},[e]);const t=B.useCallback((r,n,a)=>{const o=e.current;return o==null||o.addEventListener(r,n,a),{cleanup:()=>o==null?void 0:o.removeEventListener(r,n)}},[e]);return B.useEffect(()=>{const r=e.current;return r==null||r.addEventListener("gesturestart",qr),r==null||r.addEventListener("gesturechange",qr),r==null||r.addEventListener("gestureend",qr),()=>{r==null||r.removeEventListener("gesturestart",qr),r==null||r.removeEventListener("gesturechange",qr),r==null||r.removeEventListener("gestureend",qr)}},[e]),{instance:{addInteractionListener:t}}};Ll.params={};Ll.getInitialState=()=>({});const hv=[Il,Vl,ps,ms,Ll,hs],pv=["apiRef"],mv=e=>{let{plugins:t}=e,r=ir(e.props,pv);const n={};t.forEach(s=>{Object.assign(n,s.params)});const a={};return Object.keys(r).forEach(s=>{const i=r[s];n[s]&&(a[s]=i)}),t.reduce((s,i)=>i.getDefaultizedParams?i.getDefaultizedParams({params:s}):s,a)};let mu=0;function fv(e,t,r){const n=eb(),a=B.useMemo(()=>[...hv,...e],[e]),o=mv({plugins:a,props:t});o.id=o.id??n;const i=B.useRef({}).current,l=yv(t.apiRef),c=B.useRef(null),u=B.useRef(null),d=B.useRef(null);if(d.current==null){mu+=1;const f={cacheKey:{id:mu}};a.forEach(m=>{m.getInitialState&&Object.assign(f,m.getInitialState(o,f,r))}),d.current=new tb(f)}const h=f=>{const m=f({instance:i,params:o,plugins:a,store:d.current,svgRef:u,chartRootRef:c,seriesConfig:r});m.publicAPI&&Object.assign(l.current,m.publicAPI),m.instance&&Object.assign(i,m.instance)};return a.forEach(h),{contextValue:B.useMemo(()=>({store:d.current,publicAPI:l.current,instance:i,svgRef:u,chartRootRef:c}),[i,l])}}function gv(e){return e.current==null&&(e.current={}),e}function yv(e){const t=B.useRef({});return e?gv(e):t}const Bl=B.createContext(null);process.env.NODE_ENV!=="production"&&(Bl.displayName="ChartContext");const fu=new Set;function da(e,t="warning"){if(process.env.NODE_ENV==="production")return;const r=Array.isArray(e)?e.join(`
|
|
115
|
+
`):e;fu.has(r)||(fu.add(r),t==="error"?console.error(r):console.warn(r))}function bv(e){const{componentName:t,propName:r,controlled:n,defaultValue:a,warningPrefix:o="MUI X"}=e,[{initialDefaultValue:s,isControlled:i}]=B.useState({initialDefaultValue:a,isControlled:n!==void 0});i!==(n!==void 0)&&da([`${o}: A component is changing the ${i?"":"un"}controlled ${r} state of ${t} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"],"error"),JSON.stringify(s)!==JSON.stringify(a)&&da([`${o}: A component is changing the default ${r} state of an uncontrolled ${t} after being initialized. To suppress this warning opt to use a controlled ${t}.`],"error")}const mp=process.env.NODE_ENV==="production"?()=>{}:bv,fp=4,gp=20+2*fp,vv=40+2*fp,xv="hover",Ya={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",slider:{enabled:!1,preview:!1,size:gp,showTooltip:xv}},Fl=(e,t,r)=>{var n;if(e)return e===!0?Y({axisId:t,axisDirection:r},Ya):Y({axisId:t,axisDirection:r},Ya,e,{slider:Y({},Ya.slider,{size:((n=e.slider)==null?void 0:n.preview)??Ya.slider.preview?vv:gp},e.slider)})};function yp(e,t){const r={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:Vb,scaleType:"linear"}]).map((o,s)=>{var p;const i=o.dataKey,l=s===0?"bottom":"none",c=o.position??l,u=$b+(o.label?op:0),d=o.id??`defaultized-x-axis-${s}`,h=Y({offset:r[c]},o,{id:d,position:c,height:o.height??u,zoom:Fl(o.zoom,d,"x")});if(c!=="none"&&(r[c]+=h.height,(p=h.zoom)!=null&&p.slider.enabled&&(r[c]+=h.zoom.slider.size)),i===void 0||o.data!==void 0)return h;if(t===void 0)throw new Error("MUI X Charts: x-axis uses `dataKey` but no `dataset` is provided.");return Y({},h,{data:t.map(f=>f[i])})})}function bp(e,t){const r={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:Ib,scaleType:"linear"}]).map((o,s)=>{var p;const i=o.dataKey,l=s===0?"left":"none",c=o.position??l,u=jb+(o.label?op:0),d=o.id??`defaultized-y-axis-${s}`,h=Y({offset:r[c]},o,{id:d,position:c,width:o.width??u,zoom:Fl(o.zoom,d,"y")});if(c!=="none"&&(r[c]+=h.width,(p=h.zoom)!=null&&p.slider.enabled&&(r[c]+=h.zoom.slider.size)),i===void 0||o.data!==void 0)return h;if(t===void 0)throw new Error("MUI X Charts: y-axis uses `dataKey` but no `dataset` is provided.");return Y({},h,{data:t.map(f=>f[i])})})}function yo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Sv(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Nl(e){let t,r,n;e.length!==2?(t=yo,r=(i,l)=>yo(e(i),l),n=(i,l)=>e(i)-l):(t=e===yo||e===Sv?e:Ov,r=e,n=e);function a(i,l,c=0,u=i.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(i[d],l)<0?c=d+1:u=d}while(c<u)}return c}function o(i,l,c=0,u=i.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;r(i[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function s(i,l,c=0,u=i.length){const d=a(i,l,c,u-1);return d>c&&n(i[d-1],l)>-n(i[d],l)?d-1:d}return{left:a,center:s,right:o}}function Ov(){return 0}function wv(e){return e===null?NaN:+e}const Cv=Nl(yo),vp=Cv.right;Nl(wv).center;class gu extends Map{constructor(t,r=Rv){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(yu(this,t))}has(t){return super.has(yu(this,t))}set(t,r){return super.set(Pv(this,t),r)}delete(t){return super.delete(Tv(this,t))}}function yu({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Pv({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Tv({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Rv(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Av=Math.sqrt(50),_v=Math.sqrt(10),Ev=Math.sqrt(2);function Vo(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),o=n/Math.pow(10,a),s=o>=Av?10:o>=_v?5:o>=Ev?2:1;let i,l,c;return a<0?(c=Math.pow(10,-a)/s,i=Math.round(e*c),l=Math.round(t*c),i/c<e&&++i,l/c>t&&--l,c=-c):(c=Math.pow(10,a)*s,i=Math.round(e/c),l=Math.round(t/c),i*c<e&&++i,l*c>t&&--l),l<i&&.5<=r&&r<2?Vo(e,t,r*2):[i,l,c]}function zi(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,o,s]=n?Vo(t,e,r):Vo(e,t,r);if(!(o>=a))return[];const i=o-a+1,l=new Array(i);if(n)if(s<0)for(let c=0;c<i;++c)l[c]=(o-c)/-s;else for(let c=0;c<i;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<i;++c)l[c]=(a+c)/-s;else for(let c=0;c<i;++c)l[c]=(a+c)*s;return l}function Gi(e,t,r){return t=+t,e=+e,r=+r,Vo(e,t,r)[2]}function Hi(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Gi(t,e,r):Gi(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function Vv(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(a);++n<a;)o[n]=e+n*r;return o}function hr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Iv(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const bu=Symbol("implicit");function Io(){var e=new gu,t=[],r=[],n=bu;function a(o){let s=e.get(o);if(s===void 0){if(n!==bu)return n;e.set(o,s=t.push(o)-1)}return r[s%r.length]}return a.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new gu;for(const s of o)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(o){return arguments.length?(r=Array.from(o),a):r.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return Io(t,r).unknown(n)},hr.apply(a,arguments),a}function zl(){var e=Io().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,o,s,i=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,p=a<n,f=p?a:n,m=p?n:a;o=(m-f)/Math.max(1,h-l+c*2),i&&(o=Math.floor(o)),f+=(m-f-o*(h-l))*u,s=o*(1-l),i&&(f=Math.round(f),s=Math.round(s));var b=Vv(h).map(function(S){return f+o*S});return r(p?b.reverse():b)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([n,a]=h,n=+n,a=+a,d()):[n,a]},e.rangeRound=function(h){return[n,a]=h,n=+n,a=+a,i=!0,d()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(h){return arguments.length?(i=!!h,d()):i},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return zl(t(),[n,a]).round(i).paddingInner(l).paddingOuter(c).align(u)},hr.apply(d(),arguments)}function xp(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return xp(t())},e}function Mv(){return xp(zl.apply(null,arguments).paddingInner(1))}function Gl(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Sp(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function _a(){}var ha=.7,Mo=1/ha,ln="\\s*([+-]?\\d+)\\s*",pa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jv=/^#([0-9a-f]{3,8})$/,$v=new RegExp(`^rgb\\(${ln},${ln},${ln}\\)$`),kv=new RegExp(`^rgb\\(${jt},${jt},${jt}\\)$`),Uv=new RegExp(`^rgba\\(${ln},${ln},${ln},${pa}\\)$`),Dv=new RegExp(`^rgba\\(${jt},${jt},${jt},${pa}\\)$`),Lv=new RegExp(`^hsl\\(${pa},${jt},${jt}\\)$`),Bv=new RegExp(`^hsla\\(${pa},${jt},${jt},${pa}\\)$`),vu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Gl(_a,ma,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:xu,formatHex:xu,formatHex8:Fv,formatHsl:Nv,formatRgb:Su,toString:Su});function xu(){return this.rgb().formatHex()}function Fv(){return this.rgb().formatHex8()}function Nv(){return Op(this).formatHsl()}function Su(){return this.rgb().formatRgb()}function ma(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=jv.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Ou(t):r===3?new st(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ka(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ka(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$v.exec(e))?new st(t[1],t[2],t[3],1):(t=kv.exec(e))?new st(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Uv.exec(e))?Ka(t[1],t[2],t[3],t[4]):(t=Dv.exec(e))?Ka(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Lv.exec(e))?Pu(t[1],t[2]/100,t[3]/100,1):(t=Bv.exec(e))?Pu(t[1],t[2]/100,t[3]/100,t[4]):vu.hasOwnProperty(e)?Ou(vu[e]):e==="transparent"?new st(NaN,NaN,NaN,0):null}function Ou(e){return new st(e>>16&255,e>>8&255,e&255,1)}function Ka(e,t,r,n){return n<=0&&(e=t=r=NaN),new st(e,t,r,n)}function zv(e){return e instanceof _a||(e=ma(e)),e?(e=e.rgb(),new st(e.r,e.g,e.b,e.opacity)):new st}function qi(e,t,r,n){return arguments.length===1?zv(e):new st(e,t,r,n??1)}function st(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Gl(st,qi,Sp(_a,{brighter(e){return e=e==null?Mo:Math.pow(Mo,e),new st(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ha:Math.pow(ha,e),new st(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new st(Or(this.r),Or(this.g),Or(this.b),jo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:wu,formatHex:wu,formatHex8:Gv,formatRgb:Cu,toString:Cu}));function wu(){return`#${br(this.r)}${br(this.g)}${br(this.b)}`}function Gv(){return`#${br(this.r)}${br(this.g)}${br(this.b)}${br((isNaN(this.opacity)?1:this.opacity)*255)}`}function Cu(){const e=jo(this.opacity);return`${e===1?"rgb(":"rgba("}${Or(this.r)}, ${Or(this.g)}, ${Or(this.b)}${e===1?")":`, ${e})`}`}function jo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Or(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function br(e){return e=Or(e),(e<16?"0":"")+e.toString(16)}function Pu(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ot(e,t,r,n)}function Op(e){if(e instanceof Ot)return new Ot(e.h,e.s,e.l,e.opacity);if(e instanceof _a||(e=ma(e)),!e)return new Ot;if(e instanceof Ot)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),o=Math.max(t,r,n),s=NaN,i=o-a,l=(o+a)/2;return i?(t===o?s=(r-n)/i+(r<n)*6:r===o?s=(n-t)/i+2:s=(t-r)/i+4,i/=l<.5?o+a:2-o-a,s*=60):i=l>0&&l<1?0:s,new Ot(s,i,l,e.opacity)}function Hv(e,t,r,n){return arguments.length===1?Op(e):new Ot(e,t,r,n??1)}function Ot(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Gl(Ot,Hv,Sp(_a,{brighter(e){return e=e==null?Mo:Math.pow(Mo,e),new Ot(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ha:Math.pow(ha,e),new Ot(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new st(ii(e>=240?e-240:e+120,a,n),ii(e,a,n),ii(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Ot(Tu(this.h),Qa(this.s),Qa(this.l),jo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=jo(this.opacity);return`${e===1?"hsl(":"hsla("}${Tu(this.h)}, ${Qa(this.s)*100}%, ${Qa(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Tu(e){return e=(e||0)%360,e<0?e+360:e}function Qa(e){return Math.max(0,Math.min(1,e||0))}function ii(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Hl=e=>()=>e;function qv(e,t){return function(r){return e+r*t}}function Jv(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function Wv(e){return(e=+e)==1?wp:function(t,r){return r-t?Jv(t,r,e):Hl(isNaN(t)?r:t)}}function wp(e,t){var r=t-e;return r?qv(e,r):Hl(isNaN(e)?t:e)}const Ru=function e(t){var r=Wv(t);function n(a,o){var s=r((a=qi(a)).r,(o=qi(o)).r),i=r(a.g,o.g),l=r(a.b,o.b),c=wp(a.opacity,o.opacity);return function(u){return a.r=s(u),a.g=i(u),a.b=l(u),a.opacity=c(u),a+""}}return n.gamma=e,n}(1);function Yv(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(o){for(a=0;a<r;++a)n[a]=e[a]*(1-o)+t[a]*o;return n}}function Kv(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Qv(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),o=new Array(r),s;for(s=0;s<n;++s)a[s]=gs(e[s],t[s]);for(;s<r;++s)o[s]=t[s];return function(i){for(s=0;s<n;++s)o[s]=a[s](i);return o}}function ql(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function wt(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Xv(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=gs(e[a],t[a]):n[a]=t[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var Ji=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,li=new RegExp(Ji.source,"g");function Zv(e){return function(){return e}}function ex(e){return function(t){return e(t)+""}}function tx(e,t){var r=Ji.lastIndex=li.lastIndex=0,n,a,o,s=-1,i=[],l=[];for(e=e+"",t=t+"";(n=Ji.exec(e))&&(a=li.exec(t));)(o=a.index)>r&&(o=t.slice(r,o),i[s]?i[s]+=o:i[++s]=o),(n=n[0])===(a=a[0])?i[s]?i[s]+=a:i[++s]=a:(i[++s]=null,l.push({i:s,x:wt(n,a)})),r=li.lastIndex;return r<t.length&&(o=t.slice(r),i[s]?i[s]+=o:i[++s]=o),i.length<2?l[0]?ex(l[0].x):Zv(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)i[(d=l[u]).i]=d.x(c);return i.join("")})}function gs(e,t){var r=typeof t,n;return t==null||r==="boolean"?Hl(t):(r==="number"?wt:r==="string"?(n=ma(t))?(t=n,Ru):tx:t instanceof ma?Ru:t instanceof Date?ql:Kv(t)?Yv:Array.isArray(t)?Qv:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Xv:wt)(e,t)}function Cp(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function rx(e){return function(){return e}}function nx(e){return+e}var Au=[0,1];function gt(e){return e}function Wi(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:rx(isNaN(t)?NaN:.5)}function ax(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function ox(e,t,r){var n=e[0],a=e[1],o=t[0],s=t[1];return a<n?(n=Wi(a,n),o=r(s,o)):(n=Wi(n,a),o=r(o,s)),function(i){return o(n(i))}}function sx(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),o=new Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)a[s]=Wi(e[s],e[s+1]),o[s]=r(t[s],t[s+1]);return function(i){var l=vp(e,i,1,n)-1;return o[l](a[l](i))}}function ys(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Jl(){var e=Au,t=Au,r=gs,n,a,o,s=gt,i,l,c;function u(){var h=Math.min(e.length,t.length);return s!==gt&&(s=ax(e[0],e[h-1])),i=h>2?sx:ox,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?o:(l||(l=i(e.map(n),t,r)))(n(s(h)))}return d.invert=function(h){return s(a((c||(c=i(t,e.map(n),wt)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,nx),u()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),r=Cp,u()},d.clamp=function(h){return arguments.length?(s=h?!0:gt,u()):s!==gt},d.interpolate=function(h){return arguments.length?(r=h,u()):r},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,p){return n=h,a=p,u()}}function Pp(){return Jl()(gt,gt)}function ix(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function $o(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function pn(e){return e=$o(Math.abs(e)),e?e[1]:NaN}function lx(e,t){return function(r,n){for(var a=r.length,o=[],s=0,i=e[0],l=0;a>0&&i>0&&(l+i+1>n&&(i=Math.max(1,n-l)),o.push(r.substring(a-=i,a+i)),!((l+=i+1)>n));)i=e[s=(s+1)%e.length];return o.reverse().join(t)}}function cx(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var ux=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function fa(e){if(!(t=ux.exec(e)))throw new Error("invalid format: "+e);var t;return new Wl({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}fa.prototype=Wl.prototype;function Wl(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Wl.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function dx(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Tp;function hx(e,t){var r=$o(e,t);if(!r)return e+"";var n=r[0],a=r[1],o=a-(Tp=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=n.length;return o===s?n:o>s?n+new Array(o-s+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+$o(e,Math.max(0,t+o-1))[0]}function _u(e,t){var r=$o(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Eu={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:ix,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>_u(e*100,t),r:_u,s:hx,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Vu(e){return e}var Iu=Array.prototype.map,Mu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function px(e){var t=e.grouping===void 0||e.thousands===void 0?Vu:lx(Iu.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Vu:cx(Iu.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",i=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=fa(d);var h=d.fill,p=d.align,f=d.sign,m=d.symbol,b=d.zero,S=d.width,E=d.comma,O=d.precision,P=d.trim,C=d.type;C==="n"?(E=!0,C="g"):Eu[C]||(O===void 0&&(O=12),P=!0,C="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var w=m==="$"?r:m==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",T=m==="$"?n:/[%p]/.test(C)?s:"",V=Eu[C],z=/[defgprs%]/.test(C);O=O===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function v(R){var G=w,A=T,N,re,ee;if(C==="c")A=V(R)+A,R="";else{R=+R;var ae=R<0||1/R<0;if(R=isNaN(R)?l:V(Math.abs(R),O),P&&(R=dx(R)),ae&&+R==0&&f!=="+"&&(ae=!1),G=(ae?f==="("?f:i:f==="-"||f==="("?"":f)+G,A=(C==="s"?Mu[8+Tp/3]:"")+A+(ae&&f==="("?")":""),z){for(N=-1,re=R.length;++N<re;)if(ee=R.charCodeAt(N),48>ee||ee>57){A=(ee===46?a+R.slice(N+1):R.slice(N))+A,R=R.slice(0,N);break}}}E&&!b&&(R=t(R,1/0));var te=G.length+R.length+A.length,se=te<S?new Array(S-te+1).join(h):"";switch(E&&b&&(R=t(se+R,se.length?S-A.length:1/0),se=""),p){case"<":R=G+R+A+se;break;case"=":R=G+se+R+A;break;case"^":R=se.slice(0,te=se.length>>1)+G+R+A+se.slice(te);break;default:R=se+G+R+A;break}return o(R)}return v.toString=function(){return d+""},v}function u(d,h){var p=c((d=fa(d),d.type="f",d)),f=Math.max(-8,Math.min(8,Math.floor(pn(h)/3)))*3,m=Math.pow(10,-f),b=Mu[8+f/3];return function(S){return p(m*S)+b}}return{format:c,formatPrefix:u}}var Xa,Yl,Rp;mx({thousands:",",grouping:[3],currency:["$",""]});function mx(e){return Xa=px(e),Yl=Xa.format,Rp=Xa.formatPrefix,Xa}function fx(e){return Math.max(0,-pn(Math.abs(e)))}function gx(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(pn(t)/3)))*3-pn(Math.abs(e)))}function yx(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,pn(t)-pn(e))+1}function bx(e,t,r,n){var a=Hi(e,t,r),o;switch(n=fa(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=gx(a,s))&&(n.precision=o),Rp(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=yx(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=fx(a))&&(n.precision=o-(n.type==="%")*2);break}}return Yl(n)}function Kl(e){var t=e.domain;return e.ticks=function(r){var n=t();return zi(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return bx(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,o=n.length-1,s=n[a],i=n[o],l,c,u=10;for(i<s&&(c=s,s=i,i=c,c=a,a=o,o=c);u-- >0;){if(c=Gi(s,i,r),c===l)return n[a]=s,n[o]=i,t(n);if(c>0)s=Math.floor(s/c)*c,i=Math.ceil(i/c)*c;else if(c<0)s=Math.ceil(s*c)/c,i=Math.floor(i*c)/c;else break;l=c}return e},e}function Ap(){var e=Pp();return e.copy=function(){return ys(e,Ap())},hr.apply(e,arguments),Kl(e)}function _p(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],o=e[n],s;return o<a&&(s=r,r=n,n=s,s=a,a=o,o=s),e[r]=t.floor(a),e[n]=t.ceil(o),e}function ju(e){return Math.log(e)}function $u(e){return Math.exp(e)}function vx(e){return-Math.log(-e)}function xx(e){return-Math.exp(-e)}function Sx(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Ox(e){return e===10?Sx:e===Math.E?Math.exp:t=>Math.pow(e,t)}function wx(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function ku(e){return(t,r)=>-e(-t,r)}function Cx(e){const t=e(ju,$u),r=t.domain;let n=10,a,o;function s(){return a=wx(n),o=Ox(n),r()[0]<0?(a=ku(a),o=ku(o),e(vx,xx)):e(ju,$u),t}return t.base=function(i){return arguments.length?(n=+i,s()):n},t.domain=function(i){return arguments.length?(r(i),s()):r()},t.ticks=i=>{const l=r();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=a(c),p=a(u),f,m;const b=i==null?10:+i;let S=[];if(!(n%1)&&p-h<b){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;++h)for(f=1;f<n;++f)if(m=h<0?f/o(-h):f*o(h),!(m<c)){if(m>u)break;S.push(m)}}else for(;h<=p;++h)for(f=n-1;f>=1;--f)if(m=h>0?f/o(-h):f*o(h),!(m<c)){if(m>u)break;S.push(m)}S.length*2<b&&(S=zi(c,u,b))}else S=zi(h,p,Math.min(p-h,b)).map(o);return d?S.reverse():S},t.tickFormat=(i,l)=>{if(i==null&&(i=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=fa(l)).precision==null&&(l.trim=!0),l=Yl(l)),i===1/0)return l;const c=Math.max(1,n*i/t.ticks().length);return u=>{let d=u/o(Math.round(a(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>r(_p(r(),{floor:i=>o(Math.floor(a(i))),ceil:i=>o(Math.ceil(a(i)))})),t}function Ep(){const e=Cx(Jl()).domain([1,10]);return e.copy=()=>ys(e,Ep()).base(e.base()),hr.apply(e,arguments),e}function Uu(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Px(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Tx(e){return e<0?-e*e:e*e}function Rx(e){var t=e(gt,gt),r=1;function n(){return r===1?e(gt,gt):r===.5?e(Px,Tx):e(Uu(r),Uu(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Kl(t)}function Ql(){var e=Rx(Jl());return e.copy=function(){return ys(e,Ql()).exponent(e.exponent())},hr.apply(e,arguments),e}function Ax(){return Ql.apply(null,arguments).exponent(.5)}function Vp(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[vp(e,o,0,n)]:r}return a.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return Vp().domain(e).range(t).unknown(r)},hr.apply(a,arguments)}const ci=new Date,ui=new Date;function Ne(e,t,r,n){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const s=a(o),i=a.ceil(o);return o-s<i-o?s:i},a.offset=(o,s)=>(t(o=new Date(+o),s==null?1:Math.floor(s)),o),a.range=(o,s,i)=>{const l=[];if(o=a.ceil(o),i=i==null?1:Math.floor(i),!(o<s)||!(i>0))return l;let c;do l.push(c=new Date(+o)),t(o,i),e(o);while(c<o&&o<s);return l},a.filter=o=>Ne(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,i)=>{if(s>=s)if(i<0)for(;++i<=0;)for(;t(s,-1),!o(s););else for(;--i>=0;)for(;t(s,1),!o(s););}),r&&(a.count=(o,s)=>(ci.setTime(+o),ui.setTime(+s),e(ci),e(ui),Math.floor(r(ci,ui))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(n?s=>n(s)%o===0:s=>a.count(0,s)%o===0):a)),a}const ko=Ne(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ko.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ne(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ko);ko.range;const Ft=1e3,yt=Ft*60,Nt=yt*60,qt=Nt*24,Xl=qt*7,Du=qt*30,di=qt*365,vr=Ne(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ft)},(e,t)=>(t-e)/Ft,e=>e.getUTCSeconds());vr.range;const Zl=Ne(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ft)},(e,t)=>{e.setTime(+e+t*yt)},(e,t)=>(t-e)/yt,e=>e.getMinutes());Zl.range;const ec=Ne(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*yt)},(e,t)=>(t-e)/yt,e=>e.getUTCMinutes());ec.range;const tc=Ne(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ft-e.getMinutes()*yt)},(e,t)=>{e.setTime(+e+t*Nt)},(e,t)=>(t-e)/Nt,e=>e.getHours());tc.range;const rc=Ne(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Nt)},(e,t)=>(t-e)/Nt,e=>e.getUTCHours());rc.range;const Ea=Ne(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*yt)/qt,e=>e.getDate()-1);Ea.range;const bs=Ne(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qt,e=>e.getUTCDate()-1);bs.range;const Ip=Ne(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qt,e=>Math.floor(e/qt));Ip.range;function Er(e){return Ne(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*yt)/Xl)}const vs=Er(0),Uo=Er(1),_x=Er(2),Ex=Er(3),mn=Er(4),Vx=Er(5),Ix=Er(6);vs.range;Uo.range;_x.range;Ex.range;mn.range;Vx.range;Ix.range;function Vr(e){return Ne(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Xl)}const xs=Vr(0),Do=Vr(1),Mx=Vr(2),jx=Vr(3),fn=Vr(4),$x=Vr(5),kx=Vr(6);xs.range;Do.range;Mx.range;jx.range;fn.range;$x.range;kx.range;const nc=Ne(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());nc.range;const ac=Ne(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());ac.range;const Jt=Ne(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Jt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ne(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Jt.range;const Wt=Ne(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Wt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ne(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Wt.range;function Mp(e,t,r,n,a,o){const s=[[vr,1,Ft],[vr,5,5*Ft],[vr,15,15*Ft],[vr,30,30*Ft],[o,1,yt],[o,5,5*yt],[o,15,15*yt],[o,30,30*yt],[a,1,Nt],[a,3,3*Nt],[a,6,6*Nt],[a,12,12*Nt],[n,1,qt],[n,2,2*qt],[r,1,Xl],[t,1,Du],[t,3,3*Du],[e,1,di]];function i(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),f=p?p.range(c,+u+1):[];return h?f.reverse():f}function l(c,u,d){const h=Math.abs(u-c)/d,p=Nl(([,,b])=>b).right(s,h);if(p===s.length)return e.every(Hi(c/di,u/di,d));if(p===0)return ko.every(Math.max(Hi(c,u,d),1));const[f,m]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return f.every(m)}return[i,l]}const[Ux,Dx]=Mp(Wt,ac,xs,Ip,rc,ec),[Lx,Bx]=Mp(Jt,nc,vs,Ea,tc,Zl);function hi(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function pi(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ln(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Fx(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,o=e.days,s=e.shortDays,i=e.months,l=e.shortMonths,c=Bn(a),u=Fn(a),d=Bn(o),h=Fn(o),p=Bn(s),f=Fn(s),m=Bn(i),b=Fn(i),S=Bn(l),E=Fn(l),O={a:ae,A:te,b:se,B:q,c:null,d:Gu,e:Gu,f:u1,g:x1,G:O1,H:i1,I:l1,j:c1,L:jp,m:d1,M:h1,p:Z,q:ue,Q:Ju,s:Wu,S:p1,u:m1,U:f1,V:g1,w:y1,W:b1,x:null,X:null,y:v1,Y:S1,Z:w1,"%":qu},P={a:ve,A:ze,b:Oe,B:lt,c:null,d:Hu,e:Hu,f:R1,g:U1,G:L1,H:C1,I:P1,j:T1,L:kp,m:A1,M:_1,p:tt,q:ye,Q:Ju,s:Wu,S:E1,u:V1,U:I1,V:M1,w:j1,W:$1,x:null,X:null,y:k1,Y:D1,Z:B1,"%":qu},C={a:v,A:R,b:G,B:A,c:N,d:Nu,e:Nu,f:n1,g:Fu,G:Bu,H:zu,I:zu,j:Zx,L:r1,m:Xx,M:e1,p:z,q:Qx,Q:o1,s:s1,S:t1,u:qx,U:Jx,V:Wx,w:Hx,W:Yx,x:re,X:ee,y:Fu,Y:Bu,Z:Kx,"%":a1};O.x=w(r,O),O.X=w(n,O),O.c=w(t,O),P.x=w(r,P),P.X=w(n,P),P.c=w(t,P);function w(X,oe){return function(ce){var W=[],be=-1,me=0,Je=X.length,Ge,Me,Zt;for(ce instanceof Date||(ce=new Date(+ce));++be<Je;)X.charCodeAt(be)===37&&(W.push(X.slice(me,be)),(Me=Lu[Ge=X.charAt(++be)])!=null?Ge=X.charAt(++be):Me=Ge==="e"?" ":"0",(Zt=oe[Ge])&&(Ge=Zt(ce,Me)),W.push(Ge),me=be+1);return W.push(X.slice(me,be)),W.join("")}}function T(X,oe){return function(ce){var W=Ln(1900,void 0,1),be=V(W,X,ce+="",0),me,Je;if(be!=ce.length)return null;if("Q"in W)return new Date(W.Q);if("s"in W)return new Date(W.s*1e3+("L"in W?W.L:0));if(oe&&!("Z"in W)&&(W.Z=0),"p"in W&&(W.H=W.H%12+W.p*12),W.m===void 0&&(W.m="q"in W?W.q:0),"V"in W){if(W.V<1||W.V>53)return null;"w"in W||(W.w=1),"Z"in W?(me=pi(Ln(W.y,0,1)),Je=me.getUTCDay(),me=Je>4||Je===0?Do.ceil(me):Do(me),me=bs.offset(me,(W.V-1)*7),W.y=me.getUTCFullYear(),W.m=me.getUTCMonth(),W.d=me.getUTCDate()+(W.w+6)%7):(me=hi(Ln(W.y,0,1)),Je=me.getDay(),me=Je>4||Je===0?Uo.ceil(me):Uo(me),me=Ea.offset(me,(W.V-1)*7),W.y=me.getFullYear(),W.m=me.getMonth(),W.d=me.getDate()+(W.w+6)%7)}else("W"in W||"U"in W)&&("w"in W||(W.w="u"in W?W.u%7:"W"in W?1:0),Je="Z"in W?pi(Ln(W.y,0,1)).getUTCDay():hi(Ln(W.y,0,1)).getDay(),W.m=0,W.d="W"in W?(W.w+6)%7+W.W*7-(Je+5)%7:W.w+W.U*7-(Je+6)%7);return"Z"in W?(W.H+=W.Z/100|0,W.M+=W.Z%100,pi(W)):hi(W)}}function V(X,oe,ce,W){for(var be=0,me=oe.length,Je=ce.length,Ge,Me;be<me;){if(W>=Je)return-1;if(Ge=oe.charCodeAt(be++),Ge===37){if(Ge=oe.charAt(be++),Me=C[Ge in Lu?oe.charAt(be++):Ge],!Me||(W=Me(X,ce,W))<0)return-1}else if(Ge!=ce.charCodeAt(W++))return-1}return W}function z(X,oe,ce){var W=c.exec(oe.slice(ce));return W?(X.p=u.get(W[0].toLowerCase()),ce+W[0].length):-1}function v(X,oe,ce){var W=p.exec(oe.slice(ce));return W?(X.w=f.get(W[0].toLowerCase()),ce+W[0].length):-1}function R(X,oe,ce){var W=d.exec(oe.slice(ce));return W?(X.w=h.get(W[0].toLowerCase()),ce+W[0].length):-1}function G(X,oe,ce){var W=S.exec(oe.slice(ce));return W?(X.m=E.get(W[0].toLowerCase()),ce+W[0].length):-1}function A(X,oe,ce){var W=m.exec(oe.slice(ce));return W?(X.m=b.get(W[0].toLowerCase()),ce+W[0].length):-1}function N(X,oe,ce){return V(X,t,oe,ce)}function re(X,oe,ce){return V(X,r,oe,ce)}function ee(X,oe,ce){return V(X,n,oe,ce)}function ae(X){return s[X.getDay()]}function te(X){return o[X.getDay()]}function se(X){return l[X.getMonth()]}function q(X){return i[X.getMonth()]}function Z(X){return a[+(X.getHours()>=12)]}function ue(X){return 1+~~(X.getMonth()/3)}function ve(X){return s[X.getUTCDay()]}function ze(X){return o[X.getUTCDay()]}function Oe(X){return l[X.getUTCMonth()]}function lt(X){return i[X.getUTCMonth()]}function tt(X){return a[+(X.getUTCHours()>=12)]}function ye(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var oe=w(X+="",O);return oe.toString=function(){return X},oe},parse:function(X){var oe=T(X+="",!1);return oe.toString=function(){return X},oe},utcFormat:function(X){var oe=w(X+="",P);return oe.toString=function(){return X},oe},utcParse:function(X){var oe=T(X+="",!0);return oe.toString=function(){return X},oe}}}var Lu={"-":"",_:" ",0:"0"},qe=/^\s*\d+/,Nx=/^%/,zx=/[\\^$*+?|[\]().{}]/g;function ge(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",o=a.length;return n+(o<r?new Array(r-o+1).join(t)+a:a)}function Gx(e){return e.replace(zx,"\\$&")}function Bn(e){return new RegExp("^(?:"+e.map(Gx).join("|")+")","i")}function Fn(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function Hx(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function qx(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Jx(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function Wx(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Yx(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Bu(e,t,r){var n=qe.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Fu(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Kx(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Qx(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Xx(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Nu(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function Zx(e,t,r){var n=qe.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function zu(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function e1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function t1(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function r1(e,t,r){var n=qe.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function n1(e,t,r){var n=qe.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function a1(e,t,r){var n=Nx.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function o1(e,t,r){var n=qe.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function s1(e,t,r){var n=qe.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Gu(e,t){return ge(e.getDate(),t,2)}function i1(e,t){return ge(e.getHours(),t,2)}function l1(e,t){return ge(e.getHours()%12||12,t,2)}function c1(e,t){return ge(1+Ea.count(Jt(e),e),t,3)}function jp(e,t){return ge(e.getMilliseconds(),t,3)}function u1(e,t){return jp(e,t)+"000"}function d1(e,t){return ge(e.getMonth()+1,t,2)}function h1(e,t){return ge(e.getMinutes(),t,2)}function p1(e,t){return ge(e.getSeconds(),t,2)}function m1(e){var t=e.getDay();return t===0?7:t}function f1(e,t){return ge(vs.count(Jt(e)-1,e),t,2)}function $p(e){var t=e.getDay();return t>=4||t===0?mn(e):mn.ceil(e)}function g1(e,t){return e=$p(e),ge(mn.count(Jt(e),e)+(Jt(e).getDay()===4),t,2)}function y1(e){return e.getDay()}function b1(e,t){return ge(Uo.count(Jt(e)-1,e),t,2)}function v1(e,t){return ge(e.getFullYear()%100,t,2)}function x1(e,t){return e=$p(e),ge(e.getFullYear()%100,t,2)}function S1(e,t){return ge(e.getFullYear()%1e4,t,4)}function O1(e,t){var r=e.getDay();return e=r>=4||r===0?mn(e):mn.ceil(e),ge(e.getFullYear()%1e4,t,4)}function w1(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ge(t/60|0,"0",2)+ge(t%60,"0",2)}function Hu(e,t){return ge(e.getUTCDate(),t,2)}function C1(e,t){return ge(e.getUTCHours(),t,2)}function P1(e,t){return ge(e.getUTCHours()%12||12,t,2)}function T1(e,t){return ge(1+bs.count(Wt(e),e),t,3)}function kp(e,t){return ge(e.getUTCMilliseconds(),t,3)}function R1(e,t){return kp(e,t)+"000"}function A1(e,t){return ge(e.getUTCMonth()+1,t,2)}function _1(e,t){return ge(e.getUTCMinutes(),t,2)}function E1(e,t){return ge(e.getUTCSeconds(),t,2)}function V1(e){var t=e.getUTCDay();return t===0?7:t}function I1(e,t){return ge(xs.count(Wt(e)-1,e),t,2)}function Up(e){var t=e.getUTCDay();return t>=4||t===0?fn(e):fn.ceil(e)}function M1(e,t){return e=Up(e),ge(fn.count(Wt(e),e)+(Wt(e).getUTCDay()===4),t,2)}function j1(e){return e.getUTCDay()}function $1(e,t){return ge(Do.count(Wt(e)-1,e),t,2)}function k1(e,t){return ge(e.getUTCFullYear()%100,t,2)}function U1(e,t){return e=Up(e),ge(e.getUTCFullYear()%100,t,2)}function D1(e,t){return ge(e.getUTCFullYear()%1e4,t,4)}function L1(e,t){var r=e.getUTCDay();return e=r>=4||r===0?fn(e):fn.ceil(e),ge(e.getUTCFullYear()%1e4,t,4)}function B1(){return"+0000"}function qu(){return"%"}function Ju(e){return+e}function Wu(e){return Math.floor(+e/1e3)}var Jr,Dp,Lp;F1({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function F1(e){return Jr=Fx(e),Dp=Jr.format,Jr.parse,Lp=Jr.utcFormat,Jr.utcParse,Jr}function N1(e){return new Date(e)}function z1(e){return e instanceof Date?+e:+new Date(+e)}function oc(e,t,r,n,a,o,s,i,l,c){var u=Pp(),d=u.invert,h=u.domain,p=c(".%L"),f=c(":%S"),m=c("%I:%M"),b=c("%I %p"),S=c("%a %d"),E=c("%b %d"),O=c("%B"),P=c("%Y");function C(w){return(l(w)<w?p:i(w)<w?f:s(w)<w?m:o(w)<w?b:n(w)<w?a(w)<w?S:E:r(w)<w?O:P)(w)}return u.invert=function(w){return new Date(d(w))},u.domain=function(w){return arguments.length?h(Array.from(w,z1)):h().map(N1)},u.ticks=function(w){var T=h();return e(T[0],T[T.length-1],w??10)},u.tickFormat=function(w,T){return T==null?C:c(T)},u.nice=function(w){var T=h();return(!w||typeof w.range!="function")&&(w=t(T[0],T[T.length-1],w??10)),w?h(_p(T,w)):u},u.copy=function(){return ys(u,oc(e,t,r,n,a,o,s,i,l,c))},u}function Bp(){return hr.apply(oc(Lx,Bx,Jt,nc,vs,Ea,tc,Zl,vr,Dp).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function G1(){return hr.apply(oc(Ux,Dx,Wt,ac,xs,bs,rc,ec,vr,Lp).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function H1(){var e=0,t=1,r,n,a,o,s=gt,i=!1,l;function c(d){return d==null||isNaN(d=+d)?l:s(a===0?.5:(d=(o(d)-r)*a,i?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,r=o(e=+e),n=o(t=+t),a=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(d){return arguments.length?(i=!!d,c):i},c.interpolator=function(d){return arguments.length?(s=d,c):s};function u(d){return function(h){var p,f;return arguments.length?([p,f]=h,s=d(p,f),c):[s(0),s(1)]}}return c.range=u(gs),c.rangeRound=u(Cp),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return o=d,r=d(e),n=d(t),a=r===n?0:1/(n-r),c}}function q1(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Fp(){var e=Kl(H1()(gt));return e.copy=function(){return q1(e,Fp())},Iv.apply(e,arguments)}function J1(e,t){return function(n,a){return a.location==="tick"?a.scale.tickFormat(e)(n):a.location==="zoom-slider-tooltip"?t.tickFormat(2)(n):`${n}`}}function W1(e){return e.scaleType==="band"}function Y1(e){return e.scaleType==="point"}function K1(e){return e.type==="piecewise"?Vp(e.thresholds,e.colors):Fp([e.min??0,e.max??100],e.color)}function Lo(e){return e.values?Io(e.values,e.colors).unknown(e.unknownColor??null):Io(e.colors.map((t,r)=>r),e.colors).unknown(e.unknownColor??null)}function bo(e){return e.type==="ordinal"?Lo(e):K1(e)}function Q1(e){const{tickMaxStep:t,tickMinStep:r,tickNumber:n,range:a,domain:o}=e,s=r===void 0?999:Math.floor(Math.abs(o[1]-o[0])/r),i=t===void 0?2:Math.ceil(Math.abs(o[1]-o[0])/t),l=n??Math.floor(Math.abs(a[1]-a[0])/50);return Math.min(s,Math.max(i,l))}function X1(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function Yi(e,t,r){switch(e){case"log":return Ep(t,r);case"pow":return Ql(t,r);case"sqrt":return Ax(t,r);case"time":return Bp(t,r);case"utc":return G1(t,r);default:return Ap(t,r)}}const Yu=e=>(e==null?void 0:e[0])instanceof Date;function Ku(e,t){const r=Bp(e.data,t);return(n,{location:a})=>a==="tick"?r.tickFormat(e.tickNumber)(n):`${n.toLocaleString()}`}const mi=(e,t)=>{const r=e[1]-e[0],n=t[1]-t[0],a=e[0]-t[0]*r/n,o=e[1]+(100-t[1])*r/n;return[a,o]};let Qu,Xu;class Z1{constructor(){if(this.types=new Set,Qu)throw new Error("You can only create one instance!");Qu=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class eS{constructor(){if(this.types=new Set,Xu)throw new Error("You can only create one instance!");Xu=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const Ss=new Z1;Ss.addType("bar");Ss.addType("line");Ss.addType("scatter");const tS=new eS;tS.addType("radar");function Np(e){return Ss.getTypes().has(e)}const rS=(e,t,r,n,a,o,s,i)=>{var f;const l=n==="x"?a[t].xExtremumGetter:a[t].yExtremumGetter,c=((f=s[t])==null?void 0:f.series)??{},[u,d]=(l==null?void 0:l({series:c,axis:r,axisIndex:o,isDefaultAxis:o===0,getFilters:i}))??[1/0,-1/0],[h,p]=e;return[Math.min(u,h),Math.max(d,p)]},zp=(e,t,r,n,a,o)=>{const i=Object.keys(r).filter(Np).reduce((l,c)=>rS(l,c,e,t,r,n,a,o),[1/0,-1/0]);return Number.isNaN(i[0])||Number.isNaN(i[1])?[1/0,-1/0]:i},nS=(e,t,r,n)=>{const a=new Set;return Object.keys(t).filter(Np).forEach(s=>{var c,u,d;const i=((c=r[s])==null?void 0:c.series)??{},l=(d=(u=t[s]).axisTooltipGetter)==null?void 0:d.call(u,i);l!==void 0&&l.forEach(({axisId:h,direction:p})=>{p===e&&a.add(h??n)})}),a},aS=(e,t,r,n)=>{var a;if(e.domainLimit!==void 0)return e.domainLimit;if(t==="x")for(const o of((a=n.line)==null?void 0:a.seriesOrder)??[]){const s=n.line.series[o];if(s.xAxisId===e.id||s.xAxisId===void 0&&r===0)return"strict"}return"nice"};function oS(e,t,r){const n=t==="x"?[e.left,e.left+e.width]:[e.top+e.height,e.top];return r.reverse?[n[1],n[0]]:n}const sS=.2,iS=.1;function Gp({drawingArea:e,formattedSeries:t,axis:r,seriesConfig:n,axisDirection:a,zoomMap:o,zoomOptions:s,getFilters:i,preferStrictDomainInLineCharts:l}){if(r===void 0)return{axis:{},axisIds:[]};const c=nS(a,n,t,r[0].id),u={};return r.forEach((d,h)=>{const p=d,f=s==null?void 0:s[p.id],m=o==null?void 0:o.get(p.id),b=m?[m.start,m.end]:[0,100],S=oS(e,a,p),[E,O]=zp(p,a,n,h,t,m===void 0&&!f?i:void 0),P=!p.ignoreTooltip&&c.has(p.id),C=p.data??[];if(W1(p)){const ae=p.categoryGapRatio??sS,te=p.barGapRatio??iS,se=a==="y"?[S[1],S[0]]:S,q=mi(se,b);if(u[p.id]=Y({offset:0,height:0,categoryGapRatio:ae,barGapRatio:te,triggerTooltip:P},p,{data:C,scale:zl(p.data,q).paddingInner(ae).paddingOuter(ae/2),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?Lo(Y({values:p.data},p.colorMap)):bo(p.colorMap))}),Yu(p.data)){const Z=Ku(p,se);u[p.id].valueFormatter=p.valueFormatter??Z}}if(Y1(p)){const ae=a==="y"?[...S].reverse():S,te=mi(ae,b);if(u[p.id]=Y({offset:0,height:0,triggerTooltip:P},p,{data:C,scale:Mv(p.data,te),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?Lo(Y({values:p.data},p.colorMap)):bo(p.colorMap))}),Yu(p.data)){const se=Ku(p,ae);u[p.id].valueFormatter=p.valueFormatter??se}}if(p.scaleType==="band"||p.scaleType==="point")return;const w=p.scaleType??"linear",T=l?aS(p,a,h,t):p.domainLimit??"nice",V=[p.min??E,p.max??O];if(typeof T=="function"){const{min:ae,max:te}=T(E,O);V[0]=ae,V[1]=te}const z=Q1(Y({},p,{range:S,domain:V})),v=X1(z,b),R=mi(S,b),G=Yi(w,V,R),A=T==="nice"?G.nice(z):G,[N,re]=A.domain(),ee=[p.min??N,p.max??re];u[p.id]=Y({offset:0,height:0,triggerTooltip:P},p,{data:C,scaleType:w,scale:A.domain(ee),tickNumber:v,colorScale:p.colorMap&&bo(p.colorMap),valueFormatter:p.valueFormatter??J1(v,Yi(w,S.map(ae=>G.invert(ae)),S))})}),{axis:u,axisIds:r.map(({id:d})=>d)}}function lS(e){return e!=null}function Hp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:a}){return(o,s)=>{var b;const i=t[o.id];if(!i||i.filterMode!=="discard")return null;const l=e==null?void 0:e.get(o.id);if(l===void 0||l.start<=0&&l.end>=100)return null;let c=[];const u=o.scaleType;u==="point"||u==="band"?c=[0,(((b=o.data)==null?void 0:b.length)??1)-1]:c=zp(o,a,r,s,n);let d,h;[d,h]=Yi(!u||u==="band"||u==="point"?"linear":u,c,[0,100]).nice().domain(),d=d instanceof Date?d.getTime():d,h=h instanceof Date?h.getTime():h;const f=d+l.start*(h-d)/100,m=d+l.end*(h-d)/100;return(S,E)=>{var P;const O=S[a]??((P=o.data)==null?void 0:P[E]);return O==null?!0:o.scaleType==="point"||o.scaleType==="band"||typeof O=="string"?E>=f&&E<=m:O>=f&&O<=m}}}const cS=e=>({currentAxisId:t,seriesXAxisId:r,seriesYAxisId:n,isDefaultAxis:a})=>(o,s)=>{var c,u;return!(t===r?n:r)||a?((u=(c=Object.values(e??{}))[0])==null?void 0:u.call(c,o,s))??!0:[n,r].filter(d=>d!==t).map(d=>e[d??""]).filter(lS).every(d=>d(o,s))},Zu=e=>(t=[])=>t.reduce((r,n)=>{const{zoom:a,id:o}=n,s=Fl(a,o,e);return s&&(r[o]=s),r},{}),uS=e=>{const t=new Map;return e.forEach(r=>{t.set(r.axisId,r)}),t},qp=e=>e.zoom;pe([qp],e=>e==null?void 0:e.isInteracting);const Os=pe([qp],e=>(e==null?void 0:e.zoomData)&&uS(e==null?void 0:e.zoomData)),Va=pe([On,wn],(e,t)=>Y({},Zu("x")(e),Zu("y")(t)));pe([Va,(e,t)=>t],(e,t)=>e[t]);const dS=pe([Os,Va,fs,Ra],(e,t,r,n)=>e&&t&&Hp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"x"})),hS=pe([Os,Va,fs,Ra],(e,t,r,n)=>e&&t&&Hp({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"y"})),Jp=pe([dS,hS,On,wn],(e,t,r,n)=>{if(e===void 0||t===void 0)return;const a=r==null?void 0:r.reduce((s,i,l)=>{const c=e(i,l);return c!==null&&(s[i.id]=c),s},{}),o=n==null?void 0:n.reduce((s,i,l)=>{const c=t(i,l);return c!==null&&(s[i.id]=c),s},{});if(!(Object.keys(a??{}).length===0&&Object.keys(o??{}).length===0))return cS(Y({},a,o))}),Ir=pe([On,Ta,Ra,fs,Os,Va,Jp,cp],(e,t,r,n,a,o,s,i)=>Gp({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"x",zoomMap:a,zoomOptions:o,getFilters:s,preferStrictDomainInLineCharts:i})),Mr=pe([wn,Ta,Ra,fs,Os,Va,Jp,cp],(e,t,r,n,a,o,s,i)=>Gp({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"y",zoomMap:a,zoomOptions:o,getFilters:s,preferStrictDomainInLineCharts:i}));pe([Ir,Mr,(e,t)=>t],(e,t,r)=>(e==null?void 0:e.axis[r])??(t==null?void 0:t.axis[r]));pe([On,wn,(e,t)=>t],(e,t,r)=>{const n=(e==null?void 0:e.find(a=>a.id===r))??(t==null?void 0:t.find(a=>a.id===r))??null;if(n)return n});function Wp(e){return e.bandwidth!==void 0}function Wr(e){return e instanceof Date?e.getTime():e}function gn(e,t){const{scale:r,data:n,reverse:a}=e;if(!Wp(r)){const s=r.invert(t);if(n===void 0)return-1;const i=Wr(s);return n==null?void 0:n.findIndex((c,u)=>{const d=Wr(c);return d>i&&(u===0||Math.abs(i-d)<=Math.abs(i-Wr(n[u-1])))||d<=i&&(u===n.length-1||Math.abs(Wr(s)-d)<Math.abs(Wr(s)-Wr(n[u+1])))})}const o=r.bandwidth()===0?Math.floor((t-Math.min(...r.range())+r.step()/2)/r.step()):Math.floor((t-Math.min(...r.range()))/r.step());return o<0||o>=n.length?-1:a?n.length-1-o:o}function ed(e,t,r){const{scale:n,data:a}=e;if(!Wp(n)){const o=n.invert(t);return r<0?o:a[r]}return r<0||r>=a.length?null:a[r]}function td(e,t){const r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r.matrixTransform(e.getScreenCTM().inverse())}function zt(e){const t=B.useRef(e);return $t(()=>{t.current=e}),B.useRef((...r)=>(0,t.current)(...r)).current}const pS=Object.is;function Yp(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=0,n=0;for(const a in e)if(r+=1,!pS(e[a],t[a])||!(a in t))return!1;for(const a in t)n+=1;return r===n}const sc=({store:e})=>{const t=zt(function(){e.update(s=>Y({},s,{interaction:{pointer:null,item:null}}))}),r=zt(function(s){e.update(i=>{const l=i.interaction.item;return s?l===null||Object.keys(s).some(c=>s[c]!==l[c])?i:Y({},i,{interaction:Y({},i.interaction,{item:null})}):l===null?i:Y({},i,{interaction:Y({},i.interaction,{item:null})})})}),n=zt(function(s){e.update(i=>Yp(i.interaction.item,s)?i:Y({},i,{interaction:Y({},i.interaction,{item:s})}))}),a=zt(function(s){e.update(i=>Y({},i,{interaction:Y({},i.interaction,{pointer:s})}))});return{instance:{cleanInteraction:t,setItemInteraction:n,removeItemInteraction:r,setPointerCoordinate:a}}};sc.getInitialState=()=>({interaction:{item:null,pointer:null}});sc.params={};const ic=e=>e.interaction,mS=pe([ic],e=>e!==void 0),fS=pe([ic],e=>(e==null?void 0:e.item)??null),Kp=pe([ic],e=>(e==null?void 0:e.pointer)??null),ws=pe([Kp],e=>e&&e.x),Cs=pe([Kp],e=>e&&e.y);pe([fS],e=>e!==null);function oa(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const a=e.length;if(a!==t.length)return!1;for(let o=0;o<a;o+=1)if(!oa(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const a=Array.from(e.entries());for(let o=0;o<a.length;o+=1)if(!t.has(a[o][0]))return!1;for(let o=0;o<a.length;o+=1){const s=a[o];if(!oa(s[1],t.get(s[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const a=Array.from(e.entries());for(let o=0;o<a.length;o+=1)if(!t.has(a[o][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const a=e.length;if(a!==t.length)return!1;for(let o=0;o<a;o+=1)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=r.length;if(n!==Object.keys(t).length)return!1;for(let a=0;a<n;a+=1)if(!Object.prototype.hasOwnProperty.call(t,r[a]))return!1;for(let a=0;a<n;a+=1){const o=r[a];if(!oa(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}const Ps=(e,t)=>t;function Ki(e,t,r=t.axisIds[0]){return Array.isArray(r)?r.map(n=>gn(t.axis[n],e)):gn(t.axis[r],e)}const Qp=(e,t,r)=>{if(e===null)return null;const n=Ki(e,t,r);return n===-1?null:n},gS=pe([ws,Ir,Ps],Qp),yS=pe([Cs,Mr,Ps],Qp),bS=pe([ws,Cs,Ir,Mr],(e,t,r,n)=>[...e===null?[]:r.axisIds.map(a=>({axisId:a,dataIndex:Ki(e,r,a)})),...t===null?[]:n.axisIds.map(a=>({axisId:a,dataIndex:Ki(t,n,a)}))].filter(a=>a.dataIndex!==null&&a.dataIndex>=0));function Xp(e,t,r,n=t.axisIds[0]){return Array.isArray(n)?n.map((a,o)=>ed(t.axis[a],e,r[o])):ed(t.axis[n],e,r)}pe([ws,Ir,gS,Ps],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:Xp(e,t,r,n));pe([Cs,Mr,yS,Ps],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:Xp(e,t,r,n));const vS=pe([ws,Ir],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:gn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:oa}}),xS=pe([Cs,Mr],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:gn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:oa}});pe([vS,xS],(e,t)=>e.length>0||t.length>0);const rd={};function SS(e,t){const r=B.useRef(rd);return r.current===rd&&(r.current=e(t)),r}const OS=()=>{};function wS(e,t,r,n){const a=SS(CS,{store:e,selector:t,skip:n}).current;a.effect=r,B.useEffect(a.onMount(n),[n])}function CS(e){const{store:t,selector:r,skip:n}=e;let a=!1,o;const s=()=>{i.dispose??(i.dispose=t.subscribe(l=>{const c=r(l);i.effect(o,c),o=c}))},i={effect:OS,dispose:null,onMount:l=>()=>{if(!l)return a||(a=!0,o=r(t.value)),s(),()=>{var c;(c=i.dispose)==null||c.call(i),i.dispose=null}}};return n||(a=!0,o=r(t.value),s()),i}const Ts=({params:e,store:t,seriesConfig:r,svgRef:n,instance:a})=>{const{xAxis:o,yAxis:s,dataset:i,onHighlightedAxisChange:l}=e;if(process.env.NODE_ENV!=="production"){const O=[...o??[],...s??[]].filter(C=>C.id).map(C=>C.id),P=new Set(O.filter((C,w)=>O.indexOf(C)!==w));P.size>0&&da([`MUI X Charts: The following axis ids are duplicated: ${Array.from(P).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
|
|
116
|
+
`),"error")}const c=ot(t,Ta),u=ot(t,Ra),d=ot(t,mS),{axis:h,axisIds:p}=ot(t,Ir),{axis:f,axisIds:m}=ot(t,Mr);mp({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),$t(()=>{e.highlightedAxis!==void 0&&t.update(O=>O.controlledCartesianAxisHighlight===e.highlightedAxis?O:Y({},O,{controlledCartesianAxisHighlight:e.highlightedAxis}))},[t,e.highlightedAxis]);const b=B.useRef(!0);B.useEffect(()=>{if(b.current){b.current=!1;return}t.update(O=>Y({},O,{cartesianAxis:Y({},O.cartesianAxis,{x:yp(o,i),y:bp(s,i)})}))},[r,c,o,s,i,t]);const S=p[0],E=m[0];return wS(t,bS,(O,P)=>{if(!Object.is(O,P)){if(O.length!==P.length){l(P);return}O!=null&&O.some(({axisId:C,dataIndex:w},T)=>P[T].axisId!==C||P[T].dataIndex!==w)&&l(P)}},!l),B.useEffect(()=>{const O=n.current;if(!d||!O||e.disableAxisListener)return()=>{};const P=a.addInteractionListener("moveEnd",R=>{var G;R.detail.activeGestures.pan||(G=a.cleanInteraction)==null||G.call(a)}),C=a.addInteractionListener("panEnd",R=>{var G;R.detail.activeGestures.move||(G=a.cleanInteraction)==null||G.call(a)}),w=a.addInteractionListener("quickPressEnd",R=>{var G;!R.detail.activeGestures.move&&!R.detail.activeGestures.pan&&((G=a.cleanInteraction)==null||G.call(a))}),T=R=>{var re,ee;const G=R.detail.srcEvent,A=R.detail.target,N=td(O,G);if(R.detail.srcEvent.buttons>=1&&(A!=null&&A.hasPointerCapture(R.detail.srcEvent.pointerId))&&!(A!=null&&A.closest("[data-charts-zoom-slider]"))&&(A==null||A.releasePointerCapture(R.detail.srcEvent.pointerId)),!a.isPointInside(N.x,N.y,A)){(re=a.cleanInteraction)==null||re.call(a);return}(ee=a.setPointerCoordinate)==null||ee.call(a,N)},V=a.addInteractionListener("move",T),z=a.addInteractionListener("pan",T),v=a.addInteractionListener("quickPress",T);return()=>{V.cleanup(),P.cleanup(),z.cleanup(),C.cleanup(),v.cleanup(),w.cleanup()}},[n,t,h,S,f,E,a,e.disableAxisListener,d]),B.useEffect(()=>{const O=n.current,P=e.onAxisClick;if(O===null||!P)return()=>{};const C=a.addInteractionListener("tap",w=>{let T=null,V=!1;const z=td(O,w.detail.srcEvent),v=gn(h[S],z.x);V=v!==-1,T=V?v:gn(f[E],z.y);const R=V?p[0]:m[0];if(T==null||T===-1)return;const G=(V?h:f)[R].data[T],A={};Object.keys(u).filter(N=>["bar","line"].includes(N)).forEach(N=>{var re;(re=u[N])==null||re.seriesOrder.forEach(ee=>{const ae=u[N].series[ee],te=ae.xAxisId,se=ae.yAxisId,q=V?te:se;(q===void 0||q===R)&&(A[ee]=ae.data[T])})}),P(w.detail.srcEvent,{dataIndex:T,axisValue:G,seriesValues:A})});return()=>{C.cleanup()}},[e.onAxisClick,u,n,h,p,f,m,S,E,a]),{}};Ts.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};Ts.getDefaultizedParams=({params:e})=>Y({},e,{colors:e.colors??up,theme:e.theme??"light",defaultizedXAxis:yp(e.xAxis,e.dataset),defaultizedYAxis:bp(e.yAxis,e.dataset)});Ts.getInitialState=e=>Y({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});function nd(e,t){return e.id!==void 0?e:Y({id:t},e)}function ad(e){return e.colorMap?Y({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?Lo(Y({values:e.data},e.colorMap)):bo(e.colorMap.type==="continuous"?Y({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function Zp(e,t){if(!e||e.length===0)return{axis:{},axisIds:[]};const r={},n=[];return e.forEach((a,o)=>{const s=a.dataKey,i=a.id??`defaultized-z-axis-${o}`;if(s===void 0||a.data!==void 0){r[i]=ad(nd(a,i)),n.push(i);return}if(t===void 0)throw new Error("MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.");r[i]=ad(nd(Y({},a,{data:t.map(l=>l[s])}),i)),n.push(i)}),{axis:r,axisIds:n}}const lc=({params:e,store:t})=>{const{zAxis:r,dataset:n}=e,a=B.useRef(!0);return B.useEffect(()=>{if(a.current){a.current=!1;return}t.update(o=>Y({},o,{zAxis:Zp(r,n)}))},[r,n,t]),{}};lc.params={zAxis:!0,dataset:!0};lc.getInitialState=e=>({zAxis:Zp(e.zAxis,e.dataset)});const PS=e=>e,TS=pe([PS],e=>e.zAxis),Rs=({store:e,params:t})=>{mp({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),$t(()=>{e.update(a=>a.highlight.item===t.highlightedItem?a:Y({},a,{highlight:Y({},a.highlight,{item:t.highlightedItem})}))},[e,t.highlightedItem]);const r=zt(()=>{var a;(a=t.onHighlightChange)==null||a.call(t,null),e.update(o=>Y({},o,{highlight:{item:null}}))}),n=zt(a=>{var s;const o=e.getSnapshot().highlight.item;Yp(o,a)||((s=t.onHighlightChange)==null||s.call(t,a),e.update(i=>Y({},i,{highlight:{item:a}})))});return{instance:{clearHighlight:r,setHighlight:n}}};Rs.getDefaultizedParams=({params:e})=>Y({},e,{highlightedItem:e.highlightedItem??null});Rs.getInitialState=e=>({highlight:{item:e.highlightedItem}});Rs.params={highlightedItem:!0,onHighlightChange:!0};const od=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},em=e=>{var l;const{axis:t,getFilters:r,isDefaultAxis:n}=e,a=r==null?void 0:r({currentAxisId:t.id,isDefaultAxis:n}),o=a?(l=t.data)==null?void 0:l.filter((c,u)=>a({x:null,y:null},u)):t.data,s=Math.min(...o??[]),i=Math.max(...o??[]);return[s,i]},tm=e=>t=>{const{series:r,axis:n,getFilters:a,isDefaultAxis:o}=t;return Object.keys(r).filter(s=>{const i=e==="x"?r[s].xAxisId:r[s].yAxisId;return i===n.id||o&&i===void 0}).reduce((s,i)=>{const{stackedData:l}=r[i],c=a==null?void 0:a({currentAxisId:n.id,isDefaultAxis:o,seriesXAxisId:r[i].xAxisId,seriesYAxisId:r[i].yAxisId}),[u,d]=(l==null?void 0:l.reduce((h,p,f)=>c&&(!c(od(p[0],e),f)||!c(od(p[1],e),f))?h:[Math.min(...p,h[0]),Math.max(...p,h[1])],[1/0,-1/0]))??[1/0,-1/0];return[Math.min(u,s[0]),Math.max(d,s[1])]},[1/0,-1/0])},RS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?tm("x")(e):em(e),AS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?em(e):tm("y")(e);function Fe(e){return function(){return e}}const sd=Math.abs,Ke=Math.atan2,mr=Math.cos,_S=Math.max,fi=Math.min,_t=Math.sin,nn=Math.sqrt,nt=1e-12,ga=Math.PI,Bo=ga/2,vo=2*ga;function ES(e){return e>1?0:e<-1?ga:Math.acos(e)}function id(e){return e>=1?Bo:e<=-1?-Bo:Math.asin(e)}const Qi=Math.PI,Xi=2*Qi,gr=1e-6,VS=Xi-gr;function rm(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function IS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return rm;const r=10**t;return function(n){this._+=n[0];for(let a=1,o=n.length;a<o;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class MS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?rm:IS(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,o,s){this._append`C${+t},${+r},${+n},${+a},${this._x1=+o},${this._y1=+s}`}arcTo(t,r,n,a,o){if(t=+t,r=+r,n=+n,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,i=this._y1,l=n-t,c=a-r,u=s-t,d=i-r,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>gr)if(!(Math.abs(d*l-c*u)>gr)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-s,f=a-i,m=l*l+c*c,b=p*p+f*f,S=Math.sqrt(m),E=Math.sqrt(h),O=o*Math.tan((Qi-Math.acos((m+h-b)/(2*S*E)))/2),P=O/E,C=O/S;Math.abs(P-1)>gr&&this._append`L${t+P*u},${r+P*d}`,this._append`A${o},${o},0,0,${+(d*p>u*f)},${this._x1=t+C*l},${this._y1=r+C*c}`}}arc(t,r,n,a,o,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(a),l=n*Math.sin(a),c=t+i,u=r+l,d=1^s,h=s?a-o:o-a;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>gr||Math.abs(this._y1-u)>gr)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%Xi+Xi),h>VS?this._append`A${n},${n},0,1,${d},${t-i},${r-l}A${n},${n},0,1,${d},${this._x1=c},${this._y1=u}`:h>gr&&this._append`A${n},${n},0,${+(h>=Qi)},${d},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function jS(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new MS(t)}function $S(e){return e.innerRadius}function kS(e){return e.outerRadius}function US(e){return e.startAngle}function DS(e){return e.endAngle}function LS(e){return e&&e.padAngle}function BS(e,t,r,n,a,o,s,i){var l=r-e,c=n-t,u=s-a,d=i-o,h=d*l-u*c;if(!(h*h<nt))return h=(u*(t-o)-d*(e-a))/h,[e+h*l,t+h*c]}function Za(e,t,r,n,a,o,s){var i=e-r,l=t-n,c=(s?o:-o)/nn(i*i+l*l),u=c*l,d=-c*i,h=e+u,p=t+d,f=r+u,m=n+d,b=(h+f)/2,S=(p+m)/2,E=f-h,O=m-p,P=E*E+O*O,C=a-o,w=h*m-f*p,T=(O<0?-1:1)*nn(_S(0,C*C*P-w*w)),V=(w*O-E*T)/P,z=(-w*E-O*T)/P,v=(w*O+E*T)/P,R=(-w*E+O*T)/P,G=V-b,A=z-S,N=v-b,re=R-S;return G*G+A*A>N*N+re*re&&(V=v,z=R),{cx:V,cy:z,x01:-u,y01:-d,x11:V*(a/C-1),y11:z*(a/C-1)}}function nm(){var e=$S,t=kS,r=Fe(0),n=null,a=US,o=DS,s=LS,i=null,l=jS(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),f=a.apply(this,arguments)-Bo,m=o.apply(this,arguments)-Bo,b=sd(m-f),S=m>f;if(i||(i=u=l()),p<h&&(d=p,p=h,h=d),!(p>nt))i.moveTo(0,0);else if(b>vo-nt)i.moveTo(p*mr(f),p*_t(f)),i.arc(0,0,p,f,m,!S),h>nt&&(i.moveTo(h*mr(m),h*_t(m)),i.arc(0,0,h,m,f,S));else{var E=f,O=m,P=f,C=m,w=b,T=b,V=s.apply(this,arguments)/2,z=V>nt&&(n?+n.apply(this,arguments):nn(h*h+p*p)),v=fi(sd(p-h)/2,+r.apply(this,arguments)),R=v,G=v,A,N;if(z>nt){var re=id(z/h*_t(V)),ee=id(z/p*_t(V));(w-=re*2)>nt?(re*=S?1:-1,P+=re,C-=re):(w=0,P=C=(f+m)/2),(T-=ee*2)>nt?(ee*=S?1:-1,E+=ee,O-=ee):(T=0,E=O=(f+m)/2)}var ae=p*mr(E),te=p*_t(E),se=h*mr(C),q=h*_t(C);if(v>nt){var Z=p*mr(O),ue=p*_t(O),ve=h*mr(P),ze=h*_t(P),Oe;if(b<ga)if(Oe=BS(ae,te,ve,ze,Z,ue,se,q)){var lt=ae-Oe[0],tt=te-Oe[1],ye=Z-Oe[0],X=ue-Oe[1],oe=1/_t(ES((lt*ye+tt*X)/(nn(lt*lt+tt*tt)*nn(ye*ye+X*X)))/2),ce=nn(Oe[0]*Oe[0]+Oe[1]*Oe[1]);R=fi(v,(h-ce)/(oe-1)),G=fi(v,(p-ce)/(oe+1))}else R=G=0}T>nt?G>nt?(A=Za(ve,ze,ae,te,p,G,S),N=Za(Z,ue,se,q,p,G,S),i.moveTo(A.cx+A.x01,A.cy+A.y01),G<v?i.arc(A.cx,A.cy,G,Ke(A.y01,A.x01),Ke(N.y01,N.x01),!S):(i.arc(A.cx,A.cy,G,Ke(A.y01,A.x01),Ke(A.y11,A.x11),!S),i.arc(0,0,p,Ke(A.cy+A.y11,A.cx+A.x11),Ke(N.cy+N.y11,N.cx+N.x11),!S),i.arc(N.cx,N.cy,G,Ke(N.y11,N.x11),Ke(N.y01,N.x01),!S))):(i.moveTo(ae,te),i.arc(0,0,p,E,O,!S)):i.moveTo(ae,te),!(h>nt)||!(w>nt)?i.lineTo(se,q):R>nt?(A=Za(se,q,Z,ue,h,-R,S),N=Za(ae,te,ve,ze,h,-R,S),i.lineTo(A.cx+A.x01,A.cy+A.y01),R<v?i.arc(A.cx,A.cy,R,Ke(A.y01,A.x01),Ke(N.y01,N.x01),!S):(i.arc(A.cx,A.cy,R,Ke(A.y01,A.x01),Ke(A.y11,A.x11),!S),i.arc(0,0,h,Ke(A.cy+A.y11,A.cx+A.x11),Ke(N.cy+N.y11,N.cx+N.x11),S),i.arc(N.cx,N.cy,R,Ke(N.y11,N.x11),Ke(N.y01,N.x01),!S))):i.arc(0,0,h,C,P,S)}if(i.closePath(),u)return i=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-ga/2;return[mr(d)*u,_t(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Fe(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Fe(+u),c):t},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Fe(+u),c):r},c.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Fe(+u),c):n},c.startAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Fe(+u),c):a},c.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Fe(+u),c):o},c.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Fe(+u),c):s},c.context=function(u){return arguments.length?(i=u??null,c):i},c}function am(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function FS(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function NS(e){return e}function zS(){var e=NS,t=FS,r=null,n=Fe(0),a=Fe(vo),o=Fe(0);function s(i){var l,c=(i=am(i)).length,u,d,h=0,p=new Array(c),f=new Array(c),m=+n.apply(this,arguments),b=Math.min(vo,Math.max(-vo,a.apply(this,arguments)-m)),S,E=Math.min(Math.abs(b)/c,o.apply(this,arguments)),O=E*(b<0?-1:1),P;for(l=0;l<c;++l)(P=f[p[l]=l]=+e(i[l],l,i))>0&&(h+=P);for(t!=null?p.sort(function(C,w){return t(f[C],f[w])}):r!=null&&p.sort(function(C,w){return r(i[C],i[w])}),l=0,d=h?(b-c*O)/h:0;l<c;++l,m=S)u=p[l],P=f[u],S=m+(P>0?P*d:0)+O,f[u]={data:i[u],index:l,value:P,startAngle:m,endAngle:S,padAngle:E};return f}return s.value=function(i){return arguments.length?(e=typeof i=="function"?i:Fe(+i),s):e},s.sortValues=function(i){return arguments.length?(t=i,r=null,s):t},s.sort=function(i){return arguments.length?(r=i,t=null,s):r},s.startAngle=function(i){return arguments.length?(n=typeof i=="function"?i:Fe(+i),s):n},s.endAngle=function(i){return arguments.length?(a=typeof i=="function"?i:Fe(+i),s):a},s.padAngle=function(i){return arguments.length?(o=typeof i=="function"?i:Fe(+i),s):o},s}function yn(e,t){if((s=e.length)>1)for(var r=1,n,a,o=e[t[0]],s,i=o.length;r<s;++r)for(a=o,o=e[t[r]],n=0;n<i;++n)o[n][1]+=o[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function bn(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function GS(e,t){return e[t]}function HS(e){const t=[];return t.key=e,t}function om(){var e=Fe([]),t=bn,r=yn,n=GS;function a(o){var s=Array.from(e.apply(this,arguments),HS),i,l=s.length,c=-1,u;for(const d of o)for(i=0,++c;i<l;++i)(s[i][c]=[0,+n(d,s[i].key,c,o)]).data=d;for(i=0,u=am(t(s));i<l;++i)s[u[i]].index=i;return r(s,u),s}return a.keys=function(o){return arguments.length?(e=typeof o=="function"?o:Fe(Array.from(o)),a):e},a.value=function(o){return arguments.length?(n=typeof o=="function"?o:Fe(+o),a):n},a.order=function(o){return arguments.length?(t=o==null?bn:typeof o=="function"?o:Fe(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(r=o??yn,a):r},a}function qS(e,t){if((n=e.length)>0){for(var r,n,a=0,o=e[0].length,s;a<o;++a){for(s=r=0;r<n;++r)s+=e[r][a][1]||0;if(s)for(r=0;r<n;++r)e[r][a][1]/=s}yn(e,t)}}function JS(e,t){if((l=e.length)>0)for(var r,n=0,a,o,s,i,l,c=e[t[0]].length;n<c;++n)for(s=i=0,r=0;r<l;++r)(o=(a=e[t[r]][n])[1]-a[0])>0?(a[0]=s,a[1]=s+=o):o<0?(a[1]=i,a[0]=i+=o):(a[0]=0,a[1]=o)}function WS(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,o=n.length;r<o;++r){for(var s=0,i=0;s<a;++s)i+=e[s][r][1]||0;n[r][1]+=n[r][0]=-i/2}yn(e,t)}}function YS(e,t){if(!(!((s=e.length)>0)||!((o=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,o,s;n<o;++n){for(var i=0,l=0,c=0;i<s;++i){for(var u=e[t[i]],d=u[n][1]||0,h=u[n-1][1]||0,p=(d-h)/2,f=0;f<i;++f){var m=e[t[f]],b=m[n][1]||0,S=m[n-1][1]||0;p+=b-S}l+=d,c+=p*d}a[n-1][1]+=a[n-1][0]=r,l&&(r-=c/l)}a[n-1][1]+=a[n-1][0]=r,yn(e,t)}}function sm(e){var t=e.map(KS);return bn(e).sort(function(r,n){return t[r]-t[n]})}function KS(e){for(var t=-1,r=0,n=e.length,a,o=-1/0;++t<n;)(a=+e[t][1])>o&&(o=a,r=t);return r}function im(e){var t=e.map(lm);return bn(e).sort(function(r,n){return t[r]-t[n]})}function lm(e){for(var t=0,r=-1,n=e.length,a;++r<n;)(a=+e[r][1])&&(t+=a);return t}function QS(e){return im(e).reverse()}function XS(e){var t=e.length,r,n,a=e.map(lm),o=sm(e),s=0,i=0,l=[],c=[];for(r=0;r<t;++r)n=o[r],s<i?(s+=a[n],l.push(n)):(i+=a[n],c.push(n));return c.reverse().concat(l)}function ZS(e){return bn(e).reverse()}const gi={appearance:sm,ascending:im,descending:QS,insideOut:XS,none:bn,reverse:ZS},yi={expand:qS,diverging:JS,none:yn,silhouette:WS,wiggle:YS},cm=e=>{const{series:t,seriesOrder:r,defaultStrategy:n}=e,a=[],o={};return r.forEach(s=>{const{stack:i,stackOrder:l,stackOffset:c}=t[s];i===void 0?a.push({ids:[s],stackingOrder:gi.none,stackingOffset:yi.none}):o[i]===void 0?(o[i]=a.length,a.push({ids:[s],stackingOrder:gi[l??(n==null?void 0:n.stackOrder)??"none"],stackingOffset:yi[c??(n==null?void 0:n.stackOffset)??"diverging"]})):(a[o[i]].ids.push(s),l!==void 0&&(a[o[i]].stackingOrder=gi[l]),c!==void 0&&(a[o[i]].stackingOffset=yi[c]))}),a},eO=e=>e==null?"":e.toLocaleString(),tO=(e,t)=>{const{seriesOrder:r,series:n}=e,a=cm(e),o=t??[];r.forEach(i=>{const l=n[i].data;if(l!==void 0)l.forEach((c,u)=>{o.length<=u?o.push({[i]:c}):o[u][i]=c});else if(t===void 0)throw new Error([`MUI X Charts: bar series with id='${i}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
|
|
117
|
+
`))});const s={};return a.forEach(i=>{const{ids:l,stackingOffset:c,stackingOrder:u}=i,d=om().keys(l.map(h=>{const p=n[h].dataKey;return n[h].data===void 0&&p!==void 0?p:h})).value((h,p)=>h[p]??0).order(u).offset(c)(o);l.forEach((h,p)=>{const f=n[h].dataKey;s[h]=Y({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:n[h].valueFormatter??eO},n[h],{data:f?t.map(m=>{const b=m[f];return typeof b!="number"?(process.env.NODE_ENV!=="production"&&b!==null&&da([`MUI X Charts: your dataset key "${f}" is used for plotting bars, but contains nonnumerical elements.`,"Bar plots only support numbers and null values."]),null):b}):n[h].data,stackedData:d[p].map(([m,b])=>[m,b])})})}),{seriesOrder:r,stackingGroups:a,series:s}};function Yt(e,t){return typeof e=="function"?e(t):e}const rO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>{const o=Yt(r[a].label,"legend");return o===void 0||n.push({markType:r[a].labelMarkType,id:a,seriesId:a,color:r[a].color,label:o}),n},[])},nO=(e,t,r)=>{const n=e.layout==="vertical",a=n?t==null?void 0:t.colorScale:r==null?void 0:r.colorScale,o=n?r==null?void 0:r.colorScale:t==null?void 0:t.colorScale,s=n?t==null?void 0:t.data:r==null?void 0:r.data;return o?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:o(l);return c===null?e.color:c}:a&&s?i=>{if(i===void 0)return e.color;const l=s[i],c=l===null?e.color:a(l);return c===null?e.color:c}:()=>e.color},aO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=Yt(t.label,"tooltip"),o=t.data[n.dataIndex];if(o==null)return null;const s=t.valueFormatter(o,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:a,value:o,formattedValue:s,markType:t.labelMarkType}},oO=e=>Object.values(e).map(t=>t.layout==="horizontal"?{direction:"y",axisId:t.yAxisId}:{direction:"x",axisId:t.xAxisId}),sO=(e,t,r)=>Y({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),iO={seriesProcessor:tO,colorProcessor:nO,legendGetter:rO,tooltipGetter:aO,axisTooltipGetter:oO,xExtremumGetter:RS,yExtremumGetter:AS,getSeriesWithDefaultValues:sO},Fo=(e,t)=>[t[0]===null?e[0]:Math.min(e[0],t[0]),t[1]===null?e[1]:Math.max(e[1],t[1])],lO=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:a}=e;return Object.keys(t).filter(o=>{const s=t[o].xAxisId;return s===r.id||s===void 0&&n}).reduce((o,s)=>{var c;const i=a==null?void 0:a({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[s].xAxisId,seriesYAxisId:t[s].yAxisId}),l=(c=t[s].data)==null?void 0:c.reduce((u,d,h)=>i&&!i(d,h)?u:Fo(u,[d.x,d.x]),[1/0,-1/0]);return Fo(o,l??[1/0,-1/0])},[1/0,-1/0])},cO=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:a}=e;return Object.keys(t).filter(o=>{const s=t[o].yAxisId;return s===r.id||s===void 0&&n}).reduce((o,s)=>{var c;const i=a==null?void 0:a({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[s].xAxisId,seriesYAxisId:t[s].yAxisId}),l=(c=t[s].data)==null?void 0:c.reduce((u,d,h)=>i&&!i(d,h)?u:Fo(u,[d.y,d.y]),[1/0,-1/0]);return Fo(o,l??[1/0,-1/0])},[1/0,-1/0])},uO=({series:e,seriesOrder:t},r)=>({series:Object.fromEntries(Object.entries(e).map(([a,o])=>{const s=o==null?void 0:o.datasetKeys,i=["x","y","id"].filter(c=>typeof(s==null?void 0:s[c])!="string");if(o!=null&&o.datasetKeys&&i.length>0)throw new Error([`MUI X Charts: scatter series with id='${a}' has incomplete datasetKeys.`,`Properties ${i.map(c=>`"${c}"`).join(", ")} are missing.`].join(`
|
|
118
|
+
`));const l=s?(r==null?void 0:r.map(c=>({x:c[s.x]??null,y:c[s.y]??null,z:s.z&&c[s.z],id:s.id&&c[s.id]})))??[]:o.data??[];return[a,Y({labelMarkType:"circle",markerSize:4},o,{preview:Y({markerSize:1},o==null?void 0:o.preview),data:l,valueFormatter:o.valueFormatter??(c=>c&&`(${c.x}, ${c.y})`)})]})),seriesOrder:t}),dO=(e,t,r,n)=>{const a=n==null?void 0:n.colorScale,o=r==null?void 0:r.colorScale,s=t==null?void 0:t.colorScale;return a?i=>{var u,d;if(i===void 0)return e.color;if(((u=n==null?void 0:n.data)==null?void 0:u[i])!==void 0){const h=a((d=n==null?void 0:n.data)==null?void 0:d[i]);if(h!==null)return h}const l=e.data[i],c=l===null?e.color:a(l.z);return c===null?e.color:c}:o?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:o(l.y);return c===null?e.color:c}:s?i=>{if(i===void 0)return e.color;const l=e.data[i],c=l===null?e.color:s(l.x);return c===null?e.color:c}:()=>e.color},hO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>{const o=Yt(r[a].label,"legend");return o===void 0||n.push({markType:r[a].labelMarkType,id:a,seriesId:a,color:r[a].color,label:o}),n},[])},pO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=Yt(t.label,"tooltip"),o=t.data[n.dataIndex],s=t.valueFormatter(o,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:a,value:o,formattedValue:s,markType:t.labelMarkType}},mO=(e,t,r)=>Y({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),fO={seriesProcessor:uO,colorProcessor:dO,legendGetter:hO,tooltipGetter:pO,xExtremumGetter:lO,yExtremumGetter:cO,getSeriesWithDefaultValues:mO},gO=e=>{const{axis:t}=e,r=Math.min(...t.data??[]),n=Math.max(...t.data??[]);return[r,n]};function yO(e,t,r,n){return r.reduce((a,o,s)=>{if(t[s]===null)return a;const[i,l]=e(o);return n&&(!n({y:i,x:null},s)||!n({y:l,x:null},s))?a:[Math.min(i,l,a[0]),Math.max(i,l,a[1])]},[1/0,-1/0])}const bO=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:a}=e;return Object.keys(t).filter(o=>{const s=t[o].yAxisId;return s===r.id||n&&s===void 0}).reduce((o,s)=>{const{area:i,stackedData:l,data:c}=t[s],u=i!==void 0,d=a==null?void 0:a({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[s].xAxisId,seriesYAxisId:t[s].yAxisId}),h=u&&r.scaleType!=="log"&&typeof t[s].baseline!="string"?b=>b:b=>[b[1],b[1]],p=yO(h,c,l,d),[f,m]=p;return[Math.min(f,o[0]),Math.max(m,o[1])]},[1/0,-1/0])};function vO(e,t){const r={};return Object.keys(e).forEach(n=>{r[n]=Y({},e[n],{valueFormatter:e[n].valueFormatter??t})}),r}const xO=(e,t)=>{const{seriesOrder:r,series:n}=e,a=cm(Y({},e,{defaultStrategy:{stackOffset:"none"}})),o=t??[];r.forEach(i=>{const l=n[i].data;if(l!==void 0)l.forEach((c,u)=>{o.length<=u?o.push({[i]:c}):o[u][i]=c});else if(t===void 0&&process.env.NODE_ENV!=="production")throw new Error([`MUI X Charts: line series with id='${i}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
|
|
119
|
+
`))});const s={};return a.forEach(i=>{const{ids:l,stackingOrder:c,stackingOffset:u}=i,d=om().keys(l.map(h=>{const p=n[h].dataKey;return n[h].data===void 0&&p!==void 0?p:h})).value((h,p)=>h[p]??0).order(c).offset(u)(o);l.forEach((h,p)=>{const f=n[h].dataKey;s[h]=Y({labelMarkType:"line"},n[h],{data:f?t.map(m=>{const b=m[f];return typeof b!="number"?(process.env.NODE_ENV!=="production"&&b!==null&&da([`MUI X Charts: Your dataset key "${f}" is used for plotting line, but contains nonnumerical elements.`,"Line plots only support numbers and null values."]),null):b}):n[h].data,stackedData:d[p].map(([m,b])=>[m,b])})})}),{seriesOrder:r,stackingGroups:a,series:vO(s,i=>i==null?"":i.toLocaleString())}},SO=(e,t,r)=>{const n=r==null?void 0:r.colorScale,a=t==null?void 0:t.colorScale;return n?o=>{if(o===void 0)return e.color;const s=e.data[o],i=s===null?e.color:n(s);return i===null?e.color:i}:a?o=>{var l;if(o===void 0)return e.color;const s=(l=t.data)==null?void 0:l[o],i=s===null?e.color:a(s);return i===null?e.color:i}:()=>e.color},OO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>{const o=Yt(r[a].label,"legend");return o===void 0||n.push({markType:r[a].labelMarkType,id:a,seriesId:a,color:r[a].color,label:o}),n},[])},wO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=Yt(t.label,"tooltip"),o=t.data[n.dataIndex],s=t.valueFormatter(o,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:a,value:o,formattedValue:s,markType:t.labelMarkType}},CO=e=>Object.values(e).map(t=>({direction:"x",axisId:t.xAxisId})),PO=(e,t,r)=>Y({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),TO={colorProcessor:SO,seriesProcessor:xO,legendGetter:OO,tooltipGetter:wO,axisTooltipGetter:CO,xExtremumGetter:gO,yExtremumGetter:bO,getSeriesWithDefaultValues:PO},RO=(e="none")=>{if(typeof e=="function")return e;switch(e){case"none":return null;case"desc":return(t,r)=>r-t;case"asc":return(t,r)=>t-r;default:return null}},AO=e=>{const{seriesOrder:t,series:r}=e,n={};return t.forEach(a=>{const o=zS().startAngle(2*Math.PI*(r[a].startAngle??0)/360).endAngle(2*Math.PI*(r[a].endAngle??360)/360).padAngle(2*Math.PI*(r[a].paddingAngle??0)/360).sortValues(RO(r[a].sortingValues??"none"))(r[a].data.map(s=>s.value));n[a]=Y({labelMarkType:"circle",valueFormatter:s=>s.value.toLocaleString()},r[a],{data:r[a].data.map((s,i)=>Y({},s,{id:s.id??`auto-generated-pie-id-${a}-${i}`},o[i])).map((s,i)=>{var l,c;return Y({labelMarkType:"circle"},s,{formattedValue:((c=(l=r[a]).valueFormatter)==null?void 0:c.call(l,Y({},s,{label:Yt(s.label,"arc")}),{dataIndex:i}))??s.value.toLocaleString()})})})}),{seriesOrder:t,series:n}},_O=e=>t=>e.data[t].color,EO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>(r[a].data.forEach((o,s)=>{const i=Yt(o.label,"legend");i!==void 0&&n.push({markType:o.labelMarkType??r[a].labelMarkType,id:o.id??s,seriesId:a,color:o.color,label:i,itemId:o.id??s})}),n),[])},VO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=t.data[n.dataIndex];if(a==null)return null;const o=Yt(a.label,"tooltip"),s=Y({},a,{label:o}),i=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:s,formattedValue:i,markType:a.labelMarkType??t.labelMarkType}},IO=(e,t,r)=>Y({id:e.id??`auto-generated-id-${t}`},e,{data:e.data.map((n,a)=>Y({color:r[a%r.length]},n))}),MO={colorProcessor:_O,seriesProcessor:AO,legendGetter:EO,tooltipGetter:VO,getSeriesWithDefaultValues:IO},jO={bar:iO,scatter:fO,line:TO,pie:MO},$O=[lc,Ts,sc,Rs];function kO(e){const{children:t,plugins:r=$O,pluginParams:n={},seriesConfig:a=jO}=e,{contextValue:o}=fv(r,n,a);return g.jsx(Bl.Provider,{value:o,children:t})}const um=()=>{const e=B.useContext(Bl);if(e==null)throw new Error(["MUI X Charts: Could not find the Chart context.","It looks like you rendered your component outside of a ChartDataProvider.","This can also happen if you are bundling multiple versions of the library."].join(`
|
|
120
|
+
`));return e};function jr(){const e=um();if(!e)throw new Error(["MUI X Charts: Could not find the charts context.","It looks like you rendered your component outside of a ChartContainer parent component."].join(`
|
|
121
|
+
`));return e.store}function dm(){const e=jr();return ot(e,Ta)}function hm(){const e=jr();return ot(e,Qb)}const Zi=(e,t)=>e===void 0?t:Math.PI*e/180;function UO(){const e=jr(),{axis:t,axisIds:r}=ot(e,Ir);return{xAxis:t,xAxisIds:r}}function DO(){const e=jr(),{axis:t,axisIds:r}=ot(e,Mr);return{yAxis:t,yAxisIds:r}}function LO(){const e=jr(),{axis:t,axisIds:r}=ot(e,TS)??{axis:{},axisIds:[]};return{zAxis:t,zAxisIds:r}}function BO(){const e=um();if(!e)throw new Error(["MUI X Charts: Could not find the svg ref context.","It looks like you rendered your component outside of a ChartContainer parent component."].join(`
|
|
122
|
+
`));return e.svgRef}function FO(){const e=hm();return B.useCallback(t=>`${e}-gradient-${t}`,[e])}function NO(){const e=hm();return B.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var bi,ld;function zO(){if(ld)return bi;ld=1;var e=4,t=.001,r=1e-7,n=10,a=11,o=1/(a-1),s=typeof Float32Array=="function";function i(m,b){return 1-3*b+3*m}function l(m,b){return 3*b-6*m}function c(m){return 3*m}function u(m,b,S){return((i(b,S)*m+l(b,S))*m+c(b))*m}function d(m,b,S){return 3*i(b,S)*m*m+2*l(b,S)*m+c(b)}function h(m,b,S,E,O){var P,C,w=0;do C=b+(S-b)/2,P=u(C,E,O)-m,P>0?S=C:b=C;while(Math.abs(P)>r&&++w<n);return C}function p(m,b,S,E){for(var O=0;O<e;++O){var P=d(b,S,E);if(P===0)return b;var C=u(b,S,E)-m;b-=C/P}return b}function f(m){return m}return bi=function(b,S,E,O){if(!(0<=b&&b<=1&&0<=E&&E<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===S&&E===O)return f;for(var P=s?new Float32Array(a):new Array(a),C=0;C<a;++C)P[C]=u(C*o,b,E);function w(T){for(var V=0,z=1,v=a-1;z!==v&&P[z]<=T;++z)V+=o;--z;var R=(T-P[z])/(P[z+1]-P[z]),G=V+R*o,A=d(G,b,E);return A>=t?p(T,G,b,E):A===0?G:h(T,V,V+o,b,E)}return function(V){return V===0?0:V===1?1:u(w(V),S,O)}},bi}var GO=zO();const HO=fg(GO),qO=300,JO=HO(.66,0,.34,1);var vn=0,ta=0,Nn=0,pm=1e3,No,ra,zo=0,Pr=0,As=0,ya=typeof performance=="object"&&performance.now?performance:Date,mm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function cc(){return Pr||(mm(WO),Pr=ya.now()+As)}function WO(){Pr=0}function Go(){this._call=this._time=this._next=null}Go.prototype=fm.prototype={constructor:Go,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?cc():+r)+(t==null?0:+t),!this._next&&ra!==this&&(ra?ra._next=this:No=this,ra=this),this._call=e,this._time=r,tl()},stop:function(){this._call&&(this._call=null,this._time=1/0,tl())}};function fm(e,t,r){var n=new Go;return n.restart(e,t,r),n}function el(){cc(),++vn;for(var e=No,t;e;)(t=Pr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--vn}function cd(){Pr=(zo=ya.now())+As,vn=ta=0;try{el()}finally{vn=0,KO(),Pr=0}}function YO(){var e=ya.now(),t=e-zo;t>pm&&(As-=t,zo=e)}function KO(){for(var e,t=No,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:No=r);ra=e,tl(n)}function tl(e){if(!vn){ta&&(ta=clearTimeout(ta));var t=e-Pr;t>24?(e<1/0&&(ta=setTimeout(cd,e-ya.now()-As)),Nn&&(Nn=clearInterval(Nn))):(Nn||(zo=ya.now(),Nn=setInterval(YO,pm)),vn=1,mm(cd))}}function QO(e,t,r){var n=new Go;return t=t==null?0:+t,n.restart(a=>{n.stop(),e(a+t)},t,r),n}class XO{constructor(t,r,n){this.duration=void 0,this.elapsed=0,this.easingFn=void 0,this.timer=null,this.onTickCallback=void 0,this.duration=t,this.easingFn=r,this.onTickCallback=n,this.resume()}get running(){return this.timer!==null}timerCallback(t){this.elapsed=Math.min(t,this.duration);const r=this.duration===0?1:this.elapsed/this.duration,n=this.easingFn(r);this.onTickCallback(n),this.elapsed>=this.duration&&this.stop()}resume(){if(this.running||this.elapsed>=this.duration)return this;const t=cc()-this.elapsed;return this.timer=fm(r=>this.timerCallback(r),0,t),el(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),QO(()=>this.timerCallback(this.duration)),el(),this}}function ZO(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=0;a<r.length;a+=1){const o=r[a];if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1}return!0}function ew(e,{createInterpolator:t,applyProps:r,skip:n,initialProps:a=e}){const o=B.useRef(a),s=B.useRef(null),i=B.useRef(null),l=B.useRef(e);$t(()=>{l.current=e},[e]),$t(()=>{var d;n&&((d=s.current)==null||d.finish(),s.current=null,i.current=null,o.current=e)},[e,n]);const c=B.useCallback(d=>{const h=o.current,p=t(h,e);s.current=new XO(qO,JO,f=>{const m=p(f);o.current=m,r(d,m)})},[r,t,e]);return B.useCallback(d=>{var p,f,m,b;if(d===null){(p=s.current)==null||p.stop();return}const h=i.current;if(h===d){if(ZO(l.current,e)){(f=s.current)==null||f.resume();return}(m=s.current)==null||m.stop()}h&&((b=s.current)==null||b.stop()),i.current=d,(s.current||!n)&&c(d)},[c,e,n])}function tw(e,{createInterpolator:t,transformProps:r,applyProps:n,skip:a,initialProps:o=e,ref:s}){const i=r??(u=>u),l=ew(e,{initialProps:o,createInterpolator:t,applyProps:(u,d)=>n(u,i(d)),skip:a});return Y({},r(a?e:o),{ref:ds(l,s)})}function ud(e){const{isReversed:t,gradientId:r,size:n,direction:a,scale:o,colorMap:s}=e;return n<=0?null:g.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${a}${t?1:2}`]:`${n}px`,gradientUnits:"userSpaceOnUse",children:s.thresholds.map((i,l)=>{const c=o(i);if(c===void 0)return null;const u=t?1-c/n:c/n;return Number.isNaN(u)?null:g.jsxs(B.Fragment,{children:[g.jsx("stop",{offset:u,stopColor:s.colors[l],stopOpacity:1}),g.jsx("stop",{offset:u,stopColor:s.colors[l+1],stopOpacity:1})]},i.toString()+l)})})}const rw=10;function dd(e){const{gradientUnits:t,isReversed:r,gradientId:n,size:a,direction:o,scale:s,colorScale:i,colorMap:l}=e,c=[l.min??0,l.max??100],u=c.map(s).filter(f=>f!==void 0);if(u.length!==2)return null;const d=typeof c[0]=="number"?wt(c[0],c[1]):ql(c[0],c[1]),h=Math.round((Math.max(...u)-Math.min(...u))/rw),p=`${c[0]}-${c[1]}-`;return g.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${r?1:2}`]:t==="objectBoundingBox"?1:`${a}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:h+1},(f,m)=>{const b=d(m/h);if(b===void 0)return null;const S=s(b);if(S===void 0)return null;const E=r?1-S/a:S/a,O=i(b);return O===null?null:g.jsx("stop",{offset:E,stopColor:O,stopOpacity:1},p+m)})})}const nw=10,aw=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function vi(e){const{isReversed:t,gradientId:r,colorScale:n,colorMap:a}=e,o=[a.min??0,a.max??100],s=typeof o[0]=="number"?wt(o[0],o[1]):ql(o[0],o[1]),i=nw,l=`${o[0]}-${o[1]}-`;return g.jsx("linearGradient",Y({id:r},aw(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:i+1},(c,u)=>{const d=u/i,h=s(d);if(h===void 0)return null;const p=n(h);return p===null?null:g.jsx("stop",{offset:d,stopColor:p,stopOpacity:1},l+u)})}))}function ow(){const{top:e,height:t,bottom:r,left:n,width:a,right:o}=dm(),s=e+t+r,i=n+a+o,l=FO(),c=NO(),{xAxis:u,xAxisIds:d}=UO(),{yAxis:h,yAxisIds:p}=DO(),{zAxis:f,zAxisIds:m}=LO(),b=p.filter(O=>h[O].colorMap!==void 0),S=d.filter(O=>u[O].colorMap!==void 0),E=m.filter(O=>f[O].colorMap!==void 0);return b.length===0&&S.length===0&&E.length===0?null:g.jsxs("defs",{children:[b.map(O=>{const P=l(O),C=c(O),{colorMap:w,scale:T,colorScale:V,reverse:z}=h[O];return(w==null?void 0:w.type)==="piecewise"?g.jsx(ud,{isReversed:!z,scale:T,colorMap:w,size:s,gradientId:P,direction:"y"},P):(w==null?void 0:w.type)==="continuous"?g.jsxs(B.Fragment,{children:[g.jsx(dd,{isReversed:!z,scale:T,colorScale:V,colorMap:w,size:s,gradientId:P,direction:"y"}),g.jsx(vi,{isReversed:z,colorScale:V,colorMap:w,gradientId:C})]},P):null}),S.map(O=>{const P=l(O),C=c(O),{colorMap:w,scale:T,reverse:V,colorScale:z}=u[O];return(w==null?void 0:w.type)==="piecewise"?g.jsx(ud,{isReversed:V,scale:T,colorMap:w,size:i,gradientId:P,direction:"x"},P):(w==null?void 0:w.type)==="continuous"?g.jsxs(B.Fragment,{children:[g.jsx(dd,{isReversed:V,scale:T,colorScale:z,colorMap:w,size:i,gradientId:P,direction:"x"}),g.jsx(vi,{isReversed:V,colorScale:z,colorMap:w,gradientId:C})]},P):null}),E.map(O=>{const P=c(O),{colorMap:C,colorScale:w}=f[O];return(C==null?void 0:C.type)==="continuous"?g.jsx(vi,{colorScale:w,colorMap:C,gradientId:P},P):null})]})}const sw=["children","className","title","desc"],iw=ht("svg",{name:"MuiChartsSurface",slot:"Root"})(({ownerState:e})=>({width:e.width??"100%",height:e.height??"100%",display:"flex",position:"relative",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden",touchAction:"pan-y",userSelect:"none"})),uc=B.forwardRef(function(t,r){const n=jr(),{width:a,height:o}=ot(n,qb),{width:s,height:i}=ot(n,Hb),l=BO(),c=ds(l,r),u=K0({props:t,name:"MuiChartsSurface"}),{children:d,className:h,title:p,desc:f}=u,m=ir(u,sw),b=o>0&&a>0;return g.jsxs(iw,Y({ownerState:{width:s,height:i},viewBox:`0 0 ${a} ${o}`,className:h},m,{ref:c,children:[p&&g.jsx("title",{children:p}),f&&g.jsx("desc",{children:f}),g.jsx(ow,{}),b&&d]}))});process.env.NODE_ENV!=="production"&&(uc.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(uc.propTypes={children:y.node,className:y.string,desc:y.string,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),title:y.string});function zn(e,t){if(typeof e=="number")return e;if(e==="100%")return t;if(e.endsWith("%")){const r=Number.parseFloat(e.slice(0,e.length-1));if(!Number.isNaN(r))return r*t/100}if(e.endsWith("px")){const r=Number.parseFloat(e.slice(0,e.length-2));if(!Number.isNaN(r))return r}throw new Error(`MUI X Charts: Received an unknown value "${e}". It should be a number, or a string with a percentage value.`)}function xi(e){const t=Zi(e);return[Math.sin(t),-Math.cos(t)]}function lw(e,t){const r=[[0,0],xi(e),xi(t)],n=Math.min(e,t),a=Math.max(e,t),o=Math.floor(n/90)*90;for(let u=1;u<=4;u+=1){const d=o+u*90;d<a&&r.push(xi(d))}const s=Math.min(...r.map(([u])=>u)),i=Math.max(...r.map(([u])=>u)),l=Math.min(...r.map(([,u])=>u)),c=Math.max(...r.map(([,u])=>u));return{cx:-s/(i-s),cy:-l/(c-l),minX:s,maxX:i,minY:l,maxY:c}}function cw(e,t,r,n,{minX:a,maxX:o,minY:s,maxY:i}){return Math.min(...[{ratio:Math.abs(a),space:e},{ratio:Math.abs(o),space:r-e},{ratio:Math.abs(s),space:t},{ratio:Math.abs(i),space:n-t}].map(({ratio:l,space:c})=>l<1e-5?1/0:c/l))}const dc=B.createContext({value:null,valueMin:0,valueMax:0,startAngle:0,endAngle:0,innerRadius:0,outerRadius:0,cornerRadius:0,cx:0,cy:0,maxRadius:0,valueAngle:null});process.env.NODE_ENV!=="production"&&(dc.displayName="GaugeContext");function uw(e){const{value:t=null,valueMin:r=0,valueMax:n=100,startAngle:a=0,endAngle:o=360,outerRadius:s,innerRadius:i,cornerRadius:l,cx:c,cy:u,children:d}=e,{left:h,top:p,width:f,height:m}=dm(),b=lw(a,o),S=c?zn(c,f):b.cx*f,E=u?zn(u,m):b.cy*m;let O=h+S,P=p+E;const C=cw(S,E,f,m,b);if(c===void 0){const v=C*(b.maxX-b.minX);O=h+(f-v)/2+b.cx*v}if(u===void 0){const v=C*(b.maxY-b.minY);P=p+(m-v)/2+b.cy*v}const w=zn(s??C,C),T=zn(i??"80%",C),V=zn(l??0,w-T),z=B.useMemo(()=>{const v=Zi(a),R=Zi(o);return{value:t,valueMin:r,valueMax:n,startAngle:v,endAngle:R,outerRadius:w,innerRadius:T,cornerRadius:V,cx:O,cy:P,maxRadius:C,valueAngle:t===null?null:v+(R-v)*(t-r)/(n-r)}},[t,r,n,a,o,w,T,V,O,P,C]);return g.jsx(dc.Provider,{value:z,children:d})}function hc(){return B.useContext(dc)}const dw=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],hw=ht("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),pc=B.forwardRef(function(t,r){const{width:n,height:a,margin:o,title:s,desc:i,value:l,valueMin:c=0,valueMax:u=100,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:b,cy:S,children:E}=t,O=ir(t,dw);return g.jsx(kO,{pluginParams:{width:n,height:a,margin:lp(o,{left:10,right:10,top:10,bottom:10})},plugins:[],children:g.jsx(uw,{value:l,valueMin:c,valueMax:u,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:b,cy:S,children:g.jsx(uc,Y({title:s,desc:i,role:"meter","aria-valuenow":l===null?void 0:l,"aria-valuemin":c,"aria-valuemax":u},O,{ref:r,children:g.jsx(hw,{"aria-hidden":"true",children:E})}))})})});process.env.NODE_ENV!=="production"&&(pc.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(pc.propTypes={children:y.node,className:y.string,cornerRadius:y.oneOfType([y.number,y.string]),cx:y.oneOfType([y.number,y.string]),cy:y.oneOfType([y.number,y.string]),desc:y.string,endAngle:y.number,height:y.number,id:y.string,innerRadius:y.oneOfType([y.number,y.string]),margin:y.oneOfType([y.number,y.shape({bottom:y.number,left:y.number,right:y.number,top:y.number})]),outerRadius:y.oneOfType([y.number,y.string]),skipAnimation:y.bool,startAngle:y.number,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),title:y.string,value:y.number,valueMax:y.number,valueMin:y.number,width:y.number});function pw(e){const t=jr(),r=ot(t,Ob);return e||r}function mw(e,t){const r=wt(e.startAngle,t.startAngle),n=wt(e.endAngle,t.endAngle),a=wt(e.innerRadius,t.innerRadius),o=wt(e.outerRadius,t.outerRadius),s=wt(e.cornerRadius,t.cornerRadius);return i=>({startAngle:r(i),endAngle:n(i),innerRadius:a(i),outerRadius:o(i),cornerRadius:s(i)})}function fw(e){return tw({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:mw,transformProps:t=>({d:nm().cornerRadius(t.cornerRadius)({innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle})}),applyProps(t,r){t.setAttribute("d",r.d)},initialProps:{startAngle:e.startAngle,endAngle:e.startAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},skip:e.skipAnimation,ref:e.ref})}const gw=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],yw=ht("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function gm(e){const{value:t,valueMin:r,valueMax:n,startAngle:a,endAngle:o,outerRadius:s,innerRadius:i,cornerRadius:l,cx:c,cy:u}=hc();if(t===null)return null;const d=a+(t-r)/(n-r)*(o-a);return g.jsx(ym,Y({},e,{cx:c,cy:u,startAngle:a,endAngle:d,cornerRadius:l,innerRadius:i,outerRadius:s}))}process.env.NODE_ENV!=="production"&&(gm.propTypes={skipAnimation:y.bool});function ym(e){let{cx:t,cy:r,startAngle:n,endAngle:a,cornerRadius:o,innerRadius:s,outerRadius:i,skipAnimation:l}=e,c=ir(e,gw);const u=pw(l),d=fw({startAngle:n,endAngle:a,cornerRadius:o,innerRadius:s,outerRadius:i,skipAnimation:u});return g.jsx(yw,Y({},d,{transform:`translate(${t}, ${r})`},c))}process.env.NODE_ENV!=="production"&&(ym.propTypes={cornerRadius:y.number.isRequired,cx:y.number.isRequired,cy:y.number.isRequired,endAngle:y.number.isRequired,innerRadius:y.number.isRequired,outerRadius:y.number.isRequired,skipAnimation:y.bool,startAngle:y.number.isRequired});const bw=ht("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function vw(e){const{startAngle:t,endAngle:r,outerRadius:n,innerRadius:a,cornerRadius:o,cx:s,cy:i}=hc();return g.jsx(bw,Y({transform:`translate(${s}, ${i})`,d:nm().cornerRadius(o)({startAngle:t,endAngle:r,innerRadius:a,outerRadius:n})},e))}function xw(e){return Sn("MuiGauge",e)}Rl("MuiGauge",["root","valueArc","referenceArc","valueText"]);function Sw(){return typeof window>"u"}const eo=new Map,Ow=2e3,ww={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Cw=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],hd="mui_measurement_span";function bm(e,t){return Cw.indexOf(e)>=0&&t===+t?`${t}px`:t}function vm(e){return e.split("").reduce((n,a)=>a===a.toUpperCase()?[...n,"-",a.toLowerCase()]:[...n,a],[]).join("")}const Pw=e=>Object.keys(e).sort().reduce((t,r)=>`${t}${vm(r)}:${bm(r,e[r])};`,"");let Si;const Tw=(e,t={})=>{if(e==null||Sw())return{width:0,height:0};const r=`${e}`,n=Pw(t),a=`${r}-${n}`,o=eo.get(a);if(o)return o;try{let s=document.getElementById(hd);s===null&&(s=document.createElement("span"),s.setAttribute("id",hd),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));const i=Y({},ww,t);Object.keys(i).map(u=>(s.style[vm(u)]=bm(u,i[u]),u)),s.textContent=r;const l=s.getBoundingClientRect(),c={width:l.width,height:l.height};return eo.set(a,c),eo.size+1>Ow&&eo.clear(),process.env.NODE_ENV==="test"?s.textContent="":(Si&&clearTimeout(Si),Si=setTimeout(()=>{s.textContent=""},0)),c}catch{return{width:0,height:0}}};function Rw({style:e,needsComputation:t,text:r}){return r.split(`
|
|
123
|
+
`).map(n=>Y({text:n},t?Tw(n,e):{width:0,height:0}))}function Aw(){const[e,t]=B.useState(typeof window<"u"||process.env.NODE_ENV==="test");return B.useEffect(()=>{t(!0)},[]),e}const _w=["x","y","style","text","ownerState"],Ew=["angle","textAnchor","dominantBaseline"];function xm(e){const{x:t,y:r,style:n,text:a}=e,o=ir(e,_w),s=n??{},{angle:i,textAnchor:l,dominantBaseline:c}=s,u=ir(s,Ew),d=Aw(),h=B.useMemo(()=>Rw({style:u,needsComputation:d&&a.includes(`
|
|
124
|
+
`),text:a}),[u,a,d]);let p;switch(c){case"hanging":case"text-before-edge":p=0;break;case"central":p=(h.length-1)/2*-h[0].height;break;default:p=(h.length-1)*-h[0].height;break}return g.jsx("text",Y({},o,{transform:i?`rotate(${i}, ${t}, ${r})`:void 0,x:t,y:r,textAnchor:l,dominantBaseline:c,style:u,children:h.map((f,m)=>g.jsx("tspan",{x:t,dy:`${m===0?p:h[0].height}px`,dominantBaseline:c,children:f.text},m))}))}process.env.NODE_ENV!=="production"&&(xm.propTypes={lineHeight:y.number,needsComputation:y.bool,ownerState:y.any,style:y.object,text:y.string.isRequired});const Vw=["text","className"];function Iw({value:e}){return e===null?null:e.toLocaleString()}function Sm(e){const{text:t=Iw,className:r}=e,n=ir(e,Vw),{value:a,valueMin:o,valueMax:s,cx:i,cy:l}=hc(),c=typeof t=="function"?t({value:a,valueMin:o,valueMax:s}):t;return c===null?null:g.jsx("g",{className:r,children:g.jsx(xm,Y({x:i,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},n))})}process.env.NODE_ENV!=="production"&&(Sm.propTypes={lineHeight:y.number,needsComputation:y.bool,ownerState:y.any,style:y.object,text:y.oneOfType([y.func,y.string])});const Mw=["text","children","classes","className","skipAnimation"],jw=e=>{const{classes:t}=e;return Xo({root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]},xw,t)},mc=B.forwardRef(function(t,r){const{text:n,children:a,className:o,skipAnimation:s}=t,i=ir(t,Mw),l=jw(t);return g.jsxs(pc,Y({},i,{className:Ct(l.root,o),ref:r,children:[g.jsx(vw,{className:l.referenceArc}),g.jsx(gm,{className:l.valueArc,skipAnimation:s}),g.jsx(Sm,{className:l.valueText,text:n}),a]}))});process.env.NODE_ENV!=="production"&&(mc.displayName="Gauge");process.env.NODE_ENV!=="production"&&(mc.propTypes={children:y.node,classes:y.object,className:y.string,cornerRadius:y.oneOfType([y.number,y.string]),cx:y.oneOfType([y.number,y.string]),cy:y.oneOfType([y.number,y.string]),desc:y.string,endAngle:y.number,height:y.number,id:y.string,innerRadius:y.oneOfType([y.number,y.string]),margin:y.oneOfType([y.number,y.shape({bottom:y.number,left:y.number,right:y.number,top:y.number})]),outerRadius:y.oneOfType([y.number,y.string]),skipAnimation:y.bool,startAngle:y.number,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),text:y.oneOfType([y.func,y.string]),title:y.string,value:y.number,valueMax:y.number,valueMin:y.number,width:y.number});const $w={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Geschwindigkeit","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Cartesian.MotionType.lb":"Bewegungstyp","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Gelenkwerte","Jogging.Increment.Continuous.dd":"Fortlaufend","Jogging.Cartesian.Orientation.lb":"Orientierung","Jogging.JointLimitsReached.lb":"Gelenkgrenzen für Gelenk {{jointNumbers}} erreicht","Jogging.Orientation.coordsys":"Roboterbasis","Jogging.Orientation.tool":"Werkzeug","SafetyBar.ActivationToggle.Activate.bt":"Aktivieren","SafetyBar.ActivationToggle.Activated.bt":"Aktiviert","SafetyBar.ActivationToggle.Activating.bt":"Wird aktiviert…","SafetyBar.ActivationToggle.Deactivating.bt":"Wird deaktiviert…","SafetyBar.ControllerType.Physical.lb":"Physisch","SafetyBar.ControllerType.Virtual.lb":"Virtuell","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> ist ein physische Robotersteuerung. Für die Bewegung dieses Roboters sind <strong>Sicherheitsmaßnahmen</strong> aktiv.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> ist eine virtuelle Robotersteuerung ohne physisches Gegenstück. Der Roboter kann ohne Sicherheitsmaßnahmen bewegt werden.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatischer Betriebsmodus der Robotersteuerung aktiv. Automatisierte Bewegung ohne manuelle Bestätigung freigegeben.","SafetyBar.OperationMode.Automatic.ti":"Automatisch","SafetyBar.OperationMode.Error.Explanation.lb":"Fehler beim Abrufen des Betriebsmodus. Originalhandbediengerät des Roboters verwenden, um Fehler zu lösen.","SafetyBar.OperationMode.Error.lb":"Fehler","SafetyBar.OperationMode.Manual.Explanation.lb":`Die Robotersteuerung befindet sich im manuellen Betriebsmodus.
|
|
125
|
+
Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabeschalter gedrückt werden muss, damit sich der Roboter erfolgreich bewegen kann.`,"SafetyBar.OperationMode.Manual.lb":"Manuell","SafetyBar.OperationMode.ti":"Betriebsmodus","SafetyBar.SafetyState.Error.Explanation.lb":"Die Robotersteuerung ist in einen unerwarteten Sicherheitszustand eingetreten.","SafetyBar.SafetyState.Error.lb":"Fehler","SafetyBar.SafetyState.Estop.lb":"NOT-AUS","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"Die Robotersteuerung ist in einen Sicherheitszustand eingetreten, der manuelle Maßnahmen zur Behebung erfordert.","SafetyBar.SafetyState.ManualActionRequired.lb":"Aktion erforderlich","SafetyBar.SafetyState.Normal.Explanation.lb":"Die Robotersteuerung befindet sich in einem sicheren Zustand. Roboterbewegungen sind möglich.","SafetyBar.SafetyState.Normal.lb":"Sicher","SafetyBar.SafetyState.Stop.Explanation.lb":"Die Robotersteuerung ist in einen Stoppzustand übergegangen. Bis der Stoppzustand aufgelöst ist, ist keine Bewegung mehr möglich.","SafetyBar.SafetyState.Stop.lb":"Stopp","SafetyBar.SafetyState.ti":"Sicherheitszustand","SafetyBar.StopState.Estop.Explanation.lb":"NOT-AUS aktiviert. NOT-AUS freischalten, um Roboter zu bewegen.","Jogging.Increment.hlb":"Schrittgröße","Jogging.CoordinateSystem.hlb":"Koordinatensystem","Jogging.Cartesian.bt":"Kartesisch","Jogging.Joints.bt":"Gelenke","Jogging.Velocity.bt":"Geschwindigkeit","CycleTimer.RemainingTime.lb":"Verbleibende Zeit","CycleTimer.OfTime.lb":"von {{time}} min.","CycleTimer.Time.lb":"{{time}} min.","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Weiter","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stopp","ProgramStateIndicator.Running.lb":"In Betrieb","ProgramStateIndicator.Error.lb":"Fehler","ProgramStateIndicator.EStop.lb":"Not-Aus","ProgramStateIndicator.Idle.lb":"Leerlauf","ProgramStateIndicator.Paused.lb":"Pausiert","ProgramStateIndicator.Ready.lb":"Bereit","ProgramStateIndicator.Stopped.lb":"Gestoppt","ProgramStateIndicator.Auto.lb":"Auto","ProgramStateIndicator.Manual.lb":"Manuell","ProgramStateIndicator.ManualT1.lb":"Manuell T1","ProgramStateIndicator.ManualT2.lb":"Manuell T2","RobotSetupReadinessIndicator.Ready.lb":"Bereit","RobotSetupReadinessIndicator.RobotDisconnected.lb":"Roboter getrennt","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Voraussetzung nicht erfüllt","RobotCard.Runtime.lb":"Laufzeit","RobotCard.DriveToHome.bt":"Zur Home-Position fahren"},kw={"Jogging.Cartesian.Translation.velocityMmPerSec.lb":"{{amount}} mm/s","Jogging.Cartesian.Rotation.velocityDegPerSec.lb":"{{amount}}°/s","Jogging.Velocity.lb":"Velocity","General.degree.variable":"{{amount}}°","General.mm.variable":"{{amount}} mm","Jogging.Cartesian.MotionType.lb":"Motion type","Jogging.Cartesian.Translation.bt":"Translation","Jogging.Cartesian.Rotation.bt":"Rotation","Jogging.Joints.JointValues.lb":"Joint values","Jogging.Increment.Continuous.dd":"Continuous","Jogging.Cartesian.Orientation.lb":"Orientation","Jogging.Activating.lb":"Activating jogging","Jogging.JointLimitsReached.lb":"Joint limit reached for joint {{jointNumbers}}","Jogging.Orientation.coordsys":"Robot base","Jogging.Orientation.tool":"Tool","SafetyBar.ActivationToggle.Activate.bt":"Activate","SafetyBar.ActivationToggle.Activated.bt":"Activated","SafetyBar.ActivationToggle.Activating.bt":"Activating","SafetyBar.ActivationToggle.Deactivating.bt":"Deactivating","SafetyBar.ControllerType.Physical.lb":"Physical","SafetyBar.ControllerType.Virtual.lb":"Virtual","SafetyBar.MotionGroup.Physical.Explanation.lb":"<code>{{motionGroupId}}</code> is a physical robot controller. <strong>Safety precautions</strong> are active for the movement of this robot.","SafetyBar.MotionGroup.Virtual.Explanation.lb":"<1>{{motionGroupId}}</1> is a virtual robot controller with no physical counterpart. It can be freely manipulated without safety precautions.","SafetyBar.OperationMode.Auto.Explanation.lb":"Automatic operation mode active. Automated movement without manual confirmation enabled.","SafetyBar.OperationMode.Automatic.ti":"Automatic","SafetyBar.OperationMode.Error.Explanation.lb":"Failed to get operation mode. Use the original control panel to resolve the error.","SafetyBar.OperationMode.Error.lb":"Error","SafetyBar.OperationMode.Manual.Explanation.lb":"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.","SafetyBar.OperationMode.Manual.lb":"Manual","SafetyBar.OperationMode.ti":"Operation mode","SafetyBar.SafetyState.Error.Explanation.lb":"The robot controller has entered an unexpected safety state.","SafetyBar.SafetyState.Error.lb":"Error","SafetyBar.SafetyState.Estop.lb":"E-Stop","SafetyBar.SafetyState.ManualActionRequired.Explanation.lb":"The robot controller has entered a safety state requiring manual action to resolve.","SafetyBar.SafetyState.ManualActionRequired.lb":"Action required","SafetyBar.SafetyState.Normal.Explanation.lb":"The robot controller is in a safe state. Robot movement is enabled.","SafetyBar.SafetyState.Normal.lb":"Safe","SafetyBar.SafetyState.Stop.Explanation.lb":"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved.","SafetyBar.SafetyState.Stop.lb":"Stop","SafetyBar.SafetyState.ti":"Safety state","SafetyBar.StopState.Estop.Explanation.lb":"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released.","Jogging.Increment.hlb":"Increment","Jogging.CoordinateSystem.hlb":"Coordinate system","Jogging.Cartesian.bt":"Cartesian","Jogging.Joints.bt":"Joints","Jogging.Velocity.bt":"Velocity","CycleTimer.RemainingTime.lb":"Time remaining","CycleTimer.OfTime.lb":"of {{time}} min.","CycleTimer.Time.lb":"{{time}} min.","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Resume","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stop","ProgramStateIndicator.Running.lb":"Running","ProgramStateIndicator.Error.lb":"Error","ProgramStateIndicator.EStop.lb":"E-Stop","ProgramStateIndicator.Idle.lb":"Idle","ProgramStateIndicator.Paused.lb":"Paused","ProgramStateIndicator.Ready.lb":"Ready","ProgramStateIndicator.Stopped.lb":"Stopped","ProgramStateIndicator.Auto.lb":"Auto","ProgramStateIndicator.Manual.lb":"Manual","ProgramStateIndicator.ManualT1.lb":"Manual T1","ProgramStateIndicator.ManualT2.lb":"Manual T2","RobotSetupReadinessIndicator.Ready.lb":"Ready","RobotSetupReadinessIndicator.RobotDisconnected.lb":"Robot disconnected","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Precondition not fulfilled","RobotCard.Runtime.lb":"Runtime","RobotCard.DriveToHome.bt":"Drive to Home"},fc=ug.createInstance();fc.use(dg).init({supportedLngs:["en","de"],resources:{en:{translations:kw},de:{translations:$w}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function pt(e){return r=>g.jsx(Uw,{children:g.jsx(e,{...r})})}const Uw=({children:e})=>g.jsx(Re.I18nextProvider,{i18n:fc,children:e});class gc{constructor(t=[],r={}){this.currentValues=[],this.targetValues=[],this.previousTargetValues=[],this.targetUpdateTime=0,this.animationId=null,this.updateCount=0,this.velocities=[],this.animate=()=>{this.update(.016666666666666666)?this.animationId=null:this.animationId=requestAnimationFrame(this.animate)},this.options={tension:120,friction:20,threshold:.001,onChange:()=>{},onComplete:()=>{},...r},this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0}update(t=1/60){let r=!1,n=!0;this.updateCount++;const a=Math.min(t,1/15),o=this.updateCount===1?.7:1;for(let s=0;s<this.currentValues.length;s++){const i=this.currentValues[s],l=this.targetValues[s],c=this.velocities[s],u=l-i,d=u*this.options.tension*o,h=c*this.options.friction,p=d-h,f=c+p*a,m=i+f*a;Math.abs(u)<this.options.threshold&&Math.abs(f)<this.options.threshold*10?this.currentValues[s]!==l&&(this.currentValues[s]=l,this.velocities[s]=0,r=!0):(n=!1,this.currentValues[s]=m,this.velocities[s]=f,r=!0)}return r&&this.options.onChange(this.currentValues),n&&this.options.onComplete(this.currentValues),n}setTarget(t){const r=performance.now(),n=r-this.targetUpdateTime;this.previousTargetValues=[...this.targetValues],this.targetValues=[...t],this.targetUpdateTime=r,this.updateCount=0;const a=this.previousTargetValues.every((o,s)=>o===this.currentValues[s]);if(n<8&&n>0&&this.previousTargetValues.length>0&&!a){const o=Math.min(n/8,1);for(let s=0;s<this.targetValues.length;s++){const i=this.previousTargetValues[s]||0,l=t[s]||0;Math.abs(l-i)>.1&&(this.targetValues[s]=i+(l-i)*o)}}for(;this.currentValues.length<t.length;)this.currentValues.push(t[this.currentValues.length]),this.velocities.push(0);this.currentValues.length>t.length&&(this.currentValues=this.currentValues.slice(0,t.length),this.velocities=this.velocities.slice(0,t.length))}getCurrentValues(){return[...this.currentValues]}getValue(t){return this.currentValues[t]??0}isInterpolating(){return this.animationId!==null}stop(){this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null)}setImmediate(t){this.stop(),this.currentValues=[...t],this.targetValues=[...t],this.previousTargetValues=[...t],this.velocities=new Array(t.length).fill(0),this.targetUpdateTime=performance.now(),this.updateCount=0,this.options.onChange(this.currentValues)}updateOptions(t){this.options={...this.options,...t}}startAutoInterpolation(){this.startInterpolation()}destroy(){this.stop()}startInterpolation(){this.animationId===null&&this.animate()}}function Om(e=[],t={}){const r=K.useRef(null);return r.current||(r.current=new gc(e,t)),K.useEffect(()=>{var n;(n=r.current)==null||n.updateOptions(t)},[t]),K.useEffect(()=>()=>{var n;(n=r.current)==null||n.destroy()},[]),[r.current]}const wm=pt(Te.observer(({onCycleComplete:e,onCycleEnd:t,autoStart:r=!0,variant:n="default",compact:a=!1,className:o})=>{var G;const s=F.useTheme(),{t:i}=Re.useTranslation(),[l,c]=K.useState(0),[u,d]=K.useState(0),[h,p]=K.useState(!1),[f,m]=K.useState(!1),[b,S]=K.useState(0),E=K.useRef(null),O=K.useRef(null),P=K.useRef(0),[C]=Om([0],{tension:80,friction:18,onChange:([A])=>{S(A)}}),w=K.useCallback((A,N=0)=>{d(A);const re=Math.max(0,A-N);c(re),m(!1),P.current=0;const ee=N>0?N/A*100:0;N===0?C.setTarget([0]):C.setTarget([ee]),re===0?(p(!1),O.current=null,t&&setTimeout(()=>t(),0)):r?(O.current=Date.now()-N*1e3,p(!0)):O.current=null},[r,t,C]),T=K.useCallback(()=>{if(O.current&&h){const N=Date.now()-O.current;P.current+=N;const re=P.current/1e3,ee=Math.min(100,re/u*100);C.setTarget([ee])}p(!1),m(!0)},[h,u,C]),V=K.useCallback(()=>{f&&l>0&&(O.current=Date.now(),p(!0),m(!1))},[f,l]),z=K.useCallback(()=>f,[f]);K.useEffect(()=>{let A=!0;const N=setTimeout(()=>{A&&e({startNewCycle:w,pause:T,resume:V,isPaused:z})},0);return()=>{A=!1,clearTimeout(N)}},[e,w,T,V,z]),K.useEffect(()=>{if(h){const A=()=>{if(O.current&&u>0){const re=(Date.now()-O.current+P.current)/1e3,ee=Math.max(0,u-re);c(Math.ceil(ee));const ae=Math.min(100,re/u*100);if(C.setTarget([ae]),ee<=0){p(!1),O.current=null,c(0),C.setTarget([100]),t&&setTimeout(()=>t(),0);return}h&&(E.current=requestAnimationFrame(A))}};E.current=requestAnimationFrame(A)}else E.current&&(cancelAnimationFrame(E.current),E.current=null);return()=>{E.current&&cancelAnimationFrame(E.current)}},[h,t,u,C]),K.useEffect(()=>{let A=null;const N=()=>{C.update(1/60),A=requestAnimationFrame(N)};return A=requestAnimationFrame(N),()=>{A&&cancelAnimationFrame(A)}},[C]),K.useEffect(()=>{if(!h&&!f&&u>0){const A=(u-l)/u*100;C.setTarget([A])}},[h,f,u,l,C]);const v=A=>{const N=Math.floor(A/60),re=A%60;return`${N}:${re.toString().padStart(2,"0")}`},R=b;return n==="small"?g.jsxs(F.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsx(F.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:f?.6:1,transition:"opacity 0.2s ease"},children:g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)"},role:"img","aria-label":"Timer progress",children:[g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:s.palette.success.main,strokeWidth:"2",opacity:.3}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:s.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-R/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out"}})]})}),g.jsx(F.Typography,{variant:"body2",sx:{color:s.palette.text.primary,fontSize:"14px"},children:a?`${v(l)} ${i("CycleTimer.Time.lb",{time:""}).replace(/\s*$/,"")}`:`${v(l)} / ${i("CycleTimer.Time.lb",{time:v(u)})}`})]}):g.jsxs(F.Box,{className:o,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(mc,{width:264,height:264,value:R,valueMin:0,valueMax:100,innerRadius:"71%",outerRadius:"90%",skipAnimation:!0,sx:{opacity:f?.6:1,transition:"opacity 0.2s ease","& .MuiGauge-valueArc":{fill:s.palette.success.main},"& .MuiGauge-referenceArc":{fill:"white",stroke:"transparent"}}}),g.jsxs(F.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:187,height:187,borderRadius:"50%",backgroundColor:(G=s.palette.backgroundPaperElevation)==null?void 0:G[8],display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1},children:[g.jsx(F.Typography,{variant:"body2",sx:{fontSize:"12px",color:s.palette.text.secondary,marginBottom:.5},children:i("CycleTimer.RemainingTime.lb")}),g.jsx(F.Typography,{variant:"h1",sx:{fontSize:"48px",fontWeight:500,color:s.palette.text.primary,lineHeight:1,marginBottom:.5},children:v(l)}),g.jsx(F.Typography,{variant:"body2",sx:{fontSize:"12px",color:s.palette.text.secondary},children:i("CycleTimer.OfTime.lb",{time:v(u)})})]})]})}));process.env.NODE_ENV!=="production"&&(y.node,y.object.isRequired);function yc(e){return a0(e)}const cn=y0({createStyledComponent:ht("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>yc({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(cn.propTypes={children:y.node,component:y.elementType,direction:y.oneOfType([y.oneOf(["column-reverse","column","row-reverse","row"]),y.arrayOf(y.oneOf(["column-reverse","column","row-reverse","row"])),y.object]),divider:y.node,spacing:y.oneOfType([y.arrayOf(y.oneOfType([y.number,y.string])),y.number,y.object,y.string]),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),useFlexGap:y.bool});const Dw=({title:e,titleId:t,...r},n)=>B.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.createElement("g",{id:"JogMinus"},B.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),Lw=K.forwardRef(Dw),Bw=({title:e,titleId:t,...r},n)=>B.createElement("svg",{width:21,height:21,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.createElement("g",{id:"JogPlus"},B.createElement("g",{id:"Plus"},B.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),B.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),B.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),Fw=K.forwardRef(Bw);function _s(e){K.useEffect(e,[])}function Cm(e){_s(()=>Be.autorun(e))}function Pm(e,t,r){_s(()=>Be.reaction(e,t,r))}function Pn(e){return _s(()=>{let t;function r(){e(),t=requestAnimationFrame(r)}return t=requestAnimationFrame(r),()=>{cancelAnimationFrame(t)}})}const rl=pt(Te.observer(({colors:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:a,disabled:o,activeJoggingDirection:s,...i})=>{var O,P,C,w,T,V,z;Pn(()=>{const v=r(),R=h.current;R&&(R.textContent=v)});const l=F.useTheme(),[c,u]=K.useState(null);K.useEffect(()=>{o&&E()},[o]);const d=s||c,h=K.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const p=d?(O=e.buttonBackgroundColor)==null?void 0:O.pressed:e.borderColor,f={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},m={...f,backgroundColor:(P=e.buttonBackgroundColor)==null?void 0:P.default,":hover":{backgroundColor:(C=e.buttonBackgroundColor)==null?void 0:C.hovered},":active":{backgroundColor:(w=e.buttonBackgroundColor)==null?void 0:w.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(T=e.buttonBackgroundColor)==null?void 0:T.disabled,"svg path":{fill:l.palette.action.disabled}}},b={...f,backgroundColor:(V=e.buttonBackgroundColor)==null?void 0:V.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(z=e.buttonBackgroundColor)==null?void 0:z.pressed,"svg path":{fill:l.palette.action.disabled}}};function S(v,R){o||v.button===0&&(u(R),n(R))}function E(){u(null),a()}return g.jsxs(cn,{height:"64px",direction:"row",justifyContent:"center",...i,children:[g.jsx(F.IconButton,{disabled:o,disableRipple:!0,onPointerDown:v=>S(v,"-"),onPointerUp:E,onPointerOut:E,size:"large",sx:{...d==="-"?b:m,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(Lw,{})}),g.jsxs(cn,{spacing:"6px",sx:{width:"150px",backgroundColor:e.backgroundColor,alignItems:"center",justifyContent:"center",opacity:"0.9",borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:[g.jsx(cn,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:e.color,".MuiTypography-root":{fontWeight:700,...o?{color:l.palette.action.disabled}:{}},...o?{"svg path":{fill:l.palette.action.disabled}}:{}},children:t}),g.jsx(F.Typography,{height:"22px",sx:{fontSize:"15px",color:o?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:r()})]}),g.jsx(F.IconButton,{disableRipple:!0,disabled:o,onPointerDown:v=>S(v,"+"),onPointerUp:E,onPointerOut:E,size:"large",sx:{...d==="+"?b:m,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(Fw,{})})]})})),$r=o0;function Nw(e){return Sn("MuiSvgIcon",e)}Rl("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const zw=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${Ze(t)}`,`fontSize${Ze(r)}`]};return Xo(a,Nw,n)},Gw=ht("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Ze(r.color)}`],t[`fontSize${Ze(r.fontSize)}`]]}})($r(({theme:e})=>{var t,r,n,a,o,s,i,l,c,u,d,h,p,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(a=(t=e.transitions)==null?void 0:t.create)==null?void 0:a.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:l.call(i,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var b,S;return{props:{color:m},style:{color:(S=(b=(e.vars??e).palette)==null?void 0:b[m])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(h=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(f=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:f.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Ho=B.forwardRef(function(t,r){const n=yc({props:t,name:"MuiSvgIcon"}),{children:a,className:o,color:s="inherit",component:i="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...p}=n,f=B.isValidElement(a)&&a.type==="svg",m={...n,color:s,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},b={};u||(b.viewBox=h);const S=zw(m);return g.jsxs(Gw,{as:i,className:Ct(S.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...b,...p,...f&&a.props,ownerState:m,children:[f?a.props.children:a,d?g.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Ho.propTypes={children:y.node,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),y.string]),component:y.elementType,fontSize:y.oneOfType([y.oneOf(["inherit","large","medium","small"]),y.string]),htmlColor:y.string,inheritViewBox:y.bool,shapeRendering:y.string,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),titleAccess:y.string,viewBox:y.string});Ho.muiName="SvgIcon";function pr(e,t){function r(n,a){return g.jsx(Ho,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:a,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Ho.muiName,B.memo(B.forwardRef(r))}function Hw(e){const{controlled:t,default:r,name:n,state:a="value"}=e,{current:o}=B.useRef(t!==void 0),[s,i]=B.useState(r),l=o?t:s;if(process.env.NODE_ENV!=="production"){B.useEffect(()=>{o!==(t!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${a} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
126
|
+
`))},[a,n,t]);const{current:u}=B.useRef(r);B.useEffect(()=>{!o&&!Object.is(u,r)&&console.error([`MUI: A component is changing the default ${a} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
127
|
+
`))},[JSON.stringify(r)])}const c=B.useCallback(u=>{o||i(u)},[]);return[l,c]}const qw=pr(g.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),Jw=pr(g.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function Tr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Tm=typeof global=="object"&&global&&global.Object===Object&&global,Ww=typeof self=="object"&&self&&self.Object===Object&&self,Ut=Tm||Ww||Function("return this")(),Oi=function(){return Ut.Date.now()},Yw=/\s/;function Kw(e){for(var t=e.length;t--&&Yw.test(e.charAt(t)););return t}var Qw=/^\s+/;function Xw(e){return e&&e.slice(0,Kw(e)+1).replace(Qw,"")}var ur=Ut.Symbol,Rm=Object.prototype,Zw=Rm.hasOwnProperty,eC=Rm.toString,Gn=ur?ur.toStringTag:void 0;function tC(e){var t=Zw.call(e,Gn),r=e[Gn];try{e[Gn]=void 0;var n=!0}catch{}var a=eC.call(e);return n&&(t?e[Gn]=r:delete e[Gn]),a}var rC=Object.prototype,nC=rC.toString;function aC(e){return nC.call(e)}var oC="[object Null]",sC="[object Undefined]",pd=ur?ur.toStringTag:void 0;function kr(e){return e==null?e===void 0?sC:oC:pd&&pd in Object(e)?tC(e):aC(e)}function Rr(e){return e!=null&&typeof e=="object"}var iC="[object Symbol]";function Es(e){return typeof e=="symbol"||Rr(e)&&kr(e)==iC}var md=NaN,lC=/^[-+]0x[0-9a-f]+$/i,cC=/^0b[01]+$/i,uC=/^0o[0-7]+$/i,dC=parseInt;function fd(e){if(typeof e=="number")return e;if(Es(e))return md;if(Tr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Tr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Xw(e);var r=cC.test(e);return r||uC.test(e)?dC(e.slice(2),r?2:8):lC.test(e)?md:+e}var hC="Expected a function",pC=Math.max,mC=Math.min;function fC(e,t,r){var n,a,o,s,i,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(hC);t=fd(t)||0,Tr(r)&&(u=!!r.leading,d="maxWait"in r,o=d?pC(fd(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(w){var T=n,V=a;return n=a=void 0,c=w,s=e.apply(V,T),s}function f(w){return c=w,i=setTimeout(S,t),u?p(w):s}function m(w){var T=w-l,V=w-c,z=t-T;return d?mC(z,o-V):z}function b(w){var T=w-l,V=w-c;return l===void 0||T>=t||T<0||d&&V>=o}function S(){var w=Oi();if(b(w))return E(w);i=setTimeout(S,m(w))}function E(w){return i=void 0,h&&n?p(w):(n=a=void 0,s)}function O(){i!==void 0&&clearTimeout(i),c=0,n=l=a=i=void 0}function P(){return i===void 0?s:E(Oi())}function C(){var w=Oi(),T=b(w);if(n=arguments,a=this,l=w,T){if(i===void 0)return f(l);if(d)return clearTimeout(i),i=setTimeout(S,t),p(l)}return i===void 0&&(i=setTimeout(S,t)),s}return C.cancel=O,C.flush=P,C}var gC="Expected a function";function yC(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(gC);return Tr(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),fC(e,t,{leading:n,maxWait:t,trailing:a})}const Am=pt(Te.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:a,disabled:o,...s})=>{var O,P,C,w,T,V,z,v,R,G,A,N,re,ee,ae;const{t:i}=Re.useTranslation(),[l,c]=K.useState(),u=F.useTheme(),d={background:(O=u.palette.backgroundPaperElevation)==null?void 0:O[4],color:(P=u.palette.backgroundPaperElevation)==null?void 0:P[11]},h=Te.useLocalObservable(()=>({activeJoggingDir:null,startJogging(te){this.activeJoggingDir=te,e(te)},stopJogging(){this.activeJoggingDir=null,t()}})),p=yC(()=>{c(a())},50);Pn(p);function f(te){te.button===0&&h.startJogging("-")}function m(te){te.button===0&&h.startJogging("+")}function b(te){h.stopJogging()}function S(te){h.stopJogging()}function E(te,se=1){if(te===void 0||isNaN(te))return"";const q=i("General.degree.variable",{amount:te.toFixed(se)});return te>0&&se===0?`+${q}`:q}return g.jsxs(cn,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...s,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(C=u.palette.backgroundPaperElevation)==null?void 0:C[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(w=u.palette.backgroundPaperElevation)==null?void 0:w[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(T=u.palette.backgroundPaperElevation)==null?void 0:T[9]},"&:active":{...d}}},children:[g.jsx(F.IconButton,{onPointerDown:f,onPointerUp:b,onPointerOut:S,disabled:o,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:g.jsx(qw,{sx:{pointerEvents:"none",color:(R=(v=(z=(V=u.componentsExt)==null?void 0:V.JoggingPanel)==null?void 0:z.JoggingJoint)==null?void 0:v.Joint)==null?void 0:R.arrowColor}})}),g.jsxs(cn,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(G=u.palette.backgroundPaperElevation)==null?void 0:G[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[g.jsx(F.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:o?u.palette.action.disabled:u.palette.text.primary},children:E(l)}),g.jsx(F.Slider,{disabled:!0,"aria-label":"Joint position",min:r,max:n,value:l||0,track:!1,sx:{"& .MuiSlider-mark":{display:"none"},"& .MuiSlider-thumb":{width:"5px",height:"12px",borderRadius:"2px",color:o?u.palette.action.disabled:u.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:o?u.palette.action.disabled:u.palette.text.secondary},"& .MuiSlider-rail":{backgroundColor:(A=u.palette.backgroundPaperElevation)==null?void 0:A[5],opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:E(r,0)},{value:n,label:E(n,0)}]})]}),g.jsx(F.IconButton,{onPointerDown:m,onPointerUp:b,onPointerOut:S,disabled:o,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:g.jsx(Jw,{sx:{pointerEvents:"none",color:(ae=(ee=(re=(N=u.componentsExt)==null?void 0:N.JoggingPanel)==null?void 0:re.JoggingJoint)==null?void 0:ee.Joint)==null?void 0:ae.arrowColor}})})]})})),bC=pr(g.jsx("path",{d:"M10 9h4V6h3l-5-5-5 5h3zm-1 1H6V7l-5 5 5 5v-3h3zm14 2-5-5v3h-3v4h3v3zm-9 3h-4v3H7l5 5 5-5h-3z"}),"OpenWith"),vC=pr(g.jsx("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92"}),"Share");function xC(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var _m=xC;function SC(){this.__data__=[],this.size=0}var OC=SC;function wC(e,t){return e===t||e!==e&&t!==t}var Em=wC;function CC(e,t){for(var r=e.length;r--;)if(Em(e[r][0],t))return r;return-1}var Vs=CC,PC=Array.prototype,TC=PC.splice;function RC(e){var t=this.__data__,r=Vs(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():TC.call(t,r,1),--this.size,!0}var AC=RC;function _C(e){var t=this.__data__,r=Vs(t,e);return r<0?void 0:t[r][1]}var EC=_C;function VC(e){return Vs(this.__data__,e)>-1}var IC=VC;function MC(e,t){var r=this.__data__,n=Vs(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var jC=MC;function Tn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Tn.prototype.clear=OC;Tn.prototype.delete=AC;Tn.prototype.get=EC;Tn.prototype.has=IC;Tn.prototype.set=jC;var Is=Tn;function $C(){this.__data__=new Is,this.size=0}var kC=$C;function UC(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var DC=UC;function LC(e){return this.__data__.get(e)}var BC=LC;function FC(e){return this.__data__.has(e)}var NC=FC,zC=typeof global=="object"&&global&&global.Object===Object&&global,Vm=zC,GC=typeof self=="object"&&self&&self.Object===Object&&self,HC=Vm||GC||Function("return this")(),Kt=HC,qC=Kt.Symbol,xn=qC,Im=Object.prototype,JC=Im.hasOwnProperty,WC=Im.toString,Hn=xn?xn.toStringTag:void 0;function YC(e){var t=JC.call(e,Hn),r=e[Hn];try{e[Hn]=void 0;var n=!0}catch{}var a=WC.call(e);return n&&(t?e[Hn]=r:delete e[Hn]),a}var KC=YC,QC=Object.prototype,XC=QC.toString;function ZC(e){return XC.call(e)}var eP=ZC,tP="[object Null]",rP="[object Undefined]",gd=xn?xn.toStringTag:void 0;function nP(e){return e==null?e===void 0?rP:tP:gd&&gd in Object(e)?KC(e):eP(e)}var Ia=nP,aP="[object AsyncFunction]",oP="[object Function]",sP="[object GeneratorFunction]",iP="[object Proxy]";function lP(e){if(!_m(e))return!1;var t=Ia(e);return t==oP||t==sP||t==aP||t==iP}var Mm=lP,cP=Kt["__core-js_shared__"],wi=cP,yd=function(){var e=/[^.]+$/.exec(wi&&wi.keys&&wi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function uP(e){return!!yd&&yd in e}var dP=uP,hP=Function.prototype,pP=hP.toString;function mP(e){if(e!=null){try{return pP.call(e)}catch{}try{return e+""}catch{}}return""}var Ur=mP,fP=/[\\^$.*+?()[\]{}|]/g,gP=/^\[object .+?Constructor\]$/,yP=Function.prototype,bP=Object.prototype,vP=yP.toString,xP=bP.hasOwnProperty,SP=RegExp("^"+vP.call(xP).replace(fP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function OP(e){if(!_m(e)||dP(e))return!1;var t=Mm(e)?SP:gP;return t.test(Ur(e))}var wP=OP;function CP(e,t){return e==null?void 0:e[t]}var PP=CP;function TP(e,t){var r=PP(e,t);return wP(r)?r:void 0}var Rn=TP,RP=Rn(Kt,"Map"),ba=RP,AP=Rn(Object,"create"),va=AP;function _P(){this.__data__=va?va(null):{},this.size=0}var EP=_P;function VP(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var IP=VP,MP="__lodash_hash_undefined__",jP=Object.prototype,$P=jP.hasOwnProperty;function kP(e){var t=this.__data__;if(va){var r=t[e];return r===MP?void 0:r}return $P.call(t,e)?t[e]:void 0}var UP=kP,DP=Object.prototype,LP=DP.hasOwnProperty;function BP(e){var t=this.__data__;return va?t[e]!==void 0:LP.call(t,e)}var FP=BP,NP="__lodash_hash_undefined__";function zP(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=va&&t===void 0?NP:t,this}var GP=zP;function An(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}An.prototype.clear=EP;An.prototype.delete=IP;An.prototype.get=UP;An.prototype.has=FP;An.prototype.set=GP;var bd=An;function HP(){this.size=0,this.__data__={hash:new bd,map:new(ba||Is),string:new bd}}var qP=HP;function JP(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var WP=JP;function YP(e,t){var r=e.__data__;return WP(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ms=YP;function KP(e){var t=Ms(this,e).delete(e);return this.size-=t?1:0,t}var QP=KP;function XP(e){return Ms(this,e).get(e)}var ZP=XP;function eT(e){return Ms(this,e).has(e)}var tT=eT;function rT(e,t){var r=Ms(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var nT=rT;function _n(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}_n.prototype.clear=qP;_n.prototype.delete=QP;_n.prototype.get=ZP;_n.prototype.has=tT;_n.prototype.set=nT;var jm=_n,aT=200;function oT(e,t){var r=this.__data__;if(r instanceof Is){var n=r.__data__;if(!ba||n.length<aT-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new jm(n)}return r.set(e,t),this.size=r.size,this}var sT=oT;function En(e){var t=this.__data__=new Is(e);this.size=t.size}En.prototype.clear=kC;En.prototype.delete=DC;En.prototype.get=BC;En.prototype.has=NC;En.prototype.set=sT;var Ci=En,iT="__lodash_hash_undefined__";function lT(e){return this.__data__.set(e,iT),this}var cT=lT;function uT(e){return this.__data__.has(e)}var dT=uT;function qo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new jm;++t<r;)this.add(e[t])}qo.prototype.add=qo.prototype.push=cT;qo.prototype.has=dT;var hT=qo;function pT(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var mT=pT;function fT(e,t){return e.has(t)}var gT=fT,yT=1,bT=2;function vT(e,t,r,n,a,o){var s=r&yT,i=e.length,l=t.length;if(i!=l&&!(s&&l>i))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&bT?new hT:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var b=s?n(m,f,d,t,e,o):n(f,m,d,e,t,o);if(b!==void 0){if(b)continue;h=!1;break}if(p){if(!mT(t,function(S,E){if(!gT(p,E)&&(f===S||a(f,S,r,n,o)))return p.push(E)})){h=!1;break}}else if(!(f===m||a(f,m,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}var $m=vT,xT=Kt.Uint8Array,vd=xT;function ST(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var OT=ST;function wT(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var CT=wT,PT=1,TT=2,RT="[object Boolean]",AT="[object Date]",_T="[object Error]",ET="[object Map]",VT="[object Number]",IT="[object RegExp]",MT="[object Set]",jT="[object String]",$T="[object Symbol]",kT="[object ArrayBuffer]",UT="[object DataView]",xd=xn?xn.prototype:void 0,Pi=xd?xd.valueOf:void 0;function DT(e,t,r,n,a,o,s){switch(r){case UT:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case kT:return!(e.byteLength!=t.byteLength||!o(new vd(e),new vd(t)));case RT:case AT:case VT:return Em(+e,+t);case _T:return e.name==t.name&&e.message==t.message;case IT:case jT:return e==t+"";case ET:var i=OT;case MT:var l=n&PT;if(i||(i=CT),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=TT,s.set(e,t);var u=$m(i(e),i(t),n,a,o,s);return s.delete(e),u;case $T:if(Pi)return Pi.call(e)==Pi.call(t)}return!1}var LT=DT;function BT(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var FT=BT,NT=Array.isArray,Jo=NT;function zT(e,t,r){var n=t(e);return Jo(e)?n:FT(n,r(e))}var GT=zT;function HT(e,t){for(var r=-1,n=e==null?0:e.length,a=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[a++]=s)}return o}var qT=HT;function JT(){return[]}var WT=JT,YT=Object.prototype,KT=YT.propertyIsEnumerable,Sd=Object.getOwnPropertySymbols,QT=Sd?function(e){return e==null?[]:(e=Object(e),qT(Sd(e),function(t){return KT.call(e,t)}))}:WT,XT=QT;function ZT(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var eR=ZT;function tR(e){return e!=null&&typeof e=="object"}var xa=tR,rR="[object Arguments]";function nR(e){return xa(e)&&Ia(e)==rR}var Od=nR,km=Object.prototype,aR=km.hasOwnProperty,oR=km.propertyIsEnumerable,sR=Od(function(){return arguments}())?Od:function(e){return xa(e)&&aR.call(e,"callee")&&!oR.call(e,"callee")},iR=sR;function lR(){return!1}var cR=lR,Um=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wd=Um&&typeof module=="object"&&module&&!module.nodeType&&module,uR=wd&&wd.exports===Um,Cd=uR?Kt.Buffer:void 0,dR=Cd?Cd.isBuffer:void 0,hR=dR||cR,nl=hR,pR=9007199254740991,mR=/^(?:0|[1-9]\d*)$/;function fR(e,t){var r=typeof e;return t=t??pR,!!t&&(r=="number"||r!="symbol"&&mR.test(e))&&e>-1&&e%1==0&&e<t}var gR=fR,yR=9007199254740991;function bR(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=yR}var Dm=bR,vR="[object Arguments]",xR="[object Array]",SR="[object Boolean]",OR="[object Date]",wR="[object Error]",CR="[object Function]",PR="[object Map]",TR="[object Number]",RR="[object Object]",AR="[object RegExp]",_R="[object Set]",ER="[object String]",VR="[object WeakMap]",IR="[object ArrayBuffer]",MR="[object DataView]",jR="[object Float32Array]",$R="[object Float64Array]",kR="[object Int8Array]",UR="[object Int16Array]",DR="[object Int32Array]",LR="[object Uint8Array]",BR="[object Uint8ClampedArray]",FR="[object Uint16Array]",NR="[object Uint32Array]",Ae={};Ae[jR]=Ae[$R]=Ae[kR]=Ae[UR]=Ae[DR]=Ae[LR]=Ae[BR]=Ae[FR]=Ae[NR]=!0;Ae[vR]=Ae[xR]=Ae[IR]=Ae[SR]=Ae[MR]=Ae[OR]=Ae[wR]=Ae[CR]=Ae[PR]=Ae[TR]=Ae[RR]=Ae[AR]=Ae[_R]=Ae[ER]=Ae[VR]=!1;function zR(e){return xa(e)&&Dm(e.length)&&!!Ae[Ia(e)]}var GR=zR;function HR(e){return function(t){return e(t)}}var qR=HR,Lm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sa=Lm&&typeof module=="object"&&module&&!module.nodeType&&module,JR=sa&&sa.exports===Lm,Ti=JR&&Vm.process,WR=function(){try{var e=sa&&sa.require&&sa.require("util").types;return e||Ti&&Ti.binding&&Ti.binding("util")}catch{}}(),Pd=WR,Td=Pd&&Pd.isTypedArray,YR=Td?qR(Td):GR,Bm=YR,KR=Object.prototype,QR=KR.hasOwnProperty;function XR(e,t){var r=Jo(e),n=!r&&iR(e),a=!r&&!n&&nl(e),o=!r&&!n&&!a&&Bm(e),s=r||n||a||o,i=s?eR(e.length,String):[],l=i.length;for(var c in e)(t||QR.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||gR(c,l)))&&i.push(c);return i}var ZR=XR,eA=Object.prototype;function tA(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||eA;return e===r}var rA=tA;function nA(e,t){return function(r){return e(t(r))}}var aA=nA,oA=aA(Object.keys,Object),sA=oA,iA=Object.prototype,lA=iA.hasOwnProperty;function cA(e){if(!rA(e))return sA(e);var t=[];for(var r in Object(e))lA.call(e,r)&&r!="constructor"&&t.push(r);return t}var uA=cA;function dA(e){return e!=null&&Dm(e.length)&&!Mm(e)}var hA=dA;function pA(e){return hA(e)?ZR(e):uA(e)}var mA=pA;function fA(e){return GT(e,mA,XT)}var Rd=fA,gA=1,yA=Object.prototype,bA=yA.hasOwnProperty;function vA(e,t,r,n,a,o){var s=r&gA,i=Rd(e),l=i.length,c=Rd(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:bA.call(t,h)))return!1}var p=o.get(e),f=o.get(t);if(p&&f)return p==t&&f==e;var m=!0;o.set(e,t),o.set(t,e);for(var b=s;++d<l;){h=i[d];var S=e[h],E=t[h];if(n)var O=s?n(E,S,h,t,e,o):n(S,E,h,e,t,o);if(!(O===void 0?S===E||a(S,E,r,n,o):O)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var P=e.constructor,C=t.constructor;P!=C&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof C=="function"&&C instanceof C)&&(m=!1)}return o.delete(e),o.delete(t),m}var xA=vA,SA=Rn(Kt,"DataView"),al=SA,OA=Rn(Kt,"Promise"),ol=OA,wA=Rn(Kt,"Set"),sl=wA,CA=Rn(Kt,"WeakMap"),il=CA,Ad="[object Map]",PA="[object Object]",_d="[object Promise]",Ed="[object Set]",Vd="[object WeakMap]",Id="[object DataView]",TA=Ur(al),RA=Ur(ba),AA=Ur(ol),_A=Ur(sl),EA=Ur(il),yr=Ia;(al&&yr(new al(new ArrayBuffer(1)))!=Id||ba&&yr(new ba)!=Ad||ol&&yr(ol.resolve())!=_d||sl&&yr(new sl)!=Ed||il&&yr(new il)!=Vd)&&(yr=function(e){var t=Ia(e),r=t==PA?e.constructor:void 0,n=r?Ur(r):"";if(n)switch(n){case TA:return Id;case RA:return Ad;case AA:return _d;case _A:return Ed;case EA:return Vd}return t});var Md=yr,VA=1,jd="[object Arguments]",$d="[object Array]",to="[object Object]",IA=Object.prototype,kd=IA.hasOwnProperty;function MA(e,t,r,n,a,o){var s=Jo(e),i=Jo(t),l=s?$d:Md(e),c=i?$d:Md(t);l=l==jd?to:l,c=c==jd?to:c;var u=l==to,d=c==to,h=l==c;if(h&&nl(e)){if(!nl(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new Ci),s||Bm(e)?$m(e,t,r,n,a,o):LT(e,t,l,r,n,a,o);if(!(r&VA)){var p=u&&kd.call(e,"__wrapped__"),f=d&&kd.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,b=f?t.value():t;return o||(o=new Ci),a(m,b,r,n,o)}}return h?(o||(o=new Ci),xA(e,t,r,n,a,o)):!1}var jA=MA;function Fm(e,t,r,n,a){return e===t?!0:e==null||t==null||!xa(e)&&!xa(t)?e!==e&&t!==t:jA(e,t,r,n,Fm,a)}var $A=Fm;function kA(e,t){return $A(e,t)}var UA=kA;/*! *****************************************************************************
|
|
128
128
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
129
129
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
130
130
|
this file except in compliance with the License. You may obtain a copy of the
|
|
@@ -137,19 +137,19 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
137
137
|
|
|
138
138
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
139
139
|
and limitations under the License.
|
|
140
|
-
***************************************************************************** */var
|
|
140
|
+
***************************************************************************** */var ll=function(e,t){return ll=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)n.hasOwnProperty(a)&&(r[a]=n[a])},ll(e,t)};function Nm(e,t){ll(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function DA(e){var t=typeof Symbol=="function"&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function LA(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,o=[],s;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)o.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function BA(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(LA(arguments[t]));return e}var zm=function(){function e(t,r){this.target=r,this.type=t}return e}(),FA=function(e){Nm(t,e);function t(r,n){var a=e.call(this,"error",n)||this;return a.message=r.message,a.error=r,a}return t}(zm),NA=function(e){Nm(t,e);function t(r,n,a){r===void 0&&(r=1e3),n===void 0&&(n="");var o=e.call(this,"close",a)||this;return o.wasClean=!0,o.code=r,o.reason=n,o}return t}(zm);/*!
|
|
141
141
|
* Reconnecting WebSocket
|
|
142
142
|
* by Pedro Ladaria <pedro.ladaria@gmail.com>
|
|
143
143
|
* https://github.com/pladaria/reconnecting-websocket
|
|
144
144
|
* License MIT
|
|
145
|
-
*/var XA=function(){if(typeof WebSocket<"u")return WebSocket},ZA=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},hr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},e_=function(){function e(t,r,n){var a=this;n===void 0&&(n={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(o){a._debug("open event");var s=a._options.minUptime,i=s===void 0?hr.minUptime:s;clearTimeout(a._connectTimeout),a._uptimeTimeout=setTimeout(function(){return a._acceptOpen()},i),a._ws.binaryType=a._binaryType,a._messageQueue.forEach(function(l){return a._ws.send(l)}),a._messageQueue=[],a.onopen&&a.onopen(o),a._listeners.open.forEach(function(l){return a._callEventListener(o,l)})},this._handleMessage=function(o){a._debug("message event"),a.onmessage&&a.onmessage(o),a._listeners.message.forEach(function(s){return a._callEventListener(o,s)})},this._handleError=function(o){a._debug("error event",o.message),a._disconnect(void 0,o.message==="TIMEOUT"?"timeout":void 0),a.onerror&&a.onerror(o),a._debug("exec error listeners"),a._listeners.error.forEach(function(s){return a._callEventListener(o,s)}),a._connect()},this._handleClose=function(o){a._debug("close event"),a._clearTimeouts(),a._shouldReconnect&&a._connect(),a.onclose&&a.onclose(o),a._listeners.close.forEach(function(s){return a._callEventListener(o,s)})},this._url=t,this._protocols=r,this._options=n,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(e,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CONNECTING",{get:function(){return e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OPEN",{get:function(){return e.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSING",{get:function(){return e.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSED",{get:function(){return e.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(t){this._binaryType=t,this._ws&&(this._ws.binaryType=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferedAmount",{get:function(){var t=this._messageQueue.reduce(function(r,n){return typeof n=="string"?r+=n.length:n instanceof Blob?r+=n.size:r+=n.byteLength,r},0);return t+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),e.prototype.close=function(t,r){if(t===void 0&&(t=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(t,r)},e.prototype.reconnect=function(t,r){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(t,r),this._connect())},e.prototype.send=function(t){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",t),this._ws.send(t);else{var r=this._options.maxEnqueuedMessages,n=r===void 0?hr.maxEnqueuedMessages:r;this._messageQueue.length<n&&(this._debug("enqueue",t),this._messageQueue.push(t))}},e.prototype.addEventListener=function(t,r){this._listeners[t]&&this._listeners[t].push(r)},e.prototype.dispatchEvent=function(t){var r,n,a=this._listeners[t.type];if(a)try{for(var o=JA(a),s=o.next();!s.done;s=o.next()){var i=s.value;this._callEventListener(t,i)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!0},e.prototype.removeEventListener=function(t,r){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(function(n){return n!==r}))},e.prototype._debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._options.debug&&console.log.apply(console,YA(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,r=t.reconnectionDelayGrowFactor,n=r===void 0?hr.reconnectionDelayGrowFactor:r,a=t.minReconnectionDelay,o=a===void 0?hr.minReconnectionDelay:a,s=t.maxReconnectionDelay,i=s===void 0?hr.maxReconnectionDelay:s,l=0;return this._retryCount>0&&(l=o*Math.pow(n,this._retryCount-1),l>i&&(l=i)),this._debug("next delay",l),l},e.prototype._wait=function(){var t=this;return new Promise(function(r){setTimeout(r,t._getNextDelay())})},e.prototype._getNextUrl=function(t){if(typeof t=="string")return Promise.resolve(t);if(typeof t=="function"){var r=t();if(typeof r=="string")return Promise.resolve(r);if(r.then)return r}throw Error("Invalid URL")},e.prototype._connect=function(){var t=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var r=this._options,n=r.maxRetries,a=n===void 0?hr.maxRetries:n,o=r.connectionTimeout,s=o===void 0?hr.connectionTimeout:o,i=r.WebSocket,l=i===void 0?XA():i;if(this._retryCount>=a){this._debug("max retries reached",this._retryCount,">=",a);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!ZA(l))throw Error("No valid WebSocket class provided");this._wait().then(function(){return t._getNextUrl(t._url)}).then(function(c){t._closeCalled||(t._debug("connect",{url:c,protocols:t._protocols}),t._ws=t._protocols?new l(c,t._protocols):new l(c),t._ws.binaryType=t._binaryType,t._connectLock=!1,t._addListeners(),t._connectTimeout=setTimeout(function(){return t._handleTimeout()},s))})}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new KA(Error("TIMEOUT"),this))},e.prototype._disconnect=function(t,r){if(t===void 0&&(t=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(t,r),this._handleClose(new QA(t,r,this))}catch{}}},e.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},e.prototype._callEventListener=function(t,r){"handleEvent"in r?r.handleEvent(t):r(t)},e.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},e.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},e.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},e}(),t_=Object.defineProperty,r_=Object.defineProperties,n_=Object.getOwnPropertyDescriptors,kd=Object.getOwnPropertySymbols,a_=Object.prototype.hasOwnProperty,o_=Object.prototype.propertyIsEnumerable,Ud=(e,t,r)=>t in e?t_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rn=(e,t)=>{for(var r in t||(t={}))a_.call(t,r)&&Ud(e,r,t[r]);if(kd)for(var r of kd(t))o_.call(t,r)&&Ud(e,r,t[r]);return e},il=(e,t)=>r_(e,n_(t)),Ee=(e,t,r)=>new Promise((n,a)=>{var o=l=>{try{i(r.next(l))}catch(c){a(c)}},s=l=>{try{i(r.throw(l))}catch(c){a(c)}},i=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,s);i((r=r.apply(e,t)).next())}),s_=class extends e_{constructor(e,t={}){console.log("Opening websocket to",e),super(()=>this.targetUrl||e,void 0,{startClosed:!0}),this.opts=t,this.disposed=!1,Object.defineProperty(this,"url",{get(){return this.targetUrl}}),this.targetUrl=e,this.addEventListener("open",()=>{console.log(`Websocket to ${this.url} opened`)}),this.addEventListener("message",n=>{this.receivedFirstMessage||(this.receivedFirstMessage=n)}),this.addEventListener("close",()=>{console.log(`Websocket to ${this.url} closed`)});const r=this.reconnect;this.reconnect=()=>{this.opts.mock?this.opts.mock.handleWebsocketConnection(this):r.apply(this)},this.reconnect()}changeUrl(e){this.receivedFirstMessage=void 0,this.targetUrl=e,this.reconnect()}sendJson(e){this.opts.mock?this.opts.mock.handleWebsocketMessage(this,JSON.stringify(e)):this.send(JSON.stringify(e))}dispose(){this.close(),this.disposed=!0,this.opts.onDispose&&this.opts.onDispose()}opened(){return Ee(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.OPEN?e():(this.addEventListener("open",()=>e()),this.addEventListener("error",t))})})}closed(){return Ee(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.CLOSED?e():(this.addEventListener("close",()=>e()),this.addEventListener("error",t))})})}firstMessage(){return Ee(this,null,function*(){return this.receivedFirstMessage?this.receivedFirstMessage:new Promise((e,t)=>{const r=a=>{this.receivedFirstMessage=a,this.removeEventListener("message",r),this.removeEventListener("error",n),e(a)},n=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(a)};this.addEventListener("message",r),this.addEventListener("error",n)})})}nextMessage(){return Ee(this,null,function*(){return new Promise((e,t)=>{const r=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),e(a)},n=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(a)};this.addEventListener("message",r),this.addEventListener("error",n)})})}},i_=class{constructor(){this.available=typeof window<"u"&&!!window.localStorage}getJSON(e){if(!this.available)return null;const t=window.localStorage.getItem(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}setJSON(e,t){if(!this.available)return null;window.localStorage.setItem(e,JSON.stringify(t))}delete(e){if(!this.available)return null;window.localStorage.removeItem(e)}setString(e,t){if(!this.available)return null;window.localStorage.setItem(e,t)}getString(e){return this.available?window.localStorage.getItem(e):null}},Pi=new i_;function ar(e){try{return JSON.parse(e)}catch{return}}function l_(e,t){return e||(e="world"),t||(t="world"),e===t}var ln="wandelbots.io",Ti={dev:{domain:`https://auth.portal.dev.${ln}`,clientId:"fLbJD0RLp5r2Dpucm5j8BjwMR6Hunfha"},stg:{domain:`https://auth.portal.stg.${ln}`,clientId:"joVDeD9e786WzFNSGCqoVq7HNkWt5j6s"},prod:{domain:`https://auth.portal.${ln}`,clientId:"J7WJUi38xVQdJAEBNRT9Xw1b0fXDb4J2"}},c_=e=>{if(e.includes(`dev.${ln}`))return Ti.dev;if(e.includes(`stg.${ln}`))return Ti.stg;if(e.includes(ln))return Ti.prod;throw new Error("Unsupported instance URL. Cannot determine Auth0 configuration.")},u_=e=>Ee(void 0,null,function*(){var t;if(typeof window>"u")throw new Error("Access token must be set to use NovaClient when not in a browser environment.");const r=c_(e);if(new URL(e).origin===window.location.origin)throw window.location.reload(),new Error("Failed to reload page to get auth details, please refresh manually");const{Auth0Client:n}=yield Promise.resolve().then(()=>require("./auth0-spa-js.production.esm-BLRAk7Yh.cjs")),a=new n({domain:r.domain,clientId:(t=r.clientId)!=null?t:"",useRefreshTokens:!1,authorizationParams:{audience:"nova-api",redirect_uri:window.location.origin}});if(window.location.search.includes("code=")&&window.location.search.includes("state=")){const{appState:s}=yield a.handleRedirectCallback();window.history.replaceState({},document.title,(s==null?void 0:s.returnTo)||window.location.pathname)}else yield a.loginWithRedirect();return yield a.getTokenSilently()});function Wm(e,t){return function(){return e.apply(t,arguments)}}const{toString:d_}=Object.prototype,{getPrototypeOf:gc}=Object,Vs=(e=>t=>{const r=d_.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Pt=e=>(e=e.toLowerCase(),t=>Vs(t)===e),Is=e=>t=>typeof t===e,{isArray:An}=Array,ya=Is("undefined");function h_(e){return e!==null&&!ya(e)&&e.constructor!==null&&!ya(e.constructor)&&dt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ym=Pt("ArrayBuffer");function p_(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ym(e.buffer),t}const m_=Is("string"),dt=Is("function"),Km=Is("number"),Ms=e=>e!==null&&typeof e=="object",f_=e=>e===!0||e===!1,vo=e=>{if(Vs(e)!=="object")return!1;const t=gc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},g_=Pt("Date"),y_=Pt("File"),b_=Pt("Blob"),v_=Pt("FileList"),x_=e=>Ms(e)&&dt(e.pipe),S_=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||dt(e.append)&&((t=Vs(e))==="formdata"||t==="object"&&dt(e.toString)&&e.toString()==="[object FormData]"))},O_=Pt("URLSearchParams"),[w_,C_,P_,T_]=["ReadableStream","Request","Response","Headers"].map(Pt),R_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Va(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),An(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(n=0;n<s;n++)i=o[n],t.call(null,e[i],i,e)}}function Qm(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}const yr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Xm=e=>!ya(e)&&e!==yr;function ll(){const{caseless:e}=Xm(this)&&this||{},t={},r=(n,a)=>{const o=e&&Qm(t,a)||a;vo(t[o])&&vo(n)?t[o]=ll(t[o],n):vo(n)?t[o]=ll({},n):An(n)?t[o]=n.slice():t[o]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&Va(arguments[n],r);return t}const A_=(e,t,r,{allOwnKeys:n}={})=>(Va(t,(a,o)=>{r&&dt(a)?e[o]=Wm(a,r):e[o]=a},{allOwnKeys:n}),e),__=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),E_=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},V_=(e,t,r,n)=>{let a,o,s;const i={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)s=a[o],(!n||n(s,e,t))&&!i[s]&&(t[s]=e[s],i[s]=!0);e=r!==!1&&gc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},I_=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},M_=e=>{if(!e)return null;if(An(e))return e;let t=e.length;if(!Km(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},j_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&gc(Uint8Array)),$_=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=n.next())&&!a.done;){const o=a.value;t.call(e,o[0],o[1])}},k_=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},U_=Pt("HTMLFormElement"),L_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),Ld=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),D_=Pt("RegExp"),Zm=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Va(r,(a,o)=>{let s;(s=t(a,o,e))!==!1&&(n[o]=s||a)}),Object.defineProperties(e,n)},F_=e=>{Zm(e,(t,r)=>{if(dt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(dt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},B_=(e,t)=>{const r={},n=a=>{a.forEach(o=>{r[o]=!0})};return An(e)?n(e):n(String(e).split(t)),r},N_=()=>{},z_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function G_(e){return!!(e&&dt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const H_=e=>{const t=new Array(10),r=(n,a)=>{if(Ms(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const o=An(n)?[]:{};return Va(n,(s,i)=>{const l=r(s,a+1);!ya(l)&&(o[i]=l)}),t[a]=void 0,o}}return n};return r(e,0)},q_=Pt("AsyncFunction"),J_=e=>e&&(Ms(e)||dt(e))&&dt(e.then)&&dt(e.catch),ef=((e,t)=>e?setImmediate:t?((r,n)=>(yr.addEventListener("message",({source:a,data:o})=>{a===yr&&o===r&&n.length&&n.shift()()},!1),a=>{n.push(a),yr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",dt(yr.postMessage)),W_=typeof queueMicrotask<"u"?queueMicrotask.bind(yr):typeof process<"u"&&process.nextTick||ef,H={isArray:An,isArrayBuffer:Ym,isBuffer:h_,isFormData:S_,isArrayBufferView:p_,isString:m_,isNumber:Km,isBoolean:f_,isObject:Ms,isPlainObject:vo,isReadableStream:w_,isRequest:C_,isResponse:P_,isHeaders:T_,isUndefined:ya,isDate:g_,isFile:y_,isBlob:b_,isRegExp:D_,isFunction:dt,isStream:x_,isURLSearchParams:O_,isTypedArray:j_,isFileList:v_,forEach:Va,merge:ll,extend:A_,trim:R_,stripBOM:__,inherits:E_,toFlatObject:V_,kindOf:Vs,kindOfTest:Pt,endsWith:I_,toArray:M_,forEachEntry:$_,matchAll:k_,isHTMLForm:U_,hasOwnProperty:Ld,hasOwnProp:Ld,reduceDescriptors:Zm,freezeMethods:F_,toObjectSet:B_,toCamelCase:L_,noop:N_,toFiniteNumber:z_,findKey:Qm,global:yr,isContextDefined:Xm,isSpecCompliantForm:G_,toJSONObject:H_,isAsyncFn:q_,isThenable:J_,setImmediate:ef,asap:W_};function de(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}H.inherits(de,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const tf=de.prototype,rf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{rf[e]={value:e}});Object.defineProperties(de,rf);Object.defineProperty(tf,"isAxiosError",{value:!0});de.from=(e,t,r,n,a,o)=>{const s=Object.create(tf);return H.toFlatObject(e,s,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),de.call(s,e.message,t,r,n,a),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const Y_=null;function cl(e){return H.isPlainObject(e)||H.isArray(e)}function nf(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function Dd(e,t,r){return e?e.concat(t).map(function(a,o){return a=nf(a),!r&&o?"["+a+"]":a}).join(r?".":""):t}function K_(e){return H.isArray(e)&&!e.some(cl)}const Q_=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function js(e,t,r){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!H.isUndefined(v[m])});const n=r.metaTokens,a=r.visitor||u,o=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(a))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(H.isDate(f))return f.toISOString();if(!l&&H.isBlob(f))throw new de("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(f)||H.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,v){let S=f;if(f&&!v&&typeof f=="object"){if(H.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(H.isArray(f)&&K_(f)||(H.isFileList(f)||H.endsWith(m,"[]"))&&(S=H.toArray(f)))return m=nf(m),S.forEach(function(O,w){!(H.isUndefined(O)||O===null)&&t.append(s===!0?Dd([m],w,o):s===null?m:m+"[]",c(O))}),!1}return cl(f)?!0:(t.append(Dd(v,m,o),c(f)),!1)}const d=[],h=Object.assign(Q_,{defaultVisitor:u,convertValue:c,isVisitable:cl});function p(f,m){if(!H.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),H.forEach(f,function(S,E){(!(H.isUndefined(S)||S===null)&&a.call(t,S,H.isString(E)?E.trim():E,m,h))===!0&&p(S,m?m.concat(E):[E])}),d.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Fd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function yc(e,t){this._pairs=[],e&&js(e,this,t)}const af=yc.prototype;af.append=function(t,r){this._pairs.push([t,r])};af.toString=function(t){const r=t?function(n){return t.call(this,n,Fd)}:Fd;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function X_(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function of(e,t,r){if(!t)return e;const n=r&&r.encode||X_;H.isFunction(r)&&(r={serialize:r});const a=r&&r.serialize;let o;if(a?o=a(t,r):o=H.isURLSearchParams(t)?t.toString():new yc(t,r).toString(n),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Bd{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){H.forEach(this.handlers,function(n){n!==null&&t(n)})}}const sf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z_=typeof URLSearchParams<"u"?URLSearchParams:yc,eE=typeof FormData<"u"?FormData:null,tE=typeof Blob<"u"?Blob:null,rE={isBrowser:!0,classes:{URLSearchParams:Z_,FormData:eE,Blob:tE},protocols:["http","https","file","blob","url","data"]},bc=typeof window<"u"&&typeof document<"u",ul=typeof navigator=="object"&&navigator||void 0,nE=bc&&(!ul||["ReactNative","NativeScript","NS"].indexOf(ul.product)<0),aE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",oE=bc&&window.location.href||"http://localhost",sE=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bc,hasStandardBrowserEnv:nE,hasStandardBrowserWebWorkerEnv:aE,navigator:ul,origin:oE},Symbol.toStringTag,{value:"Module"})),Qe={...sE,...rE};function iE(e,t){return js(e,new Qe.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,o){return Qe.isNode&&H.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function lE(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function cE(e){const t={},r=Object.keys(e);let n;const a=r.length;let o;for(n=0;n<a;n++)o=r[n],t[o]=e[o];return t}function lf(e){function t(r,n,a,o){let s=r[o++];if(s==="__proto__")return!0;const i=Number.isFinite(+s),l=o>=r.length;return s=!s&&H.isArray(a)?a.length:s,l?(H.hasOwnProp(a,s)?a[s]=[a[s],n]:a[s]=n,!i):((!a[s]||!H.isObject(a[s]))&&(a[s]=[]),t(r,n,a[s],o)&&H.isArray(a[s])&&(a[s]=cE(a[s])),!i)}if(H.isFormData(e)&&H.isFunction(e.entries)){const r={};return H.forEachEntry(e,(n,a)=>{t(lE(n),a,r,0)}),r}return null}function uE(e,t,r){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ia={transitional:sf,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,o=H.isObject(t);if(o&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return a?JSON.stringify(lf(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return iE(t,this.formSerializer).toString();if((i=H.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return js(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||a?(r.setContentType("application/json",!1),uE(t)):t}],transformResponse:[function(t){const r=this.transitional||Ia.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.isString(t)&&(n&&!this.responseType||a)){const s=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(i){if(s)throw i.name==="SyntaxError"?de.from(i,de.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qe.classes.FormData,Blob:Qe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{Ia.headers[e]={}});const dE=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hE=e=>{const t={};let r,n,a;return e&&e.split(`
|
|
146
|
-
`).forEach(function(s){a=s.indexOf(":"),r=s.substring(0,a).trim().toLowerCase(),n=s.substring(a+1).trim(),!(!r||t[r]&&
|
|
147
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[Nd]=this[Nd]={accessors:{}}).accessors,a=this.prototype;function o(s){const i=zn(s);n[i]||(gE(a,s),n[i]=!0)}return H.isArray(t)?t.forEach(o):o(t),this}};it.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(it.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});H.freezeMethods(it);function Ai(e,t){const r=this||Ia,n=t||r,a=it.from(n.headers);let o=n.data;return H.forEach(e,function(i){o=i.call(r,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function cf(e){return!!(e&&e.__CANCEL__)}function _n(e,t,r){de.call(this,e??"canceled",de.ERR_CANCELED,t,r),this.name="CanceledError"}H.inherits(_n,de,{__CANCEL__:!0});function uf(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new de("Request failed with status code "+r.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function yE(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function bE(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[o];s||(s=c),r[a]=l,n[a]=c;let d=o,h=0;for(;d!==a;)h+=r[d++],d=d%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),c-s<t)return;const p=u&&c-u;return p?Math.round(h*1e3/p):void 0}}function vE(e,t){let r=0,n=1e3/t,a,o;const s=(c,u=Date.now())=>{r=u,a=null,o&&(clearTimeout(o),o=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?s(c,u):(a=c,o||(o=setTimeout(()=>{o=null,s(a)},n-d)))},()=>a&&s(a)]}const Jo=(e,t,r=3)=>{let n=0;const a=bE(50,250);return vE(o=>{const s=o.loaded,i=o.lengthComputable?o.total:void 0,l=s-n,c=a(l),u=s<=i;n=s;const d={loaded:s,total:i,progress:i?s/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-s)/c:void 0,event:o,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},r)},zd=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Gd=e=>(...t)=>H.asap(()=>e(...t)),xE=Qe.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Qe.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Qe.origin),Qe.navigator&&/(msie|trident)/i.test(Qe.navigator.userAgent)):()=>!0,SE=Qe.hasStandardBrowserEnv?{write(e,t,r,n,a,o){const s=[e+"="+encodeURIComponent(t)];H.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),H.isString(n)&&s.push("path="+n),H.isString(a)&&s.push("domain="+a),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function OE(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function wE(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function df(e,t,r){let n=!OE(t);return e&&n||r==!1?wE(e,t):t}const Hd=e=>e instanceof it?{...e}:e;function Pr(e,t){t=t||{};const r={};function n(c,u,d,h){return H.isPlainObject(c)&&H.isPlainObject(u)?H.merge.call({caseless:h},c,u):H.isPlainObject(u)?H.merge({},u):H.isArray(u)?u.slice():u}function a(c,u,d,h){if(H.isUndefined(u)){if(!H.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function o(c,u){if(!H.isUndefined(u))return n(void 0,u)}function s(c,u){if(H.isUndefined(u)){if(!H.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function i(c,u,d){if(d in t)return n(c,u);if(d in e)return n(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(c,u,d)=>a(Hd(c),Hd(u),d,!0)};return H.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||a,h=d(e[u],t[u],u);H.isUndefined(h)&&d!==i||(r[u]=h)}),r}const hf=e=>{const t=Pr({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:o,headers:s,auth:i}=t;t.headers=s=it.from(s),t.url=of(df(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let l;if(H.isFormData(r)){if(Qe.hasStandardBrowserEnv||Qe.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Qe.hasStandardBrowserEnv&&(n&&H.isFunction(n)&&(n=n(t)),n||n!==!1&&xE(t.url))){const c=a&&o&&SE.read(o);c&&s.set(a,c)}return t},CE=typeof XMLHttpRequest<"u",PE=CE&&function(e){return new Promise(function(r,n){const a=hf(e);let o=a.data;const s=it.from(a.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=a,u,d,h,p,f;function m(){p&&p(),f&&f(),a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout;function S(){if(!v)return;const O=it.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!i||i==="text"||i==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:O,config:e,request:v};uf(function(A){r(A),m()},function(A){n(A),m()},T),v=null}"onloadend"in v?v.onloadend=S:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(S)},v.onabort=function(){v&&(n(new de("Request aborted",de.ECONNABORTED,e,v)),v=null)},v.onerror=function(){n(new de("Network Error",de.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const T=a.transitional||sf;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),n(new de(w,T.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,v)),v=null},o===void 0&&s.setContentType(null),"setRequestHeader"in v&&H.forEach(s.toJSON(),function(w,T){v.setRequestHeader(T,w)}),H.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),i&&i!=="json"&&(v.responseType=a.responseType),c&&([h,f]=Jo(c,!0),v.addEventListener("progress",h)),l&&v.upload&&([d,p]=Jo(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(u=O=>{v&&(n(!O||O.type?new _n(null,e,v):O),v.abort(),v=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const E=yE(a.url);if(E&&Qe.protocols.indexOf(E)===-1){n(new de("Unsupported protocol "+E+":",de.ERR_BAD_REQUEST,e));return}v.send(o||null)})},TE=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,a;const o=function(c){if(!a){a=!0,i();const u=c instanceof Error?c:this.reason;n.abort(u instanceof de?u:new _n(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,o(new de(`timeout ${t} of ms exceeded`,de.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:l}=n;return l.unsubscribe=()=>H.asap(i),l}},RE=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,a;for(;n<r;)a=n+t,yield e.slice(n,a),n=a},AE=async function*(e,t){for await(const r of _E(e))yield*RE(r,t)},_E=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},qd=(e,t,r,n)=>{const a=AE(e,t);let o=0,s,i=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await a.next();if(c){i(),l.close();return}let d=u.byteLength;if(r){let h=o+=d;r(h)}l.enqueue(new Uint8Array(u))}catch(c){throw i(c),c}},cancel(l){return i(l),a.return()}},{highWaterMark:2})},$s=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",pf=$s&&typeof ReadableStream=="function",EE=$s&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),mf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},VE=pf&&mf(()=>{let e=!1;const t=new Request(Qe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Jd=64*1024,dl=pf&&mf(()=>H.isReadableStream(new Response("").body)),Wo={stream:dl&&(e=>e.body)};$s&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Wo[t]&&(Wo[t]=H.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new de(`Response type '${t}' is not supported`,de.ERR_NOT_SUPPORT,n)})})})(new Response);const IE=async e=>{if(e==null)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e))return(await new Request(Qe.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(H.isArrayBufferView(e)||H.isArrayBuffer(e))return e.byteLength;if(H.isURLSearchParams(e)&&(e=e+""),H.isString(e))return(await EE(e)).byteLength},ME=async(e,t)=>{const r=H.toFiniteNumber(e.getContentLength());return r??IE(t)},jE=$s&&(async e=>{let{url:t,method:r,data:n,signal:a,cancelToken:o,timeout:s,onDownloadProgress:i,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=hf(e);c=c?(c+"").toLowerCase():"text";let p=TE([a,o&&o.toAbortSignal()],s),f;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let v;try{if(l&&VE&&r!=="get"&&r!=="head"&&(v=await ME(u,n))!==0){let T=new Request(t,{method:"POST",body:n,duplex:"half"}),C;if(H.isFormData(n)&&(C=T.headers.get("content-type"))&&u.setContentType(C),T.body){const[A,V]=zd(v,Jo(Gd(l)));n=qd(T.body,Jd,A,V)}}H.isString(d)||(d=d?"include":"omit");const S="credentials"in Request.prototype;f=new Request(t,{...h,signal:p,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:S?d:void 0});let E=await fetch(f);const O=dl&&(c==="stream"||c==="response");if(dl&&(i||O&&m)){const T={};["status","statusText","headers"].forEach(B=>{T[B]=E[B]});const C=H.toFiniteNumber(E.headers.get("content-length")),[A,V]=i&&zd(C,Jo(Gd(i),!0))||[];E=new Response(qd(E.body,Jd,A,()=>{V&&V(),m&&m()}),T)}c=c||"text";let w=await Wo[H.findKey(Wo,c)||"text"](E,e);return!O&&m&&m(),await new Promise((T,C)=>{uf(T,C,{data:w,headers:it.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:f})})}catch(S){throw m&&m(),S&&S.name==="TypeError"&&/fetch/i.test(S.message)?Object.assign(new de("Network Error",de.ERR_NETWORK,e,f),{cause:S.cause||S}):de.from(S,S&&S.code,e,f)}}),hl={http:Y_,xhr:PE,fetch:jE};H.forEach(hl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Wd=e=>`- ${e}`,$E=e=>H.isFunction(e)||e===null||e===!1,ff={getAdapter:e=>{e=H.isArray(e)?e:[e];const{length:t}=e;let r,n;const a={};for(let o=0;o<t;o++){r=e[o];let s;if(n=r,!$E(r)&&(n=hl[(s=String(r)).toLowerCase()],n===void 0))throw new de(`Unknown adapter '${s}'`);if(n)break;a[s||"#"+o]=n}if(!n){const o=Object.entries(a).map(([i,l])=>`adapter ${i} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?o.length>1?`since :
|
|
148
|
-
`+o.map(
|
|
149
|
-
`):" "+
|
|
150
|
-
`+o):n.stack=o}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Pr(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:o}=r;n!==void 0&&So.assertOptions(n,{silentJSONParsing:At.transitional(At.boolean),forcedJSONParsing:At.transitional(At.boolean),clarifyTimeoutError:At.transitional(At.boolean)},!1),a!=null&&(H.isFunction(a)?r.paramsSerializer={serialize:a}:So.assertOptions(a,{encode:At.function,serialize:At.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),So.assertOptions(r,{baseUrl:At.spelling("baseURL"),withXsrfToken:At.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=o&&H.merge(o.common,o[r.method]);o&&H.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),r.headers=it.concat(s,o);const i=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,i.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const f=[Yd.bind(this),void 0];for(f.unshift.apply(f,i),f.push.apply(f,c),h=f.length,u=Promise.resolve(r);d<h;)u=u.then(f[d++],f[d++]);return u}h=i.length;let p=r;for(d=0;d<h;){const f=i[d++],m=i[d++];try{p=f(p)}catch(v){m.call(this,v);break}}try{u=Yd.call(this,p)}catch(f){return Promise.reject(f)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Pr(this.defaults,t);const r=df(t.baseURL,t.url,t.allowAbsoluteUrls);return of(r,t.params,t.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(t){xr.prototype[t]=function(r,n){return this.request(Pr(n||{},{method:t,url:r,data:(n||{}).data}))}});H.forEach(["post","put","patch"],function(t){function r(n){return function(o,s,i){return this.request(Pr(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}xr.prototype[t]=r(),xr.prototype[t+"Form"]=r(!0)});let UE=class yf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(a=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](a);n._listeners=null}),this.promise.then=a=>{let o;const s=new Promise(i=>{n.subscribe(i),o=i}).then(a);return s.cancel=function(){n.unsubscribe(o)},s},t(function(o,s,i){n.reason||(n.reason=new _n(o,s,i),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new yf(function(a){t=a}),cancel:t}}};function LE(e){return function(r){return e.apply(null,r)}}function DE(e){return H.isObject(e)&&e.isAxiosError===!0}const pl={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(pl).forEach(([e,t])=>{pl[t]=e});function bf(e){const t=new xr(e),r=Wm(xr.prototype.request,t);return H.extend(r,xr.prototype,t,{allOwnKeys:!0}),H.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return bf(Pr(e,a))},r}const _=bf(Ia);_.Axios=xr;_.CanceledError=_n;_.CancelToken=UE;_.isCancel=cf;_.VERSION=gf;_.toFormData=js;_.AxiosError=de;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=LE;_.isAxiosError=DE;_.mergeConfig=Pr;_.AxiosHeaders=it;_.formToJSON=e=>lf(H.isHTMLForm(e)?new FormData(e):e);_.getAdapter=ff.getAdapter;_.HttpStatusCode=pl;_.default=_;const{Axios:aj,AxiosError:ml,CanceledError:oj,isCancel:sj,CancelToken:ij,VERSION:lj,all:cj,Cancel:uj,isAxiosError:FE,spread:dj,toFormData:hj,AxiosHeaders:pj,HttpStatusCode:mj,formToJSON:fj,getAdapter:gj,mergeConfig:yj}=_,M="/api/v1".replace(/\/+$/,"");class Ve{constructor(t,r=M,n=_){Vn(this,"basePath");Vn(this,"axios");Vn(this,"configuration");this.basePath=r,this.axios=n,t&&(this.configuration=t,this.basePath=t.basePath??r)}}class BE extends Error{constructor(r,n){super(n);Vn(this,"field");this.field=r,this.name="RequiredError"}}const j={},$="https://example.com",x=function(e,t,r){if(r==null)throw new BE(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},k=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},U=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 fl(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>fl(e,n,r)):Object.keys(t).forEach(n=>fl(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t))}const L=function(e,...t){const r=new URLSearchParams(e.search);fl(r,t),e.search=r.toString()},ue=function(e,t,r){const n=typeof e!="string";return(n&&r&&r.isJsonMime?r.isJsonMime(t.headers["Content-Type"]):n)?JSON.stringify(e!==void 0?e:{}):e||""},D=function(e){return e.pathname+e.search+e.hash},F=function(e,t,r,n){return(a=t,o=r)=>{const s={...e.options,url:(a.defaults.baseURL?"":(n==null?void 0:n.basePath)??o)+e.url};return a.request(s)}},NE=function(e){return{addApp:async(t,r,n,a={})=>{x("addApp","cell",t),x("addApp","app",r);const o="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(r,l,e),{url:D(s),options:l}},clearApps:async(t,r,n={})=>{x("clearApps","cell",t);const a="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),r!==void 0&&(c.completionTimeout=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deleteApp:async(t,r,n,a={})=>{x("deleteApp","cell",t),x("deleteApp","app",r);const o="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.completionTimeout=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},getApp:async(t,r,n={})=>{x("getApp","cell",t),x("getApp","app",r);const a="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listApps:async(t,r={})=>{x("listApps","cell",t);const n="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},updateApp:async(t,r,n,a,o={})=>{x("updateApp","cell",t),x("updateApp","app",r),x("updateApp","app2",n);const s="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};k(c,e),await U(u,e),a!==void 0&&(d.completionTimeout=a),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=ue(n,c,e),{url:D(i),options:c}}}},qr=function(e){const t=NE(e);return{async addApp(r,n,a,o){var c,u;const s=await t.addApp(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async clearApps(r,n,a){var l,c;const o=await t.clearApps(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ApplicationApi.clearApps"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async deleteApp(r,n,a,o){var c,u;const s=await t.deleteApp(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async getApp(r,n,a){var l,c;const o=await t.getApp(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ApplicationApi.getApp"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async listApps(r,n){var i,l;const a=await t.listApps(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["ApplicationApi.listApps"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async updateApp(r,n,a,o,s){var u,d;const i=await t.updateApp(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=j["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,M,e)(h,c||p)}}};class Qd extends Ve{addApp(t,r,n,a){return qr(this.configuration).addApp(t,r,n,a).then(o=>o(this.axios,this.basePath))}clearApps(t,r,n){return qr(this.configuration).clearApps(t,r,n).then(a=>a(this.axios,this.basePath))}deleteApp(t,r,n,a){return qr(this.configuration).deleteApp(t,r,n,a).then(o=>o(this.axios,this.basePath))}getApp(t,r,n){return qr(this.configuration).getApp(t,r,n).then(a=>a(this.axios,this.basePath))}listApps(t,r){return qr(this.configuration).listApps(t,r).then(n=>n(this.axios,this.basePath))}updateApp(t,r,n,a,o){return qr(this.configuration).updateApp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const zE=function(e){return{deleteCell:async(t,r,n={})=>{x("deleteCell","cell",t);const a="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),r!==void 0&&(c.completionTimeout=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deployCell:async(t,r,n={})=>{x("deployCell","cell",t);const a="/cells",o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};k(i,e),await U(l,e),r!==void 0&&(c.completionTimeout=r),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(t,i,e),{url:D(o),options:i}},getCell:async(t,r={})=>{x("getCell","cell",t);const n="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},getCellStatus:async(t,r={})=>{x("getCellStatus","cell",t);const n="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},listCells:async(t={})=>{const r="/cells",n=new URL(r,$);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};k(o,e),await U(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:D(n),options:o}},updateCell:async(t,r,n,a={})=>{x("updateCell","cell",t),x("updateCell","cell2",r);const o="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(r,l,e),{url:D(s),options:l}}}},Jr=function(e){const t=zE(e);return{async deleteCell(r,n,a){var l,c;const o=await t.deleteCell(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["CellApi.deleteCell"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async deployCell(r,n,a){var l,c;const o=await t.deployCell(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["CellApi.deployCell"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getCell(r,n){var i,l;const a=await t.getCell(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["CellApi.getCell"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async getCellStatus(r,n){var i,l;const a=await t.getCellStatus(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["CellApi.getCellStatus"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async listCells(r){var s,i;const n=await t.listCells(r),a=(e==null?void 0:e.serverIndex)??0,o=(i=(s=j["CellApi.listCells"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>F(n,_,M,e)(l,o||c)},async updateCell(r,n,a,o){var c,u;const s=await t.updateCell(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)}}};class GE extends Ve{deleteCell(t,r,n){return Jr(this.configuration).deleteCell(t,r,n).then(a=>a(this.axios,this.basePath))}deployCell(t,r,n){return Jr(this.configuration).deployCell(t,r,n).then(a=>a(this.axios,this.basePath))}getCell(t,r){return Jr(this.configuration).getCell(t,r).then(n=>n(this.axios,this.basePath))}getCellStatus(t,r){return Jr(this.configuration).getCellStatus(t,r).then(n=>n(this.axios,this.basePath))}listCells(t){return Jr(this.configuration).listCells(t).then(r=>r(this.axios,this.basePath))}updateCell(t,r,n,a){return Jr(this.configuration).updateCell(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const HE=function(e){return{addRobotController:async(t,r,n,a={})=>{x("addRobotController","cell",t),x("addRobotController","robotController",r);const o="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(r,l,e),{url:D(s),options:l}},clearRobotControllers:async(t,r,n={})=>{x("clearRobotControllers","cell",t);const a="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),r!==void 0&&(c.completionTimeout=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deleteRobotController:async(t,r,n,a={})=>{x("deleteRobotController","cell",t),x("deleteRobotController","controller",r);const o="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.completionTimeout=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},getCurrentRobotControllerState:async(t,r,n={})=>{x("getCurrentRobotControllerState","cell",t),x("getCurrentRobotControllerState","controller",r);const a="/cells/{cell}/controllers/{controller}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getMode:async(t,r,n={})=>{x("getMode","cell",t),x("getMode","controller",r);const a="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getRobotController:async(t,r,n={})=>{x("getRobotController","cell",t),x("getRobotController","controller",r);const a="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getSupportedModes:async(t,r,n={})=>{x("getSupportedModes","cell",t),x("getSupportedModes","controller",r);const a="/cells/{cell}/controllers/{controller}/controller-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getVirtualRobotConfiguration:async(t,r,n={})=>{x("getVirtualRobotConfiguration","cell",t),x("getVirtualRobotConfiguration","controller",r);const a="/cells/{cell}/controllers/{controller}/virtual-robot-configuration".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listControllers:async(t,r={})=>{x("listControllers","cell",t);const n="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},setDefaultMode:async(t,r,n,a={})=>{x("setDefaultMode","cell",t),x("setDefaultMode","controller",r),x("setDefaultMode","mode",n);const o="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.mode=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},streamFreeDrive:async(t,r,n,a={})=>{x("streamFreeDrive","cell",t),x("streamFreeDrive","controller",r);const o="/cells/{cell}/controllers/{controller}/free-drive-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.response_rate=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},streamModeChange:async(t,r,n={})=>{x("streamModeChange","cell",t),x("streamModeChange","controller",r);const a="/cells/{cell}/controllers/{controller}/mode-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},streamRobotControllerState:async(t,r,n,a={})=>{x("streamRobotControllerState","cell",t),x("streamRobotControllerState","controller",r);const o="/cells/{cell}/controllers/{controller}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.response_rate=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},updateRobotController:async(t,r,n,a,o={})=>{x("updateRobotController","cell",t),x("updateRobotController","controller",r),x("updateRobotController","robotController",n);const s="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};k(c,e),await U(u,e),a!==void 0&&(d.completionTimeout=a),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=ue(n,c,e),{url:D(i),options:c}}}},rt=function(e){const t=HE(e);return{async addRobotController(r,n,a,o){var c,u;const s=await t.addRobotController(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async clearRobotControllers(r,n,a){var l,c;const o=await t.clearRobotControllers(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ControllerApi.clearRobotControllers"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async deleteRobotController(r,n,a,o){var c,u;const s=await t.deleteRobotController(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async getCurrentRobotControllerState(r,n,a){var l,c;const o=await t.getCurrentRobotControllerState(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getMode(r,n,a){var l,c;const o=await t.getMode(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ControllerApi.getMode"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getRobotController(r,n,a){var l,c;const o=await t.getRobotController(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ControllerApi.getRobotController"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getSupportedModes(r,n,a){var l,c;const o=await t.getSupportedModes(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ControllerApi.getSupportedModes"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getVirtualRobotConfiguration(r,n,a){var l,c;const o=await t.getVirtualRobotConfiguration(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ControllerApi.getVirtualRobotConfiguration"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async listControllers(r,n){var i,l;const a=await t.listControllers(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["ControllerApi.listControllers"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async setDefaultMode(r,n,a,o){var c,u;const s=await t.setDefaultMode(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async streamFreeDrive(r,n,a,o){var c,u;const s=await t.streamFreeDrive(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async streamModeChange(r,n,a){var l,c;const o=await t.streamModeChange(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ControllerApi.streamModeChange"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async streamRobotControllerState(r,n,a,o){var c,u;const s=await t.streamRobotControllerState(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["ControllerApi.streamRobotControllerState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async updateRobotController(r,n,a,o,s){var u,d;const i=await t.updateRobotController(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=j["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,M,e)(h,c||p)}}};class qE extends Ve{addRobotController(t,r,n,a){return rt(this.configuration).addRobotController(t,r,n,a).then(o=>o(this.axios,this.basePath))}clearRobotControllers(t,r,n){return rt(this.configuration).clearRobotControllers(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRobotController(t,r,n,a){return rt(this.configuration).deleteRobotController(t,r,n,a).then(o=>o(this.axios,this.basePath))}getCurrentRobotControllerState(t,r,n){return rt(this.configuration).getCurrentRobotControllerState(t,r,n).then(a=>a(this.axios,this.basePath))}getMode(t,r,n){return rt(this.configuration).getMode(t,r,n).then(a=>a(this.axios,this.basePath))}getRobotController(t,r,n){return rt(this.configuration).getRobotController(t,r,n).then(a=>a(this.axios,this.basePath))}getSupportedModes(t,r,n){return rt(this.configuration).getSupportedModes(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotConfiguration(t,r,n){return rt(this.configuration).getVirtualRobotConfiguration(t,r,n).then(a=>a(this.axios,this.basePath))}listControllers(t,r){return rt(this.configuration).listControllers(t,r).then(n=>n(this.axios,this.basePath))}setDefaultMode(t,r,n,a){return rt(this.configuration).setDefaultMode(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamFreeDrive(t,r,n,a){return rt(this.configuration).streamFreeDrive(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamModeChange(t,r,n){return rt(this.configuration).streamModeChange(t,r,n).then(a=>a(this.axios,this.basePath))}streamRobotControllerState(t,r,n,a){return rt(this.configuration).streamRobotControllerState(t,r,n,a).then(o=>o(this.axios,this.basePath))}updateRobotController(t,r,n,a,o){return rt(this.configuration).updateRobotController(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const JE=function(e){return{listIODescriptions:async(t,r,n,a={})=>{x("listIODescriptions","cell",t),x("listIODescriptions","controller",r);const o="/cells/{cell}/controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},listIOValues:async(t,r,n,a={})=>{x("listIOValues","cell",t),x("listIOValues","controller",r);const o="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},setOutputValues:async(t,r,n,a={})=>{x("setOutputValues","cell",t),x("setOutputValues","controller",r),x("setOutputValues","iOValue",n);const o="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}},streamIOValues:async(t,r,n,a={})=>{x("streamIOValues","cell",t),x("streamIOValues","controller",r);const o="/cells/{cell}/controllers/{controller}/ios/stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},waitForIOEvent:async(t,r,n,a,o,s,i,l={})=>{x("waitForIOEvent","cell",t),x("waitForIOEvent","controller",r),x("waitForIOEvent","io",n),x("waitForIOEvent","comparisonType",a);const c="/cells/{cell}/controllers/{controller}/ios/wait-for".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),u=new URL(c,$);let d;e&&(d=e.baseOptions);const h={method:"GET",...d,...l},p={},f={};k(h,e),await U(p,e),n!==void 0&&(f.io=n),a!==void 0&&(f.comparison_type=a),o!==void 0&&(f.boolean_value=o),s!==void 0&&(f.integer_value=s),i!==void 0&&(f.floating_value=i),L(u,f);let m=d&&d.headers?d.headers:{};return h.headers={...p,...m,...l.headers},{url:D(u),options:h}}}},Gn=function(e){const t=JE(e);return{async listIODescriptions(r,n,a,o){var c,u;const s=await t.listIODescriptions(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["ControllerIOsApi.listIODescriptions"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async listIOValues(r,n,a,o){var c,u;const s=await t.listIOValues(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["ControllerIOsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async setOutputValues(r,n,a,o){var c,u;const s=await t.setOutputValues(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["ControllerIOsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async streamIOValues(r,n,a,o){var c,u;const s=await t.streamIOValues(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["ControllerIOsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async waitForIOEvent(r,n,a,o,s,i,l,c){var p,f;const u=await t.waitForIOEvent(r,n,a,o,s,i,l,c),d=(e==null?void 0:e.serverIndex)??0,h=(f=(p=j["ControllerIOsApi.waitForIOEvent"])==null?void 0:p[d])==null?void 0:f.url;return(m,v)=>F(u,_,M,e)(m,h||v)}}};class WE extends Ve{listIODescriptions(t,r,n,a){return Gn(this.configuration).listIODescriptions(t,r,n,a).then(o=>o(this.axios,this.basePath))}listIOValues(t,r,n,a){return Gn(this.configuration).listIOValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}setOutputValues(t,r,n,a){return Gn(this.configuration).setOutputValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamIOValues(t,r,n,a){return Gn(this.configuration).streamIOValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}waitForIOEvent(t,r,n,a,o,s,i,l){return Gn(this.configuration).waitForIOEvent(t,r,n,a,o,s,i,l).then(c=>c(this.axios,this.basePath))}}const YE=function(e){return{addCoordinateSystem:async(t,r,n={})=>{x("addCoordinateSystem","cell",t),x("addCoordinateSystem","addRequest",r);const a="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};k(i,e),await U(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:D(o),options:i}},deleteCoordinateSystem:async(t,r,n={})=>{x("deleteCoordinateSystem","cell",t),x("deleteCoordinateSystem","coordinateSystem",r);const a="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getCoordinateSystem:async(t,r,n,a={})=>{x("getCoordinateSystem","cell",t),x("getCoordinateSystem","coordinateSystem",r);const o="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.rotation_type=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},listCoordinateSystems:async(t,r,n={})=>{x("listCoordinateSystems","cell",t);const a="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),r!==void 0&&(c.rotation_type=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},transformInCoordinateSystem:async(t,r,n,a={})=>{x("transformInCoordinateSystem","cell",t),x("transformInCoordinateSystem","coordinateSystem",r),x("transformInCoordinateSystem","pose",n);const o="/cells/{cell}/coordinate-systems/{coordinate-system}/transform".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}}}},Hn=function(e){const t=YE(e);return{async addCoordinateSystem(r,n,a){var l,c;const o=await t.addCoordinateSystem(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["CoordinateSystemsApi.addCoordinateSystem"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async deleteCoordinateSystem(r,n,a){var l,c;const o=await t.deleteCoordinateSystem(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["CoordinateSystemsApi.deleteCoordinateSystem"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getCoordinateSystem(r,n,a,o){var c,u;const s=await t.getCoordinateSystem(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["CoordinateSystemsApi.getCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async listCoordinateSystems(r,n,a){var l,c;const o=await t.listCoordinateSystems(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["CoordinateSystemsApi.listCoordinateSystems"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async transformInCoordinateSystem(r,n,a,o){var c,u;const s=await t.transformInCoordinateSystem(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["CoordinateSystemsApi.transformInCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)}}};class KE extends Ve{addCoordinateSystem(t,r,n){return Hn(this.configuration).addCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}deleteCoordinateSystem(t,r,n){return Hn(this.configuration).deleteCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}getCoordinateSystem(t,r,n,a){return Hn(this.configuration).getCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}listCoordinateSystems(t,r,n){return Hn(this.configuration).listCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}transformInCoordinateSystem(t,r,n,a){return Hn(this.configuration).transformInCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const QE=function(e){return{clearDevices:async(t,r={})=>{x("clearDevices","cell",t);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},createDevice:async(t,r,n={})=>{x("createDevice","cell",t),x("createDevice","createDeviceRequestInner",r);const a="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};k(i,e),await U(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:D(o),options:i}},deleteDevice:async(t,r,n={})=>{x("deleteDevice","cell",t),x("deleteDevice","identifier",r);const a="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getDevice:async(t,r,n={})=>{x("getDevice","cell",t),x("getDevice","identifier",r);const a="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listDevices:async(t,r={})=>{x("listDevices","cell",t);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}}}},qn=function(e){const t=QE(e);return{async clearDevices(r,n){var i,l;const a=await t.clearDevices(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["DeviceConfigurationApi.clearDevices"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async createDevice(r,n,a){var l,c;const o=await t.createDevice(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["DeviceConfigurationApi.createDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async deleteDevice(r,n,a){var l,c;const o=await t.deleteDevice(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["DeviceConfigurationApi.deleteDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getDevice(r,n,a){var l,c;const o=await t.getDevice(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["DeviceConfigurationApi.getDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async listDevices(r,n){var i,l;const a=await t.listDevices(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["DeviceConfigurationApi.listDevices"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)}}};class XE extends Ve{clearDevices(t,r){return qn(this.configuration).clearDevices(t,r).then(n=>n(this.axios,this.basePath))}createDevice(t,r,n){return qn(this.configuration).createDevice(t,r,n).then(a=>a(this.axios,this.basePath))}deleteDevice(t,r,n){return qn(this.configuration).deleteDevice(t,r,n).then(a=>a(this.axios,this.basePath))}getDevice(t,r,n){return qn(this.configuration).getDevice(t,r,n).then(a=>a(this.axios,this.basePath))}listDevices(t,r){return qn(this.configuration).listDevices(t,r).then(n=>n(this.axios,this.basePath))}}const ZE=function(e){return{createProgram:async(t,r,n,a={})=>{x("createProgram","cell",t),x("createProgram","body",r);const o="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.name=n),c["Content-Type"]="text/plain",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(r,l,e),{url:D(s),options:l}},deleteProgram:async(t,r,n={})=>{x("deleteProgram","cell",t),x("deleteProgram","program",r);const a="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deleteProgramList:async(t,r,n={})=>{x("deleteProgramList","cell",t),x("deleteProgramList","programIds",r);const a="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),r&&(c.program_ids=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getProgram:async(t,r,n={})=>{x("getProgram","cell",t),x("getProgram","program",r);const a="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},updateProgram:async(t,r,n,a={})=>{x("updateProgram","cell",t),x("updateProgram","program",r),x("updateProgram","body",n);const o="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="text/plain",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}}}},Jn=function(e){const t=ZE(e);return{async createProgram(r,n,a,o){var c,u;const s=await t.createProgram(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["LibraryProgramApi.createProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async deleteProgram(r,n,a){var l,c;const o=await t.deleteProgram(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["LibraryProgramApi.deleteProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async deleteProgramList(r,n,a){var l,c;const o=await t.deleteProgramList(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["LibraryProgramApi.deleteProgramList"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getProgram(r,n,a){var l,c;const o=await t.getProgram(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["LibraryProgramApi.getProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async updateProgram(r,n,a,o){var c,u;const s=await t.updateProgram(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["LibraryProgramApi.updateProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)}}};class eV extends Ve{createProgram(t,r,n,a){return Jn(this.configuration).createProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}deleteProgram(t,r,n){return Jn(this.configuration).deleteProgram(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramList(t,r,n){return Jn(this.configuration).deleteProgramList(t,r,n).then(a=>a(this.axios,this.basePath))}getProgram(t,r,n){return Jn(this.configuration).getProgram(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgram(t,r,n,a){return Jn(this.configuration).updateProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const tV=function(e){return{getProgramMetadata:async(t,r,n={})=>{x("getProgramMetadata","cell",t),x("getProgramMetadata","program",r);const a="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listProgramMetadata:async(t,r,n={})=>{x("listProgramMetadata","cell",t);const a="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),r!==void 0&&(c.show_hidden=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},updateProgramMetadata:async(t,r,n,a={})=>{x("updateProgramMetadata","cell",t),x("updateProgramMetadata","program",r),x("updateProgramMetadata","updateProgramMetadataRequest",n);const o="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}},uploadProgramMetadataImage:async(t,r,n,a={})=>{x("uploadProgramMetadataImage","cell",t),x("uploadProgramMetadataImage","program",r),x("uploadProgramMetadataImage","file",n);const o="/cells/{cell}/store/programs/{program}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={},d=new(e&&e.formDataCtor||FormData);k(l,e),await U(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",L(s,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...a.headers},l.data=d,{url:D(s),options:l}}}},eo=function(e){const t=tV(e);return{async getProgramMetadata(r,n,a){var l,c;const o=await t.getProgramMetadata(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["LibraryProgramMetadataApi.getProgramMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async listProgramMetadata(r,n,a){var l,c;const o=await t.listProgramMetadata(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["LibraryProgramMetadataApi.listProgramMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async updateProgramMetadata(r,n,a,o){var c,u;const s=await t.updateProgramMetadata(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["LibraryProgramMetadataApi.updateProgramMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async uploadProgramMetadataImage(r,n,a,o){var c,u;const s=await t.uploadProgramMetadataImage(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["LibraryProgramMetadataApi.uploadProgramMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)}}};class rV extends Ve{getProgramMetadata(t,r,n){return eo(this.configuration).getProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramMetadata(t,r,n){return eo(this.configuration).listProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgramMetadata(t,r,n,a){return eo(this.configuration).updateProgramMetadata(t,r,n,a).then(o=>o(this.axios,this.basePath))}uploadProgramMetadataImage(t,r,n,a){return eo(this.configuration).uploadProgramMetadataImage(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const nV=function(e){return{createRecipe:async(t,r,n,a,o={})=>{x("createRecipe","cell",t),x("createRecipe","programId",r),x("createRecipe","body",n);const s="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"POST",...l,...o},u={},d={};k(c,e),await U(u,e),r!==void 0&&(d.program_id=r),a!==void 0&&(d.name=a),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=ue(n,c,e),{url:D(i),options:c}},deleteRecipe:async(t,r,n={})=>{x("deleteRecipe","cell",t),x("deleteRecipe","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deleteRecipeList:async(t,r,n={})=>{x("deleteRecipeList","cell",t),x("deleteRecipeList","recipeIds",r);const a="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),r&&(c.recipe_ids=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getRecipe:async(t,r,n={})=>{x("getRecipe","cell",t),x("getRecipe","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},updateRecipe:async(t,r,n,a={})=>{x("updateRecipe","cell",t),x("updateRecipe","recipe",r),x("updateRecipe","body",n);const o="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}}}},Wn=function(e){const t=nV(e);return{async createRecipe(r,n,a,o,s){var u,d;const i=await t.createRecipe(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=j["LibraryRecipeApi.createRecipe"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,M,e)(h,c||p)},async deleteRecipe(r,n,a){var l,c;const o=await t.deleteRecipe(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["LibraryRecipeApi.deleteRecipe"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async deleteRecipeList(r,n,a){var l,c;const o=await t.deleteRecipeList(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["LibraryRecipeApi.deleteRecipeList"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getRecipe(r,n,a){var l,c;const o=await t.getRecipe(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["LibraryRecipeApi.getRecipe"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async updateRecipe(r,n,a,o){var c,u;const s=await t.updateRecipe(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["LibraryRecipeApi.updateRecipe"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)}}};class aV extends Ve{createRecipe(t,r,n,a,o){return Wn(this.configuration).createRecipe(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteRecipe(t,r,n){return Wn(this.configuration).deleteRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRecipeList(t,r,n){return Wn(this.configuration).deleteRecipeList(t,r,n).then(a=>a(this.axios,this.basePath))}getRecipe(t,r,n){return Wn(this.configuration).getRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}updateRecipe(t,r,n,a){return Wn(this.configuration).updateRecipe(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const oV=function(e){return{getRecipeMetadata:async(t,r,n={})=>{x("getRecipeMetadata","cell",t),x("getRecipeMetadata","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listRecipeMetadata:async(t,r={})=>{x("listRecipeMetadata","cell",t);const n="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},updateRecipeMetadata:async(t,r,n,a={})=>{x("updateRecipeMetadata","cell",t),x("updateRecipeMetadata","recipe",r),x("updateRecipeMetadata","updateRecipeMetadataRequest",n);const o="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}},uploadRecipeMetadataImage:async(t,r,n,a={})=>{x("uploadRecipeMetadataImage","cell",t),x("uploadRecipeMetadataImage","recipe",r),x("uploadRecipeMetadataImage","file",n);const o="/cells/{cell}/store/recipes/{recipe}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={},d=new(e&&e.formDataCtor||FormData);k(l,e),await U(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",L(s,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...a.headers},l.data=d,{url:D(s),options:l}}}},to=function(e){const t=oV(e);return{async getRecipeMetadata(r,n,a){var l,c;const o=await t.getRecipeMetadata(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["LibraryRecipeMetadataApi.getRecipeMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async listRecipeMetadata(r,n){var i,l;const a=await t.listRecipeMetadata(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["LibraryRecipeMetadataApi.listRecipeMetadata"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async updateRecipeMetadata(r,n,a,o){var c,u;const s=await t.updateRecipeMetadata(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["LibraryRecipeMetadataApi.updateRecipeMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async uploadRecipeMetadataImage(r,n,a,o){var c,u;const s=await t.uploadRecipeMetadataImage(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["LibraryRecipeMetadataApi.uploadRecipeMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)}}};class sV extends Ve{getRecipeMetadata(t,r,n){return to(this.configuration).getRecipeMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listRecipeMetadata(t,r){return to(this.configuration).listRecipeMetadata(t,r).then(n=>n(this.axios,this.basePath))}updateRecipeMetadata(t,r,n,a){return to(this.configuration).updateRecipeMetadata(t,r,n,a).then(o=>o(this.axios,this.basePath))}uploadRecipeMetadataImage(t,r,n,a){return to(this.configuration).uploadRecipeMetadataImage(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const iV=function(e){return{deleteAllMotions:async(t,r={})=>{x("deleteAllMotions","cell",t);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},deleteMotion:async(t,r,n={})=>{x("deleteMotion","cell",t),x("deleteMotion","motion",r);const a="/cells/{cell}/motions/{motion}/delete".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},executeTrajectory:async(t,r,n={})=>{x("executeTrajectory","cell",t),x("executeTrajectory","executeTrajectoryRequest",r);const a="/cells/{cell}/motions/executetrajectory".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:D(o),options:i}},getMotionTrajectory:async(t,r,n,a,o={})=>{x("getMotionTrajectory","cell",t),x("getMotionTrajectory","motion",r),x("getMotionTrajectory","sampleTime",n);const s="/cells/{cell}/motions/{motion}/trajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},u={},d={};k(c,e),await U(u,e),n!==void 0&&(d.sample_time=n),a!==void 0&&(d.responses_coordinate_system=a),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:D(i),options:c}},getMotionTrajectorySample:async(t,r,n,a,o={})=>{x("getMotionTrajectorySample","cell",t),x("getMotionTrajectorySample","motion",r);const s="/cells/{cell}/motions/{motion}/trajectorysample".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},u={},d={};k(c,e),await U(u,e),n!==void 0&&(d.location_on_trajectory=n),a!==void 0&&(d.response_coordinate_system=a),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:D(i),options:c}},getPlannedMotion:async(t,r,n,a={})=>{x("getPlannedMotion","cell",t),x("getPlannedMotion","motion",r);const o="/cells/{cell}/motions/{motion}/planned-motion".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.sample_time=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},getPlanningMotionGroupModels:async(t,r={})=>{x("getPlanningMotionGroupModels","cell",t);const n="/cells/{cell}/motion-planning/motion-group-models".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},listMotions:async(t,r={})=>{x("listMotions","cell",t);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},loadPlannedMotion:async(t,r,n={})=>{x("loadPlannedMotion","cell",t),x("loadPlannedMotion","plannedMotion",r);const a="/cells/{cell}/planned-motions".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};k(i,e),await U(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:D(o),options:i}},planCollisionFreePTP:async(t,r,n={})=>{x("planCollisionFreePTP","cell",t);const a="/cells/{cell}/motion-planning/plan-collision-free-ptp".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};k(i,e),await U(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:D(o),options:i}},planMotion:async(t,r,n={})=>{x("planMotion","cell",t),x("planMotion","planRequest",r);const a="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};k(i,e),await U(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:D(o),options:i}},planTrajectory:async(t,r,n={})=>{x("planTrajectory","cell",t);const a="/cells/{cell}/motion-planning/plan-trajectory".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};k(i,e),await U(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:D(o),options:i}},stopExecution:async(t,r,n={})=>{x("stopExecution","cell",t),x("stopExecution","motion",r);const a="/cells/{cell}/motions/{motion}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},streamMove:async(t,r,n={})=>{x("streamMove","cell",t),x("streamMove","streamMoveRequest",r);const a="/cells/{cell}/motions/streammove".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:D(o),options:i}},streamMoveBackward:async(t,r,n,a,o,s,i={})=>{x("streamMoveBackward","cell",t),x("streamMoveBackward","motion",r),x("streamMoveBackward","playbackSpeedInPercent",n);const l="/cells/{cell}/motions/{motion}/executebackward".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),c=new URL(l,$);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};k(d,e),await U(h,e),n!==void 0&&(p.playback_speed_in_percent=n),a!==void 0&&(p.response_rate=a),o!==void 0&&(p.response_coordinate_system=o),s!==void 0&&(p.start_location_on_trajectory=s),L(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:D(c),options:d}},streamMoveForward:async(t,r,n,a,o,s,i={})=>{x("streamMoveForward","cell",t),x("streamMoveForward","motion",r),x("streamMoveForward","playbackSpeedInPercent",n);const l="/cells/{cell}/motions/{motion}/executeforward".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),c=new URL(l,$);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};k(d,e),await U(h,e),n!==void 0&&(p.playback_speed_in_percent=n),a!==void 0&&(p.response_rate=a),o!==void 0&&(p.response_coordinate_system=o),s!==void 0&&(p.start_location_on_trajectory=s),L(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:D(c),options:d}},streamMoveToTrajectoryViaJointPTP:async(t,r,n,a,o,s,i,l,c,u,d={})=>{x("streamMoveToTrajectoryViaJointPTP","cell",t),x("streamMoveToTrajectoryViaJointPTP","motion",r),x("streamMoveToTrajectoryViaJointPTP","locationOnTrajectory",n);const h="/cells/{cell}/motions/{motion}/executetotrajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),p=new URL(h,$);let f;e&&(f=e.baseOptions);const m={method:"GET",...f,...d},v={},S={};k(m,e),await U(v,e),n!==void 0&&(S.location_on_trajectory=n),a&&(S["limit_override.joint_velocity_limits.joints"]=a),o&&(S["limit_override.joint_acceleration_limits.joints"]=o),s!==void 0&&(S["limit_override.tcp_velocity_limit"]=s),i!==void 0&&(S["limit_override.tcp_acceleration_limit"]=i),l!==void 0&&(S["limit_override.tcp_orientation_velocity_limit"]=l),c!==void 0&&(S["limit_override.tcp_orientation_acceleration_limit"]=c),u!==void 0&&(S.responses_coordinate_system=u),L(p,S);let E=f&&f.headers?f.headers:{};return m.headers={...v,...E,...d.headers},{url:D(p),options:m}}}},Ye=function(e){const t=iV(e);return{async deleteAllMotions(r,n){var i,l;const a=await t.deleteAllMotions(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["MotionApi.deleteAllMotions"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async deleteMotion(r,n,a){var l,c;const o=await t.deleteMotion(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionApi.deleteMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async executeTrajectory(r,n,a){var l,c;const o=await t.executeTrajectory(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionApi.executeTrajectory"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getMotionTrajectory(r,n,a,o,s){var u,d;const i=await t.getMotionTrajectory(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=j["MotionApi.getMotionTrajectory"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,M,e)(h,c||p)},async getMotionTrajectorySample(r,n,a,o,s){var u,d;const i=await t.getMotionTrajectorySample(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=j["MotionApi.getMotionTrajectorySample"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,M,e)(h,c||p)},async getPlannedMotion(r,n,a,o){var c,u;const s=await t.getPlannedMotion(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["MotionApi.getPlannedMotion"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async getPlanningMotionGroupModels(r,n){var i,l;const a=await t.getPlanningMotionGroupModels(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["MotionApi.getPlanningMotionGroupModels"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async listMotions(r,n){var i,l;const a=await t.listMotions(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["MotionApi.listMotions"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async loadPlannedMotion(r,n,a){var l,c;const o=await t.loadPlannedMotion(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionApi.loadPlannedMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async planCollisionFreePTP(r,n,a){var l,c;const o=await t.planCollisionFreePTP(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionApi.planCollisionFreePTP"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async planMotion(r,n,a){var l,c;const o=await t.planMotion(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionApi.planMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async planTrajectory(r,n,a){var l,c;const o=await t.planTrajectory(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionApi.planTrajectory"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async stopExecution(r,n,a){var l,c;const o=await t.stopExecution(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionApi.stopExecution"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async streamMove(r,n,a){var l,c;const o=await t.streamMove(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionApi.streamMove"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async streamMoveBackward(r,n,a,o,s,i,l){var h,p;const c=await t.streamMoveBackward(r,n,a,o,s,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=j["MotionApi.streamMoveBackward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>F(c,_,M,e)(f,d||m)},async streamMoveForward(r,n,a,o,s,i,l){var h,p;const c=await t.streamMoveForward(r,n,a,o,s,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=j["MotionApi.streamMoveForward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>F(c,_,M,e)(f,d||m)},async streamMoveToTrajectoryViaJointPTP(r,n,a,o,s,i,l,c,u,d,h){var v,S;const p=await t.streamMoveToTrajectoryViaJointPTP(r,n,a,o,s,i,l,c,u,d,h),f=(e==null?void 0:e.serverIndex)??0,m=(S=(v=j["MotionApi.streamMoveToTrajectoryViaJointPTP"])==null?void 0:v[f])==null?void 0:S.url;return(E,O)=>F(p,_,M,e)(E,m||O)}}};class lV extends Ve{deleteAllMotions(t,r){return Ye(this.configuration).deleteAllMotions(t,r).then(n=>n(this.axios,this.basePath))}deleteMotion(t,r,n){return Ye(this.configuration).deleteMotion(t,r,n).then(a=>a(this.axios,this.basePath))}executeTrajectory(t,r,n){return Ye(this.configuration).executeTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionTrajectory(t,r,n,a,o){return Ye(this.configuration).getMotionTrajectory(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getMotionTrajectorySample(t,r,n,a,o){return Ye(this.configuration).getMotionTrajectorySample(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getPlannedMotion(t,r,n,a){return Ye(this.configuration).getPlannedMotion(t,r,n,a).then(o=>o(this.axios,this.basePath))}getPlanningMotionGroupModels(t,r){return Ye(this.configuration).getPlanningMotionGroupModels(t,r).then(n=>n(this.axios,this.basePath))}listMotions(t,r){return Ye(this.configuration).listMotions(t,r).then(n=>n(this.axios,this.basePath))}loadPlannedMotion(t,r,n){return Ye(this.configuration).loadPlannedMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planCollisionFreePTP(t,r,n){return Ye(this.configuration).planCollisionFreePTP(t,r,n).then(a=>a(this.axios,this.basePath))}planMotion(t,r,n){return Ye(this.configuration).planMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planTrajectory(t,r,n){return Ye(this.configuration).planTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}stopExecution(t,r,n){return Ye(this.configuration).stopExecution(t,r,n).then(a=>a(this.axios,this.basePath))}streamMove(t,r,n){return Ye(this.configuration).streamMove(t,r,n).then(a=>a(this.axios,this.basePath))}streamMoveBackward(t,r,n,a,o,s,i){return Ye(this.configuration).streamMoveBackward(t,r,n,a,o,s,i).then(l=>l(this.axios,this.basePath))}streamMoveForward(t,r,n,a,o,s,i){return Ye(this.configuration).streamMoveForward(t,r,n,a,o,s,i).then(l=>l(this.axios,this.basePath))}streamMoveToTrajectoryViaJointPTP(t,r,n,a,o,s,i,l,c,u,d){return Ye(this.configuration).streamMoveToTrajectoryViaJointPTP(t,r,n,a,o,s,i,l,c,u,d).then(h=>h(this.axios,this.basePath))}}const cV=function(e){return{activateAllMotionGroups:async(t,r,n={})=>{x("activateAllMotionGroups","cell",t),x("activateAllMotionGroups","controller",r);const a="/cells/{cell}/motion-groups/all".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};k(i,e),await U(l,e),r!==void 0&&(c.controller=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},activateMotionGroup:async(t,r,n={})=>{x("activateMotionGroup","cell",t),x("activateMotionGroup","motionGroup",r);const a="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};k(i,e),await U(l,e),r!==void 0&&(c.motion_group=r),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deactivateMotionGroup:async(t,r,n={})=>{x("deactivateMotionGroup","cell",t),x("deactivateMotionGroup","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listMotionGroups:async(t,r={})=>{x("listMotionGroups","cell",t);const n="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}}}},ro=function(e){const t=cV(e);return{async activateAllMotionGroups(r,n,a){var l,c;const o=await t.activateAllMotionGroups(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionGroupApi.activateAllMotionGroups"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async activateMotionGroup(r,n,a){var l,c;const o=await t.activateMotionGroup(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionGroupApi.activateMotionGroup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async deactivateMotionGroup(r,n,a){var l,c;const o=await t.deactivateMotionGroup(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionGroupApi.deactivateMotionGroup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async listMotionGroups(r,n){var i,l;const a=await t.listMotionGroups(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["MotionGroupApi.listMotionGroups"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)}}};class uV extends Ve{activateAllMotionGroups(t,r,n){return ro(this.configuration).activateAllMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}activateMotionGroup(t,r,n){return ro(this.configuration).activateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}deactivateMotionGroup(t,r,n){return ro(this.configuration).deactivateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}listMotionGroups(t,r){return ro(this.configuration).listMotionGroups(t,r).then(n=>n(this.axios,this.basePath))}}const dV=function(e){return{getActivePayload:async(t,r,n={})=>{x("getActivePayload","cell",t),x("getActivePayload","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/payloads/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getActiveTcp:async(t,r,n,a={})=>{x("getActiveTcp","cell",t),x("getActiveTcp","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/tcps/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.rotation_type=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},getCurrentMotionGroupState:async(t,r,n,a,o={})=>{x("getCurrentMotionGroupState","cell",t),x("getCurrentMotionGroupState","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},u={},d={};k(c,e),await U(u,e),n!==void 0&&(d.tcp=n),a!==void 0&&(d.response_coordinate_system=a),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:D(i),options:c}},getInfoCapabilities:async(t,r,n={})=>{x("getInfoCapabilities","cell",t),x("getInfoCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/info-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getMotionGroupSpecification:async(t,r,n={})=>{x("getMotionGroupSpecification","cell",t),x("getMotionGroupSpecification","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/specification".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getMounting:async(t,r,n={})=>{x("getMounting","cell",t),x("getMounting","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getOptimizerConfiguration:async(t,r,n,a={})=>{x("getOptimizerConfiguration","cell",t),x("getOptimizerConfiguration","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/optimizer-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.tcp=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},getSafetySetup:async(t,r,n={})=>{x("getSafetySetup","cell",t),x("getSafetySetup","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/safety-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listPayloads:async(t,r,n={})=>{x("listPayloads","cell",t),x("listPayloads","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/payloads".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listTcps:async(t,r,n,a={})=>{x("listTcps","cell",t),x("listTcps","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.rotation_type=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},streamMotionGroupState:async(t,r,n,a,o,s={})=>{x("streamMotionGroupState","cell",t),x("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,$);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...s},d={},h={};k(u,e),await U(d,e),n!==void 0&&(h.response_rate=n),a!==void 0&&(h.response_coordinate_system=a),o!==void 0&&(h.tcp=o),L(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...s.headers},{url:D(l),options:u}}}},xt=function(e){const t=dV(e);return{async getActivePayload(r,n,a){var l,c;const o=await t.getActivePayload(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionGroupInfosApi.getActivePayload"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getActiveTcp(r,n,a,o){var c,u;const s=await t.getActiveTcp(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["MotionGroupInfosApi.getActiveTcp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async getCurrentMotionGroupState(r,n,a,o,s){var u,d;const i=await t.getCurrentMotionGroupState(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=j["MotionGroupInfosApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,M,e)(h,c||p)},async getInfoCapabilities(r,n,a){var l,c;const o=await t.getInfoCapabilities(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionGroupInfosApi.getInfoCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getMotionGroupSpecification(r,n,a){var l,c;const o=await t.getMotionGroupSpecification(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionGroupInfosApi.getMotionGroupSpecification"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getMounting(r,n,a){var l,c;const o=await t.getMounting(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionGroupInfosApi.getMounting"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getOptimizerConfiguration(r,n,a,o){var c,u;const s=await t.getOptimizerConfiguration(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["MotionGroupInfosApi.getOptimizerConfiguration"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async getSafetySetup(r,n,a){var l,c;const o=await t.getSafetySetup(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionGroupInfosApi.getSafetySetup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async listPayloads(r,n,a){var l,c;const o=await t.listPayloads(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionGroupInfosApi.listPayloads"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async listTcps(r,n,a,o){var c,u;const s=await t.listTcps(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["MotionGroupInfosApi.listTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async streamMotionGroupState(r,n,a,o,s,i){var d,h;const l=await t.streamMotionGroupState(r,n,a,o,s,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=j["MotionGroupInfosApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>F(l,_,M,e)(p,u||f)}}};class hV extends Ve{getActivePayload(t,r,n){return xt(this.configuration).getActivePayload(t,r,n).then(a=>a(this.axios,this.basePath))}getActiveTcp(t,r,n,a){return xt(this.configuration).getActiveTcp(t,r,n,a).then(o=>o(this.axios,this.basePath))}getCurrentMotionGroupState(t,r,n,a,o){return xt(this.configuration).getCurrentMotionGroupState(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getInfoCapabilities(t,r,n){return xt(this.configuration).getInfoCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionGroupSpecification(t,r,n){return xt(this.configuration).getMotionGroupSpecification(t,r,n).then(a=>a(this.axios,this.basePath))}getMounting(t,r,n){return xt(this.configuration).getMounting(t,r,n).then(a=>a(this.axios,this.basePath))}getOptimizerConfiguration(t,r,n,a){return xt(this.configuration).getOptimizerConfiguration(t,r,n,a).then(o=>o(this.axios,this.basePath))}getSafetySetup(t,r,n){return xt(this.configuration).getSafetySetup(t,r,n).then(a=>a(this.axios,this.basePath))}listPayloads(t,r,n){return xt(this.configuration).listPayloads(t,r,n).then(a=>a(this.axios,this.basePath))}listTcps(t,r,n,a){return xt(this.configuration).listTcps(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamMotionGroupState(t,r,n,a,o,s){return xt(this.configuration).streamMotionGroupState(t,r,n,a,o,s).then(i=>i(this.axios,this.basePath))}}const pV=function(e){return{directionJogging:async(t,r,n={})=>{x("directionJogging","cell",t),x("directionJogging","directionJoggingRequest",r);const a="/cells/{cell}/motion-groups/move-tcp".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:D(o),options:i}},getJoggingCapabilities:async(t,r,n={})=>{x("getJoggingCapabilities","cell",t),x("getJoggingCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/jogging-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},jointJogging:async(t,r,n={})=>{x("jointJogging","cell",t),x("jointJogging","jointJoggingRequest",r);const a="/cells/{cell}/motion-groups/move-joint".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:D(o),options:i}},stopJogging:async(t,r,n={})=>{x("stopJogging","cell",t),x("stopJogging","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}}}},no=function(e){const t=pV(e);return{async directionJogging(r,n,a){var l,c;const o=await t.directionJogging(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionGroupJoggingApi.directionJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getJoggingCapabilities(r,n,a){var l,c;const o=await t.getJoggingCapabilities(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionGroupJoggingApi.getJoggingCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async jointJogging(r,n,a){var l,c;const o=await t.jointJogging(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionGroupJoggingApi.jointJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async stopJogging(r,n,a){var l,c;const o=await t.stopJogging(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionGroupJoggingApi.stopJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)}}};class mV extends Ve{directionJogging(t,r,n){return no(this.configuration).directionJogging(t,r,n).then(a=>a(this.axios,this.basePath))}getJoggingCapabilities(t,r,n){return no(this.configuration).getJoggingCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}jointJogging(t,r,n){return no(this.configuration).jointJogging(t,r,n).then(a=>a(this.axios,this.basePath))}stopJogging(t,r,n){return no(this.configuration).stopJogging(t,r,n).then(a=>a(this.axios,this.basePath))}}const fV=function(e){return{calculateAllInverseKinematic:async(t,r,n,a={})=>{x("calculateAllInverseKinematic","cell",t),x("calculateAllInverseKinematic","motionGroup",r),x("calculateAllInverseKinematic","allJointPositionsRequest",n);const o="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-all-joint-positions".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}},calculateForwardKinematic:async(t,r,n,a={})=>{x("calculateForwardKinematic","cell",t),x("calculateForwardKinematic","motionGroup",r),x("calculateForwardKinematic","tcpPoseRequest",n);const o="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-tcp-pose".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}},calculateInverseKinematic:async(t,r,n,a={})=>{x("calculateInverseKinematic","cell",t),x("calculateInverseKinematic","motionGroup",r),x("calculateInverseKinematic","jointPositionRequest",n);const o="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-joint-position".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}},getKinematicCapabilities:async(t,r,n={})=>{x("getKinematicCapabilities","cell",t),x("getKinematicCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/kinematic-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}}}},ao=function(e){const t=fV(e);return{async calculateAllInverseKinematic(r,n,a,o){var c,u;const s=await t.calculateAllInverseKinematic(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["MotionGroupKinematicApi.calculateAllInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async calculateForwardKinematic(r,n,a,o){var c,u;const s=await t.calculateForwardKinematic(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["MotionGroupKinematicApi.calculateForwardKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async calculateInverseKinematic(r,n,a,o){var c,u;const s=await t.calculateInverseKinematic(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["MotionGroupKinematicApi.calculateInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async getKinematicCapabilities(r,n,a){var l,c;const o=await t.getKinematicCapabilities(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["MotionGroupKinematicApi.getKinematicCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)}}};class gV extends Ve{calculateAllInverseKinematic(t,r,n,a){return ao(this.configuration).calculateAllInverseKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}calculateForwardKinematic(t,r,n,a){return ao(this.configuration).calculateForwardKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}calculateInverseKinematic(t,r,n,a){return ao(this.configuration).calculateInverseKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}getKinematicCapabilities(t,r,n){return ao(this.configuration).getKinematicCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}}const yV=function(e){return{createProgramRunner:async(t,r,n={})=>{x("createProgramRunner","cell",t),x("createProgramRunner","request",r);const a="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};k(i,e),await U(l,e),l["Content-Type"]="text/plain",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:D(o),options:i}},executeProgram:async(t,r,n={})=>{x("executeProgram","cell",t),x("executeProgram","codeWithArguments",r);const a="/cells/{cell}/programs/execute".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};k(i,e),await U(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:D(o),options:i}},getProgramRunner:async(t,r,n={})=>{x("getProgramRunner","cell",t),x("getProgramRunner","runner",r);const a="/cells/{cell}/programs/runners/{runner}".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listProgramRunners:async(t,r={})=>{x("listProgramRunners","cell",t);const n="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},migrateProgram:async(t,r,n={})=>{x("migrateProgram","cell",t),x("migrateProgram","request1",r);const a="/cells/{cell}/programs/migrate".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};k(i,e),await U(l,e),l["Content-Type"]="text/plain",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:D(o),options:i}},planProgram:async(t,r,n,a={})=>{x("planProgram","cell",t),x("planProgram","request",r);const o="/cells/{cell}/programs/plan".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.identifier=n),c["Content-Type"]="text/plain",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(r,l,e),{url:D(s),options:l}},stopAllProgramRunner:async(t,r={})=>{x("stopAllProgramRunner","cell",t);const n="/cells/{cell}/programs/runners/stop".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"POST",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},stopProgramRunner:async(t,r,n={})=>{x("stopProgramRunner","cell",t),x("stopProgramRunner","runner",r);const a="/cells/{cell}/programs/runners/{runner}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}}}},Zt=function(e){const t=yV(e);return{async createProgramRunner(r,n,a){var l,c;const o=await t.createProgramRunner(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ProgramApi.createProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async executeProgram(r,n,a){var l,c;const o=await t.executeProgram(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ProgramApi.executeProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getProgramRunner(r,n,a){var l,c;const o=await t.getProgramRunner(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ProgramApi.getProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async listProgramRunners(r,n){var i,l;const a=await t.listProgramRunners(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["ProgramApi.listProgramRunners"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async migrateProgram(r,n,a){var l,c;const o=await t.migrateProgram(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ProgramApi.migrateProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async planProgram(r,n,a,o){var c,u;const s=await t.planProgram(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["ProgramApi.planProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async stopAllProgramRunner(r,n){var i,l;const a=await t.stopAllProgramRunner(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["ProgramApi.stopAllProgramRunner"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async stopProgramRunner(r,n,a){var l,c;const o=await t.stopProgramRunner(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ProgramApi.stopProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)}}};class bV extends Ve{createProgramRunner(t,r,n){return Zt(this.configuration).createProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}executeProgram(t,r,n){return Zt(this.configuration).executeProgram(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramRunner(t,r,n){return Zt(this.configuration).getProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramRunners(t,r){return Zt(this.configuration).listProgramRunners(t,r).then(n=>n(this.axios,this.basePath))}migrateProgram(t,r,n){return Zt(this.configuration).migrateProgram(t,r,n).then(a=>a(this.axios,this.basePath))}planProgram(t,r,n,a){return Zt(this.configuration).planProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}stopAllProgramRunner(t,r){return Zt(this.configuration).stopAllProgramRunner(t,r).then(n=>n(this.axios,this.basePath))}stopProgramRunner(t,r,n){return Zt(this.configuration).stopProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}}const vV=function(e){return{clearProgramsValues:async(t,r={})=>{x("clearProgramsValues","cell",t);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},createProgramsValue:async(t,r,n={})=>{x("createProgramsValue","cell",t),x("createProgramsValue","requestBody",r);const a="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};k(i,e),await U(l,e),l["Content-Type"]="application/json",L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:D(o),options:i}},deleteProgramValue:async(t,r,n={})=>{x("deleteProgramValue","cell",t),x("deleteProgramValue","key",r);const a="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getProgramValue:async(t,r,n={})=>{x("getProgramValue","cell",t),x("getProgramValue","key",r);const a="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listProgramsValues:async(t,r={})=>{x("listProgramsValues","cell",t);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},updateProgramValue:async(t,r,n,a={})=>{x("updateProgramValue","cell",t),x("updateProgramValue","key",r),x("updateProgramValue","value",n);const o="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}}}},Wr=function(e){const t=vV(e);return{async clearProgramsValues(r,n){var i,l;const a=await t.clearProgramsValues(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["ProgramValuesApi.clearProgramsValues"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async createProgramsValue(r,n,a){var l,c;const o=await t.createProgramsValue(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ProgramValuesApi.createProgramsValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async deleteProgramValue(r,n,a){var l,c;const o=await t.deleteProgramValue(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ProgramValuesApi.deleteProgramValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getProgramValue(r,n,a){var l,c;const o=await t.getProgramValue(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["ProgramValuesApi.getProgramValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async listProgramsValues(r,n){var i,l;const a=await t.listProgramsValues(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["ProgramValuesApi.listProgramsValues"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async updateProgramValue(r,n,a,o){var c,u;const s=await t.updateProgramValue(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["ProgramValuesApi.updateProgramValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)}}};class xV extends Ve{clearProgramsValues(t,r){return Wr(this.configuration).clearProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}createProgramsValue(t,r,n){return Wr(this.configuration).createProgramsValue(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramValue(t,r,n){return Wr(this.configuration).deleteProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramValue(t,r,n){return Wr(this.configuration).getProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramsValues(t,r){return Wr(this.configuration).listProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}updateProgramValue(t,r,n,a){return Wr(this.configuration).updateProgramValue(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const SV=function(e){return{deleteStoredCollider:async(t,r,n={})=>{x("deleteStoredCollider","cell",t),x("deleteStoredCollider","collider",r);const a="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deleteStoredCollisionLinkChain:async(t,r,n={})=>{x("deleteStoredCollisionLinkChain","cell",t),x("deleteStoredCollisionLinkChain","linkChain",r);const a="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deleteStoredCollisionTool:async(t,r,n={})=>{x("deleteStoredCollisionTool","cell",t),x("deleteStoredCollisionTool","tool",r);const a="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getDefaultLinkChain:async(t,r,n={})=>{x("getDefaultLinkChain","cell",t),x("getDefaultLinkChain","motionGroupModel",r);const a="/cells/{cell}/store/collision/default-link-chains/{motion-group-model}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group-model}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getStoredCollider:async(t,r,n={})=>{x("getStoredCollider","cell",t),x("getStoredCollider","collider",r);const a="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getStoredCollisionLinkChain:async(t,r,n={})=>{x("getStoredCollisionLinkChain","cell",t),x("getStoredCollisionLinkChain","linkChain",r);const a="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getStoredCollisionTool:async(t,r,n={})=>{x("getStoredCollisionTool","cell",t),x("getStoredCollisionTool","tool",r);const a="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listCollisionLinkChains:async(t,r={})=>{x("listCollisionLinkChains","cell",t);const n="/cells/{cell}/store/collision/link-chains".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},listStoredColliders:async(t,r={})=>{x("listStoredColliders","cell",t);const n="/cells/{cell}/store/collision/colliders".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},listStoredCollisionTools:async(t,r={})=>{x("listStoredCollisionTools","cell",t);const n="/cells/{cell}/store/collision/tools".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},storeCollider:async(t,r,n,a={})=>{x("storeCollider","cell",t),x("storeCollider","collider",r),x("storeCollider","collider2",n);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}},storeCollisionLinkChain:async(t,r,n,a={})=>{x("storeCollisionLinkChain","cell",t),x("storeCollisionLinkChain","linkChain",r),x("storeCollisionLinkChain","collider",n);const o="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}},storeCollisionTool:async(t,r,n,a={})=>{x("storeCollisionTool","cell",t),x("storeCollisionTool","tool",r),x("storeCollisionTool","requestBody",n);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}}}},ct=function(e){const t=SV(e);return{async deleteStoredCollider(r,n,a){var l,c;const o=await t.deleteStoredCollider(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async deleteStoredCollisionLinkChain(r,n,a){var l,c;const o=await t.deleteStoredCollisionLinkChain(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async deleteStoredCollisionTool(r,n,a){var l,c;const o=await t.deleteStoredCollisionTool(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getDefaultLinkChain(r,n,a){var l,c;const o=await t.getDefaultLinkChain(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["StoreCollisionComponentsApi.getDefaultLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getStoredCollider(r,n,a){var l,c;const o=await t.getStoredCollider(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getStoredCollisionLinkChain(r,n,a){var l,c;const o=await t.getStoredCollisionLinkChain(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getStoredCollisionTool(r,n,a){var l,c;const o=await t.getStoredCollisionTool(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async listCollisionLinkChains(r,n){var i,l;const a=await t.listCollisionLinkChains(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async listStoredColliders(r,n){var i,l;const a=await t.listStoredColliders(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async listStoredCollisionTools(r,n){var i,l;const a=await t.listStoredCollisionTools(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async storeCollider(r,n,a,o){var c,u;const s=await t.storeCollider(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async storeCollisionLinkChain(r,n,a,o){var c,u;const s=await t.storeCollisionLinkChain(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async storeCollisionTool(r,n,a,o){var c,u;const s=await t.storeCollisionTool(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)}}};class OV extends Ve{deleteStoredCollider(t,r,n){return ct(this.configuration).deleteStoredCollider(t,r,n).then(a=>a(this.axios,this.basePath))}deleteStoredCollisionLinkChain(t,r,n){return ct(this.configuration).deleteStoredCollisionLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}deleteStoredCollisionTool(t,r,n){return ct(this.configuration).deleteStoredCollisionTool(t,r,n).then(a=>a(this.axios,this.basePath))}getDefaultLinkChain(t,r,n){return ct(this.configuration).getDefaultLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollider(t,r,n){return ct(this.configuration).getStoredCollider(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionLinkChain(t,r,n){return ct(this.configuration).getStoredCollisionLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionTool(t,r,n){return ct(this.configuration).getStoredCollisionTool(t,r,n).then(a=>a(this.axios,this.basePath))}listCollisionLinkChains(t,r){return ct(this.configuration).listCollisionLinkChains(t,r).then(n=>n(this.axios,this.basePath))}listStoredColliders(t,r){return ct(this.configuration).listStoredColliders(t,r).then(n=>n(this.axios,this.basePath))}listStoredCollisionTools(t,r){return ct(this.configuration).listStoredCollisionTools(t,r).then(n=>n(this.axios,this.basePath))}storeCollider(t,r,n,a){return ct(this.configuration).storeCollider(t,r,n,a).then(o=>o(this.axios,this.basePath))}storeCollisionLinkChain(t,r,n,a){return ct(this.configuration).storeCollisionLinkChain(t,r,n,a).then(o=>o(this.axios,this.basePath))}storeCollisionTool(t,r,n,a){return ct(this.configuration).storeCollisionTool(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const wV=function(e){return{deleteStoredCollisionScene:async(t,r,n={})=>{x("deleteStoredCollisionScene","cell",t),x("deleteStoredCollisionScene","scene",r);const a="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getStoredCollisionScene:async(t,r,n={})=>{x("getStoredCollisionScene","cell",t),x("getStoredCollisionScene","scene",r);const a="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listStoredCollisionScenes:async(t,r={})=>{x("listStoredCollisionScenes","cell",t);const n="/cells/{cell}/store/collision/scenes".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},storeCollisionScene:async(t,r,n,a={})=>{x("storeCollisionScene","cell",t),x("storeCollisionScene","scene",r),x("storeCollisionScene","collisionSceneAssembly",n);const o="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}}}},oo=function(e){const t=wV(e);return{async deleteStoredCollisionScene(r,n,a){var l,c;const o=await t.deleteStoredCollisionScene(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["StoreCollisionScenesApi.deleteStoredCollisionScene"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getStoredCollisionScene(r,n,a){var l,c;const o=await t.getStoredCollisionScene(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["StoreCollisionScenesApi.getStoredCollisionScene"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async listStoredCollisionScenes(r,n){var i,l;const a=await t.listStoredCollisionScenes(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["StoreCollisionScenesApi.listStoredCollisionScenes"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async storeCollisionScene(r,n,a,o){var c,u;const s=await t.storeCollisionScene(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["StoreCollisionScenesApi.storeCollisionScene"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)}}};class CV extends Ve{deleteStoredCollisionScene(t,r,n){return oo(this.configuration).deleteStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionScene(t,r,n){return oo(this.configuration).getStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}listStoredCollisionScenes(t,r){return oo(this.configuration).listStoredCollisionScenes(t,r).then(n=>n(this.axios,this.basePath))}storeCollisionScene(t,r,n,a){return oo(this.configuration).storeCollisionScene(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const PV=function(e){return{clearAllObjects:async(t,r={})=>{x("clearAllObjects","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},deleteObject:async(t,r,n={})=>{x("deleteObject","cell",t),x("deleteObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getObject:async(t,r,n={})=>{x("getObject","cell",t),x("getObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getObjectMetadata:async(t,r,n={})=>{x("getObjectMetadata","cell",t),x("getObjectMetadata","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"HEAD",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listAllObjectKeys:async(t,r={})=>{x("listAllObjectKeys","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},storeObject:async(t,r,n,a,o={})=>{x("storeObject","cell",t),x("storeObject","key",r);const s="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={},h=new(e&&e.formDataCtor||FormData);k(c,e),await U(u,e),a!==void 0&&h.append("AnyValue",new Blob([JSON.stringify(a)],{type:"application/json"})),u["Content-Type"]="multipart/form-data",n!=null&&(u["X-Metadata"]=typeof n=="string"?n:JSON.stringify(n)),L(i,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},c.data=h,{url:D(i),options:c}}}},Yr=function(e){const t=PV(e);return{async clearAllObjects(r,n){var i,l;const a=await t.clearAllObjects(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["StoreObjectApi.clearAllObjects"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async deleteObject(r,n,a){var l,c;const o=await t.deleteObject(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["StoreObjectApi.deleteObject"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getObject(r,n,a){var l,c;const o=await t.getObject(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["StoreObjectApi.getObject"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getObjectMetadata(r,n,a){var l,c;const o=await t.getObjectMetadata(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["StoreObjectApi.getObjectMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async listAllObjectKeys(r,n){var i,l;const a=await t.listAllObjectKeys(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async storeObject(r,n,a,o,s){var u,d;const i=await t.storeObject(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=j["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,M,e)(h,c||p)}}};class TV extends Ve{clearAllObjects(t,r){return Yr(this.configuration).clearAllObjects(t,r).then(n=>n(this.axios,this.basePath))}deleteObject(t,r,n){return Yr(this.configuration).deleteObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObject(t,r,n){return Yr(this.configuration).getObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObjectMetadata(t,r,n){return Yr(this.configuration).getObjectMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listAllObjectKeys(t,r){return Yr(this.configuration).listAllObjectKeys(t,r).then(n=>n(this.axios,this.basePath))}storeObject(t,r,n,a,o){return Yr(this.configuration).storeObject(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const RV=function(e){return{checkNovaVersionUpdate:async(t,r={})=>{x("checkNovaVersionUpdate","channel",t);const n="/system/update",a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};k(s,e),await U(i,e),t!==void 0&&(l.channel=t),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},getDiagnosePackage:async(t={})=>{const r="/system/diagnosis-package/zip",n=new URL(r,$);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};k(o,e),await U(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:D(n),options:o}},getSystemStatus:async(t={})=>{const r="/system/status",n=new URL(r,$);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};k(o,e),await U(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:D(n),options:o}},getSystemVersion:async(t={})=>{const r="/system/version",n=new URL(r,$);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};k(o,e),await U(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:D(n),options:o}},updateNovaVersion:async(t,r={})=>{x("updateNovaVersion","updateNovaVersionRequest",t);const n="/system/update",a=new URL(n,$);let o;e&&(o=e.baseOptions);const s={method:"PUT",...o,...r},i={},l={};k(s,e),await U(i,e),i["Content-Type"]="application/json",L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},s.data=ue(t,s,e),{url:D(a),options:s}}}},Yn=function(e){const t=RV(e);return{async checkNovaVersionUpdate(r,n){var i,l;const a=await t.checkNovaVersionUpdate(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)},async getDiagnosePackage(r){var s,i;const n=await t.getDiagnosePackage(r),a=(e==null?void 0:e.serverIndex)??0,o=(i=(s=j["SystemApi.getDiagnosePackage"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>F(n,_,M,e)(l,o||c)},async getSystemStatus(r){var s,i;const n=await t.getSystemStatus(r),a=(e==null?void 0:e.serverIndex)??0,o=(i=(s=j["SystemApi.getSystemStatus"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>F(n,_,M,e)(l,o||c)},async getSystemVersion(r){var s,i;const n=await t.getSystemVersion(r),a=(e==null?void 0:e.serverIndex)??0,o=(i=(s=j["SystemApi.getSystemVersion"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>F(n,_,M,e)(l,o||c)},async updateNovaVersion(r,n){var i,l;const a=await t.updateNovaVersion(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=j["SystemApi.updateNovaVersion"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,M,e)(c,s||u)}}};class AV extends Ve{checkNovaVersionUpdate(t,r){return Yn(this.configuration).checkNovaVersionUpdate(t,r).then(n=>n(this.axios,this.basePath))}getDiagnosePackage(t){return Yn(this.configuration).getDiagnosePackage(t).then(r=>r(this.axios,this.basePath))}getSystemStatus(t){return Yn(this.configuration).getSystemStatus(t).then(r=>r(this.axios,this.basePath))}getSystemVersion(t){return Yn(this.configuration).getSystemVersion(t).then(r=>r(this.axios,this.basePath))}updateNovaVersion(t,r){return Yn(this.configuration).updateNovaVersion(t,r).then(n=>n(this.axios,this.basePath))}}const _V=function(e){return{getMotionGroupState:async(t,r,n,a={})=>{x("getMotionGroupState","cell",t),x("getMotionGroupState","controller",r),x("getMotionGroupState","id",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(n))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},getMotionGroups:async(t,r,n={})=>{x("getMotionGroups","cell",t),x("getMotionGroups","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/motiongroups".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getVirtualRobotIOValue:async(t,r,n,a={})=>{x("getVirtualRobotIOValue","cell",t),x("getVirtualRobotIOValue","controller",r),x("getVirtualRobotIOValue","io",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(n))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},listIOs:async(t,r,n={})=>{x("listIOs","cell",t),x("listIOs","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/ios".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},setMotionGroupState:async(t,r,n,a,o={})=>{x("setMotionGroupState","cell",t),x("setMotionGroupState","controller",r),x("setMotionGroupState","id",n),x("setMotionGroupState","motionGroupJoints",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(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};k(c,e),await U(u,e),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=ue(a,c,e),{url:D(i),options:c}},setVirtualRobotIOValue:async(t,r,n,a,o,s,i={})=>{x("setVirtualRobotIOValue","cell",t),x("setVirtualRobotIOValue","controller",r),x("setVirtualRobotIOValue","io",n);const l="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(n))),c=new URL(l,$);let u;e&&(u=e.baseOptions);const d={method:"PUT",...u,...i},h={},p={};k(d,e),await U(h,e),a!==void 0&&(p.bool=a),o!==void 0&&(p.integer=o),s!==void 0&&(p.double=s),L(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:D(c),options:d}}}},Kr=function(e){const t=_V(e);return{async getMotionGroupState(r,n,a,o){var c,u;const s=await t.getMotionGroupState(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["VirtualRobotApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async getMotionGroups(r,n,a){var l,c;const o=await t.getMotionGroups(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["VirtualRobotApi.getMotionGroups"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getVirtualRobotIOValue(r,n,a,o){var c,u;const s=await t.getVirtualRobotIOValue(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["VirtualRobotApi.getVirtualRobotIOValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async listIOs(r,n,a){var l,c;const o=await t.listIOs(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["VirtualRobotApi.listIOs"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async setMotionGroupState(r,n,a,o,s){var u,d;const i=await t.setMotionGroupState(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=j["VirtualRobotApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,M,e)(h,c||p)},async setVirtualRobotIOValue(r,n,a,o,s,i,l){var h,p;const c=await t.setVirtualRobotIOValue(r,n,a,o,s,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=j["VirtualRobotApi.setVirtualRobotIOValue"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>F(c,_,M,e)(f,d||m)}}};class EV extends Ve{getMotionGroupState(t,r,n,a){return Kr(this.configuration).getMotionGroupState(t,r,n,a).then(o=>o(this.axios,this.basePath))}getMotionGroups(t,r,n){return Kr(this.configuration).getMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotIOValue(t,r,n,a){return Kr(this.configuration).getVirtualRobotIOValue(t,r,n,a).then(o=>o(this.axios,this.basePath))}listIOs(t,r,n){return Kr(this.configuration).listIOs(t,r,n).then(a=>a(this.axios,this.basePath))}setMotionGroupState(t,r,n,a,o){return Kr(this.configuration).setMotionGroupState(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}setVirtualRobotIOValue(t,r,n,a,o,s,i){return Kr(this.configuration).setVirtualRobotIOValue(t,r,n,a,o,s,i).then(l=>l(this.axios,this.basePath))}}const VV=function(e){return{externalJointsStream:async(t,r,n,a={})=>{x("externalJointsStream","cell",t),x("externalJointsStream","controller",r),x("externalJointsStream","externalJointStreamDatapoint",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/externalJointsStream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}},getMotionGroupBehavior:async(t,r,n,a={})=>{x("getMotionGroupBehavior","cell",t),x("getMotionGroupBehavior","controller",r),x("getMotionGroupBehavior","id",n);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(n))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},setMotionGroupBehavior:async(t,r,n,a,o={})=>{x("setMotionGroupBehavior","cell",t),x("setMotionGroupBehavior","controller",r),x("setMotionGroupBehavior","id",n);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(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};k(c,e),await U(u,e),a!==void 0&&(d.behavior=a),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:D(i),options:c}}}},Ei=function(e){const t=VV(e);return{async externalJointsStream(r,n,a,o){var c,u;const s=await t.externalJointsStream(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["VirtualRobotBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async getMotionGroupBehavior(r,n,a,o){var c,u;const s=await t.getMotionGroupBehavior(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["VirtualRobotBehaviorApi.getMotionGroupBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async setMotionGroupBehavior(r,n,a,o,s){var u,d;const i=await t.setMotionGroupBehavior(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=j["VirtualRobotBehaviorApi.setMotionGroupBehavior"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,M,e)(h,c||p)}}};class IV extends Ve{externalJointsStream(t,r,n,a){return Ei(this.configuration).externalJointsStream(t,r,n,a).then(o=>o(this.axios,this.basePath))}getMotionGroupBehavior(t,r,n,a){return Ei(this.configuration).getMotionGroupBehavior(t,r,n,a).then(o=>o(this.axios,this.basePath))}setMotionGroupBehavior(t,r,n,a,o){return Ei(this.configuration).setMotionGroupBehavior(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const MV=function(e){return{getCycleTime:async(t,r,n={})=>{x("getCycleTime","cell",t),x("getCycleTime","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/cycle-time".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getEStop:async(t,r,n={})=>{x("getEStop","cell",t),x("getEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getOperationMode:async(t,r,n={})=>{x("getOperationMode","cell",t),x("getOperationMode","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},pushEStop:async(t,r,n={})=>{x("pushEStop","cell",t),x("pushEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop/push".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},releaseEStop:async(t,r,n={})=>{x("releaseEStop","cell",t),x("releaseEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop/release".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},setOperationMode:async(t,r,n,a={})=>{x("setOperationMode","cell",t),x("setOperationMode","controller",r),x("setOperationMode","mode",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await U(c,e),n!==void 0&&(u.mode=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}}}},Qr=function(e){const t=MV(e);return{async getCycleTime(r,n,a){var l,c;const o=await t.getCycleTime(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["VirtualRobotModeApi.getCycleTime"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getEStop(r,n,a){var l,c;const o=await t.getEStop(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["VirtualRobotModeApi.getEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async getOperationMode(r,n,a){var l,c;const o=await t.getOperationMode(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["VirtualRobotModeApi.getOperationMode"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async pushEStop(r,n,a){var l,c;const o=await t.pushEStop(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["VirtualRobotModeApi.pushEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async releaseEStop(r,n,a){var l,c;const o=await t.releaseEStop(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["VirtualRobotModeApi.releaseEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async setOperationMode(r,n,a,o){var c,u;const s=await t.setOperationMode(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["VirtualRobotModeApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)}}};class jV extends Ve{getCycleTime(t,r,n){return Qr(this.configuration).getCycleTime(t,r,n).then(a=>a(this.axios,this.basePath))}getEStop(t,r,n){return Qr(this.configuration).getEStop(t,r,n).then(a=>a(this.axios,this.basePath))}getOperationMode(t,r,n){return Qr(this.configuration).getOperationMode(t,r,n).then(a=>a(this.axios,this.basePath))}pushEStop(t,r,n){return Qr(this.configuration).pushEStop(t,r,n).then(a=>a(this.axios,this.basePath))}releaseEStop(t,r,n){return Qr(this.configuration).releaseEStop(t,r,n).then(a=>a(this.axios,this.basePath))}setOperationMode(t,r,n,a){return Qr(this.configuration).setOperationMode(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const $V=function(e){return{addVirtualRobotCoordinateSystem:async(t,r,n,a={})=>{x("addVirtualRobotCoordinateSystem","cell",t),x("addVirtualRobotCoordinateSystem","controller",r),x("addVirtualRobotCoordinateSystem","coordinateSystem",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};k(l,e),await U(c,e),c["Content-Type"]="application/json",L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=ue(n,l,e),{url:D(s),options:l}},addVirtualRobotTcp:async(t,r,n,a,o={})=>{x("addVirtualRobotTcp","cell",t),x("addVirtualRobotTcp","controller",r),x("addVirtualRobotTcp","id",n),x("addVirtualRobotTcp","robotTcp",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(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};k(c,e),await U(u,e),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=ue(a,c,e),{url:D(i),options:c}},deleteVirtualRobotCoordinateSystem:async(t,r,n,a,o={})=>{x("deleteVirtualRobotCoordinateSystem","cell",t),x("deleteVirtualRobotCoordinateSystem","controller",r),x("deleteVirtualRobotCoordinateSystem","coordinateSystem",n);const s="/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(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...o},u={},d={};k(c,e),await U(u,e),a!==void 0&&(d.delete_dependent=a),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:D(i),options:c}},deleteVirtualRobotTcp:async(t,r,n,a,o={})=>{x("deleteVirtualRobotTcp","cell",t),x("deleteVirtualRobotTcp","controller",r),x("deleteVirtualRobotTcp","id",n),x("deleteVirtualRobotTcp","tcp",a);const s="/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(n))).replace("{tcp}",encodeURIComponent(String(a))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...o},u={},d={};k(c,e),await U(u,e),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:D(i),options:c}},getVirtualRobotMounting:async(t,r,n,a={})=>{x("getVirtualRobotMounting","cell",t),x("getVirtualRobotMounting","controller",r),x("getVirtualRobotMounting","id",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(n))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},listVirtualRobotCoordinateSystems:async(t,r,n={})=>{x("listVirtualRobotCoordinateSystems","cell",t),x("listVirtualRobotCoordinateSystems","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};k(i,e),await U(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listVirtualRobotTcps:async(t,r,n,a={})=>{x("listVirtualRobotTcps","cell",t),x("listVirtualRobotTcps","controller",r),x("listVirtualRobotTcps","id",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(n))),s=new URL(o,$);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};k(l,e),await U(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},setVirtualRobotMounting:async(t,r,n,a,o={})=>{x("setVirtualRobotMounting","cell",t),x("setVirtualRobotMounting","controller",r),x("setVirtualRobotMounting","id",n),x("setVirtualRobotMounting","coordinateSystem",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(n))),i=new URL(s,$);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};k(c,e),await U(u,e),u["Content-Type"]="application/json",L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=ue(a,c,e),{url:D(i),options:c}}}},er=function(e){const t=$V(e);return{async addVirtualRobotCoordinateSystem(r,n,a,o){var c,u;const s=await t.addVirtualRobotCoordinateSystem(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["VirtualRobotSetupApi.addVirtualRobotCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async addVirtualRobotTcp(r,n,a,o,s){var u,d;const i=await t.addVirtualRobotTcp(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=j["VirtualRobotSetupApi.addVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,M,e)(h,c||p)},async deleteVirtualRobotCoordinateSystem(r,n,a,o,s){var u,d;const i=await t.deleteVirtualRobotCoordinateSystem(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=j["VirtualRobotSetupApi.deleteVirtualRobotCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,M,e)(h,c||p)},async deleteVirtualRobotTcp(r,n,a,o,s){var u,d;const i=await t.deleteVirtualRobotTcp(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=j["VirtualRobotSetupApi.deleteVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,M,e)(h,c||p)},async getVirtualRobotMounting(r,n,a,o){var c,u;const s=await t.getVirtualRobotMounting(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["VirtualRobotSetupApi.getVirtualRobotMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async listVirtualRobotCoordinateSystems(r,n,a){var l,c;const o=await t.listVirtualRobotCoordinateSystems(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=j["VirtualRobotSetupApi.listVirtualRobotCoordinateSystems"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,M,e)(u,i||d)},async listVirtualRobotTcps(r,n,a,o){var c,u;const s=await t.listVirtualRobotTcps(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=j["VirtualRobotSetupApi.listVirtualRobotTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,M,e)(d,l||h)},async setVirtualRobotMounting(r,n,a,o,s){var u,d;const i=await t.setVirtualRobotMounting(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=j["VirtualRobotSetupApi.setVirtualRobotMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,M,e)(h,c||p)}}};class kV extends Ve{addVirtualRobotCoordinateSystem(t,r,n,a){return er(this.configuration).addVirtualRobotCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}addVirtualRobotTcp(t,r,n,a,o){return er(this.configuration).addVirtualRobotTcp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteVirtualRobotCoordinateSystem(t,r,n,a,o){return er(this.configuration).deleteVirtualRobotCoordinateSystem(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteVirtualRobotTcp(t,r,n,a,o){return er(this.configuration).deleteVirtualRobotTcp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getVirtualRobotMounting(t,r,n,a){return er(this.configuration).getVirtualRobotMounting(t,r,n,a).then(o=>o(this.axios,this.basePath))}listVirtualRobotCoordinateSystems(t,r,n){return er(this.configuration).listVirtualRobotCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}listVirtualRobotTcps(t,r,n,a){return er(this.configuration).listVirtualRobotTcps(t,r,n,a).then(o=>o(this.axios,this.basePath))}setVirtualRobotMounting(t,r,n,a,o){return er(this.configuration).setVirtualRobotMounting(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}function Lt(e,t,r){return Math.max(t,Math.min(r,e))}class UV{constructor(t=0,r=0,n=0,a=1){this.isQuaternion=!0,this._x=t,this._y=r,this._z=n,this._w=a}static slerpFlat(t,r,n,a,o,s,i){let l=n[a+0],c=n[a+1],u=n[a+2],d=n[a+3];const h=o[s+0],p=o[s+1],f=o[s+2],m=o[s+3];if(i===0){t[r+0]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d;return}if(i===1){t[r+0]=h,t[r+1]=p,t[r+2]=f,t[r+3]=m;return}if(d!==m||l!==h||c!==p||u!==f){let v=1-i;const S=l*h+c*p+u*f+d*m,E=S>=0?1:-1,O=1-S*S;if(O>Number.EPSILON){const T=Math.sqrt(O),C=Math.atan2(T,S*E);v=Math.sin(v*C)/T,i=Math.sin(i*C)/T}const w=i*E;if(l=l*v+h*w,c=c*v+p*w,u=u*v+f*w,d=d*v+m*w,v===1-i){const T=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=T,c*=T,u*=T,d*=T}}t[r]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d}static multiplyQuaternionsFlat(t,r,n,a,o,s){const i=n[a],l=n[a+1],c=n[a+2],u=n[a+3],d=o[s],h=o[s+1],p=o[s+2],f=o[s+3];return t[r]=i*f+u*d+l*p-c*h,t[r+1]=l*f+u*h+c*d-i*p,t[r+2]=c*f+u*p+i*h-l*d,t[r+3]=u*f-i*d-l*h-c*p,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,n,a){return this._x=t,this._y=r,this._z=n,this._w=a,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 n=t._x,a=t._y,o=t._z,s=t._order,i=Math.cos,l=Math.sin,c=i(n/2),u=i(a/2),d=i(o/2),h=l(n/2),p=l(a/2),f=l(o/2);switch(s){case"XYZ":this._x=h*u*d+c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d-h*p*f;break;case"YXZ":this._x=h*u*d+c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d+h*p*f;break;case"ZXY":this._x=h*u*d-c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d-h*p*f;break;case"ZYX":this._x=h*u*d-c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d+h*p*f;break;case"YZX":this._x=h*u*d+c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d-h*p*f;break;case"XZY":this._x=h*u*d-c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d+h*p*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,r){const n=r/2,a=Math.sin(n);return this._x=t.x*a,this._y=t.y*a,this._z=t.z*a,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const r=t.elements,n=r[0],a=r[4],o=r[8],s=r[1],i=r[5],l=r[9],c=r[2],u=r[6],d=r[10],h=n+i+d;if(h>0){const p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(u-l)*p,this._y=(o-c)*p,this._z=(s-a)*p}else if(n>i&&n>d){const p=2*Math.sqrt(1+n-i-d);this._w=(u-l)/p,this._x=.25*p,this._y=(a+s)/p,this._z=(o+c)/p}else if(i>d){const p=2*Math.sqrt(1+i-n-d);this._w=(o-c)/p,this._x=(a+s)/p,this._y=.25*p,this._z=(l+u)/p}else{const p=2*Math.sqrt(1+d-n-i);this._w=(s-a)/p,this._x=(o+c)/p,this._y=(l+u)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(t,r){let n=t.dot(r)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(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=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Lt(this.dot(t),-1,1)))}rotateTowards(t,r){const n=this.angleTo(t);if(n===0)return this;const a=Math.min(1,r/n);return this.slerp(t,a),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 n=t._x,a=t._y,o=t._z,s=t._w,i=r._x,l=r._y,c=r._z,u=r._w;return this._x=n*u+s*i+a*c-o*l,this._y=a*u+s*l+o*i-n*c,this._z=o*u+s*c+n*l-a*i,this._w=s*u-n*i-a*l-o*c,this._onChangeCallback(),this}slerp(t,r){if(r===0)return this;if(r===1)return this.copy(t);const n=this._x,a=this._y,o=this._z,s=this._w;let i=s*t._w+n*t._x+a*t._y+o*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=s,this._x=n,this._y=a,this._z=o,this;const l=1-i*i;if(l<=Number.EPSILON){const p=1-r;return this._w=p*s+r*this._w,this._x=p*n+r*this._x,this._y=p*a+r*this._y,this._z=p*o+r*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,i),d=Math.sin((1-r)*u)/c,h=Math.sin(r*u)/c;return this._w=s*d+this._w*h,this._x=n*d+this._x*h,this._y=a*d+this._y*h,this._z=o*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(t,r,n){return this.copy(t).slerp(r,n)}random(){const t=2*Math.PI*Math.random(),r=2*Math.PI*Math.random(),n=Math.random(),a=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(a*Math.sin(t),a*Math.cos(t),o*Math.sin(r),o*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 cn{constructor(t=0,r=0,n=0){cn.prototype.isVector3=!0,this.x=t,this.y=r,this.z=n}set(t,r,n){return n===void 0&&(n=this.z),this.x=t,this.y=r,this.z=n,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(Xd.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(Xd.setFromAxisAngle(t,r))}applyMatrix3(t){const r=this.x,n=this.y,a=this.z,o=t.elements;return this.x=o[0]*r+o[3]*n+o[6]*a,this.y=o[1]*r+o[4]*n+o[7]*a,this.z=o[2]*r+o[5]*n+o[8]*a,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const r=this.x,n=this.y,a=this.z,o=t.elements,s=1/(o[3]*r+o[7]*n+o[11]*a+o[15]);return this.x=(o[0]*r+o[4]*n+o[8]*a+o[12])*s,this.y=(o[1]*r+o[5]*n+o[9]*a+o[13])*s,this.z=(o[2]*r+o[6]*n+o[10]*a+o[14])*s,this}applyQuaternion(t){const r=this.x,n=this.y,a=this.z,o=t.x,s=t.y,i=t.z,l=t.w,c=2*(s*a-i*n),u=2*(i*r-o*a),d=2*(o*n-s*r);return this.x=r+l*c+s*d-i*u,this.y=n+l*u+i*c-o*d,this.z=a+l*d+o*u-s*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,n=this.y,a=this.z,o=t.elements;return this.x=o[0]*r+o[4]*n+o[8]*a,this.y=o[1]*r+o[5]*n+o[9]*a,this.z=o[2]*r+o[6]*n+o[10]*a,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=Lt(this.x,t.x,r.x),this.y=Lt(this.y,t.y,r.y),this.z=Lt(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=Lt(this.x,t,r),this.y=Lt(this.y,t,r),this.z=Lt(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Lt(n,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,n){return this.x=t.x+(r.x-t.x)*n,this.y=t.y+(r.y-t.y)*n,this.z=t.z+(r.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,r){const n=t.x,a=t.y,o=t.z,s=r.x,i=r.y,l=r.z;return this.x=a*l-o*i,this.y=o*s-n*l,this.z=n*i-a*s,this}projectOnVector(t){const r=t.lengthSq();if(r===0)return this.set(0,0,0);const n=t.dot(this)/r;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return Vi.copy(this).projectOnVector(t),this.sub(Vi)}reflect(t){return this.sub(Vi.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 n=this.dot(t)/r;return Math.acos(Lt(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const r=this.x-t.x,n=this.y-t.y,a=this.z-t.z;return r*r+n*n+a*a}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,n){const a=Math.sin(r)*t;return this.x=a*Math.sin(n),this.y=Math.cos(r)*t,this.z=a*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,r,n){return this.x=t*Math.sin(r),this.y=n,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(),n=this.setFromMatrixColumn(t,1).length(),a=this.setFromMatrixColumn(t,2).length();return this.x=r,this.y=n,this.z=a,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,n=Math.sqrt(1-r*r);return this.x=n*Math.cos(t),this.y=r,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Vi=new cn,Xd=new UV;function LV(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 n=0;n<e.length;n++){var a=e[n];if(typeof a!="string")throw new TypeError("Url must be a string. Received "+a);a!==""&&(n>0&&(a=a.replace(/^[\/]+/,"")),n<e.length-1?a=a.replace(/[\/]+$/,""):a=a.replace(/[\/]+$/,"/"),t.push(a))}var o=t.join("/");o=o.replace(/\/(\?|&|#[^!])/g,"$1");var s=o.split("?");return o=s.shift()+(s.length>0?"?":"")+s.join("&"),o}function Ii(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),LV(e)}var _t={},Zd;function DV(){if(Zd)return _t;Zd=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.TokenData=void 0,_t.parse=d,_t.compile=h,_t.match=m,_t.pathToRegexp=v,_t.stringify=w;const e="/",t=A=>A,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,a="https://git.new/pathToRegexpError",o={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function s(A){return A.replace(/[{}()\[\]+?!:*]/g,"\\$&")}function i(A){return A.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}function*l(A){const V=[...A];let B=0;function y(){let R="";if(r.test(V[++B]))for(R+=V[B];n.test(V[++B]);)R+=V[B];else if(V[B]==='"'){let G=B;for(;B<V.length;){if(V[++B]==='"'){B++,G=0;break}V[B]==="\\"?R+=V[++B]:R+=V[B]}if(G)throw new TypeError(`Unterminated quote at ${G}: ${a}`)}if(!R)throw new TypeError(`Missing parameter name at ${B}: ${a}`);return R}for(;B<V.length;){const R=V[B],G=o[R];if(G)yield{type:G,index:B++,value:R};else if(R==="\\")yield{type:"ESCAPED",index:B++,value:V[B++]};else if(R===":"){const P=y();yield{type:"PARAM",index:B,value:P}}else if(R==="*"){const P=y();yield{type:"WILDCARD",index:B,value:P}}else yield{type:"CHAR",index:B,value:V[B++]}}return{type:"END",index:B,value:""}}class c{constructor(V){this.tokens=V}peek(){if(!this._peek){const V=this.tokens.next();this._peek=V.value}return this._peek}tryConsume(V){const B=this.peek();if(B.type===V)return this._peek=void 0,B.value}consume(V){const B=this.tryConsume(V);if(B!==void 0)return B;const{type:y,index:R}=this.peek();throw new TypeError(`Unexpected ${y} at ${R}, expected ${V}: ${a}`)}text(){let V="",B;for(;B=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)V+=B;return V}}class u{constructor(V){this.tokens=V}}_t.TokenData=u;function d(A,V={}){const{encodePath:B=t}=V,y=new c(l(A));function R(P){const N=[];for(;;){const re=y.text();re&&N.push({type:"text",value:B(re)});const Z=y.tryConsume("PARAM");if(Z){N.push({type:"param",name:Z});continue}const ae=y.tryConsume("WILDCARD");if(ae){N.push({type:"wildcard",name:ae});continue}if(y.tryConsume("{")){N.push({type:"group",tokens:R("}")});continue}return y.consume(P),N}}const G=R("END");return new u(G)}function h(A,V={}){const{encode:B=encodeURIComponent,delimiter:y=e}=V,R=A instanceof u?A:d(A,V),G=p(R.tokens,y,B);return function(N={}){const[re,...Z]=G(N);if(Z.length)throw new TypeError(`Missing parameters: ${Z.join(", ")}`);return re}}function p(A,V,B){const y=A.map(R=>f(R,V,B));return R=>{const G=[""];for(const P of y){const[N,...re]=P(R);G[0]+=N,G.push(...re)}return G}}function f(A,V,B){if(A.type==="text")return()=>[A.value];if(A.type==="group"){const R=p(A.tokens,V,B);return G=>{const[P,...N]=R(G);return N.length?[""]:[P]}}const y=B||t;return A.type==="wildcard"&&B!==!1?R=>{const G=R[A.name];if(G==null)return["",A.name];if(!Array.isArray(G)||G.length===0)throw new TypeError(`Expected "${A.name}" to be a non-empty array`);return[G.map((P,N)=>{if(typeof P!="string")throw new TypeError(`Expected "${A.name}/${N}" to be a string`);return y(P)}).join(V)]}:R=>{const G=R[A.name];if(G==null)return["",A.name];if(typeof G!="string")throw new TypeError(`Expected "${A.name}" to be a string`);return[y(G)]}}function m(A,V={}){const{decode:B=decodeURIComponent,delimiter:y=e}=V,{regexp:R,keys:G}=v(A,V),P=G.map(N=>B===!1?t:N.type==="param"?B:re=>re.split(y).map(B));return function(re){const Z=R.exec(re);if(!Z)return!1;const ae=Z[0],te=Object.create(null);for(let se=1;se<Z.length;se++){if(Z[se]===void 0)continue;const J=G[se-1],ee=P[se-1];te[J.name]=ee(Z[se])}return{path:ae,params:te}}}function v(A,V={}){const{delimiter:B=e,end:y=!0,sensitive:R=!1,trailing:G=!0}=V,P=[],N=[],re=R?"":"i",ae=(Array.isArray(A)?A:[A]).map(J=>J instanceof u?J:d(J,V));for(const{tokens:J}of ae)for(const ee of S(J,0,[])){const he=E(ee,B,P);N.push(he)}let te=`^(?:${N.join("|")})`;return G&&(te+=`(?:${i(B)}$)?`),te+=y?"$":`(?=${i(B)}|$)`,{regexp:new RegExp(te,re),keys:P}}function*S(A,V,B){if(V===A.length)return yield B;const y=A[V];if(y.type==="group"){const R=B.slice();for(const G of S(y.tokens,0,R))yield*S(A,V+1,G)}else B.push(y);yield*S(A,V+1,B)}function E(A,V,B){let y="",R="",G=!0;for(let P=0;P<A.length;P++){const N=A[P];if(N.type==="text"){y+=i(N.value),R+=N.value,G||(G=N.value.includes(V));continue}if(N.type==="param"||N.type==="wildcard"){if(!G&&!R)throw new TypeError(`Missing text after "${N.name}": ${a}`);N.type==="param"?y+=`(${O(V,G?"":R)}+)`:y+="([\\s\\S]+)",B.push(N),R="",G=!1;continue}}return y}function O(A,V){return V.length<2?A.length<2?`[^${i(A+V)}]`:`(?:(?!${i(A)})[^${i(V)}])`:A.length<2?`(?:(?!${i(V)})[^${i(A)}])`:`(?:(?!${i(V)}|${i(A)})[\\s\\S])`}function w(A){return A.tokens.map(function V(B,y,R){if(B.type==="text")return s(B.value);if(B.type==="group")return`{${B.tokens.map(V).join("")}}`;const P=T(B.name)&&C(R[y+1])?B.name:JSON.stringify(B.name);if(B.type==="param")return`:${P}`;if(B.type==="wildcard")return`*${P}`;throw new TypeError(`Unexpected token: ${B}`)}).join("")}function T(A){const[V,...B]=A;return r.test(V)?B.every(y=>n.test(y)):!1}function C(A){return(A==null?void 0:A.type)!=="text"?!0:!n.test(A.value[0])}return _t}var FV=DV();function vf(e,t,r){if(t.length!==e.length)return!0;for(let n=0;n<t.length;n++)if(Math.abs(t[n]-e[n])>r)return!1;return!0}function xf(e,t,r){if(e===void 0&&t||e&&t===void 0)return!1;if(e===void 0||t===void 0)return!0;let n=0;return n+=Math.abs(e.orientation.x-t.orientation.x),n+=Math.abs(e.orientation.y-t.orientation.y),n+=Math.abs(e.orientation.z-t.orientation.z),n+=Math.abs(e.position.x-t.position.x),n+=Math.abs(e.position.y-t.position.y),n+=Math.abs(e.position.z-t.position.z),n>r?!1:e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp}var eh=1e-4,BV=class Sf{constructor(t,r,n,a,o,s,i,l,c,u,d,h){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=a,this.motionStateSocket=o,this.isVirtual=s,this.tcps=i,this.motionGroupSpecification=l,this.safetySetup=c,this.mounting=u,this.initialControllerState=d,this.controllerStateSocket=h,this.connectedJoggingCartesianSocket=null,this.connectedJoggingJointsSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.rapidlyChangingMotionState=a,this.controllerState=d,h.addEventListener("message",p=>{var f;const m=(f=ar(p.data))==null?void 0:f.result;m&&Fe.runInAction(()=>{this.controllerState=m})}),o.addEventListener("message",p=>{var f;const m=(f=ar(p.data))==null?void 0:f.result;if(!m)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${p.data}`);vf(this.rapidlyChangingMotionState.state.joint_position.joints,m.state.joint_position.joints,eh)||Fe.runInAction(()=>{this.rapidlyChangingMotionState.state=m.state}),xf(this.rapidlyChangingMotionState.tcp_pose,m.tcp_pose,eh)||Fe.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=m.tcp_pose})}),Fe.makeAutoObservable(this)}static connect(t,r,n){return Ee(this,null,function*(){var a,o;const[s,i]=r.split("@"),l=n.find(C=>C.controller===i),c=l==null?void 0:l.physical_motion_groups.find(C=>C.motion_group===r);if(!l||!c)throw new Error(`Controller ${i} or motion group ${r} not found`);const u=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),d=yield u.firstMessage(),h=(a=ar(d.data))==null?void 0:a.result;if(!h)throw new Error(`Unable to parse initial motion state message ${d.data}`);console.log(`Connected motion state websocket to motion group ${c.motion_group}. Initial state:
|
|
151
|
-
`,h);const f=(yield t.api.controller.getRobotController(l.controller)).configuration.kind==="VirtualController",m=yield Ee(this,null,function*(){try{return yield t.api.motionGroupInfos.getMounting(c.motion_group)}catch(
|
|
152
|
-
`,E);const{tcps:O}=yield t.api.motionGroupInfos.listTcps(r),w=yield t.api.motionGroupInfos.getMotionGroupSpecification(r),T=yield t.api.motionGroupInfos.getSafetySetup(r);return new Sf(t,l,c,h,u,f,O,w,T,m,E,v)})}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,n,a,o,s;const i=new ke.Vector3(((r=(t=this.mounting)==null?void 0:t.pose.orientation)==null?void 0:r.x)||0,((a=(n=this.mounting)==null?void 0:n.pose.orientation)==null?void 0:a.y)||0,((s=(o=this.mounting)==null?void 0:o.pose.orientation)==null?void 0:s.z)||0),l=i.length(),c=i.normalize();return new ke.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 Ee(this,null,function*(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}Fe.runInAction(()=>{this.activationState="deactivating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_MONITOR"),Fe.runInAction(()=>{this.activationState="inactive"})}catch(t){throw Fe.runInAction(()=>{this.activationState="active"}),t}})}activate(){return Ee(this,null,function*(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}Fe.runInAction(()=>{this.activationState="activating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_CONTROL"),Fe.runInAction(()=>{this.activationState="active"})}catch(t){throw Fe.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}},NV=class Of{constructor(t,r={}){this.motionStream=t,this.opts=r,this.cartesianWebsocket=null,this.jointWebsocket=null,this.cartesianJoggingOpts={}}static open(t,r){return Ee(this,arguments,function*(n,a,o={}){const s=yield n.connectMotionStream(a);return new Of(s,o)})}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 Ee(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&&(qA(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",n=>{const a=ar(n.data);if(a&&"error"in a)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)})),t==="joint"&&!this.jointWebsocket&&(this.jointWebsocket=this.nova.openReconnectingWebsocket("/motion-groups/move-joint"),this.jointWebsocket.addEventListener("message",n=>{const a=ar(n.data);if(a&&"error"in a)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)}))}startJointRotation(t){return Ee(this,arguments,function*({joint:r,direction:n,velocityRadsPerSec:a}){if(!this.jointWebsocket)throw new Error("Joint jogging websocket not connected; call setJoggingMode first");const o=new Array(this.numJoints).fill(0);o[r]=n==="-"?-a:a,this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:o})})}startTCPTranslation(t){return Ee(this,arguments,function*({axis:r,direction:n,velocityMmPerSec:a}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const o={x:0,y:0,z:0},s=Object.assign({},o);s[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:s,rotation_direction:o,position_velocity:a,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}startTCPRotation(t){return Ee(this,arguments,function*({axis:r,direction:n,velocityRadsPerSec:a}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const o={x:0,y:0,z:0},s=Object.assign({},o);s[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:o,rotation_direction:s,position_velocity:0,rotation_velocity:a,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}runIncrementalCartesianMotion(t){return Ee(this,arguments,function*({currentTcpPose:r,currentJoints:n,coordSystemId:a,velocityInRelevantUnits:o,axis:s,direction:i,motion:l}){var c;const u=[];if(!l_(r.coordinate_system,a))throw new Error(`Current TCP pose coordinate system ${r.coordinate_system} does not match target coordinate system ${a}`);if(l.type==="translate"){const p=Object.assign({},r.position);p[s]+=l.distanceMm*(i==="-"?-1:1),u.push({settings:{limits_override:{tcp_velocity_limit:o}},line:{position:p,orientation:r.orientation,coordinate_system:a}})}else if(l.type==="rotate"){const p=new cn(r.orientation.x,r.orientation.y,r.orientation.z),f=p.length(),m=p.clone().normalize(),v=l.distanceRads*(i==="-"?-1:1),S=new cn(0,0,0);S[s]=1;const E=Math.cos(.5*v)*Math.cos(.5*f),O=Math.sin(.5*v)*Math.sin(.5*f),w=Math.sin(.5*v)*Math.cos(.5*f),T=Math.cos(.5*v)*Math.sin(.5*f),C=S.dot(m),A=S.clone().cross(m),V=2*Math.acos(E-O*C),B=V/Math.sin(.5*V),y=new cn().addScaledVector(A,O).addScaledVector(S,w).addScaledVector(m,T).multiplyScalar(B);u.push({settings:{limits_override:{tcp_orientation_velocity_limit:o}},line:{position:r.position,orientation:y,coordinate_system:a}})}const d=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:n,tcp:this.cartesianJoggingOpts.tcpId,commands:u}),h=(c=d.plan_successful_response)==null?void 0:c.motion;if(!h)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(d)}`);yield this.nova.api.motion.streamMoveForward(h,100,void 0,void 0,void 0,{timeout:1e3*60})})}runIncrementalJointRotation(t){return Ee(this,arguments,function*({joint:r,currentJoints:n,velocityRadsPerSec:a,direction:o,distanceRads:s}){var i;const l=[...n.joints];l[r]+=s*(o==="-"?-1:1);const c=new Array(n.joints.length).fill(a),u=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:n,commands:[{settings:{limits_override:{joint_velocity_limits:{joints:c}}},joint_ptp:{joints:l}}]}),d=(i=u.plan_successful_response)==null?void 0:i.motion;if(!d){console.error("Failed to plan jogging increment motion",u);return}yield this.nova.api.motion.streamMoveForward(d,100,void 0,void 0,void 0,{timeout:1e3*60})})}},th=1e-4;function zV(e,t){const r=new St.Vector3(t.x,t.y,t.z),n=new St.Vector3(e.x,e.y,e.z),a=r.length(),o=r.normalize();let s=n.length(),i=n.normalize();i.dot(o)<0&&(s=-s,i=i.multiplyScalar(-1));let l=s-a;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),s=a+l,i.multiplyScalar(s)}var GV=class wf{constructor(t,r,n,a,o){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=a,this.motionStateSocket=o,this.rapidlyChangingMotionState=a,o.addEventListener("message",s=>{var i;const l=(i=ar(s.data))==null?void 0:i.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${s.data}`);vf(this.rapidlyChangingMotionState.state.joint_position.joints,l.state.joint_position.joints,th)||Fe.runInAction(()=>{this.rapidlyChangingMotionState.state=l.state}),xf(this.rapidlyChangingMotionState.tcp_pose,l.tcp_pose,th)||Fe.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:zV(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation),tcp:l.tcp_pose.tcp,coordinate_system:l.tcp_pose.coordinate_system}})}),Fe.makeAutoObservable(this)}static open(t,r){return Ee(this,null,function*(){var n;const{instances:a}=yield t.api.controller.listControllers(),[o,s]=r.split("@"),i=a.find(h=>h.controller===s),l=i==null?void 0:i.physical_motion_groups.find(h=>h.motion_group===r);if(!i||!l)throw new Error(`Controller ${s} or motion group ${r} not found`);const c=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),u=yield c.firstMessage();console.log("got first message",u);const d=(n=ar(u.data))==null?void 0:n.result;if(!d)throw new Error(`Unable to parse initial motion state message ${u.data}`);return console.log(`Connected motion state websocket to motion group ${l.motion_group}. Initial state:
|
|
153
|
-
`,d),new wf(t,i,l,d,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()}},HV=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(AV),this.cell=this.withUnwrappedResponsesOnly(GE),this.deviceConfig=this.withCellId(XE),this.motionGroup=this.withCellId(uV),this.motionGroupInfos=this.withCellId(hV),this.controller=this.withCellId(qE),this.program=this.withCellId(bV),this.programValues=this.withCellId(xV),this.controllerIOs=this.withCellId(WE),this.motionGroupKinematic=this.withCellId(gV),this.motion=this.withCellId(lV),this.coordinateSystems=this.withCellId(KE),this.application=this.withCellId(Qd),this.applicationGlobal=this.withUnwrappedResponsesOnly(Qd),this.motionGroupJogging=this.withCellId(mV),this.virtualRobot=this.withCellId(EV),this.virtualRobotSetup=this.withCellId(kV),this.virtualRobotMode=this.withCellId(jV),this.virtualRobotBehavior=this.withCellId(IV),this.libraryProgramMetadata=this.withCellId(rV),this.libraryProgram=this.withCellId(eV),this.libraryRecipeMetadata=this.withCellId(sV),this.libraryRecipe=this.withCellId(aV),this.storeObject=this.withCellId(TV),this.storeCollisionComponents=this.withCellId(OV),this.storeCollisionScenes=this.withCellId(CV)}withCellId(e){var t,r;const n=new e(il(rn({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:_.create());for(const a of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(a!=="constructor"&&typeof n[a]=="function"){const o=n[a];n[a]=(...s)=>o.apply(n,[this.cellId,...s]).then(i=>i.data)}return n}withUnwrappedResponsesOnly(e){var t,r;const n=new e(il(rn({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:_.create());for(const a of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(a!=="constructor"&&typeof n[a]=="function"){const o=n[a];n[a]=(...s)=>o.apply(n,s).then(i=>i.data)}return n}},qV=class{constructor(){this.connections=[]}handleAPIRequest(e){return Ee(this,null,function*(){var t,r,n;const a=[{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"}}]}}}],o=((t=e.method)==null?void 0:t.toUpperCase())||"GET",s="/cells"+((n=(r=e.url)==null?void 0:r.split("/cells")[1])==null?void 0:n.split("?")[0]);for(const i of a){const l=FV.match(i.path)(s||"");if(o===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 ml(`No mock handler matched this request: ${o} ${s}`,"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(JV)})),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)}},JV={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]},sequence_number:"1"},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"}}},WV=class{constructor(e){this.authPromise=null,this.accessToken=null;var t;const r=(t=e.cellId)!=null?t:"cell";this.config=rn({cellId:r},e),this.accessToken=e.accessToken||Pi.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"&&(this.mock=new qV);const n=_.create({baseURL:Ii(this.config.instanceUrl,"/api/v1"),headers:{"User-Agent":"Wandelbots-Nova-JS-SDK"}});n.interceptors.request.use(a=>Ee(this,null,function*(){return a.headers.Authorization||(this.accessToken?a.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(a.headers.Authorization=`Basic ${btoa(e.username+":"+e.password)}`)),a})),typeof window<"u"&&n.interceptors.response.use(a=>a,a=>Ee(this,null,function*(){var o,s;if(FE(a))if(((o=a.response)==null?void 0:o.status)===401)try{if(yield this.renewAuthentication(),a.config)return this.accessToken?a.config.headers.Authorization=`Bearer ${this.accessToken}`:delete a.config.headers.Authorization,n.request(a.config)}catch(i){return Promise.reject(i)}else((s=a.response)==null?void 0:s.status)===503&&(yield fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(a)})),this.api=new HV(r,il(rn({},e),{basePath:Ii(this.config.instanceUrl,"/api/v1"),isJsonMime:a=>a==="application/json",baseOptions:rn(rn({},this.mock?{adapter:a=>this.mock.handleAPIRequest(a)}:{}),e.baseOptions),axiosInstance:n}))}renewAuthentication(){return Ee(this,null,function*(){if(!this.authPromise){this.authPromise=u_(this.config.instanceUrl);try{this.accessToken=yield this.authPromise,this.accessToken?Pi.setString("wbjs.access_token",this.accessToken):Pi.delete("wbjs.access_token")}finally{this.authPromise=null}}})}makeWebsocketURL(e){const t=new URL(Ii(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 s_(this.makeWebsocketURL(e),{mock:this.mock})}connectMotionStream(e){return Ee(this,null,function*(){return yield GV.open(this,e)})}connectJogger(e){return Ee(this,null,function*(){return yield NV.open(this,e)})}connectMotionGroups(e){return Ee(this,null,function*(){const{instances:t}=yield this.api.controller.listControllers();return Promise.all(e.map(r=>BV.connect(this,r,t)))})}connectMotionGroup(e){return Ee(this,null,function*(){return(yield this.connectMotionGroups([e]))[0]})}};function YV(e){try{return JSON.stringify(e)}catch{return}}function KV(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function QV(e){var t,r,n,a;return e instanceof ml&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof ml&&e.response?`${(t=e.response)==null?void 0:t.status} ${(r=e.response)==null?void 0:r.statusText} from ${(n=e.response)==null?void 0:n.config.url}: ${JSON.stringify((a=e.response)==null?void 0:a.data)}`:e instanceof Error?e.message:`Unexpected error: ${YV(e)||e}`}const vc=e=>{const t=e.softTimeout||3e3,[r,n]=Q.useState(!1),a=z.useTheme();return Q.useEffect(()=>{const o=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(o)}),g.jsx(z.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:a.palette.text.primary},children:e.error?g.jsx(Cf,{loadingMessage:e.message,error:e.error}):g.jsxs(g.Fragment,{children:[g.jsx(z.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&g.jsx("div",{children:e.message}),g.jsx(z.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:a.palette.text.secondary},children:"This is taking longer than expected..."})]})})},Cf=e=>{const t=QV(e.error),r=e.error instanceof Error?e.error.stack:null,n=z.useTheme();return g.jsxs(z.Stack,{sx:{maxHeight:"100%",maxWidth:"min(100%, 800px)",padding:2,overflow:"auto",color:n.palette.error.main,"& pre":{whiteSpace:"pre-wrap",wordBreak:"break-word",paddingBottom:"3rem"}},children:[(e.loadingMessage?`Error while ${wl.lowerFirst(z.capitalize(e.loadingMessage))} - `:"")+t,g.jsx("br",{}),r&&g.jsx("pre",{children:r})]})},XV=({title:e,titleId:t,...r},n)=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.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"})),ZV=Q.forwardRef(XV),eI=({title:e,titleId:t,...r},n)=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.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"})),tI=Q.forwardRef(eI),rI=({title:e,titleId:t,...r},n)=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.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"})),nI=Q.forwardRef(rI),aI=({title:e,titleId:t,...r},n)=>I.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.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"})),oI=Q.forwardRef(aI);function sI(){this.__data__=[],this.size=0}function Pf(e,t){return e===t||e!==e&&t!==t}function Us(e,t){for(var r=e.length;r--;)if(Pf(e[r][0],t))return r;return-1}var iI=Array.prototype,lI=iI.splice;function cI(e){var t=this.__data__,r=Us(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():lI.call(t,r,1),--this.size,!0}function uI(e){var t=this.__data__,r=Us(t,e);return r<0?void 0:t[r][1]}function dI(e){return Us(this.__data__,e)>-1}function hI(e,t){var r=this.__data__,n=Us(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Yt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Yt.prototype.clear=sI;Yt.prototype.delete=cI;Yt.prototype.get=uI;Yt.prototype.has=dI;Yt.prototype.set=hI;function pI(){this.__data__=new Yt,this.size=0}function mI(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function fI(e){return this.__data__.get(e)}function gI(e){return this.__data__.has(e)}var yI="[object AsyncFunction]",bI="[object Function]",vI="[object GeneratorFunction]",xI="[object Proxy]";function Tf(e){if(!wr(e))return!1;var t=Mr(e);return t==bI||t==vI||t==yI||t==xI}var Mi=$t["__core-js_shared__"],rh=function(){var e=/[^.]+$/.exec(Mi&&Mi.keys&&Mi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function SI(e){return!!rh&&rh in e}var OI=Function.prototype,wI=OI.toString;function $r(e){if(e!=null){try{return wI.call(e)}catch{}try{return e+""}catch{}}return""}var CI=/[\\^$.*+?()[\]{}|]/g,PI=/^\[object .+?Constructor\]$/,TI=Function.prototype,RI=Object.prototype,AI=TI.toString,_I=RI.hasOwnProperty,EI=RegExp("^"+AI.call(_I).replace(CI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function VI(e){if(!wr(e)||SI(e))return!1;var t=Tf(e)?EI:PI;return t.test($r(e))}function II(e,t){return e==null?void 0:e[t]}function kr(e,t){var r=II(e,t);return VI(r)?r:void 0}var ba=kr($t,"Map"),va=kr(Object,"create");function MI(){this.__data__=va?va(null):{},this.size=0}function jI(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var $I="__lodash_hash_undefined__",kI=Object.prototype,UI=kI.hasOwnProperty;function LI(e){var t=this.__data__;if(va){var r=t[e];return r===$I?void 0:r}return UI.call(t,e)?t[e]:void 0}var DI=Object.prototype,FI=DI.hasOwnProperty;function BI(e){var t=this.__data__;return va?t[e]!==void 0:FI.call(t,e)}var NI="__lodash_hash_undefined__";function zI(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=va&&t===void 0?NI:t,this}function Tr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Tr.prototype.clear=MI;Tr.prototype.delete=jI;Tr.prototype.get=LI;Tr.prototype.has=BI;Tr.prototype.set=zI;function GI(){this.size=0,this.__data__={hash:new Tr,map:new(ba||Yt),string:new Tr}}function HI(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ls(e,t){var r=e.__data__;return HI(t)?r[typeof t=="string"?"string":"hash"]:r.map}function qI(e){var t=Ls(this,e).delete(e);return this.size-=t?1:0,t}function JI(e){return Ls(this,e).get(e)}function WI(e){return Ls(this,e).has(e)}function YI(e,t){var r=Ls(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Kt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Kt.prototype.clear=GI;Kt.prototype.delete=qI;Kt.prototype.get=JI;Kt.prototype.has=WI;Kt.prototype.set=YI;var KI=200;function QI(e,t){var r=this.__data__;if(r instanceof Yt){var n=r.__data__;if(!ba||n.length<KI-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Kt(n)}return r.set(e,t),this.size=r.size,this}function Bt(e){var t=this.__data__=new Yt(e);this.size=t.size}Bt.prototype.clear=pI;Bt.prototype.delete=mI;Bt.prototype.get=fI;Bt.prototype.has=gI;Bt.prototype.set=QI;var XI="__lodash_hash_undefined__";function ZI(e){return this.__data__.set(e,XI),this}function e2(e){return this.__data__.has(e)}function Yo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Kt;++t<r;)this.add(e[t])}Yo.prototype.add=Yo.prototype.push=ZI;Yo.prototype.has=e2;function t2(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function r2(e,t){return e.has(t)}var n2=1,a2=2;function Rf(e,t,r,n,a,o){var s=r&n2,i=e.length,l=t.length;if(i!=l&&!(s&&l>i))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&a2?new Yo:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var v=s?n(m,f,d,t,e,o):n(f,m,d,e,t,o);if(v!==void 0){if(v)continue;h=!1;break}if(p){if(!t2(t,function(S,E){if(!r2(p,E)&&(f===S||a(f,S,r,n,o)))return p.push(E)})){h=!1;break}}else if(!(f===m||a(f,m,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}var nh=$t.Uint8Array;function o2(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function s2(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var i2=1,l2=2,c2="[object Boolean]",u2="[object Date]",d2="[object Error]",h2="[object Map]",p2="[object Number]",m2="[object RegExp]",f2="[object Set]",g2="[object String]",y2="[object Symbol]",b2="[object ArrayBuffer]",v2="[object DataView]",ah=lr?lr.prototype:void 0,ji=ah?ah.valueOf:void 0;function x2(e,t,r,n,a,o,s){switch(r){case v2:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b2:return!(e.byteLength!=t.byteLength||!o(new nh(e),new nh(t)));case c2:case u2:case p2:return Pf(+e,+t);case d2:return e.name==t.name&&e.message==t.message;case m2:case g2:return e==t+"";case h2:var i=o2;case f2:var l=n&i2;if(i||(i=s2),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=l2,s.set(e,t);var u=Rf(i(e),i(t),n,a,o,s);return s.delete(e),u;case y2:if(ji)return ji.call(e)==ji.call(t)}return!1}function S2(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var jt=Array.isArray;function O2(e,t,r){var n=t(e);return jt(e)?n:S2(n,r(e))}function w2(e,t){for(var r=-1,n=e==null?0:e.length,a=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[a++]=s)}return o}function C2(){return[]}var P2=Object.prototype,T2=P2.propertyIsEnumerable,oh=Object.getOwnPropertySymbols,R2=oh?function(e){return e==null?[]:(e=Object(e),w2(oh(e),function(t){return T2.call(e,t)}))}:C2;function A2(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var _2="[object Arguments]";function sh(e){return Cr(e)&&Mr(e)==_2}var Af=Object.prototype,E2=Af.hasOwnProperty,V2=Af.propertyIsEnumerable,_f=sh(function(){return arguments}())?sh:function(e){return Cr(e)&&E2.call(e,"callee")&&!V2.call(e,"callee")};function I2(){return!1}var Ef=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ih=Ef&&typeof module=="object"&&module&&!module.nodeType&&module,M2=ih&&ih.exports===Ef,lh=M2?$t.Buffer:void 0,j2=lh?lh.isBuffer:void 0,gl=j2||I2,$2=9007199254740991,k2=/^(?:0|[1-9]\d*)$/;function Vf(e,t){var r=typeof e;return t=t??$2,!!t&&(r=="number"||r!="symbol"&&k2.test(e))&&e>-1&&e%1==0&&e<t}var U2=9007199254740991;function xc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=U2}var L2="[object Arguments]",D2="[object Array]",F2="[object Boolean]",B2="[object Date]",N2="[object Error]",z2="[object Function]",G2="[object Map]",H2="[object Number]",q2="[object Object]",J2="[object RegExp]",W2="[object Set]",Y2="[object String]",K2="[object WeakMap]",Q2="[object ArrayBuffer]",X2="[object DataView]",Z2="[object Float32Array]",eM="[object Float64Array]",tM="[object Int8Array]",rM="[object Int16Array]",nM="[object Int32Array]",aM="[object Uint8Array]",oM="[object Uint8ClampedArray]",sM="[object Uint16Array]",iM="[object Uint32Array]",_e={};_e[Z2]=_e[eM]=_e[tM]=_e[rM]=_e[nM]=_e[aM]=_e[oM]=_e[sM]=_e[iM]=!0;_e[L2]=_e[D2]=_e[Q2]=_e[F2]=_e[X2]=_e[B2]=_e[N2]=_e[z2]=_e[G2]=_e[H2]=_e[q2]=_e[J2]=_e[W2]=_e[Y2]=_e[K2]=!1;function lM(e){return Cr(e)&&xc(e.length)&&!!_e[Mr(e)]}function cM(e){return function(t){return e(t)}}var If=typeof exports=="object"&&exports&&!exports.nodeType&&exports,na=If&&typeof module=="object"&&module&&!module.nodeType&&module,uM=na&&na.exports===If,$i=uM&&Em.process,ch=function(){try{var e=na&&na.require&&na.require("util").types;return e||$i&&$i.binding&&$i.binding("util")}catch{}}(),uh=ch&&ch.isTypedArray,Mf=uh?cM(uh):lM,dM=Object.prototype,hM=dM.hasOwnProperty;function pM(e,t){var r=jt(e),n=!r&&_f(e),a=!r&&!n&&gl(e),o=!r&&!n&&!a&&Mf(e),s=r||n||a||o,i=s?A2(e.length,String):[],l=i.length;for(var c in e)hM.call(e,c)&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vf(c,l)))&&i.push(c);return i}var mM=Object.prototype;function fM(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||mM;return e===r}function gM(e,t){return function(r){return e(t(r))}}var yM=gM(Object.keys,Object),bM=Object.prototype,vM=bM.hasOwnProperty;function xM(e){if(!fM(e))return yM(e);var t=[];for(var r in Object(e))vM.call(e,r)&&r!="constructor"&&t.push(r);return t}function jf(e){return e!=null&&xc(e.length)&&!Tf(e)}function Sc(e){return jf(e)?pM(e):xM(e)}function dh(e){return O2(e,Sc,R2)}var SM=1,OM=Object.prototype,wM=OM.hasOwnProperty;function CM(e,t,r,n,a,o){var s=r&SM,i=dh(e),l=i.length,c=dh(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:wM.call(t,h)))return!1}var p=o.get(e),f=o.get(t);if(p&&f)return p==t&&f==e;var m=!0;o.set(e,t),o.set(t,e);for(var v=s;++d<l;){h=i[d];var S=e[h],E=t[h];if(n)var O=s?n(E,S,h,t,e,o):n(S,E,h,e,t,o);if(!(O===void 0?S===E||a(S,E,r,n,o):O)){m=!1;break}v||(v=h=="constructor")}if(m&&!v){var w=e.constructor,T=t.constructor;w!=T&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof T=="function"&&T instanceof T)&&(m=!1)}return o.delete(e),o.delete(t),m}var yl=kr($t,"DataView"),bl=kr($t,"Promise"),vl=kr($t,"Set"),xl=kr($t,"WeakMap"),hh="[object Map]",PM="[object Object]",ph="[object Promise]",mh="[object Set]",fh="[object WeakMap]",gh="[object DataView]",TM=$r(yl),RM=$r(ba),AM=$r(bl),_M=$r(vl),EM=$r(xl),rr=Mr;(yl&&rr(new yl(new ArrayBuffer(1)))!=gh||ba&&rr(new ba)!=hh||bl&&rr(bl.resolve())!=ph||vl&&rr(new vl)!=mh||xl&&rr(new xl)!=fh)&&(rr=function(e){var t=Mr(e),r=t==PM?e.constructor:void 0,n=r?$r(r):"";if(n)switch(n){case TM:return gh;case RM:return hh;case AM:return ph;case _M:return mh;case EM:return fh}return t});var VM=1,yh="[object Arguments]",bh="[object Array]",so="[object Object]",IM=Object.prototype,vh=IM.hasOwnProperty;function MM(e,t,r,n,a,o){var s=jt(e),i=jt(t),l=s?bh:rr(e),c=i?bh:rr(t);l=l==yh?so:l,c=c==yh?so:c;var u=l==so,d=c==so,h=l==c;if(h&&gl(e)){if(!gl(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new Bt),s||Mf(e)?Rf(e,t,r,n,a,o):x2(e,t,l,r,n,a,o);if(!(r&VM)){var p=u&&vh.call(e,"__wrapped__"),f=d&&vh.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,v=f?t.value():t;return o||(o=new Bt),a(m,v,r,n,o)}}return h?(o||(o=new Bt),CM(e,t,r,n,a,o)):!1}function Ds(e,t,r,n,a){return e===t?!0:e==null||t==null||!Cr(e)&&!Cr(t)?e!==e&&t!==t:MM(e,t,r,n,Ds,a)}function jM(e,t){return Ds(e,t)}const $f=({store:e})=>{const{t}=Te.useTranslation(),[r,n]=Q.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),a=Q.useRef(r);On(()=>{const s=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;jM(a.current,s)||(a.current=s,n(s))});const o=[];for(const[s,i]of r.entries())i&&o.push(s);return g.jsx(z.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:o.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:o.map(s=>s+1).join(", ")})})},$M=z.styled(z.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 io({labelValue:e,...t}){return g.jsxs($M,{fullWidth:!0,variant:"filled",children:[g.jsx(z.InputLabel,{id:t.labelId,children:e}),g.jsx(z.Select,{...t})]})}var xh=function(){try{var e=kr(Object,"defineProperty");return e({},"",{}),e}catch{}}();function kM(e,t,r){t=="__proto__"&&xh?xh(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function UM(e,t,r,n){for(var a=-1,o=e==null?0:e.length;++a<o;){var s=e[a];t(n,s,r(s),e)}return n}function LM(e){return function(t,r,n){for(var a=-1,o=Object(t),s=n(t),i=s.length;i--;){var l=s[++a];if(r(o[l],l,o)===!1)break}return t}}var DM=LM();function FM(e,t){return e&&DM(e,t,Sc)}function BM(e,t){return function(r,n){if(r==null)return r;if(!jf(r))return e(r,n);for(var a=r.length,o=-1,s=Object(r);++o<a&&n(s[o],o,s)!==!1;);return r}}var NM=BM(FM);function zM(e,t,r,n){return NM(e,function(a,o,s){t(n,a,r(a),s)}),n}var GM=1,HM=2;function qM(e,t,r,n){var a=r.length,o=a;if(e==null)return!o;for(e=Object(e);a--;){var s=r[a];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<o;){s=r[a];var i=s[0],l=e[i],c=s[1];if(s[2]){if(l===void 0&&!(i in e))return!1}else{var u=new Bt,d;if(!(d===void 0?Ds(c,l,GM|HM,n,u):d))return!1}}return!0}function kf(e){return e===e&&!wr(e)}function JM(e){for(var t=Sc(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,kf(a)]}return t}function Uf(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function WM(e){var t=JM(e);return t.length==1&&t[0][2]?Uf(t[0][0],t[0][1]):function(r){return r===e||qM(r,e,t)}}var YM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,KM=/^\w*$/;function Oc(e,t){if(jt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Rs(e)?!0:KM.test(e)||!YM.test(e)||t!=null&&e in Object(t)}var QM="Expected a function";function wc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(QM);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var s=e.apply(this,n);return r.cache=o.set(a,s)||o,s};return r.cache=new(wc.Cache||Kt),r}wc.Cache=Kt;var XM=500;function ZM(e){var t=wc(e,function(n){return r.size===XM&&r.clear(),n}),r=t.cache;return t}var e5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,t5=/\\(\\)?/g,r5=ZM(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(e5,function(r,n,a,o){t.push(a?o.replace(t5,"$1"):n||r)}),t});function n5(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var Sh=lr?lr.prototype:void 0,Oh=Sh?Sh.toString:void 0;function Lf(e){if(typeof e=="string")return e;if(jt(e))return n5(e,Lf)+"";if(Rs(e))return Oh?Oh.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Df(e){return e==null?"":Lf(e)}function Ff(e,t){return jt(e)?e:Oc(e,t)?[e]:r5(Df(e))}function Fs(e){if(typeof e=="string"||Rs(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Bf(e,t){t=Ff(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Fs(t[r++])];return r&&r==n?e:void 0}function a5(e,t,r){var n=e==null?void 0:Bf(e,t);return n===void 0?r:n}function o5(e,t){return e!=null&&t in Object(e)}function s5(e,t,r){t=Ff(t,e);for(var n=-1,a=t.length,o=!1;++n<a;){var s=Fs(t[n]);if(!(o=e!=null&&r(e,s)))break;e=e[s]}return o||++n!=a?o:(a=e==null?0:e.length,!!a&&xc(a)&&Vf(s,a)&&(jt(e)||_f(e)))}function i5(e,t){return e!=null&&s5(e,t,o5)}var l5=1,c5=2;function u5(e,t){return Oc(e)&&kf(t)?Uf(Fs(e),t):function(r){var n=a5(r,e);return n===void 0&&n===t?i5(r,e):Ds(t,n,l5|c5)}}function d5(e){return e}function h5(e){return function(t){return t==null?void 0:t[e]}}function p5(e){return function(t){return Bf(t,e)}}function m5(e){return Oc(e)?h5(Fs(e)):p5(e)}function f5(e){return typeof e=="function"?e:e==null?d5:typeof e=="object"?jt(e)?u5(e[0],e[1]):WM(e):m5(e)}function g5(e,t){return function(r,n){var a=jt(r)?UM:zM,o={};return a(r,e,f5(n),o)}}var lo=g5(function(e,t,r){kM(e,r,t)}),y5=0;function b5(e){var t=++y5;return Df(e)+t}const Sl=[{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}],v5=[{id:"continuous"},...Sl],x5=["coordsys","tool"];class Bs{constructor(t,r,n,a){var o,s;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=n,this.tcps=a,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 n)if(i.coordinate_system===""){i.coordinate_system="world";break}this.selectedCoordSystemId=((o=n[0])==null?void 0:o.coordinate_system)||"world",this.selectedTcpId=((s=a[0])==null?void 0:s.id)||"",Fe.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(Fe.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,{coordinatesystems:a},{tcps:o}]=await Promise.all([r.api.motionGroupInfos.getMotionGroupSpecification(t.motionGroupId),r.api.coordinateSystems.listCoordinateSystems("ROTATION_VECTOR"),r.api.motionGroupInfos.listTcps(t.motionGroupId,"ROTATION_VECTOR")]);return new Bs(t,n,a||[],o||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return wl.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=br.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 v5}get discreteIncrementOptions(){return Sl}get incrementOptionsById(){return lo(this.incrementOptions,t=>t.id)}get tabsById(){return lo(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 lo(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 lo(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:Sl.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}get velocityInDisplayUnits(){return this.currentMotionType==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityDegPerSec}get minVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.minTranslationVelocityMmPerSec:this.minRotationVelocityDegPerSec}get maxVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.maxTranslationVelocityMmPerSec:this.maxRotationVelocityDegPerSec}get currentMotionType(){return this.selectedTabId==="cartesian"&&this.selectedCartesianMotionType==="translate"?"translate":"rotate"}onTabChange(t,r){const n=this.tabs[r]||this.tabs[0];this.selectedTabId=n.id}setSelectedCoordSystemId(t){this.selectedCoordSystemId=t}setSelectedTcpId(t){this.selectedTcpId=t}setSelectedOrientation(t){this.selectedOrientation=t}setSelectedIncrementId(t){this.selectedIncrementId=t}setCurrentIncrementJog(t){this.incrementJogInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}lock(t){this.locks.add(t)}unlock(t){this.locks.delete(t)}async withMotionLock(t){const r=b5();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const S5=Re.observer(({store:e})=>{var a;const{t}=Te.useTranslation(),r=[];function n(o){switch(o){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return o}}return e.showCoordSystemSelect&&r.push(g.jsx(io,{labelId:"jogging-coord-select",labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:o=>e.setSelectedCoordSystemId(o.target.value),disabled:e.isLocked,children:e.coordSystems.map(o=>g.jsx(z.MenuItem,{value:o.coordinate_system,children:o.name&&e.coordSystemCountByName[o.name]>1?`${o.name} / ${o.coordinate_system}`:o.name||o.coordinate_system},o.coordinate_system))},"coord")),e.showTcpSelect&&r.push(g.jsx(io,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:o=>e.setSelectedTcpId(o.target.value),disabled:e.isLocked,children:e.tcps.map(o=>g.jsx(z.MenuItem,{value:o.id,children:o.id},o.id))},"tcp")),e.showOrientationSelect&&r.push(g.jsx(io,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:o=>e.setSelectedOrientation(o.target.value),disabled:e.isLocked,children:x5.map(o=>g.jsx(z.MenuItem,{value:o,children:n(o)},o))},"orientation")),e.showIncrementSelect&&r.push(g.jsxs(io,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((a=e.activeDiscreteIncrement)==null?void 0:a.id)||"continuous",onChange:o=>e.setSelectedIncrementId(o.target.value),disabled:e.isLocked,children:[g.jsx(z.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(o=>g.jsx(z.MenuItem,{value:o.id,children:e.currentMotionType==="translate"?`${o.mm}mm`:`${o.degrees}°`},o.id))]},"increment")),g.jsx(z.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((o,s)=>g.jsx(z.Box,{sx:{gridColumn:r.length%2===1&&s===r.length-1?"span 2":"auto"},children:o},s))})}),O5=z.styled(z.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 wh(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function w5(e){return typeof e=="string"}function C5(e,t,r){return e===void 0||w5(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function Oo(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function Ch(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function P5(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:a,className:o}=e;if(!t){const p=It(r==null?void 0:r.className,o,a==null?void 0:a.className,n==null?void 0:n.className),f={...r==null?void 0:r.style,...a==null?void 0:a.style,...n==null?void 0:n.style},m={...r,...a,...n};return p.length>0&&(m.className=p),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:void 0}}const s=Oo({...a,...n}),i=Ch(n),l=Ch(a),c=t(s),u=It(c==null?void 0:c.className,r==null?void 0:r.className,o,a==null?void 0:a.className,n==null?void 0:n.className),d={...c==null?void 0:c.style,...r==null?void 0:r.style,...a==null?void 0:a.style,...n==null?void 0:n.style},h={...c,...r,...l,...i};return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}}function T5(e,t,r){return typeof e=="function"?e(t,r):e}function tr(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:a=!1,...o}=e,s=a?{}:T5(r,n),{props:i,internalRef:l}=P5({...o,externalSlotProps:s}),c=_m(l,s==null?void 0:s.ref,(d=e.additionalProps)==null?void 0:d.ref);return C5(t,{...i,ref:c},n)}function Ph(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
154
|
-
`))}return!1}const R5={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function A5(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const _5=2;function Xr(e,t,r,n,a){return r===1?Math.min(e+t,a):Math.max(e-t,n)}function Nf(e,t){return e-t}function Th(e,t){const{index:r}=e.reduce((n,a,o)=>{const s=Math.abs(t-a);return n===null||s<n.distance||s===n.distance?{distance:s,index:o}:n},null)??{};return r}function co(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const a=r.changedTouches[n];if(a.identifier===t.current)return{x:a.clientX,y:a.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Ko(e,t,r){return(e-t)*100/(r-t)}function E5(e,t,r){return(r-t)*e+t}function V5(e){if(Math.abs(e)<1){const r=e.toExponential().split("e-"),n=r[0].split(".")[1];return(n?n.length:0)+parseInt(r[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function I5(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(V5(t)))}function Rh({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(Nf)}function uo({sliderRef:e,activeIndex:t,setActive:r}){var a,o,s;const n=bo(e.current);(!((a=e.current)!=null&&a.contains(n.activeElement))||Number((o=n==null?void 0:n.activeElement)==null?void 0:o.getAttribute("data-index"))!==t)&&((s=e.current)==null||s.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function ho(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?A5(e,t):!1}const M5={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}%`})}},j5=e=>e;let po;function Ah(){return po===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?po=CSS.supports("touch-action","none"):po=!0),po}function $5(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:o=!1,marks:s=!1,max:i=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:f=j5,step:m=1,shiftStep:v=10,tabIndex:S,value:E}=e,O=I.useRef(void 0),[w,T]=I.useState(-1),[C,A]=I.useState(-1),[V,B]=I.useState(!1),y=I.useRef(0),R=I.useRef(null),[G,P]=eC({controlled:E,default:r??l,name:"Slider"}),N=u&&((K,ne,ie)=>{const fe=K.nativeEvent||K,Oe=new fe.constructor(fe.type,fe);Object.defineProperty(Oe,"target",{writable:!0,value:{value:ne,name:c}}),R.current=ne,u(Oe,ne,ie)}),re=Array.isArray(G);let Z=re?G.slice().sort(Nf):[G];Z=Z.map(K=>K==null?l:Zr(K,l,i));const ae=s===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((K,ne)=>({value:l+m*ne})):s||[],te=ae.map(K=>K.value),[se,J]=I.useState(-1),ee=I.useRef(null),he=_m(p,ee),Pe=K=>ne=>{var fe;const ie=Number(ne.currentTarget.getAttribute("data-index"));Ph(ne.target)&&J(ie),A(ie),(fe=K==null?void 0:K.onFocus)==null||fe.call(K,ne)},ze=K=>ne=>{var ie;Ph(ne.target)||J(-1),A(-1),(ie=K==null?void 0:K.onBlur)==null||ie.call(K,ne)},Se=(K,ne)=>{const ie=Number(K.currentTarget.getAttribute("data-index")),fe=Z[ie],Oe=te.indexOf(fe);let le=ne;if(ae&&m==null){const He=te[te.length-1];le>=He?le=He:le<=te[0]?le=te[0]:le=le<fe?te[Oe-1]:te[Oe+1]}if(le=Zr(le,l,i),re){a&&(le=Zr(le,Z[ie-1]||-1/0,Z[ie+1]||1/0));const He=le;le=Rh({values:Z,newValue:le,index:ie});let Xe=ie;a||(Xe=le.indexOf(He)),uo({sliderRef:ee,activeIndex:Xe})}P(le),J(ie),N&&!ho(le,G)&&N(K,le,ie),d&&d(K,R.current??le)},lt=K=>ne=>{var ie;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(ne.key)){ne.preventDefault();const fe=Number(ne.currentTarget.getAttribute("data-index")),Oe=Z[fe];let le=null;if(m!=null){const He=ne.shiftKey?v:m;switch(ne.key){case"ArrowUp":le=Xr(Oe,He,1,l,i);break;case"ArrowRight":le=Xr(Oe,He,o?-1:1,l,i);break;case"ArrowDown":le=Xr(Oe,He,-1,l,i);break;case"ArrowLeft":le=Xr(Oe,He,o?1:-1,l,i);break;case"PageUp":le=Xr(Oe,v,1,l,i);break;case"PageDown":le=Xr(Oe,v,-1,l,i);break;case"Home":le=l;break;case"End":le=i;break}}else if(ae){const He=te[te.length-1],Xe=te.indexOf(Oe),De=[o?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],pt=[o?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];De.includes(ne.key)?Xe===0?le=te[0]:le=te[Xe-1]:pt.includes(ne.key)&&(Xe===te.length-1?le=He:le=te[Xe+1])}le!=null&&Se(ne,le)}(ie=K==null?void 0:K.onKeyDown)==null||ie.call(K,ne)};Wh(()=>{var K;n&&ee.current.contains(document.activeElement)&&((K=document.activeElement)==null||K.blur())},[n]),n&&w!==-1&&T(-1),n&&se!==-1&&J(-1);const tt=K=>ne=>{var ie;(ie=K.onChange)==null||ie.call(K,ne),Se(ne,ne.target.valueAsNumber)},ye=I.useRef(void 0);let X=h;o&&h==="horizontal"&&(X+="-reverse");const oe=({finger:K,move:ne=!1})=>{const{current:ie}=ee,{width:fe,height:Oe,bottom:le,left:He}=ie.getBoundingClientRect();let Xe;X.startsWith("vertical")?Xe=(le-K.y)/Oe:Xe=(K.x-He)/fe,X.includes("-reverse")&&(Xe=1-Xe);let De;if(De=E5(Xe,l,i),m)De=I5(De,m,l);else{const En=Th(te,De);De=te[En]}De=Zr(De,l,i);let pt=0;if(re){ne?pt=ye.current:pt=Th(Z,De),a&&(De=Zr(De,Z[pt-1]||-1/0,Z[pt+1]||1/0));const En=De;De=Rh({values:Z,newValue:De,index:pt}),a&&ne||(pt=De.indexOf(En),ye.current=pt)}return{newValue:De,activeIndex:pt}},ce=vi(K=>{const ne=co(K,O);if(!ne)return;if(y.current+=1,K.type==="mousemove"&&K.buttons===0){W(K);return}const{newValue:ie,activeIndex:fe}=oe({finger:ne,move:!0});uo({sliderRef:ee,activeIndex:fe,setActive:T}),P(ie),!V&&y.current>_5&&B(!0),N&&!ho(ie,G)&&N(K,ie,fe)}),W=vi(K=>{const ne=co(K,O);if(B(!1),!ne)return;const{newValue:ie}=oe({finger:ne,move:!0});T(-1),K.type==="touchend"&&A(-1),d&&d(K,R.current??ie),O.current=void 0,me()}),be=vi(K=>{if(n)return;Ah()||K.preventDefault();const ne=K.changedTouches[0];ne!=null&&(O.current=ne.identifier);const ie=co(K,O);if(ie!==!1){const{newValue:Oe,activeIndex:le}=oe({finger:ie});uo({sliderRef:ee,activeIndex:le,setActive:T}),P(Oe),N&&!ho(Oe,G)&&N(K,Oe,le)}y.current=0;const fe=bo(ee.current);fe.addEventListener("touchmove",ce,{passive:!0}),fe.addEventListener("touchend",W,{passive:!0})}),me=I.useCallback(()=>{const K=bo(ee.current);K.removeEventListener("mousemove",ce),K.removeEventListener("mouseup",W),K.removeEventListener("touchmove",ce),K.removeEventListener("touchend",W)},[W,ce]);I.useEffect(()=>{const{current:K}=ee;return K.addEventListener("touchstart",be,{passive:Ah()}),()=>{K.removeEventListener("touchstart",be),me()}},[me,be]),I.useEffect(()=>{n&&me()},[n,me]);const Je=K=>ne=>{var Oe;if((Oe=K.onMouseDown)==null||Oe.call(K,ne),n||ne.defaultPrevented||ne.button!==0)return;ne.preventDefault();const ie=co(ne,O);if(ie!==!1){const{newValue:le,activeIndex:He}=oe({finger:ie});uo({sliderRef:ee,activeIndex:He,setActive:T}),P(le),N&&!ho(le,G)&&N(ne,le,He)}y.current=0;const fe=bo(ee.current);fe.addEventListener("mousemove",ce,{passive:!0}),fe.addEventListener("mouseup",W)},Ge=Ko(re?Z[0]:l,l,i),Me=Ko(Z[Z.length-1],l,i)-Ge,Qt=(K={})=>{const ne=Oo(K),ie={onMouseDown:Je(ne||{})},fe={...ne,...ie};return{...K,ref:he,...fe}},Ma=K=>ne=>{var fe;(fe=K.onMouseOver)==null||fe.call(K,ne);const ie=Number(ne.currentTarget.getAttribute("data-index"));A(ie)},ja=K=>ne=>{var ie;(ie=K.onMouseLeave)==null||ie.call(K,ne),A(-1)},$a=(K={})=>{const ne=Oo(K),ie={onMouseOver:Ma(ne||{}),onMouseLeave:ja(ne||{})};return{...K,...ne,...ie}},ka=K=>({pointerEvents:w!==-1&&w!==K?"none":void 0});let Ur;return h==="vertical"&&(Ur=o?"vertical-rl":"vertical-lr"),{active:w,axis:X,axisProps:M5,dragging:V,focusedThumbIndex:se,getHiddenInputProps:(K={})=>{const ne=Oo(K),ie={onChange:tt(ne||{}),onFocus:Pe(ne||{}),onBlur:ze(ne||{}),onKeyDown:lt(ne||{})},fe={...ne,...ie};return{tabIndex:S,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":f(i),"aria-valuemin":f(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...K,...fe,style:{...R5,direction:o?"rtl":"ltr",width:"100%",height:"100%",writingMode:Ur}}},getRootProps:Qt,getThumbProps:$a,marks:ae,open:C,range:re,rootRef:he,trackLeap:Me,trackOffset:Ge,values:Z,getThumbStyle:ka}}function wo(e){return typeof e=="string"}const k5=e=>!e||!wo(e);function U5(e){return typeof e.main=="string"}function L5(e,t=[]){if(!U5(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Cc(e=[]){return([,t])=>t&&L5(t,e)}function D5(e){return Oa("MuiSlider",e)}const yt=Bh("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"]),F5=e=>{const{open:t}=e;return{offset:It(t&&yt.valueLabelOpen),circle:yt.valueLabelCircle,label:yt.valueLabelLabel}};function zf(e){const{children:t,className:r,value:n}=e,a=F5(e);return t?I.cloneElement(t,{className:t.props.className},g.jsxs(I.Fragment,{children:[t.props.children,g.jsx("span",{className:It(a.offset,r),"aria-hidden":!0,children:g.jsx("span",{className:a.circle,children:g.jsx("span",{className:a.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(zf.propTypes={children:b.element.isRequired,className:b.string,value:b.node});function _h(e){return e}const B5=ht("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${Ze(r.color)}`],r.size!=="medium"&&t[`size${Ze(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(Ir(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${yt.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${yt.dragging}`]:{[`& .${yt.thumb}, & .${yt.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Cc()).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}}]}))),N5=ht("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),z5=ht("span",{name:"MuiSlider",slot:"Track"})(Ir(({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(Cc()).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:oa(e.palette[t].main,.62),borderColor:oa(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:aa(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:aa(e.palette[t].main,.5)})}}}))]}))),G5=ht("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${Ze(r.color)}`],r.size!=="medium"&&t[`thumbSize${Ze(r.size)}`]]}})(Ir(({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%)"},[`&.${yt.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(Cc()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${yt.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Di(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${yt.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Di(e.palette[t].main,.16)}`}}}}))]}))),Gf=ht(zf,{name:"MuiSlider",slot:"ValueLabel"})(Ir(({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%"},[`&.${yt.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%"},[`&.${yt.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"&&(Gf.propTypes={children:b.element.isRequired,index:b.number.isRequired,open:b.bool.isRequired,value:b.node});const H5=ht("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Al(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(Ir(({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}}]}))),q5=ht("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Al(e)&&e!=="markLabelActive"})(Ir(({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}}]}))),J5=e=>{const{disabled:t,dragging:r,marked:n,orientation:a,track:o,classes:s,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",a==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",i&&`color${Ze(i)}`,l&&`size${Ze(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${Ze(l)}`,i&&`thumbColor${Ze(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Tl(c,D5,s)},W5=({children:e})=>e,Hf=I.forwardRef(function(t,r){const n=fc({props:t,name:"MuiSlider"}),a=o0(),{"aria-label":o,"aria-valuetext":s,"aria-labelledby":i,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:p,disableSwap:f=!1,disabled:m=!1,getAriaLabel:v,getAriaValueText:S,marks:E=!1,max:O=100,min:w=0,name:T,onChange:C,onChangeCommitted:A,orientation:V="horizontal",shiftStep:B=10,size:y="medium",step:R=1,scale:G=_h,slotProps:P,slots:N,tabIndex:re,track:Z="normal",value:ae,valueLabelDisplay:te="off",valueLabelFormat:se=_h,...J}=n,ee={...n,isRtl:a,max:O,min:w,classes:h,disabled:m,disableSwap:f,orientation:V,marks:E,color:d,size:y,step:R,shiftStep:B,scale:G,track:Z,valueLabelDisplay:te,valueLabelFormat:se},{axisProps:he,getRootProps:Pe,getHiddenInputProps:ze,getThumbProps:Se,open:lt,active:tt,axis:ye,focusedThumbIndex:X,range:oe,dragging:ce,marks:W,values:be,trackOffset:me,trackLeap:Je,getThumbStyle:Ge}=$5({...ee,rootRef:r});ee.marked=W.length>0&&W.some(Le=>Le.label),ee.dragging=ce,ee.focusedThumbIndex=X;const Me=J5(ee),Qt=(N==null?void 0:N.root)??c.Root??B5,Ma=(N==null?void 0:N.rail)??c.Rail??N5,ja=(N==null?void 0:N.track)??c.Track??z5,$a=(N==null?void 0:N.thumb)??c.Thumb??G5,ka=(N==null?void 0:N.valueLabel)??c.ValueLabel??Gf,Ur=(N==null?void 0:N.mark)??c.Mark??H5,Ua=(N==null?void 0:N.markLabel)??c.MarkLabel??q5,K=(N==null?void 0:N.input)??c.Input??"input",ne=(P==null?void 0:P.root)??u.root,ie=(P==null?void 0:P.rail)??u.rail,fe=(P==null?void 0:P.track)??u.track,Oe=(P==null?void 0:P.thumb)??u.thumb,le=(P==null?void 0:P.valueLabel)??u.valueLabel,He=(P==null?void 0:P.mark)??u.mark,Xe=(P==null?void 0:P.markLabel)??u.markLabel,De=(P==null?void 0:P.input)??u.input,pt=tr({elementType:Qt,getSlotProps:Pe,externalSlotProps:ne,externalForwardedProps:J,additionalProps:{...k5(Qt)&&{as:l}},ownerState:{...ee,...ne==null?void 0:ne.ownerState},className:[Me.root,p]}),En=tr({elementType:Ma,externalSlotProps:ie,ownerState:ee,className:Me.rail}),rg=tr({elementType:ja,externalSlotProps:fe,additionalProps:{style:{...he[ye].offset(me),...he[ye].leap(Je)}},ownerState:{...ee,...fe==null?void 0:fe.ownerState},className:Me.track}),Ns=tr({elementType:$a,getSlotProps:Se,externalSlotProps:Oe,ownerState:{...ee,...Oe==null?void 0:Oe.ownerState},className:Me.thumb}),ng=tr({elementType:ka,externalSlotProps:le,ownerState:{...ee,...le==null?void 0:le.ownerState},className:Me.valueLabel}),zs=tr({elementType:Ur,externalSlotProps:He,ownerState:ee,className:Me.mark}),Gs=tr({elementType:Ua,externalSlotProps:Xe,ownerState:ee,className:Me.markLabel}),ag=tr({elementType:K,getSlotProps:ze,externalSlotProps:De,ownerState:ee});return g.jsxs(Qt,{...pt,children:[g.jsx(Ma,{...En}),g.jsx(ja,{...rg}),W.filter(Le=>Le.value>=w&&Le.value<=O).map((Le,We)=>{const Hs=Ko(Le.value,w,O),La=he[ye].offset(Hs);let kt;return Z===!1?kt=be.includes(Le.value):kt=Z==="normal"&&(oe?Le.value>=be[0]&&Le.value<=be[be.length-1]:Le.value<=be[0])||Z==="inverted"&&(oe?Le.value<=be[0]||Le.value>=be[be.length-1]:Le.value>=be[0]),g.jsxs(I.Fragment,{children:[g.jsx(Ur,{"data-index":We,...zs,...!wo(Ur)&&{markActive:kt},style:{...La,...zs.style},className:It(zs.className,kt&&Me.markActive)}),Le.label!=null?g.jsx(Ua,{"aria-hidden":!0,"data-index":We,...Gs,...!wo(Ua)&&{markLabelActive:kt},style:{...La,...Gs.style},className:It(Me.markLabel,Gs.className,kt&&Me.markLabelActive),children:Le.label}):null]},We)}),be.map((Le,We)=>{const Hs=Ko(Le,w,O),La=he[ye].offset(Hs),kt=te==="off"?W5:ka;return g.jsx(kt,{...!wo(kt)&&{valueLabelFormat:se,valueLabelDisplay:te,value:typeof se=="function"?se(G(Le),We):se,index:We,open:lt===We||tt===We||te==="on",disabled:m},...ng,children:g.jsx($a,{"data-index":We,...Ns,className:It(Me.thumb,Ns.className,tt===We&&Me.active,X===We&&Me.focusVisible),style:{...La,...Ge(We),...Ns.style},children:g.jsx(K,{"data-index":We,"aria-label":v?v(We):o,"aria-valuenow":G(Le),"aria-labelledby":i,"aria-valuetext":S?S(G(Le),We):s,value:be[We],...ag})})},We)})]})});process.env.NODE_ENV!=="production"&&(Hf.propTypes={"aria-label":wh(b.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":b.string,"aria-valuetext":wh(b.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:b.node,classes:b.object,className:b.string,color:b.oneOfType([b.oneOf(["primary","secondary","error","info","success","warning"]),b.string]),components:b.shape({Input:b.elementType,Mark:b.elementType,MarkLabel:b.elementType,Rail:b.elementType,Root:b.elementType,Thumb:b.elementType,Track:b.elementType,ValueLabel:b.elementType}),componentsProps:b.shape({input:b.oneOfType([b.func,b.object]),mark:b.oneOfType([b.func,b.object]),markLabel:b.oneOfType([b.func,b.object]),rail:b.oneOfType([b.func,b.object]),root:b.oneOfType([b.func,b.object]),thumb:b.oneOfType([b.func,b.object]),track:b.oneOfType([b.func,b.object]),valueLabel:b.oneOfType([b.func,b.shape({children:b.element,className:b.string,open:b.bool,style:b.object,value:b.node,valueLabelDisplay:b.oneOf(["auto","off","on"])})])}),defaultValue:b.oneOfType([b.arrayOf(b.number),b.number]),disabled:b.bool,disableSwap:b.bool,getAriaLabel:b.func,getAriaValueText:b.func,marks:b.oneOfType([b.arrayOf(b.shape({label:b.node,value:b.number.isRequired})),b.bool]),max:b.number,min:b.number,name:b.string,onChange:b.func,onChangeCommitted:b.func,orientation:b.oneOf(["horizontal","vertical"]),scale:b.func,shiftStep:b.number,size:b.oneOfType([b.oneOf(["small","medium"]),b.string]),slotProps:b.shape({input:b.oneOfType([b.func,b.object]),mark:b.oneOfType([b.func,b.object]),markLabel:b.oneOfType([b.func,b.object]),rail:b.oneOfType([b.func,b.object]),root:b.oneOfType([b.func,b.object]),thumb:b.oneOfType([b.func,b.object]),track:b.oneOfType([b.func,b.object]),valueLabel:b.oneOfType([b.func,b.shape({children:b.element,className:b.string,open:b.bool,style:b.object,value:b.node,valueLabelDisplay:b.oneOf(["auto","off","on"])})])}),slots:b.shape({input:b.elementType,mark:b.elementType,markLabel:b.elementType,rail:b.elementType,root:b.elementType,thumb:b.elementType,track:b.elementType,valueLabel:b.elementType}),step:b.number,sx:b.oneOfType([b.arrayOf(b.oneOfType([b.func,b.object,b.bool])),b.func,b.object]),tabIndex:b.number,track:b.oneOf(["inverted","normal",!1]),value:b.oneOfType([b.arrayOf(b.number),b.number]),valueLabelDisplay:b.oneOf(["auto","off","on"]),valueLabelFormat:b.oneOfType([b.func,b.string])});var Y5="[object Number]";function K5(e){return typeof e=="number"||Cr(e)&&Mr(e)==Y5}const qf=Re.observer(e=>{var o,s,i;const t=z.useTheme(),{store:r}=e,{t:n}=Te.useTranslation();function a(l,c){c===e.velocity||!K5(c)||e.onVelocityChange(c)}return g.jsxs(z.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(z.Typography,{sx:{color:(i=(s=(o=t.componentsExt)==null?void 0:o.JoggingPanel)==null?void 0:s.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:n("Jogging.Velocity.bt")}),g.jsx(Hf,{value:e.velocity,color:"secondary",onChange:a,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):g.jsx(Pc,{value:e.velocity.toString()}))]})});function Pc({value:e,sx:t}){var n;const r=z.useTheme();return g.jsx(z.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(n=r.palette.backgroundPaperElevation)==null?void 0:n[8],borderRadius:"10px",minWidth:"111px",...t},children:g.jsx(z.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Jf=Re.observer(({store:e})=>{const{t}=Te.useTranslation(),r=Re.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?n=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:n})}`:n=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:n})}`}}));return g.jsx(qf,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(Pc,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),Q5=Re.observer(({store:e,children:t})=>{const{t:r}=Te.useTranslation(),n=z.useTheme();function a(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Am(()=>[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 o(h,p){const f=await e.activate(),m=f.motionStream.rapidlyChangingMotionState.tcp_pose,v=f.motionStream.rapidlyChangingMotionState.state.joint_position;m&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:m,currentJoints:v,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:p.mm}:{type:"rotate",distanceRads:br.degreesToRadians(p.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function s(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return o(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.startTCPTranslation({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function i(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(h,p,f){var v,S,E;const m=(E=(S=(v=f.componentsExt)==null?void 0:v.JoggingPanel)==null?void 0:S.JoggingCartesian)==null?void 0:E.Axis;if(m)return p==="translate"?m[h]:m.CustomRotation??m[h]}const c=[{id:"x",icon:g.jsx(ZV,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(tI,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(nI,{}),colors:l("Z",e.selectedCartesianMotionType,n)}];function u(h){return r("General.mm.variable",{amount:h.toFixed(1)})}function d(h){return r("General.degree.variable",{amount:br.radiansToDegrees(h).toFixed(1)})}return g.jsxs(z.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(z.Stack,{gap:2,children:[g.jsx(S5,{store:e}),g.jsx(Jf,{store:e}),g.jsx(z.Divider,{})]}),g.jsx(z.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(z.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs(O5,{value:e.selectedCartesianMotionType,onChange:a,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(z.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(z.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(el,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[h.icon,g.jsx(z.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m;return u(((m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.position[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"translate",direction:m}),stopJogging:i},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var p,f;return g.jsx(el,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[g.jsx(oI,{}),g.jsx(z.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,v;return d(((v=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:v[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx($f,{store:e}),t&&g.jsx(z.Divider,{}),t]})}),X5=Re.observer(({store:e,children:t})=>{const r=z.useTheme();async function n(o){await e.activate(),await e.jogger.startJointRotation({joint:o.joint,direction:o.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function a(){await e.jogger.stop(),await e.deactivate()}return g.jsxs(z.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(Jf,{store:e}),g.jsx(z.Divider,{}),g.jsx(z.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(z.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(o=>{var c;const s=(c=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:c[o.index],i=(s==null?void 0:s.lower_limit)!==void 0?br.radiansToDegrees(s.lower_limit):void 0,l=(s==null?void 0:s.upper_limit)!==void 0?br.radiansToDegrees(s.upper_limit):void 0;return g.jsxs(z.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(z.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${o.index+1}`}),g.jsx(Im,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[o.index];return u!==void 0?br.radiansToDegrees(u):void 0},startJogging:u=>n({joint:o.index,direction:u}),stopJogging:a})]},`joint-${o.index}`)})})}),g.jsx($f,{store:e}),t&&g.jsx(z.Divider,{}),t]})}),Z5=vt(Re.observer(e=>{const t=wl.isString(e.nova)?new WV({instanceUrl:e.nova}):e.nova,r=Re.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){Fe.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let a=e.store;if(!a){const o=await t.connectJogger(e.motionGroupId);a=await Bs.loadFor(o)}Fe.runInAction(()=>{r.joggingStore=a}),e.onSetup&&e.onSetup(a)}catch(a){r.loadingError=a}}return Q.useEffect(()=>(n(),e.store?()=>null:()=>{var a;(a=r.joggingStore)==null||a.dispose()}),[e.store,e.nova,e.motionGroupId]),Q.useEffect(()=>{const a=r.joggingStore;a&&(e.locked?a.lock("external"):a.unlock("external"))},[r.joggingStore,e.locked]),g.jsx(z.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(e3,{store:r.joggingStore,children:e.children}):g.jsx(vc,{message:"Loading jogging",error:r.loadingError})})})),e3=Re.observer(({store:e,children:t})=>{const{t:r}=Te.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(Q5,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(X5,{store:e,children:t})})}return g.jsxs(z.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(z.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(a=>{const o=a.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),s=a.label==="cartesian"?g.jsx(RC,{fontSize:"small",sx:{mr:1}}):g.jsx(AC,{fontSize:"small",sx:{mr:1}});return g.jsx(z.Tab,{label:e.showTabIcons?g.jsxs(z.Stack,{direction:"row",alignItems:"center",children:[s,o]}):o,id:`jogging-tab-${a.id}`,"aria-controls":`jogging-tab-${a.id}`},a.id)})}),g.jsx(z.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()})]})}),Wf=Q.forwardRef(({label:e,value:t},r)=>{var i;const n=z.useTheme(),[a,o]=Q.useState(!1);async function s(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),o(!0),!0}catch(l){console.error(l);const c=window.getSelection(),u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}return!1}return Q.useEffect(()=>{if(!a)return;const l=setTimeout(()=>o(!1),3e3);return()=>{l&&clearTimeout(l)}},[a]),g.jsx(z.Tooltip,{open:a,title:"Copied!",children:g.jsx(z.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(i=n.palette.backgroundPaperElevation)==null?void 0:i[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>s(),children:g.jsx(z.Typography,{ref:r,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:n.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})}),t3=Re.observer(({motionStream:e})=>{const t=Q.useRef(null);function r(){const n=e.rapidlyChangingMotionState.tcp_pose;return n?br.poseToWandelscriptString(n):""}return On(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),g.jsx(z.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:g.jsx(Wf,{value:r(),ref:t})})}),r3=Re.observer(({motionStream:e})=>{const t=Q.useRef(null);function r(){const{joints:n}=e.rapidlyChangingMotionState.state.joint_position;return`[${n.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`}return On(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),g.jsx(z.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:g.jsx(Wf,{value:r(),ref:t})})});function n3(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function a3({baseUrl:e=n3(),...t}){return g.jsxs(z.Dialog,{"aria-labelledby":"no-motion-group-modal-title",open:!0,fullWidth:!0,sx:{"& .MuiModal-backdrop":{backdropFilter:"blur(10px)"},"& .MuiDialog-paper":{"::before":{content:'""',height:"8px",width:"100%",background:"linear-gradient(90deg, #FF0E65 0%, #47D3FF 100%)"},background:"#101629"}},children:[g.jsx(z.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(z.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(z.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(z.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(z.DialogActions,{children:g.jsxs(z.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(z.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(z.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var nn=(e=>(e.IDLE="idle",e.RUNNING="running",e.PAUSED="paused",e.STOPPING="stopping",e))(nn||{});const o3=vt(Re.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:a,requiresManualReset:o=!1,variant:s="with_pause",className:i})=>{const l=z.useTheme(),{t:c}=Te.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="paused",label:c(e==="paused"?"ProgramControl.Resume.bt":"ProgramControl.Start.bt"),color:l.palette.success.main,onClick:t},pause:{enabled:e==="running",label:c("ProgramControl.Pause.bt"),color:"#FFFFFF33",onClick:r||(()=>{})},stop:{enabled:e==="running"||e==="paused",label:c("ProgramControl.Stop.bt"),color:l.palette.error.main,onClick:n}};return s==="without_pause"?[p.run,p.stop]:[p.run,p.pause,p.stop]},d=p=>{const f={sx:{fontSize:"55px"}};if(s==="without_pause")return p===0?g.jsx(In.PlayArrow,{...f}):g.jsx(In.Stop,{...f});switch(p){case 0:return g.jsx(In.PlayArrow,{...f});case 1:return g.jsx(In.Pause,{...f});case 2:return g.jsx(In.Stop,{...f});default:return null}},h=u();return g.jsx(z.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(z.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(z.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(z.Button,{variant:"contained",disabled:!p.enabled||e==="stopping"&&!o,onClick:p.onClick,sx:{width:"110px",height:"110px",borderRadius:"110px",backgroundColor:p.color,opacity:p.enabled&&!(e==="stopping"&&!o)?1:.3,"&:hover":{backgroundColor:p.color,opacity:p.enabled&&!(e==="stopping"&&!o)?.8:.3},"&:disabled":{backgroundColor:p.color,opacity:.3},minWidth:"110px",flexShrink:0},children:d(f)}),g.jsx(z.Typography,{variant:"body1",sx:{color:p.enabled&&!(e==="stopping"&&!o)?p.color:l.palette.text.disabled,textAlign:"center",opacity:p.enabled&&!(e==="stopping"&&!o)?1:.3},children:p.label})]},p.label))})})})),Ol=vt(Re.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const a=z.useTheme(),{t:o}=Te.useTranslation(),s=()=>{if(t==="SAFETY_STATE_DEVICE_EMERGENCY_STOP"||t==="SAFETY_STATE_ROBOT_EMERGENCY_STOP"||t==="SAFETY_STATE_STOP_0"||t==="SAFETY_STATE_STOP_1"||t==="SAFETY_STATE_STOP_2"||t==="SAFETY_STATE_PROTECTIVE_STOP"||t==="SAFETY_STATE_STOP"||t==="SAFETY_STATE_REDUCED"||t==="SAFETY_STATE_MASTERING"||t==="SAFETY_STATE_CONFIRM_SAFETY"||t==="SAFETY_STATE_OPERATOR_SAFETY"||t==="SAFETY_STATE_RECOVERY"||t==="SAFETY_STATE_VIOLATION")return{label:o("ProgramStateIndicator.EStop.lb"),color:a.palette.error.main};if(t==="SAFETY_STATE_UNKNOWN"||t==="SAFETY_STATE_FAULT")return{label:o("ProgramStateIndicator.Error.lb"),color:a.palette.error.main};if(t==="SAFETY_STATE_NORMAL")switch(e){case nn.RUNNING:return{label:o("ProgramStateIndicator.Running.lb"),color:a.palette.success.main};case nn.PAUSED:return{label:o("ProgramStateIndicator.Paused.lb"),color:a.palette.grey[600]};case nn.STOPPING:return{label:o("ProgramStateIndicator.Stopped.lb"),color:a.palette.error.main};case nn.IDLE:default:return{label:o("ProgramStateIndicator.Ready.lb"),color:a.palette.success.main}}return{label:o("ProgramStateIndicator.Idle.lb"),color:a.palette.grey[600]}},{label:i,color:l}=s(),u=`${i} / ${(()=>{switch(r){case"OPERATION_MODE_AUTO":return o("ProgramStateIndicator.Auto.lb");case"OPERATION_MODE_MANUAL":return o("ProgramStateIndicator.Manual.lb");case"OPERATION_MODE_MANUAL_T1":return o("ProgramStateIndicator.ManualT1.lb");case"OPERATION_MODE_MANUAL_T2":return o("ProgramStateIndicator.ManualT2.lb");default:return o("ProgramStateIndicator.Auto.lb")}})()}`;return g.jsx(z.Chip,{className:n,label:g.jsx(z.Typography,{variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2},children:u}),variant:"filled",sx:{backgroundColor:l,color:a.palette.getContrastText(l),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),Eh="0.0.0-semantically-released";function Tc(e){let t=Eh;return Eh.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function s3(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>Kf(r))}function Yf(e){return e.name.endsWith("_FLG")}function Kf(e){return/_J[0-9]+$/.test(e.name)}function i3(e,t){let r;function n(a){if(Yf(a)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${a.name}. Only one _FLG group is allowed.`);r=a}Kf(a),a.children.map(n)}if(n(e.scene),!r)throw Error(`No flange group found in robot model ${t}. Flange must be identified with a name ending in _FLG.`);return{gltf:e}}function Qf({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const a=Q.useRef([]),o=Q.useRef([]),s=Q.useRef(null),{invalidate:i}=Co.useThree();Q.useEffect(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);return s.current=new mc(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=s.current)==null||h.destroy()}},[]),Co.useFrame((d,h)=>{if(s.current){const p=s.current.update(h);u(),p||i()}});function l(d){d&&(o.current=s3(d),u(),i())}function c(d){var h;a.current=d,(h=s.current)==null||h.setTarget(d)}function u(){var h;const d=((h=s.current)==null?void 0:h.getCurrentValues())||[];if(r)r(o.current,d);else for(const[p,f]of o.current.entries()){const m=t[p],v=m.theta||0,S=m.reverse_rotation_direction?-1:1;f.rotation.y=S*(d[p]||0)+v}}return Rm(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);requestAnimationFrame(()=>c(d))}),g.jsx("group",{ref:l,children:n})}const l3="line",c3="mesh";function u3({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new St.Matrix4,a=Q.useRef([]),o=Q.useRef([]);Q.useEffect(()=>{a.current=new Array(t.length).fill(null),o.current=new Array(t.length).fill(null)},[t.length]);function s(c,u){const d=new St.Vector3,h=new St.Quaternion,p=new St.Vector3;n.decompose(d,h,p);const f=d.clone(),m=new St.Matrix4().makeRotationY(c.theta+u*(c.reverse_rotation_direction?-1:1)).multiply(new St.Matrix4().makeTranslation(0,c.d/1e3,0)).multiply(new St.Matrix4().makeTranslation(c.a/1e3,0,0)).multiply(new St.Matrix4().makeRotationX(c.alpha));return n.multiply(m),n.decompose(d,h,p),{a:f,b:d}}function i(c,u,d,h){if(!t)return;const p=t[c];if(!p)return;const{a:f,b:m}=s(p,h);u.geometry.setPositions([f.toArray(),m.toArray()].flat()),d.position.set(m.x,m.y,m.z)}function l(c,u){n.identity();for(let d=0;d<Math.min(c.length,u.length);d++){const h=a.current[d],p=o.current[d];h&&p&&i(d,h,p,u[d])}}return g.jsx(g.Fragment,{children:g.jsx(Qf,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:l,children:g.jsxs("group",{...r,name:"Scene",children:[g.jsxs("mesh",{children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((c,u)=>{const{a:d,b:h}=s(c,e.state.joint_position.joints[u]??0),p=`dhrobot_J0${u}`;return g.jsxs("group",{name:p,children:[g.jsx(at.Line,{ref:f=>{a.current[u]=f},name:l3,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{o.current[u]=f},name:c3,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const d3=console.warn;function h3(){return Q.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&d3(e)}},[]),g.jsx(g.Fragment,{})}function p3(e){return e.type==="Mesh"}function m3({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:a}=i3(at.useGLTF(e),e.split("/").pop()||e),o=Q.useCallback(i=>{i&&r&&r()},[e]);function s(i){return p3(i)?g.jsx("mesh",{name:i.name,geometry:i.geometry,material:i.material,position:i.position,rotation:i.rotation},i.uuid):g.jsx("group",{name:i.name,position:i.position,rotation:i.rotation,ref:Yf(i)?t:void 0,children:i.children.map(s)},i.uuid)}return g.jsx("group",{...n,dispose:null,ref:o,children:s(a.scene)})}const f3=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof ke.Mesh){r.material instanceof ke.Material&&(r.material.colorWrite=!1);const n=r.clone(),a=r.clone();n.material=new ke.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:ke.DoubleSide}),n.userData.isGhost=!0,a.material=new ke.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:ke.DoubleSide}),a.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(a))}}),e.userData.isGhost=!0)},g3=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof ke.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof ke.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},Xf=vt(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Tc,flangeRef:a,postModelRender:o,transparentColor:s,...i})=>{const[l,c]=Q.useState(null),u=Q.useCallback(h=>{c(h)},[]);Q.useEffect(()=>{l&&(s?f3(l,s):g3(l))},[l,s]);const d=g.jsx(u3,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(yg.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(Q.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(Qf,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx(m3,{modelURL:n(t),postModelRender:o,flangeRef:a,...i})})})}),g.jsx(h3,{})]})});function Zf({connectedMotionGroup:e,getModel:t=Tc,flangeRef:r,transparentColor:n,postModelRender:a,...o}){return e.dhParameters?g.jsx(Xf,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:a,...o}):null}function Vh({modelRenderTrigger:e,children:t,isPortrait:r=!1}){const n=at.useBounds();return Q.useEffect(()=>{e>0&&n.refresh().clip().fit()},[e,n,r]),g.jsx(g.Fragment,{children:t})}const y3=vt(Re.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:a=!1,onDriveToHomePress:o,onDriveToHomeRelease:s,connectedMotionGroup:i,robotComponent:l=Zf,cycleTimerComponent:c=Tm,className:u})=>{const d=z.useTheme(),{t:h}=Te.useTranslation(),[p,f]=Q.useState(!1),m=Q.useRef(null),v=Q.useRef(null),S=Q.useRef(null),[E,O]=Q.useState(!1),[w,T]=Q.useState({width:400,height:600}),[C,A]=Q.useState(0);z.useMediaQuery(d.breakpoints.down("sm")),z.useMediaQuery(d.breakpoints.down("md")),Q.useEffect(()=>{const Z=()=>{if(S.current){const{offsetWidth:te,offsetHeight:se}=S.current;O(te>se),T({width:te,height:se})}};Z();const ae=new ResizeObserver(Z);return S.current&&ae.observe(S.current),()=>{ae.disconnect()}},[]);const V=Q.useCallback(()=>{A(Z=>Z+1)},[]),B=Q.useCallback(()=>{!a||!o||(f(!0),o())},[a,o]),y=Q.useCallback(()=>{!a||!s||(f(!1),s())},[a,s]),R=Q.useCallback(()=>{p&&s&&(f(!1),s())},[p,s]),G=Q.useCallback(Z=>{},[]),P=E?w.width<350||w.height<250:w.width<250||w.height<180,re=P?0:E?w.width<450?.8:w.width<550?.9:1:w.width<300?.8:w.width<400?.9:1;return g.jsx(z.Card,{ref:S,className:u,elevation:5,sx:{width:"100%",height:"100%",display:"flex",flexDirection:E?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:E?{xs:160,sm:200,md:250}:{xs:200,sm:280,md:350},border:"1px solid var(--secondary-_states-outlinedBorder, #FFFFFF1F)",borderRadius:"18px",boxShadow:"none"},children:E?g.jsxs(g.Fragment,{children:[g.jsx(z.Box,{sx:{flex:"0 0 50%",position:"relative",height:"100%",minHeight:"100%",maxHeight:"100%",borderRadius:1,m:{xs:1.5,sm:2,md:3},mr:{xs:.75,sm:1,md:1.5},overflow:"hidden",display:P?"none":"block"},children:!P&&g.jsxs(Co.Canvas,{camera:{position:[4,4,4],fov:15},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute",top:0,left:0},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(Ui,{}),g.jsx(at.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,children:g.jsx(Vh,{modelRenderTrigger:C,isPortrait:!1,children:g.jsx("group",{ref:v,scale:re,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:V})})})})]})}),g.jsxs(z.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:P?"100%":"50%"},children:[g.jsxs(z.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(z.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Ol,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(z.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[g.jsxs(z.Box,{children:[g.jsx(z.Typography,{variant:"body1",sx:{mb:0,color:"var(--text-secondary, #FFFFFFB2)",textAlign:"left"},children:h("RobotCard.Runtime.lb")}),g.jsx(z.Box,{sx:{textAlign:"left"},children:g.jsx(c,{variant:"small",compact:!0,onCycleComplete:G})}),g.jsx(z.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(z.Box,{sx:{mt:"auto"},children:g.jsx(z.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:{xs:1,sm:1.5,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(z.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:B,onMouseUp:y,onMouseLeave:R,onTouchStart:B,onTouchEnd:y,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(z.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(z.Box,{children:[g.jsx(z.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Ol,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(z.Box,{sx:{flex:P?0:1,position:"relative",minHeight:P?0:{xs:120,sm:150,md:200},height:P?0:"auto",borderRadius:1,overflow:"hidden",display:P?"none":"block"},children:!P&&g.jsxs(Co.Canvas,{camera:{position:[3,3,3],fov:20},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute",top:0,left:0},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(Ui,{}),g.jsx(at.Bounds,{fit:!0,observe:!0,margin:1,children:g.jsx(Vh,{modelRenderTrigger:C,isPortrait:!0,children:g.jsx("group",{ref:v,scale:re,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:V})})})})]})}),g.jsxs(z.Box,{children:[g.jsx(z.Typography,{variant:"body1",sx:{mb:0,color:"var(--text-secondary, #FFFFFFB2)"},children:h("RobotCard.Runtime.lb")}),g.jsx(c,{variant:"small",compact:!0,onCycleComplete:G}),g.jsx(z.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}}),g.jsx(z.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:{xs:1,sm:2,md:5},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(z.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:B,onMouseUp:y,onMouseLeave:R,onTouchStart:B,onTouchEnd:y,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})]})]})})})})),b3=_a(g.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),v3=({title:e,titleId:t,...r},n)=>I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.createElement("path",{fill:"#38C6F4",fillRule:"evenodd",d:"M6.359 14.25v2.934h7.63v-3.521L10.196 9.87 9 8.674l.859-.859.337-.337.858-.858.565.565.631.63.565.565 1.196-1.195.543-.544 1.196-1.195-1.196-1.196-2.304-2.304L11.054.75 9.86 1.946 3.446 8.359 2.25 9.554l1.196 1.196 2.913 2.913zm1.69 0v1.244h4.249v-1.13L7.804 9.87 6.608 8.674l1.196-1.196L9.86 5.424l.007-.008-.543-.543-4.681 4.681 2.912 2.913.496.496v.113h2.124l1.174 1.174zm3.005-10.022-.294.294-.543-.543.837-.837 2.304 2.304-.543.543-.565-.565z",clipRule:"evenodd"})),x3=Q.forwardRef(v3);var Rc=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.READY="READY",e))(Rc||{});const eg=vt(Re.observer(({setupState:e,className:t})=>{const r=z.useTheme(),{t:n}=Te.useTranslation(),a=()=>{var c,u,d,h;switch(e){case"READY":return{label:n("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((c=r.palette.tertiary)==null?void 0:c.main)||r.palette.primary.main,backgroundColor:((u=r.palette.backgroundPaperElevation)==null?void 0:u[11])||r.palette.background.paper,textColor:"var(--secondary-contrast, #FFFFFFDE)"};case"ROBOT_DISCONNECTED":return{label:n("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:r.palette.error.main,backgroundColor:((d=r.palette.backgroundPaperElevation)==null?void 0:d[11])||r.palette.background.paper,textColor:"var(--secondary-contrast, #FFFFFFDE)"};case"PRECONDITION_NOT_FULFILLED":default:return{label:n("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:r.palette.error.main,backgroundColor:((h=r.palette.backgroundPaperElevation)==null?void 0:h[11])||r.palette.background.paper,textColor:"var(--secondary-contrast, #FFFFFFDE)"}}},{label:o,indicatorColor:s,backgroundColor:i,textColor:l}=a();return g.jsx(z.Chip,{className:t,label:g.jsxs(z.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(z.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:s,flexShrink:0}}),g.jsx(z.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:o})]}),variant:"filled",sx:{backgroundColor:i,color:r.palette.getContrastText(i),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),S3=vt(Re.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=eg,className:a})=>{const o=z.useTheme(),s=t||"Robot",i=r===Rc.READY;return g.jsxs(z.Box,{className:a,sx:{border:"1px solid var(--secondary-_states-outlinedBorder, #FFFFFF1F)",background:"var(--background-paper-elevation-8, #292B3E)",height:80,minHeight:"80px",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(z.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(z.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:"var(--primary-main, #8E56FC) !important"},"& svg path":{fill:"var(--primary-main, #8E56FC) !important"}},children:g.jsx(x3,{})}):g.jsx(b3,{sx:{color:o.palette.error.main,fontSize:24}}),g.jsx(z.Typography,{variant:"body1",sx:{fontWeight:500,color:o.palette.text.primary},children:e}),g.jsx(z.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:o.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(z.Typography,{variant:"body2",sx:{color:o.palette.text.secondary},children:s})]}),n&&g.jsx(n,{setupState:r})]})})),O3=Array(6).fill(2*Math.PI),w3=({title:e,titleId:t,...r},n)=>I.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.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"})),C3=Q.forwardRef(w3),P3=({title:e,titleId:t,...r},n)=>I.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.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"})),T3=Q.forwardRef(P3),Vt=Re.observer(({id:e,icon:t,color:r,title:n,name:a,label:o,explanation:s,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=Re.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(d){u.anchorEl=d.currentTarget},closePopover(){u.anchorEl=null}}));return g.jsxs(g.Fragment,{children:[g.jsxs(z.Stack,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[g.jsx(z.SvgIcon,{component:t,sx:{color:r}}),o&&g.jsx("div",{style:{color:r},children:o})]}),g.jsx(z.Popover,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:l??{vertical:"bottom",horizontal:"left"},transformOrigin:c??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:g.jsxs(z.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(z.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(z.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:a})]}),g.jsx(z.Typography,{fontSize:"14px",children:s}),i&&g.jsx(z.Typography,{fontSize:"12px",children:i})]})})]})}),R3=Re.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:a})=>{const o=z.useTheme(),{t:s}=Te.useTranslation();return e?g.jsx(Vt,{id:"motion-group-virtual",icon:T3,color:o.palette.tertiary.main,name:s("SafetyBar.ControllerType.Virtual.lb"),label:a?null:s("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(Te.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",g.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:r,transformOrigin:n}):g.jsx(Vt,{id:"motion-group-physical",icon:C3,color:o.palette.primary.main,name:s("SafetyBar.ControllerType.Physical.lb"),label:a?null:s("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(Te.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),A3=({title:e,titleId:t,...r},n)=>I.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.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"})),_3=Q.forwardRef(A3),E3=({title:e,titleId:t,...r},n)=>I.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.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})),V3=Q.forwardRef(E3),I3=({title:e,titleId:t,...r},n)=>I.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.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"})),M3=Q.forwardRef(I3),j3=Re.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=Te.useTranslation(),o=z.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx(Vt,{id:"operation-mode-auto",icon:_3,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Automatic.ti"),label:n?null:a("SafetyBar.OperationMode.Automatic.ti"),color:o.palette.text.secondary,explanation:g.jsx(Te.Trans,{i18nKey:"SafetyBar.OperationMode.Auto.Explanation.lb",children:"The robot controller is in automatic operation mode. Automated movement without manual confirmation is possible in this mode."}),anchorOrigin:t,transformOrigin:r});case"OPERATION_MODE_MANUAL":case"OPERATION_MODE_MANUAL_T1":case"OPERATION_MODE_MANUAL_T2":return g.jsx(Vt,{id:"operation-mode-manual",icon:M3,color:o.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Manual.lb"),label:n?null:a("SafetyBar.OperationMode.Manual.lb"),explanation:g.jsx(Te.Trans,{i18nKey:"SafetyBar.OperationMode.Manual.Explanation.lb",children:"The robot controller is in manual operation mode. On a physical robot, this generally indicates that an enabling switch must be held for the robot to move successfully."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:return g.jsx(Vt,{id:"operation-mode-error",icon:V3,color:o.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Error.lb"),label:n?null:a("SafetyBar.OperationMode.Error.lb"),explanation:g.jsx(Te.Trans,{i18nKey:"SafetyBar.OperationMode.Error.Explanation.lb",children:"The robot controller has entered an unexpected operation mode. Motion group movement may not be possible."}),literalValue:e,anchorOrigin:t,transformOrigin:r})}}),$3=({title:e,titleId:t,...r},n)=>I.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.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"})),k3=Q.forwardRef($3),U3=({title:e,titleId:t,...r},n)=>I.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),I.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"}),I.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"})),L3=Q.forwardRef(U3),D3=({title:e,titleId:t,...r},n)=>I.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.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})),F3=Q.forwardRef(D3),B3=({title:e,titleId:t,...r},n)=>I.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.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"})),N3=Q.forwardRef(B3),z3=({title:e,titleId:t,...r},n)=>I.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?I.createElement("title",{id:t},e):null,I.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"})),G3=Q.forwardRef(z3),H3=Re.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=Te.useTranslation(),o=z.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsx(Vt,{id:"safety-state-normal",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Normal.lb"),label:n?null:a("SafetyBar.SafetyState.Normal.lb"),icon:N3,color:o.palette.text.secondary,explanation:g.jsx(Te.Trans,{i18nKey:"SafetyBar.SafetyState.Normal.Explanation.lb",children:"The robot controller is in a normal safety state. Movement is not prevented by this state."}),anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_DEVICE_EMERGENCY_STOP":case"SAFETY_STATE_ROBOT_EMERGENCY_STOP":return g.jsx(Vt,{id:"safety-state-estop",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Estop.lb"),label:n?null:a("SafetyBar.SafetyState.Estop.lb"),icon:L3,color:o.palette.error.main,explanation:g.jsx(Te.Trans,{i18nKey:"SafetyBar.StopState.Estop.Explanation.lb",children:"An emergency stop of the robot controller has been triggered. Movement of the robot is no longer possible until the estop is released."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_STOP_0":case"SAFETY_STATE_STOP_1":case"SAFETY_STATE_STOP_2":case"SAFETY_STATE_PROTECTIVE_STOP":case"SAFETY_STATE_STOP":return g.jsx(Vt,{id:"safety-state-stop",icon:G3,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Stop.lb"),label:n?null:a("SafetyBar.SafetyState.Stop.lb"),color:o.palette.warning.main,explanation:g.jsx(Te.Trans,{i18nKey:"SafetyBar.SafetyState.Stop.Explanation.lb",children:"The robot controller has entered a stop state. Movement is no longer possible until the stop state is resolved."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_REDUCED":case"SAFETY_STATE_MASTERING":case"SAFETY_STATE_CONFIRM_SAFETY":case"SAFETY_STATE_OPERATOR_SAFETY":case"SAFETY_STATE_RECOVERY":case"SAFETY_STATE_VIOLATION":return g.jsx(Vt,{id:"safety-state-manual-action-required",icon:F3,color:o.palette.warning.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:a("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:g.jsx(Te.Trans,{i18nKey:"SafetyBar.SafetyState.ManualActionRequired.Explanation.lb",children:"The robot controller has entered a safety state requiring manual action to resolve."}),literalValue:e,anchorOrigin:t,transformOrigin:r});case"SAFETY_STATE_UNKNOWN":case"SAFETY_STATE_FAULT":return g.jsx(Vt,{id:"safety-state-error",icon:k3,color:o.palette.error.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Error.lb"),label:n?null:a("SafetyBar.SafetyState.Error.lb"),explanation:g.jsx(Te.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:KV(e,`Unknown safety state ${e}`)}}),q3=vt(Re.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s=!0})=>{const i=s?1:2;return g.jsxs(z.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(H3,{safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(z.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(j3,{operationMode:r,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(z.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(R3,{isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:o,compact:s})]})})),J3=z.styled(z.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,r,n;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:a})=>!a,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:a})=>a,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),W3=Q.forwardRef((e,t)=>g.jsx(J3,{ref:t,selected:e.selected,...e,color:"secondary",variant:"circular"})),Y3={$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"},K3=Q.lazy(()=>import("@monaco-editor/react"));let ki=null;async function Q3(){if(!ki){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);ki={shiki:await e({langs:[Y3],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return ki}const X3=vt(e=>{const t=z.useTheme(),[r,n]=Q.useState("dark-plus"),a=t.palette.mode==="dark"?"dark-plus":"light-plus";async function o(s){var c,u;s.languages.register({id:"wandelscript"}),s.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await Q3();l(i,s),s.editor.defineTheme(a,((u=(c=t.componentsExt)==null?void 0:c.WandelscriptEditor)==null?void 0:u.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(s),n(a)}return g.jsx(Q.Suspense,{fallback:g.jsx(vc,{}),children:g.jsx(K3,{value:e.code,onMount:(s,i)=>{o(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function tg(){var t,r,n,a,o,s,i;const e=z.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`}}},MuiButton:{styleOverrides:{root:{textTransform:"none",borderRadius:"10px"}},variants:[{props:{color:"secondary",variant:"contained"},style:{border:`1px solid ${e.palette.divider}`,background:(n=(r=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:r.tonal)==null?void 0:n.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(a=e.palette.backgroundPaperElevation)==null?void 0:a[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(s=(o=e.paletteExt)==null?void 0:o.secondary)==null?void 0:s.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":z.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function Z3(){const e=tg();return e.palette.mode="light",e}function ej(e){var n,a,o,s;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((a=e.palette)==null?void 0:a.mode)!=="dark"&&(t=!(typeof window<"u"&&((s=(o=window.matchMedia)==null?void 0:o.call(window,"(prefers-color-scheme: light)"))==null?void 0:s.matches)));const r=t?tg():Z3();return tp(r,e)}exports.CycleTimer=Tm;exports.JoggingCartesianAxisControl=el;exports.JoggingJointRotationControl=Im;exports.JoggingPanel=Z5;exports.JoggingStore=Bs;exports.LoadingCover=vc;exports.LoadingErrorMessage=Cf;exports.NoMotionGroupModal=a3;exports.PoseCartesianValues=t3;exports.PoseJointValues=r3;exports.PresetEnvironment=Ui;exports.ProgramControl=o3;exports.ProgramState=nn;exports.ProgramStateIndicator=Ol;exports.Robot=Zf;exports.RobotCard=y3;exports.RobotListItem=S3;exports.RobotSetupReadinessIndicator=eg;exports.RobotSetupReadinessState=Rc;exports.SafetyBar=q3;exports.SafetyZonesRenderer=Cg;exports.SelectableFab=W3;exports.SupportedRobot=Xf;exports.TrajectoryRenderer=Pg;exports.ValueInterpolator=mc;exports.VelocitySlider=qf;exports.VelocitySliderLabel=Pc;exports.WandelscriptEditor=X3;exports.createNovaMuiTheme=ej;exports.defaultAxisConfig=O3;exports.defaultGetModel=Tc;exports.i18n=pc;exports.useAnimationFrame=On;exports.useAutorun=Rm;exports.useInterpolation=Pm;exports.useMounted=Ts;exports.useReaction=Am;
|
|
145
|
+
*/var zA=function(){if(typeof WebSocket<"u")return WebSocket},GA=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},fr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},HA=function(){function e(t,r,n){var a=this;n===void 0&&(n={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(o){a._debug("open event");var s=a._options.minUptime,i=s===void 0?fr.minUptime:s;clearTimeout(a._connectTimeout),a._uptimeTimeout=setTimeout(function(){return a._acceptOpen()},i),a._ws.binaryType=a._binaryType,a._messageQueue.forEach(function(l){return a._ws.send(l)}),a._messageQueue=[],a.onopen&&a.onopen(o),a._listeners.open.forEach(function(l){return a._callEventListener(o,l)})},this._handleMessage=function(o){a._debug("message event"),a.onmessage&&a.onmessage(o),a._listeners.message.forEach(function(s){return a._callEventListener(o,s)})},this._handleError=function(o){a._debug("error event",o.message),a._disconnect(void 0,o.message==="TIMEOUT"?"timeout":void 0),a.onerror&&a.onerror(o),a._debug("exec error listeners"),a._listeners.error.forEach(function(s){return a._callEventListener(o,s)}),a._connect()},this._handleClose=function(o){a._debug("close event"),a._clearTimeouts(),a._shouldReconnect&&a._connect(),a.onclose&&a.onclose(o),a._listeners.close.forEach(function(s){return a._callEventListener(o,s)})},this._url=t,this._protocols=r,this._options=n,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(e,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CONNECTING",{get:function(){return e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OPEN",{get:function(){return e.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSING",{get:function(){return e.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSED",{get:function(){return e.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(t){this._binaryType=t,this._ws&&(this._ws.binaryType=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferedAmount",{get:function(){var t=this._messageQueue.reduce(function(r,n){return typeof n=="string"?r+=n.length:n instanceof Blob?r+=n.size:r+=n.byteLength,r},0);return t+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),e.prototype.close=function(t,r){if(t===void 0&&(t=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(t,r)},e.prototype.reconnect=function(t,r){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(t,r),this._connect())},e.prototype.send=function(t){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",t),this._ws.send(t);else{var r=this._options.maxEnqueuedMessages,n=r===void 0?fr.maxEnqueuedMessages:r;this._messageQueue.length<n&&(this._debug("enqueue",t),this._messageQueue.push(t))}},e.prototype.addEventListener=function(t,r){this._listeners[t]&&this._listeners[t].push(r)},e.prototype.dispatchEvent=function(t){var r,n,a=this._listeners[t.type];if(a)try{for(var o=DA(a),s=o.next();!s.done;s=o.next()){var i=s.value;this._callEventListener(t,i)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!0},e.prototype.removeEventListener=function(t,r){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(function(n){return n!==r}))},e.prototype._debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._options.debug&&console.log.apply(console,BA(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,r=t.reconnectionDelayGrowFactor,n=r===void 0?fr.reconnectionDelayGrowFactor:r,a=t.minReconnectionDelay,o=a===void 0?fr.minReconnectionDelay:a,s=t.maxReconnectionDelay,i=s===void 0?fr.maxReconnectionDelay:s,l=0;return this._retryCount>0&&(l=o*Math.pow(n,this._retryCount-1),l>i&&(l=i)),this._debug("next delay",l),l},e.prototype._wait=function(){var t=this;return new Promise(function(r){setTimeout(r,t._getNextDelay())})},e.prototype._getNextUrl=function(t){if(typeof t=="string")return Promise.resolve(t);if(typeof t=="function"){var r=t();if(typeof r=="string")return Promise.resolve(r);if(r.then)return r}throw Error("Invalid URL")},e.prototype._connect=function(){var t=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var r=this._options,n=r.maxRetries,a=n===void 0?fr.maxRetries:n,o=r.connectionTimeout,s=o===void 0?fr.connectionTimeout:o,i=r.WebSocket,l=i===void 0?zA():i;if(this._retryCount>=a){this._debug("max retries reached",this._retryCount,">=",a);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!GA(l))throw Error("No valid WebSocket class provided");this._wait().then(function(){return t._getNextUrl(t._url)}).then(function(c){t._closeCalled||(t._debug("connect",{url:c,protocols:t._protocols}),t._ws=t._protocols?new l(c,t._protocols):new l(c),t._ws.binaryType=t._binaryType,t._connectLock=!1,t._addListeners(),t._connectTimeout=setTimeout(function(){return t._handleTimeout()},s))})}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new FA(Error("TIMEOUT"),this))},e.prototype._disconnect=function(t,r){if(t===void 0&&(t=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(t,r),this._handleClose(new NA(t,r,this))}catch{}}},e.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},e.prototype._callEventListener=function(t,r){"handleEvent"in r?r.handleEvent(t):r(t)},e.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},e.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},e.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},e}(),qA=Object.defineProperty,JA=Object.defineProperties,WA=Object.getOwnPropertyDescriptors,Ud=Object.getOwnPropertySymbols,YA=Object.prototype.hasOwnProperty,KA=Object.prototype.propertyIsEnumerable,Dd=(e,t,r)=>t in e?qA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,an=(e,t)=>{for(var r in t||(t={}))YA.call(t,r)&&Dd(e,r,t[r]);if(Ud)for(var r of Ud(t))KA.call(t,r)&&Dd(e,r,t[r]);return e},cl=(e,t)=>JA(e,WA(t)),Ee=(e,t,r)=>new Promise((n,a)=>{var o=l=>{try{i(r.next(l))}catch(c){a(c)}},s=l=>{try{i(r.throw(l))}catch(c){a(c)}},i=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,s);i((r=r.apply(e,t)).next())}),QA=class extends HA{constructor(e,t={}){console.log("Opening websocket to",e),super(()=>this.targetUrl||e,void 0,{startClosed:!0}),this.opts=t,this.disposed=!1,Object.defineProperty(this,"url",{get(){return this.targetUrl}}),this.targetUrl=e,this.addEventListener("open",()=>{console.log(`Websocket to ${this.url} opened`)}),this.addEventListener("message",n=>{this.receivedFirstMessage||(this.receivedFirstMessage=n)}),this.addEventListener("close",()=>{console.log(`Websocket to ${this.url} closed`)});const r=this.reconnect;this.reconnect=()=>{this.opts.mock?this.opts.mock.handleWebsocketConnection(this):r.apply(this)},this.reconnect()}changeUrl(e){this.receivedFirstMessage=void 0,this.targetUrl=e,this.reconnect()}sendJson(e){this.opts.mock?this.opts.mock.handleWebsocketMessage(this,JSON.stringify(e)):this.send(JSON.stringify(e))}dispose(){this.close(),this.disposed=!0,this.opts.onDispose&&this.opts.onDispose()}opened(){return Ee(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.OPEN?e():(this.addEventListener("open",()=>e()),this.addEventListener("error",t))})})}closed(){return Ee(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.CLOSED?e():(this.addEventListener("close",()=>e()),this.addEventListener("error",t))})})}firstMessage(){return Ee(this,null,function*(){return this.receivedFirstMessage?this.receivedFirstMessage:new Promise((e,t)=>{const r=a=>{this.receivedFirstMessage=a,this.removeEventListener("message",r),this.removeEventListener("error",n),e(a)},n=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(a)};this.addEventListener("message",r),this.addEventListener("error",n)})})}nextMessage(){return Ee(this,null,function*(){return new Promise((e,t)=>{const r=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),e(a)},n=a=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(a)};this.addEventListener("message",r),this.addEventListener("error",n)})})}},XA=class{constructor(){this.available=typeof window<"u"&&!!window.localStorage}getJSON(e){if(!this.available)return null;const t=window.localStorage.getItem(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}setJSON(e,t){if(!this.available)return null;window.localStorage.setItem(e,JSON.stringify(t))}delete(e){if(!this.available)return null;window.localStorage.removeItem(e)}setString(e,t){if(!this.available)return null;window.localStorage.setItem(e,t)}getString(e){return this.available?window.localStorage.getItem(e):null}},Ri=new XA;function sr(e){try{return JSON.parse(e)}catch{return}}function ZA(e,t){return e||(e="world"),t||(t="world"),e===t}var un="wandelbots.io",Ai={dev:{domain:`https://auth.portal.dev.${un}`,clientId:"fLbJD0RLp5r2Dpucm5j8BjwMR6Hunfha"},stg:{domain:`https://auth.portal.stg.${un}`,clientId:"joVDeD9e786WzFNSGCqoVq7HNkWt5j6s"},prod:{domain:`https://auth.portal.${un}`,clientId:"J7WJUi38xVQdJAEBNRT9Xw1b0fXDb4J2"}},e_=e=>{if(e.includes(`dev.${un}`))return Ai.dev;if(e.includes(`stg.${un}`))return Ai.stg;if(e.includes(un))return Ai.prod;throw new Error("Unsupported instance URL. Cannot determine Auth0 configuration.")},t_=e=>Ee(void 0,null,function*(){var t;if(typeof window>"u")throw new Error("Access token must be set to use NovaClient when not in a browser environment.");const r=e_(e);if(new URL(e).origin===window.location.origin)throw window.location.reload(),new Error("Failed to reload page to get auth details, please refresh manually");const{Auth0Client:n}=yield Promise.resolve().then(()=>require("./auth0-spa-js.production.esm-BLRAk7Yh.cjs")),a=new n({domain:r.domain,clientId:(t=r.clientId)!=null?t:"",useRefreshTokens:!1,authorizationParams:{audience:"nova-api",redirect_uri:window.location.origin}});if(window.location.search.includes("code=")&&window.location.search.includes("state=")){const{appState:s}=yield a.handleRedirectCallback();window.history.replaceState({},document.title,(s==null?void 0:s.returnTo)||window.location.pathname)}else yield a.loginWithRedirect();return yield a.getTokenSilently()});function Gm(e,t){return function(){return e.apply(t,arguments)}}const{toString:r_}=Object.prototype,{getPrototypeOf:bc}=Object,js=(e=>t=>{const r=r_.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Tt=e=>(e=e.toLowerCase(),t=>js(t)===e),$s=e=>t=>typeof t===e,{isArray:Vn}=Array,Sa=$s("undefined");function n_(e){return e!==null&&!Sa(e)&&e.constructor!==null&&!Sa(e.constructor)&&dt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Hm=Tt("ArrayBuffer");function a_(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Hm(e.buffer),t}const o_=$s("string"),dt=$s("function"),qm=$s("number"),ks=e=>e!==null&&typeof e=="object",s_=e=>e===!0||e===!1,xo=e=>{if(js(e)!=="object")return!1;const t=bc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},i_=Tt("Date"),l_=Tt("File"),c_=Tt("Blob"),u_=Tt("FileList"),d_=e=>ks(e)&&dt(e.pipe),h_=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||dt(e.append)&&((t=js(e))==="formdata"||t==="object"&&dt(e.toString)&&e.toString()==="[object FormData]"))},p_=Tt("URLSearchParams"),[m_,f_,g_,y_]=["ReadableStream","Request","Response","Headers"].map(Tt),b_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ma(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),Vn(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(n=0;n<s;n++)i=o[n],t.call(null,e[i],i,e)}}function Jm(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}const xr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wm=e=>!Sa(e)&&e!==xr;function ul(){const{caseless:e}=Wm(this)&&this||{},t={},r=(n,a)=>{const o=e&&Jm(t,a)||a;xo(t[o])&&xo(n)?t[o]=ul(t[o],n):xo(n)?t[o]=ul({},n):Vn(n)?t[o]=n.slice():t[o]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&Ma(arguments[n],r);return t}const v_=(e,t,r,{allOwnKeys:n}={})=>(Ma(t,(a,o)=>{r&&dt(a)?e[o]=Gm(a,r):e[o]=a},{allOwnKeys:n}),e),x_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),S_=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},O_=(e,t,r,n)=>{let a,o,s;const i={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)s=a[o],(!n||n(s,e,t))&&!i[s]&&(t[s]=e[s],i[s]=!0);e=r!==!1&&bc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},w_=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},C_=e=>{if(!e)return null;if(Vn(e))return e;let t=e.length;if(!qm(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},P_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&bc(Uint8Array)),T_=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=n.next())&&!a.done;){const o=a.value;t.call(e,o[0],o[1])}},R_=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},A_=Tt("HTMLFormElement"),__=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),Ld=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),E_=Tt("RegExp"),Ym=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Ma(r,(a,o)=>{let s;(s=t(a,o,e))!==!1&&(n[o]=s||a)}),Object.defineProperties(e,n)},V_=e=>{Ym(e,(t,r)=>{if(dt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(dt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},I_=(e,t)=>{const r={},n=a=>{a.forEach(o=>{r[o]=!0})};return Vn(e)?n(e):n(String(e).split(t)),r},M_=()=>{},j_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function $_(e){return!!(e&&dt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const k_=e=>{const t=new Array(10),r=(n,a)=>{if(ks(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const o=Vn(n)?[]:{};return Ma(n,(s,i)=>{const l=r(s,a+1);!Sa(l)&&(o[i]=l)}),t[a]=void 0,o}}return n};return r(e,0)},U_=Tt("AsyncFunction"),D_=e=>e&&(ks(e)||dt(e))&&dt(e.then)&&dt(e.catch),Km=((e,t)=>e?setImmediate:t?((r,n)=>(xr.addEventListener("message",({source:a,data:o})=>{a===xr&&o===r&&n.length&&n.shift()()},!1),a=>{n.push(a),xr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",dt(xr.postMessage)),L_=typeof queueMicrotask<"u"?queueMicrotask.bind(xr):typeof process<"u"&&process.nextTick||Km,H={isArray:Vn,isArrayBuffer:Hm,isBuffer:n_,isFormData:h_,isArrayBufferView:a_,isString:o_,isNumber:qm,isBoolean:s_,isObject:ks,isPlainObject:xo,isReadableStream:m_,isRequest:f_,isResponse:g_,isHeaders:y_,isUndefined:Sa,isDate:i_,isFile:l_,isBlob:c_,isRegExp:E_,isFunction:dt,isStream:d_,isURLSearchParams:p_,isTypedArray:P_,isFileList:u_,forEach:Ma,merge:ul,extend:v_,trim:b_,stripBOM:x_,inherits:S_,toFlatObject:O_,kindOf:js,kindOfTest:Tt,endsWith:w_,toArray:C_,forEachEntry:T_,matchAll:R_,isHTMLForm:A_,hasOwnProperty:Ld,hasOwnProp:Ld,reduceDescriptors:Ym,freezeMethods:V_,toObjectSet:I_,toCamelCase:__,noop:M_,toFiniteNumber:j_,findKey:Jm,global:xr,isContextDefined:Wm,isSpecCompliantForm:$_,toJSONObject:k_,isAsyncFn:U_,isThenable:D_,setImmediate:Km,asap:L_};function he(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}H.inherits(he,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const Qm=he.prototype,Xm={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Xm[e]={value:e}});Object.defineProperties(he,Xm);Object.defineProperty(Qm,"isAxiosError",{value:!0});he.from=(e,t,r,n,a,o)=>{const s=Object.create(Qm);return H.toFlatObject(e,s,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),he.call(s,e.message,t,r,n,a),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const B_=null;function dl(e){return H.isPlainObject(e)||H.isArray(e)}function Zm(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function Bd(e,t,r){return e?e.concat(t).map(function(a,o){return a=Zm(a),!r&&o?"["+a+"]":a}).join(r?".":""):t}function F_(e){return H.isArray(e)&&!e.some(dl)}const N_=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function Us(e,t,r){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!H.isUndefined(b[m])});const n=r.metaTokens,a=r.visitor||u,o=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(a))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(H.isDate(f))return f.toISOString();if(!l&&H.isBlob(f))throw new he("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(f)||H.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,b){let S=f;if(f&&!b&&typeof f=="object"){if(H.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(H.isArray(f)&&F_(f)||(H.isFileList(f)||H.endsWith(m,"[]"))&&(S=H.toArray(f)))return m=Zm(m),S.forEach(function(O,P){!(H.isUndefined(O)||O===null)&&t.append(s===!0?Bd([m],P,o):s===null?m:m+"[]",c(O))}),!1}return dl(f)?!0:(t.append(Bd(b,m,o),c(f)),!1)}const d=[],h=Object.assign(N_,{defaultVisitor:u,convertValue:c,isVisitable:dl});function p(f,m){if(!H.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),H.forEach(f,function(S,E){(!(H.isUndefined(S)||S===null)&&a.call(t,S,H.isString(E)?E.trim():E,m,h))===!0&&p(S,m?m.concat(E):[E])}),d.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Fd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function vc(e,t){this._pairs=[],e&&Us(e,this,t)}const ef=vc.prototype;ef.append=function(t,r){this._pairs.push([t,r])};ef.toString=function(t){const r=t?function(n){return t.call(this,n,Fd)}:Fd;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function z_(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tf(e,t,r){if(!t)return e;const n=r&&r.encode||z_;H.isFunction(r)&&(r={serialize:r});const a=r&&r.serialize;let o;if(a?o=a(t,r):o=H.isURLSearchParams(t)?t.toString():new vc(t,r).toString(n),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Nd{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){H.forEach(this.handlers,function(n){n!==null&&t(n)})}}const rf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},G_=typeof URLSearchParams<"u"?URLSearchParams:vc,H_=typeof FormData<"u"?FormData:null,q_=typeof Blob<"u"?Blob:null,J_={isBrowser:!0,classes:{URLSearchParams:G_,FormData:H_,Blob:q_},protocols:["http","https","file","blob","url","data"]},xc=typeof window<"u"&&typeof document<"u",hl=typeof navigator=="object"&&navigator||void 0,W_=xc&&(!hl||["ReactNative","NativeScript","NS"].indexOf(hl.product)<0),Y_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",K_=xc&&window.location.href||"http://localhost",Q_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:xc,hasStandardBrowserEnv:W_,hasStandardBrowserWebWorkerEnv:Y_,navigator:hl,origin:K_},Symbol.toStringTag,{value:"Module"})),Qe={...Q_,...J_};function X_(e,t){return Us(e,new Qe.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,o){return Qe.isNode&&H.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Z_(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function eE(e){const t={},r=Object.keys(e);let n;const a=r.length;let o;for(n=0;n<a;n++)o=r[n],t[o]=e[o];return t}function nf(e){function t(r,n,a,o){let s=r[o++];if(s==="__proto__")return!0;const i=Number.isFinite(+s),l=o>=r.length;return s=!s&&H.isArray(a)?a.length:s,l?(H.hasOwnProp(a,s)?a[s]=[a[s],n]:a[s]=n,!i):((!a[s]||!H.isObject(a[s]))&&(a[s]=[]),t(r,n,a[s],o)&&H.isArray(a[s])&&(a[s]=eE(a[s])),!i)}if(H.isFormData(e)&&H.isFunction(e.entries)){const r={};return H.forEachEntry(e,(n,a)=>{t(Z_(n),a,r,0)}),r}return null}function tE(e,t,r){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const ja={transitional:rf,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,o=H.isObject(t);if(o&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return a?JSON.stringify(nf(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return X_(t,this.formSerializer).toString();if((i=H.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Us(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||a?(r.setContentType("application/json",!1),tE(t)):t}],transformResponse:[function(t){const r=this.transitional||ja.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.isString(t)&&(n&&!this.responseType||a)){const s=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(i){if(s)throw i.name==="SyntaxError"?he.from(i,he.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qe.classes.FormData,Blob:Qe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{ja.headers[e]={}});const rE=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),nE=e=>{const t={};let r,n,a;return e&&e.split(`
|
|
146
|
+
`).forEach(function(s){a=s.indexOf(":"),r=s.substring(0,a).trim().toLowerCase(),n=s.substring(a+1).trim(),!(!r||t[r]&&rE[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},zd=Symbol("internals");function qn(e){return e&&String(e).trim().toLowerCase()}function So(e){return e===!1||e==null?e:H.isArray(e)?e.map(So):String(e)}function aE(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const oE=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function _i(e,t,r,n,a){if(H.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!H.isString(t)){if(H.isString(n))return t.indexOf(n)!==-1;if(H.isRegExp(n))return n.test(t)}}function sE(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function iE(e,t){const r=H.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,o,s){return this[n].call(this,t,a,o,s)},configurable:!0})})}let it=class{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function o(i,l,c){const u=qn(l);if(!u)throw new Error("header name must be a non-empty string");const d=H.findKey(a,u);(!d||a[d]===void 0||c===!0||c===void 0&&a[d]!==!1)&&(a[d||l]=So(i))}const s=(i,l)=>H.forEach(i,(c,u)=>o(c,u,l));if(H.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(H.isString(t)&&(t=t.trim())&&!oE(t))s(nE(t),r);else if(H.isHeaders(t))for(const[i,l]of t.entries())o(l,i,n);else t!=null&&o(r,t,n);return this}get(t,r){if(t=qn(t),t){const n=H.findKey(this,t);if(n){const a=this[n];if(!r)return a;if(r===!0)return aE(a);if(H.isFunction(r))return r.call(this,a,n);if(H.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=qn(t),t){const n=H.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||_i(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function o(s){if(s=qn(s),s){const i=H.findKey(n,s);i&&(!r||_i(n,n[i],i,r))&&(delete n[i],a=!0)}}return H.isArray(t)?t.forEach(o):o(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const o=r[n];(!t||_i(this,this[o],o,t,!0))&&(delete this[o],a=!0)}return a}normalize(t){const r=this,n={};return H.forEach(this,(a,o)=>{const s=H.findKey(n,o);if(s){r[s]=So(a),delete r[o];return}const i=t?sE(o):String(o).trim();i!==o&&delete r[o],r[i]=So(a),n[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return H.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&H.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
147
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[zd]=this[zd]={accessors:{}}).accessors,a=this.prototype;function o(s){const i=qn(s);n[i]||(iE(a,s),n[i]=!0)}return H.isArray(t)?t.forEach(o):o(t),this}};it.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(it.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});H.freezeMethods(it);function Ei(e,t){const r=this||ja,n=t||r,a=it.from(n.headers);let o=n.data;return H.forEach(e,function(i){o=i.call(r,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function af(e){return!!(e&&e.__CANCEL__)}function In(e,t,r){he.call(this,e??"canceled",he.ERR_CANCELED,t,r),this.name="CanceledError"}H.inherits(In,he,{__CANCEL__:!0});function of(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new he("Request failed with status code "+r.status,[he.ERR_BAD_REQUEST,he.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function lE(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function cE(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[o];s||(s=c),r[a]=l,n[a]=c;let d=o,h=0;for(;d!==a;)h+=r[d++],d=d%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),c-s<t)return;const p=u&&c-u;return p?Math.round(h*1e3/p):void 0}}function uE(e,t){let r=0,n=1e3/t,a,o;const s=(c,u=Date.now())=>{r=u,a=null,o&&(clearTimeout(o),o=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?s(c,u):(a=c,o||(o=setTimeout(()=>{o=null,s(a)},n-d)))},()=>a&&s(a)]}const Wo=(e,t,r=3)=>{let n=0;const a=cE(50,250);return uE(o=>{const s=o.loaded,i=o.lengthComputable?o.total:void 0,l=s-n,c=a(l),u=s<=i;n=s;const d={loaded:s,total:i,progress:i?s/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-s)/c:void 0,event:o,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},r)},Gd=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Hd=e=>(...t)=>H.asap(()=>e(...t)),dE=Qe.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Qe.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Qe.origin),Qe.navigator&&/(msie|trident)/i.test(Qe.navigator.userAgent)):()=>!0,hE=Qe.hasStandardBrowserEnv?{write(e,t,r,n,a,o){const s=[e+"="+encodeURIComponent(t)];H.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),H.isString(n)&&s.push("path="+n),H.isString(a)&&s.push("domain="+a),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function pE(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function mE(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function sf(e,t,r){let n=!pE(t);return e&&n||r==!1?mE(e,t):t}const qd=e=>e instanceof it?{...e}:e;function Ar(e,t){t=t||{};const r={};function n(c,u,d,h){return H.isPlainObject(c)&&H.isPlainObject(u)?H.merge.call({caseless:h},c,u):H.isPlainObject(u)?H.merge({},u):H.isArray(u)?u.slice():u}function a(c,u,d,h){if(H.isUndefined(u)){if(!H.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function o(c,u){if(!H.isUndefined(u))return n(void 0,u)}function s(c,u){if(H.isUndefined(u)){if(!H.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function i(c,u,d){if(d in t)return n(c,u);if(d in e)return n(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(c,u,d)=>a(qd(c),qd(u),d,!0)};return H.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||a,h=d(e[u],t[u],u);H.isUndefined(h)&&d!==i||(r[u]=h)}),r}const lf=e=>{const t=Ar({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:o,headers:s,auth:i}=t;t.headers=s=it.from(s),t.url=tf(sf(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let l;if(H.isFormData(r)){if(Qe.hasStandardBrowserEnv||Qe.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Qe.hasStandardBrowserEnv&&(n&&H.isFunction(n)&&(n=n(t)),n||n!==!1&&dE(t.url))){const c=a&&o&&hE.read(o);c&&s.set(a,c)}return t},fE=typeof XMLHttpRequest<"u",gE=fE&&function(e){return new Promise(function(r,n){const a=lf(e);let o=a.data;const s=it.from(a.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=a,u,d,h,p,f;function m(){p&&p(),f&&f(),a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(a.method.toUpperCase(),a.url,!0),b.timeout=a.timeout;function S(){if(!b)return;const O=it.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),C={data:!i||i==="text"||i==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:O,config:e,request:b};of(function(T){r(T),m()},function(T){n(T),m()},C),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(S)},b.onabort=function(){b&&(n(new he("Request aborted",he.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new he("Network Error",he.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let P=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const C=a.transitional||rf;a.timeoutErrorMessage&&(P=a.timeoutErrorMessage),n(new he(P,C.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,e,b)),b=null},o===void 0&&s.setContentType(null),"setRequestHeader"in b&&H.forEach(s.toJSON(),function(P,C){b.setRequestHeader(C,P)}),H.isUndefined(a.withCredentials)||(b.withCredentials=!!a.withCredentials),i&&i!=="json"&&(b.responseType=a.responseType),c&&([h,f]=Wo(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,p]=Wo(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(u=O=>{b&&(n(!O||O.type?new In(null,e,b):O),b.abort(),b=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const E=lE(a.url);if(E&&Qe.protocols.indexOf(E)===-1){n(new he("Unsupported protocol "+E+":",he.ERR_BAD_REQUEST,e));return}b.send(o||null)})},yE=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,a;const o=function(c){if(!a){a=!0,i();const u=c instanceof Error?c:this.reason;n.abort(u instanceof he?u:new In(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,o(new he(`timeout ${t} of ms exceeded`,he.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:l}=n;return l.unsubscribe=()=>H.asap(i),l}},bE=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,a;for(;n<r;)a=n+t,yield e.slice(n,a),n=a},vE=async function*(e,t){for await(const r of xE(e))yield*bE(r,t)},xE=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Jd=(e,t,r,n)=>{const a=vE(e,t);let o=0,s,i=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await a.next();if(c){i(),l.close();return}let d=u.byteLength;if(r){let h=o+=d;r(h)}l.enqueue(new Uint8Array(u))}catch(c){throw i(c),c}},cancel(l){return i(l),a.return()}},{highWaterMark:2})},Ds=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",cf=Ds&&typeof ReadableStream=="function",SE=Ds&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),uf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},OE=cf&&uf(()=>{let e=!1;const t=new Request(Qe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Wd=64*1024,pl=cf&&uf(()=>H.isReadableStream(new Response("").body)),Yo={stream:pl&&(e=>e.body)};Ds&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Yo[t]&&(Yo[t]=H.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new he(`Response type '${t}' is not supported`,he.ERR_NOT_SUPPORT,n)})})})(new Response);const wE=async e=>{if(e==null)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e))return(await new Request(Qe.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(H.isArrayBufferView(e)||H.isArrayBuffer(e))return e.byteLength;if(H.isURLSearchParams(e)&&(e=e+""),H.isString(e))return(await SE(e)).byteLength},CE=async(e,t)=>{const r=H.toFiniteNumber(e.getContentLength());return r??wE(t)},PE=Ds&&(async e=>{let{url:t,method:r,data:n,signal:a,cancelToken:o,timeout:s,onDownloadProgress:i,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=lf(e);c=c?(c+"").toLowerCase():"text";let p=yE([a,o&&o.toAbortSignal()],s),f;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(l&&OE&&r!=="get"&&r!=="head"&&(b=await CE(u,n))!==0){let C=new Request(t,{method:"POST",body:n,duplex:"half"}),w;if(H.isFormData(n)&&(w=C.headers.get("content-type"))&&u.setContentType(w),C.body){const[T,V]=Gd(b,Wo(Hd(l)));n=Jd(C.body,Wd,T,V)}}H.isString(d)||(d=d?"include":"omit");const S="credentials"in Request.prototype;f=new Request(t,{...h,signal:p,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:S?d:void 0});let E=await fetch(f);const O=pl&&(c==="stream"||c==="response");if(pl&&(i||O&&m)){const C={};["status","statusText","headers"].forEach(z=>{C[z]=E[z]});const w=H.toFiniteNumber(E.headers.get("content-length")),[T,V]=i&&Gd(w,Wo(Hd(i),!0))||[];E=new Response(Jd(E.body,Wd,T,()=>{V&&V(),m&&m()}),C)}c=c||"text";let P=await Yo[H.findKey(Yo,c)||"text"](E,e);return!O&&m&&m(),await new Promise((C,w)=>{of(C,w,{data:P,headers:it.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:f})})}catch(S){throw m&&m(),S&&S.name==="TypeError"&&/fetch/i.test(S.message)?Object.assign(new he("Network Error",he.ERR_NETWORK,e,f),{cause:S.cause||S}):he.from(S,S&&S.code,e,f)}}),ml={http:B_,xhr:gE,fetch:PE};H.forEach(ml,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Yd=e=>`- ${e}`,TE=e=>H.isFunction(e)||e===null||e===!1,df={getAdapter:e=>{e=H.isArray(e)?e:[e];const{length:t}=e;let r,n;const a={};for(let o=0;o<t;o++){r=e[o];let s;if(n=r,!TE(r)&&(n=ml[(s=String(r)).toLowerCase()],n===void 0))throw new he(`Unknown adapter '${s}'`);if(n)break;a[s||"#"+o]=n}if(!n){const o=Object.entries(a).map(([i,l])=>`adapter ${i} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?o.length>1?`since :
|
|
148
|
+
`+o.map(Yd).join(`
|
|
149
|
+
`):" "+Yd(o[0]):"as no adapter specified";throw new he("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:ml};function Vi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new In(null,e)}function Kd(e){return Vi(e),e.headers=it.from(e.headers),e.data=Ei.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),df.getAdapter(e.adapter||ja.adapter)(e).then(function(n){return Vi(e),n.data=Ei.call(e,e.transformResponse,n),n.headers=it.from(n.headers),n},function(n){return af(n)||(Vi(e),n&&n.response&&(n.response.data=Ei.call(e,e.transformResponse,n.response),n.response.headers=it.from(n.response.headers))),Promise.reject(n)})}const hf="1.8.3",Ls={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ls[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Qd={};Ls.transitional=function(t,r,n){function a(o,s){return"[Axios v"+hf+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return(o,s,i)=>{if(t===!1)throw new he(a(s," has been removed"+(r?" in "+r:"")),he.ERR_DEPRECATED);return r&&!Qd[s]&&(Qd[s]=!0,console.warn(a(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,s,i):!0}};Ls.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function RE(e,t,r){if(typeof e!="object")throw new he("options must be an object",he.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const o=n[a],s=t[o];if(s){const i=e[o],l=i===void 0||s(i,o,e);if(l!==!0)throw new he("option "+o+" must be "+l,he.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new he("Unknown option "+o,he.ERR_BAD_OPTION)}}const Oo={assertOptions:RE,validators:Ls},Et=Oo.validators;let wr=class{constructor(t){this.defaults=t,this.interceptors={request:new Nd,response:new Nd}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const o=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
150
|
+
`+o):n.stack=o}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ar(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:o}=r;n!==void 0&&Oo.assertOptions(n,{silentJSONParsing:Et.transitional(Et.boolean),forcedJSONParsing:Et.transitional(Et.boolean),clarifyTimeoutError:Et.transitional(Et.boolean)},!1),a!=null&&(H.isFunction(a)?r.paramsSerializer={serialize:a}:Oo.assertOptions(a,{encode:Et.function,serialize:Et.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Oo.assertOptions(r,{baseUrl:Et.spelling("baseURL"),withXsrfToken:Et.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=o&&H.merge(o.common,o[r.method]);o&&H.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),r.headers=it.concat(s,o);const i=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,i.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const f=[Kd.bind(this),void 0];for(f.unshift.apply(f,i),f.push.apply(f,c),h=f.length,u=Promise.resolve(r);d<h;)u=u.then(f[d++],f[d++]);return u}h=i.length;let p=r;for(d=0;d<h;){const f=i[d++],m=i[d++];try{p=f(p)}catch(b){m.call(this,b);break}}try{u=Kd.call(this,p)}catch(f){return Promise.reject(f)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Ar(this.defaults,t);const r=sf(t.baseURL,t.url,t.allowAbsoluteUrls);return tf(r,t.params,t.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(t){wr.prototype[t]=function(r,n){return this.request(Ar(n||{},{method:t,url:r,data:(n||{}).data}))}});H.forEach(["post","put","patch"],function(t){function r(n){return function(o,s,i){return this.request(Ar(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}wr.prototype[t]=r(),wr.prototype[t+"Form"]=r(!0)});let AE=class pf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(a=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](a);n._listeners=null}),this.promise.then=a=>{let o;const s=new Promise(i=>{n.subscribe(i),o=i}).then(a);return s.cancel=function(){n.unsubscribe(o)},s},t(function(o,s,i){n.reason||(n.reason=new In(o,s,i),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new pf(function(a){t=a}),cancel:t}}};function _E(e){return function(r){return e.apply(null,r)}}function EE(e){return H.isObject(e)&&e.isAxiosError===!0}const fl={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(fl).forEach(([e,t])=>{fl[t]=e});function mf(e){const t=new wr(e),r=Gm(wr.prototype.request,t);return H.extend(r,wr.prototype,t,{allOwnKeys:!0}),H.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return mf(Ar(e,a))},r}const _=mf(ja);_.Axios=wr;_.CanceledError=In;_.CancelToken=AE;_.isCancel=af;_.VERSION=hf;_.toFormData=Us;_.AxiosError=he;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=_E;_.isAxiosError=EE;_.mergeConfig=Ar;_.AxiosHeaders=it;_.formToJSON=e=>nf(H.isHTMLForm(e)?new FormData(e):e);_.getAdapter=df.getAdapter;_.HttpStatusCode=fl;_.default=_;const{Axios:X3,AxiosError:gl,CanceledError:Z3,isCancel:ej,CancelToken:tj,VERSION:rj,all:nj,Cancel:aj,isAxiosError:VE,spread:oj,toFormData:sj,AxiosHeaders:ij,HttpStatusCode:lj,formToJSON:cj,getAdapter:uj,mergeConfig:dj}=_,I="/api/v1".replace(/\/+$/,"");class Ve{constructor(t,r=I,n=_){jn(this,"basePath");jn(this,"axios");jn(this,"configuration");this.basePath=r,this.axios=n,t&&(this.configuration=t,this.basePath=t.basePath??r)}}class IE extends Error{constructor(r,n){super(n);jn(this,"field");this.field=r,this.name="RequiredError"}}const M={},j="https://example.com",x=function(e,t,r){if(r==null)throw new IE(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},$=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},k=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 yl(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>yl(e,n,r)):Object.keys(t).forEach(n=>yl(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t))}const U=function(e,...t){const r=new URLSearchParams(e.search);yl(r,t),e.search=r.toString()},de=function(e,t,r){const n=typeof e!="string";return(n&&r&&r.isJsonMime?r.isJsonMime(t.headers["Content-Type"]):n)?JSON.stringify(e!==void 0?e:{}):e||""},D=function(e){return e.pathname+e.search+e.hash},L=function(e,t,r,n){return(a=t,o=r)=>{const s={...e.options,url:(a.defaults.baseURL?"":(n==null?void 0:n.basePath)??o)+e.url};return a.request(s)}},ME=function(e){return{addApp:async(t,r,n,a={})=>{x("addApp","cell",t),x("addApp","app",r);const o="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(r,l,e),{url:D(s),options:l}},clearApps:async(t,r,n={})=>{x("clearApps","cell",t);const a="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),r!==void 0&&(c.completionTimeout=r),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deleteApp:async(t,r,n,a={})=>{x("deleteApp","cell",t),x("deleteApp","app",r);const o="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.completionTimeout=n),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},getApp:async(t,r,n={})=>{x("getApp","cell",t),x("getApp","app",r);const a="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listApps:async(t,r={})=>{x("listApps","cell",t);const n="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},updateApp:async(t,r,n,a,o={})=>{x("updateApp","cell",t),x("updateApp","app",r),x("updateApp","app2",n);const s="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),i=new URL(s,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};$(c,e),await k(u,e),a!==void 0&&(d.completionTimeout=a),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=de(n,c,e),{url:D(i),options:c}}}},Yr=function(e){const t=ME(e);return{async addApp(r,n,a,o){var c,u;const s=await t.addApp(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async clearApps(r,n,a){var l,c;const o=await t.clearApps(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ApplicationApi.clearApps"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async deleteApp(r,n,a,o){var c,u;const s=await t.deleteApp(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async getApp(r,n,a){var l,c;const o=await t.getApp(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ApplicationApi.getApp"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async listApps(r,n){var i,l;const a=await t.listApps(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["ApplicationApi.listApps"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async updateApp(r,n,a,o,s){var u,d;const i=await t.updateApp(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=M["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>L(i,_,I,e)(h,c||p)}}};class Xd extends Ve{addApp(t,r,n,a){return Yr(this.configuration).addApp(t,r,n,a).then(o=>o(this.axios,this.basePath))}clearApps(t,r,n){return Yr(this.configuration).clearApps(t,r,n).then(a=>a(this.axios,this.basePath))}deleteApp(t,r,n,a){return Yr(this.configuration).deleteApp(t,r,n,a).then(o=>o(this.axios,this.basePath))}getApp(t,r,n){return Yr(this.configuration).getApp(t,r,n).then(a=>a(this.axios,this.basePath))}listApps(t,r){return Yr(this.configuration).listApps(t,r).then(n=>n(this.axios,this.basePath))}updateApp(t,r,n,a,o){return Yr(this.configuration).updateApp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const jE=function(e){return{deleteCell:async(t,r,n={})=>{x("deleteCell","cell",t);const a="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),r!==void 0&&(c.completionTimeout=r),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deployCell:async(t,r,n={})=>{x("deployCell","cell",t);const a="/cells",o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await k(l,e),r!==void 0&&(c.completionTimeout=r),l["Content-Type"]="application/json",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(t,i,e),{url:D(o),options:i}},getCell:async(t,r={})=>{x("getCell","cell",t);const n="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},getCellStatus:async(t,r={})=>{x("getCellStatus","cell",t);const n="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},listCells:async(t={})=>{const r="/cells",n=new URL(r,j);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};$(o,e),await k(s,e),U(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:D(n),options:o}},updateCell:async(t,r,n,a={})=>{x("updateCell","cell",t),x("updateCell","cell2",r);const o="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(r,l,e),{url:D(s),options:l}}}},Kr=function(e){const t=jE(e);return{async deleteCell(r,n,a){var l,c;const o=await t.deleteCell(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["CellApi.deleteCell"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async deployCell(r,n,a){var l,c;const o=await t.deployCell(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["CellApi.deployCell"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getCell(r,n){var i,l;const a=await t.getCell(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["CellApi.getCell"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async getCellStatus(r,n){var i,l;const a=await t.getCellStatus(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["CellApi.getCellStatus"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async listCells(r){var s,i;const n=await t.listCells(r),a=(e==null?void 0:e.serverIndex)??0,o=(i=(s=M["CellApi.listCells"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>L(n,_,I,e)(l,o||c)},async updateCell(r,n,a,o){var c,u;const s=await t.updateCell(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)}}};class $E extends Ve{deleteCell(t,r,n){return Kr(this.configuration).deleteCell(t,r,n).then(a=>a(this.axios,this.basePath))}deployCell(t,r,n){return Kr(this.configuration).deployCell(t,r,n).then(a=>a(this.axios,this.basePath))}getCell(t,r){return Kr(this.configuration).getCell(t,r).then(n=>n(this.axios,this.basePath))}getCellStatus(t,r){return Kr(this.configuration).getCellStatus(t,r).then(n=>n(this.axios,this.basePath))}listCells(t){return Kr(this.configuration).listCells(t).then(r=>r(this.axios,this.basePath))}updateCell(t,r,n,a){return Kr(this.configuration).updateCell(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const kE=function(e){return{addRobotController:async(t,r,n,a={})=>{x("addRobotController","cell",t),x("addRobotController","robotController",r);const o="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(r,l,e),{url:D(s),options:l}},clearRobotControllers:async(t,r,n={})=>{x("clearRobotControllers","cell",t);const a="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),r!==void 0&&(c.completionTimeout=r),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deleteRobotController:async(t,r,n,a={})=>{x("deleteRobotController","cell",t),x("deleteRobotController","controller",r);const o="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.completionTimeout=n),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},getCurrentRobotControllerState:async(t,r,n={})=>{x("getCurrentRobotControllerState","cell",t),x("getCurrentRobotControllerState","controller",r);const a="/cells/{cell}/controllers/{controller}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getMode:async(t,r,n={})=>{x("getMode","cell",t),x("getMode","controller",r);const a="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getRobotController:async(t,r,n={})=>{x("getRobotController","cell",t),x("getRobotController","controller",r);const a="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getSupportedModes:async(t,r,n={})=>{x("getSupportedModes","cell",t),x("getSupportedModes","controller",r);const a="/cells/{cell}/controllers/{controller}/controller-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getVirtualRobotConfiguration:async(t,r,n={})=>{x("getVirtualRobotConfiguration","cell",t),x("getVirtualRobotConfiguration","controller",r);const a="/cells/{cell}/controllers/{controller}/virtual-robot-configuration".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listControllers:async(t,r={})=>{x("listControllers","cell",t);const n="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},setDefaultMode:async(t,r,n,a={})=>{x("setDefaultMode","cell",t),x("setDefaultMode","controller",r),x("setDefaultMode","mode",n);const o="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.mode=n),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},streamFreeDrive:async(t,r,n,a={})=>{x("streamFreeDrive","cell",t),x("streamFreeDrive","controller",r);const o="/cells/{cell}/controllers/{controller}/free-drive-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.response_rate=n),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},streamModeChange:async(t,r,n={})=>{x("streamModeChange","cell",t),x("streamModeChange","controller",r);const a="/cells/{cell}/controllers/{controller}/mode-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},streamRobotControllerState:async(t,r,n,a={})=>{x("streamRobotControllerState","cell",t),x("streamRobotControllerState","controller",r);const o="/cells/{cell}/controllers/{controller}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.response_rate=n),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},updateRobotController:async(t,r,n,a,o={})=>{x("updateRobotController","cell",t),x("updateRobotController","controller",r),x("updateRobotController","robotController",n);const s="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(s,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};$(c,e),await k(u,e),a!==void 0&&(d.completionTimeout=a),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=de(n,c,e),{url:D(i),options:c}}}},rt=function(e){const t=kE(e);return{async addRobotController(r,n,a,o){var c,u;const s=await t.addRobotController(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async clearRobotControllers(r,n,a){var l,c;const o=await t.clearRobotControllers(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ControllerApi.clearRobotControllers"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async deleteRobotController(r,n,a,o){var c,u;const s=await t.deleteRobotController(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async getCurrentRobotControllerState(r,n,a){var l,c;const o=await t.getCurrentRobotControllerState(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getMode(r,n,a){var l,c;const o=await t.getMode(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ControllerApi.getMode"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getRobotController(r,n,a){var l,c;const o=await t.getRobotController(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ControllerApi.getRobotController"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getSupportedModes(r,n,a){var l,c;const o=await t.getSupportedModes(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ControllerApi.getSupportedModes"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getVirtualRobotConfiguration(r,n,a){var l,c;const o=await t.getVirtualRobotConfiguration(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ControllerApi.getVirtualRobotConfiguration"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async listControllers(r,n){var i,l;const a=await t.listControllers(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["ControllerApi.listControllers"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async setDefaultMode(r,n,a,o){var c,u;const s=await t.setDefaultMode(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async streamFreeDrive(r,n,a,o){var c,u;const s=await t.streamFreeDrive(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async streamModeChange(r,n,a){var l,c;const o=await t.streamModeChange(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ControllerApi.streamModeChange"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async streamRobotControllerState(r,n,a,o){var c,u;const s=await t.streamRobotControllerState(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["ControllerApi.streamRobotControllerState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async updateRobotController(r,n,a,o,s){var u,d;const i=await t.updateRobotController(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=M["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>L(i,_,I,e)(h,c||p)}}};class UE extends Ve{addRobotController(t,r,n,a){return rt(this.configuration).addRobotController(t,r,n,a).then(o=>o(this.axios,this.basePath))}clearRobotControllers(t,r,n){return rt(this.configuration).clearRobotControllers(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRobotController(t,r,n,a){return rt(this.configuration).deleteRobotController(t,r,n,a).then(o=>o(this.axios,this.basePath))}getCurrentRobotControllerState(t,r,n){return rt(this.configuration).getCurrentRobotControllerState(t,r,n).then(a=>a(this.axios,this.basePath))}getMode(t,r,n){return rt(this.configuration).getMode(t,r,n).then(a=>a(this.axios,this.basePath))}getRobotController(t,r,n){return rt(this.configuration).getRobotController(t,r,n).then(a=>a(this.axios,this.basePath))}getSupportedModes(t,r,n){return rt(this.configuration).getSupportedModes(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotConfiguration(t,r,n){return rt(this.configuration).getVirtualRobotConfiguration(t,r,n).then(a=>a(this.axios,this.basePath))}listControllers(t,r){return rt(this.configuration).listControllers(t,r).then(n=>n(this.axios,this.basePath))}setDefaultMode(t,r,n,a){return rt(this.configuration).setDefaultMode(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamFreeDrive(t,r,n,a){return rt(this.configuration).streamFreeDrive(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamModeChange(t,r,n){return rt(this.configuration).streamModeChange(t,r,n).then(a=>a(this.axios,this.basePath))}streamRobotControllerState(t,r,n,a){return rt(this.configuration).streamRobotControllerState(t,r,n,a).then(o=>o(this.axios,this.basePath))}updateRobotController(t,r,n,a,o){return rt(this.configuration).updateRobotController(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const DE=function(e){return{listIODescriptions:async(t,r,n,a={})=>{x("listIODescriptions","cell",t),x("listIODescriptions","controller",r);const o="/cells/{cell}/controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),n&&(u.ios=n),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},listIOValues:async(t,r,n,a={})=>{x("listIOValues","cell",t),x("listIOValues","controller",r);const o="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),n&&(u.ios=n),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},setOutputValues:async(t,r,n,a={})=>{x("setOutputValues","cell",t),x("setOutputValues","controller",r),x("setOutputValues","iOValue",n);const o="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}},streamIOValues:async(t,r,n,a={})=>{x("streamIOValues","cell",t),x("streamIOValues","controller",r);const o="/cells/{cell}/controllers/{controller}/ios/stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),n&&(u.ios=n),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},waitForIOEvent:async(t,r,n,a,o,s,i,l={})=>{x("waitForIOEvent","cell",t),x("waitForIOEvent","controller",r),x("waitForIOEvent","io",n),x("waitForIOEvent","comparisonType",a);const c="/cells/{cell}/controllers/{controller}/ios/wait-for".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),u=new URL(c,j);let d;e&&(d=e.baseOptions);const h={method:"GET",...d,...l},p={},f={};$(h,e),await k(p,e),n!==void 0&&(f.io=n),a!==void 0&&(f.comparison_type=a),o!==void 0&&(f.boolean_value=o),s!==void 0&&(f.integer_value=s),i!==void 0&&(f.floating_value=i),U(u,f);let m=d&&d.headers?d.headers:{};return h.headers={...p,...m,...l.headers},{url:D(u),options:h}}}},Jn=function(e){const t=DE(e);return{async listIODescriptions(r,n,a,o){var c,u;const s=await t.listIODescriptions(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["ControllerIOsApi.listIODescriptions"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async listIOValues(r,n,a,o){var c,u;const s=await t.listIOValues(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["ControllerIOsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async setOutputValues(r,n,a,o){var c,u;const s=await t.setOutputValues(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["ControllerIOsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async streamIOValues(r,n,a,o){var c,u;const s=await t.streamIOValues(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["ControllerIOsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async waitForIOEvent(r,n,a,o,s,i,l,c){var p,f;const u=await t.waitForIOEvent(r,n,a,o,s,i,l,c),d=(e==null?void 0:e.serverIndex)??0,h=(f=(p=M["ControllerIOsApi.waitForIOEvent"])==null?void 0:p[d])==null?void 0:f.url;return(m,b)=>L(u,_,I,e)(m,h||b)}}};class LE extends Ve{listIODescriptions(t,r,n,a){return Jn(this.configuration).listIODescriptions(t,r,n,a).then(o=>o(this.axios,this.basePath))}listIOValues(t,r,n,a){return Jn(this.configuration).listIOValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}setOutputValues(t,r,n,a){return Jn(this.configuration).setOutputValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamIOValues(t,r,n,a){return Jn(this.configuration).streamIOValues(t,r,n,a).then(o=>o(this.axios,this.basePath))}waitForIOEvent(t,r,n,a,o,s,i,l){return Jn(this.configuration).waitForIOEvent(t,r,n,a,o,s,i,l).then(c=>c(this.axios,this.basePath))}}const BE=function(e){return{addCoordinateSystem:async(t,r,n={})=>{x("addCoordinateSystem","cell",t),x("addCoordinateSystem","addRequest",r);const a="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};$(i,e),await k(l,e),l["Content-Type"]="application/json",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:D(o),options:i}},deleteCoordinateSystem:async(t,r,n={})=>{x("deleteCoordinateSystem","cell",t),x("deleteCoordinateSystem","coordinateSystem",r);const a="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getCoordinateSystem:async(t,r,n,a={})=>{x("getCoordinateSystem","cell",t),x("getCoordinateSystem","coordinateSystem",r);const o="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.rotation_type=n),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},listCoordinateSystems:async(t,r,n={})=>{x("listCoordinateSystems","cell",t);const a="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),r!==void 0&&(c.rotation_type=r),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},transformInCoordinateSystem:async(t,r,n,a={})=>{x("transformInCoordinateSystem","cell",t),x("transformInCoordinateSystem","coordinateSystem",r),x("transformInCoordinateSystem","pose",n);const o="/cells/{cell}/coordinate-systems/{coordinate-system}/transform".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}}}},Wn=function(e){const t=BE(e);return{async addCoordinateSystem(r,n,a){var l,c;const o=await t.addCoordinateSystem(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["CoordinateSystemsApi.addCoordinateSystem"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async deleteCoordinateSystem(r,n,a){var l,c;const o=await t.deleteCoordinateSystem(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["CoordinateSystemsApi.deleteCoordinateSystem"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getCoordinateSystem(r,n,a,o){var c,u;const s=await t.getCoordinateSystem(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["CoordinateSystemsApi.getCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async listCoordinateSystems(r,n,a){var l,c;const o=await t.listCoordinateSystems(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["CoordinateSystemsApi.listCoordinateSystems"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async transformInCoordinateSystem(r,n,a,o){var c,u;const s=await t.transformInCoordinateSystem(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["CoordinateSystemsApi.transformInCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)}}};class FE extends Ve{addCoordinateSystem(t,r,n){return Wn(this.configuration).addCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}deleteCoordinateSystem(t,r,n){return Wn(this.configuration).deleteCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}getCoordinateSystem(t,r,n,a){return Wn(this.configuration).getCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}listCoordinateSystems(t,r,n){return Wn(this.configuration).listCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}transformInCoordinateSystem(t,r,n,a){return Wn(this.configuration).transformInCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const NE=function(e){return{clearDevices:async(t,r={})=>{x("clearDevices","cell",t);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},createDevice:async(t,r,n={})=>{x("createDevice","cell",t),x("createDevice","createDeviceRequestInner",r);const a="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await k(l,e),l["Content-Type"]="application/json",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:D(o),options:i}},deleteDevice:async(t,r,n={})=>{x("deleteDevice","cell",t),x("deleteDevice","identifier",r);const a="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getDevice:async(t,r,n={})=>{x("getDevice","cell",t),x("getDevice","identifier",r);const a="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listDevices:async(t,r={})=>{x("listDevices","cell",t);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}}}},Yn=function(e){const t=NE(e);return{async clearDevices(r,n){var i,l;const a=await t.clearDevices(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["DeviceConfigurationApi.clearDevices"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async createDevice(r,n,a){var l,c;const o=await t.createDevice(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["DeviceConfigurationApi.createDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async deleteDevice(r,n,a){var l,c;const o=await t.deleteDevice(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["DeviceConfigurationApi.deleteDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getDevice(r,n,a){var l,c;const o=await t.getDevice(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["DeviceConfigurationApi.getDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async listDevices(r,n){var i,l;const a=await t.listDevices(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["DeviceConfigurationApi.listDevices"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)}}};class zE extends Ve{clearDevices(t,r){return Yn(this.configuration).clearDevices(t,r).then(n=>n(this.axios,this.basePath))}createDevice(t,r,n){return Yn(this.configuration).createDevice(t,r,n).then(a=>a(this.axios,this.basePath))}deleteDevice(t,r,n){return Yn(this.configuration).deleteDevice(t,r,n).then(a=>a(this.axios,this.basePath))}getDevice(t,r,n){return Yn(this.configuration).getDevice(t,r,n).then(a=>a(this.axios,this.basePath))}listDevices(t,r){return Yn(this.configuration).listDevices(t,r).then(n=>n(this.axios,this.basePath))}}const GE=function(e){return{createProgram:async(t,r,n,a={})=>{x("createProgram","cell",t),x("createProgram","body",r);const o="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.name=n),c["Content-Type"]="text/plain",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(r,l,e),{url:D(s),options:l}},deleteProgram:async(t,r,n={})=>{x("deleteProgram","cell",t),x("deleteProgram","program",r);const a="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deleteProgramList:async(t,r,n={})=>{x("deleteProgramList","cell",t),x("deleteProgramList","programIds",r);const a="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),r&&(c.program_ids=r),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getProgram:async(t,r,n={})=>{x("getProgram","cell",t),x("getProgram","program",r);const a="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},updateProgram:async(t,r,n,a={})=>{x("updateProgram","cell",t),x("updateProgram","program",r),x("updateProgram","body",n);const o="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="text/plain",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}}}},Kn=function(e){const t=GE(e);return{async createProgram(r,n,a,o){var c,u;const s=await t.createProgram(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["LibraryProgramApi.createProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async deleteProgram(r,n,a){var l,c;const o=await t.deleteProgram(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["LibraryProgramApi.deleteProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async deleteProgramList(r,n,a){var l,c;const o=await t.deleteProgramList(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["LibraryProgramApi.deleteProgramList"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getProgram(r,n,a){var l,c;const o=await t.getProgram(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["LibraryProgramApi.getProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async updateProgram(r,n,a,o){var c,u;const s=await t.updateProgram(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["LibraryProgramApi.updateProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)}}};class HE extends Ve{createProgram(t,r,n,a){return Kn(this.configuration).createProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}deleteProgram(t,r,n){return Kn(this.configuration).deleteProgram(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramList(t,r,n){return Kn(this.configuration).deleteProgramList(t,r,n).then(a=>a(this.axios,this.basePath))}getProgram(t,r,n){return Kn(this.configuration).getProgram(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgram(t,r,n,a){return Kn(this.configuration).updateProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const qE=function(e){return{getProgramMetadata:async(t,r,n={})=>{x("getProgramMetadata","cell",t),x("getProgramMetadata","program",r);const a="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listProgramMetadata:async(t,r,n={})=>{x("listProgramMetadata","cell",t);const a="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),r!==void 0&&(c.show_hidden=r),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},updateProgramMetadata:async(t,r,n,a={})=>{x("updateProgramMetadata","cell",t),x("updateProgramMetadata","program",r),x("updateProgramMetadata","updateProgramMetadataRequest",n);const o="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}},uploadProgramMetadataImage:async(t,r,n,a={})=>{x("uploadProgramMetadataImage","cell",t),x("uploadProgramMetadataImage","program",r),x("uploadProgramMetadataImage","file",n);const o="/cells/{cell}/store/programs/{program}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={},d=new(e&&e.formDataCtor||FormData);$(l,e),await k(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",U(s,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...a.headers},l.data=d,{url:D(s),options:l}}}},ro=function(e){const t=qE(e);return{async getProgramMetadata(r,n,a){var l,c;const o=await t.getProgramMetadata(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["LibraryProgramMetadataApi.getProgramMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async listProgramMetadata(r,n,a){var l,c;const o=await t.listProgramMetadata(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["LibraryProgramMetadataApi.listProgramMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async updateProgramMetadata(r,n,a,o){var c,u;const s=await t.updateProgramMetadata(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["LibraryProgramMetadataApi.updateProgramMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async uploadProgramMetadataImage(r,n,a,o){var c,u;const s=await t.uploadProgramMetadataImage(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["LibraryProgramMetadataApi.uploadProgramMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)}}};class JE extends Ve{getProgramMetadata(t,r,n){return ro(this.configuration).getProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramMetadata(t,r,n){return ro(this.configuration).listProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgramMetadata(t,r,n,a){return ro(this.configuration).updateProgramMetadata(t,r,n,a).then(o=>o(this.axios,this.basePath))}uploadProgramMetadataImage(t,r,n,a){return ro(this.configuration).uploadProgramMetadataImage(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const WE=function(e){return{createRecipe:async(t,r,n,a,o={})=>{x("createRecipe","cell",t),x("createRecipe","programId",r),x("createRecipe","body",n);const s="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),i=new URL(s,j);let l;e&&(l=e.baseOptions);const c={method:"POST",...l,...o},u={},d={};$(c,e),await k(u,e),r!==void 0&&(d.program_id=r),a!==void 0&&(d.name=a),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=de(n,c,e),{url:D(i),options:c}},deleteRecipe:async(t,r,n={})=>{x("deleteRecipe","cell",t),x("deleteRecipe","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deleteRecipeList:async(t,r,n={})=>{x("deleteRecipeList","cell",t),x("deleteRecipeList","recipeIds",r);const a="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),r&&(c.recipe_ids=r),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getRecipe:async(t,r,n={})=>{x("getRecipe","cell",t),x("getRecipe","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},updateRecipe:async(t,r,n,a={})=>{x("updateRecipe","cell",t),x("updateRecipe","recipe",r),x("updateRecipe","body",n);const o="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}}}},Qn=function(e){const t=WE(e);return{async createRecipe(r,n,a,o,s){var u,d;const i=await t.createRecipe(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=M["LibraryRecipeApi.createRecipe"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>L(i,_,I,e)(h,c||p)},async deleteRecipe(r,n,a){var l,c;const o=await t.deleteRecipe(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["LibraryRecipeApi.deleteRecipe"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async deleteRecipeList(r,n,a){var l,c;const o=await t.deleteRecipeList(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["LibraryRecipeApi.deleteRecipeList"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getRecipe(r,n,a){var l,c;const o=await t.getRecipe(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["LibraryRecipeApi.getRecipe"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async updateRecipe(r,n,a,o){var c,u;const s=await t.updateRecipe(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["LibraryRecipeApi.updateRecipe"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)}}};class YE extends Ve{createRecipe(t,r,n,a,o){return Qn(this.configuration).createRecipe(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteRecipe(t,r,n){return Qn(this.configuration).deleteRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRecipeList(t,r,n){return Qn(this.configuration).deleteRecipeList(t,r,n).then(a=>a(this.axios,this.basePath))}getRecipe(t,r,n){return Qn(this.configuration).getRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}updateRecipe(t,r,n,a){return Qn(this.configuration).updateRecipe(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const KE=function(e){return{getRecipeMetadata:async(t,r,n={})=>{x("getRecipeMetadata","cell",t),x("getRecipeMetadata","recipe",r);const a="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listRecipeMetadata:async(t,r={})=>{x("listRecipeMetadata","cell",t);const n="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},updateRecipeMetadata:async(t,r,n,a={})=>{x("updateRecipeMetadata","cell",t),x("updateRecipeMetadata","recipe",r),x("updateRecipeMetadata","updateRecipeMetadataRequest",n);const o="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}},uploadRecipeMetadataImage:async(t,r,n,a={})=>{x("uploadRecipeMetadataImage","cell",t),x("uploadRecipeMetadataImage","recipe",r),x("uploadRecipeMetadataImage","file",n);const o="/cells/{cell}/store/recipes/{recipe}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={},d=new(e&&e.formDataCtor||FormData);$(l,e),await k(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",U(s,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...a.headers},l.data=d,{url:D(s),options:l}}}},no=function(e){const t=KE(e);return{async getRecipeMetadata(r,n,a){var l,c;const o=await t.getRecipeMetadata(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["LibraryRecipeMetadataApi.getRecipeMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async listRecipeMetadata(r,n){var i,l;const a=await t.listRecipeMetadata(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["LibraryRecipeMetadataApi.listRecipeMetadata"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async updateRecipeMetadata(r,n,a,o){var c,u;const s=await t.updateRecipeMetadata(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["LibraryRecipeMetadataApi.updateRecipeMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async uploadRecipeMetadataImage(r,n,a,o){var c,u;const s=await t.uploadRecipeMetadataImage(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["LibraryRecipeMetadataApi.uploadRecipeMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)}}};class QE extends Ve{getRecipeMetadata(t,r,n){return no(this.configuration).getRecipeMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listRecipeMetadata(t,r){return no(this.configuration).listRecipeMetadata(t,r).then(n=>n(this.axios,this.basePath))}updateRecipeMetadata(t,r,n,a){return no(this.configuration).updateRecipeMetadata(t,r,n,a).then(o=>o(this.axios,this.basePath))}uploadRecipeMetadataImage(t,r,n,a){return no(this.configuration).uploadRecipeMetadataImage(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const XE=function(e){return{deleteAllMotions:async(t,r={})=>{x("deleteAllMotions","cell",t);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},deleteMotion:async(t,r,n={})=>{x("deleteMotion","cell",t),x("deleteMotion","motion",r);const a="/cells/{cell}/motions/{motion}/delete".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},executeTrajectory:async(t,r,n={})=>{x("executeTrajectory","cell",t),x("executeTrajectory","executeTrajectoryRequest",r);const a="/cells/{cell}/motions/executetrajectory".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),l["Content-Type"]="application/json",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:D(o),options:i}},getMotionTrajectory:async(t,r,n,a,o={})=>{x("getMotionTrajectory","cell",t),x("getMotionTrajectory","motion",r),x("getMotionTrajectory","sampleTime",n);const s="/cells/{cell}/motions/{motion}/trajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(s,j);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},u={},d={};$(c,e),await k(u,e),n!==void 0&&(d.sample_time=n),a!==void 0&&(d.responses_coordinate_system=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:D(i),options:c}},getMotionTrajectorySample:async(t,r,n,a,o={})=>{x("getMotionTrajectorySample","cell",t),x("getMotionTrajectorySample","motion",r);const s="/cells/{cell}/motions/{motion}/trajectorysample".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(s,j);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},u={},d={};$(c,e),await k(u,e),n!==void 0&&(d.location_on_trajectory=n),a!==void 0&&(d.response_coordinate_system=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:D(i),options:c}},getPlannedMotion:async(t,r,n,a={})=>{x("getPlannedMotion","cell",t),x("getPlannedMotion","motion",r);const o="/cells/{cell}/motions/{motion}/planned-motion".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.sample_time=n),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},getPlanningMotionGroupModels:async(t,r={})=>{x("getPlanningMotionGroupModels","cell",t);const n="/cells/{cell}/motion-planning/motion-group-models".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},listMotions:async(t,r={})=>{x("listMotions","cell",t);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},loadPlannedMotion:async(t,r,n={})=>{x("loadPlannedMotion","cell",t),x("loadPlannedMotion","plannedMotion",r);const a="/cells/{cell}/planned-motions".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await k(l,e),l["Content-Type"]="application/json",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:D(o),options:i}},planCollisionFreePTP:async(t,r,n={})=>{x("planCollisionFreePTP","cell",t);const a="/cells/{cell}/motion-planning/plan-collision-free-ptp".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await k(l,e),l["Content-Type"]="application/json",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:D(o),options:i}},planMotion:async(t,r,n={})=>{x("planMotion","cell",t),x("planMotion","planRequest",r);const a="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await k(l,e),l["Content-Type"]="application/json",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:D(o),options:i}},planTrajectory:async(t,r,n={})=>{x("planTrajectory","cell",t);const a="/cells/{cell}/motion-planning/plan-trajectory".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await k(l,e),l["Content-Type"]="application/json",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:D(o),options:i}},stopExecution:async(t,r,n={})=>{x("stopExecution","cell",t),x("stopExecution","motion",r);const a="/cells/{cell}/motions/{motion}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},streamMove:async(t,r,n={})=>{x("streamMove","cell",t),x("streamMove","streamMoveRequest",r);const a="/cells/{cell}/motions/streammove".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),l["Content-Type"]="application/json",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:D(o),options:i}},streamMoveBackward:async(t,r,n,a,o,s,i={})=>{x("streamMoveBackward","cell",t),x("streamMoveBackward","motion",r),x("streamMoveBackward","playbackSpeedInPercent",n);const l="/cells/{cell}/motions/{motion}/executebackward".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),c=new URL(l,j);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};$(d,e),await k(h,e),n!==void 0&&(p.playback_speed_in_percent=n),a!==void 0&&(p.response_rate=a),o!==void 0&&(p.response_coordinate_system=o),s!==void 0&&(p.start_location_on_trajectory=s),U(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:D(c),options:d}},streamMoveForward:async(t,r,n,a,o,s,i={})=>{x("streamMoveForward","cell",t),x("streamMoveForward","motion",r),x("streamMoveForward","playbackSpeedInPercent",n);const l="/cells/{cell}/motions/{motion}/executeforward".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),c=new URL(l,j);let u;e&&(u=e.baseOptions);const d={method:"GET",...u,...i},h={},p={};$(d,e),await k(h,e),n!==void 0&&(p.playback_speed_in_percent=n),a!==void 0&&(p.response_rate=a),o!==void 0&&(p.response_coordinate_system=o),s!==void 0&&(p.start_location_on_trajectory=s),U(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:D(c),options:d}},streamMoveToTrajectoryViaJointPTP:async(t,r,n,a,o,s,i,l,c,u,d={})=>{x("streamMoveToTrajectoryViaJointPTP","cell",t),x("streamMoveToTrajectoryViaJointPTP","motion",r),x("streamMoveToTrajectoryViaJointPTP","locationOnTrajectory",n);const h="/cells/{cell}/motions/{motion}/executetotrajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),p=new URL(h,j);let f;e&&(f=e.baseOptions);const m={method:"GET",...f,...d},b={},S={};$(m,e),await k(b,e),n!==void 0&&(S.location_on_trajectory=n),a&&(S["limit_override.joint_velocity_limits.joints"]=a),o&&(S["limit_override.joint_acceleration_limits.joints"]=o),s!==void 0&&(S["limit_override.tcp_velocity_limit"]=s),i!==void 0&&(S["limit_override.tcp_acceleration_limit"]=i),l!==void 0&&(S["limit_override.tcp_orientation_velocity_limit"]=l),c!==void 0&&(S["limit_override.tcp_orientation_acceleration_limit"]=c),u!==void 0&&(S.responses_coordinate_system=u),U(p,S);let E=f&&f.headers?f.headers:{};return m.headers={...b,...E,...d.headers},{url:D(p),options:m}}}},Ye=function(e){const t=XE(e);return{async deleteAllMotions(r,n){var i,l;const a=await t.deleteAllMotions(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["MotionApi.deleteAllMotions"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async deleteMotion(r,n,a){var l,c;const o=await t.deleteMotion(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionApi.deleteMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async executeTrajectory(r,n,a){var l,c;const o=await t.executeTrajectory(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionApi.executeTrajectory"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getMotionTrajectory(r,n,a,o,s){var u,d;const i=await t.getMotionTrajectory(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=M["MotionApi.getMotionTrajectory"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>L(i,_,I,e)(h,c||p)},async getMotionTrajectorySample(r,n,a,o,s){var u,d;const i=await t.getMotionTrajectorySample(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=M["MotionApi.getMotionTrajectorySample"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>L(i,_,I,e)(h,c||p)},async getPlannedMotion(r,n,a,o){var c,u;const s=await t.getPlannedMotion(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["MotionApi.getPlannedMotion"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async getPlanningMotionGroupModels(r,n){var i,l;const a=await t.getPlanningMotionGroupModels(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["MotionApi.getPlanningMotionGroupModels"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async listMotions(r,n){var i,l;const a=await t.listMotions(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["MotionApi.listMotions"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async loadPlannedMotion(r,n,a){var l,c;const o=await t.loadPlannedMotion(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionApi.loadPlannedMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async planCollisionFreePTP(r,n,a){var l,c;const o=await t.planCollisionFreePTP(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionApi.planCollisionFreePTP"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async planMotion(r,n,a){var l,c;const o=await t.planMotion(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionApi.planMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async planTrajectory(r,n,a){var l,c;const o=await t.planTrajectory(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionApi.planTrajectory"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async stopExecution(r,n,a){var l,c;const o=await t.stopExecution(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionApi.stopExecution"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async streamMove(r,n,a){var l,c;const o=await t.streamMove(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionApi.streamMove"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async streamMoveBackward(r,n,a,o,s,i,l){var h,p;const c=await t.streamMoveBackward(r,n,a,o,s,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=M["MotionApi.streamMoveBackward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>L(c,_,I,e)(f,d||m)},async streamMoveForward(r,n,a,o,s,i,l){var h,p;const c=await t.streamMoveForward(r,n,a,o,s,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=M["MotionApi.streamMoveForward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>L(c,_,I,e)(f,d||m)},async streamMoveToTrajectoryViaJointPTP(r,n,a,o,s,i,l,c,u,d,h){var b,S;const p=await t.streamMoveToTrajectoryViaJointPTP(r,n,a,o,s,i,l,c,u,d,h),f=(e==null?void 0:e.serverIndex)??0,m=(S=(b=M["MotionApi.streamMoveToTrajectoryViaJointPTP"])==null?void 0:b[f])==null?void 0:S.url;return(E,O)=>L(p,_,I,e)(E,m||O)}}};class ZE extends Ve{deleteAllMotions(t,r){return Ye(this.configuration).deleteAllMotions(t,r).then(n=>n(this.axios,this.basePath))}deleteMotion(t,r,n){return Ye(this.configuration).deleteMotion(t,r,n).then(a=>a(this.axios,this.basePath))}executeTrajectory(t,r,n){return Ye(this.configuration).executeTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionTrajectory(t,r,n,a,o){return Ye(this.configuration).getMotionTrajectory(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getMotionTrajectorySample(t,r,n,a,o){return Ye(this.configuration).getMotionTrajectorySample(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getPlannedMotion(t,r,n,a){return Ye(this.configuration).getPlannedMotion(t,r,n,a).then(o=>o(this.axios,this.basePath))}getPlanningMotionGroupModels(t,r){return Ye(this.configuration).getPlanningMotionGroupModels(t,r).then(n=>n(this.axios,this.basePath))}listMotions(t,r){return Ye(this.configuration).listMotions(t,r).then(n=>n(this.axios,this.basePath))}loadPlannedMotion(t,r,n){return Ye(this.configuration).loadPlannedMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planCollisionFreePTP(t,r,n){return Ye(this.configuration).planCollisionFreePTP(t,r,n).then(a=>a(this.axios,this.basePath))}planMotion(t,r,n){return Ye(this.configuration).planMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planTrajectory(t,r,n){return Ye(this.configuration).planTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}stopExecution(t,r,n){return Ye(this.configuration).stopExecution(t,r,n).then(a=>a(this.axios,this.basePath))}streamMove(t,r,n){return Ye(this.configuration).streamMove(t,r,n).then(a=>a(this.axios,this.basePath))}streamMoveBackward(t,r,n,a,o,s,i){return Ye(this.configuration).streamMoveBackward(t,r,n,a,o,s,i).then(l=>l(this.axios,this.basePath))}streamMoveForward(t,r,n,a,o,s,i){return Ye(this.configuration).streamMoveForward(t,r,n,a,o,s,i).then(l=>l(this.axios,this.basePath))}streamMoveToTrajectoryViaJointPTP(t,r,n,a,o,s,i,l,c,u,d){return Ye(this.configuration).streamMoveToTrajectoryViaJointPTP(t,r,n,a,o,s,i,l,c,u,d).then(h=>h(this.axios,this.basePath))}}const eV=function(e){return{activateAllMotionGroups:async(t,r,n={})=>{x("activateAllMotionGroups","cell",t),x("activateAllMotionGroups","controller",r);const a="/cells/{cell}/motion-groups/all".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await k(l,e),r!==void 0&&(c.controller=r),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},activateMotionGroup:async(t,r,n={})=>{x("activateMotionGroup","cell",t),x("activateMotionGroup","motionGroup",r);const a="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await k(l,e),r!==void 0&&(c.motion_group=r),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deactivateMotionGroup:async(t,r,n={})=>{x("deactivateMotionGroup","cell",t),x("deactivateMotionGroup","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listMotionGroups:async(t,r={})=>{x("listMotionGroups","cell",t);const n="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}}}},ao=function(e){const t=eV(e);return{async activateAllMotionGroups(r,n,a){var l,c;const o=await t.activateAllMotionGroups(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionGroupApi.activateAllMotionGroups"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async activateMotionGroup(r,n,a){var l,c;const o=await t.activateMotionGroup(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionGroupApi.activateMotionGroup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async deactivateMotionGroup(r,n,a){var l,c;const o=await t.deactivateMotionGroup(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionGroupApi.deactivateMotionGroup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async listMotionGroups(r,n){var i,l;const a=await t.listMotionGroups(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["MotionGroupApi.listMotionGroups"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)}}};class tV extends Ve{activateAllMotionGroups(t,r,n){return ao(this.configuration).activateAllMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}activateMotionGroup(t,r,n){return ao(this.configuration).activateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}deactivateMotionGroup(t,r,n){return ao(this.configuration).deactivateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}listMotionGroups(t,r){return ao(this.configuration).listMotionGroups(t,r).then(n=>n(this.axios,this.basePath))}}const rV=function(e){return{getActivePayload:async(t,r,n={})=>{x("getActivePayload","cell",t),x("getActivePayload","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/payloads/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getActiveTcp:async(t,r,n,a={})=>{x("getActiveTcp","cell",t),x("getActiveTcp","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/tcps/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.rotation_type=n),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},getCurrentMotionGroupState:async(t,r,n,a,o={})=>{x("getCurrentMotionGroupState","cell",t),x("getCurrentMotionGroupState","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),i=new URL(s,j);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...o},u={},d={};$(c,e),await k(u,e),n!==void 0&&(d.tcp=n),a!==void 0&&(d.response_coordinate_system=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:D(i),options:c}},getInfoCapabilities:async(t,r,n={})=>{x("getInfoCapabilities","cell",t),x("getInfoCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/info-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getMotionGroupSpecification:async(t,r,n={})=>{x("getMotionGroupSpecification","cell",t),x("getMotionGroupSpecification","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/specification".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getMounting:async(t,r,n={})=>{x("getMounting","cell",t),x("getMounting","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getOptimizerConfiguration:async(t,r,n,a={})=>{x("getOptimizerConfiguration","cell",t),x("getOptimizerConfiguration","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/optimizer-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.tcp=n),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},getSafetySetup:async(t,r,n={})=>{x("getSafetySetup","cell",t),x("getSafetySetup","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/safety-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listPayloads:async(t,r,n={})=>{x("listPayloads","cell",t),x("listPayloads","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/payloads".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listTcps:async(t,r,n,a={})=>{x("listTcps","cell",t),x("listTcps","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.rotation_type=n),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},streamMotionGroupState:async(t,r,n,a,o,s={})=>{x("streamMotionGroupState","cell",t),x("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,j);let c;e&&(c=e.baseOptions);const u={method:"GET",...c,...s},d={},h={};$(u,e),await k(d,e),n!==void 0&&(h.response_rate=n),a!==void 0&&(h.response_coordinate_system=a),o!==void 0&&(h.tcp=o),U(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...s.headers},{url:D(l),options:u}}}},xt=function(e){const t=rV(e);return{async getActivePayload(r,n,a){var l,c;const o=await t.getActivePayload(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionGroupInfosApi.getActivePayload"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getActiveTcp(r,n,a,o){var c,u;const s=await t.getActiveTcp(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["MotionGroupInfosApi.getActiveTcp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async getCurrentMotionGroupState(r,n,a,o,s){var u,d;const i=await t.getCurrentMotionGroupState(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=M["MotionGroupInfosApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>L(i,_,I,e)(h,c||p)},async getInfoCapabilities(r,n,a){var l,c;const o=await t.getInfoCapabilities(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionGroupInfosApi.getInfoCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getMotionGroupSpecification(r,n,a){var l,c;const o=await t.getMotionGroupSpecification(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionGroupInfosApi.getMotionGroupSpecification"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getMounting(r,n,a){var l,c;const o=await t.getMounting(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionGroupInfosApi.getMounting"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getOptimizerConfiguration(r,n,a,o){var c,u;const s=await t.getOptimizerConfiguration(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["MotionGroupInfosApi.getOptimizerConfiguration"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async getSafetySetup(r,n,a){var l,c;const o=await t.getSafetySetup(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionGroupInfosApi.getSafetySetup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async listPayloads(r,n,a){var l,c;const o=await t.listPayloads(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionGroupInfosApi.listPayloads"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async listTcps(r,n,a,o){var c,u;const s=await t.listTcps(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["MotionGroupInfosApi.listTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async streamMotionGroupState(r,n,a,o,s,i){var d,h;const l=await t.streamMotionGroupState(r,n,a,o,s,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=M["MotionGroupInfosApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>L(l,_,I,e)(p,u||f)}}};class nV extends Ve{getActivePayload(t,r,n){return xt(this.configuration).getActivePayload(t,r,n).then(a=>a(this.axios,this.basePath))}getActiveTcp(t,r,n,a){return xt(this.configuration).getActiveTcp(t,r,n,a).then(o=>o(this.axios,this.basePath))}getCurrentMotionGroupState(t,r,n,a,o){return xt(this.configuration).getCurrentMotionGroupState(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getInfoCapabilities(t,r,n){return xt(this.configuration).getInfoCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionGroupSpecification(t,r,n){return xt(this.configuration).getMotionGroupSpecification(t,r,n).then(a=>a(this.axios,this.basePath))}getMounting(t,r,n){return xt(this.configuration).getMounting(t,r,n).then(a=>a(this.axios,this.basePath))}getOptimizerConfiguration(t,r,n,a){return xt(this.configuration).getOptimizerConfiguration(t,r,n,a).then(o=>o(this.axios,this.basePath))}getSafetySetup(t,r,n){return xt(this.configuration).getSafetySetup(t,r,n).then(a=>a(this.axios,this.basePath))}listPayloads(t,r,n){return xt(this.configuration).listPayloads(t,r,n).then(a=>a(this.axios,this.basePath))}listTcps(t,r,n,a){return xt(this.configuration).listTcps(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamMotionGroupState(t,r,n,a,o,s){return xt(this.configuration).streamMotionGroupState(t,r,n,a,o,s).then(i=>i(this.axios,this.basePath))}}const aV=function(e){return{directionJogging:async(t,r,n={})=>{x("directionJogging","cell",t),x("directionJogging","directionJoggingRequest",r);const a="/cells/{cell}/motion-groups/move-tcp".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),l["Content-Type"]="application/json",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:D(o),options:i}},getJoggingCapabilities:async(t,r,n={})=>{x("getJoggingCapabilities","cell",t),x("getJoggingCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/jogging-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},jointJogging:async(t,r,n={})=>{x("jointJogging","cell",t),x("jointJogging","jointJoggingRequest",r);const a="/cells/{cell}/motion-groups/move-joint".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),l["Content-Type"]="application/json",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:D(o),options:i}},stopJogging:async(t,r,n={})=>{x("stopJogging","cell",t),x("stopJogging","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}}}},oo=function(e){const t=aV(e);return{async directionJogging(r,n,a){var l,c;const o=await t.directionJogging(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionGroupJoggingApi.directionJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getJoggingCapabilities(r,n,a){var l,c;const o=await t.getJoggingCapabilities(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionGroupJoggingApi.getJoggingCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async jointJogging(r,n,a){var l,c;const o=await t.jointJogging(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionGroupJoggingApi.jointJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async stopJogging(r,n,a){var l,c;const o=await t.stopJogging(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionGroupJoggingApi.stopJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)}}};class oV extends Ve{directionJogging(t,r,n){return oo(this.configuration).directionJogging(t,r,n).then(a=>a(this.axios,this.basePath))}getJoggingCapabilities(t,r,n){return oo(this.configuration).getJoggingCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}jointJogging(t,r,n){return oo(this.configuration).jointJogging(t,r,n).then(a=>a(this.axios,this.basePath))}stopJogging(t,r,n){return oo(this.configuration).stopJogging(t,r,n).then(a=>a(this.axios,this.basePath))}}const sV=function(e){return{calculateAllInverseKinematic:async(t,r,n,a={})=>{x("calculateAllInverseKinematic","cell",t),x("calculateAllInverseKinematic","motionGroup",r),x("calculateAllInverseKinematic","allJointPositionsRequest",n);const o="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-all-joint-positions".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}},calculateForwardKinematic:async(t,r,n,a={})=>{x("calculateForwardKinematic","cell",t),x("calculateForwardKinematic","motionGroup",r),x("calculateForwardKinematic","tcpPoseRequest",n);const o="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-tcp-pose".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}},calculateInverseKinematic:async(t,r,n,a={})=>{x("calculateInverseKinematic","cell",t),x("calculateInverseKinematic","motionGroup",r),x("calculateInverseKinematic","jointPositionRequest",n);const o="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-joint-position".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}},getKinematicCapabilities:async(t,r,n={})=>{x("getKinematicCapabilities","cell",t),x("getKinematicCapabilities","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/kinematic-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}}}},so=function(e){const t=sV(e);return{async calculateAllInverseKinematic(r,n,a,o){var c,u;const s=await t.calculateAllInverseKinematic(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["MotionGroupKinematicApi.calculateAllInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async calculateForwardKinematic(r,n,a,o){var c,u;const s=await t.calculateForwardKinematic(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["MotionGroupKinematicApi.calculateForwardKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async calculateInverseKinematic(r,n,a,o){var c,u;const s=await t.calculateInverseKinematic(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["MotionGroupKinematicApi.calculateInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async getKinematicCapabilities(r,n,a){var l,c;const o=await t.getKinematicCapabilities(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["MotionGroupKinematicApi.getKinematicCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)}}};class iV extends Ve{calculateAllInverseKinematic(t,r,n,a){return so(this.configuration).calculateAllInverseKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}calculateForwardKinematic(t,r,n,a){return so(this.configuration).calculateForwardKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}calculateInverseKinematic(t,r,n,a){return so(this.configuration).calculateInverseKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}getKinematicCapabilities(t,r,n){return so(this.configuration).getKinematicCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}}const lV=function(e){return{createProgramRunner:async(t,r,n={})=>{x("createProgramRunner","cell",t),x("createProgramRunner","request",r);const a="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await k(l,e),l["Content-Type"]="text/plain",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:D(o),options:i}},executeProgram:async(t,r,n={})=>{x("executeProgram","cell",t),x("executeProgram","codeWithArguments",r);const a="/cells/{cell}/programs/execute".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await k(l,e),l["Content-Type"]="application/json",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:D(o),options:i}},getProgramRunner:async(t,r,n={})=>{x("getProgramRunner","cell",t),x("getProgramRunner","runner",r);const a="/cells/{cell}/programs/runners/{runner}".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listProgramRunners:async(t,r={})=>{x("listProgramRunners","cell",t);const n="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},migrateProgram:async(t,r,n={})=>{x("migrateProgram","cell",t),x("migrateProgram","request1",r);const a="/cells/{cell}/programs/migrate".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await k(l,e),l["Content-Type"]="text/plain",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:D(o),options:i}},planProgram:async(t,r,n,a={})=>{x("planProgram","cell",t),x("planProgram","request",r);const o="/cells/{cell}/programs/plan".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.identifier=n),c["Content-Type"]="text/plain",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(r,l,e),{url:D(s),options:l}},stopAllProgramRunner:async(t,r={})=>{x("stopAllProgramRunner","cell",t);const n="/cells/{cell}/programs/runners/stop".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"POST",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},stopProgramRunner:async(t,r,n={})=>{x("stopProgramRunner","cell",t),x("stopProgramRunner","runner",r);const a="/cells/{cell}/programs/runners/{runner}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}}}},tr=function(e){const t=lV(e);return{async createProgramRunner(r,n,a){var l,c;const o=await t.createProgramRunner(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ProgramApi.createProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async executeProgram(r,n,a){var l,c;const o=await t.executeProgram(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ProgramApi.executeProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getProgramRunner(r,n,a){var l,c;const o=await t.getProgramRunner(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ProgramApi.getProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async listProgramRunners(r,n){var i,l;const a=await t.listProgramRunners(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["ProgramApi.listProgramRunners"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async migrateProgram(r,n,a){var l,c;const o=await t.migrateProgram(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ProgramApi.migrateProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async planProgram(r,n,a,o){var c,u;const s=await t.planProgram(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["ProgramApi.planProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async stopAllProgramRunner(r,n){var i,l;const a=await t.stopAllProgramRunner(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["ProgramApi.stopAllProgramRunner"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async stopProgramRunner(r,n,a){var l,c;const o=await t.stopProgramRunner(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ProgramApi.stopProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)}}};class cV extends Ve{createProgramRunner(t,r,n){return tr(this.configuration).createProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}executeProgram(t,r,n){return tr(this.configuration).executeProgram(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramRunner(t,r,n){return tr(this.configuration).getProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramRunners(t,r){return tr(this.configuration).listProgramRunners(t,r).then(n=>n(this.axios,this.basePath))}migrateProgram(t,r,n){return tr(this.configuration).migrateProgram(t,r,n).then(a=>a(this.axios,this.basePath))}planProgram(t,r,n,a){return tr(this.configuration).planProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}stopAllProgramRunner(t,r){return tr(this.configuration).stopAllProgramRunner(t,r).then(n=>n(this.axios,this.basePath))}stopProgramRunner(t,r,n){return tr(this.configuration).stopProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}}const uV=function(e){return{clearProgramsValues:async(t,r={})=>{x("clearProgramsValues","cell",t);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},createProgramsValue:async(t,r,n={})=>{x("createProgramsValue","cell",t),x("createProgramsValue","requestBody",r);const a="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};$(i,e),await k(l,e),l["Content-Type"]="application/json",U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},i.data=de(r,i,e),{url:D(o),options:i}},deleteProgramValue:async(t,r,n={})=>{x("deleteProgramValue","cell",t),x("deleteProgramValue","key",r);const a="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getProgramValue:async(t,r,n={})=>{x("getProgramValue","cell",t),x("getProgramValue","key",r);const a="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listProgramsValues:async(t,r={})=>{x("listProgramsValues","cell",t);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},updateProgramValue:async(t,r,n,a={})=>{x("updateProgramValue","cell",t),x("updateProgramValue","key",r),x("updateProgramValue","value",n);const o="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}}}},Qr=function(e){const t=uV(e);return{async clearProgramsValues(r,n){var i,l;const a=await t.clearProgramsValues(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["ProgramValuesApi.clearProgramsValues"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async createProgramsValue(r,n,a){var l,c;const o=await t.createProgramsValue(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ProgramValuesApi.createProgramsValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async deleteProgramValue(r,n,a){var l,c;const o=await t.deleteProgramValue(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ProgramValuesApi.deleteProgramValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getProgramValue(r,n,a){var l,c;const o=await t.getProgramValue(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["ProgramValuesApi.getProgramValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async listProgramsValues(r,n){var i,l;const a=await t.listProgramsValues(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["ProgramValuesApi.listProgramsValues"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async updateProgramValue(r,n,a,o){var c,u;const s=await t.updateProgramValue(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["ProgramValuesApi.updateProgramValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)}}};class dV extends Ve{clearProgramsValues(t,r){return Qr(this.configuration).clearProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}createProgramsValue(t,r,n){return Qr(this.configuration).createProgramsValue(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramValue(t,r,n){return Qr(this.configuration).deleteProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramValue(t,r,n){return Qr(this.configuration).getProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramsValues(t,r){return Qr(this.configuration).listProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}updateProgramValue(t,r,n,a){return Qr(this.configuration).updateProgramValue(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const hV=function(e){return{deleteStoredCollider:async(t,r,n={})=>{x("deleteStoredCollider","cell",t),x("deleteStoredCollider","collider",r);const a="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deleteStoredCollisionLinkChain:async(t,r,n={})=>{x("deleteStoredCollisionLinkChain","cell",t),x("deleteStoredCollisionLinkChain","linkChain",r);const a="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},deleteStoredCollisionTool:async(t,r,n={})=>{x("deleteStoredCollisionTool","cell",t),x("deleteStoredCollisionTool","tool",r);const a="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getDefaultLinkChain:async(t,r,n={})=>{x("getDefaultLinkChain","cell",t),x("getDefaultLinkChain","motionGroupModel",r);const a="/cells/{cell}/store/collision/default-link-chains/{motion-group-model}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group-model}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getStoredCollider:async(t,r,n={})=>{x("getStoredCollider","cell",t),x("getStoredCollider","collider",r);const a="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getStoredCollisionLinkChain:async(t,r,n={})=>{x("getStoredCollisionLinkChain","cell",t),x("getStoredCollisionLinkChain","linkChain",r);const a="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getStoredCollisionTool:async(t,r,n={})=>{x("getStoredCollisionTool","cell",t),x("getStoredCollisionTool","tool",r);const a="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listCollisionLinkChains:async(t,r={})=>{x("listCollisionLinkChains","cell",t);const n="/cells/{cell}/store/collision/link-chains".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},listStoredColliders:async(t,r={})=>{x("listStoredColliders","cell",t);const n="/cells/{cell}/store/collision/colliders".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},listStoredCollisionTools:async(t,r={})=>{x("listStoredCollisionTools","cell",t);const n="/cells/{cell}/store/collision/tools".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},storeCollider:async(t,r,n,a={})=>{x("storeCollider","cell",t),x("storeCollider","collider",r),x("storeCollider","collider2",n);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}},storeCollisionLinkChain:async(t,r,n,a={})=>{x("storeCollisionLinkChain","cell",t),x("storeCollisionLinkChain","linkChain",r),x("storeCollisionLinkChain","collider",n);const o="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}},storeCollisionTool:async(t,r,n,a={})=>{x("storeCollisionTool","cell",t),x("storeCollisionTool","tool",r),x("storeCollisionTool","requestBody",n);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}}}},ct=function(e){const t=hV(e);return{async deleteStoredCollider(r,n,a){var l,c;const o=await t.deleteStoredCollider(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async deleteStoredCollisionLinkChain(r,n,a){var l,c;const o=await t.deleteStoredCollisionLinkChain(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async deleteStoredCollisionTool(r,n,a){var l,c;const o=await t.deleteStoredCollisionTool(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getDefaultLinkChain(r,n,a){var l,c;const o=await t.getDefaultLinkChain(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["StoreCollisionComponentsApi.getDefaultLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getStoredCollider(r,n,a){var l,c;const o=await t.getStoredCollider(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getStoredCollisionLinkChain(r,n,a){var l,c;const o=await t.getStoredCollisionLinkChain(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getStoredCollisionTool(r,n,a){var l,c;const o=await t.getStoredCollisionTool(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async listCollisionLinkChains(r,n){var i,l;const a=await t.listCollisionLinkChains(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async listStoredColliders(r,n){var i,l;const a=await t.listStoredColliders(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async listStoredCollisionTools(r,n){var i,l;const a=await t.listStoredCollisionTools(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async storeCollider(r,n,a,o){var c,u;const s=await t.storeCollider(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async storeCollisionLinkChain(r,n,a,o){var c,u;const s=await t.storeCollisionLinkChain(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async storeCollisionTool(r,n,a,o){var c,u;const s=await t.storeCollisionTool(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)}}};class pV extends Ve{deleteStoredCollider(t,r,n){return ct(this.configuration).deleteStoredCollider(t,r,n).then(a=>a(this.axios,this.basePath))}deleteStoredCollisionLinkChain(t,r,n){return ct(this.configuration).deleteStoredCollisionLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}deleteStoredCollisionTool(t,r,n){return ct(this.configuration).deleteStoredCollisionTool(t,r,n).then(a=>a(this.axios,this.basePath))}getDefaultLinkChain(t,r,n){return ct(this.configuration).getDefaultLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollider(t,r,n){return ct(this.configuration).getStoredCollider(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionLinkChain(t,r,n){return ct(this.configuration).getStoredCollisionLinkChain(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionTool(t,r,n){return ct(this.configuration).getStoredCollisionTool(t,r,n).then(a=>a(this.axios,this.basePath))}listCollisionLinkChains(t,r){return ct(this.configuration).listCollisionLinkChains(t,r).then(n=>n(this.axios,this.basePath))}listStoredColliders(t,r){return ct(this.configuration).listStoredColliders(t,r).then(n=>n(this.axios,this.basePath))}listStoredCollisionTools(t,r){return ct(this.configuration).listStoredCollisionTools(t,r).then(n=>n(this.axios,this.basePath))}storeCollider(t,r,n,a){return ct(this.configuration).storeCollider(t,r,n,a).then(o=>o(this.axios,this.basePath))}storeCollisionLinkChain(t,r,n,a){return ct(this.configuration).storeCollisionLinkChain(t,r,n,a).then(o=>o(this.axios,this.basePath))}storeCollisionTool(t,r,n,a){return ct(this.configuration).storeCollisionTool(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const mV=function(e){return{deleteStoredCollisionScene:async(t,r,n={})=>{x("deleteStoredCollisionScene","cell",t),x("deleteStoredCollisionScene","scene",r);const a="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getStoredCollisionScene:async(t,r,n={})=>{x("getStoredCollisionScene","cell",t),x("getStoredCollisionScene","scene",r);const a="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listStoredCollisionScenes:async(t,r={})=>{x("listStoredCollisionScenes","cell",t);const n="/cells/{cell}/store/collision/scenes".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},storeCollisionScene:async(t,r,n,a={})=>{x("storeCollisionScene","cell",t),x("storeCollisionScene","scene",r),x("storeCollisionScene","collisionSceneAssembly",n);const o="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}}}},io=function(e){const t=mV(e);return{async deleteStoredCollisionScene(r,n,a){var l,c;const o=await t.deleteStoredCollisionScene(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["StoreCollisionScenesApi.deleteStoredCollisionScene"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getStoredCollisionScene(r,n,a){var l,c;const o=await t.getStoredCollisionScene(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["StoreCollisionScenesApi.getStoredCollisionScene"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async listStoredCollisionScenes(r,n){var i,l;const a=await t.listStoredCollisionScenes(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["StoreCollisionScenesApi.listStoredCollisionScenes"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async storeCollisionScene(r,n,a,o){var c,u;const s=await t.storeCollisionScene(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["StoreCollisionScenesApi.storeCollisionScene"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)}}};class fV extends Ve{deleteStoredCollisionScene(t,r,n){return io(this.configuration).deleteStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionScene(t,r,n){return io(this.configuration).getStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}listStoredCollisionScenes(t,r){return io(this.configuration).listStoredCollisionScenes(t,r).then(n=>n(this.axios,this.basePath))}storeCollisionScene(t,r,n,a){return io(this.configuration).storeCollisionScene(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const gV=function(e){return{clearAllObjects:async(t,r={})=>{x("clearAllObjects","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"DELETE",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},deleteObject:async(t,r,n={})=>{x("deleteObject","cell",t),x("deleteObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"DELETE",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getObject:async(t,r,n={})=>{x("getObject","cell",t),x("getObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getObjectMetadata:async(t,r,n={})=>{x("getObjectMetadata","cell",t),x("getObjectMetadata","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"HEAD",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listAllObjectKeys:async(t,r={})=>{x("listAllObjectKeys","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},storeObject:async(t,r,n,a,o={})=>{x("storeObject","cell",t),x("storeObject","key",r);const s="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),i=new URL(s,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={},h=new(e&&e.formDataCtor||FormData);$(c,e),await k(u,e),a!==void 0&&h.append("AnyValue",new Blob([JSON.stringify(a)],{type:"application/json"})),u["Content-Type"]="multipart/form-data",n!=null&&(u["X-Metadata"]=typeof n=="string"?n:JSON.stringify(n)),U(i,d);let p=l&&l.headers?l.headers:{};return c.headers={...u,...p,...o.headers},c.data=h,{url:D(i),options:c}}}},Xr=function(e){const t=gV(e);return{async clearAllObjects(r,n){var i,l;const a=await t.clearAllObjects(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["StoreObjectApi.clearAllObjects"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async deleteObject(r,n,a){var l,c;const o=await t.deleteObject(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["StoreObjectApi.deleteObject"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getObject(r,n,a){var l,c;const o=await t.getObject(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["StoreObjectApi.getObject"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getObjectMetadata(r,n,a){var l,c;const o=await t.getObjectMetadata(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["StoreObjectApi.getObjectMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async listAllObjectKeys(r,n){var i,l;const a=await t.listAllObjectKeys(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async storeObject(r,n,a,o,s){var u,d;const i=await t.storeObject(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=M["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>L(i,_,I,e)(h,c||p)}}};class yV extends Ve{clearAllObjects(t,r){return Xr(this.configuration).clearAllObjects(t,r).then(n=>n(this.axios,this.basePath))}deleteObject(t,r,n){return Xr(this.configuration).deleteObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObject(t,r,n){return Xr(this.configuration).getObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObjectMetadata(t,r,n){return Xr(this.configuration).getObjectMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listAllObjectKeys(t,r){return Xr(this.configuration).listAllObjectKeys(t,r).then(n=>n(this.axios,this.basePath))}storeObject(t,r,n,a,o){return Xr(this.configuration).storeObject(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const bV=function(e){return{checkNovaVersionUpdate:async(t,r={})=>{x("checkNovaVersionUpdate","channel",t);const n="/system/update",a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...r},i={},l={};$(s,e),await k(i,e),t!==void 0&&(l.channel=t),U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:D(a),options:s}},getDiagnosePackage:async(t={})=>{const r="/system/diagnosis-package/zip",n=new URL(r,j);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};$(o,e),await k(s,e),U(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:D(n),options:o}},getSystemStatus:async(t={})=>{const r="/system/status",n=new URL(r,j);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};$(o,e),await k(s,e),U(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:D(n),options:o}},getSystemVersion:async(t={})=>{const r="/system/version",n=new URL(r,j);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...t},s={},i={};$(o,e),await k(s,e),U(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:D(n),options:o}},updateNovaVersion:async(t,r={})=>{x("updateNovaVersion","updateNovaVersionRequest",t);const n="/system/update",a=new URL(n,j);let o;e&&(o=e.baseOptions);const s={method:"PUT",...o,...r},i={},l={};$(s,e),await k(i,e),i["Content-Type"]="application/json",U(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},s.data=de(t,s,e),{url:D(a),options:s}}}},Xn=function(e){const t=bV(e);return{async checkNovaVersionUpdate(r,n){var i,l;const a=await t.checkNovaVersionUpdate(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)},async getDiagnosePackage(r){var s,i;const n=await t.getDiagnosePackage(r),a=(e==null?void 0:e.serverIndex)??0,o=(i=(s=M["SystemApi.getDiagnosePackage"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>L(n,_,I,e)(l,o||c)},async getSystemStatus(r){var s,i;const n=await t.getSystemStatus(r),a=(e==null?void 0:e.serverIndex)??0,o=(i=(s=M["SystemApi.getSystemStatus"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>L(n,_,I,e)(l,o||c)},async getSystemVersion(r){var s,i;const n=await t.getSystemVersion(r),a=(e==null?void 0:e.serverIndex)??0,o=(i=(s=M["SystemApi.getSystemVersion"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>L(n,_,I,e)(l,o||c)},async updateNovaVersion(r,n){var i,l;const a=await t.updateNovaVersion(r,n),o=(e==null?void 0:e.serverIndex)??0,s=(l=(i=M["SystemApi.updateNovaVersion"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>L(a,_,I,e)(c,s||u)}}};class vV extends Ve{checkNovaVersionUpdate(t,r){return Xn(this.configuration).checkNovaVersionUpdate(t,r).then(n=>n(this.axios,this.basePath))}getDiagnosePackage(t){return Xn(this.configuration).getDiagnosePackage(t).then(r=>r(this.axios,this.basePath))}getSystemStatus(t){return Xn(this.configuration).getSystemStatus(t).then(r=>r(this.axios,this.basePath))}getSystemVersion(t){return Xn(this.configuration).getSystemVersion(t).then(r=>r(this.axios,this.basePath))}updateNovaVersion(t,r){return Xn(this.configuration).updateNovaVersion(t,r).then(n=>n(this.axios,this.basePath))}}const xV=function(e){return{getMotionGroupState:async(t,r,n,a={})=>{x("getMotionGroupState","cell",t),x("getMotionGroupState","controller",r),x("getMotionGroupState","id",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(n))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},getMotionGroups:async(t,r,n={})=>{x("getMotionGroups","cell",t),x("getMotionGroups","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/motiongroups".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getVirtualRobotIOValue:async(t,r,n,a={})=>{x("getVirtualRobotIOValue","cell",t),x("getVirtualRobotIOValue","controller",r),x("getVirtualRobotIOValue","io",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(n))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},listIOs:async(t,r,n={})=>{x("listIOs","cell",t),x("listIOs","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/ios".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},setMotionGroupState:async(t,r,n,a,o={})=>{x("setMotionGroupState","cell",t),x("setMotionGroupState","controller",r),x("setMotionGroupState","id",n),x("setMotionGroupState","motionGroupJoints",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(n))),i=new URL(s,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};$(c,e),await k(u,e),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=de(a,c,e),{url:D(i),options:c}},setVirtualRobotIOValue:async(t,r,n,a,o,s,i={})=>{x("setVirtualRobotIOValue","cell",t),x("setVirtualRobotIOValue","controller",r),x("setVirtualRobotIOValue","io",n);const l="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(n))),c=new URL(l,j);let u;e&&(u=e.baseOptions);const d={method:"PUT",...u,...i},h={},p={};$(d,e),await k(h,e),a!==void 0&&(p.bool=a),o!==void 0&&(p.integer=o),s!==void 0&&(p.double=s),U(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:D(c),options:d}}}},Zr=function(e){const t=xV(e);return{async getMotionGroupState(r,n,a,o){var c,u;const s=await t.getMotionGroupState(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["VirtualRobotApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async getMotionGroups(r,n,a){var l,c;const o=await t.getMotionGroups(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["VirtualRobotApi.getMotionGroups"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getVirtualRobotIOValue(r,n,a,o){var c,u;const s=await t.getVirtualRobotIOValue(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["VirtualRobotApi.getVirtualRobotIOValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async listIOs(r,n,a){var l,c;const o=await t.listIOs(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["VirtualRobotApi.listIOs"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async setMotionGroupState(r,n,a,o,s){var u,d;const i=await t.setMotionGroupState(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=M["VirtualRobotApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>L(i,_,I,e)(h,c||p)},async setVirtualRobotIOValue(r,n,a,o,s,i,l){var h,p;const c=await t.setVirtualRobotIOValue(r,n,a,o,s,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=M["VirtualRobotApi.setVirtualRobotIOValue"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>L(c,_,I,e)(f,d||m)}}};class SV extends Ve{getMotionGroupState(t,r,n,a){return Zr(this.configuration).getMotionGroupState(t,r,n,a).then(o=>o(this.axios,this.basePath))}getMotionGroups(t,r,n){return Zr(this.configuration).getMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotIOValue(t,r,n,a){return Zr(this.configuration).getVirtualRobotIOValue(t,r,n,a).then(o=>o(this.axios,this.basePath))}listIOs(t,r,n){return Zr(this.configuration).listIOs(t,r,n).then(a=>a(this.axios,this.basePath))}setMotionGroupState(t,r,n,a,o){return Zr(this.configuration).setMotionGroupState(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}setVirtualRobotIOValue(t,r,n,a,o,s,i){return Zr(this.configuration).setVirtualRobotIOValue(t,r,n,a,o,s,i).then(l=>l(this.axios,this.basePath))}}const OV=function(e){return{externalJointsStream:async(t,r,n,a={})=>{x("externalJointsStream","cell",t),x("externalJointsStream","controller",r),x("externalJointsStream","externalJointStreamDatapoint",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/externalJointsStream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}},getMotionGroupBehavior:async(t,r,n,a={})=>{x("getMotionGroupBehavior","cell",t),x("getMotionGroupBehavior","controller",r),x("getMotionGroupBehavior","id",n);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(n))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},setMotionGroupBehavior:async(t,r,n,a,o={})=>{x("setMotionGroupBehavior","cell",t),x("setMotionGroupBehavior","controller",r),x("setMotionGroupBehavior","id",n);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(n))),i=new URL(s,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};$(c,e),await k(u,e),a!==void 0&&(d.behavior=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:D(i),options:c}}}},Ii=function(e){const t=OV(e);return{async externalJointsStream(r,n,a,o){var c,u;const s=await t.externalJointsStream(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["VirtualRobotBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async getMotionGroupBehavior(r,n,a,o){var c,u;const s=await t.getMotionGroupBehavior(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["VirtualRobotBehaviorApi.getMotionGroupBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async setMotionGroupBehavior(r,n,a,o,s){var u,d;const i=await t.setMotionGroupBehavior(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=M["VirtualRobotBehaviorApi.setMotionGroupBehavior"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>L(i,_,I,e)(h,c||p)}}};class wV extends Ve{externalJointsStream(t,r,n,a){return Ii(this.configuration).externalJointsStream(t,r,n,a).then(o=>o(this.axios,this.basePath))}getMotionGroupBehavior(t,r,n,a){return Ii(this.configuration).getMotionGroupBehavior(t,r,n,a).then(o=>o(this.axios,this.basePath))}setMotionGroupBehavior(t,r,n,a,o){return Ii(this.configuration).setMotionGroupBehavior(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const CV=function(e){return{getCycleTime:async(t,r,n={})=>{x("getCycleTime","cell",t),x("getCycleTime","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/cycle-time".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getEStop:async(t,r,n={})=>{x("getEStop","cell",t),x("getEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},getOperationMode:async(t,r,n={})=>{x("getOperationMode","cell",t),x("getOperationMode","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},pushEStop:async(t,r,n={})=>{x("pushEStop","cell",t),x("pushEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop/push".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},releaseEStop:async(t,r,n={})=>{x("releaseEStop","cell",t),x("releaseEStop","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/estop/release".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"PUT",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},setOperationMode:async(t,r,n,a={})=>{x("setOperationMode","cell",t),x("setOperationMode","controller",r),x("setOperationMode","mode",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await k(c,e),n!==void 0&&(u.mode=n),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}}}},en=function(e){const t=CV(e);return{async getCycleTime(r,n,a){var l,c;const o=await t.getCycleTime(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["VirtualRobotModeApi.getCycleTime"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getEStop(r,n,a){var l,c;const o=await t.getEStop(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["VirtualRobotModeApi.getEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async getOperationMode(r,n,a){var l,c;const o=await t.getOperationMode(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["VirtualRobotModeApi.getOperationMode"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async pushEStop(r,n,a){var l,c;const o=await t.pushEStop(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["VirtualRobotModeApi.pushEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async releaseEStop(r,n,a){var l,c;const o=await t.releaseEStop(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["VirtualRobotModeApi.releaseEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async setOperationMode(r,n,a,o){var c,u;const s=await t.setOperationMode(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["VirtualRobotModeApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)}}};class PV extends Ve{getCycleTime(t,r,n){return en(this.configuration).getCycleTime(t,r,n).then(a=>a(this.axios,this.basePath))}getEStop(t,r,n){return en(this.configuration).getEStop(t,r,n).then(a=>a(this.axios,this.basePath))}getOperationMode(t,r,n){return en(this.configuration).getOperationMode(t,r,n).then(a=>a(this.axios,this.basePath))}pushEStop(t,r,n){return en(this.configuration).pushEStop(t,r,n).then(a=>a(this.axios,this.basePath))}releaseEStop(t,r,n){return en(this.configuration).releaseEStop(t,r,n).then(a=>a(this.axios,this.basePath))}setOperationMode(t,r,n,a){return en(this.configuration).setOperationMode(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const TV=function(e){return{addVirtualRobotCoordinateSystem:async(t,r,n,a={})=>{x("addVirtualRobotCoordinateSystem","cell",t),x("addVirtualRobotCoordinateSystem","controller",r),x("addVirtualRobotCoordinateSystem","coordinateSystem",n);const o="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...a},c={},u={};$(l,e),await k(c,e),c["Content-Type"]="application/json",U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},l.data=de(n,l,e),{url:D(s),options:l}},addVirtualRobotTcp:async(t,r,n,a,o={})=>{x("addVirtualRobotTcp","cell",t),x("addVirtualRobotTcp","controller",r),x("addVirtualRobotTcp","id",n),x("addVirtualRobotTcp","robotTcp",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(n))),i=new URL(s,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};$(c,e),await k(u,e),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=de(a,c,e),{url:D(i),options:c}},deleteVirtualRobotCoordinateSystem:async(t,r,n,a,o={})=>{x("deleteVirtualRobotCoordinateSystem","cell",t),x("deleteVirtualRobotCoordinateSystem","controller",r),x("deleteVirtualRobotCoordinateSystem","coordinateSystem",n);const s="/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(n))),i=new URL(s,j);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...o},u={},d={};$(c,e),await k(u,e),a!==void 0&&(d.delete_dependent=a),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:D(i),options:c}},deleteVirtualRobotTcp:async(t,r,n,a,o={})=>{x("deleteVirtualRobotTcp","cell",t),x("deleteVirtualRobotTcp","controller",r),x("deleteVirtualRobotTcp","id",n),x("deleteVirtualRobotTcp","tcp",a);const s="/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(n))).replace("{tcp}",encodeURIComponent(String(a))),i=new URL(s,j);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...o},u={},d={};$(c,e),await k(u,e),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:D(i),options:c}},getVirtualRobotMounting:async(t,r,n,a={})=>{x("getVirtualRobotMounting","cell",t),x("getVirtualRobotMounting","controller",r),x("getVirtualRobotMounting","id",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(n))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},listVirtualRobotCoordinateSystems:async(t,r,n={})=>{x("listVirtualRobotCoordinateSystems","cell",t),x("listVirtualRobotCoordinateSystems","controller",r);const a="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),o=new URL(a,j);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},l={},c={};$(i,e),await k(l,e),U(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:D(o),options:i}},listVirtualRobotTcps:async(t,r,n,a={})=>{x("listVirtualRobotTcps","cell",t),x("listVirtualRobotTcps","controller",r),x("listVirtualRobotTcps","id",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(n))),s=new URL(o,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...a},c={},u={};$(l,e),await k(c,e),U(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:D(s),options:l}},setVirtualRobotMounting:async(t,r,n,a,o={})=>{x("setVirtualRobotMounting","cell",t),x("setVirtualRobotMounting","controller",r),x("setVirtualRobotMounting","id",n),x("setVirtualRobotMounting","coordinateSystem",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(n))),i=new URL(s,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...o},u={},d={};$(c,e),await k(u,e),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},c.data=de(a,c,e),{url:D(i),options:c}}}},rr=function(e){const t=TV(e);return{async addVirtualRobotCoordinateSystem(r,n,a,o){var c,u;const s=await t.addVirtualRobotCoordinateSystem(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["VirtualRobotSetupApi.addVirtualRobotCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async addVirtualRobotTcp(r,n,a,o,s){var u,d;const i=await t.addVirtualRobotTcp(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=M["VirtualRobotSetupApi.addVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>L(i,_,I,e)(h,c||p)},async deleteVirtualRobotCoordinateSystem(r,n,a,o,s){var u,d;const i=await t.deleteVirtualRobotCoordinateSystem(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=M["VirtualRobotSetupApi.deleteVirtualRobotCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>L(i,_,I,e)(h,c||p)},async deleteVirtualRobotTcp(r,n,a,o,s){var u,d;const i=await t.deleteVirtualRobotTcp(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=M["VirtualRobotSetupApi.deleteVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>L(i,_,I,e)(h,c||p)},async getVirtualRobotMounting(r,n,a,o){var c,u;const s=await t.getVirtualRobotMounting(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["VirtualRobotSetupApi.getVirtualRobotMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async listVirtualRobotCoordinateSystems(r,n,a){var l,c;const o=await t.listVirtualRobotCoordinateSystems(r,n,a),s=(e==null?void 0:e.serverIndex)??0,i=(c=(l=M["VirtualRobotSetupApi.listVirtualRobotCoordinateSystems"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>L(o,_,I,e)(u,i||d)},async listVirtualRobotTcps(r,n,a,o){var c,u;const s=await t.listVirtualRobotTcps(r,n,a,o),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=M["VirtualRobotSetupApi.listVirtualRobotTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>L(s,_,I,e)(d,l||h)},async setVirtualRobotMounting(r,n,a,o,s){var u,d;const i=await t.setVirtualRobotMounting(r,n,a,o,s),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=M["VirtualRobotSetupApi.setVirtualRobotMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>L(i,_,I,e)(h,c||p)}}};class RV extends Ve{addVirtualRobotCoordinateSystem(t,r,n,a){return rr(this.configuration).addVirtualRobotCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}addVirtualRobotTcp(t,r,n,a,o){return rr(this.configuration).addVirtualRobotTcp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteVirtualRobotCoordinateSystem(t,r,n,a,o){return rr(this.configuration).deleteVirtualRobotCoordinateSystem(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteVirtualRobotTcp(t,r,n,a,o){return rr(this.configuration).deleteVirtualRobotTcp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getVirtualRobotMounting(t,r,n,a){return rr(this.configuration).getVirtualRobotMounting(t,r,n,a).then(o=>o(this.axios,this.basePath))}listVirtualRobotCoordinateSystems(t,r,n){return rr(this.configuration).listVirtualRobotCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}listVirtualRobotTcps(t,r,n,a){return rr(this.configuration).listVirtualRobotTcps(t,r,n,a).then(o=>o(this.axios,this.basePath))}setVirtualRobotMounting(t,r,n,a,o){return rr(this.configuration).setVirtualRobotMounting(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}function Bt(e,t,r){return Math.max(t,Math.min(r,e))}class AV{constructor(t=0,r=0,n=0,a=1){this.isQuaternion=!0,this._x=t,this._y=r,this._z=n,this._w=a}static slerpFlat(t,r,n,a,o,s,i){let l=n[a+0],c=n[a+1],u=n[a+2],d=n[a+3];const h=o[s+0],p=o[s+1],f=o[s+2],m=o[s+3];if(i===0){t[r+0]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d;return}if(i===1){t[r+0]=h,t[r+1]=p,t[r+2]=f,t[r+3]=m;return}if(d!==m||l!==h||c!==p||u!==f){let b=1-i;const S=l*h+c*p+u*f+d*m,E=S>=0?1:-1,O=1-S*S;if(O>Number.EPSILON){const C=Math.sqrt(O),w=Math.atan2(C,S*E);b=Math.sin(b*w)/C,i=Math.sin(i*w)/C}const P=i*E;if(l=l*b+h*P,c=c*b+p*P,u=u*b+f*P,d=d*b+m*P,b===1-i){const C=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=C,c*=C,u*=C,d*=C}}t[r]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d}static multiplyQuaternionsFlat(t,r,n,a,o,s){const i=n[a],l=n[a+1],c=n[a+2],u=n[a+3],d=o[s],h=o[s+1],p=o[s+2],f=o[s+3];return t[r]=i*f+u*d+l*p-c*h,t[r+1]=l*f+u*h+c*d-i*p,t[r+2]=c*f+u*p+i*h-l*d,t[r+3]=u*f-i*d-l*h-c*p,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,n,a){return this._x=t,this._y=r,this._z=n,this._w=a,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 n=t._x,a=t._y,o=t._z,s=t._order,i=Math.cos,l=Math.sin,c=i(n/2),u=i(a/2),d=i(o/2),h=l(n/2),p=l(a/2),f=l(o/2);switch(s){case"XYZ":this._x=h*u*d+c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d-h*p*f;break;case"YXZ":this._x=h*u*d+c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d+h*p*f;break;case"ZXY":this._x=h*u*d-c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d-h*p*f;break;case"ZYX":this._x=h*u*d-c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d+h*p*f;break;case"YZX":this._x=h*u*d+c*p*f,this._y=c*p*d+h*u*f,this._z=c*u*f-h*p*d,this._w=c*u*d-h*p*f;break;case"XZY":this._x=h*u*d-c*p*f,this._y=c*p*d-h*u*f,this._z=c*u*f+h*p*d,this._w=c*u*d+h*p*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,r){const n=r/2,a=Math.sin(n);return this._x=t.x*a,this._y=t.y*a,this._z=t.z*a,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const r=t.elements,n=r[0],a=r[4],o=r[8],s=r[1],i=r[5],l=r[9],c=r[2],u=r[6],d=r[10],h=n+i+d;if(h>0){const p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(u-l)*p,this._y=(o-c)*p,this._z=(s-a)*p}else if(n>i&&n>d){const p=2*Math.sqrt(1+n-i-d);this._w=(u-l)/p,this._x=.25*p,this._y=(a+s)/p,this._z=(o+c)/p}else if(i>d){const p=2*Math.sqrt(1+i-n-d);this._w=(o-c)/p,this._x=(a+s)/p,this._y=.25*p,this._z=(l+u)/p}else{const p=2*Math.sqrt(1+d-n-i);this._w=(s-a)/p,this._x=(o+c)/p,this._y=(l+u)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(t,r){let n=t.dot(r)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(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=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Bt(this.dot(t),-1,1)))}rotateTowards(t,r){const n=this.angleTo(t);if(n===0)return this;const a=Math.min(1,r/n);return this.slerp(t,a),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 n=t._x,a=t._y,o=t._z,s=t._w,i=r._x,l=r._y,c=r._z,u=r._w;return this._x=n*u+s*i+a*c-o*l,this._y=a*u+s*l+o*i-n*c,this._z=o*u+s*c+n*l-a*i,this._w=s*u-n*i-a*l-o*c,this._onChangeCallback(),this}slerp(t,r){if(r===0)return this;if(r===1)return this.copy(t);const n=this._x,a=this._y,o=this._z,s=this._w;let i=s*t._w+n*t._x+a*t._y+o*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=s,this._x=n,this._y=a,this._z=o,this;const l=1-i*i;if(l<=Number.EPSILON){const p=1-r;return this._w=p*s+r*this._w,this._x=p*n+r*this._x,this._y=p*a+r*this._y,this._z=p*o+r*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,i),d=Math.sin((1-r)*u)/c,h=Math.sin(r*u)/c;return this._w=s*d+this._w*h,this._x=n*d+this._x*h,this._y=a*d+this._y*h,this._z=o*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(t,r,n){return this.copy(t).slerp(r,n)}random(){const t=2*Math.PI*Math.random(),r=2*Math.PI*Math.random(),n=Math.random(),a=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(a*Math.sin(t),a*Math.cos(t),o*Math.sin(r),o*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 dn{constructor(t=0,r=0,n=0){dn.prototype.isVector3=!0,this.x=t,this.y=r,this.z=n}set(t,r,n){return n===void 0&&(n=this.z),this.x=t,this.y=r,this.z=n,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(Zd.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(Zd.setFromAxisAngle(t,r))}applyMatrix3(t){const r=this.x,n=this.y,a=this.z,o=t.elements;return this.x=o[0]*r+o[3]*n+o[6]*a,this.y=o[1]*r+o[4]*n+o[7]*a,this.z=o[2]*r+o[5]*n+o[8]*a,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const r=this.x,n=this.y,a=this.z,o=t.elements,s=1/(o[3]*r+o[7]*n+o[11]*a+o[15]);return this.x=(o[0]*r+o[4]*n+o[8]*a+o[12])*s,this.y=(o[1]*r+o[5]*n+o[9]*a+o[13])*s,this.z=(o[2]*r+o[6]*n+o[10]*a+o[14])*s,this}applyQuaternion(t){const r=this.x,n=this.y,a=this.z,o=t.x,s=t.y,i=t.z,l=t.w,c=2*(s*a-i*n),u=2*(i*r-o*a),d=2*(o*n-s*r);return this.x=r+l*c+s*d-i*u,this.y=n+l*u+i*c-o*d,this.z=a+l*d+o*u-s*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,n=this.y,a=this.z,o=t.elements;return this.x=o[0]*r+o[4]*n+o[8]*a,this.y=o[1]*r+o[5]*n+o[9]*a,this.z=o[2]*r+o[6]*n+o[10]*a,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=Bt(this.x,t.x,r.x),this.y=Bt(this.y,t.y,r.y),this.z=Bt(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=Bt(this.x,t,r),this.y=Bt(this.y,t,r),this.z=Bt(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Bt(n,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,n){return this.x=t.x+(r.x-t.x)*n,this.y=t.y+(r.y-t.y)*n,this.z=t.z+(r.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,r){const n=t.x,a=t.y,o=t.z,s=r.x,i=r.y,l=r.z;return this.x=a*l-o*i,this.y=o*s-n*l,this.z=n*i-a*s,this}projectOnVector(t){const r=t.lengthSq();if(r===0)return this.set(0,0,0);const n=t.dot(this)/r;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return Mi.copy(this).projectOnVector(t),this.sub(Mi)}reflect(t){return this.sub(Mi.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 n=this.dot(t)/r;return Math.acos(Bt(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const r=this.x-t.x,n=this.y-t.y,a=this.z-t.z;return r*r+n*n+a*a}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,n){const a=Math.sin(r)*t;return this.x=a*Math.sin(n),this.y=Math.cos(r)*t,this.z=a*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,r,n){return this.x=t*Math.sin(r),this.y=n,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(),n=this.setFromMatrixColumn(t,1).length(),a=this.setFromMatrixColumn(t,2).length();return this.x=r,this.y=n,this.z=a,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,n=Math.sqrt(1-r*r);return this.x=n*Math.cos(t),this.y=r,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Mi=new dn,Zd=new AV;function _V(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 n=0;n<e.length;n++){var a=e[n];if(typeof a!="string")throw new TypeError("Url must be a string. Received "+a);a!==""&&(n>0&&(a=a.replace(/^[\/]+/,"")),n<e.length-1?a=a.replace(/[\/]+$/,""):a=a.replace(/[\/]+$/,"/"),t.push(a))}var o=t.join("/");o=o.replace(/\/(\?|&|#[^!])/g,"$1");var s=o.split("?");return o=s.shift()+(s.length>0?"?":"")+s.join("&"),o}function ji(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),_V(e)}var Vt={},eh;function EV(){if(eh)return Vt;eh=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.TokenData=void 0,Vt.parse=d,Vt.compile=h,Vt.match=m,Vt.pathToRegexp=b,Vt.stringify=P;const e="/",t=T=>T,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,a="https://git.new/pathToRegexpError",o={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function s(T){return T.replace(/[{}()\[\]+?!:*]/g,"\\$&")}function i(T){return T.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}function*l(T){const V=[...T];let z=0;function v(){let R="";if(r.test(V[++z]))for(R+=V[z];n.test(V[++z]);)R+=V[z];else if(V[z]==='"'){let G=z;for(;z<V.length;){if(V[++z]==='"'){z++,G=0;break}V[z]==="\\"?R+=V[++z]:R+=V[z]}if(G)throw new TypeError(`Unterminated quote at ${G}: ${a}`)}if(!R)throw new TypeError(`Missing parameter name at ${z}: ${a}`);return R}for(;z<V.length;){const R=V[z],G=o[R];if(G)yield{type:G,index:z++,value:R};else if(R==="\\")yield{type:"ESCAPED",index:z++,value:V[z++]};else if(R===":"){const A=v();yield{type:"PARAM",index:z,value:A}}else if(R==="*"){const A=v();yield{type:"WILDCARD",index:z,value:A}}else yield{type:"CHAR",index:z,value:V[z++]}}return{type:"END",index:z,value:""}}class c{constructor(V){this.tokens=V}peek(){if(!this._peek){const V=this.tokens.next();this._peek=V.value}return this._peek}tryConsume(V){const z=this.peek();if(z.type===V)return this._peek=void 0,z.value}consume(V){const z=this.tryConsume(V);if(z!==void 0)return z;const{type:v,index:R}=this.peek();throw new TypeError(`Unexpected ${v} at ${R}, expected ${V}: ${a}`)}text(){let V="",z;for(;z=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)V+=z;return V}}class u{constructor(V){this.tokens=V}}Vt.TokenData=u;function d(T,V={}){const{encodePath:z=t}=V,v=new c(l(T));function R(A){const N=[];for(;;){const re=v.text();re&&N.push({type:"text",value:z(re)});const ee=v.tryConsume("PARAM");if(ee){N.push({type:"param",name:ee});continue}const ae=v.tryConsume("WILDCARD");if(ae){N.push({type:"wildcard",name:ae});continue}if(v.tryConsume("{")){N.push({type:"group",tokens:R("}")});continue}return v.consume(A),N}}const G=R("END");return new u(G)}function h(T,V={}){const{encode:z=encodeURIComponent,delimiter:v=e}=V,R=T instanceof u?T:d(T,V),G=p(R.tokens,v,z);return function(N={}){const[re,...ee]=G(N);if(ee.length)throw new TypeError(`Missing parameters: ${ee.join(", ")}`);return re}}function p(T,V,z){const v=T.map(R=>f(R,V,z));return R=>{const G=[""];for(const A of v){const[N,...re]=A(R);G[0]+=N,G.push(...re)}return G}}function f(T,V,z){if(T.type==="text")return()=>[T.value];if(T.type==="group"){const R=p(T.tokens,V,z);return G=>{const[A,...N]=R(G);return N.length?[""]:[A]}}const v=z||t;return T.type==="wildcard"&&z!==!1?R=>{const G=R[T.name];if(G==null)return["",T.name];if(!Array.isArray(G)||G.length===0)throw new TypeError(`Expected "${T.name}" to be a non-empty array`);return[G.map((A,N)=>{if(typeof A!="string")throw new TypeError(`Expected "${T.name}/${N}" to be a string`);return v(A)}).join(V)]}:R=>{const G=R[T.name];if(G==null)return["",T.name];if(typeof G!="string")throw new TypeError(`Expected "${T.name}" to be a string`);return[v(G)]}}function m(T,V={}){const{decode:z=decodeURIComponent,delimiter:v=e}=V,{regexp:R,keys:G}=b(T,V),A=G.map(N=>z===!1?t:N.type==="param"?z:re=>re.split(v).map(z));return function(re){const ee=R.exec(re);if(!ee)return!1;const ae=ee[0],te=Object.create(null);for(let se=1;se<ee.length;se++){if(ee[se]===void 0)continue;const q=G[se-1],Z=A[se-1];te[q.name]=Z(ee[se])}return{path:ae,params:te}}}function b(T,V={}){const{delimiter:z=e,end:v=!0,sensitive:R=!1,trailing:G=!0}=V,A=[],N=[],re=R?"":"i",ae=(Array.isArray(T)?T:[T]).map(q=>q instanceof u?q:d(q,V));for(const{tokens:q}of ae)for(const Z of S(q,0,[])){const ue=E(Z,z,A);N.push(ue)}let te=`^(?:${N.join("|")})`;return G&&(te+=`(?:${i(z)}$)?`),te+=v?"$":`(?=${i(z)}|$)`,{regexp:new RegExp(te,re),keys:A}}function*S(T,V,z){if(V===T.length)return yield z;const v=T[V];if(v.type==="group"){const R=z.slice();for(const G of S(v.tokens,0,R))yield*S(T,V+1,G)}else z.push(v);yield*S(T,V+1,z)}function E(T,V,z){let v="",R="",G=!0;for(let A=0;A<T.length;A++){const N=T[A];if(N.type==="text"){v+=i(N.value),R+=N.value,G||(G=N.value.includes(V));continue}if(N.type==="param"||N.type==="wildcard"){if(!G&&!R)throw new TypeError(`Missing text after "${N.name}": ${a}`);N.type==="param"?v+=`(${O(V,G?"":R)}+)`:v+="([\\s\\S]+)",z.push(N),R="",G=!1;continue}}return v}function O(T,V){return V.length<2?T.length<2?`[^${i(T+V)}]`:`(?:(?!${i(T)})[^${i(V)}])`:T.length<2?`(?:(?!${i(V)})[^${i(T)}])`:`(?:(?!${i(V)}|${i(T)})[\\s\\S])`}function P(T){return T.tokens.map(function V(z,v,R){if(z.type==="text")return s(z.value);if(z.type==="group")return`{${z.tokens.map(V).join("")}}`;const A=C(z.name)&&w(R[v+1])?z.name:JSON.stringify(z.name);if(z.type==="param")return`:${A}`;if(z.type==="wildcard")return`*${A}`;throw new TypeError(`Unexpected token: ${z}`)}).join("")}function C(T){const[V,...z]=T;return r.test(V)?z.every(v=>n.test(v)):!1}function w(T){return(T==null?void 0:T.type)!=="text"?!0:!n.test(T.value[0])}return Vt}var VV=EV();function ff(e,t,r){if(t.length!==e.length)return!0;for(let n=0;n<t.length;n++)if(Math.abs(t[n]-e[n])>r)return!1;return!0}function gf(e,t,r){if(e===void 0&&t||e&&t===void 0)return!1;if(e===void 0||t===void 0)return!0;let n=0;return n+=Math.abs(e.orientation.x-t.orientation.x),n+=Math.abs(e.orientation.y-t.orientation.y),n+=Math.abs(e.orientation.z-t.orientation.z),n+=Math.abs(e.position.x-t.position.x),n+=Math.abs(e.position.y-t.position.y),n+=Math.abs(e.position.z-t.position.z),n>r?!1:e.coordinate_system===t.coordinate_system&&e.tcp===t.tcp}var th=1e-4,IV=class yf{constructor(t,r,n,a,o,s,i,l,c,u,d,h){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=a,this.motionStateSocket=o,this.isVirtual=s,this.tcps=i,this.motionGroupSpecification=l,this.safetySetup=c,this.mounting=u,this.initialControllerState=d,this.controllerStateSocket=h,this.connectedJoggingCartesianSocket=null,this.connectedJoggingJointsSocket=null,this.joggingVelocity=10,this.activationState="inactive",this.rapidlyChangingMotionState=a,this.controllerState=d,h.addEventListener("message",p=>{var f;const m=(f=sr(p.data))==null?void 0:f.result;m&&Be.runInAction(()=>{this.controllerState=m})}),o.addEventListener("message",p=>{var f;const m=(f=sr(p.data))==null?void 0:f.result;if(!m)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${p.data}`);ff(this.rapidlyChangingMotionState.state.joint_position.joints,m.state.joint_position.joints,th)||Be.runInAction(()=>{this.rapidlyChangingMotionState.state=m.state}),gf(this.rapidlyChangingMotionState.tcp_pose,m.tcp_pose,th)||Be.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=m.tcp_pose})}),Be.makeAutoObservable(this)}static connect(t,r,n){return Ee(this,null,function*(){var a,o;const[s,i]=r.split("@"),l=n.find(w=>w.controller===i),c=l==null?void 0:l.physical_motion_groups.find(w=>w.motion_group===r);if(!l||!c)throw new Error(`Controller ${i} or motion group ${r} not found`);const u=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),d=yield u.firstMessage(),h=(a=sr(d.data))==null?void 0:a.result;if(!h)throw new Error(`Unable to parse initial motion state message ${d.data}`);console.log(`Connected motion state websocket to motion group ${c.motion_group}. Initial state:
|
|
151
|
+
`,h);const f=(yield t.api.controller.getRobotController(l.controller)).configuration.kind==="VirtualController",m=yield Ee(this,null,function*(){try{return yield t.api.motionGroupInfos.getMounting(c.motion_group)}catch(w){return console.error(`Error fetching mounting for ${c.motion_group}`,w),null}}),b=t.openReconnectingWebsocket(`/controllers/${l.controller}/state-stream?response_rate=1000`),S=yield b.firstMessage(),E=(o=sr(S.data))==null?void 0:o.result;if(!E)throw new Error(`Unable to parse initial controller state message ${S.data}`);console.log(`Connected controller state websocket to controller ${l.controller}. Initial state:
|
|
152
|
+
`,E);const{tcps:O}=yield t.api.motionGroupInfos.listTcps(r),P=yield t.api.motionGroupInfos.getMotionGroupSpecification(r),C=yield t.api.motionGroupInfos.getSafetySetup(r);return new yf(t,l,c,h,u,f,O,P,C,m,E,b)})}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,n,a,o,s;const i=new ke.Vector3(((r=(t=this.mounting)==null?void 0:t.pose.orientation)==null?void 0:r.x)||0,((a=(n=this.mounting)==null?void 0:n.pose.orientation)==null?void 0:a.y)||0,((s=(o=this.mounting)==null?void 0:o.pose.orientation)==null?void 0:s.z)||0),l=i.length(),c=i.normalize();return new ke.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 Ee(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 Ee(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}},MV=class bf{constructor(t,r={}){this.motionStream=t,this.opts=r,this.cartesianWebsocket=null,this.jointWebsocket=null,this.cartesianJoggingOpts={}}static open(t,r){return Ee(this,arguments,function*(n,a,o={}){const s=yield n.connectMotionStream(a);return new bf(s,o)})}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 Ee(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&&(UA(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",n=>{const a=sr(n.data);if(a&&"error"in a)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)})),t==="joint"&&!this.jointWebsocket&&(this.jointWebsocket=this.nova.openReconnectingWebsocket("/motion-groups/move-joint"),this.jointWebsocket.addEventListener("message",n=>{const a=sr(n.data);if(a&&"error"in a)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)}))}startJointRotation(t){return Ee(this,arguments,function*({joint:r,direction:n,velocityRadsPerSec:a}){if(!this.jointWebsocket)throw new Error("Joint jogging websocket not connected; call setJoggingMode first");const o=new Array(this.numJoints).fill(0);o[r]=n==="-"?-a:a,this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:o})})}startTCPTranslation(t){return Ee(this,arguments,function*({axis:r,direction:n,velocityMmPerSec:a}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const o={x:0,y:0,z:0},s=Object.assign({},o);s[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:s,rotation_direction:o,position_velocity:a,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}startTCPRotation(t){return Ee(this,arguments,function*({axis:r,direction:n,velocityRadsPerSec:a}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const o={x:0,y:0,z:0},s=Object.assign({},o);s[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:o,rotation_direction:s,position_velocity:0,rotation_velocity:a,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}runIncrementalCartesianMotion(t){return Ee(this,arguments,function*({currentTcpPose:r,currentJoints:n,coordSystemId:a,velocityInRelevantUnits:o,axis:s,direction:i,motion:l}){var c;const u=[];if(!ZA(r.coordinate_system,a))throw new Error(`Current TCP pose coordinate system ${r.coordinate_system} does not match target coordinate system ${a}`);if(l.type==="translate"){const p=Object.assign({},r.position);p[s]+=l.distanceMm*(i==="-"?-1:1),u.push({settings:{limits_override:{tcp_velocity_limit:o}},line:{position:p,orientation:r.orientation,coordinate_system:a}})}else if(l.type==="rotate"){const p=new dn(r.orientation.x,r.orientation.y,r.orientation.z),f=p.length(),m=p.clone().normalize(),b=l.distanceRads*(i==="-"?-1:1),S=new dn(0,0,0);S[s]=1;const E=Math.cos(.5*b)*Math.cos(.5*f),O=Math.sin(.5*b)*Math.sin(.5*f),P=Math.sin(.5*b)*Math.cos(.5*f),C=Math.cos(.5*b)*Math.sin(.5*f),w=S.dot(m),T=S.clone().cross(m),V=2*Math.acos(E-O*w),z=V/Math.sin(.5*V),v=new dn().addScaledVector(T,O).addScaledVector(S,P).addScaledVector(m,C).multiplyScalar(z);u.push({settings:{limits_override:{tcp_orientation_velocity_limit:o}},line:{position:r.position,orientation:v,coordinate_system:a}})}const d=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:n,tcp:this.cartesianJoggingOpts.tcpId,commands:u}),h=(c=d.plan_successful_response)==null?void 0:c.motion;if(!h)throw new Error(`Failed to plan jogging increment motion ${JSON.stringify(d)}`);yield this.nova.api.motion.streamMoveForward(h,100,void 0,void 0,void 0,{timeout:1e3*60})})}runIncrementalJointRotation(t){return Ee(this,arguments,function*({joint:r,currentJoints:n,velocityRadsPerSec:a,direction:o,distanceRads:s}){var i;const l=[...n.joints];l[r]+=s*(o==="-"?-1:1);const c=new Array(n.joints.length).fill(a),u=yield this.nova.api.motion.planMotion({motion_group:this.motionGroupId,start_joint_position:n,commands:[{settings:{limits_override:{joint_velocity_limits:{joints:c}}},joint_ptp:{joints:l}}]}),d=(i=u.plan_successful_response)==null?void 0:i.motion;if(!d){console.error("Failed to plan jogging increment motion",u);return}yield this.nova.api.motion.streamMoveForward(d,100,void 0,void 0,void 0,{timeout:1e3*60})})}},rh=1e-4;function jV(e,t){const r=new St.Vector3(t.x,t.y,t.z),n=new St.Vector3(e.x,e.y,e.z),a=r.length(),o=r.normalize();let s=n.length(),i=n.normalize();i.dot(o)<0&&(s=-s,i=i.multiplyScalar(-1));let l=s-a;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),s=a+l,i.multiplyScalar(s)}var $V=class vf{constructor(t,r,n,a,o){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=a,this.motionStateSocket=o,this.rapidlyChangingMotionState=a,o.addEventListener("message",s=>{var i;const l=(i=sr(s.data))==null?void 0:i.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${s.data}`);ff(this.rapidlyChangingMotionState.state.joint_position.joints,l.state.joint_position.joints,rh)||Be.runInAction(()=>{this.rapidlyChangingMotionState.state=l.state}),gf(this.rapidlyChangingMotionState.tcp_pose,l.tcp_pose,rh)||Be.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:jV(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 Ee(this,null,function*(){var n;const{instances:a}=yield t.api.controller.listControllers(),[o,s]=r.split("@"),i=a.find(h=>h.controller===s),l=i==null?void 0:i.physical_motion_groups.find(h=>h.motion_group===r);if(!i||!l)throw new Error(`Controller ${s} or motion group ${r} not found`);const c=t.openReconnectingWebsocket(`/motion-groups/${r}/state-stream`),u=yield c.firstMessage();console.log("got first message",u);const d=(n=sr(u.data))==null?void 0:n.result;if(!d)throw new Error(`Unable to parse initial motion state message ${u.data}`);return console.log(`Connected motion state websocket to motion group ${l.motion_group}. Initial state:
|
|
153
|
+
`,d),new vf(t,i,l,d,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()}},kV=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(vV),this.cell=this.withUnwrappedResponsesOnly($E),this.deviceConfig=this.withCellId(zE),this.motionGroup=this.withCellId(tV),this.motionGroupInfos=this.withCellId(nV),this.controller=this.withCellId(UE),this.program=this.withCellId(cV),this.programValues=this.withCellId(dV),this.controllerIOs=this.withCellId(LE),this.motionGroupKinematic=this.withCellId(iV),this.motion=this.withCellId(ZE),this.coordinateSystems=this.withCellId(FE),this.application=this.withCellId(Xd),this.applicationGlobal=this.withUnwrappedResponsesOnly(Xd),this.motionGroupJogging=this.withCellId(oV),this.virtualRobot=this.withCellId(SV),this.virtualRobotSetup=this.withCellId(RV),this.virtualRobotMode=this.withCellId(PV),this.virtualRobotBehavior=this.withCellId(wV),this.libraryProgramMetadata=this.withCellId(JE),this.libraryProgram=this.withCellId(HE),this.libraryRecipeMetadata=this.withCellId(QE),this.libraryRecipe=this.withCellId(YE),this.storeObject=this.withCellId(yV),this.storeCollisionComponents=this.withCellId(pV),this.storeCollisionScenes=this.withCellId(fV)}withCellId(e){var t,r;const n=new e(cl(an({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:_.create());for(const a of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(a!=="constructor"&&typeof n[a]=="function"){const o=n[a];n[a]=(...s)=>o.apply(n,[this.cellId,...s]).then(i=>i.data)}return n}withUnwrappedResponsesOnly(e){var t,r;const n=new e(cl(an({},this.opts),{isJsonMime:a=>a==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:_.create());for(const a of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(a!=="constructor"&&typeof n[a]=="function"){const o=n[a];n[a]=(...s)=>o.apply(n,s).then(i=>i.data)}return n}},UV=class{constructor(){this.connections=[]}handleAPIRequest(e){return Ee(this,null,function*(){var t,r,n;const a=[{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"}}]}}}],o=((t=e.method)==null?void 0:t.toUpperCase())||"GET",s="/cells"+((n=(r=e.url)==null?void 0:r.split("/cells")[1])==null?void 0:n.split("?")[0]);for(const i of a){const l=VV.match(i.path)(s||"");if(o===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 gl(`No mock handler matched this request: ${o} ${s}`,"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(DV)})),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)}},DV={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]},sequence_number:"1"},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"}}},LV=class{constructor(e){this.authPromise=null,this.accessToken=null;var t;const r=(t=e.cellId)!=null?t:"cell";this.config=an({cellId:r},e),this.accessToken=e.accessToken||Ri.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"&&(this.mock=new UV);const n=_.create({baseURL:ji(this.config.instanceUrl,"/api/v1"),headers:{"User-Agent":"Wandelbots-Nova-JS-SDK"}});n.interceptors.request.use(a=>Ee(this,null,function*(){return a.headers.Authorization||(this.accessToken?a.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(a.headers.Authorization=`Basic ${btoa(e.username+":"+e.password)}`)),a})),typeof window<"u"&&n.interceptors.response.use(a=>a,a=>Ee(this,null,function*(){var o,s;if(VE(a))if(((o=a.response)==null?void 0:o.status)===401)try{if(yield this.renewAuthentication(),a.config)return this.accessToken?a.config.headers.Authorization=`Bearer ${this.accessToken}`:delete a.config.headers.Authorization,n.request(a.config)}catch(i){return Promise.reject(i)}else((s=a.response)==null?void 0:s.status)===503&&(yield fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(a)})),this.api=new kV(r,cl(an({},e),{basePath:ji(this.config.instanceUrl,"/api/v1"),isJsonMime:a=>a==="application/json",baseOptions:an(an({},this.mock?{adapter:a=>this.mock.handleAPIRequest(a)}:{}),e.baseOptions),axiosInstance:n}))}renewAuthentication(){return Ee(this,null,function*(){if(!this.authPromise){this.authPromise=t_(this.config.instanceUrl);try{this.accessToken=yield this.authPromise,this.accessToken?Ri.setString("wbjs.access_token",this.accessToken):Ri.delete("wbjs.access_token")}finally{this.authPromise=null}}})}makeWebsocketURL(e){const t=new URL(ji(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 QA(this.makeWebsocketURL(e),{mock:this.mock})}connectMotionStream(e){return Ee(this,null,function*(){return yield $V.open(this,e)})}connectJogger(e){return Ee(this,null,function*(){return yield MV.open(this,e)})}connectMotionGroups(e){return Ee(this,null,function*(){const{instances:t}=yield this.api.controller.listControllers();return Promise.all(e.map(r=>IV.connect(this,r,t)))})}connectMotionGroup(e){return Ee(this,null,function*(){return(yield this.connectMotionGroups([e]))[0]})}};function BV(e){try{return JSON.stringify(e)}catch{return}}function FV(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function NV(e){var t,r,n,a;return e instanceof gl&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof gl&&e.response?`${(t=e.response)==null?void 0:t.status} ${(r=e.response)==null?void 0:r.statusText} from ${(n=e.response)==null?void 0:n.config.url}: ${JSON.stringify((a=e.response)==null?void 0:a.data)}`:e instanceof Error?e.message:`Unexpected error: ${BV(e)||e}`}const Sc=e=>{const t=e.softTimeout||3e3,[r,n]=K.useState(!1),a=F.useTheme();return K.useEffect(()=>{const o=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(o)}),g.jsx(F.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:a.palette.text.primary},children:e.error?g.jsx(xf,{loadingMessage:e.message,error:e.error}):g.jsxs(g.Fragment,{children:[g.jsx(F.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&g.jsx("div",{children:e.message}),g.jsx(F.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:a.palette.text.secondary},children:"This is taking longer than expected..."})]})})},xf=e=>{const t=NV(e.error),r=e.error instanceof Error?e.error.stack:null,n=F.useTheme();return g.jsxs(F.Stack,{sx:{maxHeight:"100%",maxWidth:"min(100%, 800px)",padding:2,overflow:"auto",color:n.palette.error.main,"& pre":{whiteSpace:"pre-wrap",wordBreak:"break-word",paddingBottom:"3rem"}},children:[(e.loadingMessage?`Error while ${Pl.lowerFirst(F.capitalize(e.loadingMessage))} - `:"")+t,g.jsx("br",{}),r&&g.jsx("pre",{children:r})]})},zV=({title:e,titleId:t,...r},n)=>B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.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"})),GV=K.forwardRef(zV),HV=({title:e,titleId:t,...r},n)=>B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.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"})),qV=K.forwardRef(HV),JV=({title:e,titleId:t,...r},n)=>B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.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"})),WV=K.forwardRef(JV),YV=({title:e,titleId:t,...r},n)=>B.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.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"})),KV=K.forwardRef(YV);function QV(){this.__data__=[],this.size=0}function Sf(e,t){return e===t||e!==e&&t!==t}function Bs(e,t){for(var r=e.length;r--;)if(Sf(e[r][0],t))return r;return-1}var XV=Array.prototype,ZV=XV.splice;function e2(e){var t=this.__data__,r=Bs(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():ZV.call(t,r,1),--this.size,!0}function t2(e){var t=this.__data__,r=Bs(t,e);return r<0?void 0:t[r][1]}function r2(e){return Bs(this.__data__,e)>-1}function n2(e,t){var r=this.__data__,n=Bs(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Qt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Qt.prototype.clear=QV;Qt.prototype.delete=e2;Qt.prototype.get=t2;Qt.prototype.has=r2;Qt.prototype.set=n2;function a2(){this.__data__=new Qt,this.size=0}function o2(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function s2(e){return this.__data__.get(e)}function i2(e){return this.__data__.has(e)}var l2="[object AsyncFunction]",c2="[object Function]",u2="[object GeneratorFunction]",d2="[object Proxy]";function Of(e){if(!Tr(e))return!1;var t=kr(e);return t==c2||t==u2||t==l2||t==d2}var $i=Ut["__core-js_shared__"],nh=function(){var e=/[^.]+$/.exec($i&&$i.keys&&$i.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function h2(e){return!!nh&&nh in e}var p2=Function.prototype,m2=p2.toString;function Dr(e){if(e!=null){try{return m2.call(e)}catch{}try{return e+""}catch{}}return""}var f2=/[\\^$.*+?()[\]{}|]/g,g2=/^\[object .+?Constructor\]$/,y2=Function.prototype,b2=Object.prototype,v2=y2.toString,x2=b2.hasOwnProperty,S2=RegExp("^"+v2.call(x2).replace(f2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function O2(e){if(!Tr(e)||h2(e))return!1;var t=Of(e)?S2:g2;return t.test(Dr(e))}function w2(e,t){return e==null?void 0:e[t]}function Lr(e,t){var r=w2(e,t);return O2(r)?r:void 0}var Oa=Lr(Ut,"Map"),wa=Lr(Object,"create");function C2(){this.__data__=wa?wa(null):{},this.size=0}function P2(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var T2="__lodash_hash_undefined__",R2=Object.prototype,A2=R2.hasOwnProperty;function _2(e){var t=this.__data__;if(wa){var r=t[e];return r===T2?void 0:r}return A2.call(t,e)?t[e]:void 0}var E2=Object.prototype,V2=E2.hasOwnProperty;function I2(e){var t=this.__data__;return wa?t[e]!==void 0:V2.call(t,e)}var M2="__lodash_hash_undefined__";function j2(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=wa&&t===void 0?M2:t,this}function _r(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}_r.prototype.clear=C2;_r.prototype.delete=P2;_r.prototype.get=_2;_r.prototype.has=I2;_r.prototype.set=j2;function $2(){this.size=0,this.__data__={hash:new _r,map:new(Oa||Qt),string:new _r}}function k2(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Fs(e,t){var r=e.__data__;return k2(t)?r[typeof t=="string"?"string":"hash"]:r.map}function U2(e){var t=Fs(this,e).delete(e);return this.size-=t?1:0,t}function D2(e){return Fs(this,e).get(e)}function L2(e){return Fs(this,e).has(e)}function B2(e,t){var r=Fs(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Xt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Xt.prototype.clear=$2;Xt.prototype.delete=U2;Xt.prototype.get=D2;Xt.prototype.has=L2;Xt.prototype.set=B2;var F2=200;function N2(e,t){var r=this.__data__;if(r instanceof Qt){var n=r.__data__;if(!Oa||n.length<F2-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Xt(n)}return r.set(e,t),this.size=r.size,this}function Gt(e){var t=this.__data__=new Qt(e);this.size=t.size}Gt.prototype.clear=a2;Gt.prototype.delete=o2;Gt.prototype.get=s2;Gt.prototype.has=i2;Gt.prototype.set=N2;var z2="__lodash_hash_undefined__";function G2(e){return this.__data__.set(e,z2),this}function H2(e){return this.__data__.has(e)}function Ko(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Xt;++t<r;)this.add(e[t])}Ko.prototype.add=Ko.prototype.push=G2;Ko.prototype.has=H2;function q2(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function J2(e,t){return e.has(t)}var W2=1,Y2=2;function wf(e,t,r,n,a,o){var s=r&W2,i=e.length,l=t.length;if(i!=l&&!(s&&l>i))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&Y2?new Ko:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var b=s?n(m,f,d,t,e,o):n(f,m,d,e,t,o);if(b!==void 0){if(b)continue;h=!1;break}if(p){if(!q2(t,function(S,E){if(!J2(p,E)&&(f===S||a(f,S,r,n,o)))return p.push(E)})){h=!1;break}}else if(!(f===m||a(f,m,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}var ah=Ut.Uint8Array;function K2(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function Q2(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var X2=1,Z2=2,eI="[object Boolean]",tI="[object Date]",rI="[object Error]",nI="[object Map]",aI="[object Number]",oI="[object RegExp]",sI="[object Set]",iI="[object String]",lI="[object Symbol]",cI="[object ArrayBuffer]",uI="[object DataView]",oh=ur?ur.prototype:void 0,ki=oh?oh.valueOf:void 0;function dI(e,t,r,n,a,o,s){switch(r){case uI:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case cI:return!(e.byteLength!=t.byteLength||!o(new ah(e),new ah(t)));case eI:case tI:case aI:return Sf(+e,+t);case rI:return e.name==t.name&&e.message==t.message;case oI:case iI:return e==t+"";case nI:var i=K2;case sI:var l=n&X2;if(i||(i=Q2),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=Z2,s.set(e,t);var u=wf(i(e),i(t),n,a,o,s);return s.delete(e),u;case lI:if(ki)return ki.call(e)==ki.call(t)}return!1}function hI(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var kt=Array.isArray;function pI(e,t,r){var n=t(e);return kt(e)?n:hI(n,r(e))}function mI(e,t){for(var r=-1,n=e==null?0:e.length,a=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[a++]=s)}return o}function fI(){return[]}var gI=Object.prototype,yI=gI.propertyIsEnumerable,sh=Object.getOwnPropertySymbols,bI=sh?function(e){return e==null?[]:(e=Object(e),mI(sh(e),function(t){return yI.call(e,t)}))}:fI;function vI(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var xI="[object Arguments]";function ih(e){return Rr(e)&&kr(e)==xI}var Cf=Object.prototype,SI=Cf.hasOwnProperty,OI=Cf.propertyIsEnumerable,Pf=ih(function(){return arguments}())?ih:function(e){return Rr(e)&&SI.call(e,"callee")&&!OI.call(e,"callee")};function wI(){return!1}var Tf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,lh=Tf&&typeof module=="object"&&module&&!module.nodeType&&module,CI=lh&&lh.exports===Tf,ch=CI?Ut.Buffer:void 0,PI=ch?ch.isBuffer:void 0,bl=PI||wI,TI=9007199254740991,RI=/^(?:0|[1-9]\d*)$/;function Rf(e,t){var r=typeof e;return t=t??TI,!!t&&(r=="number"||r!="symbol"&&RI.test(e))&&e>-1&&e%1==0&&e<t}var AI=9007199254740991;function Oc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=AI}var _I="[object Arguments]",EI="[object Array]",VI="[object Boolean]",II="[object Date]",MI="[object Error]",jI="[object Function]",$I="[object Map]",kI="[object Number]",UI="[object Object]",DI="[object RegExp]",LI="[object Set]",BI="[object String]",FI="[object WeakMap]",NI="[object ArrayBuffer]",zI="[object DataView]",GI="[object Float32Array]",HI="[object Float64Array]",qI="[object Int8Array]",JI="[object Int16Array]",WI="[object Int32Array]",YI="[object Uint8Array]",KI="[object Uint8ClampedArray]",QI="[object Uint16Array]",XI="[object Uint32Array]",_e={};_e[GI]=_e[HI]=_e[qI]=_e[JI]=_e[WI]=_e[YI]=_e[KI]=_e[QI]=_e[XI]=!0;_e[_I]=_e[EI]=_e[NI]=_e[VI]=_e[zI]=_e[II]=_e[MI]=_e[jI]=_e[$I]=_e[kI]=_e[UI]=_e[DI]=_e[LI]=_e[BI]=_e[FI]=!1;function ZI(e){return Rr(e)&&Oc(e.length)&&!!_e[kr(e)]}function eM(e){return function(t){return e(t)}}var Af=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ia=Af&&typeof module=="object"&&module&&!module.nodeType&&module,tM=ia&&ia.exports===Af,Ui=tM&&Tm.process,uh=function(){try{var e=ia&&ia.require&&ia.require("util").types;return e||Ui&&Ui.binding&&Ui.binding("util")}catch{}}(),dh=uh&&uh.isTypedArray,_f=dh?eM(dh):ZI,rM=Object.prototype,nM=rM.hasOwnProperty;function aM(e,t){var r=kt(e),n=!r&&Pf(e),a=!r&&!n&&bl(e),o=!r&&!n&&!a&&_f(e),s=r||n||a||o,i=s?vI(e.length,String):[],l=i.length;for(var c in e)nM.call(e,c)&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Rf(c,l)))&&i.push(c);return i}var oM=Object.prototype;function sM(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||oM;return e===r}function iM(e,t){return function(r){return e(t(r))}}var lM=iM(Object.keys,Object),cM=Object.prototype,uM=cM.hasOwnProperty;function dM(e){if(!sM(e))return lM(e);var t=[];for(var r in Object(e))uM.call(e,r)&&r!="constructor"&&t.push(r);return t}function Ef(e){return e!=null&&Oc(e.length)&&!Of(e)}function wc(e){return Ef(e)?aM(e):dM(e)}function hh(e){return pI(e,wc,bI)}var hM=1,pM=Object.prototype,mM=pM.hasOwnProperty;function fM(e,t,r,n,a,o){var s=r&hM,i=hh(e),l=i.length,c=hh(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:mM.call(t,h)))return!1}var p=o.get(e),f=o.get(t);if(p&&f)return p==t&&f==e;var m=!0;o.set(e,t),o.set(t,e);for(var b=s;++d<l;){h=i[d];var S=e[h],E=t[h];if(n)var O=s?n(E,S,h,t,e,o):n(S,E,h,e,t,o);if(!(O===void 0?S===E||a(S,E,r,n,o):O)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var P=e.constructor,C=t.constructor;P!=C&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof C=="function"&&C instanceof C)&&(m=!1)}return o.delete(e),o.delete(t),m}var vl=Lr(Ut,"DataView"),xl=Lr(Ut,"Promise"),Sl=Lr(Ut,"Set"),Ol=Lr(Ut,"WeakMap"),ph="[object Map]",gM="[object Object]",mh="[object Promise]",fh="[object Set]",gh="[object WeakMap]",yh="[object DataView]",yM=Dr(vl),bM=Dr(Oa),vM=Dr(xl),xM=Dr(Sl),SM=Dr(Ol),ar=kr;(vl&&ar(new vl(new ArrayBuffer(1)))!=yh||Oa&&ar(new Oa)!=ph||xl&&ar(xl.resolve())!=mh||Sl&&ar(new Sl)!=fh||Ol&&ar(new Ol)!=gh)&&(ar=function(e){var t=kr(e),r=t==gM?e.constructor:void 0,n=r?Dr(r):"";if(n)switch(n){case yM:return yh;case bM:return ph;case vM:return mh;case xM:return fh;case SM:return gh}return t});var OM=1,bh="[object Arguments]",vh="[object Array]",lo="[object Object]",wM=Object.prototype,xh=wM.hasOwnProperty;function CM(e,t,r,n,a,o){var s=kt(e),i=kt(t),l=s?vh:ar(e),c=i?vh:ar(t);l=l==bh?lo:l,c=c==bh?lo:c;var u=l==lo,d=c==lo,h=l==c;if(h&&bl(e)){if(!bl(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new Gt),s||_f(e)?wf(e,t,r,n,a,o):dI(e,t,l,r,n,a,o);if(!(r&OM)){var p=u&&xh.call(e,"__wrapped__"),f=d&&xh.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,b=f?t.value():t;return o||(o=new Gt),a(m,b,r,n,o)}}return h?(o||(o=new Gt),fM(e,t,r,n,a,o)):!1}function Ns(e,t,r,n,a){return e===t?!0:e==null||t==null||!Rr(e)&&!Rr(t)?e!==e&&t!==t:CM(e,t,r,n,Ns,a)}function PM(e,t){return Ns(e,t)}const Vf=({store:e})=>{const{t}=Re.useTranslation(),[r,n]=K.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),a=K.useRef(r);Pn(()=>{const s=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;PM(a.current,s)||(a.current=s,n(s))});const o=[];for(const[s,i]of r.entries())i&&o.push(s);return g.jsx(F.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:o.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:o.map(s=>s+1).join(", ")})})},TM=F.styled(F.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 co({labelValue:e,...t}){return g.jsxs(TM,{fullWidth:!0,variant:"filled",children:[g.jsx(F.InputLabel,{id:t.labelId,children:e}),g.jsx(F.Select,{...t})]})}var Sh=function(){try{var e=Lr(Object,"defineProperty");return e({},"",{}),e}catch{}}();function RM(e,t,r){t=="__proto__"&&Sh?Sh(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function AM(e,t,r,n){for(var a=-1,o=e==null?0:e.length;++a<o;){var s=e[a];t(n,s,r(s),e)}return n}function _M(e){return function(t,r,n){for(var a=-1,o=Object(t),s=n(t),i=s.length;i--;){var l=s[++a];if(r(o[l],l,o)===!1)break}return t}}var EM=_M();function VM(e,t){return e&&EM(e,t,wc)}function IM(e,t){return function(r,n){if(r==null)return r;if(!Ef(r))return e(r,n);for(var a=r.length,o=-1,s=Object(r);++o<a&&n(s[o],o,s)!==!1;);return r}}var MM=IM(VM);function jM(e,t,r,n){return MM(e,function(a,o,s){t(n,a,r(a),s)}),n}var $M=1,kM=2;function UM(e,t,r,n){var a=r.length,o=a;if(e==null)return!o;for(e=Object(e);a--;){var s=r[a];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<o;){s=r[a];var i=s[0],l=e[i],c=s[1];if(s[2]){if(l===void 0&&!(i in e))return!1}else{var u=new Gt,d;if(!(d===void 0?Ns(c,l,$M|kM,n,u):d))return!1}}return!0}function If(e){return e===e&&!Tr(e)}function DM(e){for(var t=wc(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,If(a)]}return t}function Mf(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function LM(e){var t=DM(e);return t.length==1&&t[0][2]?Mf(t[0][0],t[0][1]):function(r){return r===e||UM(r,e,t)}}var BM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,FM=/^\w*$/;function Cc(e,t){if(kt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Es(e)?!0:FM.test(e)||!BM.test(e)||t!=null&&e in Object(t)}var NM="Expected a function";function Pc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(NM);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var s=e.apply(this,n);return r.cache=o.set(a,s)||o,s};return r.cache=new(Pc.Cache||Xt),r}Pc.Cache=Xt;var zM=500;function GM(e){var t=Pc(e,function(n){return r.size===zM&&r.clear(),n}),r=t.cache;return t}var HM=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qM=/\\(\\)?/g,JM=GM(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(HM,function(r,n,a,o){t.push(a?o.replace(qM,"$1"):n||r)}),t});function WM(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var Oh=ur?ur.prototype:void 0,wh=Oh?Oh.toString:void 0;function jf(e){if(typeof e=="string")return e;if(kt(e))return WM(e,jf)+"";if(Es(e))return wh?wh.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function $f(e){return e==null?"":jf(e)}function kf(e,t){return kt(e)?e:Cc(e,t)?[e]:JM($f(e))}function zs(e){if(typeof e=="string"||Es(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Uf(e,t){t=kf(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[zs(t[r++])];return r&&r==n?e:void 0}function YM(e,t,r){var n=e==null?void 0:Uf(e,t);return n===void 0?r:n}function KM(e,t){return e!=null&&t in Object(e)}function QM(e,t,r){t=kf(t,e);for(var n=-1,a=t.length,o=!1;++n<a;){var s=zs(t[n]);if(!(o=e!=null&&r(e,s)))break;e=e[s]}return o||++n!=a?o:(a=e==null?0:e.length,!!a&&Oc(a)&&Rf(s,a)&&(kt(e)||Pf(e)))}function XM(e,t){return e!=null&&QM(e,t,KM)}var ZM=1,e5=2;function t5(e,t){return Cc(e)&&If(t)?Mf(zs(e),t):function(r){var n=YM(r,e);return n===void 0&&n===t?XM(r,e):Ns(t,n,ZM|e5)}}function r5(e){return e}function n5(e){return function(t){return t==null?void 0:t[e]}}function a5(e){return function(t){return Uf(t,e)}}function o5(e){return Cc(e)?n5(zs(e)):a5(e)}function s5(e){return typeof e=="function"?e:e==null?r5:typeof e=="object"?kt(e)?t5(e[0],e[1]):LM(e):o5(e)}function i5(e,t){return function(r,n){var a=kt(r)?AM:jM,o={};return a(r,e,s5(n),o)}}var uo=i5(function(e,t,r){RM(e,r,t)}),l5=0;function c5(e){var t=++l5;return $f(e)+t}const wl=[{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}],u5=[{id:"continuous"},...wl],d5=["coordsys","tool"];class Gs{constructor(t,r,n,a){var o,s;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=n,this.tcps=a,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 n)if(i.coordinate_system===""){i.coordinate_system="world";break}this.selectedCoordSystemId=((o=n[0])==null?void 0:o.coordinate_system)||"world",this.selectedTcpId=((s=a[0])==null?void 0:s.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,[n,{coordinatesystems:a},{tcps:o}]=await Promise.all([r.api.motionGroupInfos.getMotionGroupSpecification(t.motionGroupId),r.api.coordinateSystems.listCoordinateSystems("ROTATION_VECTOR"),r.api.motionGroupInfos.listTcps(t.motionGroupId,"ROTATION_VECTOR")]);return new Gs(t,n,a||[],o||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return Pl.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=Sr.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 u5}get discreteIncrementOptions(){return wl}get incrementOptionsById(){return uo(this.incrementOptions,t=>t.id)}get tabsById(){return uo(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 uo(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 uo(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:wl.find(t=>t.id===this.selectedIncrementId)}get rotationVelocityRadsPerSec(){return this.rotationVelocityDegPerSec*Math.PI/180}get velocityInDisplayUnits(){return this.currentMotionType==="translate"?this.translationVelocityMmPerSec:this.rotationVelocityDegPerSec}get minVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.minTranslationVelocityMmPerSec:this.minRotationVelocityDegPerSec}get maxVelocityInDisplayUnits(){return this.currentMotionType==="translate"?this.maxTranslationVelocityMmPerSec:this.maxRotationVelocityDegPerSec}get currentMotionType(){return this.selectedTabId==="cartesian"&&this.selectedCartesianMotionType==="translate"?"translate":"rotate"}onTabChange(t,r){const n=this.tabs[r]||this.tabs[0];this.selectedTabId=n.id}setSelectedCoordSystemId(t){this.selectedCoordSystemId=t}setSelectedTcpId(t){this.selectedTcpId=t}setSelectedOrientation(t){this.selectedOrientation=t}setSelectedIncrementId(t){this.selectedIncrementId=t}setCurrentIncrementJog(t){this.incrementJogInProgress=t}setVelocityFromSlider(t){this.currentMotionType==="translate"?this.translationVelocityMmPerSec=t:this.rotationVelocityDegPerSec=t}setSelectedCartesianMotionType(t){this.selectedCartesianMotionType=t}lock(t){this.locks.add(t)}unlock(t){this.locks.delete(t)}async withMotionLock(t){const r=c5();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const h5=Te.observer(({store:e})=>{var a;const{t}=Re.useTranslation(),r=[];function n(o){switch(o){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return o}}return e.showCoordSystemSelect&&r.push(g.jsx(co,{labelId:"jogging-coord-select",labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:o=>e.setSelectedCoordSystemId(o.target.value),disabled:e.isLocked,children:e.coordSystems.map(o=>g.jsx(F.MenuItem,{value:o.coordinate_system,children:o.name&&e.coordSystemCountByName[o.name]>1?`${o.name} / ${o.coordinate_system}`:o.name||o.coordinate_system},o.coordinate_system))},"coord")),e.showTcpSelect&&r.push(g.jsx(co,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:o=>e.setSelectedTcpId(o.target.value),disabled:e.isLocked,children:e.tcps.map(o=>g.jsx(F.MenuItem,{value:o.id,children:o.id},o.id))},"tcp")),e.showOrientationSelect&&r.push(g.jsx(co,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:o=>e.setSelectedOrientation(o.target.value),disabled:e.isLocked,children:d5.map(o=>g.jsx(F.MenuItem,{value:o,children:n(o)},o))},"orientation")),e.showIncrementSelect&&r.push(g.jsxs(co,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((a=e.activeDiscreteIncrement)==null?void 0:a.id)||"continuous",onChange:o=>e.setSelectedIncrementId(o.target.value),disabled:e.isLocked,children:[g.jsx(F.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(o=>g.jsx(F.MenuItem,{value:o.id,children:e.currentMotionType==="translate"?`${o.mm}mm`:`${o.degrees}°`},o.id))]},"increment")),g.jsx(F.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((o,s)=>g.jsx(F.Box,{sx:{gridColumn:r.length%2===1&&s===r.length-1?"span 2":"auto"},children:o},s))})}),p5=F.styled(F.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 Ch(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function m5(e){return typeof e=="string"}function f5(e,t,r){return e===void 0||m5(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function wo(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function Ph(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function g5(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:a,className:o}=e;if(!t){const p=Ct(r==null?void 0:r.className,o,a==null?void 0:a.className,n==null?void 0:n.className),f={...r==null?void 0:r.style,...a==null?void 0:a.style,...n==null?void 0:n.style},m={...r,...a,...n};return p.length>0&&(m.className=p),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:void 0}}const s=wo({...a,...n}),i=Ph(n),l=Ph(a),c=t(s),u=Ct(c==null?void 0:c.className,r==null?void 0:r.className,o,a==null?void 0:a.className,n==null?void 0:n.className),d={...c==null?void 0:c.style,...r==null?void 0:r.style,...a==null?void 0:a.style,...n==null?void 0:n.style},h={...c,...r,...l,...i};return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}}function y5(e,t,r){return typeof e=="function"?e(t,r):e}function nr(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:a=!1,...o}=e,s=a?{}:y5(r,n),{props:i,internalRef:l}=g5({...o,externalSlotProps:s}),c=ds(l,s==null?void 0:s.ref,(d=e.additionalProps)==null?void 0:d.ref);return f5(t,{...i,ref:c},n)}function Th(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
154
|
+
`))}return!1}const b5={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function v5(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const x5=2;function tn(e,t,r,n,a){return r===1?Math.min(e+t,a):Math.max(e-t,n)}function Df(e,t){return e-t}function Rh(e,t){const{index:r}=e.reduce((n,a,o)=>{const s=Math.abs(t-a);return n===null||s<n.distance||s===n.distance?{distance:s,index:o}:n},null)??{};return r}function ho(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const a=r.changedTouches[n];if(a.identifier===t.current)return{x:a.clientX,y:a.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Qo(e,t,r){return(e-t)*100/(r-t)}function S5(e,t,r){return(r-t)*e+t}function O5(e){if(Math.abs(e)<1){const r=e.toExponential().split("e-"),n=r[0].split(".")[1];return(n?n.length:0)+parseInt(r[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function w5(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(O5(t)))}function Ah({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(Df)}function po({sliderRef:e,activeIndex:t,setActive:r}){var a,o,s;const n=aa(e.current);(!((a=e.current)!=null&&a.contains(n.activeElement))||Number((o=n==null?void 0:n.activeElement)==null?void 0:o.getAttribute("data-index"))!==t)&&((s=e.current)==null||s.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function mo(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?v5(e,t):!1}const C5={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}%`})}},P5=e=>e;let fo;function _h(){return fo===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?fo=CSS.supports("touch-action","none"):fo=!0),fo}function T5(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:o=!1,marks:s=!1,max:i=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:f=P5,step:m=1,shiftStep:b=10,tabIndex:S,value:E}=e,O=B.useRef(void 0),[P,C]=B.useState(-1),[w,T]=B.useState(-1),[V,z]=B.useState(!1),v=B.useRef(0),R=B.useRef(null),[G,A]=Hw({controlled:E,default:r??l,name:"Slider"}),N=u&&((Q,ne,ie)=>{const fe=Q.nativeEvent||Q,we=new fe.constructor(fe.type,fe);Object.defineProperty(we,"target",{writable:!0,value:{value:ne,name:c}}),R.current=ne,u(we,ne,ie)}),re=Array.isArray(G);let ee=re?G.slice().sort(Df):[G];ee=ee.map(Q=>Q==null?l:rn(Q,l,i));const ae=s===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((Q,ne)=>({value:l+m*ne})):s||[],te=ae.map(Q=>Q.value),[se,q]=B.useState(-1),Z=B.useRef(null),ue=ds(p,Z),ve=Q=>ne=>{var fe;const ie=Number(ne.currentTarget.getAttribute("data-index"));Th(ne.target)&&q(ie),T(ie),(fe=Q==null?void 0:Q.onFocus)==null||fe.call(Q,ne)},ze=Q=>ne=>{var ie;Th(ne.target)||q(-1),T(-1),(ie=Q==null?void 0:Q.onBlur)==null||ie.call(Q,ne)},Oe=(Q,ne)=>{const ie=Number(Q.currentTarget.getAttribute("data-index")),fe=ee[ie],we=te.indexOf(fe);let le=ne;if(ae&&m==null){const He=te[te.length-1];le>=He?le=He:le<=te[0]?le=te[0]:le=le<fe?te[we-1]:te[we+1]}if(le=rn(le,l,i),re){a&&(le=rn(le,ee[ie-1]||-1/0,ee[ie+1]||1/0));const He=le;le=Ah({values:ee,newValue:le,index:ie});let Xe=ie;a||(Xe=le.indexOf(He)),po({sliderRef:Z,activeIndex:Xe})}A(le),q(ie),N&&!mo(le,G)&&N(Q,le,ie),d&&d(Q,R.current??le)},lt=Q=>ne=>{var ie;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(ne.key)){ne.preventDefault();const fe=Number(ne.currentTarget.getAttribute("data-index")),we=ee[fe];let le=null;if(m!=null){const He=ne.shiftKey?b:m;switch(ne.key){case"ArrowUp":le=tn(we,He,1,l,i);break;case"ArrowRight":le=tn(we,He,o?-1:1,l,i);break;case"ArrowDown":le=tn(we,He,-1,l,i);break;case"ArrowLeft":le=tn(we,He,o?1:-1,l,i);break;case"PageUp":le=tn(we,b,1,l,i);break;case"PageDown":le=tn(we,b,-1,l,i);break;case"Home":le=l;break;case"End":le=i;break}}else if(ae){const He=te[te.length-1],Xe=te.indexOf(we),Le=[o?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],mt=[o?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Le.includes(ne.key)?Xe===0?le=te[0]:le=te[Xe-1]:mt.includes(ne.key)&&(Xe===te.length-1?le=He:le=te[Xe+1])}le!=null&&Oe(ne,le)}(ie=Q==null?void 0:Q.onKeyDown)==null||ie.call(Q,ne)};$t(()=>{var Q;n&&Z.current.contains(document.activeElement)&&((Q=document.activeElement)==null||Q.blur())},[n]),n&&P!==-1&&C(-1),n&&se!==-1&&q(-1);const tt=Q=>ne=>{var ie;(ie=Q.onChange)==null||ie.call(Q,ne),Oe(ne,ne.target.valueAsNumber)},ye=B.useRef(void 0);let X=h;o&&h==="horizontal"&&(X+="-reverse");const oe=({finger:Q,move:ne=!1})=>{const{current:ie}=Z,{width:fe,height:we,bottom:le,left:He}=ie.getBoundingClientRect();let Xe;X.startsWith("vertical")?Xe=(le-Q.y)/we:Xe=(Q.x-He)/fe,X.includes("-reverse")&&(Xe=1-Xe);let Le;if(Le=S5(Xe,l,i),m)Le=w5(Le,m,l);else{const Mn=Rh(te,Le);Le=te[Mn]}Le=rn(Le,l,i);let mt=0;if(re){ne?mt=ye.current:mt=Rh(ee,Le),a&&(Le=rn(Le,ee[mt-1]||-1/0,ee[mt+1]||1/0));const Mn=Le;Le=Ah({values:ee,newValue:Le,index:mt}),a&&ne||(mt=Le.indexOf(Mn),ye.current=mt)}return{newValue:Le,activeIndex:mt}},ce=zt(Q=>{const ne=ho(Q,O);if(!ne)return;if(v.current+=1,Q.type==="mousemove"&&Q.buttons===0){W(Q);return}const{newValue:ie,activeIndex:fe}=oe({finger:ne,move:!0});po({sliderRef:Z,activeIndex:fe,setActive:C}),A(ie),!V&&v.current>x5&&z(!0),N&&!mo(ie,G)&&N(Q,ie,fe)}),W=zt(Q=>{const ne=ho(Q,O);if(z(!1),!ne)return;const{newValue:ie}=oe({finger:ne,move:!0});C(-1),Q.type==="touchend"&&T(-1),d&&d(Q,R.current??ie),O.current=void 0,me()}),be=zt(Q=>{if(n)return;_h()||Q.preventDefault();const ne=Q.changedTouches[0];ne!=null&&(O.current=ne.identifier);const ie=ho(Q,O);if(ie!==!1){const{newValue:we,activeIndex:le}=oe({finger:ie});po({sliderRef:Z,activeIndex:le,setActive:C}),A(we),N&&!mo(we,G)&&N(Q,we,le)}v.current=0;const fe=aa(Z.current);fe.addEventListener("touchmove",ce,{passive:!0}),fe.addEventListener("touchend",W,{passive:!0})}),me=B.useCallback(()=>{const Q=aa(Z.current);Q.removeEventListener("mousemove",ce),Q.removeEventListener("mouseup",W),Q.removeEventListener("touchmove",ce),Q.removeEventListener("touchend",W)},[W,ce]);B.useEffect(()=>{const{current:Q}=Z;return Q.addEventListener("touchstart",be,{passive:_h()}),()=>{Q.removeEventListener("touchstart",be),me()}},[me,be]),B.useEffect(()=>{n&&me()},[n,me]);const Je=Q=>ne=>{var we;if((we=Q.onMouseDown)==null||we.call(Q,ne),n||ne.defaultPrevented||ne.button!==0)return;ne.preventDefault();const ie=ho(ne,O);if(ie!==!1){const{newValue:le,activeIndex:He}=oe({finger:ie});po({sliderRef:Z,activeIndex:He,setActive:C}),A(le),N&&!mo(le,G)&&N(ne,le,He)}v.current=0;const fe=aa(Z.current);fe.addEventListener("mousemove",ce,{passive:!0}),fe.addEventListener("mouseup",W)},Ge=Qo(re?ee[0]:l,l,i),Me=Qo(ee[ee.length-1],l,i)-Ge,Zt=(Q={})=>{const ne=wo(Q),ie={onMouseDown:Je(ne||{})},fe={...ne,...ie};return{...Q,ref:ue,...fe}},$a=Q=>ne=>{var fe;(fe=Q.onMouseOver)==null||fe.call(Q,ne);const ie=Number(ne.currentTarget.getAttribute("data-index"));T(ie)},ka=Q=>ne=>{var ie;(ie=Q.onMouseLeave)==null||ie.call(Q,ne),T(-1)},Ua=(Q={})=>{const ne=wo(Q),ie={onMouseOver:$a(ne||{}),onMouseLeave:ka(ne||{})};return{...Q,...ne,...ie}},Da=Q=>({pointerEvents:P!==-1&&P!==Q?"none":void 0});let Br;return h==="vertical"&&(Br=o?"vertical-rl":"vertical-lr"),{active:P,axis:X,axisProps:C5,dragging:V,focusedThumbIndex:se,getHiddenInputProps:(Q={})=>{const ne=wo(Q),ie={onChange:tt(ne||{}),onFocus:ve(ne||{}),onBlur:ze(ne||{}),onKeyDown:lt(ne||{})},fe={...ne,...ie};return{tabIndex:S,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":f(i),"aria-valuemin":f(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:n,...Q,...fe,style:{...b5,direction:o?"rtl":"ltr",width:"100%",height:"100%",writingMode:Br}}},getRootProps:Zt,getThumbProps:Ua,marks:ae,open:w,range:re,rootRef:ue,trackLeap:Me,trackOffset:Ge,values:ee,getThumbStyle:Da}}function Co(e){return typeof e=="string"}const R5=e=>!e||!Co(e);function A5(e){return typeof e.main=="string"}function _5(e,t=[]){if(!A5(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Tc(e=[]){return([,t])=>t&&_5(t,e)}function E5(e){return Sn("MuiSlider",e)}const bt=Rl("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"]),V5=e=>{const{open:t}=e;return{offset:Ct(t&&bt.valueLabelOpen),circle:bt.valueLabelCircle,label:bt.valueLabelLabel}};function Lf(e){const{children:t,className:r,value:n}=e,a=V5(e);return t?B.cloneElement(t,{className:t.props.className},g.jsxs(B.Fragment,{children:[t.props.children,g.jsx("span",{className:Ct(a.offset,r),"aria-hidden":!0,children:g.jsx("span",{className:a.circle,children:g.jsx("span",{className:a.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(Lf.propTypes={children:y.element.isRequired,className:y.string,value:y.node});function Eh(e){return e}const I5=ht("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${Ze(r.color)}`],r.size!=="medium"&&t[`size${Ze(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})($r(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${bt.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${bt.dragging}`]:{[`& .${bt.thumb}, & .${bt.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Tc()).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}}]}))),M5=ht("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),j5=ht("span",{name:"MuiSlider",slot:"Track"})($r(({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(Tc()).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:ca(e.palette[t].main,.62),borderColor:ca(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:la(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:la(e.palette[t].main,.5)})}}}))]}))),$5=ht("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${Ze(r.color)}`],r.size!=="medium"&&t[`thumbSize${Ze(r.size)}`]]}})($r(({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%)"},[`&.${bt.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(Tc()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${bt.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Fi(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${bt.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Fi(e.palette[t].main,.16)}`}}}}))]}))),Bf=ht(Lf,{name:"MuiSlider",slot:"ValueLabel"})($r(({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%"},[`&.${bt.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%"},[`&.${bt.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"&&(Bf.propTypes={children:y.element.isRequired,index:y.number.isRequired,open:y.bool.isRequired,value:y.node});const k5=ht("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>El(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})($r(({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}}]}))),U5=ht("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>El(e)&&e!=="markLabelActive"})($r(({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}}]}))),D5=e=>{const{disabled:t,dragging:r,marked:n,orientation:a,track:o,classes:s,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",a==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",i&&`color${Ze(i)}`,l&&`size${Ze(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${Ze(l)}`,i&&`thumbColor${Ze(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Xo(c,E5,s)},L5=({children:e})=>e,Ff=B.forwardRef(function(t,r){const n=yc({props:t,name:"MuiSlider"}),a=t0(),{"aria-label":o,"aria-valuetext":s,"aria-labelledby":i,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:p,disableSwap:f=!1,disabled:m=!1,getAriaLabel:b,getAriaValueText:S,marks:E=!1,max:O=100,min:P=0,name:C,onChange:w,onChangeCommitted:T,orientation:V="horizontal",shiftStep:z=10,size:v="medium",step:R=1,scale:G=Eh,slotProps:A,slots:N,tabIndex:re,track:ee="normal",value:ae,valueLabelDisplay:te="off",valueLabelFormat:se=Eh,...q}=n,Z={...n,isRtl:a,max:O,min:P,classes:h,disabled:m,disableSwap:f,orientation:V,marks:E,color:d,size:v,step:R,shiftStep:z,scale:G,track:ee,valueLabelDisplay:te,valueLabelFormat:se},{axisProps:ue,getRootProps:ve,getHiddenInputProps:ze,getThumbProps:Oe,open:lt,active:tt,axis:ye,focusedThumbIndex:X,range:oe,dragging:ce,marks:W,values:be,trackOffset:me,trackLeap:Je,getThumbStyle:Ge}=T5({...Z,rootRef:r});Z.marked=W.length>0&&W.some(De=>De.label),Z.dragging=ce,Z.focusedThumbIndex=X;const Me=D5(Z),Zt=(N==null?void 0:N.root)??c.Root??I5,$a=(N==null?void 0:N.rail)??c.Rail??M5,ka=(N==null?void 0:N.track)??c.Track??j5,Ua=(N==null?void 0:N.thumb)??c.Thumb??$5,Da=(N==null?void 0:N.valueLabel)??c.ValueLabel??Bf,Br=(N==null?void 0:N.mark)??c.Mark??k5,La=(N==null?void 0:N.markLabel)??c.MarkLabel??U5,Q=(N==null?void 0:N.input)??c.Input??"input",ne=(A==null?void 0:A.root)??u.root,ie=(A==null?void 0:A.rail)??u.rail,fe=(A==null?void 0:A.track)??u.track,we=(A==null?void 0:A.thumb)??u.thumb,le=(A==null?void 0:A.valueLabel)??u.valueLabel,He=(A==null?void 0:A.mark)??u.mark,Xe=(A==null?void 0:A.markLabel)??u.markLabel,Le=(A==null?void 0:A.input)??u.input,mt=nr({elementType:Zt,getSlotProps:ve,externalSlotProps:ne,externalForwardedProps:q,additionalProps:{...R5(Zt)&&{as:l}},ownerState:{...Z,...ne==null?void 0:ne.ownerState},className:[Me.root,p]}),Mn=nr({elementType:$a,externalSlotProps:ie,ownerState:Z,className:Me.rail}),Zf=nr({elementType:ka,externalSlotProps:fe,additionalProps:{style:{...ue[ye].offset(me),...ue[ye].leap(Je)}},ownerState:{...Z,...fe==null?void 0:fe.ownerState},className:Me.track}),Hs=nr({elementType:Ua,getSlotProps:Oe,externalSlotProps:we,ownerState:{...Z,...we==null?void 0:we.ownerState},className:Me.thumb}),eg=nr({elementType:Da,externalSlotProps:le,ownerState:{...Z,...le==null?void 0:le.ownerState},className:Me.valueLabel}),qs=nr({elementType:Br,externalSlotProps:He,ownerState:Z,className:Me.mark}),Js=nr({elementType:La,externalSlotProps:Xe,ownerState:Z,className:Me.markLabel}),tg=nr({elementType:Q,getSlotProps:ze,externalSlotProps:Le,ownerState:Z});return g.jsxs(Zt,{...mt,children:[g.jsx($a,{...Mn}),g.jsx(ka,{...Zf}),W.filter(De=>De.value>=P&&De.value<=O).map((De,We)=>{const Ws=Qo(De.value,P,O),Ba=ue[ye].offset(Ws);let Dt;return ee===!1?Dt=be.includes(De.value):Dt=ee==="normal"&&(oe?De.value>=be[0]&&De.value<=be[be.length-1]:De.value<=be[0])||ee==="inverted"&&(oe?De.value<=be[0]||De.value>=be[be.length-1]:De.value>=be[0]),g.jsxs(B.Fragment,{children:[g.jsx(Br,{"data-index":We,...qs,...!Co(Br)&&{markActive:Dt},style:{...Ba,...qs.style},className:Ct(qs.className,Dt&&Me.markActive)}),De.label!=null?g.jsx(La,{"aria-hidden":!0,"data-index":We,...Js,...!Co(La)&&{markLabelActive:Dt},style:{...Ba,...Js.style},className:Ct(Me.markLabel,Js.className,Dt&&Me.markLabelActive),children:De.label}):null]},We)}),be.map((De,We)=>{const Ws=Qo(De,P,O),Ba=ue[ye].offset(Ws),Dt=te==="off"?L5:Da;return g.jsx(Dt,{...!Co(Dt)&&{valueLabelFormat:se,valueLabelDisplay:te,value:typeof se=="function"?se(G(De),We):se,index:We,open:lt===We||tt===We||te==="on",disabled:m},...eg,children:g.jsx(Ua,{"data-index":We,...Hs,className:Ct(Me.thumb,Hs.className,tt===We&&Me.active,X===We&&Me.focusVisible),style:{...Ba,...Ge(We),...Hs.style},children:g.jsx(Q,{"data-index":We,"aria-label":b?b(We):o,"aria-valuenow":G(De),"aria-labelledby":i,"aria-valuetext":S?S(G(De),We):s,value:be[We],...tg})})},We)})]})});process.env.NODE_ENV!=="production"&&(Ff.propTypes={"aria-label":Ch(y.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":y.string,"aria-valuetext":Ch(y.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:y.node,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["primary","secondary","error","info","success","warning"]),y.string]),components:y.shape({Input:y.elementType,Mark:y.elementType,MarkLabel:y.elementType,Rail:y.elementType,Root:y.elementType,Thumb:y.elementType,Track:y.elementType,ValueLabel:y.elementType}),componentsProps:y.shape({input:y.oneOfType([y.func,y.object]),mark:y.oneOfType([y.func,y.object]),markLabel:y.oneOfType([y.func,y.object]),rail:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object]),thumb:y.oneOfType([y.func,y.object]),track:y.oneOfType([y.func,y.object]),valueLabel:y.oneOfType([y.func,y.shape({children:y.element,className:y.string,open:y.bool,style:y.object,value:y.node,valueLabelDisplay:y.oneOf(["auto","off","on"])})])}),defaultValue:y.oneOfType([y.arrayOf(y.number),y.number]),disabled:y.bool,disableSwap:y.bool,getAriaLabel:y.func,getAriaValueText:y.func,marks:y.oneOfType([y.arrayOf(y.shape({label:y.node,value:y.number.isRequired})),y.bool]),max:y.number,min:y.number,name:y.string,onChange:y.func,onChangeCommitted:y.func,orientation:y.oneOf(["horizontal","vertical"]),scale:y.func,shiftStep:y.number,size:y.oneOfType([y.oneOf(["small","medium"]),y.string]),slotProps:y.shape({input:y.oneOfType([y.func,y.object]),mark:y.oneOfType([y.func,y.object]),markLabel:y.oneOfType([y.func,y.object]),rail:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object]),thumb:y.oneOfType([y.func,y.object]),track:y.oneOfType([y.func,y.object]),valueLabel:y.oneOfType([y.func,y.shape({children:y.element,className:y.string,open:y.bool,style:y.object,value:y.node,valueLabelDisplay:y.oneOf(["auto","off","on"])})])}),slots:y.shape({input:y.elementType,mark:y.elementType,markLabel:y.elementType,rail:y.elementType,root:y.elementType,thumb:y.elementType,track:y.elementType,valueLabel:y.elementType}),step:y.number,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),tabIndex:y.number,track:y.oneOf(["inverted","normal",!1]),value:y.oneOfType([y.arrayOf(y.number),y.number]),valueLabelDisplay:y.oneOf(["auto","off","on"]),valueLabelFormat:y.oneOfType([y.func,y.string])});var B5="[object Number]";function F5(e){return typeof e=="number"||Rr(e)&&kr(e)==B5}const Nf=Te.observer(e=>{var o,s,i;const t=F.useTheme(),{store:r}=e,{t:n}=Re.useTranslation();function a(l,c){c===e.velocity||!F5(c)||e.onVelocityChange(c)}return g.jsxs(F.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(F.Typography,{sx:{color:(i=(s=(o=t.componentsExt)==null?void 0:o.JoggingPanel)==null?void 0:s.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:n("Jogging.Velocity.bt")}),g.jsx(Ff,{value:e.velocity,color:"secondary",onChange:a,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):g.jsx(Rc,{value:e.velocity.toString()}))]})});function Rc({value:e,sx:t}){var n;const r=F.useTheme();return g.jsx(F.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:"5px",sx:{padding:"6px 12px",background:(n=r.palette.backgroundPaperElevation)==null?void 0:n[8],borderRadius:"10px",minWidth:"111px",...t},children:g.jsx(F.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const zf=Te.observer(({store:e})=>{const{t}=Re.useTranslation(),r=Te.useLocalObservable(()=>({get valueLabelFormat(){return e.currentMotionType==="translate"?n=>`v = ${t("Jogging.Cartesian.Translation.velocityMmPerSec.lb",{amount:n})}`:n=>`ω = ${t("Jogging.Cartesian.Rotation.velocityDegPerSec.lb",{amount:n})}`}}));return g.jsx(Nf,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(Rc,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),N5=Te.observer(({store:e,children:t})=>{const{t:r}=Re.useTranslation(),n=F.useTheme();function a(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Pm(()=>[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 o(h,p){const f=await e.activate(),m=f.motionStream.rapidlyChangingMotionState.tcp_pose,b=f.motionStream.rapidlyChangingMotionState.state.joint_position;m&&await e.withMotionLock(async()=>{try{e.setCurrentIncrementJog({axis:h.axis,direction:h.direction}),await e.jogger.runIncrementalCartesianMotion({currentTcpPose:m,currentJoints:b,coordSystemId:e.activeCoordSystemId,velocityInRelevantUnits:e.selectedCartesianMotionType==="translate"?e.translationVelocityMmPerSec:e.rotationVelocityRadsPerSec,axis:h.axis,direction:h.direction,motion:e.selectedCartesianMotionType==="translate"?{type:"translate",distanceMm:p.mm}:{type:"rotate",distanceRads:Sr.degreesToRadians(p.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function s(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return o(h,e.activeDiscreteIncrement);h.motionType==="translate"?await e.jogger.startTCPTranslation({axis:h.axis,direction:h.direction,velocityMmPerSec:e.translationVelocityMmPerSec}):await e.jogger.startTCPRotation({axis:h.axis,direction:h.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}}async function i(){e.isLocked||e.activeDiscreteIncrement||await e.deactivate()}function l(h,p,f){var b,S,E;const m=(E=(S=(b=f.componentsExt)==null?void 0:b.JoggingPanel)==null?void 0:S.JoggingCartesian)==null?void 0:E.Axis;if(m)return p==="translate"?m[h]:m.CustomRotation??m[h]}const c=[{id:"x",icon:g.jsx(GV,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(qV,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(WV,{}),colors:l("Z",e.selectedCartesianMotionType,n)}];function u(h){return r("General.mm.variable",{amount:h.toFixed(1)})}function d(h){return r("General.degree.variable",{amount:Sr.radiansToDegrees(h).toFixed(1)})}return g.jsxs(F.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(F.Stack,{gap:2,children:[g.jsx(h5,{store:e}),g.jsx(zf,{store:e}),g.jsx(F.Divider,{})]}),g.jsx(F.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(F.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs(p5,{value:e.selectedCartesianMotionType,onChange:a,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(F.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(F.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(rl,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[h.icon,g.jsx(F.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m;return u(((m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.position[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"translate",direction:m}),stopJogging:i},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var p,f;return g.jsx(rl,{colors:h.colors,disabled:e.isLocked,activeJoggingDirection:((p=e.incrementJogInProgress)==null?void 0:p.axis)===h.id?e.incrementJogInProgress.direction:void 0,label:g.jsxs(g.Fragment,{children:[g.jsx(KV,{}),g.jsx(F.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,b;return d(((b=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:b[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx(Vf,{store:e}),t&&g.jsx(F.Divider,{}),t]})}),z5=Te.observer(({store:e,children:t})=>{const r=F.useTheme();async function n(o){await e.activate(),await e.jogger.startJointRotation({joint:o.joint,direction:o.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function a(){await e.jogger.stop(),await e.deactivate()}return g.jsxs(F.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(zf,{store:e}),g.jsx(F.Divider,{}),g.jsx(F.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(F.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(o=>{var c;const s=(c=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:c[o.index],i=(s==null?void 0:s.lower_limit)!==void 0?Sr.radiansToDegrees(s.lower_limit):void 0,l=(s==null?void 0:s.upper_limit)!==void 0?Sr.radiansToDegrees(s.upper_limit):void 0;return g.jsxs(F.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(F.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${o.index+1}`}),g.jsx(Am,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[o.index];return u!==void 0?Sr.radiansToDegrees(u):void 0},startJogging:u=>n({joint:o.index,direction:u}),stopJogging:a})]},`joint-${o.index}`)})})}),g.jsx(Vf,{store:e}),t&&g.jsx(F.Divider,{}),t]})}),G5=pt(Te.observer(e=>{const t=Pl.isString(e.nova)?new LV({instanceUrl:e.nova}):e.nova,r=Te.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){Be.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let a=e.store;if(!a){const o=await t.connectJogger(e.motionGroupId);a=await Gs.loadFor(o)}Be.runInAction(()=>{r.joggingStore=a}),e.onSetup&&e.onSetup(a)}catch(a){r.loadingError=a}}return K.useEffect(()=>(n(),e.store?()=>null:()=>{var a;(a=r.joggingStore)==null||a.dispose()}),[e.store,e.nova,e.motionGroupId]),K.useEffect(()=>{const a=r.joggingStore;a&&(e.locked?a.lock("external"):a.unlock("external"))},[r.joggingStore,e.locked]),g.jsx(F.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(H5,{store:r.joggingStore,children:e.children}):g.jsx(Sc,{message:"Loading jogging",error:r.loadingError})})})),H5=Te.observer(({store:e,children:t})=>{const{t:r}=Re.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(N5,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(z5,{store:e,children:t})})}return g.jsxs(F.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(F.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(a=>{const o=a.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),s=a.label==="cartesian"?g.jsx(bC,{fontSize:"small",sx:{mr:1}}):g.jsx(vC,{fontSize:"small",sx:{mr:1}});return g.jsx(F.Tab,{label:e.showTabIcons?g.jsxs(F.Stack,{direction:"row",alignItems:"center",children:[s,o]}):o,id:`jogging-tab-${a.id}`,"aria-controls":`jogging-tab-${a.id}`},a.id)})}),g.jsx(F.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()})]})}),Gf=K.forwardRef(({label:e,value:t},r)=>{var i;const n=F.useTheme(),[a,o]=K.useState(!1);async function s(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),o(!0),!0}catch(l){console.error(l);const c=window.getSelection(),u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}return!1}return K.useEffect(()=>{if(!a)return;const l=setTimeout(()=>o(!1),3e3);return()=>{l&&clearTimeout(l)}},[a]),g.jsx(F.Tooltip,{open:a,title:"Copied!",children:g.jsx(F.Stack,{justifyContent:"center",sx:{height:"100%",boxSizing:"border-box",padding:"6px 12px",background:(i=n.palette.backgroundPaperElevation)==null?void 0:i[8],borderRadius:"10px",minWidth:"0",cursor:"pointer"},onClick:()=>s(),children:g.jsx(F.Typography,{ref:r,align:"center",sx:{pointerEvents:"none",fontSize:"12px",color:n.palette.text.primary,whiteSpace:"nowrap",minWidth:0,textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:t})})})}),q5=Te.observer(({motionStream:e})=>{const t=K.useRef(null);function r(){const n=e.rapidlyChangingMotionState.tcp_pose;return n?Sr.poseToWandelscriptString(n):""}return Pn(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),g.jsx(F.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:g.jsx(Gf,{value:r(),ref:t})})}),J5=Te.observer(({motionStream:e})=>{const t=K.useRef(null);function r(){const{joints:n}=e.rapidlyChangingMotionState.state.joint_position;return`[${n.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`}return Pn(()=>{if(!t.current)return;const n=r();t.current.textContent!==n&&(t.current.textContent=n)}),g.jsx(F.Stack,{alignItems:"left",spacing:2,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},children:g.jsx(Gf,{value:r(),ref:t})})});function W5(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function Y5({baseUrl:e=W5(),...t}){return g.jsxs(F.Dialog,{"aria-labelledby":"no-motion-group-modal-title",open:!0,fullWidth:!0,sx:{"& .MuiModal-backdrop":{backdropFilter:"blur(10px)"},"& .MuiDialog-paper":{"::before":{content:'""',height:"8px",width:"100%",background:"linear-gradient(90deg, #FF0E65 0%, #47D3FF 100%)"},background:"#101629"}},children:[g.jsx(F.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(F.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(F.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(F.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(F.DialogActions,{children:g.jsxs(F.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(F.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(F.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var on=(e=>(e.IDLE="idle",e.RUNNING="running",e.PAUSED="paused",e.STOPPING="stopping",e))(on||{});const K5=pt(Te.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:a,requiresManualReset:o=!1,variant:s="with_pause",className:i})=>{const l=F.useTheme(),{t:c}=Re.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="paused",label:c(e==="paused"?"ProgramControl.Resume.bt":"ProgramControl.Start.bt"),color:l.palette.success.main,onClick:t},pause:{enabled:e==="running",label:c("ProgramControl.Pause.bt"),color:"#FFFFFF33",onClick:r||(()=>{})},stop:{enabled:e==="running"||e==="paused",label:c("ProgramControl.Stop.bt"),color:l.palette.error.main,onClick:n}};return s==="without_pause"?[p.run,p.stop]:[p.run,p.pause,p.stop]},d=p=>{const f={sx:{fontSize:"55px"}};if(s==="without_pause")return p===0?g.jsx($n.PlayArrow,{...f}):g.jsx($n.Stop,{...f});switch(p){case 0:return g.jsx($n.PlayArrow,{...f});case 1:return g.jsx($n.Pause,{...f});case 2:return g.jsx($n.Stop,{...f});default:return null}},h=u();return g.jsx(F.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(F.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(F.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(F.Button,{variant:"contained",disabled:!p.enabled||e==="stopping"&&!o,onClick:p.onClick,sx:{width:"110px",height:"110px",borderRadius:"110px",backgroundColor:p.color,opacity:p.enabled&&!(e==="stopping"&&!o)?1:.3,"&:hover":{backgroundColor:p.color,opacity:p.enabled&&!(e==="stopping"&&!o)?.8:.3},"&:disabled":{backgroundColor:p.color,opacity:.3},minWidth:"110px",flexShrink:0},children:d(f)}),g.jsx(F.Typography,{variant:"body1",sx:{color:p.enabled&&!(e==="stopping"&&!o)?p.color:l.palette.text.disabled,textAlign:"center",opacity:p.enabled&&!(e==="stopping"&&!o)?1:.3},children:p.label})]},p.label))})})})),Cl=pt(Te.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const a=F.useTheme(),{t:o}=Re.useTranslation(),s=()=>{if(t==="SAFETY_STATE_DEVICE_EMERGENCY_STOP"||t==="SAFETY_STATE_ROBOT_EMERGENCY_STOP"||t==="SAFETY_STATE_STOP_0"||t==="SAFETY_STATE_STOP_1"||t==="SAFETY_STATE_STOP_2"||t==="SAFETY_STATE_PROTECTIVE_STOP"||t==="SAFETY_STATE_STOP"||t==="SAFETY_STATE_REDUCED"||t==="SAFETY_STATE_MASTERING"||t==="SAFETY_STATE_CONFIRM_SAFETY"||t==="SAFETY_STATE_OPERATOR_SAFETY"||t==="SAFETY_STATE_RECOVERY"||t==="SAFETY_STATE_VIOLATION")return{label:o("ProgramStateIndicator.EStop.lb"),color:a.palette.error.main};if(t==="SAFETY_STATE_UNKNOWN"||t==="SAFETY_STATE_FAULT")return{label:o("ProgramStateIndicator.Error.lb"),color:a.palette.error.main};if(t==="SAFETY_STATE_NORMAL")switch(e){case on.RUNNING:return{label:o("ProgramStateIndicator.Running.lb"),color:a.palette.success.main};case on.PAUSED:return{label:o("ProgramStateIndicator.Paused.lb"),color:a.palette.grey[600]};case on.STOPPING:return{label:o("ProgramStateIndicator.Stopped.lb"),color:a.palette.error.main};case on.IDLE:default:return{label:o("ProgramStateIndicator.Ready.lb"),color:a.palette.success.main}}return{label:o("ProgramStateIndicator.Idle.lb"),color:a.palette.grey[600]}},{label:i,color:l}=s(),u=`${i} / ${(()=>{switch(r){case"OPERATION_MODE_AUTO":return o("ProgramStateIndicator.Auto.lb");case"OPERATION_MODE_MANUAL":return o("ProgramStateIndicator.Manual.lb");case"OPERATION_MODE_MANUAL_T1":return o("ProgramStateIndicator.ManualT1.lb");case"OPERATION_MODE_MANUAL_T2":return o("ProgramStateIndicator.ManualT2.lb");default:return o("ProgramStateIndicator.Auto.lb")}})()}`;return g.jsx(F.Chip,{className:n,label:g.jsx(F.Typography,{variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2},children:u}),variant:"filled",sx:{backgroundColor:l,color:a.palette.getContrastText(l),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),Vh="0.0.0-semantically-released";function Ac(e){let t=Vh;return Vh.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function Q5(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>qf(r))}function Hf(e){return e.name.endsWith("_FLG")}function qf(e){return/_J[0-9]+$/.test(e.name)}function X5(e,t){let r;function n(a){if(Hf(a)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${a.name}. Only one _FLG group is allowed.`);r=a}qf(a),a.children.map(n)}if(n(e.scene),!r)throw Error(`No flange group found in robot model ${t}. Flange must be identified with a name ending in _FLG.`);return{gltf:e}}function Jf({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const a=K.useRef([]),o=K.useRef([]),s=K.useRef(null),{invalidate:i}=Po.useThree();K.useEffect(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);return s.current=new gc(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=s.current)==null||h.destroy()}},[]),Po.useFrame((d,h)=>{if(s.current){const p=s.current.update(h);u(),p||i()}});function l(d){d&&(o.current=Q5(d),u(),i())}function c(d){var h;a.current=d,(h=s.current)==null||h.setTarget(d)}function u(){var h;const d=((h=s.current)==null?void 0:h.getCurrentValues())||[];if(r)r(o.current,d);else for(const[p,f]of o.current.entries()){const m=t[p],b=m.theta||0,S=m.reverse_rotation_direction?-1:1;f.rotation.y=S*(d[p]||0)+b}}return Cm(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);requestAnimationFrame(()=>c(d))}),g.jsx("group",{ref:l,children:n})}const Z5="line",e3="mesh";function t3({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new St.Matrix4,a=K.useRef([]),o=K.useRef([]);K.useEffect(()=>{a.current=new Array(t.length).fill(null),o.current=new Array(t.length).fill(null)},[t.length]);function s(c,u){const d=new St.Vector3,h=new St.Quaternion,p=new St.Vector3;n.decompose(d,h,p);const f=d.clone(),m=new St.Matrix4().makeRotationY(c.theta+u*(c.reverse_rotation_direction?-1:1)).multiply(new St.Matrix4().makeTranslation(0,c.d/1e3,0)).multiply(new St.Matrix4().makeTranslation(c.a/1e3,0,0)).multiply(new St.Matrix4().makeRotationX(c.alpha));return n.multiply(m),n.decompose(d,h,p),{a:f,b:d}}function i(c,u,d,h){if(!t)return;const p=t[c];if(!p)return;const{a:f,b:m}=s(p,h);u.geometry.setPositions([f.toArray(),m.toArray()].flat()),d.position.set(m.x,m.y,m.z)}function l(c,u){n.identity();for(let d=0;d<Math.min(c.length,u.length);d++){const h=a.current[d],p=o.current[d];h&&p&&i(d,h,p,u[d])}}return g.jsx(g.Fragment,{children:g.jsx(Jf,{rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:l,children:g.jsxs("group",{...r,name:"Scene",children:[g.jsxs("mesh",{children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]}),t.map((c,u)=>{const{a:d,b:h}=s(c,e.state.joint_position.joints[u]??0),p=`dhrobot_J0${u}`;return g.jsxs("group",{name:p,children:[g.jsx(at.Line,{ref:f=>{a.current[u]=f},name:Z5,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{o.current[u]=f},name:e3,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const r3=console.warn;function n3(){return K.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&r3(e)}},[]),g.jsx(g.Fragment,{})}function a3(e){return e.type==="Mesh"}function o3({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:a}=X5(at.useGLTF(e),e.split("/").pop()||e),o=K.useCallback(i=>{i&&r&&r()},[e]);function s(i){return a3(i)?g.jsx("mesh",{name:i.name,geometry:i.geometry,material:i.material,position:i.position,rotation:i.rotation},i.uuid):g.jsx("group",{name:i.name,position:i.position,rotation:i.rotation,ref:Hf(i)?t:void 0,children:i.children.map(s)},i.uuid)}return g.jsx("group",{...n,dispose:null,ref:o,children:s(a.scene)})}const s3=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof ke.Mesh){r.material instanceof ke.Material&&(r.material.colorWrite=!1);const n=r.clone(),a=r.clone();n.material=new ke.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:ke.DoubleSide}),n.userData.isGhost=!0,a.material=new ke.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:ke.DoubleSide}),a.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(a))}}),e.userData.isGhost=!0)},i3=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof ke.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof ke.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},Wf=pt(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=Ac,flangeRef:a,postModelRender:o,transparentColor:s,...i})=>{const[l,c]=K.useState(null),u=K.useCallback(h=>{c(h)},[]);K.useEffect(()=>{l&&(s?s3(l,s):i3(l))},[l,s]);const d=g.jsx(t3,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(mg.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(K.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(Jf,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx(o3,{modelURL:n(t),postModelRender:o,flangeRef:a,...i})})})}),g.jsx(n3,{})]})});function Yf({connectedMotionGroup:e,getModel:t=Ac,flangeRef:r,transparentColor:n,postModelRender:a,...o}){return e.dhParameters?g.jsx(Wf,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:a,...o}):null}function Ih({modelRenderTrigger:e,children:t}){const r=at.useBounds();return K.useEffect(()=>{e>0&&r.refresh().clip().fit()},[e,r]),g.jsx(g.Fragment,{children:t})}const l3=pt(Te.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:a=!1,onDriveToHomePress:o,onDriveToHomeRelease:s,connectedMotionGroup:i,robotComponent:l=Yf,cycleTimerComponent:c=wm,onCycleTimerReady:u,onCycleEnd:d,cycleTimerAutoStart:h=!0,className:p})=>{const f=F.useTheme(),{t:m}=Re.useTranslation(),[b,S]=K.useState(!1),E=K.useRef(null),O=K.useRef(null),P=K.useRef(null),[C,w]=K.useState(!1),[T,V]=K.useState({width:400,height:600}),[z,v]=K.useState(0),R=K.useRef(null);K.useEffect(()=>{const q=()=>{if(P.current){const{offsetWidth:ue,offsetHeight:ve}=P.current;w(ue>ve),V({width:ue,height:ve})}};q();const Z=new ResizeObserver(q);return P.current&&Z.observe(P.current),()=>{Z.disconnect()}},[]);const G=K.useCallback(()=>{v(q=>q+1)},[]),A=K.useCallback(()=>{!a||!o||(S(!0),o())},[a,o]),N=K.useCallback(()=>{!a||!s||(S(!1),s())},[a,s]),re=K.useCallback(()=>{b&&s&&(S(!1),s())},[b,s]),ee=K.useCallback(q=>{R.current=q,u&&u(q)},[u]),ae=C?T.width<350||T.height<250:T.width<250||T.height<180,se=ae?0:C?T.width<450?.8:T.width<550?.9:1:T.width<300?.8:T.width<400?.9:1;return g.jsx(F.Card,{ref:P,className:p,elevation:5,sx:{width:"100%",height:"100%",display:"flex",flexDirection:C?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:C?{xs:160,sm:200,md:250}:{xs:200,sm:280,md:350},border:"1px solid var(--secondary-_states-outlinedBorder, #FFFFFF1F)",borderRadius:"18px",boxShadow:"none"},children:C?g.jsxs(g.Fragment,{children:[g.jsx(F.Box,{sx:{flex:"0 0 50%",position:"relative",height:"100%",minHeight:"100%",maxHeight:"100%",borderRadius:1,m:{xs:1.5,sm:2,md:3},mr:{xs:.75,sm:1,md:1.5},overflow:"hidden",display:ae?"none":"block"},children:!ae&&g.jsxs(Po.Canvas,{camera:{position:[4,4,4],fov:15},shadows:!0,frameloop:"demand",style:{borderRadius:f.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute",top:0,left:0},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(Li,{}),g.jsx(at.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,children:g.jsx(Ih,{modelRenderTrigger:z,children:g.jsx("group",{ref:O,scale:se,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:G})})})})]})}),g.jsxs(F.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:ae?"100%":"50%"},children:[g.jsxs(F.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(F.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Cl,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(F.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[g.jsxs(F.Box,{children:[g.jsx(F.Typography,{variant:"body1",sx:{mb:0,color:"var(--text-secondary, #FFFFFFB2)",textAlign:"left"},children:m("RobotCard.Runtime.lb")}),g.jsx(F.Box,{sx:{textAlign:"left"},children:g.jsx(c,{variant:"small",compact:!0,onCycleComplete:ee,onCycleEnd:d,autoStart:h})}),g.jsx(F.Divider,{sx:{mt:1,mb:0,borderColor:f.palette.divider,opacity:.5}})]}),g.jsx(F.Box,{sx:{mt:"auto"},children:g.jsx(F.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:{xs:1,sm:1.5,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(F.Button,{ref:E,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:A,onMouseUp:N,onMouseLeave:re,onTouchStart:A,onTouchEnd:N,sx:{textTransform:"none",px:1.5,py:.5},children:m("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(F.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(F.Box,{children:[g.jsx(F.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Cl,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(F.Box,{sx:{flex:ae?0:1,position:"relative",minHeight:ae?0:{xs:120,sm:150,md:200},height:ae?0:"auto",borderRadius:1,overflow:"hidden",display:ae?"none":"block"},children:!ae&&g.jsxs(Po.Canvas,{camera:{position:[3,3,3],fov:20},shadows:!0,frameloop:"demand",style:{borderRadius:f.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute",top:0,left:0},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(Li,{}),g.jsx(at.Bounds,{fit:!0,observe:!0,margin:1,children:g.jsx(Ih,{modelRenderTrigger:z,children:g.jsx("group",{ref:O,scale:se,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:G})})})})]})}),g.jsxs(F.Box,{children:[g.jsx(F.Typography,{variant:"body1",sx:{mb:0,color:"var(--text-secondary, #FFFFFFB2)"},children:m("RobotCard.Runtime.lb")}),g.jsx(c,{variant:"small",compact:!0,onCycleComplete:ee,onCycleEnd:d,autoStart:h}),g.jsx(F.Divider,{sx:{mt:1,mb:0,borderColor:f.palette.divider,opacity:.5}}),g.jsx(F.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:{xs:1,sm:2,md:5},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(F.Button,{ref:E,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:A,onMouseUp:N,onMouseLeave:re,onTouchStart:A,onTouchEnd:N,sx:{textTransform:"none",px:1.5,py:.5},children:m("RobotCard.DriveToHome.bt")})})]})]})})})})),c3=pr(g.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),u3=({title:e,titleId:t,...r},n)=>B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.createElement("path",{fill:"#38C6F4",fillRule:"evenodd",d:"M6.359 14.25v2.934h7.63v-3.521L10.196 9.87 9 8.674l.859-.859.337-.337.858-.858.565.565.631.63.565.565 1.196-1.195.543-.544 1.196-1.195-1.196-1.196-2.304-2.304L11.054.75 9.86 1.946 3.446 8.359 2.25 9.554l1.196 1.196 2.913 2.913zm1.69 0v1.244h4.249v-1.13L7.804 9.87 6.608 8.674l1.196-1.196L9.86 5.424l.007-.008-.543-.543-4.681 4.681 2.912 2.913.496.496v.113h2.124l1.174 1.174zm3.005-10.022-.294.294-.543-.543.837-.837 2.304 2.304-.543.543-.565-.565z",clipRule:"evenodd"})),d3=K.forwardRef(u3);var _c=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.READY="READY",e))(_c||{});const Kf=pt(Te.observer(({setupState:e,className:t})=>{const r=F.useTheme(),{t:n}=Re.useTranslation(),a=()=>{var c,u,d,h;switch(e){case"READY":return{label:n("RobotSetupReadinessIndicator.Ready.lb"),indicatorColor:((c=r.palette.tertiary)==null?void 0:c.main)||r.palette.primary.main,backgroundColor:((u=r.palette.backgroundPaperElevation)==null?void 0:u[11])||r.palette.background.paper,textColor:"var(--secondary-contrast, #FFFFFFDE)"};case"ROBOT_DISCONNECTED":return{label:n("RobotSetupReadinessIndicator.RobotDisconnected.lb"),indicatorColor:r.palette.error.main,backgroundColor:((d=r.palette.backgroundPaperElevation)==null?void 0:d[11])||r.palette.background.paper,textColor:"var(--secondary-contrast, #FFFFFFDE)"};case"PRECONDITION_NOT_FULFILLED":default:return{label:n("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:r.palette.error.main,backgroundColor:((h=r.palette.backgroundPaperElevation)==null?void 0:h[11])||r.palette.background.paper,textColor:"var(--secondary-contrast, #FFFFFFDE)"}}},{label:o,indicatorColor:s,backgroundColor:i,textColor:l}=a();return g.jsx(F.Chip,{className:t,label:g.jsxs(F.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(F.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:s,flexShrink:0}}),g.jsx(F.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:o})]}),variant:"filled",sx:{backgroundColor:i,color:r.palette.getContrastText(i),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),h3=pt(Te.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=Kf,className:a})=>{const o=F.useTheme(),s=t||"Robot",i=r===_c.READY;return g.jsxs(F.Box,{className:a,sx:{border:"1px solid var(--secondary-_states-outlinedBorder, #FFFFFF1F)",background:"var(--background-paper-elevation-8, #292B3E)",height:80,minHeight:"80px",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(F.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(F.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:"var(--primary-main, #8E56FC) !important"},"& svg path":{fill:"var(--primary-main, #8E56FC) !important"}},children:g.jsx(d3,{})}):g.jsx(c3,{sx:{color:o.palette.error.main,fontSize:24}}),g.jsx(F.Typography,{variant:"body1",sx:{fontWeight:500,color:o.palette.text.primary},children:e}),g.jsx(F.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:o.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(F.Typography,{variant:"body2",sx:{color:o.palette.text.secondary},children:s})]}),n&&g.jsx(n,{setupState:r})]})})),p3=Array(6).fill(2*Math.PI),m3=({title:e,titleId:t,...r},n)=>B.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.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"})),f3=K.forwardRef(m3),g3=({title:e,titleId:t,...r},n)=>B.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.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"})),y3=K.forwardRef(g3),Mt=Te.observer(({id:e,icon:t,color:r,title:n,name:a,label:o,explanation:s,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=Te.useLocalObservable(()=>({anchorEl:null,get isPopoverOpen(){return!!u.anchorEl},openPopover(d){u.anchorEl=d.currentTarget},closePopover(){u.anchorEl=null}}));return g.jsxs(g.Fragment,{children:[g.jsxs(F.Stack,{"aria-owns":u.isPopoverOpen?e:void 0,"aria-haspopup":"true",onMouseEnter:u.openPopover,onMouseLeave:u.closePopover,direction:"row",spacing:1,sx:{cursor:"pointer"},children:[g.jsx(F.SvgIcon,{component:t,sx:{color:r}}),o&&g.jsx("div",{style:{color:r},children:o})]}),g.jsx(F.Popover,{id:e,sx:{pointerEvents:"none"},open:u.isPopoverOpen,anchorEl:u.anchorEl,anchorOrigin:l??{vertical:"bottom",horizontal:"left"},transformOrigin:c??{vertical:"top",horizontal:"left"},onClose:u.closePopover,disableRestoreFocus:!0,children:g.jsxs(F.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(F.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(F.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:a})]}),g.jsx(F.Typography,{fontSize:"14px",children:s}),i&&g.jsx(F.Typography,{fontSize:"12px",children:i})]})})]})}),b3=Te.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:a})=>{const o=F.useTheme(),{t:s}=Re.useTranslation();return e?g.jsx(Mt,{id:"motion-group-virtual",icon:y3,color:o.palette.tertiary.main,name:s("SafetyBar.ControllerType.Virtual.lb"),label:a?null:s("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(Re.Trans,{i18nKey:"SafetyBar.MotionGroup.Virtual.Explanation.lb",values:{motionGroupId:t},children:["Motion group ",g.jsx("code",{children:t})," refers to a virtual robot with no physical counterpart. It can be freely manipulated without special safety precautions."]}),anchorOrigin:r,transformOrigin:n}):g.jsx(Mt,{id:"motion-group-physical",icon:f3,color:o.palette.primary.main,name:s("SafetyBar.ControllerType.Physical.lb"),label:a?null:s("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),v3=({title:e,titleId:t,...r},n)=>B.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.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"})),x3=K.forwardRef(v3),S3=({title:e,titleId:t,...r},n)=>B.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.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})),O3=K.forwardRef(S3),w3=({title:e,titleId:t,...r},n)=>B.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.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"})),C3=K.forwardRef(w3),P3=Te.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=Re.useTranslation(),o=F.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx(Mt,{id:"operation-mode-auto",icon:x3,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Automatic.ti"),label:n?null:a("SafetyBar.OperationMode.Automatic.ti"),color:o.palette.text.secondary,explanation:g.jsx(Re.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 g.jsx(Mt,{id:"operation-mode-manual",icon:C3,color:o.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Manual.lb"),label:n?null:a("SafetyBar.OperationMode.Manual.lb"),explanation:g.jsx(Re.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 g.jsx(Mt,{id:"operation-mode-error",icon:O3,color:o.palette.warning.main,title:a("SafetyBar.OperationMode.ti"),name:a("SafetyBar.OperationMode.Error.lb"),label:n?null:a("SafetyBar.OperationMode.Error.lb"),explanation:g.jsx(Re.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})}}),T3=({title:e,titleId:t,...r},n)=>B.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.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"})),R3=K.forwardRef(T3),A3=({title:e,titleId:t,...r},n)=>B.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),B.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"}),B.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"})),_3=K.forwardRef(A3),E3=({title:e,titleId:t,...r},n)=>B.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.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})),V3=K.forwardRef(E3),I3=({title:e,titleId:t,...r},n)=>B.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.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"})),M3=K.forwardRef(I3),j3=({title:e,titleId:t,...r},n)=>B.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?B.createElement("title",{id:t},e):null,B.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"})),$3=K.forwardRef(j3),k3=Te.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=Re.useTranslation(),o=F.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsx(Mt,{id:"safety-state-normal",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Normal.lb"),label:n?null:a("SafetyBar.SafetyState.Normal.lb"),icon:M3,color:o.palette.text.secondary,explanation:g.jsx(Re.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 g.jsx(Mt,{id:"safety-state-estop",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Estop.lb"),label:n?null:a("SafetyBar.SafetyState.Estop.lb"),icon:_3,color:o.palette.error.main,explanation:g.jsx(Re.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 g.jsx(Mt,{id:"safety-state-stop",icon:$3,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Stop.lb"),label:n?null:a("SafetyBar.SafetyState.Stop.lb"),color:o.palette.warning.main,explanation:g.jsx(Re.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 g.jsx(Mt,{id:"safety-state-manual-action-required",icon:V3,color:o.palette.warning.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:a("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:g.jsx(Re.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 g.jsx(Mt,{id:"safety-state-error",icon:R3,color:o.palette.error.main,title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Error.lb"),label:n?null:a("SafetyBar.SafetyState.Error.lb"),explanation:g.jsx(Re.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:FV(e,`Unknown safety state ${e}`)}}),U3=pt(Te.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s=!0})=>{const i=s?1:2;return g.jsxs(F.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(k3,{safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(F.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(P3,{operationMode:r,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(F.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(b3,{isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:o,compact:s})]})})),D3=pr(g.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),L3=pr(g.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),B3=pr(g.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),Qf=pt(Te.observer(({data:e,columns:t,getRowData:r,onRowClick:n,selectedItem:a,getItemId:o,title:s,showCount:i=!0,searchPlaceholder:l="Search",dataGridProps:c,CustomToolbar:u,backgroundColor:d="transparent",selectFirstByDefault:h=!1})=>{const[p,f]=K.useState(null),m=K.useMemo(()=>e.map(r),[e,r]),b=K.useMemo(()=>{if(a!==void 0)return a;if(p!==null)return p;if(h&&e.length>0){const C=e[0];return f(C),C}return null},[h,e,a,p]),S=C=>{const w=e.find(T=>r(T).id===C.id);w&&(a===void 0&&f(w),n&&n(w,C))},E=K.useMemo(()=>!b||!o?null:o(b),[b,o]);function O(){return g.jsx(Rt.Toolbar,{children:g.jsxs(F.Box,{sx:{display:"flex",width:"100%",gap:1,p:1,alignItems:"center"},children:[s&&g.jsxs(F.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[s,i&&` (${e.length})`]}),g.jsxs(F.Box,{sx:{ml:"auto",display:"flex",gap:1,alignItems:"center"},children:[g.jsx(Rt.FilterPanelTrigger,{render:g.jsx(Rt.ToolbarButton,{"aria-label":"Show filters",children:g.jsx(L3,{fontSize:"small"})})}),g.jsx(F.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),g.jsx(Rt.QuickFilter,{render:(C,w)=>g.jsxs(F.Box,{...C,sx:{display:"flex",overflow:"hidden"},children:[g.jsx(F.Box,{sx:{borderRadius:w.expanded?"4px 0 0 4px":"4px",borderRight:w.expanded?"none":void 0},children:g.jsx(Rt.QuickFilterTrigger,{render:g.jsx(Rt.ToolbarButton,{"aria-label":"Search",children:g.jsx(B3,{fontSize:"small"})})})}),g.jsxs(F.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:w.expanded?"192px":"0px"},children:[g.jsx(F.Box,{sx:{flex:1,"& .MuiInputBase-root":{height:"32px",borderRadius:w.expanded&&w.value!==""?"0":"0 4px 4px 0"}},children:g.jsx(Rt.QuickFilterControl,{placeholder:l})}),w.expanded&&w.value!==""&&g.jsx(Rt.QuickFilterClear,{render:g.jsx(F.Box,{sx:{borderRadius:"0 4px 4px 0"},children:g.jsx(Rt.ToolbarButton,{"aria-label":"Clear",children:g.jsx(D3,{fontSize:"small"})})})})]})]})})]})]})})}const P=u||O;return g.jsx(F.Box,{sx:{height:"100%",display:"flex",flexDirection:"column",background:"var(--background-paper-elevation-5, #202233)"},children:g.jsx(Rt.DataGrid,{rows:m,columns:t,onRowClick:S,disableColumnMenu:!1,disableRowSelectionOnClick:!0,disableMultipleRowSelection:!0,hideFooterSelectedRowCount:!0,filterMode:"client",sortingOrder:["desc","asc"],hideFooter:!1,showToolbar:!0,slots:{toolbar:P},initialState:{sorting:{sortModel:[]},filter:{filterModel:{items:[]}},...c==null?void 0:c.initialState},...c,autosizeOnMount:(c==null?void 0:c.autosizeOnMount)??!0,autosizeOptions:{includeOutliers:!0,includeHeaders:!0,expand:!0,...c==null?void 0:c.autosizeOptions},sx:{border:"none",backgroundColor:"transparent",width:"100%","& .MuiDataGrid-main":{border:"none",backgroundColor:"transparent"},"& .MuiDataGrid-container--top [role=row]":{backgroundColor:"transparent !important"},"& .MuiDataGrid-topContainer":{borderBottom:"none !important"},"& .MuiDataGrid-columnHeaders":{border:"none",borderBottom:"none !important",backgroundColor:"var(--background-paper-elevation-5, #202233)"},"& .MuiDataGrid-row":{cursor:n?"pointer":"default",border:"none",margin:"0px 0",position:"relative","&:hover":{backgroundColor:"transparent !important","&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"action.hover",borderRadius:"16px",zIndex:0}},"&.Mui-selected":{backgroundColor:"transparent !important","&:hover":{backgroundColor:"transparent !important"}},...E!==null&&{[`&[data-id="${E}"]`]:{"&::before":{content:'""',position:"absolute",top:0,left:"16px",right:"16px",bottom:0,backgroundColor:"rgba(255, 255, 255, 0.08) !important",borderRadius:"16px",zIndex:0},"&:hover::before":{backgroundColor:"rgba(255, 255, 255, 0.12) !important"}}}},"& .MuiDataGrid-cell--textLeft":{paddingLeft:"40px"},"& .MuiDataGrid-cell":{border:"none",position:"relative",zIndex:1,"&:focus":{outline:"none"},"&:focus-within":{outline:"none"}},"& .MuiDataGrid-columnHeader":{border:"none",paddingLeft:"40px",paddingRight:"40px",backgroundColor:"transparent !important","& .MuiDataGrid-columnHeaderTitle":{color:"rgba(255, 255, 255, 0.6)"}},"& .MuiDataGrid-toolbarContainer":{padding:"8px",border:"none !important",borderBottom:"none !important","& .MuiBox-root":{backgroundColor:"transparent !important"},"& .MuiFormControl-root":{backgroundColor:"transparent !important"},"& .MuiInputBase-root":{backgroundColor:"transparent !important"},"& *":{borderBottom:"none !important"}},"& .MuiDataGrid-toolbar":{borderBottom:"none !important"},"& .MuiDataGrid-toolbarFilterList":{border:"none"},"& .MuiDataGrid-withBorderColor":{borderColor:"transparent !important"},"& .MuiDataGrid-columnSeparator":{display:"none"},"& .MuiDataGrid-footerContainer":{display:"none"},"& .MuiDataGrid-filler":{border:"none !important",borderTop:"none !important",borderBottom:"none !important",borderLeft:"none !important",borderRight:"none !important","--rowBorderColor":"none !important"},...c==null?void 0:c.sx}})})}));Qf.displayName="SearchableDataGrid";const F3=F.styled(F.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,r,n;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:a})=>!a,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:a})=>a,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),N3=K.forwardRef((e,t)=>g.jsx(F3,{ref:t,selected:e.selected,...e,color:"secondary",variant:"circular"})),z3={$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"},G3=K.lazy(()=>import("@monaco-editor/react"));let Di=null;async function H3(){if(!Di){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);Di={shiki:await e({langs:[z3],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return Di}const q3=pt(e=>{const t=F.useTheme(),[r,n]=K.useState("dark-plus"),a=t.palette.mode==="dark"?"dark-plus":"light-plus";async function o(s){var c,u;s.languages.register({id:"wandelscript"}),s.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await H3();l(i,s),s.editor.defineTheme(a,((u=(c=t.componentsExt)==null?void 0:c.WandelscriptEditor)==null?void 0:u.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(s),n(a)}return g.jsx(K.Suspense,{fallback:g.jsx(Sc,{}),children:g.jsx(G3,{value:e.code,onMount:(s,i)=>{o(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function Xf(){var t,r,n,a,o,s,i;const e=F.createTheme({palette:{mode:"dark",text:{primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.38)"},primary:{main:"rgba(142, 86, 252, 1)",dark:"rgba(136, 58, 255, 1)",light:"rgba(157, 131, 246, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},secondary:{main:"rgba(255, 255, 255, 1)",dark:"rgba(255, 255, 255, 0.06)",contrastText:"rgba(255, 255, 255, 0.87)"},tertiary:{main:"rgba(100, 255, 218, 1)",dark:"rgba(38, 166, 154, 1)",light:"rgba(167, 255, 235, 1)",contrastText:"rgba(0, 0, 0, 1)"},error:{main:"rgba(239, 83, 80, 1)",dark:"rgba(229, 57, 53, 1)",light:"rgba(239, 154, 154, 1)",contrastText:"rgba(255, 255, 255, 1)"},warning:{main:"rgba(255, 171, 64, 1)",dark:"rgba(255, 145, 0, 1)",light:"rgba(255, 209, 128, 1)",contrastText:"rgba(0, 0, 0, 0.87)"},success:{main:"rgba(38, 166, 154, 1)",dark:"rgba(0, 121, 107, 1)",light:"rgba(128, 203, 196, 1)",contrastText:"rgba(255, 255, 255, 0.87)"},background:{default:"rgba(2, 6, 23, 1)",paper:"rgba(17, 19, 31, 1)"},action:{active:"rgba(255, 255, 255, 0.56)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabledBackground:"rgba(255, 255, 255, 0.12)",focus:"rgba(255, 255, 255, 0.12)",disabled:"rgba(255, 255, 255, 0.38)"},common:{white:"rgba(255, 255, 255, 1)",black:"rgba(0, 0, 0, 1)"},divider:"rgba(255, 255, 255, 0.12)",backgroundPaperElevation:{0:"rgba(17,19,31,1.0)",1:"rgba(20,22,35,1.0)",2:"rgba(23,25,39,1.0)",3:"rgba(26,28,43,1.0)",4:"rgba(29,31,47,1.0)",5:"rgba(32,34,51,1.0)",6:"rgba(35,37,55,1.0)",7:"rgba(38,40,59,1.0)",8:"rgba(41,43,63,1.0)",9:"rgba(44,46,67,1.0)",10:"rgba(47,49,71,1.0)",11:"rgba(50,52,75,1.0)",12:"rgba(53,55,79,1.0)",13:"rgba(56,58,83,1.0)",14:"rgba(59,61,87,1.0)",15:"rgba(62,64,91,1.0)",16:"rgba(57,63,87,1.0)"}},paletteExt:{primary:{hover:"rgba(142, 86, 252, 0.08)",selected:"rgba(142, 86, 252, 0.16)",focus:"rgba(142, 86, 252, 0.12)",focusVisible:"rgba(142, 86, 252, 0.3)",outlineBorder:"rgba(142, 86, 252, 0.5)"},secondary:{tonal:"rgba(255,255,255,0.1)"}}});return{...e,components:{MuiCssBaseline:{styleOverrides:{"html, body, *":{scrollbarWidth:"none",msOverflowStyle:"none"},"html:hover, body:hover, *:hover":{scrollbarWidth:"thin",scrollbarColor:`${e.palette.divider} transparent`}}},MuiButton:{styleOverrides:{root:{textTransform:"none",borderRadius:"10px"}},variants:[{props:{color:"secondary",variant:"contained"},style:{border:`1px solid ${e.palette.divider}`,background:(n=(r=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:r.tonal)==null?void 0:n.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(a=e.palette.backgroundPaperElevation)==null?void 0:a[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(s=(o=e.paletteExt)==null?void 0:o.secondary)==null?void 0:s.tonal}},variants:[{props:{color:"primary"},style:{background:e.palette.primary.main}}]}},componentsExt:{JoggingPanel:{JoggingCartesian:{Axis:{X:{backgroundColor:"rgba(215, 66, 56, 1)",borderColor:"rgba(215, 66, 56, 1)",buttonBackgroundColor:{default:"rgba(241, 77, 66, 1)",pressed:"rgba(138, 41, 35, 1)",hovered:"rgba(241, 77, 66, 1)",disabled:"rgba(241, 77, 66, 1)"},color:"rgba(255, 198, 198, 1)",labelColor:e.palette.text.primary},Y:{backgroundColor:"rgba(20, 151, 108, 1)",borderColor:"rgba(20, 151, 108, 1)",buttonBackgroundColor:{default:"rgba(28, 188, 135, 1)",pressed:"rgba(11, 89, 63, 1)",disabled:"rgba(28, 188, 135, 1)",hovered:"rgba(28, 188, 135, 1)"},color:"rgba(215, 255, 242, 1)",labelColor:e.palette.text.primary},Z:{backgroundColor:"rgba(1, 87, 155, 1)",borderColor:"rgba(1, 87, 155, 1)",buttonBackgroundColor:{default:"rgba(2, 136, 209, 1)",pressed:"rgba(2, 64, 114, 1)",disabled:"rgba(2, 136, 209, 1)",hovered:"rgba(2, 136, 209, 1)"},color:"rgba(210, 239, 255, 1)",labelColor:e.palette.text.primary}}},JoggingJoint:{Joint:{arrowColor:e.palette.text.primary}},VelocitySlider:{sliderLegendColor:e.palette.text.primary}},WandelscriptEditor:{monacoTheme:{base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"#b349a9ff"}],colors:{"editor.background":F.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function J3(){const e=Xf();return e.palette.mode="light",e}function W3(e){var n,a,o,s;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((a=e.palette)==null?void 0:a.mode)!=="dark"&&(t=!(typeof window<"u"&&((s=(o=window.matchMedia)==null?void 0:o.call(window,"(prefers-color-scheme: light)"))==null?void 0:s.matches)));const r=t?Xf():J3();return ep(r,e)}exports.CycleTimer=wm;exports.JoggingCartesianAxisControl=rl;exports.JoggingJointRotationControl=Am;exports.JoggingPanel=G5;exports.JoggingStore=Gs;exports.LoadingCover=Sc;exports.LoadingErrorMessage=xf;exports.NoMotionGroupModal=Y5;exports.PoseCartesianValues=q5;exports.PoseJointValues=J5;exports.PresetEnvironment=Li;exports.ProgramControl=K5;exports.ProgramState=on;exports.ProgramStateIndicator=Cl;exports.Robot=Yf;exports.RobotCard=l3;exports.RobotListItem=h3;exports.RobotSetupReadinessIndicator=Kf;exports.RobotSetupReadinessState=_c;exports.SafetyBar=U3;exports.SafetyZonesRenderer=Sg;exports.SearchableDataGrid=Qf;exports.SelectableFab=N3;exports.SupportedRobot=Wf;exports.TrajectoryRenderer=Og;exports.ValueInterpolator=gc;exports.VelocitySlider=Nf;exports.VelocitySliderLabel=Rc;exports.WandelscriptEditor=q3;exports.createNovaMuiTheme=W3;exports.defaultAxisConfig=p3;exports.defaultGetModel=Ac;exports.i18n=fc;exports.useAnimationFrame=Pn;exports.useAutorun=Cm;exports.useInterpolation=Om;exports.useMounted=_s;exports.useReaction=Pm;
|
|
155
155
|
//# sourceMappingURL=index.cjs.map
|