@wandelbots/wandelbots-js-react-components 2.58.0 → 2.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/robots/RobotAnimator.d.ts.map +1 -1
- package/dist/index.cjs +55 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12973 -11075
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/robots/RobotAnimator.tsx +23 -8
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var ny=Object.create;var Ai=Object.defineProperty;var oy=Object.getOwnPropertyDescriptor;var sy=Object.getOwnPropertyNames;var ay=Object.getPrototypeOf,iy=Object.prototype.hasOwnProperty;var ly=(e,t,r)=>t in e?Ai(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var cy=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of sy(t))!iy.call(e,o)&&o!==r&&Ai(e,o,{get:()=>t[o],enumerable:!(n=oy(t,o))||n.enumerable});return e};var Ri=(e,t,r)=>(r=e!=null?ny(ay(e)):{},cy(t||!e||!e.__esModule?Ai(r,"default",{value:e,enumerable:!0}):r,e));var oe=(e,t,r)=>ly(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),Et=require("three"),Op=require("three-stdlib"),ft=require("@react-three/drei"),Hs=require("@react-three/fiber"),R=require("@mui/material"),ye=require("mobx-react-lite"),we=require("react-i18next"),uy=require("i18next"),dy=require("i18next-browser-languagedetector"),hy=require("@mui/x-charts"),v=require("prop-types"),py=require("@emotion/react"),my=require("@emotion/styled"),At=require("@mui/x-data-grid"),$e=require("mobx"),rc=require("lodash-es"),Lr=require("@wandelbots/nova-js"),Zt=require("@mui/icons-material"),fy=require("react-error-boundary");function Tp(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 F=Tp(G),Se=Tp(Et);function gy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var os={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 vu;function yy(){if(vu)return Kn;vu=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var i in o)i!=="key"&&(s[i]=o[i])}else s=o;return o=s.ref,{$$typeof:e,type:n,key:a,ref:o!==void 0?o:null,props:s}}return Kn.Fragment=t,Kn.jsx=r,Kn.jsxs=r,Kn}var Qn={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,20 +14,20 @@
|
|
|
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 Su;function by(){return Su||(Su=1,process.env.NODE_ENV!=="production"&&function(){function e(W){if(W==null)return null;if(typeof W=="function")return W.$$typeof===x?null:W.displayName||W.name||null;if(typeof W=="string")return W;switch(W){case m:return"Fragment";case b:return"Profiler";case y:return"StrictMode";case A:return"Suspense";case O:return"SuspenseList";case _:return"Activity"}if(typeof W=="object")switch(typeof W.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),W.$$typeof){case f:return"Portal";case w:return(W.displayName||"Context")+".Provider";case C:return(W._context.displayName||"Context")+".Consumer";case T:var Z=W.render;return W=W.displayName,W||(W=Z.displayName||Z.name||"",W=W!==""?"ForwardRef("+W+")":"ForwardRef"),W;case P:return Z=W.displayName||null,Z!==null?Z:e(W.type)||"Memo";case E:Z=W._payload,W=W._init;try{return e(W(Z))}catch{}}return null}function t(W){return""+W}function r(W){try{t(W);var Z=!1}catch{Z=!0}if(Z){Z=console;var pe=Z.error,Ee=typeof Symbol=="function"&&Symbol.toStringTag&&W[Symbol.toStringTag]||W.constructor.name||"Object";return pe.call(Z,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Ee),t(W)}}function n(W){if(W===m)return"<>";if(typeof W=="object"&&W!==null&&W.$$typeof===E)return"<...>";try{var Z=e(W);return Z?"<"+Z+">":"<...>"}catch{return"<...>"}}function o(){var W=N.A;return W===null?null:W.getOwner()}function s(){return Error("react-stack-top-frame")}function a(W){if(M.call(W,"key")){var Z=Object.getOwnPropertyDescriptor(W,"key").get;if(Z&&Z.isReactWarning)return!1}return W.key!==void 0}function i(W,Z){function pe(){ne||(ne=!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))}pe.isReactWarning=!0,Object.defineProperty(W,"key",{get:pe,configurable:!0})}function l(){var W=e(this.type);return re[W]||(re[W]=!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.")),W=this.props.ref,W!==void 0?W:null}function c(W,Z,pe,Ee,qe,Te,ht,at){return pe=Te.ref,W={$$typeof:p,type:W,key:Z,props:Te,_owner:qe},(pe!==void 0?pe:null)!==null?Object.defineProperty(W,"ref",{enumerable:!1,get:l}):Object.defineProperty(W,"ref",{enumerable:!1,value:null}),W._store={},Object.defineProperty(W._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(W,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(W,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ht}),Object.defineProperty(W,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:at}),Object.freeze&&(Object.freeze(W.props),Object.freeze(W)),W}function u(W,Z,pe,Ee,qe,Te,ht,at){var xe=Z.children;if(xe!==void 0)if(Ee)if(H(xe)){for(Ee=0;Ee<xe.length;Ee++)d(xe[Ee]);Object.freeze&&Object.freeze(xe)}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(xe);if(M.call(Z,"key")){xe=e(W);var X=Object.keys(Z).filter(function(le){return le!=="key"});Ee=0<X.length?"{key: someKey, "+X.join(": ..., ")+": ...}":"{key: someKey}",me[xe+Ee]||(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} />`,
|
|
23
|
-
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}}","CycleTimer.Time.lb":"{{time}}","CycleTimer.Error.lb":"Fehler","CycleTimer.WaitingForCycle.lb":"Warten auf Programmzyklus","CycleTimer.CycleTime.lb":"Zykluszeit","CycleTimer.Measuring.lb":"wird gemessen...","CycleTimer.Determined.lb":"bestimmt","Timer.error":"Fehler","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Weiter","ProgramControl.Retry.bt":"Wiederholen","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stopp","ProgramStateIndicator.Preparing.lb":"Vorbereitung","ProgramStateIndicator.Starting.lb":"Startet","ProgramStateIndicator.Running.lb":"In Betrieb","ProgramStateIndicator.Pausing.lb":"Pausiert","ProgramStateIndicator.Stopping.lb":"Stoppt","ProgramStateIndicator.Completed.lb":"Abgeschlossen","ProgramStateIndicator.Failed.lb":"Fehlgeschlagen","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.CellOpen.lb":"Zelle offen","RobotSetupReadinessIndicator.EStop.lb":"Not-Stopp","RobotSetupReadinessIndicator.ManualMode.lb":"Manueller Modus","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Voraussetzung nicht erfüllt","RobotCard.Runtime.lb":"Laufzeit","RobotCard.DriveToHome.bt":"Zur Home-Position fahren"},Dg={"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}}","CycleTimer.Time.lb":"{{time}}","CycleTimer.Error.lb":"Error","CycleTimer.WaitingForCycle.lb":"Waiting for program cycle","CycleTimer.CycleTime.lb":"Cycle Time","CycleTimer.Measuring.lb":"measuring...","CycleTimer.Determined.lb":"determined","Timer.error":"Error","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Resume","ProgramControl.Retry.bt":"Retry","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stop","ProgramStateIndicator.Preparing.lb":"Preparing","ProgramStateIndicator.Starting.lb":"Starting","ProgramStateIndicator.Running.lb":"Running","ProgramStateIndicator.Pausing.lb":"Pausing","ProgramStateIndicator.Stopping.lb":"Stopping","ProgramStateIndicator.Completed.lb":"Completed","ProgramStateIndicator.Failed.lb":"Failed","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.CellOpen.lb":"Cell open","RobotSetupReadinessIndicator.EStop.lb":"E-Stop","RobotSetupReadinessIndicator.ManualMode.lb":"Manual mode","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Precondition not fulfilled","RobotCard.Runtime.lb":"Runtime","RobotCard.DriveToHome.bt":"Drive to Home"},El=xg.createInstance();El.use(vg).init({supportedLngs:["en","de"],resources:{en:{translations:Dg},de:{translations:Ug}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function Be(e){return r=>g.jsx(Lg,{children:g.jsx(e,{...r})})}const Lg=({children:e})=>g.jsx(Se.I18nextProvider,{i18n:El,children:e}),Bg=e=>g.jsx(P.SvgIcon,{...e,viewBox:"0 0 10 8",children:g.jsx("path",{d:"M8.825 0.9125L5 4.72917L1.175 0.9125L0 2.0875L5 7.0875L10 2.0875L8.825 0.9125Z",fill:"currentColor",fillOpacity:"0.56"})}),Fg=Be(ge.observer(e=>{const{appIcon:t,appName:r,apps:n=[],onAppSelect:a,disabled:o=!1,sx:s}=e,[i,l]=z.useState(null),c=!!i,u=p=>{l(p.currentTarget)},d=()=>{l(null)},h=p=>{d(),p.onClick?p.onClick():p.href&&(window.location.href=p.href),a==null||a(p)};return g.jsxs(g.Fragment,{children:[g.jsx(P.AppBar,{position:"static",sx:{boxShadow:"none",backgroundImage:"none","& .MuiAppBar-root":{backgroundImage:"none",backgroundColor:"transparent"},...s},children:g.jsxs(P.Toolbar,{sx:{minHeight:"62px !important"},children:[g.jsx(P.Box,{sx:{mr:1,display:"flex",alignItems:"center"},children:t}),g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[g.jsx(P.Typography,{component:"h1",sx:{fontWeight:"bold",fontSize:"1rem"},children:r}),n.length>0&&g.jsx(P.IconButton,{color:"inherit","aria-label":"switch app","aria-controls":"app-menu","aria-haspopup":"true",onClick:u,disabled:o,sx:{ml:1,width:28,height:28,borderRadius:"6px",padding:0,backgroundColor:p=>P.alpha(p.palette.common.white,.1),opacity:1,"&:hover":{backgroundColor:p=>P.alpha(p.palette.common.white,.16)},"& .MuiSvgIcon-root":{fontSize:"8px",width:"8px",height:"6px"}},children:g.jsx(Bg,{})})]})]})}),g.jsx(P.Backdrop,{open:c,onClick:d,sx:{backdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.3)",zIndex:p=>p.zIndex.modal-1}}),g.jsx(P.Menu,{id:"app-menu",anchorEl:i,open:c,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:p=>p.zIndex.modal,"& .MuiPaper-root":{minWidth:200,mt:1}},children:n.map(p=>g.jsxs(P.MenuItem,{onClick:()=>h(p),children:[g.jsx(P.Box,{sx:{display:"flex",alignItems:"center"},children:p.icon}),g.jsx(P.Typography,{variant:"body1",sx:{ml:2},children:p.name})]},p.id))})]})}));function K(){return K=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},K.apply(null,arguments)}function dr(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 es(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 zh(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=zh(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Pt(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=zh(e))&&(n&&(n+=" "),n+=t);return n}function hr(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 _l="$$material";function Ng(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 zg={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 Gg(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Hg=/[A-Z]|^ms/g,qg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Gh=function(t){return t.charCodeAt(1)===45},Bc=function(t){return t!=null&&typeof t!="boolean"},ei=Gg(function(e){return Gh(e)?e:e.replace(Hg,"-$&").toLowerCase()}),Fc=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(qg,function(n,a,o){return cr={name:a,styles:o,next:cr},a})}return zg[t]!==1&&!Gh(t)&&typeof r=="number"&&r!==0?r+"px":r};function Ao(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 cr={name:a.name,styles:a.styles,next:cr},a.name;var o=r;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)cr={name:s.name,styles:s.styles,next:cr},s=s.next;var i=o.styles+";";return i}return Wg(e,t,r)}}var l=r;return l}function Wg(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a<r.length;a++)n+=Ao(e,t,r[a])+";";else for(var o in r){var s=r[o];if(typeof s!="object"){var i=s;Bc(i)&&(n+=ei(o)+":"+Fc(o,i)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)Bc(s[l])&&(n+=ei(o)+":"+Fc(o,s[l])+";");else{var c=Ao(e,t,s);switch(o){case"animation":case"animationName":{n+=ei(o)+":"+c+";";break}default:n+=o+"{"+c+"}"}}}return n}var Nc=/label:\s*([^\s;{]+)\s*(;|$)/g,cr;function Jg(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="";cr=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,a+=Ao(r,t,o);else{var s=o;a+=s[0]}for(var i=1;i<e.length;i++)if(a+=Ao(r,t,e[i]),n){var l=o;a+=l[i]}Nc.lastIndex=0;for(var c="",u;(u=Nc.exec(a))!==null;)c+="-"+u[1];var d=Ng(a)+c;return{name:d,styles:a,next:cr}}/**
|
|
22
|
+
<%s key={someKey} {...props} />`,Ee,xe,X,xe),me[xe+Ee]=!0)}if(xe=null,pe!==void 0&&(r(pe),xe=""+pe),a(Z)&&(r(Z.key),xe=""+Z.key),"key"in Z){pe={};for(var se in Z)se!=="key"&&(pe[se]=Z[se])}else pe=Z;return xe&&i(pe,typeof W=="function"?W.displayName||W.name||"Unknown":W),c(W,xe,Te,qe,o(),pe,ht,at)}function d(W){typeof W=="object"&&W!==null&&W.$$typeof===p&&W._store&&(W._store.validated=1)}var h=G,p=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),w=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),x=Symbol.for("react.client.reference"),N=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.prototype.hasOwnProperty,H=Array.isArray,z=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(W){return W()}};var ne,re={},he=h["react-stack-bottom-frame"].bind(h,s)(),te=z(n(s)),me={};Qn.Fragment=m,Qn.jsx=function(W,Z,pe,Ee,qe){var Te=1e4>N.recentlyCreatedOwnerStacks++;return u(W,Z,pe,!1,Ee,qe,Te?Error("react-stack-top-frame"):he,Te?z(n(W)):te)},Qn.jsxs=function(W,Z,pe,Ee,qe){var Te=1e4>N.recentlyCreatedOwnerStacks++;return u(W,Z,pe,!0,Ee,qe,Te?Error("react-stack-top-frame"):he,Te?z(n(W)):te)}}()),Qn}var wu;function xy(){return wu||(wu=1,process.env.NODE_ENV==="production"?os.exports=yy():os.exports=by()),os.exports}var g=xy();function vy(e){switch(e.shape_type){case"convex_hull":return new Op.ConvexGeometry(e.vertices.map(r=>new Se.Vector3(r[0]/1e3,r[1]/1e3,r[2]/1e3)));case"box":return new Se.BoxGeometry(e.size_x/1e3,e.size_y/1e3,e.size_z/1e3);case"sphere":return new Se.SphereGeometry(e.radius/1e3);case"capsule":return new Se.CapsuleGeometry(e.radius/1e3,e.cylinder_height/1e3);case"cylinder":return new Se.CylinderGeometry(e.radius/1e3,e.radius/1e3,e.height/1e3);case"rectangle":return new Se.BoxGeometry(e.size_x/1e3,e.size_y/1e3,0);default:return console.warn(`${e.shape_type} is not supported`),new Se.BufferGeometry}}function Sy({name:e,collider:t,children:r}){var s,a;const n=((s=t.pose)==null?void 0:s.position)??[0,0,0],o=((a=t.pose)==null?void 0:a.orientation)??[0,0,0];return t.margin&&console.warn(`${e} margin is not supported`),g.jsx("mesh",{name:e,position:new Se.Vector3(n[0],n[1],n[2]).divideScalar(1e3),rotation:new Se.Euler(o[0],o[1],o[2],"XYZ"),geometry:vy(t.shape),children:r})}function wy({name:e,colliders:t,meshChildrenProvider:r,...n}){return g.jsx("group",{name:e,...n,children:Object.entries(t).map(([o,s])=>g.jsx(Sy,{name:o,collider:s,children:r(o,s)},o))})}function Cy({scene:e,meshChildrenProvider:t}){const r=e.colliders;return g.jsx("group",{children:r&&g.jsx(wy,{meshChildrenProvider:t,colliders:r})})}function fl(){return g.jsx(ft.Environment,{children:g.jsx(Oy,{})})}function Oy({positions:e=[2,0,2,0,2,0,2,0]}){return g.jsxs(g.Fragment,{children:[g.jsx(ft.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(ft.Lightformer,{form:"circle",intensity:5,rotation:[Math.PI/2,0,0],position:[t,4,r*4],scale:[3,1,1]},r))})}),g.jsx(ft.Lightformer,{intensity:40,"rotation-y":Math.PI/2,position:[-5,1,-1],scale:[20,.1,1]}),g.jsx(ft.Lightformer,{intensity:20,"rotation-y":-Math.PI,position:[-5,-2,-1],scale:[20,.1,1]}),g.jsx(ft.Lightformer,{"rotation-y":Math.PI/2,position:[-5,-1,-1],scale:[20,.5,1],intensity:5}),g.jsx(ft.Lightformer,{"rotation-y":-Math.PI/2,position:[10,1,0],scale:[20,1,1],intensity:10}),g.jsx(ft.Lightformer,{form:"ring",color:"white",intensity:5,scale:10,position:[-15,4,-18],target:[0,0,0]})]})}function Ty(e){if(e.length<3)return console.log("Not enough vertices to define a plane"),{isCoplanar:!1};const t=new Se.Vector3(e[0].x,e[0].y,e[0].z),r=new Se.Vector3(e[1].x,e[1].y,e[1].z),n=new Se.Vector3(e[2].x,e[2].y,e[2].z),o=new Se.Vector3().subVectors(r,t),s=new Se.Vector3().subVectors(n,t),a=new Se.Vector3().crossVectors(o,s).normalize();for(let i=3;i<e.length;i++){const l=new Se.Vector3(e[i].x,e[i].y,e[i].z),c=new Se.Vector3().subVectors(l,t),u=a.dot(c);if(Math.abs(u)>1e-6)return console.log("Vertices are not on the same plane"),{isCoplanar:!1}}return{isCoplanar:!0,normal:a}}function Py({safetyZones:e,...t}){return g.jsx("group",{...t,children:e.map((r,n)=>{let o=[];return r.geometry&&(r.geometry.compound?o=r.geometry.compound.child_geometries:r.geometry.convex_hull&&(o=[r.geometry])),o.map((s,a)=>{if(!s.convex_hull)return null;const i=s.convex_hull.vertices.map(u=>new Se.Vector3(u.x/1e3,u.y/1e3,u.z/1e3)),l=Ty(i);if(l.isCoplanar&&l.normal){const d=new Se.Vector3().addVectors(i[0],l.normal.multiplyScalar(1e-4));i.push(d)}let c;try{c=new Op.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:-a},n)},`${n}-${a}`)})})})}function Ay({trajectory:e,...t}){var n;const r=((n=e.trajectory)==null?void 0:n.map(o=>o.tcp_pose?new Se.Vector3(o.tcp_pose.position.x/1e3,o.tcp_pose.position.z/1e3,-o.tcp_pose.position.y/1e3):null).filter(o=>o!==null))||[];return g.jsx("group",{...t,children:r.length>0&&g.jsx(ft.Line,{points:r,lineWidth:3,polygonOffset:!0,polygonOffsetFactor:10,polygonOffsetUnits:10})})}const Ry={"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.
|
|
23
|
+
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}}","CycleTimer.Time.lb":"{{time}}","CycleTimer.Error.lb":"Fehler","CycleTimer.WaitingForCycle.lb":"Warten auf Programmzyklus","CycleTimer.CycleTime.lb":"Zykluszeit","CycleTimer.Measuring.lb":"wird gemessen...","CycleTimer.Determined.lb":"bestimmt","Timer.error":"Fehler","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Weiter","ProgramControl.Retry.bt":"Wiederholen","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stopp","ProgramStateIndicator.Preparing.lb":"Vorbereitung","ProgramStateIndicator.Starting.lb":"Startet","ProgramStateIndicator.Running.lb":"In Betrieb","ProgramStateIndicator.Pausing.lb":"Pausiert","ProgramStateIndicator.Stopping.lb":"Stoppt","ProgramStateIndicator.Completed.lb":"Abgeschlossen","ProgramStateIndicator.Failed.lb":"Fehlgeschlagen","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.CellOpen.lb":"Zelle offen","RobotSetupReadinessIndicator.EStop.lb":"Not-Stopp","RobotSetupReadinessIndicator.ManualMode.lb":"Manueller Modus","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Voraussetzung nicht erfüllt","RobotCard.Runtime.lb":"Laufzeit","RobotCard.DriveToHome.bt":"Zur Home-Position fahren"},Ey={"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}}","CycleTimer.Time.lb":"{{time}}","CycleTimer.Error.lb":"Error","CycleTimer.WaitingForCycle.lb":"Waiting for program cycle","CycleTimer.CycleTime.lb":"Cycle Time","CycleTimer.Measuring.lb":"measuring...","CycleTimer.Determined.lb":"determined","Timer.error":"Error","ProgramControl.Start.bt":"Start","ProgramControl.Resume.bt":"Resume","ProgramControl.Retry.bt":"Retry","ProgramControl.Pause.bt":"Pause","ProgramControl.Stop.bt":"Stop","ProgramStateIndicator.Preparing.lb":"Preparing","ProgramStateIndicator.Starting.lb":"Starting","ProgramStateIndicator.Running.lb":"Running","ProgramStateIndicator.Pausing.lb":"Pausing","ProgramStateIndicator.Stopping.lb":"Stopping","ProgramStateIndicator.Completed.lb":"Completed","ProgramStateIndicator.Failed.lb":"Failed","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.CellOpen.lb":"Cell open","RobotSetupReadinessIndicator.EStop.lb":"E-Stop","RobotSetupReadinessIndicator.ManualMode.lb":"Manual mode","RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb":"Precondition not fulfilled","RobotCard.Runtime.lb":"Runtime","RobotCard.DriveToHome.bt":"Drive to Home"},nc=uy.createInstance();nc.use(dy).init({supportedLngs:["en","de"],resources:{en:{translations:Ey},de:{translations:Ry}},ns:["translations"],defaultNS:"translations",detection:{order:["navigator","htmlTag"]}});function Fe(e){return r=>g.jsx(Iy,{children:g.jsx(e,{...r})})}const Iy=({children:e})=>g.jsx(we.I18nextProvider,{i18n:nc,children:e}),_y=e=>g.jsx(R.SvgIcon,{...e,viewBox:"0 0 10 8",children:g.jsx("path",{d:"M8.825 0.9125L5 4.72917L1.175 0.9125L0 2.0875L5 7.0875L10 2.0875L8.825 0.9125Z",fill:"currentColor",fillOpacity:"0.56"})}),My=Fe(ye.observer(e=>{const{appIcon:t,appName:r,apps:n=[],onAppSelect:o,disabled:s=!1,sx:a}=e,[i,l]=G.useState(null),c=!!i,u=p=>{l(p.currentTarget)},d=()=>{l(null)},h=p=>{d(),p.onClick?p.onClick():p.href&&(window.location.href=p.href),o==null||o(p)};return g.jsxs(g.Fragment,{children:[g.jsx(R.AppBar,{position:"static",sx:{boxShadow:"none",backgroundImage:"none","& .MuiAppBar-root":{backgroundImage:"none",backgroundColor:"transparent"},...a},children:g.jsxs(R.Toolbar,{sx:{minHeight:"62px !important"},children:[g.jsx(R.Box,{sx:{mr:1,display:"flex",alignItems:"center"},children:t}),g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",flexGrow:1},children:[g.jsx(R.Typography,{component:"h1",sx:{fontWeight:"bold",fontSize:"1rem"},children:r}),n.length>0&&g.jsx(R.IconButton,{color:"inherit","aria-label":"switch app","aria-controls":"app-menu","aria-haspopup":"true",onClick:u,disabled:s,sx:{ml:1,width:28,height:28,borderRadius:"6px",padding:0,backgroundColor:p=>R.alpha(p.palette.common.white,.1),opacity:1,"&:hover":{backgroundColor:p=>R.alpha(p.palette.common.white,.16)},"& .MuiSvgIcon-root":{fontSize:"8px",width:"8px",height:"6px"}},children:g.jsx(_y,{})})]})]})}),g.jsx(R.Backdrop,{open:c,onClick:d,sx:{backdropFilter:"blur(4px)",backgroundColor:"rgba(0, 0, 0, 0.3)",zIndex:p=>p.zIndex.modal-1}}),g.jsx(R.Menu,{id:"app-menu",anchorEl:i,open:c,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{zIndex:p=>p.zIndex.modal,"& .MuiPaper-root":{minWidth:200,mt:1}},children:n.map(p=>g.jsxs(R.MenuItem,{onClick:()=>h(p),children:[g.jsx(R.Box,{sx:{display:"flex",alignItems:"center"},children:p.icon}),g.jsx(R.Typography,{variant:"body1",sx:{ml:2},children:p.name})]},p.id))})]})}));function Q(){return Q=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},Q.apply(null,arguments)}function qt(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 Lo(e,t,r=void 0){const n={};for(const o in e){const s=e[o];let a="",i=!0;for(let l=0;l<s.length;l+=1){const c=s[l];c&&(a+=(i===!0?"":" ")+t(c),i=!1,r&&r[c]&&(a+=" "+r[c]))}n[o]=a}return n}function Pp(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Pp(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function nt(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Pp(e))&&(n&&(n+=" "),n+=t);return n}function xr(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 oc="$$material";function Vy(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=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(o){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 ky={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 jy(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var $y=/[A-Z]|^ms/g,Dy=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ap=function(t){return t.charCodeAt(1)===45},Cu=function(t){return t!=null&&typeof t!="boolean"},Ei=jy(function(e){return Ap(e)?e:e.replace($y,"-$&").toLowerCase()}),Ou=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Dy,function(n,o,s){return yr={name:o,styles:s,next:yr},o})}return ky[t]!==1&&!Ap(t)&&typeof r=="number"&&r!==0?r+"px":r};function qs(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 o=r;if(o.anim===1)return yr={name:o.name,styles:o.styles,next:yr},o.name;var s=r;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)yr={name:a.name,styles:a.styles,next:yr},a=a.next;var i=s.styles+";";return i}return Uy(e,t,r)}}var l=r;return l}function Uy(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=qs(e,t,r[o])+";";else for(var s in r){var a=r[s];if(typeof a!="object"){var i=a;Cu(i)&&(n+=Ei(s)+":"+Ou(s,i)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var l=0;l<a.length;l++)Cu(a[l])&&(n+=Ei(s)+":"+Ou(s,a[l])+";");else{var c=qs(e,t,a);switch(s){case"animation":case"animationName":{n+=Ei(s)+":"+c+";";break}default:n+=s+"{"+c+"}"}}}return n}var Tu=/label:\s*([^\s;{]+)\s*(;|$)/g,yr;function Ly(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,o="";yr=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,o+=qs(r,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=qs(r,t,e[i]),n){var l=s;o+=l[i]}Tu.lastIndex=0;for(var c="",u;(u=Tu.exec(o))!==null;)c+="-"+u[1];var d=Vy(o)+c;return{name:d,styles:o,next:yr}}/**
|
|
24
24
|
* @mui/styled-engine v7.1.1
|
|
25
25
|
*
|
|
26
26
|
* @license MIT
|
|
27
27
|
* This source code is licensed under the MIT license found in the
|
|
28
28
|
* LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/function
|
|
30
|
-
`)):n.some(
|
|
29
|
+
*/function By(e,t){const r=my(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
30
|
+
`)):n.some(s=>s===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}function Fy(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Pu=[];function Au(e){return Pu[0]=e,Ly(Pu)}var ss={exports:{}},Ce={};/**
|
|
31
31
|
* @license React
|
|
32
32
|
* react-is.production.js
|
|
33
33
|
*
|
|
@@ -35,7 +35,7 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
|
|
|
35
35
|
*
|
|
36
36
|
* This source code is licensed under the MIT license found in the
|
|
37
37
|
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/var
|
|
38
|
+
*/var Ru;function Ny(){if(Ru)return Ce;Ru=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=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 y=m.$$typeof;switch(y){case e:switch(m=m.type,m){case r:case o:case n:case l:case c:case h:return m;default:switch(m=m&&m.$$typeof,m){case a:case i:case d:case u:return m;case s:return m;default:return y}}case t:return y}}}return Ce.ContextConsumer=s,Ce.ContextProvider=a,Ce.Element=e,Ce.ForwardRef=i,Ce.Fragment=r,Ce.Lazy=d,Ce.Memo=u,Ce.Portal=t,Ce.Profiler=o,Ce.StrictMode=n,Ce.Suspense=l,Ce.SuspenseList=c,Ce.isContextConsumer=function(m){return f(m)===s},Ce.isContextProvider=function(m){return f(m)===a},Ce.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Ce.isForwardRef=function(m){return f(m)===i},Ce.isFragment=function(m){return f(m)===r},Ce.isLazy=function(m){return f(m)===d},Ce.isMemo=function(m){return f(m)===u},Ce.isPortal=function(m){return f(m)===t},Ce.isProfiler=function(m){return f(m)===o},Ce.isStrictMode=function(m){return f(m)===n},Ce.isSuspense=function(m){return f(m)===l},Ce.isSuspenseList=function(m){return f(m)===c},Ce.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===o||m===n||m===l||m===c||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===u||m.$$typeof===a||m.$$typeof===s||m.$$typeof===i||m.$$typeof===p||m.getModuleId!==void 0)},Ce.typeOf=f,Ce}var Oe={};/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-is.development.js
|
|
41
41
|
*
|
|
@@ -43,15 +43,15 @@ Bei einem physischen Roboter bedeutet dies im Allgemeinen, dass ein Freigabescha
|
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/var
|
|
47
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:
|
|
46
|
+
*/var Eu;function zy(){return Eu||(Eu=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var y=m.$$typeof;switch(y){case t:switch(m=m.type,m){case n:case s:case o: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 a:return m;default:return y}}case r:return y}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=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");Oe.ContextConsumer=a,Oe.ContextProvider=i,Oe.Element=t,Oe.ForwardRef=l,Oe.Fragment=n,Oe.Lazy=h,Oe.Memo=d,Oe.Portal=r,Oe.Profiler=s,Oe.StrictMode=o,Oe.Suspense=c,Oe.SuspenseList=u,Oe.isContextConsumer=function(m){return e(m)===a},Oe.isContextProvider=function(m){return e(m)===i},Oe.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Oe.isForwardRef=function(m){return e(m)===l},Oe.isFragment=function(m){return e(m)===n},Oe.isLazy=function(m){return e(m)===h},Oe.isMemo=function(m){return e(m)===d},Oe.isPortal=function(m){return e(m)===r},Oe.isProfiler=function(m){return e(m)===s},Oe.isStrictMode=function(m){return e(m)===o},Oe.isSuspense=function(m){return e(m)===c},Oe.isSuspenseList=function(m){return e(m)===u},Oe.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===s||m===o||m===c||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===d||m.$$typeof===i||m.$$typeof===a||m.$$typeof===l||m.$$typeof===f||m.getModuleId!==void 0)},Oe.typeOf=e}()),Oe}var Iu;function Gy(){return Iu||(Iu=1,process.env.NODE_ENV==="production"?ss.exports=Ny():ss.exports=zy()),ss.exports}var Ws=Gy();function Ft(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 Rp(e){if(F.isValidElement(e)||Ws.isValidElementType(e)||!Ft(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Rp(e[r])}),t}function ot(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Ft(e)&&Ft(t)&&Object.keys(t).forEach(o=>{F.isValidElement(t[o])||Ws.isValidElementType(t[o])?n[o]=t[o]:Ft(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Ft(e[o])?n[o]=ot(e[o],t[o],r):r.clone?n[o]=Ft(t[o])?Rp(t[o]):t[o]:n[o]=t[o]}),n}const Hy=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 qy(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...o}=e,s=Hy(t),a=Object.keys(s);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=a.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r}) and (max-width:${(f!==-1&&typeof t[a[f]]=="number"?t[a[f]]:p)-n/100}${r})`}function u(h){return a.indexOf(h)+1<a.length?c(h,a[a.indexOf(h)+1]):i(h)}function d(h){const p=a.indexOf(h);return p===0?i(a[1]):p===a.length-1?l(a[p]):c(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:a,values:s,up:i,down:l,between:c,only:u,not:d,unit:r,...o}}function Wy(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,o)=>{var a,i;const s=/min-width:\s*([0-9.]+)/;return+(((a=n.match(s))==null?void 0:a[1])||0)-+(((i=o.match(s))==null?void 0:i[1])||0)});return r.length?r.reduce((n,o)=>{const s=t[o];return delete n[o],n[o]=s,n},{...t}):t}function Jy(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function Yy(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>\`.
|
|
47
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:xr(18,`(${t})`));return null}const[,n,o]=r,s=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(s)}function Ky(e){const t=(s,a)=>s.replace("@media",a?`@container ${a}`:"@container");function r(s,a){s.up=(...i)=>t(e.breakpoints.up(...i),a),s.down=(...i)=>t(e.breakpoints.down(...i),a),s.between=(...i)=>t(e.breakpoints.between(...i),a),s.only=(...i)=>t(e.breakpoints.only(...i),a),s.not=(...i)=>{const l=t(e.breakpoints.not(...i),a);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={},o=s=>(r(n,s),n);return r(o),{...e,containerQueries:o}}const Qy={borderRadius:4},wr=process.env.NODE_ENV!=="production"?v.oneOfType([v.number,v.string,v.object,v.array]):{};function yo(e,t){return t?ot(e,t,{clone:!1}):e}const wa={xs:0,sm:600,md:900,lg:1200,xl:1536},_u={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${wa[e]}px)`},Xy={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:wa[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Vt(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||_u;return t.reduce((a,i,l)=>(a[s.up(s.keys[l])]=r(t[l]),a),{})}if(typeof t=="object"){const s=n.breakpoints||_u;return Object.keys(t).reduce((a,i)=>{if(Jy(s.keys,i)){const l=Yy(n.containerQueries?n:Xy,i);l&&(a[l]=r(t[i],i))}else if(Object.keys(s.values||wa).includes(i)){const l=s.up(i);a[l]=r(t[i],i)}else{const l=i;a[l]=t[l]}return a},{})}return r(t)}function Ep(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function Ip(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function Zy(e,...t){const r=Ep(e),n=[r,...t].reduce((o,s)=>ot(o,s),{});return Ip(Object.keys(r),n)}function e0(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((o,s)=>{s<e.length&&(r[o]=!0)}):n.forEach(o=>{e[o]!=null&&(r[o]=!0)}),r}function Ii({values:e,breakpoints:t,base:r}){const n=r||e0(e,t),o=Object.keys(n);if(o.length===0)return e;let s;return o.reduce((a,i,l)=>(Array.isArray(e)?(a[i]=e[l]!=null?e[l]:e[s],s=l):typeof e=="object"?(a[i]=e[i]!=null?e[i]:e[s],s=i):a[i]=e,a),{})}function rt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":xr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ca(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function Js(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=Ca(e,r)||n,t&&(o=t(o,n,e)),o}function Le(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,s=a=>{if(a[t]==null)return null;const i=a[t],l=a.theme,c=Ca(l,n)||{};return Vt(a,i,d=>{let h=Js(c,o,d);return d===h&&typeof d=="string"&&(h=Js(c,o,`${t}${d==="default"?"":rt(d)}`,d)),r===!1?h:{[r]:h}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:wr}:{},s.filterProps=[t],s}function t0(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const r0={m:"margin",p:"padding"},n0={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Mu={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},o0=t0(e=>{if(e.length>2)if(Mu[e])e=Mu[e];else return[e];const[t,r]=e.split(""),n=r0[t],o=n0[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),Oa=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ta=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],s0=[...Oa,...Ta];function Bo(e,t,r,n){const o=Ca(e,t,!0)??r;return typeof o=="number"||typeof o=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${s}.`),typeof o=="string"?o.startsWith("var(")&&s===0?0:o.startsWith("var(")&&s===1?o:`calc(${s} * ${o})`:o*s):Array.isArray(o)?s=>{if(typeof s=="string")return s;const a=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(a)?a>o.length-1&&console.error([`MUI: The value provided (${a}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${a} > ${o.length-1}, you need to add the missing values.`].join(`
|
|
48
48
|
`)):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(`
|
|
49
|
-
`)));const i=a
|
|
50
|
-
`)),()=>{})}function os(e){return Ta(e,"spacing",8,"spacing")}function Ar(e,t){return typeof t=="string"||t==null?t:e(t)}function f0(e,t){return r=>e.reduce((n,a)=>(n[a]=Ar(t,r),n),{})}function g0(e,t,r,n){if(!t.includes(r))return null;const a=p0(r),o=f0(a,n),s=e[r];return Rt(e,s,o)}function Jh(e,t){const r=os(e.theme);return Object.keys(e).map(n=>g0(e,t,n,r)).reduce(aa,{})}function $e(e){return Jh(e,ns)}$e.propTypes=process.env.NODE_ENV!=="production"?ns.reduce((e,t)=>(e[t]=fr,e),{}):{};$e.filterProps=ns;function Ue(e){return Jh(e,as)}Ue.propTypes=process.env.NODE_ENV!=="production"?as.reduce((e,t)=>(e[t]=fr,e),{}):{};Ue.filterProps=as;process.env.NODE_ENV!=="production"&&m0.reduce((e,t)=>(e[t]=fr,e),{});function Yh(e=8,t=os({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 ss(...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]?aa(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 gt(e){return typeof e!="number"?e:`${e}px solid`}function vt(e,t){return De({prop:e,themeKey:"borders",transform:t})}const y0=vt("border",gt),b0=vt("borderTop",gt),x0=vt("borderRight",gt),v0=vt("borderBottom",gt),S0=vt("borderLeft",gt),w0=vt("borderColor"),C0=vt("borderTopColor"),O0=vt("borderRightColor"),T0=vt("borderBottomColor"),P0=vt("borderLeftColor"),R0=vt("outline",gt),A0=vt("outlineColor"),is=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ta(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Ar(t,n)});return Rt(e,e.borderRadius,r)}return null};is.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:fr}:{};is.filterProps=["borderRadius"];ss(y0,b0,x0,v0,S0,w0,C0,O0,T0,P0,is,R0,A0);const ls=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ta(e.theme,"spacing",8,"gap"),r=n=>({gap:Ar(t,n)});return Rt(e,e.gap,r)}return null};ls.propTypes=process.env.NODE_ENV!=="production"?{gap:fr}:{};ls.filterProps=["gap"];const cs=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ta(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Ar(t,n)});return Rt(e,e.columnGap,r)}return null};cs.propTypes=process.env.NODE_ENV!=="production"?{columnGap:fr}:{};cs.filterProps=["columnGap"];const us=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ta(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Ar(t,n)});return Rt(e,e.rowGap,r)}return null};us.propTypes=process.env.NODE_ENV!=="production"?{rowGap:fr}:{};us.filterProps=["rowGap"];const I0=De({prop:"gridColumn"}),E0=De({prop:"gridRow"}),_0=De({prop:"gridAutoFlow"}),V0=De({prop:"gridAutoColumns"}),M0=De({prop:"gridAutoRows"}),j0=De({prop:"gridTemplateColumns"}),k0=De({prop:"gridTemplateRows"}),$0=De({prop:"gridTemplateAreas"}),U0=De({prop:"gridArea"});ss(ls,cs,us,I0,E0,_0,V0,M0,j0,k0,$0,U0);function un(e,t){return t==="grey"?t:e}const D0=De({prop:"color",themeKey:"palette",transform:un}),L0=De({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:un}),B0=De({prop:"backgroundColor",themeKey:"palette",transform:un});ss(D0,L0,B0);function ht(e){return e<=1&&e!==0?`${e*100}%`:e}const F0=De({prop:"width",transform:ht}),Vl=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])||ts[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:ht(r)}};return Rt(e,e.maxWidth,t)}return null};Vl.filterProps=["maxWidth"];const N0=De({prop:"minWidth",transform:ht}),z0=De({prop:"height",transform:ht}),G0=De({prop:"maxHeight",transform:ht}),H0=De({prop:"minHeight",transform:ht});De({prop:"size",cssProperty:"width",transform:ht});De({prop:"size",cssProperty:"height",transform:ht});const q0=De({prop:"boxSizing"});ss(F0,Vl,N0,z0,G0,H0,q0);const Pa={border:{themeKey:"borders",transform:gt},borderTop:{themeKey:"borders",transform:gt},borderRight:{themeKey:"borders",transform:gt},borderBottom:{themeKey:"borders",transform:gt},borderLeft:{themeKey:"borders",transform:gt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:gt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:is},color:{themeKey:"palette",transform:un},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:un},backgroundColor:{themeKey:"palette",transform:un},p:{style:Ue},pt:{style:Ue},pr:{style:Ue},pb:{style:Ue},pl:{style:Ue},px:{style:Ue},py:{style:Ue},padding:{style:Ue},paddingTop:{style:Ue},paddingRight:{style:Ue},paddingBottom:{style:Ue},paddingLeft:{style:Ue},paddingX:{style:Ue},paddingY:{style:Ue},paddingInline:{style:Ue},paddingInlineStart:{style:Ue},paddingInlineEnd:{style:Ue},paddingBlock:{style:Ue},paddingBlockStart:{style:Ue},paddingBlockEnd:{style:Ue},m:{style:$e},mt:{style:$e},mr:{style:$e},mb:{style:$e},ml:{style:$e},mx:{style:$e},my:{style:$e},margin:{style:$e},marginTop:{style:$e},marginRight:{style:$e},marginBottom:{style:$e},marginLeft:{style:$e},marginX:{style:$e},marginY:{style:$e},marginInline:{style:$e},marginInlineStart:{style:$e},marginInlineEnd:{style:$e},marginBlock:{style:$e},marginBlockStart:{style:$e},marginBlockEnd:{style:$e},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:ls},rowGap:{style:us},columnGap:{style:cs},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ht},maxWidth:{style:Vl},minWidth:{transform:ht},height:{transform:ht},maxHeight:{transform:ht},minHeight:{transform:ht},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 W0(...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 J0(e,t){return typeof e=="function"?e(t):e}function Y0(){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=rs(a,c)||{};return d?d(s):Rt(s,n,f=>{let m=Eo(h,u,f);return f===m&&typeof f=="string"&&(m=Eo(h,u,`${r}${f==="default"?"":et(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=qh(a.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(h=>{const p=J0(l[h],a);if(p!=null)if(typeof p=="object")if(o[h])d=aa(d,e(h,p,a,o));else{const f=Rt({theme:a},p,m=>({[h]:m}));W0(f,p)?d[h]=t({sx:p,theme:a}):d=aa(d,f)}else d=aa(d,e(h,p,a,o))}),r0(a,Wh(u,d))}return Array.isArray(n)?n.map(s):s(n)}return t}const fn=Y0();fn.filterProps=["sx"];function K0(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 ds(e={},...t){const{breakpoints:r={},palette:n={},spacing:a,shape:o={},...s}=e,i=t0(r),l=Yh(a);let c=tt({breakpoints:i,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...s0,...o}},s);return c=o0(c),c.applyStyles=K0,c=t.reduce((u,d)=>tt(u,d),c),c.unstable_sxConfig={...Pa,...s==null?void 0:s.unstable_sxConfig},c.unstable_sx=function(d){return fn({sx:d,theme:this})},c}function Q0(e){return Object.keys(e).length===0}function X0(e=null){const t=N.useContext(wg.ThemeContext);return!t||Q0(t)?e:t}const Z0=ds();function Kh(e=Z0){return X0(e)}const ey=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 ty(e){const{sx:t,...r}=e,{systemProps:n,otherProps:a}=ey(r);let o;return Array.isArray(t)?o=[n,...t]:typeof t=="function"?o=(...s)=>{const i=t(...s);return jt(i)?{...n,...i}:n}:o={...n,...t},{...a,sx:o}}const Kc=e=>e,ry=()=>{let e=Kc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Kc}}},ny=ry(),ay={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 On(e,t,r="Mui"){const n=ay[t];return n?`${r}-${n}`:`${ny.generate(e)}-${t}`}function Ml(e,t,r="Mui"){const n={};return t.forEach(a=>{n[a]=On(e,a,r)}),n}function Qh(e,t=""){return e.displayName||e.name||t}function Qc(e,t,r){const n=Qh(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function oy(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Qh(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Io.ForwardRef:return Qc(e,e.render,"ForwardRef");case Io.Memo:return Qc(e,e.type,"memo");default:return}}}function Xh(e){const{variants:t,...r}=e,n={variants:t,style:Gc(r),isProcessed:!0};return n.style===r||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=Gc(a.style))}),n}const sy=ds();function ri(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function iy(e){return e?(t,r)=>r[e]:null}function ly(e,t,r){e.theme=dy(e.theme)?r:e.theme[t]||e.theme}function bo(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>bo(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 Zh(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Zh(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 ep(e={}){const{themeId:t,defaultTheme:r=sy,rootShouldForwardProp:n=ri,slotShouldForwardProp:a=ri}=e;function o(i){ly(i,t,r)}return(i,l={})=>{Kg(i,T=>T.filter(C=>C!==fn));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:p=iy(tp(u)),...f}=l,m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,y=h||!1;let S=ri;u==="Root"||u==="root"?S=n:u?S=a:hy(i)&&(S=void 0);const A=Yg(i,{shouldForwardProp:S,label:uy(c,u),...f}),w=T=>{if(T.__emotion_real===T)return T;if(typeof T=="function")return function(R){return bo(R,T)};if(jt(T)){const C=Xh(T);return C.variants?function(E){return bo(E,C)}:C.style}return T},O=(...T)=>{const C=[],R=T.map(w),E=[];if(C.push(o),c&&p&&E.push(function(G){var re,ae;const H=(ae=(re=G.theme.components)==null?void 0:re[c])==null?void 0:ae.styleOverrides;if(!H)return null;const ne={};for(const ee in H)ne[ee]=bo(G,H[ee]);return p(G,ne)}),c&&!m&&E.push(function(G){var ne,re;const M=G.theme,H=(re=(ne=M==null?void 0:M.components)==null?void 0:ne[c])==null?void 0:re.variants;return H?Zh(G,H):null}),y||E.push(fn),Array.isArray(R[0])){const I=R.shift(),G=new Array(C.length).fill(""),M=new Array(E.length).fill("");let H;H=[...G,...I,...M],H.raw=[...G,...I.raw,...M],C.unshift(H)}const V=[...C,...R,...E],b=A(...V);return i.muiName&&(b.muiName=i.muiName),process.env.NODE_ENV!=="production"&&(b.displayName=cy(c,u,i)),b};return A.withConfig&&(O.withConfig=A.withConfig),O}}function cy(e,t,r){return e?`${e}${et(t||"")}`:`Styled(${oy(r)})`}function uy(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${tp(t||"Root")}`),r}function dy(e){for(const t in e)return!1;return!0}function hy(e){return typeof e=="string"&&e.charCodeAt(0)>96}function tp(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const py=ep();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=Pt(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 my(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 rp({props:e,name:t,defaultTheme:r,themeId:n}){let a=Kh(r);return n&&(a=a[n]||a),my({theme:a,name:t,props:e})}const Dt=typeof window<"u"?N.useLayoutEffect:N.useEffect;function sn(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function jl(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}].`),sn(e,t,r)}function fy(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 pr(e){if(e.type)return e;if(e.charAt(0)==="#")return pr(fy(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.
|
|
51
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:
|
|
52
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:hr(10,a))}else n=n.split(",");return n=n.map(o=>parseFloat(o)),{type:r,values:n,colorSpace:a}}const gy=e=>{const t=pr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},ea=(e,t)=>{try{return gy(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function hs(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 np(e){e=pr(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])),hs({type:i,values:l})}function zi(e){e=pr(e);let t=e.type==="hsl"||e.type==="hsla"?pr(np(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 Xc(e,t){const r=zi(e),n=zi(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Gi(e,t){return e=pr(e),t=jl(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,hs(e)}function Ha(e,t,r){try{return Gi(e,t)}catch{return e}}function ca(e,t){if(e=pr(e),t=jl(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 hs(e)}function Pe(e,t,r){try{return ca(e,t)}catch{return e}}function ua(e,t){if(e=pr(e),t=jl(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 hs(e)}function Re(e,t,r){try{return ua(e,t)}catch{return e}}function yy(e,t=.15){return zi(e)>.5?ca(e,t):ua(e,t)}function qa(e,t,r){try{return yy(e,t)}catch{return e}}const by=N.createContext();process.env.NODE_ENV!=="production"&&(x.node,x.bool);const xy=()=>N.useContext(by)??!1,vy=N.createContext(void 0);process.env.NODE_ENV!=="production"&&(x.node,x.object);function Sy(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 wy({props:e,name:t}){const r=N.useContext(vy);return Sy({props:e,name:t,theme:{components:r}})}const Zc={theme:void 0};function Cy(e){let t,r;return function(a){let o=t;return(o===void 0||a.theme!==r)&&(Zc.theme=a.theme,o=Xh(e(Zc)),t=o,r=a.theme),o}}function Oy(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 eu=(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])})},Ty=(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)},Py=(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 ni(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},a={},o={},s={};return Ty(e,(i,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(i,l))){const u=`--${r?`${r}-`:""}${i.join("-")}`,d=Py(i,l);Object.assign(a,{[u]:d}),eu(o,i,`var(${u})`,c),eu(s,i,`var(${u}, ${d})`,c)}},i=>i[0]==="vars"),{css:a,vars:o,varsWithDefaults:s}}function Ry(e,t={}){const{getSelector:r=y,disableCssColorScheme:n,colorSchemeSelector:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:i="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=ni(l,t);let h=d;const p={},{[i]:f,...m}=o;if(Object.entries(m||{}).forEach(([w,O])=>{const{vars:T,css:C,varsWithDefaults:R}=ni(O,t);h=tt(h,R),p[w]={css:C,vars:T}}),f){const{css:w,vars:O,varsWithDefaults:T}=ni(f,t);h=tt(h,T),p[i]={css:w,vars:O}}function y(w,O){var C,R;let T=a;if(a==="class"&&(T=".%s"),a==="data"&&(T="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(T=`[${a}="%s"]`),w){if(T==="media")return e.defaultColorScheme===w?":root":{[`@media (prefers-color-scheme: ${((R=(C=o[w])==null?void 0:C.palette)==null?void 0:R.mode)||w})`]:{":root":O}};if(T)return e.defaultColorScheme===w?`:root, ${T.replace("%s",String(w))}`:T.replace("%s",String(w))}return":root"}return{vars:h,generateThemeVars:()=>{let w={...c};return Object.entries(p).forEach(([,{vars:O}])=>{w=tt(w,O)}),w},generateStyleSheets:()=>{var E,V;const w=[],O=e.defaultColorScheme||"light";function T(b,I){Object.keys(I).length&&w.push(typeof b=="string"?{[b]:{...I}}:b)}T(r(void 0,{...u}),u);const{[O]:C,...R}=p;if(C){const{css:b}=C,I=(V=(E=o[O])==null?void 0:E.palette)==null?void 0:V.mode,G=!n&&I?{colorScheme:I,...b}:{...b};T(r(O,{...G}),G)}return Object.entries(R).forEach(([b,{css:I}])=>{var H,ne;const G=(ne=(H=o[b])==null?void 0:H.palette)==null?void 0:ne.mode,M=!n&&G?{colorScheme:G,...I}:{...I};T(r(b,{...M}),M)}),w}}}function Ay(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 Iy=ds(),Ey=py("div",{name:"MuiStack",slot:"Root"});function _y(e){return rp({props:e,name:"MuiStack",defaultTheme:Iy})}function Vy(e,t){const r=N.Children.toArray(e).filter(Boolean);return r.reduce((n,a,o)=>(n.push(a),o<r.length-1&&n.push(N.cloneElement(t,{key:`separator-${o}`})),n),[])}const My=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],jy=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...Rt({theme:t},ti({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n}))};if(e.spacing){const n=os(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=ti({values:e.direction,base:a}),s=ti({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=tt(r,Rt({theme:t},s,(l,c)=>e.useFlexGap?{gap:Ar(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${My(c?o[c]:e.direction)}`]:Ar(n,l)}}))}return r=l0(t.breakpoints,r),r};function ky(e={}){const{createStyledComponent:t=Ey,useThemeProps:r=_y,componentName:n="MuiStack"}=e,a=()=>es({root:["root"]},l=>On(n,l),{}),o=t(jy),s=N.forwardRef(function(l,c){const u=r(l),d=ty(u),{component:h="div",direction:p="column",spacing:f=0,divider:m,children:y,className:S,useFlexGap:A=!1,...w}=d,O={direction:p,spacing:f,useFlexGap:A},T=a();return g.jsx(o,{as:h,ownerState:O,ref:c,className:Pt(T.root,S),...w,children:m?Vy(y,m):y})});return process.env.NODE_ENV!=="production"&&(s.propTypes={children:x.node,direction:x.oneOfType([x.oneOf(["column-reverse","column","row-reverse","row"]),x.arrayOf(x.oneOf(["column-reverse","column","row-reverse","row"])),x.object]),divider:x.node,spacing:x.oneOfType([x.arrayOf(x.oneOfType([x.number,x.string])),x.number,x.object,x.string]),sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object])}),s}const da={black:"#000",white:"#fff"},$y={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"},Hr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},qr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Ln={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Wr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Jr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Yr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function ap(){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:da.white,default:da.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 Uy=ap();function op(){return{text:{primary:da.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:da.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 tu=op();function ru(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=ua(e.main,a):t==="dark"&&(e.dark=ca(e.main,o)))}function Dy(e="light"){return e==="dark"?{main:Wr[200],light:Wr[50],dark:Wr[400]}:{main:Wr[700],light:Wr[400],dark:Wr[800]}}function Ly(e="light"){return e==="dark"?{main:Hr[200],light:Hr[50],dark:Hr[400]}:{main:Hr[500],light:Hr[300],dark:Hr[700]}}function By(e="light"){return e==="dark"?{main:qr[500],light:qr[300],dark:qr[700]}:{main:qr[700],light:qr[400],dark:qr[800]}}function Fy(e="light"){return e==="dark"?{main:Jr[400],light:Jr[300],dark:Jr[700]}:{main:Jr[700],light:Jr[500],dark:Jr[900]}}function Ny(e="light"){return e==="dark"?{main:Yr[400],light:Yr[300],dark:Yr[700]}:{main:Yr[800],light:Yr[500],dark:Yr[900]}}function zy(e="light"){return e==="dark"?{main:Ln[400],light:Ln[300],dark:Ln[700]}:{main:"#ed6c02",light:Ln[500],dark:Ln[900]}}function kl(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...a}=e,o=e.primary||Dy(t),s=e.secondary||Ly(t),i=e.error||By(t),l=e.info||Fy(t),c=e.success||Ny(t),u=e.warning||zy(t);function d(m){const y=Xc(m,tu.text.primary)>=r?tu.text.primary:Uy.text.primary;if(process.env.NODE_ENV!=="production"){const S=Xc(m,y);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${y} 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(`
|
|
53
|
-
`))}return y}const h=({color:m,name:y,mainShade:
|
|
54
|
-
The color object needs to have a \`main\` property or a \`${
|
|
49
|
+
`)));const i=o[a];return s>=0?i:typeof i=="number"?-i:typeof i=="string"&&i.startsWith("var(")?`calc(-1 * ${i})`:`-${i}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
50
|
+
`)),()=>{})}function Pa(e){return Bo(e,"spacing",8,"spacing")}function zr(e,t){return typeof t=="string"||t==null?t:e(t)}function a0(e,t){return r=>e.reduce((n,o)=>(n[o]=zr(t,r),n),{})}function i0(e,t,r,n){if(!t.includes(r))return null;const o=o0(r),s=a0(o,n),a=e[r];return Vt(e,a,s)}function _p(e,t){const r=Pa(e.theme);return Object.keys(e).map(n=>i0(e,t,n,r)).reduce(yo,{})}function De(e){return _p(e,Oa)}De.propTypes=process.env.NODE_ENV!=="production"?Oa.reduce((e,t)=>(e[t]=wr,e),{}):{};De.filterProps=Oa;function Ue(e){return _p(e,Ta)}Ue.propTypes=process.env.NODE_ENV!=="production"?Ta.reduce((e,t)=>(e[t]=wr,e),{}):{};Ue.filterProps=Ta;process.env.NODE_ENV!=="production"&&s0.reduce((e,t)=>(e[t]=wr,e),{});function Mp(e=8,t=Pa({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(s=>{const a=t(s);return typeof a=="number"?`${a}px`:a}).join(" "));return r.mui=!0,r}function Aa(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(s=>{n[s]=o}),n),{}),r=n=>Object.keys(n).reduce((o,s)=>t[s]?yo(o,t[s](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function St(e){return typeof e!="number"?e:`${e}px solid`}function Pt(e,t){return Le({prop:e,themeKey:"borders",transform:t})}const l0=Pt("border",St),c0=Pt("borderTop",St),u0=Pt("borderRight",St),d0=Pt("borderBottom",St),h0=Pt("borderLeft",St),p0=Pt("borderColor"),m0=Pt("borderTopColor"),f0=Pt("borderRightColor"),g0=Pt("borderBottomColor"),y0=Pt("borderLeftColor"),b0=Pt("outline",St),x0=Pt("outlineColor"),Ra=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Bo(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:zr(t,n)});return Vt(e,e.borderRadius,r)}return null};Ra.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:wr}:{};Ra.filterProps=["borderRadius"];Aa(l0,c0,u0,d0,h0,p0,m0,f0,g0,y0,Ra,b0,x0);const Ea=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Bo(e.theme,"spacing",8,"gap"),r=n=>({gap:zr(t,n)});return Vt(e,e.gap,r)}return null};Ea.propTypes=process.env.NODE_ENV!=="production"?{gap:wr}:{};Ea.filterProps=["gap"];const Ia=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Bo(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:zr(t,n)});return Vt(e,e.columnGap,r)}return null};Ia.propTypes=process.env.NODE_ENV!=="production"?{columnGap:wr}:{};Ia.filterProps=["columnGap"];const _a=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Bo(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:zr(t,n)});return Vt(e,e.rowGap,r)}return null};_a.propTypes=process.env.NODE_ENV!=="production"?{rowGap:wr}:{};_a.filterProps=["rowGap"];const v0=Le({prop:"gridColumn"}),S0=Le({prop:"gridRow"}),w0=Le({prop:"gridAutoFlow"}),C0=Le({prop:"gridAutoColumns"}),O0=Le({prop:"gridAutoRows"}),T0=Le({prop:"gridTemplateColumns"}),P0=Le({prop:"gridTemplateRows"}),A0=Le({prop:"gridTemplateAreas"}),R0=Le({prop:"gridArea"});Aa(Ea,Ia,_a,v0,S0,w0,C0,O0,T0,P0,A0,R0);function On(e,t){return t==="grey"?t:e}const E0=Le({prop:"color",themeKey:"palette",transform:On}),I0=Le({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:On}),_0=Le({prop:"backgroundColor",themeKey:"palette",transform:On});Aa(E0,I0,_0);function gt(e){return e<=1&&e!==0?`${e*100}%`:e}const M0=Le({prop:"width",transform:gt}),sc=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var o,s,a,i,l;const n=((a=(s=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:s.values)==null?void 0:a[r])||wa[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:gt(r)}};return Vt(e,e.maxWidth,t)}return null};sc.filterProps=["maxWidth"];const V0=Le({prop:"minWidth",transform:gt}),k0=Le({prop:"height",transform:gt}),j0=Le({prop:"maxHeight",transform:gt}),$0=Le({prop:"minHeight",transform:gt});Le({prop:"size",cssProperty:"width",transform:gt});Le({prop:"size",cssProperty:"height",transform:gt});const D0=Le({prop:"boxSizing"});Aa(M0,sc,V0,k0,j0,$0,D0);const Fo={border:{themeKey:"borders",transform:St},borderTop:{themeKey:"borders",transform:St},borderRight:{themeKey:"borders",transform:St},borderBottom:{themeKey:"borders",transform:St},borderLeft:{themeKey:"borders",transform:St},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:St},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ra},color:{themeKey:"palette",transform:On},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:On},backgroundColor:{themeKey:"palette",transform:On},p:{style:Ue},pt:{style:Ue},pr:{style:Ue},pb:{style:Ue},pl:{style:Ue},px:{style:Ue},py:{style:Ue},padding:{style:Ue},paddingTop:{style:Ue},paddingRight:{style:Ue},paddingBottom:{style:Ue},paddingLeft:{style:Ue},paddingX:{style:Ue},paddingY:{style:Ue},paddingInline:{style:Ue},paddingInlineStart:{style:Ue},paddingInlineEnd:{style:Ue},paddingBlock:{style:Ue},paddingBlockStart:{style:Ue},paddingBlockEnd:{style:Ue},m:{style:De},mt:{style:De},mr:{style:De},mb:{style:De},ml:{style:De},mx:{style:De},my:{style:De},margin:{style:De},marginTop:{style:De},marginRight:{style:De},marginBottom:{style:De},marginLeft:{style:De},marginX:{style:De},marginY:{style:De},marginInline:{style:De},marginInlineStart:{style:De},marginInlineEnd:{style:De},marginBlock:{style:De},marginBlockStart:{style:De},marginBlockEnd:{style:De},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:Ea},rowGap:{style:_a},columnGap:{style:Ia},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:gt},maxWidth:{style:sc},minWidth:{transform:gt},height:{transform:gt},maxHeight:{transform:gt},minHeight:{transform:gt},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 U0(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function L0(e,t){return typeof e=="function"?e(t):e}function B0(){function e(r,n,o,s){const a={[r]:n,theme:o},i=s[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=Ca(o,c)||{};return d?d(a):Vt(a,n,f=>{let m=Js(h,u,f);return f===m&&typeof f=="string"&&(m=Js(h,u,`${r}${f==="default"?"":rt(f)}`,f)),l===!1?m:{[l]:m}})}function t(r){const{sx:n,theme:o={}}=r||{};if(!n)return null;const s=o.unstable_sxConfig??Fo;function a(i){let l=i;if(typeof i=="function")l=i(o);else if(typeof i!="object")return i;if(!l)return null;const c=Ep(o.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(h=>{const p=L0(l[h],o);if(p!=null)if(typeof p=="object")if(s[h])d=yo(d,e(h,p,o,s));else{const f=Vt({theme:o},p,m=>({[h]:m}));U0(f,p)?d[h]=t({sx:p,theme:o}):d=yo(d,f)}else d=yo(d,e(h,p,o,s))}),Wy(o,Ip(u,d))}return Array.isArray(n)?n.map(a):a(n)}return t}const En=B0();En.filterProps=["sx"];function F0(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let o=r.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return r.palette.mode===e?t:{}}function Ma(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={},...a}=e,i=qy(r),l=Mp(o);let c=ot({breakpoints:i,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...Qy,...s}},a);return c=Ky(c),c.applyStyles=F0,c=t.reduce((u,d)=>ot(u,d),c),c.unstable_sxConfig={...Fo,...a==null?void 0:a.unstable_sxConfig},c.unstable_sx=function(d){return En({sx:d,theme:this})},c}function N0(e){return Object.keys(e).length===0}function z0(e=null){const t=F.useContext(py.ThemeContext);return!t||N0(t)?e:t}const G0=Ma();function Vp(e=G0){return z0(e)}const H0=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??Fo;return Object.keys(e).forEach(o=>{r[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function q0(e){const{sx:t,...r}=e,{systemProps:n,otherProps:o}=H0(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...a)=>{const i=t(...a);return Ft(i)?{...n,...i}:n}:s={...n,...t},{...o,sx:s}}const Vu=e=>e,W0=()=>{let e=Vu;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Vu}}},J0=W0(),Y0={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 Yr(e,t,r="Mui"){const n=Y0[t];return n?`${r}-${n}`:`${J0.generate(e)}-${t}`}function Va(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=Yr(e,o,r)}),n}function kp(e,t=""){return e.displayName||e.name||t}function ku(e,t,r){const n=kp(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function K0(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return kp(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Ws.ForwardRef:return ku(e,e.render,"ForwardRef");case Ws.Memo:return ku(e,e.type,"memo");default:return}}}function jp(e){const{variants:t,...r}=e,n={variants:t,style:Au(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=Au(o.style))}),n}const Q0=Ma();function _i(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function X0(e){return e?(t,r)=>r[e]:null}function Z0(e,t,r){e.theme=rb(e.theme)?r:e.theme[t]||e.theme}function Ds(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>Ds(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:o,...s}=r;n=s}return $p(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function $p(e,t,r=[]){var o;let n;e:for(let s=0;s<t.length;s+=1){const a=t[s];if(typeof a.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(n))continue}else for(const i in a.props)if(e[i]!==a.props[i]&&((o=e.ownerState)==null?void 0:o[i])!==a.props[i])continue e;typeof a.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(a.style(n))):r.push(a.style)}return r}function Dp(e={}){const{themeId:t,defaultTheme:r=Q0,rootShouldForwardProp:n=_i,slotShouldForwardProp:o=_i}=e;function s(i){Z0(i,t,r)}return(i,l={})=>{Fy(i,A=>A.filter(O=>O!==En));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:p=X0(Up(u)),...f}=l,m=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,y=h||!1;let b=_i;u==="Root"||u==="root"?b=n:u?b=o:nb(i)&&(b=void 0);const C=By(i,{shouldForwardProp:b,label:tb(c,u),...f}),w=A=>{if(A.__emotion_real===A)return A;if(typeof A=="function")return function(P){return Ds(P,A)};if(Ft(A)){const O=jp(A);return O.variants?function(E){return Ds(E,O)}:O.style}return A},T=(...A)=>{const O=[],P=A.map(w),E=[];if(O.push(s),c&&p&&E.push(function(M){var re,he;const z=(he=(re=M.theme.components)==null?void 0:re[c])==null?void 0:he.styleOverrides;if(!z)return null;const ne={};for(const te in z)ne[te]=Ds(M,z[te]);return p(M,ne)}),c&&!m&&E.push(function(M){var ne,re;const H=M.theme,z=(re=(ne=H==null?void 0:H.components)==null?void 0:ne[c])==null?void 0:re.variants;return z?$p(M,z):null}),y||E.push(En),Array.isArray(P[0])){const N=P.shift(),M=new Array(O.length).fill(""),H=new Array(E.length).fill("");let z;z=[...M,...N,...H],z.raw=[...M,...N.raw,...H],O.unshift(z)}const _=[...O,...P,...E],x=C(..._);return i.muiName&&(x.muiName=i.muiName),process.env.NODE_ENV!=="production"&&(x.displayName=eb(c,u,i)),x};return C.withConfig&&(T.withConfig=C.withConfig),T}}function eb(e,t,r){return e?`${e}${rt(t||"")}`:`Styled(${K0(r)})`}function tb(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Up(t||"Root")}`),r}function rb(e){for(const t in e)return!1;return!0}function nb(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Up(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const ob=Dp();function Ys(e,t,r=!1){const n={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const s=o;if(s==="components"||s==="slots")n[s]={...e[s],...n[s]};else if(s==="componentsProps"||s==="slotProps"){const a=e[s],i=t[s];if(!i)n[s]=a||{};else if(!a)n[s]=i;else{n[s]={...i};for(const l in a)if(Object.prototype.hasOwnProperty.call(a,l)){const c=l;n[s][c]=Ys(a[c],i[c],r)}}}else s==="className"&&r&&t.className?n.className=nt(e==null?void 0:e.className,t==null?void 0:t.className):s==="style"&&r&&t.style?n.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:n[s]===void 0&&(n[s]=e[s])}return n}function sb(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:Ys(t.components[r].defaultProps,n)}function Lp({props:e,name:t,defaultTheme:r,themeId:n}){let o=Vp(r);return n&&(o=o[n]||o),sb({theme:o,name:t,props:e})}const kt=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Sn(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function ac(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}].`),Sn(e,t,r)}function ab(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,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function vr(e){if(e.type)return e;if(e.charAt(0)==="#")return vr(ab(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.
|
|
51
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:xr(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=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(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
|
|
52
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:xr(10,o))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:o}}const ib=e=>{const t=vr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},po=(e,t)=>{try{return ib(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function ka(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((o,s)=>s<3?parseInt(o,10):o):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Bp(e){e=vr(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,s=n*Math.min(o,1-o),a=(c,u=(c+r/30)%12)=>o-s*Math.max(Math.min(u-3,9-u,1),-1);let i="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(i+="a",l.push(t[3])),ka({type:i,values:l})}function gl(e){e=vr(e);let t=e.type==="hsl"||e.type==="hsla"?vr(Bp(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 ju(e,t){const r=gl(e),n=gl(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function yl(e,t){return e=vr(e),t=ac(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ka(e)}function as(e,t,r){try{return yl(e,t)}catch{return e}}function wo(e,t){if(e=vr(e),t=ac(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 ka(e)}function Ae(e,t,r){try{return wo(e,t)}catch{return e}}function Co(e,t){if(e=vr(e),t=ac(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 ka(e)}function Re(e,t,r){try{return Co(e,t)}catch{return e}}function lb(e,t=.15){return gl(e)>.5?wo(e,t):Co(e,t)}function is(e,t,r){try{return lb(e,t)}catch{return e}}const cb=F.createContext();process.env.NODE_ENV!=="production"&&(v.node,v.bool);const ub=()=>F.useContext(cb)??!1,db=F.createContext(void 0);process.env.NODE_ENV!=="production"&&(v.node,v.object);function hb(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?Ys(o.defaultProps,n):!o.styleOverrides&&!o.variants?Ys(o,n):n}function pb({props:e,name:t}){const r=F.useContext(db);return hb({props:e,name:t,theme:{components:r}})}const $u={theme:void 0};function mb(e){let t,r;return function(o){let s=t;return(s===void 0||o.theme!==r)&&($u.theme=o.theme,s=jp(e($u)),t=s,r=o.theme),s}}function fb(e=""){function t(...n){if(!n.length)return"";const o=n[0];return typeof o=="string"&&!o.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}-`:""}${o}${t(...n.slice(1))})`:`, ${o}`}return(n,...o)=>`var(--${e?`${e}-`:""}${n}${t(...o)})`}const Du=(e,t,r,n=[])=>{let o=e;t.forEach((s,a)=>{a===t.length-1?Array.isArray(o)?o[Number(s)]=r:o&&typeof o=="object"&&(o[s]=r):o&&typeof o=="object"&&(o[s]||(o[s]=n.includes(s)?[]:{}),o=o[s])})},gb=(e,t,r)=>{function n(o,s=[],a=[]){Object.entries(o).forEach(([i,l])=>{(!r||r&&!r([...s,i]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...s,i],Array.isArray(l)?[...a,i]:a):t([...s,i],l,a))})}n(e)},yb=(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 Mi(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},s={},a={};return gb(e,(i,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(i,l))){const u=`--${r?`${r}-`:""}${i.join("-")}`,d=yb(i,l);Object.assign(o,{[u]:d}),Du(s,i,`var(${u})`,c),Du(a,i,`var(${u}, ${d})`,c)}},i=>i[0]==="vars"),{css:o,vars:s,varsWithDefaults:a}}function bb(e,t={}){const{getSelector:r=y,disableCssColorScheme:n,colorSchemeSelector:o}=t,{colorSchemes:s={},components:a,defaultColorScheme:i="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=Mi(l,t);let h=d;const p={},{[i]:f,...m}=s;if(Object.entries(m||{}).forEach(([w,T])=>{const{vars:A,css:O,varsWithDefaults:P}=Mi(T,t);h=ot(h,P),p[w]={css:O,vars:A}}),f){const{css:w,vars:T,varsWithDefaults:A}=Mi(f,t);h=ot(h,A),p[i]={css:w,vars:T}}function y(w,T){var O,P;let A=o;if(o==="class"&&(A=".%s"),o==="data"&&(A="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(A=`[${o}="%s"]`),w){if(A==="media")return e.defaultColorScheme===w?":root":{[`@media (prefers-color-scheme: ${((P=(O=s[w])==null?void 0:O.palette)==null?void 0:P.mode)||w})`]:{":root":T}};if(A)return e.defaultColorScheme===w?`:root, ${A.replace("%s",String(w))}`:A.replace("%s",String(w))}return":root"}return{vars:h,generateThemeVars:()=>{let w={...c};return Object.entries(p).forEach(([,{vars:T}])=>{w=ot(w,T)}),w},generateStyleSheets:()=>{var E,_;const w=[],T=e.defaultColorScheme||"light";function A(x,N){Object.keys(N).length&&w.push(typeof x=="string"?{[x]:{...N}}:x)}A(r(void 0,{...u}),u);const{[T]:O,...P}=p;if(O){const{css:x}=O,N=(_=(E=s[T])==null?void 0:E.palette)==null?void 0:_.mode,M=!n&&N?{colorScheme:N,...x}:{...x};A(r(T,{...M}),M)}return Object.entries(P).forEach(([x,{css:N}])=>{var z,ne;const M=(ne=(z=s[x])==null?void 0:z.palette)==null?void 0:ne.mode,H=!n&&M?{colorScheme:M,...N}:{...N};A(r(x,{...H}),H)}),w}}}function xb(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 vb=Ma(),Sb=ob("div",{name:"MuiStack",slot:"Root"});function wb(e){return Lp({props:e,name:"MuiStack",defaultTheme:vb})}function Cb(e,t){const r=F.Children.toArray(e).filter(Boolean);return r.reduce((n,o,s)=>(n.push(o),s<r.length-1&&n.push(F.cloneElement(t,{key:`separator-${s}`})),n),[])}const Ob=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],Tb=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...Vt({theme:t},Ii({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n}))};if(e.spacing){const n=Pa(t),o=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),{}),s=Ii({values:e.direction,base:o}),a=Ii({values:e.spacing,base:o});typeof s=="object"&&Object.keys(s).forEach((l,c,u)=>{if(!s[l]){const h=c>0?s[u[c-1]]:"column";s[l]=h}}),r=ot(r,Vt({theme:t},a,(l,c)=>e.useFlexGap?{gap:zr(n,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Ob(c?s[c]:e.direction)}`]:zr(n,l)}}))}return r=Zy(t.breakpoints,r),r};function Pb(e={}){const{createStyledComponent:t=Sb,useThemeProps:r=wb,componentName:n="MuiStack"}=e,o=()=>Lo({root:["root"]},l=>Yr(n,l),{}),s=t(Tb),a=F.forwardRef(function(l,c){const u=r(l),d=q0(u),{component:h="div",direction:p="column",spacing:f=0,divider:m,children:y,className:b,useFlexGap:C=!1,...w}=d,T={direction:p,spacing:f,useFlexGap:C},A=o();return g.jsx(s,{as:h,ownerState:T,ref:c,className:nt(A.root,b),...w,children:m?Cb(y,m):y})});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:v.node,direction:v.oneOfType([v.oneOf(["column-reverse","column","row-reverse","row"]),v.arrayOf(v.oneOf(["column-reverse","column","row-reverse","row"])),v.object]),divider:v.node,spacing:v.oneOfType([v.arrayOf(v.oneOfType([v.number,v.string])),v.number,v.object,v.string]),sx:v.oneOfType([v.arrayOf(v.oneOfType([v.func,v.object,v.bool])),v.func,v.object])}),a}const Oo={black:"#000",white:"#fff"},Ab={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"},sn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},an={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Xn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},ln={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},cn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},un={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Fp(){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:Oo.white,default:Oo.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 Rb=Fp();function Np(){return{text:{primary:Oo.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:Oo.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 Uu=Np();function Lu(e,t,r,n){const o=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Co(e.main,o):t==="dark"&&(e.dark=wo(e.main,s)))}function Eb(e="light"){return e==="dark"?{main:ln[200],light:ln[50],dark:ln[400]}:{main:ln[700],light:ln[400],dark:ln[800]}}function Ib(e="light"){return e==="dark"?{main:sn[200],light:sn[50],dark:sn[400]}:{main:sn[500],light:sn[300],dark:sn[700]}}function _b(e="light"){return e==="dark"?{main:an[500],light:an[300],dark:an[700]}:{main:an[700],light:an[400],dark:an[800]}}function Mb(e="light"){return e==="dark"?{main:cn[400],light:cn[300],dark:cn[700]}:{main:cn[700],light:cn[500],dark:cn[900]}}function Vb(e="light"){return e==="dark"?{main:un[400],light:un[300],dark:un[700]}:{main:un[800],light:un[500],dark:un[900]}}function kb(e="light"){return e==="dark"?{main:Xn[400],light:Xn[300],dark:Xn[700]}:{main:"#ed6c02",light:Xn[500],dark:Xn[900]}}function ic(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...o}=e,s=e.primary||Eb(t),a=e.secondary||Ib(t),i=e.error||_b(t),l=e.info||Mb(t),c=e.success||Vb(t),u=e.warning||kb(t);function d(m){const y=ju(m,Uu.text.primary)>=r?Uu.text.primary:Rb.text.primary;if(process.env.NODE_ENV!=="production"){const b=ju(m,y);b<3&&console.error([`MUI: The contrast ratio of ${b}:1 for ${y} 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(`
|
|
53
|
+
`))}return y}const h=({color:m,name:y,mainShade:b=500,lightShade:C=300,darkShade:w=700})=>{if(m={...m},!m.main&&m[b]&&(m.main=m[b]),!m.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${y?` (${y})`:""} provided to augmentColor(color) is invalid.
|
|
54
|
+
The color object needs to have a \`main\` property or a \`${b}\` property.`:xr(11,y?` (${y})`:"",b));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${y?` (${y})`:""} provided to augmentColor(color) is invalid.
|
|
55
55
|
\`color.main\` should be a string, but \`${JSON.stringify(m.main)}\` was provided instead.
|
|
56
56
|
|
|
57
57
|
Did you intend to use one of the following approaches?
|
|
@@ -64,23 +64,23 @@ const theme1 = createTheme({ palette: {
|
|
|
64
64
|
|
|
65
65
|
const theme2 = createTheme({ palette: {
|
|
66
66
|
primary: { main: green[500] },
|
|
67
|
-
} });`:
|
|
68
|
-
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(
|
|
67
|
+
} });`:xr(12,y?` (${y})`:"",JSON.stringify(m.main)));return Lu(m,"light",C,n),Lu(m,"dark",w,n),m.contrastText||(m.contrastText=d(m.main)),m};let p;return t==="light"?p=Fp():t==="dark"&&(p=Np()),process.env.NODE_ENV!=="production"&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),ot({common:{...Oo},mode:t,primary:h({color:s,name:"primary"}),secondary:h({color:a,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:Ab,contrastThreshold:r,getContrastText:d,augmentColor:h,tonalOffset:n,...p},o)}function jb(e){const t={};return Object.entries(e).forEach(n=>{const[o,s]=n;typeof s=="object"&&(t[o]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function $b(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Db(e){return Math.round(e*1e5)/1e5}const Bu={textTransform:"uppercase"},Fu='"Roboto", "Helvetica", "Arial", sans-serif';function Ub(e,t){const{fontFamily:r=Fu,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=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||(y=>`${y/l*h}rem`),f=(y,b,C,w,T)=>({fontFamily:r,fontWeight:y,fontSize:p(b),lineHeight:C,...r===Fu?{letterSpacing:`${Db(w/b)}em`}:{},...T,...c}),m={h1:f(o,96,1.167,-1.5),h2:f(o,60,1.2,-.5),h3:f(s,48,1.167,0),h4:f(s,34,1.235,.25),h5:f(s,24,1.334,0),h6:f(a,20,1.6,.15),subtitle1:f(s,16,1.75,.15),subtitle2:f(a,14,1.57,.1),body1:f(s,16,1.5,.15),body2:f(s,14,1.43,.15),button:f(a,14,1.75,.4,Bu),caption:f(s,12,1.66,.4),overline:f(s,12,2.66,1,Bu),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ot({htmlFontSize:l,pxToRem:p,fontFamily:r,fontSize:n,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:i,...m},d,{clone:!1})}const Lb=.2,Bb=.14,Fb=.12;function ke(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Lb})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Bb})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Fb})`].join(",")}const Nb=["none",ke(0,2,1,-1,0,1,1,0,0,1,3,0),ke(0,3,1,-2,0,2,2,0,0,1,5,0),ke(0,3,3,-2,0,3,4,0,0,1,8,0),ke(0,2,4,-1,0,4,5,0,0,1,10,0),ke(0,3,5,-1,0,5,8,0,0,1,14,0),ke(0,3,5,-1,0,6,10,0,0,1,18,0),ke(0,4,5,-2,0,7,10,1,0,2,16,1),ke(0,5,5,-3,0,8,10,1,0,3,14,2),ke(0,5,6,-3,0,9,12,1,0,3,16,2),ke(0,6,6,-3,0,10,14,1,0,4,18,3),ke(0,6,7,-4,0,11,15,1,0,4,20,3),ke(0,7,8,-4,0,12,17,2,0,5,22,4),ke(0,7,8,-4,0,13,19,2,0,5,24,4),ke(0,7,9,-4,0,14,21,2,0,5,26,4),ke(0,8,9,-5,0,15,22,2,0,6,28,5),ke(0,8,10,-5,0,16,24,2,0,6,30,5),ke(0,8,11,-5,0,17,26,2,0,6,32,5),ke(0,9,11,-5,0,18,28,2,0,7,34,6),ke(0,9,12,-6,0,19,29,2,0,7,36,6),ke(0,10,13,-6,0,20,31,3,0,8,38,7),ke(0,10,13,-6,0,21,33,3,0,8,40,7),ke(0,10,14,-6,0,22,35,3,0,8,42,7),ke(0,11,14,-7,0,23,36,3,0,9,44,8),ke(0,11,15,-7,0,24,38,3,0,9,46,8)],zb={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)"},Gb={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Nu(e){return`${Math.round(e)}ms`}function Hb(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function qb(e){const t={...zb,...e.easing},r={...Gb,...e.duration};return{getAutoHeightDuration:Hb,create:(o=["all"],s={})=>{const{duration:a=r.standard,easing:i=t.easeInOut,delay:l=0,...c}=s;if(process.env.NODE_ENV!=="production"){const u=h=>typeof h=="string",d=h=>!Number.isNaN(parseFloat(h));!u(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(a)&&!u(a)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${a}.`),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 s!="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(`
|
|
68
|
+
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof a=="string"?a:Nu(a)} ${i} ${typeof l=="string"?l:Nu(l)}`).join(",")},...e,easing:t,duration:r}}const Wb={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Jb(e){return Ft(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function zp(e={}){const t={...e};function r(n){const o=Object.entries(n);for(let s=0;s<o.length;s++){const[a,i]=o[s];!Jb(i)||a.startsWith("unstable_")?delete n[a]:Ft(i)&&(n[a]={...i},r(n[a]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
69
69
|
|
|
70
70
|
const theme = ${JSON.stringify(t,null,2)};
|
|
71
71
|
|
|
72
72
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
73
73
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
74
74
|
|
|
75
|
-
export default theme;`}function
|
|
76
|
-
`))}m[
|
|
77
|
-
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 db(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const It=e=>{try{return e()}catch{}},hb=(e="mui")=>Oy(e);function ai(e,t,r,n){if(!t)return;t=t===!0?{}:t;const a=n==="dark"?"dark":"light";if(!r){e[n]=sb({...t,palette:{mode:a,...t==null?void 0:t.palette}});return}const{palette:o,...s}=Hi({...r,palette:{mode:a,...t==null?void 0:t.palette}});return e[n]={...t,palette:o,opacity:{...ip(a),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||lp(a)},s}function pb(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:a=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:s=ib,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=hb(o),{[d]:p,light:f,dark:m,...y}=r,S={...y};let A=p;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(A=!0),!A)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:hr(21,d));const w=ai(S,A,c,d);f&&!S.light&&ai(S,f,void 0,"light"),m&&!S.dark&&ai(S,m,void 0,"dark");let O={defaultColorScheme:d,...w,cssVarPrefix:o,colorSchemeSelector:i,rootSelector:l,getCssVar:h,colorSchemes:S,font:{...Gy(w.typography),...w.font},spacing:db(c.spacing)};Object.keys(O.colorSchemes).forEach(V=>{const b=O.colorSchemes[V].palette,I=G=>{const M=G.split("-"),H=M[1],ne=M[2];return h(G,b[H][ne])};if(b.mode==="light"&&(W(b.common,"background","#fff"),W(b.common,"onBackground","#000")),b.mode==="dark"&&(W(b.common,"background","#000"),W(b.common,"onBackground","#fff")),ub(b,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),b.mode==="light"){W(b.Alert,"errorColor",Pe(b.error.light,.6)),W(b.Alert,"infoColor",Pe(b.info.light,.6)),W(b.Alert,"successColor",Pe(b.success.light,.6)),W(b.Alert,"warningColor",Pe(b.warning.light,.6)),W(b.Alert,"errorFilledBg",I("palette-error-main")),W(b.Alert,"infoFilledBg",I("palette-info-main")),W(b.Alert,"successFilledBg",I("palette-success-main")),W(b.Alert,"warningFilledBg",I("palette-warning-main")),W(b.Alert,"errorFilledColor",It(()=>b.getContrastText(b.error.main))),W(b.Alert,"infoFilledColor",It(()=>b.getContrastText(b.info.main))),W(b.Alert,"successFilledColor",It(()=>b.getContrastText(b.success.main))),W(b.Alert,"warningFilledColor",It(()=>b.getContrastText(b.warning.main))),W(b.Alert,"errorStandardBg",Re(b.error.light,.9)),W(b.Alert,"infoStandardBg",Re(b.info.light,.9)),W(b.Alert,"successStandardBg",Re(b.success.light,.9)),W(b.Alert,"warningStandardBg",Re(b.warning.light,.9)),W(b.Alert,"errorIconColor",I("palette-error-main")),W(b.Alert,"infoIconColor",I("palette-info-main")),W(b.Alert,"successIconColor",I("palette-success-main")),W(b.Alert,"warningIconColor",I("palette-warning-main")),W(b.AppBar,"defaultBg",I("palette-grey-100")),W(b.Avatar,"defaultBg",I("palette-grey-400")),W(b.Button,"inheritContainedBg",I("palette-grey-300")),W(b.Button,"inheritContainedHoverBg",I("palette-grey-A100")),W(b.Chip,"defaultBorder",I("palette-grey-400")),W(b.Chip,"defaultAvatarColor",I("palette-grey-700")),W(b.Chip,"defaultIconColor",I("palette-grey-700")),W(b.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),W(b.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),W(b.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),W(b.LinearProgress,"primaryBg",Re(b.primary.main,.62)),W(b.LinearProgress,"secondaryBg",Re(b.secondary.main,.62)),W(b.LinearProgress,"errorBg",Re(b.error.main,.62)),W(b.LinearProgress,"infoBg",Re(b.info.main,.62)),W(b.LinearProgress,"successBg",Re(b.success.main,.62)),W(b.LinearProgress,"warningBg",Re(b.warning.main,.62)),W(b.Skeleton,"bg",`rgba(${I("palette-text-primaryChannel")} / 0.11)`),W(b.Slider,"primaryTrack",Re(b.primary.main,.62)),W(b.Slider,"secondaryTrack",Re(b.secondary.main,.62)),W(b.Slider,"errorTrack",Re(b.error.main,.62)),W(b.Slider,"infoTrack",Re(b.info.main,.62)),W(b.Slider,"successTrack",Re(b.success.main,.62)),W(b.Slider,"warningTrack",Re(b.warning.main,.62));const G=qa(b.background.default,.8);W(b.SnackbarContent,"bg",G),W(b.SnackbarContent,"color",It(()=>b.getContrastText(G))),W(b.SpeedDialAction,"fabHoverBg",qa(b.background.paper,.15)),W(b.StepConnector,"border",I("palette-grey-400")),W(b.StepContent,"border",I("palette-grey-400")),W(b.Switch,"defaultColor",I("palette-common-white")),W(b.Switch,"defaultDisabledColor",I("palette-grey-100")),W(b.Switch,"primaryDisabledColor",Re(b.primary.main,.62)),W(b.Switch,"secondaryDisabledColor",Re(b.secondary.main,.62)),W(b.Switch,"errorDisabledColor",Re(b.error.main,.62)),W(b.Switch,"infoDisabledColor",Re(b.info.main,.62)),W(b.Switch,"successDisabledColor",Re(b.success.main,.62)),W(b.Switch,"warningDisabledColor",Re(b.warning.main,.62)),W(b.TableCell,"border",Re(Ha(b.divider,1),.88)),W(b.Tooltip,"bg",Ha(b.grey[700],.92))}if(b.mode==="dark"){W(b.Alert,"errorColor",Re(b.error.light,.6)),W(b.Alert,"infoColor",Re(b.info.light,.6)),W(b.Alert,"successColor",Re(b.success.light,.6)),W(b.Alert,"warningColor",Re(b.warning.light,.6)),W(b.Alert,"errorFilledBg",I("palette-error-dark")),W(b.Alert,"infoFilledBg",I("palette-info-dark")),W(b.Alert,"successFilledBg",I("palette-success-dark")),W(b.Alert,"warningFilledBg",I("palette-warning-dark")),W(b.Alert,"errorFilledColor",It(()=>b.getContrastText(b.error.dark))),W(b.Alert,"infoFilledColor",It(()=>b.getContrastText(b.info.dark))),W(b.Alert,"successFilledColor",It(()=>b.getContrastText(b.success.dark))),W(b.Alert,"warningFilledColor",It(()=>b.getContrastText(b.warning.dark))),W(b.Alert,"errorStandardBg",Pe(b.error.light,.9)),W(b.Alert,"infoStandardBg",Pe(b.info.light,.9)),W(b.Alert,"successStandardBg",Pe(b.success.light,.9)),W(b.Alert,"warningStandardBg",Pe(b.warning.light,.9)),W(b.Alert,"errorIconColor",I("palette-error-main")),W(b.Alert,"infoIconColor",I("palette-info-main")),W(b.Alert,"successIconColor",I("palette-success-main")),W(b.Alert,"warningIconColor",I("palette-warning-main")),W(b.AppBar,"defaultBg",I("palette-grey-900")),W(b.AppBar,"darkBg",I("palette-background-paper")),W(b.AppBar,"darkColor",I("palette-text-primary")),W(b.Avatar,"defaultBg",I("palette-grey-600")),W(b.Button,"inheritContainedBg",I("palette-grey-800")),W(b.Button,"inheritContainedHoverBg",I("palette-grey-700")),W(b.Chip,"defaultBorder",I("palette-grey-700")),W(b.Chip,"defaultAvatarColor",I("palette-grey-300")),W(b.Chip,"defaultIconColor",I("palette-grey-300")),W(b.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),W(b.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),W(b.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),W(b.LinearProgress,"primaryBg",Pe(b.primary.main,.5)),W(b.LinearProgress,"secondaryBg",Pe(b.secondary.main,.5)),W(b.LinearProgress,"errorBg",Pe(b.error.main,.5)),W(b.LinearProgress,"infoBg",Pe(b.info.main,.5)),W(b.LinearProgress,"successBg",Pe(b.success.main,.5)),W(b.LinearProgress,"warningBg",Pe(b.warning.main,.5)),W(b.Skeleton,"bg",`rgba(${I("palette-text-primaryChannel")} / 0.13)`),W(b.Slider,"primaryTrack",Pe(b.primary.main,.5)),W(b.Slider,"secondaryTrack",Pe(b.secondary.main,.5)),W(b.Slider,"errorTrack",Pe(b.error.main,.5)),W(b.Slider,"infoTrack",Pe(b.info.main,.5)),W(b.Slider,"successTrack",Pe(b.success.main,.5)),W(b.Slider,"warningTrack",Pe(b.warning.main,.5));const G=qa(b.background.default,.98);W(b.SnackbarContent,"bg",G),W(b.SnackbarContent,"color",It(()=>b.getContrastText(G))),W(b.SpeedDialAction,"fabHoverBg",qa(b.background.paper,.15)),W(b.StepConnector,"border",I("palette-grey-600")),W(b.StepContent,"border",I("palette-grey-600")),W(b.Switch,"defaultColor",I("palette-grey-300")),W(b.Switch,"defaultDisabledColor",I("palette-grey-600")),W(b.Switch,"primaryDisabledColor",Pe(b.primary.main,.55)),W(b.Switch,"secondaryDisabledColor",Pe(b.secondary.main,.55)),W(b.Switch,"errorDisabledColor",Pe(b.error.main,.55)),W(b.Switch,"infoDisabledColor",Pe(b.info.main,.55)),W(b.Switch,"successDisabledColor",Pe(b.success.main,.55)),W(b.Switch,"warningDisabledColor",Pe(b.warning.main,.55)),W(b.TableCell,"border",Pe(Ha(b.divider,1),.68)),W(b.Tooltip,"bg",Ha(b.grey[700],.92))}Nt(b.background,"default"),Nt(b.background,"paper"),Nt(b.common,"background"),Nt(b.common,"onBackground"),Nt(b,"divider"),Object.keys(b).forEach(G=>{const M=b[G];G!=="tonalOffset"&&M&&typeof M=="object"&&(M.main&&W(b[G],"mainChannel",ea(ta(M.main))),M.light&&W(b[G],"lightChannel",ea(ta(M.light))),M.dark&&W(b[G],"darkChannel",ea(ta(M.dark))),M.contrastText&&W(b[G],"contrastTextChannel",ea(ta(M.contrastText))),G==="text"&&(Nt(b[G],"primary"),Nt(b[G],"secondary")),G==="action"&&(M.active&&Nt(b[G],"active"),M.selected&&Nt(b[G],"selected")))})}),O=t.reduce((V,b)=>tt(V,b),O);const T={prefix:o,disableCssColorScheme:a,shouldSkipGeneratingVar:s,getSelector:cb(O)},{vars:C,generateThemeVars:R,generateStyleSheets:E}=Ry(O,T);return O.vars=C,Object.entries(O.colorSchemes[O.defaultColorScheme]).forEach(([V,b])=>{O[V]=b}),O.generateThemeVars=R,O.generateStyleSheets=E,O.generateSpacing=function(){return Yh(c.spacing,os(this))},O.getColorSchemeSelector=Ay(i),O.spacing=O.generateSpacing(),O.shouldSkipGeneratingVar=s,O.unstable_sxConfig={...Pa,...c==null?void 0:c.unstable_sxConfig},O.unstable_sx=function(b){return fn({sx:b,theme:this})},O.toRuntimeSource=sp,O}function su(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:kl({...r===!0?{}:r.palette,mode:t})})}function cp(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 Hi(e,...t);let u=r;"palette"in e||c[i]&&(c[i]!==!0?u=c[i].palette:i==="dark"&&(u={mode:"dark"}));const d=Hi({...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},su(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},su(d,"light",c.light)),d}return!r&&!("light"in c)&&i==="light"&&(c.light=!0),pb({...s,colorSchemes:c,defaultColorScheme:i,...typeof n!="boolean"&&n},...t)}const $l=cp();function up(){const e=Kh($l);return process.env.NODE_ENV!=="production"&&N.useDebugValue(e),e[_l]||e}function mb({props:e,name:t}){return rp({props:e,name:t,defaultTheme:$l,themeId:_l})}function Ul(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const fb=e=>Ul(e)&&e!=="classes",mt=ep({themeId:_l,defaultTheme:$l,rootShouldForwardProp:fb});function ps(...e){const t=N.useRef(void 0),r=N.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 N.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}let iu=0;function gb(e){const[t,r]=N.useState(e),n=t;return N.useEffect(()=>{t==null&&(iu+=1,r(`mui-${iu}`))},[t]),n}const yb={...N},lu=yb.useId;function bb(e){return lu!==void 0?lu():gb(e)}class xb{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 ms=({params:e,store:t})=>{N.useEffect(()=>{t.update(n=>K({},n,{animation:K({},n.animation,{skip:e.skipAnimation})}))},[t,e.skipAnimation]);const r=N.useCallback(()=>{let n=!1;return t.update(a=>K({},a,{animation:K({},a.animation,{skipAnimationRequests:a.animation.skipAnimationRequests+1})})),()=>{n||(n=!0,t.update(a=>K({},a,{animation:K({},a.animation,{skipAnimationRequests:a.animation.skipAnimationRequests-1})})))}},[t]);return Dt(()=>{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}}};ms.params={skipAnimation:!0};ms.getDefaultizedParams=({params:e})=>K({},e,{skipAnimation:e.skipAnimation??!1});ms.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 vb=(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
|
|
75
|
+
export default theme;`}function bl(e={},...t){const{breakpoints:r,mixins:n={},spacing:o,palette:s={},transitions:a={},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.":xr(20));const u=ic(s),d=Ma(e);let h=ot(d,{mixins:$b(d.breakpoints,n),palette:u,shadows:Nb.slice(),typography:Ub(u,i),transitions:qb(a),zIndex:{...Wb}});if(h=ot(h,c),h=t.reduce((p,f)=>ot(p,f),h),process.env.NODE_ENV!=="production"){const p=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],f=(m,y)=>{let b;for(b in m){const C=m[b];if(p.includes(b)&&Object.keys(C).length>0){if(process.env.NODE_ENV!=="production"){const w=Yr("",b);console.error([`MUI: The \`${y}\` component increases the CSS specificity of the \`${b}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${w}' syntax:`,JSON.stringify({root:{[`&.${w}`]:C}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
76
|
+
`))}m[b]={}}}};Object.keys(h.components).forEach(m=>{const y=h.components[m].styleOverrides;y&&m.startsWith("Mui")&&f(y,m)})}return h.unstable_sxConfig={...Fo,...c==null?void 0:c.unstable_sxConfig},h.unstable_sx=function(f){return En({sx:f,theme:this})},h.toRuntimeSource=zp,h}function Yb(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 Kb=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=Yb(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Gp(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Hp(e){return e==="dark"?Kb:[]}function Qb(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...o}=e,s=ic(t);return{palette:s,opacity:{...Gp(s.mode),...r},overlays:n||Hp(s.mode),...o}}function Xb(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 Zb=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],ex=e=>(t,r)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let s=o;if(o==="class"&&(s=".%s"),o==="data"&&(s="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(s=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return Zb(e.cssVarPrefix).forEach(i=>{a[i]=r[i],delete r[i]}),s==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:a}}:s?{[s.replace("%s",t)]:a,[`${n}, ${s.replace("%s",t)}`]:r}:{[n]:{...r,...a}}}if(s&&s!=="media")return`${n}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(s)return s.replace("%s",String(t))}return n};function tx(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function J(e,t,r){!e[t]&&r&&(e[t]=r)}function mo(e){return typeof e!="string"||!e.startsWith("hsl")?e:Bp(e)}function Qt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=po(mo(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().
|
|
77
|
+
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 rx(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const $t=e=>{try{return e()}catch{}},nx=(e="mui")=>fb(e);function Vi(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=Qb({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:s,...a}=bl({...r,palette:{mode:o,...t==null?void 0:t.palette}});return e[n]={...t,palette:s,opacity:{...Gp(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Hp(o)},a}function ox(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:a=Xb,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=nx(s),{[d]:p,light:f,dark:m,...y}=r,b={...y};let C=p;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(C=!0),!C)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:xr(21,d));const w=Vi(b,C,c,d);f&&!b.light&&Vi(b,f,void 0,"light"),m&&!b.dark&&Vi(b,m,void 0,"dark");let T={defaultColorScheme:d,...w,cssVarPrefix:s,colorSchemeSelector:i,rootSelector:l,getCssVar:h,colorSchemes:b,font:{...jb(w.typography),...w.font},spacing:rx(c.spacing)};Object.keys(T.colorSchemes).forEach(_=>{const x=T.colorSchemes[_].palette,N=M=>{const H=M.split("-"),z=H[1],ne=H[2];return h(M,x[z][ne])};if(x.mode==="light"&&(J(x.common,"background","#fff"),J(x.common,"onBackground","#000")),x.mode==="dark"&&(J(x.common,"background","#000"),J(x.common,"onBackground","#fff")),tx(x,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),x.mode==="light"){J(x.Alert,"errorColor",Ae(x.error.light,.6)),J(x.Alert,"infoColor",Ae(x.info.light,.6)),J(x.Alert,"successColor",Ae(x.success.light,.6)),J(x.Alert,"warningColor",Ae(x.warning.light,.6)),J(x.Alert,"errorFilledBg",N("palette-error-main")),J(x.Alert,"infoFilledBg",N("palette-info-main")),J(x.Alert,"successFilledBg",N("palette-success-main")),J(x.Alert,"warningFilledBg",N("palette-warning-main")),J(x.Alert,"errorFilledColor",$t(()=>x.getContrastText(x.error.main))),J(x.Alert,"infoFilledColor",$t(()=>x.getContrastText(x.info.main))),J(x.Alert,"successFilledColor",$t(()=>x.getContrastText(x.success.main))),J(x.Alert,"warningFilledColor",$t(()=>x.getContrastText(x.warning.main))),J(x.Alert,"errorStandardBg",Re(x.error.light,.9)),J(x.Alert,"infoStandardBg",Re(x.info.light,.9)),J(x.Alert,"successStandardBg",Re(x.success.light,.9)),J(x.Alert,"warningStandardBg",Re(x.warning.light,.9)),J(x.Alert,"errorIconColor",N("palette-error-main")),J(x.Alert,"infoIconColor",N("palette-info-main")),J(x.Alert,"successIconColor",N("palette-success-main")),J(x.Alert,"warningIconColor",N("palette-warning-main")),J(x.AppBar,"defaultBg",N("palette-grey-100")),J(x.Avatar,"defaultBg",N("palette-grey-400")),J(x.Button,"inheritContainedBg",N("palette-grey-300")),J(x.Button,"inheritContainedHoverBg",N("palette-grey-A100")),J(x.Chip,"defaultBorder",N("palette-grey-400")),J(x.Chip,"defaultAvatarColor",N("palette-grey-700")),J(x.Chip,"defaultIconColor",N("palette-grey-700")),J(x.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),J(x.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),J(x.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),J(x.LinearProgress,"primaryBg",Re(x.primary.main,.62)),J(x.LinearProgress,"secondaryBg",Re(x.secondary.main,.62)),J(x.LinearProgress,"errorBg",Re(x.error.main,.62)),J(x.LinearProgress,"infoBg",Re(x.info.main,.62)),J(x.LinearProgress,"successBg",Re(x.success.main,.62)),J(x.LinearProgress,"warningBg",Re(x.warning.main,.62)),J(x.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.11)`),J(x.Slider,"primaryTrack",Re(x.primary.main,.62)),J(x.Slider,"secondaryTrack",Re(x.secondary.main,.62)),J(x.Slider,"errorTrack",Re(x.error.main,.62)),J(x.Slider,"infoTrack",Re(x.info.main,.62)),J(x.Slider,"successTrack",Re(x.success.main,.62)),J(x.Slider,"warningTrack",Re(x.warning.main,.62));const M=is(x.background.default,.8);J(x.SnackbarContent,"bg",M),J(x.SnackbarContent,"color",$t(()=>x.getContrastText(M))),J(x.SpeedDialAction,"fabHoverBg",is(x.background.paper,.15)),J(x.StepConnector,"border",N("palette-grey-400")),J(x.StepContent,"border",N("palette-grey-400")),J(x.Switch,"defaultColor",N("palette-common-white")),J(x.Switch,"defaultDisabledColor",N("palette-grey-100")),J(x.Switch,"primaryDisabledColor",Re(x.primary.main,.62)),J(x.Switch,"secondaryDisabledColor",Re(x.secondary.main,.62)),J(x.Switch,"errorDisabledColor",Re(x.error.main,.62)),J(x.Switch,"infoDisabledColor",Re(x.info.main,.62)),J(x.Switch,"successDisabledColor",Re(x.success.main,.62)),J(x.Switch,"warningDisabledColor",Re(x.warning.main,.62)),J(x.TableCell,"border",Re(as(x.divider,1),.88)),J(x.Tooltip,"bg",as(x.grey[700],.92))}if(x.mode==="dark"){J(x.Alert,"errorColor",Re(x.error.light,.6)),J(x.Alert,"infoColor",Re(x.info.light,.6)),J(x.Alert,"successColor",Re(x.success.light,.6)),J(x.Alert,"warningColor",Re(x.warning.light,.6)),J(x.Alert,"errorFilledBg",N("palette-error-dark")),J(x.Alert,"infoFilledBg",N("palette-info-dark")),J(x.Alert,"successFilledBg",N("palette-success-dark")),J(x.Alert,"warningFilledBg",N("palette-warning-dark")),J(x.Alert,"errorFilledColor",$t(()=>x.getContrastText(x.error.dark))),J(x.Alert,"infoFilledColor",$t(()=>x.getContrastText(x.info.dark))),J(x.Alert,"successFilledColor",$t(()=>x.getContrastText(x.success.dark))),J(x.Alert,"warningFilledColor",$t(()=>x.getContrastText(x.warning.dark))),J(x.Alert,"errorStandardBg",Ae(x.error.light,.9)),J(x.Alert,"infoStandardBg",Ae(x.info.light,.9)),J(x.Alert,"successStandardBg",Ae(x.success.light,.9)),J(x.Alert,"warningStandardBg",Ae(x.warning.light,.9)),J(x.Alert,"errorIconColor",N("palette-error-main")),J(x.Alert,"infoIconColor",N("palette-info-main")),J(x.Alert,"successIconColor",N("palette-success-main")),J(x.Alert,"warningIconColor",N("palette-warning-main")),J(x.AppBar,"defaultBg",N("palette-grey-900")),J(x.AppBar,"darkBg",N("palette-background-paper")),J(x.AppBar,"darkColor",N("palette-text-primary")),J(x.Avatar,"defaultBg",N("palette-grey-600")),J(x.Button,"inheritContainedBg",N("palette-grey-800")),J(x.Button,"inheritContainedHoverBg",N("palette-grey-700")),J(x.Chip,"defaultBorder",N("palette-grey-700")),J(x.Chip,"defaultAvatarColor",N("palette-grey-300")),J(x.Chip,"defaultIconColor",N("palette-grey-300")),J(x.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),J(x.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),J(x.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),J(x.LinearProgress,"primaryBg",Ae(x.primary.main,.5)),J(x.LinearProgress,"secondaryBg",Ae(x.secondary.main,.5)),J(x.LinearProgress,"errorBg",Ae(x.error.main,.5)),J(x.LinearProgress,"infoBg",Ae(x.info.main,.5)),J(x.LinearProgress,"successBg",Ae(x.success.main,.5)),J(x.LinearProgress,"warningBg",Ae(x.warning.main,.5)),J(x.Skeleton,"bg",`rgba(${N("palette-text-primaryChannel")} / 0.13)`),J(x.Slider,"primaryTrack",Ae(x.primary.main,.5)),J(x.Slider,"secondaryTrack",Ae(x.secondary.main,.5)),J(x.Slider,"errorTrack",Ae(x.error.main,.5)),J(x.Slider,"infoTrack",Ae(x.info.main,.5)),J(x.Slider,"successTrack",Ae(x.success.main,.5)),J(x.Slider,"warningTrack",Ae(x.warning.main,.5));const M=is(x.background.default,.98);J(x.SnackbarContent,"bg",M),J(x.SnackbarContent,"color",$t(()=>x.getContrastText(M))),J(x.SpeedDialAction,"fabHoverBg",is(x.background.paper,.15)),J(x.StepConnector,"border",N("palette-grey-600")),J(x.StepContent,"border",N("palette-grey-600")),J(x.Switch,"defaultColor",N("palette-grey-300")),J(x.Switch,"defaultDisabledColor",N("palette-grey-600")),J(x.Switch,"primaryDisabledColor",Ae(x.primary.main,.55)),J(x.Switch,"secondaryDisabledColor",Ae(x.secondary.main,.55)),J(x.Switch,"errorDisabledColor",Ae(x.error.main,.55)),J(x.Switch,"infoDisabledColor",Ae(x.info.main,.55)),J(x.Switch,"successDisabledColor",Ae(x.success.main,.55)),J(x.Switch,"warningDisabledColor",Ae(x.warning.main,.55)),J(x.TableCell,"border",Ae(as(x.divider,1),.68)),J(x.Tooltip,"bg",as(x.grey[700],.92))}Qt(x.background,"default"),Qt(x.background,"paper"),Qt(x.common,"background"),Qt(x.common,"onBackground"),Qt(x,"divider"),Object.keys(x).forEach(M=>{const H=x[M];M!=="tonalOffset"&&H&&typeof H=="object"&&(H.main&&J(x[M],"mainChannel",po(mo(H.main))),H.light&&J(x[M],"lightChannel",po(mo(H.light))),H.dark&&J(x[M],"darkChannel",po(mo(H.dark))),H.contrastText&&J(x[M],"contrastTextChannel",po(mo(H.contrastText))),M==="text"&&(Qt(x[M],"primary"),Qt(x[M],"secondary")),M==="action"&&(H.active&&Qt(x[M],"active"),H.selected&&Qt(x[M],"selected")))})}),T=t.reduce((_,x)=>ot(_,x),T);const A={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:ex(T)},{vars:O,generateThemeVars:P,generateStyleSheets:E}=bb(T,A);return T.vars=O,Object.entries(T.colorSchemes[T.defaultColorScheme]).forEach(([_,x])=>{T[_]=x}),T.generateThemeVars=P,T.generateStyleSheets=E,T.generateSpacing=function(){return Mp(c.spacing,Pa(this))},T.getColorSchemeSelector=xb(i),T.spacing=T.generateSpacing(),T.shouldSkipGeneratingVar=a,T.unstable_sxConfig={...Fo,...c==null?void 0:c.unstable_sxConfig},T.unstable_sx=function(x){return En({sx:x,theme:this})},T.toRuntimeSource=zp,T}function zu(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:ic({...r===!0?{}:r.palette,mode:t})})}function qp(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:o=r?void 0:{light:!0},defaultColorScheme:s=r==null?void 0:r.mode,...a}=e,i=s||"light",l=o==null?void 0:o[i],c={...o,...r?{[i]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return bl(e,...t);let u=r;"palette"in e||c[i]&&(c[i]!==!0?u=c[i].palette:i==="dark"&&(u={mode:"dark"}));const d=bl({...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},zu(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},zu(d,"light",c.light)),d}return!r&&!("light"in c)&&i==="light"&&(c.light=!0),ox({...a,colorSchemes:c,defaultColorScheme:i,...typeof n!="boolean"&&n},...t)}const lc=qp();function Wp(){const e=Vp(lc);return process.env.NODE_ENV!=="production"&&F.useDebugValue(e),e[oc]||e}function sx({props:e,name:t}){return Lp({props:e,name:t,defaultTheme:lc,themeId:oc})}function cc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ax=e=>cc(e)&&e!=="classes",xt=Dp({themeId:oc,defaultTheme:lc,rootShouldForwardProp:ax});function ja(...e){const t=F.useRef(void 0),r=F.useCallback(n=>{const o=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,i=a(n);return typeof i=="function"?i:()=>{a(null)}}return s.current=n,()=>{s.current=null}});return()=>{o.forEach(s=>s==null?void 0:s())}},e);return F.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}let Gu=0;function ix(e){const[t,r]=F.useState(e),n=t;return F.useEffect(()=>{t==null&&(Gu+=1,r(`mui-${Gu}`))},[t]),n}const lx={...F},Hu=lx.useId;function cx(e){return Hu!==void 0?Hu():ix(e)}var ux=(e,t,r)=>{if(t.length===1&&t[0]===r){let n=!1;try{const o={};e(o)===o&&(n=!0)}catch{}if(n){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
78
78
|
\`createSelector([state => state.todos], todos => todos)\`
|
|
79
79
|
This could lead to inefficient memoization and unnecessary re-renders.
|
|
80
|
-
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:
|
|
80
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},dx=(e,t,r)=>{const{memoize:n,memoizeOptions:o}=t,{inputSelectorResults:s,inputSelectorResultsCopy:a}=e,i=n(()=>({}),...o);if(!(i.apply(null,s)===i.apply(null,a))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
81
81
|
This means your output selector will likely run more frequently than intended.
|
|
82
82
|
Avoid returning a new reference inside your input selector, e.g.
|
|
83
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:
|
|
83
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:s,secondInputs:a,stack:c})}},hx={inputStabilityCheck:"once",identityFunctionCheck:"once"},Ks=Symbol("NOT_FOUND");function px(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function mx(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function fx(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 qu=e=>Array.isArray(e)?e:[e];function gx(e){const t=Array.isArray(e[0])?e[0]:e;return fx(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Wu(e,t){const r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var yx=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...hx,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:ux},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:dx}}};function bx(e){let t;return{get(r){return t&&e(t.key,r)?t.value:Ks},put(r,n){t={key:r,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function xx(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 Ks}function o(i,l){n(i)===Ks&&(r.unshift({key:i,value:l}),r.length>e&&r.pop())}function s(){return r}function a(){r=[]}return{get:n,put:o,getEntries:s,clear:a}}var vx=(e,t)=>e===t;function Sx(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;const{length:o}=r;for(let s=0;s<o;s++)if(!e(r[s],n[s]))return!1;return!0}}function wx(e,t){const r=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:n=vx,maxSize:o=1,resultEqualityCheck:s}=r,a=Sx(n);let i=0;const l=o<=1?bx(a):xx(o,a);function c(){let u=l.get(arguments);if(u===Ks){if(u=e.apply(null,arguments),i++,s){const h=l.getEntries().find(p=>s(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 Cx=class{constructor(e){this.value=e}deref(){return this.value}},Ox=typeof WeakRef<"u"?WeakRef:Cx,Tx=0,Ju=1;function ls(){return{s:Tx,v:void 0,o:null,p:null}}function Jp(e,t={}){let r=ls();const{resultEqualityCheck:n}=t;let o,s=0;function a(){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 y=m.get(f);y===void 0?(i=ls(),m.set(f,i)):i=y}else{let m=i.p;m===null&&(i.p=m=new Map);const y=m.get(f);y===void 0?(i=ls(),m.set(f,i)):i=y}}const c=i;let u;if(i.s===Ju)u=i.v;else if(u=e.apply(null,arguments),s++,n){const h=((d=o==null?void 0:o.deref)==null?void 0:d.call(o))??o;h!=null&&n(h,u)&&(u=h,s!==0&&s--),o=typeof u=="object"&&u!==null||typeof u=="function"?new Ox(u):u}return c.s=Ju,c.v=u,u}return a.clearCache=()=>{r=ls(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function Yp(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let s=0,a=0,i,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),px(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:d,memoizeOptions:h=[],argsMemoize:p=Jp,argsMemoizeOptions:f=[],devModeChecks:m={}}=u,y=qu(h),b=qu(f),C=gx(o),w=d(function(){return s++,c.apply(null,arguments)},...y);let T=!0;const A=p(function(){a++;const P=Wu(C,arguments);if(i=w.apply(null,P),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:E,inputStabilityCheck:_}=yx(T,m);if(E.shouldRun&&E.run(c,P,i),_.shouldRun){const x=Wu(C,arguments);_.run({inputSelectorResults:P,inputSelectorResultsCopy:x},{memoize:d,memoizeOptions:y},arguments)}T&&(T=!1)}return i},...b);return Object.assign(A,{resultFunc:c,memoizedResultFunc:w,dependencies:C,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:d,argsMemoize:p})};return Object.assign(n,{withTypes:()=>n}),n}var Px=Yp(Jp),Ax=Object.assign((e,t=Px)=>{mx(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(s=>e[s]);return t(n,(...s)=>s.reduce((a,i,l)=>(a[r[l]]=i,a),{}))},{withTypes:()=>Ax});const Rx=Yp({memoize:wx,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),ce=(e,t,r,n,o,s,a,i,...l)=>{if(l.length>0)throw new Error("Unsupported number of selectors");let c;if(e&&t&&r&&n&&o&&s&&a&&i)c=(u,d,h,p)=>{const f=e(u,d,h,p),m=t(u,d,h,p),y=r(u,d,h,p),b=n(u,d,h,p),C=o(u,d,h,p),w=s(u,d,h,p),T=a(u,d,h,p);return i(f,m,y,b,C,w,T,d,h,p)};else if(e&&t&&r&&n&&o&&s&&a)c=(u,d,h,p)=>{const f=e(u,d,h,p),m=t(u,d,h,p),y=r(u,d,h,p),b=n(u,d,h,p),C=o(u,d,h,p),w=s(u,d,h,p);return a(f,m,y,b,C,w,d,h,p)};else if(e&&t&&r&&n&&o&&s)c=(u,d,h,p)=>{const f=e(u,d,h,p),m=t(u,d,h,p),y=r(u,d,h,p),b=n(u,d,h,p),C=o(u,d,h,p);return s(f,m,y,b,C,d,h,p)};else if(e&&t&&r&&n&&o)c=(u,d,h,p)=>{const f=e(u,d,h,p),m=t(u,d,h,p),y=r(u,d,h,p),b=n(u,d,h,p);return o(f,m,y,b,d,h,p)};else if(e&&t&&r&&n)c=(u,d,h,p)=>{const f=e(u,d,h,p),m=t(u,d,h,p),y=r(u,d,h,p);return n(f,m,y,d,h,p)};else if(e&&t&&r)c=(u,d,h,p)=>{const f=e(u,d,h,p),m=t(u,d,h,p);return r(f,m,d,h,p)};else if(e&&t)c=(u,d,h,p)=>{const f=e(u,d,h,p);return t(f,d,h,p)};else if(e)c=e;else throw new Error("Missing arguments");return c},uc=e=>(...t)=>{const r=new WeakMap;let n=1;const o=t[t.length-1],s=t.length-1||1,a=Math.max(o.length-s,0);if(a>3)throw new Error("Unsupported number of arguments");return(l,c,u,d)=>{let h=l.__cacheKey__;h||(h={id:n},l.__cacheKey__=h,n+=1);let p=r.get(h);if(!p){const f=t.length===1?[b=>b,o]:t;let m=t;const y=[void 0,void 0,void 0];switch(a){case 0:break;case 1:{m=[...f.slice(0,-1),()=>y[0],o];break}case 2:{m=[...f.slice(0,-1),()=>y[0],()=>y[1],o];break}case 3:{m=[...f.slice(0,-1),()=>y[0],()=>y[1],()=>y[2],o];break}default:throw new Error("Unsupported number of arguments")}e&&(m=[...m,e]),p=Rx(...m),p.selectorArgs=y,r.set(h,p)}switch(a){case 3:p.selectorArgs[2]=d;case 2:p.selectorArgs[1]=u;case 1:p.selectorArgs[0]=c}switch(a){case 0:return p(l);case 1:return p(l,c);case 2:return p(l,c,u);case 3:return p(l,c,u,d);default:throw new Error("unreachable")}}},Ge=uc();var cs={exports:{}},ki={};/**
|
|
84
84
|
* @license React
|
|
85
85
|
* use-sync-external-store-shim.production.js
|
|
86
86
|
*
|
|
@@ -88,7 +88,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the MIT license found in the
|
|
90
90
|
* LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/var
|
|
91
|
+
*/var Yu;function Ex(){if(Yu)return ki;Yu=1;var e=G;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,o=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function i(d,h){var p=h(),f=n({inst:{value:p,getSnapshot:h}}),m=f[0].inst,y=f[1];return s(function(){m.value=p,m.getSnapshot=h,l(m)&&y({inst:m})},[d,p,h]),o(function(){return l(m)&&y({inst:m}),d(function(){l(m)&&y({inst:m})})},[d]),a(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 ki.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,ki}var ji={};/**
|
|
92
92
|
* @license React
|
|
93
93
|
* use-sync-external-store-shim.development.js
|
|
94
94
|
*
|
|
@@ -96,7 +96,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
96
96
|
*
|
|
97
97
|
* This source code is licensed under the MIT license found in the
|
|
98
98
|
* LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/var
|
|
99
|
+
*/var Ku;function Ix(){return Ku||(Ku=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||o.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 y=f();s(m,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}y=a({inst:{value:m,getSnapshot:f}});var b=y[0].inst,C=y[1];return l(function(){b.value=m,b.getSnapshot=f,r(b)&&C({inst:b})},[p,m,f]),i(function(){return r(b)&&C({inst:b}),p(function(){r(b)&&C({inst:b})})},[p]),c(m),m}function r(p){var f=p.getSnapshot;p=p.value;try{var m=f();return!s(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 o=G,s=typeof Object.is=="function"?Object.is:e,a=o.useState,i=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;ji.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),ji}var Qu;function dc(){return Qu||(Qu=1,process.env.NODE_ENV==="production"?cs.exports=Ex():cs.exports=Ix()),cs.exports}var _x=dc(),us={exports:{}},$i={};/**
|
|
100
100
|
* @license React
|
|
101
101
|
* use-sync-external-store-shim/with-selector.production.js
|
|
102
102
|
*
|
|
@@ -104,7 +104,7 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the MIT license found in the
|
|
106
106
|
* LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/var
|
|
107
|
+
*/var Xu;function Mx(){if(Xu)return $i;Xu=1;var e=G,t=dc();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,o=t.useSyncExternalStore,s=e.useRef,a=e.useEffect,i=e.useMemo,l=e.useDebugValue;return $i.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var f=s(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function b(O){if(!C){if(C=!0,w=O,O=h(O),p!==void 0&&m.hasValue){var P=m.value;if(p(P,O))return T=P}return T=O}if(P=T,n(w,O))return P;var E=h(O);return p!==void 0&&p(P,E)?(w=O,P):(w=O,T=E)}var C=!1,w,T,A=d===void 0?null:d;return[function(){return b(u())},A===null?void 0:function(){return b(A())}]},[u,d,h,p]);var y=o(c,f[0],f[1]);return a(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},$i}var Di={};/**
|
|
108
108
|
* @license React
|
|
109
109
|
* use-sync-external-store-shim/with-selector.development.js
|
|
110
110
|
*
|
|
@@ -112,19 +112,24 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
112
112
|
*
|
|
113
113
|
* This source code is licensed under the MIT license found in the
|
|
114
114
|
* LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/var yu;function Hb(){return yu||(yu=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=z,r=pp(),n=typeof Object.is=="function"?Object.is:e,a=r.useSyncExternalStore,o=t.useRef,s=t.useEffect,i=t.useMemo,l=t.useDebugValue;li.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(!A){if(A=!0,w=C,C=h(C),p!==void 0&&m.hasValue){var R=m.value;if(p(R,C))return O=R}return O=C}if(R=O,n(w,C))return R;var E=h(C);return p!==void 0&&p(R,E)?(w=C,R):(w=C,O=E)}var A=!1,w,O,T=d===void 0?null:d;return[function(){return S(u())},T===null?void 0:function(){return S(T())}]},[u,d,h,p]);var y=a(c,f[0],f[1]);return s(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),li}var bu;function qb(){return bu||(bu=1,process.env.NODE_ENV==="production"?Ja.exports=Gb():Ja.exports=Hb()),Ja.exports}var Wb=qb();const Jb=Object.is,ot=(e,t,r=[],n=Jb)=>{const a=o=>t(o,...r);return Wb.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a,n)},Yb="DEFAULT_X_AXIS_KEY",Kb="DEFAULT_Y_AXIS_KEY",Qb={top:20,bottom:20,left:20,right:20},Xb=45,Zb=25,mp=20,Tn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},Pn=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},ex=pe([Pn],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)),tx=pe([Pn],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)),rx=pe([Tn],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)),nx=pe([Tn],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)),ax=e=>e.dimensions,fp=e=>e.dimensions.width,gp=e=>e.dimensions.height,ox=e=>e.dimensions.margin.top,sx=e=>e.dimensions.margin.right,ix=e=>e.dimensions.margin.bottom,lx=e=>e.dimensions.margin.left,Ra=pe([fp,gp,ox,sx,ix,lx,rx,tx,nx,ex],(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})),cx=pe([ax],e=>({width:e.propsWidth,height:e.propsHeight})),ux=pe([fp,gp],(e,t)=>({width:e,height:t}));function yp(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?K({},t,e):e}const dx=10,fs=({params:e,store:t,svgRef:r})=>{const n=e.width!==void 0&&e.height!==void 0,a=N.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[o,s]=N.useState(0),[i,l]=N.useState(0),c=N.useCallback(()=>{const f=r==null?void 0:r.current;if(!f)return{};const y=Fb(f).getComputedStyle(f),S=Math.floor(parseFloat(y.height))||0,A=Math.floor(parseFloat(y.width))||0;return t.update(w=>w.dimensions.width===A&&w.dimensions.height===S?w:K({},w,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:e.width??A,height:e.height??S,propsWidth:e.width,propsHeight:e.height}})),{height:S,width:A}},[t,r,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]);N.useEffect(()=>{t.update(f=>{const m=e.width??f.dimensions.width,y=e.height??f.dimensions.height;return K({},f,{dimensions:{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:m,height:y,propsHeight:e.height,propsWidth:e.width}})})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),N.useEffect(()=>{a.current.displayError=!0},[]),Dt(()=>{if(n||!a.current.initialCompute||a.current.computeRun>dx)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]),Dt(()=>{if(n)return()=>{};c();const f=r.current;if(typeof ResizeObserver>"u")return()=>{};let m;const y=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{c()})});return f&&y.observe(f),()=>{m&&cancelAnimationFrame(m),f&&y.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,Ra),d=N.useCallback(f=>f>=u.left-1&&f<=u.left+u.width,[u.left,u.width]),h=N.useCallback(f=>f>=u.top-1&&f<=u.top+u.height,[u.height,u.top]);return{instance:{isPointInside:N.useCallback((f,m,y)=>y&&"closest"in y&&y.closest("[data-drawing-container]")?!0:d(f)&&h(m),[d,h]),isXInside:d,isYInside:h}}};fs.params={width:!0,height:!0,margin:!0};fs.getDefaultizedParams=({params:e})=>K({},e,{margin:yp(e.margin,Qb)});fs.getInitialState=({width:e,height:t,margin:r})=>({dimensions:{margin:r,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const Dl=({params:e,store:t})=>(Dt(()=>{t.update(r=>K({},r,{experimentalFeatures:e.experimentalFeatures}))},[t,e.experimentalFeatures]),{});Dl.params={experimentalFeatures:!0};Dl.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const hx=e=>e.experimentalFeatures,bp=pe([hx],e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let xu=0;const px=()=>(xu+=1,`mui-chart-${xu}`),Ll=({params:e,store:t})=>(N.useEffect(()=>{t.update(r=>e.id===void 0||e.id===r.id.providedChartId&&r.id.chartId!==void 0?r:K({},r,{id:K({},r.id,{chartId:e.id??px()})}))},[t,e.id]),{});Ll.params={id:!0};Ll.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const mx=e=>e.id,fx=pe([mx],e=>e.chartId),gx=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],yx=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],xp=e=>e==="dark"?yx:gx,vp=({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},gs=({params:e,store:t,seriesConfig:r})=>{const{series:n,dataset:a,theme:o,colors:s}=e,i=N.useRef(!0);return N.useEffect(()=>{if(i.current){i.current=!1;return}t.update(l=>K({},l,{series:K({},l.series,{processedSeries:vp({series:n,colors:typeof s=="function"?s(o):s,seriesConfig:r,dataset:a})})}))},[s,a,n,o,r,t]),{}};gs.params={dataset:!0,series:!0,colors:!0,theme:!0};const bx=[];gs.getDefaultizedParams=({params:e})=>{var t;return K({},e,{series:(t=e.series)!=null&&t.length?e.series:bx,colors:e.colors??xp,theme:e.theme??"light"})};gs.getInitialState=({series:e=[],colors:t,theme:r,dataset:n},a,o)=>({series:{seriesConfig:o,processedSeries:vp({series:e,colors:typeof t=="function"?t(r):t,seriesConfig:o,dataset:n})}});const Sp=e=>e.series,Aa=pe([Sp],e=>e.processedSeries),ys=pe([Sp],e=>e.seriesConfig),xx={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 wp{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 xx)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 vx{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 Sx{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 wx{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=K({},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 Cx{constructor(t){this.gestureTemplates=new Map,this.elementGestureMap=new Map,this.activeGesturesRegistry=new vx,this.pointerManager=void 0,this.keyboardManager=new Sx,this.pointerManager=new wx({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 Ia extends wp{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 Ox(e,t){const r=t.x-e.x,n=t.y-e.y;return Math.sqrt(r*r+n*n)}function ci(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+=Ox({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 Yt(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 Rn(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const Ka=1e-5,ar=1e-5,vu=.15;function Tx(e,t){const r=t.x-e.x,n=t.y-e.y,a={vertical:null,horizontal:null,mainAxis:null},o=Px(t,e),s=Math.abs(r)>Math.abs(n)?"horizontal":"vertical",i=o||s==="horizontal"?Ka:vu,l=o?Ka:s==="horizontal"?vu:Ka;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 Px(e,t){const r=t.x-e.x,n=t.y-e.y,a=Math.atan2(n,r)*180/Math.PI;return a>=-45+ar&&a<=-22.5+ar||a>=22.5+ar&&a<=45+ar||a>=135+ar&&a<=157.5+ar||a>=-157.5+ar&&a<=-135+ar}function Rx(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 Ax=0,Ix=e=>e>Ax?1:e<-0?-1:0;class Bl extends Ia{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 Bl(K({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||Yt(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=Rn(this.name,r),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,detail:i});t.dispatchEvent(c)}}class Fl extends Ia{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 Fl(K({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=K({},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=Yt(o),this.state.lastCentroid=K({},this.state.startCentroid));break;case"pointermove":if(this.state.startCentroid&&o.length>=this.minPointers){const s=Yt(o),i=s.x-this.state.startCentroid.x,l=s.y-this.state.startCentroid.y,c=Math.sqrt(i*i+l*l),u=Tx(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&&Rx(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,A;if(!this.state.startCentroid)return;const s=((S=this.state.lastDeltas)==null?void 0:S.x)??0,i=((A=this.state.lastDeltas)==null?void 0:A.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=Rn(this.name,r),y=new CustomEvent(m,{bubbles:!0,cancelable:!0,detail:f});t.dispatchEvent(y),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 Nl extends Ia{constructor(t){super(K({},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 Nl(K({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=K({},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=ci(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=ci(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=ci(s);this.state.startDistance=i/this.state.lastScale}}break}}emitPinchEvent(t,r,n,a){const o=Yt(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:Ix(this.state.velocity),customData:this.customData};this.preventDefault&&a.preventDefault(),this.stopPropagation&&a.stopPropagation();const u=Rn(this.name,r),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,detail:c});t.dispatchEvent(d)}}class zl extends Ia{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 zl(K({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=K({},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=Yt(o),this.state.lastPosition=K({},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=Yt(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=Rn(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 Gl extends Ia{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 Gl(K({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=Yt(o),this.state.lastPosition=K({},this.state.startCentroid),this.isActive=!0,this.originalTarget=a);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const s=Yt(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=Rn(this.name,"cancel"),l=new CustomEvent(i,{bubbles:!0,cancelable:!0,detail:s});t.dispatchEvent(l)}this.resetState()}}class Hl extends wp{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 Hl(K({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?Yt(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=Rn(this.name,"ongoing"),i=new CustomEvent(s,{bubbles:!0,cancelable:!0,detail:o});this.element.dispatchEvent(i)}}const Kr=e=>e.preventDefault(),ql=({svgRef:e})=>{N.useEffect(()=>{const r=e.current;if(!r)return;const n=new Cx({gestures:[new Fl({name:"pan",threshold:0,maxPointers:1}),new Bl({name:"move",preventIf:["pan","pinch"]}),new Nl({name:"pinch",threshold:5,preventIf:["pan"]}),new Hl({name:"turnWheel",sensitivity:.01,initialDelta:1}),new Gl({name:"tap",maxDistance:10,preventIf:["pan","pinch"]}),new zl({name:"quickPress",duration:50,maxDistance:10})]});return n.registerElement(["pan","move","pinch","turnWheel","tap","quickPress"],r),()=>{n.destroy()}},[e]);const t=N.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 N.useEffect(()=>{const r=e.current;return r==null||r.addEventListener("gesturestart",Kr),r==null||r.addEventListener("gesturechange",Kr),r==null||r.addEventListener("gestureend",Kr),()=>{r==null||r.removeEventListener("gesturestart",Kr),r==null||r.removeEventListener("gesturechange",Kr),r==null||r.removeEventListener("gestureend",Kr)}},[e]),{instance:{addInteractionListener:t}}};ql.params={};ql.getInitialState=()=>({});const Ex=[Ll,Dl,fs,gs,ql,ms],_x=["apiRef"],Vx=e=>{let{plugins:t}=e,r=dr(e.props,_x);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 Su=0;function Mx(e,t,r){const n=bb(),a=N.useMemo(()=>[...Ex,...e],[e]),o=Vx({plugins:a,props:t});o.id=o.id??n;const i=N.useRef({}).current,l=kx(t.apiRef),c=N.useRef(null),u=N.useRef(null),d=N.useRef(null);if(d.current==null){Su+=1;const f={cacheKey:{id:Su}};a.forEach(m=>{m.getInitialState&&Object.assign(f,m.getInitialState(o,f,r))}),d.current=new xb(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:N.useMemo(()=>({store:d.current,publicAPI:l.current,instance:i,svgRef:u,chartRootRef:c}),[i,l])}}function jx(e){return e.current==null&&(e.current={}),e}function kx(e){const t=N.useRef({});return e?jx(e):t}const Wl=N.createContext(null);process.env.NODE_ENV!=="production"&&(Wl.displayName="ChartContext");const wu=new Set;function ha(e,t="warning"){if(process.env.NODE_ENV==="production")return;const r=Array.isArray(e)?e.join(`
|
|
116
|
-
`):e;wu.has(r)||(wu.add(r),t==="error"?console.error(r):console.warn(r))}function $x(e){const{componentName:t,propName:r,controlled:n,defaultValue:a,warningPrefix:o="MUI X"}=e,[{initialDefaultValue:s,isControlled:i}]=N.useState({initialDefaultValue:a,isControlled:n!==void 0});i!==(n!==void 0)&&ha([`${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)&&ha([`${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 Cp=process.env.NODE_ENV==="production"?()=>{}:$x,Op=4,Tp=20+2*Op,Ux=40+2*Op,Dx="hover",Qa={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",slider:{enabled:!1,preview:!1,size:Tp,showTooltip:Dx}},Jl=(e,t,r)=>{var n;if(e)return e===!0?K({axisId:t,axisDirection:r},Qa):K({axisId:t,axisDirection:r},Qa,e,{slider:K({},Qa.slider,{size:((n=e.slider)==null?void 0:n.preview)??Qa.slider.preview?Ux:Tp},e.slider)})};function Pp(e,t){const r={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:Yb,scaleType:"linear"}]).map((o,s)=>{var p;const i=o.dataKey,l=s===0?"bottom":"none",c=o.position??l,u=Zb+(o.label?mp:0),d=o.id??`defaultized-x-axis-${s}`,h=K({offset:r[c]},o,{id:d,position:c,height:o.height??u,zoom:Jl(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 K({},h,{data:t.map(f=>f[i])})})}function Rp(e,t){const r={right:0,left: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?"left":"none",c=o.position??l,u=Xb+(o.label?mp:0),d=o.id??`defaultized-y-axis-${s}`,h=K({offset:r[c]},o,{id:d,position:c,width:o.width??u,zoom:Jl(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 K({},h,{data:t.map(f=>f[i])})})}function xo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Lx(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Yl(e){let t,r,n;e.length!==2?(t=xo,r=(i,l)=>xo(e(i),l),n=(i,l)=>e(i)-l):(t=e===xo||e===Lx?e:Bx,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 Bx(){return 0}function Fx(e){return e===null?NaN:+e}const Nx=Yl(xo),Ap=Nx.right;Yl(Fx).center;class Cu extends Map{constructor(t,r=Hx){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(Ou(this,t))}has(t){return super.has(Ou(this,t))}set(t,r){return super.set(zx(this,t),r)}delete(t){return super.delete(Gx(this,t))}}function Ou({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function zx({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Gx({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function Hx(e){return e!==null&&typeof e=="object"?e.valueOf():e}const qx=Math.sqrt(50),Wx=Math.sqrt(10),Jx=Math.sqrt(2);function Mo(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>=qx?10:o>=Wx?5:o>=Jx?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?Mo(e,t,r*2):[i,l,c]}function qi(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?Mo(t,e,r):Mo(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 Wi(e,t,r){return t=+t,e=+e,r=+r,Mo(e,t,r)[2]}function Ji(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Wi(t,e,r):Wi(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function Yx(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 gr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Kx(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 Tu=Symbol("implicit");function jo(){var e=new Cu,t=[],r=[],n=Tu;function a(o){let s=e.get(o);if(s===void 0){if(n!==Tu)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 Cu;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 jo(t,r).unknown(n)},gr.apply(a,arguments),a}function Kl(){var e=jo().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 y=Yx(h).map(function(S){return f+o*S});return r(p?y.reverse():y)}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 Kl(t(),[n,a]).round(i).paddingInner(l).paddingOuter(c).align(u)},gr.apply(d(),arguments)}function Ip(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ip(t())},e}function Qx(){return Ip(Kl.apply(null,arguments).paddingInner(1))}function Ql(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ep(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ea(){}var pa=.7,ko=1/pa,dn="\\s*([+-]?\\d+)\\s*",ma="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ut="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Xx=/^#([0-9a-f]{3,8})$/,Zx=new RegExp(`^rgb\\(${dn},${dn},${dn}\\)$`),ev=new RegExp(`^rgb\\(${Ut},${Ut},${Ut}\\)$`),tv=new RegExp(`^rgba\\(${dn},${dn},${dn},${ma}\\)$`),rv=new RegExp(`^rgba\\(${Ut},${Ut},${Ut},${ma}\\)$`),nv=new RegExp(`^hsl\\(${ma},${Ut},${Ut}\\)$`),av=new RegExp(`^hsla\\(${ma},${Ut},${Ut},${ma}\\)$`),Pu={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};Ql(Ea,fa,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ru,formatHex:Ru,formatHex8:ov,formatHsl:sv,formatRgb:Au,toString:Au});function Ru(){return this.rgb().formatHex()}function ov(){return this.rgb().formatHex8()}function sv(){return _p(this).formatHsl()}function Au(){return this.rgb().formatRgb()}function fa(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Xx.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Iu(t):r===3?new st(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Xa(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Xa(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=Zx.exec(e))?new st(t[1],t[2],t[3],1):(t=ev.exec(e))?new st(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tv.exec(e))?Xa(t[1],t[2],t[3],t[4]):(t=rv.exec(e))?Xa(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nv.exec(e))?Vu(t[1],t[2]/100,t[3]/100,1):(t=av.exec(e))?Vu(t[1],t[2]/100,t[3]/100,t[4]):Pu.hasOwnProperty(e)?Iu(Pu[e]):e==="transparent"?new st(NaN,NaN,NaN,0):null}function Iu(e){return new st(e>>16&255,e>>8&255,e&255,1)}function Xa(e,t,r,n){return n<=0&&(e=t=r=NaN),new st(e,t,r,n)}function iv(e){return e instanceof Ea||(e=fa(e)),e?(e=e.rgb(),new st(e.r,e.g,e.b,e.opacity)):new st}function Yi(e,t,r,n){return arguments.length===1?iv(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}Ql(st,Yi,Ep(Ea,{brighter(e){return e=e==null?ko:Math.pow(ko,e),new st(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pa:Math.pow(pa,e),new st(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new st(Pr(this.r),Pr(this.g),Pr(this.b),$o(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:Eu,formatHex:Eu,formatHex8:lv,formatRgb:_u,toString:_u}));function Eu(){return`#${wr(this.r)}${wr(this.g)}${wr(this.b)}`}function lv(){return`#${wr(this.r)}${wr(this.g)}${wr(this.b)}${wr((isNaN(this.opacity)?1:this.opacity)*255)}`}function _u(){const e=$o(this.opacity);return`${e===1?"rgb(":"rgba("}${Pr(this.r)}, ${Pr(this.g)}, ${Pr(this.b)}${e===1?")":`, ${e})`}`}function $o(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Pr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function wr(e){return e=Pr(e),(e<16?"0":"")+e.toString(16)}function Vu(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 _p(e){if(e instanceof Ot)return new Ot(e.h,e.s,e.l,e.opacity);if(e instanceof Ea||(e=fa(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 cv(e,t,r,n){return arguments.length===1?_p(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}Ql(Ot,cv,Ep(Ea,{brighter(e){return e=e==null?ko:Math.pow(ko,e),new Ot(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pa:Math.pow(pa,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(ui(e>=240?e-240:e+120,a,n),ui(e,a,n),ui(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Ot(Mu(this.h),Za(this.s),Za(this.l),$o(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=$o(this.opacity);return`${e===1?"hsl(":"hsla("}${Mu(this.h)}, ${Za(this.s)*100}%, ${Za(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Mu(e){return e=(e||0)%360,e<0?e+360:e}function Za(e){return Math.max(0,Math.min(1,e||0))}function ui(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 Xl=e=>()=>e;function uv(e,t){return function(r){return e+r*t}}function dv(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 hv(e){return(e=+e)==1?Vp:function(t,r){return r-t?dv(t,r,e):Xl(isNaN(t)?r:t)}}function Vp(e,t){var r=t-e;return r?uv(e,r):Xl(isNaN(e)?t:e)}const ju=function e(t){var r=hv(t);function n(a,o){var s=r((a=Yi(a)).r,(o=Yi(o)).r),i=r(a.g,o.g),l=r(a.b,o.b),c=Vp(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 pv(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 mv(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function fv(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]=bs(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 Zl(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Tt(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function gv(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]=bs(e[a],t[a]):n[a]=t[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var Ki=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,di=new RegExp(Ki.source,"g");function yv(e){return function(){return e}}function bv(e){return function(t){return e(t)+""}}function xv(e,t){var r=Ki.lastIndex=di.lastIndex=0,n,a,o,s=-1,i=[],l=[];for(e=e+"",t=t+"";(n=Ki.exec(e))&&(a=di.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:Tt(n,a)})),r=di.lastIndex;return r<t.length&&(o=t.slice(r),i[s]?i[s]+=o:i[++s]=o),i.length<2?l[0]?bv(l[0].x):yv(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 bs(e,t){var r=typeof t,n;return t==null||r==="boolean"?Xl(t):(r==="number"?Tt:r==="string"?(n=fa(t))?(t=n,ju):xv:t instanceof fa?ju:t instanceof Date?Zl:mv(t)?pv:Array.isArray(t)?fv:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?gv:Tt)(e,t)}function Mp(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function vv(e){return function(){return e}}function Sv(e){return+e}var ku=[0,1];function yt(e){return e}function Qi(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:vv(isNaN(t)?NaN:.5)}function wv(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function Cv(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 Ov(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=Ap(e,i,1,n)-1;return o[l](a[l](i))}}function xs(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ec(){var e=ku,t=ku,r=bs,n,a,o,s=yt,i,l,c;function u(){var h=Math.min(e.length,t.length);return s!==yt&&(s=wv(e[0],e[h-1])),i=h>2?Ov:Cv,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),Tt)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,Sv),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=Mp,u()},d.clamp=function(h){return arguments.length?(s=h?!0:yt,u()):s!==yt},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 jp(){return ec()(yt,yt)}function Tv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Uo(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 gn(e){return e=Uo(Math.abs(e)),e?e[1]:NaN}function Pv(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 Rv(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var Av=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ga(e){if(!(t=Av.exec(e)))throw new Error("invalid format: "+e);var t;return new tc({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]})}ga.prototype=tc.prototype;function tc(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+""}tc.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 Iv(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 kp;function Ev(e,t){var r=Uo(e,t);if(!r)return e+"";var n=r[0],a=r[1],o=a-(kp=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")+Uo(e,Math.max(0,t+o-1))[0]}function $u(e,t){var r=Uo(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 Uu={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Tv,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:Ev,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Du(e){return e}var Lu=Array.prototype.map,Bu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _v(e){var t=e.grouping===void 0||e.thousands===void 0?Du:Pv(Lu.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?Du:Rv(Lu.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=ga(d);var h=d.fill,p=d.align,f=d.sign,m=d.symbol,y=d.zero,S=d.width,A=d.comma,w=d.precision,O=d.trim,T=d.type;T==="n"?(A=!0,T="g"):Uu[T]||(w===void 0&&(w=12),O=!0,T="g"),(y||h==="0"&&p==="=")&&(y=!0,h="0",p="=");var C=m==="$"?r:m==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",R=m==="$"?n:/[%p]/.test(T)?s:"",E=Uu[T],V=/[defgprs%]/.test(T);w=w===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function b(I){var G=C,M=R,H,ne,re;if(T==="c")M=E(I)+M,I="";else{I=+I;var ae=I<0||1/I<0;if(I=isNaN(I)?l:E(Math.abs(I),w),O&&(I=Iv(I)),ae&&+I==0&&f!=="+"&&(ae=!1),G=(ae?f==="("?f:i:f==="-"||f==="("?"":f)+G,M=(T==="s"?Bu[8+kp/3]:"")+M+(ae&&f==="("?")":""),V){for(H=-1,ne=I.length;++H<ne;)if(re=I.charCodeAt(H),48>re||re>57){M=(re===46?a+I.slice(H+1):I.slice(H))+M,I=I.slice(0,H);break}}}A&&!y&&(I=t(I,1/0));var ee=G.length+I.length+M.length,le=ee<S?new Array(S-ee+1).join(h):"";switch(A&&y&&(I=t(le+I,le.length?S-M.length:1/0),le=""),p){case"<":I=G+I+M+le;break;case"=":I=G+le+I+M;break;case"^":I=le.slice(0,ee=le.length>>1)+G+I+M+le.slice(ee);break;default:I=le+G+I+M;break}return o(I)}return b.toString=function(){return d+""},b}function u(d,h){var p=c((d=ga(d),d.type="f",d)),f=Math.max(-8,Math.min(8,Math.floor(gn(h)/3)))*3,m=Math.pow(10,-f),y=Bu[8+f/3];return function(S){return p(m*S)+y}}return{format:c,formatPrefix:u}}var eo,rc,$p;Vv({thousands:",",grouping:[3],currency:["$",""]});function Vv(e){return eo=_v(e),rc=eo.format,$p=eo.formatPrefix,eo}function Mv(e){return Math.max(0,-gn(Math.abs(e)))}function jv(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(gn(t)/3)))*3-gn(Math.abs(e)))}function kv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,gn(t)-gn(e))+1}function $v(e,t,r,n){var a=Ji(e,t,r),o;switch(n=ga(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=jv(a,s))&&(n.precision=o),$p(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=kv(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=Mv(a))&&(n.precision=o-(n.type==="%")*2);break}}return rc(n)}function nc(e){var t=e.domain;return e.ticks=function(r){var n=t();return qi(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return $v(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=Wi(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 Up(){var e=jp();return e.copy=function(){return xs(e,Up())},gr.apply(e,arguments),nc(e)}function Dp(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 Fu(e){return Math.log(e)}function Nu(e){return Math.exp(e)}function Uv(e){return-Math.log(-e)}function Dv(e){return-Math.exp(-e)}function Lv(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Bv(e){return e===10?Lv:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Fv(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 zu(e){return(t,r)=>-e(-t,r)}function Nv(e){const t=e(Fu,Nu),r=t.domain;let n=10,a,o;function s(){return a=Fv(n),o=Bv(n),r()[0]<0?(a=zu(a),o=zu(o),e(Uv,Dv)):e(Fu,Nu),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 y=i==null?10:+i;let S=[];if(!(n%1)&&p-h<y){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<y&&(S=qi(c,u,y))}else S=qi(h,p,Math.min(p-h,y)).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=ga(l)).precision==null&&(l.trim=!0),l=rc(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(Dp(r(),{floor:i=>o(Math.floor(a(i))),ceil:i=>o(Math.ceil(a(i)))})),t}function Lp(){const e=Nv(ec()).domain([1,10]);return e.copy=()=>xs(e,Lp()).base(e.base()),gr.apply(e,arguments),e}function Gu(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function zv(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Gv(e){return e<0?-e*e:e*e}function Hv(e){var t=e(yt,yt),r=1;function n(){return r===1?e(yt,yt):r===.5?e(zv,Gv):e(Gu(r),Gu(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},nc(t)}function ac(){var e=Hv(ec());return e.copy=function(){return xs(e,ac()).exponent(e.exponent())},gr.apply(e,arguments),e}function qv(){return ac.apply(null,arguments).exponent(.5)}function Bp(){var e=[.5],t=[0,1],r,n=1;function a(o){return o!=null&&o<=o?t[Ap(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 Bp().domain(e).range(t).unknown(r)},gr.apply(a,arguments)}const hi=new Date,pi=new Date;function ze(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=>ze(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)=>(hi.setTime(+o),pi.setTime(+s),e(hi),e(pi),Math.floor(r(hi,pi))),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 Do=ze(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Do.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ze(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Do);Do.range;const Ht=1e3,bt=Ht*60,qt=bt*60,Kt=qt*24,oc=Kt*7,Hu=Kt*30,mi=Kt*365,Cr=ze(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ht)},(e,t)=>(t-e)/Ht,e=>e.getUTCSeconds());Cr.range;const sc=ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ht)},(e,t)=>{e.setTime(+e+t*bt)},(e,t)=>(t-e)/bt,e=>e.getMinutes());sc.range;const ic=ze(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*bt)},(e,t)=>(t-e)/bt,e=>e.getUTCMinutes());ic.range;const lc=ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ht-e.getMinutes()*bt)},(e,t)=>{e.setTime(+e+t*qt)},(e,t)=>(t-e)/qt,e=>e.getHours());lc.range;const cc=ze(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*qt)},(e,t)=>(t-e)/qt,e=>e.getUTCHours());cc.range;const _a=ze(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*bt)/Kt,e=>e.getDate()-1);_a.range;const vs=ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kt,e=>e.getUTCDate()-1);vs.range;const Fp=ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kt,e=>Math.floor(e/Kt));Fp.range;function jr(e){return ze(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())*bt)/oc)}const Ss=jr(0),Lo=jr(1),Wv=jr(2),Jv=jr(3),yn=jr(4),Yv=jr(5),Kv=jr(6);Ss.range;Lo.range;Wv.range;Jv.range;yn.range;Yv.range;Kv.range;function kr(e){return ze(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)/oc)}const ws=kr(0),Bo=kr(1),Qv=kr(2),Xv=kr(3),bn=kr(4),Zv=kr(5),e1=kr(6);ws.range;Bo.range;Qv.range;Xv.range;bn.range;Zv.range;e1.range;const uc=ze(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());uc.range;const dc=ze(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());dc.range;const Qt=ze(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());Qt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ze(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)});Qt.range;const Xt=ze(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());Xt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ze(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)});Xt.range;function Np(e,t,r,n,a,o){const s=[[Cr,1,Ht],[Cr,5,5*Ht],[Cr,15,15*Ht],[Cr,30,30*Ht],[o,1,bt],[o,5,5*bt],[o,15,15*bt],[o,30,30*bt],[a,1,qt],[a,3,3*qt],[a,6,6*qt],[a,12,12*qt],[n,1,Kt],[n,2,2*Kt],[r,1,oc],[t,1,Hu],[t,3,3*Hu],[e,1,mi]];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=Yl(([,,y])=>y).right(s,h);if(p===s.length)return e.every(Ji(c/mi,u/mi,d));if(p===0)return Do.every(Math.max(Ji(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[t1,r1]=Np(Xt,dc,ws,Fp,cc,ic),[n1,a1]=Np(Qt,uc,Ss,_a,lc,sc);function fi(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 gi(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 Bn(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function o1(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=Fn(a),u=Nn(a),d=Fn(o),h=Nn(o),p=Fn(s),f=Nn(s),m=Fn(i),y=Nn(i),S=Fn(l),A=Nn(l),w={a:ae,A:ee,b:le,B:J,c:null,d:Qu,e:Qu,f:A1,g:D1,G:B1,H:T1,I:P1,j:R1,L:zp,m:I1,M:E1,p:Z,q:he,Q:ed,s:td,S:_1,u:V1,U:M1,V:j1,w:k1,W:$1,x:null,X:null,y:U1,Y:L1,Z:F1,"%":Zu},O={a:Ae,A:Ge,b:Oe,B:lt,c:null,d:Xu,e:Xu,f:H1,g:tS,G:nS,H:N1,I:z1,j:G1,L:Hp,m:q1,M:W1,p:rt,q:be,Q:ed,s:td,S:J1,u:Y1,U:K1,V:Q1,w:X1,W:Z1,x:null,X:null,y:eS,Y:rS,Z:aS,"%":Zu},T={a:b,A:I,b:G,B:M,c:H,d:Yu,e:Yu,f:S1,g:Ju,G:Wu,H:Ku,I:Ku,j:y1,L:v1,m:g1,M:b1,p:V,q:f1,Q:C1,s:O1,S:x1,u:u1,U:d1,V:h1,w:c1,W:p1,x:ne,X:re,y:Ju,Y:Wu,Z:m1,"%":w1};w.x=C(r,w),w.X=C(n,w),w.c=C(t,w),O.x=C(r,O),O.X=C(n,O),O.c=C(t,O);function C(X,oe){return function(ce){var Y=[],xe=-1,me=0,Je=X.length,He,je,nr;for(ce instanceof Date||(ce=new Date(+ce));++xe<Je;)X.charCodeAt(xe)===37&&(Y.push(X.slice(me,xe)),(je=qu[He=X.charAt(++xe)])!=null?He=X.charAt(++xe):je=He==="e"?" ":"0",(nr=oe[He])&&(He=nr(ce,je)),Y.push(He),me=xe+1);return Y.push(X.slice(me,xe)),Y.join("")}}function R(X,oe){return function(ce){var Y=Bn(1900,void 0,1),xe=E(Y,X,ce+="",0),me,Je;if(xe!=ce.length)return null;if("Q"in Y)return new Date(Y.Q);if("s"in Y)return new Date(Y.s*1e3+("L"in Y?Y.L:0));if(oe&&!("Z"in Y)&&(Y.Z=0),"p"in Y&&(Y.H=Y.H%12+Y.p*12),Y.m===void 0&&(Y.m="q"in Y?Y.q:0),"V"in Y){if(Y.V<1||Y.V>53)return null;"w"in Y||(Y.w=1),"Z"in Y?(me=gi(Bn(Y.y,0,1)),Je=me.getUTCDay(),me=Je>4||Je===0?Bo.ceil(me):Bo(me),me=vs.offset(me,(Y.V-1)*7),Y.y=me.getUTCFullYear(),Y.m=me.getUTCMonth(),Y.d=me.getUTCDate()+(Y.w+6)%7):(me=fi(Bn(Y.y,0,1)),Je=me.getDay(),me=Je>4||Je===0?Lo.ceil(me):Lo(me),me=_a.offset(me,(Y.V-1)*7),Y.y=me.getFullYear(),Y.m=me.getMonth(),Y.d=me.getDate()+(Y.w+6)%7)}else("W"in Y||"U"in Y)&&("w"in Y||(Y.w="u"in Y?Y.u%7:"W"in Y?1:0),Je="Z"in Y?gi(Bn(Y.y,0,1)).getUTCDay():fi(Bn(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(Je+5)%7:Y.w+Y.U*7-(Je+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,gi(Y)):fi(Y)}}function E(X,oe,ce,Y){for(var xe=0,me=oe.length,Je=ce.length,He,je;xe<me;){if(Y>=Je)return-1;if(He=oe.charCodeAt(xe++),He===37){if(He=oe.charAt(xe++),je=T[He in qu?oe.charAt(xe++):He],!je||(Y=je(X,ce,Y))<0)return-1}else if(He!=ce.charCodeAt(Y++))return-1}return Y}function V(X,oe,ce){var Y=c.exec(oe.slice(ce));return Y?(X.p=u.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function b(X,oe,ce){var Y=p.exec(oe.slice(ce));return Y?(X.w=f.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function I(X,oe,ce){var Y=d.exec(oe.slice(ce));return Y?(X.w=h.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function G(X,oe,ce){var Y=S.exec(oe.slice(ce));return Y?(X.m=A.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function M(X,oe,ce){var Y=m.exec(oe.slice(ce));return Y?(X.m=y.get(Y[0].toLowerCase()),ce+Y[0].length):-1}function H(X,oe,ce){return E(X,t,oe,ce)}function ne(X,oe,ce){return E(X,r,oe,ce)}function re(X,oe,ce){return E(X,n,oe,ce)}function ae(X){return s[X.getDay()]}function ee(X){return o[X.getDay()]}function le(X){return l[X.getMonth()]}function J(X){return i[X.getMonth()]}function Z(X){return a[+(X.getHours()>=12)]}function he(X){return 1+~~(X.getMonth()/3)}function Ae(X){return s[X.getUTCDay()]}function Ge(X){return o[X.getUTCDay()]}function Oe(X){return l[X.getUTCMonth()]}function lt(X){return i[X.getUTCMonth()]}function rt(X){return a[+(X.getUTCHours()>=12)]}function be(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var oe=C(X+="",w);return oe.toString=function(){return X},oe},parse:function(X){var oe=R(X+="",!1);return oe.toString=function(){return X},oe},utcFormat:function(X){var oe=C(X+="",O);return oe.toString=function(){return X},oe},utcParse:function(X){var oe=R(X+="",!0);return oe.toString=function(){return X},oe}}}var qu={"-":"",_:" ",0:"0"},We=/^\s*\d+/,s1=/^%/,i1=/[\\^$*+?|[\]().{}]/g;function ye(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 l1(e){return e.replace(i1,"\\$&")}function Fn(e){return new RegExp("^(?:"+e.map(l1).join("|")+")","i")}function Nn(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function c1(e,t,r){var n=We.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function u1(e,t,r){var n=We.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function d1(e,t,r){var n=We.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function h1(e,t,r){var n=We.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function p1(e,t,r){var n=We.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Wu(e,t,r){var n=We.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Ju(e,t,r){var n=We.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function m1(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 f1(e,t,r){var n=We.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function g1(e,t,r){var n=We.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Yu(e,t,r){var n=We.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function y1(e,t,r){var n=We.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Ku(e,t,r){var n=We.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function b1(e,t,r){var n=We.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function x1(e,t,r){var n=We.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function v1(e,t,r){var n=We.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function S1(e,t,r){var n=We.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function w1(e,t,r){var n=s1.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function C1(e,t,r){var n=We.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function O1(e,t,r){var n=We.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Qu(e,t){return ye(e.getDate(),t,2)}function T1(e,t){return ye(e.getHours(),t,2)}function P1(e,t){return ye(e.getHours()%12||12,t,2)}function R1(e,t){return ye(1+_a.count(Qt(e),e),t,3)}function zp(e,t){return ye(e.getMilliseconds(),t,3)}function A1(e,t){return zp(e,t)+"000"}function I1(e,t){return ye(e.getMonth()+1,t,2)}function E1(e,t){return ye(e.getMinutes(),t,2)}function _1(e,t){return ye(e.getSeconds(),t,2)}function V1(e){var t=e.getDay();return t===0?7:t}function M1(e,t){return ye(Ss.count(Qt(e)-1,e),t,2)}function Gp(e){var t=e.getDay();return t>=4||t===0?yn(e):yn.ceil(e)}function j1(e,t){return e=Gp(e),ye(yn.count(Qt(e),e)+(Qt(e).getDay()===4),t,2)}function k1(e){return e.getDay()}function $1(e,t){return ye(Lo.count(Qt(e)-1,e),t,2)}function U1(e,t){return ye(e.getFullYear()%100,t,2)}function D1(e,t){return e=Gp(e),ye(e.getFullYear()%100,t,2)}function L1(e,t){return ye(e.getFullYear()%1e4,t,4)}function B1(e,t){var r=e.getDay();return e=r>=4||r===0?yn(e):yn.ceil(e),ye(e.getFullYear()%1e4,t,4)}function F1(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function Xu(e,t){return ye(e.getUTCDate(),t,2)}function N1(e,t){return ye(e.getUTCHours(),t,2)}function z1(e,t){return ye(e.getUTCHours()%12||12,t,2)}function G1(e,t){return ye(1+vs.count(Xt(e),e),t,3)}function Hp(e,t){return ye(e.getUTCMilliseconds(),t,3)}function H1(e,t){return Hp(e,t)+"000"}function q1(e,t){return ye(e.getUTCMonth()+1,t,2)}function W1(e,t){return ye(e.getUTCMinutes(),t,2)}function J1(e,t){return ye(e.getUTCSeconds(),t,2)}function Y1(e){var t=e.getUTCDay();return t===0?7:t}function K1(e,t){return ye(ws.count(Xt(e)-1,e),t,2)}function qp(e){var t=e.getUTCDay();return t>=4||t===0?bn(e):bn.ceil(e)}function Q1(e,t){return e=qp(e),ye(bn.count(Xt(e),e)+(Xt(e).getUTCDay()===4),t,2)}function X1(e){return e.getUTCDay()}function Z1(e,t){return ye(Bo.count(Xt(e)-1,e),t,2)}function eS(e,t){return ye(e.getUTCFullYear()%100,t,2)}function tS(e,t){return e=qp(e),ye(e.getUTCFullYear()%100,t,2)}function rS(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function nS(e,t){var r=e.getUTCDay();return e=r>=4||r===0?bn(e):bn.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function aS(){return"+0000"}function Zu(){return"%"}function ed(e){return+e}function td(e){return Math.floor(+e/1e3)}var Qr,Wp,Jp;oS({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 oS(e){return Qr=o1(e),Wp=Qr.format,Qr.parse,Jp=Qr.utcFormat,Qr.utcParse,Qr}function sS(e){return new Date(e)}function iS(e){return e instanceof Date?+e:+new Date(+e)}function hc(e,t,r,n,a,o,s,i,l,c){var u=jp(),d=u.invert,h=u.domain,p=c(".%L"),f=c(":%S"),m=c("%I:%M"),y=c("%I %p"),S=c("%a %d"),A=c("%b %d"),w=c("%B"),O=c("%Y");function T(C){return(l(C)<C?p:i(C)<C?f:s(C)<C?m:o(C)<C?y:n(C)<C?a(C)<C?S:A:r(C)<C?w:O)(C)}return u.invert=function(C){return new Date(d(C))},u.domain=function(C){return arguments.length?h(Array.from(C,iS)):h().map(sS)},u.ticks=function(C){var R=h();return e(R[0],R[R.length-1],C??10)},u.tickFormat=function(C,R){return R==null?T:c(R)},u.nice=function(C){var R=h();return(!C||typeof C.range!="function")&&(C=t(R[0],R[R.length-1],C??10)),C?h(Dp(R,C)):u},u.copy=function(){return xs(u,hc(e,t,r,n,a,o,s,i,l,c))},u}function Yp(){return gr.apply(hc(n1,a1,Qt,uc,Ss,_a,lc,sc,Cr,Wp).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function lS(){return gr.apply(hc(t1,r1,Xt,dc,ws,vs,cc,ic,Cr,Jp).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function cS(){var e=0,t=1,r,n,a,o,s=yt,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(bs),c.rangeRound=u(Mp),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 uS(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Kp(){var e=nc(cS()(yt));return e.copy=function(){return uS(e,Kp())},Kx.apply(e,arguments)}function dS(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 hS(e){return e.scaleType==="band"}function pS(e){return e.scaleType==="point"}function mS(e){return e.type==="piecewise"?Bp(e.thresholds,e.colors):Kp([e.min??0,e.max??100],e.color)}function Fo(e){return e.values?jo(e.values,e.colors).unknown(e.unknownColor??null):jo(e.colors.map((t,r)=>r),e.colors).unknown(e.unknownColor??null)}function vo(e){return e.type==="ordinal"?Fo(e):mS(e)}function fS(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 gS(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function Xi(e,t,r){switch(e){case"log":return Lp(t,r);case"pow":return ac(t,r);case"sqrt":return qv(t,r);case"time":return Yp(t,r);case"utc":return lS(t,r);default:return Up(t,r)}}const rd=e=>(e==null?void 0:e[0])instanceof Date;function nd(e,t){const r=Yp(e.data,t);return(n,{location:a})=>a==="tick"?r.tickFormat(e.tickNumber)(n):`${n.toLocaleString()}`}const yi=(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 ad,od;class yS{constructor(){if(this.types=new Set,ad)throw new Error("You can only create one instance!");ad=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class bS{constructor(){if(this.types=new Set,od)throw new Error("You can only create one instance!");od=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const Cs=new yS;Cs.addType("bar");Cs.addType("line");Cs.addType("scatter");const xS=new bS;xS.addType("radar");function Qp(e){return Cs.getTypes().has(e)}const vS=(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)]},Xp=(e,t,r,n,a,o)=>{const i=Object.keys(r).filter(Qp).reduce((l,c)=>vS(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},SS=(e,t,r,n)=>{const a=new Set;return Object.keys(t).filter(Qp).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},wS=(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 CS(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 OS=.2,TS=.1;function Zp({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=SS(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),y=m?[m.start,m.end]:[0,100],S=CS(e,a,p),[A,w]=Xp(p,a,n,h,t,m===void 0&&!f?i:void 0),O=!p.ignoreTooltip&&c.has(p.id),T=p.data??[];if(hS(p)){const ae=p.categoryGapRatio??OS,ee=p.barGapRatio??TS,le=a==="y"?[S[1],S[0]]:S,J=yi(le,y);if(u[p.id]=K({offset:0,height:0,categoryGapRatio:ae,barGapRatio:ee,triggerTooltip:O},p,{data:T,scale:Kl(p.data,J).paddingInner(ae).paddingOuter(ae/2),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?Fo(K({values:p.data},p.colorMap)):vo(p.colorMap))}),rd(p.data)){const Z=nd(p,le);u[p.id].valueFormatter=p.valueFormatter??Z}}if(pS(p)){const ae=a==="y"?[...S].reverse():S,ee=yi(ae,y);if(u[p.id]=K({offset:0,height:0,triggerTooltip:O},p,{data:T,scale:Qx(p.data,ee),tickNumber:p.data.length,colorScale:p.colorMap&&(p.colorMap.type==="ordinal"?Fo(K({values:p.data},p.colorMap)):vo(p.colorMap))}),rd(p.data)){const le=nd(p,ae);u[p.id].valueFormatter=p.valueFormatter??le}}if(p.scaleType==="band"||p.scaleType==="point")return;const C=p.scaleType??"linear",R=l?wS(p,a,h,t):p.domainLimit??"nice",E=[p.min??A,p.max??w];if(typeof R=="function"){const{min:ae,max:ee}=R(A,w);E[0]=ae,E[1]=ee}const V=fS(K({},p,{range:S,domain:E})),b=gS(V,y),I=yi(S,y),G=Xi(C,E,I),M=R==="nice"?G.nice(V):G,[H,ne]=M.domain(),re=[p.min??H,p.max??ne];u[p.id]=K({offset:0,height:0,triggerTooltip:O},p,{data:T,scaleType:C,scale:M.domain(re),tickNumber:b,colorScale:p.colorMap&&vo(p.colorMap),valueFormatter:p.valueFormatter??dS(b,Xi(C,S.map(ae=>G.invert(ae)),S))})}),{axis:u,axisIds:r.map(({id:d})=>d)}}function PS(e){return e!=null}function em({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:a}){return(o,s)=>{var y;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,(((y=o.data)==null?void 0:y.length)??1)-1]:c=Xp(o,a,r,s,n);let d,h;[d,h]=Xi(!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,A)=>{var O;const w=S[a]??((O=o.data)==null?void 0:O[A]);return w==null?!0:o.scaleType==="point"||o.scaleType==="band"||typeof w=="string"?A>=f&&A<=m:w>=f&&w<=m}}}const RS=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))},sd=e=>(t=[])=>t.reduce((r,n)=>{const{zoom:a,id:o}=n,s=Jl(a,o,e);return s&&(r[o]=s),r},{}),AS=e=>{const t=new Map;return e.forEach(r=>{t.set(r.axisId,r)}),t},tm=e=>e.zoom;pe([tm],e=>e==null?void 0:e.isInteracting);const Os=pe([tm],e=>(e==null?void 0:e.zoomData)&&AS(e==null?void 0:e.zoomData)),Va=pe([Tn,Pn],(e,t)=>K({},sd("x")(e),sd("y")(t)));pe([Va,(e,t)=>t],(e,t)=>e[t]);const IS=pe([Os,Va,ys,Aa],(e,t,r,n)=>e&&t&&em({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"x"})),ES=pe([Os,Va,ys,Aa],(e,t,r,n)=>e&&t&&em({zoomMap:e,zoomOptions:t,seriesConfig:r,formattedSeries:n,direction:"y"})),rm=pe([IS,ES,Tn,Pn],(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 RS(K({},a,o))}),$r=pe([Tn,Ra,Aa,ys,Os,Va,rm,bp],(e,t,r,n,a,o,s,i)=>Zp({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"x",zoomMap:a,zoomOptions:o,getFilters:s,preferStrictDomainInLineCharts:i})),Ur=pe([Pn,Ra,Aa,ys,Os,Va,rm,bp],(e,t,r,n,a,o,s,i)=>Zp({drawingArea:t,formattedSeries:r,axis:e,seriesConfig:n,axisDirection:"y",zoomMap:a,zoomOptions:o,getFilters:s,preferStrictDomainInLineCharts:i}));pe([$r,Ur,(e,t)=>t],(e,t,r)=>(e==null?void 0:e.axis[r])??(t==null?void 0:t.axis[r]));pe([Tn,Pn,(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 nm(e){return e.bandwidth!==void 0}function Xr(e){return e instanceof Date?e.getTime():e}function xn(e,t){const{scale:r,data:n,reverse:a}=e;if(!nm(r)){const s=r.invert(t);if(n===void 0)return-1;const i=Xr(s);return n==null?void 0:n.findIndex((c,u)=>{const d=Xr(c);return d>i&&(u===0||Math.abs(i-d)<=Math.abs(i-Xr(n[u-1])))||d<=i&&(u===n.length-1||Math.abs(Xr(s)-d)<Math.abs(Xr(s)-Xr(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 id(e,t,r){const{scale:n,data:a}=e;if(!nm(n)){const o=n.invert(t);return r<0?o:a[r]}return r<0||r>=a.length?null:a[r]}function ld(e,t){const r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r.matrixTransform(e.getScreenCTM().inverse())}function Wt(e){const t=N.useRef(e);return Dt(()=>{t.current=e}),N.useRef((...r)=>(0,t.current)(...r)).current}const _S=Object.is;function am(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,!_S(e[a],t[a])||!(a in t))return!1;for(const a in t)n+=1;return r===n}const pc=({store:e})=>{const t=Wt(function(){e.update(s=>K({},s,{interaction:{pointer:null,item:null}}))}),r=Wt(function(s){e.update(i=>{const l=i.interaction.item;return s?l===null||Object.keys(s).some(c=>s[c]!==l[c])?i:K({},i,{interaction:K({},i.interaction,{item:null})}):l===null?i:K({},i,{interaction:K({},i.interaction,{item:null})})})}),n=Wt(function(s){e.update(i=>am(i.interaction.item,s)?i:K({},i,{interaction:K({},i.interaction,{item:s})}))}),a=Wt(function(s){e.update(i=>K({},i,{interaction:K({},i.interaction,{pointer:s})}))});return{instance:{cleanInteraction:t,setItemInteraction:n,removeItemInteraction:r,setPointerCoordinate:a}}};pc.getInitialState=()=>({interaction:{item:null,pointer:null}});pc.params={};const mc=e=>e.interaction,VS=pe([mc],e=>e!==void 0),MS=pe([mc],e=>(e==null?void 0:e.item)??null),om=pe([mc],e=>(e==null?void 0:e.pointer)??null),Ts=pe([om],e=>e&&e.x),Ps=pe([om],e=>e&&e.y);pe([MS],e=>e!==null);function sa(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(!sa(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(!sa(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(!sa(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}const Rs=(e,t)=>t;function Zi(e,t,r=t.axisIds[0]){return Array.isArray(r)?r.map(n=>xn(t.axis[n],e)):xn(t.axis[r],e)}const sm=(e,t,r)=>{if(e===null)return null;const n=Zi(e,t,r);return n===-1?null:n},jS=pe([Ts,$r,Rs],sm),kS=pe([Ps,Ur,Rs],sm),$S=pe([Ts,Ps,$r,Ur],(e,t,r,n)=>[...e===null?[]:r.axisIds.map(a=>({axisId:a,dataIndex:Zi(e,r,a)})),...t===null?[]:n.axisIds.map(a=>({axisId:a,dataIndex:Zi(t,n,a)}))].filter(a=>a.dataIndex!==null&&a.dataIndex>=0));function im(e,t,r,n=t.axisIds[0]){return Array.isArray(n)?n.map((a,o)=>id(t.axis[a],e,r[o])):id(t.axis[n],e,r)}pe([Ts,$r,jS,Rs],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:im(e,t,r,n));pe([Ps,Ur,kS,Rs],(e,t,r,n)=>e===null||r===null||t.axisIds.length===0?null:im(e,t,r,n));const US=pe([Ts,$r],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:xn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:sa}}),DS=pe([Ps,Ur],(e,t)=>e===null?[]:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:xn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0),{memoizeOptions:{resultEqualityCheck:sa}});pe([US,DS],(e,t)=>e.length>0||t.length>0);const cd={};function LS(e,t){const r=N.useRef(cd);return r.current===cd&&(r.current=e(t)),r}const BS=()=>{};function FS(e,t,r,n){const a=LS(NS,{store:e,selector:t,skip:n}).current;a.effect=r,N.useEffect(a.onMount(n),[n])}function NS(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:BS,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 As=({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 w=[...o??[],...s??[]].filter(T=>T.id).map(T=>T.id),O=new Set(w.filter((T,C)=>w.indexOf(T)!==C));O.size>0&&ha([`MUI X Charts: The following axis ids are duplicated: ${Array.from(O).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
|
|
117
|
-
`),"error")}const c=ot(t,Ra),u=ot(t,Aa),d=ot(t,VS),{axis:h,axisIds:p}=ot(t,$r),{axis:f,axisIds:m}=ot(t,Ur);Cp({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),Dt(()=>{e.highlightedAxis!==void 0&&t.update(w=>w.controlledCartesianAxisHighlight===e.highlightedAxis?w:K({},w,{controlledCartesianAxisHighlight:e.highlightedAxis}))},[t,e.highlightedAxis]);const y=N.useRef(!0);N.useEffect(()=>{if(y.current){y.current=!1;return}t.update(w=>K({},w,{cartesianAxis:K({},w.cartesianAxis,{x:Pp(o,i),y:Rp(s,i)})}))},[r,c,o,s,i,t]);const S=p[0],A=m[0];return FS(t,$S,(w,O)=>{if(!Object.is(w,O)){if(w.length!==O.length){l(O);return}w!=null&&w.some(({axisId:T,dataIndex:C},R)=>O[R].axisId!==T||O[R].dataIndex!==C)&&l(O)}},!l),N.useEffect(()=>{const w=n.current;if(!d||!w||e.disableAxisListener)return()=>{};const O=a.addInteractionListener("moveEnd",I=>{var G;I.detail.activeGestures.pan||(G=a.cleanInteraction)==null||G.call(a)}),T=a.addInteractionListener("panEnd",I=>{var G;I.detail.activeGestures.move||(G=a.cleanInteraction)==null||G.call(a)}),C=a.addInteractionListener("quickPressEnd",I=>{var G;!I.detail.activeGestures.move&&!I.detail.activeGestures.pan&&((G=a.cleanInteraction)==null||G.call(a))}),R=I=>{var ne,re;const G=I.detail.srcEvent,M=I.detail.target,H=ld(w,G);if(I.detail.srcEvent.buttons>=1&&(M!=null&&M.hasPointerCapture(I.detail.srcEvent.pointerId))&&!(M!=null&&M.closest("[data-charts-zoom-slider]"))&&(M==null||M.releasePointerCapture(I.detail.srcEvent.pointerId)),!a.isPointInside(H.x,H.y,M)){(ne=a.cleanInteraction)==null||ne.call(a);return}(re=a.setPointerCoordinate)==null||re.call(a,H)},E=a.addInteractionListener("move",R),V=a.addInteractionListener("pan",R),b=a.addInteractionListener("quickPress",R);return()=>{E.cleanup(),O.cleanup(),V.cleanup(),T.cleanup(),b.cleanup(),C.cleanup()}},[n,t,h,S,f,A,a,e.disableAxisListener,d]),N.useEffect(()=>{const w=n.current,O=e.onAxisClick;if(w===null||!O)return()=>{};const T=a.addInteractionListener("tap",C=>{let R=null,E=!1;const V=ld(w,C.detail.srcEvent),b=xn(h[S],V.x);E=b!==-1,R=E?b:xn(f[A],V.y);const I=E?p[0]:m[0];if(R==null||R===-1)return;const G=(E?h:f)[I].data[R],M={};Object.keys(u).filter(H=>["bar","line"].includes(H)).forEach(H=>{var ne;(ne=u[H])==null||ne.seriesOrder.forEach(re=>{const ae=u[H].series[re],ee=ae.xAxisId,le=ae.yAxisId,J=E?ee:le;(J===void 0||J===I)&&(M[re]=ae.data[R])})}),O(C.detail.srcEvent,{dataIndex:R,axisValue:G,seriesValues:M})});return()=>{T.cleanup()}},[e.onAxisClick,u,n,h,p,f,m,S,A,a]),{}};As.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};As.getDefaultizedParams=({params:e})=>K({},e,{colors:e.colors??xp,theme:e.theme??"light",defaultizedXAxis:Pp(e.xAxis,e.dataset),defaultizedYAxis:Rp(e.yAxis,e.dataset)});As.getInitialState=e=>K({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});function ud(e,t){return e.id!==void 0?e:K({id:t},e)}function dd(e){return e.colorMap?K({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?Fo(K({values:e.data},e.colorMap)):vo(e.colorMap.type==="continuous"?K({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function lm(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]=dd(ud(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]=dd(ud(K({},a,{data:t.map(l=>l[s])}),i)),n.push(i)}),{axis:r,axisIds:n}}const fc=({params:e,store:t})=>{const{zAxis:r,dataset:n}=e,a=N.useRef(!0);return N.useEffect(()=>{if(a.current){a.current=!1;return}t.update(o=>K({},o,{zAxis:lm(r,n)}))},[r,n,t]),{}};fc.params={zAxis:!0,dataset:!0};fc.getInitialState=e=>({zAxis:lm(e.zAxis,e.dataset)});const zS=e=>e,GS=pe([zS],e=>e.zAxis),Is=({store:e,params:t})=>{Cp({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),Dt(()=>{e.update(a=>a.highlight.item===t.highlightedItem?a:K({},a,{highlight:K({},a.highlight,{item:t.highlightedItem})}))},[e,t.highlightedItem]);const r=Wt(()=>{var a;(a=t.onHighlightChange)==null||a.call(t,null),e.update(o=>K({},o,{highlight:{item:null}}))}),n=Wt(a=>{var s;const o=e.getSnapshot().highlight.item;am(o,a)||((s=t.onHighlightChange)==null||s.call(t,a),e.update(i=>K({},i,{highlight:{item:a}})))});return{instance:{clearHighlight:r,setHighlight:n}}};Is.getDefaultizedParams=({params:e})=>K({},e,{highlightedItem:e.highlightedItem??null});Is.getInitialState=e=>({highlight:{item:e.highlightedItem}});Is.params={highlightedItem:!0,onHighlightChange:!0};const hd=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},cm=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]},um=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(hd(p[0],e),f)||!c(hd(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])},HS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?um("x")(e):cm(e),qS=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?cm(e):um("y")(e);function Ne(e){return function(){return e}}const pd=Math.abs,Qe=Math.atan2,br=Math.cos,WS=Math.max,bi=Math.min,Et=Math.sin,ln=Math.sqrt,at=1e-12,ya=Math.PI,No=ya/2,So=2*ya;function JS(e){return e>1?0:e<-1?ya:Math.acos(e)}function md(e){return e>=1?No:e<=-1?-No:Math.asin(e)}const el=Math.PI,tl=2*el,vr=1e-6,YS=tl-vr;function dm(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function KS(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return dm;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 QS{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?dm:KS(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>vr)if(!(Math.abs(d*l-c*u)>vr)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-s,f=a-i,m=l*l+c*c,y=p*p+f*f,S=Math.sqrt(m),A=Math.sqrt(h),w=o*Math.tan((el-Math.acos((m+h-y)/(2*S*A)))/2),O=w/A,T=w/S;Math.abs(O-1)>vr&&this._append`L${t+O*u},${r+O*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)>vr||Math.abs(this._y1-u)>vr)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%tl+tl),h>YS?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>vr&&this._append`A${n},${n},0,${+(h>=el)},${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 XS(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 QS(t)}function ZS(e){return e.innerRadius}function ew(e){return e.outerRadius}function tw(e){return e.startAngle}function rw(e){return e.endAngle}function nw(e){return e&&e.padAngle}function aw(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<at))return h=(u*(t-o)-d*(e-a))/h,[e+h*l,t+h*c]}function to(e,t,r,n,a,o,s){var i=e-r,l=t-n,c=(s?o:-o)/ln(i*i+l*l),u=c*l,d=-c*i,h=e+u,p=t+d,f=r+u,m=n+d,y=(h+f)/2,S=(p+m)/2,A=f-h,w=m-p,O=A*A+w*w,T=a-o,C=h*m-f*p,R=(w<0?-1:1)*ln(WS(0,T*T*O-C*C)),E=(C*w-A*R)/O,V=(-C*A-w*R)/O,b=(C*w+A*R)/O,I=(-C*A+w*R)/O,G=E-y,M=V-S,H=b-y,ne=I-S;return G*G+M*M>H*H+ne*ne&&(E=b,V=I),{cx:E,cy:V,x01:-u,y01:-d,x11:E*(a/T-1),y11:V*(a/T-1)}}function hm(){var e=ZS,t=ew,r=Ne(0),n=null,a=tw,o=rw,s=nw,i=null,l=XS(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),f=a.apply(this,arguments)-No,m=o.apply(this,arguments)-No,y=pd(m-f),S=m>f;if(i||(i=u=l()),p<h&&(d=p,p=h,h=d),!(p>at))i.moveTo(0,0);else if(y>So-at)i.moveTo(p*br(f),p*Et(f)),i.arc(0,0,p,f,m,!S),h>at&&(i.moveTo(h*br(m),h*Et(m)),i.arc(0,0,h,m,f,S));else{var A=f,w=m,O=f,T=m,C=y,R=y,E=s.apply(this,arguments)/2,V=E>at&&(n?+n.apply(this,arguments):ln(h*h+p*p)),b=bi(pd(p-h)/2,+r.apply(this,arguments)),I=b,G=b,M,H;if(V>at){var ne=md(V/h*Et(E)),re=md(V/p*Et(E));(C-=ne*2)>at?(ne*=S?1:-1,O+=ne,T-=ne):(C=0,O=T=(f+m)/2),(R-=re*2)>at?(re*=S?1:-1,A+=re,w-=re):(R=0,A=w=(f+m)/2)}var ae=p*br(A),ee=p*Et(A),le=h*br(T),J=h*Et(T);if(b>at){var Z=p*br(w),he=p*Et(w),Ae=h*br(O),Ge=h*Et(O),Oe;if(y<ya)if(Oe=aw(ae,ee,Ae,Ge,Z,he,le,J)){var lt=ae-Oe[0],rt=ee-Oe[1],be=Z-Oe[0],X=he-Oe[1],oe=1/Et(JS((lt*be+rt*X)/(ln(lt*lt+rt*rt)*ln(be*be+X*X)))/2),ce=ln(Oe[0]*Oe[0]+Oe[1]*Oe[1]);I=bi(b,(h-ce)/(oe-1)),G=bi(b,(p-ce)/(oe+1))}else I=G=0}R>at?G>at?(M=to(Ae,Ge,ae,ee,p,G,S),H=to(Z,he,le,J,p,G,S),i.moveTo(M.cx+M.x01,M.cy+M.y01),G<b?i.arc(M.cx,M.cy,G,Qe(M.y01,M.x01),Qe(H.y01,H.x01),!S):(i.arc(M.cx,M.cy,G,Qe(M.y01,M.x01),Qe(M.y11,M.x11),!S),i.arc(0,0,p,Qe(M.cy+M.y11,M.cx+M.x11),Qe(H.cy+H.y11,H.cx+H.x11),!S),i.arc(H.cx,H.cy,G,Qe(H.y11,H.x11),Qe(H.y01,H.x01),!S))):(i.moveTo(ae,ee),i.arc(0,0,p,A,w,!S)):i.moveTo(ae,ee),!(h>at)||!(C>at)?i.lineTo(le,J):I>at?(M=to(le,J,Z,he,h,-I,S),H=to(ae,ee,Ae,Ge,h,-I,S),i.lineTo(M.cx+M.x01,M.cy+M.y01),I<b?i.arc(M.cx,M.cy,I,Qe(M.y01,M.x01),Qe(H.y01,H.x01),!S):(i.arc(M.cx,M.cy,I,Qe(M.y01,M.x01),Qe(M.y11,M.x11),!S),i.arc(0,0,h,Qe(M.cy+M.y11,M.cx+M.x11),Qe(H.cy+H.y11,H.cx+H.x11),S),i.arc(H.cx,H.cy,I,Qe(H.y11,H.x11),Qe(H.y01,H.x01),!S))):i.arc(0,0,h,T,O,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-ya/2;return[br(d)*u,Et(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Ne(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Ne(+u),c):t},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:Ne(+u),c):r},c.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Ne(+u),c):n},c.startAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Ne(+u),c):a},c.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Ne(+u),c):o},c.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Ne(+u),c):s},c.context=function(u){return arguments.length?(i=u??null,c):i},c}function pm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ow(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function sw(e){return e}function iw(){var e=sw,t=ow,r=null,n=Ne(0),a=Ne(So),o=Ne(0);function s(i){var l,c=(i=pm(i)).length,u,d,h=0,p=new Array(c),f=new Array(c),m=+n.apply(this,arguments),y=Math.min(So,Math.max(-So,a.apply(this,arguments)-m)),S,A=Math.min(Math.abs(y)/c,o.apply(this,arguments)),w=A*(y<0?-1:1),O;for(l=0;l<c;++l)(O=f[p[l]=l]=+e(i[l],l,i))>0&&(h+=O);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?(y-c*w)/h:0;l<c;++l,m=S)u=p[l],O=f[u],S=m+(O>0?O*d:0)+w,f[u]={data:i[u],index:l,value:O,startAngle:m,endAngle:S,padAngle:A};return f}return s.value=function(i){return arguments.length?(e=typeof i=="function"?i:Ne(+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:Ne(+i),s):n},s.endAngle=function(i){return arguments.length?(a=typeof i=="function"?i:Ne(+i),s):a},s.padAngle=function(i){return arguments.length?(o=typeof i=="function"?i:Ne(+i),s):o},s}function vn(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 Sn(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function lw(e,t){return e[t]}function cw(e){const t=[];return t.key=e,t}function mm(){var e=Ne([]),t=Sn,r=vn,n=lw;function a(o){var s=Array.from(e.apply(this,arguments),cw),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=pm(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:Ne(Array.from(o)),a):e},a.value=function(o){return arguments.length?(n=typeof o=="function"?o:Ne(+o),a):n},a.order=function(o){return arguments.length?(t=o==null?Sn:typeof o=="function"?o:Ne(Array.from(o)),a):t},a.offset=function(o){return arguments.length?(r=o??vn,a):r},a}function uw(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}vn(e,t)}}function dw(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 hw(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}vn(e,t)}}function pw(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]],y=m[n][1]||0,S=m[n-1][1]||0;p+=y-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,vn(e,t)}}function fm(e){var t=e.map(mw);return Sn(e).sort(function(r,n){return t[r]-t[n]})}function mw(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 gm(e){var t=e.map(ym);return Sn(e).sort(function(r,n){return t[r]-t[n]})}function ym(e){for(var t=0,r=-1,n=e.length,a;++r<n;)(a=+e[r][1])&&(t+=a);return t}function fw(e){return gm(e).reverse()}function gw(e){var t=e.length,r,n,a=e.map(ym),o=fm(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 yw(e){return Sn(e).reverse()}const xi={appearance:fm,ascending:gm,descending:fw,insideOut:gw,none:Sn,reverse:yw},vi={expand:uw,diverging:dw,none:vn,silhouette:hw,wiggle:pw},bm=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:xi.none,stackingOffset:vi.none}):o[i]===void 0?(o[i]=a.length,a.push({ids:[s],stackingOrder:xi[l??(n==null?void 0:n.stackOrder)??"none"],stackingOffset:vi[c??(n==null?void 0:n.stackOffset)??"diverging"]})):(a[o[i]].ids.push(s),l!==void 0&&(a[o[i]].stackingOrder=xi[l]),c!==void 0&&(a[o[i]].stackingOffset=vi[c]))}),a},bw=e=>e==null?"":e.toLocaleString(),xw=(e,t)=>{const{seriesOrder:r,series:n}=e,a=bm(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(`
|
|
118
|
-
`))});const s={};return a.forEach(i=>{const{ids:l,stackingOffset:c,stackingOrder:u}=i,d=mm().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]=K({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:n[h].valueFormatter??bw},n[h],{data:f?t.map(m=>{const y=m[f];return typeof y!="number"?(process.env.NODE_ENV!=="production"&&y!==null&&ha([`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):y}):n[h].data,stackedData:d[p].map(([m,y])=>[m,y])})})}),{seriesOrder:r,stackingGroups:a,series:s}};function Zt(e,t){return typeof e=="function"?e(t):e}const vw=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,a)=>{const o=Zt(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},[])},Sw=(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},ww=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const a=Zt(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}},Cw=e=>Object.values(e).map(t=>t.layout==="horizontal"?{direction:"y",axisId:t.yAxisId}:{direction:"x",axisId:t.xAxisId}),Ow=(e,t,r)=>K({id:e.id??`auto-generated-id-${t}`,color:r[t%r.length]},e),Tw={seriesProcessor:xw,colorProcessor:Sw,legendGetter:vw,tooltipGetter:ww,axisTooltipGetter:Cw,xExtremumGetter:HS,yExtremumGetter:qS,getSeriesWithDefaultValues:Ow},zo=(e,t)=>[t[0]===null?e[0]:Math.min(e[0],t[0]),t[1]===null?e[1]:Math.max(e[1],t[1])],Pw=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:zo(u,[d.x,d.x]),[1/0,-1/0]);return zo(o,l??[1/0,-1/0])},[1/0,-1/0])},Rw=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:zo(u,[d.y,d.y]),[1/0,-1/0]);return zo(o,l??[1/0,-1/0])},[1/0,-1/0])},Aw=({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(`
|
|
119
|
-
`));
|
|
120
|
-
`))
|
|
121
|
-
`));return e};function
|
|
122
|
-
`));return
|
|
123
|
-
`));return e.svgRef}function oC(){const e=Sm();return N.useCallback(t=>`${e}-gradient-${t}`,[e])}function sC(){const e=Sm();return N.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var Si,fd;function iC(){if(fd)return Si;fd=1;var e=4,t=.001,r=1e-7,n=10,a=11,o=1/(a-1),s=typeof Float32Array=="function";function i(m,y){return 1-3*y+3*m}function l(m,y){return 3*y-6*m}function c(m){return 3*m}function u(m,y,S){return((i(y,S)*m+l(y,S))*m+c(y))*m}function d(m,y,S){return 3*i(y,S)*m*m+2*l(y,S)*m+c(y)}function h(m,y,S,A,w){var O,T,C=0;do T=y+(S-y)/2,O=u(T,A,w)-m,O>0?S=T:y=T;while(Math.abs(O)>r&&++C<n);return T}function p(m,y,S,A){for(var w=0;w<e;++w){var O=d(y,S,A);if(O===0)return y;var T=u(y,S,A)-m;y-=T/O}return y}function f(m){return m}return Si=function(y,S,A,w){if(!(0<=y&&y<=1&&0<=A&&A<=1))throw new Error("bezier x values must be in [0, 1] range");if(y===S&&A===w)return f;for(var O=s?new Float32Array(a):new Array(a),T=0;T<a;++T)O[T]=u(T*o,y,A);function C(R){for(var E=0,V=1,b=a-1;V!==b&&O[V]<=R;++V)E+=o;--V;var I=(R-O[V])/(O[V+1]-O[V]),G=E+I*o,M=d(G,y,A);return M>=t?p(R,G,y,A):M===0?G:h(R,E,E+o,y,A)}return function(E){return E===0?0:E===1?1:u(C(E),S,w)}},Si}var lC=iC();const cC=Tg(lC),uC=300,dC=cC(.66,0,.34,1);var wn=0,ra=0,zn=0,wm=1e3,Go,na,Ho=0,Ir=0,Es=0,ba=typeof performance=="object"&&performance.now?performance:Date,Cm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function gc(){return Ir||(Cm(hC),Ir=ba.now()+Es)}function hC(){Ir=0}function qo(){this._call=this._time=this._next=null}qo.prototype=Om.prototype={constructor:qo,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?gc():+r)+(t==null?0:+t),!this._next&&na!==this&&(na?na._next=this:Go=this,na=this),this._call=e,this._time=r,al()},stop:function(){this._call&&(this._call=null,this._time=1/0,al())}};function Om(e,t,r){var n=new qo;return n.restart(e,t,r),n}function nl(){gc(),++wn;for(var e=Go,t;e;)(t=Ir-e._time)>=0&&e._call.call(void 0,t),e=e._next;--wn}function gd(){Ir=(Ho=ba.now())+Es,wn=ra=0;try{nl()}finally{wn=0,mC(),Ir=0}}function pC(){var e=ba.now(),t=e-Ho;t>wm&&(Es-=t,Ho=e)}function mC(){for(var e,t=Go,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:Go=r);na=e,al(n)}function al(e){if(!wn){ra&&(ra=clearTimeout(ra));var t=e-Ir;t>24?(e<1/0&&(ra=setTimeout(gd,e-ba.now()-Es)),zn&&(zn=clearInterval(zn))):(zn||(Ho=ba.now(),zn=setInterval(pC,wm)),wn=1,Cm(gd))}}function fC(e,t,r){var n=new qo;return t=t==null?0:+t,n.restart(a=>{n.stop(),e(a+t)},t,r),n}class gC{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=gc()-this.elapsed;return this.timer=Om(r=>this.timerCallback(r),0,t),nl(),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),fC(()=>this.timerCallback(this.duration)),nl(),this}}function yC(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 bC(e,{createInterpolator:t,applyProps:r,skip:n,initialProps:a=e}){const o=N.useRef(a),s=N.useRef(null),i=N.useRef(null),l=N.useRef(e);Dt(()=>{l.current=e},[e]),Dt(()=>{var d;n&&((d=s.current)==null||d.finish(),s.current=null,i.current=null,o.current=e)},[e,n]);const c=N.useCallback(d=>{const h=o.current,p=t(h,e);s.current=new gC(uC,dC,f=>{const m=p(f);o.current=m,r(d,m)})},[r,t,e]);return N.useCallback(d=>{var p,f,m,y;if(d===null){(p=s.current)==null||p.stop();return}const h=i.current;if(h===d){if(yC(l.current,e)){(f=s.current)==null||f.resume();return}(m=s.current)==null||m.stop()}h&&((y=s.current)==null||y.stop()),i.current=d,(s.current||!n)&&c(d)},[c,e,n])}function xC(e,{createInterpolator:t,transformProps:r,applyProps:n,skip:a,initialProps:o=e,ref:s}){const i=r??(u=>u),l=bC(e,{initialProps:o,createInterpolator:t,applyProps:(u,d)=>n(u,i(d)),skip:a});return K({},r(a?e:o),{ref:ps(l,s)})}function yd(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(N.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 vC=10;function bd(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"?Tt(c[0],c[1]):Zl(c[0],c[1]),h=Math.round((Math.max(...u)-Math.min(...u))/vC),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 y=d(m/h);if(y===void 0)return null;const S=s(y);if(S===void 0)return null;const A=r?1-S/a:S/a,w=i(y);return w===null?null:g.jsx("stop",{offset:A,stopColor:w,stopOpacity:1},p+m)})})}const SC=10,wC=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function wi(e){const{isReversed:t,gradientId:r,colorScale:n,colorMap:a}=e,o=[a.min??0,a.max??100],s=typeof o[0]=="number"?Tt(o[0],o[1]):Zl(o[0],o[1]),i=SC,l=`${o[0]}-${o[1]}-`;return g.jsx("linearGradient",K({id:r},wC(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 CC(){const{top:e,height:t,bottom:r,left:n,width:a,right:o}=vm(),s=e+t+r,i=n+a+o,l=oC(),c=sC(),{xAxis:u,xAxisIds:d}=tC(),{yAxis:h,yAxisIds:p}=rC(),{zAxis:f,zAxisIds:m}=nC(),y=p.filter(w=>h[w].colorMap!==void 0),S=d.filter(w=>u[w].colorMap!==void 0),A=m.filter(w=>f[w].colorMap!==void 0);return y.length===0&&S.length===0&&A.length===0?null:g.jsxs("defs",{children:[y.map(w=>{const O=l(w),T=c(w),{colorMap:C,scale:R,colorScale:E,reverse:V}=h[w];return(C==null?void 0:C.type)==="piecewise"?g.jsx(yd,{isReversed:!V,scale:R,colorMap:C,size:s,gradientId:O,direction:"y"},O):(C==null?void 0:C.type)==="continuous"?g.jsxs(N.Fragment,{children:[g.jsx(bd,{isReversed:!V,scale:R,colorScale:E,colorMap:C,size:s,gradientId:O,direction:"y"}),g.jsx(wi,{isReversed:V,colorScale:E,colorMap:C,gradientId:T})]},O):null}),S.map(w=>{const O=l(w),T=c(w),{colorMap:C,scale:R,reverse:E,colorScale:V}=u[w];return(C==null?void 0:C.type)==="piecewise"?g.jsx(yd,{isReversed:E,scale:R,colorMap:C,size:i,gradientId:O,direction:"x"},O):(C==null?void 0:C.type)==="continuous"?g.jsxs(N.Fragment,{children:[g.jsx(bd,{isReversed:E,scale:R,colorScale:V,colorMap:C,size:i,gradientId:O,direction:"x"}),g.jsx(wi,{isReversed:E,colorScale:V,colorMap:C,gradientId:T})]},O):null}),A.map(w=>{const O=c(w),{colorMap:T,colorScale:C}=f[w];return(T==null?void 0:T.type)==="continuous"?g.jsx(wi,{colorScale:C,colorMap:T,gradientId:O},O):null})]})}const OC=["children","className","title","desc"],TC=mt("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"})),yc=N.forwardRef(function(t,r){const n=Dr(),{width:a,height:o}=ot(n,ux),{width:s,height:i}=ot(n,cx),l=aC(),c=ps(l,r),u=mb({props:t,name:"MuiChartsSurface"}),{children:d,className:h,title:p,desc:f}=u,m=dr(u,OC),y=o>0&&a>0;return g.jsxs(TC,K({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(CC,{}),y&&d]}))});process.env.NODE_ENV!=="production"&&(yc.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(yc.propTypes={children:x.node,className:x.string,desc:x.string,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),title:x.string});function Gn(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 Ci(e){const t=rl(e);return[Math.sin(t),-Math.cos(t)]}function PC(e,t){const r=[[0,0],Ci(e),Ci(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(Ci(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 RC(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 bc=N.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"&&(bc.displayName="GaugeContext");function AC(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}=vm(),y=PC(a,o),S=c?Gn(c,f):y.cx*f,A=u?Gn(u,m):y.cy*m;let w=h+S,O=p+A;const T=RC(S,A,f,m,y);if(c===void 0){const b=T*(y.maxX-y.minX);w=h+(f-b)/2+y.cx*b}if(u===void 0){const b=T*(y.maxY-y.minY);O=p+(m-b)/2+y.cy*b}const C=Gn(s??T,T),R=Gn(i??"80%",T),E=Gn(l??0,C-R),V=N.useMemo(()=>{const b=rl(a),I=rl(o);return{value:t,valueMin:r,valueMax:n,startAngle:b,endAngle:I,outerRadius:C,innerRadius:R,cornerRadius:E,cx:w,cy:O,maxRadius:T,valueAngle:t===null?null:b+(I-b)*(t-r)/(n-r)}},[t,r,n,a,o,C,R,E,w,O,T]);return g.jsx(bc.Provider,{value:V,children:d})}function xc(){return N.useContext(bc)}const IC=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],EC=mt("g")(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),vc=N.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:y,cy:S,children:A}=t,w=dr(t,IC);return g.jsx(eC,{pluginParams:{width:n,height:a,margin:yp(o,{left:10,right:10,top:10,bottom:10})},plugins:[],children:g.jsx(AC,{value:l,valueMin:c,valueMax:u,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:y,cy:S,children:g.jsx(yc,K({title:s,desc:i,role:"meter","aria-valuenow":l===null?void 0:l,"aria-valuemin":c,"aria-valuemax":u},w,{ref:r,children:g.jsx(EC,{"aria-hidden":"true",children:A})}))})})});process.env.NODE_ENV!=="production"&&(vc.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(vc.propTypes={children:x.node,className:x.string,cornerRadius:x.oneOfType([x.number,x.string]),cx:x.oneOfType([x.number,x.string]),cy:x.oneOfType([x.number,x.string]),desc:x.string,endAngle:x.number,height:x.number,id:x.string,innerRadius:x.oneOfType([x.number,x.string]),margin:x.oneOfType([x.number,x.shape({bottom:x.number,left:x.number,right:x.number,top:x.number})]),outerRadius:x.oneOfType([x.number,x.string]),skipAnimation:x.bool,startAngle:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),title:x.string,value:x.number,valueMax:x.number,valueMin:x.number,width:x.number});function _C(e){const t=Dr(),r=ot(t,Bb);return e||r}function VC(e,t){const r=Tt(e.startAngle,t.startAngle),n=Tt(e.endAngle,t.endAngle),a=Tt(e.innerRadius,t.innerRadius),o=Tt(e.outerRadius,t.outerRadius),s=Tt(e.cornerRadius,t.cornerRadius);return i=>({startAngle:r(i),endAngle:n(i),innerRadius:a(i),outerRadius:o(i),cornerRadius:s(i)})}function MC(e){return xC({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:VC,transformProps:t=>({d:hm().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 jC=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],kC=mt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function Tm(e){const{value:t,valueMin:r,valueMax:n,startAngle:a,endAngle:o,outerRadius:s,innerRadius:i,cornerRadius:l,cx:c,cy:u}=xc();if(t===null)return null;const d=a+(t-r)/(n-r)*(o-a);return g.jsx(Pm,K({},e,{cx:c,cy:u,startAngle:a,endAngle:d,cornerRadius:l,innerRadius:i,outerRadius:s}))}process.env.NODE_ENV!=="production"&&(Tm.propTypes={skipAnimation:x.bool});function Pm(e){let{cx:t,cy:r,startAngle:n,endAngle:a,cornerRadius:o,innerRadius:s,outerRadius:i,skipAnimation:l}=e,c=dr(e,jC);const u=_C(l),d=MC({startAngle:n,endAngle:a,cornerRadius:o,innerRadius:s,outerRadius:i,skipAnimation:u});return g.jsx(kC,K({},d,{transform:`translate(${t}, ${r})`},c))}process.env.NODE_ENV!=="production"&&(Pm.propTypes={cornerRadius:x.number.isRequired,cx:x.number.isRequired,cy:x.number.isRequired,endAngle:x.number.isRequired,innerRadius:x.number.isRequired,outerRadius:x.number.isRequired,skipAnimation:x.bool,startAngle:x.number.isRequired});const $C=mt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function UC(e){const{startAngle:t,endAngle:r,outerRadius:n,innerRadius:a,cornerRadius:o,cx:s,cy:i}=xc();return g.jsx($C,K({transform:`translate(${s}, ${i})`,d:hm().cornerRadius(o)({startAngle:t,endAngle:r,innerRadius:a,outerRadius:n})},e))}function DC(e){return On("MuiGauge",e)}Ml("MuiGauge",["root","valueArc","referenceArc","valueText"]);function LC(){return typeof window>"u"}const ro=new Map,BC=2e3,FC={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},NC=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],xd="mui_measurement_span";function Rm(e,t){return NC.indexOf(e)>=0&&t===+t?`${t}px`:t}function Am(e){return e.split("").reduce((n,a)=>a===a.toUpperCase()?[...n,"-",a.toLowerCase()]:[...n,a],[]).join("")}const zC=e=>Object.keys(e).sort().reduce((t,r)=>`${t}${Am(r)}:${Rm(r,e[r])};`,"");let Oi;const GC=(e,t={})=>{if(e==null||LC())return{width:0,height:0};const r=`${e}`,n=zC(t),a=`${r}-${n}`,o=ro.get(a);if(o)return o;try{let s=document.getElementById(xd);s===null&&(s=document.createElement("span"),s.setAttribute("id",xd),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));const i=K({},FC,t);Object.keys(i).map(u=>(s.style[Am(u)]=Rm(u,i[u]),u)),s.textContent=r;const l=s.getBoundingClientRect(),c={width:l.width,height:l.height};return ro.set(a,c),ro.size+1>BC&&ro.clear(),process.env.NODE_ENV==="test"?s.textContent="":(Oi&&clearTimeout(Oi),Oi=setTimeout(()=>{s.textContent=""},0)),c}catch{return{width:0,height:0}}};function HC({style:e,needsComputation:t,text:r}){return r.split(`
|
|
124
|
-
`).
|
|
125
|
-
`),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",K({},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"&&(Im.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.string.isRequired});const YC=["text","className"];function KC({value:e}){return e===null?null:e.toLocaleString()}function Em(e){const{text:t=KC,className:r}=e,n=dr(e,YC),{value:a,valueMin:o,valueMax:s,cx:i,cy:l}=xc(),c=typeof t=="function"?t({value:a,valueMin:o,valueMax:s}):t;return c===null?null:g.jsx("g",{className:r,children:g.jsx(Im,K({x:i,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},n))})}process.env.NODE_ENV!=="production"&&(Em.propTypes={lineHeight:x.number,needsComputation:x.bool,ownerState:x.any,style:x.object,text:x.oneOfType([x.func,x.string])});const QC=["text","children","classes","className","skipAnimation"],XC=e=>{const{classes:t}=e;return es({root:["root"],valueArc:["valueArc"],referenceArc:["referenceArc"],valueText:["valueText"]},DC,t)},Sc=N.forwardRef(function(t,r){const{text:n,children:a,className:o,skipAnimation:s}=t,i=dr(t,QC),l=XC(t);return g.jsxs(vc,K({},i,{className:Pt(l.root,o),ref:r,children:[g.jsx(UC,{className:l.referenceArc}),g.jsx(Tm,{className:l.valueArc,skipAnimation:s}),g.jsx(Em,{className:l.valueText,text:n}),a]}))});process.env.NODE_ENV!=="production"&&(Sc.displayName="Gauge");process.env.NODE_ENV!=="production"&&(Sc.propTypes={children:x.node,classes:x.object,className:x.string,cornerRadius:x.oneOfType([x.number,x.string]),cx:x.oneOfType([x.number,x.string]),cy:x.oneOfType([x.number,x.string]),desc:x.string,endAngle:x.number,height:x.number,id:x.string,innerRadius:x.oneOfType([x.number,x.string]),margin:x.oneOfType([x.number,x.shape({bottom:x.number,left:x.number,right:x.number,top:x.number})]),outerRadius:x.oneOfType([x.number,x.string]),skipAnimation:x.bool,startAngle:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),text:x.oneOfType([x.func,x.string]),title:x.string,value:x.number,valueMax:x.number,valueMin:x.number,width:x.number});const ZC=e=>{const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),a=e%60,o=[];return t>0?(o.push(t.toString()),o.push(r.toString().padStart(2,"0")),o.push(n.toString().padStart(2,"0")),o.push(a.toString().padStart(2,"0"))):r>0?(o.push(r.toString()),o.push(n.toString().padStart(2,"0")),o.push(a.toString().padStart(2,"0"))):(o.push(n.toString()),o.push(a.toString().padStart(2,"0"))),o.join(":")},Mt=(e,t)=>{const r=Math.floor(e/86400),n=Math.floor(e%86400/3600),a=Math.floor(e%3600/60),o=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const i={};return r>0&&(i.days=r),n>0&&(i.hours=n),a>0&&(i.minutes=a),(o>0||Object.keys(i).length===0)&&(i.seconds=o),new Intl.DurationFormat(t,{style:"narrow"}).format(i)}catch{}const s=[];return r>0&&s.push(`${r}d`),n>0&&s.push(`${n}h`),a>0&&s.push(`${a}m`),(o>0||s.length===0)&&s.push(`${o}s`),s.join(" ")},eO=(e,t,r)=>e==="countdown"&&r!==null?Math.min(100,t/r*100):e==="measuring"?t/60%1*100:0,tO=({timerState:e,animationState:t,hasError:r,className:n})=>{const{t:a,i18n:o}=Se.useTranslation(),s=P.useTheme(),{currentState:i,remainingTime:l,maxTime:c,currentProgress:u}=e,{showErrorAnimation:d,showPauseAnimation:h,showPulsatingText:p,pulsatingFinished:f,showLabels:m,showMainText:y,showIdlePulsating:S,idleDotsCount:A}=t;return g.jsxs(P.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(Sc,{width:264,height:264,value:i==="idle"?0:u,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:h||d?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:r?s.palette.error.light:s.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),g.jsxs(P.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:[g.jsx(P.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:1},children:g.jsx(P.Fade,{in:m&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(P.Typography,{variant:"body2",sx:{fontSize:"12px",color:i==="measured"&&(p||f)?s.palette.success.main:s.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:i==="measured"&&f?p?1:.6:1,transition:"opacity 2s ease-in-out"},children:i==="measuring"||i==="measured"?a("CycleTimer.CycleTime.lb","Cycle Time"):i==="countdown"?a("CycleTimer.RemainingTime.lb","Remaining Time"):""})})})}),g.jsxs(P.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(P.Fade,{in:y&&i==="idle"&&!r,timeout:200,children:g.jsxs(P.Typography,{variant:"body2",sx:{position:"absolute",fontSize:"12px",fontWeight:400,color:"rgba(255, 255, 255, 0.7)",lineHeight:"166%",letterSpacing:"0.17px",textAlign:"center",width:"200px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx("span",{style:{opacity:S?1:.6,transition:"opacity 2s ease-in-out"},children:a("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left",opacity:S?1:.6,transition:"opacity 2s ease-in-out"},children:".".repeat(A)})]})}),g.jsx(P.Fade,{in:y&&r,timeout:200,children:g.jsx(P.Typography,{variant:"h3",sx:{position:"absolute",fontSize:"40px",fontWeight:400,color:"#FFFFFF",lineHeight:"116.7%"},children:a("CycleTimer.Error.lb","Error")})}),g.jsx(P.Fade,{in:y&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(P.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:s.palette.text.primary,lineHeight:1,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:1,transition:"opacity 2s ease-in-out"},children:ZC(l)})})})]}),g.jsx(P.Box,{sx:{height:"16px",display:"flex",marginTop:.5,alignItems:"center",justifyContent:"center"},children:g.jsx(P.Fade,{in:m&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(P.Typography,{variant:"body2",sx:{fontSize:"12px",color:i==="measured"&&(p||f)?s.palette.success.main:s.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:i==="measured"&&f?p?1:.6:1,transition:"opacity 2s ease-in-out"},children:i==="measuring"?a("CycleTimer.Measuring.lb","measuring..."):i==="measured"?a("CycleTimer.Determined.lb","determined"):i==="countdown"&&c!==null?a("CycleTimer.OfTime.lb",{time:Mt(c,o.language)}):""})})})})]})]})},rO=({timerState:e,animationState:t,hasError:r,compact:n,className:a})=>{const{t:o,i18n:s}=Se.useTranslation(),i=P.useTheme(),{currentState:l,remainingTime:c,maxTime:u}=e,{showErrorAnimation:d,showPauseAnimation:h,showPulsatingText:p,pulsatingFinished:f,showIdlePulsating:m,idleDotsCount:y}=t;return n&&l==="idle"?g.jsx(P.Box,{className:a,sx:{display:"flex",alignItems:"center",m:0},children:g.jsx(P.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:r?o("CycleTimer.Error.lb","Error"):l==="idle"?"0s":Mt(c,s.language)})}):g.jsxs(P.Box,{className:a,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[!(l==="idle"&&n)&&g.jsx(P.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:h||d?.6:1,transition:"opacity 0.5s ease-out"},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:r?i.palette.error.light:l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.success.main,strokeWidth:"2",opacity:l==="measured"&&f?p?1:.6:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-(l==="idle"?0:e.currentProgress)/100)}`,style:{opacity:l==="measured"&&f?p?1:.6:1,transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsx(P.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:l==="idle"?"rgba(255, 255, 255, 0.7)":l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",opacity:l==="idle"?m?1:.6:l==="measured"&&f?p?1:.6:1,transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:r?o("CycleTimer.Error.lb","Error"):l==="idle"?g.jsxs(g.Fragment,{children:[g.jsx("span",{children:o("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left"},children:".".repeat(y)})]}):l==="measuring"?n?Mt(c,s.language):`${Mt(c,s.language)} / ${o("CycleTimer.Measuring.lb","measuring...")}`:l==="measured"?n?Mt(c,s.language):`${Mt(c,s.language)} / ${o("CycleTimer.Determined.lb","determined")}`:l==="countdown"&&u!==null?n?Mt(c,s.language):`${Mt(c,s.language)} / ${o("CycleTimer.Time.lb",{time:Mt(u,s.language)})}`:Mt(c,s.language)})]})},nO=()=>{const[e,t]=z.useState({showPauseAnimation:!1,showErrorAnimation:!1,showPulsatingText:!1,pulsatingFinished:!1,showLabels:!0,showMainText:!0,showIdlePulsating:!1,idleDotsCount:0}),r=z.useRef(null),n=z.useRef(null),a=z.useRef(null),o=z.useRef(null),s=z.useRef(0),i=z.useRef(null),l=z.useRef(null),c=z.useCallback(()=>{t(w=>({...w,showPauseAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(w=>({...w,showPauseAnimation:!1}))},800)},[]),u=z.useCallback(()=>{t(w=>({...w,showErrorAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(w=>({...w,showErrorAnimation:!1}))},600)},[]),d=z.useCallback(()=>{t(w=>({...w,showErrorAnimation:!1})),n.current&&clearTimeout(n.current)},[]),h=z.useCallback(w=>{s.current=0,t(O=>({...O,showPulsatingText:!0,pulsatingFinished:!1})),setTimeout(()=>{t(O=>({...O,pulsatingFinished:!0})),a.current=setInterval(()=>{t(O=>({...O,showPulsatingText:!O.showPulsatingText}))},2e3),w&&w()},800)},[]),p=z.useCallback(()=>{a.current&&(clearInterval(a.current),a.current=null),t(w=>({...w,showPulsatingText:!1,pulsatingFinished:!1})),s.current=0},[]),f=z.useCallback(()=>{t(w=>({...w,showIdlePulsating:!0})),i.current=setInterval(()=>{t(w=>({...w,showIdlePulsating:!w.showIdlePulsating}))},2e3),l.current=setInterval(()=>{t(w=>({...w,idleDotsCount:(w.idleDotsCount+1)%4}))},800)},[]),m=z.useCallback(()=>{i.current&&(clearInterval(i.current),i.current=null),l.current&&(clearInterval(l.current),l.current=null),t(w=>({...w,showIdlePulsating:!1,idleDotsCount:0}))},[]),y=z.useCallback(()=>{t(w=>({...w,showLabels:!1,showMainText:!1})),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{t(w=>({...w,showLabels:!0,showMainText:!0}))},200)},[]),S=z.useCallback(()=>{t(w=>({...w,showLabels:!0,showMainText:!0}))},[]),A=z.useCallback(()=>{r.current&&clearTimeout(r.current),n.current&&clearTimeout(n.current),o.current&&clearTimeout(o.current),a.current&&clearInterval(a.current),i.current&&clearInterval(i.current),l.current&&clearInterval(l.current)},[]);return{animationState:e,triggerPauseAnimation:c,triggerErrorAnimation:u,clearErrorAnimation:d,startPulsatingAnimation:h,stopPulsatingAnimation:p,startIdleAnimations:f,stopIdleAnimations:m,triggerFadeTransition:y,setInitialAnimationState:S,cleanup:A}};class wc{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 Cc(e=[],t={}){const r=z.useRef(null);return r.current||(r.current=new wc(e,t)),z.useEffect(()=>{var n;(n=r.current)==null||n.updateOptions(t)},[t]),z.useEffect(()=>()=>{var n;(n=r.current)==null||n.destroy()},[]),[r.current]}const aO=({autoStart:e,onCycleEnd:t,onMeasuringComplete:r,hasError:n,onPauseAnimation:a,onErrorAnimation:o,onClearErrorAnimation:s,onStartPulsating:i})=>{const[l,c]=z.useState({currentState:"idle",remainingTime:0,maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),u=z.useRef(null),d=z.useRef(null),h=z.useRef(0),[p]=Cc([0],{tension:80,friction:18,onChange:([T])=>{c(C=>({...C,currentProgress:T}))}}),f=z.useCallback(()=>{c(T=>({...T,currentState:"idle",maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0})),h.current=0,d.current=null,p.setImmediate([0])},[p]),m=z.useCallback((T=0)=>{const C=T/60%1*100;c(R=>({...R,currentState:"measuring",maxTime:null,remainingTime:T,isPausedState:!1,currentProgress:C})),h.current=0,p.setImmediate([C]),e?(d.current=Date.now()-T*1e3,c(R=>({...R,isRunning:!0}))):d.current=null},[e,p]),y=z.useCallback((T,C=0)=>{c(V=>({...V,isRunning:!1})),d.current=null,c(V=>({...V,currentState:"countdown",maxTime:T,isPausedState:!1})),h.current=0;const R=Math.max(0,T-C),E=C>0?C/T*100:0;c(V=>({...V,remainingTime:R,currentProgress:E})),p.setImmediate([E]),R===0?(c(V=>({...V,isRunning:!1})),d.current=null,t&&queueMicrotask(()=>t())):e?setTimeout(()=>{d.current=Date.now()-C*1e3,c(V=>({...V,isRunning:!0}))},0):d.current=null},[e,t,p]),S=z.useCallback(()=>{c(T=>({...T,isRunning:!1,currentState:"measured"})),d.current=null,i(()=>{r&&r()})},[i,r]),A=z.useCallback(()=>{if(d.current&&l.isRunning){const C=Date.now()-d.current;h.current+=C;const R=h.current/1e3,E=eO(l.currentState,R,l.maxTime);p.setTarget([E])}c(T=>({...T,isRunning:!1,isPausedState:!0})),a()},[l.isRunning,l.currentState,l.maxTime,p,a]),w=z.useCallback(()=>{l.isPausedState&&(l.remainingTime>0||l.currentState!=="countdown")&&(d.current=Date.now(),c(T=>({...T,isRunning:!0,isPausedState:!1})))},[l.isPausedState,l.remainingTime,l.currentState]),O=z.useCallback(()=>l.isPausedState,[l.isPausedState]);return z.useEffect(()=>{n?(l.isRunning&&!l.isPausedState&&(c(T=>({...T,wasRunningBeforeError:!0})),A()),o()):(l.wasRunningBeforeError&&l.isPausedState&&(c(T=>({...T,wasRunningBeforeError:!1})),w()),s())},[n,l.isRunning,l.isPausedState,l.wasRunningBeforeError,A,w,o,s]),z.useEffect(()=>{if(l.isRunning){const T=()=>{if(d.current){const R=(Date.now()-d.current+h.current)/1e3;if(l.currentState==="countdown"&&l.maxTime!==null){const E=Math.max(0,l.maxTime-R);c(b=>({...b,remainingTime:Math.ceil(E)}));const V=Math.min(100,R/l.maxTime*100);if(p.setTarget([V]),E<=0){c(b=>({...b,isRunning:!1,remainingTime:0})),d.current=null,p.setTarget([100]),t&&queueMicrotask(()=>t());return}}else if(l.currentState==="measuring"){c(V=>({...V,remainingTime:Math.floor(R)}));const E=R/60%1*100;p.setTarget([E])}l.isRunning&&(u.current=requestAnimationFrame(T))}};u.current=requestAnimationFrame(T)}else u.current&&(cancelAnimationFrame(u.current),u.current=null);return()=>{u.current&&cancelAnimationFrame(u.current)}},[l.isRunning,t,l.currentState,l.maxTime,p]),z.useEffect(()=>{let T=null;const C=()=>{p.update(1/60),T=requestAnimationFrame(C)};return T=requestAnimationFrame(C),()=>{T&&cancelAnimationFrame(T)}},[p]),{timerState:l,controls:{startNewCycle:y,startMeasuring:m,setIdle:f,completeMeasuring:S,pause:A,resume:w,isPaused:O}}},oO=Be(ge.observer(({onCycleComplete:e,onCycleEnd:t,onMeasuringComplete:r,autoStart:n=!0,variant:a="default",compact:o=!1,className:s,hasError:i=!1})=>{const l=z.useRef(void 0),{animationState:c,triggerPauseAnimation:u,triggerErrorAnimation:d,clearErrorAnimation:h,startPulsatingAnimation:p,stopPulsatingAnimation:f,startIdleAnimations:m,stopIdleAnimations:y,triggerFadeTransition:S,setInitialAnimationState:A,cleanup:w}=nO(),{timerState:O,controls:T}=aO({autoStart:n,onCycleEnd:t,onMeasuringComplete:r,hasError:i,onPauseAnimation:u,onErrorAnimation:d,onClearErrorAnimation:h,onStartPulsating:p});return z.useEffect(()=>{const C=l.current;l.current!==void 0&&C!==O.currentState?(C==="measured"&&f(),C==="idle"&&y(),S()):A(),O.currentState==="idle"&&m(),l.current=O.currentState},[O.currentState,f,y,m,S,A]),z.useEffect(()=>{let C=!0;const R=setTimeout(()=>{C&&e(T)},0);return()=>{C=!1,clearTimeout(R)}},[e,T]),z.useEffect(()=>w,[w]),a==="small"?g.jsx(rO,{timerState:O,animationState:c,hasError:i,compact:o,className:s}):g.jsx(tO,{timerState:O,animationState:c,hasError:i,className:s})})),sO=e=>{const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),a=e%60,o=[];return t>0?(o.push(t.toString()),o.push(r.toString().padStart(2,"0")),o.push(n.toString().padStart(2,"0")),o.push(a.toString().padStart(2,"0"))):r>0?(o.push(r.toString()),o.push(n.toString().padStart(2,"0")),o.push(a.toString().padStart(2,"0"))):(o.push(n.toString()),o.push(a.toString().padStart(2,"0"))),o.join(":")},vd=(e,t)=>{const r=Math.floor(e/86400),n=Math.floor(e%86400/3600),a=Math.floor(e%3600/60),o=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const i={};return r>0&&(i.days=r),n>0&&(i.hours=n),a>0&&(i.minutes=a),(o>0||Object.keys(i).length===0)&&(i.seconds=o),new Intl.DurationFormat(t,{style:"narrow"}).format(i)}catch{}const s=[];return r>0&&s.push(`${r}d`),n>0&&s.push(`${n}h`),a>0&&s.push(`${a}m`),(o>0||s.length===0)&&s.push(`${o}s`),s.join(" ")},iO=({timerState:e,animationState:t,hasError:r,className:n})=>{const{t:a}=Se.useTranslation(),o=up(),{elapsedTime:s,currentProgress:i}=e,{showErrorAnimation:l,showPauseAnimation:c,showMainText:u}=t;return g.jsxs(P.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(Sg.Gauge,{width:264,height:264,value:i,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:c||l?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:r?o.palette.error.light:o.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),g.jsx(P.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:g.jsxs(P.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(P.Fade,{in:u&&r,timeout:200,children:g.jsx(P.Typography,{variant:"h6",sx:{position:"absolute",fontSize:"16px",fontWeight:500,color:o.palette.error.light},children:a("timer.error")})}),g.jsx(P.Fade,{in:u&&!r,timeout:300,children:g.jsx(P.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:o.palette.text.primary,lineHeight:1,letterSpacing:"-0.5px"},children:sO(s)})})]})})]})},lO=({timerState:e,animationState:t,hasError:r,compact:n,className:a})=>{const{t:o,i18n:s}=Se.useTranslation(),i=up(),{elapsedTime:l,currentProgress:c}=e,{showErrorAnimation:u,showPauseAnimation:d}=t;return n?g.jsx(P.Box,{className:a,sx:{display:"flex",alignItems:"center",m:0},children:g.jsx(P.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:r?o("timer.error"):vd(l,s.language)})}):g.jsxs(P.Box,{className:a,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsx(P.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:d||u?.6:1,transition:"opacity 0.5s ease-out"},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:r?i.palette.error.light:i.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:i.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-c/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsx(P.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:r?o("timer.error"):vd(l,s.language)})]})},cO=()=>{const[e,t]=z.useState({showPauseAnimation:!1,showErrorAnimation:!1,showMainText:!0}),r=z.useRef(null),n=z.useRef(null),a=z.useRef(null),o=z.useCallback(()=>{t(d=>({...d,showPauseAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(d=>({...d,showPauseAnimation:!1}))},800)},[]),s=z.useCallback(()=>{t(d=>({...d,showErrorAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(d=>({...d,showErrorAnimation:!1}))},600)},[]),i=z.useCallback(()=>{t(d=>({...d,showErrorAnimation:!1})),n.current&&clearTimeout(n.current)},[]),l=z.useCallback(()=>{t(d=>({...d,showMainText:!1})),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{t(d=>({...d,showMainText:!0}))},200)},[]),c=z.useCallback(()=>{t(d=>({...d,showMainText:!0}))},[]),u=z.useCallback(()=>{r.current&&clearTimeout(r.current),n.current&&clearTimeout(n.current),a.current&&clearTimeout(a.current)},[]);return{animationState:e,triggerPauseAnimation:o,triggerErrorAnimation:s,clearErrorAnimation:i,triggerFadeTransition:l,setInitialAnimationState:c,cleanup:u}},uO=({autoStart:e,hasError:t,onPauseAnimation:r,onErrorAnimation:n,onClearErrorAnimation:a})=>{const[o,s]=z.useState({elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),i=z.useRef(null),l=z.useRef(null),c=z.useRef(0),u=z.useRef(0),[d]=Cc([0],{tension:80,friction:18,onChange:([S])=>{s(A=>({...A,currentProgress:S}))}}),h=z.useCallback((S=0)=>{const A=S/60%1*100;s(w=>({...w,elapsedTime:S,isPausedState:!1,currentProgress:A})),c.current=0,u.current=A,d.setImmediate([A]),e?(l.current=Date.now()-S*1e3,s(w=>({...w,isRunning:!0}))):l.current=null},[e,d]),p=z.useCallback(()=>{if(l.current&&o.isRunning){const A=(Date.now()-l.current)/1e3+c.current,w=A/60%1*100;d.setTarget([w]),s(O=>({...O,elapsedTime:Math.floor(A)}))}s(S=>({...S,isRunning:!1,isPausedState:!0})),r()},[o.isRunning,d,r]),f=z.useCallback(()=>{o.isPausedState&&(c.current=o.elapsedTime,l.current=Date.now(),s(S=>({...S,isRunning:!0,isPausedState:!1})))},[o.isPausedState,o.elapsedTime]),m=z.useCallback(()=>{s(S=>({...S,elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0})),c.current=0,l.current=null,u.current=0,d.setImmediate([0])},[d]),y=z.useCallback(()=>o.isPausedState,[o.isPausedState]);return z.useEffect(()=>{t?(o.isRunning&&(s(S=>({...S,wasRunningBeforeError:!0})),p()),n()):(o.wasRunningBeforeError&&!o.isRunning&&(s(S=>({...S,wasRunningBeforeError:!1})),f()),a())},[t,o.isRunning,o.wasRunningBeforeError,p,f,n,a]),z.useEffect(()=>{if(o.isRunning){const S=()=>{if(l.current){const w=(Date.now()-l.current)/1e3+c.current,O=w/60%1*100;s(C=>({...C,elapsedTime:Math.floor(w)})),Math.abs(O-u.current)>.1&&(d.setTarget([O]),u.current=O)}i.current=requestAnimationFrame(S)};i.current=requestAnimationFrame(S)}else i.current&&(cancelAnimationFrame(i.current),i.current=null);return()=>{i.current&&(cancelAnimationFrame(i.current),i.current=null)}},[o.isRunning,d]),z.useEffect(()=>{let S=null;const A=()=>{d.update(),S=requestAnimationFrame(A)};return S=requestAnimationFrame(A),()=>{S&&cancelAnimationFrame(S)}},[d]),{timerState:o,controls:{start:h,pause:p,resume:f,reset:m,isPaused:y}}},dO=Be(ge.observer(({onTimerReady:e,autoStart:t=!0,variant:r="default",compact:n=!1,className:a,hasError:o=!1})=>{const{animationState:s,triggerPauseAnimation:i,triggerErrorAnimation:l,clearErrorAnimation:c,setInitialAnimationState:u,cleanup:d}=cO(),{timerState:h,controls:p}=uO({autoStart:t,hasError:o,onPauseAnimation:i,onErrorAnimation:l,onClearErrorAnimation:c});return z.useEffect(()=>{u()},[u]),z.useEffect(()=>{let f=!0;const m=setTimeout(()=>{f&&e(p)},0);return()=>{f=!1,clearTimeout(m)}},[e,p]),z.useEffect(()=>d,[d]),r==="small"?g.jsx(lO,{timerState:h,animationState:s,hasError:o,compact:n,className:a}):g.jsx(iO,{timerState:h,animationState:s,hasError:o,className:a})})),Lr=Cy;process.env.NODE_ENV!=="production"&&(x.node,x.object.isRequired);function Oc(e){return wy(e)}function hO(e){return On("MuiSvgIcon",e)}Ml("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const pO=e=>{const{color:t,fontSize:r,classes:n}=e,a={root:["root",t!=="inherit"&&`color${et(t)}`,`fontSize${et(r)}`]};return es(a,hO,n)},mO=mt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${et(r.color)}`],t[`fontSize${et(r.fontSize)}`]]}})(Lr(({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 y,S;return{props:{color:m},style:{color:(S=(y=(e.vars??e).palette)==null?void 0:y[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}}]}})),Wo=N.forwardRef(function(t,r){const n=Oc({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=N.isValidElement(a)&&a.type==="svg",m={...n,color:s,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},y={};u||(y.viewBox=h);const S=pO(m);return g.jsxs(mO,{as:i,className:Pt(S.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...y,...p,...f&&a.props,ownerState:m,children:[f?a.props.children:a,d?g.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Wo.propTypes={children:x.node,classes:x.object,className:x.string,color:x.oneOfType([x.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),x.string]),component:x.elementType,fontSize:x.oneOfType([x.oneOf(["inherit","large","medium","small"]),x.string]),htmlColor:x.string,inheritViewBox:x.bool,shapeRendering:x.string,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),titleAccess:x.string,viewBox:x.string});Wo.muiName="SvgIcon";function yr(e,t){function r(n,a){return g.jsx(Wo,{"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=Wo.muiName,N.memo(N.forwardRef(r))}function fO(e){const{controlled:t,default:r,name:n,state:a="value"}=e,{current:o}=N.useRef(t!==void 0),[s,i]=N.useState(r),l=o?t:s;if(process.env.NODE_ENV!=="production"){N.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
|
-
`))}
|
|
127
|
-
`))},[JSON.stringify(r)])}const c=N.useCallback(u=>{o||i(u)},[]);return[l,c]}const gO=yr(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"),yO=yr(g.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),Sd=yr(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"),_m=Be(ge.observer(({data:e,columns:t,getRowData:r,onRowClick:n,selectedItem:a,getItemId:o,title:s,showCount:i=!0,searchPlaceholder:l="Search programs",dataGridProps:c,CustomToolbar:u,selectFirstByDefault:d=!1,sx:h})=>{var E;const p=P.useTheme(),f=St.useGridApiRef(),m=z.useRef(null),[y,S]=z.useState(null),A=z.useMemo(()=>e.map(r),[e,r]);z.useEffect(()=>{f.current&&A.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(V=>V.field)})},[A,t,f]),z.useEffect(()=>{if(!m.current||!f.current)return;const V=new ResizeObserver(()=>{setTimeout(()=>{f.current&&A.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(b=>b.field)})},100)});return V.observe(m.current),()=>{V.disconnect()}},[f,A.length,t]);const w=z.useMemo(()=>{if(a!==void 0)return a;if(y!==null)return y;if(d&&e.length>0){const V=e[0];return S(V),V}return null},[d,e,a,y]),O=V=>{const b=e.find(I=>r(I).id===V.id);b&&(a===void 0&&S(b),n&&n(b,V))},T=z.useMemo(()=>!w||!o?null:o(w),[w,o]);function C(){return g.jsx(St.Toolbar,{children:g.jsxs(P.Box,{sx:{display:"flex",width:"100%",gap:1,p:.5,alignItems:"center"},children:[s&&g.jsxs(P.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[s,i&&` (${e.length})`]}),g.jsxs(P.Box,{sx:{ml:"auto",display:"flex",gap:.5,alignItems:"center",pr:1},children:[g.jsx(St.FilterPanelTrigger,{render:g.jsx(St.ToolbarButton,{"aria-label":"Show filters",children:g.jsx(yO,{fontSize:"small"})})}),g.jsx(P.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),g.jsx(St.QuickFilter,{render:(V,b)=>g.jsxs(P.Box,{...V,sx:{display:"flex",overflow:"hidden"},children:[!b.expanded&&g.jsx(St.QuickFilterTrigger,{render:g.jsx(St.ToolbarButton,{"aria-label":"Search",children:g.jsx(Sd,{fontSize:"small"})})}),g.jsxs(P.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:b.expanded?"200px":"0px",position:"relative"},children:[g.jsxs(P.Box,{sx:{flex:1,position:"relative","& .MuiInputBase-root":{height:"32px",borderRadius:"16px",backgroundColor:"#171927",paddingLeft:"40px",paddingRight:b.expanded&&b.value!==""?"40px":"12px",color:"white",fontSize:"14px",border:"none !important",outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"},"&:hover":{"&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&:focus-within":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&.Mui-focused":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"& .MuiInputBase-input":{padding:"8px 0",border:"none !important",outline:"none !important",boxShadow:"none !important","&:focus":{outline:"none !important",boxShadow:"none !important",border:"none !important"},"&::placeholder":{color:"rgba(255, 255, 255, 0.3)",opacity:1}},"& fieldset":{border:"none !important",display:"none !important"},"& .MuiOutlinedInput-notchedOutline":{border:"none !important",display:"none !important"}}},children:[b.expanded&&g.jsx(Sd,{fontSize:"small",sx:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"rgba(255, 255, 255, 0.6)",zIndex:1,pointerEvents:"none"}}),g.jsx(St.QuickFilterControl,{placeholder:l})]}),b.expanded&&b.value!==""&&g.jsx(St.QuickFilterClear,{render:g.jsx(P.Box,{sx:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",zIndex:1},children:g.jsx(P.Box,{sx:{minWidth:"24px",width:"24px",height:"24px",padding:0,color:"rgba(255, 255, 255, 0.6)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},children:g.jsx(St.ToolbarButton,{"aria-label":"Clear",children:g.jsx(gO,{fontSize:"small"})})})})})]})]})})]})]})})}const R=u||C;return g.jsx(P.Box,{ref:m,sx:{height:"100%",display:"flex",flexDirection:"column","& *":{scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},"&:hover *":{scrollbarWidth:"thin",scrollbarColor:`${p.palette.divider} transparent`,"&::-webkit-scrollbar":{display:"block",width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:p.palette.divider,borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{background:p.palette.action.hover}},...h},children:g.jsx(St.DataGrid,{apiRef:f,rows:A,columns:t,onRowClick:O,disableColumnMenu:!1,disableRowSelectionOnClick:!0,disableMultipleRowSelection:!0,hideFooterSelectedRowCount:!0,filterMode:"client",sortingOrder:["desc","asc"],hideFooter:!1,showToolbar:!0,slots:{toolbar:R},initialState:{sorting:{sortModel:[]},filter:{filterModel:{items:[]}},...c==null?void 0:c.initialState},...c,autosizeOnMount:!0,autosizeOptions:{...(c==null?void 0:c.autosizeOptions)||{},includeOutliers:!0,includeHeaders:!0,expand:!0,columns:((E=c==null?void 0:c.autosizeOptions)==null?void 0:E.columns)||t.map(V=>V.field)},sx:{border:"none",width:"100%","& .MuiPaper-root":{boxShadow:"none !important"},"& .MuiDataGrid-overlay":{},"& .MuiDataGrid-main":{border:"none","& .MuiPaper-root":{}},"& .MuiDataGrid-container--top [role=row]":{},"& .MuiDataGrid-topContainer":{borderBottom:"none !important"},"& .MuiDataGrid-columnHeaders":{border:"none",borderBottom:"none !important"},"& .MuiDataGrid-row":{cursor:n?"pointer":"default",border:"none",margin:"1px 0",position:"relative",backgroundColor:"transparent !important","&: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"}},...T!==null&&{[`&[data-id="${T}"]`]:{backgroundColor:"transparent !important","&::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":{backgroundColor:"transparent !important"},"&: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"},"&:hover":{backgroundColor:"transparent !important"}},"& .MuiDataGrid-columnHeader":{border:"none",paddingLeft:"40px",paddingRight:"40px","& .MuiDataGrid-columnHeaderTitle":{color:"rgba(255, 255, 255, 0.6)"}},"& .MuiDataGrid-toolbarContainer":{padding:"8px",border:"none !important",borderBottom:"none !important","& .MuiBox-root":{},"& .MuiFormControl-root":{},"& .MuiInputBase-root":{},"& .MuiPaper-root":{boxShadow:"none !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"},"& .MuiBackdrop-root":{},"& .MuiModal-backdrop":{},...c==null?void 0:c.sx}})})}));_m.displayName="WandelbotsDataGrid";const hn=ky({createStyledComponent:mt("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Oc({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(hn.propTypes={children:x.node,component:x.elementType,direction:x.oneOfType([x.oneOf(["column-reverse","column","row-reverse","row"]),x.arrayOf(x.oneOf(["column-reverse","column","row-reverse","row"])),x.object]),divider:x.node,spacing:x.oneOfType([x.arrayOf(x.oneOfType([x.number,x.string])),x.number,x.object,x.string]),sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),useFlexGap:x.bool});const bO=({title:e,titleId:t,...r},n)=>N.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?N.createElement("title",{id:t},e):null,N.createElement("g",{id:"JogMinus"},N.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),xO=z.forwardRef(bO),vO=({title:e,titleId:t,...r},n)=>N.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?N.createElement("title",{id:t},e):null,N.createElement("g",{id:"JogPlus"},N.createElement("g",{id:"Plus"},N.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),N.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),N.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),SO=z.forwardRef(vO);function _s(e){z.useEffect(e,[])}function Vm(e){_s(()=>ke.autorun(e))}function Mm(e,t,r){_s(()=>ke.reaction(e,t,r))}function Vs(e){return _s(()=>{let t;function r(){e(),t=requestAnimationFrame(r)}return t=requestAnimationFrame(r),()=>{cancelAnimationFrame(t)}})}const ol=Be(ge.observer(({colors:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:a,disabled:o,activeJoggingDirection:s,...i})=>{var w,O,T,C,R,E,V;Vs(()=>{const b=r(),I=h.current;I&&(I.textContent=b)});const l=P.useTheme(),[c,u]=z.useState(null);z.useEffect(()=>{o&&A()},[o]);const d=s||c,h=z.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const p=d?(w=e.buttonBackgroundColor)==null?void 0:w.pressed:e.borderColor,f={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},m={...f,backgroundColor:(O=e.buttonBackgroundColor)==null?void 0:O.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:(R=e.buttonBackgroundColor)==null?void 0:R.disabled,"svg path":{fill:l.palette.action.disabled}}},y={...f,backgroundColor:(E=e.buttonBackgroundColor)==null?void 0:E.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(V=e.buttonBackgroundColor)==null?void 0:V.pressed,"svg path":{fill:l.palette.action.disabled}}};function S(b,I){o||b.button===0&&(u(I),n(I))}function A(){u(null),a()}return g.jsxs(hn,{height:"64px",direction:"row",justifyContent:"center",...i,children:[g.jsx(P.IconButton,{disabled:o,disableRipple:!0,onPointerDown:b=>S(b,"-"),onPointerUp:A,onPointerOut:A,size:"large",sx:{...d==="-"?y:m,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(xO,{})}),g.jsxs(hn,{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(hn,{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(P.Typography,{height:"22px",sx:{fontSize:"15px",color:o?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:r()})]}),g.jsx(P.IconButton,{disableRipple:!0,disabled:o,onPointerDown:b=>S(b,"+"),onPointerUp:A,onPointerOut:A,size:"large",sx:{...d==="+"?y:m,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(SO,{})})]})})),wO=yr(g.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),CO=yr(g.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function Er(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var jm=typeof global=="object"&&global&&global.Object===Object&&global,OO=typeof self=="object"&&self&&self.Object===Object&&self,Bt=jm||OO||Function("return this")(),Ti=function(){return Bt.Date.now()},TO=/\s/;function PO(e){for(var t=e.length;t--&&TO.test(e.charAt(t)););return t}var RO=/^\s+/;function AO(e){return e&&e.slice(0,PO(e)+1).replace(RO,"")}var mr=Bt.Symbol,km=Object.prototype,IO=km.hasOwnProperty,EO=km.toString,Hn=mr?mr.toStringTag:void 0;function _O(e){var t=IO.call(e,Hn),r=e[Hn];try{e[Hn]=void 0;var n=!0}catch{}var a=EO.call(e);return n&&(t?e[Hn]=r:delete e[Hn]),a}var VO=Object.prototype,MO=VO.toString;function jO(e){return MO.call(e)}var kO="[object Null]",$O="[object Undefined]",wd=mr?mr.toStringTag:void 0;function Br(e){return e==null?e===void 0?$O:kO:wd&&wd in Object(e)?_O(e):jO(e)}function _r(e){return e!=null&&typeof e=="object"}var UO="[object Symbol]";function Ms(e){return typeof e=="symbol"||_r(e)&&Br(e)==UO}var Cd=NaN,DO=/^[-+]0x[0-9a-f]+$/i,LO=/^0b[01]+$/i,BO=/^0o[0-7]+$/i,FO=parseInt;function Od(e){if(typeof e=="number")return e;if(Ms(e))return Cd;if(Er(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Er(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=AO(e);var r=LO.test(e);return r||BO.test(e)?FO(e.slice(2),r?2:8):DO.test(e)?Cd:+e}var NO="Expected a function",zO=Math.max,GO=Math.min;function HO(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(NO);t=Od(t)||0,Er(r)&&(u=!!r.leading,d="maxWait"in r,o=d?zO(Od(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(C){var R=n,E=a;return n=a=void 0,c=C,s=e.apply(E,R),s}function f(C){return c=C,i=setTimeout(S,t),u?p(C):s}function m(C){var R=C-l,E=C-c,V=t-R;return d?GO(V,o-E):V}function y(C){var R=C-l,E=C-c;return l===void 0||R>=t||R<0||d&&E>=o}function S(){var C=Ti();if(y(C))return A(C);i=setTimeout(S,m(C))}function A(C){return i=void 0,h&&n?p(C):(n=a=void 0,s)}function w(){i!==void 0&&clearTimeout(i),c=0,n=l=a=i=void 0}function O(){return i===void 0?s:A(Ti())}function T(){var C=Ti(),R=y(C);if(n=arguments,a=this,l=C,R){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=w,T.flush=O,T}var qO="Expected a function";function WO(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(qO);return Er(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),HO(e,t,{leading:n,maxWait:t,trailing:a})}const $m=Be(ge.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:a,disabled:o,...s})=>{var w,O,T,C,R,E,V,b,I,G,M,H,ne,re,ae;const{t:i}=Se.useTranslation(),[l,c]=z.useState(),u=P.useTheme(),d={background:(w=u.palette.backgroundPaperElevation)==null?void 0:w[4],color:(O=u.palette.backgroundPaperElevation)==null?void 0:O[11]},h=ge.useLocalObservable(()=>({activeJoggingDir:null,startJogging(ee){this.activeJoggingDir=ee,e(ee)},stopJogging(){this.activeJoggingDir=null,t()}})),p=WO(()=>{c(a())},50);Vs(p);function f(ee){ee.button===0&&h.startJogging("-")}function m(ee){ee.button===0&&h.startJogging("+")}function y(ee){h.stopJogging()}function S(ee){h.stopJogging()}function A(ee,le=1){if(ee===void 0||isNaN(ee))return"";const J=i("General.degree.variable",{amount:ee.toFixed(le)});return ee>0&&le===0?`+${J}`:J}return g.jsxs(hn,{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:(R=u.palette.backgroundPaperElevation)==null?void 0:R[9]},"&:active":{...d}}},children:[g.jsx(P.IconButton,{onPointerDown:f,onPointerUp:y,onPointerOut:S,disabled:o,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:g.jsx(wO,{sx:{pointerEvents:"none",color:(I=(b=(V=(E=u.componentsExt)==null?void 0:E.JoggingPanel)==null?void 0:V.JoggingJoint)==null?void 0:b.Joint)==null?void 0:I.arrowColor}})}),g.jsxs(hn,{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(P.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:o?u.palette.action.disabled:u.palette.text.primary},children:A(l)}),g.jsx(P.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:(M=u.palette.backgroundPaperElevation)==null?void 0:M[5],opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:A(r,0)},{value:n,label:A(n,0)}]})]}),g.jsx(P.IconButton,{onPointerDown:m,onPointerUp:y,onPointerOut:S,disabled:o,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:g.jsx(CO,{sx:{pointerEvents:"none",color:(ae=(re=(ne=(H=u.componentsExt)==null?void 0:H.JoggingPanel)==null?void 0:ne.JoggingJoint)==null?void 0:re.Joint)==null?void 0:ae.arrowColor}})})]})})),JO=yr(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"),YO=yr(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 KO(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Um=KO;function QO(){this.__data__=[],this.size=0}var XO=QO;function ZO(e,t){return e===t||e!==e&&t!==t}var Dm=ZO;function eT(e,t){for(var r=e.length;r--;)if(Dm(e[r][0],t))return r;return-1}var js=eT,tT=Array.prototype,rT=tT.splice;function nT(e){var t=this.__data__,r=js(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():rT.call(t,r,1),--this.size,!0}var aT=nT;function oT(e){var t=this.__data__,r=js(t,e);return r<0?void 0:t[r][1]}var sT=oT;function iT(e){return js(this.__data__,e)>-1}var lT=iT;function cT(e,t){var r=this.__data__,n=js(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var uT=cT;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=XO;An.prototype.delete=aT;An.prototype.get=sT;An.prototype.has=lT;An.prototype.set=uT;var ks=An;function dT(){this.__data__=new ks,this.size=0}var hT=dT;function pT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var mT=pT;function fT(e){return this.__data__.get(e)}var gT=fT;function yT(e){return this.__data__.has(e)}var bT=yT,xT=typeof global=="object"&&global&&global.Object===Object&&global,Lm=xT,vT=typeof self=="object"&&self&&self.Object===Object&&self,ST=Lm||vT||Function("return this")(),er=ST,wT=er.Symbol,Cn=wT,Bm=Object.prototype,CT=Bm.hasOwnProperty,OT=Bm.toString,qn=Cn?Cn.toStringTag:void 0;function TT(e){var t=CT.call(e,qn),r=e[qn];try{e[qn]=void 0;var n=!0}catch{}var a=OT.call(e);return n&&(t?e[qn]=r:delete e[qn]),a}var PT=TT,RT=Object.prototype,AT=RT.toString;function IT(e){return AT.call(e)}var ET=IT,_T="[object Null]",VT="[object Undefined]",Td=Cn?Cn.toStringTag:void 0;function MT(e){return e==null?e===void 0?VT:_T:Td&&Td in Object(e)?PT(e):ET(e)}var Ma=MT,jT="[object AsyncFunction]",kT="[object Function]",$T="[object GeneratorFunction]",UT="[object Proxy]";function DT(e){if(!Um(e))return!1;var t=Ma(e);return t==kT||t==$T||t==jT||t==UT}var Fm=DT,LT=er["__core-js_shared__"],Pi=LT,Pd=function(){var e=/[^.]+$/.exec(Pi&&Pi.keys&&Pi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function BT(e){return!!Pd&&Pd in e}var FT=BT,NT=Function.prototype,zT=NT.toString;function GT(e){if(e!=null){try{return zT.call(e)}catch{}try{return e+""}catch{}}return""}var Fr=GT,HT=/[\\^$.*+?()[\]{}|]/g,qT=/^\[object .+?Constructor\]$/,WT=Function.prototype,JT=Object.prototype,YT=WT.toString,KT=JT.hasOwnProperty,QT=RegExp("^"+YT.call(KT).replace(HT,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function XT(e){if(!Um(e)||FT(e))return!1;var t=Fm(e)?QT:qT;return t.test(Fr(e))}var ZT=XT;function eP(e,t){return e==null?void 0:e[t]}var tP=eP;function rP(e,t){var r=tP(e,t);return ZT(r)?r:void 0}var In=rP,nP=In(er,"Map"),xa=nP,aP=In(Object,"create"),va=aP;function oP(){this.__data__=va?va(null):{},this.size=0}var sP=oP;function iP(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var lP=iP,cP="__lodash_hash_undefined__",uP=Object.prototype,dP=uP.hasOwnProperty;function hP(e){var t=this.__data__;if(va){var r=t[e];return r===cP?void 0:r}return dP.call(t,e)?t[e]:void 0}var pP=hP,mP=Object.prototype,fP=mP.hasOwnProperty;function gP(e){var t=this.__data__;return va?t[e]!==void 0:fP.call(t,e)}var yP=gP,bP="__lodash_hash_undefined__";function xP(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=va&&t===void 0?bP:t,this}var vP=xP;function En(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])}}En.prototype.clear=sP;En.prototype.delete=lP;En.prototype.get=pP;En.prototype.has=yP;En.prototype.set=vP;var Rd=En;function SP(){this.size=0,this.__data__={hash:new Rd,map:new(xa||ks),string:new Rd}}var wP=SP;function CP(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var OP=CP;function TP(e,t){var r=e.__data__;return OP(t)?r[typeof t=="string"?"string":"hash"]:r.map}var $s=TP;function PP(e){var t=$s(this,e).delete(e);return this.size-=t?1:0,t}var RP=PP;function AP(e){return $s(this,e).get(e)}var IP=AP;function EP(e){return $s(this,e).has(e)}var _P=EP;function VP(e,t){var r=$s(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var MP=VP;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=wP;_n.prototype.delete=RP;_n.prototype.get=IP;_n.prototype.has=_P;_n.prototype.set=MP;var Nm=_n,jP=200;function kP(e,t){var r=this.__data__;if(r instanceof ks){var n=r.__data__;if(!xa||n.length<jP-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Nm(n)}return r.set(e,t),this.size=r.size,this}var $P=kP;function Vn(e){var t=this.__data__=new ks(e);this.size=t.size}Vn.prototype.clear=hT;Vn.prototype.delete=mT;Vn.prototype.get=gT;Vn.prototype.has=bT;Vn.prototype.set=$P;var Ri=Vn,UP="__lodash_hash_undefined__";function DP(e){return this.__data__.set(e,UP),this}var LP=DP;function BP(e){return this.__data__.has(e)}var FP=BP;function Jo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Nm;++t<r;)this.add(e[t])}Jo.prototype.add=Jo.prototype.push=LP;Jo.prototype.has=FP;var NP=Jo;function zP(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 GP=zP;function HP(e,t){return e.has(t)}var qP=HP,WP=1,JP=2;function YP(e,t,r,n,a,o){var s=r&WP,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&JP?new NP:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var y=s?n(m,f,d,t,e,o):n(f,m,d,e,t,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!GP(t,function(S,A){if(!qP(p,A)&&(f===S||a(f,S,r,n,o)))return p.push(A)})){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 zm=YP,KP=er.Uint8Array,Ad=KP;function QP(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var XP=QP;function ZP(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var eR=ZP,tR=1,rR=2,nR="[object Boolean]",aR="[object Date]",oR="[object Error]",sR="[object Map]",iR="[object Number]",lR="[object RegExp]",cR="[object Set]",uR="[object String]",dR="[object Symbol]",hR="[object ArrayBuffer]",pR="[object DataView]",Id=Cn?Cn.prototype:void 0,Ai=Id?Id.valueOf:void 0;function mR(e,t,r,n,a,o,s){switch(r){case pR:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case hR:return!(e.byteLength!=t.byteLength||!o(new Ad(e),new Ad(t)));case nR:case aR:case iR:return Dm(+e,+t);case oR:return e.name==t.name&&e.message==t.message;case lR:case uR:return e==t+"";case sR:var i=XP;case cR:var l=n&tR;if(i||(i=eR),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=rR,s.set(e,t);var u=zm(i(e),i(t),n,a,o,s);return s.delete(e),u;case dR:if(Ai)return Ai.call(e)==Ai.call(t)}return!1}var fR=mR;function gR(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var yR=gR,bR=Array.isArray,Yo=bR;function xR(e,t,r){var n=t(e);return Yo(e)?n:yR(n,r(e))}var vR=xR;function SR(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 wR=SR;function CR(){return[]}var OR=CR,TR=Object.prototype,PR=TR.propertyIsEnumerable,Ed=Object.getOwnPropertySymbols,RR=Ed?function(e){return e==null?[]:(e=Object(e),wR(Ed(e),function(t){return PR.call(e,t)}))}:OR,AR=RR;function IR(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var ER=IR;function _R(e){return e!=null&&typeof e=="object"}var Sa=_R,VR="[object Arguments]";function MR(e){return Sa(e)&&Ma(e)==VR}var _d=MR,Gm=Object.prototype,jR=Gm.hasOwnProperty,kR=Gm.propertyIsEnumerable,$R=_d(function(){return arguments}())?_d:function(e){return Sa(e)&&jR.call(e,"callee")&&!kR.call(e,"callee")},UR=$R;function DR(){return!1}var LR=DR,Hm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vd=Hm&&typeof module=="object"&&module&&!module.nodeType&&module,BR=Vd&&Vd.exports===Hm,Md=BR?er.Buffer:void 0,FR=Md?Md.isBuffer:void 0,NR=FR||LR,sl=NR,zR=9007199254740991,GR=/^(?:0|[1-9]\d*)$/;function HR(e,t){var r=typeof e;return t=t??zR,!!t&&(r=="number"||r!="symbol"&&GR.test(e))&&e>-1&&e%1==0&&e<t}var qR=HR,WR=9007199254740991;function JR(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=WR}var qm=JR,YR="[object Arguments]",KR="[object Array]",QR="[object Boolean]",XR="[object Date]",ZR="[object Error]",eA="[object Function]",tA="[object Map]",rA="[object Number]",nA="[object Object]",aA="[object RegExp]",oA="[object Set]",sA="[object String]",iA="[object WeakMap]",lA="[object ArrayBuffer]",cA="[object DataView]",uA="[object Float32Array]",dA="[object Float64Array]",hA="[object Int8Array]",pA="[object Int16Array]",mA="[object Int32Array]",fA="[object Uint8Array]",gA="[object Uint8ClampedArray]",yA="[object Uint16Array]",bA="[object Uint32Array]",Ie={};Ie[uA]=Ie[dA]=Ie[hA]=Ie[pA]=Ie[mA]=Ie[fA]=Ie[gA]=Ie[yA]=Ie[bA]=!0;Ie[YR]=Ie[KR]=Ie[lA]=Ie[QR]=Ie[cA]=Ie[XR]=Ie[ZR]=Ie[eA]=Ie[tA]=Ie[rA]=Ie[nA]=Ie[aA]=Ie[oA]=Ie[sA]=Ie[iA]=!1;function xA(e){return Sa(e)&&qm(e.length)&&!!Ie[Ma(e)]}var vA=xA;function SA(e){return function(t){return e(t)}}var wA=SA,Wm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ia=Wm&&typeof module=="object"&&module&&!module.nodeType&&module,CA=ia&&ia.exports===Wm,Ii=CA&&Lm.process,OA=function(){try{var e=ia&&ia.require&&ia.require("util").types;return e||Ii&&Ii.binding&&Ii.binding("util")}catch{}}(),jd=OA,kd=jd&&jd.isTypedArray,TA=kd?wA(kd):vA,Jm=TA,PA=Object.prototype,RA=PA.hasOwnProperty;function AA(e,t){var r=Yo(e),n=!r&&UR(e),a=!r&&!n&&sl(e),o=!r&&!n&&!a&&Jm(e),s=r||n||a||o,i=s?ER(e.length,String):[],l=i.length;for(var c in e)(t||RA.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||qR(c,l)))&&i.push(c);return i}var IA=AA,EA=Object.prototype;function _A(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||EA;return e===r}var VA=_A;function MA(e,t){return function(r){return e(t(r))}}var jA=MA,kA=jA(Object.keys,Object),$A=kA,UA=Object.prototype,DA=UA.hasOwnProperty;function LA(e){if(!VA(e))return $A(e);var t=[];for(var r in Object(e))DA.call(e,r)&&r!="constructor"&&t.push(r);return t}var BA=LA;function FA(e){return e!=null&&qm(e.length)&&!Fm(e)}var NA=FA;function zA(e){return NA(e)?IA(e):BA(e)}var GA=zA;function HA(e){return vR(e,GA,AR)}var $d=HA,qA=1,WA=Object.prototype,JA=WA.hasOwnProperty;function YA(e,t,r,n,a,o){var s=r&qA,i=$d(e),l=i.length,c=$d(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:JA.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 y=s;++d<l;){h=i[d];var S=e[h],A=t[h];if(n)var w=s?n(A,S,h,t,e,o):n(S,A,h,e,t,o);if(!(w===void 0?S===A||a(S,A,r,n,o):w)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var O=e.constructor,T=t.constructor;O!=T&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof T=="function"&&T instanceof T)&&(m=!1)}return o.delete(e),o.delete(t),m}var KA=YA,QA=In(er,"DataView"),il=QA,XA=In(er,"Promise"),ll=XA,ZA=In(er,"Set"),cl=ZA,e2=In(er,"WeakMap"),ul=e2,Ud="[object Map]",t2="[object Object]",Dd="[object Promise]",Ld="[object Set]",Bd="[object WeakMap]",Fd="[object DataView]",r2=Fr(il),n2=Fr(xa),a2=Fr(ll),o2=Fr(cl),s2=Fr(ul),Sr=Ma;(il&&Sr(new il(new ArrayBuffer(1)))!=Fd||xa&&Sr(new xa)!=Ud||ll&&Sr(ll.resolve())!=Dd||cl&&Sr(new cl)!=Ld||ul&&Sr(new ul)!=Bd)&&(Sr=function(e){var t=Ma(e),r=t==t2?e.constructor:void 0,n=r?Fr(r):"";if(n)switch(n){case r2:return Fd;case n2:return Ud;case a2:return Dd;case o2:return Ld;case s2:return Bd}return t});var Nd=Sr,i2=1,zd="[object Arguments]",Gd="[object Array]",no="[object Object]",l2=Object.prototype,Hd=l2.hasOwnProperty;function c2(e,t,r,n,a,o){var s=Yo(e),i=Yo(t),l=s?Gd:Nd(e),c=i?Gd:Nd(t);l=l==zd?no:l,c=c==zd?no:c;var u=l==no,d=c==no,h=l==c;if(h&&sl(e)){if(!sl(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new Ri),s||Jm(e)?zm(e,t,r,n,a,o):fR(e,t,l,r,n,a,o);if(!(r&i2)){var p=u&&Hd.call(e,"__wrapped__"),f=d&&Hd.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,y=f?t.value():t;return o||(o=new Ri),a(m,y,r,n,o)}}return h?(o||(o=new Ri),KA(e,t,r,n,a,o)):!1}var u2=c2;function Ym(e,t,r,n,a){return e===t?!0:e==null||t==null||!Sa(e)&&!Sa(t)?e!==e&&t!==t:u2(e,t,r,n,Ym,a)}var d2=Ym;function h2(e,t){return d2(e,t)}var p2=h2;/*! *****************************************************************************
|
|
115
|
+
*/var Zu;function Vx(){return Zu||(Zu=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=G,r=dc(),n=typeof Object.is=="function"?Object.is:e,o=r.useSyncExternalStore,s=t.useRef,a=t.useEffect,i=t.useMemo,l=t.useDebugValue;Di.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var f=s(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function b(O){if(!C){if(C=!0,w=O,O=h(O),p!==void 0&&m.hasValue){var P=m.value;if(p(P,O))return T=P}return T=O}if(P=T,n(w,O))return P;var E=h(O);return p!==void 0&&p(P,E)?(w=O,P):(w=O,T=E)}var C=!1,w,T,A=d===void 0?null:d;return[function(){return b(u())},A===null?void 0:function(){return b(A())}]},[u,d,h,p]);var y=o(c,f[0],f[1]);return a(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Di}var ed;function kx(){return ed||(ed=1,process.env.NODE_ENV==="production"?us.exports=Mx():us.exports=Vx()),us.exports}var jx=kx();const $x=parseInt(F.version,10),Dx=$x>=19,Ux=Dx?Bx:Fx;function Lx(e,t,r,n,o){return Ux(e,t,r,n,o)}function Bx(e,t,r,n,o){const s=F.useCallback(()=>t(e.getSnapshot(),r,n,o),[e,t,r,n,o]);return _x.useSyncExternalStore(e.subscribe,s,s)}function Fx(e,t,r,n,o){return jx.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,r,n,o))}const td={};function Nx(e,t){const r=F.useRef(td);return r.current===td&&(r.current=e(t)),r}const zx=[];function Gx(e){F.useEffect(e,zx)}const Hx=()=>{};function qx(e,t,r){const n=Nx(Wx,{store:e,selector:t}).current;n.effect=r,Gx(n.onMount)}function Wx(e){const{store:t,selector:r}=e;let n=r(t.state);const o={effect:Hx,dispose:null,subscribe:()=>{o.dispose??(o.dispose=t.subscribe(s=>{const a=r(s);if(!Object.is(n,a)){const i=n;n=a,o.effect(i,a)}}))},onMount:()=>(o.subscribe(),()=>{var s;(s=o.dispose)==null||s.call(o),o.dispose=null})};return o.subscribe(),o}class hc{constructor(t){oe(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));oe(this,"getSnapshot",()=>this.state);oe(this,"use",(t,r,n,o)=>Lx(this,t,r,n,o));this.state=t,this.listeners=new Set,this.updateTick=0}static create(t){return new hc(t)}setState(t){this.state=t,this.updateTick+=1;const r=this.updateTick,n=this.listeners.values();let o;for(;o=n.next(),!o.done;){if(r!==this.updateTick)return;const s=o.value;s(t)}}update(t){for(const r in t)if(!Object.is(this.state[r],t[r])){this.setState(Q({},this.state,t));return}}set(t,r){Object.is(this.state[t],r)||this.setState(Q({},this.state,{[t]:r}))}}const $a=({params:e,store:t})=>{F.useEffect(()=>{t.set("animation",Q({},t.state.animation,{skip:e.skipAnimation}))},[t,e.skipAnimation]);const r=F.useCallback(()=>{let n=!1;return t.set("animation",Q({},t.state.animation,{skipAnimationRequests:t.state.animation.skipAnimationRequests+1})),()=>{n||(n=!0,t.set("animation",Q({},t.state.animation,{skipAnimationRequests:t.state.animation.skipAnimationRequests-1})))}},[t]);return kt(()=>{if(typeof window>"u"||!(window!=null&&window.matchMedia))return;let o;const s=i=>{i.matches?o=r():o==null||o()},a=window.matchMedia("(prefers-reduced-motion)");return s(a),a.addEventListener("change",s),()=>{a.removeEventListener("change",s)}},[r,t]),{instance:{disableAnimation:r}}};$a.params={skipAnimation:!0};$a.getDefaultizedParams=({params:e})=>Q({},e,{skipAnimation:e.skipAnimation??!1});$a.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}}};const Jx=e=>e.animation,Yx=ce(Jx,e=>e.skip||e.skipAnimationRequests>0);function Kp(e,t){const r=F.useRef(!0);F.useEffect(()=>{if(r.current){r.current=!1;return}return e()},t)}function bo(e){return e&&e.ownerDocument||document}function Kx(e){return bo(e).defaultView||window}const Qx="DEFAULT_X_AXIS_KEY",Xx="DEFAULT_Y_AXIS_KEY",Zx={top:20,bottom:20,left:20,right:20},ev=45,tv=25,Qp=20,Cr=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.x},Or=e=>{var t;return(t=e.cartesianAxis)==null?void 0:t.y},rv=ce(Or,function(t){return(t??[]).reduce((r,n)=>{var o;return n.position==="left"?r+(n.width||0)+((o=n.zoom)!=null&&o.slider.enabled?n.zoom.slider.size:0):r},0)}),nv=ce(Or,function(t){return(t??[]).reduce((r,n)=>{var o;return n.position==="right"?r+(n.width||0)+((o=n.zoom)!=null&&o.slider.enabled?n.zoom.slider.size:0):r},0)}),ov=ce(Cr,function(t){return(t??[]).reduce((r,n)=>{var o;return n.position==="top"?r+(n.height||0)+((o=n.zoom)!=null&&o.slider.enabled?n.zoom.slider.size:0):r},0)}),sv=ce(Cr,function(t){return(t??[]).reduce((r,n)=>{var o;return n.position==="bottom"?r+(n.height||0)+((o=n.zoom)!=null&&o.slider.enabled?n.zoom.slider.size:0):r},0)}),av=Ge(rv,nv,ov,sv,function(t,r,n,o){return{left:t,right:r,top:n,bottom:o}}),No=e=>e.dimensions,iv=e=>e.dimensions.margin,Jt=Ge(No,iv,av,function({width:t,height:r},{top:n,right:o,bottom:s,left:a},{left:i,right:l,top:c,bottom:u}){return{width:t-a-o-i-l,left:a+i,right:o+l,height:r-n-s-c-u,top:n+c,bottom:s+u}}),lv=ce(No,e=>e.width),cv=ce(No,e=>e.height),uv=ce(No,e=>e.propsWidth),dv=ce(No,e=>e.propsHeight);function Xp(e,t){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:t?Q({},t,e):e}const hv=10,Da=({params:e,store:t,svgRef:r})=>{const n=e.width!==void 0&&e.height!==void 0,o=F.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[s,a]=F.useState(0),[i,l]=F.useState(0),c=F.useCallback(()=>{const f=r==null?void 0:r.current;if(!f)return{};const y=Kx(f).getComputedStyle(f),b=Math.floor(parseFloat(y.height))||0,C=Math.floor(parseFloat(y.width))||0;return(t.state.dimensions.width!==C||t.state.dimensions.height!==b)&&t.set("dimensions",{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:e.width??C,height:e.height??b,propsWidth:e.width,propsHeight:e.height}),{height:b,width:C}},[t,r,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]);Kp(()=>{const f=e.width??t.state.dimensions.width,m=e.height??t.state.dimensions.height;t.set("dimensions",{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:f,height:m,propsHeight:e.height,propsWidth:e.width})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),F.useEffect(()=>{o.current.displayError=!0},[]),kt(()=>{if(n||!o.current.initialCompute||o.current.computeRun>hv)return;const f=c();f.width!==s||f.height!==i?(o.current.computeRun+=1,f.width!==void 0&&a(f.width),f.height!==void 0&&l(f.height)):o.current.initialCompute&&(o.current.initialCompute=!1)},[i,s,c,n]),kt(()=>{if(n)return()=>{};c();const f=r.current;if(typeof ResizeObserver>"u")return()=>{};let m;const y=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{c()})});return f&&y.observe(f),()=>{m&&cancelAnimationFrame(m),f&&y.unobserve(f)}},[c,n,r]),process.env.NODE_ENV!=="production"&&(o.current.displayError&&e.width===void 0&&s===0&&(console.error("MUI X Charts: ChartContainer does not have `width` prop, and its container has no `width` defined."),o.current.displayError=!1),o.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."),o.current.displayError=!1));const u=t.use(Jt),d=F.useCallback(f=>f>=u.left-1&&f<=u.left+u.width,[u.left,u.width]),h=F.useCallback(f=>f>=u.top-1&&f<=u.top+u.height,[u.height,u.top]);return{instance:{isPointInside:F.useCallback((f,m,y)=>y&&"closest"in y&&y.closest("[data-drawing-container]")?!0:d(f)&&h(m),[d,h]),isXInside:d,isYInside:h}}};Da.params={width:!0,height:!0,margin:!0};Da.getDefaultizedParams=({params:e})=>Q({},e,{margin:Xp(e.margin,Zx)});Da.getInitialState=({width:e,height:t,margin:r})=>({dimensions:{margin:r,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});const pc=({params:e,store:t})=>(kt(()=>{t.set("experimentalFeatures",e.experimentalFeatures)},[t,e.experimentalFeatures]),{});pc.params={experimentalFeatures:!0};pc.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});const pv=e=>e.experimentalFeatures,Ua=ce(pv,e=>!!(e!=null&&e.preferStrictDomainInLineCharts));let rd=0;const mv=()=>(rd+=1,`mui-chart-${rd}`),mc=({params:e,store:t})=>(F.useEffect(()=>{e.id===void 0||e.id===t.state.id.providedChartId&&t.state.id.chartId!==void 0||t.set("id",Q({},t.state.id,{chartId:e.id??mv()}))},[t,e.id]),{});mc.params={id:!0};mc.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});const fv=e=>e.id,gv=ce(fv,e=>e.chartId);function yt(e){const t=F.useRef(e);return kt(()=>{t.current=e}),F.useRef((...r)=>(0,t.current)(...r)).current}const yv=["#4254FB","#FFB422","#FA4F58","#0DBEFF","#22BF75","#FA83B4","#FF7511"],bv=["#495AFB","#FFC758","#F35865","#30C8FF","#44CE8D","#F286B3","#FF8C39"],Zp=e=>e==="dark"?bv:yv,em=({series:e,colors:t,seriesConfig:r})=>{const n={};return e.forEach((o,s)=>{var l;const a=r[o.type].getSeriesWithDefaultValues(o,s,t),i=a.id;if(n[o.type]===void 0&&(n[o.type]={series:{},seriesOrder:[]}),((l=n[o.type])==null?void 0:l.series[i])!==void 0)throw new Error(`MUI X Charts: series' id "${i}" is not unique.`);n[o.type].series[i]=a,n[o.type].seriesOrder.push(i)}),n},xv=(e,t,r,n)=>{const o={};return Object.keys(t).forEach(s=>{var i,l;const a=e[s];a!==void 0&&(o[s]=((l=(i=t[s])==null?void 0:i.seriesProcessor)==null?void 0:l.call(i,a,r,n))??a)}),o},vv=(e,t,r)=>{let n=!1;const o={};return Object.keys(e).forEach(s=>{var l;const a=(l=t[s])==null?void 0:l.seriesLayout,i=e[s];if(a!==void 0&&i!==void 0){const c=a(i,r);c&&c!==e[s]&&(n=!0,o[s]=c)}}),n?o:{}},tm=(e,t)=>{var n;const r=(n=e[t.type])==null?void 0:n.identifierSerializer;if(!r)throw new Error(`MUI X Charts: No identifier serializer found for series type "${t.type}".`);return r(t)},La=({params:e,store:t,seriesConfig:r})=>{const{series:n,dataset:o,theme:s,colors:a}=e;return Kp(()=>{t.set("series",Q({},t.state.series,{defaultizedSeries:em({series:n,colors:typeof a=="function"?a(s):a,seriesConfig:r}),dataset:o}))},[a,o,n,s,r,t]),{instance:{serializeIdentifier:yt(l=>tm(r,l))}}};La.params={dataset:!0,series:!0,colors:!0,theme:!0};const Sv=[];La.getDefaultizedParams=({params:e})=>{var t;return Q({},e,{series:(t=e.series)!=null&&t.length?e.series:Sv,colors:e.colors??Zp,theme:e.theme??"light"})};La.getInitialState=({series:e=[],colors:t,theme:r,dataset:n},o,s)=>({series:{seriesConfig:s,defaultizedSeries:em({series:e,colors:typeof t=="function"?t(r):t,seriesConfig:s}),dataset:n}});const wv=(e,t,r)=>{const n=tm(r,t);return!e.has(n)},Cv=e=>e.visibilityManager,Ov=new Map,Tv=ce(Cv,e=>(e==null?void 0:e.visibilityMap)??Ov),Pv=Ge(Tv,e=>(t,r)=>wv(e,r,t)),fc=e=>e.series,Av=ce(fc,e=>e.defaultizedSeries),Tr=ce(fc,e=>e.seriesConfig),Rv=ce(fc,e=>e.dataset),st=Ge(Av,Tr,Rv,Pv,function(t,r,n,o){return xv(t,r,n,s=>o(r,s))});Ge(st,Tr,Jt,function(t,r,n){return vv(t,r,n)});const Ev={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,beforematch:!0,pointerrawupdate:!0};class rm{constructor(t){oe(this,"customData",{});oe(this,"handleOptionsChange",t=>{t&&t.detail&&this.updateOptions(t.detail)});oe(this,"handleStateChange",t=>{t&&t.detail&&this.updateState(t.detail)});if(!t||!t.name)throw new Error("Gesture must be initialized with a valid name.");if(t.name in Ev)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??[],this.pointerOptions=t.pointerOptions??{}}init(t,r,n,o){this.element=t,this.pointerManager=r,this.gesturesRegistry=n,this.keyboardManager=o;const s=`${this.name}ChangeOptions`;this.element.addEventListener(s,this.handleOptionsChange);const a=`${this.name}ChangeState`;this.element.addEventListener(a,this.handleStateChange)}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,this.pointerOptions=t.pointerOptions??this.pointerOptions}getBaseConfig(){return{requiredKeys:this.requiredKeys}}getEffectiveConfig(t,r){if(t!=="mouse"&&t!=="touch"&&t!=="pen")return r;const n=this.pointerOptions[t];return n?Q({},r,n):r}updateState(t){Object.assign(this.state,t)}getTargetElement(t){return this.isActive||this.element===t.target||"contains"in this.element&&this.element.contains(t.target)||"getRootNode"in this.element&&this.element.getRootNode()instanceof ShadowRoot&&t.composedPath().includes(this.element)?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,r){const n=this.getEffectiveConfig(r,this.getBaseConfig());if(!this.keyboardManager.areKeysPressed(n.requiredKeys))return!0;if(this.preventIf.length===0)return!1;const o=this.gesturesRegistry.getActiveGestures(t);return this.preventIf.some(s=>o[s])}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);const r=`${this.name}ChangeState`;this.element.removeEventListener(r,this.handleStateChange)}}class Iv{constructor(){oe(this,"activeGestures",new Map)}registerActiveGesture(t,r){this.activeGestures.has(t)||this.activeGestures.set(t,new Set);const n=this.activeGestures.get(t),o={gesture:r,element:t};n.add(o)}unregisterActiveGesture(t,r){const n=this.activeGestures.get(t);n&&(n.forEach(o=>{o.gesture===r&&n.delete(o)}),n.size===0&&this.activeGestures.delete(t))}getActiveGestures(t){const r=this.activeGestures.get(t);return r?Array.from(r).reduce((n,o)=>(n[o.gesture.name]=!0,n),{}):{}}isGestureActive(t,r){const n=this.activeGestures.get(t);return n?Array.from(n).some(o=>o.gesture===r):!1}destroy(){this.activeGestures.clear()}unregisterElement(t){this.activeGestures.delete(t)}}class _v{constructor(){oe(this,"pressedKeys",new Set);oe(this,"handleKeyDown",t=>{this.pressedKeys.add(t.key)});oe(this,"handleKeyUp",t=>{this.pressedKeys.delete(t.key)});oe(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"?navigator.platform.includes("Mac")?this.pressedKeys.has("Meta"):this.pressedKeys.has("Control"):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 Mv{constructor(t){oe(this,"preventEventInterruption",!0);oe(this,"pointers",new Map);oe(this,"gestureHandlers",new Set);oe(this,"handleInterruptEvents",t=>{if(this.preventEventInterruption&&"pointerType"in t&&t.pointerType==="touch"){t.preventDefault();return}const r=new PointerEvent("forceCancel",{bubbles:!1,cancelable:!1}),n=this.pointers.values().next().value;if(this.pointers.size>0&&n){Object.defineProperties(r,{clientX:{value:n.clientX},clientY:{value:n.clientY},pointerId:{value:n.pointerId},pointerType:{value:n.pointerType}});for(const[o,s]of this.pointers.entries()){const a=Q({},s,{type:"forceCancel"});this.pointers.set(o,a)}}this.notifyHandlers(r),this.pointers.clear()});oe(this,"handlePointerEvent",t=>{const{type:r,pointerId:n}=t;if(r==="pointerdown"||r==="pointermove")this.pointers.set(n,this.createPointerData(t));else if(r==="pointerup"||r==="pointercancel"||r==="forceCancel"){this.pointers.set(n,this.createPointerData(t)),this.notifyHandlers(t),this.pointers.delete(n);return}this.notifyHandlers(t)});this.root=t.root??document.getRootNode({composed:!0})??document.body,this.touchAction=t.touchAction||"auto",this.passive=t.passive??!1,this.preventEventInterruption=t.preventEventInterruption??!0,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 Vv{constructor(t){oe(this,"gestureTemplates",new Map);oe(this,"elementGestureMap",new Map);oe(this,"activeGesturesRegistry",new Iv);oe(this,"keyboardManager",new _v);this.pointerManager=new Mv({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 o=this.elementGestureMap.get(r);if(!o||!o.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const s=new CustomEvent(`${t}ChangeOptions`,{detail:n,bubbles:!1,cancelable:!1,composed:!1});r.dispatchEvent(s)}setGestureState(t,r,n){const o=this.elementGestureMap.get(r);if(!o||!o.has(t)){console.error(`Gesture "${t}" not found on the provided element.`);return}const s=new CustomEvent(`${t}ChangeState`,{detail:n,bubbles:!1,cancelable:!1,composed:!1});r.dispatchEvent(s)}registerElement(t,r,n){return Array.isArray(t)||(t=[t]),t.forEach(o=>{const s=n==null?void 0:n[o];this.registerSingleGesture(o,r,s)}),r}registerSingleGesture(t,r,n){const o=this.gestureTemplates.get(t);if(!o)return console.error(`Gesture template "${t}" not found.`),!1;this.elementGestureMap.has(r)||this.elementGestureMap.set(r,new Map);const s=this.elementGestureMap.get(r);s.has(t)&&(console.warn(`Element already has gesture "${t}" registered. It will be replaced.`),this.unregisterElement(t,r));const a=o.clone(n);return a.init(r,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),s.set(t,a),!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(),this.pointerManager.destroy()}}class Kr extends rm{constructor(r){super(r);oe(this,"unregisterHandler",null);oe(this,"originalTarget",null);this.minPointers=r.minPointers??1,this.maxPointers=r.maxPointers??1/0}init(r,n,o,s){super.init(r,n,o,s),this.unregisterHandler=this.pointerManager.registerGestureHandler(this.handlePointerEvent)}updateOptions(r){super.updateOptions(r),this.minPointers=r.minPointers??this.minPointers,this.maxPointers=r.maxPointers??this.maxPointers}getBaseConfig(){return{requiredKeys:this.requiredKeys,minPointers:this.minPointers,maxPointers:this.maxPointers}}isWithinPointerCount(r,n){const o=this.getEffectiveConfig(n,this.getBaseConfig());return r.length>=o.minPointers&&r.length<=o.maxPointers}getRelevantPointers(r,n){return r.filter(o=>this.isPointerTypeAllowed(o.pointerType)&&(n===o.target||o.target===this.originalTarget||n===this.originalTarget||"contains"in n&&n.contains(o.target))||"getRootNode"in n&&n.getRootNode()instanceof ShadowRoot&&o.srcEvent.composedPath().includes(n))}destroy(){this.unregisterHandler&&(this.unregisterHandler(),this.unregisterHandler=null),super.destroy()}}function kv(e,t){const r=t.x-e.x,n=t.y-e.y;return Math.sqrt(r*r+n*n)}function ds(e){if(e.length<2)return 0;let t=0,r=0;for(let n=0;n<e.length;n+=1)for(let o=n+1;o<e.length;o+=1)t+=kv({x:e[n].clientX,y:e[n].clientY},{x:e[o].clientX,y:e[o].clientY}),r+=1;return r>0?t/r:0}function Mt(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 Tt(e,t){return`${e}${t==="ongoing"?"":t.charAt(0).toUpperCase()+t.slice(1)}`}const hs=1e-5,dr=1e-5,nd=.15;function jv(e,t){const r=t.x-e.x,n=t.y-e.y,o={vertical:null,horizontal:null,mainAxis:null},s=$v(t,e),a=Math.abs(r)>Math.abs(n)?"horizontal":"vertical",i=s||a==="horizontal"?hs:nd,l=s?hs:a==="horizontal"?nd:hs;return Math.abs(r)>i&&(o.horizontal=r>0?"right":"left"),Math.abs(n)>l&&(o.vertical=n>0?"down":"up"),o.mainAxis=s?"diagonal":a,o}function $v(e,t){const r=t.x-e.x,n=t.y-e.y,o=Math.atan2(n,r)*180/Math.PI;return o>=-45+dr&&o<=-22.5+dr||o>=22.5+dr&&o<=45+dr||o>=135+dr&&o<=157.5+dr||o>=-157.5+dr&&o<=-135+dr}function Dv(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,Lv=e=>e>Uv?1:e<-0?-1:0,fr=e=>{e.cancelable&&e.preventDefault()};class gc extends Kr{constructor(r){super(r);oe(this,"state",{lastPosition:null});oe(this,"handleElementEnter",r=>{if(r.pointerType!=="mouse"&&r.pointerType!=="pen")return;const n=this.pointerManager.getPointers()||new Map,o=Array.from(n.values());if(this.isWithinPointerCount(o,r.pointerType)){this.isActive=!0;const s={x:r.clientX,y:r.clientY};this.state.lastPosition=s,this.emitMoveEvent(this.element,"start",o,r),this.emitMoveEvent(this.element,"ongoing",o,r)}});oe(this,"handleElementLeave",r=>{if(r.pointerType!=="mouse"&&r.pointerType!=="pen"||!this.isActive)return;const n=this.pointerManager.getPointers()||new Map,o=Array.from(n.values());this.emitMoveEvent(this.element,"end",o,r),this.resetState()});oe(this,"handlePointerEvent",(r,n)=>{if(n.type!=="pointermove"||n.pointerType!=="mouse"&&n.pointerType!=="pen")return;this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation();const o=Array.from(r.values()),s=this.getTargetElement(n);if(!s||!this.isWithinPointerCount(o,n.pointerType))return;if(this.shouldPreventGesture(s,n.pointerType)){if(!this.isActive)return;this.resetState(),this.emitMoveEvent(s,"end",o,n);return}const a={x:n.clientX,y:n.clientY};this.state.lastPosition=a,this.isActive||(this.isActive=!0,this.emitMoveEvent(s,"start",o,n)),this.emitMoveEvent(s,"ongoing",o,n)});this.threshold=r.threshold||0}clone(r){return new gc(Q({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],pointerOptions:structuredClone(this.pointerOptions)},r))}init(r,n,o,s){super.init(r,n,o,s),this.element.addEventListener("pointerenter",this.handleElementEnter),this.element.addEventListener("pointerleave",this.handleElementLeave)}destroy(){this.element.removeEventListener("pointerenter",this.handleElementEnter),this.element.removeEventListener("pointerleave",this.handleElementLeave),this.resetState(),super.destroy()}updateOptions(r){super.updateOptions(r)}resetState(){this.isActive=!1,this.state={lastPosition:null}}emitMoveEvent(r,n,o,s){const a=this.state.lastPosition||Mt(o),i=this.gesturesRegistry.getActiveGestures(r),l={gestureName:this.name,centroid:a,target:s.target,srcEvent:s,phase:n,pointers:o,timeStamp:s.timeStamp,activeGestures:i,customData:this.customData},c=Tt(this.name,n),u=new CustomEvent(c,{bubbles:!0,cancelable:!0,composed:!0,detail:l});r.dispatchEvent(u)}}class Br extends Kr{constructor(r){super(r);oe(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});oe(this,"handlePointerEvent",(r,n)=>{var i;const o=Array.from(r.values());if(n.type==="forceCancel"){this.cancel(n.target,o,n);return}const s=this.getTargetElement(n);if(!s)return;if(this.shouldPreventGesture(s,n.pointerType)){this.cancel(s,o,n);return}const a=this.getRelevantPointers(o,s);if(!this.isWithinPointerCount(a,n.pointerType)){this.cancel(s,a,n);return}switch(n.type){case"pointerdown":if(!this.isActive&&!this.state.startCentroid)a.forEach(l=>{this.state.startPointers.set(l.pointerId,l)}),this.originalTarget=s,this.state.startCentroid=Mt(a),this.state.lastCentroid=Q({},this.state.startCentroid);else if(this.state.startCentroid&&this.state.lastCentroid){const l=this.state.lastCentroid,c=Mt(a),u=c.x-l.x,d=c.y-l.y;this.state.startCentroid={x:this.state.startCentroid.x+u,y:this.state.startCentroid.y+d},this.state.lastCentroid=c,a.forEach(h=>{this.state.startPointers.has(h.pointerId)||this.state.startPointers.set(h.pointerId,h)})}break;case"pointermove":if(this.state.startCentroid&&this.isWithinPointerCount(o,n.pointerType)){const l=Mt(a),c=l.x-this.state.startCentroid.x,u=l.y-this.state.startCentroid.y,d=Math.sqrt(c*c+u*u),h=jv(this.state.lastCentroid??this.state.startCentroid,l),p=this.state.lastCentroid?l.x-this.state.lastCentroid.x:0,f=this.state.lastCentroid?l.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&d>=this.threshold&&Dv(h,this.direction)?(this.state.movementThresholdReached=!0,this.isActive=!0,this.state.lastDeltas={x:p,y:f},this.state.totalDeltaX+=p,this.state.totalDeltaY+=f,this.state.activeDeltaX+=p,this.state.activeDeltaY+=f,this.emitPanEvent(s,"start",a,n,l),this.emitPanEvent(s,"ongoing",a,n,l)):this.state.movementThresholdReached&&this.isActive&&(this.state.lastDeltas={x:p,y:f},this.state.totalDeltaX+=p,this.state.totalDeltaY+=f,this.state.activeDeltaX+=p,this.state.activeDeltaY+=f,this.emitPanEvent(s,"ongoing",a,n,l)),this.state.lastCentroid=l,this.state.lastDirection=h}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive&&this.state.movementThresholdReached){const l=a.filter(c=>c.type!=="pointerup"&&c.type!=="pointercancel");if(this.isWithinPointerCount(l,n.pointerType)){if(l.length>=1&&this.state.lastCentroid){const c=Mt(l),u=c.x-this.state.lastCentroid.x,d=c.y-this.state.lastCentroid.y;this.state.startCentroid={x:this.state.startCentroid.x+u,y:this.state.startCentroid.y+d},this.state.lastCentroid=c;const h=(i=a.find(p=>p.type==="pointerup"||p.type==="pointercancel"))==null?void 0:i.pointerId;h!==void 0&&this.state.startPointers.delete(h)}}else{const c=this.state.lastCentroid||this.state.startCentroid;n.type==="pointercancel"&&this.emitPanEvent(s,"cancel",a,n,c),this.emitPanEvent(s,"end",a,n,c),this.resetState()}}else this.resetState();break}});this.direction=r.direction||["up","down","left","right"],this.threshold=r.threshold||0}clone(r){return new Br(Q({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],pointerOptions:structuredClone(this.pointerOptions)},r))}destroy(){this.resetState(),super.destroy()}updateOptions(r){super.updateOptions(r),this.direction=r.direction||this.direction,this.threshold=r.threshold??this.threshold}resetState(){this.isActive=!1,this.state=Q({},this.state,{startPointers:new Map,startCentroid:null,lastCentroid:null,lastDeltas:null,activeDeltaX:0,activeDeltaY:0,movementThresholdReached:!1,lastDirection:{vertical:null,horizontal:null,mainAxis:null}})}emitPanEvent(r,n,o,s,a){var C,w;if(!this.state.startCentroid)return;const i=((C=this.state.lastDeltas)==null?void 0:C.x)??0,l=((w=this.state.lastDeltas)==null?void 0:w.y)??0,c=this.state.startPointers.values().next().value,u=c?(s.timeStamp-c.timeStamp)/1e3:0,d=u>0?i/u:0,h=u>0?l/u:0,p=Math.sqrt(d*d+h*h),f=this.gesturesRegistry.getActiveGestures(r),m={gestureName:this.name,initialCentroid:this.state.startCentroid,centroid:a,target:s.target,srcEvent:s,phase:n,pointers:o,timeStamp:s.timeStamp,deltaX:i,deltaY:l,direction:this.state.lastDirection,velocityX:d,velocityY:h,velocity:p,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,activeDeltaX:this.state.activeDeltaX,activeDeltaY:this.state.activeDeltaY,activeGestures:f,customData:this.customData},y=Tt(this.name,n),b=new CustomEvent(y,{bubbles:!0,cancelable:!0,composed:!0,detail:m});r.dispatchEvent(b),this.preventDefault&&s.preventDefault(),this.stopPropagation&&s.stopPropagation()}cancel(r,n,o){if(this.isActive){const s=r??this.element;this.emitPanEvent(s,"cancel",n,o,this.state.lastCentroid),this.emitPanEvent(s,"end",n,o,this.state.lastCentroid)}this.resetState()}}class yc extends Kr{constructor(r){super(Q({},r,{minPointers:r.minPointers??2}));oe(this,"state",{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,totalScale:1,deltaScale:0});oe(this,"handlePointerEvent",(r,n)=>{const o=Array.from(r.values()),s=this.getTargetElement(n);if(!s)return;if(this.shouldPreventGesture(s,n.pointerType)){this.isActive&&(this.emitPinchEvent(s,"cancel",o,n),this.resetState());return}const a=this.getRelevantPointers(o,s);switch(n.type){case"pointerdown":if(a.length>=2&&!this.isActive){const i=ds(a);this.state.startDistance=i,this.state.lastDistance=i,this.state.lastTime=n.timeStamp,this.originalTarget=s}else if(this.isActive&&a.length>=2){const i=ds(a);this.state.startDistance=i/this.state.lastScale,this.state.lastDistance=i,this.state.lastTime=n.timeStamp}break;case"pointermove":if(this.state.startDistance&&this.isWithinPointerCount(a,n.pointerType)){const i=ds(a),l=Math.abs(i-this.state.lastDistance);if(l!==0&&l>=this.threshold){const c=this.state.startDistance?i/this.state.startDistance:1,u=c/this.state.lastScale;this.state.totalScale*=u;const d=(n.timeStamp-this.state.lastTime)/1e3;if(this.state.lastDistance){const p=(i-this.state.lastDistance)/d;this.state.velocity=Number.isNaN(p)?0:p}this.state.lastDistance=i,this.state.deltaScale=c-this.state.lastScale,this.state.lastScale=c,this.state.lastTime=n.timeStamp,this.isActive?this.emitPinchEvent(s,"ongoing",a,n):(this.isActive=!0,this.emitPinchEvent(s,"start",a,n),this.emitPinchEvent(s,"ongoing",a,n))}}break;case"pointerup":case"pointercancel":case"forceCancel":if(this.isActive){const i=a.filter(l=>l.type!=="pointerup"&&l.type!=="pointercancel");if(!this.isWithinPointerCount(i,n.pointerType))n.type==="pointercancel"&&this.emitPinchEvent(s,"cancel",a,n),this.emitPinchEvent(s,"end",a,n),this.resetState();else if(i.length>=2){const l=ds(i);this.state.startDistance=l/this.state.lastScale,this.state.lastDistance=l,this.state.lastTime=n.timeStamp}}break}});this.threshold=r.threshold??0}clone(r){return new yc(Q({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],pointerOptions:structuredClone(this.pointerOptions)},r))}destroy(){this.resetState(),super.destroy()}updateOptions(r){super.updateOptions(r)}resetState(){this.isActive=!1,this.state=Q({},this.state,{startDistance:0,lastDistance:0,lastScale:1,lastTime:0,velocity:0,deltaScale:0})}emitPinchEvent(r,n,o,s){const a=Mt(o),i=this.state.lastDistance,l=this.state.lastScale,c=this.gesturesRegistry.getActiveGestures(r),u={gestureName:this.name,centroid:a,target:s.target,srcEvent:s,phase:n,pointers:o,timeStamp:s.timeStamp,scale:l,deltaScale:this.state.deltaScale,totalScale:this.state.totalScale,distance:i,velocity:this.state.velocity,activeGestures:c,direction:Lv(this.state.velocity),customData:this.customData};this.preventDefault&&s.preventDefault(),this.stopPropagation&&s.stopPropagation();const d=Tt(this.name,n),h=new CustomEvent(d,{bubbles:!0,cancelable:!0,composed:!0,detail:u});r.dispatchEvent(h)}}class Ba extends Kr{constructor(r){super(r);oe(this,"state",{startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1});oe(this,"handlePointerEvent",(r,n)=>{const o=Array.from(r.values());if(n.type==="forceCancel"){this.cancelPress(n.target,o,n);return}const s=this.getTargetElement(n);if(!s)return;if(this.shouldPreventGesture(s,n.pointerType)){this.isActive&&this.cancelPress(s,o,n);return}const a=this.getRelevantPointers(o,s);if(!this.isWithinPointerCount(a,n.pointerType)){this.isActive&&this.cancelPress(s,a,n);return}switch(n.type){case"pointerdown":!this.isActive&&!this.state.startCentroid&&(this.state.startCentroid=Mt(a),this.state.lastPosition=Q({},this.state.startCentroid),this.state.startTime=n.timeStamp,this.isActive=!0,this.originalTarget=s,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;const i=this.state.lastPosition;this.emitPressEvent(s,"start",a,n,i),this.emitPressEvent(s,"ongoing",a,n,i)}},this.duration));break;case"pointermove":if(this.isActive&&this.state.startCentroid){const i=Mt(a);this.state.lastPosition=i;const l=i.x-this.state.startCentroid.x,c=i.y-this.state.startCentroid.y;Math.sqrt(l*l+c*c)>this.maxDistance&&this.cancelPress(s,a,n)}break;case"pointerup":if(this.isActive){if(this.state.pressThresholdReached){const i=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(s,"end",a,n,i)}this.resetState()}break;case"pointercancel":case"forceCancel":this.cancelPress(s,a,n);break}});this.duration=r.duration??500,this.maxDistance=r.maxDistance??10}clone(r){return new Ba(Q({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],pointerOptions:structuredClone(this.pointerOptions)},r))}destroy(){this.clearPressTimer(),this.resetState(),super.destroy()}updateOptions(r){super.updateOptions(r),this.duration=r.duration??this.duration,this.maxDistance=r.maxDistance??this.maxDistance}resetState(){this.clearPressTimer(),this.isActive=!1,this.state=Q({},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)}emitPressEvent(r,n,o,s,a){const i=this.gesturesRegistry.getActiveGestures(r),l=s.timeStamp-this.state.startTime,c={gestureName:this.name,centroid:a,target:s.target,srcEvent:s,phase:n,pointers:o,timeStamp:s.timeStamp,x:a.x,y:a.y,duration:l,activeGestures:i,customData:this.customData},u=Tt(this.name,n),d=new CustomEvent(u,{bubbles:!0,cancelable:!0,composed:!0,detail:c});r.dispatchEvent(d),this.preventDefault&&s.preventDefault(),this.stopPropagation&&s.stopPropagation()}cancelPress(r,n,o){if(this.isActive&&this.state.pressThresholdReached){const s=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(r??this.element,"cancel",n,o,s),this.emitPressEvent(r??this.element,"end",n,o,s)}this.resetState()}}class bc extends Kr{constructor(r){super(r);oe(this,"state",{phase:"waitingForPress",dragTimeoutId:null});oe(this,"pressHandler",()=>{this.state.phase==="waitingForPress"&&(this.state.phase="pressDetected",this.setTouchAction(),this.state.dragTimeoutId=setTimeout(()=>{this.resetState()},this.dragTimeout))});oe(this,"dragStartHandler",r=>{this.state.phase==="pressDetected"&&(this.state.dragTimeoutId!==null&&(clearTimeout(this.state.dragTimeoutId),this.state.dragTimeoutId=null),this.restoreTouchAction(),this.state.phase="dragging",this.isActive=!0,this.element.dispatchEvent(new CustomEvent(Tt(this.name,r.detail.phase),r)))});oe(this,"dragMoveHandler",r=>{this.state.phase==="dragging"&&this.element.dispatchEvent(new CustomEvent(Tt(this.name,r.detail.phase),r))});oe(this,"dragEndHandler",r=>{this.state.phase==="dragging"&&(this.resetState(),this.element.dispatchEvent(new CustomEvent(Tt(this.name,r.detail.phase),r)))});this.pressDuration=r.pressDuration??500,this.pressMaxDistance=r.pressMaxDistance??10,this.dragTimeout=r.dragTimeout??1e3,this.dragThreshold=r.dragThreshold??0,this.dragDirection=r.dragDirection||["up","down","left","right"],this.pressGesture=new Ba({name:`${this.name}-press`,duration:this.pressDuration,maxDistance:this.pressMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}),this.panGesture=new Br({name:`${this.name}-pan`,minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)})}clone(r){return new bc(Q({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,pressDuration:this.pressDuration,pressMaxDistance:this.pressMaxDistance,dragTimeout:this.dragTimeout,dragThreshold:this.dragThreshold,dragDirection:[...this.dragDirection],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},r))}init(r,n,o,s){super.init(r,n,o,s),this.pressGesture.init(r,n,o,s),this.panGesture.init(r,n,o,s),this.element.addEventListener(this.pressGesture.name,this.pressHandler),this.element.addEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.addEventListener(this.panGesture.name,this.dragMoveHandler),this.element.addEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.addEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler)}destroy(){this.resetState(),this.pressGesture.destroy(),this.panGesture.destroy(),this.element.removeEventListener(this.pressGesture.name,this.pressHandler),this.element.removeEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.removeEventListener(this.panGesture.name,this.dragMoveHandler),this.element.removeEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.removeEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler),super.destroy()}updateOptions(r){super.updateOptions(r),this.pressDuration=r.pressDuration??this.pressDuration,this.pressMaxDistance=r.pressMaxDistance??this.pressMaxDistance,this.dragTimeout=r.dragTimeout??this.dragTimeout,this.dragThreshold=r.dragThreshold??this.dragThreshold,this.dragDirection=r.dragDirection||this.dragDirection,this.element.dispatchEvent(new CustomEvent(`${this.panGesture.name}ChangeOptions`,{detail:{minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}})),this.element.dispatchEvent(new CustomEvent(`${this.pressGesture.name}ChangeOptions`,{detail:{duration:this.pressDuration,maxDistance:this.pressMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}}))}resetState(){this.state.dragTimeoutId!==null&&clearTimeout(this.state.dragTimeoutId),this.restoreTouchAction(),this.isActive=!1,this.state={phase:"waitingForPress",dragTimeoutId:null}}handlePointerEvent(){}setTouchAction(){this.element.addEventListener("touchstart",fr,{passive:!1}),this.element.addEventListener("touchmove",fr,{passive:!1}),this.element.addEventListener("touchend",fr,{passive:!1})}restoreTouchAction(){this.element.removeEventListener("touchstart",fr),this.element.removeEventListener("touchmove",fr),this.element.removeEventListener("touchend",fr)}}class To extends Kr{constructor(r){super(r);oe(this,"state",{startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null});oe(this,"handlePointerEvent",(r,n)=>{const o=Array.from(r.values()),s=this.getTargetElement(n);if(!s)return;const a=this.getRelevantPointers(o,s);if(this.shouldPreventGesture(s,n.pointerType)||!this.isWithinPointerCount(a,n.pointerType)){this.isActive&&this.cancelTap(s,a,n);return}switch(n.type){case"pointerdown":this.isActive||(this.state.startCentroid=Mt(a),this.state.lastPosition=Q({},this.state.startCentroid),this.isActive=!0,this.originalTarget=s);break;case"pointermove":if(this.isActive&&this.state.startCentroid){const i=Mt(a);this.state.lastPosition=i;const l=i.x-this.state.startCentroid.x,c=i.y-this.state.startCentroid.y;Math.sqrt(l*l+c*c)>this.maxDistance&&this.cancelTap(s,a,n)}break;case"pointerup":if(this.isActive){this.state.currentTapCount+=1;const i=this.state.lastPosition||this.state.startCentroid;if(!i){this.cancelTap(s,a,n);return}this.state.currentTapCount>=this.taps?(this.fireTapEvent(s,a,n,i),this.resetState()):(this.state.lastTapTime=n.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(s,a,n);break}});this.maxDistance=r.maxDistance??10,this.taps=r.taps??1}clone(r){return new To(Q({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],pointerOptions:structuredClone(this.pointerOptions)},r))}destroy(){this.resetState(),super.destroy()}updateOptions(r){super.updateOptions(r),this.maxDistance=r.maxDistance??this.maxDistance,this.taps=r.taps??this.taps}resetState(){this.isActive=!1,this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null}}fireTapEvent(r,n,o,s){const a=this.gesturesRegistry.getActiveGestures(r),i={gestureName:this.name,centroid:s,target:o.target,srcEvent:o,phase:"end",pointers:n,timeStamp:o.timeStamp,x:s.x,y:s.y,tapCount:this.state.currentTapCount,activeGestures:a,customData:this.customData},l=new CustomEvent(this.name,{bubbles:!0,cancelable:!0,composed:!0,detail:i});r.dispatchEvent(l),this.preventDefault&&o.preventDefault(),this.stopPropagation&&o.stopPropagation()}cancelTap(r,n,o){if(this.state.startCentroid||this.state.lastPosition){const s=this.state.lastPosition||this.state.startCentroid,a=this.gesturesRegistry.getActiveGestures(r),i={gestureName:this.name,centroid:s,target:o.target,srcEvent:o,phase:"cancel",pointers:n,timeStamp:o.timeStamp,x:s.x,y:s.y,tapCount:this.state.currentTapCount,activeGestures:a,customData:this.customData},l=Tt(this.name,"cancel"),c=new CustomEvent(l,{bubbles:!0,cancelable:!0,composed:!0,detail:i});r.dispatchEvent(c)}this.resetState()}}class xc extends Kr{constructor(r){super(r);oe(this,"state",{phase:"waitingForTap",dragTimeoutId:null});oe(this,"tapHandler",()=>{this.state.phase==="waitingForTap"&&(this.state.phase="tapDetected",this.setTouchAction(),this.state.dragTimeoutId=setTimeout(()=>{this.resetState()},this.dragTimeout))});oe(this,"dragStartHandler",r=>{this.state.phase==="tapDetected"&&(this.state.dragTimeoutId!==null&&(clearTimeout(this.state.dragTimeoutId),this.state.dragTimeoutId=null),this.restoreTouchAction(),this.state.phase="dragging",this.isActive=!0,this.element.dispatchEvent(new CustomEvent(Tt(this.name,r.detail.phase),r)))});oe(this,"dragMoveHandler",r=>{this.state.phase==="dragging"&&this.element.dispatchEvent(new CustomEvent(Tt(this.name,r.detail.phase),r))});oe(this,"dragEndHandler",r=>{this.state.phase==="dragging"&&(this.resetState(),this.element.dispatchEvent(new CustomEvent(Tt(this.name,r.detail.phase),r)))});this.tapMaxDistance=r.tapMaxDistance??10,this.dragTimeout=r.dragTimeout??1e3,this.dragThreshold=r.dragThreshold??0,this.dragDirection=r.dragDirection||["up","down","left","right"],this.tapGesture=new To({name:`${this.name}-tap`,maxDistance:this.tapMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}),this.panGesture=new Br({name:`${this.name}-pan`,minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)})}clone(r){return new xc(Q({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,tapMaxDistance:this.tapMaxDistance,dragTimeout:this.dragTimeout,dragThreshold:this.dragThreshold,dragDirection:[...this.dragDirection],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},r))}init(r,n,o,s){super.init(r,n,o,s),this.tapGesture.init(r,n,o,s),this.panGesture.init(r,n,o,s),this.element.addEventListener(this.tapGesture.name,this.tapHandler),this.element.addEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.addEventListener(this.panGesture.name,this.dragMoveHandler),this.element.addEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.addEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler)}destroy(){this.resetState(),this.tapGesture.destroy(),this.panGesture.destroy(),this.element.removeEventListener(this.tapGesture.name,this.tapHandler),this.element.removeEventListener(`${this.panGesture.name}Start`,this.dragStartHandler),this.element.removeEventListener(this.panGesture.name,this.dragMoveHandler),this.element.removeEventListener(`${this.panGesture.name}End`,this.dragEndHandler),this.element.removeEventListener(`${this.panGesture.name}Cancel`,this.dragEndHandler),super.destroy()}updateOptions(r){super.updateOptions(r),this.tapMaxDistance=r.tapMaxDistance??this.tapMaxDistance,this.dragTimeout=r.dragTimeout??this.dragTimeout,this.dragThreshold=r.dragThreshold??this.dragThreshold,this.dragDirection=r.dragDirection||this.dragDirection,this.element.dispatchEvent(new CustomEvent(`${this.panGesture.name}ChangeOptions`,{detail:{minPointers:this.minPointers,maxPointers:this.maxPointers,threshold:this.dragThreshold,direction:this.dragDirection,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}})),this.element.dispatchEvent(new CustomEvent(`${this.tapGesture.name}ChangeOptions`,{detail:{maxDistance:this.tapMaxDistance,maxPointers:this.maxPointers,pointerMode:this.pointerMode,requiredKeys:this.requiredKeys,preventIf:this.preventIf,pointerOptions:structuredClone(this.pointerOptions)}}))}resetState(){this.state.dragTimeoutId!==null&&clearTimeout(this.state.dragTimeoutId),this.restoreTouchAction(),this.isActive=!1,this.state={phase:"waitingForTap",dragTimeoutId:null}}handlePointerEvent(){}setTouchAction(){this.element.addEventListener("touchstart",fr,{passive:!1})}restoreTouchAction(){this.element.removeEventListener("touchstart",fr)}}class Qs extends rm{constructor(r){super(r);oe(this,"state",{totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0});oe(this,"handleWheelEvent",r=>{if(this.shouldPreventGesture(this.element,"mouse"))return;const n=this.pointerManager.getPointers()||new Map,o=Array.from(n.values());this.state.totalDeltaX+=r.deltaX*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaY+=r.deltaY*this.sensitivity*(this.invert?-1:1),this.state.totalDeltaZ+=r.deltaZ*this.sensitivity*(this.invert?-1:1),["totalDeltaX","totalDeltaY","totalDeltaZ"].forEach(s=>{this.state[s]<this.min&&(this.state[s]=this.min),this.state[s]>this.max&&(this.state[s]=this.max)}),this.emitWheelEvent(o,r)});this.sensitivity=r.sensitivity??1,this.max=r.max??Number.MAX_SAFE_INTEGER,this.min=r.min??Number.MIN_SAFE_INTEGER,this.initialDelta=r.initialDelta??0,this.invert=r.invert??!1,this.state.totalDeltaX=this.initialDelta,this.state.totalDeltaY=this.initialDelta,this.state.totalDeltaZ=this.initialDelta}clone(r){return new Qs(Q({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],preventIf:[...this.preventIf]},r))}init(r,n,o,s){super.init(r,n,o,s),this.element.addEventListener("wheel",this.handleWheelEvent)}destroy(){this.element.removeEventListener("wheel",this.handleWheelEvent),this.resetState(),super.destroy()}resetState(){this.isActive=!1,this.state={totalDeltaX:0,totalDeltaY:0,totalDeltaZ:0}}updateOptions(r){super.updateOptions(r),this.sensitivity=r.sensitivity??this.sensitivity,this.max=r.max??this.max,this.min=r.min??this.min,this.initialDelta=r.initialDelta??this.initialDelta,this.invert=r.invert??this.invert}emitWheelEvent(r,n){const o=r.length>0?Mt(r):{x:n.clientX,y:n.clientY},s=this.gesturesRegistry.getActiveGestures(this.element),a={gestureName:this.name,centroid:o,target:n.target,srcEvent:n,phase:"ongoing",pointers:r,timeStamp:n.timeStamp,deltaX:n.deltaX*this.sensitivity*(this.invert?-1:1),deltaY:n.deltaY*this.sensitivity*(this.invert?-1:1),deltaZ:n.deltaZ*this.sensitivity*(this.invert?-1:1),deltaMode:n.deltaMode,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,totalDeltaZ:this.state.totalDeltaZ,activeGestures:s,customData:this.customData};this.preventDefault&&n.preventDefault(),this.stopPropagation&&n.stopPropagation();const i=Tt(this.name,"ongoing"),l=new CustomEvent(i,{bubbles:!0,cancelable:!0,composed:!0,detail:a});this.element.dispatchEvent(l)}}const dn=e=>e.preventDefault(),vc=({svgRef:e})=>{const t=F.useRef(null);F.useEffect(()=>{const o=e.current;t.current||(t.current=new Vv({gestures:[new Br({name:"pan",threshold:0,maxPointers:1}),new gc({name:"move",preventIf:["pan","zoomPinch","zoomPan"]}),new To({name:"tap",preventIf:["pan","zoomPinch","zoomPan"]}),new Ba({name:"quickPress",duration:50}),new Br({name:"brush",threshold:0,maxPointers:1}),new Br({name:"zoomPan",threshold:0,preventIf:["zoomTapAndDrag","zoomPressAndDrag"]}),new yc({name:"zoomPinch",threshold:5}),new Qs({name:"zoomTurnWheel",sensitivity:.01,initialDelta:1}),new Qs({name:"panTurnWheel",sensitivity:.5}),new xc({name:"zoomTapAndDrag",dragThreshold:10}),new bc({name:"zoomPressAndDrag",dragThreshold:10,preventIf:["zoomPinch"]}),new To({name:"zoomDoubleTapReset",taps:2})]}));const s=t.current;if(!(!o||!s))return s.registerElement(["pan","move","zoomPinch","zoomPan","zoomTurnWheel","panTurnWheel","tap","quickPress","zoomTapAndDrag","zoomPressAndDrag","zoomDoubleTapReset","brush"],o),()=>{s.unregisterAllGestures(o)}},[e,t]);const r=F.useCallback((o,s,a)=>{const i=e.current;return i==null||i.addEventListener(o,s,a),{cleanup:()=>i==null?void 0:i.removeEventListener(o,s)}},[e]),n=F.useCallback((o,s)=>{const a=e.current,i=t.current;!i||!a||i.setGestureOptions(o,a,s??{})},[e,t]);return F.useEffect(()=>{const o=e.current;return o==null||o.addEventListener("gesturestart",dn),o==null||o.addEventListener("gesturechange",dn),o==null||o.addEventListener("gestureend",dn),()=>{o==null||o.removeEventListener("gesturestart",dn),o==null||o.removeEventListener("gesturechange",dn),o==null||o.removeEventListener("gestureend",dn)}},[e]),{instance:{addInteractionListener:r,updateZoomInteractionListeners:n}}};vc.params={};vc.getInitialState=()=>({});const Bv=[mc,pc,Da,La,vc,$a],Fv=["apiRef"],Nv=e=>{let{plugins:t}=e,r=qt(e.props,Fv);const n={};t.forEach(a=>{Object.assign(n,a.params)});const o={};return Object.keys(r).forEach(a=>{const i=r[a];n[a]&&(o[a]=i)}),t.reduce((a,i)=>i.getDefaultizedParams?i.getDefaultizedParams({params:a}):a,o)};let od=0;function zv(e,t,r){const n=cx(),o=F.useMemo(()=>[...Bv,...e],[e]),s=Nv({plugins:o,props:t});s.id=s.id??n;const i=F.useRef({}).current,l=Hv(t.apiRef),c=F.useRef(null),u=F.useRef(null),d=F.useRef(null);if(d.current==null){od+=1;const f={cacheKey:{id:od}};o.forEach(m=>{m.getInitialState&&Object.assign(f,m.getInitialState(s,f,r))}),d.current=new hc(f)}const h=f=>{const m=f({instance:i,params:s,plugins:o,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 o.forEach(h),{contextValue:F.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 Hv(e){const t=F.useRef({});return e?Gv(e):t}const Sc=F.createContext(null);process.env.NODE_ENV!=="production"&&(Sc.displayName="ChartContext");const sd=new Set;function In(e,t="warning"){if(process.env.NODE_ENV==="production")return;const r=Array.isArray(e)?e.join(`
|
|
116
|
+
`):e;sd.has(r)||(sd.add(r),t==="error"?console.error(r):console.warn(r))}function qv(e){const{componentName:t,propName:r,controlled:n,defaultValue:o,warningPrefix:s="MUI X"}=e,[{initialDefaultValue:a,isControlled:i}]=F.useState({initialDefaultValue:o,isControlled:n!==void 0});i!==(n!==void 0)&&In([`${s}: 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(a)!==JSON.stringify(o)&&In([`${s}: 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 wc=process.env.NODE_ENV==="production"?()=>{}:qv,nm=4,om=20+2*nm,Wv=40+2*nm,Jv="hover",ps={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",reverse:!1,slider:{enabled:!1,preview:!1,size:om,showTooltip:Jv}},Cc=(e,t,r,n)=>{var o;if(e)return e===!0?Q({axisId:t,axisDirection:r},ps,{reverse:n??!1}):Q({axisId:t,axisDirection:r},ps,{reverse:n??!1},e,{slider:Q({},ps.slider,{size:((o=e.slider)==null?void 0:o.preview)??ps.slider.preview?Wv:om},e.slider)})};function sm(e,t){const r={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:Qx,scaleType:"linear"}]).map((s,a)=>{var p;const i=s.dataKey,l=a===0?"bottom":"none",c=s.position??l,u=tv+(s.label?Qp:0),d=s.id??`defaultized-x-axis-${a}`,h=Q({offset:r[c]},s,{id:d,position:c,height:s.height??u,zoom:Cc(s.zoom,d,"x",s.reverse)});if(c!=="none"&&(r[c]+=h.height,(p=h.zoom)!=null&&p.slider.enabled&&(r[c]+=h.zoom.slider.size)),i===void 0||s.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 Q({},h,{data:t.map(f=>f[i])})})}function am(e,t){const r={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:Xx,scaleType:"linear"}]).map((s,a)=>{var p;const i=s.dataKey,l=a===0?"left":"none",c=s.position??l,u=ev+(s.label?Qp:0),d=s.id??`defaultized-y-axis-${a}`,h=Q({offset:r[c]},s,{id:d,position:c,width:s.width??u,zoom:Cc(s.zoom,d,"y",s.reverse)});if(c!=="none"&&(r[c]+=h.width,(p=h.zoom)!=null&&p.slider.enabled&&(r[c]+=h.zoom.slider.size)),i===void 0||s.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 Q({},h,{data:t.map(f=>f[i])})})}function Yv(e,t){return function(n,o){if(o.location==="tick"){const s=o.scale.domain();return s[0]===s[1]?o.scale.tickFormat(1)(n):o.scale.tickFormat(e)(n)}return o.location==="zoom-slider-tooltip"?t.tickFormat(2)(n):`${n}`}}function Ln(e){return e.scaleType==="band"}function Bn(e){return e.scaleType==="point"}function Kv(e){return e.scaleType==="symlog"}function Us(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Qv(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Oc(e){let t,r,n;e.length!==2?(t=Us,r=(i,l)=>Us(e(i),l),n=(i,l)=>e(i)-l):(t=e===Us||e===Qv?e:Xv,r=e,n=e);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){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 a(i,l,c=0,u=i.length){const d=o(i,l,c,u-1);return d>c&&n(i[d-1],l)>-n(i[d],l)?d-1:d}return{left:o,center:a,right:s}}function Xv(){return 0}function Zv(e){return e===null?NaN:+e}const e1=Oc(Us),im=e1.right;Oc(Zv).center;class Xs extends Map{constructor(t,r=n1){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,o]of t)this.set(n,o)}get(t){return super.get(ad(this,t))}has(t){return super.has(ad(this,t))}set(t,r){return super.set(t1(this,t),r)}delete(t){return super.delete(r1(this,t))}}function ad({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function t1({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function r1({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function n1(e){return e!==null&&typeof e=="object"?e.valueOf():e}const o1=Math.sqrt(50),s1=Math.sqrt(10),a1=Math.sqrt(2);function Zs(e,t,r){const n=(t-e)/Math.max(0,r),o=Math.floor(Math.log10(n)),s=n/Math.pow(10,o),a=s>=o1?10:s>=s1?5:s>=a1?2:1;let i,l,c;return o<0?(c=Math.pow(10,-o)/a,i=Math.round(e*c),l=Math.round(t*c),i/c<e&&++i,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,i=Math.round(e/c),l=Math.round(t/c),i*c<e&&++i,l*c>t&&--l),l<i&&.5<=r&&r<2?Zs(e,t,r*2):[i,l,c]}function xl(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[o,s,a]=n?Zs(t,e,r):Zs(e,t,r);if(!(s>=o))return[];const i=s-o+1,l=new Array(i);if(n)if(a<0)for(let c=0;c<i;++c)l[c]=(s-c)/-a;else for(let c=0;c<i;++c)l[c]=(s-c)*a;else if(a<0)for(let c=0;c<i;++c)l[c]=(o+c)/-a;else for(let c=0;c<i;++c)l[c]=(o+c)*a;return l}function vl(e,t,r){return t=+t,e=+e,r=+r,Zs(e,t,r)[2]}function Sl(e,t,r){t=+t,e=+e,r=+r;const n=t<e,o=n?vl(t,e,r):vl(e,t,r);return(n?-1:1)*(o<0?1/-o:o)}function i1(e,t,r){e=+e,t=+t,r=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+r;for(var n=-1,o=Math.max(0,Math.ceil((t-e)/r))|0,s=new Array(o);++n<o;)s[n]=e+n*r;return s}function Pr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function l1(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 id=Symbol("implicit");function wl(){var e=new Xs,t=[],r=[],n=id;function o(s){let a=e.get(s);if(a===void 0){if(n!==id)return n;e.set(s,a=t.push(s)-1)}return r[a%r.length]}return o.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new Xs;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return o},o.range=function(s){return arguments.length?(r=Array.from(s),o):r.slice()},o.unknown=function(s){return arguments.length?(n=s,o):n},o.copy=function(){return wl(t,r).unknown(n)},Pr.apply(o,arguments),o}function Tc(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function lm(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function zo(){}var Po=.7,ea=1/Po,Tn="\\s*([+-]?\\d+)\\s*",Ao="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c1=/^#([0-9a-f]{3,8})$/,u1=new RegExp(`^rgb\\(${Tn},${Tn},${Tn}\\)$`),d1=new RegExp(`^rgb\\(${Ht},${Ht},${Ht}\\)$`),h1=new RegExp(`^rgba\\(${Tn},${Tn},${Tn},${Ao}\\)$`),p1=new RegExp(`^rgba\\(${Ht},${Ht},${Ht},${Ao}\\)$`),m1=new RegExp(`^hsl\\(${Ao},${Ht},${Ht}\\)$`),f1=new RegExp(`^hsla\\(${Ao},${Ht},${Ht},${Ao}\\)$`),ld={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};Tc(zo,Ro,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:cd,formatHex:cd,formatHex8:g1,formatHsl:y1,formatRgb:ud,toString:ud});function cd(){return this.rgb().formatHex()}function g1(){return this.rgb().formatHex8()}function y1(){return cm(this).formatHsl()}function ud(){return this.rgb().formatRgb()}function Ro(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=c1.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?dd(t):r===3?new ut(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ms(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ms(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=u1.exec(e))?new ut(t[1],t[2],t[3],1):(t=d1.exec(e))?new ut(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=h1.exec(e))?ms(t[1],t[2],t[3],t[4]):(t=p1.exec(e))?ms(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=m1.exec(e))?md(t[1],t[2]/100,t[3]/100,1):(t=f1.exec(e))?md(t[1],t[2]/100,t[3]/100,t[4]):ld.hasOwnProperty(e)?dd(ld[e]):e==="transparent"?new ut(NaN,NaN,NaN,0):null}function dd(e){return new ut(e>>16&255,e>>8&255,e&255,1)}function ms(e,t,r,n){return n<=0&&(e=t=r=NaN),new ut(e,t,r,n)}function b1(e){return e instanceof zo||(e=Ro(e)),e?(e=e.rgb(),new ut(e.r,e.g,e.b,e.opacity)):new ut}function Cl(e,t,r,n){return arguments.length===1?b1(e):new ut(e,t,r,n??1)}function ut(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Tc(ut,Cl,lm(zo,{brighter(e){return e=e==null?ea:Math.pow(ea,e),new ut(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Po:Math.pow(Po,e),new ut(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ut(Fr(this.r),Fr(this.g),Fr(this.b),ta(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:hd,formatHex:hd,formatHex8:x1,formatRgb:pd,toString:pd}));function hd(){return`#${jr(this.r)}${jr(this.g)}${jr(this.b)}`}function x1(){return`#${jr(this.r)}${jr(this.g)}${jr(this.b)}${jr((isNaN(this.opacity)?1:this.opacity)*255)}`}function pd(){const e=ta(this.opacity);return`${e===1?"rgb(":"rgba("}${Fr(this.r)}, ${Fr(this.g)}, ${Fr(this.b)}${e===1?")":`, ${e})`}`}function ta(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function jr(e){return e=Fr(e),(e<16?"0":"")+e.toString(16)}function md(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new It(e,t,r,n)}function cm(e){if(e instanceof It)return new It(e.h,e.s,e.l,e.opacity);if(e instanceof zo||(e=Ro(e)),!e)return new It;if(e instanceof It)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),s=Math.max(t,r,n),a=NaN,i=s-o,l=(s+o)/2;return i?(t===s?a=(r-n)/i+(r<n)*6:r===s?a=(n-t)/i+2:a=(t-r)/i+4,i/=l<.5?s+o:2-s-o,a*=60):i=l>0&&l<1?0:a,new It(a,i,l,e.opacity)}function v1(e,t,r,n){return arguments.length===1?cm(e):new It(e,t,r,n??1)}function It(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Tc(It,v1,lm(zo,{brighter(e){return e=e==null?ea:Math.pow(ea,e),new It(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Po:Math.pow(Po,e),new It(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,o=2*r-n;return new ut(Ui(e>=240?e-240:e+120,o,n),Ui(e,o,n),Ui(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new It(fd(this.h),fs(this.s),fs(this.l),ta(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=ta(this.opacity);return`${e===1?"hsl(":"hsla("}${fd(this.h)}, ${fs(this.s)*100}%, ${fs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function fd(e){return e=(e||0)%360,e<0?e+360:e}function fs(e){return Math.max(0,Math.min(1,e||0))}function Ui(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 Pc=e=>()=>e;function S1(e,t){return function(r){return e+r*t}}function w1(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 C1(e){return(e=+e)==1?um:function(t,r){return r-t?w1(t,r,e):Pc(isNaN(t)?r:t)}}function um(e,t){var r=t-e;return r?S1(e,r):Pc(isNaN(e)?t:e)}const gd=function e(t){var r=C1(t);function n(o,s){var a=r((o=Cl(o)).r,(s=Cl(s)).r),i=r(o.g,s.g),l=r(o.b,s.b),c=um(o.opacity,s.opacity);return function(u){return o.r=a(u),o.g=i(u),o.b=l(u),o.opacity=c(u),o+""}}return n.gamma=e,n}(1);function O1(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),o;return function(s){for(o=0;o<r;++o)n[o]=e[o]*(1-s)+t[o]*s;return n}}function T1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function P1(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,o=new Array(n),s=new Array(r),a;for(a=0;a<n;++a)o[a]=Fa(e[a],t[a]);for(;a<r;++a)s[a]=t[a];return function(i){for(a=0;a<n;++a)s[a]=o[a](i);return s}}function Ac(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function _t(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function A1(e,t){var r={},n={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?r[o]=Fa(e[o],t[o]):n[o]=t[o];return function(s){for(o in r)n[o]=r[o](s);return n}}var Ol=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Li=new RegExp(Ol.source,"g");function R1(e){return function(){return e}}function E1(e){return function(t){return e(t)+""}}function I1(e,t){var r=Ol.lastIndex=Li.lastIndex=0,n,o,s,a=-1,i=[],l=[];for(e=e+"",t=t+"";(n=Ol.exec(e))&&(o=Li.exec(t));)(s=o.index)>r&&(s=t.slice(r,s),i[a]?i[a]+=s:i[++a]=s),(n=n[0])===(o=o[0])?i[a]?i[a]+=o:i[++a]=o:(i[++a]=null,l.push({i:a,x:_t(n,o)})),r=Li.lastIndex;return r<t.length&&(s=t.slice(r),i[a]?i[a]+=s:i[++a]=s),i.length<2?l[0]?E1(l[0].x):R1(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 Fa(e,t){var r=typeof t,n;return t==null||r==="boolean"?Pc(t):(r==="number"?_t:r==="string"?(n=Ro(t))?(t=n,gd):I1:t instanceof Ro?gd:t instanceof Date?Ac:T1(t)?O1:Array.isArray(t)?P1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?A1:_t)(e,t)}function dm(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function _1(e){return function(){return e}}function M1(e){return+e}var yd=[0,1];function wt(e){return e}function Tl(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:_1(isNaN(t)?NaN:.5)}function V1(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function k1(e,t,r){var n=e[0],o=e[1],s=t[0],a=t[1];return o<n?(n=Tl(o,n),s=r(a,s)):(n=Tl(n,o),s=r(s,a)),function(i){return s(n(i))}}function j1(e,t,r){var n=Math.min(e.length,t.length)-1,o=new Array(n),s=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)o[a]=Tl(e[a],e[a+1]),s[a]=r(t[a],t[a+1]);return function(i){var l=im(e,i,1,n)-1;return s[l](o[l](i))}}function Go(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Na(){var e=yd,t=yd,r=Fa,n,o,s,a=wt,i,l,c;function u(){var h=Math.min(e.length,t.length);return a!==wt&&(a=V1(e[0],e[h-1])),i=h>2?j1:k1,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?s:(l||(l=i(e.map(n),t,r)))(n(a(h)))}return d.invert=function(h){return a(o((c||(c=i(t,e.map(n),_t)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,M1),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=dm,u()},d.clamp=function(h){return arguments.length?(a=h?!0:wt,u()):a!==wt},d.interpolate=function(h){return arguments.length?(r=h,u()):r},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,p){return n=h,o=p,u()}}function hm(){return Na()(wt,wt)}function $1(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ra(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function _n(e){return e=ra(Math.abs(e)),e?e[1]:NaN}function D1(e,t){return function(r,n){for(var o=r.length,s=[],a=0,i=e[0],l=0;o>0&&i>0&&(l+i+1>n&&(i=Math.max(1,n-l)),s.push(r.substring(o-=i,o+i)),!((l+=i+1)>n));)i=e[a=(a+1)%e.length];return s.reverse().join(t)}}function U1(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var L1=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Eo(e){if(!(t=L1.exec(e)))throw new Error("invalid format: "+e);var t;return new Rc({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]})}Eo.prototype=Rc.prototype;function Rc(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+""}Rc.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 B1(e){e:for(var t=e.length,r=1,n=-1,o;r<t;++r)switch(e[r]){case".":n=o=r;break;case"0":n===0&&(n=r),o=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(o+1):e}var na;function F1(e,t){var r=ra(e,t);if(!r)return na=void 0,e.toPrecision(t);var n=r[0],o=r[1],s=o-(na=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=n.length;return s===a?n:s>a?n+new Array(s-a+1).join("0"):s>0?n.slice(0,s)+"."+n.slice(s):"0."+new Array(1-s).join("0")+ra(e,Math.max(0,t+s-1))[0]}function bd(e,t){var r=ra(e,t);if(!r)return e+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}const xd={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:$1,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)=>bd(e*100,t),r:bd,s:F1,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function vd(e){return e}var Sd=Array.prototype.map,wd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function N1(e){var t=e.grouping===void 0||e.thousands===void 0?vd:D1(Sd.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?vd:U1(Sd.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",i=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d,h){d=Eo(d);var p=d.fill,f=d.align,m=d.sign,y=d.symbol,b=d.zero,C=d.width,w=d.comma,T=d.precision,A=d.trim,O=d.type;O==="n"?(w=!0,O="g"):xd[O]||(T===void 0&&(T=12),A=!0,O="g"),(b||p==="0"&&f==="=")&&(b=!0,p="0",f="=");var P=(h&&h.prefix!==void 0?h.prefix:"")+(y==="$"?r:y==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),E=(y==="$"?n:/[%p]/.test(O)?a:"")+(h&&h.suffix!==void 0?h.suffix:""),_=xd[O],x=/[defgprs%]/.test(O);T=T===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function N(M){var H=P,z=E,ne,re,he;if(O==="c")z=_(M)+z,M="";else{M=+M;var te=M<0||1/M<0;if(M=isNaN(M)?l:_(Math.abs(M),T),A&&(M=B1(M)),te&&+M==0&&m!=="+"&&(te=!1),H=(te?m==="("?m:i:m==="-"||m==="("?"":m)+H,z=(O==="s"&&!isNaN(M)&&na!==void 0?wd[8+na/3]:"")+z+(te&&m==="("?")":""),x){for(ne=-1,re=M.length;++ne<re;)if(he=M.charCodeAt(ne),48>he||he>57){z=(he===46?o+M.slice(ne+1):M.slice(ne))+z,M=M.slice(0,ne);break}}}w&&!b&&(M=t(M,1/0));var me=H.length+M.length+z.length,W=me<C?new Array(C-me+1).join(p):"";switch(w&&b&&(M=t(W+M,W.length?C-z.length:1/0),W=""),f){case"<":M=H+M+z+W;break;case"=":M=H+W+M+z;break;case"^":M=W.slice(0,me=W.length>>1)+H+M+z+W.slice(me);break;default:M=W+H+M+z;break}return s(M)}return N.toString=function(){return d+""},N}function u(d,h){var p=Math.max(-8,Math.min(8,Math.floor(_n(h)/3)))*3,f=Math.pow(10,-p),m=c((d=Eo(d),d.type="f",d),{suffix:wd[8+p/3]});return function(y){return m(f*y)}}return{format:c,formatPrefix:u}}var gs,Ec,pm;z1({thousands:",",grouping:[3],currency:["$",""]});function z1(e){return gs=N1(e),Ec=gs.format,pm=gs.formatPrefix,gs}function G1(e){return Math.max(0,-_n(Math.abs(e)))}function H1(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_n(t)/3)))*3-_n(Math.abs(e)))}function q1(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_n(t)-_n(e))+1}function W1(e,t,r,n){var o=Sl(e,t,r),s;switch(n=Eo(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(s=H1(o,a))&&(n.precision=s),pm(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(s=q1(o,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=s-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(s=G1(o))&&(n.precision=s-(n.type==="%")*2);break}}return Ec(n)}function za(e){var t=e.domain;return e.ticks=function(r){var n=t();return xl(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var o=t();return W1(o[0],o[o.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),o=0,s=n.length-1,a=n[o],i=n[s],l,c,u=10;for(i<a&&(c=a,a=i,i=c,c=o,o=s,s=c);u-- >0;){if(c=vl(a,i,r),c===l)return n[o]=a,n[s]=i,t(n);if(c>0)a=Math.floor(a/c)*c,i=Math.ceil(i/c)*c;else if(c<0)a=Math.ceil(a*c)/c,i=Math.floor(i*c)/c;else break;l=c}return e},e}function Ic(){var e=hm();return e.copy=function(){return Go(e,Ic())},Pr.apply(e,arguments),za(e)}function mm(e,t){e=e.slice();var r=0,n=e.length-1,o=e[r],s=e[n],a;return s<o&&(a=r,r=n,n=a,a=o,o=s,s=a),e[r]=t.floor(o),e[n]=t.ceil(s),e}function Cd(e){return Math.log(e)}function Od(e){return Math.exp(e)}function J1(e){return-Math.log(-e)}function Y1(e){return-Math.exp(-e)}function K1(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Q1(e){return e===10?K1:e===Math.E?Math.exp:t=>Math.pow(e,t)}function X1(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 Td(e){return(t,r)=>-e(-t,r)}function Z1(e){const t=e(Cd,Od),r=t.domain;let n=10,o,s;function a(){return o=X1(n),s=Q1(n),r()[0]<0?(o=Td(o),s=Td(s),e(J1,Y1)):e(Cd,Od),t}return t.base=function(i){return arguments.length?(n=+i,a()):n},t.domain=function(i){return arguments.length?(r(i),a()):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=o(c),p=o(u),f,m;const y=i==null?10:+i;let b=[];if(!(n%1)&&p-h<y){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/s(-h):f*s(h),!(m<c)){if(m>u)break;b.push(m)}}else for(;h<=p;++h)for(f=n-1;f>=1;--f)if(m=h>0?f/s(-h):f*s(h),!(m<c)){if(m>u)break;b.push(m)}b.length*2<y&&(b=xl(c,u,y))}else b=xl(h,p,Math.min(p-h,y)).map(s);return d?b.reverse():b},t.tickFormat=(i,l)=>{if(i==null&&(i=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Eo(l)).precision==null&&(l.trim=!0),l=Ec(l)),i===1/0)return l;const c=Math.max(1,n*i/t.ticks().length);return u=>{let d=u/s(Math.round(o(u)));return d*n<n-.5&&(d*=n),d<=c?l(u):""}},t.nice=()=>r(mm(r(),{floor:i=>s(Math.floor(o(i))),ceil:i=>s(Math.ceil(o(i)))})),t}function oa(){const e=Z1(Na()).domain([1,10]);return e.copy=()=>Go(e,oa()).base(e.base()),Pr.apply(e,arguments),e}function Pd(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Ad(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function eS(e){var t=1,r=e(Pd(t),Ad(t));return r.constant=function(n){return arguments.length?e(Pd(t=+n),Ad(t)):t},za(r)}function fm(){var e=eS(Na());return e.copy=function(){return Go(e,fm()).constant(e.constant())},Pr.apply(e,arguments)}function Rd(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function tS(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function rS(e){return e<0?-e*e:e*e}function nS(e){var t=e(wt,wt),r=1;function n(){return r===1?e(wt,wt):r===.5?e(tS,rS):e(Rd(r),Rd(1/r))}return t.exponent=function(o){return arguments.length?(r=+o,n()):r},za(t)}function _c(){var e=nS(Na());return e.copy=function(){return Go(e,_c()).exponent(e.exponent())},Pr.apply(e,arguments),e}function oS(){return _c.apply(null,arguments).exponent(.5)}function gm(){var e=[.5],t=[0,1],r,n=1;function o(s){return s!=null&&s<=s?t[im(e,s,0,n)]:r}return o.domain=function(s){return arguments.length?(e=Array.from(s),n=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(s){return arguments.length?(t=Array.from(s),n=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(s){var a=t.indexOf(s);return[e[a-1],e[a]]},o.unknown=function(s){return arguments.length?(r=s,o):r},o.copy=function(){return gm().domain(e).range(t).unknown(r)},Pr.apply(o,arguments)}const Bi=new Date,Fi=new Date;function He(e,t,r,n){function o(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return o.floor=s=>(e(s=new Date(+s)),s),o.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),o.round=s=>{const a=o(s),i=o.ceil(s);return s-a<i-s?a:i},o.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),o.range=(s,a,i)=>{const l=[];if(s=o.ceil(s),i=i==null?1:Math.floor(i),!(s<a)||!(i>0))return l;let c;do l.push(c=new Date(+s)),t(s,i),e(s);while(c<s&&s<a);return l},o.filter=s=>He(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,i)=>{if(a>=a)if(i<0)for(;++i<=0;)for(;t(a,-1),!s(a););else for(;--i>=0;)for(;t(a,1),!s(a););}),r&&(o.count=(s,a)=>(Bi.setTime(+s),Fi.setTime(+a),e(Bi),e(Fi),Math.floor(r(Bi,Fi))),o.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?o.filter(n?a=>n(a)%s===0:a=>o.count(0,a)%s===0):o)),o}const sa=He(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);sa.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?He(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):sa);sa.range;const er=1e3,Ct=er*60,tr=Ct*60,nr=tr*24,Mc=nr*7,Ed=nr*30,Ni=nr*365,$r=He(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*er)},(e,t)=>(t-e)/er,e=>e.getUTCSeconds());$r.range;const Vc=He(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*er)},(e,t)=>{e.setTime(+e+t*Ct)},(e,t)=>(t-e)/Ct,e=>e.getMinutes());Vc.range;const kc=He(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ct)},(e,t)=>(t-e)/Ct,e=>e.getUTCMinutes());kc.range;const jc=He(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*er-e.getMinutes()*Ct)},(e,t)=>{e.setTime(+e+t*tr)},(e,t)=>(t-e)/tr,e=>e.getHours());jc.range;const $c=He(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*tr)},(e,t)=>(t-e)/tr,e=>e.getUTCHours());$c.range;const Ho=He(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ct)/nr,e=>e.getDate()-1);Ho.range;const Ga=He(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/nr,e=>e.getUTCDate()-1);Ga.range;const ym=He(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/nr,e=>Math.floor(e/nr));ym.range;function Qr(e){return He(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())*Ct)/Mc)}const Ha=Qr(0),aa=Qr(1),sS=Qr(2),aS=Qr(3),Mn=Qr(4),iS=Qr(5),lS=Qr(6);Ha.range;aa.range;sS.range;aS.range;Mn.range;iS.range;lS.range;function Xr(e){return He(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)/Mc)}const qa=Xr(0),ia=Xr(1),cS=Xr(2),uS=Xr(3),Vn=Xr(4),dS=Xr(5),hS=Xr(6);qa.range;ia.range;cS.range;uS.range;Vn.range;dS.range;hS.range;const Dc=He(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());Dc.range;const Uc=He(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());Uc.range;const or=He(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());or.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:He(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)});or.range;const sr=He(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());sr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:He(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)});sr.range;function bm(e,t,r,n,o,s){const a=[[$r,1,er],[$r,5,5*er],[$r,15,15*er],[$r,30,30*er],[s,1,Ct],[s,5,5*Ct],[s,15,15*Ct],[s,30,30*Ct],[o,1,tr],[o,3,3*tr],[o,6,6*tr],[o,12,12*tr],[n,1,nr],[n,2,2*nr],[r,1,Mc],[t,1,Ed],[t,3,3*Ed],[e,1,Ni]];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=Oc(([,,y])=>y).right(a,h);if(p===a.length)return e.every(Sl(c/Ni,u/Ni,d));if(p===0)return sa.every(Math.max(Sl(c,u,d),1));const[f,m]=a[h/a[p-1][2]<a[p][2]/h?p-1:p];return f.every(m)}return[i,l]}const[pS,mS]=bm(sr,Uc,qa,ym,$c,kc),[fS,gS]=bm(or,Dc,Ha,Ho,jc,Vc);function zi(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 Gi(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 Zn(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function yS(e){var t=e.dateTime,r=e.date,n=e.time,o=e.periods,s=e.days,a=e.shortDays,i=e.months,l=e.shortMonths,c=eo(o),u=to(o),d=eo(s),h=to(s),p=eo(a),f=to(a),m=eo(i),y=to(i),b=eo(l),C=to(l),w={a:he,A:te,b:me,B:W,c:null,d:jd,e:jd,f:BS,g:KS,G:XS,H:DS,I:US,j:LS,L:xm,m:FS,M:NS,p:Z,q:pe,Q:Ud,s:Ld,S:zS,u:GS,U:HS,V:qS,w:WS,W:JS,x:null,X:null,y:YS,Y:QS,Z:ZS,"%":Dd},T={a:Ee,A:qe,b:Te,B:ht,c:null,d:$d,e:$d,f:nw,g:pw,G:fw,H:ew,I:tw,j:rw,L:Sm,m:ow,M:sw,p:at,q:xe,Q:Ud,s:Ld,S:aw,u:iw,U:lw,V:cw,w:uw,W:dw,x:null,X:null,y:hw,Y:mw,Z:gw,"%":Dd},A={a:x,A:N,b:M,B:H,c:z,d:Vd,e:Vd,f:VS,g:Md,G:_d,H:kd,I:kd,j:ES,L:MS,m:RS,M:IS,p:_,q:AS,Q:jS,s:$S,S:_S,u:wS,U:CS,V:OS,w:SS,W:TS,x:ne,X:re,y:Md,Y:_d,Z:PS,"%":kS};w.x=O(r,w),w.X=O(n,w),w.c=O(t,w),T.x=O(r,T),T.X=O(n,T),T.c=O(t,T);function O(X,se){return function(le){var Y=[],ve=-1,fe=0,Ke=X.length,We,je,ur;for(le instanceof Date||(le=new Date(+le));++ve<Ke;)X.charCodeAt(ve)===37&&(Y.push(X.slice(fe,ve)),(je=Id[We=X.charAt(++ve)])!=null?We=X.charAt(++ve):je=We==="e"?" ":"0",(ur=se[We])&&(We=ur(le,je)),Y.push(We),fe=ve+1);return Y.push(X.slice(fe,ve)),Y.join("")}}function P(X,se){return function(le){var Y=Zn(1900,void 0,1),ve=E(Y,X,le+="",0),fe,Ke;if(ve!=le.length)return null;if("Q"in Y)return new Date(Y.Q);if("s"in Y)return new Date(Y.s*1e3+("L"in Y?Y.L:0));if(se&&!("Z"in Y)&&(Y.Z=0),"p"in Y&&(Y.H=Y.H%12+Y.p*12),Y.m===void 0&&(Y.m="q"in Y?Y.q:0),"V"in Y){if(Y.V<1||Y.V>53)return null;"w"in Y||(Y.w=1),"Z"in Y?(fe=Gi(Zn(Y.y,0,1)),Ke=fe.getUTCDay(),fe=Ke>4||Ke===0?ia.ceil(fe):ia(fe),fe=Ga.offset(fe,(Y.V-1)*7),Y.y=fe.getUTCFullYear(),Y.m=fe.getUTCMonth(),Y.d=fe.getUTCDate()+(Y.w+6)%7):(fe=zi(Zn(Y.y,0,1)),Ke=fe.getDay(),fe=Ke>4||Ke===0?aa.ceil(fe):aa(fe),fe=Ho.offset(fe,(Y.V-1)*7),Y.y=fe.getFullYear(),Y.m=fe.getMonth(),Y.d=fe.getDate()+(Y.w+6)%7)}else("W"in Y||"U"in Y)&&("w"in Y||(Y.w="u"in Y?Y.u%7:"W"in Y?1:0),Ke="Z"in Y?Gi(Zn(Y.y,0,1)).getUTCDay():zi(Zn(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(Ke+5)%7:Y.w+Y.U*7-(Ke+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,Gi(Y)):zi(Y)}}function E(X,se,le,Y){for(var ve=0,fe=se.length,Ke=le.length,We,je;ve<fe;){if(Y>=Ke)return-1;if(We=se.charCodeAt(ve++),We===37){if(We=se.charAt(ve++),je=A[We in Id?se.charAt(ve++):We],!je||(Y=je(X,le,Y))<0)return-1}else if(We!=le.charCodeAt(Y++))return-1}return Y}function _(X,se,le){var Y=c.exec(se.slice(le));return Y?(X.p=u.get(Y[0].toLowerCase()),le+Y[0].length):-1}function x(X,se,le){var Y=p.exec(se.slice(le));return Y?(X.w=f.get(Y[0].toLowerCase()),le+Y[0].length):-1}function N(X,se,le){var Y=d.exec(se.slice(le));return Y?(X.w=h.get(Y[0].toLowerCase()),le+Y[0].length):-1}function M(X,se,le){var Y=b.exec(se.slice(le));return Y?(X.m=C.get(Y[0].toLowerCase()),le+Y[0].length):-1}function H(X,se,le){var Y=m.exec(se.slice(le));return Y?(X.m=y.get(Y[0].toLowerCase()),le+Y[0].length):-1}function z(X,se,le){return E(X,t,se,le)}function ne(X,se,le){return E(X,r,se,le)}function re(X,se,le){return E(X,n,se,le)}function he(X){return a[X.getDay()]}function te(X){return s[X.getDay()]}function me(X){return l[X.getMonth()]}function W(X){return i[X.getMonth()]}function Z(X){return o[+(X.getHours()>=12)]}function pe(X){return 1+~~(X.getMonth()/3)}function Ee(X){return a[X.getUTCDay()]}function qe(X){return s[X.getUTCDay()]}function Te(X){return l[X.getUTCMonth()]}function ht(X){return i[X.getUTCMonth()]}function at(X){return o[+(X.getUTCHours()>=12)]}function xe(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var se=O(X+="",w);return se.toString=function(){return X},se},parse:function(X){var se=P(X+="",!1);return se.toString=function(){return X},se},utcFormat:function(X){var se=O(X+="",T);return se.toString=function(){return X},se},utcParse:function(X){var se=P(X+="",!0);return se.toString=function(){return X},se}}}var Id={"-":"",_:" ",0:"0"},Ye=/^\s*\d+/,bS=/^%/,xS=/[\\^$*+?|[\]().{}]/g;function be(e,t,r){var n=e<0?"-":"",o=(n?-e:e)+"",s=o.length;return n+(s<r?new Array(r-s+1).join(t)+o:o)}function vS(e){return e.replace(xS,"\\$&")}function eo(e){return new RegExp("^(?:"+e.map(vS).join("|")+")","i")}function to(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function SS(e,t,r){var n=Ye.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function wS(e,t,r){var n=Ye.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function CS(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function OS(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function TS(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function _d(e,t,r){var n=Ye.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Md(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function PS(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 AS(e,t,r){var n=Ye.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function RS(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Vd(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function ES(e,t,r){var n=Ye.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function kd(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function IS(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function _S(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function MS(e,t,r){var n=Ye.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function VS(e,t,r){var n=Ye.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function kS(e,t,r){var n=bS.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function jS(e,t,r){var n=Ye.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function $S(e,t,r){var n=Ye.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function jd(e,t){return be(e.getDate(),t,2)}function DS(e,t){return be(e.getHours(),t,2)}function US(e,t){return be(e.getHours()%12||12,t,2)}function LS(e,t){return be(1+Ho.count(or(e),e),t,3)}function xm(e,t){return be(e.getMilliseconds(),t,3)}function BS(e,t){return xm(e,t)+"000"}function FS(e,t){return be(e.getMonth()+1,t,2)}function NS(e,t){return be(e.getMinutes(),t,2)}function zS(e,t){return be(e.getSeconds(),t,2)}function GS(e){var t=e.getDay();return t===0?7:t}function HS(e,t){return be(Ha.count(or(e)-1,e),t,2)}function vm(e){var t=e.getDay();return t>=4||t===0?Mn(e):Mn.ceil(e)}function qS(e,t){return e=vm(e),be(Mn.count(or(e),e)+(or(e).getDay()===4),t,2)}function WS(e){return e.getDay()}function JS(e,t){return be(aa.count(or(e)-1,e),t,2)}function YS(e,t){return be(e.getFullYear()%100,t,2)}function KS(e,t){return e=vm(e),be(e.getFullYear()%100,t,2)}function QS(e,t){return be(e.getFullYear()%1e4,t,4)}function XS(e,t){var r=e.getDay();return e=r>=4||r===0?Mn(e):Mn.ceil(e),be(e.getFullYear()%1e4,t,4)}function ZS(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+be(t/60|0,"0",2)+be(t%60,"0",2)}function $d(e,t){return be(e.getUTCDate(),t,2)}function ew(e,t){return be(e.getUTCHours(),t,2)}function tw(e,t){return be(e.getUTCHours()%12||12,t,2)}function rw(e,t){return be(1+Ga.count(sr(e),e),t,3)}function Sm(e,t){return be(e.getUTCMilliseconds(),t,3)}function nw(e,t){return Sm(e,t)+"000"}function ow(e,t){return be(e.getUTCMonth()+1,t,2)}function sw(e,t){return be(e.getUTCMinutes(),t,2)}function aw(e,t){return be(e.getUTCSeconds(),t,2)}function iw(e){var t=e.getUTCDay();return t===0?7:t}function lw(e,t){return be(qa.count(sr(e)-1,e),t,2)}function wm(e){var t=e.getUTCDay();return t>=4||t===0?Vn(e):Vn.ceil(e)}function cw(e,t){return e=wm(e),be(Vn.count(sr(e),e)+(sr(e).getUTCDay()===4),t,2)}function uw(e){return e.getUTCDay()}function dw(e,t){return be(ia.count(sr(e)-1,e),t,2)}function hw(e,t){return be(e.getUTCFullYear()%100,t,2)}function pw(e,t){return e=wm(e),be(e.getUTCFullYear()%100,t,2)}function mw(e,t){return be(e.getUTCFullYear()%1e4,t,4)}function fw(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Vn(e):Vn.ceil(e),be(e.getUTCFullYear()%1e4,t,4)}function gw(){return"+0000"}function Dd(){return"%"}function Ud(e){return+e}function Ld(e){return Math.floor(+e/1e3)}var hn,Cm,Om;yw({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 yw(e){return hn=yS(e),Cm=hn.format,hn.parse,Om=hn.utcFormat,hn.utcParse,hn}function bw(e){return new Date(e)}function xw(e){return e instanceof Date?+e:+new Date(+e)}function Lc(e,t,r,n,o,s,a,i,l,c){var u=hm(),d=u.invert,h=u.domain,p=c(".%L"),f=c(":%S"),m=c("%I:%M"),y=c("%I %p"),b=c("%a %d"),C=c("%b %d"),w=c("%B"),T=c("%Y");function A(O){return(l(O)<O?p:i(O)<O?f:a(O)<O?m:s(O)<O?y:n(O)<O?o(O)<O?b:C:r(O)<O?w:T)(O)}return u.invert=function(O){return new Date(d(O))},u.domain=function(O){return arguments.length?h(Array.from(O,xw)):h().map(bw)},u.ticks=function(O){var P=h();return e(P[0],P[P.length-1],O??10)},u.tickFormat=function(O,P){return P==null?A:c(P)},u.nice=function(O){var P=h();return(!O||typeof O.range!="function")&&(O=t(P[0],P[P.length-1],O??10)),O?h(mm(P,O)):u},u.copy=function(){return Go(u,Lc(e,t,r,n,o,s,a,i,l,c))},u}function Tm(){return Pr.apply(Lc(fS,gS,or,Dc,Ha,Ho,jc,Vc,$r,Cm).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function vw(){return Pr.apply(Lc(pS,mS,sr,Uc,qa,Ga,$c,kc,$r,Om).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Sw(){var e=0,t=1,r,n,o,s,a=wt,i=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(o===0?.5:(d=(s(d)-r)*o,i?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,r=s(e=+e),n=s(t=+t),o=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?(a=d,c):a};function u(d){return function(h){var p,f;return arguments.length?([p,f]=h,a=d(p,f),c):[a(0),a(1)]}}return c.range=u(Fa),c.rangeRound=u(dm),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return s=d,r=d(e),n=d(t),o=r===n?0:1/(n-r),c}}function ww(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Pm(){var e=za(Sw()(wt));return e.copy=function(){return ww(e,Pm())},l1.apply(e,arguments)}function Am(e){return e.type==="piecewise"?gm(e.thresholds,e.colors):Pm([e.min??0,e.max??100],e.color)}function la(e){return e.values?wl(e.values,e.colors).unknown(e.unknownColor??null):wl(e.colors.map((t,r)=>r),e.colors).unknown(e.unknownColor??null)}function Pl(e){return e.type==="ordinal"?la(e):Am(e)}function Bc(e,t,r){const{tickMaxStep:n,tickMinStep:o,tickNumber:s}=e,a=o===void 0?999:Math.floor(Math.abs(t[1]-t[0])/o),i=n===void 0?2:Math.ceil(Math.abs(t[1]-t[0])/n);return Math.min(a,Math.max(i,s??r))}function Cw(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function Rm(e){return Math.floor(Math.abs(e)/50)}function Bd(e){return Array.isArray(e)?JSON.stringify(e):typeof e=="object"&&e!==null?e.valueOf():e}function Fc(...e){let t=new Xs(void 0,Bd),r=[],n=[],o=0,s=1,a,i,l=!1,c=0,u=0,d=.5;const h=y=>{const b=t.get(y);if(b!==void 0)return n[b%n.length]},p=()=>{const y=r.length,b=s<o,C=b?s:o,w=b?o:s;a=(w-C)/Math.max(1,y-c+u*2),l&&(a=Math.floor(a));const T=C+(w-C-a*(y-c))*d;i=a*(1-c);const A=l?Math.round(T):T;i=l?Math.round(i):i;const P=i1(y).map(E=>A+a*E);return n=b?P.reverse():P,h};h.domain=function(y){if(!arguments.length)return r.slice();r=[],t=new Xs(void 0,Bd);for(const b of y)t.has(b)||t.set(b,r.push(b)-1);return p()},h.range=function(y){if(!arguments.length)return[o,s];const[b,C]=y;return o=+b,s=+C,p()},h.rangeRound=function(y){const[b,C]=y;return o=+b,s=+C,l=!0,p()},h.bandwidth=function(){return i},h.step=function(){return a},h.round=function(y){return arguments.length?(l=!!y,p()):l},h.padding=function(y){return arguments.length?(c=Math.min(1,u=+y),p()):c},h.paddingInner=function(y){return arguments.length?(c=Math.min(1,y),p()):c},h.paddingOuter=function(y){return arguments.length?(u=+y,p()):u},h.align=function(y){return arguments.length?(d=Math.max(0,Math.min(1,y)),p()):d},h.copy=()=>Fc(r,[o,s]).round(l).paddingInner(c).paddingOuter(u).align(d);const[f,m]=e;return e.length>1?(h.domain(f),h.range(m)):f?h.range(f):p(),h}function Ow(...e){const t=Fc(...e).paddingInner(1),r=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=()=>{const n=r();return n.padding=n.paddingOuter,delete n.paddingInner,delete n.paddingOuter,n.copy=t.copy,n},t}function Em(...e){const t=fm(...e),r=t.ticks,{negativeScale:n,linearScale:o,positiveScale:s}=Tw(t);return t.ticks=a=>{const i=r(a),l=t.constant();let c=0,u=0,d=0;i.forEach(p=>{p>-l&&p<l&&(u+=1),p<=-l&&(c+=1),p>=l&&(d+=1)});const h=[];if(c>0&&h.push(...n.ticks(c)),u>0){const p=o.ticks(u);h.at(-1)===p[0]?h.push(...p.slice(1)):h.push(...p)}if(d>0){const p=s.ticks(d);h.at(-1)===p[0]?h.push(...p.slice(1)):h.push(...p)}return h},t.tickFormat=(a=10,i)=>{const l=t.constant(),[c,u]=t.domain(),d=u-c,h=n.domain(),p=h[1]-h[0],m=(d===0?0:p/d)*a,y=o.domain(),b=y[1]-y[0],w=(d===0?0:b/d)*a,T=s.domain(),A=T[1]-T[0],P=(d===0?0:A/d)*a,E=n.tickFormat(m,i),_=o.tickFormat(w,i),x=s.tickFormat(P,i);return N=>(N.valueOf()<=-l?E:N.valueOf()>=l?x:_)(N)},t.copy=()=>Em(t.domain(),t.range()).constant(t.constant()),t}function Tw(e){const t=e.constant(),r=e.domain(),n=[r[0],Math.min(r[1],-t)],o=oa(n,e.range()),s=[Math.max(r[0],-t),Math.min(r[1],t)],a=Ic(s,e.range()),i=[Math.max(r[0],t),r[1]],l=oa(i,e.range());return{negativeScale:o,linearScale:a,positiveScale:l}}function Nc(e,t,r){switch(e){case"log":return oa(t,r);case"pow":return _c(t,r);case"sqrt":return oS(t,r);case"time":return Tm(t,r);case"utc":return vw(t,r);case"symlog":return Em(t,r);default:return Ic(t,r)}}const Pw=e=>(e==null?void 0:e[0])instanceof Date;function Aw(e,t,r){const n=Tm(e,t);return(o,{location:s})=>s==="tick"?n.tickFormat(r)(o):`${o.toLocaleString()}`}let Fd,Nd;class Rw{constructor(){oe(this,"types",new Set);if(Fd)throw new Error("You can only create one instance!");Fd=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class Ew{constructor(){oe(this,"types",new Set);if(Nd)throw new Error("You can only create one instance!");Nd=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const Wa=new Rw;Wa.addType("bar");Wa.addType("line");Wa.addType("scatter");const Iw=new Ew;Iw.addType("radar");function Im(e){return Wa.getTypes().has(e)}const _w=(e,t,r,n)=>{const o=new Set;return Object.keys(t).filter(Im).forEach(a=>{var c,u,d;const i=((c=r[a])==null?void 0:c.series)??{},l=(d=(u=t[a]).axisTooltipGetter)==null?void 0:d.call(u,i);l!==void 0&&l.forEach(({axisId:h,direction:p})=>{p===e&&o.add(h??n)})}),o};function qo(e){return e.bandwidth!==void 0}function Mw(e){return qo(e)&&e.paddingOuter!==void 0}function Vw(e,t,r){const n=t==="x"?[e.left,e.left+e.width]:[e.top+e.height,e.top];return r?[n[1],n[0]]:n}function kw(e,t){return e.step()*t<.1}const jw=.2,$w=.1;function _m({scales:e,drawingArea:t,formattedSeries:r,axis:n,seriesConfig:o,axisDirection:s,zoomMap:a,domains:i}){if(n===void 0)return{axis:{},axisIds:[]};const l=_w(s,o,r,n[0].id),c={};return n.forEach(u=>{const d=u,h=e[d.id],p=a==null?void 0:a.get(d.id),f=p?[p.start,p.end]:[0,100],m=Vw(t,s,d.reverse??!1),y=i[d.id].tickNumber,b=!d.ignoreTooltip&&l.has(d.id),C=Cw(y,f),w=d.data??[];if(qo(h)){const O=s==="y"?[m[1],m[0]]:m;if(Mw(h)&&Ln(d)){const P=d.categoryGapRatio??jw,E=kw(h,P),_=E?0:P,x=E?0:d.barGapRatio??$w;c[d.id]=Q({offset:0,height:0,categoryGapRatio:_,barGapRatio:x,triggerTooltip:b},d,{data:w,scale:E?h.copy().padding(0):h,tickNumber:C,colorScale:d.colorMap&&(d.colorMap.type==="ordinal"?la(Q({values:d.data},d.colorMap)):Pl(d.colorMap))})}if(Bn(d)&&(c[d.id]=Q({offset:0,height:0,triggerTooltip:b},d,{data:w,scale:h,tickNumber:C,colorScale:d.colorMap&&(d.colorMap.type==="ordinal"?la(Q({values:d.data},d.colorMap)):Pl(d.colorMap))})),Pw(d.data)){const P=Aw(d.data,O,d.tickNumber);c[d.id].valueFormatter=d.valueFormatter??P}return}if(d.scaleType==="band"||d.scaleType==="point")return;const T=d,A=T.scaleType??"linear";c[d.id]=Q({offset:0,height:0,triggerTooltip:b},T,{data:w,scaleType:A,scale:h,tickNumber:C,colorScale:T.colorMap&&Am(T.colorMap),valueFormatter:d.valueFormatter??Yv(C,Nc(A,m.map(O=>h.invert(O)),m))})}),{axis:c,axisIds:n.map(({id:u})=>u)}}function Dw(e){return e!=null}function Uw(e,t,r,n){const o=(e==null?void 0:e.length)??0,s=Math.floor(t*o/100),a=Math.ceil(r*o/100);return function(l,c){return(l[n]??(e==null?void 0:e[c]))==null?!0:c>=s&&c<a}}function Lw(e,t,r,n,o){const s=e[0].valueOf(),a=e[1].valueOf(),i=s+t*(a-s)/100,l=s+r*(a-s)/100;return function(u,d){const h=u[n]??(o==null?void 0:o[d]);return h==null?!0:h>=i&&h<=l}}const Bw=e=>({currentAxisId:t,seriesXAxisId:r,seriesYAxisId:n,isDefaultAxis:o})=>(s,a)=>{var c,u;return!(t===r?n:r)||o?((u=(c=Object.values(e??{}))[0])==null?void 0:u.call(c,s,a))??!0:[n,r].filter(d=>d!==t).map(d=>e[d??""]).filter(Dw).every(d=>d(s,a))},zd=e=>(t=[])=>t.reduce((r,n)=>{const{zoom:o,id:s,reverse:a}=n,i=Cc(o,s,e,a);return i&&(r[s]=i),r},{}),Fw=.2;function Mm(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}function Vm(e,t){const r=[0,1];if(Ln(e)){const s=e.categoryGapRatio??Fw;return Fc(t,r).paddingInner(s).paddingOuter(s/2)}if(Bn(e))return Ow(t,r);const n=e.scaleType??"linear",o=Nc(n,t,r);return Kv(e)&&e.constant!=null&&o.constant(e.constant),o}const km=(e,t)=>{const r=e[1]-e[0],n=t[1]-t[0],o=e[0]-t[0]*r/n,s=e[1]+(100-t[1])*r/n;return[o,s]},Nw=(e,t,r,n,o,s,a)=>{var c;const i=r==="x"?n[e].xExtremumGetter:n[e].yExtremumGetter,l=((c=s[e])==null?void 0:c.series)??{};return(i==null?void 0:i({series:l,axis:t,axisIndex:o,isDefaultAxis:o===0,getFilters:a}))??[1/0,-1/0]};function Ja(e,t,r,n,o,s){const a=Object.keys(r).filter(Im);let i=[1/0,-1/0];for(const l of a){const[c,u]=Nw(l,e,t,r,n,o,s);i=[Math.min(i[0],c),Math.max(i[1],u)]}return Number.isNaN(i[0])||Number.isNaN(i[1])?[1/0,-1/0]:i}const zw=(e,t,r,n)=>{var o;if(e.domainLimit!==void 0)return e.domainLimit;if(t==="x")for(const s of((o=n.line)==null?void 0:o.seriesOrder)??[]){const a=n.line.series[s];if(a.xAxisId===e.id||a.xAxisId===void 0&&r===0)return"strict"}return"nice"};function jm(e,t,r){return Nc(e??"linear",t,[0,1]).nice(r).domain()}function $m(e,t,r,n,[o,s],a,i){const l=Um(e,t,r,n,i);let c=Lm(e,o,s);if(typeof l=="function"){const{min:d,max:h}=l(o.valueOf(),s.valueOf());c[0]=d,c[1]=h}const u=Bc(e,c,a);return l==="nice"&&(c=jm(e.scaleType,c,u)),c=["min"in e?e.min??c[0]:c[0],"max"in e?e.max??c[1]:c[1]],{domain:c,tickNumber:u}}function Dm(e,t,r,n,[o,s],a,i){const l=Um(e,t,r,n,i);let c=Lm(e,o,s);if(typeof l=="function"){const{min:u,max:d}=l(o.valueOf(),s.valueOf());c[0]=u,c[1]=d}return l==="nice"&&(c=jm(e.scaleType,c,a)),[e.min??c[0],e.max??c[1]]}function Um(e,t,r,n,o){return o?zw(e,t,r,n):e.domainLimit??"nice"}function Lm(e,t,r){let n=t,o=r;return"max"in e&&e.max!=null&&e.max<t&&(n=e.max),"min"in e&&e.min!=null&&e.min>t&&(o=e.min),!("min"in e)&&!("max"in e)?[n,o]:[e.min??n,e.max??o]}class Gw{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(t,r){let n=this.length++;for(;n>0;){const o=n-1>>1,s=this.values[o];if(r>=s)break;this.ids[n]=this.ids[o],this.values[n]=s,n=o}this.ids[n]=t,this.values[n]=r}pop(){if(this.length===0)return;const t=this.ids,r=this.values,n=t[0],o=--this.length;if(o>0){const s=t[o],a=r[o];let i=0;const l=o>>1;for(;i<l;){const c=(i<<1)+1,u=c+1,d=c+(+(u<o)&+(r[u]<r[c]));if(r[d]>=a)break;t[i]=t[d],r[i]=r[d],i=d}t[i]=s,r[i]=a}return n}peek(){return this.length>0?this.ids[0]:void 0}peekValue(){return this.length>0?this.values[0]:void 0}shrink(){this.ids.length=this.values.length=this.length}}const Gd=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Hi=3;class zc{static from(t,r=0){if(r%8!==0)throw new Error("byteOffset must be 8-byte aligned.");if(!t||t.byteLength===void 0||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[n,o]=new Uint8Array(t,r+0,2);if(n!==251)throw new Error("Data does not appear to be in a Flatbush format.");const s=o>>4;if(s!==Hi)throw new Error(`Got v${s} data when expected v${Hi}.`);const a=Gd[o&15];if(!a)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(t,r+2,1),[l]=new Uint32Array(t,r+4,1);return new zc(l,i,a,void 0,t,r)}constructor(t,r=16,n=Float64Array,o=ArrayBuffer,s,a=0){if(t===void 0)throw new Error("Missing required argument: numItems.");if(isNaN(t)||t<=0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+r,2),65535),this.byteOffset=a;let i=t,l=i;this._levelBounds=[i*4];do i=Math.ceil(i/this.nodeSize),l+=i,this._levelBounds.push(l*4);while(i!==1);this.ArrayType=n,this.IndexArrayType=l<16384?Uint16Array:Uint32Array;const c=Gd.indexOf(n),u=l*4*n.BYTES_PER_ELEMENT;if(c<0)throw new Error(`Unexpected typed array class: ${n}.`);if(s)this.data=s,this._boxes=new n(s,a+8,l*4),this._indices=new this.IndexArrayType(s,a+8+u,l),this._pos=l*4,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1];else{const d=this.data=new o(8+u+l*this.IndexArrayType.BYTES_PER_ELEMENT);this._boxes=new n(d,8,l*4),this._indices=new this.IndexArrayType(d,8+u,l),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(d,0,2).set([251,(Hi<<4)+c]),new Uint16Array(d,2,1)[0]=r,new Uint32Array(d,4,1)[0]=t}this._queue=new Gw}add(t,r,n=t,o=r){const s=this._pos>>2,a=this._boxes;return this._indices[s]=s,a[this._pos++]=t,a[this._pos++]=r,a[this._pos++]=n,a[this._pos++]=o,t<this.minX&&(this.minX=t),r<this.minY&&(this.minY=r),n>this.maxX&&(this.maxX=n),o>this.maxY&&(this.maxY=o),s}finish(){if(this._pos>>2!==this.numItems)throw new Error(`Added ${this._pos>>2} items when expected ${this.numItems}.`);const t=this._boxes;if(this.numItems<=this.nodeSize){t[this._pos++]=this.minX,t[this._pos++]=this.minY,t[this._pos++]=this.maxX,t[this._pos++]=this.maxY;return}const r=this.maxX-this.minX||1,n=this.maxY-this.minY||1,o=new Uint32Array(this.numItems),s=65535;for(let a=0,i=0;a<this.numItems;a++){const l=t[i++],c=t[i++],u=t[i++],d=t[i++],h=Math.floor(s*((l+u)/2-this.minX)/r),p=Math.floor(s*((c+d)/2-this.minY)/n);o[a]=Ww(h,p)}Al(o,t,this._indices,0,this.numItems-1,this.nodeSize);for(let a=0,i=0;a<this._levelBounds.length-1;a++){const l=this._levelBounds[a];for(;i<l;){const c=i;let u=t[i++],d=t[i++],h=t[i++],p=t[i++];for(let f=1;f<this.nodeSize&&i<l;f++)u=Math.min(u,t[i++]),d=Math.min(d,t[i++]),h=Math.max(h,t[i++]),p=Math.max(p,t[i++]);this._indices[this._pos>>2]=c,t[this._pos++]=u,t[this._pos++]=d,t[this._pos++]=h,t[this._pos++]=p}}}search(t,r,n,o,s){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let a=this._boxes.length-4;const i=[],l=[];for(;a!==void 0;){const c=Math.min(a+this.nodeSize*4,Hd(a,this._levelBounds));for(let u=a;u<c;u+=4){if(n<this._boxes[u]||o<this._boxes[u+1]||t>this._boxes[u+2]||r>this._boxes[u+3])continue;const d=this._indices[u>>2]|0;a>=this.numItems*4?i.push(d):(s===void 0||s(d))&&(l.push(d),l.push(this._boxes[u]),l.push(this._boxes[u+1]))}a=i.pop()}return l}neighbors(t,r,n=1/0,o=1/0,s,a=Hw){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let i=this._boxes.length-4;const l=this._queue,c=[];e:for(;i!==void 0;){const u=Math.min(i+this.nodeSize*4,Hd(i,this._levelBounds));for(let d=i;d<u;d+=4){const h=this._indices[d>>2]|0,p=this._boxes[d],f=this._boxes[d+1],m=this._boxes[d+2],y=this._boxes[d+3],b=t<p?p-t:t>m?t-m:0,C=r<f?f-r:r>y?r-y:0,w=a(b,C);w>o||(i>=this.numItems*4?l.push(h<<1,w):(s===void 0||s(h))&&l.push((h<<1)+1,w))}for(;l.length&&l.peek()&1;)if(l.peekValue()>o||(c.push(l.pop()>>1),c.length===n))break e;i=l.length?l.pop()>>1:void 0}return l.clear(),c}}function Hw(e,t){return e*e+t*t}function Hd(e,t){let r=0,n=t.length-1;for(;r<n;){const o=r+n>>1;t[o]>e?n=o:r=o+1}return t[r]}function Al(e,t,r,n,o,s){if(Math.floor(n/s)>=Math.floor(o/s))return;const a=e[n],i=e[n+o>>1],l=e[o];let c=l;const u=Math.max(a,i);l>u?c=u:u===a?c=Math.max(i,l):u===i&&(c=Math.max(a,l));let d=n-1,h=o+1;for(;;){do d++;while(e[d]<c);do h--;while(e[h]>c);if(d>=h)break;qw(e,t,r,d,h)}Al(e,t,r,n,h,s),Al(e,t,r,h+1,o,s)}function qw(e,t,r,n,o){const s=e[n];e[n]=e[o],e[o]=s;const a=4*n,i=4*o,l=t[a],c=t[a+1],u=t[a+2],d=t[a+3];t[a]=t[i],t[a+1]=t[i+1],t[a+2]=t[i+2],t[a+3]=t[i+3],t[i]=l,t[i+1]=c,t[i+2]=u,t[i+3]=d;const h=r[n];r[n]=r[o],r[o]=h}function Ww(e,t){let r=e^t,n=65535^r,o=65535^(e|t),s=e&(t^65535),a=r|n>>1,i=r>>1^r,l=o>>1^n&s>>1^o,c=r&o>>1^s>>1^s;r=a,n=i,o=l,s=c,a=r&r>>2^n&n>>2,i=r&n>>2^n&(r^n)>>2,l^=r&o>>2^n&s>>2,c^=n&o>>2^(r^n)&s>>2,r=a,n=i,o=l,s=c,a=r&r>>4^n&n>>4,i=r&n>>4^n&(r^n)>>4,l^=r&o>>4^n&s>>4,c^=n&o>>4^(r^n)&s>>4,r=a,n=i,o=l,s=c,l^=r&o>>8^n&s>>8,c^=n&o>>8^(r^n)&s>>8,r=l^l>>1,n=c^c>>1;let u=e^t,d=n|65535^(u|r);return u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,d=(d|d<<8)&16711935,d=(d|d<<4)&252645135,d=(d|d<<2)&858993459,d=(d|d<<1)&1431655765,(d<<1|u)>>>0}const Jw=e=>{const t=new Map;return e.forEach(r=>{t.set(r.axisId,r)}),t},Bm=e=>e.zoom;ce(Bm,e=>e==null?void 0:e.isInteracting);const Ar=Ge(Bm,function(t){return(t==null?void 0:t.zoomData)&&Jw(t==null?void 0:t.zoomData)});ce(Ar,(e,t)=>e==null?void 0:e.get(t));const Ya=Ge(Cr,Or,function(t,r){return Q({},zd("x")(t),zd("y")(r))});ce(Ya,(e,t)=>e[t]);const Yw=ce(Jt,function(t){return Rm(t.width)}),Kw=ce(Jt,function(t){return Rm(t.height)}),Gc=Ge(Cr,st,Tr,Ua,Yw,function(t,r,n,o,s){const a="x",i={};return t==null||t.forEach((l,c)=>{var h,p;const u=l;if(Ln(u)||Bn(u)){i[u.id]={domain:u.data},u.ordinalTimeTicks!==void 0&&(i[u.id].tickNumber=Bc(u,[(h=u.data)==null?void 0:h.find(f=>f!==null),(p=u.data)==null?void 0:p.findLast(f=>f!==null)],s));return}const d=Ja(u,a,n,c,r);i[u.id]=$m(u,"x",c,r,d,s,o)}),{axes:t,domains:i}}),Hc=Ge(Or,st,Tr,Ua,Kw,function(t,r,n,o,s){const a="y",i={};return t==null||t.forEach((l,c)=>{var h,p;const u=l;if(Ln(u)||Bn(u)){i[u.id]={domain:u.data},u.ordinalTimeTicks!==void 0&&(i[u.id].tickNumber=Bc(u,[(h=u.data)==null?void 0:h.find(f=>f!==null),(p=u.data)==null?void 0:p.findLast(f=>f!==null)],s));return}const d=Ja(u,a,n,c,r);i[u.id]=$m(u,"y",c,r,d,s,o)}),{axes:t,domains:i}}),Fm=Ge(Ar,Ya,Gc,Hc,function(t,r,{axes:n,domains:o},{axes:s,domains:a}){if(!t||!r)return;let i=!1;const l={},c=[...n??[],...s??[]];for(let u=0;u<c.length;u+=1){const d=c[u];if(!r[d.id]||r[d.id].filterMode!=="discard")continue;const h=t.get(d.id);if(h===void 0||h.start<=0&&h.end>=100)continue;const p=u<((n==null?void 0:n.length)??0)?"x":"y";if(d.scaleType==="band"||d.scaleType==="point")l[d.id]=Uw(d.data,h.start,h.end,p);else{const{domain:f}=p==="x"?o[d.id]:a[d.id];l[d.id]=Lw(f,h.start,h.end,p,d.data)}i=!0}if(i)return Bw(l)}),Qw=Ge(st,Tr,Ar,Ya,Fm,Ua,Gc,function(t,r,n,o,s,a,{axes:i,domains:l}){const c={};return i==null||i.forEach((u,d)=>{const h=l[u.id].domain;if(Ln(u)||Bn(u)){c[u.id]=h;return}const p=n==null?void 0:n.get(u.id),f=o==null?void 0:o[u.id],m=p===void 0&&!f?s:void 0;if(!m){c[u.id]=h;return}const y=l[u.id].tickNumber,b=Ja(u,"x",r,d,t,m);c[u.id]=Dm(u,"x",d,t,b,y,a)}),c}),Xw=Ge(st,Tr,Ar,Ya,Fm,Ua,Hc,function(t,r,n,o,s,a,{axes:i,domains:l}){const c={};return i==null||i.forEach((u,d)=>{const h=l[u.id].domain;if(Ln(u)||Bn(u)){c[u.id]=h;return}const p=n==null?void 0:n.get(u.id),f=o==null?void 0:o[u.id],m=p===void 0&&!f?s:void 0;if(!m){c[u.id]=h;return}const y=l[u.id].tickNumber,b=Ja(u,"y",r,d,t,m);c[u.id]=Dm(u,"y",d,t,b,y,a)}),c}),Nm=Ge(Cr,Qw,function(t,r){const n={};return t==null||t.forEach(o=>{const s=o,a=r[s.id];n[s.id]=Vm(s,a)}),n}),zm=Ge(Or,Xw,function(t,r){const n={};return t==null||t.forEach(o=>{const s=o,a=r[s.id];n[s.id]=Vm(s,a)}),n}),Zw=Ge(Cr,Nm,Jt,Ar,function(t,r,n,o){const s={};return t==null||t.forEach(a=>{const i=a,l=o==null?void 0:o.get(i.id),c=l?[l.start,l.end]:[0,100],u=Mm(n,"x",i),d=r[i.id].copy(),h=km(u,c);d.range(h),s[i.id]=d}),s}),eC=Ge(Or,zm,Jt,Ar,function(t,r,n,o){const s={};return t==null||t.forEach(a=>{const i=a,l=o==null?void 0:o.get(i.id),c=l?[l.start,l.end]:[0,100],u=Mm(n,"y",i),d=r[i.id].copy(),h=qo(d)?u.reverse():u,p=km(h,c);d.range(p),s[i.id]=d}),s}),Rr=Ge(Jt,st,Tr,Ar,Gc,Zw,function(t,r,n,o,{axes:s,domains:a},i){return _m({scales:i,drawingArea:t,formattedSeries:r,axis:s,seriesConfig:n,axisDirection:"x",zoomMap:o,domains:a})}),Er=Ge(Jt,st,Tr,Ar,Hc,eC,function(t,r,n,o,{axes:s,domains:a},i){return _m({scales:i,drawingArea:t,formattedSeries:r,axis:s,seriesConfig:n,axisDirection:"y",zoomMap:o,domains:a})});ce(Rr,Er,(e,t,r)=>(e==null?void 0:e.axis[r])??(t==null?void 0:t.axis[r]));ce(Cr,Or,(e,t,r)=>{const n=(e==null?void 0:e.find(o=>o.id===r))??(t==null?void 0:t.find(o=>o.id===r))??null;if(n)return n});const tC=ce(Cr,e=>e[0].id),rC=ce(Or,e=>e[0].id);Ge(st,Nm,zm,tC,rC,function(t,r,n,o,s){const a=t.scatter,i=new Map;return a&&a.seriesOrder.forEach(l=>{const{data:c,xAxisId:u=o,yAxisId:d=s}=a.series[l],h=new zc(c.length),p=r[u],f=n[d];for(const m of c)h.add(p(m.x),f(m.y));h.finish(),i.set(l,h)}),i});function pn(e){return e instanceof Date?e.getTime():e}function kn(e,t){const{scale:r,data:n,reverse:o}=e;if(!qo(r)){const a=r.invert(t);if(n===void 0)return-1;const i=pn(a);return n==null?void 0:n.findIndex((c,u)=>{const d=pn(c);return d>i&&(u===0||Math.abs(i-d)<=Math.abs(i-pn(n[u-1])))||d<=i&&(u===n.length-1||Math.abs(pn(a)-d)<Math.abs(pn(a)-pn(n[u+1])))})}const s=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 s<0||s>=n.length?-1:o?n.length-1-s:s}function qd(e,t,r,n){if(!qo(e)){if(n===null){const o=e.invert(r);return Number.isNaN(o)?null:o}return t[n]}return n===null||n<0||n>=t.length?null:t[n]}function Wd(e,t){const r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r.matrixTransform(e.getScreenCTM().inverse())}const qc=({store:e})=>{const t=yt(function(){e.update({interaction:Q({},e.state.interaction,{pointer:null})})}),r=yt(function(i){e.state.interaction.lastUpdate!==i&&e.set("interaction",Q({},e.state.interaction,{lastUpdate:i}))}),n=yt(function(i){e.set("interaction",Q({},e.state.interaction,{pointer:i,lastUpdate:i!==null?"pointer":e.state.interaction.lastUpdate}))}),o=yt(function(i){e.set("interaction",Q({},e.state.interaction,{pointerType:i.pointerType}))}),s=yt(function(){e.set("interaction",Q({},e.state.interaction,{pointerType:null}))});return{instance:{cleanInteraction:t,setLastUpdateSource:r,setPointerCoordinate:n,handlePointerEnter:o,handlePointerLeave:s}}};qc.getInitialState=()=>({interaction:{item:null,pointer:null,lastUpdate:"pointer",pointerType:null}});qc.params={};const Ka=e=>e.interaction,nC=ce(Ka,e=>e!==void 0),Gm=ce(Ka,e=>(e==null?void 0:e.pointer)??null),Qa=ce(Gm,e=>e&&e.x),Xa=ce(Gm,e=>e&&e.y);ce(Ka,e=>e==null?void 0:e.lastUpdate);ce(Ka,e=>(e==null?void 0:e.pointerType)??null);function xo(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 o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s+=1)if(!xo(e[s],t[s]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let s=0;s<o.length;s+=1)if(!t.has(o[s][0]))return!1;for(let s=0;s<o.length;s+=1){const a=o[s];if(!xo(a[1],t.get(a[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let s=0;s<o.length;s+=1)if(!t.has(o[s][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s+=1)if(e[s]!==t[s])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 o=0;o<n;o+=1)if(!Object.prototype.hasOwnProperty.call(t,r[o]))return!1;for(let o=0;o<n;o+=1){const s=r[o];if(!xo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Rl(e,t,r=t.axisIds[0]){return Array.isArray(r)?r.map(n=>kn(t.axis[n],e)):kn(t.axis[r],e)}const Hm=(e,t,r)=>{if(e===null)return null;const n=Rl(e,t,r);return n===-1?null:n},oC=ce(Qa,Rr,Hm),sC=ce(Xa,Er,Hm),aC=ce(Qa,Xa,Rr,Er,(e,t,r,n)=>[...e===null?[]:r.axisIds.map(o=>({axisId:o,dataIndex:Rl(e,r,o)})),...t===null?[]:n.axisIds.map(o=>({axisId:o,dataIndex:Rl(t,n,o)}))].filter(o=>o.dataIndex!==null&&o.dataIndex>=0));function qm(e,t,r,n=t.axisIds[0]){return Array.isArray(n)?n.map((o,s)=>{const a=t.axis[o];return qd(a.scale,a.data,e,r[s])}):qd(t.axis[n].scale,t.axis[n].data,e,r)}ce(Qa,Rr,oC,(e,t,r,n)=>e===null||t.axisIds.length===0?null:qm(e,t,r,n));ce(Xa,Er,sC,(e,t,r,n)=>e===null||t.axisIds.length===0?null:qm(e,t,r,n));const Wm=[],iC=uc({memoizeOptions:{resultEqualityCheck:xo}})(Qa,Rr,(e,t)=>e===null?Wm:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:kn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0)),lC=uc({memoizeOptions:{resultEqualityCheck:xo}})(Xa,Er,(e,t)=>e===null?Wm:t.axisIds.filter(r=>t.axis[r].triggerTooltip).map(r=>({axisId:r,dataIndex:kn(t.axis[r],e)})).filter(({dataIndex:r})=>r>=0));ce(iC,lC,(e,t)=>e.length>0||t.length>0);function cC(e){return e.setPointerCoordinate!==void 0}const uC=new Set(["bar","rangeBar","line"]),Za=({params:e,store:t,seriesConfig:r,svgRef:n,instance:o})=>{const{xAxis:s,yAxis:a,dataset:i,onHighlightedAxisChange:l}=e;if(process.env.NODE_ENV!=="production"){const T=[...s??[],...a??[]].filter(O=>O.id).map(O=>O.id),A=new Set(T.filter((O,P)=>T.indexOf(O)!==P));A.size>0&&In([`MUI X Charts: The following axis ids are duplicated: ${Array.from(A).join(", ")}.`,"Please make sure that each axis has a unique id."].join(`
|
|
117
|
+
`),"error")}const c=t.use(Jt),u=t.use(st),d=t.use(nC),{axis:h,axisIds:p}=t.use(Rr),{axis:f,axisIds:m}=t.use(Er);wc({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedAxis",controlled:e.highlightedAxis,defaultValue:void 0}),kt(()=>{e.highlightedAxis!==void 0&&t.set("controlledCartesianAxisHighlight",e.highlightedAxis)},[t,e.highlightedAxis]);const y=F.useRef(!0);F.useEffect(()=>{if(y.current){y.current=!1;return}t.set("cartesianAxis",{x:sm(s,i),y:am(a,i)})},[r,c,s,a,i,t]);const b=p[0],C=m[0];qx(t,aC,(T,A)=>{if(l&&!Object.is(T,A)){if(T.length!==A.length){l(A);return}T!=null&&T.some(({axisId:O,dataIndex:P},E)=>A[E].axisId!==O||A[E].dataIndex!==P)&&l(A)}});const w=cC(o);return F.useEffect(()=>{const T=n.current;if(!d||!w||!T||e.disableAxisListener)return()=>{};const A=o.addInteractionListener("moveEnd",M=>{M.detail.activeGestures.pan||o.cleanInteraction()}),O=o.addInteractionListener("panEnd",M=>{M.detail.activeGestures.move||o.cleanInteraction()}),P=o.addInteractionListener("quickPressEnd",M=>{!M.detail.activeGestures.move&&!M.detail.activeGestures.pan&&o.cleanInteraction()}),E=M=>{var re;const H=M.detail.srcEvent,z=M.detail.target,ne=Wd(T,H);if(M.detail.srcEvent.buttons>=1&&(z!=null&&z.hasPointerCapture(M.detail.srcEvent.pointerId))&&!(z!=null&&z.closest("[data-charts-zoom-slider]"))&&(z==null||z.releasePointerCapture(M.detail.srcEvent.pointerId)),!o.isPointInside(ne.x,ne.y,z)){(re=o.cleanInteraction)==null||re.call(o);return}o.setPointerCoordinate(ne)},_=o.addInteractionListener("move",E),x=o.addInteractionListener("pan",E),N=o.addInteractionListener("quickPress",E);return()=>{_.cleanup(),A.cleanup(),x.cleanup(),O.cleanup(),N.cleanup(),P.cleanup()}},[n,t,h,b,f,C,o,e.disableAxisListener,d,w]),F.useEffect(()=>{const T=n.current,A=e.onAxisClick;if(T===null||!A)return()=>{};const O=o.addInteractionListener("tap",P=>{let E=null,_=!1;const x=Wd(T,P.detail.srcEvent),N=kn(h[b],x.x);_=N!==-1,E=_?N:kn(f[C],x.y);const M=_?p[0]:m[0];if(E==null||E===-1)return;const H=(_?h:f)[M].data[E],z={};Object.keys(u).filter(ne=>uC.has(ne)).forEach(ne=>{const re=u[ne];re==null||re.seriesOrder.forEach(he=>{const te=re.series[he],me=te.xAxisId,W=te.yAxisId,Z=_?me:W;(Z===void 0||Z===M)&&(z[he]=te.data[E])})}),A(P.detail.srcEvent,{dataIndex:E,axisValue:H,seriesValues:z})});return()=>{O.cleanup()}},[e.onAxisClick,u,n,h,p,f,m,b,C,o]),{}};Za.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0};Za.getDefaultizedParams=({params:e})=>Q({},e,{colors:e.colors??Zp,theme:e.theme??"light",defaultizedXAxis:sm(e.xAxis,e.dataset),defaultizedYAxis:am(e.yAxis,e.dataset)});Za.getInitialState=e=>Q({cartesianAxis:{x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});const dC=Object.is;function ca(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=0,n=0;for(const o in e)if(r+=1,!dC(e[o],t[o])||!(o in t))return!1;for(const o in t)n+=1;return r===n}const Wo=e=>e.keyboardNavigation;ce(Wo,(e,t)=>(e==null?void 0:e.item)!=null&&ca(e.item,t));const hC=ce(Wo,e=>(e==null?void 0:e.item)!=null),Jm=ce(Wo,e=>(e==null?void 0:e.item)??null),pC=ce(Wo,e=>!!(e!=null&&e.enableKeyboardNavigation)),Ym=e=>(t,r,n)=>{var a;if(t==null||!("dataIndex"in t)||t.dataIndex===void 0)return;const o=(a=n[t.type])==null?void 0:a.series[t.seriesId];if(!o)return;let s=e==="x"?"xAxisId"in o&&o.xAxisId:"yAxisId"in o&&o.yAxisId;return(s===void 0||s===!1)&&(s=r.axisIds[0]),{axisId:s,dataIndex:t.dataIndex}};ce(Jm,Rr,st,Ym("x"));ce(Jm,Er,st,Ym("y"));ce(Wo,function(t){if((t==null?void 0:t.item)==null)return null;const{type:r,seriesId:n}=t.item;return r===void 0||n===void 0?null:t.item});const Wc=({store:e,params:t})=>{wc({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"tooltipItem",controlled:t.tooltipItem,defaultValue:null}),kt(()=>{e.state.tooltip.item!==t.tooltipItem&&e.set("tooltip",Q({},e.state.tooltip,{item:t.tooltipItem}))},[e,t.tooltipItem]);const r=yt(function(s){var i;const a=e.state.tooltip.item;if(a!==null&&(!s||ca(a,s))){(i=t.onTooltipItemChange)==null||i.call(t,null),e.state.tooltip.itemIsControlled||e.set("tooltip",Q({},e.state.tooltip,{item:null}));return}});return{instance:{setTooltipItem:yt(function(s){var a;ca(e.state.tooltip.item,s)||((a=t.onTooltipItemChange)==null||a.call(t,s),e.state.tooltip.itemIsControlled||e.set("tooltip",Q({},e.state.tooltip,{item:s})))}),removeTooltipItem:r}}};Wc.getInitialState=e=>({tooltip:{itemIsControlled:e.tooltipItem!==void 0,item:e.tooltipItem??null}});Wc.params={tooltipItem:!0,onTooltipItemChange:!0};const Dr=(e,t)=>e===void 0?t:Math.PI*e/180;function Jd(e,t){return e.id!==void 0?e:Q({id:t},e)}function Yd(e){return e.colorMap?Q({},e,{colorScale:e.colorMap.type==="ordinal"&&e.data?la(Q({values:e.data},e.colorMap)):Pl(e.colorMap.type==="continuous"?Q({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function Km(e,t){if(!e||e.length===0)return{axis:{},axisIds:[]};const r={},n=[];return e.forEach((o,s)=>{const a=o.dataKey,i=o.id??`defaultized-z-axis-${s}`;if(a===void 0||o.data!==void 0){r[i]=Yd(Jd(o,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]=Yd(Jd(Q({},o,{data:t.map(l=>l[a])}),i)),n.push(i)}),{axis:r,axisIds:n}}const Jc=({params:e,store:t})=>{const{zAxis:r,dataset:n}=e,o=F.useRef(!0);return F.useEffect(()=>{if(o.current){o.current=!1;return}t.set("zAxis",Km(r,n))},[r,n,t]),{}};Jc.params={zAxis:!0,dataset:!0};Jc.getInitialState=e=>({zAxis:Km(e.zAxis,e.dataset)});const mC=e=>e,fC=ce(mC,e=>e.zAxis),Yc=({store:e,params:t})=>{wc({warningPrefix:"MUI X Charts",componentName:"Chart",propName:"highlightedItem",controlled:t.highlightedItem,defaultValue:null}),kt(()=>{e.state.highlight.item!==t.highlightedItem&&e.set("highlight",Q({},e.state.highlight,{item:t.highlightedItem})),process.env.NODE_ENV!=="production"&&t.highlightedItem!==void 0&&!e.state.highlight.isControlled&&In(["MUI X Charts: The `highlightedItem` switched between controlled and uncontrolled state.","To remove the highlight when using controlled state, you must provide `null` to the `highlightedItem` prop instead of `undefined`."].join(`
|
|
118
|
+
`))},[e,t.highlightedItem]);const r=yt(()=>{var s;(s=t.onHighlightChange)==null||s.call(t,null);const o=e.state.highlight;o.item===null||o.isControlled||e.set("highlight",{item:null,lastUpdate:"pointer",isControlled:!1})}),n=yt(o=>{var a;const s=e.state.highlight;ca(s.item,o)||((a=t.onHighlightChange)==null||a.call(t,o),!s.isControlled&&e.set("highlight",{item:o,lastUpdate:"pointer",isControlled:!1}))});return{instance:{clearHighlight:r,setHighlight:n}}};Yc.getInitialState=e=>({highlight:{item:e.highlightedItem,lastUpdate:"pointer",isControlled:e.highlightedItem!==void 0}});Yc.params={highlightedItem:!0,onHighlightChange:!0};function Io(e){let t=1/0,r=-1/0;for(const n of e??[])n<t&&(t=n),n>r&&(r=n);return[t,r]}const Kd=(e,t)=>t==="x"?{x:e,y:null}:{x:null,y:e},Qm=e=>{var a;const{axis:t,getFilters:r,isDefaultAxis:n}=e,o=r==null?void 0:r({currentAxisId:t.id,isDefaultAxis:n}),s=o?(a=t.data)==null?void 0:a.filter((i,l)=>o({x:null,y:null},l)):t.data;return Io(s??[])},Xm=e=>t=>{const{series:r,axis:n,getFilters:o,isDefaultAxis:s}=t;return Object.keys(r).filter(a=>{const i=e==="x"?r[a].xAxisId:r[a].yAxisId;return i===n.id||s&&i===void 0}).reduce((a,i)=>{const{stackedData:l}=r[i],c=o==null?void 0:o({currentAxisId:n.id,isDefaultAxis:s,seriesXAxisId:r[i].xAxisId,seriesYAxisId:r[i].yAxisId}),[u,d]=(l==null?void 0:l.reduce((h,p,f)=>c&&(!c(Kd(p[0],e),f)||!c(Kd(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,a[0]),Math.max(d,a[1])]},[1/0,-1/0])},gC=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?Xm("x")(e):Qm(e),yC=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?Qm(e):Xm("y")(e);function ze(e){return function(){return e}}const Qd=Math.abs,Ze=Math.atan2,_r=Math.cos,bC=Math.max,qi=Math.min,Dt=Math.sin,wn=Math.sqrt,ct=1e-12,_o=Math.PI,ua=_o/2,Ls=2*_o;function xC(e){return e>1?0:e<-1?_o:Math.acos(e)}function Xd(e){return e>=1?ua:e<=-1?-ua:Math.asin(e)}const El=Math.PI,Il=2*El,Vr=1e-6,vC=Il-Vr;function Zm(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function SC(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Zm;const r=10**t;return function(n){this._+=n[0];for(let o=1,s=n.length;o<s;++o)this._+=Math.round(arguments[o]*r)/r+n[o]}}class wC{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Zm:SC(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,o){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+o}`}bezierCurveTo(t,r,n,o,s,a){this._append`C${+t},${+r},${+n},${+o},${this._x1=+s},${this._y1=+a}`}arcTo(t,r,n,o,s){if(t=+t,r=+r,n=+n,o=+o,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,i=this._y1,l=n-t,c=o-r,u=a-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>Vr)if(!(Math.abs(d*l-c*u)>Vr)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-a,f=o-i,m=l*l+c*c,y=p*p+f*f,b=Math.sqrt(m),C=Math.sqrt(h),w=s*Math.tan((El-Math.acos((m+h-y)/(2*b*C)))/2),T=w/C,A=w/b;Math.abs(T-1)>Vr&&this._append`L${t+T*u},${r+T*d}`,this._append`A${s},${s},0,0,${+(d*p>u*f)},${this._x1=t+A*l},${this._y1=r+A*c}`}}arc(t,r,n,o,s,a){if(t=+t,r=+r,n=+n,a=!!a,n<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(o),l=n*Math.sin(o),c=t+i,u=r+l,d=1^a,h=a?o-s:s-o;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Vr||Math.abs(this._y1-u)>Vr)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%Il+Il),h>vC?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>Vr&&this._append`A${n},${n},0,${+(h>=El)},${d},${this._x1=t+n*Math.cos(s)},${this._y1=r+n*Math.sin(s)}`)}rect(t,r,n,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+o}h${-n}Z`}toString(){return this._}}function CC(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 wC(t)}function OC(e){return e.innerRadius}function TC(e){return e.outerRadius}function PC(e){return e.startAngle}function AC(e){return e.endAngle}function RC(e){return e&&e.padAngle}function EC(e,t,r,n,o,s,a,i){var l=r-e,c=n-t,u=a-o,d=i-s,h=d*l-u*c;if(!(h*h<ct))return h=(u*(t-s)-d*(e-o))/h,[e+h*l,t+h*c]}function ys(e,t,r,n,o,s,a){var i=e-r,l=t-n,c=(a?s:-s)/wn(i*i+l*l),u=c*l,d=-c*i,h=e+u,p=t+d,f=r+u,m=n+d,y=(h+f)/2,b=(p+m)/2,C=f-h,w=m-p,T=C*C+w*w,A=o-s,O=h*m-f*p,P=(w<0?-1:1)*wn(bC(0,A*A*T-O*O)),E=(O*w-C*P)/T,_=(-O*C-w*P)/T,x=(O*w+C*P)/T,N=(-O*C+w*P)/T,M=E-y,H=_-b,z=x-y,ne=N-b;return M*M+H*H>z*z+ne*ne&&(E=x,_=N),{cx:E,cy:_,x01:-u,y01:-d,x11:E*(o/A-1),y11:_*(o/A-1)}}function ef(){var e=OC,t=TC,r=ze(0),n=null,o=PC,s=AC,a=RC,i=null,l=CC(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),f=o.apply(this,arguments)-ua,m=s.apply(this,arguments)-ua,y=Qd(m-f),b=m>f;if(i||(i=u=l()),p<h&&(d=p,p=h,h=d),!(p>ct))i.moveTo(0,0);else if(y>Ls-ct)i.moveTo(p*_r(f),p*Dt(f)),i.arc(0,0,p,f,m,!b),h>ct&&(i.moveTo(h*_r(m),h*Dt(m)),i.arc(0,0,h,m,f,b));else{var C=f,w=m,T=f,A=m,O=y,P=y,E=a.apply(this,arguments)/2,_=E>ct&&(n?+n.apply(this,arguments):wn(h*h+p*p)),x=qi(Qd(p-h)/2,+r.apply(this,arguments)),N=x,M=x,H,z;if(_>ct){var ne=Xd(_/h*Dt(E)),re=Xd(_/p*Dt(E));(O-=ne*2)>ct?(ne*=b?1:-1,T+=ne,A-=ne):(O=0,T=A=(f+m)/2),(P-=re*2)>ct?(re*=b?1:-1,C+=re,w-=re):(P=0,C=w=(f+m)/2)}var he=p*_r(C),te=p*Dt(C),me=h*_r(A),W=h*Dt(A);if(x>ct){var Z=p*_r(w),pe=p*Dt(w),Ee=h*_r(T),qe=h*Dt(T),Te;if(y<_o)if(Te=EC(he,te,Ee,qe,Z,pe,me,W)){var ht=he-Te[0],at=te-Te[1],xe=Z-Te[0],X=pe-Te[1],se=1/Dt(xC((ht*xe+at*X)/(wn(ht*ht+at*at)*wn(xe*xe+X*X)))/2),le=wn(Te[0]*Te[0]+Te[1]*Te[1]);N=qi(x,(h-le)/(se-1)),M=qi(x,(p-le)/(se+1))}else N=M=0}P>ct?M>ct?(H=ys(Ee,qe,he,te,p,M,b),z=ys(Z,pe,me,W,p,M,b),i.moveTo(H.cx+H.x01,H.cy+H.y01),M<x?i.arc(H.cx,H.cy,M,Ze(H.y01,H.x01),Ze(z.y01,z.x01),!b):(i.arc(H.cx,H.cy,M,Ze(H.y01,H.x01),Ze(H.y11,H.x11),!b),i.arc(0,0,p,Ze(H.cy+H.y11,H.cx+H.x11),Ze(z.cy+z.y11,z.cx+z.x11),!b),i.arc(z.cx,z.cy,M,Ze(z.y11,z.x11),Ze(z.y01,z.x01),!b))):(i.moveTo(he,te),i.arc(0,0,p,C,w,!b)):i.moveTo(he,te),!(h>ct)||!(O>ct)?i.lineTo(me,W):N>ct?(H=ys(me,W,Z,pe,h,-N,b),z=ys(he,te,Ee,qe,h,-N,b),i.lineTo(H.cx+H.x01,H.cy+H.y01),N<x?i.arc(H.cx,H.cy,N,Ze(H.y01,H.x01),Ze(z.y01,z.x01),!b):(i.arc(H.cx,H.cy,N,Ze(H.y01,H.x01),Ze(H.y11,H.x11),!b),i.arc(0,0,h,Ze(H.cy+H.y11,H.cx+H.x11),Ze(z.cy+z.y11,z.cx+z.x11),b),i.arc(z.cx,z.cy,N,Ze(z.y11,z.x11),Ze(z.y01,z.x01),!b))):i.arc(0,0,h,A,T,b)}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=(+o.apply(this,arguments)+ +s.apply(this,arguments))/2-_o/2;return[_r(d)*u,Dt(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:ze(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:ze(+u),c):t},c.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:ze(+u),c):r},c.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:ze(+u),c):n},c.startAngle=function(u){return arguments.length?(o=typeof u=="function"?u:ze(+u),c):o},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:ze(+u),c):s},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:ze(+u),c):a},c.context=function(u){return arguments.length?(i=u??null,c):i},c}function tf(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function IC(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function _C(e){return e}function MC(){var e=_C,t=IC,r=null,n=ze(0),o=ze(Ls),s=ze(0);function a(i){var l,c=(i=tf(i)).length,u,d,h=0,p=new Array(c),f=new Array(c),m=+n.apply(this,arguments),y=Math.min(Ls,Math.max(-Ls,o.apply(this,arguments)-m)),b,C=Math.min(Math.abs(y)/c,s.apply(this,arguments)),w=C*(y<0?-1:1),T;for(l=0;l<c;++l)(T=f[p[l]=l]=+e(i[l],l,i))>0&&(h+=T);for(t!=null?p.sort(function(A,O){return t(f[A],f[O])}):r!=null&&p.sort(function(A,O){return r(i[A],i[O])}),l=0,d=h?(y-c*w)/h:0;l<c;++l,m=b)u=p[l],T=f[u],b=m+(T>0?T*d:0)+w,f[u]={data:i[u],index:l,value:T,startAngle:m,endAngle:b,padAngle:C};return f}return a.value=function(i){return arguments.length?(e=typeof i=="function"?i:ze(+i),a):e},a.sortValues=function(i){return arguments.length?(t=i,r=null,a):t},a.sort=function(i){return arguments.length?(r=i,t=null,a):r},a.startAngle=function(i){return arguments.length?(n=typeof i=="function"?i:ze(+i),a):n},a.endAngle=function(i){return arguments.length?(o=typeof i=="function"?i:ze(+i),a):o},a.padAngle=function(i){return arguments.length?(s=typeof i=="function"?i:ze(+i),a):s},a}function jn(e,t){if((a=e.length)>1)for(var r=1,n,o,s=e[t[0]],a,i=s.length;r<a;++r)for(o=s,s=e[t[r]],n=0;n<i;++n)s[n][1]+=s[n][0]=isNaN(o[n][1])?o[n][0]:o[n][1]}function $n(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function VC(e,t){return e[t]}function kC(e){const t=[];return t.key=e,t}function da(){var e=ze([]),t=$n,r=jn,n=VC;function o(s){var a=Array.from(e.apply(this,arguments),kC),i,l=a.length,c=-1,u;for(const d of s)for(i=0,++c;i<l;++i)(a[i][c]=[0,+n(d,a[i].key,c,s)]).data=d;for(i=0,u=tf(t(a));i<l;++i)a[u[i]].index=i;return r(a,u),a}return o.keys=function(s){return arguments.length?(e=typeof s=="function"?s:ze(Array.from(s)),o):e},o.value=function(s){return arguments.length?(n=typeof s=="function"?s:ze(+s),o):n},o.order=function(s){return arguments.length?(t=s==null?$n:typeof s=="function"?s:ze(Array.from(s)),o):t},o.offset=function(s){return arguments.length?(r=s??jn,o):r},o}function jC(e,t){if((n=e.length)>0){for(var r,n,o=0,s=e[0].length,a;o<s;++o){for(a=r=0;r<n;++r)a+=e[r][o][1]||0;if(a)for(r=0;r<n;++r)e[r][o][1]/=a}jn(e,t)}}function $C(e,t){if((o=e.length)>0){for(var r=0,n=e[t[0]],o,s=n.length;r<s;++r){for(var a=0,i=0;a<o;++a)i+=e[a][r][1]||0;n[r][1]+=n[r][0]=-i/2}jn(e,t)}}function DC(e,t){if(!(!((a=e.length)>0)||!((s=(o=e[t[0]]).length)>0))){for(var r=0,n=1,o,s,a;n<s;++n){for(var i=0,l=0,c=0;i<a;++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]],y=m[n][1]||0,b=m[n-1][1]||0;p+=y-b}l+=d,c+=p*d}o[n-1][1]+=o[n-1][0]=r,l&&(r-=c/l)}o[n-1][1]+=o[n-1][0]=r,jn(e,t)}}function rf(e){var t=e.map(UC);return $n(e).sort(function(r,n){return t[r]-t[n]})}function UC(e){for(var t=-1,r=0,n=e.length,o,s=-1/0;++t<n;)(o=+e[t][1])>s&&(s=o,r=t);return r}function nf(e){var t=e.map(of);return $n(e).sort(function(r,n){return t[r]-t[n]})}function of(e){for(var t=0,r=-1,n=e.length,o;++r<n;)(o=+e[r][1])&&(t+=o);return t}function LC(e){return nf(e).reverse()}function BC(e){var t=e.length,r,n,o=e.map(of),s=rf(e),a=0,i=0,l=[],c=[];for(r=0;r<t;++r)n=s[r],a<i?(a+=o[n],l.push(n)):(i+=o[n],c.push(n));return c.reverse().concat(l)}function FC(e){return $n(e).reverse()}function NC(e,t){if(e.length===0)return;const r=e.length,n=t,o=e[n[0]].length;for(let s=0;s<o;s+=1){let a=0,i=0;for(let l=0;l<r;l+=1){const c=e[n[l]],u=c[s],d=u[1]-u[0];d>0?(u[0]=a,a+=d,u[1]=a):d<0?(u[1]=i,i+=d,u[0]=i):u.data[c.key]>0?(u[0]=a,u[1]=a):u.data[c.key]<0?(u[1]=i,u[0]=i):(u[0]=0,u[1]=0)}}}const Wi={appearance:rf,ascending:nf,descending:LC,insideOut:BC,none:$n,reverse:FC},Ji={expand:jC,diverging:NC,none:jn,silhouette:$C,wiggle:DC},sf=e=>{const{series:t,seriesOrder:r,defaultStrategy:n}=e,o=[],s={};return r.forEach(a=>{const{stack:i,stackOrder:l,stackOffset:c}=t[a];i===void 0?o.push({ids:[a],stackingOrder:Wi.none,stackingOffset:Ji.none}):s[i]===void 0?(s[i]=o.length,o.push({ids:[a],stackingOrder:Wi[l??(n==null?void 0:n.stackOrder)??"none"],stackingOffset:Ji[c??(n==null?void 0:n.stackOffset)??"diverging"]})):(o[s[i]].ids.push(a),l!==void 0&&(o[s[i]].stackingOrder=Wi[l]),c!==void 0&&(o[s[i]].stackingOffset=Ji[c]))}),o},zC=e=>e==null?"":e.toLocaleString(),GC=(e,t,r)=>{const{seriesOrder:n,series:o}=e,s=sf(e),a=t??[];n.forEach(l=>{const c=o[l].data;if(c!==void 0)c.forEach((u,d)=>{a.length<=d?a.push({[l]:u}):a[d][l]=u});else if(t===void 0)throw new Error([`MUI X Charts: bar series with id='${l}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
|
|
119
|
+
`));if(process.env.NODE_ENV!=="production"&&!c&&t){const u=o[l].dataKey;if(!u)throw new Error([`MUI X Charts: bar series with id='${l}' has no data and no dataKey.`,"You must provide a dataKey when using the dataset prop."].join(`
|
|
120
|
+
`));t.forEach((d,h)=>{const p=d[u];p!=null&&typeof p!="number"&&In([`MUI X Charts: your dataset key "${u}" is used for plotting bars, but the dataset contains the non-null non-numerical element "${p}" at index ${h}.`,"Bar plots only support numeric and null values."].join(`
|
|
121
|
+
`))})}});const i={};return s.forEach(l=>{const{ids:c,stackingOffset:u,stackingOrder:d}=l,h=c.map(b=>{const C=o[b].dataKey;return o[b].data===void 0&&C!==void 0?C:b}),p=da().keys(h).value((b,C)=>b[C]??0).order(d).offset(u)(a),f=p.map(b=>b.index),m=()=>f,y=da().keys(h).value((b,C)=>{const w=h.indexOf(C),T=c[w];return r!=null&&r({type:"bar",seriesId:T})?b[C]??0:0}).order(m).offset(u)(a);c.forEach((b,C)=>{const w=o[b].dataKey,T=w?t.map(O=>{const P=O[w];return typeof P=="number"?P:null}):o[b].data,A=!(r!=null&&r({type:"bar",seriesId:b}));i[b]=Q({layout:"vertical",labelMarkType:"square",minBarSize:0,valueFormatter:o[b].valueFormatter??zC},o[b],{data:T,hidden:A,stackedData:p[C],visibleStackedData:y[C]})})}),{seriesOrder:n,stackingGroups:s,series:i}};function ar(e,t){return typeof e=="function"?e(t):e}const HC=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>{const s=ar(r[o].label,"legend");return s===void 0||n.push({type:"bar",markType:r[o].labelMarkType,id:o,seriesId:o,color:r[o].color,label:s}),n},[])};function Kc(e){return e.colorGetter?e.colorGetter:()=>e.color}const qC=(e,t,r)=>{const n=e.layout==="vertical",o=n?t==null?void 0:t.colorScale:r==null?void 0:r.colorScale,s=n?r==null?void 0:r.colorScale:t==null?void 0:t.colorScale,a=n?t==null?void 0:t.data:r==null?void 0:r.data,i=Kc(e);return s?l=>{if(l===void 0)return e.color;const c=e.data[l],u=c===null?i({value:c,dataIndex:l}):s(c);return u===null?i({value:c,dataIndex:l}):u}:o&&a?l=>{if(l===void 0)return e.color;const c=a[l],u=c===null?i({value:c,dataIndex:l}):o(c);return u===null?i({value:c,dataIndex:l}):u}:l=>{if(l===void 0)return e.color;const c=e.data[l];return i({value:c,dataIndex:l})}};function af(e,t){return Object.keys(e).filter(r=>t.has(r)).flatMap(r=>{const n=e[r];return n.seriesOrder.filter(o=>n.series[o].data.length>0&&n.series[o].data.some(s=>s!=null)).map(o=>({type:r,seriesId:o}))})}function lf(e,t,r,n){const o=af(e,t);if(o.length===0)return null;const s=r!==void 0&&n!==void 0?o.findIndex(a=>a.type===r&&a.seriesId===n):-1;return s<=0?o[o.length-1]:o[(s-1+o.length)%o.length]}function cf(e,t){return Object.keys(e).filter(r=>t.has(r)).flatMap(r=>{const n=e[r];return n.seriesOrder.filter(o=>n.series[o].data.length>0&&n.series[o].data.some(s=>s!=null)).map(o=>n.series[o].data.length)}).reduce((r,n)=>Math.max(r,n),0)}function uf(e,t,r,n){const o=af(e,t);if(o.length===0)return null;const s=r!==void 0&&n!==void 0?o.findIndex(a=>a.type===r&&a.seriesId===n):-1;return o[(s+1)%o.length]}function df(e,t,r){var o,s;if(t==="sankey")return!1;const n=(s=(o=e[t])==null?void 0:o.series[r])==null?void 0:s.data;return n!=null&&n.length>0}function ei(e,t=!1){return function(n,o){const s=st(o);let a=n==null?void 0:n.seriesId,i=n==null?void 0:n.type;if(!i||a==null||!df(s,i,a)){const u=uf(s,e,i,a);if(u===null)return null;i=u.type,a=u.seriesId}const l=cf(s,e);let c=(n==null?void 0:n.dataIndex)==null?0:n.dataIndex+1;return t?c=c%l:c=Math.min(l-1,c),{type:i,seriesId:a,dataIndex:c}}}function ti(e,t=!1){return function(n,o){const s=st(o);let a=n==null?void 0:n.seriesId,i=n==null?void 0:n.type;if(!i||a==null||!df(s,i,a)){const u=lf(s,e,i,a);if(u===null)return null;i=u.type,a=u.seriesId}const l=cf(s,e);let c=(n==null?void 0:n.dataIndex)==null?l-1:n.dataIndex-1;return t?c=(l+c)%l:c=Math.max(0,c),{type:i,seriesId:a,dataIndex:c}}}function ri(e){return function(r,n){const o=st(n);let s=r==null?void 0:r.seriesId,a=r==null?void 0:r.type;const i=uf(o,e,a,s);if(i===null)return null;a=i.type,s=i.seriesId;const l=(r==null?void 0:r.dataIndex)==null?0:r.dataIndex;return{type:a,seriesId:s,dataIndex:l}}}function ni(e){return function(r,n){const o=st(n);let s=r==null?void 0:r.seriesId,a=r==null?void 0:r.type;const i=lf(o,e,a,s);if(i===null)return null;a=i.type,s=i.seriesId;const l=o[a].series[s].data,c=(r==null?void 0:r.dataIndex)==null?l.length-1:r.dataIndex;return{type:a,seriesId:s,dataIndex:c}}}const bs=new Set(["bar","line","scatter"]),WC=e=>{switch(e.key){case"ArrowRight":return ei(bs);case"ArrowLeft":return ti(bs);case"ArrowDown":return ni(bs);case"ArrowUp":return ri(bs);default:return null}},JC=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=ar(t.label,"tooltip"),s=t.data[n.dataIndex];if(s==null)return null;const a=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:s,formattedValue:a,markType:t.labelMarkType}},YC=e=>Object.values(e).map(t=>t.layout==="horizontal"?{direction:"y",axisId:t.yAxisId}:{direction:"x",axisId:t.xAxisId});function KC(e,t,r){if(r===0)return{barWidth:e/t,offset:0};const n=e/(t+(t-1)*r),o=r*n;return{barWidth:n,offset:o}}function QC(e,t,r){const n=e&&t>0,o=!e&&t<0,s=n||o;return r?!s:s}function XC(e){const{verticalLayout:t,xAxisConfig:r,yAxisConfig:n,series:o,dataIndex:s,numberOfGroups:a,groupIndex:i}=e,l=t?r:n,c=(t?n.reverse:r.reverse)??!1,{barWidth:u,offset:d}=KC(l.scale.bandwidth(),a,l.barGapRatio),h=i*(u+d),p=r.scale,f=n.scale,m=l.data[s],y=o.data[s];if(y==null)return null;const C=o.visibleStackedData[s].map(E=>t?f(E):p(E)),[w,T]=Io(C).map(E=>Math.round(E));let A=0;y!==0&&(o.hidden||(A=Math.max(o.minBarSize,T-w)));const O=QC(t,y,c);let P=0;return O?P=T-A:P=w,{x:t?p(m)+h:P,y:t?P:f(m)+h,height:t?A:u,width:t?u:A}}const ZC=e=>{var d;const{series:t,identifier:r,axesConfig:n,placement:o}=e;if(!r||r.dataIndex===void 0)return null;const s=(d=t.bar)==null?void 0:d.series[r.seriesId];if(t.bar==null||s==null||n.x===void 0||n.y===void 0)return null;const a=XC({verticalLayout:s.layout==="vertical",xAxisConfig:n.x,yAxisConfig:n.y,series:s,dataIndex:r.dataIndex,numberOfGroups:t.bar.stackingGroups.length,groupIndex:t.bar.stackingGroups.findIndex(h=>h.ids.includes(s.id))});if(a==null)return null;const{x:i,y:l,width:c,height:u}=a;switch(o){case"right":return{x:i+c,y:l+u/2};case"bottom":return{x:i+c/2,y:l+u};case"left":return{x:i,y:l+u/2};case"top":default:return{x:i+c/2,y:l}}};function eO(e,t,r){return Q({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??r[t%r.length]})}const tO=e=>`Type(${e})`,rO=e=>`Series(${e})`,nO=e=>e===void 0?"":`Index(${e})`,oi=e=>`${tO(e.type)}${rO(e.seriesId)}${nO(e.dataIndex)}`,oO={seriesProcessor:GC,colorProcessor:qC,legendGetter:HC,tooltipGetter:JC,tooltipItemPositionGetter:ZC,axisTooltipGetter:YC,xExtremumGetter:gC,yExtremumGetter:yC,getSeriesWithDefaultValues:eO,keyboardFocusHandler:WC,identifierSerializer:oi},sO=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:o}=e;let s=1/0,a=-1/0;for(const i in t){if(!Object.hasOwn(t,i))continue;const l=t[i].xAxisId;if(!(l===r.id||l===void 0&&n))continue;const c=o==null?void 0:o({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[i].xAxisId,seriesYAxisId:t[i].yAxisId}),u=t[i].data??[];for(let d=0;d<u.length;d+=1){const h=u[d];c&&!c(h,d)||h.x!==null&&(h.x<s&&(s=h.x),h.x>a&&(a=h.x))}}return[s,a]},aO=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:o}=e;let s=1/0,a=-1/0;for(const i in t){if(!Object.hasOwn(t,i))continue;const l=t[i].yAxisId;if(!(l===r.id||l===void 0&&n))continue;const c=o==null?void 0:o({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[i].xAxisId,seriesYAxisId:t[i].yAxisId}),u=t[i].data??[];for(let d=0;d<u.length;d+=1){const h=u[d];c&&!c(h,d)||h.y!==null&&(h.y<s&&(s=h.y),h.y>a&&(a=h.y))}}return[s,a]},iO=({series:e,seriesOrder:t},r,n)=>({series:Object.fromEntries(Object.entries(e).map(([s,a])=>{const i=a==null?void 0:a.datasetKeys,l=["x","y"].filter(u=>typeof(i==null?void 0:i[u])!="string");if(a!=null&&a.datasetKeys&&l.length>0)throw new Error([`MUI X Charts: scatter series with id='${s}' has incomplete datasetKeys.`,`Properties ${l.map(u=>`"${u}"`).join(", ")} are missing.`].join(`
|
|
122
|
+
`));const c=i?(r==null?void 0:r.map(u=>({x:u[i.x]??null,y:u[i.y]??null,z:i.z&&u[i.z],id:i.id&&u[i.id]})))??[]:a.data??[];return[s,Q({labelMarkType:"circle",markerSize:4},a,{preview:Q({markerSize:1},a==null?void 0:a.preview),data:c,hidden:!(n!=null&&n({type:"scatter",seriesId:s})),valueFormatter:a.valueFormatter??(u=>u&&`(${u.x}, ${u.y})`)})]})),seriesOrder:t}),lO=(e,t,r,n)=>{const o=n==null?void 0:n.colorScale,s=r==null?void 0:r.colorScale,a=t==null?void 0:t.colorScale,i=Kc(e);return o?l=>{var d,h;if(l===void 0)return e.color;if(((d=n==null?void 0:n.data)==null?void 0:d[l])!==void 0){const p=o((h=n==null?void 0:n.data)==null?void 0:h[l]);if(p!==null)return p}const c=e.data[l],u=c===null?i({value:c,dataIndex:l}):o(c.z);return u===null?i({value:c,dataIndex:l}):u}:s?l=>{if(l===void 0)return e.color;const c=e.data[l],u=c===null?i({value:c,dataIndex:l}):s(c.y);return u===null?i({value:c,dataIndex:l}):u}:a?l=>{if(l===void 0)return e.color;const c=e.data[l],u=c===null?i({value:c,dataIndex:l}):a(c.x);return u===null?i({value:c,dataIndex:l}):u}:l=>{if(l===void 0)return e.color;const c=e.data[l];return i({value:c,dataIndex:l})}},cO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>{const s=ar(r[o].label,"legend");return s===void 0||n.push({type:"scatter",markType:r[o].labelMarkType,id:o,seriesId:o,color:r[o].color,label:s}),n},[])},uO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=ar(t.label,"tooltip"),s=t.data[n.dataIndex],a=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:s,formattedValue:a,markType:t.labelMarkType}},dO=(e,t,r)=>Q({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??r[t%r.length]}),hO=e=>{var i,l,c;const{series:t,identifier:r,axesConfig:n}=e;if(!r||r.dataIndex===void 0)return null;const o=(i=t.scatter)==null?void 0:i.series[r.seriesId];if(o==null||n.x===void 0||n.y===void 0)return null;const s=(l=o.data)==null?void 0:l[r.dataIndex].x,a=(c=o.data)==null?void 0:c[r.dataIndex].y;return s==null||a==null?null:{x:n.x.scale(s),y:n.y.scale(a)}},xs=new Set(["bar","line","scatter"]),pO=e=>{switch(e.key){case"ArrowRight":return ei(xs);case"ArrowLeft":return ti(xs);case"ArrowDown":return ni(xs);case"ArrowUp":return ri(xs);default:return null}},mO={seriesProcessor:iO,colorProcessor:lO,legendGetter:cO,tooltipGetter:uO,tooltipItemPositionGetter:hO,xExtremumGetter:sO,yExtremumGetter:aO,getSeriesWithDefaultValues:dO,keyboardFocusHandler:pO,identifierSerializer:oi},fO=e=>{const{axis:t}=e;return Io(t.data??[])};function gO(e,t,r,n){return r.reduce((o,s,a)=>{if(t[a]===null)return o;const[i,l]=e(s);return n&&(!n({y:i,x:null},a)||!n({y:l,x:null},a))?o:[Math.min(i,l,o[0]),Math.max(i,l,o[1])]},[1/0,-1/0])}const yO=e=>{const{series:t,axis:r,isDefaultAxis:n,getFilters:o}=e;return Object.keys(t).filter(s=>{const a=t[s].yAxisId;return a===r.id||n&&a===void 0}).reduce((s,a)=>{const{area:i,stackedData:l,data:c}=t[a],u=i!==void 0,d=o==null?void 0:o({currentAxisId:r.id,isDefaultAxis:n,seriesXAxisId:t[a].xAxisId,seriesYAxisId:t[a].yAxisId}),h=u&&r.scaleType!=="log"&&typeof t[a].baseline!="string"?y=>y:y=>[y[1],y[1]],p=gO(h,c,l,d),[f,m]=p;return[Math.min(f,s[0]),Math.max(m,s[1])]},[1/0,-1/0])},bO=e=>e==null?"":e.toLocaleString(),xO=(e,t,r)=>{const{seriesOrder:n,series:o}=e,s=sf(Q({},e,{defaultStrategy:{stackOffset:"none"}})),a=t??[];n.forEach(l=>{const c=o[l].data;if(c!==void 0)c.forEach((u,d)=>{a.length<=d?a.push({[l]:u}):a[d][l]=u});else if(t===void 0&&process.env.NODE_ENV!=="production")throw new Error([`MUI X Charts: line series with id='${l}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
|
|
123
|
+
`));if(process.env.NODE_ENV!=="production"&&!c&&t){const u=o[l].dataKey;if(!u)throw new Error([`MUI X Charts: line series with id='${l}' has no data and no dataKey.`,"You must provide a dataKey when using the dataset prop."].join(`
|
|
124
|
+
`));t.forEach((d,h)=>{const p=d[u];p!=null&&typeof p!="number"&&In([`MUI X Charts: your dataset key "${u}" is used for plotting lines, but the dataset contains the non-null non-numerical element "${p}" at index ${h}.`,"Line plots only support numeric and null values."].join(`
|
|
125
|
+
`))})}});const i={};return s.forEach(l=>{const{ids:c,stackingOffset:u,stackingOrder:d}=l,h=c.map(b=>{const C=o[b].dataKey;return o[b].data===void 0&&C!==void 0?C:b}),p=da().keys(h).value((b,C)=>b[C]??0).order(d).offset(u)(a),f=p.map(b=>b.index),m=()=>f,y=da().keys(h).value((b,C)=>{const w=h.indexOf(C),T=c[w];return r!=null&&r({type:"line",seriesId:T})?b[C]??0:0}).order(m).offset(u)(a);c.forEach((b,C)=>{const w=o[b].dataKey,T=w?t.map(O=>{const P=O[w];return typeof P=="number"?P:null}):o[b].data,A=!(r!=null&&r({type:"line",seriesId:b}));i[b]=Q({labelMarkType:"line"},o[b],{data:T,valueFormatter:o[b].valueFormatter??bO,hidden:A,stackedData:p[C],visibleStackedData:y[C]})})}),{seriesOrder:n,stackingGroups:s,series:i}},vO=(e,t,r)=>{const n=r==null?void 0:r.colorScale,o=t==null?void 0:t.colorScale,s=Kc(e);return n?a=>{if(a===void 0)return e.color;const i=e.data[a],l=i===null?s({value:i,dataIndex:a}):n(i);return l===null?s({value:i,dataIndex:a}):l}:o?a=>{var c;if(a===void 0)return e.color;const i=(c=t.data)==null?void 0:c[a],l=i===null?s({value:i,dataIndex:a}):o(i);return l===null?s({value:i,dataIndex:a}):l}:a=>{if(a===void 0)return e.color;const i=e.data[a];return s({value:i,dataIndex:a})}},SO=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>{const s=ar(r[o].label,"legend");return s===void 0||n.push({type:"line",markType:r[o].labelMarkType,id:o,seriesId:o,color:r[o].color,label:s}),n},[])},wO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=ar(t.label,"tooltip"),s=t.data[n.dataIndex],a=t.valueFormatter(s,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:o,value:s,formattedValue:a,markType:t.labelMarkType}},CO=e=>Object.values(e).map(t=>({direction:"x",axisId:t.xAxisId})),OO=(e,t,r)=>Q({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??r[t%r.length]}),TO=e=>{var i,l;const{series:t,identifier:r,axesConfig:n}=e;if(!r||r.dataIndex===void 0)return null;const o=(i=t.line)==null?void 0:i.series[r.seriesId];if(o==null||n.x===void 0||n.y===void 0)return null;const s=(l=n.x.data)==null?void 0:l[r.dataIndex],a=o.data[r.dataIndex]==null?null:o.visibleStackedData[r.dataIndex][1];return s==null||a==null?null:{x:n.x.scale(s),y:n.y.scale(a)}},vs=new Set(["bar","line","scatter"]),PO=e=>{switch(e.key){case"ArrowRight":return ei(vs);case"ArrowLeft":return ti(vs);case"ArrowDown":return ni(vs);case"ArrowUp":return ri(vs);default:return null}},AO={colorProcessor:vO,seriesProcessor:xO,legendGetter:SO,tooltipGetter:wO,tooltipItemPositionGetter:TO,axisTooltipGetter:CO,xExtremumGetter:fO,yExtremumGetter:yO,getSeriesWithDefaultValues:OO,keyboardFocusHandler:PO,identifierSerializer:oi},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}},EO=(e,t,r)=>{const{seriesOrder:n,series:o}=e,s={};return n.forEach(a=>{const i=o[a].data.filter((u,d)=>r==null?void 0:r({type:"pie",seriesId:a,dataIndex:d})),l=MC().startAngle(Dr(o[a].startAngle??0)).endAngle(Dr(o[a].endAngle??360)).padAngle(Dr(o[a].paddingAngle??0)).sortValues(RO(o[a].sortingValues??"none"))(i.map(u=>u.value));let c=0;s[a]=Q({labelMarkType:"circle",valueFormatter:u=>u.value.toLocaleString()},o[a],{data:o[a].data.map((u,d)=>{var y,b;const h=u.id??`auto-generated-pie-id-${a}-${d}`,p=!(r!=null&&r({type:"pie",seriesId:a,dataIndex:d}));let f;if(p){const C=c>0?l[c-1].endAngle:Dr(o[a].startAngle??0);f={startAngle:C,endAngle:C,padAngle:0,value:u.value,index:d}}else f=l[c],c+=1;const m=Q({},u,{id:h,hidden:p},f);return Q({labelMarkType:"circle"},m,{formattedValue:((b=(y=o[a]).valueFormatter)==null?void 0:b.call(y,Q({},m,{label:ar(m.label,"arc")}),{dataIndex:d}))??m.value.toLocaleString()})})})}),{seriesOrder:n,series:s}},IO=e=>t=>e.data[t].color,_O=e=>{const{seriesOrder:t,series:r}=e;return t.reduce((n,o)=>(r[o].data.forEach((s,a)=>{const i=ar(s.label,"legend");if(i===void 0)return;const l=s.id??a;n.push({type:"pie",markType:s.labelMarkType??r[o].labelMarkType,seriesId:o,id:l,itemId:l,dataIndex:a,color:s.color,label:i})}),n),[])},MO=e=>{const{series:t,getColor:r,identifier:n}=e;if(!n||n.dataIndex===void 0)return null;const o=t.data[n.dataIndex];if(o==null)return null;const s=ar(o.label,"tooltip"),a=Q({},o,{label:s}),i=t.valueFormatter(a,{dataIndex:n.dataIndex});return{identifier:n,color:r(n.dataIndex),label:s,value:a,formattedValue:i,markType:o.labelMarkType??t.labelMarkType}};function Nt(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 VO(e,t){const{height:r,width:n}=t,{cx:o,cy:s}=e,a=Math.min(n,r)/2,i=Nt(o??"50%",n),l=Nt(s??"50%",r);return{cx:i,cy:l,availableRadius:a}}const kO=(e,t)=>{const r={};for(const n of e.seriesOrder){const{innerRadius:o,outerRadius:s,arcLabelRadius:a,cx:i,cy:l}=e.series[n],{cx:c,cy:u,availableRadius:d}=VO({cx:i,cy:l},{width:t.width,height:t.height}),h=Nt(s??d,d),p=Nt(o??0,d),f=a===void 0?(p+h)/2:Nt(a,d);r[n]={radius:{available:d,inner:p,outer:h,label:f},center:{x:t.left+c,y:t.top+u}}}return r},jO=(e,t,r)=>Q({},e,{id:e.id??`auto-generated-id-${t}`,data:e.data.map((n,o)=>Q({},n,{color:n.color??r[o%r.length]}))}),$O=e=>{var y,b;const{series:t,identifier:r,placement:n,seriesLayout:o}=e;if(!r||r.dataIndex===void 0)return null;const s=(y=t.pie)==null?void 0:y.series[r.seriesId],a=(b=o.pie)==null?void 0:b[r.seriesId];if(s==null||a==null)return null;const{center:i,radius:l}=a,{data:c}=s,u=c[r.dataIndex];if(!u)return null;const d=[[l.inner,u.startAngle],[l.inner,u.endAngle],[l.outer,u.startAngle],[l.outer,u.endAngle]].map(([C,w])=>({x:i.x+C*Math.sin(w),y:i.y-C*Math.cos(w)})),[h,p]=Io(d.map(C=>C.x)),[f,m]=Io(d.map(C=>C.y));switch(n){case"bottom":return{x:(p+h)/2,y:m};case"left":return{x:h,y:(m+f)/2};case"right":return{x:p,y:(m+f)/2};case"top":default:return{x:(p+h)/2,y:f}}},Ss=new Set(["pie"]),DO=e=>{switch(e.key){case"ArrowRight":return ei(Ss);case"ArrowLeft":return ti(Ss);case"ArrowDown":return ni(Ss);case"ArrowUp":return ri(Ss);default:return null}},UO={colorProcessor:IO,seriesProcessor:EO,seriesLayout:kO,legendGetter:_O,tooltipGetter:MO,tooltipItemPositionGetter:$O,getSeriesWithDefaultValues:jO,keyboardFocusHandler:DO,identifierSerializer:oi},LO={bar:oO,scatter:mO,line:AO,pie:UO},BO=[Jc,Wc,qc,Za,Yc];function FO(e){const{children:t,plugins:r=BO,pluginParams:n={},seriesConfig:o=LO}=e,{contextValue:s}=zv(r,n,o);return g.jsx(Sc.Provider,{value:s,children:t})}const Qc=()=>{const e=F.useContext(Sc);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(`
|
|
126
|
+
`));return e};function Fn(){const e=Qc();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(`
|
|
127
|
+
`));return e.store}function hf(){return Fn().use(Jt)}function pf(){return Fn().use(gv)}function NO(){const e=Fn(),{axis:t,axisIds:r}=e.use(Rr);return{xAxis:t,xAxisIds:r}}function zO(){const e=Fn(),{axis:t,axisIds:r}=e.use(Er);return{yAxis:t,yAxisIds:r}}function GO(){const e=Fn(),{axis:t,axisIds:r}=e.use(fC)??{axis:{},axisIds:[]};return{zAxis:t,zAxisIds:r}}function HO(){const e=Qc();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(`
|
|
128
|
+
`));return e.svgRef}function qO(){const e=pf();return F.useCallback(t=>`${e}-gradient-${t}`,[e])}function WO(){const e=pf();return F.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}var Yi,Zd;function JO(){if(Zd)return Yi;Zd=1;var e=4,t=.001,r=1e-7,n=10,o=11,s=1/(o-1),a=typeof Float32Array=="function";function i(m,y){return 1-3*y+3*m}function l(m,y){return 3*y-6*m}function c(m){return 3*m}function u(m,y,b){return((i(y,b)*m+l(y,b))*m+c(y))*m}function d(m,y,b){return 3*i(y,b)*m*m+2*l(y,b)*m+c(y)}function h(m,y,b,C,w){var T,A,O=0;do A=y+(b-y)/2,T=u(A,C,w)-m,T>0?b=A:y=A;while(Math.abs(T)>r&&++O<n);return A}function p(m,y,b,C){for(var w=0;w<e;++w){var T=d(y,b,C);if(T===0)return y;var A=u(y,b,C)-m;y-=A/T}return y}function f(m){return m}return Yi=function(y,b,C,w){if(!(0<=y&&y<=1&&0<=C&&C<=1))throw new Error("bezier x values must be in [0, 1] range");if(y===b&&C===w)return f;for(var T=a?new Float32Array(o):new Array(o),A=0;A<o;++A)T[A]=u(A*s,y,C);function O(P){for(var E=0,_=1,x=o-1;_!==x&&T[_]<=P;++_)E+=s;--_;var N=(P-T[_])/(T[_+1]-T[_]),M=E+N*s,H=d(M,y,C);return H>=t?p(P,M,y,C):H===0?M:h(P,E,E+s,y,C)}return function(E){return E===0?0:E===1?1:u(O(E),b,w)}},Yi}var YO=JO();const KO=gy(YO),QO=300,XO=KO(.66,0,.34,1);var Dn=0,fo=0,ro=0,mf=1e3,ha,go,pa=0,Gr=0,si=0,Mo=typeof performance=="object"&&performance.now?performance:Date,ff=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Xc(){return Gr||(ff(ZO),Gr=Mo.now()+si)}function ZO(){Gr=0}function ma(){this._call=this._time=this._next=null}ma.prototype=gf.prototype={constructor:ma,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Xc():+r)+(t==null?0:+t),!this._next&&go!==this&&(go?go._next=this:ha=this,go=this),this._call=e,this._time=r,_l()},stop:function(){this._call&&(this._call=null,this._time=1/0,_l())}};function gf(e,t,r){var n=new ma;return n.restart(e,t,r),n}function eT(){Xc(),++Dn;for(var e=ha,t;e;)(t=Gr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Dn}function eh(){Gr=(pa=Mo.now())+si,Dn=fo=0;try{eT()}finally{Dn=0,rT(),Gr=0}}function tT(){var e=Mo.now(),t=e-pa;t>mf&&(si-=t,pa=e)}function rT(){for(var e,t=ha,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:ha=r);go=e,_l(n)}function _l(e){if(!Dn){fo&&(fo=clearTimeout(fo));var t=e-Gr;t>24?(e<1/0&&(fo=setTimeout(eh,e-Mo.now()-si)),ro&&(ro=clearInterval(ro))):(ro||(pa=Mo.now(),ro=setInterval(tT,mf)),Dn=1,ff(eh))}}function nT(e,t,r){var n=new ma;return t=t==null?0:+t,n.restart(o=>{n.stop(),e(o+t)},t,r),n}class oT{constructor(t,r,n){oe(this,"elapsed",0);oe(this,"timer",null);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=Xc()-this.elapsed;return this.timer=gf(r=>this.timerCallback(r),0,t),this}stop(){return this.running?(this.timer&&(this.timer.stop(),this.timer=null),this):this}finish(){return this.stop(),nT(()=>this.timerCallback(this.duration)),this}}function sT(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 o=0;o<r.length;o+=1){const s=r[o];if(!Object.prototype.hasOwnProperty.call(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function aT(e,{createInterpolator:t,applyProps:r,skip:n,initialProps:o=e}){const s=F.useRef(o),a=F.useRef(null),i=F.useRef(null),l=F.useRef(e);kt(()=>{l.current=e},[e]),kt(()=>{var d;n&&((d=a.current)==null||d.finish(),a.current=null,i.current=null,s.current=e)},[e,n]);const c=F.useCallback(d=>{const h=s.current,p=t(h,e);a.current=new oT(QO,XO,f=>{const m=p(f);s.current=m,r(d,m)})},[r,t,e]);return[F.useCallback(d=>{var p,f,m,y;if(d===null){(p=a.current)==null||p.stop();return}const h=i.current;if(h===d){if(sT(l.current,e)){(f=a.current)==null||f.resume();return}(m=a.current)==null||m.stop()}h&&((y=a.current)==null||y.stop()),i.current=d,(a.current||!n)&&c(d)},[c,e,n]),s.current]}function iT(e,{createInterpolator:t,transformProps:r,applyProps:n,skip:o,initialProps:s=e,ref:a}){const i=r??(d=>d),[l,c]=aT(e,{initialProps:s,createInterpolator:t,applyProps:(d,h)=>n(d,i(h)),skip:o}),u=r(o?e:c);return Q({},u,{ref:ja(l,a)})}function th(e){const{isReversed:t,gradientId:r,size:n,direction:o,scale:s,colorMap:a}=e;return n<=0?null:g.jsx("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${o}${t?1:2}`]:`${n}px`,gradientUnits:"userSpaceOnUse",children:a.thresholds.map((i,l)=>{const c=s(i);if(c===void 0)return null;const u=t?1-c/n:c/n;return Number.isNaN(u)?null:g.jsxs(F.Fragment,{children:[g.jsx("stop",{offset:u,stopColor:a.colors[l],stopOpacity:1}),g.jsx("stop",{offset:u,stopColor:a.colors[l+1],stopOpacity:1})]},i.toString()+l)})})}const lT=10;function rh(e){const{gradientUnits:t,isReversed:r,gradientId:n,size:o,direction:s,scale:a,colorScale:i,colorMap:l}=e,c=[l.min??0,l.max??100],u=c.map(a).filter(f=>f!==void 0);if(u.length!==2)return null;const d=typeof c[0]=="number"?_t(c[0],c[1]):Ac(c[0],c[1]),h=Math.round((Math.max(...u)-Math.min(...u))/lT),p=`${c[0]}-${c[1]}-`;return g.jsx("linearGradient",{id:n,x1:"0",x2:"0",y1:"0",y2:"0",[`${s}${r?1:2}`]:t==="objectBoundingBox"?1:`${o}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:h+1},(f,m)=>{const y=d(m/h);if(y===void 0)return null;const b=a(y);if(b===void 0)return null;const C=r?1-b/o:b/o,w=i(y);return w===null?null:g.jsx("stop",{offset:C,stopColor:w,stopOpacity:1},p+m)})})}const cT=10,uT=e=>e?{x1:"1",x2:"0",y1:"0",y2:"0"}:{x1:"0",x2:"1",y1:"0",y2:"0"};function Ki(e){const{isReversed:t,gradientId:r,colorScale:n,colorMap:o}=e,s=[o.min??0,o.max??100],a=typeof s[0]=="number"?_t(s[0],s[1]):Ac(s[0],s[1]),i=cT,l=`${s[0]}-${s[1]}-`;return g.jsx("linearGradient",Q({id:r},uT(t),{gradientUnits:"objectBoundingBox",children:Array.from({length:i+1},(c,u)=>{const d=u/i,h=a(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 dT(){const{top:e,height:t,bottom:r,left:n,width:o,right:s}=hf(),a=e+t+r,i=n+o+s,l=qO(),c=WO(),{xAxis:u,xAxisIds:d}=NO(),{yAxis:h,yAxisIds:p}=zO(),{zAxis:f,zAxisIds:m}=GO(),y=p.filter(w=>h[w].colorMap!==void 0),b=d.filter(w=>u[w].colorMap!==void 0),C=m.filter(w=>f[w].colorMap!==void 0);return y.length===0&&b.length===0&&C.length===0?null:g.jsxs("defs",{children:[y.map(w=>{const T=l(w),A=c(w),{colorMap:O,scale:P,colorScale:E,reverse:_}=h[w];return(O==null?void 0:O.type)==="piecewise"?g.jsx(th,{isReversed:!_,scale:P,colorMap:O,size:a,gradientId:T,direction:"y"},T):(O==null?void 0:O.type)==="continuous"?g.jsxs(F.Fragment,{children:[g.jsx(rh,{isReversed:!_,scale:P,colorScale:E,colorMap:O,size:a,gradientId:T,direction:"y"}),g.jsx(Ki,{isReversed:_,colorScale:E,colorMap:O,gradientId:A})]},T):null}),b.map(w=>{const T=l(w),A=c(w),{colorMap:O,scale:P,reverse:E,colorScale:_}=u[w];return(O==null?void 0:O.type)==="piecewise"?g.jsx(th,{isReversed:E,scale:P,colorMap:O,size:i,gradientId:T,direction:"x"},T):(O==null?void 0:O.type)==="continuous"?g.jsxs(F.Fragment,{children:[g.jsx(rh,{isReversed:E,scale:P,colorScale:_,colorMap:O,size:i,gradientId:T,direction:"x"}),g.jsx(Ki,{isReversed:E,colorScale:_,colorMap:O,gradientId:A})]},T):null}),C.map(w=>{const T=c(w),{colorMap:A,colorScale:O}=f[w];return(A==null?void 0:A.type)==="continuous"?g.jsx(Ki,{colorScale:O,colorMap:A,gradientId:T},T):null})]})}function hT(e){return Yr("MuiChartsSurface",e)}const pT=()=>Lo({root:["root"]},hT);Va("MuiChartsSurface",["root"]);const mT=["children","className","title","desc"],fT=xt("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",gridArea:"chart","&:focus":{outline:"none"}})),Zc=F.forwardRef(function(t,r){const{store:n,instance:o}=Qc(),s=n.use(lv),a=n.use(cv),i=n.use(uv),l=n.use(dv),c=n.use(pC),u=n.use(hC),d=HO(),h=ja(d,r),p=sx({props:t,name:"MuiChartsSurface"}),{children:f,className:m,title:y,desc:b}=p,C=qt(p,mT),w=pT(),T=a>0&&s>0;return g.jsxs(fT,Q({ownerState:{width:i,height:l},viewBox:`0 0 ${s} ${a}`,className:nt(w.root,m),tabIndex:c?0:void 0,"data-has-focused-item":u||void 0},C,{onPointerEnter:A=>{var O,P;(O=C.onPointerEnter)==null||O.call(C,A),(P=o.handlePointerEnter)==null||P.call(o,A)},onPointerLeave:A=>{var O,P;(O=C.onPointerLeave)==null||O.call(C,A),(P=o.handlePointerLeave)==null||P.call(o,A)},onClick:A=>{var O,P;(O=C.onClick)==null||O.call(C,A),(P=o.handleClick)==null||P.call(o,A)},ref:h,children:[y&&g.jsx("title",{children:y}),b&&g.jsx("desc",{children:b}),g.jsx(dT,{}),T&&f]}))});process.env.NODE_ENV!=="production"&&(Zc.displayName="ChartsSurface");process.env.NODE_ENV!=="production"&&(Zc.propTypes={children:v.node,className:v.string,desc:v.string,sx:v.oneOfType([v.arrayOf(v.oneOfType([v.func,v.object,v.bool])),v.func,v.object]),title:v.string});function Qi(e){const t=Dr(e);return[Math.sin(t),-Math.cos(t)]}function gT(e,t){const r=[[0,0],Qi(e),Qi(t)],n=Math.min(e,t),o=Math.max(e,t),s=Math.floor(n/90)*90;for(let u=1;u<=4;u+=1){const d=s+u*90;d<o&&r.push(Qi(d))}const a=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:-a/(i-a),cy:-l/(c-l),minX:a,maxX:i,minY:l,maxY:c}}function yT(e,t,r,n,{minX:o,maxX:s,minY:a,maxY:i}){return Math.min(...[{ratio:Math.abs(o),space:e},{ratio:Math.abs(s),space:r-e},{ratio:Math.abs(a),space:t},{ratio:Math.abs(i),space:n-t}].map(({ratio:l,space:c})=>l<1e-5?1/0:c/l))}const eu=F.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"&&(eu.displayName="GaugeContext");function bT(e){const{value:t=null,valueMin:r=0,valueMax:n=100,startAngle:o=0,endAngle:s=360,outerRadius:a,innerRadius:i,cornerRadius:l,cx:c,cy:u,children:d}=e,{left:h,top:p,width:f,height:m}=hf(),y=gT(o,s),b=c?Nt(c,f):y.cx*f,C=u?Nt(u,m):y.cy*m;let w=h+b,T=p+C;const A=yT(b,C,f,m,y);if(c===void 0){const x=A*(y.maxX-y.minX);w=h+(f-x)/2+y.cx*x}if(u===void 0){const x=A*(y.maxY-y.minY);T=p+(m-x)/2+y.cy*x}const O=Nt(a??A,A),P=Nt(i??"80%",A),E=Nt(l??0,O-P),_=F.useMemo(()=>{const x=Dr(o),N=Dr(s);return{value:t,valueMin:r,valueMax:n,startAngle:x,endAngle:N,outerRadius:O,innerRadius:P,cornerRadius:E,cx:w,cy:T,maxRadius:A,valueAngle:t===null?null:x+(N-x)*(t-r)/(n-r)}},[t,r,n,o,s,O,P,E,w,T,A]);return g.jsx(eu.Provider,{value:_,children:d})}function tu(){return F.useContext(eu)}const xT=["width","height","margin","title","desc","value","valueMin","valueMax","startAngle","endAngle","outerRadius","innerRadius","cornerRadius","cx","cy","children"],vT=xt("g",{slot:"internal",shouldForwardProp:void 0})(({theme:e})=>({"& text":{fill:(e.vars||e).palette.text.primary}})),ru=F.forwardRef(function(t,r){const{width:n,height:o,margin:s,title:a,desc:i,value:l,valueMin:c=0,valueMax:u=100,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:y,cy:b,children:C}=t,w=qt(t,xT);return g.jsx(FO,{pluginParams:{width:n,height:o,margin:Xp(s,{left:10,right:10,top:10,bottom:10})},plugins:[],children:g.jsx(bT,{value:l,valueMin:c,valueMax:u,startAngle:d,endAngle:h,outerRadius:p,innerRadius:f,cornerRadius:m,cx:y,cy:b,children:g.jsx(Zc,Q({title:a,desc:i,role:"meter","aria-valuenow":l===null?void 0:l,"aria-valuemin":c,"aria-valuemax":u},w,{ref:r,children:g.jsx(vT,{"aria-hidden":"true",children:C})}))})})});process.env.NODE_ENV!=="production"&&(ru.displayName="GaugeContainer");process.env.NODE_ENV!=="production"&&(ru.propTypes={children:v.node,className:v.string,cornerRadius:v.oneOfType([v.number,v.string]),cx:v.oneOfType([v.number,v.string]),cy:v.oneOfType([v.number,v.string]),desc:v.string,endAngle:v.number,height:v.number,id:v.string,innerRadius:v.oneOfType([v.number,v.string]),margin:v.oneOfType([v.number,v.shape({bottom:v.number,left:v.number,right:v.number,top:v.number})]),outerRadius:v.oneOfType([v.number,v.string]),skipAnimation:v.bool,startAngle:v.number,sx:v.oneOfType([v.arrayOf(v.oneOfType([v.func,v.object,v.bool])),v.func,v.object]),title:v.string,value:v.number,valueMax:v.number,valueMin:v.number,width:v.number});function ST(e){const r=Fn().use(Yx);return e||r}function wT(e,t){const r=_t(e.startAngle,t.startAngle),n=_t(e.endAngle,t.endAngle),o=_t(e.innerRadius,t.innerRadius),s=_t(e.outerRadius,t.outerRadius),a=_t(e.cornerRadius,t.cornerRadius);return i=>({startAngle:r(i),endAngle:n(i),innerRadius:o(i),outerRadius:s(i),cornerRadius:a(i)})}function CT(e){return iT({startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:e.innerRadius,outerRadius:e.outerRadius,cornerRadius:e.cornerRadius},{createInterpolator:wT,transformProps:t=>({d:ef().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})}function OT(e){return Yr("MuiGauge",e)}const nu=Va("MuiGauge",["root","valueArc","referenceArc","valueText"]),TT=["className"],PT=["cx","cy","startAngle","endAngle","cornerRadius","innerRadius","outerRadius","skipAnimation"],AT=xt("path",{name:"MuiGauge",slot:"ValueArc"})(({theme:e})=>({fill:(e.vars||e).palette.primary.main}));function yf(e){let{className:t}=e,r=qt(e,TT);const{value:n,valueMin:o,valueMax:s,startAngle:a,endAngle:i,outerRadius:l,innerRadius:c,cornerRadius:u,cx:d,cy:h}=tu();if(n===null)return null;const p=a+(n-o)/(s-o)*(i-a);return g.jsx(bf,Q({},r,{className:nt(nu.valueArc,t),cx:d,cy:h,startAngle:a,endAngle:p,cornerRadius:u,innerRadius:c,outerRadius:l}))}process.env.NODE_ENV!=="production"&&(yf.propTypes={skipAnimation:v.bool});function bf(e){let{cx:t,cy:r,startAngle:n,endAngle:o,cornerRadius:s,innerRadius:a,outerRadius:i,skipAnimation:l}=e,c=qt(e,PT);const u=ST(l),d=CT({startAngle:n,endAngle:o,cornerRadius:s,innerRadius:a,outerRadius:i,skipAnimation:u});return g.jsx(AT,Q({},d,{transform:`translate(${t}, ${r})`},c))}process.env.NODE_ENV!=="production"&&(bf.propTypes={cornerRadius:v.number.isRequired,cx:v.number.isRequired,cy:v.number.isRequired,endAngle:v.number.isRequired,innerRadius:v.number.isRequired,outerRadius:v.number.isRequired,skipAnimation:v.bool,startAngle:v.number.isRequired});const RT=["className"],ET=xt("path",{name:"MuiGauge",slot:"ReferenceArc"})(({theme:e})=>({fill:(e.vars||e).palette.divider}));function IT(e){let{className:t}=e,r=qt(e,RT);const{startAngle:n,endAngle:o,outerRadius:s,innerRadius:a,cornerRadius:i,cx:l,cy:c}=tu();return g.jsx(ET,Q({className:nt(nu.referenceArc,t),transform:`translate(${l}, ${c})`,d:ef().cornerRadius(i)({startAngle:n,endAngle:o,innerRadius:a,outerRadius:s})},r))}function _T(){return typeof window>"u"}const ws=new Map,MT=2e3,VT=new Set(["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"]);function xf(e,t){return VT.has(e)&&t===+t?`${t}px`:t}const kT=/([A-Z])/g;function vf(e){return String(e).replace(kT,t=>`-${t.toLowerCase()}`)}function jT(e){let t="";for(const r in e)if(Object.hasOwn(e,r)){const n=r,o=e[n];if(o===void 0)continue;t+=`${vf(n)}:${xf(n,o)};`}return t}const $T=(e,t={})=>{if(e==null||_T())return{width:0,height:0};const r=String(e),n=jT(t),o=`${r}-${n}`,s=ws.get(o);if(s)return s;try{const a=UT(),i=document.createElementNS("http://www.w3.org/2000/svg","text");Object.keys(t).map(c=>(i.style[vf(c)]=xf(c,t[c]),c)),i.textContent=r,a.replaceChildren(i);const l=DT(i);return ws.set(o,l),ws.size+1>MT&&ws.clear(),process.env.NODE_ENV==="test"&&a.replaceChildren(),l}catch{return{width:0,height:0}}};function DT(e){try{const t=e.getBBox();return{width:t.width,height:t.height}}catch{const t=e.getBoundingClientRect();return{width:t.width,height:t.height}}}let it=null;function UT(){return it===null&&(it=document.createElementNS("http://www.w3.org/2000/svg","svg"),it.setAttribute("aria-hidden","true"),it.style.position="absolute",it.style.top="-20000px",it.style.left="0",it.style.padding="0",it.style.margin="0",it.style.border="none",it.style.pointerEvents="none",it.style.visibility="hidden",it.style.contain="strict",document.body.appendChild(it)),it}function LT({style:e,needsComputation:t,text:r}){return r.split(`
|
|
129
|
+
`).map(n=>Q({text:n},t?$T(n,e):{width:0,height:0}))}function BT(){const[e,t]=F.useState(!1);return F.useEffect(()=>{t(!0)},[]),e}const FT=["x","y","style","text","ownerState"],NT=["angle","textAnchor","dominantBaseline"];function Sf(e){const{x:t,y:r,style:n,text:o}=e,s=qt(e,FT),a=n??{},{angle:i,textAnchor:l,dominantBaseline:c}=a,u=qt(a,NT),d=BT(),h=F.useMemo(()=>LT({style:u,needsComputation:d&&o.includes(`
|
|
130
|
+
`),text:o}),[u,o,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",Q({},s,{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"&&(Sf.propTypes={lineHeight:v.number,needsComputation:v.bool,ownerState:v.any,style:v.object,text:v.string.isRequired});const zT=["text","className"];function GT({value:e}){return e===null?null:e.toLocaleString()}function wf(e){const{text:t=GT,className:r}=e,n=qt(e,zT),{value:o,valueMin:s,valueMax:a,cx:i,cy:l}=tu(),c=typeof t=="function"?t({value:o,valueMin:s,valueMax:a}):t;return c===null?null:g.jsx("g",{className:nt(nu.valueText,r),children:g.jsx(Sf,Q({x:i,y:l,text:c,style:{textAnchor:"middle",dominantBaseline:"central"}},n))})}process.env.NODE_ENV!=="production"&&(wf.propTypes={lineHeight:v.number,needsComputation:v.bool,ownerState:v.any,style:v.object,text:v.oneOfType([v.func,v.string])});const HT=["text","children","classes","className","skipAnimation"],qT=e=>{const{classes:t}=e;return Lo({root:["root"]},OT,t)},ou=F.forwardRef(function(t,r){const{text:n,children:o,className:s,skipAnimation:a}=t,i=qt(t,HT),l=qT(t);return g.jsxs(ru,Q({},i,{className:nt(l.root,s),ref:r,children:[g.jsx(IT,{}),g.jsx(yf,{skipAnimation:a}),g.jsx(wf,{text:n}),o]}))});process.env.NODE_ENV!=="production"&&(ou.displayName="Gauge");process.env.NODE_ENV!=="production"&&(ou.propTypes={children:v.node,classes:v.object,className:v.string,cornerRadius:v.oneOfType([v.number,v.string]),cx:v.oneOfType([v.number,v.string]),cy:v.oneOfType([v.number,v.string]),desc:v.string,endAngle:v.number,height:v.number,id:v.string,innerRadius:v.oneOfType([v.number,v.string]),margin:v.oneOfType([v.number,v.shape({bottom:v.number,left:v.number,right:v.number,top:v.number})]),outerRadius:v.oneOfType([v.number,v.string]),skipAnimation:v.bool,startAngle:v.number,sx:v.oneOfType([v.arrayOf(v.oneOfType([v.func,v.object,v.bool])),v.func,v.object]),text:v.oneOfType([v.func,v.string]),title:v.string,value:v.number,valueMax:v.number,valueMin:v.number,width:v.number});const WT=e=>{const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),o=e%60,s=[];return t>0?(s.push(t.toString()),s.push(r.toString().padStart(2,"0")),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):r>0?(s.push(r.toString()),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):(s.push(n.toString()),s.push(o.toString().padStart(2,"0"))),s.join(":")},Bt=(e,t)=>{const r=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60),s=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const i={};return r>0&&(i.days=r),n>0&&(i.hours=n),o>0&&(i.minutes=o),(s>0||Object.keys(i).length===0)&&(i.seconds=s),new Intl.DurationFormat(t,{style:"narrow"}).format(i)}catch{}const a=[];return r>0&&a.push(`${r}d`),n>0&&a.push(`${n}h`),o>0&&a.push(`${o}m`),(s>0||a.length===0)&&a.push(`${s}s`),a.join(" ")},JT=(e,t,r)=>e==="countdown"&&r!==null?Math.min(100,t/r*100):e==="measuring"?t/60%1*100:0,YT=({timerState:e,animationState:t,hasError:r,className:n})=>{const{t:o,i18n:s}=we.useTranslation(),a=R.useTheme(),{currentState:i,remainingTime:l,maxTime:c,currentProgress:u}=e,{showErrorAnimation:d,showPauseAnimation:h,showPulsatingText:p,pulsatingFinished:f,showLabels:m,showMainText:y,showIdlePulsating:b,idleDotsCount:C}=t;return g.jsxs(R.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(ou,{width:264,height:264,value:i==="idle"?0:u,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:h||d?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:r?a.palette.error.light:a.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),g.jsxs(R.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:[g.jsx(R.Box,{sx:{height:"16px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:1},children:g.jsx(R.Fade,{in:m&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(R.Typography,{variant:"body2",sx:{fontSize:"12px",color:i==="measured"&&(p||f)?a.palette.success.main:a.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:i==="measured"&&f?p?1:.6:1,transition:"opacity 2s ease-in-out"},children:i==="measuring"||i==="measured"?o("CycleTimer.CycleTime.lb","Cycle Time"):i==="countdown"?o("CycleTimer.RemainingTime.lb","Remaining Time"):""})})})}),g.jsxs(R.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(R.Fade,{in:y&&i==="idle"&&!r,timeout:200,children:g.jsxs(R.Typography,{variant:"body2",sx:{position:"absolute",fontSize:"12px",fontWeight:400,color:"rgba(255, 255, 255, 0.7)",lineHeight:"166%",letterSpacing:"0.17px",textAlign:"center",width:"200px",height:"20px",display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx("span",{style:{opacity:b?1:.6,transition:"opacity 2s ease-in-out"},children:o("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left",opacity:b?1:.6,transition:"opacity 2s ease-in-out"},children:".".repeat(C)})]})}),g.jsx(R.Fade,{in:y&&r,timeout:200,children:g.jsx(R.Typography,{variant:"h3",sx:{position:"absolute",fontSize:"40px",fontWeight:400,color:"#FFFFFF",lineHeight:"116.7%"},children:o("CycleTimer.Error.lb","Error")})}),g.jsx(R.Fade,{in:y&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(R.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:a.palette.text.primary,lineHeight:1,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:1,transition:"opacity 2s ease-in-out"},children:WT(l)})})})]}),g.jsx(R.Box,{sx:{height:"16px",display:"flex",marginTop:.5,alignItems:"center",justifyContent:"center"},children:g.jsx(R.Fade,{in:m&&!r&&i!=="idle"&&i!=="success",timeout:300,children:g.jsx(R.Typography,{variant:"body2",sx:{fontSize:"12px",color:i==="measured"&&(p||f)?a.palette.success.main:a.palette.text.secondary,transition:"color 0.8s ease-in-out"},children:g.jsx("span",{style:{opacity:i==="measured"&&f?p?1:.6:1,transition:"opacity 2s ease-in-out"},children:i==="measuring"?o("CycleTimer.Measuring.lb","measuring..."):i==="measured"?o("CycleTimer.Determined.lb","determined"):i==="countdown"&&c!==null?o("CycleTimer.OfTime.lb",{time:Bt(c,s.language)}):""})})})})]})]})},KT=({timerState:e,animationState:t,hasError:r,compact:n,className:o})=>{const{t:s,i18n:a}=we.useTranslation(),i=R.useTheme(),{currentState:l,remainingTime:c,maxTime:u}=e,{showErrorAnimation:d,showPauseAnimation:h,showPulsatingText:p,pulsatingFinished:f,showIdlePulsating:m,idleDotsCount:y}=t;return n&&l==="idle"?g.jsx(R.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0},children:g.jsx(R.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:r?s("CycleTimer.Error.lb","Error"):l==="idle"?"0s":Bt(c,a.language)})}):g.jsxs(R.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[!(l==="idle"&&n)&&g.jsx(R.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:h||d?.6:1,transition:"opacity 0.5s ease-out"},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:r?i.palette.error.light:l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.success.main,strokeWidth:"2",opacity:l==="measured"&&f?p?1:.6:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-(l==="idle"?0:e.currentProgress)/100)}`,style:{opacity:l==="measured"&&f?p?1:.6:1,transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsx(R.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:l==="idle"?"rgba(255, 255, 255, 0.7)":l==="measured"?p||f?i.palette.success.main:i.palette.text.secondary:i.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",opacity:l==="idle"?m?1:.6:l==="measured"&&f?p?1:.6:1,transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:r?s("CycleTimer.Error.lb","Error"):l==="idle"?g.jsxs(g.Fragment,{children:[g.jsx("span",{children:s("CycleTimer.WaitingForCycle.lb","Waiting for program cycle")}),g.jsx("span",{style:{display:"inline-block",width:"18px",textAlign:"left"},children:".".repeat(y)})]}):l==="measuring"?n?Bt(c,a.language):`${Bt(c,a.language)} / ${s("CycleTimer.Measuring.lb","measuring...")}`:l==="measured"?n?Bt(c,a.language):`${Bt(c,a.language)} / ${s("CycleTimer.Determined.lb","determined")}`:l==="countdown"&&u!==null?n?Bt(c,a.language):`${Bt(c,a.language)} / ${s("CycleTimer.Time.lb",{time:Bt(u,a.language)})}`:Bt(c,a.language)})]})},QT=()=>{const[e,t]=G.useState({showPauseAnimation:!1,showErrorAnimation:!1,showPulsatingText:!1,pulsatingFinished:!1,showLabels:!0,showMainText:!0,showIdlePulsating:!1,idleDotsCount:0}),r=G.useRef(null),n=G.useRef(null),o=G.useRef(null),s=G.useRef(null),a=G.useRef(0),i=G.useRef(null),l=G.useRef(null),c=G.useCallback(()=>{t(w=>({...w,showPauseAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(w=>({...w,showPauseAnimation:!1}))},800)},[]),u=G.useCallback(()=>{t(w=>({...w,showErrorAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(w=>({...w,showErrorAnimation:!1}))},600)},[]),d=G.useCallback(()=>{t(w=>({...w,showErrorAnimation:!1})),n.current&&clearTimeout(n.current)},[]),h=G.useCallback(w=>{a.current=0,t(T=>({...T,showPulsatingText:!0,pulsatingFinished:!1})),setTimeout(()=>{t(T=>({...T,pulsatingFinished:!0})),o.current=setInterval(()=>{t(T=>({...T,showPulsatingText:!T.showPulsatingText}))},2e3),w&&w()},800)},[]),p=G.useCallback(()=>{o.current&&(clearInterval(o.current),o.current=null),t(w=>({...w,showPulsatingText:!1,pulsatingFinished:!1})),a.current=0},[]),f=G.useCallback(()=>{t(w=>({...w,showIdlePulsating:!0})),i.current=setInterval(()=>{t(w=>({...w,showIdlePulsating:!w.showIdlePulsating}))},2e3),l.current=setInterval(()=>{t(w=>({...w,idleDotsCount:(w.idleDotsCount+1)%4}))},800)},[]),m=G.useCallback(()=>{i.current&&(clearInterval(i.current),i.current=null),l.current&&(clearInterval(l.current),l.current=null),t(w=>({...w,showIdlePulsating:!1,idleDotsCount:0}))},[]),y=G.useCallback(()=>{t(w=>({...w,showLabels:!1,showMainText:!1})),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{t(w=>({...w,showLabels:!0,showMainText:!0}))},200)},[]),b=G.useCallback(()=>{t(w=>({...w,showLabels:!0,showMainText:!0}))},[]),C=G.useCallback(()=>{r.current&&clearTimeout(r.current),n.current&&clearTimeout(n.current),s.current&&clearTimeout(s.current),o.current&&clearInterval(o.current),i.current&&clearInterval(i.current),l.current&&clearInterval(l.current)},[]);return{animationState:e,triggerPauseAnimation:c,triggerErrorAnimation:u,clearErrorAnimation:d,startPulsatingAnimation:h,stopPulsatingAnimation:p,startIdleAnimations:f,stopIdleAnimations:m,triggerFadeTransition:y,setInitialAnimationState:b,cleanup:C}};class su{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 o=Math.min(t,1/15),s=this.updateCount===1?.7:1;for(let a=0;a<this.currentValues.length;a++){const i=this.currentValues[a],l=this.targetValues[a],c=this.velocities[a],u=l-i,d=u*this.options.tension*s,h=c*this.options.friction,p=d-h,f=c+p*o,m=i+f*o;Math.abs(u)<this.options.threshold&&Math.abs(f)<this.options.threshold*10?this.currentValues[a]!==l&&(this.currentValues[a]=l,this.velocities[a]=0,r=!0):(n=!1,this.currentValues[a]=m,this.velocities[a]=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 o=this.previousTargetValues.every((s,a)=>s===this.currentValues[a]);if(n<8&&n>0&&this.previousTargetValues.length>0&&!o){const s=Math.min(n/8,1);for(let a=0;a<this.targetValues.length;a++){const i=this.previousTargetValues[a]||0,l=t[a]||0;Math.abs(l-i)>.1&&(this.targetValues[a]=i+(l-i)*s)}}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 au(e=[],t={}){const r=G.useRef(null);return r.current||(r.current=new su(e,t)),G.useEffect(()=>{var n;(n=r.current)==null||n.updateOptions(t)},[t]),G.useEffect(()=>()=>{var n;(n=r.current)==null||n.destroy()},[]),[r.current]}const XT=({autoStart:e,onCycleEnd:t,onMeasuringComplete:r,hasError:n,onPauseAnimation:o,onErrorAnimation:s,onClearErrorAnimation:a,onStartPulsating:i})=>{const[l,c]=G.useState({currentState:"idle",remainingTime:0,maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),u=G.useRef(null),d=G.useRef(null),h=G.useRef(0),[p]=au([0],{tension:80,friction:18,onChange:([A])=>{c(O=>({...O,currentProgress:A}))}}),f=G.useCallback(()=>{c(A=>({...A,currentState:"idle",maxTime:null,isRunning:!1,isPausedState:!1,currentProgress:0})),h.current=0,d.current=null,p.setImmediate([0])},[p]),m=G.useCallback((A=0)=>{const O=A/60%1*100;c(P=>({...P,currentState:"measuring",maxTime:null,remainingTime:A,isPausedState:!1,currentProgress:O})),h.current=0,p.setImmediate([O]),e?(d.current=Date.now()-A*1e3,c(P=>({...P,isRunning:!0}))):d.current=null},[e,p]),y=G.useCallback((A,O=0)=>{c(_=>({..._,isRunning:!1})),d.current=null,c(_=>({..._,currentState:"countdown",maxTime:A,isPausedState:!1})),h.current=0;const P=Math.max(0,A-O),E=O>0?O/A*100:0;c(_=>({..._,remainingTime:P,currentProgress:E})),p.setImmediate([E]),P===0?(c(_=>({..._,isRunning:!1})),d.current=null,t&&queueMicrotask(()=>t())):e?setTimeout(()=>{d.current=Date.now()-O*1e3,c(_=>({..._,isRunning:!0}))},0):d.current=null},[e,t,p]),b=G.useCallback(()=>{c(A=>({...A,isRunning:!1,currentState:"measured"})),d.current=null,i(()=>{r&&r()})},[i,r]),C=G.useCallback(()=>{if(d.current&&l.isRunning){const O=Date.now()-d.current;h.current+=O;const P=h.current/1e3,E=JT(l.currentState,P,l.maxTime);p.setTarget([E])}c(A=>({...A,isRunning:!1,isPausedState:!0})),o()},[l.isRunning,l.currentState,l.maxTime,p,o]),w=G.useCallback(()=>{l.isPausedState&&(l.remainingTime>0||l.currentState!=="countdown")&&(d.current=Date.now(),c(A=>({...A,isRunning:!0,isPausedState:!1})))},[l.isPausedState,l.remainingTime,l.currentState]),T=G.useCallback(()=>l.isPausedState,[l.isPausedState]);return G.useEffect(()=>{n?(l.isRunning&&!l.isPausedState&&(c(A=>({...A,wasRunningBeforeError:!0})),C()),s()):(l.wasRunningBeforeError&&l.isPausedState&&(c(A=>({...A,wasRunningBeforeError:!1})),w()),a())},[n,l.isRunning,l.isPausedState,l.wasRunningBeforeError,C,w,s,a]),G.useEffect(()=>{if(l.isRunning){const A=()=>{if(d.current){const P=(Date.now()-d.current+h.current)/1e3;if(l.currentState==="countdown"&&l.maxTime!==null){const E=Math.max(0,l.maxTime-P);c(x=>({...x,remainingTime:Math.ceil(E)}));const _=Math.min(100,P/l.maxTime*100);if(p.setTarget([_]),E<=0){c(x=>({...x,isRunning:!1,remainingTime:0})),d.current=null,p.setTarget([100]),t&&queueMicrotask(()=>t());return}}else if(l.currentState==="measuring"){c(_=>({..._,remainingTime:Math.floor(P)}));const E=P/60%1*100;p.setTarget([E])}l.isRunning&&(u.current=requestAnimationFrame(A))}};u.current=requestAnimationFrame(A)}else u.current&&(cancelAnimationFrame(u.current),u.current=null);return()=>{u.current&&cancelAnimationFrame(u.current)}},[l.isRunning,t,l.currentState,l.maxTime,p]),G.useEffect(()=>{let A=null;const O=()=>{p.update(1/60),A=requestAnimationFrame(O)};return A=requestAnimationFrame(O),()=>{A&&cancelAnimationFrame(A)}},[p]),{timerState:l,controls:{startNewCycle:y,startMeasuring:m,setIdle:f,completeMeasuring:b,pause:C,resume:w,isPaused:T}}},ZT=Fe(ye.observer(({onCycleComplete:e,onCycleEnd:t,onMeasuringComplete:r,autoStart:n=!0,variant:o="default",compact:s=!1,className:a,hasError:i=!1})=>{const l=G.useRef(void 0),{animationState:c,triggerPauseAnimation:u,triggerErrorAnimation:d,clearErrorAnimation:h,startPulsatingAnimation:p,stopPulsatingAnimation:f,startIdleAnimations:m,stopIdleAnimations:y,triggerFadeTransition:b,setInitialAnimationState:C,cleanup:w}=QT(),{timerState:T,controls:A}=XT({autoStart:n,onCycleEnd:t,onMeasuringComplete:r,hasError:i,onPauseAnimation:u,onErrorAnimation:d,onClearErrorAnimation:h,onStartPulsating:p});return G.useEffect(()=>{const O=l.current;l.current!==void 0&&O!==T.currentState?(O==="measured"&&f(),O==="idle"&&y(),b()):C(),T.currentState==="idle"&&m(),l.current=T.currentState},[T.currentState,f,y,m,b,C]),G.useEffect(()=>{let O=!0;const P=setTimeout(()=>{O&&e(A)},0);return()=>{O=!1,clearTimeout(P)}},[e,A]),G.useEffect(()=>w,[w]),o==="small"?g.jsx(KT,{timerState:T,animationState:c,hasError:i,compact:s,className:a}):g.jsx(YT,{timerState:T,animationState:c,hasError:i,className:a})})),eP=e=>{const t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),o=e%60,s=[];return t>0?(s.push(t.toString()),s.push(r.toString().padStart(2,"0")),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):r>0?(s.push(r.toString()),s.push(n.toString().padStart(2,"0")),s.push(o.toString().padStart(2,"0"))):(s.push(n.toString()),s.push(o.toString().padStart(2,"0"))),s.join(":")},nh=(e,t)=>{const r=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60),s=e%60;if(typeof Intl<"u"&&"DurationFormat"in Intl)try{const i={};return r>0&&(i.days=r),n>0&&(i.hours=n),o>0&&(i.minutes=o),(s>0||Object.keys(i).length===0)&&(i.seconds=s),new Intl.DurationFormat(t,{style:"narrow"}).format(i)}catch{}const a=[];return r>0&&a.push(`${r}d`),n>0&&a.push(`${n}h`),o>0&&a.push(`${o}m`),(s>0||a.length===0)&&a.push(`${s}s`),a.join(" ")},tP=({timerState:e,animationState:t,hasError:r,className:n})=>{const{t:o}=we.useTranslation(),s=Wp(),{elapsedTime:a,currentProgress:i}=e,{showErrorAnimation:l,showPauseAnimation:c,showMainText:u}=t;return g.jsxs(R.Box,{className:n,sx:{position:"relative",width:264,height:264,display:"flex",alignItems:"center",justifyContent:"center"},children:[g.jsx(hy.Gauge,{width:264,height:264,value:i,valueMin:0,valueMax:100,innerRadius:"85%",outerRadius:"100%",margin:0,skipAnimation:!0,text:()=>"",sx:{opacity:c||l?.6:1,transition:"opacity 0.5s ease-out","& .MuiGauge-valueArc":{fill:r?s.palette.error.light:s.palette.success.main,transition:"fill 0.5s ease-out"},"& .MuiGauge-referenceArc":{fill:"#171927",stroke:"transparent",strokeWidth:0,transition:"fill 0.5s ease-out, stroke 0.5s ease-out, stroke-width 0.5s ease-out"},"& .MuiGauge-valueText":{display:"none"},"& .MuiGauge-text":{display:"none"}}}),g.jsx(R.Box,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:225,height:225,borderRadius:"50%",backgroundColor:"#292B3F",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:1,transition:"background-color 0.5s ease-out"},children:g.jsxs(R.Box,{sx:{position:"relative",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:.5},children:[g.jsx(R.Fade,{in:u&&r,timeout:200,children:g.jsx(R.Typography,{variant:"h6",sx:{position:"absolute",fontSize:"16px",fontWeight:500,color:s.palette.error.light},children:o("timer.error")})}),g.jsx(R.Fade,{in:u&&!r,timeout:300,children:g.jsx(R.Typography,{variant:"h1",sx:{position:"absolute",fontSize:"48px",fontWeight:500,color:s.palette.text.primary,lineHeight:1,letterSpacing:"-0.5px"},children:eP(a)})})]})})]})},rP=({timerState:e,animationState:t,hasError:r,compact:n,className:o})=>{const{t:s,i18n:a}=we.useTranslation(),i=Wp(),{elapsedTime:l,currentProgress:c}=e,{showErrorAnimation:u,showPauseAnimation:d}=t;return n?g.jsx(R.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0},children:g.jsx(R.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",transition:"color 0.5s ease-out"},children:r?s("timer.error"):nh(l,a.language)})}):g.jsxs(R.Box,{className:o,sx:{display:"flex",alignItems:"center",m:0,gap:1},children:[g.jsx(R.Box,{sx:{width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",opacity:d||u?.6:1,transition:"opacity 0.5s ease-out"},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:r?i.palette.error.light:i.palette.success.main,strokeWidth:"2",opacity:.3,style:{transition:"stroke 0.8s ease-in-out, opacity 2s ease-in-out"}}),g.jsx("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:r?i.palette.error.light:i.palette.success.main,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*8}`,strokeDashoffset:`${2*Math.PI*8*(1-c/100)}`,style:{transition:"stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"}})]})}),g.jsx(R.Typography,{variant:"body2",sx:{color:r?i.palette.error.light:i.palette.text.primary,fontSize:"14px",lineHeight:"normal",letterSpacing:"normal",transition:"color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"},children:r?s("timer.error"):nh(l,a.language)})]})},nP=()=>{const[e,t]=G.useState({showPauseAnimation:!1,showErrorAnimation:!1,showMainText:!0}),r=G.useRef(null),n=G.useRef(null),o=G.useRef(null),s=G.useCallback(()=>{t(d=>({...d,showPauseAnimation:!0})),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{t(d=>({...d,showPauseAnimation:!1}))},800)},[]),a=G.useCallback(()=>{t(d=>({...d,showErrorAnimation:!0})),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{t(d=>({...d,showErrorAnimation:!1}))},600)},[]),i=G.useCallback(()=>{t(d=>({...d,showErrorAnimation:!1})),n.current&&clearTimeout(n.current)},[]),l=G.useCallback(()=>{t(d=>({...d,showMainText:!1})),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{t(d=>({...d,showMainText:!0}))},200)},[]),c=G.useCallback(()=>{t(d=>({...d,showMainText:!0}))},[]),u=G.useCallback(()=>{r.current&&clearTimeout(r.current),n.current&&clearTimeout(n.current),o.current&&clearTimeout(o.current)},[]);return{animationState:e,triggerPauseAnimation:s,triggerErrorAnimation:a,clearErrorAnimation:i,triggerFadeTransition:l,setInitialAnimationState:c,cleanup:u}},oP=({autoStart:e,hasError:t,onPauseAnimation:r,onErrorAnimation:n,onClearErrorAnimation:o})=>{const[s,a]=G.useState({elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0,wasRunningBeforeError:!1}),i=G.useRef(null),l=G.useRef(null),c=G.useRef(0),u=G.useRef(0),[d]=au([0],{tension:80,friction:18,onChange:([b])=>{a(C=>({...C,currentProgress:b}))}}),h=G.useCallback((b=0)=>{const C=b/60%1*100;a(w=>({...w,elapsedTime:b,isPausedState:!1,currentProgress:C})),c.current=0,u.current=C,d.setImmediate([C]),e?(l.current=Date.now()-b*1e3,a(w=>({...w,isRunning:!0}))):l.current=null},[e,d]),p=G.useCallback(()=>{if(l.current&&s.isRunning){const C=(Date.now()-l.current)/1e3+c.current,w=C/60%1*100;d.setTarget([w]),a(T=>({...T,elapsedTime:Math.floor(C)}))}a(b=>({...b,isRunning:!1,isPausedState:!0})),r()},[s.isRunning,d,r]),f=G.useCallback(()=>{s.isPausedState&&(c.current=s.elapsedTime,l.current=Date.now(),a(b=>({...b,isRunning:!0,isPausedState:!1})))},[s.isPausedState,s.elapsedTime]),m=G.useCallback(()=>{a(b=>({...b,elapsedTime:0,isRunning:!1,isPausedState:!1,currentProgress:0})),c.current=0,l.current=null,u.current=0,d.setImmediate([0])},[d]),y=G.useCallback(()=>s.isPausedState,[s.isPausedState]);return G.useEffect(()=>{t?(s.isRunning&&(a(b=>({...b,wasRunningBeforeError:!0})),p()),n()):(s.wasRunningBeforeError&&!s.isRunning&&(a(b=>({...b,wasRunningBeforeError:!1})),f()),o())},[t,s.isRunning,s.wasRunningBeforeError,p,f,n,o]),G.useEffect(()=>{if(s.isRunning){const b=()=>{if(l.current){const w=(Date.now()-l.current)/1e3+c.current,T=w/60%1*100;a(O=>({...O,elapsedTime:Math.floor(w)})),Math.abs(T-u.current)>.1&&(d.setTarget([T]),u.current=T)}i.current=requestAnimationFrame(b)};i.current=requestAnimationFrame(b)}else i.current&&(cancelAnimationFrame(i.current),i.current=null);return()=>{i.current&&(cancelAnimationFrame(i.current),i.current=null)}},[s.isRunning,d]),G.useEffect(()=>{let b=null;const C=()=>{d.update(),b=requestAnimationFrame(C)};return b=requestAnimationFrame(C),()=>{b&&cancelAnimationFrame(b)}},[d]),{timerState:s,controls:{start:h,pause:p,resume:f,reset:m,isPaused:y}}},sP=Fe(ye.observer(({onTimerReady:e,autoStart:t=!0,variant:r="default",compact:n=!1,className:o,hasError:s=!1})=>{const{animationState:a,triggerPauseAnimation:i,triggerErrorAnimation:l,clearErrorAnimation:c,setInitialAnimationState:u,cleanup:d}=nP(),{timerState:h,controls:p}=oP({autoStart:t,hasError:s,onPauseAnimation:i,onErrorAnimation:l,onClearErrorAnimation:c});return G.useEffect(()=>{u()},[u]),G.useEffect(()=>{let f=!0;const m=setTimeout(()=>{f&&e(p)},0);return()=>{f=!1,clearTimeout(m)}},[e,p]),G.useEffect(()=>d,[d]),r==="small"?g.jsx(rP,{timerState:h,animationState:a,hasError:s,compact:n,className:o}):g.jsx(tP,{timerState:h,animationState:a,hasError:s,className:o})})),Zr=mb;process.env.NODE_ENV!=="production"&&(v.node,v.object.isRequired);function iu(e){return pb(e)}function aP(e){return Yr("MuiSvgIcon",e)}Va("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const iP=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${rt(t)}`,`fontSize${rt(r)}`]};return Lo(o,aP,n)},lP=xt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${rt(r.color)}`],t[`fontSize${rt(r.fontSize)}`]]}})(Zr(({theme:e})=>{var t,r,n,o,s,a,i,l,c,u,d,h,p,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.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:((a=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:a.call(s,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 y,b;return{props:{color:m},style:{color:(b=(y=(e.vars??e).palette)==null?void 0:y[m])==null?void 0:b.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}}]}})),fa=F.forwardRef(function(t,r){const n=iu({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:a="inherit",component:i="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...p}=n,f=F.isValidElement(o)&&o.type==="svg",m={...n,color:a,component:i,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:f},y={};u||(y.viewBox=h);const b=iP(m);return g.jsxs(lP,{as:i,className:nt(b.root,s),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...y,...p,...f&&o.props,ownerState:m,children:[f?o.props.children:o,d?g.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(fa.propTypes={children:v.node,classes:v.object,className:v.string,color:v.oneOfType([v.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),v.string]),component:v.elementType,fontSize:v.oneOfType([v.oneOf(["inherit","large","medium","small"]),v.string]),htmlColor:v.string,inheritViewBox:v.bool,shapeRendering:v.string,sx:v.oneOfType([v.arrayOf(v.oneOfType([v.func,v.object,v.bool])),v.func,v.object]),titleAccess:v.string,viewBox:v.string});fa.muiName="SvgIcon";function Ir(e,t){function r(n,o){return g.jsx(fa,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=fa.muiName,F.memo(F.forwardRef(r))}function cP(e){const{controlled:t,default:r,name:n,state:o="value"}=e,{current:s}=F.useRef(t!==void 0),[a,i]=F.useState(r),l=s?t:a;if(process.env.NODE_ENV!=="production"){F.useEffect(()=>{s!==(t!==void 0)&&console.error([`MUI: A component is changing the ${s?"":"un"}controlled ${o} state of ${n} to be ${s?"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(`
|
|
131
|
+
`))},[o,n,t]);const{current:u}=F.useRef(r);F.useEffect(()=>{!s&&JSON.stringify(r)!==JSON.stringify(u)&&console.error([`MUI: A component is changing the default ${o} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
132
|
+
`))},[JSON.stringify(r)])}const c=F.useCallback(u=>{s||i(u)},[]);return[l,c]}const uP=Ir(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"),dP=Ir(g.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),oh=Ir(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"),Cf=Fe(ye.observer(({data:e,columns:t,getRowData:r,onRowClick:n,selectedItem:o,getItemId:s,title:a,showCount:i=!0,searchPlaceholder:l="Search programs",dataGridProps:c,CustomToolbar:u,selectFirstByDefault:d=!1,sx:h})=>{var E;const p=R.useTheme(),f=At.useGridApiRef(),m=G.useRef(null),[y,b]=G.useState(null),C=G.useMemo(()=>e.map(r),[e,r]);G.useEffect(()=>{f.current&&C.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(_=>_.field)})},[C,t,f]),G.useEffect(()=>{if(!m.current||!f.current)return;const _=new ResizeObserver(()=>{setTimeout(()=>{f.current&&C.length>0&&f.current.autosizeColumns({includeOutliers:!0,includeHeaders:!0,expand:!0,columns:t.map(x=>x.field)})},100)});return _.observe(m.current),()=>{_.disconnect()}},[f,C.length,t]);const w=G.useMemo(()=>{if(o!==void 0)return o;if(y!==null)return y;if(d&&e.length>0){const _=e[0];return b(_),_}return null},[d,e,o,y]),T=_=>{const x=e.find(N=>r(N).id===_.id);x&&(o===void 0&&b(x),n&&n(x,_))},A=G.useMemo(()=>!w||!s?null:s(w),[w,s]);function O(){return g.jsx(At.Toolbar,{children:g.jsxs(R.Box,{sx:{display:"flex",width:"100%",gap:1,p:.5,alignItems:"center"},children:[a&&g.jsxs(R.Typography,{variant:"h6",sx:{fontWeight:500,color:"white"},children:[a,i&&` (${e.length})`]}),g.jsxs(R.Box,{sx:{ml:"auto",display:"flex",gap:.5,alignItems:"center",pr:1},children:[g.jsx(At.FilterPanelTrigger,{render:g.jsx(At.ToolbarButton,{"aria-label":"Show filters",children:g.jsx(dP,{fontSize:"small"})})}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0,sx:{height:"24px",alignSelf:"center"}}),g.jsx(At.QuickFilter,{render:(_,x)=>g.jsxs(R.Box,{..._,sx:{display:"flex",overflow:"hidden"},children:[!x.expanded&&g.jsx(At.QuickFilterTrigger,{render:g.jsx(At.ToolbarButton,{"aria-label":"Search",children:g.jsx(oh,{fontSize:"small"})})}),g.jsxs(R.Box,{sx:{display:"flex",overflow:"hidden",transition:"all 0.3s ease-in-out",width:x.expanded?"200px":"0px",position:"relative"},children:[g.jsxs(R.Box,{sx:{flex:1,position:"relative","& .MuiInputBase-root":{height:"32px",borderRadius:"16px",backgroundColor:"#171927",paddingLeft:"40px",paddingRight:x.expanded&&x.value!==""?"40px":"12px",color:"white",fontSize:"14px",border:"none !important",outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"},"&:hover":{"&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&:focus-within":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"&.Mui-focused":{outline:"none !important",boxShadow:"none !important","&::before":{display:"none !important",border:"none !important"},"&::after":{display:"none !important",border:"none !important"}},"& .MuiInputBase-input":{padding:"8px 0",border:"none !important",outline:"none !important",boxShadow:"none !important","&:focus":{outline:"none !important",boxShadow:"none !important",border:"none !important"},"&::placeholder":{color:"rgba(255, 255, 255, 0.3)",opacity:1}},"& fieldset":{border:"none !important",display:"none !important"},"& .MuiOutlinedInput-notchedOutline":{border:"none !important",display:"none !important"}}},children:[x.expanded&&g.jsx(oh,{fontSize:"small",sx:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"rgba(255, 255, 255, 0.6)",zIndex:1,pointerEvents:"none"}}),g.jsx(At.QuickFilterControl,{placeholder:l})]}),x.expanded&&x.value!==""&&g.jsx(At.QuickFilterClear,{render:g.jsx(R.Box,{sx:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",zIndex:1},children:g.jsx(R.Box,{sx:{minWidth:"24px",width:"24px",height:"24px",padding:0,color:"rgba(255, 255, 255, 0.6)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},children:g.jsx(At.ToolbarButton,{"aria-label":"Clear",children:g.jsx(uP,{fontSize:"small"})})})})})]})]})})]})]})})}const P=u||O;return g.jsx(R.Box,{ref:m,sx:{height:"100%",display:"flex",flexDirection:"column","& *":{scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},"&:hover *":{scrollbarWidth:"thin",scrollbarColor:`${p.palette.divider} transparent`,"&::-webkit-scrollbar":{display:"block",width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:p.palette.divider,borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{background:p.palette.action.hover}},...h},children:g.jsx(At.DataGrid,{apiRef:f,rows:C,columns:t,onRowClick:T,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:!0,autosizeOptions:{...(c==null?void 0:c.autosizeOptions)||{},includeOutliers:!0,includeHeaders:!0,expand:!0,columns:((E=c==null?void 0:c.autosizeOptions)==null?void 0:E.columns)||t.map(_=>_.field)},sx:{border:"none",width:"100%","& .MuiPaper-root":{boxShadow:"none !important"},"& .MuiDataGrid-overlay":{},"& .MuiDataGrid-main":{border:"none","& .MuiPaper-root":{}},"& .MuiDataGrid-container--top [role=row]":{},"& .MuiDataGrid-topContainer":{borderBottom:"none !important"},"& .MuiDataGrid-columnHeaders":{border:"none",borderBottom:"none !important"},"& .MuiDataGrid-row":{cursor:n?"pointer":"default",border:"none",margin:"1px 0",position:"relative",backgroundColor:"transparent !important","&: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"}},...A!==null&&{[`&[data-id="${A}"]`]:{backgroundColor:"transparent !important","&::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":{backgroundColor:"transparent !important"},"&: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"},"&:hover":{backgroundColor:"transparent !important"}},"& .MuiDataGrid-columnHeader":{border:"none",paddingLeft:"40px",paddingRight:"40px","& .MuiDataGrid-columnHeaderTitle":{color:"rgba(255, 255, 255, 0.6)"}},"& .MuiDataGrid-toolbarContainer":{padding:"8px",border:"none !important",borderBottom:"none !important","& .MuiBox-root":{},"& .MuiFormControl-root":{},"& .MuiInputBase-root":{},"& .MuiPaper-root":{boxShadow:"none !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"},"& .MuiBackdrop-root":{},"& .MuiModal-backdrop":{},...c==null?void 0:c.sx}})})}));Cf.displayName="WandelbotsDataGrid";const Pn=Pb({createStyledComponent:xt("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>iu({props:e,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(Pn.propTypes={children:v.node,component:v.elementType,direction:v.oneOfType([v.oneOf(["column-reverse","column","row-reverse","row"]),v.arrayOf(v.oneOf(["column-reverse","column","row-reverse","row"])),v.object]),divider:v.node,spacing:v.oneOfType([v.arrayOf(v.oneOfType([v.number,v.string])),v.number,v.object,v.string]),sx:v.oneOfType([v.arrayOf(v.oneOfType([v.func,v.object,v.bool])),v.func,v.object]),useFlexGap:v.bool});const hP=({title:e,titleId:t,...r},n)=>F.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?F.createElement("title",{id:t},e):null,F.createElement("g",{id:"JogMinus"},F.createElement("path",{id:"Minus",d:"M0 13V8H21V13H0Z",fill:"white"}))),pP=G.forwardRef(hP),mP=({title:e,titleId:t,...r},n)=>F.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?F.createElement("title",{id:t},e):null,F.createElement("g",{id:"JogPlus"},F.createElement("g",{id:"Plus"},F.createElement("path",{d:"M0 13V8H8V13H0Z",fill:"white"}),F.createElement("path",{d:"M8 0L13 2.18557e-07L13 21H8L8 0Z",fill:"white"}),F.createElement("path",{d:"M13 13V8H21V13H13Z",fill:"white"})))),fP=G.forwardRef(mP);function ai(e){G.useEffect(e,[])}function Of(e){ai(()=>$e.autorun(e))}function Tf(e,t,r){ai(()=>$e.reaction(e,t,r))}function ii(e){return ai(()=>{let t;function r(){e(),t=requestAnimationFrame(r)}return t=requestAnimationFrame(r),()=>{cancelAnimationFrame(t)}})}const Ml=Fe(ye.observer(({colors:e,label:t,getDisplayedValue:r,startJogging:n,stopJogging:o,disabled:s,activeJoggingDirection:a,...i})=>{var w,T,A,O,P,E,_;ii(()=>{const x=r(),N=h.current;N&&(N.textContent=x)});const l=R.useTheme(),[c,u]=G.useState(null);G.useEffect(()=>{s&&C()},[s]);const d=a||c,h=G.useRef(null);e||(e={color:"#fff",backgroundColor:"#000",borderColor:"#000",buttonBackgroundColor:{disabled:"#000",default:"#000",hovered:"#000",pressed:"#000"},labelColor:"#000"});const p=d?(w=e.buttonBackgroundColor)==null?void 0:w.pressed:e.borderColor,f={width:"55px",color:e.color,path:{fill:e.color},alignContent:"center",fontSize:"37px",svg:{pointerEvents:"none"}},m={...f,backgroundColor:(T=e.buttonBackgroundColor)==null?void 0:T.default,":hover":{backgroundColor:(A=e.buttonBackgroundColor)==null?void 0:A.hovered},":active":{backgroundColor:(O=e.buttonBackgroundColor)==null?void 0:O.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor}},":disabled":{backgroundColor:(P=e.buttonBackgroundColor)==null?void 0:P.disabled,"svg path":{fill:l.palette.action.disabled}}},y={...f,backgroundColor:(E=e.buttonBackgroundColor)==null?void 0:E.pressed,color:e.backgroundColor,path:{fill:e.backgroundColor},":disabled":{backgroundColor:(_=e.buttonBackgroundColor)==null?void 0:_.pressed,"svg path":{fill:l.palette.action.disabled}}};function b(x,N){s||x.button===0&&(u(N),n(N))}function C(){u(null),o()}return g.jsxs(Pn,{height:"64px",direction:"row",justifyContent:"center",...i,children:[g.jsx(R.IconButton,{disabled:s,disableRipple:!0,onPointerDown:x=>b(x,"-"),onPointerUp:C,onPointerOut:C,size:"large",sx:{...d==="-"?y:m,borderRadius:"16px 0px 0px 16px",borderLeft:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(pP,{})}),g.jsxs(Pn,{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(Pn,{height:"22px",direction:"row",alignItems:"center",justifyItems:"center",spacing:1,sx:{userSelect:"none",color:e.color,".MuiTypography-root":{fontWeight:700,...s?{color:l.palette.action.disabled}:{}},...s?{"svg path":{fill:l.palette.action.disabled}}:{}},children:t}),g.jsx(R.Typography,{height:"22px",sx:{fontSize:"15px",color:s?l.palette.action.disabled:e.color,fontWeight:700},ref:h,children:r()})]}),g.jsx(R.IconButton,{disableRipple:!0,disabled:s,onPointerDown:x=>b(x,"+"),onPointerUp:C,onPointerOut:C,size:"large",sx:{...d==="+"?y:m,borderRadius:"0px 16px 16px 0px",borderRight:`2px solid ${p??"#fff"}`,borderBottom:`2px solid ${p??"#fff"}`,borderTop:`2px solid ${p??"#fff"}`},children:g.jsx(fP,{})})]})})),gP=Ir(g.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),yP=Ir(g.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");function Hr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Pf=typeof global=="object"&&global&&global.Object===Object&&global,bP=typeof self=="object"&&self&&self.Object===Object&&self,Yt=Pf||bP||Function("return this")(),Xi=function(){return Yt.Date.now()},xP=/\s/;function vP(e){for(var t=e.length;t--&&xP.test(e.charAt(t)););return t}var SP=/^\s+/;function wP(e){return e&&e.slice(0,vP(e)+1).replace(SP,"")}var Sr=Yt.Symbol,Af=Object.prototype,CP=Af.hasOwnProperty,OP=Af.toString,no=Sr?Sr.toStringTag:void 0;function TP(e){var t=CP.call(e,no),r=e[no];try{e[no]=void 0;var n=!0}catch{}var o=OP.call(e);return n&&(t?e[no]=r:delete e[no]),o}var PP=Object.prototype,AP=PP.toString;function RP(e){return AP.call(e)}var EP="[object Null]",IP="[object Undefined]",sh=Sr?Sr.toStringTag:void 0;function en(e){return e==null?e===void 0?IP:EP:sh&&sh in Object(e)?TP(e):RP(e)}function qr(e){return e!=null&&typeof e=="object"}var _P="[object Symbol]";function li(e){return typeof e=="symbol"||qr(e)&&en(e)==_P}var ah=NaN,MP=/^[-+]0x[0-9a-f]+$/i,VP=/^0b[01]+$/i,kP=/^0o[0-7]+$/i,jP=parseInt;function ih(e){if(typeof e=="number")return e;if(li(e))return ah;if(Hr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Hr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=wP(e);var r=VP.test(e);return r||kP.test(e)?jP(e.slice(2),r?2:8):MP.test(e)?ah:+e}var $P="Expected a function",DP=Math.max,UP=Math.min;function LP(e,t,r){var n,o,s,a,i,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError($P);t=ih(t)||0,Hr(r)&&(u=!!r.leading,d="maxWait"in r,s=d?DP(ih(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h);function p(O){var P=n,E=o;return n=o=void 0,c=O,a=e.apply(E,P),a}function f(O){return c=O,i=setTimeout(b,t),u?p(O):a}function m(O){var P=O-l,E=O-c,_=t-P;return d?UP(_,s-E):_}function y(O){var P=O-l,E=O-c;return l===void 0||P>=t||P<0||d&&E>=s}function b(){var O=Xi();if(y(O))return C(O);i=setTimeout(b,m(O))}function C(O){return i=void 0,h&&n?p(O):(n=o=void 0,a)}function w(){i!==void 0&&clearTimeout(i),c=0,n=l=o=i=void 0}function T(){return i===void 0?a:C(Xi())}function A(){var O=Xi(),P=y(O);if(n=arguments,o=this,l=O,P){if(i===void 0)return f(l);if(d)return clearTimeout(i),i=setTimeout(b,t),p(l)}return i===void 0&&(i=setTimeout(b,t)),a}return A.cancel=w,A.flush=T,A}var BP="Expected a function";function FP(e,t,r){var n=!0,o=!0;if(typeof e!="function")throw new TypeError(BP);return Hr(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),LP(e,t,{leading:n,maxWait:t,trailing:o})}const Rf=Fe(ye.observer(({startJogging:e,stopJogging:t,lowerLimitDegs:r,upperLimitDegs:n,getValueDegs:o,disabled:s,...a})=>{var w,T,A,O,P,E,_,x,N,M,H,z,ne,re,he;const{t:i}=we.useTranslation(),[l,c]=G.useState(),u=R.useTheme(),d={background:(w=u.palette.backgroundPaperElevation)==null?void 0:w[4],color:(T=u.palette.backgroundPaperElevation)==null?void 0:T[11]},h=ye.useLocalObservable(()=>({activeJoggingDir:null,startJogging(te){this.activeJoggingDir=te,e(te)},stopJogging(){this.activeJoggingDir=null,t()}})),p=FP(()=>{c(o())},50);ii(p);function f(te){te.button===0&&h.startJogging("-")}function m(te){te.button===0&&h.startJogging("+")}function y(te){h.stopJogging()}function b(te){h.stopJogging()}function C(te,me=1){if(te===void 0||isNaN(te))return"";const W=i("General.degree.variable",{amount:te.toFixed(me)});return te>0&&me===0?`+${W}`:W}return g.jsxs(Pn,{height:"64px",width:"100%",maxWidth:"260px",direction:"row",...a,sx:{"& .MuiIconButton-root":{width:"52px",color:u.palette.text.primary,alignContent:"center",backgroundColor:(A=u.palette.backgroundPaperElevation)==null?void 0:A[11],"& svg":{width:"42px",height:"42px"},"&.Mui-disabled":{backgroundColor:(O=u.palette.backgroundPaperElevation)==null?void 0:O[11],color:u.palette.action.disabled,opacity:1},"&:hover":{backgroundColor:(P=u.palette.backgroundPaperElevation)==null?void 0:P[9]},"&:active":{...d}}},children:[g.jsx(R.IconButton,{onPointerDown:f,onPointerUp:y,onPointerOut:b,disabled:s,disableRipple:!0,sx:{borderRadius:"16px 0px 0px 16px",...h.activeJoggingDir==="-"?d:{}},children:g.jsx(gP,{sx:{pointerEvents:"none",color:(N=(x=(_=(E=u.componentsExt)==null?void 0:E.JoggingPanel)==null?void 0:_.JoggingJoint)==null?void 0:x.Joint)==null?void 0:N.arrowColor}})}),g.jsxs(Pn,{flexGrow:1,alignItems:"center",justifyContent:"center",sx:{borderStyle:"solid",borderLeftWidth:0,borderRightWidth:0,border:"none",backgroundColor:(M=u.palette.backgroundPaperElevation)==null?void 0:M[11],paddingLeft:"20px",paddingRight:"20px",zIndex:1},children:[g.jsx(R.Typography,{sx:{fontSize:"15px",fontWeight:700,position:"relative",top:"5px",color:s?u.palette.action.disabled:u.palette.text.primary},children:C(l)}),g.jsx(R.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:s?u.palette.action.disabled:u.palette.text.primary},"& .MuiSlider-markLabel":{top:"20px",fontSize:"12px",color:s?u.palette.action.disabled:u.palette.text.secondary},"& .MuiSlider-rail":{backgroundColor:(H=u.palette.backgroundPaperElevation)==null?void 0:H[5],opacity:1}},marks:r!==void 0&&n!==void 0&&[{value:r,label:C(r,0)},{value:n,label:C(n,0)}]})]}),g.jsx(R.IconButton,{onPointerDown:m,onPointerUp:y,onPointerOut:b,disabled:s,disableRipple:!0,sx:{borderRadius:"0px 16px 16px 0px",...h.activeJoggingDir==="+"?d:{}},children:g.jsx(yP,{sx:{pointerEvents:"none",color:(he=(re=(ne=(z=u.componentsExt)==null?void 0:z.JoggingPanel)==null?void 0:ne.JoggingJoint)==null?void 0:re.Joint)==null?void 0:he.arrowColor}})})]})})),NP=Ir(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"),zP=Ir(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 GP(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ef=GP;function HP(){this.__data__=[],this.size=0}var qP=HP;function WP(e,t){return e===t||e!==e&&t!==t}var If=WP;function JP(e,t){for(var r=e.length;r--;)if(If(e[r][0],t))return r;return-1}var ci=JP,YP=Array.prototype,KP=YP.splice;function QP(e){var t=this.__data__,r=ci(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():KP.call(t,r,1),--this.size,!0}var XP=QP;function ZP(e){var t=this.__data__,r=ci(t,e);return r<0?void 0:t[r][1]}var eA=ZP;function tA(e){return ci(this.__data__,e)>-1}var rA=tA;function nA(e,t){var r=this.__data__,n=ci(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var oA=nA;function Nn(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])}}Nn.prototype.clear=qP;Nn.prototype.delete=XP;Nn.prototype.get=eA;Nn.prototype.has=rA;Nn.prototype.set=oA;var ui=Nn;function sA(){this.__data__=new ui,this.size=0}var aA=sA;function iA(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var lA=iA;function cA(e){return this.__data__.get(e)}var uA=cA;function dA(e){return this.__data__.has(e)}var hA=dA,pA=typeof global=="object"&&global&&global.Object===Object&&global,_f=pA,mA=typeof self=="object"&&self&&self.Object===Object&&self,fA=_f||mA||Function("return this")(),ir=fA,gA=ir.Symbol,Un=gA,Mf=Object.prototype,yA=Mf.hasOwnProperty,bA=Mf.toString,oo=Un?Un.toStringTag:void 0;function xA(e){var t=yA.call(e,oo),r=e[oo];try{e[oo]=void 0;var n=!0}catch{}var o=bA.call(e);return n&&(t?e[oo]=r:delete e[oo]),o}var vA=xA,SA=Object.prototype,wA=SA.toString;function CA(e){return wA.call(e)}var OA=CA,TA="[object Null]",PA="[object Undefined]",lh=Un?Un.toStringTag:void 0;function AA(e){return e==null?e===void 0?PA:TA:lh&&lh in Object(e)?vA(e):OA(e)}var Jo=AA,RA="[object AsyncFunction]",EA="[object Function]",IA="[object GeneratorFunction]",_A="[object Proxy]";function MA(e){if(!Ef(e))return!1;var t=Jo(e);return t==EA||t==IA||t==RA||t==_A}var Vf=MA,VA=ir["__core-js_shared__"],Zi=VA,ch=function(){var e=/[^.]+$/.exec(Zi&&Zi.keys&&Zi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function kA(e){return!!ch&&ch in e}var jA=kA,$A=Function.prototype,DA=$A.toString;function UA(e){if(e!=null){try{return DA.call(e)}catch{}try{return e+""}catch{}}return""}var tn=UA,LA=/[\\^$.*+?()[\]{}|]/g,BA=/^\[object .+?Constructor\]$/,FA=Function.prototype,NA=Object.prototype,zA=FA.toString,GA=NA.hasOwnProperty,HA=RegExp("^"+zA.call(GA).replace(LA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qA(e){if(!Ef(e)||jA(e))return!1;var t=Vf(e)?HA:BA;return t.test(tn(e))}var WA=qA;function JA(e,t){return e==null?void 0:e[t]}var YA=JA;function KA(e,t){var r=YA(e,t);return WA(r)?r:void 0}var zn=KA,QA=zn(ir,"Map"),Vo=QA,XA=zn(Object,"create"),ko=XA;function ZA(){this.__data__=ko?ko(null):{},this.size=0}var eR=ZA;function tR(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var rR=tR,nR="__lodash_hash_undefined__",oR=Object.prototype,sR=oR.hasOwnProperty;function aR(e){var t=this.__data__;if(ko){var r=t[e];return r===nR?void 0:r}return sR.call(t,e)?t[e]:void 0}var iR=aR,lR=Object.prototype,cR=lR.hasOwnProperty;function uR(e){var t=this.__data__;return ko?t[e]!==void 0:cR.call(t,e)}var dR=uR,hR="__lodash_hash_undefined__";function pR(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ko&&t===void 0?hR:t,this}var mR=pR;function Gn(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])}}Gn.prototype.clear=eR;Gn.prototype.delete=rR;Gn.prototype.get=iR;Gn.prototype.has=dR;Gn.prototype.set=mR;var uh=Gn;function fR(){this.size=0,this.__data__={hash:new uh,map:new(Vo||ui),string:new uh}}var gR=fR;function yR(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var bR=yR;function xR(e,t){var r=e.__data__;return bR(t)?r[typeof t=="string"?"string":"hash"]:r.map}var di=xR;function vR(e){var t=di(this,e).delete(e);return this.size-=t?1:0,t}var SR=vR;function wR(e){return di(this,e).get(e)}var CR=wR;function OR(e){return di(this,e).has(e)}var TR=OR;function PR(e,t){var r=di(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var AR=PR;function Hn(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])}}Hn.prototype.clear=gR;Hn.prototype.delete=SR;Hn.prototype.get=CR;Hn.prototype.has=TR;Hn.prototype.set=AR;var kf=Hn,RR=200;function ER(e,t){var r=this.__data__;if(r instanceof ui){var n=r.__data__;if(!Vo||n.length<RR-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new kf(n)}return r.set(e,t),this.size=r.size,this}var IR=ER;function qn(e){var t=this.__data__=new ui(e);this.size=t.size}qn.prototype.clear=aA;qn.prototype.delete=lA;qn.prototype.get=uA;qn.prototype.has=hA;qn.prototype.set=IR;var el=qn,_R="__lodash_hash_undefined__";function MR(e){return this.__data__.set(e,_R),this}var VR=MR;function kR(e){return this.__data__.has(e)}var jR=kR;function ga(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new kf;++t<r;)this.add(e[t])}ga.prototype.add=ga.prototype.push=VR;ga.prototype.has=jR;var $R=ga;function DR(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 UR=DR;function LR(e,t){return e.has(t)}var BR=LR,FR=1,NR=2;function zR(e,t,r,n,o,s){var a=r&FR,i=e.length,l=t.length;if(i!=l&&!(a&&l>i))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&NR?new $R:void 0;for(s.set(e,t),s.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var y=a?n(m,f,d,t,e,s):n(f,m,d,e,t,s);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!UR(t,function(b,C){if(!BR(p,C)&&(f===b||o(f,b,r,n,s)))return p.push(C)})){h=!1;break}}else if(!(f===m||o(f,m,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}var jf=zR,GR=ir.Uint8Array,dh=GR;function HR(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}var qR=HR;function WR(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var JR=WR,YR=1,KR=2,QR="[object Boolean]",XR="[object Date]",ZR="[object Error]",eE="[object Map]",tE="[object Number]",rE="[object RegExp]",nE="[object Set]",oE="[object String]",sE="[object Symbol]",aE="[object ArrayBuffer]",iE="[object DataView]",hh=Un?Un.prototype:void 0,tl=hh?hh.valueOf:void 0;function lE(e,t,r,n,o,s,a){switch(r){case iE:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case aE:return!(e.byteLength!=t.byteLength||!s(new dh(e),new dh(t)));case QR:case XR:case tE:return If(+e,+t);case ZR:return e.name==t.name&&e.message==t.message;case rE:case oE:return e==t+"";case eE:var i=qR;case nE:var l=n&YR;if(i||(i=JR),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=KR,a.set(e,t);var u=jf(i(e),i(t),n,o,s,a);return a.delete(e),u;case sE:if(tl)return tl.call(e)==tl.call(t)}return!1}var cE=lE;function uE(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var dE=uE,hE=Array.isArray,ya=hE;function pE(e,t,r){var n=t(e);return ya(e)?n:dE(n,r(e))}var mE=pE;function fE(e,t){for(var r=-1,n=e==null?0:e.length,o=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[o++]=a)}return s}var gE=fE;function yE(){return[]}var bE=yE,xE=Object.prototype,vE=xE.propertyIsEnumerable,ph=Object.getOwnPropertySymbols,SE=ph?function(e){return e==null?[]:(e=Object(e),gE(ph(e),function(t){return vE.call(e,t)}))}:bE,wE=SE;function CE(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var OE=CE;function TE(e){return e!=null&&typeof e=="object"}var jo=TE,PE="[object Arguments]";function AE(e){return jo(e)&&Jo(e)==PE}var mh=AE,$f=Object.prototype,RE=$f.hasOwnProperty,EE=$f.propertyIsEnumerable,IE=mh(function(){return arguments}())?mh:function(e){return jo(e)&&RE.call(e,"callee")&&!EE.call(e,"callee")},_E=IE;function ME(){return!1}var VE=ME,Df=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fh=Df&&typeof module=="object"&&module&&!module.nodeType&&module,kE=fh&&fh.exports===Df,gh=kE?ir.Buffer:void 0,jE=gh?gh.isBuffer:void 0,$E=jE||VE,Vl=$E,DE=9007199254740991,UE=/^(?:0|[1-9]\d*)$/;function LE(e,t){var r=typeof e;return t=t??DE,!!t&&(r=="number"||r!="symbol"&&UE.test(e))&&e>-1&&e%1==0&&e<t}var BE=LE,FE=9007199254740991;function NE(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=FE}var Uf=NE,zE="[object Arguments]",GE="[object Array]",HE="[object Boolean]",qE="[object Date]",WE="[object Error]",JE="[object Function]",YE="[object Map]",KE="[object Number]",QE="[object Object]",XE="[object RegExp]",ZE="[object Set]",eI="[object String]",tI="[object WeakMap]",rI="[object ArrayBuffer]",nI="[object DataView]",oI="[object Float32Array]",sI="[object Float64Array]",aI="[object Int8Array]",iI="[object Int16Array]",lI="[object Int32Array]",cI="[object Uint8Array]",uI="[object Uint8ClampedArray]",dI="[object Uint16Array]",hI="[object Uint32Array]",Ie={};Ie[oI]=Ie[sI]=Ie[aI]=Ie[iI]=Ie[lI]=Ie[cI]=Ie[uI]=Ie[dI]=Ie[hI]=!0;Ie[zE]=Ie[GE]=Ie[rI]=Ie[HE]=Ie[nI]=Ie[qE]=Ie[WE]=Ie[JE]=Ie[YE]=Ie[KE]=Ie[QE]=Ie[XE]=Ie[ZE]=Ie[eI]=Ie[tI]=!1;function pI(e){return jo(e)&&Uf(e.length)&&!!Ie[Jo(e)]}var mI=pI;function fI(e){return function(t){return e(t)}}var gI=fI,Lf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vo=Lf&&typeof module=="object"&&module&&!module.nodeType&&module,yI=vo&&vo.exports===Lf,rl=yI&&_f.process,bI=function(){try{var e=vo&&vo.require&&vo.require("util").types;return e||rl&&rl.binding&&rl.binding("util")}catch{}}(),yh=bI,bh=yh&&yh.isTypedArray,xI=bh?gI(bh):mI,Bf=xI,vI=Object.prototype,SI=vI.hasOwnProperty;function wI(e,t){var r=ya(e),n=!r&&_E(e),o=!r&&!n&&Vl(e),s=!r&&!n&&!o&&Bf(e),a=r||n||o||s,i=a?OE(e.length,String):[],l=i.length;for(var c in e)(t||SI.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||BE(c,l)))&&i.push(c);return i}var CI=wI,OI=Object.prototype;function TI(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||OI;return e===r}var PI=TI;function AI(e,t){return function(r){return e(t(r))}}var RI=AI,EI=RI(Object.keys,Object),II=EI,_I=Object.prototype,MI=_I.hasOwnProperty;function VI(e){if(!PI(e))return II(e);var t=[];for(var r in Object(e))MI.call(e,r)&&r!="constructor"&&t.push(r);return t}var kI=VI;function jI(e){return e!=null&&Uf(e.length)&&!Vf(e)}var $I=jI;function DI(e){return $I(e)?CI(e):kI(e)}var UI=DI;function LI(e){return mE(e,UI,wE)}var xh=LI,BI=1,FI=Object.prototype,NI=FI.hasOwnProperty;function zI(e,t,r,n,o,s){var a=r&BI,i=xh(e),l=i.length,c=xh(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=i[d];if(!(a?h in t:NI.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var m=!0;s.set(e,t),s.set(t,e);for(var y=a;++d<l;){h=i[d];var b=e[h],C=t[h];if(n)var w=a?n(C,b,h,t,e,s):n(b,C,h,e,t,s);if(!(w===void 0?b===C||o(b,C,r,n,s):w)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var T=e.constructor,A=t.constructor;T!=A&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof A=="function"&&A instanceof A)&&(m=!1)}return s.delete(e),s.delete(t),m}var GI=zI,HI=zn(ir,"DataView"),kl=HI,qI=zn(ir,"Promise"),jl=qI,WI=zn(ir,"Set"),$l=WI,JI=zn(ir,"WeakMap"),Dl=JI,vh="[object Map]",YI="[object Object]",Sh="[object Promise]",wh="[object Set]",Ch="[object WeakMap]",Oh="[object DataView]",KI=tn(kl),QI=tn(Vo),XI=tn(jl),ZI=tn($l),e_=tn(Dl),kr=Jo;(kl&&kr(new kl(new ArrayBuffer(1)))!=Oh||Vo&&kr(new Vo)!=vh||jl&&kr(jl.resolve())!=Sh||$l&&kr(new $l)!=wh||Dl&&kr(new Dl)!=Ch)&&(kr=function(e){var t=Jo(e),r=t==YI?e.constructor:void 0,n=r?tn(r):"";if(n)switch(n){case KI:return Oh;case QI:return vh;case XI:return Sh;case ZI:return wh;case e_:return Ch}return t});var Th=kr,t_=1,Ph="[object Arguments]",Ah="[object Array]",Cs="[object Object]",r_=Object.prototype,Rh=r_.hasOwnProperty;function n_(e,t,r,n,o,s){var a=ya(e),i=ya(t),l=a?Ah:Th(e),c=i?Ah:Th(t);l=l==Ph?Cs:l,c=c==Ph?Cs:c;var u=l==Cs,d=c==Cs,h=l==c;if(h&&Vl(e)){if(!Vl(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new el),a||Bf(e)?jf(e,t,r,n,o,s):cE(e,t,l,r,n,o,s);if(!(r&t_)){var p=u&&Rh.call(e,"__wrapped__"),f=d&&Rh.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,y=f?t.value():t;return s||(s=new el),o(m,y,r,n,s)}}return h?(s||(s=new el),GI(e,t,r,n,o,s)):!1}var o_=n_;function Ff(e,t,r,n,o){return e===t?!0:e==null||t==null||!jo(e)&&!jo(t)?e!==e&&t!==t:o_(e,t,r,n,Ff,o)}var s_=Ff;function a_(e,t){return s_(e,t)}var i_=a_;/*! *****************************************************************************
|
|
128
133
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
129
134
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
130
135
|
this file except in compliance with the License. You may obtain a copy of the
|
|
@@ -137,19 +142,19 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
137
142
|
|
|
138
143
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
139
144
|
and limitations under the License.
|
|
140
|
-
***************************************************************************** */var
|
|
145
|
+
***************************************************************************** */var Ul=function(e,t){return Ul=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])},Ul(e,t)};function Nf(e,t){Ul(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function l_(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 c_(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(i){a={error:i}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s}function u_(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c_(arguments[t]));return e}var zf=function(){function e(t,r){this.target=r,this.type=t}return e}(),d_=function(e){Nf(t,e);function t(r,n){var o=e.call(this,"error",n)||this;return o.message=r.message,o.error=r,o}return t}(zf),h_=function(e){Nf(t,e);function t(r,n,o){r===void 0&&(r=1e3),n===void 0&&(n="");var s=e.call(this,"close",o)||this;return s.wasClean=!0,s.code=r,s.reason=n,s}return t}(zf);/*!
|
|
141
146
|
* Reconnecting WebSocket
|
|
142
147
|
* by Pedro Ladaria <pedro.ladaria@gmail.com>
|
|
143
148
|
* https://github.com/pladaria/reconnecting-websocket
|
|
144
149
|
* License MIT
|
|
145
|
-
*/var x2=function(){if(typeof WebSocket<"u")return WebSocket},v2=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},xr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},S2=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?xr.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?xr.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=m2(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,g2(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,r=t.reconnectionDelayGrowFactor,n=r===void 0?xr.reconnectionDelayGrowFactor:r,a=t.minReconnectionDelay,o=a===void 0?xr.minReconnectionDelay:a,s=t.maxReconnectionDelay,i=s===void 0?xr.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?xr.maxRetries:n,o=r.connectionTimeout,s=o===void 0?xr.connectionTimeout:o,i=r.WebSocket,l=i===void 0?x2():i;if(this._retryCount>=a){this._debug("max retries reached",this._retryCount,">=",a);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!v2(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 y2(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 b2(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}(),w2=Object.defineProperty,C2=Object.defineProperties,O2=Object.getOwnPropertyDescriptors,qd=Object.getOwnPropertySymbols,T2=Object.prototype.hasOwnProperty,P2=Object.prototype.propertyIsEnumerable,Wd=(e,t,r)=>t in e?w2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cn=(e,t)=>{for(var r in t||(t={}))T2.call(t,r)&&Wd(e,r,t[r]);if(qd)for(var r of qd(t))P2.call(t,r)&&Wd(e,r,t[r]);return e},hl=(e,t)=>C2(e,O2(t)),_e=(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())}),R2=class extends S2{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 _e(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.OPEN?e():(this.addEventListener("open",()=>e()),this.addEventListener("error",t))})})}closed(){return _e(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.CLOSED?e():(this.addEventListener("close",()=>e()),this.addEventListener("error",t))})})}firstMessage(){return _e(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 _e(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)})})}},A2=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}},Ei=new A2;function ur(e){try{return JSON.parse(e)}catch{return}}function I2(e,t){return e||(e="world"),t||(t="world"),e===t}var pn="wandelbots.io",_i={dev:{domain:`https://auth.portal.dev.${pn}`,clientId:"fLbJD0RLp5r2Dpucm5j8BjwMR6Hunfha"},stg:{domain:`https://auth.portal.stg.${pn}`,clientId:"joVDeD9e786WzFNSGCqoVq7HNkWt5j6s"},prod:{domain:`https://auth.portal.${pn}`,clientId:"J7WJUi38xVQdJAEBNRT9Xw1b0fXDb4J2"}},E2=e=>{if(e.includes(`dev.${pn}`))return _i.dev;if(e.includes(`stg.${pn}`))return _i.stg;if(e.includes(pn))return _i.prod;throw new Error("Unsupported instance URL. Cannot determine Auth0 configuration.")},_2=e=>_e(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=E2(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 Xm(e,t){return function(){return e.apply(t,arguments)}}const{toString:V2}=Object.prototype,{getPrototypeOf:Tc}=Object,Us=(e=>t=>{const r=V2.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),At=e=>(e=e.toLowerCase(),t=>Us(t)===e),Ds=e=>t=>typeof t===e,{isArray:Mn}=Array,wa=Ds("undefined");function M2(e){return e!==null&&!wa(e)&&e.constructor!==null&&!wa(e.constructor)&&pt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Zm=At("ArrayBuffer");function j2(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Zm(e.buffer),t}const k2=Ds("string"),pt=Ds("function"),ef=Ds("number"),Ls=e=>e!==null&&typeof e=="object",$2=e=>e===!0||e===!1,wo=e=>{if(Us(e)!=="object")return!1;const t=Tc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},U2=At("Date"),D2=At("File"),L2=At("Blob"),B2=At("FileList"),F2=e=>Ls(e)&&pt(e.pipe),N2=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||pt(e.append)&&((t=Us(e))==="formdata"||t==="object"&&pt(e.toString)&&e.toString()==="[object FormData]"))},z2=At("URLSearchParams"),[G2,H2,q2,W2]=["ReadableStream","Request","Response","Headers"].map(At),J2=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ja(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),Mn(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 tf(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 Or=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,rf=e=>!wa(e)&&e!==Or;function pl(){const{caseless:e}=rf(this)&&this||{},t={},r=(n,a)=>{const o=e&&tf(t,a)||a;wo(t[o])&&wo(n)?t[o]=pl(t[o],n):wo(n)?t[o]=pl({},n):Mn(n)?t[o]=n.slice():t[o]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&ja(arguments[n],r);return t}const Y2=(e,t,r,{allOwnKeys:n}={})=>(ja(t,(a,o)=>{r&&pt(a)?e[o]=Xm(a,r):e[o]=a},{allOwnKeys:n}),e),K2=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Q2=(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)},X2=(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&&Tc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Z2=(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},eI=e=>{if(!e)return null;if(Mn(e))return e;let t=e.length;if(!ef(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},tI=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Tc(Uint8Array)),rI=(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])}},nI=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},aI=At("HTMLFormElement"),oI=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),Jd=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),sI=At("RegExp"),nf=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};ja(r,(a,o)=>{let s;(s=t(a,o,e))!==!1&&(n[o]=s||a)}),Object.defineProperties(e,n)},iI=e=>{nf(e,(t,r)=>{if(pt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(pt(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+"'")})}})},lI=(e,t)=>{const r={},n=a=>{a.forEach(o=>{r[o]=!0})};return Mn(e)?n(e):n(String(e).split(t)),r},cI=()=>{},uI=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function dI(e){return!!(e&&pt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const hI=e=>{const t=new Array(10),r=(n,a)=>{if(Ls(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const o=Mn(n)?[]:{};return ja(n,(s,i)=>{const l=r(s,a+1);!wa(l)&&(o[i]=l)}),t[a]=void 0,o}}return n};return r(e,0)},pI=At("AsyncFunction"),mI=e=>e&&(Ls(e)||pt(e))&&pt(e.then)&&pt(e.catch),af=((e,t)=>e?setImmediate:t?((r,n)=>(Or.addEventListener("message",({source:a,data:o})=>{a===Or&&o===r&&n.length&&n.shift()()},!1),a=>{n.push(a),Or.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",pt(Or.postMessage)),fI=typeof queueMicrotask<"u"?queueMicrotask.bind(Or):typeof process<"u"&&process.nextTick||af,q={isArray:Mn,isArrayBuffer:Zm,isBuffer:M2,isFormData:N2,isArrayBufferView:j2,isString:k2,isNumber:ef,isBoolean:$2,isObject:Ls,isPlainObject:wo,isReadableStream:G2,isRequest:H2,isResponse:q2,isHeaders:W2,isUndefined:wa,isDate:U2,isFile:D2,isBlob:L2,isRegExp:sI,isFunction:pt,isStream:F2,isURLSearchParams:z2,isTypedArray:tI,isFileList:B2,forEach:ja,merge:pl,extend:Y2,trim:J2,stripBOM:K2,inherits:Q2,toFlatObject:X2,kindOf:Us,kindOfTest:At,endsWith:Z2,toArray:eI,forEachEntry:rI,matchAll:nI,isHTMLForm:aI,hasOwnProperty:Jd,hasOwnProp:Jd,reduceDescriptors:nf,freezeMethods:iI,toObjectSet:lI,toCamelCase:oI,noop:cI,toFiniteNumber:uI,findKey:tf,global:Or,isContextDefined:rf,isSpecCompliantForm:dI,toJSONObject:hI,isAsyncFn:pI,isThenable:mI,setImmediate:af,asap:fI};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)}q.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:q.toJSONObject(this.config),code:this.code,status:this.status}}});const of=de.prototype,sf={};["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=>{sf[e]={value:e}});Object.defineProperties(de,sf);Object.defineProperty(of,"isAxiosError",{value:!0});de.from=(e,t,r,n,a,o)=>{const s=Object.create(of);return q.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 gI=null;function ml(e){return q.isPlainObject(e)||q.isArray(e)}function lf(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function Yd(e,t,r){return e?e.concat(t).map(function(a,o){return a=lf(a),!r&&o?"["+a+"]":a}).join(r?".":""):t}function yI(e){return q.isArray(e)&&!e.some(ml)}const bI=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function Bs(e,t,r){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=q.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!q.isUndefined(y[m])});const n=r.metaTokens,a=r.visitor||u,o=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(t);if(!q.isFunction(a))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(q.isDate(f))return f.toISOString();if(!l&&q.isBlob(f))throw new de("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(f)||q.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,y){let S=f;if(f&&!y&&typeof f=="object"){if(q.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(q.isArray(f)&&yI(f)||(q.isFileList(f)||q.endsWith(m,"[]"))&&(S=q.toArray(f)))return m=lf(m),S.forEach(function(w,O){!(q.isUndefined(w)||w===null)&&t.append(s===!0?Yd([m],O,o):s===null?m:m+"[]",c(w))}),!1}return ml(f)?!0:(t.append(Yd(y,m,o),c(f)),!1)}const d=[],h=Object.assign(bI,{defaultVisitor:u,convertValue:c,isVisitable:ml});function p(f,m){if(!q.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),q.forEach(f,function(S,A){(!(q.isUndefined(S)||S===null)&&a.call(t,S,q.isString(A)?A.trim():A,m,h))===!0&&p(S,m?m.concat(A):[A])}),d.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Kd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Pc(e,t){this._pairs=[],e&&Bs(e,this,t)}const cf=Pc.prototype;cf.append=function(t,r){this._pairs.push([t,r])};cf.toString=function(t){const r=t?function(n){return t.call(this,n,Kd)}:Kd;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function xI(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function uf(e,t,r){if(!t)return e;const n=r&&r.encode||xI;q.isFunction(r)&&(r={serialize:r});const a=r&&r.serialize;let o;if(a?o=a(t,r):o=q.isURLSearchParams(t)?t.toString():new Pc(t,r).toString(n),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Qd{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){q.forEach(this.handlers,function(n){n!==null&&t(n)})}}const df={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vI=typeof URLSearchParams<"u"?URLSearchParams:Pc,SI=typeof FormData<"u"?FormData:null,wI=typeof Blob<"u"?Blob:null,CI={isBrowser:!0,classes:{URLSearchParams:vI,FormData:SI,Blob:wI},protocols:["http","https","file","blob","url","data"]},Rc=typeof window<"u"&&typeof document<"u",fl=typeof navigator=="object"&&navigator||void 0,OI=Rc&&(!fl||["ReactNative","NativeScript","NS"].indexOf(fl.product)<0),TI=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",PI=Rc&&window.location.href||"http://localhost",RI=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Rc,hasStandardBrowserEnv:OI,hasStandardBrowserWebWorkerEnv:TI,navigator:fl,origin:PI},Symbol.toStringTag,{value:"Module"})),Xe={...RI,...CI};function AI(e,t){return Bs(e,new Xe.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,o){return Xe.isNode&&q.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function II(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function EI(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 hf(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&&q.isArray(a)?a.length:s,l?(q.hasOwnProp(a,s)?a[s]=[a[s],n]:a[s]=n,!i):((!a[s]||!q.isObject(a[s]))&&(a[s]=[]),t(r,n,a[s],o)&&q.isArray(a[s])&&(a[s]=EI(a[s])),!i)}if(q.isFormData(e)&&q.isFunction(e.entries)){const r={};return q.forEachEntry(e,(n,a)=>{t(II(n),a,r,0)}),r}return null}function _I(e,t,r){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const ka={transitional:df,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,o=q.isObject(t);if(o&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return a?JSON.stringify(hf(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.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 AI(t,this.formSerializer).toString();if((i=q.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Bs(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||a?(r.setContentType("application/json",!1),_I(t)):t}],transformResponse:[function(t){const r=this.transitional||ka.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.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:Xe.classes.FormData,Blob:Xe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],e=>{ka.headers[e]={}});const VI=q.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"]),MI=e=>{const t={};let r,n,a;return e&&e.split(`
|
|
146
|
-
`).forEach(function(
|
|
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[Xd]=this[Xd]={accessors:{}}).accessors,a=this.prototype;function o(s){const i=Wn(s);n[i]||(UI(a,s),n[i]=!0)}return q.isArray(t)?t.forEach(o):o(t),this}};it.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(it.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});q.freezeMethods(it);function Mi(e,t){const r=this||ka,n=t||r,a=it.from(n.headers);let o=n.data;return q.forEach(e,function(i){o=i.call(r,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function pf(e){return!!(e&&e.__CANCEL__)}function jn(e,t,r){de.call(this,e??"canceled",de.ERR_CANCELED,t,r),this.name="CanceledError"}q.inherits(jn,de,{__CANCEL__:!0});function mf(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 DI(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function LI(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 BI(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 Ko=(e,t,r=3)=>{let n=0;const a=LI(50,250);return BI(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]]},eh=e=>(...t)=>q.asap(()=>e(...t)),FI=Xe.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Xe.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Xe.origin),Xe.navigator&&/(msie|trident)/i.test(Xe.navigator.userAgent)):()=>!0,NI=Xe.hasStandardBrowserEnv?{write(e,t,r,n,a,o){const s=[e+"="+encodeURIComponent(t)];q.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),q.isString(n)&&s.push("path="+n),q.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 zI(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function GI(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ff(e,t,r){let n=!zI(t);return e&&n||r==!1?GI(e,t):t}const th=e=>e instanceof it?{...e}:e;function Vr(e,t){t=t||{};const r={};function n(c,u,d,h){return q.isPlainObject(c)&&q.isPlainObject(u)?q.merge.call({caseless:h},c,u):q.isPlainObject(u)?q.merge({},u):q.isArray(u)?u.slice():u}function a(c,u,d,h){if(q.isUndefined(u)){if(!q.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function o(c,u){if(!q.isUndefined(u))return n(void 0,u)}function s(c,u){if(q.isUndefined(u)){if(!q.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(th(c),th(u),d,!0)};return q.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||a,h=d(e[u],t[u],u);q.isUndefined(h)&&d!==i||(r[u]=h)}),r}const gf=e=>{const t=Vr({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:o,headers:s,auth:i}=t;t.headers=s=it.from(s),t.url=uf(ff(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(q.isFormData(r)){if(Xe.hasStandardBrowserEnv||Xe.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(Xe.hasStandardBrowserEnv&&(n&&q.isFunction(n)&&(n=n(t)),n||n!==!1&&FI(t.url))){const c=a&&o&&NI.read(o);c&&s.set(a,c)}return t},HI=typeof XMLHttpRequest<"u",qI=HI&&function(e){return new Promise(function(r,n){const a=gf(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 y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function S(){if(!y)return;const w=it.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),T={data:!i||i==="text"||i==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:w,config:e,request:y};mf(function(R){r(R),m()},function(R){n(R),m()},T),y=null}"onloadend"in y?y.onloadend=S:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(S)},y.onabort=function(){y&&(n(new de("Request aborted",de.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new de("Network Error",de.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let O=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const T=a.transitional||df;a.timeoutErrorMessage&&(O=a.timeoutErrorMessage),n(new de(O,T.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,y)),y=null},o===void 0&&s.setContentType(null),"setRequestHeader"in y&&q.forEach(s.toJSON(),function(O,T){y.setRequestHeader(T,O)}),q.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),i&&i!=="json"&&(y.responseType=a.responseType),c&&([h,f]=Ko(c,!0),y.addEventListener("progress",h)),l&&y.upload&&([d,p]=Ko(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(u=w=>{y&&(n(!w||w.type?new jn(null,e,y):w),y.abort(),y=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const A=DI(a.url);if(A&&Xe.protocols.indexOf(A)===-1){n(new de("Unsupported protocol "+A+":",de.ERR_BAD_REQUEST,e));return}y.send(o||null)})},WI=(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 jn(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=()=>q.asap(i),l}},JI=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},YI=async function*(e,t){for await(const r of KI(e))yield*JI(r,t)},KI=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()}},rh=(e,t,r,n)=>{const a=YI(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})},Fs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",yf=Fs&&typeof ReadableStream=="function",QI=Fs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),bf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},XI=yf&&bf(()=>{let e=!1;const t=new Request(Xe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),nh=64*1024,gl=yf&&bf(()=>q.isReadableStream(new Response("").body)),Qo={stream:gl&&(e=>e.body)};Fs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Qo[t]&&(Qo[t]=q.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 ZI=async e=>{if(e==null)return 0;if(q.isBlob(e))return e.size;if(q.isSpecCompliantForm(e))return(await new Request(Xe.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(q.isArrayBufferView(e)||q.isArrayBuffer(e))return e.byteLength;if(q.isURLSearchParams(e)&&(e=e+""),q.isString(e))return(await QI(e)).byteLength},eE=async(e,t)=>{const r=q.toFiniteNumber(e.getContentLength());return r??ZI(t)},tE=Fs&&(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}=gf(e);c=c?(c+"").toLowerCase():"text";let p=WI([a,o&&o.toAbortSignal()],s),f;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(l&&XI&&r!=="get"&&r!=="head"&&(y=await eE(u,n))!==0){let T=new Request(t,{method:"POST",body:n,duplex:"half"}),C;if(q.isFormData(n)&&(C=T.headers.get("content-type"))&&u.setContentType(C),T.body){const[R,E]=Zd(y,Ko(eh(l)));n=rh(T.body,nh,R,E)}}q.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 A=await fetch(f);const w=gl&&(c==="stream"||c==="response");if(gl&&(i||w&&m)){const T={};["status","statusText","headers"].forEach(V=>{T[V]=A[V]});const C=q.toFiniteNumber(A.headers.get("content-length")),[R,E]=i&&Zd(C,Ko(eh(i),!0))||[];A=new Response(rh(A.body,nh,R,()=>{E&&E(),m&&m()}),T)}c=c||"text";let O=await Qo[q.findKey(Qo,c)||"text"](A,e);return!w&&m&&m(),await new Promise((T,C)=>{mf(T,C,{data:O,headers:it.from(A.headers),status:A.status,statusText:A.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)}}),yl={http:gI,xhr:qI,fetch:tE};q.forEach(yl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ah=e=>`- ${e}`,rE=e=>q.isFunction(e)||e===null||e===!1,xf={getAdapter:e=>{e=q.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,!rE(r)&&(n=yl[(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
|
-
`+
|
|
149
|
-
`):" "+
|
|
150
|
-
`+o):n.stack=o}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Vr(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:o}=r;n!==void 0&&Oo.assertOptions(n,{silentJSONParsing:_t.transitional(_t.boolean),forcedJSONParsing:_t.transitional(_t.boolean),clarifyTimeoutError:_t.transitional(_t.boolean)},!1),a!=null&&(q.isFunction(a)?r.paramsSerializer={serialize:a}:Oo.assertOptions(a,{encode:_t.function,serialize:_t.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Oo.assertOptions(r,{baseUrl:_t.spelling("baseURL"),withXsrfToken:_t.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=o&&q.merge(o.common,o[r.method]);o&&q.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=[oh.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(y){m.call(this,y);break}}try{u=oh.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=Vr(this.defaults,t);const r=ff(t.baseURL,t.url,t.allowAbsoluteUrls);return uf(r,t.params,t.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(t){Rr.prototype[t]=function(r,n){return this.request(Vr(n||{},{method:t,url:r,data:(n||{}).data}))}});q.forEach(["post","put","patch"],function(t){function r(n){return function(o,s,i){return this.request(Vr(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Rr.prototype[t]=r(),Rr.prototype[t+"Form"]=r(!0)});let aE=class Sf{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 jn(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 Sf(function(a){t=a}),cancel:t}}};function oE(e){return function(r){return e.apply(null,r)}}function sE(e){return q.isObject(e)&&e.isAxiosError===!0}const bl={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(bl).forEach(([e,t])=>{bl[t]=e});function wf(e){const t=new Rr(e),r=Xm(Rr.prototype.request,t);return q.extend(r,Rr.prototype,t,{allOwnKeys:!0}),q.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return wf(Vr(e,a))},r}const _=wf(ka);_.Axios=Rr;_.CanceledError=jn;_.CancelToken=aE;_.isCancel=pf;_.VERSION=vf;_.toFormData=Bs;_.AxiosError=de;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=oE;_.isAxiosError=sE;_.mergeConfig=Vr;_.AxiosHeaders=it;_.formToJSON=e=>hf(q.isHTMLForm(e)?new FormData(e):e);_.getAdapter=xf.getAdapter;_.HttpStatusCode=bl;_.default=_;const{Axios:jj,AxiosError:xl,CanceledError:kj,isCancel:$j,CancelToken:Uj,VERSION:Dj,all:Lj,Cancel:Bj,isAxiosError:iE,spread:Fj,toFormData:Nj,AxiosHeaders:zj,HttpStatusCode:Gj,formToJSON:Hj,getAdapter:qj,mergeConfig:Wj}=_,j="/api/v1".replace(/\/+$/,"");class Ve{constructor(t,r=j,n=_){$n(this,"basePath");$n(this,"axios");$n(this,"configuration");this.basePath=r,this.axios=n,t&&(this.configuration=t,this.basePath=t.basePath??r)}}class lE extends Error{constructor(r,n){super(n);$n(this,"field");this.field=r,this.name="RequiredError"}}const k={},$="https://example.com",v=function(e,t,r){if(r==null)throw new lE(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},U=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},D=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 vl(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>vl(e,n,r)):Object.keys(t).forEach(n=>vl(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);vl(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||""},B=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)}},kt={Abb:"abb",Fanuc:"fanuc",Kuka:"kuka",Universalrobots:"universalrobots",Yaskawa:"yaskawa"},cE=function(e){return{addApp:async(t,r,n,a={})=>{v("addApp","cell",t),v("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={};U(l,e),await D(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:B(s),options:l}},clearApps:async(t,r,n={})=>{v("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={};U(i,e),await D(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:B(o),options:i}},deleteApp:async(t,r,n,a={})=>{v("deleteApp","cell",t),v("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={};U(l,e),await D(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:B(s),options:l}},getApp:async(t,r,n={})=>{v("getApp","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listApps:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},updateApp:async(t,r,n,a,o={})=>{v("updateApp","cell",t),v("updateApp","app",r),v("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={};U(c,e),await D(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:B(i),options:c}}}},Zr=function(e){const t=cE(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=k["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["ApplicationApi.clearApps"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["ApplicationApi.getApp"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ApplicationApi.listApps"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,j,e)(h,c||p)}}};class ih extends Ve{addApp(t,r,n,a){return Zr(this.configuration).addApp(t,r,n,a).then(o=>o(this.axios,this.basePath))}clearApps(t,r,n){return Zr(this.configuration).clearApps(t,r,n).then(a=>a(this.axios,this.basePath))}deleteApp(t,r,n,a){return Zr(this.configuration).deleteApp(t,r,n,a).then(o=>o(this.axios,this.basePath))}getApp(t,r,n){return Zr(this.configuration).getApp(t,r,n).then(a=>a(this.axios,this.basePath))}listApps(t,r){return Zr(this.configuration).listApps(t,r).then(n=>n(this.axios,this.basePath))}updateApp(t,r,n,a,o){return Zr(this.configuration).updateApp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const uE=function(e){return{deleteCell:async(t,r,n={})=>{v("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={};U(i,e),await D(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:B(o),options:i}},deployCell:async(t,r,n={})=>{v("deployCell","cell",t);const a="/cells",o=new URL(a,$);let s;e&&(s=e.baseOptions);const i={method:"POST",...s,...n},l={},c={};U(i,e),await D(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:B(o),options:i}},getCell:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},getCellStatus:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(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={};U(o,e),await D(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:B(n),options:o}},updateCell:async(t,r,n,a={})=>{v("updateCell","cell",t),v("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={};U(l,e),await D(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:B(s),options:l}}}},en=function(e){const t=uE(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=k["CellApi.deleteCell"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["CellApi.deployCell"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["CellApi.getCell"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["CellApi.getCellStatus"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["CellApi.listCells"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>F(n,_,j,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=k["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,e)(d,l||h)}}};class dE extends Ve{deleteCell(t,r,n){return en(this.configuration).deleteCell(t,r,n).then(a=>a(this.axios,this.basePath))}deployCell(t,r,n){return en(this.configuration).deployCell(t,r,n).then(a=>a(this.axios,this.basePath))}getCell(t,r){return en(this.configuration).getCell(t,r).then(n=>n(this.axios,this.basePath))}getCellStatus(t,r){return en(this.configuration).getCellStatus(t,r).then(n=>n(this.axios,this.basePath))}listCells(t){return en(this.configuration).listCells(t).then(r=>r(this.axios,this.basePath))}updateCell(t,r,n,a){return en(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={})=>{v("addRobotController","cell",t),v("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={};U(l,e),await D(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:B(s),options:l}},clearRobotControllers:async(t,r,n={})=>{v("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={};U(i,e),await D(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:B(o),options:i}},deleteRobotController:async(t,r,n,a={})=>{v("deleteRobotController","cell",t),v("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={};U(l,e),await D(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:B(s),options:l}},getCurrentRobotControllerState:async(t,r,n={})=>{v("getCurrentRobotControllerState","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getMode:async(t,r,n={})=>{v("getMode","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getRobotController:async(t,r,n={})=>{v("getRobotController","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getSupportedModes:async(t,r,n={})=>{v("getSupportedModes","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getVirtualRobotConfiguration:async(t,r,n={})=>{v("getVirtualRobotConfiguration","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listControllers:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},setDefaultMode:async(t,r,n,a={})=>{v("setDefaultMode","cell",t),v("setDefaultMode","controller",r),v("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={};U(l,e),await D(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:B(s),options:l}},streamFreeDrive:async(t,r,n,a={})=>{v("streamFreeDrive","cell",t),v("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={};U(l,e),await D(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:B(s),options:l}},streamModeChange:async(t,r,n={})=>{v("streamModeChange","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},streamRobotControllerState:async(t,r,n,a={})=>{v("streamRobotControllerState","cell",t),v("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={};U(l,e),await D(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:B(s),options:l}},updateRobotController:async(t,r,n,a,o={})=>{v("updateRobotController","cell",t),v("updateRobotController","controller",r),v("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={};U(c,e),await D(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:B(i),options:c}}}},nt=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=k["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["ControllerApi.clearRobotControllers"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ControllerApi.getMode"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ControllerApi.getRobotController"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ControllerApi.getSupportedModes"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ControllerApi.getVirtualRobotConfiguration"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ControllerApi.listControllers"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["ControllerApi.streamModeChange"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ControllerApi.streamRobotControllerState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,j,e)(h,c||p)}}};class pE extends Ve{addRobotController(t,r,n,a){return nt(this.configuration).addRobotController(t,r,n,a).then(o=>o(this.axios,this.basePath))}clearRobotControllers(t,r,n){return nt(this.configuration).clearRobotControllers(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRobotController(t,r,n,a){return nt(this.configuration).deleteRobotController(t,r,n,a).then(o=>o(this.axios,this.basePath))}getCurrentRobotControllerState(t,r,n){return nt(this.configuration).getCurrentRobotControllerState(t,r,n).then(a=>a(this.axios,this.basePath))}getMode(t,r,n){return nt(this.configuration).getMode(t,r,n).then(a=>a(this.axios,this.basePath))}getRobotController(t,r,n){return nt(this.configuration).getRobotController(t,r,n).then(a=>a(this.axios,this.basePath))}getSupportedModes(t,r,n){return nt(this.configuration).getSupportedModes(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotConfiguration(t,r,n){return nt(this.configuration).getVirtualRobotConfiguration(t,r,n).then(a=>a(this.axios,this.basePath))}listControllers(t,r){return nt(this.configuration).listControllers(t,r).then(n=>n(this.axios,this.basePath))}setDefaultMode(t,r,n,a){return nt(this.configuration).setDefaultMode(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamFreeDrive(t,r,n,a){return nt(this.configuration).streamFreeDrive(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamModeChange(t,r,n){return nt(this.configuration).streamModeChange(t,r,n).then(a=>a(this.axios,this.basePath))}streamRobotControllerState(t,r,n,a){return nt(this.configuration).streamRobotControllerState(t,r,n,a).then(o=>o(this.axios,this.basePath))}updateRobotController(t,r,n,a,o){return nt(this.configuration).updateRobotController(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const mE=function(e){return{listIODescriptions:async(t,r,n,a={})=>{v("listIODescriptions","cell",t),v("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={};U(l,e),await D(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},listIOValues:async(t,r,n,a={})=>{v("listIOValues","cell",t),v("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={};U(l,e),await D(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},setOutputValues:async(t,r,n,a={})=>{v("setOutputValues","cell",t),v("setOutputValues","controller",r),v("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={};U(l,e),await D(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:B(s),options:l}},streamIOValues:async(t,r,n,a={})=>{v("streamIOValues","cell",t),v("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={};U(l,e),await D(c,e),n&&(u.ios=n),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},waitForIOEvent:async(t,r,n,a,o,s,i,l={})=>{v("waitForIOEvent","cell",t),v("waitForIOEvent","controller",r),v("waitForIOEvent","io",n),v("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={};U(h,e),await D(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:B(u),options:h}}}},Jn=function(e){const t=mE(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=k["ControllerIOsApi.listIODescriptions"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["ControllerIOsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["ControllerIOsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["ControllerIOsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["ControllerIOsApi.waitForIOEvent"])==null?void 0:p[d])==null?void 0:f.url;return(m,y)=>F(u,_,j,e)(m,h||y)}}};class fE 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 gE=function(e){return{addCoordinateSystem:async(t,r,n={})=>{v("addCoordinateSystem","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},deleteCoordinateSystem:async(t,r,n={})=>{v("deleteCoordinateSystem","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getCoordinateSystem:async(t,r,n,a={})=>{v("getCoordinateSystem","cell",t),v("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={};U(l,e),await D(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:B(s),options:l}},listCoordinateSystems:async(t,r,n={})=>{v("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={};U(i,e),await D(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:B(o),options:i}},transformInCoordinateSystem:async(t,r,n,a={})=>{v("transformInCoordinateSystem","cell",t),v("transformInCoordinateSystem","coordinateSystem",r),v("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={};U(l,e),await D(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:B(s),options:l}}}},Yn=function(e){const t=gE(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=k["CoordinateSystemsApi.addCoordinateSystem"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["CoordinateSystemsApi.deleteCoordinateSystem"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["CoordinateSystemsApi.getCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["CoordinateSystemsApi.listCoordinateSystems"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["CoordinateSystemsApi.transformInCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,e)(d,l||h)}}};class yE extends Ve{addCoordinateSystem(t,r,n){return Yn(this.configuration).addCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}deleteCoordinateSystem(t,r,n){return Yn(this.configuration).deleteCoordinateSystem(t,r,n).then(a=>a(this.axios,this.basePath))}getCoordinateSystem(t,r,n,a){return Yn(this.configuration).getCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}listCoordinateSystems(t,r,n){return Yn(this.configuration).listCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}transformInCoordinateSystem(t,r,n,a){return Yn(this.configuration).transformInCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const bE=function(e){return{clearDevices:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},createDevice:async(t,r,n={})=>{v("createDevice","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},deleteDevice:async(t,r,n={})=>{v("deleteDevice","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getDevice:async(t,r,n={})=>{v("getDevice","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listDevices:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}}}},Kn=function(e){const t=bE(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=k["DeviceConfigurationApi.clearDevices"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["DeviceConfigurationApi.createDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["DeviceConfigurationApi.deleteDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["DeviceConfigurationApi.getDevice"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["DeviceConfigurationApi.listDevices"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,e)(c,s||u)}}};class xE extends Ve{clearDevices(t,r){return Kn(this.configuration).clearDevices(t,r).then(n=>n(this.axios,this.basePath))}createDevice(t,r,n){return Kn(this.configuration).createDevice(t,r,n).then(a=>a(this.axios,this.basePath))}deleteDevice(t,r,n){return Kn(this.configuration).deleteDevice(t,r,n).then(a=>a(this.axios,this.basePath))}getDevice(t,r,n){return Kn(this.configuration).getDevice(t,r,n).then(a=>a(this.axios,this.basePath))}listDevices(t,r){return Kn(this.configuration).listDevices(t,r).then(n=>n(this.axios,this.basePath))}}const vE=function(e){return{createProgram:async(t,r,n,a={})=>{v("createProgram","cell",t),v("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={};U(l,e),await D(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:B(s),options:l}},deleteProgram:async(t,r,n={})=>{v("deleteProgram","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},deleteProgramList:async(t,r,n={})=>{v("deleteProgramList","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},getProgram:async(t,r,n={})=>{v("getProgram","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},updateProgram:async(t,r,n,a={})=>{v("updateProgram","cell",t),v("updateProgram","program",r),v("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={};U(l,e),await D(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:B(s),options:l}}}},Qn=function(e){const t=vE(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=k["LibraryProgramApi.createProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["LibraryProgramApi.deleteProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["LibraryProgramApi.deleteProgramList"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["LibraryProgramApi.getProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["LibraryProgramApi.updateProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,e)(d,l||h)}}};class SE extends Ve{createProgram(t,r,n,a){return Qn(this.configuration).createProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}deleteProgram(t,r,n){return Qn(this.configuration).deleteProgram(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramList(t,r,n){return Qn(this.configuration).deleteProgramList(t,r,n).then(a=>a(this.axios,this.basePath))}getProgram(t,r,n){return Qn(this.configuration).getProgram(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgram(t,r,n,a){return Qn(this.configuration).updateProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const wE=function(e){return{getProgramMetadata:async(t,r,n={})=>{v("getProgramMetadata","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listProgramMetadata:async(t,r,n={})=>{v("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={};U(i,e),await D(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:B(o),options:i}},updateProgramMetadata:async(t,r,n,a={})=>{v("updateProgramMetadata","cell",t),v("updateProgramMetadata","program",r),v("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={};U(l,e),await D(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:B(s),options:l}},uploadProgramMetadataImage:async(t,r,n,a={})=>{v("uploadProgramMetadataImage","cell",t),v("uploadProgramMetadataImage","program",r),v("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);U(l,e),await D(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:B(s),options:l}}}},ao=function(e){const t=wE(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=k["LibraryProgramMetadataApi.getProgramMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["LibraryProgramMetadataApi.listProgramMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["LibraryProgramMetadataApi.updateProgramMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["LibraryProgramMetadataApi.uploadProgramMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,e)(d,l||h)}}};class CE extends Ve{getProgramMetadata(t,r,n){return ao(this.configuration).getProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramMetadata(t,r,n){return ao(this.configuration).listProgramMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}updateProgramMetadata(t,r,n,a){return ao(this.configuration).updateProgramMetadata(t,r,n,a).then(o=>o(this.axios,this.basePath))}uploadProgramMetadataImage(t,r,n,a){return ao(this.configuration).uploadProgramMetadataImage(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const OE=function(e){return{createRecipe:async(t,r,n,a,o={})=>{v("createRecipe","cell",t),v("createRecipe","programId",r),v("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={};U(c,e),await D(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:B(i),options:c}},deleteRecipe:async(t,r,n={})=>{v("deleteRecipe","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},deleteRecipeList:async(t,r,n={})=>{v("deleteRecipeList","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},getRecipe:async(t,r,n={})=>{v("getRecipe","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},updateRecipe:async(t,r,n,a={})=>{v("updateRecipe","cell",t),v("updateRecipe","recipe",r),v("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={};U(l,e),await D(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:B(s),options:l}}}},Xn=function(e){const t=OE(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=k["LibraryRecipeApi.createRecipe"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,j,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=k["LibraryRecipeApi.deleteRecipe"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["LibraryRecipeApi.deleteRecipeList"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["LibraryRecipeApi.getRecipe"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["LibraryRecipeApi.updateRecipe"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,e)(d,l||h)}}};class TE extends Ve{createRecipe(t,r,n,a,o){return Xn(this.configuration).createRecipe(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteRecipe(t,r,n){return Xn(this.configuration).deleteRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}deleteRecipeList(t,r,n){return Xn(this.configuration).deleteRecipeList(t,r,n).then(a=>a(this.axios,this.basePath))}getRecipe(t,r,n){return Xn(this.configuration).getRecipe(t,r,n).then(a=>a(this.axios,this.basePath))}updateRecipe(t,r,n,a){return Xn(this.configuration).updateRecipe(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const PE=function(e){return{getRecipeMetadata:async(t,r,n={})=>{v("getRecipeMetadata","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listRecipeMetadata:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},updateRecipeMetadata:async(t,r,n,a={})=>{v("updateRecipeMetadata","cell",t),v("updateRecipeMetadata","recipe",r),v("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={};U(l,e),await D(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:B(s),options:l}},uploadRecipeMetadataImage:async(t,r,n,a={})=>{v("uploadRecipeMetadataImage","cell",t),v("uploadRecipeMetadataImage","recipe",r),v("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);U(l,e),await D(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:B(s),options:l}}}},oo=function(e){const t=PE(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=k["LibraryRecipeMetadataApi.getRecipeMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["LibraryRecipeMetadataApi.listRecipeMetadata"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["LibraryRecipeMetadataApi.updateRecipeMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["LibraryRecipeMetadataApi.uploadRecipeMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,e)(d,l||h)}}};class RE extends Ve{getRecipeMetadata(t,r,n){return oo(this.configuration).getRecipeMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listRecipeMetadata(t,r){return oo(this.configuration).listRecipeMetadata(t,r).then(n=>n(this.axios,this.basePath))}updateRecipeMetadata(t,r,n,a){return oo(this.configuration).updateRecipeMetadata(t,r,n,a).then(o=>o(this.axios,this.basePath))}uploadRecipeMetadataImage(t,r,n,a){return oo(this.configuration).uploadRecipeMetadataImage(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const AE=function(e){return{deleteAllMotions:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},deleteMotion:async(t,r,n={})=>{v("deleteMotion","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},executeTrajectory:async(t,r,n={})=>{v("executeTrajectory","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},getMotionTrajectory:async(t,r,n,a,o={})=>{v("getMotionTrajectory","cell",t),v("getMotionTrajectory","motion",r),v("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={};U(c,e),await D(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:B(i),options:c}},getMotionTrajectorySample:async(t,r,n,a,o={})=>{v("getMotionTrajectorySample","cell",t),v("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={};U(c,e),await D(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:B(i),options:c}},getPlannedMotion:async(t,r,n,a={})=>{v("getPlannedMotion","cell",t),v("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={};U(l,e),await D(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:B(s),options:l}},getPlanningMotionGroupModels:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},listMotions:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},loadPlannedMotion:async(t,r,n={})=>{v("loadPlannedMotion","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},planCollisionFreePTP:async(t,r,n={})=>{v("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={};U(i,e),await D(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:B(o),options:i}},planMotion:async(t,r,n={})=>{v("planMotion","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},planTrajectory:async(t,r,n={})=>{v("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={};U(i,e),await D(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:B(o),options:i}},stopExecution:async(t,r,n={})=>{v("stopExecution","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},streamMove:async(t,r,n={})=>{v("streamMove","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},streamMoveBackward:async(t,r,n,a,o,s,i={})=>{v("streamMoveBackward","cell",t),v("streamMoveBackward","motion",r),v("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={};U(d,e),await D(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:B(c),options:d}},streamMoveForward:async(t,r,n,a,o,s,i={})=>{v("streamMoveForward","cell",t),v("streamMoveForward","motion",r),v("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={};U(d,e),await D(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:B(c),options:d}},streamMoveToTrajectoryViaJointPTP:async(t,r,n,a,o,s,i,l,c,u,d={})=>{v("streamMoveToTrajectoryViaJointPTP","cell",t),v("streamMoveToTrajectoryViaJointPTP","motion",r),v("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},y={},S={};U(m,e),await D(y,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 A=f&&f.headers?f.headers:{};return m.headers={...y,...A,...d.headers},{url:B(p),options:m}}}},Ke=function(e){const t=AE(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=k["MotionApi.deleteAllMotions"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["MotionApi.deleteMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionApi.executeTrajectory"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionApi.getMotionTrajectory"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,j,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=k["MotionApi.getMotionTrajectorySample"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,j,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=k["MotionApi.getPlannedMotion"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["MotionApi.getPlanningMotionGroupModels"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["MotionApi.listMotions"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["MotionApi.loadPlannedMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionApi.planCollisionFreePTP"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionApi.planMotion"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionApi.planTrajectory"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionApi.stopExecution"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionApi.streamMove"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionApi.streamMoveBackward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>F(c,_,j,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=k["MotionApi.streamMoveForward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>F(c,_,j,e)(f,d||m)},async streamMoveToTrajectoryViaJointPTP(r,n,a,o,s,i,l,c,u,d,h){var y,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=(y=k["MotionApi.streamMoveToTrajectoryViaJointPTP"])==null?void 0:y[f])==null?void 0:S.url;return(A,w)=>F(p,_,j,e)(A,m||w)}}};class IE extends Ve{deleteAllMotions(t,r){return Ke(this.configuration).deleteAllMotions(t,r).then(n=>n(this.axios,this.basePath))}deleteMotion(t,r,n){return Ke(this.configuration).deleteMotion(t,r,n).then(a=>a(this.axios,this.basePath))}executeTrajectory(t,r,n){return Ke(this.configuration).executeTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionTrajectory(t,r,n,a,o){return Ke(this.configuration).getMotionTrajectory(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getMotionTrajectorySample(t,r,n,a,o){return Ke(this.configuration).getMotionTrajectorySample(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getPlannedMotion(t,r,n,a){return Ke(this.configuration).getPlannedMotion(t,r,n,a).then(o=>o(this.axios,this.basePath))}getPlanningMotionGroupModels(t,r){return Ke(this.configuration).getPlanningMotionGroupModels(t,r).then(n=>n(this.axios,this.basePath))}listMotions(t,r){return Ke(this.configuration).listMotions(t,r).then(n=>n(this.axios,this.basePath))}loadPlannedMotion(t,r,n){return Ke(this.configuration).loadPlannedMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planCollisionFreePTP(t,r,n){return Ke(this.configuration).planCollisionFreePTP(t,r,n).then(a=>a(this.axios,this.basePath))}planMotion(t,r,n){return Ke(this.configuration).planMotion(t,r,n).then(a=>a(this.axios,this.basePath))}planTrajectory(t,r,n){return Ke(this.configuration).planTrajectory(t,r,n).then(a=>a(this.axios,this.basePath))}stopExecution(t,r,n){return Ke(this.configuration).stopExecution(t,r,n).then(a=>a(this.axios,this.basePath))}streamMove(t,r,n){return Ke(this.configuration).streamMove(t,r,n).then(a=>a(this.axios,this.basePath))}streamMoveBackward(t,r,n,a,o,s,i){return Ke(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 Ke(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 Ke(this.configuration).streamMoveToTrajectoryViaJointPTP(t,r,n,a,o,s,i,l,c,u,d).then(h=>h(this.axios,this.basePath))}}const EE=function(e){return{activateAllMotionGroups:async(t,r,n={})=>{v("activateAllMotionGroups","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},activateMotionGroup:async(t,r,n={})=>{v("activateMotionGroup","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},deactivateMotionGroup:async(t,r,n={})=>{v("deactivateMotionGroup","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listMotionGroups:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}}}},so=function(e){const t=EE(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=k["MotionGroupApi.activateAllMotionGroups"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionGroupApi.activateMotionGroup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionGroupApi.deactivateMotionGroup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionGroupApi.listMotionGroups"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,e)(c,s||u)}}};class _E extends Ve{activateAllMotionGroups(t,r,n){return so(this.configuration).activateAllMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}activateMotionGroup(t,r,n){return so(this.configuration).activateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}deactivateMotionGroup(t,r,n){return so(this.configuration).deactivateMotionGroup(t,r,n).then(a=>a(this.axios,this.basePath))}listMotionGroups(t,r){return so(this.configuration).listMotionGroups(t,r).then(n=>n(this.axios,this.basePath))}}const VE=function(e){return{getActivePayload:async(t,r,n={})=>{v("getActivePayload","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getActiveTcp:async(t,r,n,a={})=>{v("getActiveTcp","cell",t),v("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={};U(l,e),await D(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:B(s),options:l}},getCurrentMotionGroupState:async(t,r,n,a,o={})=>{v("getCurrentMotionGroupState","cell",t),v("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={};U(c,e),await D(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:B(i),options:c}},getInfoCapabilities:async(t,r,n={})=>{v("getInfoCapabilities","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getMotionGroupSpecification:async(t,r,n={})=>{v("getMotionGroupSpecification","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getMounting:async(t,r,n={})=>{v("getMounting","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getOptimizerConfiguration:async(t,r,n,a={})=>{v("getOptimizerConfiguration","cell",t),v("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={};U(l,e),await D(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:B(s),options:l}},getSafetySetup:async(t,r,n={})=>{v("getSafetySetup","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listPayloads:async(t,r,n={})=>{v("listPayloads","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listTcps:async(t,r,n,a={})=>{v("listTcps","cell",t),v("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={};U(l,e),await D(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:B(s),options:l}},streamMotionGroupState:async(t,r,n,a,o,s={})=>{v("streamMotionGroupState","cell",t),v("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={};U(u,e),await D(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:B(l),options:u}}}},wt=function(e){const t=VE(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=k["MotionGroupInfosApi.getActivePayload"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionGroupInfosApi.getActiveTcp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["MotionGroupInfosApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,j,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=k["MotionGroupInfosApi.getInfoCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionGroupInfosApi.getMotionGroupSpecification"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionGroupInfosApi.getMounting"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionGroupInfosApi.getOptimizerConfiguration"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["MotionGroupInfosApi.getSafetySetup"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionGroupInfosApi.listPayloads"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionGroupInfosApi.listTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["MotionGroupInfosApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>F(l,_,j,e)(p,u||f)}}};class ME extends Ve{getActivePayload(t,r,n){return wt(this.configuration).getActivePayload(t,r,n).then(a=>a(this.axios,this.basePath))}getActiveTcp(t,r,n,a){return wt(this.configuration).getActiveTcp(t,r,n,a).then(o=>o(this.axios,this.basePath))}getCurrentMotionGroupState(t,r,n,a,o){return wt(this.configuration).getCurrentMotionGroupState(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getInfoCapabilities(t,r,n){return wt(this.configuration).getInfoCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}getMotionGroupSpecification(t,r,n){return wt(this.configuration).getMotionGroupSpecification(t,r,n).then(a=>a(this.axios,this.basePath))}getMounting(t,r,n){return wt(this.configuration).getMounting(t,r,n).then(a=>a(this.axios,this.basePath))}getOptimizerConfiguration(t,r,n,a){return wt(this.configuration).getOptimizerConfiguration(t,r,n,a).then(o=>o(this.axios,this.basePath))}getSafetySetup(t,r,n){return wt(this.configuration).getSafetySetup(t,r,n).then(a=>a(this.axios,this.basePath))}listPayloads(t,r,n){return wt(this.configuration).listPayloads(t,r,n).then(a=>a(this.axios,this.basePath))}listTcps(t,r,n,a){return wt(this.configuration).listTcps(t,r,n,a).then(o=>o(this.axios,this.basePath))}streamMotionGroupState(t,r,n,a,o,s){return wt(this.configuration).streamMotionGroupState(t,r,n,a,o,s).then(i=>i(this.axios,this.basePath))}}const jE=function(e){return{directionJogging:async(t,r,n={})=>{v("directionJogging","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},getJoggingCapabilities:async(t,r,n={})=>{v("getJoggingCapabilities","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},jointJogging:async(t,r,n={})=>{v("jointJogging","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},stopJogging:async(t,r,n={})=>{v("stopJogging","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}}}},io=function(e){const t=jE(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=k["MotionGroupJoggingApi.directionJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionGroupJoggingApi.getJoggingCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionGroupJoggingApi.jointJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["MotionGroupJoggingApi.stopJogging"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,e)(u,i||d)}}};class kE extends Ve{directionJogging(t,r,n){return io(this.configuration).directionJogging(t,r,n).then(a=>a(this.axios,this.basePath))}getJoggingCapabilities(t,r,n){return io(this.configuration).getJoggingCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}jointJogging(t,r,n){return io(this.configuration).jointJogging(t,r,n).then(a=>a(this.axios,this.basePath))}stopJogging(t,r,n){return io(this.configuration).stopJogging(t,r,n).then(a=>a(this.axios,this.basePath))}}const $E=function(e){return{calculateAllInverseKinematic:async(t,r,n,a={})=>{v("calculateAllInverseKinematic","cell",t),v("calculateAllInverseKinematic","motionGroup",r),v("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={};U(l,e),await D(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:B(s),options:l}},calculateForwardKinematic:async(t,r,n,a={})=>{v("calculateForwardKinematic","cell",t),v("calculateForwardKinematic","motionGroup",r),v("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={};U(l,e),await D(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:B(s),options:l}},calculateInverseKinematic:async(t,r,n,a={})=>{v("calculateInverseKinematic","cell",t),v("calculateInverseKinematic","motionGroup",r),v("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={};U(l,e),await D(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:B(s),options:l}},getKinematicCapabilities:async(t,r,n={})=>{v("getKinematicCapabilities","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}}}},lo=function(e){const t=$E(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=k["MotionGroupKinematicApi.calculateAllInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["MotionGroupKinematicApi.calculateForwardKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["MotionGroupKinematicApi.calculateInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["MotionGroupKinematicApi.getKinematicCapabilities"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,e)(u,i||d)}}};class UE extends Ve{calculateAllInverseKinematic(t,r,n,a){return lo(this.configuration).calculateAllInverseKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}calculateForwardKinematic(t,r,n,a){return lo(this.configuration).calculateForwardKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}calculateInverseKinematic(t,r,n,a){return lo(this.configuration).calculateInverseKinematic(t,r,n,a).then(o=>o(this.axios,this.basePath))}getKinematicCapabilities(t,r,n){return lo(this.configuration).getKinematicCapabilities(t,r,n).then(a=>a(this.axios,this.basePath))}}const DE=function(e){return{createProgramRunner:async(t,r,n={})=>{v("createProgramRunner","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},executeProgram:async(t,r,n={})=>{v("executeProgram","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},getProgramRunner:async(t,r,n={})=>{v("getProgramRunner","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listProgramRunners:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},migrateProgram:async(t,r,n={})=>{v("migrateProgram","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},planProgram:async(t,r,n,a={})=>{v("planProgram","cell",t),v("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={};U(l,e),await D(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:B(s),options:l}},stopAllProgramRunner:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},stopProgramRunner:async(t,r,n={})=>{v("stopProgramRunner","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}}}},or=function(e){const t=DE(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=k["ProgramApi.createProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ProgramApi.executeProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ProgramApi.getProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ProgramApi.listProgramRunners"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["ProgramApi.migrateProgram"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ProgramApi.planProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["ProgramApi.stopAllProgramRunner"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["ProgramApi.stopProgramRunner"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,e)(u,i||d)}}};class LE extends Ve{createProgramRunner(t,r,n){return or(this.configuration).createProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}executeProgram(t,r,n){return or(this.configuration).executeProgram(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramRunner(t,r,n){return or(this.configuration).getProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramRunners(t,r){return or(this.configuration).listProgramRunners(t,r).then(n=>n(this.axios,this.basePath))}migrateProgram(t,r,n){return or(this.configuration).migrateProgram(t,r,n).then(a=>a(this.axios,this.basePath))}planProgram(t,r,n,a){return or(this.configuration).planProgram(t,r,n,a).then(o=>o(this.axios,this.basePath))}stopAllProgramRunner(t,r){return or(this.configuration).stopAllProgramRunner(t,r).then(n=>n(this.axios,this.basePath))}stopProgramRunner(t,r,n){return or(this.configuration).stopProgramRunner(t,r,n).then(a=>a(this.axios,this.basePath))}}const BE=function(e){return{clearProgramsValues:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},createProgramsValue:async(t,r,n={})=>{v("createProgramsValue","cell",t),v("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={};U(i,e),await D(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:B(o),options:i}},deleteProgramValue:async(t,r,n={})=>{v("deleteProgramValue","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getProgramValue:async(t,r,n={})=>{v("getProgramValue","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listProgramsValues:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},updateProgramValue:async(t,r,n,a={})=>{v("updateProgramValue","cell",t),v("updateProgramValue","key",r),v("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={};U(l,e),await D(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:B(s),options:l}}}},tn=function(e){const t=BE(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=k["ProgramValuesApi.clearProgramsValues"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["ProgramValuesApi.createProgramsValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ProgramValuesApi.deleteProgramValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ProgramValuesApi.getProgramValue"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["ProgramValuesApi.listProgramsValues"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["ProgramValuesApi.updateProgramValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,e)(d,l||h)}}};class FE extends Ve{clearProgramsValues(t,r){return tn(this.configuration).clearProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}createProgramsValue(t,r,n){return tn(this.configuration).createProgramsValue(t,r,n).then(a=>a(this.axios,this.basePath))}deleteProgramValue(t,r,n){return tn(this.configuration).deleteProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}getProgramValue(t,r,n){return tn(this.configuration).getProgramValue(t,r,n).then(a=>a(this.axios,this.basePath))}listProgramsValues(t,r){return tn(this.configuration).listProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}updateProgramValue(t,r,n,a){return tn(this.configuration).updateProgramValue(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const NE=function(e){return{deleteStoredCollider:async(t,r,n={})=>{v("deleteStoredCollider","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},deleteStoredCollisionLinkChain:async(t,r,n={})=>{v("deleteStoredCollisionLinkChain","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},deleteStoredCollisionTool:async(t,r,n={})=>{v("deleteStoredCollisionTool","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getDefaultLinkChain:async(t,r,n={})=>{v("getDefaultLinkChain","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getStoredCollider:async(t,r,n={})=>{v("getStoredCollider","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getStoredCollisionLinkChain:async(t,r,n={})=>{v("getStoredCollisionLinkChain","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getStoredCollisionTool:async(t,r,n={})=>{v("getStoredCollisionTool","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listCollisionLinkChains:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},listStoredColliders:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},listStoredCollisionTools:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},storeCollider:async(t,r,n,a={})=>{v("storeCollider","cell",t),v("storeCollider","collider",r),v("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={};U(l,e),await D(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:B(s),options:l}},storeCollisionLinkChain:async(t,r,n,a={})=>{v("storeCollisionLinkChain","cell",t),v("storeCollisionLinkChain","linkChain",r),v("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={};U(l,e),await D(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:B(s),options:l}},storeCollisionTool:async(t,r,n,a={})=>{v("storeCollisionTool","cell",t),v("storeCollisionTool","tool",r),v("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={};U(l,e),await D(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:B(s),options:l}}}},ct=function(e){const t=NE(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=k["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["StoreCollisionComponentsApi.getDefaultLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,e)(d,l||h)}}};class zE 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 GE=function(e){return{deleteStoredCollisionScene:async(t,r,n={})=>{v("deleteStoredCollisionScene","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getStoredCollisionScene:async(t,r,n={})=>{v("getStoredCollisionScene","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listStoredCollisionScenes:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},storeCollisionScene:async(t,r,n,a={})=>{v("storeCollisionScene","cell",t),v("storeCollisionScene","scene",r),v("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={};U(l,e),await D(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:B(s),options:l}}}},co=function(e){const t=GE(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=k["StoreCollisionScenesApi.deleteStoredCollisionScene"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["StoreCollisionScenesApi.getStoredCollisionScene"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["StoreCollisionScenesApi.listStoredCollisionScenes"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["StoreCollisionScenesApi.storeCollisionScene"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,e)(d,l||h)}}};class HE extends Ve{deleteStoredCollisionScene(t,r,n){return co(this.configuration).deleteStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}getStoredCollisionScene(t,r,n){return co(this.configuration).getStoredCollisionScene(t,r,n).then(a=>a(this.axios,this.basePath))}listStoredCollisionScenes(t,r){return co(this.configuration).listStoredCollisionScenes(t,r).then(n=>n(this.axios,this.basePath))}storeCollisionScene(t,r,n,a){return co(this.configuration).storeCollisionScene(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const qE=function(e){return{clearAllObjects:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},deleteObject:async(t,r,n={})=>{v("deleteObject","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getObject:async(t,r,n={})=>{v("getObject","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getObjectMetadata:async(t,r,n={})=>{v("getObjectMetadata","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listAllObjectKeys:async(t,r={})=>{v("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={};U(s,e),await D(i,e),L(a,l);let c=o&&o.headers?o.headers:{};return s.headers={...i,...c,...r.headers},{url:B(a),options:s}},storeObject:async(t,r,n,a,o={})=>{v("storeObject","cell",t),v("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);U(c,e),await D(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:B(i),options:c}}}},rn=function(e){const t=qE(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=k["StoreObjectApi.clearAllObjects"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["StoreObjectApi.deleteObject"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["StoreObjectApi.getObject"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["StoreObjectApi.getObjectMetadata"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,j,e)(h,c||p)}}};class WE extends Ve{clearAllObjects(t,r){return rn(this.configuration).clearAllObjects(t,r).then(n=>n(this.axios,this.basePath))}deleteObject(t,r,n){return rn(this.configuration).deleteObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObject(t,r,n){return rn(this.configuration).getObject(t,r,n).then(a=>a(this.axios,this.basePath))}getObjectMetadata(t,r,n){return rn(this.configuration).getObjectMetadata(t,r,n).then(a=>a(this.axios,this.basePath))}listAllObjectKeys(t,r){return rn(this.configuration).listAllObjectKeys(t,r).then(n=>n(this.axios,this.basePath))}storeObject(t,r,n,a,o){return rn(this.configuration).storeObject(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const JE=function(e){return{checkNovaVersionUpdate:async(t,r={})=>{v("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={};U(s,e),await D(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:B(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={};U(o,e),await D(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:B(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={};U(o,e),await D(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:B(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={};U(o,e),await D(s,e),L(n,i);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...t.headers},{url:B(n),options:o}},updateNovaVersion:async(t,r={})=>{v("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={};U(s,e),await D(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:B(a),options:s}}}},Zn=function(e){const t=JE(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=k["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,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=k["SystemApi.getDiagnosePackage"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>F(n,_,j,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=k["SystemApi.getSystemStatus"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>F(n,_,j,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=k["SystemApi.getSystemVersion"])==null?void 0:s[a])==null?void 0:i.url;return(l,c)=>F(n,_,j,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=k["SystemApi.updateNovaVersion"])==null?void 0:i[o])==null?void 0:l.url;return(c,u)=>F(a,_,j,e)(c,s||u)}}};class YE extends Ve{checkNovaVersionUpdate(t,r){return Zn(this.configuration).checkNovaVersionUpdate(t,r).then(n=>n(this.axios,this.basePath))}getDiagnosePackage(t){return Zn(this.configuration).getDiagnosePackage(t).then(r=>r(this.axios,this.basePath))}getSystemStatus(t){return Zn(this.configuration).getSystemStatus(t).then(r=>r(this.axios,this.basePath))}getSystemVersion(t){return Zn(this.configuration).getSystemVersion(t).then(r=>r(this.axios,this.basePath))}updateNovaVersion(t,r){return Zn(this.configuration).updateNovaVersion(t,r).then(n=>n(this.axios,this.basePath))}}const KE=function(e){return{getMotionGroupState:async(t,r,n,a={})=>{v("getMotionGroupState","cell",t),v("getMotionGroupState","controller",r),v("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={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},getMotionGroups:async(t,r,n={})=>{v("getMotionGroups","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getVirtualRobotIOValue:async(t,r,n,a={})=>{v("getVirtualRobotIOValue","cell",t),v("getVirtualRobotIOValue","controller",r),v("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={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},listIOs:async(t,r,n={})=>{v("listIOs","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},setMotionGroupState:async(t,r,n,a,o={})=>{v("setMotionGroupState","cell",t),v("setMotionGroupState","controller",r),v("setMotionGroupState","id",n),v("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={};U(c,e),await D(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:B(i),options:c}},setVirtualRobotIOValue:async(t,r,n,a,o,s,i={})=>{v("setVirtualRobotIOValue","cell",t),v("setVirtualRobotIOValue","controller",r),v("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={};U(d,e),await D(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:B(c),options:d}}}},nn=function(e){const t=KE(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=k["VirtualRobotApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["VirtualRobotApi.getMotionGroups"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["VirtualRobotApi.getVirtualRobotIOValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["VirtualRobotApi.listIOs"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["VirtualRobotApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,j,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=k["VirtualRobotApi.setVirtualRobotIOValue"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>F(c,_,j,e)(f,d||m)}}};class QE extends Ve{getMotionGroupState(t,r,n,a){return nn(this.configuration).getMotionGroupState(t,r,n,a).then(o=>o(this.axios,this.basePath))}getMotionGroups(t,r,n){return nn(this.configuration).getMotionGroups(t,r,n).then(a=>a(this.axios,this.basePath))}getVirtualRobotIOValue(t,r,n,a){return nn(this.configuration).getVirtualRobotIOValue(t,r,n,a).then(o=>o(this.axios,this.basePath))}listIOs(t,r,n){return nn(this.configuration).listIOs(t,r,n).then(a=>a(this.axios,this.basePath))}setMotionGroupState(t,r,n,a,o){return nn(this.configuration).setMotionGroupState(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}setVirtualRobotIOValue(t,r,n,a,o,s,i){return nn(this.configuration).setVirtualRobotIOValue(t,r,n,a,o,s,i).then(l=>l(this.axios,this.basePath))}}const XE=function(e){return{externalJointsStream:async(t,r,n,a={})=>{v("externalJointsStream","cell",t),v("externalJointsStream","controller",r),v("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={};U(l,e),await D(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:B(s),options:l}},getMotionGroupBehavior:async(t,r,n,a={})=>{v("getMotionGroupBehavior","cell",t),v("getMotionGroupBehavior","controller",r),v("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={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},setMotionGroupBehavior:async(t,r,n,a,o={})=>{v("setMotionGroupBehavior","cell",t),v("setMotionGroupBehavior","controller",r),v("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={};U(c,e),await D(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:B(i),options:c}}}},ki=function(e){const t=XE(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=k["VirtualRobotBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["VirtualRobotBehaviorApi.getMotionGroupBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["VirtualRobotBehaviorApi.setMotionGroupBehavior"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,j,e)(h,c||p)}}};class ZE extends Ve{externalJointsStream(t,r,n,a){return ki(this.configuration).externalJointsStream(t,r,n,a).then(o=>o(this.axios,this.basePath))}getMotionGroupBehavior(t,r,n,a){return ki(this.configuration).getMotionGroupBehavior(t,r,n,a).then(o=>o(this.axios,this.basePath))}setMotionGroupBehavior(t,r,n,a,o){return ki(this.configuration).setMotionGroupBehavior(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}const e_=function(e){return{getCycleTime:async(t,r,n={})=>{v("getCycleTime","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getEStop:async(t,r,n={})=>{v("getEStop","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},getOperationMode:async(t,r,n={})=>{v("getOperationMode","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},pushEStop:async(t,r,n={})=>{v("pushEStop","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},releaseEStop:async(t,r,n={})=>{v("releaseEStop","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},setOperationMode:async(t,r,n,a={})=>{v("setOperationMode","cell",t),v("setOperationMode","controller",r),v("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={};U(l,e),await D(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:B(s),options:l}}}},an=function(e){const t=e_(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=k["VirtualRobotModeApi.getCycleTime"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["VirtualRobotModeApi.getEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["VirtualRobotModeApi.getOperationMode"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["VirtualRobotModeApi.pushEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["VirtualRobotModeApi.releaseEStop"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["VirtualRobotModeApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,e)(d,l||h)}}};class t_ extends Ve{getCycleTime(t,r,n){return an(this.configuration).getCycleTime(t,r,n).then(a=>a(this.axios,this.basePath))}getEStop(t,r,n){return an(this.configuration).getEStop(t,r,n).then(a=>a(this.axios,this.basePath))}getOperationMode(t,r,n){return an(this.configuration).getOperationMode(t,r,n).then(a=>a(this.axios,this.basePath))}pushEStop(t,r,n){return an(this.configuration).pushEStop(t,r,n).then(a=>a(this.axios,this.basePath))}releaseEStop(t,r,n){return an(this.configuration).releaseEStop(t,r,n).then(a=>a(this.axios,this.basePath))}setOperationMode(t,r,n,a){return an(this.configuration).setOperationMode(t,r,n,a).then(o=>o(this.axios,this.basePath))}}const r_=function(e){return{addVirtualRobotCoordinateSystem:async(t,r,n,a={})=>{v("addVirtualRobotCoordinateSystem","cell",t),v("addVirtualRobotCoordinateSystem","controller",r),v("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={};U(l,e),await D(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:B(s),options:l}},addVirtualRobotTcp:async(t,r,n,a,o={})=>{v("addVirtualRobotTcp","cell",t),v("addVirtualRobotTcp","controller",r),v("addVirtualRobotTcp","id",n),v("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={};U(c,e),await D(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:B(i),options:c}},deleteVirtualRobotCoordinateSystem:async(t,r,n,a,o={})=>{v("deleteVirtualRobotCoordinateSystem","cell",t),v("deleteVirtualRobotCoordinateSystem","controller",r),v("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={};U(c,e),await D(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:B(i),options:c}},deleteVirtualRobotTcp:async(t,r,n,a,o={})=>{v("deleteVirtualRobotTcp","cell",t),v("deleteVirtualRobotTcp","controller",r),v("deleteVirtualRobotTcp","id",n),v("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={};U(c,e),await D(u,e),L(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...o.headers},{url:B(i),options:c}},getVirtualRobotMounting:async(t,r,n,a={})=>{v("getVirtualRobotMounting","cell",t),v("getVirtualRobotMounting","controller",r),v("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={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},listVirtualRobotCoordinateSystems:async(t,r,n={})=>{v("listVirtualRobotCoordinateSystems","cell",t),v("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={};U(i,e),await D(l,e),L(o,c);let u=s&&s.headers?s.headers:{};return i.headers={...l,...u,...n.headers},{url:B(o),options:i}},listVirtualRobotTcps:async(t,r,n,a={})=>{v("listVirtualRobotTcps","cell",t),v("listVirtualRobotTcps","controller",r),v("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={};U(l,e),await D(c,e),L(s,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...a.headers},{url:B(s),options:l}},setVirtualRobotMounting:async(t,r,n,a,o={})=>{v("setVirtualRobotMounting","cell",t),v("setVirtualRobotMounting","controller",r),v("setVirtualRobotMounting","id",n),v("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={};U(c,e),await D(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:B(i),options:c}}}},sr=function(e){const t=r_(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=k["VirtualRobotSetupApi.addVirtualRobotCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["VirtualRobotSetupApi.addVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,j,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=k["VirtualRobotSetupApi.deleteVirtualRobotCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,j,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=k["VirtualRobotSetupApi.deleteVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,j,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=k["VirtualRobotSetupApi.getVirtualRobotMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["VirtualRobotSetupApi.listVirtualRobotCoordinateSystems"])==null?void 0:l[s])==null?void 0:c.url;return(u,d)=>F(o,_,j,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=k["VirtualRobotSetupApi.listVirtualRobotTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>F(s,_,j,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=k["VirtualRobotSetupApi.setVirtualRobotMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>F(i,_,j,e)(h,c||p)}}};class n_ extends Ve{addVirtualRobotCoordinateSystem(t,r,n,a){return sr(this.configuration).addVirtualRobotCoordinateSystem(t,r,n,a).then(o=>o(this.axios,this.basePath))}addVirtualRobotTcp(t,r,n,a,o){return sr(this.configuration).addVirtualRobotTcp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteVirtualRobotCoordinateSystem(t,r,n,a,o){return sr(this.configuration).deleteVirtualRobotCoordinateSystem(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}deleteVirtualRobotTcp(t,r,n,a,o){return sr(this.configuration).deleteVirtualRobotTcp(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}getVirtualRobotMounting(t,r,n,a){return sr(this.configuration).getVirtualRobotMounting(t,r,n,a).then(o=>o(this.axios,this.basePath))}listVirtualRobotCoordinateSystems(t,r,n){return sr(this.configuration).listVirtualRobotCoordinateSystems(t,r,n).then(a=>a(this.axios,this.basePath))}listVirtualRobotTcps(t,r,n,a){return sr(this.configuration).listVirtualRobotTcps(t,r,n,a).then(o=>o(this.axios,this.basePath))}setVirtualRobotMounting(t,r,n,a,o){return sr(this.configuration).setVirtualRobotMounting(t,r,n,a,o).then(s=>s(this.axios,this.basePath))}}function zt(e,t,r){return Math.max(t,Math.min(r,e))}class a_{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 y=1-i;const S=l*h+c*p+u*f+d*m,A=S>=0?1:-1,w=1-S*S;if(w>Number.EPSILON){const T=Math.sqrt(w),C=Math.atan2(T,S*A);y=Math.sin(y*C)/T,i=Math.sin(i*C)/T}const O=i*A;if(l=l*y+h*O,c=c*y+p*O,u=u*y+f*O,d=d*y+m*O,y===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(zt(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 mn{constructor(t=0,r=0,n=0){mn.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(lh.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(lh.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=zt(this.x,t.x,r.x),this.y=zt(this.y,t.y,r.y),this.z=zt(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=zt(this.x,t,r),this.y=zt(this.y,t,r),this.z=zt(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(zt(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 $i.copy(this).projectOnVector(t),this.sub($i)}reflect(t){return this.sub($i.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(zt(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 $i=new mn,lh=new a_;function o_(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 Ui(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),o_(e)}var Vt={},ch;function s_(){if(ch)return Vt;ch=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.TokenData=void 0,Vt.parse=d,Vt.compile=h,Vt.match=m,Vt.pathToRegexp=y,Vt.stringify=O;const e="/",t=R=>R,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,a="https://git.new/pathToRegexpError",o={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function s(R){return R.replace(/[{}()\[\]+?!:*]/g,"\\$&")}function i(R){return R.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}function*l(R){const E=[...R];let V=0;function b(){let I="";if(r.test(E[++V]))for(I+=E[V];n.test(E[++V]);)I+=E[V];else if(E[V]==='"'){let G=V;for(;V<E.length;){if(E[++V]==='"'){V++,G=0;break}E[V]==="\\"?I+=E[++V]:I+=E[V]}if(G)throw new TypeError(`Unterminated quote at ${G}: ${a}`)}if(!I)throw new TypeError(`Missing parameter name at ${V}: ${a}`);return I}for(;V<E.length;){const I=E[V],G=o[I];if(G)yield{type:G,index:V++,value:I};else if(I==="\\")yield{type:"ESCAPED",index:V++,value:E[V++]};else if(I===":"){const M=b();yield{type:"PARAM",index:V,value:M}}else if(I==="*"){const M=b();yield{type:"WILDCARD",index:V,value:M}}else yield{type:"CHAR",index:V,value:E[V++]}}return{type:"END",index:V,value:""}}class c{constructor(E){this.tokens=E}peek(){if(!this._peek){const E=this.tokens.next();this._peek=E.value}return this._peek}tryConsume(E){const V=this.peek();if(V.type===E)return this._peek=void 0,V.value}consume(E){const V=this.tryConsume(E);if(V!==void 0)return V;const{type:b,index:I}=this.peek();throw new TypeError(`Unexpected ${b} at ${I}, expected ${E}: ${a}`)}text(){let E="",V;for(;V=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)E+=V;return E}}class u{constructor(E){this.tokens=E}}Vt.TokenData=u;function d(R,E={}){const{encodePath:V=t}=E,b=new c(l(R));function I(M){const H=[];for(;;){const ne=b.text();ne&&H.push({type:"text",value:V(ne)});const re=b.tryConsume("PARAM");if(re){H.push({type:"param",name:re});continue}const ae=b.tryConsume("WILDCARD");if(ae){H.push({type:"wildcard",name:ae});continue}if(b.tryConsume("{")){H.push({type:"group",tokens:I("}")});continue}return b.consume(M),H}}const G=I("END");return new u(G)}function h(R,E={}){const{encode:V=encodeURIComponent,delimiter:b=e}=E,I=R instanceof u?R:d(R,E),G=p(I.tokens,b,V);return function(H={}){const[ne,...re]=G(H);if(re.length)throw new TypeError(`Missing parameters: ${re.join(", ")}`);return ne}}function p(R,E,V){const b=R.map(I=>f(I,E,V));return I=>{const G=[""];for(const M of b){const[H,...ne]=M(I);G[0]+=H,G.push(...ne)}return G}}function f(R,E,V){if(R.type==="text")return()=>[R.value];if(R.type==="group"){const I=p(R.tokens,E,V);return G=>{const[M,...H]=I(G);return H.length?[""]:[M]}}const b=V||t;return R.type==="wildcard"&&V!==!1?I=>{const G=I[R.name];if(G==null)return["",R.name];if(!Array.isArray(G)||G.length===0)throw new TypeError(`Expected "${R.name}" to be a non-empty array`);return[G.map((M,H)=>{if(typeof M!="string")throw new TypeError(`Expected "${R.name}/${H}" to be a string`);return b(M)}).join(E)]}:I=>{const G=I[R.name];if(G==null)return["",R.name];if(typeof G!="string")throw new TypeError(`Expected "${R.name}" to be a string`);return[b(G)]}}function m(R,E={}){const{decode:V=decodeURIComponent,delimiter:b=e}=E,{regexp:I,keys:G}=y(R,E),M=G.map(H=>V===!1?t:H.type==="param"?V:ne=>ne.split(b).map(V));return function(ne){const re=I.exec(ne);if(!re)return!1;const ae=re[0],ee=Object.create(null);for(let le=1;le<re.length;le++){if(re[le]===void 0)continue;const J=G[le-1],Z=M[le-1];ee[J.name]=Z(re[le])}return{path:ae,params:ee}}}function y(R,E={}){const{delimiter:V=e,end:b=!0,sensitive:I=!1,trailing:G=!0}=E,M=[],H=[],ne=I?"":"i",ae=(Array.isArray(R)?R:[R]).map(J=>J instanceof u?J:d(J,E));for(const{tokens:J}of ae)for(const Z of S(J,0,[])){const he=A(Z,V,M);H.push(he)}let ee=`^(?:${H.join("|")})`;return G&&(ee+=`(?:${i(V)}$)?`),ee+=b?"$":`(?=${i(V)}|$)`,{regexp:new RegExp(ee,ne),keys:M}}function*S(R,E,V){if(E===R.length)return yield V;const b=R[E];if(b.type==="group"){const I=V.slice();for(const G of S(b.tokens,0,I))yield*S(R,E+1,G)}else V.push(b);yield*S(R,E+1,V)}function A(R,E,V){let b="",I="",G=!0;for(let M=0;M<R.length;M++){const H=R[M];if(H.type==="text"){b+=i(H.value),I+=H.value,G||(G=H.value.includes(E));continue}if(H.type==="param"||H.type==="wildcard"){if(!G&&!I)throw new TypeError(`Missing text after "${H.name}": ${a}`);H.type==="param"?b+=`(${w(E,G?"":I)}+)`:b+="([\\s\\S]+)",V.push(H),I="",G=!1;continue}}return b}function w(R,E){return E.length<2?R.length<2?`[^${i(R+E)}]`:`(?:(?!${i(R)})[^${i(E)}])`:R.length<2?`(?:(?!${i(E)})[^${i(R)}])`:`(?:(?!${i(E)}|${i(R)})[\\s\\S])`}function O(R){return R.tokens.map(function E(V,b,I){if(V.type==="text")return s(V.value);if(V.type==="group")return`{${V.tokens.map(E).join("")}}`;const M=T(V.name)&&C(I[b+1])?V.name:JSON.stringify(V.name);if(V.type==="param")return`:${M}`;if(V.type==="wildcard")return`*${M}`;throw new TypeError(`Unexpected token: ${V}`)}).join("")}function T(R){const[E,...V]=R;return r.test(E)?V.every(b=>n.test(b)):!1}function C(R){return(R==null?void 0:R.type)!=="text"?!0:!n.test(R.value[0])}return Vt}var i_=s_();function Cf(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 Of(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 uh=1e-4,l_=class Tf{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=ur(p.data))==null?void 0:f.result;m&&ke.runInAction(()=>{this.controllerState=m})}),o.addEventListener("message",p=>{var f;const m=(f=ur(p.data))==null?void 0:f.result;if(!m)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${p.data}`);Cf(this.rapidlyChangingMotionState.state.joint_position.joints,m.state.joint_position.joints,uh)||ke.runInAction(()=>{this.rapidlyChangingMotionState.state=m.state}),Of(this.rapidlyChangingMotionState.tcp_pose,m.tcp_pose,uh)||ke.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=m.tcp_pose})}),ke.makeAutoObservable(this)}static connect(t,r,n){return _e(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=ur(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
|
|
152
|
-
`,A);const{tcps:w}=yield t.api.motionGroupInfos.listTcps(r),O=yield t.api.motionGroupInfos.getMotionGroupSpecification(r),T=yield t.api.motionGroupInfos.getSafetySetup(r);return new Tf(t,l,c,h,u,f,w,O,T,m,A,y)})}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 ve.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 ve.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 _e(this,null,function*(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}ke.runInAction(()=>{this.activationState="deactivating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_MONITOR"),ke.runInAction(()=>{this.activationState="inactive"})}catch(t){throw ke.runInAction(()=>{this.activationState="active"}),t}})}activate(){return _e(this,null,function*(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}ke.runInAction(()=>{this.activationState="activating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_CONTROL"),ke.runInAction(()=>{this.activationState="active"})}catch(t){throw ke.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}},c_=class Pf{constructor(t,r={}){this.motionStream=t,this.opts=r,this.cartesianWebsocket=null,this.jointWebsocket=null,this.cartesianJoggingOpts={}}static open(t,r){return _e(this,arguments,function*(n,a,o={}){const s=yield n.connectMotionStream(a);return new Pf(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 _e(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&&(p2(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=ur(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=ur(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 _e(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 _e(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 _e(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 _e(this,arguments,function*({currentTcpPose:r,currentJoints:n,coordSystemId:a,velocityInRelevantUnits:o,axis:s,direction:i,motion:l}){var c;const u=[];if(!I2(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 mn(r.orientation.x,r.orientation.y,r.orientation.z),f=p.length(),m=p.clone().normalize(),y=l.distanceRads*(i==="-"?-1:1),S=new mn(0,0,0);S[s]=1;const A=Math.cos(.5*y)*Math.cos(.5*f),w=Math.sin(.5*y)*Math.sin(.5*f),O=Math.sin(.5*y)*Math.cos(.5*f),T=Math.cos(.5*y)*Math.sin(.5*f),C=S.dot(m),R=S.clone().cross(m),E=2*Math.acos(A-w*C),V=E/Math.sin(.5*E),b=new mn().addScaledVector(R,w).addScaledVector(S,O).addScaledVector(m,T).multiplyScalar(V);u.push({settings:{limits_override:{tcp_orientation_velocity_limit:o}},line:{position:r.position,orientation:b,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 _e(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})})}},dh=1e-4;function u_(e,t){const r=new Ct.Vector3(t.x,t.y,t.z),n=new Ct.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 d_=class Rf{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=ur(s.data))==null?void 0:i.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${s.data}`);Cf(this.rapidlyChangingMotionState.state.joint_position.joints,l.state.joint_position.joints,dh)||ke.runInAction(()=>{this.rapidlyChangingMotionState.state=l.state}),Of(this.rapidlyChangingMotionState.tcp_pose,l.tcp_pose,dh)||ke.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:u_(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation),tcp:l.tcp_pose.tcp,coordinate_system:l.tcp_pose.coordinate_system}})}),ke.makeAutoObservable(this)}static open(t,r){return _e(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=ur(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 Rf(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()}},h_=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(YE),this.cell=this.withUnwrappedResponsesOnly(dE),this.deviceConfig=this.withCellId(xE),this.motionGroup=this.withCellId(_E),this.motionGroupInfos=this.withCellId(ME),this.controller=this.withCellId(pE),this.program=this.withCellId(LE),this.programValues=this.withCellId(FE),this.controllerIOs=this.withCellId(fE),this.motionGroupKinematic=this.withCellId(UE),this.motion=this.withCellId(IE),this.coordinateSystems=this.withCellId(yE),this.application=this.withCellId(ih),this.applicationGlobal=this.withUnwrappedResponsesOnly(ih),this.motionGroupJogging=this.withCellId(kE),this.virtualRobot=this.withCellId(QE),this.virtualRobotSetup=this.withCellId(n_),this.virtualRobotMode=this.withCellId(t_),this.virtualRobotBehavior=this.withCellId(ZE),this.libraryProgramMetadata=this.withCellId(CE),this.libraryProgram=this.withCellId(SE),this.libraryRecipeMetadata=this.withCellId(RE),this.libraryRecipe=this.withCellId(TE),this.storeObject=this.withCellId(WE),this.storeCollisionComponents=this.withCellId(zE),this.storeCollisionScenes=this.withCellId(HE)}withCellId(e){var t,r;const n=new e(hl(cn({},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(hl(cn({},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}},p_=class{constructor(){this.connections=[]}handleAPIRequest(e){return _e(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=i_.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 xl(`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(m_)})),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)}},m_={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"}}},f_=class{constructor(e){this.authPromise=null,this.accessToken=null;var t;const r=(t=e.cellId)!=null?t:"cell";this.config=cn({cellId:r},e),this.accessToken=e.accessToken||Ei.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"&&(this.mock=new p_);const n=_.create({baseURL:Ui(this.config.instanceUrl,"/api/v1"),headers:{"User-Agent":"Wandelbots-Nova-JS-SDK"}});n.interceptors.request.use(a=>_e(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=>_e(this,null,function*(){var o,s;if(iE(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 h_(r,hl(cn({},e),{basePath:Ui(this.config.instanceUrl,"/api/v1"),isJsonMime:a=>a==="application/json",baseOptions:cn(cn({},this.mock?{adapter:a=>this.mock.handleAPIRequest(a)}:{}),e.baseOptions),axiosInstance:n}))}renewAuthentication(){return _e(this,null,function*(){if(!this.authPromise){this.authPromise=_2(this.config.instanceUrl);try{this.accessToken=yield this.authPromise,this.accessToken?Ei.setString("wbjs.access_token",this.accessToken):Ei.delete("wbjs.access_token")}finally{this.authPromise=null}}})}makeWebsocketURL(e){const t=new URL(Ui(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 R2(this.makeWebsocketURL(e),{mock:this.mock})}connectMotionStream(e){return _e(this,null,function*(){return yield d_.open(this,e)})}connectJogger(e){return _e(this,null,function*(){return yield c_.open(this,e)})}connectMotionGroups(e){return _e(this,null,function*(){const{instances:t}=yield this.api.controller.listControllers();return Promise.all(e.map(r=>l_.connect(this,r,t)))})}connectMotionGroup(e){return _e(this,null,function*(){return(yield this.connectMotionGroups([e]))[0]})}};function g_(e){try{return JSON.stringify(e)}catch{return}}function y_(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function b_(e){var t,r,n,a;return e instanceof xl&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof xl&&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: ${g_(e)||e}`}const Ac=e=>{const t=e.softTimeout||3e3,[r,n]=z.useState(!1),a=P.useTheme();return z.useEffect(()=>{const o=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(o)}),g.jsx(P.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:a.palette.text.primary},children:e.error?g.jsx(Af,{loadingMessage:e.message,error:e.error}):g.jsxs(g.Fragment,{children:[g.jsx(P.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&g.jsx("div",{children:e.message}),g.jsx(P.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:a.palette.text.secondary},children:"This is taking longer than expected..."})]})})},Af=e=>{const t=b_(e.error),r=e.error instanceof Error?e.error.stack:null,n=P.useTheme();return g.jsxs(P.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 ${Il.lowerFirst(P.capitalize(e.loadingMessage))} - `:"")+t,g.jsx("br",{}),r&&g.jsx("pre",{children:r})]})},x_=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),v_=z.forwardRef(x_),S_=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.131.312a.9.9 0 0 1 0 1.272L3.07 3.645h12.44l-2.06-2.061A.9.9 0 0 1 14.72.313l3.596 3.596a.9.9 0 0 1 0 1.271l-3.596 3.597a.9.9 0 0 1-1.271-1.272l2.061-2.062H3.07L5.13 7.505A.9.9 0 0 1 3.86 8.777L.263 5.18a.9.9 0 0 1 0-1.271L3.86.312a.9.9 0 0 1 1.271 0",clipRule:"evenodd"})),w_=z.forwardRef(S_),C_=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M9.522 14.811A.899.899 0 1 0 8.25 13.54L6.19 15.601V3.16L8.25 5.221A.9.9 0 0 0 9.522 3.95L5.926.354a.9.9 0 0 0-1.272 0L1.058 3.95a.9.9 0 1 0 1.271 1.271L4.391 3.16v12.442L2.329 13.54a.899.899 0 1 0-1.271 1.271l3.596 3.597a.9.9 0 0 0 1.272 0z",clipRule:"evenodd"})),O_=z.forwardRef(C_),T_=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M8 16C5.76667 16 3.875 15.225 2.325 13.675C0.775 12.125 0 10.2333 0 8C0 5.76667 0.775 3.875 2.325 2.325C3.875 0.775 5.76667 0 8 0C9.15 0 10.25 0.2375 11.3 0.7125C12.35 1.1875 13.25 1.86667 14 2.75V0H16V7H9V5H13.2C12.6667 4.06667 11.9375 3.33333 11.0125 2.8C10.0875 2.26667 9.08333 2 8 2C6.33333 2 4.91667 2.58333 3.75 3.75C2.58333 4.91667 2 6.33333 2 8C2 9.66667 2.58333 11.0833 3.75 12.25C4.91667 13.4167 6.33333 14 8 14C9.28333 14 10.4417 13.6333 11.475 12.9C11.0583 14.1 12.5083 12.1667 11.475 12.9L12.9 14.325C11.4667 15.4417 9.83333 16 8 16Z",fill:"white"})),P_=z.forwardRef(T_);function R_(){this.__data__=[],this.size=0}function If(e,t){return e===t||e!==e&&t!==t}function zs(e,t){for(var r=e.length;r--;)if(If(e[r][0],t))return r;return-1}var A_=Array.prototype,I_=A_.splice;function E_(e){var t=this.__data__,r=zs(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():I_.call(t,r,1),--this.size,!0}function __(e){var t=this.__data__,r=zs(t,e);return r<0?void 0:t[r][1]}function V_(e){return zs(this.__data__,e)>-1}function M_(e,t){var r=this.__data__,n=zs(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=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=R_;tr.prototype.delete=E_;tr.prototype.get=__;tr.prototype.has=V_;tr.prototype.set=M_;function j_(){this.__data__=new tr,this.size=0}function k_(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function $_(e){return this.__data__.get(e)}function U_(e){return this.__data__.has(e)}var D_="[object AsyncFunction]",L_="[object Function]",B_="[object GeneratorFunction]",F_="[object Proxy]";function Ef(e){if(!Er(e))return!1;var t=Br(e);return t==L_||t==B_||t==D_||t==F_}var Di=Bt["__core-js_shared__"],hh=function(){var e=/[^.]+$/.exec(Di&&Di.keys&&Di.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function N_(e){return!!hh&&hh in e}var z_=Function.prototype,G_=z_.toString;function Nr(e){if(e!=null){try{return G_.call(e)}catch{}try{return e+""}catch{}}return""}var H_=/[\\^$.*+?()[\]{}|]/g,q_=/^\[object .+?Constructor\]$/,W_=Function.prototype,J_=Object.prototype,Y_=W_.toString,K_=J_.hasOwnProperty,Q_=RegExp("^"+Y_.call(K_).replace(H_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function X_(e){if(!Er(e)||N_(e))return!1;var t=Ef(e)?Q_:q_;return t.test(Nr(e))}function Z_(e,t){return e==null?void 0:e[t]}function zr(e,t){var r=Z_(e,t);return X_(r)?r:void 0}var Ca=zr(Bt,"Map"),Oa=zr(Object,"create");function eV(){this.__data__=Oa?Oa(null):{},this.size=0}function tV(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var rV="__lodash_hash_undefined__",nV=Object.prototype,aV=nV.hasOwnProperty;function oV(e){var t=this.__data__;if(Oa){var r=t[e];return r===rV?void 0:r}return aV.call(t,e)?t[e]:void 0}var sV=Object.prototype,iV=sV.hasOwnProperty;function lV(e){var t=this.__data__;return Oa?t[e]!==void 0:iV.call(t,e)}var cV="__lodash_hash_undefined__";function uV(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Oa&&t===void 0?cV:t,this}function Mr(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])}}Mr.prototype.clear=eV;Mr.prototype.delete=tV;Mr.prototype.get=oV;Mr.prototype.has=lV;Mr.prototype.set=uV;function dV(){this.size=0,this.__data__={hash:new Mr,map:new(Ca||tr),string:new Mr}}function hV(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Gs(e,t){var r=e.__data__;return hV(t)?r[typeof t=="string"?"string":"hash"]:r.map}function pV(e){var t=Gs(this,e).delete(e);return this.size-=t?1:0,t}function mV(e){return Gs(this,e).get(e)}function fV(e){return Gs(this,e).has(e)}function gV(e,t){var r=Gs(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function rr(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])}}rr.prototype.clear=dV;rr.prototype.delete=pV;rr.prototype.get=mV;rr.prototype.has=fV;rr.prototype.set=gV;var yV=200;function bV(e,t){var r=this.__data__;if(r instanceof tr){var n=r.__data__;if(!Ca||n.length<yV-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new rr(n)}return r.set(e,t),this.size=r.size,this}function Jt(e){var t=this.__data__=new tr(e);this.size=t.size}Jt.prototype.clear=j_;Jt.prototype.delete=k_;Jt.prototype.get=$_;Jt.prototype.has=U_;Jt.prototype.set=bV;var xV="__lodash_hash_undefined__";function vV(e){return this.__data__.set(e,xV),this}function SV(e){return this.__data__.has(e)}function Xo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new rr;++t<r;)this.add(e[t])}Xo.prototype.add=Xo.prototype.push=vV;Xo.prototype.has=SV;function wV(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 CV(e,t){return e.has(t)}var OV=1,TV=2;function _f(e,t,r,n,a,o){var s=r&OV,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&TV?new Xo:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var y=s?n(m,f,d,t,e,o):n(f,m,d,e,t,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!wV(t,function(S,A){if(!CV(p,A)&&(f===S||a(f,S,r,n,o)))return p.push(A)})){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 ph=Bt.Uint8Array;function PV(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function RV(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var AV=1,IV=2,EV="[object Boolean]",_V="[object Date]",VV="[object Error]",MV="[object Map]",jV="[object Number]",kV="[object RegExp]",$V="[object Set]",UV="[object String]",DV="[object Symbol]",LV="[object ArrayBuffer]",BV="[object DataView]",mh=mr?mr.prototype:void 0,Li=mh?mh.valueOf:void 0;function FV(e,t,r,n,a,o,s){switch(r){case BV:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case LV:return!(e.byteLength!=t.byteLength||!o(new ph(e),new ph(t)));case EV:case _V:case jV:return If(+e,+t);case VV:return e.name==t.name&&e.message==t.message;case kV:case UV:return e==t+"";case MV:var i=PV;case $V:var l=n&AV;if(i||(i=RV),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=IV,s.set(e,t);var u=_f(i(e),i(t),n,a,o,s);return s.delete(e),u;case DV:if(Li)return Li.call(e)==Li.call(t)}return!1}function NV(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Lt=Array.isArray;function zV(e,t,r){var n=t(e);return Lt(e)?n:NV(n,r(e))}function GV(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 HV(){return[]}var qV=Object.prototype,WV=qV.propertyIsEnumerable,fh=Object.getOwnPropertySymbols,JV=fh?function(e){return e==null?[]:(e=Object(e),GV(fh(e),function(t){return WV.call(e,t)}))}:HV;function YV(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var KV="[object Arguments]";function gh(e){return _r(e)&&Br(e)==KV}var Vf=Object.prototype,QV=Vf.hasOwnProperty,XV=Vf.propertyIsEnumerable,Mf=gh(function(){return arguments}())?gh:function(e){return _r(e)&&QV.call(e,"callee")&&!XV.call(e,"callee")};function ZV(){return!1}var jf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yh=jf&&typeof module=="object"&&module&&!module.nodeType&&module,eM=yh&&yh.exports===jf,bh=eM?Bt.Buffer:void 0,tM=bh?bh.isBuffer:void 0,Sl=tM||ZV,rM=9007199254740991,nM=/^(?:0|[1-9]\d*)$/;function kf(e,t){var r=typeof e;return t=t??rM,!!t&&(r=="number"||r!="symbol"&&nM.test(e))&&e>-1&&e%1==0&&e<t}var aM=9007199254740991;function Ic(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=aM}var oM="[object Arguments]",sM="[object Array]",iM="[object Boolean]",lM="[object Date]",cM="[object Error]",uM="[object Function]",dM="[object Map]",hM="[object Number]",pM="[object Object]",mM="[object RegExp]",fM="[object Set]",gM="[object String]",yM="[object WeakMap]",bM="[object ArrayBuffer]",xM="[object DataView]",vM="[object Float32Array]",SM="[object Float64Array]",wM="[object Int8Array]",CM="[object Int16Array]",OM="[object Int32Array]",TM="[object Uint8Array]",PM="[object Uint8ClampedArray]",RM="[object Uint16Array]",AM="[object Uint32Array]",Ee={};Ee[vM]=Ee[SM]=Ee[wM]=Ee[CM]=Ee[OM]=Ee[TM]=Ee[PM]=Ee[RM]=Ee[AM]=!0;Ee[oM]=Ee[sM]=Ee[bM]=Ee[iM]=Ee[xM]=Ee[lM]=Ee[cM]=Ee[uM]=Ee[dM]=Ee[hM]=Ee[pM]=Ee[mM]=Ee[fM]=Ee[gM]=Ee[yM]=!1;function IM(e){return _r(e)&&Ic(e.length)&&!!Ee[Br(e)]}function EM(e){return function(t){return e(t)}}var $f=typeof exports=="object"&&exports&&!exports.nodeType&&exports,la=$f&&typeof module=="object"&&module&&!module.nodeType&&module,_M=la&&la.exports===$f,Bi=_M&&jm.process,xh=function(){try{var e=la&&la.require&&la.require("util").types;return e||Bi&&Bi.binding&&Bi.binding("util")}catch{}}(),vh=xh&&xh.isTypedArray,Uf=vh?EM(vh):IM,VM=Object.prototype,MM=VM.hasOwnProperty;function jM(e,t){var r=Lt(e),n=!r&&Mf(e),a=!r&&!n&&Sl(e),o=!r&&!n&&!a&&Uf(e),s=r||n||a||o,i=s?YV(e.length,String):[],l=i.length;for(var c in e)MM.call(e,c)&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||kf(c,l)))&&i.push(c);return i}var kM=Object.prototype;function $M(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||kM;return e===r}function UM(e,t){return function(r){return e(t(r))}}var DM=UM(Object.keys,Object),LM=Object.prototype,BM=LM.hasOwnProperty;function FM(e){if(!$M(e))return DM(e);var t=[];for(var r in Object(e))BM.call(e,r)&&r!="constructor"&&t.push(r);return t}function Df(e){return e!=null&&Ic(e.length)&&!Ef(e)}function Ec(e){return Df(e)?jM(e):FM(e)}function Sh(e){return zV(e,Ec,JV)}var NM=1,zM=Object.prototype,GM=zM.hasOwnProperty;function HM(e,t,r,n,a,o){var s=r&NM,i=Sh(e),l=i.length,c=Sh(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=i[d];if(!(s?h in t:GM.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 y=s;++d<l;){h=i[d];var S=e[h],A=t[h];if(n)var w=s?n(A,S,h,t,e,o):n(S,A,h,e,t,o);if(!(w===void 0?S===A||a(S,A,r,n,o):w)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var O=e.constructor,T=t.constructor;O!=T&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof T=="function"&&T instanceof T)&&(m=!1)}return o.delete(e),o.delete(t),m}var wl=zr(Bt,"DataView"),Cl=zr(Bt,"Promise"),Ol=zr(Bt,"Set"),Tl=zr(Bt,"WeakMap"),wh="[object Map]",qM="[object Object]",Ch="[object Promise]",Oh="[object Set]",Th="[object WeakMap]",Ph="[object DataView]",WM=Nr(wl),JM=Nr(Ca),YM=Nr(Cl),KM=Nr(Ol),QM=Nr(Tl),lr=Br;(wl&&lr(new wl(new ArrayBuffer(1)))!=Ph||Ca&&lr(new Ca)!=wh||Cl&&lr(Cl.resolve())!=Ch||Ol&&lr(new Ol)!=Oh||Tl&&lr(new Tl)!=Th)&&(lr=function(e){var t=Br(e),r=t==qM?e.constructor:void 0,n=r?Nr(r):"";if(n)switch(n){case WM:return Ph;case JM:return wh;case YM:return Ch;case KM:return Oh;case QM:return Th}return t});var XM=1,Rh="[object Arguments]",Ah="[object Array]",uo="[object Object]",ZM=Object.prototype,Ih=ZM.hasOwnProperty;function e5(e,t,r,n,a,o){var s=Lt(e),i=Lt(t),l=s?Ah:lr(e),c=i?Ah:lr(t);l=l==Rh?uo:l,c=c==Rh?uo:c;var u=l==uo,d=c==uo,h=l==c;if(h&&Sl(e)){if(!Sl(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new Jt),s||Uf(e)?_f(e,t,r,n,a,o):FV(e,t,l,r,n,a,o);if(!(r&XM)){var p=u&&Ih.call(e,"__wrapped__"),f=d&&Ih.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,y=f?t.value():t;return o||(o=new Jt),a(m,y,r,n,o)}}return h?(o||(o=new Jt),HM(e,t,r,n,a,o)):!1}function Hs(e,t,r,n,a){return e===t?!0:e==null||t==null||!_r(e)&&!_r(t)?e!==e&&t!==t:e5(e,t,r,n,Hs,a)}function t5(e,t){return Hs(e,t)}const Lf=({store:e})=>{const{t}=Se.useTranslation(),[r,n]=z.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),a=z.useRef(r);Vs(()=>{const s=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;t5(a.current,s)||(a.current=s,n(s))});const o=[];for(const[s,i]of r.entries())i&&o.push(s);return g.jsx(P.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(", ")})})},r5=P.styled(P.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 ho({labelValue:e,...t}){return g.jsxs(r5,{fullWidth:!0,variant:"filled",children:[g.jsx(P.InputLabel,{id:t.labelId,children:e}),g.jsx(P.Select,{...t})]})}var Eh=function(){try{var e=zr(Object,"defineProperty");return e({},"",{}),e}catch{}}();function n5(e,t,r){t=="__proto__"&&Eh?Eh(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function a5(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 o5(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 s5=o5();function i5(e,t){return e&&s5(e,t,Ec)}function l5(e,t){return function(r,n){if(r==null)return r;if(!Df(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 c5=l5(i5);function u5(e,t,r,n){return c5(e,function(a,o,s){t(n,a,r(a),s)}),n}var d5=1,h5=2;function p5(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 Jt,d;if(!(d===void 0?Hs(c,l,d5|h5,n,u):d))return!1}}return!0}function Bf(e){return e===e&&!Er(e)}function m5(e){for(var t=Ec(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,Bf(a)]}return t}function Ff(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function f5(e){var t=m5(e);return t.length==1&&t[0][2]?Ff(t[0][0],t[0][1]):function(r){return r===e||p5(r,e,t)}}var g5=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,y5=/^\w*$/;function _c(e,t){if(Lt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ms(e)?!0:y5.test(e)||!g5.test(e)||t!=null&&e in Object(t)}var b5="Expected a function";function Vc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(b5);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(Vc.Cache||rr),r}Vc.Cache=rr;var x5=500;function v5(e){var t=Vc(e,function(n){return r.size===x5&&r.clear(),n}),r=t.cache;return t}var S5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w5=/\\(\\)?/g,C5=v5(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(S5,function(r,n,a,o){t.push(a?o.replace(w5,"$1"):n||r)}),t});function O5(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 _h=mr?mr.prototype:void 0,Vh=_h?_h.toString:void 0;function Nf(e){if(typeof e=="string")return e;if(Lt(e))return O5(e,Nf)+"";if(Ms(e))return Vh?Vh.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function zf(e){return e==null?"":Nf(e)}function Gf(e,t){return Lt(e)?e:_c(e,t)?[e]:C5(zf(e))}function qs(e){if(typeof e=="string"||Ms(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Hf(e,t){t=Gf(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[qs(t[r++])];return r&&r==n?e:void 0}function T5(e,t,r){var n=e==null?void 0:Hf(e,t);return n===void 0?r:n}function P5(e,t){return e!=null&&t in Object(e)}function R5(e,t,r){t=Gf(t,e);for(var n=-1,a=t.length,o=!1;++n<a;){var s=qs(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&&Ic(a)&&kf(s,a)&&(Lt(e)||Mf(e)))}function A5(e,t){return e!=null&&R5(e,t,P5)}var I5=1,E5=2;function _5(e,t){return _c(e)&&Bf(t)?Ff(qs(e),t):function(r){var n=T5(r,e);return n===void 0&&n===t?A5(r,e):Hs(t,n,I5|E5)}}function V5(e){return e}function M5(e){return function(t){return t==null?void 0:t[e]}}function j5(e){return function(t){return Hf(t,e)}}function k5(e){return _c(e)?M5(qs(e)):j5(e)}function $5(e){return typeof e=="function"?e:e==null?V5:typeof e=="object"?Lt(e)?_5(e[0],e[1]):f5(e):k5(e)}function U5(e,t){return function(r,n){var a=Lt(r)?a5:u5,o={};return a(r,e,$5(n),o)}}var po=U5(function(e,t,r){n5(e,r,t)}),D5=0;function L5(e){var t=++D5;return zf(e)+t}const Pl=[{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}],B5=[{id:"continuous"},...Pl],F5=["coordsys","tool"];class Ws{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)||"",ke.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push(ke.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 Ws(t,n,a||[],o||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return Il.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=Tr.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 B5}get discreteIncrementOptions(){return Pl}get incrementOptionsById(){return po(this.incrementOptions,t=>t.id)}get tabsById(){return po(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 po(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 po(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:Pl.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=L5();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const N5=ge.observer(({store:e})=>{var a;const{t}=Se.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(ho,{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(P.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(ho,{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(P.MenuItem,{value:o.id,children:o.id},o.id))},"tcp")),e.showOrientationSelect&&r.push(g.jsx(ho,{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:F5.map(o=>g.jsx(P.MenuItem,{value:o,children:n(o)},o))},"orientation")),e.showIncrementSelect&&r.push(g.jsxs(ho,{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(P.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(o=>g.jsx(P.MenuItem,{value:o.id,children:e.currentMotionType==="translate"?`${o.mm}mm`:`${o.degrees}°`},o.id))]},"increment")),g.jsx(P.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(P.Box,{sx:{gridColumn:r.length%2===1&&s===r.length-1?"span 2":"auto"},children:o},s))})}),z5=P.styled(P.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 Mh(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function G5(e){return typeof e=="string"}function H5(e,t,r){return e===void 0||G5(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function To(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 jh(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 q5(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:a,className:o}=e;if(!t){const p=Pt(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=To({...a,...n}),i=jh(n),l=jh(a),c=t(s),u=Pt(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 W5(e,t,r){return typeof e=="function"?e(t,r):e}function ir(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:a=!1,...o}=e,s=a?{}:W5(r,n),{props:i,internalRef:l}=q5({...o,externalSlotProps:s}),c=ps(l,s==null?void 0:s.ref,(d=e.additionalProps)==null?void 0:d.ref);return H5(t,{...i,ref:c},n)}function kh(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 J5={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Y5(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const K5=2;function on(e,t,r,n,a){return r===1?Math.min(e+t,a):Math.max(e-t,n)}function qf(e,t){return e-t}function $h(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 mo(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 Zo(e,t,r){return(e-t)*100/(r-t)}function Q5(e,t,r){return(r-t)*e+t}function X5(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 Z5(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(X5(t)))}function Uh({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(qf)}function fo({sliderRef:e,activeIndex:t,setActive:r}){var a,o,s;const n=oa(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 go(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?Y5(e,t):!1}const e3={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}%`})}},t3=e=>e;let yo;function Dh(){return yo===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?yo=CSS.supports("touch-action","none"):yo=!0),yo}function r3(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=t3,step:m=1,shiftStep:y=10,tabIndex:S,value:A}=e,w=N.useRef(void 0),[O,T]=N.useState(-1),[C,R]=N.useState(-1),[E,V]=N.useState(!1),b=N.useRef(0),I=N.useRef(null),[G,M]=fO({controlled:A,default:r??l,name:"Slider"}),H=u&&((Q,te,se)=>{const fe=Q.nativeEvent||Q,Te=new fe.constructor(fe.type,fe);Object.defineProperty(Te,"target",{writable:!0,value:{value:te,name:c}}),I.current=te,u(Te,te,se)}),ne=Array.isArray(G);let re=ne?G.slice().sort(qf):[G];re=re.map(Q=>Q==null?l:sn(Q,l,i));const ae=s===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((Q,te)=>({value:l+m*te})):s||[],ee=ae.map(Q=>Q.value),[le,J]=N.useState(-1),Z=N.useRef(null),he=ps(p,Z),Ae=Q=>te=>{var fe;const se=Number(te.currentTarget.getAttribute("data-index"));kh(te.target)&&J(se),R(se),(fe=Q==null?void 0:Q.onFocus)==null||fe.call(Q,te)},Ge=Q=>te=>{var se;kh(te.target)||J(-1),R(-1),(se=Q==null?void 0:Q.onBlur)==null||se.call(Q,te)},Oe=(Q,te)=>{const se=Number(Q.currentTarget.getAttribute("data-index")),fe=re[se],Te=ee.indexOf(fe);let ie=te;if(ae&&m==null){const qe=ee[ee.length-1];ie>=qe?ie=qe:ie<=ee[0]?ie=ee[0]:ie=ie<fe?ee[Te-1]:ee[Te+1]}if(ie=sn(ie,l,i),ne){a&&(ie=sn(ie,re[se-1]||-1/0,re[se+1]||1/0));const qe=ie;ie=Uh({values:re,newValue:ie,index:se});let Ze=se;a||(Ze=ie.indexOf(qe)),fo({sliderRef:Z,activeIndex:Ze})}M(ie),J(se),H&&!go(ie,G)&&H(Q,ie,se),d&&d(Q,I.current??ie)},lt=Q=>te=>{var se;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(te.key)){te.preventDefault();const fe=Number(te.currentTarget.getAttribute("data-index")),Te=re[fe];let ie=null;if(m!=null){const qe=te.shiftKey?y:m;switch(te.key){case"ArrowUp":ie=on(Te,qe,1,l,i);break;case"ArrowRight":ie=on(Te,qe,o?-1:1,l,i);break;case"ArrowDown":ie=on(Te,qe,-1,l,i);break;case"ArrowLeft":ie=on(Te,qe,o?1:-1,l,i);break;case"PageUp":ie=on(Te,y,1,l,i);break;case"PageDown":ie=on(Te,y,-1,l,i);break;case"Home":ie=l;break;case"End":ie=i;break}}else if(ae){const qe=ee[ee.length-1],Ze=ee.indexOf(Te),Fe=[o?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],ft=[o?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Fe.includes(te.key)?Ze===0?ie=ee[0]:ie=ee[Ze-1]:ft.includes(te.key)&&(Ze===ee.length-1?ie=qe:ie=ee[Ze+1])}ie!=null&&Oe(te,ie)}(se=Q==null?void 0:Q.onKeyDown)==null||se.call(Q,te)};Dt(()=>{var Q;n&&Z.current.contains(document.activeElement)&&((Q=document.activeElement)==null||Q.blur())},[n]),n&&O!==-1&&T(-1),n&&le!==-1&&J(-1);const rt=Q=>te=>{var se;(se=Q.onChange)==null||se.call(Q,te),Oe(te,te.target.valueAsNumber)},be=N.useRef(void 0);let X=h;o&&h==="horizontal"&&(X+="-reverse");const oe=({finger:Q,move:te=!1})=>{const{current:se}=Z,{width:fe,height:Te,bottom:ie,left:qe}=se.getBoundingClientRect();let Ze;X.startsWith("vertical")?Ze=(ie-Q.y)/Te:Ze=(Q.x-qe)/fe,X.includes("-reverse")&&(Ze=1-Ze);let Fe;if(Fe=Q5(Ze,l,i),m)Fe=Z5(Fe,m,l);else{const kn=$h(ee,Fe);Fe=ee[kn]}Fe=sn(Fe,l,i);let ft=0;if(ne){te?ft=be.current:ft=$h(re,Fe),a&&(Fe=sn(Fe,re[ft-1]||-1/0,re[ft+1]||1/0));const kn=Fe;Fe=Uh({values:re,newValue:Fe,index:ft}),a&&te||(ft=Fe.indexOf(kn),be.current=ft)}return{newValue:Fe,activeIndex:ft}},ce=Wt(Q=>{const te=mo(Q,w);if(!te)return;if(b.current+=1,Q.type==="mousemove"&&Q.buttons===0){Y(Q);return}const{newValue:se,activeIndex:fe}=oe({finger:te,move:!0});fo({sliderRef:Z,activeIndex:fe,setActive:T}),M(se),!E&&b.current>K5&&V(!0),H&&!go(se,G)&&H(Q,se,fe)}),Y=Wt(Q=>{const te=mo(Q,w);if(V(!1),!te)return;const{newValue:se}=oe({finger:te,move:!0});T(-1),Q.type==="touchend"&&R(-1),d&&d(Q,I.current??se),w.current=void 0,me()}),xe=Wt(Q=>{if(n)return;Dh()||Q.preventDefault();const te=Q.changedTouches[0];te!=null&&(w.current=te.identifier);const se=mo(Q,w);if(se!==!1){const{newValue:Te,activeIndex:ie}=oe({finger:se});fo({sliderRef:Z,activeIndex:ie,setActive:T}),M(Te),H&&!go(Te,G)&&H(Q,Te,ie)}b.current=0;const fe=oa(Z.current);fe.addEventListener("touchmove",ce,{passive:!0}),fe.addEventListener("touchend",Y,{passive:!0})}),me=N.useCallback(()=>{const Q=oa(Z.current);Q.removeEventListener("mousemove",ce),Q.removeEventListener("mouseup",Y),Q.removeEventListener("touchmove",ce),Q.removeEventListener("touchend",Y)},[Y,ce]);N.useEffect(()=>{const{current:Q}=Z;return Q.addEventListener("touchstart",xe,{passive:Dh()}),()=>{Q.removeEventListener("touchstart",xe),me()}},[me,xe]),N.useEffect(()=>{n&&me()},[n,me]);const Je=Q=>te=>{var Te;if((Te=Q.onMouseDown)==null||Te.call(Q,te),n||te.defaultPrevented||te.button!==0)return;te.preventDefault();const se=mo(te,w);if(se!==!1){const{newValue:ie,activeIndex:qe}=oe({finger:se});fo({sliderRef:Z,activeIndex:qe,setActive:T}),M(ie),H&&!go(ie,G)&&H(te,ie,qe)}b.current=0;const fe=oa(Z.current);fe.addEventListener("mousemove",ce,{passive:!0}),fe.addEventListener("mouseup",Y)},He=Zo(ne?re[0]:l,l,i),je=Zo(re[re.length-1],l,i)-He,nr=(Q={})=>{const te=To(Q),se={onMouseDown:Je(te||{})},fe={...te,...se};return{...Q,ref:he,...fe}},Ua=Q=>te=>{var fe;(fe=Q.onMouseOver)==null||fe.call(Q,te);const se=Number(te.currentTarget.getAttribute("data-index"));R(se)},Da=Q=>te=>{var se;(se=Q.onMouseLeave)==null||se.call(Q,te),R(-1)},La=(Q={})=>{const te=To(Q),se={onMouseOver:Ua(te||{}),onMouseLeave:Da(te||{})};return{...Q,...te,...se}},Ba=Q=>({pointerEvents:O!==-1&&O!==Q?"none":void 0});let Gr;return h==="vertical"&&(Gr=o?"vertical-rl":"vertical-lr"),{active:O,axis:X,axisProps:e3,dragging:E,focusedThumbIndex:le,getHiddenInputProps:(Q={})=>{const te=To(Q),se={onChange:rt(te||{}),onFocus:Ae(te||{}),onBlur:Ge(te||{}),onKeyDown:lt(te||{})},fe={...te,...se};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:{...J5,direction:o?"rtl":"ltr",width:"100%",height:"100%",writingMode:Gr}}},getRootProps:nr,getThumbProps:La,marks:ae,open:C,range:ne,rootRef:he,trackLeap:je,trackOffset:He,values:re,getThumbStyle:Ba}}function Po(e){return typeof e=="string"}const n3=e=>!e||!Po(e);function a3(e){return typeof e.main=="string"}function o3(e,t=[]){if(!a3(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Mc(e=[]){return([,t])=>t&&o3(t,e)}function s3(e){return On("MuiSlider",e)}const xt=Ml("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"]),i3=e=>{const{open:t}=e;return{offset:Pt(t&&xt.valueLabelOpen),circle:xt.valueLabelCircle,label:xt.valueLabelLabel}};function Wf(e){const{children:t,className:r,value:n}=e,a=i3(e);return t?N.cloneElement(t,{className:t.props.className},g.jsxs(N.Fragment,{children:[t.props.children,g.jsx("span",{className:Pt(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"&&(Wf.propTypes={children:x.element.isRequired,className:x.string,value:x.node});function Lh(e){return e}const l3=mt("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${et(r.color)}`],r.size!=="medium"&&t[`size${et(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(Lr(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${xt.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${xt.dragging}`]:{[`& .${xt.thumb}, & .${xt.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(Mc()).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}}]}))),c3=mt("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}}]}),u3=mt("span",{name:"MuiSlider",slot:"Track"})(Lr(({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(Mc()).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:ua(e.palette[t].main,.62),borderColor:ua(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:ca(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:ca(e.palette[t].main,.5)})}}}))]}))),d3=mt("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${et(r.color)}`],r.size!=="medium"&&t[`thumbSize${et(r.size)}`]]}})(Lr(({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%)"},[`&.${xt.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(Mc()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${xt.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Gi(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${xt.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Gi(e.palette[t].main,.16)}`}}}}))]}))),Jf=mt(Wf,{name:"MuiSlider",slot:"ValueLabel"})(Lr(({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%"},[`&.${xt.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%"},[`&.${xt.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"&&(Jf.propTypes={children:x.element.isRequired,index:x.number.isRequired,open:x.bool.isRequired,value:x.node});const h3=mt("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Ul(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(Lr(({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}}]}))),p3=mt("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Ul(e)&&e!=="markLabelActive"})(Lr(({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}}]}))),m3=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${et(i)}`,l&&`size${et(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${et(l)}`,i&&`thumbColor${et(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return es(c,s3,s)},f3=({children:e})=>e,Yf=N.forwardRef(function(t,r){const n=Oc({props:t,name:"MuiSlider"}),a=xy(),{"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:y,getAriaValueText:S,marks:A=!1,max:w=100,min:O=0,name:T,onChange:C,onChangeCommitted:R,orientation:E="horizontal",shiftStep:V=10,size:b="medium",step:I=1,scale:G=Lh,slotProps:M,slots:H,tabIndex:ne,track:re="normal",value:ae,valueLabelDisplay:ee="off",valueLabelFormat:le=Lh,...J}=n,Z={...n,isRtl:a,max:w,min:O,classes:h,disabled:m,disableSwap:f,orientation:E,marks:A,color:d,size:b,step:I,shiftStep:V,scale:G,track:re,valueLabelDisplay:ee,valueLabelFormat:le},{axisProps:he,getRootProps:Ae,getHiddenInputProps:Ge,getThumbProps:Oe,open:lt,active:rt,axis:be,focusedThumbIndex:X,range:oe,dragging:ce,marks:Y,values:xe,trackOffset:me,trackLeap:Je,getThumbStyle:He}=r3({...Z,rootRef:r});Z.marked=Y.length>0&&Y.some(Le=>Le.label),Z.dragging=ce,Z.focusedThumbIndex=X;const je=m3(Z),nr=(H==null?void 0:H.root)??c.Root??l3,Ua=(H==null?void 0:H.rail)??c.Rail??c3,Da=(H==null?void 0:H.track)??c.Track??u3,La=(H==null?void 0:H.thumb)??c.Thumb??d3,Ba=(H==null?void 0:H.valueLabel)??c.ValueLabel??Jf,Gr=(H==null?void 0:H.mark)??c.Mark??h3,Fa=(H==null?void 0:H.markLabel)??c.MarkLabel??p3,Q=(H==null?void 0:H.input)??c.Input??"input",te=(M==null?void 0:M.root)??u.root,se=(M==null?void 0:M.rail)??u.rail,fe=(M==null?void 0:M.track)??u.track,Te=(M==null?void 0:M.thumb)??u.thumb,ie=(M==null?void 0:M.valueLabel)??u.valueLabel,qe=(M==null?void 0:M.mark)??u.mark,Ze=(M==null?void 0:M.markLabel)??u.markLabel,Fe=(M==null?void 0:M.input)??u.input,ft=ir({elementType:nr,getSlotProps:Ae,externalSlotProps:te,externalForwardedProps:J,additionalProps:{...n3(nr)&&{as:l}},ownerState:{...Z,...te==null?void 0:te.ownerState},className:[je.root,p]}),kn=ir({elementType:Ua,externalSlotProps:se,ownerState:Z,className:je.rail}),cg=ir({elementType:Da,externalSlotProps:fe,additionalProps:{style:{...he[be].offset(me),...he[be].leap(Je)}},ownerState:{...Z,...fe==null?void 0:fe.ownerState},className:je.track}),Js=ir({elementType:La,getSlotProps:Oe,externalSlotProps:Te,ownerState:{...Z,...Te==null?void 0:Te.ownerState},className:je.thumb}),ug=ir({elementType:Ba,externalSlotProps:ie,ownerState:{...Z,...ie==null?void 0:ie.ownerState},className:je.valueLabel}),Ys=ir({elementType:Gr,externalSlotProps:qe,ownerState:Z,className:je.mark}),Ks=ir({elementType:Fa,externalSlotProps:Ze,ownerState:Z,className:je.markLabel}),dg=ir({elementType:Q,getSlotProps:Ge,externalSlotProps:Fe,ownerState:Z});return g.jsxs(nr,{...ft,children:[g.jsx(Ua,{...kn}),g.jsx(Da,{...cg}),Y.filter(Le=>Le.value>=O&&Le.value<=w).map((Le,Ye)=>{const Qs=Zo(Le.value,O,w),Na=he[be].offset(Qs);let Ft;return re===!1?Ft=xe.includes(Le.value):Ft=re==="normal"&&(oe?Le.value>=xe[0]&&Le.value<=xe[xe.length-1]:Le.value<=xe[0])||re==="inverted"&&(oe?Le.value<=xe[0]||Le.value>=xe[xe.length-1]:Le.value>=xe[0]),g.jsxs(N.Fragment,{children:[g.jsx(Gr,{"data-index":Ye,...Ys,...!Po(Gr)&&{markActive:Ft},style:{...Na,...Ys.style},className:Pt(Ys.className,Ft&&je.markActive)}),Le.label!=null?g.jsx(Fa,{"aria-hidden":!0,"data-index":Ye,...Ks,...!Po(Fa)&&{markLabelActive:Ft},style:{...Na,...Ks.style},className:Pt(je.markLabel,Ks.className,Ft&&je.markLabelActive),children:Le.label}):null]},Ye)}),xe.map((Le,Ye)=>{const Qs=Zo(Le,O,w),Na=he[be].offset(Qs),Ft=ee==="off"?f3:Ba;return g.jsx(Ft,{...!Po(Ft)&&{valueLabelFormat:le,valueLabelDisplay:ee,value:typeof le=="function"?le(G(Le),Ye):le,index:Ye,open:lt===Ye||rt===Ye||ee==="on",disabled:m},...ug,children:g.jsx(La,{"data-index":Ye,...Js,className:Pt(je.thumb,Js.className,rt===Ye&&je.active,X===Ye&&je.focusVisible),style:{...Na,...He(Ye),...Js.style},children:g.jsx(Q,{"data-index":Ye,"aria-label":y?y(Ye):o,"aria-valuenow":G(Le),"aria-labelledby":i,"aria-valuetext":S?S(G(Le),Ye):s,value:xe[Ye],...dg})})},Ye)})]})});process.env.NODE_ENV!=="production"&&(Yf.propTypes={"aria-label":Mh(x.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":x.string,"aria-valuetext":Mh(x.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:x.node,classes:x.object,className:x.string,color:x.oneOfType([x.oneOf(["primary","secondary","error","info","success","warning"]),x.string]),components:x.shape({Input:x.elementType,Mark:x.elementType,MarkLabel:x.elementType,Rail:x.elementType,Root:x.elementType,Thumb:x.elementType,Track:x.elementType,ValueLabel:x.elementType}),componentsProps:x.shape({input:x.oneOfType([x.func,x.object]),mark:x.oneOfType([x.func,x.object]),markLabel:x.oneOfType([x.func,x.object]),rail:x.oneOfType([x.func,x.object]),root:x.oneOfType([x.func,x.object]),thumb:x.oneOfType([x.func,x.object]),track:x.oneOfType([x.func,x.object]),valueLabel:x.oneOfType([x.func,x.shape({children:x.element,className:x.string,open:x.bool,style:x.object,value:x.node,valueLabelDisplay:x.oneOf(["auto","off","on"])})])}),defaultValue:x.oneOfType([x.arrayOf(x.number),x.number]),disabled:x.bool,disableSwap:x.bool,getAriaLabel:x.func,getAriaValueText:x.func,marks:x.oneOfType([x.arrayOf(x.shape({label:x.node,value:x.number.isRequired})),x.bool]),max:x.number,min:x.number,name:x.string,onChange:x.func,onChangeCommitted:x.func,orientation:x.oneOf(["horizontal","vertical"]),scale:x.func,shiftStep:x.number,size:x.oneOfType([x.oneOf(["small","medium"]),x.string]),slotProps:x.shape({input:x.oneOfType([x.func,x.object]),mark:x.oneOfType([x.func,x.object]),markLabel:x.oneOfType([x.func,x.object]),rail:x.oneOfType([x.func,x.object]),root:x.oneOfType([x.func,x.object]),thumb:x.oneOfType([x.func,x.object]),track:x.oneOfType([x.func,x.object]),valueLabel:x.oneOfType([x.func,x.shape({children:x.element,className:x.string,open:x.bool,style:x.object,value:x.node,valueLabelDisplay:x.oneOf(["auto","off","on"])})])}),slots:x.shape({input:x.elementType,mark:x.elementType,markLabel:x.elementType,rail:x.elementType,root:x.elementType,thumb:x.elementType,track:x.elementType,valueLabel:x.elementType}),step:x.number,sx:x.oneOfType([x.arrayOf(x.oneOfType([x.func,x.object,x.bool])),x.func,x.object]),tabIndex:x.number,track:x.oneOf(["inverted","normal",!1]),value:x.oneOfType([x.arrayOf(x.number),x.number]),valueLabelDisplay:x.oneOf(["auto","off","on"]),valueLabelFormat:x.oneOfType([x.func,x.string])});var g3="[object Number]";function y3(e){return typeof e=="number"||_r(e)&&Br(e)==g3}const Kf=ge.observer(e=>{var o,s,i;const t=P.useTheme(),{store:r}=e,{t:n}=Se.useTranslation();function a(l,c){c===e.velocity||!y3(c)||e.onVelocityChange(c)}return g.jsxs(P.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(P.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(Yf,{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(jc,{value:e.velocity.toString()}))]})});function jc({value:e,sx:t}){var n;const r=P.useTheme();return g.jsx(P.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(P.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Qf=ge.observer(({store:e})=>{const{t}=Se.useTranslation(),r=ge.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(Kf,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(jc,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),b3=ge.observer(({store:e,children:t})=>{const{t:r}=Se.useTranslation(),n=P.useTheme();function a(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Mm(()=>[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,y=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:y,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:Tr.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 y,S,A;const m=(A=(S=(y=f.componentsExt)==null?void 0:y.JoggingPanel)==null?void 0:S.JoggingCartesian)==null?void 0:A.Axis;if(m)return p==="translate"?m[h]:m.CustomRotation??m[h]}const c=[{id:"x",icon:g.jsx(v_,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(w_,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(O_,{}),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:Tr.radiansToDegrees(h).toFixed(1)})}return g.jsxs(P.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(P.Stack,{gap:2,children:[g.jsx(N5,{store:e}),g.jsx(Qf,{store:e}),g.jsx(P.Divider,{})]}),g.jsx(P.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(P.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs(z5,{value:e.selectedCartesianMotionType,onChange:a,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(P.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(P.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(ol,{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(P.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(ol,{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(P_,{}),g.jsx(P.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,y;return d(((y=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:y[h.id])||0)},startJogging:m=>s({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx(Lf,{store:e}),t&&g.jsx(P.Divider,{}),t]})}),x3=ge.observer(({store:e,children:t})=>{const r=P.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(P.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(Qf,{store:e}),g.jsx(P.Divider,{}),g.jsx(P.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(P.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?Tr.radiansToDegrees(s.lower_limit):void 0,l=(s==null?void 0:s.upper_limit)!==void 0?Tr.radiansToDegrees(s.upper_limit):void 0;return g.jsxs(P.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(P.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${o.index+1}`}),g.jsx($m,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[o.index];return u!==void 0?Tr.radiansToDegrees(u):void 0},startJogging:u=>n({joint:o.index,direction:u}),stopJogging:a})]},`joint-${o.index}`)})})}),g.jsx(Lf,{store:e}),t&&g.jsx(P.Divider,{}),t]})}),v3=Be(ge.observer(e=>{const t=Il.isString(e.nova)?new f_({instanceUrl:e.nova}):e.nova,r=ge.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){ke.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let a=e.store;if(!a){const o=await t.connectJogger(e.motionGroupId);a=await Ws.loadFor(o)}ke.runInAction(()=>{r.joggingStore=a}),e.onSetup&&e.onSetup(a)}catch(a){r.loadingError=a}}return z.useEffect(()=>(n(),e.store?()=>null:()=>{var a;(a=r.joggingStore)==null||a.dispose()}),[e.store,e.nova,e.motionGroupId]),z.useEffect(()=>{const a=r.joggingStore;a&&(e.locked?a.lock("external"):a.unlock("external"))},[r.joggingStore,e.locked]),g.jsx(P.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(S3,{store:r.joggingStore,children:e.children}):g.jsx(Ac,{message:"Loading jogging",error:r.loadingError})})})),S3=ge.observer(({store:e,children:t})=>{const{t:r}=Se.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(b3,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(x3,{store:e,children:t})})}return g.jsxs(P.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(P.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(JO,{fontSize:"small",sx:{mr:1}}):g.jsx(YO,{fontSize:"small",sx:{mr:1}});return g.jsx(P.Tab,{label:e.showTabIcons?g.jsxs(P.Stack,{direction:"row",alignItems:"center",children:[s,o]}):o,id:`jogging-tab-${a.id}`,"aria-controls":`jogging-tab-${a.id}`},a.id)})}),g.jsx(P.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()})]})}),Xf=e=>{var i;const{value:t,ref:r}=e,n=P.useTheme(),[a,o]=z.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();if(c&&r&&"current"in r&&r.current){const u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}}return!1}return z.useEffect(()=>{if(!a)return;const l=setTimeout(()=>o(!1),3e3);return()=>{l&&clearTimeout(l)}},[a]),g.jsx(P.Tooltip,{open:a,title:"Copied!",children:g.jsx(P.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(P.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})})})},w3=Be(ge.observer(({tcpPose:e,showCopyButton:t=!1})=>{const[r,n]=z.useState(null),a=Tr.poseToWandelscriptString(e),o=async()=>{try{await navigator.clipboard.writeText(a),n("Copied!"),setTimeout(()=>n(null),2e3)}catch{n("Copy failed"),setTimeout(()=>n(null),2e3)}};return g.jsxs(P.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-cartesian-values",children:[g.jsx(Xf,{value:a}),t&&g.jsx(P.Button,{variant:"contained",color:"secondary",size:"small",onClick:o,sx:{flexShrink:0},children:r||"Copy"})]})})),C3=Be(ge.observer(({joints:e,showCopyButton:t=!1})=>{const[r,n]=z.useState(null),a=`[${e.joints.map(s=>parseFloat(s.toFixed(4))).join(", ")}]`,o=async()=>{try{await navigator.clipboard.writeText(a),n("Copied!"),setTimeout(()=>n(null),2e3)}catch{n("Copy failed"),setTimeout(()=>n(null),2e3)}};return g.jsxs(P.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-joint-values",children:[g.jsx(Xf,{value:a}),t&&g.jsx(P.Button,{variant:"contained",color:"secondary",size:"small",onClick:o,sx:{flexShrink:0},children:r||"Copy"})]})}));class Zf{constructor(){this.messages=[],this.addMessage=(t,r="info")=>{const n={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:t,level:r};this.messages.push(n)},this.clearMessages=()=>{this.messages=[]},this.addInfo=t=>{this.addMessage(t,"info")},this.addWarning=t=>{this.addMessage(t,"warning")},this.addError=t=>{this.addMessage(t,"error")},this.addDebug=t=>{this.addMessage(t,"debug")},ke.makeObservable(this,{messages:ke.observable,addMessage:ke.action,clearMessages:ke.action})}}const $a=(e,t,r)=>({id:r||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:e,level:t}),O3=(e,t)=>$a(e,"debug",t),T3=(e,t)=>$a(e,"info",t),P3=(e,t)=>$a(e,"warning",t),R3=(e,t)=>$a(e,"error",t),eg=Be(ge.observer(e=>{var u;const{messages:t=[],onClear:r,height:n=400,sx:a}=e,o=P.useTheme(),s=z.useRef(null);z.useEffect(()=>{if(t.length===0)return;const d=s.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const i=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return o.palette.error.main;case"warning":return o.palette.warning.main;case"info":return o.palette.info.main;case"debug":return o.palette.text.disabled;default:return o.palette.text.secondary}},c=({message:d})=>{const[h,p]=z.useState(!1),[f,m]=z.useState(!1),[y,S]=z.useState(!1),A=d.message.length>150,w=async()=>{try{await navigator.clipboard.writeText(d.message),m(!0),setTimeout(()=>m(!1),2e3)}catch(T){console.error("Failed to copy message:",T)}},O=A&&!h?d.message.substring(0,150)+"...":d.message;return g.jsx(P.Box,{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:o.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:g.jsxs(P.Box,{sx:{display:"flex",gap:1},children:[g.jsxs(P.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:o.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",i(d.timestamp),"]"]}),g.jsx(P.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:l(d.level),wordBreak:"break-word",overflowWrap:"anywhere",hyphens:"auto",flex:1,whiteSpace:"pre-wrap"},children:O}),g.jsxs(P.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:y?1:0,transition:"opacity 0.2s ease-in-out",visibility:y?"visible":"hidden"},children:[g.jsx(P.IconButton,{size:"small",onClick:w,sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:f?"Copied!":"Copy message",children:g.jsx(Gt.ContentCopy,{sx:{fontSize:12}})}),A&&g.jsx(P.IconButton,{size:"small",onClick:()=>p(!h),sx:{padding:"2px",color:o.palette.text.secondary,"&:hover":{backgroundColor:o.palette.action.hover}},title:h?"Collapse":"Expand",children:h?g.jsx(Gt.ExpandLess,{sx:{fontSize:12}}):g.jsx(Gt.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxs(P.Paper,{sx:{backgroundColor:((u=o.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:n,display:"flex",flexDirection:"column",overflow:"hidden",...a},children:[g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(Gt.DescriptionOutlined,{sx:{fontSize:16,color:o.palette.action.active,opacity:.56}}),g.jsx(P.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:o.palette.text.primary},children:"Log"})]}),g.jsx(P.Button,{onClick:r,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:o.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:o.palette.primary.main+"14"}},children:"Clear"})]}),g.jsx(P.Box,{ref:s,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${o.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:o.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:o.palette.divider}}},children:t.length===0?g.jsx(P.Typography,{sx:{color:o.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):t.map(d=>g.jsx(c,{message:d},d.id))})]})})),A3=Be(ge.observer(e=>{const{store:t,onStoreReady:r,...n}=e,a=z.useRef(r);z.useEffect(()=>{a.current=r},[r]);const o=z.useMemo(()=>{var l;const i=t||new Zf;return(l=a.current)==null||l.call(a,i),i},[t]),s=()=>{o.clearMessages()};return g.jsx(eg,{...n,messages:o.messages,onClear:s})}));function I3(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function E3({baseUrl:e=I3(),...t}){return g.jsxs(P.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(P.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(P.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(P.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(P.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(P.DialogActions,{children:g.jsxs(P.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(P.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(P.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var ut=(e=>(e.IDLE="idle",e.PREPARING="preparing",e.STARTING="starting",e.RUNNING="running",e.PAUSING="pausing",e.PAUSED="paused",e.STOPPING="stopping",e.COMPLETED="completed",e.FAILED="failed",e.STOPPED="stopped",e.ERROR="error",e))(ut||{});const _3=Be(ge.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:a,requiresManualReset:o=!1,variant:s="with_pause",className:i})=>{const l=P.useTheme(),{t:c}=Se.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="stopped"||e==="paused"||e==="completed"||e==="failed"||e==="error",label:c(e==="paused"?"ProgramControl.Resume.bt":e==="error"||e==="failed"?"ProgramControl.Retry.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==="preparing"||e==="starting"||e==="running"||e==="pausing"||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(Gt.PlayArrow,{...f}):g.jsx(Gt.Stop,{...f});switch(p){case 0:return g.jsx(Gt.PlayArrow,{...f});case 1:return g.jsx(Gt.Pause,{...f});case 2:return g.jsx(Gt.Stop,{...f});default:return null}},h=u();return g.jsx(P.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(P.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(P.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(P.Button,{variant:"contained",disabled:!p.enabled||e==="preparing"||e==="starting"||e==="pausing"||e==="stopping"&&!o,onClick:p.onClick,sx:{width:"88px",height:"88px",borderRadius:"88px",backgroundColor:p.color,opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!o)?1:.3,"&:hover":{backgroundColor:p.color,opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!o)?.8:.3},"&:disabled":{backgroundColor:p.color,opacity:.3},minWidth:"88px",flexShrink:0},children:d(f)}),g.jsx(P.Typography,{variant:"body1",sx:{color:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!o)?p.color:l.palette.text.disabled,textAlign:"center",opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!o)?1:.3},children:p.label})]},p.label))})})})),Rl=Be(ge.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const a=P.useTheme(),{t:o}=Se.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 ut.PREPARING:return{label:o("ProgramStateIndicator.Preparing.lb"),color:a.palette.warning.main};case ut.STARTING:return{label:o("ProgramStateIndicator.Starting.lb"),color:a.palette.warning.main};case ut.RUNNING:return{label:o("ProgramStateIndicator.Running.lb"),color:a.palette.success.main};case ut.PAUSING:return{label:o("ProgramStateIndicator.Pausing.lb"),color:a.palette.warning.main};case ut.PAUSED:return{label:o("ProgramStateIndicator.Paused.lb"),color:a.palette.grey[600]};case ut.STOPPING:return{label:o("ProgramStateIndicator.Stopping.lb"),color:a.palette.warning.main};case ut.COMPLETED:return{label:o("ProgramStateIndicator.Completed.lb"),color:a.palette.success.main};case ut.FAILED:return{label:o("ProgramStateIndicator.Failed.lb"),color:a.palette.error.main};case ut.STOPPED:return{label:o("ProgramStateIndicator.Stopped.lb"),color:a.palette.warning.main};case ut.ERROR:return{label:o("ProgramStateIndicator.Error.lb"),color:a.palette.error.main};case ut.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(P.Chip,{className:n,label:g.jsx(P.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}}})})),Bh="0.0.0-semantically-released";function kc(e){let t=Bh;return Bh.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function V3(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>rg(r))}function tg(e){return e.name.endsWith("_FLG")}function rg(e){return/_J[0-9]+$/.test(e.name)}function M3(e,t){let r;function n(a){if(tg(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}rg(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 ng({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const a=z.useRef([]),o=z.useRef([]),s=z.useRef(null),{invalidate:i}=Ro.useThree();z.useEffect(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);return s.current=new wc(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=s.current)==null||h.destroy()}},[]),Ro.useFrame((d,h)=>{if(s.current){const p=s.current.update(h);u(),p||i()}});function l(d){d&&(o.current=V3(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],y=m.theta||0,S=m.reverse_rotation_direction?-1:1;f.rotation.y=S*(d[p]||0)+y}}return Vm(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);requestAnimationFrame(()=>c(d))}),g.jsx("group",{ref:l,children:n})}const j3="line",k3="mesh";function $3({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new Ct.Matrix4,a=z.useRef([]),o=z.useRef([]);z.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 Ct.Vector3,h=new Ct.Quaternion,p=new Ct.Vector3;n.decompose(d,h,p);const f=d.clone(),m=new Ct.Matrix4().makeRotationY(c.theta+u*(c.reverse_rotation_direction?-1:1)).multiply(new Ct.Matrix4().makeTranslation(0,c.d/1e3,0)).multiply(new Ct.Matrix4().makeTranslation(c.a/1e3,0,0)).multiply(new Ct.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(ng,{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(dt.Line,{ref:f=>{a.current[u]=f},name:j3,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{o.current[u]=f},name:k3,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const U3=console.warn;function D3(){return z.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&U3(e)}},[]),g.jsx(g.Fragment,{})}function L3(e){return e.type==="Mesh"}function B3({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:a}=M3(dt.useGLTF(e),e.split("/").pop()||e),o=z.useCallback(i=>{i&&r&&r()},[e]);function s(i){return L3(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:tg(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 ve.Mesh){r.material instanceof ve.Material&&(r.material.colorWrite=!1);const n=r.clone(),a=r.clone();n.material=new ve.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:ve.DoubleSide}),n.userData.isGhost=!0,a.material=new ve.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:ve.DoubleSide}),a.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(a))}}),e.userData.isGhost=!0)},N3=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof ve.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof ve.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},ag=Be(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=kc,flangeRef:a,postModelRender:o,transparentColor:s,...i})=>{const[l,c]=z.useState(null),u=z.useCallback(h=>{c(h)},[]);z.useEffect(()=>{l&&(s?F3(l,s):N3(l))},[l,s]);const d=g.jsx($3,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(Og.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(z.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(ng,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx(B3,{modelURL:n(t),postModelRender:o,flangeRef:a,...i})})})}),g.jsx(D3,{})]})});function og({connectedMotionGroup:e,getModel:t=kc,flangeRef:r,transparentColor:n,postModelRender:a,...o}){return e.dhParameters?g.jsx(ag,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:a,...o}):null}const z3=Be(ge.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:a=!1,onDriveToHomePress:o,onDriveToHomeRelease:s,connectedMotionGroup:i,robotComponent:l=og,customContentComponent:c,className:u})=>{var M;const d=P.useTheme(),{t:h}=Se.useTranslation(),[p,f]=z.useState(!1),m=z.useRef(null),y=z.useRef(null),[S,A]=z.useState(!1),[w,O]=z.useState({width:400,height:600}),[T,C]=z.useState(0);z.useEffect(()=>{const H=()=>{if(y.current){const{offsetWidth:re,offsetHeight:ae}=y.current;A(re>ae),O({width:re,height:ae})}};H();const ne=new ResizeObserver(H);return y.current&&ne.observe(y.current),()=>{ne.disconnect()}},[]);const R=z.useCallback(()=>{C(H=>H+1)},[]),E=z.useCallback(()=>{!a||!o||(f(!0),o())},[a,o]),V=z.useCallback(()=>{!a||!s||(f(!1),s())},[a,s]),b=z.useCallback(()=>{p&&s&&(f(!1),s())},[p,s]),I=S?w.width<350:w.height<200,G=S?w.height<310:w.height<450;return g.jsx(P.Card,{ref:y,className:u,sx:{width:"100%",height:"100%",display:"flex",flexDirection:S?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:S?{xs:200,sm:240,md:260}:{xs:150,sm:180,md:220},border:`1px solid ${d.palette.divider}`,borderRadius:"18px",boxShadow:"none",backgroundColor:((M=d.palette.backgroundPaperElevation)==null?void 0:M[8])||"#2A2A3F",backgroundImage:"none"},children:S?g.jsxs(g.Fragment,{children:[g.jsx(P.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:I?"none":"block"},children:!I&&g.jsxs(Ro.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},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(Ni,{}),g.jsx(dt.Bounds,{fit:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:R})})]})}),g.jsxs(P.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:I?"100%":"50%"},children:[g.jsxs(P.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(P.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Rl,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(P.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[!G&&c&&g.jsxs(P.Box,{children:[g.jsx(c,{}),g.jsx(P.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(P.Box,{sx:{mt:!G&&c?"auto":0},children:g.jsx(P.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(P.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:E,onMouseUp:V,onMouseLeave:b,onTouchStart:E,onTouchEnd:V,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(P.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(P.Box,{children:[g.jsx(P.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(Rl,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(P.Box,{sx:{flex:I?0:1,position:"relative",minHeight:I?0:{xs:120,sm:150,md:200},height:I?0:"auto",borderRadius:1,overflow:"hidden",display:I?"none":"block"},children:!I&&g.jsxs(Ro.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute"},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(Ni,{}),g.jsx(dt.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:R})})]})}),g.jsxs(P.Box,{children:[!G&&c&&g.jsxs(g.Fragment,{children:[g.jsx(c,{}),g.jsx(P.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(P.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:!G&&c?{xs:1,sm:2,md:5}:{xs:.5,sm:1,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(P.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!a,onMouseDown:E,onMouseUp:V,onMouseLeave:b,onTouchStart:E,onTouchEnd:V,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})]})]})})})})),G3=yr(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"),H3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),q3=z.forwardRef(H3);var $c=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.CELL_OPEN="CELL_OPEN",e.E_STOP="E_STOP",e.MANUAL_MODE="MANUAL_MODE",e.READY="READY",e))($c||{});const sg=Be(ge.observer(({setupState:e,className:t})=>{const r=P.useTheme(),{t:n}=Se.useTranslation(),a=()=>{var c,u,d,h,p,f,m;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:r.palette.secondary.contrastText};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:r.palette.secondary.contrastText};case"CELL_OPEN":return{label:n("RobotSetupReadinessIndicator.CellOpen.lb"),indicatorColor:r.palette.error.main,backgroundColor:((h=r.palette.backgroundPaperElevation)==null?void 0:h[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"E_STOP":return{label:n("RobotSetupReadinessIndicator.EStop.lb"),indicatorColor:r.palette.error.main,backgroundColor:((p=r.palette.backgroundPaperElevation)==null?void 0:p[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"MANUAL_MODE":return{label:n("RobotSetupReadinessIndicator.ManualMode.lb"),indicatorColor:r.palette.error.main,backgroundColor:((f=r.palette.backgroundPaperElevation)==null?void 0:f[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"PRECONDITION_NOT_FULFILLED":default:return{label:n("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:r.palette.error.main,backgroundColor:((m=r.palette.backgroundPaperElevation)==null?void 0:m[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText}}},{label:o,indicatorColor:s,backgroundColor:i,textColor:l}=a();return g.jsx(P.Chip,{className:t,label:g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(P.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:s,flexShrink:0}}),g.jsx(P.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}}})})),W3=Be(ge.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=sg,className:a})=>{var l;const o=P.useTheme(),s=t||"Robot",i=r===$c.READY;return g.jsxs(P.Box,{className:a,sx:{border:`1px solid ${o.palette.divider}`,background:((l=o.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(P.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(P.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${o.palette.primary.main} !important`},"& svg path":{fill:`${o.palette.primary.main} !important`}},children:g.jsx(q3,{})}):g.jsx(G3,{sx:{color:o.palette.error.main,fontSize:24}}),g.jsx(P.Typography,{variant:"body1",sx:{fontWeight:500,color:o.palette.text.primary},children:e}),g.jsx(P.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:o.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(P.Typography,{variant:"body2",sx:{color:o.palette.text.secondary},children:s})]}),n&&g.jsx(n,{setupState:r})]})})),J3=Array(6).fill(2*Math.PI),Al={[kt.Abb]:[0,0,0,0,Math.PI/2,0,0],[kt.Fanuc]:[0,0,0,0,-Math.PI/2,0,0],[kt.Yaskawa]:[0,0,0,0,-Math.PI/2,0,0],[kt.Kuka]:[0,-Math.PI/2,Math.PI/2,0,Math.PI/2,0,0],[kt.Universalrobots]:[0,-Math.PI/2,-Math.PI/2,-Math.PI/2,Math.PI/2,-Math.PI/2,0]};function ig(e){const[t]=e.split("_");switch(t){case"ABB":return kt.Abb;case"FANUC":return kt.Fanuc;case"YASKAWA":return kt.Yaskawa;case"KUKA":return kt.Kuka;case"UniversalRobots":return kt.Universalrobots;default:return null}}function Y3(e,t){const r=ig(e);return r&&r in Al?Al[r]:t||null}const K3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"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"})),Q3=z.forwardRef(K3),X3=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"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"})),Z3=z.forwardRef(X3),$t=ge.observer(({id:e,icon:t,color:r,title:n,name:a,label:o,explanation:s,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=ge.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(P.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(P.SvgIcon,{component:t,sx:{color:r}}),o&&g.jsx("div",{style:{color:r},children:o})]}),g.jsx(P.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(P.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(P.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(P.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:a})]}),g.jsx(P.Typography,{fontSize:"14px",children:s}),i&&g.jsx(P.Typography,{fontSize:"12px",children:i})]})})]})}),ej=ge.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:a})=>{const o=P.useTheme(),{t:s}=Se.useTranslation();return e?g.jsx($t,{id:"motion-group-virtual",icon:Z3,color:o.palette.tertiary.main,name:s("SafetyBar.ControllerType.Virtual.lb"),label:a?null:s("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(Se.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($t,{id:"motion-group-physical",icon:Q3,color:o.palette.primary.main,name:s("SafetyBar.ControllerType.Physical.lb"),label:a?null:s("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(Se.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),tj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.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"})),rj=z.forwardRef(tj),nj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"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})),aj=z.forwardRef(nj),oj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"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"})),sj=z.forwardRef(oj),ij=ge.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=Se.useTranslation(),o=P.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx($t,{id:"operation-mode-auto",icon:rj,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(Se.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($t,{id:"operation-mode-manual",icon:sj,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(Se.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($t,{id:"operation-mode-error",icon:aj,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(Se.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})}}),lj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"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"})),cj=z.forwardRef(lj),uj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),N.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"}),N.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"})),dj=z.forwardRef(uj),hj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"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})),pj=z.forwardRef(hj),mj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"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"})),fj=z.forwardRef(mj),gj=({title:e,titleId:t,...r},n)=>N.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?N.createElement("title",{id:t},e):null,N.createElement("path",{d:"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"})),yj=z.forwardRef(gj),bj=ge.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:a}=Se.useTranslation(),o=P.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsx($t,{id:"safety-state-normal",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Normal.lb"),label:n?null:a("SafetyBar.SafetyState.Normal.lb"),icon:fj,color:o.palette.text.secondary,explanation:g.jsx(Se.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($t,{id:"safety-state-estop",title:a("SafetyBar.SafetyState.ti"),name:a("SafetyBar.SafetyState.Estop.lb"),label:n?null:a("SafetyBar.SafetyState.Estop.lb"),icon:dj,color:o.palette.error.main,explanation:g.jsx(Se.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($t,{id:"safety-state-stop",icon:yj,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(Se.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($t,{id:"safety-state-manual-action-required",icon:pj,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(Se.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($t,{id:"safety-state-error",icon:cj,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(Se.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:y_(e,`Unknown safety state ${e}`)}}),xj=Be(ge.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s=!0})=>{const i=s?1:2;return g.jsxs(P.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(bj,{safetyState:n,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(P.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(ij,{operationMode:r,anchorOrigin:a,transformOrigin:o,compact:s}),g.jsx(P.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(ej,{isVirtual:e,motionGroupId:t,anchorOrigin:a,transformOrigin:o,compact:s})]})})),vj=P.styled(P.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}}]}}),Sj=e=>{const{ref:t,...r}=e;return g.jsx(vj,{ref:t,selected:e.selected,...r,color:"secondary",variant:"circular"})};function wj(e){const{children:t,value:r,index:n,...a}=e;return g.jsx("div",{role:"tabpanel",hidden:r!==n,id:`tabpanel-${n}`,"aria-labelledby":`tab-${n}`,...a,children:r===n&&g.jsx(P.Box,{children:t})})}function Cj({children:e,...t}){const{fullWidth:r,indicator:n,onChange:a,orientation:o,scrollButtons:s,selectionFollowsFocus:i,textColor:l,value:c,variant:u,...d}=t;return g.jsx(P.Box,{...d,children:e})}const Oj=Be(ge.observer(e=>{const{items:t,activeTab:r,defaultActiveTab:n=0,onTabChange:a,sx:o,ref:s}=e,i=r!==void 0,[l,c]=z.useState(n),u=i?r:l;z.useEffect(()=>{i||t.length!==0&&(l<0||l>t.length-1)&&c(0)},[t.length,i,l]);const d=(h,p)=>{i||c(p),a==null||a(p)};return g.jsxs(P.Box,{ref:s,sx:{height:"100%",display:"flex",flexDirection:"column",...o},children:[g.jsx(P.Box,{sx:{px:0,py:0,overflow:"visible",position:"relative",paddingTop:h=>h.spacing(2),paddingRight:h=>h.spacing(2.5)},children:g.jsx(P.Tabs,{value:u,onChange:d,sx:{minHeight:"32px",backgroundColor:"transparent",overflow:"visible","& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:2,overflow:"visible",paddingTop:0,paddingBottom:0},"& .MuiTabs-scroller":{overflow:"visible !important"},"& .MuiTab-root":{overflow:"visible"}},children:t.map((h,p)=>{var O,T,C;const f=()=>{if(!h.badge)return;const R=h.badge.content,E=h.badge.max;return typeof R=="number"&&E&&R>E?`${E}+`:R},m=()=>{if(!h.badge)return!1;const R=h.badge.content,E=h.badge.showZero;return!(R===0&&!E)},y=f(),S=m(),A=()=>{i||c(p),a==null||a(p)},w=g.jsx(P.Tab,{label:h.label,icon:h.icon,iconPosition:"start",disableRipple:!0,onClick:A,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:R=>{var E;return((E=R.palette.backgroundPaperElevation)==null?void 0:E[11])||"#32344B"},color:"text.primary",opacity:u===p?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out",position:"relative",overflow:"visible","&:hover":{opacity:u===p?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:R=>{var E;return((E=R.palette.backgroundPaperElevation)==null?void 0:E[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},h.id);return S?g.jsx(Cj,{component:"span",sx:{display:"inline-flex"},children:g.jsx(P.Badge,{badgeContent:y,color:((O=h.badge)==null?void 0:O.color)||"error",max:(T=h.badge)==null?void 0:T.max,showZero:(C=h.badge)==null?void 0:C.showZero,anchorOrigin:{vertical:"top",horizontal:"right"},overlap:"rectangular",sx:{"& .MuiBadge-badge":{opacity:"1 !important"}},children:w})},h.id):w})})}),g.jsx(P.Box,{sx:{mt:h=>h.spacing(2),borderBottom:1,borderColor:"divider"}}),g.jsx(P.Box,{sx:{flex:1,overflow:"auto"},children:t.map((h,p)=>g.jsx(wj,{value:u,index:p,children:h.content},h.id))})]})})),Tj={$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"},Pj=z.lazy(()=>import("@monaco-editor/react"));let Fi=null;async function Rj(){if(!Fi){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);Fi={shiki:await e({langs:[Tj],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return Fi}const Aj=Be(e=>{const t=P.useTheme(),[r,n]=z.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 Rj();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(z.Suspense,{fallback:g.jsx(Ac,{}),children:g.jsx(Pj,{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 lg(){var t,r,n,a,o,s,i;const e=P.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`},".MuiDataGrid-panelContent":{borderRadius:"16px !important","& .MuiPaper-root":{borderRadius:"16px !important"}},".MuiDataGrid-filterForm":{borderRadius:"16px !important","& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}},"& .MuiTextField-root":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}},".MuiDataGrid-filterFormValueInput":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}}},MuiDataGrid:{styleOverrides:{root:{},panelContent:{borderRadius:"16px !important"},filterForm:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}},filterFormValueInput:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}}}},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":P.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function Ij(){const e=lg();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?lg():Ij();return cp(r,e)}exports.AppHeader=Fg;exports.CollisionSceneRenderer=Vg;exports.CycleTimer=oO;exports.JoggingCartesianAxisControl=ol;exports.JoggingJointRotationControl=$m;exports.JoggingPanel=v3;exports.JoggingStore=Ws;exports.LoadingCover=Ac;exports.LoadingErrorMessage=Af;exports.LogPanel=A3;exports.LogStore=Zf;exports.LogViewer=eg;exports.MANUFACTURER_HOME_CONFIGS=Al;exports.NoMotionGroupModal=E3;exports.PoseCartesianValues=w3;exports.PoseJointValues=C3;exports.PresetEnvironment=Ni;exports.ProgramControl=_3;exports.ProgramState=ut;exports.ProgramStateIndicator=Rl;exports.Robot=og;exports.RobotCard=z3;exports.RobotListItem=W3;exports.RobotSetupReadinessIndicator=sg;exports.RobotSetupReadinessState=$c;exports.SafetyBar=xj;exports.SafetyZonesRenderer=kg;exports.SelectableFab=Sj;exports.SupportedRobot=ag;exports.TabBar=Oj;exports.Timer=dO;exports.TrajectoryRenderer=$g;exports.ValueInterpolator=wc;exports.VelocitySlider=Kf;exports.VelocitySliderLabel=jc;exports.WandelbotsDataGrid=_m;exports.WandelscriptEditor=Aj;exports.createDebugMessage=O3;exports.createErrorMessage=R3;exports.createInfoMessage=T3;exports.createLogMessage=$a;exports.createNovaMuiTheme=Ej;exports.createWarningMessage=P3;exports.defaultAxisConfig=J3;exports.defaultGetModel=kc;exports.extractManufacturer=ig;exports.getDefaultHomeConfig=Y3;exports.i18n=El;exports.useAnimationFrame=Vs;exports.useAutorun=Vm;exports.useInterpolation=Cc;exports.useMounted=_s;exports.useReaction=Mm;
|
|
150
|
+
*/var p_=function(){if(typeof WebSocket<"u")return WebSocket},m_=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},Mr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},f_=function(){function e(t,r,n){var o=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(s){o._debug("open event");var a=o._options.minUptime,i=a===void 0?Mr.minUptime:a;clearTimeout(o._connectTimeout),o._uptimeTimeout=setTimeout(function(){return o._acceptOpen()},i),o._ws.binaryType=o._binaryType,o._messageQueue.forEach(function(l){return o._ws.send(l)}),o._messageQueue=[],o.onopen&&o.onopen(s),o._listeners.open.forEach(function(l){return o._callEventListener(s,l)})},this._handleMessage=function(s){o._debug("message event"),o.onmessage&&o.onmessage(s),o._listeners.message.forEach(function(a){return o._callEventListener(s,a)})},this._handleError=function(s){o._debug("error event",s.message),o._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),o.onerror&&o.onerror(s),o._debug("exec error listeners"),o._listeners.error.forEach(function(a){return o._callEventListener(s,a)}),o._connect()},this._handleClose=function(s){o._debug("close event"),o._clearTimeouts(),o._shouldReconnect&&o._connect(),o.onclose&&o.onclose(s),o._listeners.close.forEach(function(a){return o._callEventListener(s,a)})},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?Mr.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,o=this._listeners[t.type];if(o)try{for(var s=l_(o),a=s.next();!a.done;a=s.next()){var i=a.value;this._callEventListener(t,i)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}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,u_(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,r=t.reconnectionDelayGrowFactor,n=r===void 0?Mr.reconnectionDelayGrowFactor:r,o=t.minReconnectionDelay,s=o===void 0?Mr.minReconnectionDelay:o,a=t.maxReconnectionDelay,i=a===void 0?Mr.maxReconnectionDelay:a,l=0;return this._retryCount>0&&(l=s*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,o=n===void 0?Mr.maxRetries:n,s=r.connectionTimeout,a=s===void 0?Mr.connectionTimeout:s,i=r.WebSocket,l=i===void 0?p_():i;if(this._retryCount>=o){this._debug("max retries reached",this._retryCount,">=",o);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!m_(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()},a))})}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new d_(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 h_(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}(),g_=Object.defineProperty,y_=Object.defineProperties,b_=Object.getOwnPropertyDescriptors,Eh=Object.getOwnPropertySymbols,x_=Object.prototype.hasOwnProperty,v_=Object.prototype.propertyIsEnumerable,Ih=(e,t,r)=>t in e?g_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cn=(e,t)=>{for(var r in t||(t={}))x_.call(t,r)&&Ih(e,r,t[r]);if(Eh)for(var r of Eh(t))v_.call(t,r)&&Ih(e,r,t[r]);return e},Ll=(e,t)=>y_(e,b_(t)),Me=(e,t,r)=>new Promise((n,o)=>{var s=l=>{try{i(r.next(l))}catch(c){o(c)}},a=l=>{try{i(r.throw(l))}catch(c){o(c)}},i=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,a);i((r=r.apply(e,t)).next())}),S_=class extends f_{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 Me(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.OPEN?e():(this.addEventListener("open",()=>e()),this.addEventListener("error",t))})})}closed(){return Me(this,null,function*(){return new Promise((e,t)=>{this.readyState===WebSocket.CLOSED?e():(this.addEventListener("close",()=>e()),this.addEventListener("error",t))})})}firstMessage(){return Me(this,null,function*(){return this.receivedFirstMessage?this.receivedFirstMessage:new Promise((e,t)=>{const r=o=>{this.receivedFirstMessage=o,this.removeEventListener("message",r),this.removeEventListener("error",n),e(o)},n=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(o)};this.addEventListener("message",r),this.addEventListener("error",n)})})}nextMessage(){return Me(this,null,function*(){return new Promise((e,t)=>{const r=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),e(o)},n=o=>{this.removeEventListener("message",r),this.removeEventListener("error",n),t(o)};this.addEventListener("message",r),this.addEventListener("error",n)})})}},w_=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}},nl=new w_;function br(e){try{return JSON.parse(e)}catch{return}}function C_(e,t){return e||(e="world"),t||(t="world"),e===t}var An="wandelbots.io",ol={dev:{domain:`https://auth.portal.dev.${An}`,clientId:"fLbJD0RLp5r2Dpucm5j8BjwMR6Hunfha"},stg:{domain:`https://auth.portal.stg.${An}`,clientId:"joVDeD9e786WzFNSGCqoVq7HNkWt5j6s"},prod:{domain:`https://auth.portal.${An}`,clientId:"J7WJUi38xVQdJAEBNRT9Xw1b0fXDb4J2"}},O_=e=>{if(e.includes(`dev.${An}`))return ol.dev;if(e.includes(`stg.${An}`))return ol.stg;if(e.includes(An))return ol.prod;throw new Error("Unsupported instance URL. Cannot determine Auth0 configuration.")},T_=e=>Me(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=O_(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")),o=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:a}=yield o.handleRedirectCallback();window.history.replaceState({},document.title,(a==null?void 0:a.returnTo)||window.location.pathname)}else yield o.loginWithRedirect();return yield o.getTokenSilently()});function Gf(e,t){return function(){return e.apply(t,arguments)}}const{toString:P_}=Object.prototype,{getPrototypeOf:lu}=Object,hi=(e=>t=>{const r=P_.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),jt=e=>(e=e.toLowerCase(),t=>hi(t)===e),pi=e=>t=>typeof t===e,{isArray:Wn}=Array,$o=pi("undefined");function A_(e){return e!==null&&!$o(e)&&e.constructor!==null&&!$o(e.constructor)&&bt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Hf=jt("ArrayBuffer");function R_(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Hf(e.buffer),t}const E_=pi("string"),bt=pi("function"),qf=pi("number"),mi=e=>e!==null&&typeof e=="object",I_=e=>e===!0||e===!1,Bs=e=>{if(hi(e)!=="object")return!1;const t=lu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},__=jt("Date"),M_=jt("File"),V_=jt("Blob"),k_=jt("FileList"),j_=e=>mi(e)&&bt(e.pipe),$_=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bt(e.append)&&((t=hi(e))==="formdata"||t==="object"&&bt(e.toString)&&e.toString()==="[object FormData]"))},D_=jt("URLSearchParams"),[U_,L_,B_,F_]=["ReadableStream","Request","Response","Headers"].map(jt),N_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yo(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Wn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let i;for(n=0;n<a;n++)i=s[n],t.call(null,e[i],i,e)}}function Wf(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const Ur=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Jf=e=>!$o(e)&&e!==Ur;function Bl(){const{caseless:e}=Jf(this)&&this||{},t={},r=(n,o)=>{const s=e&&Wf(t,o)||o;Bs(t[s])&&Bs(n)?t[s]=Bl(t[s],n):Bs(n)?t[s]=Bl({},n):Wn(n)?t[s]=n.slice():t[s]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Yo(arguments[n],r);return t}const z_=(e,t,r,{allOwnKeys:n}={})=>(Yo(t,(o,s)=>{r&&bt(o)?e[s]=Gf(o,r):e[s]=o},{allOwnKeys:n}),e),G_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),H_=(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)},q_=(e,t,r,n)=>{let o,s,a;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!n||n(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=r!==!1&&lu(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},J_=e=>{if(!e)return null;if(Wn(e))return e;let t=e.length;if(!qf(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Y_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&lu(Uint8Array)),K_=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Q_=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},X_=jt("HTMLFormElement"),Z_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),_h=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),e2=jt("RegExp"),Yf=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Yo(r,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(n[s]=a||o)}),Object.defineProperties(e,n)},t2=e=>{Yf(e,(t,r)=>{if(bt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(bt(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+"'")})}})},r2=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return Wn(e)?n(e):n(String(e).split(t)),r},n2=()=>{},o2=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function s2(e){return!!(e&&bt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const a2=e=>{const t=new Array(10),r=(n,o)=>{if(mi(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const s=Wn(n)?[]:{};return Yo(n,(a,i)=>{const l=r(a,o+1);!$o(l)&&(s[i]=l)}),t[o]=void 0,s}}return n};return r(e,0)},i2=jt("AsyncFunction"),l2=e=>e&&(mi(e)||bt(e))&&bt(e.then)&&bt(e.catch),Kf=((e,t)=>e?setImmediate:t?((r,n)=>(Ur.addEventListener("message",({source:o,data:s})=>{o===Ur&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),Ur.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",bt(Ur.postMessage)),c2=typeof queueMicrotask<"u"?queueMicrotask.bind(Ur):typeof process<"u"&&process.nextTick||Kf,q={isArray:Wn,isArrayBuffer:Hf,isBuffer:A_,isFormData:$_,isArrayBufferView:R_,isString:E_,isNumber:qf,isBoolean:I_,isObject:mi,isPlainObject:Bs,isReadableStream:U_,isRequest:L_,isResponse:B_,isHeaders:F_,isUndefined:$o,isDate:__,isFile:M_,isBlob:V_,isRegExp:e2,isFunction:bt,isStream:j_,isURLSearchParams:D_,isTypedArray:Y_,isFileList:k_,forEach:Yo,merge:Bl,extend:z_,trim:N_,stripBOM:G_,inherits:H_,toFlatObject:q_,kindOf:hi,kindOfTest:jt,endsWith:W_,toArray:J_,forEachEntry:K_,matchAll:Q_,isHTMLForm:X_,hasOwnProperty:_h,hasOwnProp:_h,reduceDescriptors:Yf,freezeMethods:t2,toObjectSet:r2,toCamelCase:Z_,noop:n2,toFiniteNumber:o2,findKey:Wf,global:Ur,isContextDefined:Jf,isSpecCompliantForm:s2,toJSONObject:a2,isAsyncFn:i2,isThenable:l2,setImmediate:Kf,asap:c2};function de(e,t,r,n,o){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),o&&(this.response=o,this.status=o.status?o.status:null)}q.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:q.toJSONObject(this.config),code:this.code,status:this.status}}});const Qf=de.prototype,Xf={};["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=>{Xf[e]={value:e}});Object.defineProperties(de,Xf);Object.defineProperty(Qf,"isAxiosError",{value:!0});de.from=(e,t,r,n,o,s)=>{const a=Object.create(Qf);return q.toFlatObject(e,a,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),de.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};const u2=null;function Fl(e){return q.isPlainObject(e)||q.isArray(e)}function Zf(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function Mh(e,t,r){return e?e.concat(t).map(function(o,s){return o=Zf(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function d2(e){return q.isArray(e)&&!e.some(Fl)}const h2=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function fi(e,t,r){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=q.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!q.isUndefined(y[m])});const n=r.metaTokens,o=r.visitor||u,s=r.dots,a=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(t);if(!q.isFunction(o))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(q.isDate(f))return f.toISOString();if(!l&&q.isBlob(f))throw new de("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(f)||q.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,y){let b=f;if(f&&!y&&typeof f=="object"){if(q.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(q.isArray(f)&&d2(f)||(q.isFileList(f)||q.endsWith(m,"[]"))&&(b=q.toArray(f)))return m=Zf(m),b.forEach(function(w,T){!(q.isUndefined(w)||w===null)&&t.append(a===!0?Mh([m],T,s):a===null?m:m+"[]",c(w))}),!1}return Fl(f)?!0:(t.append(Mh(y,m,s),c(f)),!1)}const d=[],h=Object.assign(h2,{defaultVisitor:u,convertValue:c,isVisitable:Fl});function p(f,m){if(!q.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),q.forEach(f,function(b,C){(!(q.isUndefined(b)||b===null)&&o.call(t,b,q.isString(C)?C.trim():C,m,h))===!0&&p(b,m?m.concat(C):[C])}),d.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Vh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function cu(e,t){this._pairs=[],e&&fi(e,this,t)}const eg=cu.prototype;eg.append=function(t,r){this._pairs.push([t,r])};eg.toString=function(t){const r=t?function(n){return t.call(this,n,Vh)}:Vh;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function p2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tg(e,t,r){if(!t)return e;const n=r&&r.encode||p2;q.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(o?s=o(t,r):s=q.isURLSearchParams(t)?t.toString():new cu(t,r).toString(n),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class kh{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){q.forEach(this.handlers,function(n){n!==null&&t(n)})}}const rg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},m2=typeof URLSearchParams<"u"?URLSearchParams:cu,f2=typeof FormData<"u"?FormData:null,g2=typeof Blob<"u"?Blob:null,y2={isBrowser:!0,classes:{URLSearchParams:m2,FormData:f2,Blob:g2},protocols:["http","https","file","blob","url","data"]},uu=typeof window<"u"&&typeof document<"u",Nl=typeof navigator=="object"&&navigator||void 0,b2=uu&&(!Nl||["ReactNative","NativeScript","NS"].indexOf(Nl.product)<0),x2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",v2=uu&&window.location.href||"http://localhost",S2=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:uu,hasStandardBrowserEnv:b2,hasStandardBrowserWebWorkerEnv:x2,navigator:Nl,origin:v2},Symbol.toStringTag,{value:"Module"})),et={...S2,...y2};function w2(e,t){return fi(e,new et.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,s){return et.isNode&&q.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function C2(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function O2(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function ng(e){function t(r,n,o,s){let a=r[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),l=s>=r.length;return a=!a&&q.isArray(o)?o.length:a,l?(q.hasOwnProp(o,a)?o[a]=[o[a],n]:o[a]=n,!i):((!o[a]||!q.isObject(o[a]))&&(o[a]=[]),t(r,n,o[a],s)&&q.isArray(o[a])&&(o[a]=O2(o[a])),!i)}if(q.isFormData(e)&&q.isFunction(e.entries)){const r={};return q.forEachEntry(e,(n,o)=>{t(C2(n),o,r,0)}),r}return null}function T2(e,t,r){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ko={transitional:rg,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=q.isObject(t);if(s&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return o?JSON.stringify(ng(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return w2(t,this.formSerializer).toString();if((i=q.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return fi(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),T2(t)):t}],transformResponse:[function(t){const r=this.transitional||Ko.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(n&&!this.responseType||o)){const a=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(a)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:et.classes.FormData,Blob:et.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],e=>{Ko.headers[e]={}});const P2=q.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"]),A2=e=>{const t={};let r,n,o;return e&&e.split(`
|
|
151
|
+
`).forEach(function(a){o=a.indexOf(":"),r=a.substring(0,o).trim().toLowerCase(),n=a.substring(o+1).trim(),!(!r||t[r]&&P2[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},jh=Symbol("internals");function so(e){return e&&String(e).trim().toLowerCase()}function Fs(e){return e===!1||e==null?e:q.isArray(e)?e.map(Fs):String(e)}function R2(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 E2=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function sl(e,t,r,n,o){if(q.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!q.isString(t)){if(q.isString(n))return t.indexOf(n)!==-1;if(q.isRegExp(n))return n.test(t)}}function I2(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function _2(e,t){const r=q.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,s,a){return this[n].call(this,t,o,s,a)},configurable:!0})})}let dt=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function s(i,l,c){const u=so(l);if(!u)throw new Error("header name must be a non-empty string");const d=q.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=Fs(i))}const a=(i,l)=>q.forEach(i,(c,u)=>s(c,u,l));if(q.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if(q.isString(t)&&(t=t.trim())&&!E2(t))a(A2(t),r);else if(q.isHeaders(t))for(const[i,l]of t.entries())s(l,i,n);else t!=null&&s(r,t,n);return this}get(t,r){if(t=so(t),t){const n=q.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return R2(o);if(q.isFunction(r))return r.call(this,o,n);if(q.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=so(t),t){const n=q.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||sl(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function s(a){if(a=so(a),a){const i=q.findKey(n,a);i&&(!r||sl(n,n[i],i,r))&&(delete n[i],o=!0)}}return q.isArray(t)?t.forEach(s):s(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const s=r[n];(!t||sl(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const r=this,n={};return q.forEach(this,(o,s)=>{const a=q.findKey(n,s);if(a){r[a]=Fs(o),delete r[s];return}const i=t?I2(s):String(s).trim();i!==s&&delete r[s],r[i]=Fs(o),n[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return q.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&q.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(`
|
|
152
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[jh]=this[jh]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=so(a);n[i]||(_2(o,a),n[i]=!0)}return q.isArray(t)?t.forEach(s):s(t),this}};dt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(dt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});q.freezeMethods(dt);function al(e,t){const r=this||Ko,n=t||r,o=dt.from(n.headers);let s=n.data;return q.forEach(e,function(i){s=i.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function og(e){return!!(e&&e.__CANCEL__)}function Jn(e,t,r){de.call(this,e??"canceled",de.ERR_CANCELED,t,r),this.name="CanceledError"}q.inherits(Jn,de,{__CANCEL__:!0});function sg(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 M2(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function V2(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[s];a||(a=c),r[o]=l,n[o]=c;let d=s,h=0;for(;d!==o;)h+=r[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-a<t)return;const p=u&&c-u;return p?Math.round(h*1e3/p):void 0}}function k2(e,t){let r=0,n=1e3/t,o,s;const a=(c,u=Date.now())=>{r=u,o=null,s&&(clearTimeout(s),s=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?a(c,u):(o=c,s||(s=setTimeout(()=>{s=null,a(o)},n-d)))},()=>o&&a(o)]}const ba=(e,t,r=3)=>{let n=0;const o=V2(50,250);return k2(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,l=a-n,c=o(l),u=a<=i;n=a;const d={loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-a)/c:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},r)},$h=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Dh=e=>(...t)=>q.asap(()=>e(...t)),j2=et.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,et.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(et.origin),et.navigator&&/(msie|trident)/i.test(et.navigator.userAgent)):()=>!0,$2=et.hasStandardBrowserEnv?{write(e,t,r,n,o,s){const a=[e+"="+encodeURIComponent(t)];q.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),q.isString(n)&&a.push("path="+n),q.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function D2(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function U2(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ag(e,t,r){let n=!D2(t);return e&&n||r==!1?U2(e,t):t}const Uh=e=>e instanceof dt?{...e}:e;function Wr(e,t){t=t||{};const r={};function n(c,u,d,h){return q.isPlainObject(c)&&q.isPlainObject(u)?q.merge.call({caseless:h},c,u):q.isPlainObject(u)?q.merge({},u):q.isArray(u)?u.slice():u}function o(c,u,d,h){if(q.isUndefined(u)){if(!q.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function s(c,u){if(!q.isUndefined(u))return n(void 0,u)}function a(c,u){if(q.isUndefined(u)){if(!q.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:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(c,u,d)=>o(Uh(c),Uh(u),d,!0)};return q.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||o,h=d(e[u],t[u],u);q.isUndefined(h)&&d!==i||(r[u]=h)}),r}const ig=e=>{const t=Wr({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=dt.from(a),t.url=tg(ag(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let l;if(q.isFormData(r)){if(et.hasStandardBrowserEnv||et.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(et.hasStandardBrowserEnv&&(n&&q.isFunction(n)&&(n=n(t)),n||n!==!1&&j2(t.url))){const c=o&&s&&$2.read(s);c&&a.set(o,c)}return t},L2=typeof XMLHttpRequest<"u",B2=L2&&function(e){return new Promise(function(r,n){const o=ig(e);let s=o.data;const a=dt.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=o,u,d,h,p,f;function m(){p&&p(),f&&f(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function b(){if(!y)return;const w=dt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),A={data:!i||i==="text"||i==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:w,config:e,request:y};sg(function(P){r(P),m()},function(P){n(P),m()},A),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(n(new de("Request aborted",de.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new de("Network Error",de.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let T=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||rg;o.timeoutErrorMessage&&(T=o.timeoutErrorMessage),n(new de(T,A.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,y)),y=null},s===void 0&&a.setContentType(null),"setRequestHeader"in y&&q.forEach(a.toJSON(),function(T,A){y.setRequestHeader(A,T)}),q.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),i&&i!=="json"&&(y.responseType=o.responseType),c&&([h,f]=ba(c,!0),y.addEventListener("progress",h)),l&&y.upload&&([d,p]=ba(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(u=w=>{y&&(n(!w||w.type?new Jn(null,e,y):w),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const C=M2(o.url);if(C&&et.protocols.indexOf(C)===-1){n(new de("Unsupported protocol "+C+":",de.ERR_BAD_REQUEST,e));return}y.send(s||null)})},F2=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const s=function(c){if(!o){o=!0,i();const u=c instanceof Error?c:this.reason;n.abort(u instanceof de?u:new Jn(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,s(new de(`timeout ${t} of ms exceeded`,de.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=n;return l.unsubscribe=()=>q.asap(i),l}},N2=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},z2=async function*(e,t){for await(const r of G2(e))yield*N2(r,t)},G2=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()}},Lh=(e,t,r,n)=>{const o=z2(e,t);let s=0,a,i=l=>{a||(a=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){i(),l.close();return}let d=u.byteLength;if(r){let h=s+=d;r(h)}l.enqueue(new Uint8Array(u))}catch(c){throw i(c),c}},cancel(l){return i(l),o.return()}},{highWaterMark:2})},gi=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",lg=gi&&typeof ReadableStream=="function",H2=gi&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),cg=(e,...t)=>{try{return!!e(...t)}catch{return!1}},q2=lg&&cg(()=>{let e=!1;const t=new Request(et.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Bh=64*1024,zl=lg&&cg(()=>q.isReadableStream(new Response("").body)),xa={stream:zl&&(e=>e.body)};gi&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xa[t]&&(xa[t]=q.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 W2=async e=>{if(e==null)return 0;if(q.isBlob(e))return e.size;if(q.isSpecCompliantForm(e))return(await new Request(et.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(q.isArrayBufferView(e)||q.isArrayBuffer(e))return e.byteLength;if(q.isURLSearchParams(e)&&(e=e+""),q.isString(e))return(await H2(e)).byteLength},J2=async(e,t)=>{const r=q.toFiniteNumber(e.getContentLength());return r??W2(t)},Y2=gi&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=ig(e);c=c?(c+"").toLowerCase():"text";let p=F2([o,s&&s.toAbortSignal()],a),f;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(l&&q2&&r!=="get"&&r!=="head"&&(y=await J2(u,n))!==0){let A=new Request(t,{method:"POST",body:n,duplex:"half"}),O;if(q.isFormData(n)&&(O=A.headers.get("content-type"))&&u.setContentType(O),A.body){const[P,E]=$h(y,ba(Dh(l)));n=Lh(A.body,Bh,P,E)}}q.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;f=new Request(t,{...h,signal:p,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:b?d:void 0});let C=await fetch(f);const w=zl&&(c==="stream"||c==="response");if(zl&&(i||w&&m)){const A={};["status","statusText","headers"].forEach(_=>{A[_]=C[_]});const O=q.toFiniteNumber(C.headers.get("content-length")),[P,E]=i&&$h(O,ba(Dh(i),!0))||[];C=new Response(Lh(C.body,Bh,P,()=>{E&&E(),m&&m()}),A)}c=c||"text";let T=await xa[q.findKey(xa,c)||"text"](C,e);return!w&&m&&m(),await new Promise((A,O)=>{sg(A,O,{data:T,headers:dt.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:f})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new de("Network Error",de.ERR_NETWORK,e,f),{cause:b.cause||b}):de.from(b,b&&b.code,e,f)}}),Gl={http:u2,xhr:B2,fetch:Y2};q.forEach(Gl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Fh=e=>`- ${e}`,K2=e=>q.isFunction(e)||e===null||e===!1,ug={getAdapter:e=>{e=q.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let s=0;s<t;s++){r=e[s];let a;if(n=r,!K2(r)&&(n=Gl[(a=String(r)).toLowerCase()],n===void 0))throw new de(`Unknown adapter '${a}'`);if(n)break;o[a||"#"+s]=n}if(!n){const s=Object.entries(o).map(([i,l])=>`adapter ${i} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
|
|
153
|
+
`+s.map(Fh).join(`
|
|
154
|
+
`):" "+Fh(s[0]):"as no adapter specified";throw new de("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:Gl};function il(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jn(null,e)}function Nh(e){return il(e),e.headers=dt.from(e.headers),e.data=al.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ug.getAdapter(e.adapter||Ko.adapter)(e).then(function(n){return il(e),n.data=al.call(e,e.transformResponse,n),n.headers=dt.from(n.headers),n},function(n){return og(n)||(il(e),n&&n.response&&(n.response.data=al.call(e,e.transformResponse,n.response),n.response.headers=dt.from(n.response.headers))),Promise.reject(n)})}const dg="1.8.3",yi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{yi[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const zh={};yi.transitional=function(t,r,n){function o(s,a){return"[Axios v"+dg+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,i)=>{if(t===!1)throw new de(o(a," has been removed"+(r?" in "+r:"")),de.ERR_DEPRECATED);return r&&!zh[a]&&(zh[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,a,i):!0}};yi.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Q2(e,t,r){if(typeof e!="object")throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],a=t[s];if(a){const i=e[s],l=i===void 0||a(i,s,e);if(l!==!0)throw new de("option "+s+" must be "+l,de.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new de("Unknown option "+s,de.ERR_BAD_OPTION)}}const Ns={assertOptions:Q2,validators:yi},Ut=Ns.validators;let Nr=class{constructor(t){this.defaults=t,this.interceptors={request:new kh,response:new kh}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
155
|
+
`+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Wr(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&Ns.assertOptions(n,{silentJSONParsing:Ut.transitional(Ut.boolean),forcedJSONParsing:Ut.transitional(Ut.boolean),clarifyTimeoutError:Ut.transitional(Ut.boolean)},!1),o!=null&&(q.isFunction(o)?r.paramsSerializer={serialize:o}:Ns.assertOptions(o,{encode:Ut.function,serialize:Ut.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ns.assertOptions(r,{baseUrl:Ut.spelling("baseURL"),withXsrfToken:Ut.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=s&&q.merge(s.common,s[r.method]);s&&q.forEach(["delete","get","head","post","put","patch","common"],f=>{delete s[f]}),r.headers=dt.concat(a,s);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=[Nh.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(y){m.call(this,y);break}}try{u=Nh.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=Wr(this.defaults,t);const r=ag(t.baseURL,t.url,t.allowAbsoluteUrls);return tg(r,t.params,t.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(t){Nr.prototype[t]=function(r,n){return this.request(Wr(n||{},{method:t,url:r,data:(n||{}).data}))}});q.forEach(["post","put","patch"],function(t){function r(n){return function(s,a,i){return this.request(Wr(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Nr.prototype[t]=r(),Nr.prototype[t+"Form"]=r(!0)});let X2=class hg{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{n.subscribe(i),s=i}).then(o);return a.cancel=function(){n.unsubscribe(s)},a},t(function(s,a,i){n.reason||(n.reason=new Jn(s,a,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 hg(function(o){t=o}),cancel:t}}};function Z2(e){return function(r){return e.apply(null,r)}}function eM(e){return q.isObject(e)&&e.isAxiosError===!0}const Hl={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(Hl).forEach(([e,t])=>{Hl[t]=e});function pg(e){const t=new Nr(e),r=Gf(Nr.prototype.request,t);return q.extend(r,Nr.prototype,t,{allOwnKeys:!0}),q.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return pg(Wr(e,o))},r}const I=pg(Ko);I.Axios=Nr;I.CanceledError=Jn;I.CancelToken=X2;I.isCancel=og;I.VERSION=dg;I.toFormData=fi;I.AxiosError=de;I.Cancel=I.CanceledError;I.all=function(t){return Promise.all(t)};I.spread=Z2;I.isAxiosError=eM;I.mergeConfig=Wr;I.AxiosHeaders=dt;I.formToJSON=e=>ng(q.isHTMLForm(e)?new FormData(e):e);I.getAdapter=ug.getAdapter;I.HttpStatusCode=Hl;I.default=I;const{Axios:R$,AxiosError:ql,CanceledError:E$,isCancel:I$,CancelToken:_$,VERSION:M$,all:V$,Cancel:k$,isAxiosError:tM,spread:j$,toFormData:$$,AxiosHeaders:D$,HttpStatusCode:U$,formToJSON:L$,getAdapter:B$,mergeConfig:F$}=I,V="/api/v1".replace(/\/+$/,"");class Ve{constructor(t,r=V,n=I){oe(this,"basePath");oe(this,"axios");oe(this,"configuration");this.basePath=r,this.axios=n,t&&(this.configuration=t,this.basePath=t.basePath??r)}}class rM extends Error{constructor(r,n){super(n);oe(this,"field");this.field=r,this.name="RequiredError"}}const k={},j="https://example.com",S=function(e,t,r){if(r==null)throw new rM(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})},D=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 Wl(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>Wl(e,n,r)):Object.keys(t).forEach(n=>Wl(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);Wl(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||""},L=function(e){return e.pathname+e.search+e.hash},B=function(e,t,r,n){return(o=t,s=r)=>{const a={...e.options,url:(o.defaults.baseURL?"":(n==null?void 0:n.basePath)??s)+e.url};return o.request(a)}},zt={Abb:"abb",Fanuc:"fanuc",Kuka:"kuka",Universalrobots:"universalrobots",Yaskawa:"yaskawa"},nM=function(e){return{addApp:async(t,r,n,o={})=>{S("addApp","cell",t),S("addApp","app",r);const s="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(r,l,e),{url:L(a),options:l}},clearApps:async(t,r,n={})=>{S("clearApps","cell",t);const o="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),r!==void 0&&(c.completionTimeout=r),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},deleteApp:async(t,r,n,o={})=>{S("deleteApp","cell",t),S("deleteApp","app",r);const s="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},getApp:async(t,r,n={})=>{S("getApp","cell",t),S("getApp","app",r);const o="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},listApps:async(t,r={})=>{S("listApps","cell",t);const n="/cells/{cell}/apps".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},updateApp:async(t,r,n,o,s={})=>{S("updateApp","cell",t),S("updateApp","app",r),S("updateApp","app2",n);const a="/cells/{cell}/apps/{app}".replace("{cell}",encodeURIComponent(String(t))).replace("{app}",encodeURIComponent(String(r))),i=new URL(a,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};$(c,e),await D(u,e),o!==void 0&&(d.completionTimeout=o),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ue(n,c,e),{url:L(i),options:c}}}},mn=function(e){const t=nM(e);return{async addApp(r,n,o,s){var c,u;const a=await t.addApp(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ApplicationApi.addApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async clearApps(r,n,o){var l,c;const s=await t.clearApps(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ApplicationApi.clearApps"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async deleteApp(r,n,o,s){var c,u;const a=await t.deleteApp(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ApplicationApi.deleteApp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async getApp(r,n,o){var l,c;const s=await t.getApp(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ApplicationApi.getApp"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async listApps(r,n){var i,l;const o=await t.listApps(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["ApplicationApi.listApps"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async updateApp(r,n,o,s,a){var u,d;const i=await t.updateApp(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["ApplicationApi.updateApp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,I,V,e)(h,c||p)}}};class Gh extends Ve{addApp(t,r,n,o){return mn(this.configuration).addApp(t,r,n,o).then(s=>s(this.axios,this.basePath))}clearApps(t,r,n){return mn(this.configuration).clearApps(t,r,n).then(o=>o(this.axios,this.basePath))}deleteApp(t,r,n,o){return mn(this.configuration).deleteApp(t,r,n,o).then(s=>s(this.axios,this.basePath))}getApp(t,r,n){return mn(this.configuration).getApp(t,r,n).then(o=>o(this.axios,this.basePath))}listApps(t,r){return mn(this.configuration).listApps(t,r).then(n=>n(this.axios,this.basePath))}updateApp(t,r,n,o,s){return mn(this.configuration).updateApp(t,r,n,o,s).then(a=>a(this.axios,this.basePath))}}const oM=function(e){return{deleteCell:async(t,r,n={})=>{S("deleteCell","cell",t);const o="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),r!==void 0&&(c.completionTimeout=r),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},deployCell:async(t,r,n={})=>{S("deployCell","cell",t);const o="/cells",s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};$(i,e),await D(l,e),r!==void 0&&(c.completionTimeout=r),l["Content-Type"]="application/json",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(t,i,e),{url:L(s),options:i}},getCell:async(t,r={})=>{S("getCell","cell",t);const n="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},getCellStatus:async(t,r={})=>{S("getCellStatus","cell",t);const n="/cells/{cell}/status".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},listCells:async(t={})=>{const r="/cells",n=new URL(r,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...t},a={},i={};$(s,e),await D(a,e),U(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...t.headers},{url:L(n),options:s}},updateCell:async(t,r,n,o={})=>{S("updateCell","cell",t),S("updateCell","cell2",r);const s="/cells/{cell}".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(r,l,e),{url:L(a),options:l}}}},fn=function(e){const t=oM(e);return{async deleteCell(r,n,o){var l,c;const s=await t.deleteCell(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CellApi.deleteCell"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async deployCell(r,n,o){var l,c;const s=await t.deployCell(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CellApi.deployCell"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getCell(r,n){var i,l;const o=await t.getCell(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["CellApi.getCell"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async getCellStatus(r,n){var i,l;const o=await t.getCellStatus(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["CellApi.getCellStatus"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async listCells(r){var a,i;const n=await t.listCells(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=k["CellApi.listCells"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>B(n,I,V,e)(l,s||c)},async updateCell(r,n,o,s){var c,u;const a=await t.updateCell(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["CellApi.updateCell"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)}}};class sM extends Ve{deleteCell(t,r,n){return fn(this.configuration).deleteCell(t,r,n).then(o=>o(this.axios,this.basePath))}deployCell(t,r,n){return fn(this.configuration).deployCell(t,r,n).then(o=>o(this.axios,this.basePath))}getCell(t,r){return fn(this.configuration).getCell(t,r).then(n=>n(this.axios,this.basePath))}getCellStatus(t,r){return fn(this.configuration).getCellStatus(t,r).then(n=>n(this.axios,this.basePath))}listCells(t){return fn(this.configuration).listCells(t).then(r=>r(this.axios,this.basePath))}updateCell(t,r,n,o){return fn(this.configuration).updateCell(t,r,n,o).then(s=>s(this.axios,this.basePath))}}const aM=function(e){return{addRobotController:async(t,r,n,o={})=>{S("addRobotController","cell",t),S("addRobotController","robotController",r);const s="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(r,l,e),{url:L(a),options:l}},clearRobotControllers:async(t,r,n={})=>{S("clearRobotControllers","cell",t);const o="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),r!==void 0&&(c.completionTimeout=r),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},deleteRobotController:async(t,r,n,o={})=>{S("deleteRobotController","cell",t),S("deleteRobotController","controller",r);const s="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"DELETE",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.completionTimeout=n),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},getCurrentRobotControllerState:async(t,r,n={})=>{S("getCurrentRobotControllerState","cell",t),S("getCurrentRobotControllerState","controller",r);const o="/cells/{cell}/controllers/{controller}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getMode:async(t,r,n={})=>{S("getMode","cell",t),S("getMode","controller",r);const o="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getRobotController:async(t,r,n={})=>{S("getRobotController","cell",t),S("getRobotController","controller",r);const o="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getSupportedModes:async(t,r,n={})=>{S("getSupportedModes","cell",t),S("getSupportedModes","controller",r);const o="/cells/{cell}/controllers/{controller}/controller-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getVirtualRobotConfiguration:async(t,r,n={})=>{S("getVirtualRobotConfiguration","cell",t),S("getVirtualRobotConfiguration","controller",r);const o="/cells/{cell}/controllers/{controller}/virtual-robot-configuration".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},listControllers:async(t,r={})=>{S("listControllers","cell",t);const n="/cells/{cell}/controllers".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},setDefaultMode:async(t,r,n,o={})=>{S("setDefaultMode","cell",t),S("setDefaultMode","controller",r),S("setDefaultMode","mode",n);const s="/cells/{cell}/controllers/{controller}/mode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.mode=n),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},streamFreeDrive:async(t,r,n,o={})=>{S("streamFreeDrive","cell",t),S("streamFreeDrive","controller",r);const s="/cells/{cell}/controllers/{controller}/free-drive-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.response_rate=n),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},streamModeChange:async(t,r,n={})=>{S("streamModeChange","cell",t),S("streamModeChange","controller",r);const o="/cells/{cell}/controllers/{controller}/mode-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},streamRobotControllerState:async(t,r,n,o={})=>{S("streamRobotControllerState","cell",t),S("streamRobotControllerState","controller",r);const s="/cells/{cell}/controllers/{controller}/state-stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.response_rate=n),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},updateRobotController:async(t,r,n,o,s={})=>{S("updateRobotController","cell",t),S("updateRobotController","controller",r),S("updateRobotController","robotController",n);const a="/cells/{cell}/controllers/{controller}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),i=new URL(a,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};$(c,e),await D(u,e),o!==void 0&&(d.completionTimeout=o),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ue(n,c,e),{url:L(i),options:c}}}},lt=function(e){const t=aM(e);return{async addRobotController(r,n,o,s){var c,u;const a=await t.addRobotController(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.addRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async clearRobotControllers(r,n,o){var l,c;const s=await t.clearRobotControllers(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.clearRobotControllers"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async deleteRobotController(r,n,o,s){var c,u;const a=await t.deleteRobotController(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.deleteRobotController"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async getCurrentRobotControllerState(r,n,o){var l,c;const s=await t.getCurrentRobotControllerState(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getCurrentRobotControllerState"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getMode(r,n,o){var l,c;const s=await t.getMode(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getMode"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getRobotController(r,n,o){var l,c;const s=await t.getRobotController(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getRobotController"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getSupportedModes(r,n,o){var l,c;const s=await t.getSupportedModes(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getSupportedModes"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getVirtualRobotConfiguration(r,n,o){var l,c;const s=await t.getVirtualRobotConfiguration(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.getVirtualRobotConfiguration"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async listControllers(r,n){var i,l;const o=await t.listControllers(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["ControllerApi.listControllers"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async setDefaultMode(r,n,o,s){var c,u;const a=await t.setDefaultMode(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.setDefaultMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async streamFreeDrive(r,n,o,s){var c,u;const a=await t.streamFreeDrive(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.streamFreeDrive"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async streamModeChange(r,n,o){var l,c;const s=await t.streamModeChange(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ControllerApi.streamModeChange"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async streamRobotControllerState(r,n,o,s){var c,u;const a=await t.streamRobotControllerState(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerApi.streamRobotControllerState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async updateRobotController(r,n,o,s,a){var u,d;const i=await t.updateRobotController(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["ControllerApi.updateRobotController"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,I,V,e)(h,c||p)}}};class iM extends Ve{addRobotController(t,r,n,o){return lt(this.configuration).addRobotController(t,r,n,o).then(s=>s(this.axios,this.basePath))}clearRobotControllers(t,r,n){return lt(this.configuration).clearRobotControllers(t,r,n).then(o=>o(this.axios,this.basePath))}deleteRobotController(t,r,n,o){return lt(this.configuration).deleteRobotController(t,r,n,o).then(s=>s(this.axios,this.basePath))}getCurrentRobotControllerState(t,r,n){return lt(this.configuration).getCurrentRobotControllerState(t,r,n).then(o=>o(this.axios,this.basePath))}getMode(t,r,n){return lt(this.configuration).getMode(t,r,n).then(o=>o(this.axios,this.basePath))}getRobotController(t,r,n){return lt(this.configuration).getRobotController(t,r,n).then(o=>o(this.axios,this.basePath))}getSupportedModes(t,r,n){return lt(this.configuration).getSupportedModes(t,r,n).then(o=>o(this.axios,this.basePath))}getVirtualRobotConfiguration(t,r,n){return lt(this.configuration).getVirtualRobotConfiguration(t,r,n).then(o=>o(this.axios,this.basePath))}listControllers(t,r){return lt(this.configuration).listControllers(t,r).then(n=>n(this.axios,this.basePath))}setDefaultMode(t,r,n,o){return lt(this.configuration).setDefaultMode(t,r,n,o).then(s=>s(this.axios,this.basePath))}streamFreeDrive(t,r,n,o){return lt(this.configuration).streamFreeDrive(t,r,n,o).then(s=>s(this.axios,this.basePath))}streamModeChange(t,r,n){return lt(this.configuration).streamModeChange(t,r,n).then(o=>o(this.axios,this.basePath))}streamRobotControllerState(t,r,n,o){return lt(this.configuration).streamRobotControllerState(t,r,n,o).then(s=>s(this.axios,this.basePath))}updateRobotController(t,r,n,o,s){return lt(this.configuration).updateRobotController(t,r,n,o,s).then(a=>a(this.axios,this.basePath))}}const lM=function(e){return{listIODescriptions:async(t,r,n,o={})=>{S("listIODescriptions","cell",t),S("listIODescriptions","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/description".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),n&&(u.ios=n),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},listIOValues:async(t,r,n,o={})=>{S("listIOValues","cell",t),S("listIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),n&&(u.ios=n),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},setOutputValues:async(t,r,n,o={})=>{S("setOutputValues","cell",t),S("setOutputValues","controller",r),S("setOutputValues","iOValue",n);const s="/cells/{cell}/controllers/{controller}/ios/values".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}},streamIOValues:async(t,r,n,o={})=>{S("streamIOValues","cell",t),S("streamIOValues","controller",r);const s="/cells/{cell}/controllers/{controller}/ios/stream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),n&&(u.ios=n),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},waitForIOEvent:async(t,r,n,o,s,a,i,l={})=>{S("waitForIOEvent","cell",t),S("waitForIOEvent","controller",r),S("waitForIOEvent","io",n),S("waitForIOEvent","comparisonType",o);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 D(p,e),n!==void 0&&(f.io=n),o!==void 0&&(f.comparison_type=o),s!==void 0&&(f.boolean_value=s),a!==void 0&&(f.integer_value=a),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:L(u),options:h}}}},ao=function(e){const t=lM(e);return{async listIODescriptions(r,n,o,s){var c,u;const a=await t.listIODescriptions(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerIOsApi.listIODescriptions"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async listIOValues(r,n,o,s){var c,u;const a=await t.listIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerIOsApi.listIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async setOutputValues(r,n,o,s){var c,u;const a=await t.setOutputValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerIOsApi.setOutputValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async streamIOValues(r,n,o,s){var c,u;const a=await t.streamIOValues(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ControllerIOsApi.streamIOValues"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async waitForIOEvent(r,n,o,s,a,i,l,c){var p,f;const u=await t.waitForIOEvent(r,n,o,s,a,i,l,c),d=(e==null?void 0:e.serverIndex)??0,h=(f=(p=k["ControllerIOsApi.waitForIOEvent"])==null?void 0:p[d])==null?void 0:f.url;return(m,y)=>B(u,I,V,e)(m,h||y)}}};class cM extends Ve{listIODescriptions(t,r,n,o){return ao(this.configuration).listIODescriptions(t,r,n,o).then(s=>s(this.axios,this.basePath))}listIOValues(t,r,n,o){return ao(this.configuration).listIOValues(t,r,n,o).then(s=>s(this.axios,this.basePath))}setOutputValues(t,r,n,o){return ao(this.configuration).setOutputValues(t,r,n,o).then(s=>s(this.axios,this.basePath))}streamIOValues(t,r,n,o){return ao(this.configuration).streamIOValues(t,r,n,o).then(s=>s(this.axios,this.basePath))}waitForIOEvent(t,r,n,o,s,a,i,l){return ao(this.configuration).waitForIOEvent(t,r,n,o,s,a,i,l).then(c=>c(this.axios,this.basePath))}}const uM=function(e){return{addCoordinateSystem:async(t,r,n={})=>{S("addCoordinateSystem","cell",t),S("addCoordinateSystem","addRequest",r);const o="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};$(i,e),await D(l,e),l["Content-Type"]="application/json",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:L(s),options:i}},deleteCoordinateSystem:async(t,r,n={})=>{S("deleteCoordinateSystem","cell",t),S("deleteCoordinateSystem","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 a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getCoordinateSystem:async(t,r,n,o={})=>{S("getCoordinateSystem","cell",t),S("getCoordinateSystem","coordinateSystem",r);const s="/cells/{cell}/coordinate-systems/{coordinate-system}".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.rotation_type=n),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},listCoordinateSystems:async(t,r,n={})=>{S("listCoordinateSystems","cell",t);const o="/cells/{cell}/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),r!==void 0&&(c.rotation_type=r),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},transformInCoordinateSystem:async(t,r,n,o={})=>{S("transformInCoordinateSystem","cell",t),S("transformInCoordinateSystem","coordinateSystem",r),S("transformInCoordinateSystem","pose",n);const s="/cells/{cell}/coordinate-systems/{coordinate-system}/transform".replace("{cell}",encodeURIComponent(String(t))).replace("{coordinate-system}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}}}},io=function(e){const t=uM(e);return{async addCoordinateSystem(r,n,o){var l,c;const s=await t.addCoordinateSystem(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CoordinateSystemsApi.addCoordinateSystem"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async deleteCoordinateSystem(r,n,o){var l,c;const s=await t.deleteCoordinateSystem(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CoordinateSystemsApi.deleteCoordinateSystem"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getCoordinateSystem(r,n,o,s){var c,u;const a=await t.getCoordinateSystem(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["CoordinateSystemsApi.getCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async listCoordinateSystems(r,n,o){var l,c;const s=await t.listCoordinateSystems(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["CoordinateSystemsApi.listCoordinateSystems"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async transformInCoordinateSystem(r,n,o,s){var c,u;const a=await t.transformInCoordinateSystem(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["CoordinateSystemsApi.transformInCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)}}};class dM extends Ve{addCoordinateSystem(t,r,n){return io(this.configuration).addCoordinateSystem(t,r,n).then(o=>o(this.axios,this.basePath))}deleteCoordinateSystem(t,r,n){return io(this.configuration).deleteCoordinateSystem(t,r,n).then(o=>o(this.axios,this.basePath))}getCoordinateSystem(t,r,n,o){return io(this.configuration).getCoordinateSystem(t,r,n,o).then(s=>s(this.axios,this.basePath))}listCoordinateSystems(t,r,n){return io(this.configuration).listCoordinateSystems(t,r,n).then(o=>o(this.axios,this.basePath))}transformInCoordinateSystem(t,r,n,o){return io(this.configuration).transformInCoordinateSystem(t,r,n,o).then(s=>s(this.axios,this.basePath))}}const hM=function(e){return{clearDevices:async(t,r={})=>{S("clearDevices","cell",t);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"DELETE",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},createDevice:async(t,r,n={})=>{S("createDevice","cell",t),S("createDevice","createDeviceRequestInner",r);const o="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};$(i,e),await D(l,e),l["Content-Type"]="application/json",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:L(s),options:i}},deleteDevice:async(t,r,n={})=>{S("deleteDevice","cell",t),S("deleteDevice","identifier",r);const o="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getDevice:async(t,r,n={})=>{S("getDevice","cell",t),S("getDevice","identifier",r);const o="/cells/{cell}/devices/{identifier}".replace("{cell}",encodeURIComponent(String(t))).replace("{identifier}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},listDevices:async(t,r={})=>{S("listDevices","cell",t);const n="/cells/{cell}/devices".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}}}},lo=function(e){const t=hM(e);return{async clearDevices(r,n){var i,l;const o=await t.clearDevices(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["DeviceConfigurationApi.clearDevices"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async createDevice(r,n,o){var l,c;const s=await t.createDevice(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["DeviceConfigurationApi.createDevice"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async deleteDevice(r,n,o){var l,c;const s=await t.deleteDevice(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["DeviceConfigurationApi.deleteDevice"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getDevice(r,n,o){var l,c;const s=await t.getDevice(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["DeviceConfigurationApi.getDevice"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async listDevices(r,n){var i,l;const o=await t.listDevices(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["DeviceConfigurationApi.listDevices"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)}}};class pM extends Ve{clearDevices(t,r){return lo(this.configuration).clearDevices(t,r).then(n=>n(this.axios,this.basePath))}createDevice(t,r,n){return lo(this.configuration).createDevice(t,r,n).then(o=>o(this.axios,this.basePath))}deleteDevice(t,r,n){return lo(this.configuration).deleteDevice(t,r,n).then(o=>o(this.axios,this.basePath))}getDevice(t,r,n){return lo(this.configuration).getDevice(t,r,n).then(o=>o(this.axios,this.basePath))}listDevices(t,r){return lo(this.configuration).listDevices(t,r).then(n=>n(this.axios,this.basePath))}}const mM=function(e){return{createProgram:async(t,r,n,o={})=>{S("createProgram","cell",t),S("createProgram","body",r);const s="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.name=n),c["Content-Type"]="text/plain",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(r,l,e),{url:L(a),options:l}},deleteProgram:async(t,r,n={})=>{S("deleteProgram","cell",t),S("deleteProgram","program",r);const o="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},deleteProgramList:async(t,r,n={})=>{S("deleteProgramList","cell",t),S("deleteProgramList","programIds",r);const o="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),r&&(c.program_ids=r),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getProgram:async(t,r,n={})=>{S("getProgram","cell",t),S("getProgram","program",r);const o="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},updateProgram:async(t,r,n,o={})=>{S("updateProgram","cell",t),S("updateProgram","program",r),S("updateProgram","body",n);const s="/cells/{cell}/store/programs/{program}".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="text/plain",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}}}},co=function(e){const t=mM(e);return{async createProgram(r,n,o,s){var c,u;const a=await t.createProgram(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryProgramApi.createProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async deleteProgram(r,n,o){var l,c;const s=await t.deleteProgram(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramApi.deleteProgram"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async deleteProgramList(r,n,o){var l,c;const s=await t.deleteProgramList(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramApi.deleteProgramList"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getProgram(r,n,o){var l,c;const s=await t.getProgram(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramApi.getProgram"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async updateProgram(r,n,o,s){var c,u;const a=await t.updateProgram(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryProgramApi.updateProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)}}};class fM extends Ve{createProgram(t,r,n,o){return co(this.configuration).createProgram(t,r,n,o).then(s=>s(this.axios,this.basePath))}deleteProgram(t,r,n){return co(this.configuration).deleteProgram(t,r,n).then(o=>o(this.axios,this.basePath))}deleteProgramList(t,r,n){return co(this.configuration).deleteProgramList(t,r,n).then(o=>o(this.axios,this.basePath))}getProgram(t,r,n){return co(this.configuration).getProgram(t,r,n).then(o=>o(this.axios,this.basePath))}updateProgram(t,r,n,o){return co(this.configuration).updateProgram(t,r,n,o).then(s=>s(this.axios,this.basePath))}}const gM=function(e){return{getProgramMetadata:async(t,r,n={})=>{S("getProgramMetadata","cell",t),S("getProgramMetadata","program",r);const o="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},listProgramMetadata:async(t,r,n={})=>{S("listProgramMetadata","cell",t);const o="/cells/{cell}/store/programs".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),r!==void 0&&(c.show_hidden=r),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},updateProgramMetadata:async(t,r,n,o={})=>{S("updateProgramMetadata","cell",t),S("updateProgramMetadata","program",r),S("updateProgramMetadata","updateProgramMetadataRequest",n);const s="/cells/{cell}/store/programs/{program}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}},uploadProgramMetadataImage:async(t,r,n,o={})=>{S("uploadProgramMetadataImage","cell",t),S("uploadProgramMetadataImage","program",r),S("uploadProgramMetadataImage","file",n);const s="/cells/{cell}/store/programs/{program}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{program}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={},d=new(e&&e.formDataCtor||FormData);$(l,e),await D(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",U(a,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...o.headers},l.data=d,{url:L(a),options:l}}}},Os=function(e){const t=gM(e);return{async getProgramMetadata(r,n,o){var l,c;const s=await t.getProgramMetadata(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramMetadataApi.getProgramMetadata"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async listProgramMetadata(r,n,o){var l,c;const s=await t.listProgramMetadata(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryProgramMetadataApi.listProgramMetadata"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async updateProgramMetadata(r,n,o,s){var c,u;const a=await t.updateProgramMetadata(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryProgramMetadataApi.updateProgramMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async uploadProgramMetadataImage(r,n,o,s){var c,u;const a=await t.uploadProgramMetadataImage(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryProgramMetadataApi.uploadProgramMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)}}};class yM extends Ve{getProgramMetadata(t,r,n){return Os(this.configuration).getProgramMetadata(t,r,n).then(o=>o(this.axios,this.basePath))}listProgramMetadata(t,r,n){return Os(this.configuration).listProgramMetadata(t,r,n).then(o=>o(this.axios,this.basePath))}updateProgramMetadata(t,r,n,o){return Os(this.configuration).updateProgramMetadata(t,r,n,o).then(s=>s(this.axios,this.basePath))}uploadProgramMetadataImage(t,r,n,o){return Os(this.configuration).uploadProgramMetadataImage(t,r,n,o).then(s=>s(this.axios,this.basePath))}}const bM=function(e){return{createRecipe:async(t,r,n,o,s={})=>{S("createRecipe","cell",t),S("createRecipe","programId",r),S("createRecipe","body",n);const a="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),i=new URL(a,j);let l;e&&(l=e.baseOptions);const c={method:"POST",...l,...s},u={},d={};$(c,e),await D(u,e),r!==void 0&&(d.program_id=r),o!==void 0&&(d.name=o),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ue(n,c,e),{url:L(i),options:c}},deleteRecipe:async(t,r,n={})=>{S("deleteRecipe","cell",t),S("deleteRecipe","recipe",r);const o="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},deleteRecipeList:async(t,r,n={})=>{S("deleteRecipeList","cell",t),S("deleteRecipeList","recipeIds",r);const o="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),r&&(c.recipe_ids=r),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getRecipe:async(t,r,n={})=>{S("getRecipe","cell",t),S("getRecipe","recipe",r);const o="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},updateRecipe:async(t,r,n,o={})=>{S("updateRecipe","cell",t),S("updateRecipe","recipe",r),S("updateRecipe","body",n);const s="/cells/{cell}/store/recipes/{recipe}".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}}}},uo=function(e){const t=bM(e);return{async createRecipe(r,n,o,s,a){var u,d;const i=await t.createRecipe(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["LibraryRecipeApi.createRecipe"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,I,V,e)(h,c||p)},async deleteRecipe(r,n,o){var l,c;const s=await t.deleteRecipe(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryRecipeApi.deleteRecipe"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async deleteRecipeList(r,n,o){var l,c;const s=await t.deleteRecipeList(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryRecipeApi.deleteRecipeList"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getRecipe(r,n,o){var l,c;const s=await t.getRecipe(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryRecipeApi.getRecipe"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async updateRecipe(r,n,o,s){var c,u;const a=await t.updateRecipe(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryRecipeApi.updateRecipe"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)}}};class xM extends Ve{createRecipe(t,r,n,o,s){return uo(this.configuration).createRecipe(t,r,n,o,s).then(a=>a(this.axios,this.basePath))}deleteRecipe(t,r,n){return uo(this.configuration).deleteRecipe(t,r,n).then(o=>o(this.axios,this.basePath))}deleteRecipeList(t,r,n){return uo(this.configuration).deleteRecipeList(t,r,n).then(o=>o(this.axios,this.basePath))}getRecipe(t,r,n){return uo(this.configuration).getRecipe(t,r,n).then(o=>o(this.axios,this.basePath))}updateRecipe(t,r,n,o){return uo(this.configuration).updateRecipe(t,r,n,o).then(s=>s(this.axios,this.basePath))}}const vM=function(e){return{getRecipeMetadata:async(t,r,n={})=>{S("getRecipeMetadata","cell",t),S("getRecipeMetadata","recipe",r);const o="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},listRecipeMetadata:async(t,r={})=>{S("listRecipeMetadata","cell",t);const n="/cells/{cell}/store/recipes".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},updateRecipeMetadata:async(t,r,n,o={})=>{S("updateRecipeMetadata","cell",t),S("updateRecipeMetadata","recipe",r),S("updateRecipeMetadata","updateRecipeMetadataRequest",n);const s="/cells/{cell}/store/recipes/{recipe}/metadata".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}},uploadRecipeMetadataImage:async(t,r,n,o={})=>{S("uploadRecipeMetadataImage","cell",t),S("uploadRecipeMetadataImage","recipe",r),S("uploadRecipeMetadataImage","file",n);const s="/cells/{cell}/store/recipes/{recipe}/metadata/image".replace("{cell}",encodeURIComponent(String(t))).replace("{recipe}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={},d=new(e&&e.formDataCtor||FormData);$(l,e),await D(c,e),n!==void 0&&d.append("file",n),c["Content-Type"]="multipart/form-data",U(a,u);let h=i&&i.headers?i.headers:{};return l.headers={...c,...h,...o.headers},l.data=d,{url:L(a),options:l}}}},Ts=function(e){const t=vM(e);return{async getRecipeMetadata(r,n,o){var l,c;const s=await t.getRecipeMetadata(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["LibraryRecipeMetadataApi.getRecipeMetadata"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async listRecipeMetadata(r,n){var i,l;const o=await t.listRecipeMetadata(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["LibraryRecipeMetadataApi.listRecipeMetadata"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async updateRecipeMetadata(r,n,o,s){var c,u;const a=await t.updateRecipeMetadata(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryRecipeMetadataApi.updateRecipeMetadata"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async uploadRecipeMetadataImage(r,n,o,s){var c,u;const a=await t.uploadRecipeMetadataImage(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["LibraryRecipeMetadataApi.uploadRecipeMetadataImage"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)}}};class SM extends Ve{getRecipeMetadata(t,r,n){return Ts(this.configuration).getRecipeMetadata(t,r,n).then(o=>o(this.axios,this.basePath))}listRecipeMetadata(t,r){return Ts(this.configuration).listRecipeMetadata(t,r).then(n=>n(this.axios,this.basePath))}updateRecipeMetadata(t,r,n,o){return Ts(this.configuration).updateRecipeMetadata(t,r,n,o).then(s=>s(this.axios,this.basePath))}uploadRecipeMetadataImage(t,r,n,o){return Ts(this.configuration).uploadRecipeMetadataImage(t,r,n,o).then(s=>s(this.axios,this.basePath))}}const wM=function(e){return{deleteAllMotions:async(t,r={})=>{S("deleteAllMotions","cell",t);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"DELETE",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},deleteMotion:async(t,r,n={})=>{S("deleteMotion","cell",t),S("deleteMotion","motion",r);const o="/cells/{cell}/motions/{motion}/delete".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},executeTrajectory:async(t,r,n={})=>{S("executeTrajectory","cell",t),S("executeTrajectory","executeTrajectoryRequest",r);const o="/cells/{cell}/motions/executetrajectory".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),l["Content-Type"]="application/json",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:L(s),options:i}},getMotionTrajectory:async(t,r,n,o,s={})=>{S("getMotionTrajectory","cell",t),S("getMotionTrajectory","motion",r),S("getMotionTrajectory","sampleTime",n);const a="/cells/{cell}/motions/{motion}/trajectory".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(a,j);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};$(c,e),await D(u,e),n!==void 0&&(d.sample_time=n),o!==void 0&&(d.responses_coordinate_system=o),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:L(i),options:c}},getMotionTrajectorySample:async(t,r,n,o,s={})=>{S("getMotionTrajectorySample","cell",t),S("getMotionTrajectorySample","motion",r);const a="/cells/{cell}/motions/{motion}/trajectorysample".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),i=new URL(a,j);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};$(c,e),await D(u,e),n!==void 0&&(d.location_on_trajectory=n),o!==void 0&&(d.response_coordinate_system=o),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:L(i),options:c}},getPlannedMotion:async(t,r,n,o={})=>{S("getPlannedMotion","cell",t),S("getPlannedMotion","motion",r);const s="/cells/{cell}/motions/{motion}/planned-motion".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.sample_time=n),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},getPlanningMotionGroupModels:async(t,r={})=>{S("getPlanningMotionGroupModels","cell",t);const n="/cells/{cell}/motion-planning/motion-group-models".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},listMotions:async(t,r={})=>{S("listMotions","cell",t);const n="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},loadPlannedMotion:async(t,r,n={})=>{S("loadPlannedMotion","cell",t),S("loadPlannedMotion","plannedMotion",r);const o="/cells/{cell}/planned-motions".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};$(i,e),await D(l,e),l["Content-Type"]="application/json",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:L(s),options:i}},planCollisionFreePTP:async(t,r,n={})=>{S("planCollisionFreePTP","cell",t);const o="/cells/{cell}/motion-planning/plan-collision-free-ptp".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};$(i,e),await D(l,e),l["Content-Type"]="application/json",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:L(s),options:i}},planMotion:async(t,r,n={})=>{S("planMotion","cell",t),S("planMotion","planRequest",r);const o="/cells/{cell}/motions".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};$(i,e),await D(l,e),l["Content-Type"]="application/json",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:L(s),options:i}},planTrajectory:async(t,r,n={})=>{S("planTrajectory","cell",t);const o="/cells/{cell}/motion-planning/plan-trajectory".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};$(i,e),await D(l,e),l["Content-Type"]="application/json",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:L(s),options:i}},stopExecution:async(t,r,n={})=>{S("stopExecution","cell",t),S("stopExecution","motion",r);const o="/cells/{cell}/motions/{motion}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},streamMove:async(t,r,n={})=>{S("streamMove","cell",t),S("streamMove","streamMoveRequest",r);const o="/cells/{cell}/motions/streammove".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),l["Content-Type"]="application/json",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:L(s),options:i}},streamMoveBackward:async(t,r,n,o,s,a,i={})=>{S("streamMoveBackward","cell",t),S("streamMoveBackward","motion",r),S("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 D(h,e),n!==void 0&&(p.playback_speed_in_percent=n),o!==void 0&&(p.response_rate=o),s!==void 0&&(p.response_coordinate_system=s),a!==void 0&&(p.start_location_on_trajectory=a),U(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:L(c),options:d}},streamMoveForward:async(t,r,n,o,s,a,i={})=>{S("streamMoveForward","cell",t),S("streamMoveForward","motion",r),S("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 D(h,e),n!==void 0&&(p.playback_speed_in_percent=n),o!==void 0&&(p.response_rate=o),s!==void 0&&(p.response_coordinate_system=s),a!==void 0&&(p.start_location_on_trajectory=a),U(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:L(c),options:d}},streamMoveToTrajectoryViaJointPTP:async(t,r,n,o,s,a,i,l,c,u,d={})=>{S("streamMoveToTrajectoryViaJointPTP","cell",t),S("streamMoveToTrajectoryViaJointPTP","motion",r),S("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},y={},b={};$(m,e),await D(y,e),n!==void 0&&(b.location_on_trajectory=n),o&&(b["limit_override.joint_velocity_limits.joints"]=o),s&&(b["limit_override.joint_acceleration_limits.joints"]=s),a!==void 0&&(b["limit_override.tcp_velocity_limit"]=a),i!==void 0&&(b["limit_override.tcp_acceleration_limit"]=i),l!==void 0&&(b["limit_override.tcp_orientation_velocity_limit"]=l),c!==void 0&&(b["limit_override.tcp_orientation_acceleration_limit"]=c),u!==void 0&&(b.responses_coordinate_system=u),U(p,b);let C=f&&f.headers?f.headers:{};return m.headers={...y,...C,...d.headers},{url:L(p),options:m}}}},Xe=function(e){const t=wM(e);return{async deleteAllMotions(r,n){var i,l;const o=await t.deleteAllMotions(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["MotionApi.deleteAllMotions"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async deleteMotion(r,n,o){var l,c;const s=await t.deleteMotion(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.deleteMotion"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async executeTrajectory(r,n,o){var l,c;const s=await t.executeTrajectory(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.executeTrajectory"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getMotionTrajectory(r,n,o,s,a){var u,d;const i=await t.getMotionTrajectory(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["MotionApi.getMotionTrajectory"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,I,V,e)(h,c||p)},async getMotionTrajectorySample(r,n,o,s,a){var u,d;const i=await t.getMotionTrajectorySample(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["MotionApi.getMotionTrajectorySample"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,I,V,e)(h,c||p)},async getPlannedMotion(r,n,o,s){var c,u;const a=await t.getPlannedMotion(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionApi.getPlannedMotion"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async getPlanningMotionGroupModels(r,n){var i,l;const o=await t.getPlanningMotionGroupModels(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["MotionApi.getPlanningMotionGroupModels"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async listMotions(r,n){var i,l;const o=await t.listMotions(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["MotionApi.listMotions"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async loadPlannedMotion(r,n,o){var l,c;const s=await t.loadPlannedMotion(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.loadPlannedMotion"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async planCollisionFreePTP(r,n,o){var l,c;const s=await t.planCollisionFreePTP(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.planCollisionFreePTP"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async planMotion(r,n,o){var l,c;const s=await t.planMotion(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.planMotion"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async planTrajectory(r,n,o){var l,c;const s=await t.planTrajectory(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.planTrajectory"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async stopExecution(r,n,o){var l,c;const s=await t.stopExecution(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.stopExecution"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async streamMove(r,n,o){var l,c;const s=await t.streamMove(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionApi.streamMove"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async streamMoveBackward(r,n,o,s,a,i,l){var h,p;const c=await t.streamMoveBackward(r,n,o,s,a,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=k["MotionApi.streamMoveBackward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>B(c,I,V,e)(f,d||m)},async streamMoveForward(r,n,o,s,a,i,l){var h,p;const c=await t.streamMoveForward(r,n,o,s,a,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=k["MotionApi.streamMoveForward"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>B(c,I,V,e)(f,d||m)},async streamMoveToTrajectoryViaJointPTP(r,n,o,s,a,i,l,c,u,d,h){var y,b;const p=await t.streamMoveToTrajectoryViaJointPTP(r,n,o,s,a,i,l,c,u,d,h),f=(e==null?void 0:e.serverIndex)??0,m=(b=(y=k["MotionApi.streamMoveToTrajectoryViaJointPTP"])==null?void 0:y[f])==null?void 0:b.url;return(C,w)=>B(p,I,V,e)(C,m||w)}}};class CM extends Ve{deleteAllMotions(t,r){return Xe(this.configuration).deleteAllMotions(t,r).then(n=>n(this.axios,this.basePath))}deleteMotion(t,r,n){return Xe(this.configuration).deleteMotion(t,r,n).then(o=>o(this.axios,this.basePath))}executeTrajectory(t,r,n){return Xe(this.configuration).executeTrajectory(t,r,n).then(o=>o(this.axios,this.basePath))}getMotionTrajectory(t,r,n,o,s){return Xe(this.configuration).getMotionTrajectory(t,r,n,o,s).then(a=>a(this.axios,this.basePath))}getMotionTrajectorySample(t,r,n,o,s){return Xe(this.configuration).getMotionTrajectorySample(t,r,n,o,s).then(a=>a(this.axios,this.basePath))}getPlannedMotion(t,r,n,o){return Xe(this.configuration).getPlannedMotion(t,r,n,o).then(s=>s(this.axios,this.basePath))}getPlanningMotionGroupModels(t,r){return Xe(this.configuration).getPlanningMotionGroupModels(t,r).then(n=>n(this.axios,this.basePath))}listMotions(t,r){return Xe(this.configuration).listMotions(t,r).then(n=>n(this.axios,this.basePath))}loadPlannedMotion(t,r,n){return Xe(this.configuration).loadPlannedMotion(t,r,n).then(o=>o(this.axios,this.basePath))}planCollisionFreePTP(t,r,n){return Xe(this.configuration).planCollisionFreePTP(t,r,n).then(o=>o(this.axios,this.basePath))}planMotion(t,r,n){return Xe(this.configuration).planMotion(t,r,n).then(o=>o(this.axios,this.basePath))}planTrajectory(t,r,n){return Xe(this.configuration).planTrajectory(t,r,n).then(o=>o(this.axios,this.basePath))}stopExecution(t,r,n){return Xe(this.configuration).stopExecution(t,r,n).then(o=>o(this.axios,this.basePath))}streamMove(t,r,n){return Xe(this.configuration).streamMove(t,r,n).then(o=>o(this.axios,this.basePath))}streamMoveBackward(t,r,n,o,s,a,i){return Xe(this.configuration).streamMoveBackward(t,r,n,o,s,a,i).then(l=>l(this.axios,this.basePath))}streamMoveForward(t,r,n,o,s,a,i){return Xe(this.configuration).streamMoveForward(t,r,n,o,s,a,i).then(l=>l(this.axios,this.basePath))}streamMoveToTrajectoryViaJointPTP(t,r,n,o,s,a,i,l,c,u,d){return Xe(this.configuration).streamMoveToTrajectoryViaJointPTP(t,r,n,o,s,a,i,l,c,u,d).then(h=>h(this.axios,this.basePath))}}const OM=function(e){return{activateAllMotionGroups:async(t,r,n={})=>{S("activateAllMotionGroups","cell",t),S("activateAllMotionGroups","controller",r);const o="/cells/{cell}/motion-groups/all".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};$(i,e),await D(l,e),r!==void 0&&(c.controller=r),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},activateMotionGroup:async(t,r,n={})=>{S("activateMotionGroup","cell",t),S("activateMotionGroup","motionGroup",r);const o="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};$(i,e),await D(l,e),r!==void 0&&(c.motion_group=r),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},deactivateMotionGroup:async(t,r,n={})=>{S("deactivateMotionGroup","cell",t),S("deactivateMotionGroup","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},listMotionGroups:async(t,r={})=>{S("listMotionGroups","cell",t);const n="/cells/{cell}/motion-groups".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}}}},Ps=function(e){const t=OM(e);return{async activateAllMotionGroups(r,n,o){var l,c;const s=await t.activateAllMotionGroups(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupApi.activateAllMotionGroups"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async activateMotionGroup(r,n,o){var l,c;const s=await t.activateMotionGroup(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupApi.activateMotionGroup"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async deactivateMotionGroup(r,n,o){var l,c;const s=await t.deactivateMotionGroup(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupApi.deactivateMotionGroup"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async listMotionGroups(r,n){var i,l;const o=await t.listMotionGroups(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["MotionGroupApi.listMotionGroups"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)}}};class TM extends Ve{activateAllMotionGroups(t,r,n){return Ps(this.configuration).activateAllMotionGroups(t,r,n).then(o=>o(this.axios,this.basePath))}activateMotionGroup(t,r,n){return Ps(this.configuration).activateMotionGroup(t,r,n).then(o=>o(this.axios,this.basePath))}deactivateMotionGroup(t,r,n){return Ps(this.configuration).deactivateMotionGroup(t,r,n).then(o=>o(this.axios,this.basePath))}listMotionGroups(t,r){return Ps(this.configuration).listMotionGroups(t,r).then(n=>n(this.axios,this.basePath))}}const PM=function(e){return{getActivePayload:async(t,r,n={})=>{S("getActivePayload","cell",t),S("getActivePayload","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/payloads/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getActiveTcp:async(t,r,n,o={})=>{S("getActiveTcp","cell",t),S("getActiveTcp","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/tcps/current".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.rotation_type=n),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},getCurrentMotionGroupState:async(t,r,n,o,s={})=>{S("getCurrentMotionGroupState","cell",t),S("getCurrentMotionGroupState","motionGroup",r);const a="/cells/{cell}/motion-groups/{motion-group}/state".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),i=new URL(a,j);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...s},u={},d={};$(c,e),await D(u,e),n!==void 0&&(d.tcp=n),o!==void 0&&(d.response_coordinate_system=o),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:L(i),options:c}},getInfoCapabilities:async(t,r,n={})=>{S("getInfoCapabilities","cell",t),S("getInfoCapabilities","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/info-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getMotionGroupSpecification:async(t,r,n={})=>{S("getMotionGroupSpecification","cell",t),S("getMotionGroupSpecification","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/specification".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getMounting:async(t,r,n={})=>{S("getMounting","cell",t),S("getMounting","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/mounting".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getOptimizerConfiguration:async(t,r,n,o={})=>{S("getOptimizerConfiguration","cell",t),S("getOptimizerConfiguration","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/optimizer-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.tcp=n),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},getSafetySetup:async(t,r,n={})=>{S("getSafetySetup","cell",t),S("getSafetySetup","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/safety-setup".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},listPayloads:async(t,r,n={})=>{S("listPayloads","cell",t),S("listPayloads","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/payloads".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},listTcps:async(t,r,n,o={})=>{S("listTcps","cell",t),S("listTcps","motionGroup",r);const s="/cells/{cell}/motion-groups/{motion-group}/tcps".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.rotation_type=n),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},streamMotionGroupState:async(t,r,n,o,s,a={})=>{S("streamMotionGroupState","cell",t),S("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,...a},d={},h={};$(u,e),await D(d,e),n!==void 0&&(h.response_rate=n),o!==void 0&&(h.response_coordinate_system=o),s!==void 0&&(h.tcp=s),U(l,h);let p=c&&c.headers?c.headers:{};return u.headers={...d,...p,...a.headers},{url:L(l),options:u}}}},Rt=function(e){const t=PM(e);return{async getActivePayload(r,n,o){var l,c;const s=await t.getActivePayload(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getActivePayload"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getActiveTcp(r,n,o,s){var c,u;const a=await t.getActiveTcp(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupInfosApi.getActiveTcp"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async getCurrentMotionGroupState(r,n,o,s,a){var u,d;const i=await t.getCurrentMotionGroupState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["MotionGroupInfosApi.getCurrentMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,I,V,e)(h,c||p)},async getInfoCapabilities(r,n,o){var l,c;const s=await t.getInfoCapabilities(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getInfoCapabilities"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getMotionGroupSpecification(r,n,o){var l,c;const s=await t.getMotionGroupSpecification(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getMotionGroupSpecification"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getMounting(r,n,o){var l,c;const s=await t.getMounting(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getMounting"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getOptimizerConfiguration(r,n,o,s){var c,u;const a=await t.getOptimizerConfiguration(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupInfosApi.getOptimizerConfiguration"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async getSafetySetup(r,n,o){var l,c;const s=await t.getSafetySetup(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.getSafetySetup"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async listPayloads(r,n,o){var l,c;const s=await t.listPayloads(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupInfosApi.listPayloads"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async listTcps(r,n,o,s){var c,u;const a=await t.listTcps(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupInfosApi.listTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async streamMotionGroupState(r,n,o,s,a,i){var d,h;const l=await t.streamMotionGroupState(r,n,o,s,a,i),c=(e==null?void 0:e.serverIndex)??0,u=(h=(d=k["MotionGroupInfosApi.streamMotionGroupState"])==null?void 0:d[c])==null?void 0:h.url;return(p,f)=>B(l,I,V,e)(p,u||f)}}};class AM extends Ve{getActivePayload(t,r,n){return Rt(this.configuration).getActivePayload(t,r,n).then(o=>o(this.axios,this.basePath))}getActiveTcp(t,r,n,o){return Rt(this.configuration).getActiveTcp(t,r,n,o).then(s=>s(this.axios,this.basePath))}getCurrentMotionGroupState(t,r,n,o,s){return Rt(this.configuration).getCurrentMotionGroupState(t,r,n,o,s).then(a=>a(this.axios,this.basePath))}getInfoCapabilities(t,r,n){return Rt(this.configuration).getInfoCapabilities(t,r,n).then(o=>o(this.axios,this.basePath))}getMotionGroupSpecification(t,r,n){return Rt(this.configuration).getMotionGroupSpecification(t,r,n).then(o=>o(this.axios,this.basePath))}getMounting(t,r,n){return Rt(this.configuration).getMounting(t,r,n).then(o=>o(this.axios,this.basePath))}getOptimizerConfiguration(t,r,n,o){return Rt(this.configuration).getOptimizerConfiguration(t,r,n,o).then(s=>s(this.axios,this.basePath))}getSafetySetup(t,r,n){return Rt(this.configuration).getSafetySetup(t,r,n).then(o=>o(this.axios,this.basePath))}listPayloads(t,r,n){return Rt(this.configuration).listPayloads(t,r,n).then(o=>o(this.axios,this.basePath))}listTcps(t,r,n,o){return Rt(this.configuration).listTcps(t,r,n,o).then(s=>s(this.axios,this.basePath))}streamMotionGroupState(t,r,n,o,s,a){return Rt(this.configuration).streamMotionGroupState(t,r,n,o,s,a).then(i=>i(this.axios,this.basePath))}}const RM=function(e){return{directionJogging:async(t,r,n={})=>{S("directionJogging","cell",t),S("directionJogging","directionJoggingRequest",r);const o="/cells/{cell}/motion-groups/move-tcp".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),l["Content-Type"]="application/json",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:L(s),options:i}},getJoggingCapabilities:async(t,r,n={})=>{S("getJoggingCapabilities","cell",t),S("getJoggingCapabilities","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/jogging-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},jointJogging:async(t,r,n={})=>{S("jointJogging","cell",t),S("jointJogging","jointJoggingRequest",r);const o="/cells/{cell}/motion-groups/move-joint".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),l["Content-Type"]="application/json",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:L(s),options:i}},stopJogging:async(t,r,n={})=>{S("stopJogging","cell",t),S("stopJogging","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}}}},As=function(e){const t=RM(e);return{async directionJogging(r,n,o){var l,c;const s=await t.directionJogging(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupJoggingApi.directionJogging"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getJoggingCapabilities(r,n,o){var l,c;const s=await t.getJoggingCapabilities(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupJoggingApi.getJoggingCapabilities"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async jointJogging(r,n,o){var l,c;const s=await t.jointJogging(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupJoggingApi.jointJogging"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async stopJogging(r,n,o){var l,c;const s=await t.stopJogging(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupJoggingApi.stopJogging"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)}}};class EM extends Ve{directionJogging(t,r,n){return As(this.configuration).directionJogging(t,r,n).then(o=>o(this.axios,this.basePath))}getJoggingCapabilities(t,r,n){return As(this.configuration).getJoggingCapabilities(t,r,n).then(o=>o(this.axios,this.basePath))}jointJogging(t,r,n){return As(this.configuration).jointJogging(t,r,n).then(o=>o(this.axios,this.basePath))}stopJogging(t,r,n){return As(this.configuration).stopJogging(t,r,n).then(o=>o(this.axios,this.basePath))}}const IM=function(e){return{calculateAllInverseKinematic:async(t,r,n,o={})=>{S("calculateAllInverseKinematic","cell",t),S("calculateAllInverseKinematic","motionGroup",r),S("calculateAllInverseKinematic","allJointPositionsRequest",n);const s="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-all-joint-positions".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}},calculateForwardKinematic:async(t,r,n,o={})=>{S("calculateForwardKinematic","cell",t),S("calculateForwardKinematic","motionGroup",r),S("calculateForwardKinematic","tcpPoseRequest",n);const s="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-tcp-pose".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}},calculateInverseKinematic:async(t,r,n,o={})=>{S("calculateInverseKinematic","cell",t),S("calculateInverseKinematic","motionGroup",r),S("calculateInverseKinematic","jointPositionRequest",n);const s="/cells/{cell}/motion-groups/{motion-group}/kinematic/calculate-joint-position".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}},getKinematicCapabilities:async(t,r,n={})=>{S("getKinematicCapabilities","cell",t),S("getKinematicCapabilities","motionGroup",r);const o="/cells/{cell}/motion-groups/{motion-group}/kinematic-capabilities".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}}}},Rs=function(e){const t=IM(e);return{async calculateAllInverseKinematic(r,n,o,s){var c,u;const a=await t.calculateAllInverseKinematic(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupKinematicApi.calculateAllInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async calculateForwardKinematic(r,n,o,s){var c,u;const a=await t.calculateForwardKinematic(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupKinematicApi.calculateForwardKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async calculateInverseKinematic(r,n,o,s){var c,u;const a=await t.calculateInverseKinematic(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["MotionGroupKinematicApi.calculateInverseKinematic"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async getKinematicCapabilities(r,n,o){var l,c;const s=await t.getKinematicCapabilities(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["MotionGroupKinematicApi.getKinematicCapabilities"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)}}};class _M extends Ve{calculateAllInverseKinematic(t,r,n,o){return Rs(this.configuration).calculateAllInverseKinematic(t,r,n,o).then(s=>s(this.axios,this.basePath))}calculateForwardKinematic(t,r,n,o){return Rs(this.configuration).calculateForwardKinematic(t,r,n,o).then(s=>s(this.axios,this.basePath))}calculateInverseKinematic(t,r,n,o){return Rs(this.configuration).calculateInverseKinematic(t,r,n,o).then(s=>s(this.axios,this.basePath))}getKinematicCapabilities(t,r,n){return Rs(this.configuration).getKinematicCapabilities(t,r,n).then(o=>o(this.axios,this.basePath))}}const MM=function(e){return{createProgramRunner:async(t,r,n={})=>{S("createProgramRunner","cell",t),S("createProgramRunner","request",r);const o="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};$(i,e),await D(l,e),l["Content-Type"]="text/plain",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:L(s),options:i}},executeProgram:async(t,r,n={})=>{S("executeProgram","cell",t),S("executeProgram","codeWithArguments",r);const o="/cells/{cell}/programs/execute".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};$(i,e),await D(l,e),l["Content-Type"]="application/json",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:L(s),options:i}},getProgramRunner:async(t,r,n={})=>{S("getProgramRunner","cell",t),S("getProgramRunner","runner",r);const o="/cells/{cell}/programs/runners/{runner}".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},listProgramRunners:async(t,r={})=>{S("listProgramRunners","cell",t);const n="/cells/{cell}/programs/runners".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},migrateProgram:async(t,r,n={})=>{S("migrateProgram","cell",t),S("migrateProgram","request1",r);const o="/cells/{cell}/programs/migrate".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};$(i,e),await D(l,e),l["Content-Type"]="text/plain",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:L(s),options:i}},planProgram:async(t,r,n,o={})=>{S("planProgram","cell",t),S("planProgram","request",r);const s="/cells/{cell}/programs/plan".replace("{cell}",encodeURIComponent(String(t))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"POST",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.identifier=n),c["Content-Type"]="text/plain",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(r,l,e),{url:L(a),options:l}},stopAllProgramRunner:async(t,r={})=>{S("stopAllProgramRunner","cell",t);const n="/cells/{cell}/programs/runners/stop".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"POST",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},stopProgramRunner:async(t,r,n={})=>{S("stopProgramRunner","cell",t),S("stopProgramRunner","runner",r);const o="/cells/{cell}/programs/runners/{runner}/stop".replace("{cell}",encodeURIComponent(String(t))).replace("{runner}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}}}},hr=function(e){const t=MM(e);return{async createProgramRunner(r,n,o){var l,c;const s=await t.createProgramRunner(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.createProgramRunner"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async executeProgram(r,n,o){var l,c;const s=await t.executeProgram(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.executeProgram"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getProgramRunner(r,n,o){var l,c;const s=await t.getProgramRunner(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.getProgramRunner"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async listProgramRunners(r,n){var i,l;const o=await t.listProgramRunners(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["ProgramApi.listProgramRunners"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async migrateProgram(r,n,o){var l,c;const s=await t.migrateProgram(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.migrateProgram"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async planProgram(r,n,o,s){var c,u;const a=await t.planProgram(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ProgramApi.planProgram"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async stopAllProgramRunner(r,n){var i,l;const o=await t.stopAllProgramRunner(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["ProgramApi.stopAllProgramRunner"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async stopProgramRunner(r,n,o){var l,c;const s=await t.stopProgramRunner(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramApi.stopProgramRunner"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)}}};class VM extends Ve{createProgramRunner(t,r,n){return hr(this.configuration).createProgramRunner(t,r,n).then(o=>o(this.axios,this.basePath))}executeProgram(t,r,n){return hr(this.configuration).executeProgram(t,r,n).then(o=>o(this.axios,this.basePath))}getProgramRunner(t,r,n){return hr(this.configuration).getProgramRunner(t,r,n).then(o=>o(this.axios,this.basePath))}listProgramRunners(t,r){return hr(this.configuration).listProgramRunners(t,r).then(n=>n(this.axios,this.basePath))}migrateProgram(t,r,n){return hr(this.configuration).migrateProgram(t,r,n).then(o=>o(this.axios,this.basePath))}planProgram(t,r,n,o){return hr(this.configuration).planProgram(t,r,n,o).then(s=>s(this.axios,this.basePath))}stopAllProgramRunner(t,r){return hr(this.configuration).stopAllProgramRunner(t,r).then(n=>n(this.axios,this.basePath))}stopProgramRunner(t,r,n){return hr(this.configuration).stopProgramRunner(t,r,n).then(o=>o(this.axios,this.basePath))}}const kM=function(e){return{clearProgramsValues:async(t,r={})=>{S("clearProgramsValues","cell",t);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"DELETE",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},createProgramsValue:async(t,r,n={})=>{S("createProgramsValue","cell",t),S("createProgramsValue","requestBody",r);const o="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"POST",...a,...n},l={},c={};$(i,e),await D(l,e),l["Content-Type"]="application/json",U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},i.data=ue(r,i,e),{url:L(s),options:i}},deleteProgramValue:async(t,r,n={})=>{S("deleteProgramValue","cell",t),S("deleteProgramValue","key",r);const o="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getProgramValue:async(t,r,n={})=>{S("getProgramValue","cell",t),S("getProgramValue","key",r);const o="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},listProgramsValues:async(t,r={})=>{S("listProgramsValues","cell",t);const n="/cells/{cell}/programs/values".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},updateProgramValue:async(t,r,n,o={})=>{S("updateProgramValue","cell",t),S("updateProgramValue","key",r),S("updateProgramValue","value",n);const s="/cells/{cell}/programs/values/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}}}},gn=function(e){const t=kM(e);return{async clearProgramsValues(r,n){var i,l;const o=await t.clearProgramsValues(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["ProgramValuesApi.clearProgramsValues"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async createProgramsValue(r,n,o){var l,c;const s=await t.createProgramsValue(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramValuesApi.createProgramsValue"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async deleteProgramValue(r,n,o){var l,c;const s=await t.deleteProgramValue(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramValuesApi.deleteProgramValue"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getProgramValue(r,n,o){var l,c;const s=await t.getProgramValue(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["ProgramValuesApi.getProgramValue"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async listProgramsValues(r,n){var i,l;const o=await t.listProgramsValues(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["ProgramValuesApi.listProgramsValues"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async updateProgramValue(r,n,o,s){var c,u;const a=await t.updateProgramValue(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["ProgramValuesApi.updateProgramValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)}}};class jM extends Ve{clearProgramsValues(t,r){return gn(this.configuration).clearProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}createProgramsValue(t,r,n){return gn(this.configuration).createProgramsValue(t,r,n).then(o=>o(this.axios,this.basePath))}deleteProgramValue(t,r,n){return gn(this.configuration).deleteProgramValue(t,r,n).then(o=>o(this.axios,this.basePath))}getProgramValue(t,r,n){return gn(this.configuration).getProgramValue(t,r,n).then(o=>o(this.axios,this.basePath))}listProgramsValues(t,r){return gn(this.configuration).listProgramsValues(t,r).then(n=>n(this.axios,this.basePath))}updateProgramValue(t,r,n,o){return gn(this.configuration).updateProgramValue(t,r,n,o).then(s=>s(this.axios,this.basePath))}}const $M=function(e){return{deleteStoredCollider:async(t,r,n={})=>{S("deleteStoredCollider","cell",t),S("deleteStoredCollider","collider",r);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},deleteStoredCollisionLinkChain:async(t,r,n={})=>{S("deleteStoredCollisionLinkChain","cell",t),S("deleteStoredCollisionLinkChain","linkChain",r);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 a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},deleteStoredCollisionTool:async(t,r,n={})=>{S("deleteStoredCollisionTool","cell",t),S("deleteStoredCollisionTool","tool",r);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getDefaultLinkChain:async(t,r,n={})=>{S("getDefaultLinkChain","cell",t),S("getDefaultLinkChain","motionGroupModel",r);const o="/cells/{cell}/store/collision/default-link-chains/{motion-group-model}".replace("{cell}",encodeURIComponent(String(t))).replace("{motion-group-model}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getStoredCollider:async(t,r,n={})=>{S("getStoredCollider","cell",t),S("getStoredCollider","collider",r);const o="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getStoredCollisionLinkChain:async(t,r,n={})=>{S("getStoredCollisionLinkChain","cell",t),S("getStoredCollisionLinkChain","linkChain",r);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 a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getStoredCollisionTool:async(t,r,n={})=>{S("getStoredCollisionTool","cell",t),S("getStoredCollisionTool","tool",r);const o="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},listCollisionLinkChains:async(t,r={})=>{S("listCollisionLinkChains","cell",t);const n="/cells/{cell}/store/collision/link-chains".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},listStoredColliders:async(t,r={})=>{S("listStoredColliders","cell",t);const n="/cells/{cell}/store/collision/colliders".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},listStoredCollisionTools:async(t,r={})=>{S("listStoredCollisionTools","cell",t);const n="/cells/{cell}/store/collision/tools".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},storeCollider:async(t,r,n,o={})=>{S("storeCollider","cell",t),S("storeCollider","collider",r),S("storeCollider","collider2",n);const s="/cells/{cell}/store/collision/colliders/{collider}".replace("{cell}",encodeURIComponent(String(t))).replace("{collider}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}},storeCollisionLinkChain:async(t,r,n,o={})=>{S("storeCollisionLinkChain","cell",t),S("storeCollisionLinkChain","linkChain",r),S("storeCollisionLinkChain","collider",n);const s="/cells/{cell}/store/collision/link-chains/{link-chain}".replace("{cell}",encodeURIComponent(String(t))).replace("{link-chain}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}},storeCollisionTool:async(t,r,n,o={})=>{S("storeCollisionTool","cell",t),S("storeCollisionTool","tool",r),S("storeCollisionTool","requestBody",n);const s="/cells/{cell}/store/collision/tools/{tool}".replace("{cell}",encodeURIComponent(String(t))).replace("{tool}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}}}},pt=function(e){const t=$M(e);return{async deleteStoredCollider(r,n,o){var l,c;const s=await t.deleteStoredCollider(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.deleteStoredCollider"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async deleteStoredCollisionLinkChain(r,n,o){var l,c;const s=await t.deleteStoredCollisionLinkChain(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.deleteStoredCollisionLinkChain"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async deleteStoredCollisionTool(r,n,o){var l,c;const s=await t.deleteStoredCollisionTool(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.deleteStoredCollisionTool"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getDefaultLinkChain(r,n,o){var l,c;const s=await t.getDefaultLinkChain(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.getDefaultLinkChain"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getStoredCollider(r,n,o){var l,c;const s=await t.getStoredCollider(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.getStoredCollider"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getStoredCollisionLinkChain(r,n,o){var l,c;const s=await t.getStoredCollisionLinkChain(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.getStoredCollisionLinkChain"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getStoredCollisionTool(r,n,o){var l,c;const s=await t.getStoredCollisionTool(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionComponentsApi.getStoredCollisionTool"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async listCollisionLinkChains(r,n){var i,l;const o=await t.listCollisionLinkChains(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["StoreCollisionComponentsApi.listCollisionLinkChains"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async listStoredColliders(r,n){var i,l;const o=await t.listStoredColliders(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["StoreCollisionComponentsApi.listStoredColliders"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async listStoredCollisionTools(r,n){var i,l;const o=await t.listStoredCollisionTools(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["StoreCollisionComponentsApi.listStoredCollisionTools"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async storeCollider(r,n,o,s){var c,u;const a=await t.storeCollider(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["StoreCollisionComponentsApi.storeCollider"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async storeCollisionLinkChain(r,n,o,s){var c,u;const a=await t.storeCollisionLinkChain(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["StoreCollisionComponentsApi.storeCollisionLinkChain"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async storeCollisionTool(r,n,o,s){var c,u;const a=await t.storeCollisionTool(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["StoreCollisionComponentsApi.storeCollisionTool"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)}}};class DM extends Ve{deleteStoredCollider(t,r,n){return pt(this.configuration).deleteStoredCollider(t,r,n).then(o=>o(this.axios,this.basePath))}deleteStoredCollisionLinkChain(t,r,n){return pt(this.configuration).deleteStoredCollisionLinkChain(t,r,n).then(o=>o(this.axios,this.basePath))}deleteStoredCollisionTool(t,r,n){return pt(this.configuration).deleteStoredCollisionTool(t,r,n).then(o=>o(this.axios,this.basePath))}getDefaultLinkChain(t,r,n){return pt(this.configuration).getDefaultLinkChain(t,r,n).then(o=>o(this.axios,this.basePath))}getStoredCollider(t,r,n){return pt(this.configuration).getStoredCollider(t,r,n).then(o=>o(this.axios,this.basePath))}getStoredCollisionLinkChain(t,r,n){return pt(this.configuration).getStoredCollisionLinkChain(t,r,n).then(o=>o(this.axios,this.basePath))}getStoredCollisionTool(t,r,n){return pt(this.configuration).getStoredCollisionTool(t,r,n).then(o=>o(this.axios,this.basePath))}listCollisionLinkChains(t,r){return pt(this.configuration).listCollisionLinkChains(t,r).then(n=>n(this.axios,this.basePath))}listStoredColliders(t,r){return pt(this.configuration).listStoredColliders(t,r).then(n=>n(this.axios,this.basePath))}listStoredCollisionTools(t,r){return pt(this.configuration).listStoredCollisionTools(t,r).then(n=>n(this.axios,this.basePath))}storeCollider(t,r,n,o){return pt(this.configuration).storeCollider(t,r,n,o).then(s=>s(this.axios,this.basePath))}storeCollisionLinkChain(t,r,n,o){return pt(this.configuration).storeCollisionLinkChain(t,r,n,o).then(s=>s(this.axios,this.basePath))}storeCollisionTool(t,r,n,o){return pt(this.configuration).storeCollisionTool(t,r,n,o).then(s=>s(this.axios,this.basePath))}}const UM=function(e){return{deleteStoredCollisionScene:async(t,r,n={})=>{S("deleteStoredCollisionScene","cell",t),S("deleteStoredCollisionScene","scene",r);const o="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getStoredCollisionScene:async(t,r,n={})=>{S("getStoredCollisionScene","cell",t),S("getStoredCollisionScene","scene",r);const o="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},listStoredCollisionScenes:async(t,r={})=>{S("listStoredCollisionScenes","cell",t);const n="/cells/{cell}/store/collision/scenes".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},storeCollisionScene:async(t,r,n,o={})=>{S("storeCollisionScene","cell",t),S("storeCollisionScene","scene",r),S("storeCollisionScene","collisionSceneAssembly",n);const s="/cells/{cell}/store/collision/scenes/{scene}".replace("{cell}",encodeURIComponent(String(t))).replace("{scene}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}}}},Es=function(e){const t=UM(e);return{async deleteStoredCollisionScene(r,n,o){var l,c;const s=await t.deleteStoredCollisionScene(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionScenesApi.deleteStoredCollisionScene"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getStoredCollisionScene(r,n,o){var l,c;const s=await t.getStoredCollisionScene(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreCollisionScenesApi.getStoredCollisionScene"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async listStoredCollisionScenes(r,n){var i,l;const o=await t.listStoredCollisionScenes(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["StoreCollisionScenesApi.listStoredCollisionScenes"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async storeCollisionScene(r,n,o,s){var c,u;const a=await t.storeCollisionScene(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["StoreCollisionScenesApi.storeCollisionScene"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)}}};class LM extends Ve{deleteStoredCollisionScene(t,r,n){return Es(this.configuration).deleteStoredCollisionScene(t,r,n).then(o=>o(this.axios,this.basePath))}getStoredCollisionScene(t,r,n){return Es(this.configuration).getStoredCollisionScene(t,r,n).then(o=>o(this.axios,this.basePath))}listStoredCollisionScenes(t,r){return Es(this.configuration).listStoredCollisionScenes(t,r).then(n=>n(this.axios,this.basePath))}storeCollisionScene(t,r,n,o){return Es(this.configuration).storeCollisionScene(t,r,n,o).then(s=>s(this.axios,this.basePath))}}const BM=function(e){return{clearAllObjects:async(t,r={})=>{S("clearAllObjects","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"DELETE",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},deleteObject:async(t,r,n={})=>{S("deleteObject","cell",t),S("deleteObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"DELETE",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getObject:async(t,r,n={})=>{S("getObject","cell",t),S("getObject","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getObjectMetadata:async(t,r,n={})=>{S("getObjectMetadata","cell",t),S("getObjectMetadata","key",r);const o="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"HEAD",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},listAllObjectKeys:async(t,r={})=>{S("listAllObjectKeys","cell",t);const n="/cells/{cell}/store/objects".replace("{cell}",encodeURIComponent(String(t))),o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},storeObject:async(t,r,n,o,s={})=>{S("storeObject","cell",t),S("storeObject","key",r);const a="/cells/{cell}/store/objects/{key}".replace("{cell}",encodeURIComponent(String(t))).replace("{key}",encodeURIComponent(String(r))),i=new URL(a,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={},h=new(e&&e.formDataCtor||FormData);$(c,e),await D(u,e),o!==void 0&&h.append("AnyValue",new Blob([JSON.stringify(o)],{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,...s.headers},c.data=h,{url:L(i),options:c}}}},yn=function(e){const t=BM(e);return{async clearAllObjects(r,n){var i,l;const o=await t.clearAllObjects(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["StoreObjectApi.clearAllObjects"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async deleteObject(r,n,o){var l,c;const s=await t.deleteObject(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreObjectApi.deleteObject"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getObject(r,n,o){var l,c;const s=await t.getObject(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreObjectApi.getObject"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getObjectMetadata(r,n,o){var l,c;const s=await t.getObjectMetadata(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["StoreObjectApi.getObjectMetadata"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async listAllObjectKeys(r,n){var i,l;const o=await t.listAllObjectKeys(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["StoreObjectApi.listAllObjectKeys"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async storeObject(r,n,o,s,a){var u,d;const i=await t.storeObject(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["StoreObjectApi.storeObject"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,I,V,e)(h,c||p)}}};class FM extends Ve{clearAllObjects(t,r){return yn(this.configuration).clearAllObjects(t,r).then(n=>n(this.axios,this.basePath))}deleteObject(t,r,n){return yn(this.configuration).deleteObject(t,r,n).then(o=>o(this.axios,this.basePath))}getObject(t,r,n){return yn(this.configuration).getObject(t,r,n).then(o=>o(this.axios,this.basePath))}getObjectMetadata(t,r,n){return yn(this.configuration).getObjectMetadata(t,r,n).then(o=>o(this.axios,this.basePath))}listAllObjectKeys(t,r){return yn(this.configuration).listAllObjectKeys(t,r).then(n=>n(this.axios,this.basePath))}storeObject(t,r,n,o,s){return yn(this.configuration).storeObject(t,r,n,o,s).then(a=>a(this.axios,this.basePath))}}const NM=function(e){return{checkNovaVersionUpdate:async(t,r={})=>{S("checkNovaVersionUpdate","channel",t);const n="/system/update",o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...r},i={},l={};$(a,e),await D(i,e),t!==void 0&&(l.channel=t),U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},{url:L(o),options:a}},getDiagnosePackage:async(t={})=>{const r="/system/diagnosis-package/zip",n=new URL(r,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...t},a={},i={};$(s,e),await D(a,e),U(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...t.headers},{url:L(n),options:s}},getSystemStatus:async(t={})=>{const r="/system/status",n=new URL(r,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...t},a={},i={};$(s,e),await D(a,e),U(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...t.headers},{url:L(n),options:s}},getSystemVersion:async(t={})=>{const r="/system/version",n=new URL(r,j);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...t},a={},i={};$(s,e),await D(a,e),U(n,i);let l=o&&o.headers?o.headers:{};return s.headers={...a,...l,...t.headers},{url:L(n),options:s}},updateNovaVersion:async(t,r={})=>{S("updateNovaVersion","updateNovaVersionRequest",t);const n="/system/update",o=new URL(n,j);let s;e&&(s=e.baseOptions);const a={method:"PUT",...s,...r},i={},l={};$(a,e),await D(i,e),i["Content-Type"]="application/json",U(o,l);let c=s&&s.headers?s.headers:{};return a.headers={...i,...c,...r.headers},a.data=ue(t,a,e),{url:L(o),options:a}}}},ho=function(e){const t=NM(e);return{async checkNovaVersionUpdate(r,n){var i,l;const o=await t.checkNovaVersionUpdate(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["SystemApi.checkNovaVersionUpdate"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)},async getDiagnosePackage(r){var a,i;const n=await t.getDiagnosePackage(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=k["SystemApi.getDiagnosePackage"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>B(n,I,V,e)(l,s||c)},async getSystemStatus(r){var a,i;const n=await t.getSystemStatus(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=k["SystemApi.getSystemStatus"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>B(n,I,V,e)(l,s||c)},async getSystemVersion(r){var a,i;const n=await t.getSystemVersion(r),o=(e==null?void 0:e.serverIndex)??0,s=(i=(a=k["SystemApi.getSystemVersion"])==null?void 0:a[o])==null?void 0:i.url;return(l,c)=>B(n,I,V,e)(l,s||c)},async updateNovaVersion(r,n){var i,l;const o=await t.updateNovaVersion(r,n),s=(e==null?void 0:e.serverIndex)??0,a=(l=(i=k["SystemApi.updateNovaVersion"])==null?void 0:i[s])==null?void 0:l.url;return(c,u)=>B(o,I,V,e)(c,a||u)}}};class zM extends Ve{checkNovaVersionUpdate(t,r){return ho(this.configuration).checkNovaVersionUpdate(t,r).then(n=>n(this.axios,this.basePath))}getDiagnosePackage(t){return ho(this.configuration).getDiagnosePackage(t).then(r=>r(this.axios,this.basePath))}getSystemStatus(t){return ho(this.configuration).getSystemStatus(t).then(r=>r(this.axios,this.basePath))}getSystemVersion(t){return ho(this.configuration).getSystemVersion(t).then(r=>r(this.axios,this.basePath))}updateNovaVersion(t,r){return ho(this.configuration).updateNovaVersion(t,r).then(n=>n(this.axios,this.basePath))}}const GM=function(e){return{getMotionGroupState:async(t,r,n,o={})=>{S("getMotionGroupState","cell",t),S("getMotionGroupState","controller",r),S("getMotionGroupState","id",n);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))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},getMotionGroups:async(t,r,n={})=>{S("getMotionGroups","cell",t),S("getMotionGroups","controller",r);const o="/cells/{cell}/controllers/{controller}/teach-pendant/motiongroups".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getVirtualRobotIOValue:async(t,r,n,o={})=>{S("getVirtualRobotIOValue","cell",t),S("getVirtualRobotIOValue","controller",r),S("getVirtualRobotIOValue","io",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/ios/{io}".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))).replace("{io}",encodeURIComponent(String(n))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},listIOs:async(t,r,n={})=>{S("listIOs","cell",t),S("listIOs","controller",r);const o="/cells/{cell}/controllers/{controller}/teach-pendant/ios".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},setMotionGroupState:async(t,r,n,o,s={})=>{S("setMotionGroupState","cell",t),S("setMotionGroupState","controller",r),S("setMotionGroupState","id",n),S("setMotionGroupState","motionGroupJoints",o);const a="/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(a,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};$(c,e),await D(u,e),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ue(o,c,e),{url:L(i),options:c}},setVirtualRobotIOValue:async(t,r,n,o,s,a,i={})=>{S("setVirtualRobotIOValue","cell",t),S("setVirtualRobotIOValue","controller",r),S("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 D(h,e),o!==void 0&&(p.bool=o),s!==void 0&&(p.integer=s),a!==void 0&&(p.double=a),U(c,p);let f=u&&u.headers?u.headers:{};return d.headers={...h,...f,...i.headers},{url:L(c),options:d}}}},bn=function(e){const t=GM(e);return{async getMotionGroupState(r,n,o,s){var c,u;const a=await t.getMotionGroupState(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotApi.getMotionGroupState"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async getMotionGroups(r,n,o){var l,c;const s=await t.getMotionGroups(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotApi.getMotionGroups"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getVirtualRobotIOValue(r,n,o,s){var c,u;const a=await t.getVirtualRobotIOValue(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotApi.getVirtualRobotIOValue"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async listIOs(r,n,o){var l,c;const s=await t.listIOs(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotApi.listIOs"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async setMotionGroupState(r,n,o,s,a){var u,d;const i=await t.setMotionGroupState(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotApi.setMotionGroupState"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,I,V,e)(h,c||p)},async setVirtualRobotIOValue(r,n,o,s,a,i,l){var h,p;const c=await t.setVirtualRobotIOValue(r,n,o,s,a,i,l),u=(e==null?void 0:e.serverIndex)??0,d=(p=(h=k["VirtualRobotApi.setVirtualRobotIOValue"])==null?void 0:h[u])==null?void 0:p.url;return(f,m)=>B(c,I,V,e)(f,d||m)}}};class HM extends Ve{getMotionGroupState(t,r,n,o){return bn(this.configuration).getMotionGroupState(t,r,n,o).then(s=>s(this.axios,this.basePath))}getMotionGroups(t,r,n){return bn(this.configuration).getMotionGroups(t,r,n).then(o=>o(this.axios,this.basePath))}getVirtualRobotIOValue(t,r,n,o){return bn(this.configuration).getVirtualRobotIOValue(t,r,n,o).then(s=>s(this.axios,this.basePath))}listIOs(t,r,n){return bn(this.configuration).listIOs(t,r,n).then(o=>o(this.axios,this.basePath))}setMotionGroupState(t,r,n,o,s){return bn(this.configuration).setMotionGroupState(t,r,n,o,s).then(a=>a(this.axios,this.basePath))}setVirtualRobotIOValue(t,r,n,o,s,a,i){return bn(this.configuration).setVirtualRobotIOValue(t,r,n,o,s,a,i).then(l=>l(this.axios,this.basePath))}}const qM=function(e){return{externalJointsStream:async(t,r,n,o={})=>{S("externalJointsStream","cell",t),S("externalJointsStream","controller",r),S("externalJointsStream","externalJointStreamDatapoint",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/motion-groups/externalJointsStream".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}},getMotionGroupBehavior:async(t,r,n,o={})=>{S("getMotionGroupBehavior","cell",t),S("getMotionGroupBehavior","controller",r),S("getMotionGroupBehavior","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))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},setMotionGroupBehavior:async(t,r,n,o,s={})=>{S("setMotionGroupBehavior","cell",t),S("setMotionGroupBehavior","controller",r),S("setMotionGroupBehavior","id",n);const a="/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(a,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};$(c,e),await D(u,e),o!==void 0&&(d.behavior=o),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:L(i),options:c}}}},ll=function(e){const t=qM(e);return{async externalJointsStream(r,n,o,s){var c,u;const a=await t.externalJointsStream(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotBehaviorApi.externalJointsStream"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async getMotionGroupBehavior(r,n,o,s){var c,u;const a=await t.getMotionGroupBehavior(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotBehaviorApi.getMotionGroupBehavior"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async setMotionGroupBehavior(r,n,o,s,a){var u,d;const i=await t.setMotionGroupBehavior(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotBehaviorApi.setMotionGroupBehavior"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,I,V,e)(h,c||p)}}};class WM extends Ve{externalJointsStream(t,r,n,o){return ll(this.configuration).externalJointsStream(t,r,n,o).then(s=>s(this.axios,this.basePath))}getMotionGroupBehavior(t,r,n,o){return ll(this.configuration).getMotionGroupBehavior(t,r,n,o).then(s=>s(this.axios,this.basePath))}setMotionGroupBehavior(t,r,n,o,s){return ll(this.configuration).setMotionGroupBehavior(t,r,n,o,s).then(a=>a(this.axios,this.basePath))}}const JM=function(e){return{getCycleTime:async(t,r,n={})=>{S("getCycleTime","cell",t),S("getCycleTime","controller",r);const o="/cells/{cell}/controllers/{controller}/teach-pendant/cycle-time".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getEStop:async(t,r,n={})=>{S("getEStop","cell",t),S("getEStop","controller",r);const o="/cells/{cell}/controllers/{controller}/teach-pendant/estop".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},getOperationMode:async(t,r,n={})=>{S("getOperationMode","cell",t),S("getOperationMode","controller",r);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 a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},pushEStop:async(t,r,n={})=>{S("pushEStop","cell",t),S("pushEStop","controller",r);const o="/cells/{cell}/controllers/{controller}/teach-pendant/estop/push".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},releaseEStop:async(t,r,n={})=>{S("releaseEStop","cell",t),S("releaseEStop","controller",r);const o="/cells/{cell}/controllers/{controller}/teach-pendant/estop/release".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),s=new URL(o,j);let a;e&&(a=e.baseOptions);const i={method:"PUT",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},setOperationMode:async(t,r,n,o={})=>{S("setOperationMode","cell",t),S("setOperationMode","controller",r),S("setOperationMode","mode",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/operationmode".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};$(l,e),await D(c,e),n!==void 0&&(u.mode=n),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}}}},xn=function(e){const t=JM(e);return{async getCycleTime(r,n,o){var l,c;const s=await t.getCycleTime(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.getCycleTime"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getEStop(r,n,o){var l,c;const s=await t.getEStop(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.getEStop"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async getOperationMode(r,n,o){var l,c;const s=await t.getOperationMode(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.getOperationMode"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async pushEStop(r,n,o){var l,c;const s=await t.pushEStop(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.pushEStop"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async releaseEStop(r,n,o){var l,c;const s=await t.releaseEStop(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotModeApi.releaseEStop"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async setOperationMode(r,n,o,s){var c,u;const a=await t.setOperationMode(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotModeApi.setOperationMode"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)}}};class YM extends Ve{getCycleTime(t,r,n){return xn(this.configuration).getCycleTime(t,r,n).then(o=>o(this.axios,this.basePath))}getEStop(t,r,n){return xn(this.configuration).getEStop(t,r,n).then(o=>o(this.axios,this.basePath))}getOperationMode(t,r,n){return xn(this.configuration).getOperationMode(t,r,n).then(o=>o(this.axios,this.basePath))}pushEStop(t,r,n){return xn(this.configuration).pushEStop(t,r,n).then(o=>o(this.axios,this.basePath))}releaseEStop(t,r,n){return xn(this.configuration).releaseEStop(t,r,n).then(o=>o(this.axios,this.basePath))}setOperationMode(t,r,n,o){return xn(this.configuration).setOperationMode(t,r,n,o).then(s=>s(this.axios,this.basePath))}}const KM=function(e){return{addVirtualRobotCoordinateSystem:async(t,r,n,o={})=>{S("addVirtualRobotCoordinateSystem","cell",t),S("addVirtualRobotCoordinateSystem","controller",r),S("addVirtualRobotCoordinateSystem","coordinateSystem",n);const s="/cells/{cell}/controllers/{controller}/teach-pendant/coordinate-systems".replace("{cell}",encodeURIComponent(String(t))).replace("{controller}",encodeURIComponent(String(r))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"PUT",...i,...o},c={},u={};$(l,e),await D(c,e),c["Content-Type"]="application/json",U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},l.data=ue(n,l,e),{url:L(a),options:l}},addVirtualRobotTcp:async(t,r,n,o,s={})=>{S("addVirtualRobotTcp","cell",t),S("addVirtualRobotTcp","controller",r),S("addVirtualRobotTcp","id",n),S("addVirtualRobotTcp","robotTcp",o);const a="/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(a,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};$(c,e),await D(u,e),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ue(o,c,e),{url:L(i),options:c}},deleteVirtualRobotCoordinateSystem:async(t,r,n,o,s={})=>{S("deleteVirtualRobotCoordinateSystem","cell",t),S("deleteVirtualRobotCoordinateSystem","controller",r),S("deleteVirtualRobotCoordinateSystem","coordinateSystem",n);const a="/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(a,j);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};$(c,e),await D(u,e),o!==void 0&&(d.delete_dependent=o),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:L(i),options:c}},deleteVirtualRobotTcp:async(t,r,n,o,s={})=>{S("deleteVirtualRobotTcp","cell",t),S("deleteVirtualRobotTcp","controller",r),S("deleteVirtualRobotTcp","id",n),S("deleteVirtualRobotTcp","tcp",o);const a="/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(o))),i=new URL(a,j);let l;e&&(l=e.baseOptions);const c={method:"DELETE",...l,...s},u={},d={};$(c,e),await D(u,e),U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},{url:L(i),options:c}},getVirtualRobotMounting:async(t,r,n,o={})=>{S("getVirtualRobotMounting","cell",t),S("getVirtualRobotMounting","controller",r),S("getVirtualRobotMounting","id",n);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))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},listVirtualRobotCoordinateSystems:async(t,r,n={})=>{S("listVirtualRobotCoordinateSystems","cell",t),S("listVirtualRobotCoordinateSystems","controller",r);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 a;e&&(a=e.baseOptions);const i={method:"GET",...a,...n},l={},c={};$(i,e),await D(l,e),U(s,c);let u=a&&a.headers?a.headers:{};return i.headers={...l,...u,...n.headers},{url:L(s),options:i}},listVirtualRobotTcps:async(t,r,n,o={})=>{S("listVirtualRobotTcps","cell",t),S("listVirtualRobotTcps","controller",r),S("listVirtualRobotTcps","id",n);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))),a=new URL(s,j);let i;e&&(i=e.baseOptions);const l={method:"GET",...i,...o},c={},u={};$(l,e),await D(c,e),U(a,u);let d=i&&i.headers?i.headers:{};return l.headers={...c,...d,...o.headers},{url:L(a),options:l}},setVirtualRobotMounting:async(t,r,n,o,s={})=>{S("setVirtualRobotMounting","cell",t),S("setVirtualRobotMounting","controller",r),S("setVirtualRobotMounting","id",n),S("setVirtualRobotMounting","coordinateSystem",o);const a="/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(a,j);let l;e&&(l=e.baseOptions);const c={method:"PUT",...l,...s},u={},d={};$(c,e),await D(u,e),u["Content-Type"]="application/json",U(i,d);let h=l&&l.headers?l.headers:{};return c.headers={...u,...h,...s.headers},c.data=ue(o,c,e),{url:L(i),options:c}}}},pr=function(e){const t=KM(e);return{async addVirtualRobotCoordinateSystem(r,n,o,s){var c,u;const a=await t.addVirtualRobotCoordinateSystem(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotSetupApi.addVirtualRobotCoordinateSystem"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async addVirtualRobotTcp(r,n,o,s,a){var u,d;const i=await t.addVirtualRobotTcp(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotSetupApi.addVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,I,V,e)(h,c||p)},async deleteVirtualRobotCoordinateSystem(r,n,o,s,a){var u,d;const i=await t.deleteVirtualRobotCoordinateSystem(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotSetupApi.deleteVirtualRobotCoordinateSystem"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,I,V,e)(h,c||p)},async deleteVirtualRobotTcp(r,n,o,s,a){var u,d;const i=await t.deleteVirtualRobotTcp(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotSetupApi.deleteVirtualRobotTcp"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,I,V,e)(h,c||p)},async getVirtualRobotMounting(r,n,o,s){var c,u;const a=await t.getVirtualRobotMounting(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotSetupApi.getVirtualRobotMounting"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async listVirtualRobotCoordinateSystems(r,n,o){var l,c;const s=await t.listVirtualRobotCoordinateSystems(r,n,o),a=(e==null?void 0:e.serverIndex)??0,i=(c=(l=k["VirtualRobotSetupApi.listVirtualRobotCoordinateSystems"])==null?void 0:l[a])==null?void 0:c.url;return(u,d)=>B(s,I,V,e)(u,i||d)},async listVirtualRobotTcps(r,n,o,s){var c,u;const a=await t.listVirtualRobotTcps(r,n,o,s),i=(e==null?void 0:e.serverIndex)??0,l=(u=(c=k["VirtualRobotSetupApi.listVirtualRobotTcps"])==null?void 0:c[i])==null?void 0:u.url;return(d,h)=>B(a,I,V,e)(d,l||h)},async setVirtualRobotMounting(r,n,o,s,a){var u,d;const i=await t.setVirtualRobotMounting(r,n,o,s,a),l=(e==null?void 0:e.serverIndex)??0,c=(d=(u=k["VirtualRobotSetupApi.setVirtualRobotMounting"])==null?void 0:u[l])==null?void 0:d.url;return(h,p)=>B(i,I,V,e)(h,c||p)}}};class QM extends Ve{addVirtualRobotCoordinateSystem(t,r,n,o){return pr(this.configuration).addVirtualRobotCoordinateSystem(t,r,n,o).then(s=>s(this.axios,this.basePath))}addVirtualRobotTcp(t,r,n,o,s){return pr(this.configuration).addVirtualRobotTcp(t,r,n,o,s).then(a=>a(this.axios,this.basePath))}deleteVirtualRobotCoordinateSystem(t,r,n,o,s){return pr(this.configuration).deleteVirtualRobotCoordinateSystem(t,r,n,o,s).then(a=>a(this.axios,this.basePath))}deleteVirtualRobotTcp(t,r,n,o,s){return pr(this.configuration).deleteVirtualRobotTcp(t,r,n,o,s).then(a=>a(this.axios,this.basePath))}getVirtualRobotMounting(t,r,n,o){return pr(this.configuration).getVirtualRobotMounting(t,r,n,o).then(s=>s(this.axios,this.basePath))}listVirtualRobotCoordinateSystems(t,r,n){return pr(this.configuration).listVirtualRobotCoordinateSystems(t,r,n).then(o=>o(this.axios,this.basePath))}listVirtualRobotTcps(t,r,n,o){return pr(this.configuration).listVirtualRobotTcps(t,r,n,o).then(s=>s(this.axios,this.basePath))}setVirtualRobotMounting(t,r,n,o,s){return pr(this.configuration).setVirtualRobotMounting(t,r,n,o,s).then(a=>a(this.axios,this.basePath))}}function Xt(e,t,r){return Math.max(t,Math.min(r,e))}class XM{constructor(t=0,r=0,n=0,o=1){this.isQuaternion=!0,this._x=t,this._y=r,this._z=n,this._w=o}static slerpFlat(t,r,n,o,s,a,i){let l=n[o+0],c=n[o+1],u=n[o+2],d=n[o+3];const h=s[a+0],p=s[a+1],f=s[a+2],m=s[a+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 y=1-i;const b=l*h+c*p+u*f+d*m,C=b>=0?1:-1,w=1-b*b;if(w>Number.EPSILON){const A=Math.sqrt(w),O=Math.atan2(A,b*C);y=Math.sin(y*O)/A,i=Math.sin(i*O)/A}const T=i*C;if(l=l*y+h*T,c=c*y+p*T,u=u*y+f*T,d=d*y+m*T,y===1-i){const A=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=A,c*=A,u*=A,d*=A}}t[r]=l,t[r+1]=c,t[r+2]=u,t[r+3]=d}static multiplyQuaternionsFlat(t,r,n,o,s,a){const i=n[o],l=n[o+1],c=n[o+2],u=n[o+3],d=s[a],h=s[a+1],p=s[a+2],f=s[a+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,o){return this._x=t,this._y=r,this._z=n,this._w=o,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,o=t._y,s=t._z,a=t._order,i=Math.cos,l=Math.sin,c=i(n/2),u=i(o/2),d=i(s/2),h=l(n/2),p=l(o/2),f=l(s/2);switch(a){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: "+a)}return r===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,r){const n=r/2,o=Math.sin(n);return this._x=t.x*o,this._y=t.y*o,this._z=t.z*o,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const r=t.elements,n=r[0],o=r[4],s=r[8],a=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=(s-c)*p,this._z=(a-o)*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=(o+a)/p,this._z=(s+c)/p}else if(i>d){const p=2*Math.sqrt(1+i-n-d);this._w=(s-c)/p,this._x=(o+a)/p,this._y=.25*p,this._z=(l+u)/p}else{const p=2*Math.sqrt(1+d-n-i);this._w=(a-o)/p,this._x=(s+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(Xt(this.dot(t),-1,1)))}rotateTowards(t,r){const n=this.angleTo(t);if(n===0)return this;const o=Math.min(1,r/n);return this.slerp(t,o),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,o=t._y,s=t._z,a=t._w,i=r._x,l=r._y,c=r._z,u=r._w;return this._x=n*u+a*i+o*c-s*l,this._y=o*u+a*l+s*i-n*c,this._z=s*u+a*c+n*l-o*i,this._w=a*u-n*i-o*l-s*c,this._onChangeCallback(),this}slerp(t,r){if(r===0)return this;if(r===1)return this.copy(t);const n=this._x,o=this._y,s=this._z,a=this._w;let i=a*t._w+n*t._x+o*t._y+s*t._z;if(i<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,i=-i):this.copy(t),i>=1)return this._w=a,this._x=n,this._y=o,this._z=s,this;const l=1-i*i;if(l<=Number.EPSILON){const p=1-r;return this._w=p*a+r*this._w,this._x=p*n+r*this._x,this._y=p*o+r*this._y,this._z=p*s+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=a*d+this._w*h,this._x=n*d+this._x*h,this._y=o*d+this._y*h,this._z=s*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(),o=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(o*Math.sin(t),o*Math.cos(t),s*Math.sin(r),s*Math.cos(r))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,r=0){return this._x=t[r],this._y=t[r+1],this._z=t[r+2],this._w=t[r+3],this._onChangeCallback(),this}toArray(t=[],r=0){return t[r]=this._x,t[r+1]=this._y,t[r+2]=this._z,t[r+3]=this._w,t}fromBufferAttribute(t,r){return this._x=t.getX(r),this._y=t.getY(r),this._z=t.getZ(r),this._w=t.getW(r),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Rn{constructor(t=0,r=0,n=0){Rn.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(Hh.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(Hh.setFromAxisAngle(t,r))}applyMatrix3(t){const r=this.x,n=this.y,o=this.z,s=t.elements;return this.x=s[0]*r+s[3]*n+s[6]*o,this.y=s[1]*r+s[4]*n+s[7]*o,this.z=s[2]*r+s[5]*n+s[8]*o,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const r=this.x,n=this.y,o=this.z,s=t.elements,a=1/(s[3]*r+s[7]*n+s[11]*o+s[15]);return this.x=(s[0]*r+s[4]*n+s[8]*o+s[12])*a,this.y=(s[1]*r+s[5]*n+s[9]*o+s[13])*a,this.z=(s[2]*r+s[6]*n+s[10]*o+s[14])*a,this}applyQuaternion(t){const r=this.x,n=this.y,o=this.z,s=t.x,a=t.y,i=t.z,l=t.w,c=2*(a*o-i*n),u=2*(i*r-s*o),d=2*(s*n-a*r);return this.x=r+l*c+a*d-i*u,this.y=n+l*u+i*c-s*d,this.z=o+l*d+s*u-a*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,o=this.z,s=t.elements;return this.x=s[0]*r+s[4]*n+s[8]*o,this.y=s[1]*r+s[5]*n+s[9]*o,this.z=s[2]*r+s[6]*n+s[10]*o,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=Xt(this.x,t.x,r.x),this.y=Xt(this.y,t.y,r.y),this.z=Xt(this.z,t.z,r.z),this}clampScalar(t,r){return this.x=Xt(this.x,t,r),this.y=Xt(this.y,t,r),this.z=Xt(this.z,t,r),this}clampLength(t,r){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Xt(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,o=t.y,s=t.z,a=r.x,i=r.y,l=r.z;return this.x=o*l-s*i,this.y=s*a-n*l,this.z=n*i-o*a,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 cl.copy(this).projectOnVector(t),this.sub(cl)}reflect(t){return this.sub(cl.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(Xt(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const r=this.x-t.x,n=this.y-t.y,o=this.z-t.z;return r*r+n*n+o*o}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 o=Math.sin(r)*t;return this.x=o*Math.sin(n),this.y=Math.cos(r)*t,this.z=o*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(),o=this.setFromMatrixColumn(t,2).length();return this.x=r,this.y=n,this.z=o,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 cl=new Rn,Hh=new XM;function ZM(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 o=e[n];if(typeof o!="string")throw new TypeError("Url must be a string. Received "+o);o!==""&&(n>0&&(o=o.replace(/^[\/]+/,"")),n<e.length-1?o=o.replace(/[\/]+$/,""):o=o.replace(/[\/]+$/,"/"),t.push(o))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function ul(){var e;return typeof arguments[0]=="object"?e=arguments[0]:e=[].slice.call(arguments),ZM(e)}var Lt={},qh;function eV(){if(qh)return Lt;qh=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.TokenData=void 0,Lt.parse=d,Lt.compile=h,Lt.match=m,Lt.pathToRegexp=y,Lt.stringify=T;const e="/",t=P=>P,r=/^[$_\p{ID_Start}]$/u,n=/^[$\u200c\u200d\p{ID_Continue}]$/u,o="https://git.new/pathToRegexpError",s={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function a(P){return P.replace(/[{}()\[\]+?!:*]/g,"\\$&")}function i(P){return P.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}function*l(P){const E=[...P];let _=0;function x(){let N="";if(r.test(E[++_]))for(N+=E[_];n.test(E[++_]);)N+=E[_];else if(E[_]==='"'){let M=_;for(;_<E.length;){if(E[++_]==='"'){_++,M=0;break}E[_]==="\\"?N+=E[++_]:N+=E[_]}if(M)throw new TypeError(`Unterminated quote at ${M}: ${o}`)}if(!N)throw new TypeError(`Missing parameter name at ${_}: ${o}`);return N}for(;_<E.length;){const N=E[_],M=s[N];if(M)yield{type:M,index:_++,value:N};else if(N==="\\")yield{type:"ESCAPED",index:_++,value:E[_++]};else if(N===":"){const H=x();yield{type:"PARAM",index:_,value:H}}else if(N==="*"){const H=x();yield{type:"WILDCARD",index:_,value:H}}else yield{type:"CHAR",index:_,value:E[_++]}}return{type:"END",index:_,value:""}}class c{constructor(E){this.tokens=E}peek(){if(!this._peek){const E=this.tokens.next();this._peek=E.value}return this._peek}tryConsume(E){const _=this.peek();if(_.type===E)return this._peek=void 0,_.value}consume(E){const _=this.tryConsume(E);if(_!==void 0)return _;const{type:x,index:N}=this.peek();throw new TypeError(`Unexpected ${x} at ${N}, expected ${E}: ${o}`)}text(){let E="",_;for(;_=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)E+=_;return E}}class u{constructor(E){this.tokens=E}}Lt.TokenData=u;function d(P,E={}){const{encodePath:_=t}=E,x=new c(l(P));function N(H){const z=[];for(;;){const ne=x.text();ne&&z.push({type:"text",value:_(ne)});const re=x.tryConsume("PARAM");if(re){z.push({type:"param",name:re});continue}const he=x.tryConsume("WILDCARD");if(he){z.push({type:"wildcard",name:he});continue}if(x.tryConsume("{")){z.push({type:"group",tokens:N("}")});continue}return x.consume(H),z}}const M=N("END");return new u(M)}function h(P,E={}){const{encode:_=encodeURIComponent,delimiter:x=e}=E,N=P instanceof u?P:d(P,E),M=p(N.tokens,x,_);return function(z={}){const[ne,...re]=M(z);if(re.length)throw new TypeError(`Missing parameters: ${re.join(", ")}`);return ne}}function p(P,E,_){const x=P.map(N=>f(N,E,_));return N=>{const M=[""];for(const H of x){const[z,...ne]=H(N);M[0]+=z,M.push(...ne)}return M}}function f(P,E,_){if(P.type==="text")return()=>[P.value];if(P.type==="group"){const N=p(P.tokens,E,_);return M=>{const[H,...z]=N(M);return z.length?[""]:[H]}}const x=_||t;return P.type==="wildcard"&&_!==!1?N=>{const M=N[P.name];if(M==null)return["",P.name];if(!Array.isArray(M)||M.length===0)throw new TypeError(`Expected "${P.name}" to be a non-empty array`);return[M.map((H,z)=>{if(typeof H!="string")throw new TypeError(`Expected "${P.name}/${z}" to be a string`);return x(H)}).join(E)]}:N=>{const M=N[P.name];if(M==null)return["",P.name];if(typeof M!="string")throw new TypeError(`Expected "${P.name}" to be a string`);return[x(M)]}}function m(P,E={}){const{decode:_=decodeURIComponent,delimiter:x=e}=E,{regexp:N,keys:M}=y(P,E),H=M.map(z=>_===!1?t:z.type==="param"?_:ne=>ne.split(x).map(_));return function(ne){const re=N.exec(ne);if(!re)return!1;const he=re[0],te=Object.create(null);for(let me=1;me<re.length;me++){if(re[me]===void 0)continue;const W=M[me-1],Z=H[me-1];te[W.name]=Z(re[me])}return{path:he,params:te}}}function y(P,E={}){const{delimiter:_=e,end:x=!0,sensitive:N=!1,trailing:M=!0}=E,H=[],z=[],ne=N?"":"i",he=(Array.isArray(P)?P:[P]).map(W=>W instanceof u?W:d(W,E));for(const{tokens:W}of he)for(const Z of b(W,0,[])){const pe=C(Z,_,H);z.push(pe)}let te=`^(?:${z.join("|")})`;return M&&(te+=`(?:${i(_)}$)?`),te+=x?"$":`(?=${i(_)}|$)`,{regexp:new RegExp(te,ne),keys:H}}function*b(P,E,_){if(E===P.length)return yield _;const x=P[E];if(x.type==="group"){const N=_.slice();for(const M of b(x.tokens,0,N))yield*b(P,E+1,M)}else _.push(x);yield*b(P,E+1,_)}function C(P,E,_){let x="",N="",M=!0;for(let H=0;H<P.length;H++){const z=P[H];if(z.type==="text"){x+=i(z.value),N+=z.value,M||(M=z.value.includes(E));continue}if(z.type==="param"||z.type==="wildcard"){if(!M&&!N)throw new TypeError(`Missing text after "${z.name}": ${o}`);z.type==="param"?x+=`(${w(E,M?"":N)}+)`:x+="([\\s\\S]+)",_.push(z),N="",M=!1;continue}}return x}function w(P,E){return E.length<2?P.length<2?`[^${i(P+E)}]`:`(?:(?!${i(P)})[^${i(E)}])`:P.length<2?`(?:(?!${i(E)})[^${i(P)}])`:`(?:(?!${i(E)}|${i(P)})[\\s\\S])`}function T(P){return P.tokens.map(function E(_,x,N){if(_.type==="text")return a(_.value);if(_.type==="group")return`{${_.tokens.map(E).join("")}}`;const H=A(_.name)&&O(N[x+1])?_.name:JSON.stringify(_.name);if(_.type==="param")return`:${H}`;if(_.type==="wildcard")return`*${H}`;throw new TypeError(`Unexpected token: ${_}`)}).join("")}function A(P){const[E,..._]=P;return r.test(E)?_.every(x=>n.test(x)):!1}function O(P){return(P==null?void 0:P.type)!=="text"?!0:!n.test(P.value[0])}return Lt}var tV=eV();function mg(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 fg(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 Wh=1e-4,rV=class gg{constructor(t,r,n,o,s,a,i,l,c,u,d,h){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=o,this.motionStateSocket=s,this.isVirtual=a,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=o,this.controllerState=d,h.addEventListener("message",p=>{var f;const m=(f=br(p.data))==null?void 0:f.result;m&&$e.runInAction(()=>{this.controllerState=m})}),s.addEventListener("message",p=>{var f;const m=(f=br(p.data))==null?void 0:f.result;if(!m)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${p.data}`);mg(this.rapidlyChangingMotionState.state.joint_position.joints,m.state.joint_position.joints,Wh)||$e.runInAction(()=>{this.rapidlyChangingMotionState.state=m.state}),fg(this.rapidlyChangingMotionState.tcp_pose,m.tcp_pose,Wh)||$e.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose=m.tcp_pose})}),$e.makeAutoObservable(this)}static connect(t,r,n){return Me(this,null,function*(){var o,s;const[a,i]=r.split("@"),l=n.find(O=>O.controller===i),c=l==null?void 0:l.physical_motion_groups.find(O=>O.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=(o=br(d.data))==null?void 0:o.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:
|
|
156
|
+
`,h);const f=(yield t.api.controller.getRobotController(l.controller)).configuration.kind==="VirtualController",m=yield Me(this,null,function*(){try{return yield t.api.motionGroupInfos.getMounting(c.motion_group)}catch(O){return console.error(`Error fetching mounting for ${c.motion_group}`,O),null}}),y=t.openReconnectingWebsocket(`/controllers/${l.controller}/state-stream?response_rate=1000`),b=yield y.firstMessage(),C=(s=br(b.data))==null?void 0:s.result;if(!C)throw new Error(`Unable to parse initial controller state message ${b.data}`);console.log(`Connected controller state websocket to controller ${l.controller}. Initial state:
|
|
157
|
+
`,C);const{tcps:w}=yield t.api.motionGroupInfos.listTcps(r),T=yield t.api.motionGroupInfos.getMotionGroupSpecification(r),A=yield t.api.motionGroupInfos.getSafetySetup(r);return new gg(t,l,c,h,u,f,w,T,A,m,C,y)})}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,o,s,a;const i=new Se.Vector3(((r=(t=this.mounting)==null?void 0:t.pose.orientation)==null?void 0:r.x)||0,((o=(n=this.mounting)==null?void 0:n.pose.orientation)==null?void 0:o.y)||0,((a=(s=this.mounting)==null?void 0:s.pose.orientation)==null?void 0:a.z)||0),l=i.length(),c=i.normalize();return new Se.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 Me(this,null,function*(){if(this.activationState!=="active"){console.error("Tried to deactivate while already deactivating");return}$e.runInAction(()=>{this.activationState="deactivating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_MONITOR"),$e.runInAction(()=>{this.activationState="inactive"})}catch(t){throw $e.runInAction(()=>{this.activationState="active"}),t}})}activate(){return Me(this,null,function*(){if(this.activationState!=="inactive"){console.error("Tried to activate while already activating");return}$e.runInAction(()=>{this.activationState="activating"});try{yield this.nova.api.controller.setDefaultMode(this.controllerId,"MODE_CONTROL"),$e.runInAction(()=>{this.activationState="active"})}catch(t){throw $e.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 yg{constructor(t,r={}){this.motionStream=t,this.opts=r,this.cartesianWebsocket=null,this.jointWebsocket=null,this.cartesianJoggingOpts={}}static open(t,r){return Me(this,arguments,function*(n,o,s={}){const a=yield n.connectMotionStream(o);return new yg(a,s)})}get motionGroupId(){return this.motionStream.motionGroupId}get nova(){return this.motionStream.nova}get numJoints(){return this.motionStream.joints.length}get activeJoggingMode(){return this.cartesianWebsocket?"cartesian":this.jointWebsocket?"joint":"increment"}get activeWebsocket(){return this.cartesianWebsocket||this.jointWebsocket}stop(){return Me(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&&(i_(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 o=br(n.data);if(o&&"error"in o)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 o=br(n.data);if(o&&"error"in o)if(this.opts.onError)this.opts.onError(n.data);else throw new Error(n.data)}))}startJointRotation(t){return Me(this,arguments,function*({joint:r,direction:n,velocityRadsPerSec:o}){if(!this.jointWebsocket)throw new Error("Joint jogging websocket not connected; call setJoggingMode first");const s=new Array(this.numJoints).fill(0);s[r]=n==="-"?-o:o,this.jointWebsocket.sendJson({motion_group:this.motionGroupId,joint_velocities:s})})}startTCPTranslation(t){return Me(this,arguments,function*({axis:r,direction:n,velocityMmPerSec:o}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const s={x:0,y:0,z:0},a=Object.assign({},s);a[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:a,rotation_direction:s,position_velocity:o,rotation_velocity:0,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}startTCPRotation(t){return Me(this,arguments,function*({axis:r,direction:n,velocityRadsPerSec:o}){if(!this.cartesianWebsocket)throw new Error("Cartesian jogging websocket not connected; call setJoggingMode first");const s={x:0,y:0,z:0},a=Object.assign({},s);a[r]=n==="-"?-1:1,this.cartesianWebsocket.sendJson({motion_group:this.motionGroupId,position_direction:s,rotation_direction:a,position_velocity:0,rotation_velocity:o,tcp:this.cartesianJoggingOpts.tcpId,coordinate_system:this.cartesianJoggingOpts.coordSystemId})})}runIncrementalCartesianMotion(t){return Me(this,arguments,function*({currentTcpPose:r,currentJoints:n,coordSystemId:o,velocityInRelevantUnits:s,axis:a,direction:i,motion:l}){var c;const u=[];if(!C_(r.coordinate_system,o))throw new Error(`Current TCP pose coordinate system ${r.coordinate_system} does not match target coordinate system ${o}`);if(l.type==="translate"){const p=Object.assign({},r.position);p[a]+=l.distanceMm*(i==="-"?-1:1),u.push({settings:{limits_override:{tcp_velocity_limit:s}},line:{position:p,orientation:r.orientation,coordinate_system:o}})}else if(l.type==="rotate"){const p=new Rn(r.orientation.x,r.orientation.y,r.orientation.z),f=p.length(),m=p.clone().normalize(),y=l.distanceRads*(i==="-"?-1:1),b=new Rn(0,0,0);b[a]=1;const C=Math.cos(.5*y)*Math.cos(.5*f),w=Math.sin(.5*y)*Math.sin(.5*f),T=Math.sin(.5*y)*Math.cos(.5*f),A=Math.cos(.5*y)*Math.sin(.5*f),O=b.dot(m),P=b.clone().cross(m),E=2*Math.acos(C-w*O),_=E/Math.sin(.5*E),x=new Rn().addScaledVector(P,w).addScaledVector(b,T).addScaledVector(m,A).multiplyScalar(_);u.push({settings:{limits_override:{tcp_orientation_velocity_limit:s}},line:{position:r.position,orientation:x,coordinate_system:o}})}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 Me(this,arguments,function*({joint:r,currentJoints:n,velocityRadsPerSec:o,direction:s,distanceRads:a}){var i;const l=[...n.joints];l[r]+=a*(s==="-"?-1:1);const c=new Array(n.joints.length).fill(o),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})})}},Jh=1e-4;function oV(e,t){const r=new Et.Vector3(t.x,t.y,t.z),n=new Et.Vector3(e.x,e.y,e.z),o=r.length(),s=r.normalize();let a=n.length(),i=n.normalize();i.dot(s)<0&&(a=-a,i=i.multiplyScalar(-1));let l=a-o;return l-=2*Math.PI*Math.floor((l+Math.PI)/(2*Math.PI)),a=o+l,i.multiplyScalar(a)}var sV=class bg{constructor(t,r,n,o,s){this.nova=t,this.controller=r,this.motionGroup=n,this.initialMotionState=o,this.motionStateSocket=s,this.rapidlyChangingMotionState=o,s.addEventListener("message",a=>{var i;const l=(i=br(a.data))==null?void 0:i.result;if(!l)throw new Error(`Failed to get motion state for ${this.motionGroupId}: ${a.data}`);mg(this.rapidlyChangingMotionState.state.joint_position.joints,l.state.joint_position.joints,Jh)||$e.runInAction(()=>{this.rapidlyChangingMotionState.state=l.state}),fg(this.rapidlyChangingMotionState.tcp_pose,l.tcp_pose,Jh)||$e.runInAction(()=>{this.rapidlyChangingMotionState.tcp_pose==null?this.rapidlyChangingMotionState.tcp_pose=l.tcp_pose:this.rapidlyChangingMotionState.tcp_pose={position:l.tcp_pose.position,orientation:oV(l.tcp_pose.orientation,this.rapidlyChangingMotionState.tcp_pose.orientation),tcp:l.tcp_pose.tcp,coordinate_system:l.tcp_pose.coordinate_system}})}),$e.makeAutoObservable(this)}static open(t,r){return Me(this,null,function*(){var n;const{instances:o}=yield t.api.controller.listControllers(),[s,a]=r.split("@"),i=o.find(h=>h.controller===a),l=i==null?void 0:i.physical_motion_groups.find(h=>h.motion_group===r);if(!i||!l)throw new Error(`Controller ${a} 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=br(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:
|
|
158
|
+
`,d),new bg(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()}},aV=class{constructor(e,t){this.cellId=e,this.opts=t,this.system=this.withUnwrappedResponsesOnly(zM),this.cell=this.withUnwrappedResponsesOnly(sM),this.deviceConfig=this.withCellId(pM),this.motionGroup=this.withCellId(TM),this.motionGroupInfos=this.withCellId(AM),this.controller=this.withCellId(iM),this.program=this.withCellId(VM),this.programValues=this.withCellId(jM),this.controllerIOs=this.withCellId(cM),this.motionGroupKinematic=this.withCellId(_M),this.motion=this.withCellId(CM),this.coordinateSystems=this.withCellId(dM),this.application=this.withCellId(Gh),this.applicationGlobal=this.withUnwrappedResponsesOnly(Gh),this.motionGroupJogging=this.withCellId(EM),this.virtualRobot=this.withCellId(HM),this.virtualRobotSetup=this.withCellId(QM),this.virtualRobotMode=this.withCellId(YM),this.virtualRobotBehavior=this.withCellId(WM),this.libraryProgramMetadata=this.withCellId(yM),this.libraryProgram=this.withCellId(fM),this.libraryRecipeMetadata=this.withCellId(SM),this.libraryRecipe=this.withCellId(xM),this.storeObject=this.withCellId(FM),this.storeCollisionComponents=this.withCellId(DM),this.storeCollisionScenes=this.withCellId(LM)}withCellId(e){var t,r;const n=new e(Ll(Cn({},this.opts),{isJsonMime:o=>o==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:I.create());for(const o of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(o!=="constructor"&&typeof n[o]=="function"){const s=n[o];n[o]=(...a)=>s.apply(n,[this.cellId,...a]).then(i=>i.data)}return n}withUnwrappedResponsesOnly(e){var t,r;const n=new e(Ll(Cn({},this.opts),{isJsonMime:o=>o==="application/json"}),(t=this.opts.basePath)!=null?t:"",(r=this.opts.axiosInstance)!=null?r:I.create());for(const o of Reflect.ownKeys(Reflect.getPrototypeOf(n)))if(o!=="constructor"&&typeof n[o]=="function"){const s=n[o];n[o]=(...a)=>s.apply(n,a).then(i=>i.data)}return n}},iV=class{constructor(){this.connections=[]}handleAPIRequest(e){return Me(this,null,function*(){var t,r,n;const o=[{method:"GET",path:"/cells/:cellId/controllers",handle(){return{instances:[{controller:"mock-ur5e",model_name:"UniversalRobots::Controller",host:"mock-ur5e",allow_software_install_on_controller:!0,physical_motion_groups:[{motion_group:"0@mock-ur5e",name_from_controller:"UR5e",active:!1,model_from_controller:"UniversalRobots_UR5e"}],has_error:!1,error_details:""}]}}},{method:"GET",path:"/cells/:cellId/controllers/:controllerId",handle(){return{configuration:{kind:"VirtualController",manufacturer:"universalrobots",position:"[0,-1.571,-1.571,-1.571,1.571,-1.571,0]",type:"universalrobots-ur5e"},name:"mock-ur5"}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/specification",handle(){return{dh_parameters:[{alpha:1.5707963267948966,theta:0,a:0,d:162.25,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-425,d:0,reverse_rotation_direction:!1},{alpha:0,theta:0,a:-392.2,d:0,reverse_rotation_direction:!1},{alpha:1.5707963267948966,theta:0,a:0,d:133.3,reverse_rotation_direction:!1},{alpha:-1.5707963267948966,theta:0,a:0,d:99.7,reverse_rotation_direction:!1},{alpha:0,theta:0,a:0,d:99.6,reverse_rotation_direction:!1}],mechanical_joint_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-6.335545063018799,upper_limit:6.335545063018799,unlimited:!1}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/safety-setup",handle(){return{safety_settings:[{safety_state:"SAFETY_NORMAL",settings:{joint_position_limits:[{joint:"JOINTNAME_AXIS_1",lower_limit:-2.96705961227417,upper_limit:2.96705961227417,unlimited:!1},{joint:"JOINTNAME_AXIS_2",lower_limit:-1.7453292608261108,upper_limit:2.7925267219543457,unlimited:!1},{joint:"JOINTNAME_AXIS_3",lower_limit:-3.3161256313323975,upper_limit:.40142571926116943,unlimited:!1},{joint:"JOINTNAME_AXIS_4",lower_limit:-3.4906585216522217,upper_limit:3.4906585216522217,unlimited:!1},{joint:"JOINTNAME_AXIS_5",lower_limit:-2.4434609413146973,upper_limit:2.4434609413146973,unlimited:!1},{joint:"JOINTNAME_AXIS_6",lower_limit:-4.71238899230957,upper_limit:4.71238899230957,unlimited:!1}],joint_velocity_limits:[{joint:"JOINTNAME_AXIS_1",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_2",limit:3.1415927410125732},{joint:"JOINTNAME_AXIS_3",limit:3.4906585216522217},{joint:"JOINTNAME_AXIS_4",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_5",limit:6.108652591705322},{joint:"JOINTNAME_AXIS_6",limit:6.981317043304443}],joint_acceleration_limits:[],joint_torque_limits:[],tcp_velocity_limit:1800}}],safety_zones:[{id:1,priority:0,geometry:{compound:{child_geometries:[{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820},{x:-800,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:1650,y:-1330,z:-1820},{x:1650,y:-1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:-800,y:-1330,z:-1820},{x:-800,y:1330,z:-1820},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:-1330,z:1500},{x:1650,y:-1330,z:1500}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:-800,y:1330,z:1500},{x:-800,y:1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"},{convex_hull:{vertices:[{x:1650,y:1330,z:1500},{x:1650,y:-1330,z:1500},{x:1650,y:-1330,z:-1820},{x:1650,y:1330,z:-1820}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"box"}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Cell workzone"},motion_group_uid:1},{id:2,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-1850},{x:865,y:1330,z:-1850},{x:865,y:-720,z:-1850},{x:1650,y:-720,z:-1850},{x:1650,y:1330,z:-920},{x:865,y:1330,z:-920},{x:865,y:-720,z:-920},{x:1650,y:-720,z:-920}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Transport"},motion_group_uid:1},{id:3,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:1330,z:-600},{x:865,y:1330,z:-600},{x:865,y:430,z:-600},{x:1650,y:430,z:-600},{x:1650,y:1330,z:-1250},{x:865,y:1330,z:-1250},{x:865,y:430,z:-1250},{x:1650,y:430,z:-1250}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Tunel"},motion_group_uid:1},{id:4,priority:0,geometry:{convex_hull:{vertices:[{x:1650,y:-760,z:-440},{x:900,y:-760,z:-440},{x:900,y:-1330,z:-440},{x:1650,y:-1330,z:-440},{x:1650,y:-760,z:-1800},{x:900,y:-760,z:-1800},{x:900,y:-1330,z:-1800},{x:1650,y:-1330,z:-1800}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Fanuc controller"},motion_group_uid:1},{id:6,priority:0,geometry:{convex_hull:{vertices:[{x:-200,y:-200,z:-1900},{x:200,y:-200,z:-1900},{x:200,y:200,z:-1900},{x:-200,y:200,z:-1900},{x:-200,y:-200,z:-350},{x:200,y:-200,z:-350},{x:200,y:200,z:-350},{x:-200,y:200,z:-350}]},init_pose:{position:{x:0,y:0,z:0},orientation:{x:0,y:0,z:0,w:1}},id:"Robot base"},motion_group_uid:1}],robot_model_geometries:[{link_index:1,geometry:{sphere:{radius:270},init_pose:{position:{x:-70,y:-70,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link1_sphere"}},{link_index:2,geometry:{capsule:{radius:160,cylinder_height:800},init_pose:{position:{x:-450,y:40,z:170},orientation:{x:0,y:-.7071067811865475,z:0,w:.7071067811865476}},id:"link2_capsule"}},{link_index:3,geometry:{sphere:{radius:270},init_pose:{position:{x:-110,y:10,z:-100},orientation:{x:0,y:0,z:0,w:1}},id:"link3_sphere"}},{link_index:4,geometry:{capsule:{radius:110,cylinder_height:600},init_pose:{position:{x:0,y:300,z:40},orientation:{x:-.7071067811865475,y:0,z:0,w:.7071067811865476}},id:"link4_capsule"}},{link_index:5,geometry:{sphere:{radius:75},init_pose:{position:{x:0,y:0,z:-50},orientation:{x:0,y:0,z:0,w:1}},id:"link5_sphere"}}],tool_geometries:[]}}},{method:"GET",path:"/cells/:cellId/coordinate-systems",handle(){return{coordinatesystems:[{coordinate_system:"",name:"world",reference_uid:"",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0],type:"ROTATION_VECTOR"}}]}}},{method:"GET",path:"/cells/:cellId/motion-groups/:motionGroupId/tcps",handle(){return{tcps:[{id:"Flange",readable_name:"Default-Flange",position:{x:0,y:0,z:0},rotation:{angles:[0,0,0,0],type:"ROTATION_VECTOR"}},{id:"complex-tcp-position",readable_name:"Complex TCP Position",position:{x:-200,y:300,z:150},rotation:{angles:[-.12139440409113832,-.06356210998212003,-.2023240068185639,0],type:"ROTATION_VECTOR"}}]}}}],s=((t=e.method)==null?void 0:t.toUpperCase())||"GET",a="/cells"+((n=(r=e.url)==null?void 0:r.split("/cells")[1])==null?void 0:n.split("?")[0]);for(const i of o){const l=tV.match(i.path)(a||"");if(s===i.method&&l){const c=i.handle();return{status:200,statusText:"Success",data:JSON.stringify(c),headers:{},config:e,request:{responseURL:e.url}}}}throw new ql(`No mock handler matched this request: ${s} ${a}`,"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(lV)})),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)}},lV={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"}}},cV=class{constructor(e){this.authPromise=null,this.accessToken=null;var t;const r=(t=e.cellId)!=null?t:"cell";this.config=Cn({cellId:r},e),this.accessToken=e.accessToken||nl.getString("wbjs.access_token")||null,this.config.instanceUrl==="https://mock.example.com"&&(this.mock=new iV);const n=I.create({baseURL:ul(this.config.instanceUrl,"/api/v1"),headers:{"User-Agent":"Wandelbots-Nova-JS-SDK"}});n.interceptors.request.use(o=>Me(this,null,function*(){return o.headers.Authorization||(this.accessToken?o.headers.Authorization=`Bearer ${this.accessToken}`:this.config.username&&this.config.password&&(o.headers.Authorization=`Basic ${btoa(e.username+":"+e.password)}`)),o})),typeof window<"u"&&n.interceptors.response.use(o=>o,o=>Me(this,null,function*(){var s,a;if(tM(o))if(((s=o.response)==null?void 0:s.status)===401)try{if(yield this.renewAuthentication(),o.config)return this.accessToken?o.config.headers.Authorization=`Bearer ${this.accessToken}`:delete o.config.headers.Authorization,n.request(o.config)}catch(i){return Promise.reject(i)}else((a=o.response)==null?void 0:a.status)===503&&(yield fetch(window.location.href)).status===503&&window.location.reload();return Promise.reject(o)})),this.api=new aV(r,Ll(Cn({},e),{basePath:ul(this.config.instanceUrl,"/api/v1"),isJsonMime:o=>o==="application/json",baseOptions:Cn(Cn({},this.mock?{adapter:o=>this.mock.handleAPIRequest(o)}:{}),e.baseOptions),axiosInstance:n}))}renewAuthentication(){return Me(this,null,function*(){if(!this.authPromise){this.authPromise=T_(this.config.instanceUrl);try{this.accessToken=yield this.authPromise,this.accessToken?nl.setString("wbjs.access_token",this.accessToken):nl.delete("wbjs.access_token")}finally{this.authPromise=null}}})}makeWebsocketURL(e){const t=new URL(ul(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 Me(this,null,function*(){return yield sV.open(this,e)})}connectJogger(e){return Me(this,null,function*(){return yield nV.open(this,e)})}connectMotionGroups(e){return Me(this,null,function*(){const{instances:t}=yield this.api.controller.listControllers();return Promise.all(e.map(r=>rV.connect(this,r,t)))})}connectMotionGroup(e){return Me(this,null,function*(){return(yield this.connectMotionGroups([e]))[0]})}};function uV(e){try{return JSON.stringify(e)}catch{return}}function dV(e,t){throw new Error(t+` ${JSON.stringify(e)}`)}function hV(e){var t,r,n,o;return e instanceof ql&&e.code==="ERR_NETWORK"?"Failed to connect to the server. Please check your internet connection.":e instanceof ql&&e.response?`${(t=e.response)==null?void 0:t.status} ${(r=e.response)==null?void 0:r.statusText} from ${(n=e.response)==null?void 0:n.config.url}: ${JSON.stringify((o=e.response)==null?void 0:o.data)}`:e instanceof Error?e.message:`Unexpected error: ${uV(e)||e}`}const du=e=>{const t=e.softTimeout||3e3,[r,n]=G.useState(!1),o=R.useTheme();return G.useEffect(()=>{const s=setTimeout(()=>{n(!0)},t);return()=>clearTimeout(s)}),g.jsx(R.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",sx:{color:o.palette.text.primary},children:e.error?g.jsx(xg,{loadingMessage:e.message,error:e.error}):g.jsxs(g.Fragment,{children:[g.jsx(R.CircularProgress,{sx:{marginBottom:"24px"}}),!!e.message&&g.jsx("div",{children:e.message}),g.jsx(R.Stack,{sx:{visibility:r?"visible":"hidden",marginTop:"1rem",color:o.palette.text.secondary},children:"This is taking longer than expected..."})]})})},xg=e=>{const t=hV(e.error),r=e.error instanceof Error?e.error.stack:null,n=R.useTheme();return g.jsxs(R.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 ${rc.lowerFirst(R.capitalize(e.loadingMessage))} - `:"")+t,g.jsx("br",{}),r&&g.jsx("pre",{children:r})]})},pV=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),mV=G.forwardRef(pV),fV=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:10,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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=G.forwardRef(fV),yV=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:19,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),bV=G.forwardRef(yV),xV=({title:e,titleId:t,...r},n)=>F.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?F.createElement("title",{id:t},e):null,F.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"})),vV=G.forwardRef(xV);function SV(){this.__data__=[],this.size=0}function vg(e,t){return e===t||e!==e&&t!==t}function bi(e,t){for(var r=e.length;r--;)if(vg(e[r][0],t))return r;return-1}var wV=Array.prototype,CV=wV.splice;function OV(e){var t=this.__data__,r=bi(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():CV.call(t,r,1),--this.size,!0}function TV(e){var t=this.__data__,r=bi(t,e);return r<0?void 0:t[r][1]}function PV(e){return bi(this.__data__,e)>-1}function AV(e,t){var r=this.__data__,n=bi(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function lr(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])}}lr.prototype.clear=SV;lr.prototype.delete=OV;lr.prototype.get=TV;lr.prototype.has=PV;lr.prototype.set=AV;function RV(){this.__data__=new lr,this.size=0}function EV(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function IV(e){return this.__data__.get(e)}function _V(e){return this.__data__.has(e)}var MV="[object AsyncFunction]",VV="[object Function]",kV="[object GeneratorFunction]",jV="[object Proxy]";function Sg(e){if(!Hr(e))return!1;var t=en(e);return t==VV||t==kV||t==MV||t==jV}var dl=Yt["__core-js_shared__"],Yh=function(){var e=/[^.]+$/.exec(dl&&dl.keys&&dl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function $V(e){return!!Yh&&Yh in e}var DV=Function.prototype,UV=DV.toString;function rn(e){if(e!=null){try{return UV.call(e)}catch{}try{return e+""}catch{}}return""}var LV=/[\\^$.*+?()[\]{}|]/g,BV=/^\[object .+?Constructor\]$/,FV=Function.prototype,NV=Object.prototype,zV=FV.toString,GV=NV.hasOwnProperty,HV=RegExp("^"+zV.call(GV).replace(LV,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qV(e){if(!Hr(e)||$V(e))return!1;var t=Sg(e)?HV:BV;return t.test(rn(e))}function WV(e,t){return e==null?void 0:e[t]}function nn(e,t){var r=WV(e,t);return qV(r)?r:void 0}var Do=nn(Yt,"Map"),Uo=nn(Object,"create");function JV(){this.__data__=Uo?Uo(null):{},this.size=0}function YV(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var KV="__lodash_hash_undefined__",QV=Object.prototype,XV=QV.hasOwnProperty;function ZV(e){var t=this.__data__;if(Uo){var r=t[e];return r===KV?void 0:r}return XV.call(t,e)?t[e]:void 0}var e5=Object.prototype,t5=e5.hasOwnProperty;function r5(e){var t=this.__data__;return Uo?t[e]!==void 0:t5.call(t,e)}var n5="__lodash_hash_undefined__";function o5(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Uo&&t===void 0?n5:t,this}function Jr(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])}}Jr.prototype.clear=JV;Jr.prototype.delete=YV;Jr.prototype.get=ZV;Jr.prototype.has=r5;Jr.prototype.set=o5;function s5(){this.size=0,this.__data__={hash:new Jr,map:new(Do||lr),string:new Jr}}function a5(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function xi(e,t){var r=e.__data__;return a5(t)?r[typeof t=="string"?"string":"hash"]:r.map}function i5(e){var t=xi(this,e).delete(e);return this.size-=t?1:0,t}function l5(e){return xi(this,e).get(e)}function c5(e){return xi(this,e).has(e)}function u5(e,t){var r=xi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function cr(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])}}cr.prototype.clear=s5;cr.prototype.delete=i5;cr.prototype.get=l5;cr.prototype.has=c5;cr.prototype.set=u5;var d5=200;function h5(e,t){var r=this.__data__;if(r instanceof lr){var n=r.__data__;if(!Do||n.length<d5-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new cr(n)}return r.set(e,t),this.size=r.size,this}function rr(e){var t=this.__data__=new lr(e);this.size=t.size}rr.prototype.clear=RV;rr.prototype.delete=EV;rr.prototype.get=IV;rr.prototype.has=_V;rr.prototype.set=h5;var p5="__lodash_hash_undefined__";function m5(e){return this.__data__.set(e,p5),this}function f5(e){return this.__data__.has(e)}function va(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new cr;++t<r;)this.add(e[t])}va.prototype.add=va.prototype.push=m5;va.prototype.has=f5;function g5(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 y5(e,t){return e.has(t)}var b5=1,x5=2;function wg(e,t,r,n,o,s){var a=r&b5,i=e.length,l=t.length;if(i!=l&&!(a&&l>i))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=r&x5?new va:void 0;for(s.set(e,t),s.set(t,e);++d<i;){var f=e[d],m=t[d];if(n)var y=a?n(m,f,d,t,e,s):n(f,m,d,e,t,s);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!g5(t,function(b,C){if(!y5(p,C)&&(f===b||o(f,b,r,n,s)))return p.push(C)})){h=!1;break}}else if(!(f===m||o(f,m,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}var Kh=Yt.Uint8Array;function v5(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function S5(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var w5=1,C5=2,O5="[object Boolean]",T5="[object Date]",P5="[object Error]",A5="[object Map]",R5="[object Number]",E5="[object RegExp]",I5="[object Set]",_5="[object String]",M5="[object Symbol]",V5="[object ArrayBuffer]",k5="[object DataView]",Qh=Sr?Sr.prototype:void 0,hl=Qh?Qh.valueOf:void 0;function j5(e,t,r,n,o,s,a){switch(r){case k5:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case V5:return!(e.byteLength!=t.byteLength||!s(new Kh(e),new Kh(t)));case O5:case T5:case R5:return vg(+e,+t);case P5:return e.name==t.name&&e.message==t.message;case E5:case _5:return e==t+"";case A5:var i=v5;case I5:var l=n&w5;if(i||(i=S5),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=C5,a.set(e,t);var u=wg(i(e),i(t),n,o,s,a);return a.delete(e),u;case M5:if(hl)return hl.call(e)==hl.call(t)}return!1}function $5(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var Wt=Array.isArray;function D5(e,t,r){var n=t(e);return Wt(e)?n:$5(n,r(e))}function U5(e,t){for(var r=-1,n=e==null?0:e.length,o=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[o++]=a)}return s}function L5(){return[]}var B5=Object.prototype,F5=B5.propertyIsEnumerable,Xh=Object.getOwnPropertySymbols,N5=Xh?function(e){return e==null?[]:(e=Object(e),U5(Xh(e),function(t){return F5.call(e,t)}))}:L5;function z5(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var G5="[object Arguments]";function Zh(e){return qr(e)&&en(e)==G5}var Cg=Object.prototype,H5=Cg.hasOwnProperty,q5=Cg.propertyIsEnumerable,Og=Zh(function(){return arguments}())?Zh:function(e){return qr(e)&&H5.call(e,"callee")&&!q5.call(e,"callee")};function W5(){return!1}var Tg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ep=Tg&&typeof module=="object"&&module&&!module.nodeType&&module,J5=ep&&ep.exports===Tg,tp=J5?Yt.Buffer:void 0,Y5=tp?tp.isBuffer:void 0,Jl=Y5||W5,K5=9007199254740991,Q5=/^(?:0|[1-9]\d*)$/;function Pg(e,t){var r=typeof e;return t=t??K5,!!t&&(r=="number"||r!="symbol"&&Q5.test(e))&&e>-1&&e%1==0&&e<t}var X5=9007199254740991;function hu(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=X5}var Z5="[object Arguments]",e3="[object Array]",t3="[object Boolean]",r3="[object Date]",n3="[object Error]",o3="[object Function]",s3="[object Map]",a3="[object Number]",i3="[object Object]",l3="[object RegExp]",c3="[object Set]",u3="[object String]",d3="[object WeakMap]",h3="[object ArrayBuffer]",p3="[object DataView]",m3="[object Float32Array]",f3="[object Float64Array]",g3="[object Int8Array]",y3="[object Int16Array]",b3="[object Int32Array]",x3="[object Uint8Array]",v3="[object Uint8ClampedArray]",S3="[object Uint16Array]",w3="[object Uint32Array]",_e={};_e[m3]=_e[f3]=_e[g3]=_e[y3]=_e[b3]=_e[x3]=_e[v3]=_e[S3]=_e[w3]=!0;_e[Z5]=_e[e3]=_e[h3]=_e[t3]=_e[p3]=_e[r3]=_e[n3]=_e[o3]=_e[s3]=_e[a3]=_e[i3]=_e[l3]=_e[c3]=_e[u3]=_e[d3]=!1;function C3(e){return qr(e)&&hu(e.length)&&!!_e[en(e)]}function O3(e){return function(t){return e(t)}}var Ag=typeof exports=="object"&&exports&&!exports.nodeType&&exports,So=Ag&&typeof module=="object"&&module&&!module.nodeType&&module,T3=So&&So.exports===Ag,pl=T3&&Pf.process,rp=function(){try{var e=So&&So.require&&So.require("util").types;return e||pl&&pl.binding&&pl.binding("util")}catch{}}(),np=rp&&rp.isTypedArray,Rg=np?O3(np):C3,P3=Object.prototype,A3=P3.hasOwnProperty;function R3(e,t){var r=Wt(e),n=!r&&Og(e),o=!r&&!n&&Jl(e),s=!r&&!n&&!o&&Rg(e),a=r||n||o||s,i=a?z5(e.length,String):[],l=i.length;for(var c in e)A3.call(e,c)&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Pg(c,l)))&&i.push(c);return i}var E3=Object.prototype;function I3(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||E3;return e===r}function _3(e,t){return function(r){return e(t(r))}}var M3=_3(Object.keys,Object),V3=Object.prototype,k3=V3.hasOwnProperty;function j3(e){if(!I3(e))return M3(e);var t=[];for(var r in Object(e))k3.call(e,r)&&r!="constructor"&&t.push(r);return t}function Eg(e){return e!=null&&hu(e.length)&&!Sg(e)}function pu(e){return Eg(e)?R3(e):j3(e)}function op(e){return D5(e,pu,N5)}var $3=1,D3=Object.prototype,U3=D3.hasOwnProperty;function L3(e,t,r,n,o,s){var a=r&$3,i=op(e),l=i.length,c=op(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=i[d];if(!(a?h in t:U3.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var m=!0;s.set(e,t),s.set(t,e);for(var y=a;++d<l;){h=i[d];var b=e[h],C=t[h];if(n)var w=a?n(C,b,h,t,e,s):n(b,C,h,e,t,s);if(!(w===void 0?b===C||o(b,C,r,n,s):w)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var T=e.constructor,A=t.constructor;T!=A&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof A=="function"&&A instanceof A)&&(m=!1)}return s.delete(e),s.delete(t),m}var Yl=nn(Yt,"DataView"),Kl=nn(Yt,"Promise"),Ql=nn(Yt,"Set"),Xl=nn(Yt,"WeakMap"),sp="[object Map]",B3="[object Object]",ap="[object Promise]",ip="[object Set]",lp="[object WeakMap]",cp="[object DataView]",F3=rn(Yl),N3=rn(Do),z3=rn(Kl),G3=rn(Ql),H3=rn(Xl),gr=en;(Yl&&gr(new Yl(new ArrayBuffer(1)))!=cp||Do&&gr(new Do)!=sp||Kl&&gr(Kl.resolve())!=ap||Ql&&gr(new Ql)!=ip||Xl&&gr(new Xl)!=lp)&&(gr=function(e){var t=en(e),r=t==B3?e.constructor:void 0,n=r?rn(r):"";if(n)switch(n){case F3:return cp;case N3:return sp;case z3:return ap;case G3:return ip;case H3:return lp}return t});var q3=1,up="[object Arguments]",dp="[object Array]",Is="[object Object]",W3=Object.prototype,hp=W3.hasOwnProperty;function J3(e,t,r,n,o,s){var a=Wt(e),i=Wt(t),l=a?dp:gr(e),c=i?dp:gr(t);l=l==up?Is:l,c=c==up?Is:c;var u=l==Is,d=c==Is,h=l==c;if(h&&Jl(e)){if(!Jl(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new rr),a||Rg(e)?wg(e,t,r,n,o,s):j5(e,t,l,r,n,o,s);if(!(r&q3)){var p=u&&hp.call(e,"__wrapped__"),f=d&&hp.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,y=f?t.value():t;return s||(s=new rr),o(m,y,r,n,s)}}return h?(s||(s=new rr),L3(e,t,r,n,o,s)):!1}function vi(e,t,r,n,o){return e===t?!0:e==null||t==null||!qr(e)&&!qr(t)?e!==e&&t!==t:J3(e,t,r,n,vi,o)}function Y3(e,t){return vi(e,t)}const Ig=({store:e})=>{const{t}=we.useTranslation(),[r,n]=G.useState(e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached),o=G.useRef(r);ii(()=>{const a=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_limit_reached.limit_reached;Y3(o.current,a)||(o.current=a,n(a))});const s=[];for(const[a,i]of r.entries())i&&s.push(a);return g.jsx(R.Typography,{color:"error",sx:{margin:"0.5rem 1rem",textAlign:"center",minHeight:"1.5rem",visibility:s.length?"visible":"hidden"},children:t("Jogging.JointLimitsReached.lb",{jointNumbers:s.map(a=>a+1).join(", ")})})},K3=R.styled(R.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 _s({labelValue:e,...t}){return g.jsxs(K3,{fullWidth:!0,variant:"filled",children:[g.jsx(R.InputLabel,{id:t.labelId,children:e}),g.jsx(R.Select,{...t})]})}var pp=function(){try{var e=nn(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Q3(e,t,r){t=="__proto__"&&pp?pp(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function X3(e,t,r,n){for(var o=-1,s=e==null?0:e.length;++o<s;){var a=e[o];t(n,a,r(a),e)}return n}function Z3(e){return function(t,r,n){for(var o=-1,s=Object(t),a=n(t),i=a.length;i--;){var l=a[++o];if(r(s[l],l,s)===!1)break}return t}}var ek=Z3();function tk(e,t){return e&&ek(e,t,pu)}function rk(e,t){return function(r,n){if(r==null)return r;if(!Eg(r))return e(r,n);for(var o=r.length,s=-1,a=Object(r);++s<o&&n(a[s],s,a)!==!1;);return r}}var nk=rk(tk);function ok(e,t,r,n){return nk(e,function(o,s,a){t(n,o,r(o),a)}),n}var sk=1,ak=2;function ik(e,t,r,n){var o=r.length,s=o;if(e==null)return!s;for(e=Object(e);o--;){var a=r[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<s;){a=r[o];var i=a[0],l=e[i],c=a[1];if(a[2]){if(l===void 0&&!(i in e))return!1}else{var u=new rr,d;if(!(d===void 0?vi(c,l,sk|ak,n,u):d))return!1}}return!0}function _g(e){return e===e&&!Hr(e)}function lk(e){for(var t=pu(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,_g(o)]}return t}function Mg(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function ck(e){var t=lk(e);return t.length==1&&t[0][2]?Mg(t[0][0],t[0][1]):function(r){return r===e||ik(r,e,t)}}var uk=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dk=/^\w*$/;function mu(e,t){if(Wt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||li(e)?!0:dk.test(e)||!uk.test(e)||t!=null&&e in Object(t)}var hk="Expected a function";function fu(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(hk);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=r.cache;if(s.has(o))return s.get(o);var a=e.apply(this,n);return r.cache=s.set(o,a)||s,a};return r.cache=new(fu.Cache||cr),r}fu.Cache=cr;var pk=500;function mk(e){var t=fu(e,function(n){return r.size===pk&&r.clear(),n}),r=t.cache;return t}var fk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gk=/\\(\\)?/g,yk=mk(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(fk,function(r,n,o,s){t.push(o?s.replace(gk,"$1"):n||r)}),t});function bk(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var mp=Sr?Sr.prototype:void 0,fp=mp?mp.toString:void 0;function Vg(e){if(typeof e=="string")return e;if(Wt(e))return bk(e,Vg)+"";if(li(e))return fp?fp.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function kg(e){return e==null?"":Vg(e)}function jg(e,t){return Wt(e)?e:mu(e,t)?[e]:yk(kg(e))}function Si(e){if(typeof e=="string"||li(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function $g(e,t){t=jg(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Si(t[r++])];return r&&r==n?e:void 0}function xk(e,t,r){var n=e==null?void 0:$g(e,t);return n===void 0?r:n}function vk(e,t){return e!=null&&t in Object(e)}function Sk(e,t,r){t=jg(t,e);for(var n=-1,o=t.length,s=!1;++n<o;){var a=Si(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=o?s:(o=e==null?0:e.length,!!o&&hu(o)&&Pg(a,o)&&(Wt(e)||Og(e)))}function wk(e,t){return e!=null&&Sk(e,t,vk)}var Ck=1,Ok=2;function Tk(e,t){return mu(e)&&_g(t)?Mg(Si(e),t):function(r){var n=xk(r,e);return n===void 0&&n===t?wk(r,e):vi(t,n,Ck|Ok)}}function Pk(e){return e}function Ak(e){return function(t){return t==null?void 0:t[e]}}function Rk(e){return function(t){return $g(t,e)}}function Ek(e){return mu(e)?Ak(Si(e)):Rk(e)}function Ik(e){return typeof e=="function"?e:e==null?Pk:typeof e=="object"?Wt(e)?Tk(e[0],e[1]):ck(e):Ek(e)}function _k(e,t){return function(r,n){var o=Wt(r)?X3:ok,s={};return o(r,e,Ik(n),s)}}var Ms=_k(function(e,t,r){Q3(e,r,t)}),Mk=0;function Vk(e){var t=++Mk;return kg(e)+t}const Zl=[{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}],kk=[{id:"continuous"},...Zl],jk=["coordsys","tool"];class wi{constructor(t,r,n,o){var s,a;this.jogger=t,this.motionGroupSpec=r,this.coordSystems=n,this.tcps=o,this.selectedTabId="cartesian",this.activationState="inactive",this.activationError=null,this.activationCounter=0,this.locks=new Set,this.selectedCoordSystemId="world",this.selectedTcpId="",this.selectedOrientation="coordsys",this.selectedIncrementId="continuous",this.selectedCartesianMotionType="translate",this.incrementJogInProgress=null,this.translationVelocityMmPerSec=10,this.rotationVelocityDegPerSec=1,this.minTranslationVelocityMmPerSec=5,this.maxTranslationVelocityMmPerSec=250,this.minRotationVelocityDegPerSec=1,this.maxRotationVelocityDegPerSec=60,this.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=((s=n[0])==null?void 0:s.coordinate_system)||"world",this.selectedTcpId=((a=o[0])==null?void 0:a.id)||"",$e.makeAutoObservable(this,{},{autoBind:!0}),this.loadFromLocalStorage(),this.disposers.push($e.autorun(()=>this.saveToLocalStorage())),window.joggingStore=this}static async loadFor(t){const{nova:r}=t,[n,{coordinatesystems:o},{tcps:s}]=await Promise.all([r.api.motionGroupInfos.getMotionGroupSpecification(t.motionGroupId),r.api.coordinateSystems.listCoordinateSystems("ROTATION_VECTOR"),r.api.motionGroupInfos.listTcps(t.motionGroupId,"ROTATION_VECTOR")]);return new wi(t,n,o||[],s||[])}dispose(){for(const t of this.disposers)t();this.jogger.dispose()}get coordSystemCountByName(){return rc.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=Lr.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 kk}get discreteIncrementOptions(){return Zl}get incrementOptionsById(){return Ms(this.incrementOptions,t=>t.id)}get tabsById(){return Ms(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 Ms(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 Ms(this.tcps,t=>t.id)}get activeDiscreteIncrement(){return this.selectedOrientation==="tool"?void 0:Zl.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=Vk();this.lock(r);try{return await t()}finally{this.unlock(r)}}}const $k=ye.observer(({store:e})=>{var o;const{t}=we.useTranslation(),r=[];function n(s){switch(s){case"coordsys":return t("Jogging.Orientation.coordsys");case"tool":return t("Jogging.Orientation.tool");default:return s}}return e.showCoordSystemSelect&&r.push(g.jsx(_s,{labelId:"jogging-coord-select",labelValue:t("Jogging.CoordinateSystem.hlb"),value:e.selectedCoordSystemId,size:"small",variant:"filled",displayEmpty:!0,onChange:s=>e.setSelectedCoordSystemId(s.target.value),disabled:e.isLocked,children:e.coordSystems.map(s=>g.jsx(R.MenuItem,{value:s.coordinate_system,children:s.name&&e.coordSystemCountByName[s.name]>1?`${s.name} / ${s.coordinate_system}`:s.name||s.coordinate_system},s.coordinate_system))},"coord")),e.showTcpSelect&&r.push(g.jsx(_s,{labelId:"jogging-tcp-select",labelValue:"TCP",value:e.selectedTcpId,size:"small",variant:"filled",onChange:s=>e.setSelectedTcpId(s.target.value),disabled:e.isLocked,children:e.tcps.map(s=>g.jsx(R.MenuItem,{value:s.id,children:s.id},s.id))},"tcp")),e.showOrientationSelect&&r.push(g.jsx(_s,{labelValue:t("Jogging.Cartesian.Orientation.lb"),id:"orientation-select",labelId:"orientation-select",value:e.selectedOrientation,onChange:s=>e.setSelectedOrientation(s.target.value),disabled:e.isLocked,children:jk.map(s=>g.jsx(R.MenuItem,{value:s,children:n(s)},s))},"orientation")),e.showIncrementSelect&&r.push(g.jsxs(_s,{labelValue:t("Jogging.Increment.hlb"),labelId:"jogging-increment-select",size:"small",variant:"filled",value:((o=e.activeDiscreteIncrement)==null?void 0:o.id)||"continuous",onChange:s=>e.setSelectedIncrementId(s.target.value),disabled:e.isLocked,children:[g.jsx(R.MenuItem,{value:"continuous",children:t("Jogging.Increment.Continuous.dd")},"continuous"),e.selectedOrientation==="tool"?null:e.discreteIncrementOptions.map(s=>g.jsx(R.MenuItem,{value:s.id,children:e.currentMotionType==="translate"?`${s.mm}mm`:`${s.degrees}°`},s.id))]},"increment")),g.jsx(R.Box,{component:"div",sx:{display:"grid",gap:"16px",gridTemplateColumns:"1fr 1fr",gridAutoRows:"min-content","& label":{opacity:.7,fontSize:"12px",marginBottom:"4px"}},children:r.map((s,a)=>g.jsx(R.Box,{sx:{gridColumn:r.length%2===1&&a===r.length-1?"span 2":"auto"},children:s},a))})}),Dk=R.styled(R.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 gp(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function Uk(e){return typeof e=="string"}function Lk(e,t,r){return e===void 0||Uk(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function zs(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 yp(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 Bk(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:s}=e;if(!t){const p=nt(r==null?void 0:r.className,s,o==null?void 0:o.className,n==null?void 0:n.className),f={...r==null?void 0:r.style,...o==null?void 0:o.style,...n==null?void 0:n.style},m={...r,...o,...n};return p.length>0&&(m.className=p),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:void 0}}const a=zs({...o,...n}),i=yp(n),l=yp(o),c=t(a),u=nt(c==null?void 0:c.className,r==null?void 0:r.className,s,o==null?void 0:o.className,n==null?void 0:n.className),d={...c==null?void 0:c.style,...r==null?void 0:r.style,...o==null?void 0:o.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 Fk(e,t,r){return typeof e=="function"?e(t,r):e}function mr(e){var d;const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:o=!1,...s}=e,a=o?{}:Fk(r,n),{props:i,internalRef:l}=Bk({...s,externalSlotProps:a}),c=ja(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return Lk(t,{...i,ref:c},n)}function bp(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!window.navigator.userAgent.includes("jsdom")&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
159
|
+
`))}return!1}const Nk={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function zk(e,t,r=(n,o)=>n===o){return e.length===t.length&&e.every((n,o)=>r(n,t[o]))}const Gk=2;function vn(e,t,r,n,o){return r===1?Math.min(e+t,o):Math.max(e-t,n)}function Dg(e,t){return e-t}function xp(e,t){const{index:r}=e.reduce((n,o,s)=>{const a=Math.abs(t-o);return n===null||a<n.distance||a===n.distance?{distance:a,index:s}:n},null)??{};return r}function Vs(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const o=r.changedTouches[n];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Sa(e,t,r){return(e-t)*100/(r-t)}function Hk(e,t,r){return(r-t)*e+t}function qk(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 Wk(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(qk(t)))}function vp({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(Dg)}function ks({sliderRef:e,activeIndex:t,setActive:r}){var o,s,a;const n=bo(e.current);(!((o=e.current)!=null&&o.contains(n.activeElement))||Number((s=n==null?void 0:n.activeElement)==null?void 0:s.getAttribute("data-index"))!==t)&&((a=e.current)==null||a.querySelector(`[type="range"][data-index="${t}"]`).focus()),r&&r(t)}function js(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?zk(e,t):!1}const Jk={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}%`})}},Yk=e=>e;let $s;function Sp(){return $s===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?$s=CSS.supports("touch-action","none"):$s=!0),$s}function Kk(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:o=!1,isRtl:s=!1,marks:a=!1,max:i=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:h="horizontal",rootRef:p,scale:f=Yk,step:m=1,shiftStep:y=10,tabIndex:b,value:C}=e,w=F.useRef(void 0),[T,A]=F.useState(-1),[O,P]=F.useState(-1),[E,_]=F.useState(!1),x=F.useRef(0),N=F.useRef(null),[M,H]=cP({controlled:C,default:r??l,name:"Slider"}),z=u&&((K,ee,ae)=>{const ge=K.nativeEvent||K,Pe=new ge.constructor(ge.type,ge);Object.defineProperty(Pe,"target",{writable:!0,value:{value:ee,name:c}}),N.current=ee,u(Pe,ee,ae)}),ne=Array.isArray(M);let re=ne?M.slice().sort(Dg):[M];re=re.map(K=>K==null?l:Sn(K,l,i));const he=a===!0&&m!==null?[...Array(Math.floor((i-l)/m)+1)].map((K,ee)=>({value:l+m*ee})):a||[],te=he.map(K=>K.value),[me,W]=F.useState(-1),Z=F.useRef(null),pe=ja(p,Z),Ee=K=>ee=>{var ge;const ae=Number(ee.currentTarget.getAttribute("data-index"));bp(ee.target)&&W(ae),P(ae),(ge=K==null?void 0:K.onFocus)==null||ge.call(K,ee)},qe=K=>ee=>{var ae;bp(ee.target)||W(-1),P(-1),(ae=K==null?void 0:K.onBlur)==null||ae.call(K,ee)},Te=(K,ee)=>{const ae=Number(K.currentTarget.getAttribute("data-index")),ge=re[ae],Pe=te.indexOf(ge);let ie=ee;if(he&&m==null){const Je=te[te.length-1];ie>=Je?ie=Je:ie<=te[0]?ie=te[0]:ie=ie<ge?te[Pe-1]:te[Pe+1]}if(ie=Sn(ie,l,i),ne){o&&(ie=Sn(ie,re[ae-1]||-1/0,re[ae+1]||1/0));const Je=ie;ie=vp({values:re,newValue:ie,index:ae});let tt=ae;o||(tt=ie.indexOf(Je)),ks({sliderRef:Z,activeIndex:tt})}H(ie),W(ae),z&&!js(ie,M)&&z(K,ie,ae),d&&d(K,N.current??ie)},ht=K=>ee=>{var ae;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(ee.key)){ee.preventDefault();const ge=Number(ee.currentTarget.getAttribute("data-index")),Pe=re[ge];let ie=null;if(m!=null){const Je=ee.shiftKey?y:m;switch(ee.key){case"ArrowUp":ie=vn(Pe,Je,1,l,i);break;case"ArrowRight":ie=vn(Pe,Je,s?-1:1,l,i);break;case"ArrowDown":ie=vn(Pe,Je,-1,l,i);break;case"ArrowLeft":ie=vn(Pe,Je,s?1:-1,l,i);break;case"PageUp":ie=vn(Pe,y,1,l,i);break;case"PageDown":ie=vn(Pe,y,-1,l,i);break;case"Home":ie=l;break;case"End":ie=i;break}}else if(he){const Je=te[te.length-1],tt=te.indexOf(Pe),Ne=[s?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],vt=[s?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];Ne.includes(ee.key)?tt===0?ie=te[0]:ie=te[tt-1]:vt.includes(ee.key)&&(tt===te.length-1?ie=Je:ie=te[tt+1])}ie!=null&&Te(ee,ie)}(ae=K==null?void 0:K.onKeyDown)==null||ae.call(K,ee)};kt(()=>{var K;n&&Z.current.contains(document.activeElement)&&((K=document.activeElement)==null||K.blur())},[n]),n&&T!==-1&&A(-1),n&&me!==-1&&W(-1);const at=K=>ee=>{var ae;(ae=K.onChange)==null||ae.call(K,ee),Te(ee,ee.target.valueAsNumber)},xe=F.useRef(void 0);let X=h;s&&h==="horizontal"&&(X+="-reverse");const se=({finger:K,move:ee=!1})=>{const{current:ae}=Z,{width:ge,height:Pe,bottom:ie,left:Je}=ae.getBoundingClientRect();let tt;X.startsWith("vertical")?tt=(ie-K.y)/Pe:tt=(K.x-Je)/ge,X.includes("-reverse")&&(tt=1-tt);let Ne;if(Ne=Hk(tt,l,i),m)Ne=Wk(Ne,m,l);else{const Yn=xp(te,Ne);Ne=te[Yn]}Ne=Sn(Ne,l,i);let vt=0;if(ne){ee?vt=xe.current:vt=xp(re,Ne),o&&(Ne=Sn(Ne,re[vt-1]||-1/0,re[vt+1]||1/0));const Yn=Ne;Ne=vp({values:re,newValue:Ne,index:vt}),o&&ee||(vt=Ne.indexOf(Yn),xe.current=vt)}return{newValue:Ne,activeIndex:vt}},le=yt(K=>{const ee=Vs(K,w);if(!ee)return;if(x.current+=1,K.type==="mousemove"&&K.buttons===0){Y(K);return}const{newValue:ae,activeIndex:ge}=se({finger:ee,move:!0});ks({sliderRef:Z,activeIndex:ge,setActive:A}),H(ae),!E&&x.current>Gk&&_(!0),z&&!js(ae,M)&&z(K,ae,ge)}),Y=yt(K=>{const ee=Vs(K,w);if(_(!1),!ee)return;const{newValue:ae}=se({finger:ee,move:!0});A(-1),K.type==="touchend"&&P(-1),d&&d(K,N.current??ae),w.current=void 0,fe()}),ve=yt(K=>{if(n)return;Sp()||K.preventDefault();const ee=K.changedTouches[0];ee!=null&&(w.current=ee.identifier);const ae=Vs(K,w);if(ae!==!1){const{newValue:Pe,activeIndex:ie}=se({finger:ae});ks({sliderRef:Z,activeIndex:ie,setActive:A}),H(Pe),z&&!js(Pe,M)&&z(K,Pe,ie)}x.current=0;const ge=bo(Z.current);ge.addEventListener("touchmove",le,{passive:!0}),ge.addEventListener("touchend",Y,{passive:!0})}),fe=F.useCallback(()=>{const K=bo(Z.current);K.removeEventListener("mousemove",le),K.removeEventListener("mouseup",Y),K.removeEventListener("touchmove",le),K.removeEventListener("touchend",Y)},[Y,le]);F.useEffect(()=>{const{current:K}=Z;return K.addEventListener("touchstart",ve,{passive:Sp()}),()=>{K.removeEventListener("touchstart",ve),fe()}},[fe,ve]),F.useEffect(()=>{n&&fe()},[n,fe]);const Ke=K=>ee=>{var Pe;if((Pe=K.onMouseDown)==null||Pe.call(K,ee),n||ee.defaultPrevented||ee.button!==0)return;ee.preventDefault();const ae=Vs(ee,w);if(ae!==!1){const{newValue:ie,activeIndex:Je}=se({finger:ae});ks({sliderRef:Z,activeIndex:Je,setActive:A}),H(ie),z&&!js(ie,M)&&z(ee,ie,Je)}x.current=0;const ge=bo(Z.current);ge.addEventListener("mousemove",le,{passive:!0}),ge.addEventListener("mouseup",Y)},We=Sa(ne?re[0]:l,l,i),je=Sa(re[re.length-1],l,i)-We,ur=(K={})=>{const ee=zs(K),ae={onMouseDown:Ke(ee||{})},ge={...ee,...ae};return{...K,ref:pe,...ge}},Xo=K=>ee=>{var ge;(ge=K.onMouseOver)==null||ge.call(K,ee);const ae=Number(ee.currentTarget.getAttribute("data-index"));P(ae)},Zo=K=>ee=>{var ae;(ae=K.onMouseLeave)==null||ae.call(K,ee),P(-1)},es=(K={})=>{const ee=zs(K),ae={onMouseOver:Xo(ee||{}),onMouseLeave:Zo(ee||{})};return{...K,...ee,...ae}},ts=K=>({pointerEvents:T!==-1&&T!==K?"none":void 0});let on;return h==="vertical"&&(on=s?"vertical-rl":"vertical-lr"),{active:T,axis:X,axisProps:Jk,dragging:E,focusedThumbIndex:me,getHiddenInputProps:(K={})=>{const ee=zs(K),ae={onChange:at(ee||{}),onFocus:Ee(ee||{}),onBlur:qe(ee||{}),onKeyDown:ht(ee||{})},ge={...ee,...ae};return{tabIndex:b,"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,...ge,style:{...Nk,direction:s?"rtl":"ltr",width:"100%",height:"100%",writingMode:on}}},getRootProps:ur,getThumbProps:es,marks:he,open:O,range:ne,rootRef:pe,trackLeap:je,trackOffset:We,values:re,getThumbStyle:ts}}function Gs(e){return typeof e=="string"}const Qk=e=>!e||!Gs(e);function Xk(e){return typeof e.main=="string"}function Zk(e,t=[]){if(!Xk(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function gu(e=[]){return([,t])=>t&&Zk(t,e)}function ej(e){return Yr("MuiSlider",e)}const Ot=Va("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"]),tj=e=>{const{open:t}=e;return{offset:nt(t&&Ot.valueLabelOpen),circle:Ot.valueLabelCircle,label:Ot.valueLabelLabel}};function Ug(e){const{children:t,className:r,value:n}=e,o=tj(e);return t?F.cloneElement(t,{className:t.props.className},g.jsxs(F.Fragment,{children:[t.props.children,g.jsx("span",{className:nt(o.offset,r),"aria-hidden":!0,children:g.jsx("span",{className:o.circle,children:g.jsx("span",{className:o.label,children:n})})})]})):null}process.env.NODE_ENV!=="production"&&(Ug.propTypes={children:v.element.isRequired,className:v.string,value:v.node});function wp(e){return e}const rj=xt("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${rt(r.color)}`],r.size!=="medium"&&t[`size${rt(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(Zr(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Ot.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Ot.dragging}`]:{[`& .${Ot.thumb}, & .${Ot.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(gu()).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}}]}))),nj=xt("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}}]}),oj=xt("span",{name:"MuiSlider",slot:"Track"})(Zr(({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(gu()).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:Co(e.palette[t].main,.62),borderColor:Co(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:wo(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:wo(e.palette[t].main,.5)})}}}))]}))),sj=xt("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${rt(r.color)}`],r.size!=="medium"&&t[`thumbSize${rt(r.size)}`]]}})(Zr(({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%)"},[`&.${Ot.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(gu()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${Ot.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${yl(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${Ot.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${yl(e.palette[t].main,.16)}`}}}}))]}))),Lg=xt(Ug,{name:"MuiSlider",slot:"ValueLabel"})(Zr(({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%"},[`&.${Ot.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%"},[`&.${Ot.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"&&(Lg.propTypes={children:v.element.isRequired,index:v.number.isRequired,open:v.bool.isRequired,value:v.node});const aj=xt("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>cc(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(Zr(({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}}]}))),ij=xt("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>cc(e)&&e!=="markLabelActive"})(Zr(({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}}]}))),lj=e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:s,classes:a,color:i,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",o==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",i&&`color${rt(i)}`,l&&`size${rt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${rt(l)}`,i&&`thumbColor${rt(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Lo(c,ej,a)},cj=({children:e})=>e,Bg=F.forwardRef(function(t,r){const n=iu({props:t,name:"MuiSlider"}),o=ub(),{"aria-label":s,"aria-valuetext":a,"aria-labelledby":i,component:l="span",components:c={},componentsProps:u={},color:d="primary",classes:h,className:p,disableSwap:f=!1,disabled:m=!1,getAriaLabel:y,getAriaValueText:b,marks:C=!1,max:w=100,min:T=0,name:A,onChange:O,onChangeCommitted:P,orientation:E="horizontal",shiftStep:_=10,size:x="medium",step:N=1,scale:M=wp,slotProps:H,slots:z,tabIndex:ne,track:re="normal",value:he,valueLabelDisplay:te="off",valueLabelFormat:me=wp,...W}=n,Z={...n,isRtl:o,max:w,min:T,classes:h,disabled:m,disableSwap:f,orientation:E,marks:C,color:d,size:x,step:N,shiftStep:_,scale:M,track:re,valueLabelDisplay:te,valueLabelFormat:me},{axisProps:pe,getRootProps:Ee,getHiddenInputProps:qe,getThumbProps:Te,open:ht,active:at,axis:xe,focusedThumbIndex:X,range:se,dragging:le,marks:Y,values:ve,trackOffset:fe,trackLeap:Ke,getThumbStyle:We}=Kk({...Z,rootRef:r});Z.marked=Y.length>0&&Y.some(Be=>Be.label),Z.dragging=le,Z.focusedThumbIndex=X;const je=lj(Z),ur=(z==null?void 0:z.root)??c.Root??rj,Xo=(z==null?void 0:z.rail)??c.Rail??nj,Zo=(z==null?void 0:z.track)??c.Track??oj,es=(z==null?void 0:z.thumb)??c.Thumb??sj,ts=(z==null?void 0:z.valueLabel)??c.ValueLabel??Lg,on=(z==null?void 0:z.mark)??c.Mark??aj,rs=(z==null?void 0:z.markLabel)??c.MarkLabel??ij,K=(z==null?void 0:z.input)??c.Input??"input",ee=(H==null?void 0:H.root)??u.root,ae=(H==null?void 0:H.rail)??u.rail,ge=(H==null?void 0:H.track)??u.track,Pe=(H==null?void 0:H.thumb)??u.thumb,ie=(H==null?void 0:H.valueLabel)??u.valueLabel,Je=(H==null?void 0:H.mark)??u.mark,tt=(H==null?void 0:H.markLabel)??u.markLabel,Ne=(H==null?void 0:H.input)??u.input,vt=mr({elementType:ur,getSlotProps:Ee,externalSlotProps:ee,externalForwardedProps:W,additionalProps:{...Qk(ur)&&{as:l}},ownerState:{...Z,...ee==null?void 0:ee.ownerState},className:[je.root,p]}),Yn=mr({elementType:Xo,externalSlotProps:ae,ownerState:Z,className:je.rail}),ey=mr({elementType:Zo,externalSlotProps:ge,additionalProps:{style:{...pe[xe].offset(fe),...pe[xe].leap(Ke)}},ownerState:{...Z,...ge==null?void 0:ge.ownerState},className:je.track}),Ci=mr({elementType:es,getSlotProps:Te,externalSlotProps:Pe,ownerState:{...Z,...Pe==null?void 0:Pe.ownerState},className:je.thumb}),ty=mr({elementType:ts,externalSlotProps:ie,ownerState:{...Z,...ie==null?void 0:ie.ownerState},className:je.valueLabel}),Oi=mr({elementType:on,externalSlotProps:Je,ownerState:Z,className:je.mark}),Ti=mr({elementType:rs,externalSlotProps:tt,ownerState:Z,className:je.markLabel}),ry=mr({elementType:K,getSlotProps:qe,externalSlotProps:Ne,ownerState:Z});return g.jsxs(ur,{...vt,children:[g.jsx(Xo,{...Yn}),g.jsx(Zo,{...ey}),Y.filter(Be=>Be.value>=T&&Be.value<=w).map((Be,Qe)=>{const Pi=Sa(Be.value,T,w),ns=pe[xe].offset(Pi);let Kt;return re===!1?Kt=ve.includes(Be.value):Kt=re==="normal"&&(se?Be.value>=ve[0]&&Be.value<=ve[ve.length-1]:Be.value<=ve[0])||re==="inverted"&&(se?Be.value<=ve[0]||Be.value>=ve[ve.length-1]:Be.value>=ve[0]),g.jsxs(F.Fragment,{children:[g.jsx(on,{"data-index":Qe,...Oi,...!Gs(on)&&{markActive:Kt},style:{...ns,...Oi.style},className:nt(Oi.className,Kt&&je.markActive)}),Be.label!=null?g.jsx(rs,{"aria-hidden":!0,"data-index":Qe,...Ti,...!Gs(rs)&&{markLabelActive:Kt},style:{...ns,...Ti.style},className:nt(je.markLabel,Ti.className,Kt&&je.markLabelActive),children:Be.label}):null]},Qe)}),ve.map((Be,Qe)=>{const Pi=Sa(Be,T,w),ns=pe[xe].offset(Pi),Kt=te==="off"?cj:ts;return g.jsx(Kt,{...!Gs(Kt)&&{valueLabelFormat:me,valueLabelDisplay:te,value:typeof me=="function"?me(M(Be),Qe):me,index:Qe,open:ht===Qe||at===Qe||te==="on",disabled:m},...ty,children:g.jsx(es,{"data-index":Qe,...Ci,className:nt(je.thumb,Ci.className,at===Qe&&je.active,X===Qe&&je.focusVisible),style:{...ns,...We(Qe),...Ci.style},children:g.jsx(K,{"data-index":Qe,"aria-label":y?y(Qe):s,"aria-valuenow":M(Be),"aria-labelledby":i,"aria-valuetext":b?b(M(Be),Qe):a,value:ve[Qe],...ry})})},Qe)})]})});process.env.NODE_ENV!=="production"&&(Bg.propTypes={"aria-label":gp(v.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":v.string,"aria-valuetext":gp(v.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:v.node,classes:v.object,className:v.string,color:v.oneOfType([v.oneOf(["primary","secondary","error","info","success","warning"]),v.string]),components:v.shape({Input:v.elementType,Mark:v.elementType,MarkLabel:v.elementType,Rail:v.elementType,Root:v.elementType,Thumb:v.elementType,Track:v.elementType,ValueLabel:v.elementType}),componentsProps:v.shape({input:v.oneOfType([v.func,v.object]),mark:v.oneOfType([v.func,v.object]),markLabel:v.oneOfType([v.func,v.object]),rail:v.oneOfType([v.func,v.object]),root:v.oneOfType([v.func,v.object]),thumb:v.oneOfType([v.func,v.object]),track:v.oneOfType([v.func,v.object]),valueLabel:v.oneOfType([v.func,v.shape({children:v.element,className:v.string,open:v.bool,style:v.object,value:v.node,valueLabelDisplay:v.oneOf(["auto","off","on"])})])}),defaultValue:v.oneOfType([v.arrayOf(v.number),v.number]),disabled:v.bool,disableSwap:v.bool,getAriaLabel:v.func,getAriaValueText:v.func,marks:v.oneOfType([v.arrayOf(v.shape({label:v.node,value:v.number.isRequired})),v.bool]),max:v.number,min:v.number,name:v.string,onChange:v.func,onChangeCommitted:v.func,orientation:v.oneOf(["horizontal","vertical"]),scale:v.func,shiftStep:v.number,size:v.oneOfType([v.oneOf(["small","medium"]),v.string]),slotProps:v.shape({input:v.oneOfType([v.func,v.object]),mark:v.oneOfType([v.func,v.object]),markLabel:v.oneOfType([v.func,v.object]),rail:v.oneOfType([v.func,v.object]),root:v.oneOfType([v.func,v.object]),thumb:v.oneOfType([v.func,v.object]),track:v.oneOfType([v.func,v.object]),valueLabel:v.oneOfType([v.func,v.shape({children:v.element,className:v.string,open:v.bool,style:v.object,value:v.node,valueLabelDisplay:v.oneOf(["auto","off","on"])})])}),slots:v.shape({input:v.elementType,mark:v.elementType,markLabel:v.elementType,rail:v.elementType,root:v.elementType,thumb:v.elementType,track:v.elementType,valueLabel:v.elementType}),step:v.number,sx:v.oneOfType([v.arrayOf(v.oneOfType([v.func,v.object,v.bool])),v.func,v.object]),tabIndex:v.number,track:v.oneOf(["inverted","normal",!1]),value:v.oneOfType([v.arrayOf(v.number),v.number]),valueLabelDisplay:v.oneOf(["auto","off","on"]),valueLabelFormat:v.oneOfType([v.func,v.string])});var uj="[object Number]";function dj(e){return typeof e=="number"||qr(e)&&en(e)==uj}const Fg=ye.observer(e=>{var s,a,i;const t=R.useTheme(),{store:r}=e,{t:n}=we.useTranslation();function o(l,c){c===e.velocity||!dj(c)||e.onVelocityChange(c)}return g.jsxs(R.Stack,{direction:"row",gap:2,alignItems:"center",children:[r.showVelocityLegend&&g.jsx(R.Typography,{sx:{color:(i=(a=(s=t.componentsExt)==null?void 0:s.JoggingPanel)==null?void 0:a.VelocitySlider)==null?void 0:i.sliderLegendColor,fontSize:"14px"},children:n("Jogging.Velocity.bt")}),g.jsx(Bg,{value:e.velocity,color:"secondary",onChange:o,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(yu,{value:e.velocity.toString()}))]})});function yu({value:e,sx:t}){var n;const r=R.useTheme();return g.jsx(R.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(R.Typography,{component:"span",sx:{textAlign:"right",fontSize:"14px",opacity:.8,color:r.palette.text.primary,whiteSpace:"nowrap"},children:e})})}const Ng=ye.observer(({store:e})=>{const{t}=we.useTranslation(),r=ye.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(Fg,{store:e,velocity:e.velocityInDisplayUnits,min:e.minVelocityInDisplayUnits,max:e.maxVelocityInDisplayUnits,onVelocityChange:e.setVelocityFromSlider,disabled:e.isLocked,renderValue:n=>g.jsx(yu,{value:r.valueLabelFormat(n),sx:{minWidth:"111px",span:{transform:"translateY(-1.5px)"}}})})}),hj=ye.observer(({store:e,children:t})=>{const{t:r}=we.useTranslation(),n=R.useTheme();function o(h,p){(p==="translate"||p==="rotate")&&e.setSelectedCartesianMotionType(p)}Tf(()=>[e.selectedCoordSystemId,e.selectedTcpId],()=>{e.jogger.motionStream.motionStateSocket.changeUrl(e.jogger.nova.makeWebsocketURL(`/motion-groups/${e.jogger.motionGroupId}/state-stream?tcp=${e.selectedTcpId}&response_coordinate_system=${e.selectedCoordSystemId}`))},{fireImmediately:!0});async function s(h,p){const f=await e.activate(),m=f.motionStream.rapidlyChangingMotionState.tcp_pose,y=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:y,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:Lr.degreesToRadians(p.degrees)}})}finally{e.setCurrentIncrementJog(null),await e.deactivate()}})}async function a(h){if(!e.isLocked){if(await e.activate(),e.activeDiscreteIncrement)return s(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 y,b,C;const m=(C=(b=(y=f.componentsExt)==null?void 0:y.JoggingPanel)==null?void 0:b.JoggingCartesian)==null?void 0:C.Axis;if(m)return p==="translate"?m[h]:m.CustomRotation??m[h]}const c=[{id:"x",icon:g.jsx(mV,{}),colors:l("X",e.selectedCartesianMotionType,n)},{id:"y",icon:g.jsx(gV,{}),colors:l("Y",e.selectedCartesianMotionType,n)},{id:"z",icon:g.jsx(bV,{}),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:Lr.radiansToDegrees(h).toFixed(1)})}return g.jsxs(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsxs(R.Stack,{gap:2,children:[g.jsx($k,{store:e}),g.jsx(Ng,{store:e}),g.jsx(R.Divider,{})]}),g.jsx(R.Stack,{marginLeft:"auto",marginRight:"auto",gap:"24px",justifyContent:"center",sx:{flexGrow:"1"},children:g.jsxs(R.Stack,{alignItems:"center",justifyContent:"center",gap:"24px",sx:{flexGrow:1},children:[g.jsxs(Dk,{value:e.selectedCartesianMotionType,onChange:o,exclusive:!0,"aria-label":r("Jogging.Cartesian.MotionType.lb"),sx:{justifyContent:"center"},children:[g.jsx(R.ToggleButton,{value:"translate",children:r("Jogging.Cartesian.Translation.bt")}),g.jsx(R.ToggleButton,{value:"rotate",children:r("Jogging.Cartesian.Rotation.bt")})]}),e.selectedCartesianMotionType==="translate"&&c.map(h=>{var p,f;return g.jsx(Ml,{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(R.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=>a({axis:h.id,motionType:"translate",direction:m}),stopJogging:i},h.id)}),e.selectedCartesianMotionType==="rotate"&&c.map(h=>{var p,f;return g.jsx(Ml,{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(vV,{}),g.jsx(R.Typography,{sx:{fontSize:"24px",color:((f=h.colors)==null?void 0:f.labelColor)??n.palette.text.primary},children:h.id.toUpperCase()})]}),getDisplayedValue:()=>{var m,y;return d(((y=(m=e.jogger.motionStream.rapidlyChangingMotionState.tcp_pose)==null?void 0:m.orientation)==null?void 0:y[h.id])||0)},startJogging:m=>a({axis:h.id,motionType:"rotate",direction:m}),stopJogging:i},h.id)})]})}),g.jsx(Ig,{store:e}),t&&g.jsx(R.Divider,{}),t]})}),pj=ye.observer(({store:e,children:t})=>{const r=R.useTheme();async function n(s){await e.activate(),await e.jogger.startJointRotation({joint:s.joint,direction:s.direction,velocityRadsPerSec:e.rotationVelocityRadsPerSec})}async function o(){await e.jogger.stop(),await e.deactivate()}return g.jsxs(R.Stack,{flexGrow:1,gap:2,sx:{padding:"18px 24px"},children:[g.jsx(Ng,{store:e}),g.jsx(R.Divider,{}),g.jsx(R.Stack,{justifyContent:"center",alignItems:"stretch",sx:{flexGrow:"1"},id:"JointControls",children:g.jsx(R.Stack,{alignItems:"center",gap:"24px",children:e.jogger.motionStream.joints.map(s=>{var c;const a=(c=e.motionGroupSpec.mechanical_joint_limits)==null?void 0:c[s.index],i=(a==null?void 0:a.lower_limit)!==void 0?Lr.radiansToDegrees(a.lower_limit):void 0,l=(a==null?void 0:a.upper_limit)!==void 0?Lr.radiansToDegrees(a.upper_limit):void 0;return g.jsxs(R.Stack,{direction:"row",alignItems:"center",justifyContent:"center",spacing:1.5,width:"100%",children:[e.showJointsLegend&&g.jsx(R.Typography,{color:e.isLocked?r.palette.text.disabled:r.palette.text.secondary,children:`G${s.index+1}`}),g.jsx(Rf,{disabled:e.isLocked,lowerLimitDegs:i,upperLimitDegs:l,getValueDegs:()=>{const u=e.jogger.motionStream.rapidlyChangingMotionState.state.joint_position.joints[s.index];return u!==void 0?Lr.radiansToDegrees(u):void 0},startJogging:u=>n({joint:s.index,direction:u}),stopJogging:o})]},`joint-${s.index}`)})})}),g.jsx(Ig,{store:e}),t&&g.jsx(R.Divider,{}),t]})}),mj=Fe(ye.observer(e=>{const t=rc.isString(e.nova)?new cV({instanceUrl:e.nova}):e.nova,r=ye.useLocalObservable(()=>({joggingStore:null,loadingError:null}));async function n(){$e.runInAction(()=>{r.loadingError=null,r.joggingStore=null});try{let o=e.store;if(!o){const s=await t.connectJogger(e.motionGroupId);o=await wi.loadFor(s)}$e.runInAction(()=>{r.joggingStore=o}),e.onSetup&&e.onSetup(o)}catch(o){r.loadingError=o}}return G.useEffect(()=>(n(),e.store?()=>null:()=>{var o;(o=r.joggingStore)==null||o.dispose()}),[e.store,e.nova,e.motionGroupId]),G.useEffect(()=>{const o=r.joggingStore;o&&(e.locked?o.lock("external"):o.unlock("external"))},[r.joggingStore,e.locked]),g.jsx(R.Stack,{sx:{maxWidth:"460px",minWidth:"320px",position:"relative",...e.sx},children:r.joggingStore?g.jsx(fj,{store:r.joggingStore,children:e.children}):g.jsx(du,{message:"Loading jogging",error:r.loadingError})})})),fj=ye.observer(({store:e,children:t})=>{const{t:r}=we.useTranslation();function n(){if(e.currentTab.id==="cartesian")return g.jsx(g.Fragment,{children:g.jsx(hj,{store:e,children:t})});if(e.currentTab.id==="joint")return g.jsx(g.Fragment,{children:g.jsx(pj,{store:e,children:t})})}return g.jsxs(R.Stack,{flexGrow:1,sx:{overflow:"hidden"},children:[g.jsx(R.Tabs,{value:e.tabIndex,onChange:e.onTabChange,variant:"fullWidth",children:e.tabs.map(o=>{const s=o.label==="cartesian"?r("Jogging.Cartesian.bt"):r("Jogging.Joints.bt"),a=o.label==="cartesian"?g.jsx(NP,{fontSize:"small",sx:{mr:1}}):g.jsx(zP,{fontSize:"small",sx:{mr:1}});return g.jsx(R.Tab,{label:e.showTabIcons?g.jsxs(R.Stack,{direction:"row",alignItems:"center",children:[a,s]}):s,id:`jogging-tab-${o.id}`,"aria-controls":`jogging-tab-${o.id}`},o.id)})}),g.jsx(R.Stack,{flexGrow:1,position:"relative",sx:{overflowY:"auto",overflowX:"hidden"},children:n()})]})}),zg=e=>{var i;const{value:t,ref:r}=e,n=R.useTheme(),[o,s]=G.useState(!1);async function a(){if(!r||!("current"in r))return console.warn("No copy target found"),!1;try{return await navigator.clipboard.writeText(t),console.log("Copied!"),s(!0),!0}catch(l){console.error(l);const c=window.getSelection();if(c&&r&&"current"in r&&r.current){const u=document.createRange();u.selectNodeContents(r.current),c.removeAllRanges(),c.addRange(u)}}return!1}return G.useEffect(()=>{if(!o)return;const l=setTimeout(()=>s(!1),3e3);return()=>{l&&clearTimeout(l)}},[o]),g.jsx(R.Tooltip,{open:o,title:"Copied!",children:g.jsx(R.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:()=>a(),children:g.jsx(R.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})})})},gj=Fe(ye.observer(({tcpPose:e,showCopyButton:t=!1})=>{const[r,n]=G.useState(null),o=Lr.poseToWandelscriptString(e),s=async()=>{try{await navigator.clipboard.writeText(o),n("Copied!"),setTimeout(()=>n(null),2e3)}catch{n("Copy failed"),setTimeout(()=>n(null),2e3)}};return g.jsxs(R.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-cartesian-values",children:[g.jsx(zg,{value:o}),t&&g.jsx(R.Button,{variant:"contained",color:"secondary",size:"small",onClick:s,sx:{flexShrink:0},children:r||"Copy"})]})})),yj=Fe(ye.observer(({joints:e,showCopyButton:t=!1})=>{const[r,n]=G.useState(null),o=`[${e.joints.map(a=>parseFloat(a.toFixed(4))).join(", ")}]`,s=async()=>{try{await navigator.clipboard.writeText(o),n("Copied!"),setTimeout(()=>n(null),2e3)}catch{n("Copy failed"),setTimeout(()=>n(null),2e3)}};return g.jsxs(R.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{flexGrow:1,minWidth:0,overflow:"hidden"},"data-testid":"pose-joint-values",children:[g.jsx(zg,{value:o}),t&&g.jsx(R.Button,{variant:"contained",color:"secondary",size:"small",onClick:s,sx:{flexShrink:0},children:r||"Copy"})]})}));class Gg{constructor(){this.messages=[],this.addMessage=(t,r="info")=>{const n={id:Math.random().toString(36).substring(2,11),timestamp:new Date,message:t,level:r};this.messages.push(n)},this.clearMessages=()=>{this.messages=[]},this.addInfo=t=>{this.addMessage(t,"info")},this.addWarning=t=>{this.addMessage(t,"warning")},this.addError=t=>{this.addMessage(t,"error")},this.addDebug=t=>{this.addMessage(t,"debug")},$e.makeObservable(this,{messages:$e.observable,addMessage:$e.action,clearMessages:$e.action})}}const Qo=(e,t,r)=>({id:r||`${Date.now()}-${Math.random().toString(36).substring(2,11)}`,timestamp:new Date,message:e,level:t}),bj=(e,t)=>Qo(e,"debug",t),xj=(e,t)=>Qo(e,"info",t),vj=(e,t)=>Qo(e,"warning",t),Sj=(e,t)=>Qo(e,"error",t),Hg=Fe(ye.observer(e=>{var u;const{messages:t=[],onClear:r,height:n=400,sx:o}=e,s=R.useTheme(),a=G.useRef(null);G.useEffect(()=>{if(t.length===0)return;const d=a.current;if(!d)return;const h=setTimeout(()=>{d.scrollTop=d.scrollHeight},10);return()=>clearTimeout(h)},[t.length]);const i=d=>d.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),l=d=>{switch(d){case"error":return s.palette.error.main;case"warning":return s.palette.warning.main;case"info":return s.palette.info.main;case"debug":return s.palette.text.disabled;default:return s.palette.text.secondary}},c=({message:d})=>{const[h,p]=G.useState(!1),[f,m]=G.useState(!1),[y,b]=G.useState(!1),C=d.message.length>150,w=async()=>{try{await navigator.clipboard.writeText(d.message),m(!0),setTimeout(()=>m(!1),2e3)}catch(A){console.error("Failed to copy message:",A)}},T=C&&!h?d.message.substring(0,150)+"...":d.message;return g.jsx(R.Box,{onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),sx:{display:"flex",gap:1,fontFamily:"monospace",flexDirection:"column","&:hover":{backgroundColor:s.palette.action.hover},borderRadius:"4px",padding:"2px 4px",margin:"-2px -4px"},children:g.jsxs(R.Box,{sx:{display:"flex",gap:1},children:[g.jsxs(R.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:s.palette.text.disabled,whiteSpace:"nowrap",flexShrink:0},children:["[",i(d.timestamp),"]"]}),g.jsx(R.Typography,{component:"span",sx:{fontWeight:400,fontSize:"12px",lineHeight:"18px",letterSpacing:"0.4px",color:l(d.level),wordBreak:"break-word",overflowWrap:"anywhere",hyphens:"auto",flex:1,whiteSpace:"pre-wrap"},children:T}),g.jsxs(R.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5,opacity:y?1:0,transition:"opacity 0.2s ease-in-out",visibility:y?"visible":"hidden"},children:[g.jsx(R.IconButton,{size:"small",onClick:w,sx:{padding:"2px",color:s.palette.text.secondary,"&:hover":{backgroundColor:s.palette.action.hover}},title:f?"Copied!":"Copy message",children:g.jsx(Zt.ContentCopy,{sx:{fontSize:12}})}),C&&g.jsx(R.IconButton,{size:"small",onClick:()=>p(!h),sx:{padding:"2px",color:s.palette.text.secondary,"&:hover":{backgroundColor:s.palette.action.hover}},title:h?"Collapse":"Expand",children:h?g.jsx(Zt.ExpandLess,{sx:{fontSize:12}}):g.jsx(Zt.ExpandMore,{sx:{fontSize:12}})})]})]})},d.id)};return g.jsxs(R.Paper,{sx:{backgroundColor:((u=s.palette.backgroundPaperElevation)==null?void 0:u[2])||"#171927",backgroundImage:"none",height:n,display:"flex",flexDirection:"column",overflow:"hidden",...o},children:[g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px"},children:[g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(Zt.DescriptionOutlined,{sx:{fontSize:16,color:s.palette.action.active,opacity:.56}}),g.jsx(R.Typography,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"143%",letterSpacing:"0.17px",color:s.palette.text.primary},children:"Log"})]}),g.jsx(R.Button,{onClick:r,variant:"text",sx:{fontWeight:500,fontSize:"13px",lineHeight:"22px",letterSpacing:"0.46px",color:s.palette.primary.main,textTransform:"none",minWidth:"auto",padding:"4px 8px","&:hover":{backgroundColor:s.palette.primary.main+"14"}},children:"Clear"})]}),g.jsx(R.Box,{ref:a,sx:{flex:1,overflow:"auto",padding:"8px 16px",display:"flex",flexDirection:"column",gap:"2px",scrollbarWidth:"thin",scrollbarColor:`${s.palette.divider} transparent`,"&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:s.palette.divider,borderRadius:"3px","&:hover":{backgroundColor:s.palette.divider}}},children:t.length===0?g.jsx(R.Typography,{sx:{color:s.palette.text.disabled,fontSize:"12px",fontStyle:"italic",textAlign:"center",marginTop:2},children:"No log messages"}):t.map(d=>g.jsx(c,{message:d},d.id))})]})})),wj=Fe(ye.observer(e=>{const{store:t,onStoreReady:r,...n}=e,o=G.useRef(r);G.useEffect(()=>{o.current=r},[r]);const s=G.useMemo(()=>{var l;const i=t||new Gg;return(l=o.current)==null||l.call(o,i),i},[t]),a=()=>{s.clearMessages()};return g.jsx(Hg,{...n,messages:s.messages,onClear:a})}));function Cj(){const e=window.location.href;return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function Oj({baseUrl:e=Cj(),...t}){return g.jsxs(R.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(R.DialogTitle,{id:"no-motion-group-modal-title",children:"No motion group found"}),g.jsxs(R.DialogContent,{sx:{marginTop:"3rem",marginBottom:"1.5rem",textAlign:"center"},children:[g.jsx(R.Typography,{color:"#fff",children:"Found no devices to connect to."}),g.jsx(R.Typography,{color:"#fff",children:"Please ensure a motion group has been created."})]}),g.jsx(R.DialogActions,{children:g.jsxs(R.Stack,{width:"100%",maxWidth:"300px",margin:"auto",marginBottom:"2rem",children:[g.jsx(R.Button,{href:`${e}/settings`,variant:"contained",sx:{borderRadius:"8px",width:"100%"},children:"Go to settings app"}),g.jsx(R.Button,{href:`${e}`,variant:"text",sx:{marginTop:"1rem",color:"#fff",textDecoration:"underline",fontSize:"0.75rem"},children:"Back to Homescreen"})]})})]})}var mt=(e=>(e.IDLE="idle",e.PREPARING="preparing",e.STARTING="starting",e.RUNNING="running",e.PAUSING="pausing",e.PAUSED="paused",e.STOPPING="stopping",e.COMPLETED="completed",e.FAILED="failed",e.STOPPED="stopped",e.ERROR="error",e))(mt||{});const Tj=Fe(ye.observer(({state:e,onRun:t,onPause:r,onStop:n,onReset:o,requiresManualReset:s=!1,variant:a="with_pause",className:i})=>{const l=R.useTheme(),{t:c}=we.useTranslation(),u=()=>{const p={run:{enabled:e==="idle"||e==="stopped"||e==="paused"||e==="completed"||e==="failed"||e==="error",label:c(e==="paused"?"ProgramControl.Resume.bt":e==="error"||e==="failed"?"ProgramControl.Retry.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==="preparing"||e==="starting"||e==="running"||e==="pausing"||e==="paused",label:c("ProgramControl.Stop.bt"),color:l.palette.error.main,onClick:n}};return a==="without_pause"?[p.run,p.stop]:[p.run,p.pause,p.stop]},d=p=>{const f={sx:{fontSize:"55px"}};if(a==="without_pause")return p===0?g.jsx(Zt.PlayArrow,{...f}):g.jsx(Zt.Stop,{...f});switch(p){case 0:return g.jsx(Zt.PlayArrow,{...f});case 1:return g.jsx(Zt.Pause,{...f});case 2:return g.jsx(Zt.Stop,{...f});default:return null}},h=u();return g.jsx(R.Box,{className:i,sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:g.jsx(R.Box,{sx:{display:"flex",gap:"40px",flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:h.map((p,f)=>g.jsxs(R.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[g.jsx(R.Button,{variant:"contained",disabled:!p.enabled||e==="preparing"||e==="starting"||e==="pausing"||e==="stopping"&&!s,onClick:p.onClick,sx:{width:"88px",height:"88px",borderRadius:"88px",backgroundColor:p.color,opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?1:.3,"&:hover":{backgroundColor:p.color,opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?.8:.3},"&:disabled":{backgroundColor:p.color,opacity:.3},minWidth:"88px",flexShrink:0},children:d(f)}),g.jsx(R.Typography,{variant:"body1",sx:{color:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?p.color:l.palette.text.disabled,textAlign:"center",opacity:p.enabled&&e!=="preparing"&&e!=="starting"&&e!=="pausing"&&!(e==="stopping"&&!s)?1:.3},children:p.label})]},p.label))})})})),ec=Fe(ye.observer(({programState:e,safetyState:t,operationMode:r,className:n})=>{const o=R.useTheme(),{t:s}=we.useTranslation(),a=()=>{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:s("ProgramStateIndicator.EStop.lb"),color:o.palette.error.main};if(t==="SAFETY_STATE_UNKNOWN"||t==="SAFETY_STATE_FAULT")return{label:s("ProgramStateIndicator.Error.lb"),color:o.palette.error.main};if(t==="SAFETY_STATE_NORMAL")switch(e){case mt.PREPARING:return{label:s("ProgramStateIndicator.Preparing.lb"),color:o.palette.warning.main};case mt.STARTING:return{label:s("ProgramStateIndicator.Starting.lb"),color:o.palette.warning.main};case mt.RUNNING:return{label:s("ProgramStateIndicator.Running.lb"),color:o.palette.success.main};case mt.PAUSING:return{label:s("ProgramStateIndicator.Pausing.lb"),color:o.palette.warning.main};case mt.PAUSED:return{label:s("ProgramStateIndicator.Paused.lb"),color:o.palette.grey[600]};case mt.STOPPING:return{label:s("ProgramStateIndicator.Stopping.lb"),color:o.palette.warning.main};case mt.COMPLETED:return{label:s("ProgramStateIndicator.Completed.lb"),color:o.palette.success.main};case mt.FAILED:return{label:s("ProgramStateIndicator.Failed.lb"),color:o.palette.error.main};case mt.STOPPED:return{label:s("ProgramStateIndicator.Stopped.lb"),color:o.palette.warning.main};case mt.ERROR:return{label:s("ProgramStateIndicator.Error.lb"),color:o.palette.error.main};case mt.IDLE:default:return{label:s("ProgramStateIndicator.Ready.lb"),color:o.palette.success.main}}return{label:s("ProgramStateIndicator.Idle.lb"),color:o.palette.grey[600]}},{label:i,color:l}=a(),u=`${i} / ${(()=>{switch(r){case"OPERATION_MODE_AUTO":return s("ProgramStateIndicator.Auto.lb");case"OPERATION_MODE_MANUAL":return s("ProgramStateIndicator.Manual.lb");case"OPERATION_MODE_MANUAL_T1":return s("ProgramStateIndicator.ManualT1.lb");case"OPERATION_MODE_MANUAL_T2":return s("ProgramStateIndicator.ManualT2.lb");default:return s("ProgramStateIndicator.Auto.lb")}})()}`;return g.jsx(R.Chip,{className:n,label:g.jsx(R.Typography,{variant:"body2",sx:{fontSize:"0.75rem",lineHeight:1.2},children:u}),variant:"filled",sx:{backgroundColor:l,color:o.palette.getContrastText(l),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),Cp="0.0.0-semantically-released";function bu(e){let t=Cp;return Cp.startsWith("0.")&&(t=""),`https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components${t?`@${t}`:""}/public/models/${e}.glb`}function Pj(e){function t(r){return r.children.length===0?[r]:[r,...r.children.flatMap(n=>t(n))]}return t(e).filter(r=>Wg(r))}function qg(e){return e.name.endsWith("_FLG")}function Wg(e){return/_J[0-9]+$/.test(e.name)}function Aj(e,t){let r;function n(o){if(qg(o)){if(r)throw Error(`Found multiple flange groups in robot model ${t}; first ${r.name} then ${o.name}. Only one _FLG group is allowed.`);r=o}Wg(o),o.children.map(n)}if(n(e.scene),!r)throw Error(`No flange group found in robot model ${t}. Flange must be identified with a name ending in _FLG.`);return{gltf:e}}function Jg({rapidlyChangingMotionState:e,dhParameters:t,onRotationChanged:r,children:n}){const o=G.useRef([]),s=G.useRef([]),a=G.useRef(null),{invalidate:i}=Hs.useThree();G.useEffect(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);return a.current=new su(d,{tension:120,friction:20,threshold:.001}),()=>{var h;(h=a.current)==null||h.destroy()}},[]),Hs.useFrame((d,h)=>{if(a.current){const p=a.current.update(h);c(),p||i()}});function l(d){d&&(s.current=Pj(d),c(),i())}function c(){var h;const d=((h=a.current)==null?void 0:h.getCurrentValues())||[];if(r)r(s.current,d);else for(const[p,f]of s.current.entries()){const m=t[p],y=m.theta||0,b=m.reverse_rotation_direction?-1:1;f.rotation.y=b*(d[p]||0)+y}}const u=G.useCallback(()=>{const d=e.state.joint_position.joints.filter(h=>h!==void 0);requestAnimationFrame(()=>{var h;o.current=d,(h=a.current)==null||h.setTarget(d)})},[e]);return G.useEffect(()=>{u()},[e,u]),Of(()=>{u()}),g.jsx("group",{ref:l,children:n})}const Rj="line",Ej="mesh";function Ij({rapidlyChangingMotionState:e,dhParameters:t,...r}){const n=new Et.Matrix4,o=G.useRef([]),s=G.useRef([]);G.useEffect(()=>{o.current=new Array(t.length).fill(null),s.current=new Array(t.length).fill(null)},[t.length]);function a(c,u){const d=new Et.Vector3,h=new Et.Quaternion,p=new Et.Vector3;n.decompose(d,h,p);const f=d.clone(),m=new Et.Matrix4().makeRotationY(c.theta+u*(c.reverse_rotation_direction?-1:1)).multiply(new Et.Matrix4().makeTranslation(0,c.d/1e3,0)).multiply(new Et.Matrix4().makeTranslation(c.a/1e3,0,0)).multiply(new Et.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}=a(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=o.current[d],p=s.current[d];h&&p&&i(d,h,p,u[d])}}return g.jsx(g.Fragment,{children:g.jsx(Jg,{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}=a(c,e.state.joint_position.joints[u]??0),p=`dhrobot_J0${u}`;return g.jsxs("group",{name:p,children:[g.jsx(ft.Line,{ref:f=>{o.current[u]=f},name:Rj,points:[d,h],color:"white",lineWidth:5}),g.jsxs("mesh",{ref:f=>{s.current[u]=f},name:Ej,position:h,children:[g.jsx("sphereGeometry",{args:[.01,32,32]}),g.jsx("meshStandardMaterial",{color:"black",depthTest:!0})]},"mesh_"+u)]},p)})]})})})}const _j=console.warn;function Mj(){return G.useEffect(()=>{console.warn=e=>{e!=="Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"&&_j(e)}},[]),g.jsx(g.Fragment,{})}function Vj(e){return e.type==="Mesh"}function kj({modelURL:e,flangeRef:t,postModelRender:r,...n}){const{gltf:o}=Aj(ft.useGLTF(e),e.split("/").pop()||e),s=G.useCallback(i=>{i&&r&&r()},[e]);function a(i){return Vj(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:qg(i)?t:void 0,children:i.children.map(a)},i.uuid)}return g.jsx("group",{...n,dispose:null,ref:s,children:a(o.scene)})}const jj=(e,t)=>{e.userData.isGhost||(e.traverse(r=>{if(r instanceof Se.Mesh){r.material instanceof Se.Material&&(r.material.colorWrite=!1);const n=r.clone(),o=r.clone();n.material=new Se.MeshStandardMaterial({depthTest:!0,depthWrite:!0,colorWrite:!1,polygonOffset:!0,polygonOffsetFactor:-1,side:Se.DoubleSide}),n.userData.isGhost=!0,o.material=new Se.MeshStandardMaterial({color:t,opacity:.3,depthTest:!0,depthWrite:!1,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-2,side:Se.DoubleSide}),o.userData.isGhost=!0,r.parent&&(r.parent.add(n),r.parent.add(o))}}),e.userData.isGhost=!0)},$j=e=>{if(!e.userData.isGhost)return;const t=[];e.traverse(r=>{var n;r instanceof Se.Mesh&&((n=r.userData)!=null&&n.isGhost?t.push(r):r.material instanceof Se.Material&&(r.material.colorWrite=!0))}),t.forEach(r=>{r.parent&&r.parent.remove(r)}),e.userData.isGhost=!1},Yg=Fe(({rapidlyChangingMotionState:e,modelFromController:t,dhParameters:r,getModel:n=bu,flangeRef:o,postModelRender:s,transparentColor:a,...i})=>{const[l,c]=G.useState(null),u=G.useCallback(h=>{c(h)},[]);G.useEffect(()=>{l&&(a?jj(l,a):$j(l))},[l,a]);const d=g.jsx(Ij,{rapidlyChangingMotionState:e,dhParameters:r,...i});return g.jsxs(fy.ErrorBoundary,{fallback:d,onError:h=>{console.error(h)},children:[g.jsx(G.Suspense,{fallback:d,children:g.jsx("group",{ref:u,children:g.jsx(Jg,{rapidlyChangingMotionState:e,dhParameters:r,children:g.jsx(kj,{modelURL:n(t),postModelRender:s,flangeRef:o,...i})})})}),g.jsx(Mj,{})]})});function Kg({connectedMotionGroup:e,getModel:t=bu,flangeRef:r,transparentColor:n,postModelRender:o,...s}){return e.dhParameters?g.jsx(Yg,{rapidlyChangingMotionState:e.rapidlyChangingMotionState,modelFromController:e.modelFromController||"",dhParameters:e.dhParameters,getModel:t,flangeRef:r,transparentColor:n,postModelRender:o,...s}):null}const Dj=Fe(ye.observer(({robotName:e,programState:t,safetyState:r,operationMode:n,driveToHomeEnabled:o=!1,onDriveToHomePress:s,onDriveToHomeRelease:a,connectedMotionGroup:i,robotComponent:l=Kg,customContentComponent:c,className:u})=>{var H;const d=R.useTheme(),{t:h}=we.useTranslation(),[p,f]=G.useState(!1),m=G.useRef(null),y=G.useRef(null),[b,C]=G.useState(!1),[w,T]=G.useState({width:400,height:600}),[A,O]=G.useState(0);G.useEffect(()=>{const z=()=>{if(y.current){const{offsetWidth:re,offsetHeight:he}=y.current;C(re>he),T({width:re,height:he})}};z();const ne=new ResizeObserver(z);return y.current&&ne.observe(y.current),()=>{ne.disconnect()}},[]);const P=G.useCallback(()=>{O(z=>z+1)},[]),E=G.useCallback(()=>{!o||!s||(f(!0),s())},[o,s]),_=G.useCallback(()=>{!o||!a||(f(!1),a())},[o,a]),x=G.useCallback(()=>{p&&a&&(f(!1),a())},[p,a]),N=b?w.width<350:w.height<200,M=b?w.height<310:w.height<450;return g.jsx(R.Card,{ref:y,className:u,sx:{width:"100%",height:"100%",display:"flex",flexDirection:b?"row":"column",position:"relative",overflow:"hidden",minWidth:{xs:180,sm:220,md:250},minHeight:b?{xs:200,sm:240,md:260}:{xs:150,sm:180,md:220},border:`1px solid ${d.palette.divider}`,borderRadius:"18px",boxShadow:"none",backgroundColor:((H=d.palette.backgroundPaperElevation)==null?void 0:H[8])||"#2A2A3F",backgroundImage:"none"},children:b?g.jsxs(g.Fragment,{children:[g.jsx(R.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:N?"none":"block"},children:!N&&g.jsxs(Hs.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},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(fl,{}),g.jsx(ft.Bounds,{fit:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:P})})]})}),g.jsxs(R.Box,{sx:{flex:"1",display:"flex",flexDirection:"column",justifyContent:"flex-start",width:N?"100%":"50%"},children:[g.jsxs(R.Box,{sx:{p:{xs:1.5,sm:2,md:3},pb:{xs:1,sm:1.5,md:2},textAlign:"left"},children:[g.jsx(R.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(ec,{programState:t,safetyState:r,operationMode:n})]}),g.jsxs(R.Box,{sx:{p:{xs:1.5,sm:2,md:3},pt:0,flex:"1",display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[!M&&c&&g.jsxs(R.Box,{children:[g.jsx(c,{}),g.jsx(R.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(R.Box,{sx:{mt:!M&&c?"auto":0},children:g.jsx(R.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(R.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!o,onMouseDown:E,onMouseUp:_,onMouseLeave:x,onTouchStart:E,onTouchEnd:_,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})})]})]})]}):g.jsx(g.Fragment,{children:g.jsxs(R.Box,{sx:{p:3,height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs(R.Box,{children:[g.jsx(R.Typography,{variant:"h6",component:"h2",sx:{mb:1},children:e}),g.jsx(ec,{programState:t,safetyState:r,operationMode:n})]}),g.jsx(R.Box,{sx:{flex:N?0:1,position:"relative",minHeight:N?0:{xs:120,sm:150,md:200},height:N?0:"auto",borderRadius:1,overflow:"hidden",display:N?"none":"block"},children:!N&&g.jsxs(Hs.Canvas,{orthographic:!0,camera:{position:[3,2,3],zoom:1},shadows:!0,frameloop:"demand",style:{borderRadius:d.shape.borderRadius,width:"100%",height:"100%",background:"transparent",position:"absolute"},dpr:[1,2],gl:{alpha:!0,antialias:!0},children:[g.jsx(fl,{}),g.jsx(ft.Bounds,{fit:!0,clip:!0,observe:!0,margin:1,maxDuration:1,children:g.jsx(l,{connectedMotionGroup:i,postModelRender:P})})]})}),g.jsxs(R.Box,{children:[!M&&c&&g.jsxs(g.Fragment,{children:[g.jsx(c,{}),g.jsx(R.Divider,{sx:{mt:1,mb:0,borderColor:d.palette.divider,opacity:.5}})]}),g.jsx(R.Box,{sx:{display:"flex",justifyContent:"flex-start",mt:!M&&c?{xs:1,sm:2,md:5}:{xs:.5,sm:1,md:2},mb:{xs:.5,sm:.75,md:1}},children:g.jsx(R.Button,{ref:m,variant:"contained",color:"secondary",size:"small",disabled:!o,onMouseDown:E,onMouseUp:_,onMouseLeave:x,onTouchStart:E,onTouchEnd:_,sx:{textTransform:"none",px:1.5,py:.5},children:h("RobotCard.DriveToHome.bt")})})]})]})})})})),Uj=Ir(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"),Lj=({title:e,titleId:t,...r},n)=>F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),Bj=G.forwardRef(Lj);var xu=(e=>(e.PRECONDITION_NOT_FULFILLED="PRECONDITION_NOT_FULFILLED",e.ROBOT_DISCONNECTED="ROBOT_DISCONNECTED",e.CELL_OPEN="CELL_OPEN",e.E_STOP="E_STOP",e.MANUAL_MODE="MANUAL_MODE",e.READY="READY",e))(xu||{});const Qg=Fe(ye.observer(({setupState:e,className:t})=>{const r=R.useTheme(),{t:n}=we.useTranslation(),o=()=>{var c,u,d,h,p,f,m;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:r.palette.secondary.contrastText};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:r.palette.secondary.contrastText};case"CELL_OPEN":return{label:n("RobotSetupReadinessIndicator.CellOpen.lb"),indicatorColor:r.palette.error.main,backgroundColor:((h=r.palette.backgroundPaperElevation)==null?void 0:h[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"E_STOP":return{label:n("RobotSetupReadinessIndicator.EStop.lb"),indicatorColor:r.palette.error.main,backgroundColor:((p=r.palette.backgroundPaperElevation)==null?void 0:p[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"MANUAL_MODE":return{label:n("RobotSetupReadinessIndicator.ManualMode.lb"),indicatorColor:r.palette.error.main,backgroundColor:((f=r.palette.backgroundPaperElevation)==null?void 0:f[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText};case"PRECONDITION_NOT_FULFILLED":default:return{label:n("RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"),indicatorColor:r.palette.error.main,backgroundColor:((m=r.palette.backgroundPaperElevation)==null?void 0:m[11])||r.palette.background.paper,textColor:r.palette.secondary.contrastText}}},{label:s,indicatorColor:a,backgroundColor:i,textColor:l}=o();return g.jsx(R.Chip,{className:t,label:g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.jsx(R.Box,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:a,flexShrink:0}}),g.jsx(R.Typography,{variant:"body2",sx:{color:l,fontSize:"0.75rem",lineHeight:1.2},children:s})]}),variant:"filled",sx:{backgroundColor:i,color:r.palette.getContrastText(i),fontWeight:500,height:"auto","& .MuiChip-label":{paddingX:1.5,paddingY:.5}}})})),Fj=Fe(ye.observer(({robotName:e,robotType:t,setupState:r,PreconditionComponent:n=Qg,className:o})=>{var l;const s=R.useTheme(),a=t||"Robot",i=r===xu.READY;return g.jsxs(R.Box,{className:o,sx:{border:`1px solid ${s.palette.divider}`,background:((l=s.palette.backgroundPaperElevation)==null?void 0:l[8])||"#292B3F",borderRadius:"8px",padding:"20px",display:"flex",alignItems:"center",justifyContent:"space-between",opacity:1},children:[g.jsxs(R.Box,{sx:{display:"flex",alignItems:"center",gap:2,flex:1},children:[i?g.jsx(R.Box,{sx:{fontSize:24,display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,"& svg":{fill:`${s.palette.primary.main} !important`},"& svg path":{fill:`${s.palette.primary.main} !important`}},children:g.jsx(Bj,{})}):g.jsx(Uj,{sx:{color:s.palette.error.main,fontSize:24}}),g.jsx(R.Typography,{variant:"body1",sx:{fontWeight:500,color:s.palette.text.primary},children:e}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0,sx:{backgroundColor:s.palette.text.secondary,opacity:.3,width:"1px"}}),g.jsx(R.Typography,{variant:"body2",sx:{color:s.palette.text.secondary},children:a})]}),n&&g.jsx(n,{setupState:r})]})})),Nj=Array(6).fill(2*Math.PI),tc={[zt.Abb]:[0,0,0,0,Math.PI/2,0,0],[zt.Fanuc]:[0,0,0,0,-Math.PI/2,0,0],[zt.Yaskawa]:[0,0,0,0,-Math.PI/2,0,0],[zt.Kuka]:[0,-Math.PI/2,Math.PI/2,0,Math.PI/2,0,0],[zt.Universalrobots]:[0,-Math.PI/2,-Math.PI/2,-Math.PI/2,Math.PI/2,-Math.PI/2,0]};function Xg(e){const[t]=e.split("_");switch(t){case"ABB":return zt.Abb;case"FANUC":return zt.Fanuc;case"YASKAWA":return zt.Yaskawa;case"KUKA":return zt.Kuka;case"UniversalRobots":return zt.Universalrobots;default:return null}}function zj(e,t){const r=Xg(e);return r&&r in tc?tc[r]:t||null}const Gj=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),Hj=G.forwardRef(Gj),qj=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),Wj=G.forwardRef(qj),Gt=ye.observer(({id:e,icon:t,color:r,title:n,name:o,label:s,explanation:a,literalValue:i,anchorOrigin:l,transformOrigin:c})=>{const u=ye.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(R.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(R.SvgIcon,{component:t,sx:{color:r}}),s&&g.jsx("div",{style:{color:r},children:s})]}),g.jsx(R.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(R.Stack,{gap:"1rem",padding:2,maxWidth:"450px",sx:{wordWrap:"break-word"},children:[g.jsxs("div",{children:[n&&g.jsx(R.Typography,{component:"span",fontSize:"14px",children:`${n}: `}),g.jsx(R.Typography,{component:"span",color:r,fontWeight:"bold",fontSize:"14px",children:o})]}),g.jsx(R.Typography,{fontSize:"14px",children:a}),i&&g.jsx(R.Typography,{fontSize:"12px",children:i})]})})]})}),Jj=ye.observer(({isVirtual:e,motionGroupId:t,anchorOrigin:r,transformOrigin:n,compact:o})=>{const s=R.useTheme(),{t:a}=we.useTranslation();return e?g.jsx(Gt,{id:"motion-group-virtual",icon:Wj,color:s.palette.tertiary.main,name:a("SafetyBar.ControllerType.Virtual.lb"),label:o?null:a("SafetyBar.ControllerType.Virtual.lb"),explanation:g.jsxs(we.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(Gt,{id:"motion-group-physical",icon:Hj,color:s.palette.primary.main,name:a("SafetyBar.ControllerType.Physical.lb"),label:o?null:a("SafetyBar.ControllerType.Physical.lb"),explanation:g.jsx(we.Trans,{i18nKey:"SafetyBar.MotionGroup.Physical.Explanation.lb",values:{motionGroupId:t},components:{code:g.jsx("code",{}),strong:g.jsx("strong",{})}}),anchorOrigin:r,transformOrigin:n})}),Yj=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),Kj=G.forwardRef(Yj),Qj=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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})),Xj=G.forwardRef(Qj),Zj=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),e$=G.forwardRef(Zj),t$=ye.observer(({operationMode:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:o}=we.useTranslation(),s=R.useTheme();switch(e){case"OPERATION_MODE_AUTO":return g.jsx(Gt,{id:"operation-mode-auto",icon:Kj,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Automatic.ti"),label:n?null:o("SafetyBar.OperationMode.Automatic.ti"),color:s.palette.text.secondary,explanation:g.jsx(we.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(Gt,{id:"operation-mode-manual",icon:e$,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Manual.lb"),label:n?null:o("SafetyBar.OperationMode.Manual.lb"),explanation:g.jsx(we.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(Gt,{id:"operation-mode-error",icon:Xj,color:s.palette.warning.main,title:o("SafetyBar.OperationMode.ti"),name:o("SafetyBar.OperationMode.Error.lb"),label:n?null:o("SafetyBar.OperationMode.Error.lb"),explanation:g.jsx(we.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})}}),r$=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),n$=G.forwardRef(r$),o$=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.createElement("path",{d:"M10.24 10.636 12 13.764l1.76-3.128h-3.52Z"}),F.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"}),F.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"})),s$=G.forwardRef(o$),a$=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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})),i$=G.forwardRef(a$),l$=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),c$=G.forwardRef(l$),u$=({title:e,titleId:t,...r},n)=>F.createElement("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",ref:n,"aria-labelledby":t,...r},e?F.createElement("title",{id:t},e):null,F.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"})),d$=G.forwardRef(u$),h$=ye.observer(({safetyState:e,anchorOrigin:t,transformOrigin:r,compact:n})=>{const{t:o}=we.useTranslation(),s=R.useTheme();switch(e){case"SAFETY_STATE_NORMAL":return g.jsx(Gt,{id:"safety-state-normal",title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Normal.lb"),label:n?null:o("SafetyBar.SafetyState.Normal.lb"),icon:c$,color:s.palette.text.secondary,explanation:g.jsx(we.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(Gt,{id:"safety-state-estop",title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Estop.lb"),label:n?null:o("SafetyBar.SafetyState.Estop.lb"),icon:s$,color:s.palette.error.main,explanation:g.jsx(we.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(Gt,{id:"safety-state-stop",icon:d$,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Stop.lb"),label:n?null:o("SafetyBar.SafetyState.Stop.lb"),color:s.palette.warning.main,explanation:g.jsx(we.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(Gt,{id:"safety-state-manual-action-required",icon:i$,color:s.palette.warning.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.ManualActionRequired.lb"),label:n?null:o("SafetyBar.SafetyState.ManualActionRequired.lb"),explanation:g.jsx(we.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(Gt,{id:"safety-state-error",icon:n$,color:s.palette.error.main,title:o("SafetyBar.SafetyState.ti"),name:o("SafetyBar.SafetyState.Error.lb"),label:n?null:o("SafetyBar.SafetyState.Error.lb"),explanation:g.jsx(we.Trans,{i18nKey:"SafetyBar.SafetyState.Error.Explanation.lb",children:"The robot controller has entered an unexpected safety state."}),literalValue:e,anchorOrigin:t,transformOrigin:r});default:dV(e,`Unknown safety state ${e}`)}}),p$=Fe(ye.observer(({isVirtual:e,motionGroupId:t,operationMode:r,safetyState:n,anchorOrigin:o,transformOrigin:s,compact:a=!0})=>{const i=a?1:2;return g.jsxs(R.Stack,{direction:"row",gap:i,alignItems:"center",sx:{height:"24px"},children:[g.jsx(h$,{safetyState:n,anchorOrigin:o,transformOrigin:s,compact:a}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(t$,{operationMode:r,anchorOrigin:o,transformOrigin:s,compact:a}),g.jsx(R.Divider,{orientation:"vertical",flexItem:!0}),g.jsx(Jj,{isVirtual:e,motionGroupId:t,anchorOrigin:o,transformOrigin:s,compact:a})]})})),m$=R.styled(R.Fab,{shouldForwardProp:e=>e!=="selected"})(({theme:e})=>{var t,r,n;return{borderRadius:"20px","&:hover":{background:(t=e.palette.backgroundPaperElevation)==null?void 0:t[7]},variants:[{props:({selected:o})=>!o,style:{background:(r=e.palette.backgroundPaperElevation)==null?void 0:r[0],color:e.palette.action.disabled,"> img":{opacity:.4}}},{props:({selected:o})=>o,style:{background:(n=e.palette.backgroundPaperElevation)==null?void 0:n[11],border:`1px solid ${e.palette.divider}`,color:e.palette.primary.contrastText}}]}}),f$=e=>{const{ref:t,...r}=e;return g.jsx(m$,{ref:t,selected:e.selected,...r,color:"secondary",variant:"circular"})};function g$(e){const{children:t,value:r,index:n,...o}=e;return g.jsx("div",{role:"tabpanel",hidden:r!==n,id:`tabpanel-${n}`,"aria-labelledby":`tab-${n}`,...o,children:r===n&&g.jsx(R.Box,{children:t})})}function y$({children:e,...t}){const{fullWidth:r,indicator:n,onChange:o,orientation:s,scrollButtons:a,selectionFollowsFocus:i,textColor:l,value:c,variant:u,...d}=t;return g.jsx(R.Box,{...d,children:e})}const b$=Fe(ye.observer(e=>{const{items:t,activeTab:r,defaultActiveTab:n=0,onTabChange:o,sx:s,ref:a}=e,i=r!==void 0,[l,c]=G.useState(n),u=i?r:l;G.useEffect(()=>{i||t.length!==0&&(l<0||l>t.length-1)&&c(0)},[t.length,i,l]);const d=(h,p)=>{i||c(p),o==null||o(p)};return g.jsxs(R.Box,{ref:a,sx:{height:"100%",display:"flex",flexDirection:"column",...s},children:[g.jsx(R.Box,{sx:{px:0,py:0,overflow:"visible",position:"relative",paddingTop:h=>h.spacing(2),paddingRight:h=>h.spacing(2.5)},children:g.jsx(R.Tabs,{value:u,onChange:d,sx:{minHeight:"32px",backgroundColor:"transparent",overflow:"visible","& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:2,overflow:"visible",paddingTop:0,paddingBottom:0},"& .MuiTabs-scroller":{overflow:"visible !important"},"& .MuiTab-root":{overflow:"visible"}},children:t.map((h,p)=>{var T,A,O;const f=()=>{if(!h.badge)return;const P=h.badge.content,E=h.badge.max;return typeof P=="number"&&E&&P>E?`${E}+`:P},m=()=>{if(!h.badge)return!1;const P=h.badge.content,E=h.badge.showZero;return!(P===0&&!E)},y=f(),b=m(),C=()=>{i||c(p),o==null||o(p)},w=g.jsx(R.Tab,{label:h.label,icon:h.icon,iconPosition:"start",disableRipple:!0,onClick:C,sx:{minHeight:"32px",height:"32px",padding:"0px 10px",borderRadius:"12px",backgroundColor:P=>{var E;return((E=P.palette.backgroundPaperElevation)==null?void 0:E[11])||"#32344B"},color:"text.primary",opacity:u===p?1:.38,fontSize:"13px",transition:"all 0.2s ease-in-out",position:"relative",overflow:"visible","&:hover":{opacity:u===p?1:.6},"&.Mui-selected":{opacity:1,backgroundColor:P=>{var E;return((E=P.palette.backgroundPaperElevation)==null?void 0:E[11])||"#32344B"},color:"text.primary"},"&:focus":{outline:"none"},"&:active":{transform:"none"}}},h.id);return b?g.jsx(y$,{component:"span",sx:{display:"inline-flex"},children:g.jsx(R.Badge,{badgeContent:y,color:((T=h.badge)==null?void 0:T.color)||"error",max:(A=h.badge)==null?void 0:A.max,showZero:(O=h.badge)==null?void 0:O.showZero,anchorOrigin:{vertical:"top",horizontal:"right"},overlap:"rectangular",sx:{"& .MuiBadge-badge":{opacity:"1 !important"}},children:w})},h.id):w})})}),g.jsx(R.Box,{sx:{mt:h=>h.spacing(2),borderBottom:1,borderColor:"divider"}}),g.jsx(R.Box,{sx:{flex:1,overflow:"auto"},children:t.map((h,p)=>g.jsx(g$,{value:u,index:p,children:h.content},h.id))})]})})),x$={$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"},v$=G.lazy(()=>import("@monaco-editor/react"));let ml=null;async function S$(){if(!ml){const[{createHighlighter:e},{shikiToMonaco:t}]=await Promise.all([import("shiki"),import("@shikijs/monaco")]);ml={shiki:await e({langs:[x$],themes:["dark-plus","light-plus"]}),shikiToMonaco:t}}return ml}const w$=Fe(e=>{const t=R.useTheme(),[r,n]=G.useState("dark-plus"),o=t.palette.mode==="dark"?"dark-plus":"light-plus";async function s(a){var c,u;a.languages.register({id:"wandelscript"}),a.languages.setLanguageConfiguration("wandelscript",{comments:{lineComment:"#"},brackets:[["(",")"],["[","]"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}]});const{shiki:i,shikiToMonaco:l}=await S$();l(i,a),a.editor.defineTheme(o,((u=(c=t.componentsExt)==null?void 0:c.WandelscriptEditor)==null?void 0:u.monacoTheme)??{base:t.palette.mode==="dark"?"vs-dark":"vs",inherit:!0,rules:[],colors:{}}),e.monacoSetup&&e.monacoSetup(a),n(o)}return g.jsx(G.Suspense,{fallback:g.jsx(du,{}),children:g.jsx(v$,{value:e.code,onMount:(a,i)=>{s(i)},onChange:e.onChange,defaultLanguage:"wandelscript",theme:r,options:{minimap:{enabled:!1},wordWrap:"on",automaticLayout:!0,...e.monacoOptions}})})});function Zg(){var t,r,n,o,s,a,i;const e=R.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`},".MuiDataGrid-panelContent":{borderRadius:"16px !important","& .MuiPaper-root":{borderRadius:"16px !important"}},".MuiDataGrid-filterForm":{borderRadius:"16px !important","& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}},"& .MuiTextField-root":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}},".MuiDataGrid-filterFormValueInput":{"& .MuiInputBase-root":{borderRadius:"16px !important","& fieldset":{borderRadius:"16px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"16px !important"}}}}},MuiDataGrid:{styleOverrides:{root:{},panelContent:{borderRadius:"16px !important"},filterForm:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}},filterFormValueInput:{"& .MuiInputBase-root":{borderRadius:"10px !important","& fieldset":{borderRadius:"10px !important"},"& .MuiOutlinedInput-notchedOutline":{borderRadius:"10px !important"}}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",borderRadius:"10px"}},variants:[{props:{color:"secondary",variant:"contained"},style:{border:`1px solid ${e.palette.divider}`,background:(n=(r=(t=e.paletteExt)==null?void 0:t.secondary)==null?void 0:r.tonal)==null?void 0:n.toString()}},{props:{color:"secondary",variant:"outlined"},style:{border:`1px solid ${e.palette.divider}`}}]},MuiTab:{styleOverrides:{root:{textTransform:"none",color:e.palette.text.secondary,"&.Mui-selected":{color:e.palette.text.primary}}}},MuiTabs:{styleOverrides:{root:{background:(o=e.palette.backgroundPaperElevation)==null?void 0:o[1]}}},MuiToggleButtonGroup:{styleOverrides:{root:{".MuiToggleButtonGroup-firstButton":{borderRadius:"10px 0 0 10px"},".MuiToggleButtonGroup-lastButton":{borderRadius:"0 10px 10px 0"}}}},MuiToggleButton:{styleOverrides:{root:{textTransform:"none",padding:"6px 16px"}}},MuiSelect:{variants:[{props:{variant:"filled"},style:{borderRadius:"10px","::before, ::after":{visibility:"collapse"},".MuiInputBase-input":{padding:"6px 16px",borderRadius:"10px"}}}]},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"4px 0 8px -4px rgba(0, 0, 0, 0.3)"}}},MuiFab:{styleOverrides:{root:{background:(a=(s=e.paletteExt)==null?void 0:s.secondary)==null?void 0:a.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":R.rgbToHex(((i=e.palette.backgroundPaperElevation)==null?void 0:i[5])??""),"editor.foreground":"#d4d4d4","editorLineNumber.foreground":"#797979","editorLineNumber.activeForeground":"#e9e9e9","editor.lineHighlightBorder":"#e9e9e911"}}}}}}function C$(){const e=Zg();return e.palette.mode="light",e}function O$(e){var n,o,s,a;let t=!0;((n=e.palette)==null?void 0:n.mode)==="light"?t=!1:((o=e.palette)==null?void 0:o.mode)!=="dark"&&(t=!(typeof window<"u"&&((a=(s=window.matchMedia)==null?void 0:s.call(window,"(prefers-color-scheme: light)"))==null?void 0:a.matches)));const r=t?Zg():C$();return qp(r,e)}exports.AppHeader=My;exports.CollisionSceneRenderer=Cy;exports.CycleTimer=ZT;exports.JoggingCartesianAxisControl=Ml;exports.JoggingJointRotationControl=Rf;exports.JoggingPanel=mj;exports.JoggingStore=wi;exports.LoadingCover=du;exports.LoadingErrorMessage=xg;exports.LogPanel=wj;exports.LogStore=Gg;exports.LogViewer=Hg;exports.MANUFACTURER_HOME_CONFIGS=tc;exports.NoMotionGroupModal=Oj;exports.PoseCartesianValues=gj;exports.PoseJointValues=yj;exports.PresetEnvironment=fl;exports.ProgramControl=Tj;exports.ProgramState=mt;exports.ProgramStateIndicator=ec;exports.Robot=Kg;exports.RobotCard=Dj;exports.RobotListItem=Fj;exports.RobotSetupReadinessIndicator=Qg;exports.RobotSetupReadinessState=xu;exports.SafetyBar=p$;exports.SafetyZonesRenderer=Py;exports.SelectableFab=f$;exports.SupportedRobot=Yg;exports.TabBar=b$;exports.Timer=sP;exports.TrajectoryRenderer=Ay;exports.ValueInterpolator=su;exports.VelocitySlider=Fg;exports.VelocitySliderLabel=yu;exports.WandelbotsDataGrid=Cf;exports.WandelscriptEditor=w$;exports.createDebugMessage=bj;exports.createErrorMessage=Sj;exports.createInfoMessage=xj;exports.createLogMessage=Qo;exports.createNovaMuiTheme=O$;exports.createWarningMessage=vj;exports.defaultAxisConfig=Nj;exports.defaultGetModel=bu;exports.extractManufacturer=Xg;exports.getDefaultHomeConfig=zj;exports.i18n=nc;exports.useAnimationFrame=ii;exports.useAutorun=Of;exports.useInterpolation=au;exports.useMounted=ai;exports.useReaction=Tf;
|
|
155
160
|
//# sourceMappingURL=index.cjs.map
|